1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's qxfer_osdata op into a method of
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op. Also add
8 'supports_qxfer_osdata'.
9 * target.cc (process_target::qxfer_osdata): Define.
10 (process_target::supports_qxfer_osdata): Define.
12 Update the derived classes and callers below.
14 * server.cc (handle_qxfer_osdata): Update.
15 (handle_query): Update.
16 * linux-low.cc (linux_target_ops): Update.
17 (linux_process_target::supports_qxfer_osdata): Define.
18 (linux_qxfer_osdata): Turn into ...
19 (linux_process_target::qxfer_osdata): ... 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 hostio_last_error op into a
28 method of process_target.
30 * target.h (struct process_stratum_target): Remove the target op.
31 (class process_target): Add the target op.
32 * target.cc: Add "hostio.h" to includes.
33 (process_target::hostio_last_error): Define.
35 Update the derived classes and callers below.
37 * hostio.cc (hostio_error): Update.
38 * linux-low.cc: Remove "hostio.h" from includes.
39 (linux_target_ops): Update.
40 * lynx-low.cc (lynx_target_ops): Update.
41 * nto-low.cc (nto_target_ops): Update.
42 * win32-low.h (class win32_process_target): Update.
43 * win32-low.cc (win32_target_ops): Update.
44 (wince_hostio_last_error): Turn into ...
45 (win32_process_target::hostio_last_error): ... this.
47 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
49 Turn process_stratum_target's get_tls_address op into a method of
52 * target.h (struct process_stratum_target): Remove the target op.
53 (class process_target): Add the target op. Also add
54 'supports_get_tls_address'.
55 * target.cc (process_target::get_tls_address): Define.
56 (process_target::supports_get_tls_address): Define.
58 Update the derived classes and callers below.
60 * server.cc (handle_query): Update.
61 * linux-low.cc (linux_target_ops): Update.
62 (linux_process_target::supports_get_tls_address): Define.
63 (linux_process_target::get_tls_address): Define.
64 * linux-low.h (class linux_process_target): Update.
65 * lynx-low.cc (lynx_target_ops): Update.
66 * nto-low.cc (nto_target_ops): Update.
67 * win32-low.cc (win32_target_ops): Update.
69 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
71 Turn process_stratum_target's read_offsets op into a method of
74 * target.h (struct process_stratum_target): Remove the target op.
75 (class process_target): Add the target op. Also add
76 'supports_read_offsets'.
77 * target.cc (process_target::read_offsets): Define.
78 (process_target::supports_read_offsets): Define.
80 Update the derived classes and callers below.
82 * server.cc (handle_query): Update.
83 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
84 (linux_target_ops): Update.
85 (linux_process_target::supports_read_offsets): Define.
86 (linux_read_offsets): Turn into ...
87 (linux_process_target::read_offsets): ... this.
88 * linux-low.h (class linux_process_target): Update.
89 * lynx-low.cc (lynx_target_ops): Update.
90 * nto-low.cc (nto_target_ops): Update.
91 * win32-low.cc (win32_target_ops): Update.
93 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
95 Turn process_stratum_target's stopped_by_watchpoint and
96 stopped_data_address ops into methods of process_target.
98 * target.h (struct process_stratum_target): Remove the target ops.
99 (class process_target): Add the target ops.
100 * target.cc (process_target::stopped_by_watchpoint): Define.
101 (process_target::stopped_data_address): Define.
103 Update the derived classes and callers below.
105 * remote-utils.cc (prepare_resume_reply): Update.
106 * linux-low.cc (linux_target_ops): Update.
107 (linux_stopped_by_watchpoint): Turn into ...
108 (linux_process_target::stopped_by_watchpoint): ... this.
109 (linux_stopped_data_address): Turn into ...
110 (linux_process_target::stopped_data_address): ... this.
111 * linux-low.h (class linux_process_target): Update.
112 * lynx-low.cc (lynx_target_ops): Update.
113 * nto-low.cc (nto_target_ops): Update.
114 (nto_stopped_by_watchpoint): Turn into ...
115 (nto_process_target::stopped_by_watchpoint): ... this.
116 (nto_stopped_data_address): Turn into ...
117 (nto_process_target::stopped_data_address): ... this.
118 * nto-low.h (class nto_process_target): Update.
119 * win32-low.cc (win32_target_ops): Update.
120 (win32_stopped_by_watchpoint): Turn into ...
121 (win32_process_target::stopped_by_watchpoint): ... this.
122 (win32_stopped_data_address): Turn into ...
123 (win32_process_target::stopped_data_address): ... this.
124 * win32-low.h (class win32_process_target): Update.
126 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
128 Turn process_stratum_target's supports_hardware_single_step op into
129 a method of process_target.
131 * target.h (struct process_stratum_target): Remove the target op.
132 (class process_target): Add the target op.
133 (target_supports_hardware_single_step): Update the macro.
134 (target_can_do_hardware_single_step): Remove declaration.
135 * target.cc (process_target::supports_hardware_single_step): Define.
136 (target_can_do_hardware_single_step): Remove.
138 Update the derived classes and callers below.
140 * linux-low.h (class linux_process_target): Update.
141 * linux-low.cc (linux_target_ops): Update.
142 (linux_supports_hardware_single_step): Turn into ...
143 (linux_process_target::supports_hardware_single_step): ... this.
144 * lynx-low.h (class lynx_process_target): Update.
145 * lynx-low.cc (lynx_target_ops): Update.
146 (lynx_process_target::supports_hardware_single_step): Define.
147 * nto-low.h (class nto_process_target): Update.
148 * nto-low.cc (nto_target_ops): Update.
149 (nto_process_target::supports_hardware_single_step): Define.
150 * win32-low.h (class win32_process_target): Update.
151 * win32-low.cc (win32_target_ops): Update.
152 (win32_process_target::supports_hardware_single_step): Define.
154 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
156 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
157 ops into methods of process_target.
159 * target.h (struct process_stratum_target): Remove the target ops.
160 (class process_target): Add the target ops.
161 (target_stopped_by_hw_breakpoint): Update the macro.
162 (target_supports_stopped_by_hw_breakpoint): Update the macro.
163 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
164 (process_target::supports_stopped_by_hw_breakpoint): Define.
166 Update the derived classes and callers below.
168 * linux-low.cc (linux_target_ops): Update.
169 (linux_stopped_by_hw_breakpoint): Turn into ...
170 (linux_process_target::stopped_by_hw_breakpoint): ... this.
171 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
172 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
173 * linux-low.h (class linux_process_target): Update.
174 * lynx-low.cc (lynx_target_ops): Update.
175 * nto-low.cc (nto_target_ops): Update.
176 * win32-low.cc (win32_target_ops): Update.
178 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
180 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
181 ops into methods of process_target.
183 * target.h (struct process_stratum_target): Remove the target ops.
184 (class process_target): Add the target ops.
185 (target_stopped_by_sw_breakpoint): Update the macro.
186 (target_supports_stopped_by_sw_breakpoint): Update the macro.
187 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
188 (process_target::supports_stopped_by_sw_breakpoint): Define.
190 Update the derived classes and callers below.
192 * linux-low.cc (linux_target_ops): Update.
193 (linux_stopped_by_sw_breakpoint): Turn into ...
194 (linux_process_target::stopped_by_sw_breakpoint): ... this.
195 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
196 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
197 * linux-low.h (class linux_process_target): Update.
198 * lynx-low.cc (lynx_target_ops): Update.
199 * nto-low.cc (nto_target_ops): Update.
200 * win32-low.cc (win32_target_ops): Update.
202 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
204 Turn process_stratum_target's insert_point and remove_point ops
205 into methods of process_target.
207 * target.h (struct process_stratum_target): Remove the target ops.
208 (class process_target): Add the target ops.
209 * target.cc (process_target::insert_point): Define.
210 (process_target::remove_point): Define.
212 Update the derived classes and callers below.
214 * mem-break.cc (set_raw_breakpoint_at): Update.
215 (delete_raw_breakpoint): Update.
216 (uninsert_raw_breakpoint): Update.
217 (reinsert_raw_breakpoint): Update.
218 * linux-low.cc (linux_target_ops): Update.
219 (linux_insert_point): Turn into ...
220 (linux_process_target::insert_point): ... this.
221 (linux_remove_point): Turn into ...
222 (linux_process_target::remove_point): ... this.
223 * linux-low.h (class linux_process_target): Update.
224 * lynx-low.cc (lynx_target_ops): Update.
225 * nto-low.cc (nto_target_ops): Update.
226 (nto_insert_point): Turn into ...
227 (nto_process_target::insert_point): ... this.
228 (nto_remove_point): Turn into ...
229 (nto_process_target::remove_point): ... this.
230 * nto-low.h (class nto_process_target): Update.
231 * win32-low.cc (win32_target_ops): Update.
232 (win32_insert_point): Turn into ...
233 (win32_process_target::insert_point): ... this.
234 (win32_remove_point): Turn into ...
235 (win32_process_target::remove_point): ... this.
236 * win32-low.h (class win32_process_target): Update.
238 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
240 Turn process_stratum_target's supports_z_point_type op into a
241 method of process_target.
243 * target.h (struct process_stratum_target): Remove the target op.
244 (class process_target): Add the target op.
245 * target.cc (process_target::supports_z_point_type): Define.
247 Update the derived classes and callers below.
249 * mem-break.cc (z_type_supported): Update.
250 * linux-low.cc (linux_target_ops): Update.
251 (linux_supports_z_point_type): Turn into ...
252 (linux_process_target::supports_z_point_type): ... this.
253 * linux-low.h (class linux_process_target): Update.
254 * lynx-low.cc (lynx_target_ops): Update.
255 * nto-low.cc (nto_target_ops): Update.
256 (nto_supports_z_point_type): Turn into ...
257 (nto_process_target::supports_z_point_type): ... this.
258 * nto-low.h (class nto_process_target): Update.
259 * win32-low.cc (win32_target_ops): Update.
260 (win32_supports_z_point_type): Turn into ...
261 (win32_process_target::supports_z_point_type): ... this.
262 * win32-low.h (class win32_process_target): Update.
264 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
266 Turn process_stratum_target's read_auxv op into a method of
269 * target.h (class process_stratum_target): Remove the target op.
270 (struct process_target): Add the target op. Also add
271 'supports_read_auxv'.
272 * target.cc (process_target::read_auxv): Define.
273 (process_target::supports_read_auxv): Define.
275 Update the derived classes and callers below.
277 * server.cc (handle_qxfer_auxv): Update.
278 (handle_query): Update.
279 * linux-low.cc (linux_target_ops): Update.
280 (linux_process_target::supports_read_auxv): Define.
281 (linux_read_auxv): Turn into ...
282 (linux_process_target::read_auxv): ... this.
283 * linux-low.h (class linux_process_target): Update.
284 * lynx-low.cc (lynx_target_ops): Update.
285 * nto-low.cc (nto_target_ops): Update.
286 (nto_process_target::supports_read_auxv): Define.
287 (nto_read_auxv): Turn into ...
288 (nto_process_target::read_auxv): ... this.
289 * nto-low.h (class nto_process_target): Update.
290 * win32-low.cc (win32_target_ops): Update.
292 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
294 Turn process_stratum_target's request_interrupt op into a method of
297 * target.h (struct process_stratum_target): Remove the target op.
298 (class process_target): Add the target op.
300 Update the derived classes and callers below.
302 * remote-utils.cc (putpkt_binary_1): Update.
303 (input_interrupt): Update.
305 * server.cc (handle_v_requests): Update.
306 * linux-low.cc (linux_target_ops): Update.
307 (linux_request_interrupt): Turn into ...
308 (linux_process_target::request_interrupt): ... this.
309 * linux-low.h (class linux_process_target): Update.
310 * lynx-low.cc (lynx_target_ops): Update.
311 (lynx_request_interrupt): Turn into ...
312 (lynx_process_target::request_interrupt): ... this.
313 * lynx-low.h (class lynx_process_target): Update.
314 * nto-low.cc (nto_target_ops): Update.
315 (nto_request_interrupt): Turn into ...
316 (nto_process_target::request_interrupt): ... this.
317 * nto-low.h (class nto_process_target): Update.
318 * win32-low.cc (win32_target_ops): Update.
319 (win32_request_interrupt): Turn into ...
320 (win32_process_target::request_interrupt): ... this.
321 * win32-low.h (class win32_process_target): Update.
323 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
325 Turn process_stratum_target's look_up_symbols op into a method of
328 * target.h (struct process_stratum_target): Remove the target op.
329 (class process_target): Add the target op.
330 * target.cc (process_target::look_up_symbols): Define.
332 Update the derived classes and callers below.
334 * server.cc (handle_query): Update.
335 * linux-low.cc (linux_target_ops): Update.
336 (linux_look_up_symbols): Turn into ...
337 (linux_process_target::look_up_symbols): ... this.
338 * linux-low.h (class linux_process_target): Update.
339 * lynx-low.cc (lynx_target_ops): Update.
340 * nto-low.cc (nto_target_ops): Update.
341 * win32-low.cc (win32_target_ops): Update.
343 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
345 Turn process_stratum_target's read_memory and write_memory
346 ops into methods of process_target.
348 * target.h (struct process_stratum_target): Remove the target ops.
349 (class process_target): Add the target ops.
351 Update the derived classes and callers below.
353 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
354 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
355 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
356 (arm_get_syscall_trapinfo): Update.
357 * linux-cris-low.cc (cris_breakpoint_at): Update.
358 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
359 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
360 * linux-mips-low.cc (mips_breakpoint_at): Update.
361 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
362 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
363 * linux-sh-low.cc (sh_breakpoint_at): Update.
364 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
365 (sparc_store_gregset_from_stack): Update.
366 (sparc_breakpoint_at): Update.
367 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
368 * linux-tile-low.cc (tile_breakpoint_at): Update.
369 * linux-x86-low.cc (x86_breakpoint_at): Update.
370 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
371 * mem-brea.cc (insert_memory_breakpoint): Update.
372 (validate_inserted_breakpoint): Update.
373 * target.cc (read_inferior_memory): Update.
374 (target_write_memory): Update.
375 * linux-low.cc (linux_target_ops): Update.
376 (linux_read_memory): Make a wrapper around the read_memory target
378 (linux_process_target::read_memory): Rename from linux_read_memory.
379 (linux_write_memory): Turn into ...
380 (linux_process_target::write_memory): ... this.
381 * linux-low.h (class linux_process_target): Update.
382 * lynx-low.cc (lynx_target_ops): Update.
383 (lynx_read_memory): Turn into ...
384 (lynx_process_target::read_memory): ... this.
385 (lynx_write_memory): Turn into ...
386 (lynx_process_target::write_memory): ... this.
387 * lynx-low.h (class lynx_process_target): Update.
388 * nto-low.cc (nto_target_ops): Update.
389 (nto_read_memory): Turn into ...
390 (nto_process_target::read_memory): ... this.
391 (nto_write_memory): Turn into ...
392 (nto_process_target::write_memory): ... this.
393 * nto-low.h (class nto_process_target): Update.
394 * win32-low.cc (win32_target_ops): Update.
395 (win32_read_inferior_memory): Turn into ...
396 (win32_process_target::read_memory): ... this.
397 (win32_write_inferior_memory): Turn into ...
398 (win32_process_target::write_memory): ... this.
399 * win32-low.h (class win32_process_target): Update.
401 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
403 Turn process_stratum_target's prepare_to_access_memory and
404 done_accessing_memory ops into methods of process_target.
406 * target.h (struct process_stratum_target): Remove the target ops.
407 (class process_target): Add the target ops.
408 * target.cc (process_target::prepare_to_access_memory): Define.
409 (process_target::done_accessing_memory): Define.
410 (prepare_to_access_memory): Update.
411 (done_accessing_memory): Update.
413 Update the derived classes and callers below.
415 * linux-low.cc (linux_target_ops): Update.
416 (linux_prepare_to_access_memory): Turn into ...
417 (linux_process_target::prepare_to_access_memory): ... this.
418 (linux_done_accessing_memory): Turn into ...
419 (linux_process_target::done_accessing_memory): ... this.
420 * linux-low.h (class linux_process_target): Update.
421 * lynx-low.cc (lynx_target_ops): Update.
422 * nto-low.cc (nto_target_ops): Update.
423 * win32-low.cc (win32_target_ops): Update.
425 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
427 Turn process_stratum_target's fetch_registers and store_registers
428 ops into methods of process_target.
430 * target.h (struct process_stratum_target): Remove the target ops.
431 (class process_target): Add the target ops.
432 (fetch_inferior_registers): Update the macro.
433 (store_inferior_registers): Update the macro.
435 Update the derived classes and callers below.
437 * linux-low.cc (linux_target_ops): Update.
438 (linux_fetch_registers): Turn into ...
439 (linux_process_target::fetch_registers): ... this.
440 (linux_store_registers): Turn into ...
441 (linux_process_target::store_registers): ... this.
442 * linux-low.h (class linux_process_target): Update.
443 * lynx-low.cc (lynx_target_ops): Update.
444 (lynx_fetch_registers): Turn into ...
445 (lynx_process_target::fetch_registers): ... this.
446 (lynx_store_registers): Turn into ...
447 (lynx_process_target::store_registers): ... this.
448 * lynx-low.h (class lynx_process_target): Update.
449 * nto-low.cc (nto_target_ops): Update.
450 (nto_fetch_registers): Turn into ...
451 (nto_process_target::fetch_registers): ... this.
452 (nto_store_registers): Turn into ...
453 (nto_process_target::store_registers): ... this.
454 * nto-low.h (class nto_process_target): Update.
455 * win32-low.cc (win32_target_ops): Update.
456 (win32_fetch_inferior_registers): Turn into ...
457 (win32_process_target::fetch_registers): ... this.
458 (win32_store_inferior_registers): Turn into ...
459 (win32_process_target::store_registers): ... this.
460 * win32-low.h (class win32_process_target): Update.
462 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
464 Turn process_stratum_target's wait op into a method of
467 * target.h (struct process_stratum_target): Remove the target op.
468 (class process_target): Add the target op.
470 Update the derived classes and callers below.
472 * target.cc (target_wait): Update.
473 * linux-low.cc (linux_target_ops): Update.
474 (linux_wait): Turn into ...
475 (linux_process_target::wait): ... this.
476 * linux-low.h (class linux_process_target): Update.
477 * lynx-low.cc (lynx_target_ops): Update.
478 (lynx_wait): Turn into ...
479 (lynx_process_target::wait): ... this.
480 * lynx-low.h (class lynx_process_target): Update.
481 * nto-low.cc (nto_target_ops): Update.
482 (nto_wait): Turn into ...
483 (nto_process_target::wait): ... this.
484 * nto-low.h (class nto_process_target): Update.
485 * win32-low.cc (win32_target_ops): Update.
486 (win32_wait): Turn into ...
487 (win32_process_target::wait): ... this.
488 (do_initial_child_stuff): Update.
489 * win32-low.h (class win32_process_target): Update.
491 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
493 Turn process_stratum_target's resume op into a method of
496 * target.h (struct process_stratum_target): Remove the target op.
497 (class process_target): Add the target op.
499 Update the derived classes and callers below.
501 * server.cc (resume): Update.
502 * target.cc (target_stop_and_wait): Update.
503 (target_continue_no_signal): Update.
504 (target_continue): Update.
505 * linux-low.cc (linux_target_ops): Update.
506 (linux_resume): Turn into ...
507 (linux_process_target::resume): ... this.
508 * linux-low.h (class linux_process_target): Update.
509 * lynx-low.cc (lynx_target_ops): Update.
510 (lynx_resume): Turn into ...
511 (lynx_process_target::resume): ... this.
512 * lynx-low.h (class lynx_process_target): Update.
513 * nto-low.cc (nto_target_ops): Update.
514 (nto_resume): Turn into ...
515 (nto_process_target::resume): ... this.
516 * nto-low.h (class nto_process_target): Update.
517 * win32-low.cc (win32_target_ops): Update.
518 (win32_resume): Turn into ...
519 (win32_process_target::resume): ... this.
520 (win32_process_target::detach): Update.
521 (do_initial_child_stuff): Update.
522 * win32-low.h (class win32_process_target): Update.
524 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
526 Turn process_stratum_target's thread_alive op into a method of
529 * target.h (struct process_stratum_target): Remove the target op.
530 (class process_target): Add the target op.
531 (mythread_alive): Update the macro.
533 Update the derived classes and callers below.
535 * linux-low.cc (linux_target_ops): Update.
536 (linux_thread_alive): Turn into ...
537 (linux_process_target::thread_alive): ... this.
538 (wait_for_sigstop): Update.
539 * linux-low.h (class linux_process_target): Update.
540 * lynx-low.cc (lynx_target_ops): Update.
541 (lynx_thread_alive): Turn into ...
542 (lynx_process_target::thread_alive): ... this.
543 * lynx-low.h (class lynx_process_target): Update.
544 * nto-low.cc (nto_target_ops): Update.
545 (nto_thread_alive): Turn into ...
546 (nto_process_target::thread_alive): ... this.
547 * nto-low.h (class nto_process_target): Update.
548 * win32-low.cc (win32_target_ops): Update.
549 (win32_thread_alive): Turn into ...
550 (win32_process_target::thread_alive): ... this.
551 * win32-low.h (class win32_process_target): Update.
553 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
555 Turn process_stratum_target's join op into a method of
558 * target.h (struct process_stratum_target): Remove the target op.
559 (class process_target): Add the target op.
560 (join_inferior): Update the macro.
562 Update the derived classes and callers below.
564 * linux-low.cc (linux_target_ops): Update.
565 (linux_join): Turn into ...
566 (linux_process_target::join): ... this.
567 * linux-low.h (class linux_process_target): Update.
568 * lynx-low.cc (lynx_target_ops): Update.
569 (lynx_join): Turn into ...
570 (lynx_process_target::join): ... this.
571 * lynx-low.h (class lynx_process_target): Update.
572 * nto-low.cc (nto_target_ops): Update.
573 (nto_process_target::join): Define.
574 * nto-low.h (class nto_process_target): Update.
575 * win32-low.cc (win32_target_ops): Update.
576 (win32_join): Turn into ...
577 (win32_process_target::join): ... this.
578 * win32-low.h (class win32_process_target): Update.
580 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
582 Turn process_stratum_target's mourn op into a method of
585 * target.h (struct process_stratum_target): Remove the target op.
586 (class process_target): Add the target op.
588 Update the derived classes and callers below.
590 * target.cc (target_mourn_inferior): Update.
591 * linux-low.cc (linux_target_ops): Update.
592 (linux_mourn): Turn into ...
593 (linux_process_target::mourn): ... this.
594 (handle_extended_wait): Update.
595 (linux_process_target::kill): Update.
596 (linux_process_target::detach): Update.
597 * linux-low.h (class linux_process_target): Update.
598 * lynx-low.cc (lynx_target_ops): Update.
599 (lynx_mourn): Turn into ...
600 (lynx_process_target::mourn): ... this.
601 * lynx-low.h (class lynx_process_target): Update.
602 * nto-low.cc (nto_target_ops): Update.
603 (nto_mourn): Turn into ...
604 (nto_process_target::mourn): ... this.
605 * nto-low.h (class nto_process_target): Update.
606 * win32-low.cc (win32_target_ops): Update.
607 (win32_mourn): Turn into ...
608 (win32_process_target::mourn): ... this.
609 * win32-low.h (class win32_process_target): Update.
611 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
613 Turn process_stratum_target's detach op into a method of
616 * target.h (struct process_stratum_target): Remove the target op.
617 (class process_target): Add the target op.
618 (detach_inferior): Update the macro.
620 Update the derived classes and callers below.
622 * linux-low.cc (linux_target_ops): Update.
623 (linux_detach): Turn into ...
624 (linux_process_target::detach): ... this.
625 * linux-low.h (class linux_process_target): Update.
626 * lynx-low.cc (lynx_target_ops): Update.
627 (lynx_detach): Turn into ...
628 (lynx_process_target::detach): ... this.
629 * lynx-low.h (class lynx_process_target): Update.
630 * nto-low.cc (nto_target_ops): Update.
631 (nto_detach): Turn into ...
632 (nto_process_target::detach): ... this.
633 * nto-low.h (class nto_process_target): Update.
634 * win32-low.cc (win32_target_ops): Update.
635 (win32_detach): Turn into ...
636 (win32_process_target::detach): ... this.
637 * win32-low.h (class win32_process_target): Update.
639 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
641 Turn process_stratum_target's kill op into a method of
644 * target.h (struct process_stratum_target): Remove the target op.
645 (class process_target): Add the target op.
647 Update the derived classes and callers below.
649 * target.cc (kill_inferior): Update.
650 * linux-low.cc (linux_target_ops): Update.
651 (linux_kill): Turn into ...
652 (linux_process_target::kill): ... this.
653 * linux-low.h (class linux_process_target): Update.
654 * lynx-low.cc (lynx_target_ops): Update.
655 (lynx_kill): Turn into ...
656 (lynx_process_target::kill): ... this.
657 * lynx-low.h (class lynx_process_target): Update.
658 * nto-low.cc (nto_target_ops): Update.
659 (nto_kill): Turn into ...
660 (nto_process_target::kill): ... this.
661 * nto-low.h (class nto_process_target): Update.
662 * win32-low.cc (win32_target_ops): Update.
663 (win32_kill): Turn into ...
664 (win32_process_target::kill): ... this.
665 * win32-low.h (class win32_process_target): Update.
667 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
669 Turn process_stratum_target's attach op into a method of
672 * target.h (struct process_stratum_target): Remove the target op.
673 (class process_target): Add the target op.
674 (myattach): Update the macro.
676 Update the derived classes and callers below.
678 * linux-low.cc (linux_target_ops): Update.
679 (linux_attach): Turn into ...
680 (linux_process_target::attach): ... this.
681 * linux-low.h (class linux_process_target): Update.
682 * lynx-low.cc (lynx_target_ops): Update.
683 (lynx_attach): Turn into ...
684 (lynx_process_target::attach): ... this.
685 * lynx-low.h (class lynx_process_target): Update.
686 * nto-low.cc (nto_target_ops): Update.
687 (nto_attach): Turn into ...
688 (nto_process_target::attach): ... this.
689 * nto-low.h (class nto_process_target): Update.
690 * win32-low.cc (win32_target_ops): Update.
691 (win32_attach): Turn into ...
692 (win32_process_target::attach): ... this.
693 * win32-low.h (class win32_process_target): Update.
695 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
697 Turn process_stratum_target's post_create_inferior op into a method
700 * target.h (struct process_stratum_target): Remove the target op.
701 (class process_target): Add the target op.
702 (target_post_create_inferior): Update the macro.
703 * target.cc (process_target::post_create_inferior): Define.
705 Update the derived classes and callers below.
707 * linux-low.cc (linux_target_ops): Update.
708 (linux_post_create_inferior): Turn into ...
709 (linux_process_target::post_create_inferior): ... this.
710 * linux-low.h (class linux_process_target): Update.
711 * lynx-low.cc (lynx_target_ops): Update.
712 * nto-low.cc (nto_target_ops): Update.
713 * win32-low.cc (win32_target_ops): Update.
715 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
717 Turn process_stratum_target's create_inferior op into a method of
720 * target.h (struct process_stratum_target): Remove the target op.
721 (class process_target): Add the target op.
722 (create_inferior): Rename the macro to ...
723 (target_create_inferior): ... this.
725 Update the derived classes and callers below.
727 * server.cc (handle_v_run): Update.
728 (captured_main): Update.
729 (process_serial_event): Update.
730 * linux-low.cc (linux_target_ops): Update.
731 (linux_create_inferior): Turn into ...
732 (linux_process_target::create_inferior): ... this.
733 * linux-low.h (class linux_process_target): Update.
734 * lynx-low.cc (lynx_target_ops): Update.
735 (lynx_create_inferior): Turn into ...
736 (lynx_process_target::create_inferior): ... this.
737 * lynx-low.h (class lynx_process_target): Update.
738 * nto-low.cc (nto_target_ops): Update.
739 (nto_create_inferior): Turn into ...
740 (nto_process_target::create_inferior): ... this.
741 * nto-low.h (class nto_process_target): Update.
742 * win32-low.cc (win32_target_ops): Update.
743 (win32_create_inferior): Turn into ...
744 (win32_process_target::create_inferior): ... this.
745 * win32-low.h (class win32_process_target): Update.
747 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
749 * target.h (class process_target): New class definition.
750 (struct process_stratum_target) <pt>: New field with type
752 * linux-low.h (class linux_process_target): Define as a derived
753 class of 'process_target'.
754 * linux-low.cc (linux_target_ops): Add a linux_process_target*
756 * lynx-low.h (class lynx_process_target): Define as a derived
757 class of 'process_target'.
758 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
760 * nto-low.h (class nto_process_target): Define as a derived
761 class of 'process_target'.
762 * nto-low.cc (nto_target_ops): Add an nto_process_target*
764 * win32-low.h (class win32_process_target): Define as a derived
765 class of 'process_target'.
766 * win32-low.cc (win32_target_ops): Add a win32_process_target*
769 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
771 * configure: Regenerate.
773 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
774 Andrew Burgess <andrew.burgess@embecosm.com>
776 * linux-riscv-low.cc: New file.
777 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
778 and nat/riscv-linux-tdesc.c.
779 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
780 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
783 2020-02-14 Tom Tromey <tom@tromey.com>
785 * acinclude.m4: Don't include acx_configure_dir.m4.
786 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
787 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
788 (all, install-only, uninstall, clean-info, clean)
789 (maintainer-clean): Don't recurse.
790 (subdir_do, all-lib): Remove.
791 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
793 (generated_files): Update.
794 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
795 * configure: Rebuild.
796 * configure.ac: Don't configure gnulib or libiberty.
799 2020-02-14 Eli Zaretskii <eliz@gnu.org>
801 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
802 preparing the command line for CreateProcess.
803 (win32_create_inferior): Reflect the program name in debugging
804 output that shows the process and its command line.
806 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
808 * Makefile.in: Rename source files from .c to .cc.
809 * %.c: Rename to %.cc.
810 * configure.ac: Rename server.c to server.cc.
811 * configure: Re-generate.
813 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
815 * Makefile.in: Rename gdbsupport source files from .c to .cc.
817 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
819 * win32-low.c (win32_create_inferior): Set signal_pid.
821 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
822 Pedro Alves <palves@redhat.com>
824 Skip building gdbserver in a cross-configuration.
825 * configure.srv: Set $gdbserver_host depending on whether $target
826 is $host. Use $gdbserver_host instead of $host.
828 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
830 * configure: Re-generate.
832 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
834 * configure: Re-generate.
836 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
838 * acinclude.m4: Update warning.m4 path.
840 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
842 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
843 (handle_exception): Set siginfo_er.
844 (win32_xfer_siginfo): New function.
846 2020-02-07 Tom Tromey <tom@tromey.com>
847 Pedro Alves <palves@redhat.com>
849 * README: Update build documentation.
850 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
852 * configure.ac: Update paths.
853 * configure: Rebuild.
854 * acinclude.m4: Update paths.
855 * Makefile.in: Update include paths.
856 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
857 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
858 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
859 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
860 (%-generated.c): Update paths.
861 * Move entire directory from ../gdb/gdbserver.
863 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
865 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
867 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
869 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
870 assignment instead of srv_linux_obj.
872 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
874 * server.c (handle_qxfer_libraries): Write segment-address with
877 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
879 * Makefile.in (install-strip): New target.
880 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
881 * aclocal.m4: Regenerate.
882 * configure: Regenerate.
883 * configure.ac: Add AM_PROG_INSTALL_STRIP.
885 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
887 * Makefile.in (SFILES): Adjust paths to point to real files.
888 (OBS): Move waitstatus.o to target/waitstatus.o.
889 (TAGS): Transform paths appropriately.
891 (nat/%.o): ... this pattern rule.
893 (target/%.o): ... this pattern rule.
894 * configure.srv: Adjust paths throughout to include nat/ prefix
895 with the revant files.
896 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
897 * configure: Regenerate.
899 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
901 * Makefile.in (TAGS): Remove config files from the recipe.
903 2020-01-14 Tom Tromey <tom@tromey.com>
905 * configure: Rebuild.
906 * configure.ac: Remove any checks that were added to common.m4.
907 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
910 2020-01-14 Tom Tromey <tom@tromey.com>
912 * server.h: Include config.h.
913 * gdbreplay.c: Include config.h.
914 * configure: Rebuild.
915 * configure.ac: Don't source common.host.
916 * acinclude.m4: Update path.
917 * Makefile.in (INCSUPPORT): New variable.
918 (INCLUDE_CFLAGS): Add INCSUPPORT.
919 (SFILES): Update paths.
920 (version-generated.c): Update path to create-version.sh.
921 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
923 2020-01-14 Tom Tromey <tom@tromey.com>
925 * configure.ac (LIBS): Use WIN32APILIBS.
926 (USE_WIN32API): Don't define.
927 * configure: Rebuild.
929 2020-01-14 Tom Tromey <tom@tromey.com>
931 * configure: Rebuild.
933 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
935 * Makefile.in (%-generated.c): Remove rule for files from
938 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
940 * configure: Re-generate.
942 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
944 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
946 * tracepoint.c (stop_tracing, flush_trace_buffer,
947 about_to_request_buffer_space, get_trace_state_variable_value,
948 set_trace_state_variable_value, gdb_collect): Add declaration.
950 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
952 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
953 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
954 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
955 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
956 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
959 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
961 * inferiors.c: Include gdbsupport/common-inferior.h.
963 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
965 * hostio-errno.c: Include hostio.h.
967 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
969 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
972 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
974 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
975 * linux-arm-tdesc.h: Include arch/arm.h.
977 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
979 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
981 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
983 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
984 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
986 2020-01-10 Pedro Alves <palves@redhat.com>
988 * fork-child.c (post_fork_inferior): Pass target down to
990 * inferiors.c (switch_to_thread): Add process_stratum_target
992 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
993 * nto-low.c (nto_target_ops): Now a process_stratum_target.
994 * linux-low.c (linux_target_ops): Now a process_stratum_target.
995 * remote-utils.c (prepare_resume_reply): Pass the target to
997 * target.c (the_target): Now a process_stratum_target.
998 (done_accessing_memory): Pass the target to switch_to_thread.
999 (set_target_ops): Ajust to use process_stratum_target.
1000 * target.h (struct target_ops): Rename to ...
1001 (struct process_stratum_target): ... this.
1002 (the_target, set_target_ops): Adjust.
1003 (prepare_to_access_memory): Adjust comment.
1004 * win32-low.c (child_xfer_memory): Adjust to use
1005 process_stratum_target.
1006 (win32_target_ops): Now a process_stratum_target.
1008 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1009 Pedro Alves <palves@redhat.com>
1011 * win32-low.c (get_child_debug_event): Extract the fatal exception
1012 from the exit status and convert to the equivalent Posix signal
1014 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1015 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1017 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1019 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1021 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1023 * server.c (gdbserver_version): Change copyright year to 2020.
1024 * gdbreplay.c (gdbreplay_version): Likewise.
1026 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1028 * configure: Regenerate.
1029 * configure.ac: Quote variable arguments of test.
1031 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1033 * Makefile.in: Fix build with GNU Make 3.81
1035 2019-12-16 Tom Tromey <tromey@adacore.com>
1037 * server.c (get_exec_file): Constify result.
1039 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1041 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1042 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1043 * config.in: Regenerate.
1044 * configure: Regenerate.
1045 * configure.ac: Don't check for strerror.
1046 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1047 Call safe_strerror instead of strerror.
1048 * server.h (strerror): Remove this now-unnecessary declaration.
1049 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1051 (gdb_agent_helper_thread): Likewise.
1052 * utils.c (perror_with_name): Likewise.
1054 2019-11-26 Tom Tromey <tom@tromey.com>
1056 * configure, config.in: Rebuild.
1058 2019-11-26 Tom Tromey <tom@tromey.com>
1060 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1061 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1063 * configure, config.in: Rebuild.
1065 2019-11-26 Tom Tromey <tom@tromey.com>
1067 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1068 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1069 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1070 * acinclude.m4: Include ax_pthread.m4.
1071 * config.in, configure: Rebuild.
1073 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1075 * debug.c (debug_set_output): Call safe_strerror instead of
1077 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1078 (linux_kill_one_lwp): Likewise.
1079 (linux_detach_one_lwp): Likewise.
1080 (linux_wait_for_event_filtered): Likewise.
1081 (store_register): Likewise.
1082 * lynx-low.c (lynx_attach): Likewise.
1083 * mem-break.c (insert_memory_breakpoint): Likewise.
1084 (remove_memory_breakpoint): Likewise.
1085 (delete_fast_tracepoint_jump): Likewise.
1086 (set_fast_tracepoint_jump): Likewise.
1087 (uninsert_fast_tracepoint_jumps_at): Likewise.
1088 (reinsert_fast_tracepoint_jumps_at): Likewise.
1089 * nto-low.c (nto_xfer_memory): Likewise.
1090 (nto_resume): Likewise.
1092 2019-11-20 Luis Machado <luis.machado@linaro.org>
1094 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1095 instead of register count.
1096 * tdesc.c (tdesc_contains_feature): New function.
1097 * tdesc.h (tdesc_contains_feature): New prototype.
1099 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1101 * Makefile.in: Add safe-strerror.c.
1102 * configure: Regenerate.
1103 * configure.ac: Don't source common.host.
1105 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1107 * config.in: Regenerate.
1108 * configure: Regenerate.
1110 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1112 * ax.c (ax_printf): Handle size_t_arg.
1114 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1116 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1117 * mi/mi-main.c (output_cores): Likewise.
1118 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1119 (linux_xfer_osdata_modules): Likewise.
1120 * remote.c (register_remote_support_xml): Likewise.
1121 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1122 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1124 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1126 * configure: Regenerate.
1127 * configure.ac: Remove check for strerror_r.
1129 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1131 * config.in: Regenerate.
1132 * configure: Regenerate.
1133 * configure.ac: Also check for strerror_r.
1135 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1137 * ax.h (debug_agent): Remove duplicate declaration.
1139 2019-10-26 Tom de Vries <tdevries@suse.de>
1141 * linux-aarch64-low.c: Fix typos in comments.
1142 * linux-arm-low.c: Same.
1143 * linux-low.c: Same.
1144 * linux-ppc-low.c: Same.
1145 * proc-service.c: Same.
1148 * tracepoint.c: Same.
1149 * win32-low.c: Same.
1151 2019-10-25 Tom Tromey <tromey@adacore.com>
1153 * utils.c (xstrdup): Remove.
1155 2019-10-23 Tom Tromey <tom@tromey.com>
1157 * configure, config.in: Rebuild.
1159 2019-10-23 Tom Tromey <tom@tromey.com>
1161 * configure: Rebuild.
1162 * acinclude.m4: Use m4_include, not sinclude.
1164 2019-10-17 Tom Tromey <tromey@adacore.com>
1166 * configure: Rebuild.
1167 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1168 in AC_CONFIG_FILES invocation.
1169 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1172 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1174 * server.c: Include xml-builtin.h.
1175 (get_xml_features): Don't declare xml_builtins here.
1177 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1179 * Makefile.in: Remove references to vec-ipa.o.
1181 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1183 * Makefile.in: Remove references to vec.c.
1185 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1187 * server.c (server_waiting): Change to bool.
1188 (extended_protocol): Likewise.
1189 (response_needed): Likewise.
1190 (exit_requested): Likewise.
1191 (run_once): Likewise.
1192 (report_no_resumed): Likewise.
1193 (non_stop): Likewise.
1194 (disable_packet_vCont): Likewise.
1195 (disable_packet_Tthread): Likewise.
1196 (disable_packet_qC): Likewise.
1197 (disable_packet_qfThreadInfo): Likewise.
1198 (handle_general_set): Update.
1199 (handle_detach): Update.
1200 (handle_monitor_command): Update.
1201 (handle_query): Update.
1202 (captured_main): Update.
1203 (process_serial_event): Update.
1204 * server.h (server_waiting): Change to bool.
1205 (disable_packet_vCont): Likewise.
1206 (disable_packet_Tthread): Likewise.
1207 (disable_packet_qC): Likewise.
1208 (disable_packet_qfThreadInfo): Likewise.
1209 (run_once): Likewise.
1210 (non_stop): Likewise.
1211 * target.c (target_stop_and_wait): Update.
1213 2019-10-02 Tom Tromey <tromey@adacore.com>
1215 * Makefile.in (SFILES): Add common-inferior.c.
1216 (OBS): Add common-inferior.o.
1217 * server.c (startup_with_shell): Don't define.
1219 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1221 * linux-low.c (linux_low_read_btrace): Update for change to
1224 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1226 * debug.c (debug_threads): Remove comment in favor of the header.
1227 * debug.h (using_threads): Add declaration.
1228 (debug_threads): Add comment.
1229 * linux-aarch64-low.c: Include debug.h and remove declaration of
1231 * nto-low.c: Likewise.
1232 * remote-utils.c: Likewise.
1233 * thread-db.c: Likewise.
1235 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1237 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1238 and powerpc-cell64l-ipa.o.
1239 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1240 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1241 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1244 * spu-low.c: Remove file.
1246 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1247 (parse_spufs_run): Remove.
1248 (ppc_get_pc): Remove Cell/B.E. support.
1249 (ppc_set_pc): Likewise.
1250 (ppc_breakpoint_at): Likewise.
1251 (ppc_arch_setup): Likewise.
1252 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1253 tdesc_powerpc_cell32l.
1254 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1255 or init_registers_powerpc_cell32l.
1256 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1257 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1258 or init_registers_powerpc_cell32l.
1259 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1260 (init_registers_powerpc_cell32l): Remove prototype.
1261 (init_registers_powerpc_cell64l): Likewise.
1263 * target.h (struct target_ops): Remove qxfer_spu member.
1264 * server.c (handle_qxfer_spu): Remove.
1265 (qxfer_packets): Remove entry for "spu".
1266 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1267 * linux-low.c (SPUFS_MAGIC): Remove.
1268 (spu_enumerate_spu_ids): Remove.
1269 (linux_qxfer_spu): Remove.
1270 (linux_target_ops): Remove qxfer_spu member.
1271 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1272 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1273 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1275 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1277 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1278 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1279 * config.in: Regenerate.
1280 * configure: Regenerate.
1282 2019-08-15 Tom Tromey <tromey@adacore.com>
1284 * target.c (target_write_memory): Use gdb::byte_vector.
1286 2019-08-15 Tom Tromey <tromey@adacore.com>
1288 * tracepoint.c (write_inferior_data_pointer)
1289 (write_inferior_integer, write_inferior_int8)
1290 (write_inferior_uinteger, m_tracepoint_action_download)
1291 (r_tracepoint_action_download, x_tracepoint_action_download)
1292 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1293 (download_agent_expr, download_tracepoint_1)
1294 (download_trace_state_variables, upload_fast_traceframes): Update.
1295 * server.c (gdb_write_memory): Update.
1296 * remote-utils.c (relocate_instruction): Update.
1297 * proc-service.c (ps_pdwrite): Update.
1298 * mem-break.c (remove_memory_breakpoint)
1299 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1300 (uninsert_fast_tracepoint_jumps_at)
1301 (reinsert_fast_tracepoint_jumps_at): Update.
1302 * linux-x86-low.c (append_insns)
1303 (i386_install_fast_tracepoint_jump_pad)
1304 (amd64_write_goto_address, i386_write_goto_address): Update.
1305 * linux-s390-low.c (append_insns, s390_write_goto_address):
1307 * linux-ppc-low.c (ppc_relocate_instruction)
1308 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1309 (ppc_write_goto_address): Update.
1310 * linux-aarch64-low.c (append_insns): Update.
1311 * target.h (struct target_ops): Update.
1312 (write_inferior_memory): Don't declare.
1313 * target.c (target_write_memory): Rename from
1314 write_inferior_memory. Remove old target_write_memory.
1316 2019-08-15 Tom Tromey <tromey@adacore.com>
1318 * target.c (write_inferior_memory): Use std::vector.
1320 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1323 * configure.ac: Drop enable-libmcheck support.
1324 * configure, config.in: Rebuild.
1325 * acinclude.m4: Don't include it.
1327 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1329 * configure.srv: Remove Arm xml files.
1331 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1333 * configure.srv: Add new files. Remove xml generated files.
1334 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1336 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1337 * linux-aarch32-tdesc.c: New file.
1338 * linux-aarch32-tdesc.h: New file.
1339 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1340 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1341 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1342 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1343 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1344 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1345 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1346 (arm_read_description): Call arm_linux_read_description.
1347 (initialize_low_arch): Don't init registers.
1348 * linux-arm-tdesc.c: New file.
1349 * linux-arm-tdesc.h: New file.
1351 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1353 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1354 Move counter inside for.
1355 (arm_read_description): Check ptrace earlier.
1356 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1358 2019-07-09 Tom Tromey <tom@tromey.com>
1360 * configure: Rebuild.
1361 * configure.ac: Change common to gdbsupport.
1362 * acinclude.m4: Change common to gdbsupport.
1363 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1364 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1365 common to gdbsupport.
1366 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1367 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1368 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1369 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1370 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1371 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1372 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1373 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1374 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1375 common to gdbsupport.
1377 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1379 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1381 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1383 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1385 * configure.srv: Remove legacy xml.
1386 * linux-aarch64-low.c (initialize_low_arch): Remove
1387 initialize_low_tdesc call.
1388 * linux-aarch64-tdesc-selftest.c: Remove file.
1389 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1390 * linux-x86-low.c (initialize_low_arch): Remove
1391 initialize_low_tdesc call.
1392 * linux-x86-tdesc-selftest.c: Remove file.
1393 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1395 2019-06-20 Tom de Vries <tdevries@suse.de>
1397 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1398 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1400 2019-06-19 Tom de Vries <tdevries@suse.de>
1402 * debug.h (debug_write): Change return type to ssize_t.
1403 * debug.c (debug_write): Same.
1405 2019-06-14 Tom Tromey <tom@tromey.com>
1407 * configure.ac: Use new path to gnulib.
1408 * configure: Rebuild.
1409 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1412 2019-06-11 Tom Tromey <tom@tromey.com>
1414 * Makefile.in (SFILES): Add alloc.c.
1416 (IPA_OBJS): Add alloc-ipa.o.
1417 (alloc-ipa.o): New target.
1418 (%.o: ../%.c): New pattern rule.
1420 2019-06-10 Tom Tromey <tromey@adacore.com>
1422 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1423 end warning with a newline.
1424 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1426 * thread-db.c (attach_thread): Don't end warning with a newline.
1427 (thread_db_notice_clone): Likewise.
1428 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1430 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1431 end warning with a newline.
1433 2019-06-04 Pedro Alves <palves@redhat.com>
1435 * server.c (captured_main): Use make_unique_xstrdup.
1437 2019-06-02 Tom Tromey <tom@tromey.com>
1439 * gdbreplay.c (fromhex): Remove.
1440 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1442 2019-05-29 Tom Tromey <tromey@adacore.com>
1444 * configure: Rebuild.
1446 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1448 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1449 sign extension code on 32-bit builds.
1451 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1454 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1456 2019-04-19 Tom Tromey <tom@tromey.com>
1458 * server.c (struct vstop_notif): Derive from notif_event.
1460 (queue_stop_reply): Update.
1461 (remove_all_on_match_ptid): Change type. Rewrite.
1462 (discard_queued_stop_replies): Rewrite.
1463 (in_queued_stop_replies_ptid): Change type.
1464 (in_queued_stop_replies): Rewrite.
1465 (notif_stop): Update.
1466 (queue_stop_reply_callback): Update.
1467 (captured_main): Don't call initialize_notif.
1468 (push_stop_notification): Update.
1469 * notif.c (notif_write_event, handle_notif_ack)
1470 (notif_event_enque, notif_push): Update.
1471 (notif_event_xfree, initialize_notif): Remove.
1472 * notif.h (struct notif_event): Include <list>, not
1474 (struct notif_server) <queue>: Now a std::list.
1475 (notif_event_p): Remove typedef.
1476 (initialize_notif): Don't declare.
1477 (struct notif_event): Add virtual destructor.
1479 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1481 * ax.c (ax_vdebug): Call debug_printf.
1482 * debug.c (debug_write): New function.
1483 * debug.h (debug_write): New declaration.
1484 * linux-low.c (sigchld_handler): Call debug_write.
1486 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1488 * debug.c (debug_set_output): New function.
1489 (debug_vprintf): Send output to debug_file.
1490 (debug_flush): Likewise.
1491 * debug.h (debug_set_output): New declaration.
1492 * server.c (handle_monitor_command): Add debug-file option.
1493 (captured_main): Likewise.
1495 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1497 * debug.c (remote_debug): Add definition.
1498 * debug.h (remote_debug): Add declaration.
1499 * hostio.c (remote_debug): Remove declaration.
1500 * remote-utils.c (struct ui_file): Likewise.
1501 (remote_debug): Likewise.
1502 * remote-utils.h (remote_debug): Likewise,
1503 * server.c (remote_debug): Remove definition.
1505 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1507 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1508 when using a 64-bit gdbserver.
1510 2019-04-09 Tom Tromey <tromey@adacore.com>
1512 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1514 2019-04-08 Tom Tromey <tom@tromey.com>
1516 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1518 (linux_resume_one_lwp): Likewise.
1520 2019-04-08 Tom Tromey <tom@tromey.com>
1522 * gdbreplay.c: Update.
1523 * linux-low.c: Update.
1526 2019-04-08 Tom Tromey <tom@tromey.com>
1528 * server.c: Use C++ exception handling.
1529 * linux-low.c: Use C++ exception handling.
1530 * gdbreplay.c: Use C++ exception handling.
1532 2019-04-08 Tom Tromey <tom@tromey.com>
1534 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1535 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1536 (captured_main, main): Update.
1537 * gdbreplay.c (main): Update.
1539 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1541 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1542 value in argument pointer, return 1 if the entry is found and 0
1543 otherwise. Move comment.
1544 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1545 * linux-low.h (linux_get_auxv): Declare.
1546 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1548 2019-04-05 Tom Tromey <tromey@adacore.com>
1550 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1553 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1555 * linux-low.c (AT_HWCAP2): Add define if not already included.
1557 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1559 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1560 (aarch64_arch_setup): Call linux_get_hwcap.
1561 * linux-arm-low.c (arm_get_hwcap): Remove function.
1562 (arm_read_description): Call linux_get_hwcap.
1563 * linux-low.c (linux_get_auxv): New function.
1564 (linux_get_hwcap): Likewise.
1565 (linux_get_hwcap2): Likewise.
1566 * linux-low.h (linux_get_hwcap): New declaration.
1567 (linux_get_hwcap2): Likewise.
1568 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1569 (ppc_arch_setup): Call linux_get_hwcap.
1570 * linux-s390-low.c (s390_get_hwcap): Remove function.
1571 (s390_arch_setup): Call linux_get_hwcap.
1573 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1574 Jiong Wang <jiong.wang@arm.com>
1576 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1577 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1579 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1581 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1582 Jiong Wang <jiong.wang@arm.com>
1584 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1585 (aarch64_get_hwcap): New function.
1586 (aarch64_arch_setup): Read APIA hwcap.
1588 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1589 Jiong Wang <jiong.wang@arm.com>
1591 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1592 (initialize_low_tracepoint): Likewise.
1593 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1594 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1595 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1596 (aarch64_linux_read_description): Likewise.
1597 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1599 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1601 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1602 i386_create_target_description for 'segments' parameter.
1603 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1604 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1605 * win32-i386-low.c (i386_arch_setup): Likewise.
1607 2019-03-12 Tom Tromey <tromey@adacore.com>
1609 * linux-low.c (iterate_over_lwps): Update.
1611 2019-03-06 Tom Tromey <tom@tromey.com>
1613 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1614 (captured_main): Use SCOPE_EXIT.
1616 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1618 * configure.srv: Use '$enable_unittest' instead of '$development'
1619 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1622 2019-02-27 Tom Tromey <tromey@adacore.com>
1624 * gdbreplay.c (logchar): Handle \r\n.
1626 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1628 * linux-low.c (linux_attach): Add process before lwp.
1629 * server.c (attach_inferior): Check if already attached.
1631 2019-02-07 Tom Tromey <tom@tromey.com>
1633 * x86-tdesc.h: Rename include guard.
1634 * x86-low.h: Add include guard.
1635 * wincecompat.h: Rename include guard.
1636 * win32-low.h: Add include guard.
1637 * utils.h: Rename include guard.
1638 * tracepoint.h: Rename include guard.
1639 * tdesc.h: Rename include guard.
1640 * target.h: Rename include guard.
1641 * server.h: Rename include guard.
1642 * remote-utils.h: Rename include guard.
1643 * regcache.h: Rename include guard.
1644 * nto-low.h: Rename include guard.
1645 * notif.h: Add include guard.
1646 * mem-break.h: Rename include guard.
1647 * lynx-low.h: Add include guard.
1648 * linux-x86-tdesc.h: Add include guard.
1649 * linux-s390-tdesc.h: Add include guard.
1650 * linux-ppc-tdesc-init.h: Add include guard.
1651 * linux-low.h: Add include guard.
1652 * linux-aarch64-tdesc.h: Add include guard.
1653 * linux-aarch32-low.h: Add include guard.
1654 * inferiors.h: Rename include guard.
1655 * i387-fp.h: Rename include guard.
1656 * hostio.h: Rename include guard.
1657 * gdbthread.h: Rename include guard.
1658 * gdb_proc_service.h: Rename include guard.
1659 * event-loop.h: Rename include guard.
1660 * dll.h: Rename include guard.
1661 * debug.h: Rename include guard.
1662 * ax.h: Rename include guard.
1664 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1667 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1668 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1670 2019-01-25 Tom Tromey <tom@tromey.com>
1672 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1674 2019-01-25 Tom Tromey <tom@tromey.com>
1676 * win32-low.c: Fix common/ includes.
1677 * win32-i386-low.c: Fix common/ includes.
1678 * tracepoint.c: Fix common/ includes.
1679 * thread-db.c: Fix common/ includes.
1680 * target.h: Fix common/ includes.
1681 * symbol.c: Fix common/ includes.
1682 * spu-low.c: Fix common/ includes.
1683 * server.h: Fix common/ includes.
1684 * server.c: Fix common/ includes.
1685 * remote-utils.c: Fix common/ includes.
1686 * regcache.h: Fix common/ includes.
1687 * regcache.c: Fix common/ includes.
1688 * nto-x86-low.c: Fix common/ includes.
1689 * notif.h: Fix common/ includes.
1690 * mem-break.h: Fix common/ includes.
1691 * lynx-low.c: Fix common/ includes.
1692 * lynx-i386-low.c: Fix common/ includes.
1693 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1694 * linux-x86-low.c: Fix common/ includes.
1695 * linux-low.c: Fix common/ includes.
1696 * inferiors.h: Fix common/ includes.
1697 * i387-fp.c: Fix common/ includes.
1698 * hostio.c: Fix common/ includes.
1699 * hostio-errno.c: Fix common/ includes.
1700 * gdbthread.h: Fix common/ includes.
1701 * gdbreplay.c: Fix common/ includes.
1702 * fork-child.c: Fix common/ includes.
1703 * event-loop.c: Fix common/ includes.
1705 (enum gdb_agent_op): Fix common/ includes.
1707 2019-01-21 Tom Tromey <tom@tromey.com>
1709 * tracepoint.c: Fix includes.
1710 * remote-utils.c: Fix includes.
1711 * linux-x86-low.c: Fix includes.
1713 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1715 * gdbreplay.c (gdbreplay_version): Update copyright year in
1717 * server.c (gdbserver_version): Likewise.
1719 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1721 * linux-low.c (add_lwp): Switch ordering.
1723 2018-11-29 Tom Tromey <tom@tromey.com>
1725 * win32-low.c (win32_join): Take pid, not process.
1726 * target.h (struct target_ops) <join>: Change argument type.
1727 (join_inferior): Change argument name.
1728 * spu-low.c (spu_join): Take pid, not process.
1729 * server.c (handle_detach): Preserve pid before destroying
1731 * lynx-low.c (lynx_join): Take pid, not process.
1732 * linux-low.c (linux_join): Take pid, not process.
1734 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1736 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1737 (aarch64_cannot_fetch_register): Likewise.
1738 (struct linux_target_ops): Update references.
1740 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1742 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1744 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1746 * configure.srv (ipa_ppc_linux_regobj): Add
1747 powerpc-isa207-htm-vsx32l-ipa.o and
1748 powerpc-isa207-htm-vsx64l-ipa.o.
1749 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1750 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1751 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1752 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1753 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1754 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1755 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1756 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1757 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1758 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1759 (init_registers_powerpc_isa207_htm_vsx32l)
1760 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1761 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1762 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1763 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1764 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1765 (ppc_store_tm_ctarregset): New functions.
1766 (ppc_regsets): Add entries for HTM regsets.
1767 (ppc_arch_setup): Set htm in features struct when needed. Set
1768 sizes for the HTM regsets.
1769 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1770 (initialize_low_arch): Call
1771 init_registers_powerpc_isa207_htm_vsx32l and
1772 init_registers_powerpc_isa207_htm_vsx64l.
1773 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1774 PPC_TDESC_ISA207_HTM_VSX.
1775 (initialize_low_tracepoint): Call
1776 init_registers_powerpc_isa207_htm_vsx32l and
1777 init_registers_powerpc_isa207_htm_vsx64l.
1779 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1781 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1782 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1783 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1784 (ppc_store_pmuregset): New functions.
1785 (ppc_regsets): Add entries for ebb and pmu regsets.
1786 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1787 pmu regsets are available. Set sizes for these regsets.
1789 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1791 * configure.srv (ipa_ppc_linux_regobj): Add
1792 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1793 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1794 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1795 rs6000/powerpc-isa207-vsx32l.xml, and
1796 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1797 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1798 <PPC_TDESC_ISA207_VSX>: New enum value.
1799 (init_registers_powerpc_isa207_vsx32l): Declare.
1800 (init_registers_powerpc_isa207_vsx64l): Declare.
1801 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1802 (ppc_store_tarregset): New function.
1803 (ppc_regsets): Add entry for the TAR regset.
1804 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1805 size for the TAR regsets.
1806 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1807 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1808 and init_registers_powerpc_isa207_vsx64l.
1809 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1810 (initialize_low_tracepoint): Call
1811 init_registers_powerpc_isa207_vsx32l and
1812 init_registers_powerpc_isa207_vsx64l.
1814 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1815 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1817 * configure.srv (ipa_ppc_linux_regobj): Add
1818 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1819 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1820 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1821 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1822 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1823 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1824 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1825 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1826 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1827 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1828 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1829 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1830 (ppc_hwcap): Add comment.
1831 (ppc_hwcap2): New global.
1832 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1833 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1834 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1835 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1836 when needed. Set sizes for the the DSCR and PPR regsets.
1837 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1838 (initialize_low_arch): Call
1839 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1840 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1841 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1842 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1843 (initialize_low_tracepoint): Call
1844 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1845 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1847 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1849 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1851 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1852 Simon Marchi <simark@simark.ca>
1854 * acinclude.m4: Include "../selftest.m4".
1855 * configure: Regenerate.
1856 * configure.ac: Use "GDB_AC_SELFTEST".
1857 * configure.srv: Use "$enable_unittests" instead of
1858 "$development" when checking whether unit tests have been
1860 * server.c (captured_main): Update message informing that
1861 selftests have been disabled.
1863 2018-10-04 Tom Tromey <tom@tromey.com>
1865 * configure: Rebuild.
1867 2018-10-04 Tom Tromey <tom@tromey.com>
1869 * server.c (handle_status): Rename inner "thread".
1870 (process_serial_event): Declare "res" in 'm' case.
1871 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1872 (iterate_over_lwps): Rename inner "thread".
1873 (linux_qxfer_libraries_svr4): Rename inner "len".
1874 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1876 2018-10-01 Gary Benson <gbenson@redhat.com>
1878 * gdb_proc_service.h: Moved common code to
1879 common/gdb_proc_service.h.
1881 2018-10-01 Gary Benson <gbenson@redhat.com>
1883 * gdb_proc_service.h: Synchronize comments and whitespace with
1884 GDB's version of this file.
1886 2018-09-25 Tom Tromey <tom@tromey.com>
1888 * configure: Rebuild.
1889 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1891 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1893 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1894 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1895 ($(IPA_LIB)): Sort IPA_OBJS.
1897 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1899 * Makefile.in: Remove references to $(ADD_DEPS).
1901 2018-09-16 Tom Tromey <tom@tromey.com>
1903 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1905 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1908 2018-09-05 Tom Tromey <tom@tromey.com>
1910 * configure: Rebuild.
1912 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1915 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1917 2018-08-27 Tom Tromey <tom@tromey.com>
1920 * configure: Rebuild.
1922 2018-08-27 Tom Tromey <tom@tromey.com>
1924 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1925 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1926 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1927 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1928 (s390x_emit_stack_adjust): Add casts to unsigned char.
1930 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1934 * server.h (struct client_state) <disable_randomization>:
1937 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1939 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1941 (mips_supply_ptrace_register): Likewise.
1943 2018-07-22 Tom Tromey <tom@tromey.com>
1945 * configure: Rebuild.
1947 2018-07-22 Tom Tromey <tom@tromey.com>
1949 * win32-low.c (win32_create_inferior): Remove unused variables.
1950 * gdbreplay.c (remote_open): Remove unused variable.
1951 * remote-utils.c (remote_prepare): Remove unused variable.
1952 * x86-tdesc.h (X86_TDESC_H): Define.
1953 (amd64_expedite_regs): Define conditionally.
1954 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1955 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1956 * remote-utils.c (readchar): Remove unused variable.
1958 2018-07-13 Pedro Alves <palves@redhat.com>
1960 * linux-low.c (linux_kill): Change parameter to process_info
1961 pointer instead of pid. Adjust.
1962 * lynx-low.c (lynx_kill): Likewise.
1963 * nto-low.c (nto_kill): Likewise.
1964 * spu-low.c (spu_kill): Likewise.
1965 * win32-low.c (win32_kill): Likewise.
1966 * server.c (handle_v_kill, kill_inferior_callback)
1967 (detach_or_kill_for_exit): Adjust.
1968 * target.c (kill_inferior): Change parameter to process_info
1969 pointer instead of pid. Adjust.
1970 * target.h (struct target_ops) <kill>: Change parameter to
1971 process_info pointer instead of pid. Adjust all implementations
1973 (kill_inferior): Likewise.
1975 2018-07-13 Pedro Alves <palves@redhat.com>
1977 * linux-low.c (linux_detach, linux_join): Change parameter to
1978 process_info pointer instead of pid. Adjust.
1979 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1980 * nto-low.c (nto_detach): Likewise.
1981 * spu-low.c (spu_detach, spu_join): Likewise.
1982 * win32-low.c (win32_detach, win32_join): Likewise.
1983 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1984 * target.h (struct target_ops) <detach, join>: Change parameter to
1985 process_info pointer instead of pid. Adjust all implementations
1987 (detach_inferior, join_inferior): Rename 'pid' parameter to
1990 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1991 Jan Kratochvil <jan.kratochvil@redhat.com>
1992 Paul Fertser <fercerpav@gmail.com>
1993 Tsutomu Seki <sekiriki@gmail.com>
1995 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1996 (OBS): Add 'common/netstuff.o'.
1997 (GDBREPLAY_OBS): Likewise.
1998 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1999 (remote_open): Implement support for IPv6
2001 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2003 (handle_accept_event): Accept connections from IPv6 sources.
2004 (remote_prepare): Handle IPv6-style hostnames; implement
2005 support for IPv6 connections.
2006 (remote_open): Implement support for printing connections from
2009 2018-07-11 Pedro Alves <palves@redhat.com>
2012 * mem-break.c (any_persistent_commands): Add process_info
2013 parameter and use it instead of relying on the current process.
2014 Change return type to bool.
2015 * mem-break.h (any_persistent_commands): Add process_info
2016 parameter and change return type to bool.
2017 * server.c (handle_detach): Remove require_running_or_return call.
2018 Look up the process_info for the process we're about to detach.
2019 If not found, return back error to GDB. Adjust
2020 any_persistent_commands call to pass down a process pointer.
2022 2018-07-11 Pedro Alves <palves@redhat.com>
2024 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2025 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2026 instead of collect_register_by_name.
2027 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2028 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2030 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2031 Pedro Alves <palves@redhat.com>
2033 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2035 2018-07-03 Tom Tromey <tom@tromey.com>
2037 * linux-low.c: Update.
2038 * lynx-low.c: Update.
2039 * mem-break.c: Update.
2040 * nto-low.c: Update.
2041 * remote-utils.c: Update.
2043 * spu-low.c: Update.
2045 * win32-low.c: Update.
2047 2018-07-03 Tom Tromey <tom@tromey.com>
2051 2018-07-03 Tom Tromey <tom@tromey.com>
2053 * linux-low.c: Update.
2055 2018-07-03 Tom Tromey <tom@tromey.com>
2059 2018-07-03 Tom Tromey <tom@tromey.com>
2061 * linux-low.c: Update.
2062 * linux-mips-low.c: Update.
2063 * lynx-low.c: Update.
2064 * nto-low.c: Update.
2065 * remote-utils.c: Update.
2067 * spu-low.c: Update.
2069 * thread-db.c: Update.
2071 2018-07-03 Tom Tromey <tom@tromey.com>
2073 * linux-low.c: Update.
2074 * linux-mips-low.c: Update.
2075 * lynx-low.c: Update.
2076 * mem-break.c: Update.
2077 * nto-low.c: Update.
2078 * remote-utils.c: Update.
2080 * spu-low.c: Update.
2082 * tracepoint.c: Update.
2084 2018-07-03 Tom Tromey <tom@tromey.com>
2086 * linux-low.c: Update.
2087 * linux-ppc-low.c: Update.
2088 * linux-x86-low.c: Update.
2089 * proc-service.c: Update.
2091 * spu-low.c: Update.
2092 * thread-db.c: Update.
2093 * win32-low.c: Update.
2095 2018-07-03 Tom Tromey <tom@tromey.com>
2097 * linux-low.c: Update.
2098 * lynx-low.c: Update.
2099 * nto-low.c: Update.
2100 * remote-utils.c: Update.
2101 * spu-low.c: Update.
2102 * thread-db.c: Update.
2103 * win32-low.c: Update.
2105 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2107 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2108 parameter in call to 'amd64_create_target_description'.
2110 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2112 * x86-tdesc.h: Remove executable permission flag.
2114 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2116 * configure.ac: Remove AC_PREREQ, add missing quoting.
2117 * configure: Re-generate.
2118 * config.in: Re-generate.
2119 * aclocal.m4: Re-generate.
2121 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2123 * tracepoint.h (current_traceframe): Remove declaration.
2125 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2127 * linux-aarch64-low.c (is_sve_tdesc): New function.
2128 (aarch64_sve_regs_copy_to_regcache): Likewise.
2129 (aarch64_sve_regs_copy_from_regcache): Likewise.
2130 (aarch64_regs_info): Add SVE checks.
2131 (initialize_low_arch): Initialize SVE.
2133 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2135 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2137 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2139 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2140 (initialize_low_tracepoint): Likewise
2141 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2142 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2144 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2146 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2148 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2150 * server.h (PBUFSIZ): Increase size
2152 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2154 * regcache.c (regcache::raw_compare): New function.
2155 * regcache.h (regcache::raw_compare): New declaration.
2157 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2159 * regcache.c (new_register_cache): Use new.
2160 (free_register_cache): Use delete.
2161 (register_data): Use const.
2162 (supply_register): Move body inside regcache.
2163 (regcache::raw_supply): New override function.
2164 (collect_register): Move body inside regcache.
2165 (regcache::raw_collect): New override function.
2166 (regcache::get_register_status): New override function.
2167 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2169 2018-06-09 Tom Tromey <tom@tromey.com>
2171 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2173 (event_queue): Use std::queue.
2174 (gdb_event_xfree): Remove.
2175 (initialize_event_loop, process_event, wait_for_event): Update.
2177 2018-06-08 Stan Cox <scox@redhat.com>
2179 * win32-low.c (win32_create_inferior): last_ptid and last_status
2180 moved to client_state.
2182 2018-06-08 Pedro Alves <palves@redhat.com>
2184 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2185 common/common-exceptions.o, common/common-utils.o,
2186 common/errors.o, common/print-utils.o and utils.o.
2187 * gdbreplay.c: Include "common-defs.h" instead of the two
2188 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2189 string.h or alloca.h.
2190 (perror_with_name): Delete.
2191 (remote_open): Use xstrdup instead of strdup.
2192 (main): Rename to ...
2193 (captured_main): ... this.
2196 2018-06-08 Tom Tromey <tom@tromey.com>
2198 * linux-low.c (linux_low_read_btrace): Update.
2200 2018-06-04 Stan Cox <scox@redhat.com>
2202 * server.h (struct client_state): New.
2203 * server.c (cont_thread, general_thread, multi_process)
2204 (report_fork_events, report_vfork_events, report_exec_events)
2205 (report_thread_events, swbreak_feature, hwbreak_feature)
2206 (vCont_supported, disable_randomization, pass_signals)
2207 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2208 Moved to client_state.
2209 * remote-utils.c (remote_debug, noack_mode)
2210 (transport_is_reliable): Moved to client_state.
2211 * tracepoint.c (current_traceframe): Moved to client_state.
2214 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2215 linux-low.c, remote-utils.h, target.c: Use client_state.
2217 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2219 * configure.srv: Add new c/h file.
2221 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2223 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2226 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2228 * gdb.arch/mips-fpregset-core.exp: New test.
2229 * gdb.arch/mips-fpregset-core.c: New test source.
2231 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2234 * hostio.c (require_int): Do not report overflow for integers
2235 between 0xfffffff and 0x7fffffff.
2237 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2239 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2240 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2241 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2243 (the_low_target): Wire them.
2245 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2247 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2248 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2249 mode. Call collect_register_by_name with vscr using
2250 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2251 (ppc_store_vrregset): Add and set vscr_offset variable as in
2252 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2255 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2257 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2258 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2259 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2261 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2263 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2264 (ppc_store_vsxregset): Likewise.
2265 (ppc_fill_vrregset): Likewise.
2266 (ppc_store_vrregset): Likewise.
2267 (ppc_fill_evrregset): Likewise.
2268 (ppc_store_evrregset): Likewise.
2269 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2270 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2273 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2275 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2276 wordsize of the inferior. Call ppc_linux_target_wordsize.
2278 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2280 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2281 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2282 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2283 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2284 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2285 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2286 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2287 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2288 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2289 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2290 (tdesc_powerpc_e500l): Remove.
2291 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2292 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2293 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2294 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2296 (ppc_arch_setup): Remove target description matching code. Fill a
2297 ppc_linux_features struct and call ppc_linux_match_description
2300 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2302 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2303 width of the requested register exceeds the width of the
2305 (mips_cannot_store_register): Likewise.
2307 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2309 * linux-mips-low.c (mips_fetch_register): New function. Update
2311 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2312 (the_low_target): Wire `mips_fetch_register'.
2314 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2316 * lynx-i386-low.c (LYNXOS_178): New macro.
2317 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2318 the layout on LynxOS-178.
2319 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2320 handle floating point registers that are not supported by
2323 2018-05-10 Tom Tromey <tom@tromey.com>
2325 * configure: Rebuild.
2327 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2330 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2331 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2332 Use it to set the expedite_regs field in the given tdesc.
2333 * x86-tdesc.h: New file.
2334 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2335 Adjust following the addition of the new expedite_regs parameter
2336 to init_target_desc.
2337 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2338 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2339 (i386_linux_read_description, amd64_linux_read_description):
2340 Adjust following the addition of the new expedite_regs parameter
2341 to init_target_desc.
2342 * lynx-i386-low.c: #include "x86-tdesc.h".
2343 (lynx_i386_arch_setup): Adjust following the addition of the new
2344 expedite_regs parameter to init_target_desc.
2345 * nto-x86-low.c: #include "x86-tdesc.h".
2346 (nto_x86_arch_setup): Adjust following the addition of the new
2347 expedite_regs parameter to init_target_desc.
2348 * win32-i386-low.c: #include "x86-tdesc.h".
2349 (i386_arch_setup): Adjust following the addition of the new
2350 expedite_regs parameter to init_target_desc.
2352 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2355 * win32-low.c (win32_create_inferior): Add call to my_wait
2356 setting last_status global.
2358 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2361 * win32-low.c (create_process): Only call gdb_tilde_expand if
2362 inferior_cwd is not NULL.
2364 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2366 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2367 registers to the cache if their values have changed.
2368 (i387_xsave_to_cache): Provide default values for x87 control
2369 registers when these features are available, but disabled.
2370 * regcache.c (supply_register_by_name_zeroed): New function.
2371 * regcache.h (supply_register_by_name_zeroed): Declare new
2374 2018-05-07 Tom Tromey <tom@tromey.com>
2376 * configure: Rebuild.
2378 2018-05-04 Tom Tromey <tom@tromey.com>
2380 * configure: Rebuild.
2382 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2383 Pedro Alves <palves@redhat.com>
2385 * linux-aarch64-low.c (aarch64_stopped_data_address):
2388 2018-04-27 Tom Tromey <tom@tromey.com>
2390 * configure: Rebuild.
2392 2018-04-23 Tom Tromey <tom@tromey.com>
2394 * configure: Rebuild.
2396 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2398 * Makefile.in (depcomp): Add "..".
2399 (all_deps_files): New and use it.
2401 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2403 * configure.srv (aarch64*-*-linux*): Don't include xml.
2404 (i[34567]86-*-cygwin*): Likewise.
2405 (i[34567]86-*-linux*): Likewise.
2406 (i[34567]86-*-lynxos*): Likewise.
2407 (i[34567]86-*-mingw32ce*): Likewise.
2408 (i[34567]86-*-mingw*): Likewise.
2409 (i[34567]86-*-nto*): Likewise.
2410 (tic6x-*-uclinux): Likewise.
2411 (x86_64-*-linux*): Likewise.
2412 (x86_64-*-mingw*): Likewise.
2413 (x86_64-*-cygwin*): Likewise.
2415 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2417 * tdesc.c: Remove xml parameter.
2419 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2421 * server.c (get_features_xml): Remove cast.
2422 * tdesc.c (void target_desc::accept): Fill in function.
2423 (tdesc_get_features_xml): Remove old xml creation.
2424 (print_xml_feature::visit_pre): Add xml vistor.
2425 * tdesc.h (struct target_desc): Make xmltarget mutable.
2426 (tdesc_get_features_xml): Remove declaration.
2428 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2430 * tdesc.c (tdesc_architecture_name): Add new function.
2431 (tdesc_osabi_name): Likewise.
2432 (tdesc_get_features_xml): Use new functions.
2434 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2436 * tdesc.c (tdesc_create_flags): Remove.
2437 (tdesc_add_flag): Likewise.
2438 (tdesc_named_type): Likewise.
2439 (tdesc_create_union): Likewise.
2440 (tdesc_create_struct): Likewise.
2441 (tdesc_create_vector): Likewise.
2442 (tdesc_add_bitfield): Likewise.
2443 (tdesc_add_field): Likewise.
2444 (tdesc_set_struct_size): Likewise.
2446 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2448 * tdesc.c (~target_desc): Remove implictly deleted items.
2449 (init_target_desc): Iterate all features.
2450 (tdesc_get_features_xml): Use vector.
2451 (tdesc_create_feature): Create feature.
2452 * tdesc.h (tdesc_feature) Remove
2453 (target_desc): Add features.
2455 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2457 * Makefile.in: Add common/tdesc.c
2458 * tdesc.c (init_target_desc): init all reg_defs from register
2460 (tdesc_create_reg): Create tdesc_reg.
2461 * tdesc.h (tdesc_feature): Add register vector.
2463 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2465 * tdesc.h (struct target_desc) <features>: Change type to
2466 std::vector<std::string>.
2467 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2469 (tdesc_get_features_xml): Likewise.
2470 (tdesc_create_feature): Likewise.
2472 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2474 * regcache.c (find_register_by_number): Return a ref.
2475 (find_regno): Use references.
2476 (register_size): Likewise.
2477 (register_data): Likewise.
2478 * tdesc.c (target_desc::~target_desc): Remove free calls.
2479 (target_desc::operator==): Use std::vector compare.
2480 (init_target_desc): Use reference.
2481 (tdesc_create_reg): Use reg constructors.
2482 * tdesc.h (struct target_desc): Replace pointer with object.
2484 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2486 * regcache.c (find_register_by_number): Make static.
2487 (find_regno): Use find_register_by_number
2488 * regcache.h (struct reg): Remove declaration.
2490 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2492 * tdesc.c (target_desc::~target_desc): Move to here.
2493 (target_desc::operator==): Likewise.
2494 * tdesc.h (target_desc::~target_desc): Move from here.
2495 (target_desc::operator==): Likewise.
2497 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2499 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2501 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2503 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2505 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2506 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2507 and init_registers_s390_gs_linux64.
2509 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2511 * linux-s390-low.c (s390_fill_gs): Remove function.
2512 (s390_fill_gsbc): Remove function.
2513 (s390_regsets): Set fill functions for the guarded storage regsets
2516 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2518 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2519 the word size. Add comment.
2520 (s390_get_wordsize): New function.
2521 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2522 pswm with it. Instead, use s390_get_wordsize to determine the
2523 word size first and derive the correct tdesc from that directly.
2525 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2527 * Makefile.in: Include silent-rules.mk.
2528 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2529 (COMPILE): Add ECHO_CXX.
2530 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2531 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2532 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2533 (version-generated.c): Add ECHO_GEN.
2534 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2535 (IPAGENT_COMPILE): Add ECHO_CXX.
2536 (%-generated.c): Add ECHO_REGDAT.
2538 2018-03-14 Tom Tromey <tom@tromey.com>
2541 * ax.c (ax_printf): Special case for NULL.
2543 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2545 * linux-low.c (linux_qxfer_libraries_svr4): Use
2546 xml_escape_text_append.
2548 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2550 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2552 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2554 * server.c (handle_general_set): Remove unnecessary xstrdup.
2556 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2558 * server.c (parse_debug_format_options): Adjust to
2559 delim_string_to_char_ptr_vec changes.
2560 * thread-db.c (thread_db_load_search): Adjust to
2561 dirnames_to_char_ptr_vec changes.
2563 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2565 * target.h (target_enable_btrace, target_disable_btrace)
2566 (target_read_btrace, target_read_btrace_conf): Turn macro into
2567 inline function. Throw error if target method is not defined.
2568 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2569 check for btrace target method. Be prepared to handle exceptions
2570 from btrace target methods.
2572 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2574 * server.c (captured_main): Change order of error message printed
2575 when the current working directory cannot be found.
2577 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2579 * server.c: Include "filenames.h" and "pathstuff.h".
2580 (program_name): Delete variable.
2581 (program_path): New anonymous class.
2582 (get_exec_wrapper): Use "program_path" instead of
2584 (handle_v_run): Likewise.
2585 (captured_main): Likewise.
2586 (process_serial_event): Likewise.
2588 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2590 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2591 (OBJS): Add "pathstuff.o".
2592 * server.c (current_directory): New global variable.
2593 (captured_main): Initialize "current_directory".
2595 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2597 * tdesc.c: Use common/tdesc.h.
2598 * tdesc.h: Likewise.
2600 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2601 Simon Marchi <simon.marchi@ericsson.com>
2603 * Makefile.in: Switch order of make rules.
2605 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2607 * Makefile.in: Add common directory in build.
2608 * configure.ac: Add common reference.
2609 * configure: Regenerate.
2611 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2613 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2614 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2615 * spu-low.c (spu_target_ops): Likewise.
2616 * win32-low.c (win32_target_ops): Likewise.
2617 * server.c (supported_btrace_packets): Report packets unconditionally.
2618 * target.h (target_ops) <supports_btrace>: Remove.
2619 (target_supports_btrace): Remove.
2621 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2623 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2624 (handle_btrace_disable): Change return type to void. Use exceptions
2626 (handle_btrace_general_set): Catch exception and copy message to
2629 2018-02-08 Tom Tromey <tom@tromey.com>
2631 * linux-low.c (install_software_single_step_breakpoints): Use
2632 make_scoped_restore.
2633 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2634 (do_restore_current_thread_cleanup): Remove.
2635 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2638 2018-02-08 Tom Tromey <tom@tromey.com>
2640 * mem-break.c (set_raw_breakpoint_at): Use
2641 gdb::unique_xmalloc_ptr.
2643 2018-01-30 Pedro Alves <palves@redhat.com>
2646 * target.c (target_terminal::terminal_state): Rename to ...
2647 (target_terminal::m_terminal_state): ... this.
2649 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2651 * linux-low.c (handle_extended_wait): Surround call to
2652 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2654 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2656 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2657 linux_ptrace_attach_fail_reason_string now returning an
2659 (linux_attach): Likewise.
2660 * thread-db.c (attach_thread): Likewise.
2662 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2665 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2666 checking for fs_base/gs_base fields in struct user_regs_struct.
2667 * configure: Regenerate.
2669 2018-01-16 Yao Qi <yao.qi@linaro.org>
2672 * linux-low.c (fetch_register): Call supply_register instead of
2675 2018-01-08 Yao Qi <yao.qi@linaro.org>
2676 Simon Marchi <simon.marchi@ericsson.com>
2678 * Makefile.in (OBS): Remove selftest.o.
2679 * configure.ac: Set srv_selftest_objs if $development is true.
2680 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2681 * configure: Re-generated.
2682 * server.c (captured_main): Wrap variable selftest_filter with
2685 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2687 * server.c (parse_debug_format_options): Return std::string.
2688 (handle_monitor_command, captured_main): Adjust.
2690 2018-01-05 Pedro Alves <palves@redhat.com>
2693 * server.c (captured_main): Pass quiet=false to
2694 save_original_signals_state.
2696 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2698 * gdbreplay.c (gdbreplay_version): Update copyright year in
2700 * server.c (gdbserver_version): Likewise.
2702 2017-12-08 Tom Tromey <tom@tromey.com>
2704 * ax.c (ax_printf): Update.
2706 2017-12-07 Yao Qi <yao.qi@linaro.org>
2708 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2709 aarch64_linux_read_description.
2710 * linux-amd64-ipa.c (idx2mask): New array.
2711 (get_ipa_tdesc): Move idx2mask out.
2712 (initialize_low_tracepoint): Initialize target descriptions.
2713 * linux-i386-ipa.c (idx2mask): New array.
2714 (get_ipa_tdesc): Move idx2mask out.
2715 (initialize_low_tracepoint): Initialize target descriptions.
2717 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2719 * tdesc.c (struct tdesc_type): Change return type.
2720 (tdesc_add_flag): Change parameter type.
2721 (tdesc_add_bitfield): Likewise.
2722 (tdesc_add_field): Likewise.
2723 (tdesc_set_struct_size): Likewise.
2725 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2727 * regcache.c (registers_to_string): Remove unused variable.
2729 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2731 * inferiors.c (for_each_inferior_with_data): Remove.
2732 * inferiors.h (for_each_inferior_with_data): Remove.
2733 * server.c (handle_qxfer_threads_worker): Change parameter type.
2734 (handle_qxfer_threads_proper): Use for_each_thread.
2736 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2738 * inferiors.c (for_each_inferior): Remove.
2739 (clear_inferiors): Use for_each_thread.
2740 * inferiors.h (for_each_inferior): Remove.
2741 * linux-low.c (linux_wait_for_event_filtered): Use
2743 (linux_stabilize_threads): Likewise.
2744 * regcache.c (regcache_release): Likewise.
2745 * server.c (gdb_wants_all_threads_stopped): Likewise.
2746 (clear_pending_status_callback): Remove.
2747 (handle_status): Use for_each_thread.
2748 (captured_main): Likewise.
2749 * win32-low.c (child_init_thread_list): Likewise.
2750 (win32_clear_inferiors): Likewise.
2751 (fake_breakpoint_event): Likewise.
2753 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2755 * inferiors.h (find_inferior): Remove.
2756 * inferiors.c (find_inferior): Remove.
2758 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2760 * linux-low.c (resume_status_pending_p): Update comment.
2761 (need_step_over_p): Update comment.
2763 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2765 * linux-low.c (proceed_one_lwp): Return void, change parameter
2767 (unsuspend_and_proceed_one_lwp): Likewise.
2768 (proceed_all_lwps): Use for_each_thread.
2769 (unstop_all_lwps): Likewise.
2771 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2773 * linux-low.c (linux_resume_one_thread): Return void, take
2775 (linux_resume): Use for_each_thread.
2777 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2779 * linux-low.c (send_sigstop_callback): Return void, change
2780 parameter type. Rename to...
2781 (send_sigstop): ... this.
2782 (suspend_and_send_sigstop_callback): Return void, change parameter
2784 (suspend_and_send_sigstop): ... this.
2785 (stop_all_lwps): Use for_each_thread.
2787 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2789 * linux-low.c (lwp_running): Return bool, remove unused
2791 (linux_stabilize_threads): Use find_thread.
2793 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2795 * linux-low.c (select_singlestep_lwp_callback): Remove.
2796 (count_events_callback): Remove.
2797 (select_event_lwp_callback): Remove.
2798 (select_event_lwp): Use find_thread/for_each_thread.
2800 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2802 * linux-low.c (not_stopped_callback): Return bool, take filter
2804 (linux_wait_for_event_filtered): Use find_thread.
2805 (linux_wait_1): Likewise.
2807 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2809 * linux-low.c (same_lwp): Remove.
2810 (find_lwp_pid): Use find_thread.
2812 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2814 * linux-low.c (delete_lwp_callback): Remove.
2815 (linux_mourn): Use for_each_thread.
2817 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2819 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2820 args parameter, don't check for pid.
2821 (linux_detach): Use for_each_thread.
2823 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2825 * linux-low.c (struct counter): Remove.
2826 (second_thread_of_pid_p): Remove.
2827 (last_thread_of_process_p): Use find_thread.
2829 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2831 * inferiors.c (find_inferior_in_random): Remove.
2832 * inferiors.h (find_inferior_in_random): Remove.
2833 * linux-low.c (status_pending_p_callback): Return bool, accept
2834 parameter ptid directly.
2835 (linux_wait_for_event_filtered): Use find_thread_in_random.
2836 (linux_wait_1): Likewise.
2838 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2840 * inferiors.c (find_inferior_id): Remove.
2841 (find_thread_ptid): Move implemention from find_inferior_id to
2843 * inferiors.h (find_inferior_id): Remove.
2844 * server.c (handle_status): Use find_thread_ptid.
2845 (process_serial_event): Likewise.
2846 * thread-db.c (find_one_thread): Likewise.
2847 (thread_db_thread_handle): Likewise.
2848 * win32-low.c (thread_rec): Likewise.
2849 (child_delete_thread): Likewise.
2850 (win32_thread_alive): Likewise.
2851 (get_child_debug_event): Likewise.
2853 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2855 * linux-mips-low.c (update_watch_registers_callback): Return
2856 void, remove pid_p parameter, don't check for pid.
2857 (mips_insert_point, mips_remove_point): Use for_each_thread.
2859 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2861 * lynx.low (lynx_delete_thread_callback): Remove.
2862 (lynx_mourn): Use for_each_thread.
2864 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2866 * regcache.c (regcache_invalidate_one): Remove.
2867 (regcache_invalidate_pid): use for_each_thread.
2869 2017-11-26 Tom Tromey <tom@tromey.com>
2871 * linux-low.c (linux_create_inferior): Update.
2873 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2875 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2877 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2879 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2880 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2881 * linux-aarch64-tdesc-selftest.c: New file.
2882 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2884 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2886 * configure.srv: Add new file.
2887 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2888 * linux-aarch64-tdesc-selftest.c: New file.
2889 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2891 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2893 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2894 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2895 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2897 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2899 * configure.srv: Add new files.
2900 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2901 aarch64_linux_read_description.
2902 * linux-aarch64-low.c (aarch64_linux_read_description):
2903 Merge with aarch64_arch_setup.
2904 (aarch64_arch_setup): Call aarch64_linux_read_description.
2905 * linux-aarch64-tdesc.c: New file.
2906 * linux-aarch64-tdesc.h: New file.
2908 2017-11-24 Yao Qi <yao.qi@linaro.org>
2910 * configure.srv: Set $srv_regobj for tic6x-linux.
2911 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2912 (tic6x_read_description): Move some code to tic6x_arch_setup.
2913 (tic6x_tdesc_test): New function.
2914 (initialize_low_arch): Call selftests::register_test.
2916 2017-11-22 Yao Qi <yao.qi@linaro.org>
2918 * remote-utils.c (prepare_resume_reply): Use memcpy.
2920 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2922 * linux-low.c (kill_one_lwp_callback): Return void, take
2923 argument directly, don't filter on pid.
2924 (linux_kill): Use for_each_thread.
2926 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2928 * linux-low.c (need_step_over_p): Return bool, remove dummy
2930 (linux_resume, proceed_all_lwps): Use find_thread.
2932 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2934 * linux-low.c (resume_status_pending_p): Return bool, remove
2936 (linux_resume): Use find_thread.
2938 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2940 * linux-low.c (struct thread_resume_array): Remove.
2941 (linux_set_resume_request): Return void, take arguments
2943 (linux_resume): Use for_each_thread.
2945 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2947 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2948 return bool, remove data argument.
2949 (linux_stabilize_threads): Use find_thread.
2951 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2953 * linux-low.c (unsuspend_one_lwp): Remove.
2954 (unsuspend_all_lwps): Use for_each_thread, inline code from
2957 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2959 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2960 * linux-low.c (struct iterate_over_lwps_args): Remove.
2961 (iterate_over_lwps_filter): Remove.
2962 (iterate_over_lwps): Use find_thread.
2964 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2966 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2967 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2968 code from reset_lwp_ptrace_options_callback.
2970 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2972 * linux-arm-low.c (struct update_registers_data): Remove.
2973 (update_registers_callback): Return void, take arguments
2974 directly, don't check thread's pid.
2975 (arm_insert_point, arm_remove_point): Use for_each_thread.
2977 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2979 * win32-low.c (continue_one_thread): Return void, take argument
2981 (child_continue): Use for_each_thread.
2983 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2985 * win32-i386-low.c (update_debug_registers_callback): Rename
2987 (update_debug_registers): ... this, return void, remove pid_p arg.
2988 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2990 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2992 * inferiors.h (struct process_info): Add constructor, initialize
2994 <syscalls_to_catch>: Change type to std::vector<int>.
2995 * inferiors.c (add_process): Allocate process_info with new.
2996 (remove_process): Free process_info with delete.
2997 * linux-low.c (handle_extended_wait): Adjust.
2998 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2999 * server.c (handle_general_set): Adjust.
3001 2017-11-16 Pedro Alves <palves@redhat.com>
3003 * remote-utils.c (remote_close): Block SIGIO signals instead of
3004 uninstalling the SIGIO handler.
3006 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3008 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3010 2017-11-16 Yao Qi <yao.qi@linaro.org>
3012 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3013 (tic6x_store_gregset): Likewise.
3014 (tic6x_usrregs_info): Move it up.
3016 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3018 * Makefile.in: Update arch rules.
3019 * configure.srv: Explicitly mark arch/ files.
3021 2017-11-13 Andreas Schwab <schwab@suse.de>
3023 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3025 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3027 2017-11-06 Pedro Alves <palves@redhat.com>
3029 * config.in, configure: Regenerate.
3031 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3033 * target.c (struct thread_search): Remove.
3034 (thread_search_callback): Remove.
3035 (prepare_to_access_memory): Use for_each_thread instead of
3036 find_inferior. Inline code from thread_search_callback.
3038 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3040 * server.c (struct visit_actioned_threads_data): Remove.
3041 (visit_actioned_threads): Change prototype to take arguments
3043 (resume): Use find_thread instead of find_inferior.
3045 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3047 * server.c (queue_stop_reply_callback): Change prototype, return
3049 (find_status_pending_thread_callback): Remove.
3050 (handle_status): Replace find_inferior with find_thread and
3053 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3055 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3057 (aarch64_store_gregset): Likewise.
3058 (aarch64_fill_fpregset): Likewise.
3059 (aarch64_store_fpregset): Likewise.
3061 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3063 * gdbthread.h (find_thread, for_each_thread): New functions.
3064 * inferiors.c (thread_of_pid): Remove.
3065 (find_any_thread_of_pid): Use find_thread.
3066 * linux-low.c (num_lwps): Use for_each_thread.
3068 2017-10-17 Yao Qi <yao.qi@linaro.org>
3070 * Makefile.in: Remove one rule.
3071 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3073 2017-10-17 Yao Qi <yao.qi@linaro.org>
3075 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3076 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3078 2017-10-17 Yao Qi <yao.qi@linaro.org>
3080 * configure.srv: Rename arm.o with arch/arm.o.
3082 2017-10-17 Yao Qi <yao.qi@linaro.org>
3084 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3085 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3086 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3087 (arch-i386.o, arch-amd64.o): Remove rules.
3088 (arch/%.o): New rule.
3089 Update POSTCOMPILE and COMPILE.pre.
3090 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3091 * configure: Re-generated.
3092 * configure.srv: Replace arch-i386.o with arch/i386.o.
3093 Replace arch-amd64.o with arch/amd64.o.
3095 2017-10-16 Yao Qi <yao.qi@linaro.org>
3097 * configure: Regenerated.
3099 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3101 * inferiors.h: (struct inferior_list): Remove.
3102 (struct inferior_list_entry); Remove.
3103 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3104 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3105 get_first_inferior): Remove.
3106 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3107 find_inferior_id, find_inferior_in_random): Change signature.
3108 * inferiors.c (all_threads): Change type to
3109 std::list<thread_info *>.
3110 (get_thread): Remove macro.
3111 (find_inferior, find_inferior_id): Change signature, implement
3113 (find_inferior_in_random): Change signature, implement using
3114 find_thread_in_random.
3115 (for_each_inferior, for_each_inferior_with_data): Change
3116 signature, implement using for_each_thread.
3117 (add_inferior_to_list, remove_inferior): Remove.
3118 (add_thread, get_first_thread, thread_of_pid,
3119 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3120 (get_first_inferior, one_inferior_p, clear_inferior_list):
3122 (clear_inferiors, get_thread_process): Update.
3123 * gdbthread.h: Include <list>.
3124 (struct thread_info) <entry>: Remove field.
3126 (all_threads): Change type to std::list<thread_info *>.
3127 (get_first_inferior): Add doc.
3128 (find_thread, for_each_thread, find_thread_in_random): New
3130 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3131 * linux-arm-low.c (update_registers_callback): Update.
3132 * linux-low.c (second_thread_of_pid_p): Update.
3133 (kill_one_lwp_callback, linux_detach_lwp_callback,
3134 delete_lwp_callback, status_pending_p_callback, same_lwp,
3135 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3136 iterate_over_lwps, not_stopped_callback,
3137 resume_stopped_resumed_lwps, count_events_callback,
3138 select_singlestep_lwp_callback, select_event_lwp_callback,
3139 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3140 suspend_and_send_sigstop_callback, wait_for_sigstop,
3141 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3142 lwp_running, linux_set_resume_request, resume_status_pending_p,
3143 need_step_over_p, start_step_over, linux_resume_one_thread,
3144 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3145 reset_lwp_ptrace_options_callback): Update.
3146 * linux-mips-low.c (update_watch_registers_callback): Update.
3147 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3149 (free_register_cache_thread_one): Remove.
3150 (regcache_release): Update.
3151 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3152 handle_qxfer_threads_worker): Update.
3153 (handle_query): Update, use list iterator.
3154 (visit_actioned_threads, handle_pending_status,
3155 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3156 clear_pending_status_callback, set_pending_status_callback,
3157 find_status_pending_thread_callback, handle_status,
3158 process_serial_event): Update.
3159 * target.c (thread_search_callback): Update.
3160 * thread-db.c (thread_db_get_tls_address): Update.
3161 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3163 * win32-i386-low.c (update_debug_registers_callback): Update.
3164 * win32-low.c (delete_thread_info, child_delete_thread,
3165 continue_one_thread, suspend_one_thread,
3166 get_child_debug_event): Adjust.
3168 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3170 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3171 * inferiors.h: Include <list>.
3172 (struct process_info) <entry>: Remove field.
3174 (pid_of): Change macro to function.
3175 (ptid_of, lwpid_of): Remove macro.
3176 (all_processes): Change type to std::list<process_info *>.
3177 (ALL_PROCESSES): Remove macro.
3178 (for_each_process, find_process): New function.
3179 * inferiors.c (all_processes): Change type to
3180 std::list<process_info *>.
3181 (find_thread_process): Adjust.
3182 (add_process): Likewise.
3183 (remove_process): Likewise.
3184 (find_process_pid): Likewise.
3185 (get_first_process): Likewise.
3186 (started_inferior_callback): Remove.
3187 (have_started_inferiors_p): Adjust.
3188 (attached_inferior_callback): Remove.
3189 (have_attached_inferiors_p): Adjust.
3190 * linux-low.c (check_zombie_leaders): Likewise.
3191 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3192 (x86_linux_update_xmltarget): Adjust.
3193 * server.c (handle_query): Likewise.
3194 (gdb_reattached_process): Remove.
3195 (handle_status): Adjust.
3196 (kill_inferior_callback): Likewise.
3197 (detach_or_kill_inferior): Remove.
3198 (print_started_pid): Likewise.
3199 (print_attached_pid): Likewise.
3200 (detach_or_kill_for_exit): Update.
3201 (process_serial_event): Likewise.
3202 * linux-arm-low.c (arm_new_fork): Likewise.
3204 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3206 * dll.h: Include <list>.
3207 (struct dll_info): Add constructor.
3208 <entry>: Remove field.
3209 (all_dlls): Change type to std::list<dll_info>.
3210 * dll.c: Include <algorithm>.
3211 (get_dll): Remove macro.
3212 (all_dlls): Change type to std::list<dll_info *>.
3213 (free_one_dll): Remove.
3214 (match_dll): Likewise.
3215 (loaded_dll): Adjust.
3216 (unloaded_dll): Adjust to all_dlls type change, use
3217 std::find_if. Inline code from match_dll.
3218 (clear_dlls): Adjust to all_dlls type change.
3219 * server.c (emit_dll_description): Remove.
3220 (handle_qxfer_libraries): Adjust to all_dlls type change,
3221 integrate emit_dll_description's functionality.
3223 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3225 * linux-low.h (struct linux_target_ops) <delete_process>: New
3227 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3228 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3229 (struct linux_target_ops): Add delete_process callback.
3230 * linux-arm-low.c (arm_delete_process): New.
3231 (struct linux_target_ops): Add delete_process callback.
3232 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3233 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3234 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3235 * linux-mips-low.c (mips_linux_delete_process): New.
3236 (struct linux_target_ops): Add delete_process callback.
3237 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3238 * linux-s390-low.c (struct linux_target_ops): Likewise.
3239 * linux-sh-low.c (struct linux_target_ops): Likewise.
3240 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3241 * linux-tile-low.c (struct linux_target_ops): Likewise.
3242 * linux-x86-low.c (x86_linux_delete_process): New.
3243 (struct linux_target_ops): Add delete_process callback.
3244 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3246 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3248 * linux-aarch64-low.c (the_low_target): Add thread delete
3250 * linux-arm-low.c (arm_delete_thread): New function.
3251 (the_low_target): Add thread delete callback.
3252 * linux-bfin-low.c (the_low_target): Likewise.
3253 * linux-crisv32-low.c (the_low_target): Likewise.
3254 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3256 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3258 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3259 * linux-mips-low.c (mips_linux_delete_thread): New function.
3260 (the_low_target): Add thread delete callback.
3261 * linux-ppc-low.c (the_low_target): Likewise.
3262 * linux-s390-low.c (the_low_target): Likewise.
3263 * linux-sh-low.c (the_low_target): Likewise.
3264 * linux-tic6x-low.c (the_low_target): Likewise.
3265 * linux-tile-low.c (the_low_target): Likewise.
3266 * linux-x86-low.c (the_low_target): Likewise.
3267 * linux-xtensa-low.c (the_low_target): Likewise.
3269 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3271 * win32-low.c: Include "common-inferior.h".
3273 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3275 * inferiors.c (set_inferior_cwd): New function.
3276 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3277 (handle_query): Inform that QSetWorkingDir is supported.
3278 * win32-low.c (create_process): Pass the inferior's cwd to
3281 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3283 * inferiors.c (current_inferior_cwd): New global variable.
3284 (get_inferior_cwd): New function.
3285 * inferiors.h (struct process_info) <cwd>: New field.
3287 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3289 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3290 (OBS): Add gdb_tilde_expand.o.
3292 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3294 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3295 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3297 2017-09-29 Pedro Alves <palves@redhat.com>
3299 * ax.c (gdb_parse_agent_expr): Constify.
3300 * ax.h (gdb_parse_agent_expr): Constify.
3301 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3303 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3304 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3305 * remote-utils.h (read_ptid): Constify.
3306 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3307 (process_point_options, process_serial_event): Constify.
3308 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3309 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3310 (cmd_qtbuffer): Constify.
3312 2017-09-29 Pedro Alves <palves@redhat.com>
3314 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3317 2017-09-29 Pedro Alves <palves@redhat.com>
3319 * linux-low.c (handle_extended_wait): Pass parent thread instead
3320 of process to thread_db_notice_clone.
3321 * linux-low.h (thread_db_notice_clone): Replace parent process
3322 parameter with parent thread parameter.
3323 * thread-db.c (find_one_thread): Add comment.
3324 (thread_db_notice_clone): Replace parent process parameter with
3325 parent thread parameter. Temporarily switch to the parent thread.
3327 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3329 * gdbthread.h: Include "common-gdbthread.h".
3330 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3331 "if" when validating the ptid.
3332 * remote-utils.c: Include "gdbthread.h".
3333 (prepare_resume_reply): Use "switch_to_thread".
3334 * target.c (done_accessing_memory): Likewise.
3336 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3338 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3339 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3340 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3341 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3342 s390x-gs-linux64-ipa.o to ipa_obj.
3343 * linux-s390-low.c (HWCAP_S390_GS): New define.
3344 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3346 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3347 (s390_arch_setup): Check for guarded-storage support and choose
3349 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3350 init_registers_s390x_gs_linux64.
3351 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3353 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3354 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3356 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3358 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3360 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3362 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3363 (thread_db_thread_handle): Declare.
3364 * linux-low.c (linux_target_ops): Initialize thread_handle.
3365 * server.c (handle_qxfer_threads_worker): Add support for
3367 * target.h (struct target_ops): Add new function pointer,
3369 (target_thread_handle): Define.
3370 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3372 (thread_db_thread_handle): New function.
3374 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3376 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3377 * linux-low.h (thread_db_notice_clone): Declare.
3378 * thread-db.c (thread_db_notice_clone): New function.
3380 2017-09-21 Pedro Alves <palves@redhat.com>
3382 * server.c (gdb_read_memory, handle_status, process_serial_event)
3383 (handle_serial_event, handle_target_event): Adjust to
3384 set_desired_thread prototype change.
3385 * target.c (set_desired_thread): Remove 'use_general' parameter
3387 * target.h (set_desired_thread): Remove 'use_general' parameter.
3389 2017-09-20 Tom Tromey <tom@tromey.com>
3391 * target.c (target_terminal::terminal_state): Define.
3392 (target_terminal::init): Rename from target_terminal_init.
3393 (target_terminal::inferior): Rename from
3394 target_terminal_inferior.
3395 (target_terminal::ours): Rename from target_terminal_ours.
3396 (target_terminal::ours_for_output, target_terminal::info): New.
3398 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3400 * server.c (accumulate_file_name_length): Remove.
3401 (emit_dll_description): Adjust to std::string change.
3402 (handle_qxfer_libraries): Use std::string to hold document.
3404 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3406 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3407 return type of xml_escape_text.
3408 * server.c (emit_dll_description): Likewise.
3410 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3412 * server.c (captured_main): Accept argument for --selftest.
3413 Update run_tests call.
3414 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3415 when registering selftests.
3417 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3419 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3420 instead of "VEC" for "target_desc.reg_defs".
3421 (regcache_cpy): Likewise.
3422 (registers_to_string): Likewise.
3423 (registers_from_string): Likewise.
3424 (find_regno): Likewise.
3425 (supply_regblock): Likewise.
3426 (regcache_raw_read_unsigned): Likewise.
3427 * tdesc.c (init_target_desc): Likewise.
3428 (tdesc_create_reg): Likewise.
3429 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3430 (struct target_desc) <reg_defs>: Convert to "std::vector".
3431 (target_desc): Do not initialize "reg_defs".
3432 (~target_desc): Update code to use "std::vector" instead of "VEC"
3433 for "target_desc.reg_defs".
3434 (operator==): Likewise.
3436 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3438 * inferiors.h (thread_to_gdb_id): Remove.
3439 * inferiors.c (thread_to_gdb_id): Remove.
3440 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3441 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3442 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3444 * nto-low.c (nto_fetch_registers, nto_store_registers,
3445 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3447 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3449 * inferiors.h (gdb_id_to_thread_id): Remove.
3450 * inferiors.c (gdb_id_to_thread_id): Remove.
3451 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3452 removal. Move pid declaration closer to where it's used.
3454 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3456 * server.c (handle_detach): New function.
3457 (process_serial_event): Move code out, call handle_detach.
3459 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3461 * server.c (require_running): Rename to ...
3462 (require_running_or_return): ... this ...
3463 (require_running_or_break): ... and this.
3464 (handle_query, process_serial_event): Adjust.
3466 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3468 * linux-low.c (linux_set_resume_request): Remove unused
3471 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3473 * server.c (first_thread_of): Remove.
3474 (process_serial_event): Replace usage of first_thread_of with
3475 find_any_thread_of_pid.
3476 * tracepoint.c (same_process_p): Remove.
3477 (gdb_agent_about_to_close): Replace usage of same_process_p with
3478 find_any_thread_of_pid.
3479 * linux-x86-low.c (same_process_callback): Remove.
3480 (x86_arch_setup_process_callback): Replace usage of
3481 same_process_callback with find_any_thread_of_pid.
3482 * thread-db.c (any_thread_of): Remove.
3483 (switch_to_process): Replace usage of any_thread_of with
3484 find_any_thread_of_pid.
3485 * inferiors.c (thread_pid_matches_callback): Remove.
3486 (find_thread_process): Adjust to use find_any_thread_of_pid.
3488 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3490 * regcache.c (get_thread_regcache): Guard calls to "memset"
3493 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3495 * linux-low.c (handle_extended_wait): Use
3496 "allocate_target_description" instead of "XNEW".
3497 * linux-x86-low.c (initialize_low_arch): Likewise.
3499 2017-09-05 Yao Qi <yao.qi@linaro.org>
3501 * configure.srv (srv_i386_regobj): Remove.
3502 (srv_amd64_regobj): Remove.
3503 (srv_regobj): Set it to "" for x86 non-linux targets.
3504 * linux-x86-tdesc.c (i386_linux_read_description):
3505 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3506 (init_registers_i386): Remove the declaration.
3507 (tdesc_i386): Remove the declaration.
3508 (lynx_i386_arch_setup): Call i386_create_target_description.
3509 * nto-x86-low.c: Likewise.
3510 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3511 [!__x86_64__]: include arch/i386.h.
3512 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3514 2017-09-05 Yao Qi <yao.qi@linaro.org>
3516 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3517 i386/amd64-XXX-linux from it.
3519 2017-09-05 Yao Qi <yao.qi@linaro.org>
3521 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3523 (ipa_amd64_linux_regobj): Remove.
3524 (ipa_x32_linux_regobj): Remove.
3526 2017-09-05 Yao Qi <yao.qi@linaro.org>
3528 * Makefile.in (arch-amd64.o): New rule.
3529 * configure.srv: Append arch-amd64.o.
3530 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3531 (get_ipa_tdesc): Call amd64_linux_read_description.
3532 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3533 and init_registers_amd64_XXX.
3534 * linux-x86-low.c (x86_linux_read_description): Call
3535 amd64_linux_read_description.
3536 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3537 (initialize_low_arch): Don't call init_registers_x32_XXX and
3538 init_registers_amd64_XXX.
3539 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3540 and tdesc_amd64_XXX.
3541 [__x86_64__] (amd64_tdesc_test): New function.
3542 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3543 and init_registers_amd64_XXX.
3544 * linux-x86-tdesc.c: Include arch/amd64.h.
3545 (xcr0_to_tdesc_idx): New function.
3546 (i386_linux_read_description): New function.
3547 (amd64_get_ipa_tdesc_idx): New function.
3548 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3549 (amd64_get_ipa_tdesc): Declare.
3551 2017-09-05 Yao Qi <yao.qi@linaro.org>
3553 * configure.srv (srv_i386_linux_xmlfiles): Remove
3554 i386/i386-XXX-linux.xml from it.
3556 2017-09-05 Yao Qi <yao.qi@linaro.org>
3558 * configure.srv: Set srv_i386_linux_regobj empty if $development
3560 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3561 initialize_low_tdesc.
3562 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3563 with #if initialize_low_tdesc.
3564 * linux-x86-tdesc-selftest.c: New file.
3565 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3567 2017-09-05 Yao Qi <yao.qi@linaro.org>
3569 * Makefile.in (arch-i386.o): New rule.
3570 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3571 (x86_64-*-linux*): Likewise.
3572 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3573 include arch/i386.h.
3574 (i386_linux_read_description): Remove code and call
3575 i386_create_target_description.
3576 * tdesc.c (allocate_target_description): New function.
3577 * tdesc.h (set_tdesc_architecture): Remove declaration.
3578 (set_tdesc_osabi): Likewise.
3580 2017-09-05 Yao Qi <yao.qi@linaro.org>
3582 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3583 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3584 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3586 * server.c (get_features_xml): Call tdesc_get_features_xml.
3587 * tdesc.c (set_tdesc_architecture): New function.
3588 (set_tdesc_osabi): New function.
3589 (tdesc_get_features_xml): New function.
3590 (tdesc_create_feature): Add an argument.
3591 * tdesc.h (struct target_desc) <features>: New field.
3592 <arch, osabi>: New field.
3593 (~target_desc): xfree features, arch, and osabi.
3594 (target_desc::oerator==): Don't compare .xmltarget.
3595 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3596 (set_tdesc_osabi): Likewise.
3597 (tdesc_get_features_xml): Likewise.
3599 2017-09-05 Yao Qi <yao.qi@linaro.org>
3601 * linux-x86-tdesc.c: Include selftest.h.
3602 (i386_tdesc_test): New function.
3603 (initialize_low_tdesc): Call selftests::register_test.
3604 * tdesc.h: Include regdef.h.
3605 (target_desc): Override operator == and !=.
3607 2017-09-05 Yao Qi <yao.qi@linaro.org>
3609 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3610 (ipa_obj): Likewise.
3611 * linux-i386-ipa.c: Include common/x86-xstate.h
3612 (get_ipa_tdesc): Call i386_linux_read_description.
3613 (initialize_low_tracepoint): Don't call init_registers_XXX
3614 functions, call initialize_low_tdesc instead.
3615 * linux-x86-low.c (x86_linux_read_description): Call
3616 i386_linux_read_description.
3617 (initialize_low_arch): Don't call init_registers_i386_XXX
3618 functions, call initialize_low_tdesc.
3619 * linux-x86-tdesc.c: New file.
3620 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3621 (i386_get_ipa_tdesc_idx): Declare.
3622 (i386_get_ipa_tdesc): Declare.
3623 (initialize_low_tdesc): Declare.
3625 2017-09-05 Yao Qi <yao.qi@linaro.org>
3627 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3630 2017-09-05 Yao Qi <yao.qi@linaro.org>
3632 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3633 * regcache.c (get_thread_regcache): Use VEC_length.
3634 (init_register_cache): Likewise.
3635 (regcache_cpy): Likewise.
3636 (registers_to_string): Iterate reg_defs via VEC_iterate.
3637 (find_regno): Likewise.
3638 (find_register_by_number): Use VEC_index.
3639 (register_size): Call find_register_by_number.
3640 (register_data): Call find_register_by_number.
3641 (supply_regblock): Use VEC_length.
3642 (regcache_raw_read_unsigned): Likewise.
3643 * tdesc.c (init_target_desc): Iterate reg_defs via
3645 (default_description): Update initializer.
3646 (copy_target_description): Don't update field num_registers.
3647 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3648 <num_registers>: Remove.
3650 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3652 * Makefile.in (.SECONDARY): Define target.
3654 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3656 * linux-low.c (linux_wait_1): Adjust.
3657 * server.c (queue_stop_reply_callback): Adjust.
3659 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3661 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3662 QEnvironmentUnset and QEnvironmentReset packets.
3663 (handle_query): Inform remote that QEnvironmentHexEncoded,
3664 QEnvironmentUnset and QEnvironmentReset are supported.
3666 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3668 * inferiors.h (inferior_target_data): Rename to ...
3669 (thread_target_data): ... this.
3670 (inferior_regcache_data): Rename to ...
3671 (thread_regcache_data): ... this.
3672 (set_inferior_regcache_data): Rename to ...
3673 (set_thread_regcache_data): ... this.
3674 * inferiors.c (inferior_target_data): Rename to ...
3675 (thread_target_data): ... this.
3676 (inferior_regcache_data): Rename to ...
3677 (thread_regcache_data): ... this.
3678 (set_inferior_regcache_data): Rename to ...
3679 (set_thread_regcache_data): ... this.
3680 (free_one_thread): Update.
3681 * linux-low.h (get_thread_lwp): Update.
3682 * regcache.c (get_thread_regcache): Update.
3683 (regcache_invalidate_thread): Update.
3684 (free_register_cache_thread): Update.
3685 * win32-i386-low.c (update_debug_registers_callback): Update.
3686 (win32_get_current_dr): Update.
3687 * win32-low.c (thread_rec): Update.
3688 (delete_thread_info): Update.
3689 (continue_one_thread): Update.
3690 (suspend_one_thread): Update.
3692 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3694 * inferiors.c (set_inferior_target_data): Remove.
3695 * inferiors.h (set_inferior_target_data): Remove.
3697 2017-08-18 Yao Qi <yao.qi@linaro.org>
3699 * Makefile.in (OBS): Add selftest.o.
3700 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3701 * configure, config.in: Re-generated.
3702 * server.c: Include common/sefltest.h.
3703 (captured_main): Handle option --selftest.
3705 2017-08-09 Yao Qi <yao.qi@linaro.org>
3707 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3708 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3709 i386-avx-mpx.o and i386-mmx.o.
3710 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3711 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3712 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3713 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3714 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3715 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3716 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3717 i386/amd64-avx-mpx.xml.
3719 2017-08-09 Yao Qi <yao.qi@linaro.org>
3721 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3722 and x32-avx-avx512.o.
3723 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3724 i386/x32-avx-avx512.xml.
3726 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3728 * tracepoint.h (enum class fast_tpoint_collect_result): New
3730 (fast_tracepoint_collecting): Change return type to
3731 fast_tpoint_collect_result.
3732 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3733 * linux-low.h: Include tracepoint.h.
3734 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3735 fast_tpoint_collect_result.
3736 * linux-low.c (handle_tracepoints): Adjust.
3737 (linux_fast_tracepoint_collecting): Change return type to
3738 fast_tpoint_collect_result.
3739 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3740 linux_wait_1, stuck_in_jump_pad_callback,
3741 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3742 proceed_one_lwp): Adjust to type change.
3744 2017-07-10 Yao Qi <yao.qi@linaro.org>
3746 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3748 2017-06-29 Yao Qi <yao.qi@linaro.org>
3750 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3752 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3754 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3756 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3758 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3760 * linux-low.c (linux_create_inferior): Adjust code to access the
3761 environment information via 'gdb_environ' class.
3762 * lynx-low.c (lynx_create_inferior): Likewise.
3763 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3764 (get_environ): Return a pointer to 'our_environ'.
3765 (captured_main): Initialize 'our_environ'.
3766 * server.h (get_environ): Adjust prototype.
3767 * spu-low.c (spu_create_inferior): Adjust code to access the
3768 environment information via 'gdb_environ' class.
3770 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3772 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3773 usage of "register" keyword.
3775 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3777 * configure: Re-generate.
3779 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3781 * configure: Re-generate.
3783 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3785 * Makefile.in (COMPILE.pre): Add "-x c++".
3787 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3789 * fork-child.c: Conditionally include <signal.h>.
3791 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3793 * server.c (handle_general_set): Handle new packet
3794 "QStartupWithShell".
3795 (handle_query): Add "QStartupWithShell" to the list of supported
3797 (gdbserver_usage): Add help text explaining the
3798 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3800 (captured_main): Recognize and act upon the presence of the new
3803 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3804 Pedro Alves <palves@redhat.com>
3806 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3807 * configure: Regenerate.
3808 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3810 (i[34567]86-*-lynxos*): Likewise.
3811 (spu*-*-*): Likewise.
3812 * fork-child.c: New file.
3813 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3815 (linux_ptrace_fun): New function.
3816 (linux_create_inferior): Adjust function prototype to reflect
3817 change on "target.h". Adjust function code to use
3819 (linux_request_interrupt): Delete "signal_pid".
3820 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3821 (lynx_ptrace_fun): New function.
3822 (lynx_create_inferior): Adjust function prototype to reflect
3823 change on "target.h". Adjust function code to use
3825 * nto-low.c (nto_create_inferior): Adjust function prototype and
3826 code to reflect change on "target.h". Update comments.
3827 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3828 "common-terminal.h" and "environ.h".
3829 (terminal_fd): Moved to fork-child.c.
3830 (old_foreground_pgrp): Likewise.
3831 (restore_old_foreground_pgrp): Likewise.
3832 (last_status): Make it global.
3833 (last_ptid): Likewise.
3834 (our_environ): New variable.
3835 (startup_with_shell): Likewise.
3836 (program_name): Likewise.
3837 (program_argv): Rename to...
3838 (program_args): ...this.
3839 (wrapper_argv): New variable.
3840 (start_inferior): Delete function.
3841 (get_exec_wrapper): New function.
3842 (get_exec_file): Likewise.
3843 (get_environ): Likewise.
3844 (prefork_hook): Likewise.
3845 (post_fork_inferior): Likewise.
3846 (postfork_hook): Likewise.
3847 (postfork_child_hook): Likewise.
3848 (handle_v_run): Update code to deal with arguments coming from the
3849 remote host. Update calls from "start_inferior" to
3851 (captured_main): Likewise. Initialize environment variable. Call
3853 * server.h (post_fork_inferior): New prototype.
3854 (get_environ): Likewise.
3855 (last_status): Declare.
3856 (last_ptid): Likewise.
3857 (signal_pid): Likewise.
3858 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3859 (spu_ptrace_fun): New function.
3860 (spu_create_inferior): Adjust function prototype to reflect change
3861 on "target.h". Adjust function code to use "fork_inferior".
3862 * target.c (target_terminal_init): New function.
3863 (target_terminal_inferior): Likewise.
3864 (target_terminal_ours): Likewise.
3865 * target.h: Include <vector>.
3866 (struct target_ops) <create_inferior>: Update prototype.
3867 (create_inferior): Update macro.
3868 * utils.c (gdb_flush_out_err): New function.
3869 * win32-low.c (win32_create_inferior): Adjust function prototype
3870 and code to reflect change on "target.h".
3872 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3874 * inferiors.c (switch_to_thread): New function.
3876 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3878 * Makefile.in (SFILE): Add "common/job-control.c".
3879 (OBS): Add "job-control.o".
3881 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3883 * Makefile: Remove "@host_makefile_frag@".
3885 2017-05-05 Pedro Alves <palves@redhat.com>
3887 * configure: Regenerate.
3889 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3891 * configure: Regenerate.
3893 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3895 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3896 software_single_step change of return type to
3897 std::vector<CORE_ADDR>.
3898 * linux-low.c (install_software_single_step_breakpoints):
3900 * linux-low.h (install_software_single_step_breakpoints):
3903 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3905 * remote-utils.c: Include "gdb_termios.h" instead of
3907 * terminal.h: Delete file.
3909 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3911 * server.c: Include <vector>.
3912 <program_argv, wrapper_argv>: Convert to std::vector.
3913 (start_inferior): Rewrite function to use C++.
3914 (handle_v_run): Likewise. Update code that calculates the argv
3915 based on the vRun packet; use C++.
3916 (captured_main): Likewise.
3918 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3920 * server.c (handle_v_cont): Initialize thread_resume::thread
3923 2017-04-05 Pedro Alves <palves@redhat.com>
3925 * configure: Regenerate.
3927 2017-04-05 Pedro Alves <palves@redhat.com>
3929 * gdbreplay.c (sync_error): Constify.
3930 * linux-x86-low.c (push_opcode): Constify.
3932 2017-04-05 Pedro Alves <palves@redhat.com>
3934 * win32-low.c (get_child_debug_event)
3935 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3936 Report TARGET_WAITKIND_SPURIOUS instead.
3938 2017-04-05 Pedro Alves <palves@redhat.com>
3940 * remote-utils.c (remote_prepare, remote_open): Constify.
3941 * remote-utils.h (remote_prepare, remote_open): Constify.
3942 * server.c (captured_main): Constify 'port' handling.
3944 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3946 * Makefile.in (clean): Clear .deps.
3948 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3950 * .gitignore: Remove generated files, replace with wildcard.
3951 * (clean): Replace removal of generated files with wildcard.
3952 (version.c): Replace with...
3953 (version-generated.c): ...this.
3954 (xml-builtin.c): Replace with...
3955 (xml-builtin-generated.c): ...this.
3956 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3957 (%.c: *regformats*): Replace with...
3958 (%-generated.c: *regformats*): ...this.
3960 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3962 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3963 (xtensa_fill_gregset): Call collect_register_by_name for
3965 (xtensa_store_gregset): Call supply_register_by_name for
3968 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3970 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3971 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3972 (xtensa_store_gregset): Call supply_register for all registers in
3973 a0_regnum..a0_regnum + C0_NREGS range.
3975 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3977 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3978 (ax-ipa.o: ax.c): Remove.
3979 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3980 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3981 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3982 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3983 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3985 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3987 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3988 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3989 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3990 (errors-ipa.o: ../common/errors.c): Remove.
3991 (format-ipa.o: ../common/format.c): Remove.
3992 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3994 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3996 * Makefile.in (%-ipa.o: %.c): New rule.
3997 (tracepoint-ipa.o: tracepoint.c): Remove.
3998 (utils-ipa.o: utils.c): Remove.
3999 (remote-utils-ipa.o: remote-utils.c): Remove.
4000 (regcache-ipa.o: regcache.c): Remove.
4001 (i386-linux-ipa.o: i386-linux.c): Remove.
4002 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4003 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4004 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4005 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4006 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4007 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4008 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4009 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4010 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4011 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4012 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4013 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4014 (aarch64-ipa.o: aarch64.c): Remove.
4015 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4016 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4017 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4018 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4019 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4020 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4021 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4022 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4023 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4024 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4025 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4026 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4027 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4028 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4029 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4030 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4031 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4032 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4033 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4034 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4035 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4036 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4037 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4038 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4039 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4040 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4041 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4042 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4043 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4044 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4045 (tdesc-ipa.o: tdesc.c): Remove.
4046 (x32-linux-ipa.o: x32-linux.c): Remove.
4047 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4048 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4050 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4052 * Makefile.in (%.o: ../arch/%.c): New rule.
4053 (arm.o: ../arch/arm.c): Remove.
4054 (arm-linux.o: ../arch/arm-linux.c): Remove.
4055 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4056 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4058 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4060 * Makefile.in (%.o: ../nat/%.c): New rule.
4061 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4062 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4063 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4064 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4065 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4066 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4067 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4068 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4069 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4070 (linux-personality.o: ../nat/linux-personality.c): Remove.
4071 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4072 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4073 (x86-linux.o: ../nat/x86-linux.c): Remove.
4074 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4075 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4077 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4079 * Makefile.in (%.o: ../common/%.c): New rule.
4080 (signals.o: ../common/signals.c): Remove.
4081 (print-utils.o: ../common/print-utils.c): Remove.
4082 (rsp-low.o: ../common/rsp-low.c): Remove.
4083 (common-utils.o: ../common/common-utils.c): Remove.
4084 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4085 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4086 (vec.o: ../common/vec.c): Remove.
4087 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4088 (xml-utils.o: ../common/xml-utils.c): Remove.
4089 (ptid.o: ../common/ptid.c): Remove.
4090 (buffer.o: ../common/buffer.c): Remove.
4091 (format.o: ../common/format.c): Remove.
4092 (filestuff.o: ../common/filestuff.c): Remove.
4093 (agent.o: ../common/agent.c): Remove.
4094 (errors.o: ../common/errors.c): Remove.
4095 (environ.o: ../common/environ.c): Remove.
4096 (common-debug.o: ../common/common-debug.c): Remove.
4097 (cleanups.o: ../common/cleanups.c): Remove.
4098 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4099 (fileio.o: ../common/fileio.c): Remove.
4100 (common-regcache.o: ../common/common-regcache.c): Remove.
4101 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4102 (new-op.o: ../common/new-op.c): Remove.
4103 (btrace-common.o: ../common/btrace-common.c): Remove.
4105 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4107 * Makefile.in (%.o: ../target/%.c): New rule.
4108 (waitstatus.o: ../target/waitstatus.c): Remove.
4110 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4113 (%.c: ../regformats/%.dat,
4114 (%.c: ../regformats/arm/%.dat,
4115 (%.c: ../regformats/i386/%.dat,
4116 (%.c: ../regformats/rs6000/%.dat): New rules.
4117 (aarch64.c): Remove.
4118 (reg-arm.c): Remove.
4119 (arm-with-iwmmxt.c): Remove.
4120 (arm-with-vfpv2.c): Remove.
4121 (arm-with-vfpv3.c): Remove.
4122 (arm-with-neon.c): Remove.
4123 (reg-bfin.c): Remove.
4124 (reg-cris.c): Remove.
4125 (reg-crisv32.c): Remove.
4127 (i386-linux.c): Remove.
4128 (i386-avx.c): Remove.
4129 (i386-avx-linux.c): Remove.
4130 (i386-avx-avx512.c): Remove.
4131 (i386-avx-avx512-linux.c): Remove.
4132 (i386-mpx.c): Remove.
4133 (i386-mpx-linux.c): Remove.
4134 (i386-avx-mpx-avx512-pku.c): Remove.
4135 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4136 (i386-avx-mpx.c): Remove.
4137 (i386-avx-mpx-linux.c): Remove.
4138 (i386-mmx.c): Remove.
4139 (i386-mmx-linux.c): Remove.
4140 (reg-ia64.c): Remove.
4141 (reg-m32r.c): Remove.
4142 (reg-m68k.c): Remove.
4144 (mips-linux.c): Remove.
4145 (mips-dsp-linux.c): Remove.
4146 (mips64-linux.c): Remove.
4147 (mips64-dsp-linux.c): Remove.
4148 (nios2-linux.c): Remove.
4149 (powerpc-32.c): Remove.
4150 (powerpc-32l.c): Remove.
4151 (powerpc-altivec32l.c): Remove.
4152 (powerpc-cell32l.c): Remove.
4153 (powerpc-vsx32l.c): Remove.
4154 (powerpc-isa205-32l.c): Remove.
4155 (powerpc-isa205-altivec32l.c): Remove.
4156 (powerpc-isa205-vsx32l.c): Remove.
4157 (powerpc-e500l.c): Remove.
4158 (powerpc-64l.c): Remove.
4159 (powerpc-altivec64l.c): Remove.
4160 (powerpc-cell64l.c): Remove.
4161 (powerpc-vsx64l.c): Remove.
4162 (powerpc-isa205-64l.c): Remove.
4163 (powerpc-isa205-altivec64l.c): Remove.
4164 (powerpc-isa205-vsx64l.c): Remove.
4165 (s390-linux32.c): Remove.
4166 (s390-linux32v1.c): Remove.
4167 (s390-linux32v2.c): Remove.
4168 (s390-linux64.c): Remove.
4169 (s390-linux64v1.c): Remove.
4170 (s390-linux64v2.c): Remove.
4171 (s390-te-linux64.c): Remove.
4172 (s390-vx-linux64.c): Remove.
4173 (s390-tevx-linux64.c): Remove.
4174 (s390x-linux64.c): Remove.
4175 (s390x-linux64v1.c): Remove.
4176 (s390x-linux64v2.c): Remove.
4177 (s390x-te-linux64.c): Remove.
4178 (s390x-vx-linux64.c): Remove.
4179 (s390x-tevx-linux64.c): Remove.
4180 (tic6x-c64xp-linux.c): Remove.
4181 (tic6x-c64x-linux.c): Remove.
4182 (tic6x-c62x-linux.c): Remove.
4184 (reg-sparc64.c): Remove.
4185 (reg-spu.c): Remove.
4187 (amd64-linux.c): Remove.
4188 (amd64-avx.c): Remove.
4189 (amd64-avx-linux.c): Remove.
4190 (amd64-avx-avx512.c): Remove.
4191 (amd64-avx-avx512-linux.c): Remove.
4192 (amd64-mpx.c): Remove.
4193 (amd64-mpx-linux.c): Remove.
4194 (amd64-avx-mpx-avx512-pku.c): Remove.
4195 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4196 (amd64-avx-mpx.c): Remove.
4197 (amd64-avx-mpx-linux.c): Remove.
4199 (x32-linux.c): Remove.
4200 (x32-avx.c): Remove.
4201 (x32-avx-linux.c): Remove.
4202 (x32-avx-avx512.c): Remove.
4203 (x32-avx-avx512-linux.c): Remove.
4204 (reg-xtensa.c): Remove.
4205 (reg-tilegx.c): Remove.
4206 (reg-tilegx32.c): Remove.
4208 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4210 * Makefile.in (SFILES): Add "common/environ.c".
4211 (OBJS): Add "common/environ.h".
4213 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4215 * configure.ac: Check if the fs_base and gs_base members of
4216 `struct user_regs_struct' exist.
4217 * config.in: Regenerated.
4218 * configure: Likewise.
4220 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4222 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4224 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4225 (get_next_pcs_syscall_next_pc): Likewise.
4227 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4229 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4230 * nto-x86-low.c: Likewise.
4232 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4234 * Makefile.in: Include disable-implicit-rules.mk.
4236 2016-11-23 Pedro Alves <palves@redhat.com>
4238 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4239 (debug_vprintf): Use std::chrono::steady_clock instead of
4240 gettimeofday. Use '.' instead of ':'.
4241 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4242 (get_timestamp): Use std::chrono::steady_clock instead of
4245 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4247 * Makefile.in: Fix whitespace formatting.
4249 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4251 * Makefile.in (SFILES, OBS): Flatten list and order
4254 2016-11-23 Pedro Alves <palves@redhat.com>
4256 * event-loop.c (handle_file_event): Use warning.
4257 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4258 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4261 2016-11-23 Pedro Alves <palves@redhat.com>
4263 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4265 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4266 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4267 debug_printf and debug_flush for debug output.
4268 * server.c (handle_general_set): Likewise.
4269 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4272 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4274 * Makefile.in (.c.o): Replace rule with ...
4275 (%.o: %.c): ... this one.
4277 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4279 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4280 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4282 * configure.ac: Remove checks for the make program.
4283 * configure: Re-generate.
4285 2016-10-28 Pedro Alves <palves@redhat.com>
4287 * Makefile.in (CXX_DIALECT): Get from configure.
4288 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4289 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4290 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4291 * config.in: Regenerate.
4292 * configure: Regenerate.
4294 2016-10-27 Yao Qi <yao.qi@linaro.org>
4296 * linux-low.c (linux_supports_range_stepping): Return true if
4297 can_software_single_step return true.
4299 2016-10-27 Yao Qi <yao.qi@linaro.org>
4301 * inferiors.c (find_inferior_in_random): New function.
4302 * inferiors.h (find_inferior_in_random): Declare.
4303 * linux-low.c (linux_wait_for_event_filtered): Call
4304 find_inferior_in_random instead of find_inferior.
4306 2016-10-27 Yao Qi <yao.qi@linaro.org>
4308 * linux-low.c (linux_wait_1): If single-step breakpoints are
4309 inserted, remove them.
4311 2016-10-26 Pedro Alves <palves@redhat.com>
4313 * linux-low.c (handle_extended_wait): Link parent/child fork
4315 (linux_wait_1): Unlink them.
4316 (linux_set_resume_request): Ignore resume requests for
4317 already-resumed and unhandled fork child threads.
4318 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4319 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4321 (handle_v_requests) <vCont>: Don't call require_running.
4322 * server.h (in_queued_stop_replies): New declaration.
4324 2016-10-24 Yao Qi <yao.qi@linaro.org>
4327 * linux-aarch64-low.c (append_insns): Cast the return value to
4330 2016-10-10 Yao Qi <yao.qi@linaro.org>
4332 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4334 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4336 * target.c (target_supports_multi_process): New function, moved
4338 * target.h (target_supports_multi_process): ... here. Remove
4341 2016-10-05 Tom Tromey <tom@tromey.com>
4344 * tracepoint.c (handle_tracepoint_bkpts): Check
4345 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4347 2016-10-05 Yao Qi <yao.qi@linaro.org>
4349 * configure.srv: Update the path of arm-*.xml files.
4351 2016-10-05 Terry Guo <terry.guo@arm.com>
4352 Yao Qi <yao.qi@linaro.org>
4354 * Makefile.in: Adjust the path of rules.
4355 * configure.srv: Update the path of xml files.
4356 * regformats/arm-with-iwmmxt.dat: Regenerated.
4357 * regformats/arm-with-neon.dat: Likewise.
4358 * regformats/arm-with-vfpv2.dat: Likewise.
4359 * regformats/arm-with-vfpv3.dat Likewise.
4361 2016-09-30 Yao Qi <yao.qi@linaro.org>
4364 * target.c (target_stop_and_wait): Don't call
4365 target_continue_no_signal, use resume_stop instead.
4367 2016-09-26 Yao Qi <yao.qi@linaro.org>
4369 * linux-low.c (linux_wait_1): Call debug_exit.
4371 2016-09-23 Pedro Alves <palves@redhat.com>
4373 * Makefile.in (SFILES): Add common/new-op.c.
4374 (OBS): Add common/new-op.o.
4375 (new-op.o): New rule.
4377 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4379 * .gitinore: Ignore more files.
4381 2016-09-21 Yao Qi <yao.qi@linaro.org>
4383 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4386 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4388 * server.c (start_inferior): Call target_mourn_inferior instead of
4389 mourn_inferior; pass ptid_t argument to it.
4391 (handle_target_event): Likewise.
4392 * target.c (target_mourn_inferior): New function.
4393 * target.h (mourn_inferior): Delete macro.
4395 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4397 * linux-low.c (lwp_is_stepping): New function.
4399 2016-09-06 Carl Love <cel@us.ibm.com>
4401 * server.c (start_inferior): Fixed comment, requested comment change
4402 didn't get updated correctly. Removed reference to ptrace () call as
4403 it is only true on Linux systems.
4405 2016-09-06 Carl Love <cel@us.ibm.com>
4407 * server.c (start_inferior): Do not call
4408 function target_post_create_inferior () if the
4409 inferior process has already exited.
4411 2016-09-05 Pedro Alves <palves@redhat.com>
4413 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4414 (COMPILE.pre, CC_LD): Use CXX directly.
4415 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4416 * acinclude.m4: Don't include build-with-cxx.m4.
4417 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4418 * configure: Regenerate.
4420 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4423 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4424 call writing data to own_buf.
4426 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4428 * target.c (mywait): Call target_wait instead of
4430 (target_wait): New function.
4432 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4434 * server.c (start_inferior): New variable 'ptid'. Replace calls
4435 to the_target->resume by target_continue{,_no_signal}, depending
4437 * target.c (target_stop_and_wait): Call target_continue_no_signal
4438 instead of the_target->resume.
4439 (target_continue): New function.
4441 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4443 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4445 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4448 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4450 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4451 * linux-arm-low.c (ps_get_thread_area): Likewise.
4452 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4453 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4454 * linux-mips-low.c (ps_get_thread_area): Likewise.
4455 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4456 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4457 * linux-x86-low.c (ps_get_thread_area): Likewise.
4458 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4460 2016-08-19 Pedro Alves <palves@redhat.com>
4462 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4464 2016-08-19 Pedro Alves <palves@redhat.com>
4466 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4467 comment. Use memcpy instead of casting through unsigned long.
4469 2016-08-19 Pedro Alves <palves@redhat.com>
4471 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4472 allocating around 0x80000000.
4474 2016-08-19 Pedro Alves <palves@redhat.com>
4477 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4478 (x32-avx512-linux-ipa.o): New rules.
4479 * configure.ac (x86_64-*-linux*): New x32 check.
4480 * configure.srv (ipa_x32_linux_regobj): New.
4481 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4482 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4484 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4486 * configure: Regenerate.
4488 2016-08-09 Pedro Alves <palves@redhat.com>
4491 * Makefile.in (OBS): Add signals-state-save-restore.o.
4492 (signals-state-save-restore.o): New rule.
4493 * config.in: Regenerate.
4494 * configure: Regenerate.
4495 * linux-low.c: Include "signals-state-save-restore.h".
4496 (linux_create_inferior): Call
4497 restore_original_signals_state.
4498 * server.c: Include "dispositions-save-restore.h".
4499 (captured_main): Call save_original_signals_state.
4501 2016-08-05 Pedro Alves <palves@redhat.com>
4503 * configure: Regenerate.
4505 2016-08-04 Yao Qi <yao.qi@linaro.org>
4507 * linux-low.c (regsets_fetch_inferior_registers): Check
4508 errno is ESRCH or not.
4510 2016-08-02 Yao Qi <yao.qi@linaro.org>
4512 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4513 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4514 (thread_db_load_search): Update.
4515 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4516 td_ta_set_event and td_ta_event_getmsg.
4518 2016-07-26 Pedro Alves <palves@redhat.com>
4521 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4522 of unsigned long for 64-bit registers and use uint32_t instead of
4523 unsigned int for 32-bit registers.
4525 2016-07-26 Pedro Alves <palves@redhat.com>
4527 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4530 2016-07-21 Tom Tromey <tom@tromey.com>
4532 * configure: Rebuild.
4534 2016-07-21 Yao Qi <yao.qi@linaro.org>
4536 * mem-break.c (find_gdb_breakpoint): Cast bp to
4537 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4539 2016-07-21 Yao Qi <yao.qi@linaro.org>
4541 * server.c (handle_v_requests): Support s and S actions
4542 if target_supports_software_single_step return true.
4544 2016-07-21 Yao Qi <yao.qi@linaro.org>
4546 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4547 is resume_step, call maybe_hw_step.
4548 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4550 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4552 (proceed_one_lwp): If resume request is resume_step, install
4553 reinsert breakpoints and call maybe_hw_step.
4555 2016-07-21 Yao Qi <yao.qi@linaro.org>
4557 * linux-low.c (proceed_one_lwp): Declare.
4558 (linux_resume_one_thread): Remove local variable 'step'.
4559 Lift code enqueue signal. Call proceed_one_lwp instead of
4560 linux_resume_one_lwp.
4562 2016-07-21 Yao Qi <yao.qi@linaro.org>
4564 * linux-low.c (linux_resume_one_thread): Call
4565 enqueue_pending_signal.
4567 2016-07-21 Yao Qi <yao.qi@linaro.org>
4569 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4570 * inferiors.c (do_restore_current_thread_cleanup): New function.
4571 (make_cleanup_restore_current_thread): Likewise.
4572 * linux-low.c (install_software_single_step_breakpoints): Call
4573 make_cleanup_restore_current_thread. Switch current_thread to
4576 2016-07-21 Yao Qi <yao.qi@linaro.org>
4578 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4579 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4580 (clone_one_breakpoint): Likewise.
4581 (delete_reinsert_breakpoints): Change parameter to thread.
4583 (has_reinsert_breakpoints): Likewise.
4584 (uninsert_reinsert_breakpoints): Likewise.
4585 (reinsert_reinsert_breakpoints): Likewise.
4586 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4587 (delete_reinsert_breakpoints): Likewise.
4588 (reinsert_reinsert_breakpoints): Likewise.
4589 (uninsert_reinsert_breakpoints): Likewise.
4590 (has_reinsert_breakpoints): Likewise.
4592 2016-07-21 Yao Qi <yao.qi@linaro.org>
4594 * inferiors.c (get_thread_process): Make parameter const.
4595 * inferiors.h (get_thread_process): Update declaration.
4596 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4597 Add new parameters child_thread and parent_thread. Callers
4599 * mem-break.h (clone_all_breakpoints): Update declaration.
4601 2016-07-21 Yao Qi <yao.qi@linaro.org>
4603 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4604 <command_list, handler>: Remove.
4605 (struct gdb_breakpoint): New.
4606 (struct other_breakpoint): New.
4607 (struct reinsert_breakpoint): New.
4608 (is_gdb_breakpoint): New function.
4609 (any_persistent_commands): Update command_list if
4610 is_gdb_breakpoint returns true.
4611 (set_breakpoint): Create breakpoints according to their types.
4612 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4613 (set_gdb_breakpoint_1): Likewise.
4614 (set_gdb_breakpoint): Likewise.
4615 (clear_breakpoint_conditions): Change parameter type to
4616 'struct gdb_breakpoint *'.
4617 (clear_breakpoint_commands): Likewise.
4618 (clear_breakpoint_conditions_and_commands): Likewise.
4619 (add_condition_to_breakpoint): Likewise.
4620 (add_breakpoint_condition): Likewise.
4621 (add_commands_to_breakpoint): Likewise.
4622 (check_breakpoints): Check other_breakpoint.
4623 (clone_one_breakpoint): Clone breakpopint according to its type.
4624 * mem-break.h (struct gdb_breakpoint): Declare.
4625 (set_gdb_breakpoint): Update declaration.
4626 (clear_breakpoint_conditions_and_commands): Likewise.
4627 (add_breakpoint_condition): Likewise.
4628 (add_breakpoint_commands): Likewise.
4629 * server.c (process_point_options): Change parameter type to
4630 'struct gdb_breakpoint *'.
4632 2016-07-21 Yao Qi <yao.qi@linaro.org>
4634 * mem-break.c (set_breakpoint_at): Rename it to ...
4635 (set_breakpoint_type_at): ... it.
4636 (set_breakpoint_at): Call set_breakpoint_type_at.
4637 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4638 * mem-break.h (set_breakpoint_at): Update comments.
4640 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4642 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4644 (nios2_store_gregset): Likewise.
4646 2016-07-01 Pedro Alves <palves@redhat.com>
4647 Antoine Tremblay <antoine.tremblay@ericsson.com>
4649 * linux-low.c: Change interface to take the target lwp_info
4650 pointer directly and return void. Handle detaching from a zombie
4652 (linux_detach_lwp_callback): New function.
4653 (linux_detach): Detach from the leader thread after detaching from
4656 2016-06-28 Yao Qi <yao.qi@linaro.org>
4658 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4659 for variable new_offset.
4660 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4661 (aarch64_ftrace_insn_reloc_cb): Likewise.
4662 (aarch64_ftrace_insn_reloc_tb): Likewise.
4663 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4664 PRIx64 instead of PRIx32.
4666 2016-06-28 Yao Qi <yao.qi@linaro.org>
4668 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4669 (the_low_target): Install arm_get_syscall_trapinfo.
4671 2016-06-28 Yao Qi <yao.qi@linaro.org>
4673 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4675 (the_low_target): Install aarch64_get_syscall_trapinfo.
4677 2016-06-28 Yao Qi <yao.qi@linaro.org>
4679 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4681 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4682 Remove parameter sysno.
4683 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4686 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4688 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4689 (s390_emit_ne_goto): Likewise.
4690 (s390_emit_lt_goto): Likewise.
4691 (s390_emit_le_goto): Likewise.
4692 (s390_emit_gt_goto): Likewise.
4693 (s390_emit_ge_goto): Likewise.
4694 (s390x_emit_eq_goto): Likewise.
4695 (s390x_emit_ne_goto): Likewise.
4696 (s390x_emit_lt_goto): Likewise.
4697 (s390x_emit_le_goto): Likewise.
4698 (s390x_emit_gt_goto): Likewise.
4699 (s390x_emit_ge_goto): Likewise.
4700 (s390_emit_ops_impl): Mark variable static.
4701 (s390x_emit_ops): Likewise.
4703 2016-06-17 Yao Qi <yao.qi@linaro.org>
4705 * linux-low.c (handle_extended_wait): Call
4706 uninsert_reinsert_breakpoints for the parent process. Remove
4707 reinsert breakpoints from the child process. Reinsert them to
4708 the parent process when vfork is done.
4709 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4710 (reinsert_reinsert_breakpoints): New function.
4711 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4712 (reinsert_reinsert_breakpoints): Declare.
4714 2016-06-17 Yao Qi <yao.qi@linaro.org>
4716 * linux-low.c (handle_extended_wait): If the parent is doing
4717 step-over, remove the reinsert breakpoints from the forked child.
4719 2016-06-17 Yao Qi <yao.qi@linaro.org>
4721 * linux-low.c (unsuspend_all_lwps): Declare.
4722 (linux_low_filter_event): If thread exited, call finish_step_over.
4723 If step-over is finished, unsuspend other threads.
4725 2016-06-17 Yao Qi <yao.qi@linaro.org>
4727 * linux-low.c (linux_resume_one_lwp_throw): Assert
4728 has_reinsert_breakpoints returns false.
4729 * mem-break.c (delete_disabled_breakpoints): Assert
4730 bp type isn't reinsert_breakpoint.
4732 2016-06-17 Yao Qi <yao.qi@linaro.org>
4734 * linux-low.c (maybe_hw_step): New function.
4735 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4736 (finish_step_over): Switch current_thread to lwp temporarily,
4737 and assert has_reinsert_breakpoints returns true.
4738 (proceed_one_lwp): Call maybe_hw_step.
4739 * mem-break.c (has_reinsert_breakpoints): New function.
4740 * mem-break.h (has_reinsert_breakpoints): Declare.
4742 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4744 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4746 2016-05-17 Yao Qi <yao.qi@linaro.org>
4748 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4749 instead of find_inferior.
4751 2016-05-05 Yao Qi <yao.qi@linaro.org>
4753 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4754 Initialize res to zero.
4756 2016-05-05 Yao Qi <yao.qi@linaro.org>
4758 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4761 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4763 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4764 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4765 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4767 2016-04-28 Par Olsson <par.olsson@windriver.com>
4768 Simon Marchi <simon.marchi@ericsson.com>
4770 * tracepoint.c (write_inferior_int8): New function.
4771 (cmd_qtenable_disable): Write enable flag using
4772 write_inferior_int8.
4774 2016-04-25 Yao Qi <yao.qi@linaro.org>
4776 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4777 (need_step_over_p): Return zero if the LWP has pending signals
4778 can be delivered on software single step target.
4780 2016-04-25 Yao Qi <yao.qi@linaro.org>
4782 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4783 return instead of error.
4785 2016-04-22 Yao Qi <yao.qi@linaro.org>
4787 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4790 2016-04-22 Yao Qi <yao.qi@linaro.org>
4792 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4793 signal when stepping over breakpoint with software single
4796 2016-04-21 Pedro Alves <palves@redhat.com>
4798 * linux-s390-low.c (s390_collect_ptrace_register)
4799 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4801 (s390_check_regset): Use void * instead of gdb_byte *.
4803 2016-04-20 Pedro Alves <palves@redhat.com>
4805 * configure: Renegerate.
4807 2016-04-20 Yao Qi <yao.qi@linaro.org>
4809 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4810 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4812 (arm_store_gregset): Likewise.
4814 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4816 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4817 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4818 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4819 (amd64-avx-mpx-linux.c): New rules.
4820 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4821 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4822 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4823 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4824 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4825 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4826 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4827 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4828 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4829 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4830 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4831 * linux-x86-low.c (x86_linux_read_description): Add case for
4832 X86_XSTATE_AVX_MPX_MASK.
4833 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4834 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4835 init_registers_i386_avx_mpx_linux.
4836 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4837 (initialize_low_tracepoint): Call
4838 init_registers_i386_avx_mpx_linux.
4839 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4840 (initialize_low_tracepoint): Call
4841 init_registers_amd64_avx_mpx_linux.
4842 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4843 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4844 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4847 2016-04-18 Pedro Alves <palves@redhat.com>
4849 * configure: Regenerate.
4851 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4853 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4854 (aarch64_emit_sub): Likewise.
4856 2016-04-12 Pedro Alves <palves@redhat.com>
4858 * utils.c (prepare_to_throw_exception): Delete.
4860 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4862 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4864 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4866 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4868 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4870 * linux-aarch64-ipa.c: Add <elf.h> include.
4871 * linux-ppc-ipa.c: Add <elf.h> include.
4872 * linux-s390-ipa.c: Add <elf.h> include.
4874 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4876 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4877 (get_raw_reg_ptr): Likewise.
4878 (get_trace_state_variable_value_ptr): Likewise.
4879 (set_trace_state_variable_value_ptr): Likewise.
4880 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4883 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4884 Marcin Kościelnicki <koriakin@0x04.net>
4887 * linux-ppc-low.c (emit_insns): New function.
4888 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4889 (ppc_emit_prologue): New function.
4890 (ppc_emit_epilogue): New function.
4891 (ppc_emit_add): New function.
4892 (ppc_emit_sub): New function.
4893 (ppc_emit_mul): New function.
4894 (ppc_emit_lsh): New function.
4895 (ppc_emit_rsh_signed): New function.
4896 (ppc_emit_rsh_unsigned): New function.
4897 (ppc_emit_ext): New function.
4898 (ppc_emit_zero_ext): New function.
4899 (ppc_emit_log_not): New function.
4900 (ppc_emit_bit_and): New function.
4901 (ppc_emit_bit_or): New function.
4902 (ppc_emit_bit_xor): New function.
4903 (ppc_emit_bit_not): New function.
4904 (ppc_emit_equal): New function.
4905 (ppc_emit_less_signed): New function.
4906 (ppc_emit_less_unsigned): New function.
4907 (ppc_emit_ref): New function.
4908 (ppc_emit_const): New function.
4909 (ppc_emit_reg): New function.
4910 (ppc_emit_pop): New function.
4911 (ppc_emit_stack_flush): New function.
4912 (ppc_emit_swap): New function.
4913 (ppc_emit_stack_adjust): New function.
4914 (ppc_emit_call): New function.
4915 (ppc_emit_int_call_1): New function.
4916 (ppc_emit_void_call_2): New function.
4917 (ppc_emit_if_goto): New function.
4918 (ppc_emit_goto): New function.
4919 (ppc_emit_eq_goto): New function.
4920 (ppc_emit_ne_goto): New function.
4921 (ppc_emit_lt_goto): New function.
4922 (ppc_emit_le_goto): New function.
4923 (ppc_emit_gt_goto): New function.
4924 (ppc_emit_ge_goto): New function.
4925 (ppc_write_goto_address): New function.
4926 (ppc_emit_ops_impl): New static variable.
4927 (ppc64v1_emit_prologue): New function.
4928 (ppc64v2_emit_prologue): New function.
4929 (ppc64_emit_epilogue): New function.
4930 (ppc64_emit_add): New function.
4931 (ppc64_emit_sub): New function.
4932 (ppc64_emit_mul): New function.
4933 (ppc64_emit_lsh): New function.
4934 (ppc64_emit_rsh_signed): New function.
4935 (ppc64_emit_rsh_unsigned): New function.
4936 (ppc64_emit_ext): New function.
4937 (ppc64_emit_zero_ext): New function.
4938 (ppc64_emit_log_not): New function.
4939 (ppc64_emit_bit_and): New function.
4940 (ppc64_emit_bit_or): New function.
4941 (ppc64_emit_bit_xor): New function.
4942 (ppc64_emit_bit_not): New function.
4943 (ppc64_emit_equal): New function.
4944 (ppc64_emit_less_signed): New function.
4945 (ppc64_emit_less_unsigned): New function.
4946 (ppc64_emit_ref): New function.
4947 (ppc64_emit_const): New function.
4948 (ppc64v1_emit_reg): New function.
4949 (ppc64v2_emit_reg): New function.
4950 (ppc64_emit_pop): New function.
4951 (ppc64_emit_stack_flush): New function.
4952 (ppc64_emit_swap): New function.
4953 (ppc64v1_emit_call): New function.
4954 (ppc64v2_emit_call): New function.
4955 (ppc64v1_emit_int_call_1): New function.
4956 (ppc64v2_emit_int_call_1): New function.
4957 (ppc64v1_emit_void_call_2): New function.
4958 (ppc64v2_emit_void_call_2): New function.
4959 (ppc64_emit_if_goto): New function.
4960 (ppc64_emit_eq_goto): New function.
4961 (ppc64_emit_ne_goto): New function.
4962 (ppc64_emit_lt_goto): New function.
4963 (ppc64_emit_le_goto): New function.
4964 (ppc64_emit_gt_goto): New function.
4965 (ppc64_emit_ge_goto): New function.
4966 (ppc64v1_emit_ops_impl): New static variable.
4967 (ppc64v2_emit_ops_impl): New static variable.
4968 (ppc_emit_ops): New function.
4969 (linux_low_target): Wire in ppc_emit_ops.
4971 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4972 Marcin Kościelnicki <koriakin@0x04.net>
4975 * Makefile.in: Add powerpc-*-ipa.o
4976 * configure.srv: Add ipa_obj for powerpc*-linux.
4977 * linux-ppc-ipa.c: New file.
4978 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4980 (PPC_FIELD): New macro.
4981 (PPC_SEXT): New macro.
4982 (PPC_OP6): New macro.
4983 (PPC_BO): New macro.
4984 (PPC_LI): New macro.
4985 (PPC_BD): New macro.
4986 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4987 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4988 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4989 (ppc_get_thread_area): New function.
4990 (is_elfv2_inferior): New function.
4991 (gen_ds_form): New function.
4992 (GEN_STD): New macro.
4993 (GEN_STDU): New macro.
4994 (GEN_LD): New macro.
4995 (GEN_LDU): New macro.
4996 (gen_d_form): New function.
4997 (GEN_ADDI): New macro.
4998 (GEN_ADDIS): New macro.
4999 (GEN_LI): New macro.
5000 (GEN_LIS): New macro.
5001 (GEN_ORI): New macro.
5002 (GEN_ORIS): New macro.
5003 (GEN_LWZ): New macro.
5004 (GEN_STW): New macro.
5005 (GEN_STWU): New macro.
5006 (gen_xfx_form): New function.
5007 (GEN_MFSPR): New macro.
5008 (GEN_MTSPR): New macro.
5009 (GEN_MFCR): New macro.
5010 (GEN_MTCR): New macro.
5011 (GEN_SYNC): New macro.
5012 (GEN_LWSYNC): New macro.
5013 (gen_x_form): New function.
5014 (GEN_OR): New macro.
5015 (GEN_MR): New macro.
5016 (GEN_LWARX): New macro.
5017 (GEN_STWCX): New macro.
5018 (GEN_CMPW): New macro.
5019 (gen_md_form): New function.
5020 (GEN_RLDICL): New macro.
5021 (GEN_RLDICR): New macro.
5022 (gen_i_form): New function.
5024 (GEN_BL): New macro.
5025 (gen_b_form): New function.
5026 (GEN_BNE): New macro.
5027 (GEN_LOAD): New macro.
5028 (GEN_STORE): New macro.
5029 (gen_limm): New function.
5030 (gen_atomic_xchg): New function.
5031 (gen_call): New function.
5032 (ppc_relocate_instruction): New function.
5033 (ppc_install_fast_tracepoint_jump_pad): New function.
5034 (ppc_get_min_fast_tracepoint_insn_len): New function.
5035 (ppc_get_ipa_tdesc_idx): New function.
5036 (the_low_target): Wire in the new functions.
5037 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5039 * linux-ppc-tdesc.h: New file.
5041 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5043 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5044 (alloc_jump_pad_buffer): New function.
5045 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5046 (alloc_jump_pad_buffer): New function.
5047 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5048 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5049 (alloc_jump_pad_buffer): New function.
5050 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5051 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5052 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5053 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5055 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5057 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5058 * linux-amd64-ipa.c: Likewise.
5059 * linux-i386-ipa.c: Likewise.
5060 * linux-s390-ipa.c: Likewise.
5061 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5062 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5063 set_trace_state_variable_value_ptr.
5064 (struct ipa_sym_addresses): Likewise.
5065 (symbol_list): Likewise.
5066 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5067 accessing gdb_collect directly.
5068 (gdb_collect_ptr_type): New typedef.
5069 (get_raw_reg_ptr_type): New typedef.
5070 (get_trace_state_variable_value_ptr_type): New typedef.
5071 (set_trace_state_variable_value_ptr_type): New typedef.
5072 (gdb_collect_ptr): New global.
5073 (get_raw_reg_ptr): New global.
5074 (get_trace_state_variable_value_ptr): New global.
5075 (set_trace_state_variable_value_ptr): New global.
5076 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5077 accessing get_raw_reg directly.
5078 (get_get_tsv_func_addr): Likewise for
5079 get_trace_state_variable_value_ptr.
5080 (get_set_tsv_func_addr): Likewise for
5081 set_trace_state_variable_value_ptr.
5082 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5084 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5086 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5088 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5090 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5092 (relocate_instruction): Remove own_buf.
5093 * server.c (own_buf): Make global.
5094 (handle_v_requests): Make global.
5095 * server.h (own_buf): New declaration.
5096 (handle_v_requests): New prototype.
5098 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5101 * linux-s390-low.c (add_insns): New function.
5102 (s390_emit_prologue): New function.
5103 (s390_emit_epilogue): New function.
5104 (s390_emit_add): New function.
5105 (s390_emit_sub): New function.
5106 (s390_emit_mul): New function.
5107 (s390_emit_lsh): New function.
5108 (s390_emit_rsh_signed): New function.
5109 (s390_emit_rsh_unsigned): New function.
5110 (s390_emit_ext): New function.
5111 (s390_emit_log_not): New function.
5112 (s390_emit_bit_and): New function.
5113 (s390_emit_bit_or): New function.
5114 (s390_emit_bit_xor): New function.
5115 (s390_emit_bit_not): New function.
5116 (s390_emit_equal): New function.
5117 (s390_emit_less_signed): New function.
5118 (s390_emit_less_unsigned): New function.
5119 (s390_emit_ref): New function.
5120 (s390_emit_if_goto): New function.
5121 (s390_emit_goto): New function.
5122 (s390_write_goto_address): New function.
5123 (s390_emit_litpool): New function.
5124 (s390_emit_const): New function.
5125 (s390_emit_call): New function.
5126 (s390_emit_reg): New function.
5127 (s390_emit_pop): New function.
5128 (s390_emit_stack_flush): New function.
5129 (s390_emit_zero_ext): New function.
5130 (s390_emit_swap): New function.
5131 (s390_emit_stack_adjust): New function.
5132 (s390_emit_set_r2): New function.
5133 (s390_emit_int_call_1): New function.
5134 (s390_emit_void_call_2): New function.
5135 (s390_emit_eq_goto): New function.
5136 (s390_emit_ne_goto): New function.
5137 (s390_emit_lt_goto): New function.
5138 (s390_emit_le_goto): New function.
5139 (s390_emit_gt_goto): New function.
5140 (s390_emit_ge_goto): New function.
5141 (s390x_emit_prologue): New function.
5142 (s390x_emit_epilogue): New function.
5143 (s390x_emit_add): New function.
5144 (s390x_emit_sub): New function.
5145 (s390x_emit_mul): New function.
5146 (s390x_emit_lsh): New function.
5147 (s390x_emit_rsh_signed): New function.
5148 (s390x_emit_rsh_unsigned): New function.
5149 (s390x_emit_ext): New function.
5150 (s390x_emit_log_not): New function.
5151 (s390x_emit_bit_and): New function.
5152 (s390x_emit_bit_or): New function.
5153 (s390x_emit_bit_xor): New function.
5154 (s390x_emit_bit_not): New function.
5155 (s390x_emit_equal): New function.
5156 (s390x_emit_less_signed): New function.
5157 (s390x_emit_less_unsigned): New function.
5158 (s390x_emit_ref): New function.
5159 (s390x_emit_if_goto): New function.
5160 (s390x_emit_const): New function.
5161 (s390x_emit_call): New function.
5162 (s390x_emit_reg): New function.
5163 (s390x_emit_pop): New function.
5164 (s390x_emit_stack_flush): New function.
5165 (s390x_emit_zero_ext): New function.
5166 (s390x_emit_swap): New function.
5167 (s390x_emit_stack_adjust): New function.
5168 (s390x_emit_int_call_1): New function.
5169 (s390x_emit_void_call_2): New function.
5170 (s390x_emit_eq_goto): New function.
5171 (s390x_emit_ne_goto): New function.
5172 (s390x_emit_lt_goto): New function.
5173 (s390x_emit_le_goto): New function.
5174 (s390x_emit_gt_goto): New function.
5175 (s390x_emit_ge_goto): New function.
5176 (s390_emit_ops): New function.
5177 (struct linux_target_ops): Fill in emit_ops hook.
5179 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5182 * Makefile.in: Add s390 IPA files.
5183 * configure.srv: Build IPA for s390.
5184 * linux-s390-ipa.c: New file.
5185 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5186 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5187 (tdesc_s390_linux32): Likewise.
5188 (init_registers_s390_linux32v1): Likewise.
5189 (tdesc_s390_linux32v1): Likewise.
5190 (init_registers_s390_linux32v2): Likewise.
5191 (tdesc_s390_linux32v2): Likewise.
5192 (init_registers_s390_linux64): Likewise.
5193 (tdesc_s390_linux64): Likewise.
5194 (init_registers_s390_linux64v1): Likewise.
5195 (tdesc_s390_linux64v1): Likewise.
5196 (init_registers_s390_linux64v2): Likewise.
5197 (tdesc_s390_linux64v2): Likewise.
5198 (init_registers_s390_te_linux64): Likewise.
5199 (tdesc_s390_te_linux64): Likewise.
5200 (init_registers_s390_vx_linux64): Likewise.
5201 (tdesc_s390_vx_linux64): Likewise.
5202 (init_registers_s390_tevx_linux64): Likewise.
5203 (tdesc_s390_tevx_linux64): Likewise.
5204 (init_registers_s390x_linux64): Likewise.
5205 (tdesc_s390x_linux64): Likewise.
5206 (init_registers_s390x_linux64v1): Likewise.
5207 (tdesc_s390x_linux64v1): Likewise.
5208 (init_registers_s390x_linux64v2): Likewise.
5209 (tdesc_s390x_linux64v2): Likewise.
5210 (init_registers_s390x_te_linux64): Likewise.
5211 (tdesc_s390x_te_linux64): Likewise.
5212 (init_registers_s390x_vx_linux64): Likewise.
5213 (tdesc_s390x_vx_linux64): Likewise.
5214 (init_registers_s390x_tevx_linux64): Likewise.
5215 (tdesc_s390x_tevx_linux64): Likewise.
5216 (have_hwcap_s390_vx): New static variable.
5217 (s390_arch_setup): Fill have_hwcap_s390_vx.
5218 (s390_get_thread_area): New function.
5219 (s390_ft_entry_gpr_esa): New const.
5220 (s390_ft_entry_gpr_zarch): New const.
5221 (s390_ft_entry_misc): New const.
5222 (s390_ft_entry_fr): New const.
5223 (s390_ft_entry_vr): New const.
5224 (s390_ft_main_31): New const.
5225 (s390_ft_main_64): New const.
5226 (s390_ft_exit_fr): New const.
5227 (s390_ft_exit_vr): New const.
5228 (s390_ft_exit_misc): New const.
5229 (s390_ft_exit_gpr_esa): New const.
5230 (s390_ft_exit_gpr_zarch): New const.
5231 (append_insns): New function.
5232 (s390_relocate_instruction): New function.
5233 (s390_install_fast_tracepoint_jump_pad): New function.
5234 (s390_get_min_fast_tracepoint_insn_len): New function.
5235 (s390_get_ipa_tdesc_idx): New function.
5236 (struct linux_target_ops): Wire in the above functions.
5237 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5238 * linux-s390-tdesc.h: New file.
5240 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5242 * linux-s390-low.c (s390_supports_tracepoints): New function.
5243 (struct linux_target_ops): Fill supports_tracepoints hook.
5245 2016-03-18 Yao Qi <yao.qi@linaro.org>
5247 * linux-low.c (lwp_signal_can_be_delivered): New function.
5248 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5250 2016-03-18 Yao Qi <yao.qi@linaro.org>
5252 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5253 0 if signal is enqueued. Remove 'signal' from one debugging
5254 message. Move one debugging message to some lines below.
5255 Remove code setting 'signal' to 0.
5257 2016-03-18 Yao Qi <yao.qi@linaro.org>
5259 * linux-low.c (linux_low_filter_event): Remove redundant
5260 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5262 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5264 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5265 (struct linux_target_ops): Wire in the above.
5267 2016-03-03 Yao Qi <yao.qi@linaro.org>
5269 * linux-low.c: Update comments to start_step_over.
5271 2016-03-03 Yao Qi <yao.qi@linaro.org>
5274 * linux-low.c (handle_extended_wait): Set child suspended
5275 if event_lwp->bp_reinsert isn't zero.
5277 2016-03-02 Yao Qi <yao.qi@linaro.org>
5279 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5280 enqueue_pending_signal.
5282 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5284 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5287 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5289 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5290 (s390_regmap_3264) [!__s390x__]: New global.
5291 (s390_collect_ptrace_register): Skip map entries containing -1.
5292 (s390_supply_ptrace_register): Ditto.
5293 (s390_fill_gprs_high): New function.
5294 (s390_store_gprs_high): New function.
5295 (s390_regsets): Add NT_S390_HIGH_GPRS.
5296 (s390_get_hwcap): Enable on 31-bit.
5297 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5298 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5299 Detect NT_S390_HIGH_GPRS.
5300 (s390_usrregs_info_3264): Enable on 31-bit.
5301 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5302 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5304 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5307 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5308 * configure.srv: Ditto.
5309 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5310 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5311 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5312 (init_registers_amd64_linux): Remove prototype.
5313 (tdesc_amd64_linux): Remove declaration.
5314 (get_ipa_tdesc): New function.
5315 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5316 initialize remaining tdescs.
5317 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5318 (init_registers_i386_linux): Remove prototype.
5319 (tdesc_i386_linux): Remove declaration.
5320 (get_ipa_tdesc): New function.
5321 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5322 initialize remaining tdescs.
5323 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5324 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5325 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5326 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5327 (x86_get_ipa_tdesc_idx): New function.
5328 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5329 * linux-x86-tdesc.h: New file.
5330 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5331 (target_get_ipa_tdesc_idx): New macro.
5332 * tracepoint.c (ipa_tdesc_idx): New macro.
5333 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5334 (symbol_list): Add ipa_tdesc_idx.
5335 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5336 (ipa_tdesc): Remove.
5337 (ipa_tdesc_idx): New variable.
5338 (get_context_regcache): Use get_ipa_tdesc.
5339 (gdb_collect): Ditto.
5341 * tracepoint.h (get_ipa_tdesc): New prototype.
5342 (ipa_tdesc): Remove.
5344 2016-02-24 Pedro Alves <palves@redhat.com>
5346 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5347 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5348 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5349 Factor out common code between the USE_SIGTRAP_SIGINFO and
5350 !USE_SIGTRAP_SIGINFO blocks.
5351 (linux_low_filter_event): Call save_stop_reason instead of
5352 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5354 (linux_wait_1): Update comments.
5356 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5358 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5359 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5360 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5361 ppc_insert_point, ppc_remove_point.
5363 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5365 * linux-s390-low.c (s390_supports_z_point_type): New function.
5366 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5368 2016-02-16 Yao Qi <yao.qi@linaro.org>
5370 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5371 PC. Get pc from regcache_read_pc.
5373 2016-02-12 Yao Qi <yao.qi@linaro.org>
5375 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5376 or linux_get_pc_32bit.
5377 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5379 2016-02-12 Yao Qi <yao.qi@linaro.org>
5381 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5382 arm_linux_get_next_pcs_fixup.
5384 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5386 * tracepoint.c (x_tracepoint_action_download): Change
5387 write_inferior_data_ptr to write_inferior_data_pointer.
5388 (cmd_qtstart): Likewise.
5389 (write_inferior_data_ptr): Remove.
5390 (download_agent_expr): Change write_inferior_data_ptr to
5391 write_inferior_data_pointer.
5392 (download_tracepoint_1): Likewise.
5393 (download_tracepoint): Likewise.
5394 (download_trace_state_variables): Likewise.
5396 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5397 Marcin Kościelnicki <koriakin@0x04.net>
5399 * tracepoint.c (struct tracepoint_action_ops): Remove.
5400 (struct tracepoint_action): Remove ops.
5401 (m_tracepoint_action_download, r_tracepoint_action_download)
5402 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5403 size and offset accordingly.
5404 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5405 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5406 (tracepoint_action_send, tracepoint_action_download): New functions.
5407 Helpers for trace action handlers.
5408 (add_tracepoint_action): Remove setup actions ops.
5409 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5411 2016-02-10 Yao Qi <yao.qi@linaro.org>
5413 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5415 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5417 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5419 * configure: Regenerate.
5421 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5423 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5424 void * to gdb_byte *.
5425 * linux-low.c (siginfo_fixup): Likewise.
5426 (linux_xfer_siginfo): Likewise.
5427 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5429 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5431 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5433 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5435 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5437 * linux-x86-low.c [__x86_64__]: Include
5438 "nat/amd64-linux-siginfo.h".
5439 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5440 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5441 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5442 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5443 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5444 (cpt_si_fd, si_timerid, si_overrun): Move from
5445 nat/amd64-linux-siginfo.c.
5446 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5448 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5450 * server.c (skip_to_semicolon): Remove.
5451 (process_point_options): Use strchrnul instead of
5454 2016-01-26 Yao Qi <yao.qi@linaro.org>
5456 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5457 * linux-low.c (install_software_single_step_breakpoints): Don't
5458 call regcache_read_pc.
5459 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5462 2016-01-26 Yao Qi <yao.qi@linaro.org>
5464 * linux-low.c (install_software_single_step_breakpoints): Call
5465 regcache_read_pc instead of get_pc.
5467 2016-01-26 Yao Qi <yao.qi@linaro.org>
5469 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5470 (unblock_async_io): Rename to ...
5471 (block_unblock_async_io): ... it. New function.
5472 (enable_async_io): Don't install SIGIO handler. Unblock it
5474 (disable_async_io): Don't ignore SIGIO. Block it instead.
5475 (initialize_async_io): Install SIGIO handler. Don't call
5478 2016-01-26 Yao Qi <yao.qi@linaro.org>
5480 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5481 first character is '\003', call *the_target->request_interrupt.
5483 2016-01-25 Yao Qi <yao.qi@linaro.org>
5485 * remote-utils.c (new_thread_notify): Remove.
5486 (dead_thread_notify): Likewise.
5487 * remote-utils.h (new_thread_notify): Remove declaration.
5488 (dead_thread_notify): Likewise.
5490 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5492 * gdb.trace/pending.exp: Fix expected message on continue.
5494 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5496 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5497 it works properly on big-endian machines where sizeof (CORE_ADDR)
5500 2016-01-21 Pedro Alves <palves@redhat.com>
5502 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5503 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5504 * configure: Regenerate.
5506 2016-01-21 Yao Qi <yao.qi@linaro.org>
5508 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5509 is_thumb and set it according to CPSR saved on the stack.
5510 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5511 arm_sigreturn_next_pc.
5513 2016-01-18 Yao Qi <yao.qi@linaro.org>
5515 * linux-low.c (linux_set_pc_64bit): New function.
5516 (linux_get_pc_64bit): New function.
5517 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5519 * linux-sparc-low.c (debug_threads): Remove declaration.
5520 (sparc_get_pc): Remove.
5521 (the_low_target): Use linux_get_pc_64bit instead of
5523 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5524 (the_low_target): Use linux_get_pc_64bit and
5527 2016-01-18 Yao Qi <yao.qi@linaro.org>
5529 * linux-arm-low.c (debug_threads): Remove declaration.
5530 (arm_get_pc, arm_set_pc): Remove.
5531 (the_low_target): Use linux_get_pc_32bit and
5533 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5534 (the_low_target): Use linux_get_pc_32bit and
5536 * linux-cris-low.c (debug_threads): Remove declaration.
5537 (cris_get_pc, cris_set_pc,): Remove.
5538 (the_low_target): Use linux_get_pc_32bit and
5540 * linux-crisv32-low.c (debug_threads): Remove declaration.
5541 (cris_get_pc, cris_set_pc): Remove.
5542 (the_low_target): Use linux_get_pc_32bit and
5544 * linux-low.c: Include inttypes.h.
5545 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5546 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5547 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5548 (the_low_target): Use linux_get_pc_32bit and
5550 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5551 (the_low_target): Use linux_get_pc_32bit and
5553 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5554 (the_low_target): Use linux_get_pc_32bit and
5556 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5557 (the_low_target): Use linux_get_pc_32bit and
5559 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5560 (the_low_target): Use linux_get_pc_32bit and
5563 2016-01-18 Gary Benson <gbenson@redhat.com>
5565 * configure.ac (AC_FUNC_FORK): New check.
5566 * config.in: Regenerate.
5567 * configure: Likewise.
5569 2016-01-14 Yao Qi <yao.qi@linaro.org>
5571 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5572 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5573 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5574 arm_get_next_pcs_ctor.
5576 2016-01-12 Josh Stone <jistone@redhat.com>
5577 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5579 * inferiors.h: Include "gdb_vecs.h".
5580 (struct process_info): Add syscalls_to_catch.
5581 * inferiors.c (remove_process): Free syscalls_to_catch.
5582 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5583 syscall_return stops.
5584 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5585 * server.c (handle_general_set): Handle QCatchSyscalls.
5586 (handle_query): Report support for QCatchSyscalls.
5587 * target.h (struct target_ops): Add supports_catch_syscall.
5588 (target_supports_catch_syscall): New macro.
5589 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5590 (struct lwp_info): Add syscall_state.
5591 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5592 Maintain syscall_state and syscalls_to_catch across exec.
5593 (get_syscall_trapinfo): New function, proxy to the_low_target.
5594 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5595 (linux_low_filter_event): Toggle syscall_state entry/return for
5596 syscall traps, and set it ignored for all others.
5597 (gdb_catching_syscalls_p): New function.
5598 (gdb_catch_this_syscall_p): New function.
5599 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5600 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5601 (linux_supports_catch_syscall): New function.
5602 (linux_target_ops): Install it.
5603 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5604 (the_low_target): Install it.
5606 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5608 * acinclude.m4: Include new ../warning.m4 file.
5609 * configure: Regenerated.
5610 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5612 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5614 * ax.c (is_goto_target): Mark static.
5615 * linux-low.c (register_addr): Likewise.
5616 (linux_fetch_registers, linux_store_registers): Likewise.
5617 * mem-break.c (any_persistent_commands): Fix old prototype.
5618 (add_commands_to_breakpoint): Mark static.
5619 * regcache.c (find_register_by_name): Delete unused func.
5620 * remote-utils.c (hex_or_minus_one): Mark static.
5621 * server.c (monitor_show_help): Mark static.
5622 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5623 handle_v_requests): Likewise.
5625 2016-01-12 Pedro Alves <palves@redhat.com>
5627 Remove use of the registered trademark symbol throughout.
5629 2016-01-08 Yao Qi <yao.qi@linaro.org>
5631 * remote-utils.c (getpkt): If c is '\003', call target hook
5634 2016-01-06 Yao Qi <yao.qi@linaro.org>
5636 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5637 linux-aarch32-low.c.
5638 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5639 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5640 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5641 (thumb2_breakpoint): Declare.
5642 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5643 linux-aarch32-low.h.
5644 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5645 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5646 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5648 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5650 * gdbreplay.c (gdbreplay_version): Change copyright year in
5652 * server.c (gdbserver_version): Likewise.
5654 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5656 * server.c (crc32_table): Delete.
5657 (crc32): Use libiberty's xcrc32 function.
5659 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5661 * lynx-low.c (lynx_delete_thread_callback): New function.
5662 (lynx_mourn): Properly delete our process and all of its
5663 threads. Remove call to clear_inferiors.
5665 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5667 * target.c (thread_search_callback): Add check that
5668 the thread_stopped target callback is not NULL before
5671 2015-12-21 Yao Qi <yao.qi@linaro.org>
5673 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5676 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5678 * server.c (handle_query): Call target_supports_software_single_step.
5680 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5682 * linux-low.c (single_step): New function.
5683 (linux_resume_one_lwp_throw): Call single_step.
5684 (start_step_over): Likewise.
5686 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5688 * Makefile.in (SFILES): Append arch/arm-linux.c,
5689 arch/arm-get-next-pcs.c.
5690 (arm-linux.o): New rule.
5691 (arm-get-next-pcs.o): New rule.
5692 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5694 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5695 to linux-aarch32-low.c.
5696 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5697 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5698 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5699 (thumb2_breakpoint_len): Likewise.
5700 (arm_is_thumb_mode): Make non-static.
5701 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5702 from linux-aarch32-low.c.
5703 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5704 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5705 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5706 (thumb2_breakpoint_len): Likewise.
5707 (arm_is_thumb_mode): New declaration.
5708 * linux-arm-low.c: Include arch/arm-linux.h
5709 aarch/arm-get-next-pcs.h, sys/syscall.h.
5710 (get_next_pcs_ops): New struct.
5711 (get_next_pcs_addr_bits_remove): New function.
5712 (get_next_pcs_is_thumb): New function.
5713 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5714 (arm_sigreturn_next_pc): Likewise.
5715 (get_next_pcs_syscall_next_pc): Likewise.
5716 (arm_gdbserver_get_next_pcs): Likewise.
5717 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5719 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5720 * server.h: Include gdb_vecs.h.
5722 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5724 * Makefile.in (SFILES): Append common/common-regcache.c.
5725 (OBS): Append common-regcache.o.
5726 (common-regcache.o): New rule.
5727 * regcache.c (init_register_cache): Initialize cache to
5729 (regcache_raw_read_unsigned): New function.
5730 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5731 register_status enum.
5733 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5735 * linux-aarch64-low.c (the_low_targets): Rename
5736 breakpoint_reinsert_addr to get_next_pcs.
5737 * linux-arm-low.c (the_low_targets): Likewise.
5738 * linux-bfin-low.c (the_low_targets): Likewise.
5739 * linux-cris-low.c (the_low_targets): Likewise.
5740 * linux-crisv32-low.c (the_low_targets): Likewise.
5741 * linux-low.c (can_software_single_step): Likewise.
5742 (install_software_single_step_breakpoints): New function.
5743 (start_step_over): Use install_software_single_step_breakpoints.
5744 * linux-low.h: New CORE_ADDR vector.
5745 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5747 * linux-mips-low.c (the_low_targets): Likewise.
5748 * linux-nios2-low.c (the_low_targets): Likewise.
5749 * linux-sparc-low.c (the_low_targets): Likewise.
5751 2015-12-17 Pedro Alves <palves@redhat.com>
5753 * linux-low.c (linux_kill_one_lwp): Remove references to
5755 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5757 (linux_init_signals): Delete.
5758 (initialize_low): Adjust.
5759 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5761 2015-12-16 Pedro Alves <palves@redhat.com>
5763 * configure.ac (compiler warning flags): When testing a
5764 -Wno-foo option, check whether -Wfoo works instead.
5765 * configure: Regenerate.
5767 2015-12-11 Don Breazeal <donb@codesourcery.com>
5769 * server.c (process_serial_event): Don't exit from gdbserver
5770 in remote mode if there are still active inferiors.
5772 2015-12-11 Yao Qi <yao.qi@linaro.org>
5774 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5775 arm_breakpoint_at if the process is 32-bit.
5777 2015-12-11 Yao Qi <yao.qi@linaro.org>
5779 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5782 2015-12-07 Yao Qi <yao.qi@linaro.org>
5784 * configure.srv: Append arm.o to srv_tgtobj for
5785 aarch64*-*-linux* target.
5786 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5787 from linux-arm-low.c.
5788 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5789 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5790 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5791 (thumb2_breakpoint_len): Likewise.
5792 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5793 (arm_breakpoint_kinds): Likewise.
5794 (arm_breakpoint_kind_from_pc): Likewise.
5795 (arm_sw_breakpoint_from_kind): Likewise.
5796 (arm_breakpoint_kind_from_current_state): Likewise.
5797 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5798 (arm_sw_breakpoint_from_kind): Declare.
5799 (arm_breakpoint_kind_from_current_state): Declare.
5800 (arm_breakpoint_at): Declare.
5801 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5802 arm_sw_breakpoint_from_kind if process is 32-bit.
5803 (aarch64_breakpoint_kind_from_pc): New function.
5804 (aarch64_breakpoint_kind_from_current_state): New function.
5805 (the_low_target): Initialize fields breakpoint_kind_from_pc
5806 and breakpoint_kind_from_current_state.
5807 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5808 linux-aarch32-low.c.
5809 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5810 (arm_breakpoint, arm_breakpoint_len): Likewise.
5811 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5812 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5813 (arm_is_thumb_mode): Likewise.
5814 (arm_breakpoint_at): Likewise.
5815 (arm_breakpoint_kind_from_pc): Likewise.
5816 (arm_sw_breakpoint_from_kind): Likewise.
5817 (arm_breakpoint_kind_from_current_state): Likewise.
5820 2015-08-04 Yao Qi <yao.qi@linaro.org>
5822 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5823 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5824 * server.c (extended_protocol): Remove "static".
5825 * server.h (extended_protocol): Declare it.
5827 2015-12-04 Josh Stone <jistone@redhat.com>
5829 * target.h (struct target_ops) <arch_setup>: Rename to ...
5830 (struct target_ops) <post_create_inferior>: ... this.
5831 (target_arch_setup): Rename to ...
5832 (target_post_create_inferior): ... this, calling post_create_inferior.
5833 * server.c (start_inferior): Update target_arch_setup calls to
5834 target_post_create_inferior.
5835 * linux-low.c (linux_low_ptrace_options): Forward declare.
5836 (linux_arch_setup): Update its comment for general use.
5837 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5838 (struct linux_target_ops): Use linux_post_create_inferior.
5839 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5840 to post_create_inferior.
5841 * nto-low.c (struct nto_target_ops): Likewise.
5842 * spu-low.c (struct spu_target_ops): Likewise.
5843 * win32-low.c (struct win32_target_ops): Likewise.
5845 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5847 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5849 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5851 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5852 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5853 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5854 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5855 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5856 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5857 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5858 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5859 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5860 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5861 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5862 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5864 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5866 * linux-low.c (linux_look_up_symbols): Don't call
5867 linux_supports_traceclone.
5868 * linux-low.h (thread_db_init): Remove use_events argument.
5869 * thread-db.c (thread_db_use_event): Remove global variable.
5870 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5871 (struct thread_db) <td_create_bp>: Remove field.
5872 (thread_db_create_event): Remove function.
5873 (thread_db_enable_reporting): Likewise.
5874 (find_one_thread): Don't check for thread_db_use_events.
5875 (attach_thread): Likewise.
5876 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5877 (try_thread_db_load_1): Don't check for thread_db_use_events.
5878 (thread_db_init): Remove use_events argument and thread events
5880 (remove_thread_event_breakpoints): Remove function.
5881 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5883 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5885 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5887 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5888 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5889 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5890 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5891 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5893 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5895 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5896 * linux-low.c (can_hardware_single_step): Use
5897 supports_hardware_single_step.
5898 (can_software_single_step): New function.
5899 (start_step_over): Call can_software_single_step.
5900 (linux_supports_hardware_single_step): New function.
5901 (struct target_ops) <supports_software_single_step>: Initialize.
5902 * linux-low.h (struct linux_target_ops)
5903 <supports_hardware_single_step>: Initialize.
5904 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5905 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5906 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5907 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5908 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5909 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5910 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5911 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5912 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5913 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5915 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5916 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5918 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5919 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5920 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5922 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5923 * target.h (struct target_ops): <supports_software_single_step>:
5925 (target_supports_software_single_step): New macro.
5927 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5929 * linux-low.c (linux_wait_1): Fix pc advance condition.
5930 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5931 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5933 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5935 * linux-arm-low.c (arm_is_thumb_mode): New function.
5936 (arm_breakpoint_at): Use arm_is_thumb_mode.
5937 (arm_breakpoint_kind_from_current_state): New function.
5938 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5940 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5941 (linux_breakpoint_kind_from_current_state): New function.
5942 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5943 * linux-low.h (struct linux_target_ops)
5944 <breakpoint_kind_from_current_state>: New field.
5945 * target.h (struct target_ops): Likewise.
5946 (target_breakpoint_kind_from_current_state): New macro.
5948 2015-11-30 Pedro Alves <palves@redhat.com>
5950 * linux-low.c (linux_resume): Wake up the event loop before
5953 2015-11-30 Pedro Alves <palves@redhat.com>
5955 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5957 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5959 * target.c (struct thread_search): New structure.
5960 (thread_search_callback): New function.
5961 (prev_general_thread): New global.
5962 (prepare_to_access_memory, done_accessing_memory): New functions.
5963 * target.h (prepare_to_access_memory, done_accessing_memory):
5964 Replace macros with function declarations.
5966 2015-11-30 Pedro Alves <palves@redhat.com>
5969 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5970 report TARGET_WAITKIND_NO_RESUMED.
5971 * remote-utils.c (prepare_resume_reply): Handle
5972 TARGET_WAITKIND_NO_RESUMED.
5973 * server.c (report_no_resumed): New global.
5974 (handle_query) <qSupported>: Handle "no-resumed+". Report
5975 "no-resumed+" support.
5976 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5977 return error if the client doesn't support no-resumed events.
5978 (push_stop_notification): New function.
5979 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5980 events if the client supports them.
5982 2015-11-30 Pedro Alves <palves@redhat.com>
5984 * linux-low.c (thread_still_has_status_pending_p): Don't check
5986 (lwp_resumed): New function.
5987 (status_pending_p_callback): Return early if the LWP is not
5988 supposed to be resumed.
5990 2015-11-30 Pedro Alves <palves@redhat.com>
5992 * linux-low.c (handle_extended_wait): Assert that the LWP's
5993 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5994 thread create events, leave the new child's status pending.
5995 (linux_low_filter_event): If GDB wants to hear about thread exit
5996 events, leave the LWP marked dead and don't delete it.
5997 (linux_wait_for_event_filtered): Don't check for thread exit.
5998 (filter_exit_event): New function.
5999 (linux_wait_1): Use it, when returning an exit event.
6000 (linux_resume_one_lwp_throw): Assert that the LWP's
6001 waitstatus is TARGET_WAITKIND_IGNORE.
6002 * remote-utils.c (prepare_resume_reply): Handle
6003 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6004 * server.c (report_thread_events): New global.
6005 (handle_general_set): Handle QThreadEvents.
6006 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6007 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6008 TARGET_WAITKIND_THREAD_EXITED.
6009 * server.h (report_thread_events): Declare.
6011 2015-11-30 Pedro Alves <palves@redhat.com>
6013 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6014 the thread's last_resume_kind was resume_stop.
6016 2015-11-30 Pedro Alves <palves@redhat.com>
6018 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6021 2015-11-30 Pedro Alves <palves@redhat.com>
6023 * server.c (handle_v_requests): Handle vCtrlC.
6025 2015-11-30 Pedro Alves <palves@redhat.com>
6027 * gdbthread.h (find_any_thread_of_pid): Declare.
6028 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6030 * server.c (handle_query): If current_thread is NULL, look for
6031 another thread of the selected process.
6033 2015-11-26 Daniel Colascione <dancol@dancol.org>
6034 Simon Marchi <simon.marchi@ericsson.com>
6036 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6037 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6039 * target.h (struct target_ops) <thread_name>: New field.
6040 (target_thread_name): New macro.
6042 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6044 * regcache.h (regcache_invalidate_pid): Add declaration.
6045 * regcache.c (regcache_invalidate_pid): New function, extracted
6046 from regcache_invalidate.
6047 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6048 Add trivial documentation comment.
6049 * lynx-low.c: Use regcache_invalidate_pid instead of
6050 regcache_invalidate.
6052 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6054 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6055 and Elf64_auxv_t if the target is Android.
6057 2015-11-22 Doug Evans <xdje42@gmail.com>
6059 * target.h: #include <sys/types.h>.
6061 2015-11-19 Pedro Alves <palves@redhat.com>
6063 * linux-low.c (linux_process_qsupported): Change prototype.
6065 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6067 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6068 and adjust to loop over all features.
6069 * server.c (handle_query) <qSupported>: Adjust to call
6070 target_process_qsupported once, passing it a vector of unprocessed
6072 * target.h (struct target_ops) <process_qsupported>: Change
6074 (target_process_qsupported): Adjust.
6076 2015-11-19 Pedro Alves <palves@redhat.com>
6078 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6080 * configure: Regenerate.
6082 2015-11-19 Pedro Alves <palves@redhat.com>
6084 * configure: Regenerate.
6086 2015-11-19 Yao Qi <yao.qi@linaro.org>
6088 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6091 2015-11-19 Yao Qi <yao.qi@linaro.org>
6093 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6094 (struct aarch64_operand): Move enum out.
6096 2015-11-19 Yao Qi <yao.qi@linaro.org>
6098 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6099 struct user_fpsimd_state *.
6100 (aarch64_store_fpregset): Likewise.
6102 2015-11-19 Yao Qi <yao.qi@linaro.org>
6104 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6105 struct user_pt_regs *.
6106 (aarch64_store_gregset): Likewise.
6108 2015-11-18 Pedro Alves <palves@redhat.com>
6110 * Makefile.in (all_object_files): Add $IPA_OBJS.
6112 2015-11-17 Pedro Alves <palves@redhat.com>
6114 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6115 GDB_SIGNAL_0 and gdb_signal_to_string.
6117 2015-11-17 Pedro Alves <palves@redhat.com>
6119 * win32-low.c (handle_output_debug_string): Remove parameter.
6120 (win32_kill): Remove our_status local and adjust call to
6121 handle_output_debug_string.
6122 (get_child_debug_event): Adjust call to
6123 handle_output_debug_string.
6125 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6127 * linux-mips-low.c (mips_fill_gregset): Add cast.
6128 (mips_store_gregset): Likewise.
6129 (mips_fill_fpregset): Likewise.
6130 (mips_store_fpregset): Likewise.
6132 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6134 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6137 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6139 * linux-mips-low.c (mips_linux_new_thread): Change type of
6140 watch_type to enum target_hw_bp_type.
6142 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6144 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6145 Change return type to arm_hwbp_type.
6147 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6149 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6150 (arm_store_gregset): Likewise.
6151 * linux-arm-low.c (arm_get_hwcap): Likewise.
6152 (arm_read_description): Likewise.
6154 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6156 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6158 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6160 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6161 (ppc_fill_vsxregset): Likewise.
6162 (ppc_store_vsxregset): Likewise.
6163 (ppc_fill_vrregset): Likewise.
6164 (ppc_store_vrregset): Likewise.
6165 (ppc_fill_evrregset): Likewise.
6166 (ppc_store_evrregset): Likewise.
6168 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6170 * linux-ppc-low.c (ppc_usrregs_info): Remove
6171 forward-declaration.
6172 (ppc_arch_setup): Move lower in file.
6174 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6176 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6177 (ps_pdwrite): Likewise.
6179 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6181 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6182 to after assert checks.
6184 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6186 * proc-service.c (ps_pdread): Add/adjust casts.
6187 (ps_pdwrite): Add/adjust casts.
6189 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6191 * server.c (handle_search_memory_1): Cast return value of
6194 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6196 * server.c (write_qxfer_response): Change type of data to
6199 2015-10-29 Pedro Alves <palves@redhat.com>
6201 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6203 2015-10-29 Pedro Alves <palves@redhat.com>
6205 * tracepoint.c (clear_installed_tracepoints): Add casts.
6207 2015-10-29 Pedro Alves <palves@redhat.com>
6209 * server.c (handle_v_cont, process_serial_event): Add enum
6210 gdb_signal casts to signal parsing code.
6212 2015-10-29 Pedro Alves <palves@redhat.com>
6214 * linux-low.h (NULL_REGSET): Define.
6215 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6216 * linux-arm-low.c (arm_regsets): Likewise.
6217 * linux-crisv32-low.c (cris_regsets): Likewise.
6218 * linux-m68k-low.c (m68k_regsets): Likewise.
6219 * linux-mips-low.c (mips_regsets): Likewise.
6220 * linux-nios2-low.c (nios2_regsets): Likewise.
6221 * linux-ppc-low.c (ppc_regsets): Likewise.
6222 * linux-s390-low.c (s390_regsets): Likewise.
6223 * linux-sh-low.c (sh_regsets): Likewise.
6224 * linux-sparc-low.c (sparc_regsets): Likewise.
6225 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6226 * linux-tile-low.c (tile_regsets): Likewise.
6227 * linux-x86-low.c (x86_regsets): Likewise.
6228 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6230 2015-10-29 Pedro Alves <palves@redhat.com>
6232 * linux-low.h (NULL_REGSET): Define.
6233 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6234 * linux-arm-low.c (arm_regsets): Likewise.
6235 * linux-crisv32-low.c (cris_regsets): Likewise.
6236 * linux-m68k-low.c (m68k_regsets): Likewise.
6237 * linux-mips-low.c (mips_regsets): Likewise.
6238 * linux-nios2-low.c (nios2_regsets): Likewise.
6239 * linux-ppc-low.c (ppc_regsets): Likewise.
6240 * linux-s390-low.c (s390_regsets): Likewise.
6241 * linux-sh-low.c (sh_regsets): Likewise.
6242 * linux-sparc-low.c (sparc_regsets): Likewise.
6243 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6244 * linux-tile-low.c (tile_regsets): Likewise.
6245 * linux-x86-low.c (x86_regsets): Likewise.
6246 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6248 2015-10-26 Doug Evans <dje@google.com>
6250 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6252 2015-10-26 Doug Evans <dje@google.com>
6254 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6256 2015-10-26 Doug Evans <dje@google.com>
6258 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6260 (attach_thread, find_new_threads_callback): Ditto.
6262 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6264 * mem-break.h (set_breakpoint_data): Remove.
6266 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6268 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6269 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6270 (initialize_low): Remove set_breakpoint_data call.
6271 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6272 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6273 (initialize_low): Remove set_breakpoint_data call.
6274 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6275 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6276 (initialize_low): Remove set_breakpoint_data call.
6278 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6280 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6281 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6282 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6283 * target.h (target_breakpoint_kind_from_pc): New macro.
6285 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6287 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6288 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6289 the default breakpoint kind.
6291 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6293 * linux-arm-low.c (arm_supports_z_point_type): Add software
6296 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6298 * linux-arm-low.c: Refactor breakpoint definitions.
6299 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6300 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6302 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6304 * Makefile.in: Add arm.c/o.
6305 * configure.srv: Likewise.
6306 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6307 (arm_breakpoint_kind_from_pc): New function.
6308 (arm_sw_breakpoint_from_kind): Return proper kind.
6309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6311 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6313 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6315 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6316 (struct raw_breakpoint) <size>: Remove.
6317 (struct raw_breakpoint) <kind>: Add.
6318 (bp_size): New function.
6319 (bp_opcode): Likewise.
6320 (find_raw_breakpoint_at): Adjust for kind.
6321 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6322 (remove_memory_breakpoint): Adjust for kind call bp_size.
6323 (set_raw_breakpoint_at): Adjust for kind.
6324 (set_breakpoint): Likewise.
6325 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6326 (delete_raw_breakpoint): Adjust for kind.
6327 (delete_breakpoint): Likewise.
6328 (find_gdb_breakpoint): Likewise.
6329 (set_gdb_breakpoint_1): Likewise.
6330 (set_gdb_breakpoint): Likewise.
6331 (delete_gdb_breakpoint_1): Likewise.
6332 (delete_gdb_breakpoint): Likewise.
6333 (uninsert_raw_breakpoint): Likewise.
6334 (reinsert_raw_breakpoint): Likewise.
6335 (set_breakpoint_data): Remove.
6336 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6337 (check_mem_read): Adjust for kind call bp_size.
6338 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6339 (clone_one_breakpoint): Adjust for kind.
6340 * mem-break.h (set_gdb_breakpoint): Likewise.
6341 (delete_gdb_breakpoint): Likewise.
6342 * server.c (process_serial_event): Likewise.
6344 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6346 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6347 (struct linux_target_ops) <breakpoint>: Remove.
6348 (struct linux_target_ops) <breakpoint_len>: Remove.
6349 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6350 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6351 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6352 (arm_sw_breakpoint_from_kind): New function.
6353 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6354 (struct linux_target_ops) <breakpoint>: Remove.
6355 (struct linux_target_ops) <breakpoint_len>: Remove.
6356 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6358 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6359 (struct linux_target_ops) <breakpoint>: Remove.
6360 (struct linux_target_ops) <breakpoint_len>: Remove.
6361 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6362 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6363 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6364 (struct linux_target_ops) <breakpoint>: Remove.
6365 (struct linux_target_ops) <breakpoint_len>: Remove.
6366 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6367 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6368 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6369 and sw_breakpoint_from_kind to increment the pc.
6370 (linux_breakpoint_kind_from_pc): New function.
6371 (linux_sw_breakpoint_from_kind): New function.
6372 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6373 (initialize_low): Call breakpoint_kind_from_pc and
6374 sw_breakpoint_from_kind to replace breakpoint_data/len.
6375 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6377 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6378 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6379 (struct linux_target_ops) <breakpoint>: Remove.
6380 (struct linux_target_ops) <breakpoint_len>: Remove.
6381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6382 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6383 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6384 (struct linux_target_ops) <breakpoint>: Remove.
6385 (struct linux_target_ops) <breakpoint_len>: Remove.
6386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6387 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6388 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6389 (struct linux_target_ops) <breakpoint>: Remove.
6390 (struct linux_target_ops) <breakpoint_len>: Remove.
6391 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6392 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6393 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6394 (struct linux_target_ops) <breakpoint>: Remove.
6395 (struct linux_target_ops) <breakpoint_len>: Remove.
6396 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6397 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6398 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6399 (struct linux_target_ops) <breakpoint>: Remove.
6400 (struct linux_target_ops) <breakpoint_len>: Remove.
6401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6402 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6403 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6404 (struct linux_target_ops) <breakpoint>: Remove.
6405 (struct linux_target_ops) <breakpoint_len>: Remove.
6406 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6407 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6408 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6409 (struct linux_target_ops) <breakpoint>: Remove.
6410 (struct linux_target_ops) <breakpoint_len>: Remove.
6411 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6412 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6413 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6414 (struct linux_target_ops) <breakpoint>: Remove.
6415 (struct linux_target_ops) <breakpoint_len>: Remove.
6416 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6417 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6418 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6419 (struct linux_target_ops) <breakpoint>: Remove.
6420 (struct linux_target_ops) <breakpoint_len>: Remove.
6421 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6422 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6423 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6424 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6425 (struct linux_target_ops) <breakpoint>: Remove.
6426 (struct linux_target_ops) <breakpoint_len>: Remove.
6427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6429 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6430 (struct linux_target_ops) <breakpoint>: Remove.
6431 (struct linux_target_ops) <breakpoint_len>: Remove.
6432 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6435 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6437 * linux-cris-low.c (cris_get_pc): Remove void arg.
6439 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6441 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6444 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6446 * inferiors.c (thread_pid_matches_callback): New function.
6447 (find_thread_process): New function.
6448 (remove_thread): Reset current_thread.
6449 (remove_process): Assert threads have been removed first.
6451 2015-10-15 Yao Qi <yao.qi@linaro.org>
6453 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6455 (aarch64_remove_point): Likewise.
6456 * regcache.c (regcache_register_size): New function.
6458 2015-10-12 Yao Qi <yao.qi@linaro.org>
6460 * linux-aarch64-low.c: Update all callers as emit_load_store
6461 is renamed to aarch64_emit_load_store.
6463 2015-10-12 Yao Qi <yao.qi@linaro.org>
6465 * linux-aarch64-low.c: Update all callers of function renaming
6466 from emit_insn to aarch64_emit_insn.
6468 2015-10-12 Yao Qi <yao.qi@linaro.org>
6470 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6471 arch/aarch64-insn.h.
6472 (struct aarch64_memory_operand): Likewise.
6474 (emit_insn): Move to arch/aarch64-insn.c.
6475 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6476 (emit_load_store): Move to arch/aarch64-insn.c.
6477 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6478 (can_encode_int32): Remove.
6480 2015-10-12 Yao Qi <yao.qi@linaro.org>
6482 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6483 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6484 (aarch64_relocate_instruction): Likewise.
6485 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6486 (struct aarch64_insn_visitor): Likewise.
6488 2015-10-12 Yao Qi <yao.qi@linaro.org>
6490 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6491 (struct aarch64_insn_visitor): New.
6492 (struct aarch64_insn_relocation_data): New.
6493 (aarch64_ftrace_insn_reloc_b): New function.
6494 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6495 (aarch64_ftrace_insn_reloc_cb): Likewise.
6496 (aarch64_ftrace_insn_reloc_tb): Likewise.
6497 (aarch64_ftrace_insn_reloc_adr): Likewise.
6498 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6499 (aarch64_ftrace_insn_reloc_others): Likewise.
6501 (aarch64_relocate_instruction): Use visitor.
6503 2015-10-12 Yao Qi <yao.qi@linaro.org>
6505 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6506 int. Add argument buf.
6507 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6508 aarch64_relocate_instruction.
6510 2015-10-12 Yao Qi <yao.qi@linaro.org>
6512 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6513 argument insn. Remove local variable insn. Don't call
6515 (aarch64_install_fast_tracepoint_jump_pad): Call
6518 2015-09-30 Yao Qi <yao.qi@linaro.org>
6520 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6521 (emit_load_store_pair): Likewise.
6523 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6525 * dll.c (match_dll): Add cast(s).
6526 (unloaded_dll): Likewise.
6527 * linux-low.c (second_thread_of_pid_p): Likewise.
6528 (delete_lwp_callback): Likewise.
6529 (count_events_callback): Likewise.
6530 (select_event_lwp_callback): Likewise.
6531 (linux_set_resume_request): Likewise.
6532 * server.c (accumulate_file_name_length): Likewise.
6533 (emit_dll_description): Likewise.
6534 (handle_qxfer_threads_worker): Likewise.
6535 (visit_actioned_threads): Likewise.
6536 * thread-db.c (any_thread_of): Likewise.
6537 * tracepoint.c (same_process_p): Likewise.
6538 (match_blocktype): Likewise.
6539 (build_traceframe_info_xml): Likewise.
6541 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6543 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6545 (gdb_unparse_agent_expr): Likewise.
6546 * hostio.c (require_data): Likewise.
6547 (handle_pread): Likewise.
6548 * linux-low.c (disable_regset): Likewise.
6549 (fetch_register): Likewise.
6550 (store_register): Likewise.
6551 (get_dynamic): Likewise.
6552 (linux_qxfer_libraries_svr4): Likewise.
6553 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6554 (set_fast_tracepoint_jump): Likewise.
6555 (uninsert_fast_tracepoint_jumps_at): Likewise.
6556 (reinsert_fast_tracepoint_jumps_at): Likewise.
6557 (validate_inserted_breakpoint): Likewise.
6558 (clone_agent_expr): Likewise.
6559 * regcache.c (init_register_cache): Likewise.
6560 * remote-utils.c (putpkt_binary_1): Likewise.
6561 (decode_M_packet): Likewise.
6562 (decode_X_packet): Likewise.
6563 (look_up_one_symbol): Likewise.
6564 (relocate_instruction): Likewise.
6565 (monitor_output): Likewise.
6566 * server.c (handle_search_memory): Likewise.
6567 (handle_qxfer_exec_file): Likewise.
6568 (handle_qxfer_libraries): Likewise.
6569 (handle_qxfer): Likewise.
6570 (handle_query): Likewise.
6571 (handle_v_cont): Likewise.
6572 (handle_v_run): Likewise.
6573 (captured_main): Likewise.
6574 * target.c (write_inferior_memory): Likewise.
6575 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6576 * tracepoint.c (init_trace_buffer): Likewise.
6577 (add_tracepoint_action): Likewise.
6578 (add_traceframe): Likewise.
6579 (add_traceframe_block): Likewise.
6580 (cmd_qtdpsrc): Likewise.
6581 (cmd_qtdv): Likewise.
6582 (cmd_qtstatus): Likewise.
6583 (response_source): Likewise.
6584 (response_tsv): Likewise.
6585 (cmd_qtnotes): Likewise.
6586 (gdb_collect): Likewise.
6587 (initialize_tracepoint): Likewise.
6589 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6591 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6592 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6593 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6595 (enum aarch64_condition_codes): New enum.
6596 (w0): New static global.
6599 (struct aarch64_memory_operand) <type>: New
6600 MEMORY_OPERAND_POSTINDEX type.
6601 (postindex_memory_operand): New helper function.
6602 (emit_ret): New function.
6603 (emit_load_store_pair): New function, factored out of emit_stp
6604 with support for MEMORY_OPERAND_POSTINDEX.
6605 (emit_stp): Rewrite using emit_load_store_pair.
6606 (emit_ldp): New function.
6607 (emit_load_store): Likewise.
6608 (emit_ldr): Mention post-index instruction in comment.
6609 (emit_ldrh): New function.
6610 (emit_ldrb): New function.
6611 (emit_ldrsw): Mention post-index instruction in comment.
6612 (emit_str): Likewise.
6613 (emit_subs): New function.
6614 (emit_cmp): Likewise.
6615 (emit_and): Likewise.
6616 (emit_orr): Likewise.
6617 (emit_orn): Likewise.
6618 (emit_eor): Likewise.
6619 (emit_mvn): Likewise.
6620 (emit_lslv): Likewise.
6621 (emit_lsrv): Likewise.
6622 (emit_asrv): Likewise.
6623 (emit_mul): Likewise.
6624 (emit_sbfm): Likewise.
6625 (emit_sbfx): Likewise.
6626 (emit_ubfm): Likewise.
6627 (emit_ubfx): Likewise.
6628 (emit_csinc): Likewise.
6629 (emit_cset): Likewise.
6630 (emit_nop): Likewise.
6631 (emit_ops_insns): New helper function.
6632 (emit_pop): Likewise.
6633 (emit_push): Likewise.
6634 (aarch64_emit_prologue): New function.
6635 (aarch64_emit_epilogue): Likewise.
6636 (aarch64_emit_add): Likewise.
6637 (aarch64_emit_sub): Likewise.
6638 (aarch64_emit_mul): Likewise.
6639 (aarch64_emit_lsh): Likewise.
6640 (aarch64_emit_rsh_signed): Likewise.
6641 (aarch64_emit_rsh_unsigned): Likewise.
6642 (aarch64_emit_ext): Likewise.
6643 (aarch64_emit_log_not): Likewise.
6644 (aarch64_emit_bit_and): Likewise.
6645 (aarch64_emit_bit_or): Likewise.
6646 (aarch64_emit_bit_xor): Likewise.
6647 (aarch64_emit_bit_not): Likewise.
6648 (aarch64_emit_equal): Likewise.
6649 (aarch64_emit_less_signed): Likewise.
6650 (aarch64_emit_less_unsigned): Likewise.
6651 (aarch64_emit_ref): Likewise.
6652 (aarch64_emit_if_goto): Likewise.
6653 (aarch64_emit_goto): Likewise.
6654 (aarch64_write_goto_address): Likewise.
6655 (aarch64_emit_const): Likewise.
6656 (aarch64_emit_call): Likewise.
6657 (aarch64_emit_reg): Likewise.
6658 (aarch64_emit_pop): Likewise.
6659 (aarch64_emit_stack_flush): Likewise.
6660 (aarch64_emit_zero_ext): Likewise.
6661 (aarch64_emit_swap): Likewise.
6662 (aarch64_emit_stack_adjust): Likewise.
6663 (aarch64_emit_int_call_1): Likewise.
6664 (aarch64_emit_void_call_2): Likewise.
6665 (aarch64_emit_eq_goto): Likewise.
6666 (aarch64_emit_ne_goto): Likewise.
6667 (aarch64_emit_lt_goto): Likewise.
6668 (aarch64_emit_le_goto): Likewise.
6669 (aarch64_emit_gt_goto): Likewise.
6670 (aarch64_emit_ge_got): Likewise.
6671 (aarch64_emit_ops_impl): New static global variable.
6672 (aarch64_emit_ops): New target function, return
6673 &aarch64_emit_ops_impl.
6674 (struct linux_target_ops): Install it.
6676 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6678 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6679 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6681 * linux-aarch64-ipa.c: New file.
6682 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6684 (aarch64_get_thread_area): New target method.
6685 (extract_signed_bitfield): New helper function.
6686 (aarch64_decode_ldr_literal): New function.
6687 (enum aarch64_opcodes): New enum.
6688 (struct aarch64_register): New struct.
6689 (struct aarch64_operand): New struct.
6690 (x0): New static global.
6699 (aarch64_register): New helper function.
6700 (register_operand): Likewise.
6701 (immediate_operand): Likewise.
6702 (struct aarch64_memory_operand): New struct.
6703 (offset_memory_operand): New helper function.
6704 (preindex_memory_operand): Likewise.
6705 (enum aarch64_system_control_registers): New enum.
6706 (ENCODE): New macro.
6707 (emit_insn): New helper function.
6708 (emit_b): New function.
6709 (emit_bcond): Likewise.
6710 (emit_cb): Likewise.
6711 (emit_tb): Likewise.
6712 (emit_blr): Likewise.
6713 (emit_stp): Likewise.
6714 (emit_ldp_q_offset): Likewise.
6715 (emit_stp_q_offset): Likewise.
6716 (emit_load_store): Likewise.
6717 (emit_ldr): Likewise.
6718 (emit_ldrsw): Likewise.
6719 (emit_str): Likewise.
6720 (emit_ldaxr): Likewise.
6721 (emit_stxr): Likewise.
6722 (emit_stlr): Likewise.
6723 (emit_data_processing_reg): Likewise.
6724 (emit_data_processing): Likewise.
6725 (emit_add): Likewise.
6726 (emit_sub): Likewise.
6727 (emit_mov): Likewise.
6728 (emit_movk): Likewise.
6729 (emit_mov_addr): Likewise.
6730 (emit_mrs): Likewise.
6731 (emit_msr): Likewise.
6732 (emit_sevl): Likewise.
6733 (emit_wfe): Likewise.
6734 (append_insns): Likewise.
6735 (can_encode_int32_in): New helper function.
6736 (aarch64_relocate_instruction): New function.
6737 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6738 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6739 (struct linux_target_ops): Install aarch64_get_thread_area,
6740 aarch64_install_fast_tracepoint_jump_pad and
6741 aarch64_get_min_fast_tracepoint_insn_len.
6743 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6745 * Makefile.in (aarch64-insn.o): New rule.
6746 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6748 2015-09-21 Yao Qi <yao.qi@linaro.org>
6750 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6752 2015-09-21 Yao Qi <yao.qi@linaro.org>
6754 * tracepoint.c (max_jump_pad_size): Remove.
6756 2015-09-18 Yao Qi <yao.qi@linaro.org>
6758 * linux-aarch64-low.c: Don't include sys/uio.h.
6759 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6761 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6763 * tracepoint.c (eval_result_type): Change prototype.
6764 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6766 2015-09-15 Pedro Alves <palves@redhat.com>
6768 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6769 Check whether to report exec events instead of checking whether
6770 multiprocess is enabled.
6772 2015-09-15 Pedro Alves <palves@redhat.com>
6775 * remote-utils.c (prepare_resume_reply): Merge
6776 TARGET_WAITKIND_VFORK_DONE switch case with the
6777 TARGET_WAITKIND_FORKED case.
6779 2015-09-15 Yao Qi <yao.qi@linaro.org>
6781 * server.c (handle_query): Check string comparison using
6782 "else if" instead of "if".
6784 2015-09-15 Yao Qi <yao.qi@linaro.org>
6786 * server.c (vCont_supported): New global variable.
6787 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6788 matches. Append ";vContSupported+" to own_buf.
6789 (handle_v_requests): Append ";s;S" to own_buf if target supports
6790 hardware single step or vCont_supported is false.
6791 (capture_main): Set vCont_supported to zero.
6793 2015-09-15 Yao Qi <yao.qi@linaro.org>
6795 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6797 (linux_supports_hardware_single_step): ... New function.
6798 (linux_target_ops): Update.
6799 * lynx-low.c (lynx_target_ops): Set field
6800 supports_hardware_single_step to target_can_do_hardware_single_step.
6801 * nto-low.c (nto_target_ops): Likewise.
6802 * spu-low.c (spu_target_ops): Likewise.
6803 * win32-low.c (win32_target_ops): Likewise.
6804 * target.c (target_can_do_hardware_single_step): New function.
6805 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6806 Remove. <supports_hardware_single_step>: New field.
6807 (target_supports_conditional_breakpoints): Remove.
6808 (target_supports_hardware_single_step): New macro.
6809 (target_can_do_hardware_single_step): Declare.
6810 * server.c (handle_query): Use target_supports_hardware_single_step
6811 instead of target_supports_conditional_breakpoints.
6813 2015-09-15 Yao Qi <yao.qi@linaro.org>
6815 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6817 (struct linux_target_ops the_low_target): Install
6818 aarch64_linux_siginfo_fixup.
6820 2015-09-11 Don Breazeal <donb@codesourcery.com>
6821 Luis Machado <lgustavo@codesourcery.com>
6823 * linux-low.c (linux_mourn): Static declaration.
6824 (linux_arch_setup): Move in front of
6825 handle_extended_wait.
6826 (linux_arch_setup_thread): New function.
6827 (handle_extended_wait): Handle exec events. Call
6828 linux_arch_setup_thread. Make event_lwp argument a
6829 pointer-to-a-pointer.
6830 (check_zombie_leaders): Do not check stopped threads.
6831 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6832 (linux_low_filter_event): Add lwp and thread for exec'ing
6833 non-leader thread if leader thread has been deleted.
6834 Refactor code into linux_arch_setup_thread and call it.
6835 Pass child lwp pointer by reference to handle_extended_wait.
6836 (linux_wait_for_event_filtered): Update comment.
6837 (linux_wait_1): Prevent clobbering exec event status.
6838 (linux_supports_exec_events): New function.
6839 (linux_target_ops) <supports_exec_events>: Initialize new member.
6840 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6842 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6843 * server.c (report_exec_events): New global variable.
6844 (handle_query): Handle qSupported query for exec-events feature.
6845 (captured_main): Initialize report_exec_events.
6846 * server.h (report_exec_events): Declare new global variable.
6847 * target.h (struct target_ops) <supports_exec_events>: New
6849 (target_supports_exec_events): New macro.
6850 * win32-low.c (win32_target_ops) <supports_exec_events>:
6851 Initialize new member.
6853 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6855 * linux-low.c (linux_low_enable_btrace): Remove.
6856 (linux_target_ops): Replace linux_low_enable_btrace with
6857 linux_enable_btrace.
6859 2015-09-03 Yao Qi <yao.qi@linaro.org>
6861 * linux-aarch64-low.c (aarch64_insert_point): Call
6862 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6865 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6867 * linux-low.c (check_stopped_by_breakpoint): Use
6868 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6870 2015-08-27 Pedro Alves <palves@redhat.com>
6872 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6874 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6876 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6877 the XNEW-family equivalent.
6878 (compile_bytecodes): Likewise.
6879 * dll.c (loaded_dll): Likewise.
6880 * event-loop.c (append_callback_event): Likewise.
6881 (create_file_handler): Likewise.
6882 (create_file_event): Likewise.
6883 * hostio.c (handle_open): Likewise.
6884 * inferiors.c (add_thread): Likewise.
6885 (add_process): Likewise.
6886 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6887 * linux-arm-low.c (arm_new_process): Likewise.
6888 (arm_new_thread): Likewise.
6889 * linux-low.c (add_to_pid_list): Likewise.
6890 (linux_add_process): Likewise.
6891 (handle_extended_wait): Likewise.
6892 (add_lwp): Likewise.
6893 (enqueue_one_deferred_signal): Likewise.
6894 (enqueue_pending_signal): Likewise.
6895 (linux_resume_one_lwp_throw): Likewise.
6896 (linux_resume_one_thread): Likewise.
6897 (linux_read_memory): Likewise.
6898 (linux_write_memory): Likewise.
6899 * linux-mips-low.c (mips_linux_new_process): Likewise.
6900 (mips_linux_new_thread): Likewise.
6901 (mips_add_watchpoint): Likewise.
6902 * linux-x86-low.c (initialize_low_arch): Likewise.
6903 * lynx-low.c (lynx_add_process): Likewise.
6904 * mem-break.c (set_raw_breakpoint_at): Likewise.
6905 (set_breakpoint): Likewise.
6906 (add_condition_to_breakpoint): Likewise.
6907 (add_commands_to_breakpoint): Likewise.
6908 (clone_agent_expr): Likewise.
6909 (clone_one_breakpoint): Likewise.
6910 * regcache.c (new_register_cache): Likewise.
6911 * remote-utils.c (look_up_one_symbol): Likewise.
6912 * server.c (queue_stop_reply): Likewise.
6913 (start_inferior): Likewise.
6914 (queue_stop_reply_callback): Likewise.
6915 (handle_target_event): Likewise.
6916 * spu-low.c (fetch_ppc_memory): Likewise.
6917 (store_ppc_memory): Likewise.
6918 * target.c (set_target_ops): Likewise.
6919 * thread-db.c (thread_db_load_search): Likewise.
6920 (try_thread_db_load_1): Likewise.
6921 * tracepoint.c (add_tracepoint): Likewise.
6922 (add_tracepoint_action): Likewise.
6923 (create_trace_state_variable): Likewise.
6924 (cmd_qtdpsrc): Likewise.
6925 (cmd_qtro): Likewise.
6926 (add_while_stepping_state): Likewise.
6927 * win32-low.c (child_add_thread): Likewise.
6928 (get_image_name): Likewise.
6930 2015-08-25 Yao Qi <yao.qi@linaro.org>
6932 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6934 2015-08-25 Yao Qi <yao.qi@linaro.org>
6936 * Makefile.in (aarch64-linux.o): New rule.
6937 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6939 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6940 (aarch64_init_debug_reg_state): Make it extern.
6941 (aarch64_linux_prepare_to_resume): Remove.
6943 2015-08-25 Yao Qi <yao.qi@linaro.org>
6945 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6946 lwp_arch_private_info and ptid_of_lwp.
6948 2015-08-25 Yao Qi <yao.qi@linaro.org>
6950 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6951 Find proc_info by find_process_pid. All callers updated.
6953 2015-08-25 Yao Qi <yao.qi@linaro.org>
6955 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6957 (debug_reg_change_callback): Remove.
6958 (aarch64_notify_debug_reg_change): Remove.
6960 2015-08-25 Yao Qi <yao.qi@linaro.org>
6962 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6963 Call current_lwp_ptid.
6965 2015-08-25 Yao Qi <yao.qi@linaro.org>
6967 * linux-aarch64-low.c (debug_reg_change_callback): Use
6970 2015-08-25 Yao Qi <yao.qi@linaro.org>
6972 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6974 2015-08-25 Yao Qi <yao.qi@linaro.org>
6976 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6978 2015-08-25 Yao Qi <yao.qi@linaro.org>
6980 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6983 2015-08-25 Yao Qi <yao.qi@linaro.org>
6985 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6987 (debug_reg_change_callback): Remove argument entry and add argument
6988 lwp. Remove local variable thread. Don't print thread id in the
6989 debugging output. Don't check whether pid of thread equals to pid.
6990 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6991 iterate_over_lwps instead find_inferior.
6993 2015-08-24 Pedro Alves <palves@redhat.com>
6995 * inferiors.c (get_first_process): New function.
6996 * inferiors.h (get_first_process): New declaration.
6997 * remote-utils.c (read_ptid): Default to the first process in the
6998 list, instead of to the current thread's process.
7000 2015-08-24 Pedro Alves <palves@redhat.com>
7002 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7003 * event-loop.c: Likewise.
7004 * remote-utils.c: Likewise.
7005 * tracepoint.c: Likewise.
7007 2015-08-24 Pedro Alves <palves@redhat.com>
7009 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7012 2015-08-21 Pedro Alves <palves@redhat.com>
7014 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7015 instead of literal 1.
7017 2015-08-21 Pedro Alves <palves@redhat.com>
7019 * tdesc.c (default_description): Explicitly zero-initialize.
7021 2015-08-21 Pedro Alves <palves@redhat.com>
7024 * inferiors.c (remove_thread): Discard any pending stop reply for
7026 * server.c (remove_all_on_match_pid): Rename to ...
7027 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7029 (discard_queued_stop_replies): Change parameter to a ptid. Now
7031 (handle_v_kill, kill_inferior_callback, captured_main)
7032 (process_serial_event): Adjust.
7033 * server.h (discard_queued_stop_replies): Declare.
7035 2015-08-21 Pedro Alves <palves@redhat.com>
7037 * linux-low.c (wait_for_sigstop): Always switch to no thread
7038 selected if the previously current thread dies.
7039 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7040 process instead of the current thread's.
7041 * remote-utils.c (input_interrupt): Don't check if there's no
7043 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7044 current thread to the general thread fails, error out.
7045 (handle_qxfer_auxv, handle_qxfer_libraries)
7046 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7047 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7048 (handle_query): Check if there's a thread selected instead of
7049 checking whether there's any thread in the thread list.
7050 (handle_qxfer_threads, handle_qxfer_btrace)
7051 (handle_qxfer_btrace_conf): Don't error out early if there's no
7052 thread in the thread list.
7053 (handle_v_cont, myresume): Don't set the current thread to the
7055 (process_serial_event) <Hg handling>: Also set thread_id if the
7056 previous general thread is still alive.
7057 (process_serial_event) <g/G handling>: If setting the current
7058 thread to the general thread fails, error out.
7059 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7060 thread's lwp instead of the current thread's.
7061 * target.c (set_desired_thread): If the desired thread was not
7062 found, leave the current thread pointing to NULL. Return an int
7063 (boolean) indicating success.
7064 * target.h (set_desired_thread): Change return type to int.
7066 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7068 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7069 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7071 (ps_get_thread_area): New function.
7073 2015-08-19 Gary Benson <gbenson@redhat.com>
7075 * hostio.c (handle_pread): Do not attempt to read more data
7076 than hostio_reply_with_data can fit in a packet.
7078 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7080 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7082 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7084 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7086 2015-08-06 Pedro Alves <palves@redhat.com>
7088 * tracepoint.c (expr_eval_result): Now an int.
7090 2015-08-06 Pedro Alves <palves@redhat.com>
7092 * gdbthread.h (struct regcache): Forward declare.
7093 (struct thread_info) <regcache_data>: Now a struct regcache
7095 * inferiors.c (inferior_regcache_data)
7096 (set_inferior_regcache_data): Now work with struct regcache
7098 * inferiors.h (struct regcache): Forward declare.
7099 (inferior_regcache_data, set_inferior_regcache_data): Now work
7100 with struct regcache pointers.
7101 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7102 (free_register_cache_thread): Remove struct regcache pointer
7105 2015-08-06 Pedro Alves <palves@redhat.com>
7107 * server.c (captured_main): On error, print the exception message
7108 to stderr, and if run_once is set, throw a quit.
7110 2015-08-06 Pedro Alves <palves@redhat.com>
7112 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7115 2015-08-06 Pedro Alves <palves@redhat.com>
7117 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7118 reading beyond the passed in buffer length.
7120 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7122 * tracepoint.c (symbol_list) <required>: Remove.
7124 2015-08-06 Pedro Alves <palves@redhat.com>
7126 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7127 count if stopping and suspending threads.
7128 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7129 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7130 (linux_detach): Complete an ongoing step-over.
7131 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7133 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7134 (linux_wait_1): If passing a signal to the inferior after
7135 finishing a step-over, unsuspend and re-resume all lwps. If we
7136 see a single-step event but the thread should be continuing, don't
7137 pass the trap to gdb.
7138 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7139 internal_error instead of gdb_assert.
7140 (enqueue_pending_signal): New function.
7141 (check_ptrace_stopped_lwp_gone): Add debug output.
7142 (start_step_over): Use internal_error instead of gdb_assert.
7143 (complete_ongoing_step_over): New function.
7144 (linux_resume_one_thread): Don't resume a suspended thread.
7145 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7148 2015-08-06 Pedro Alves <palves@redhat.com>
7150 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7151 (linux_thread_alive): Use lwp_is_marked_dead.
7152 (extended_event_reported): Delete.
7153 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7154 instead of extended_event_reported.
7155 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7157 (lwp_is_marked_dead): New function.
7158 (lwp_running): Use lwp_is_marked_dead.
7159 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7162 2015-08-06 Pedro Alves <palves@redhat.com>
7164 * linux-low.c (linux_wait_1): Move fork event output out of the
7165 !report_to_gdb check. Pass event_child->waitstatus to
7166 target_waitstatus_to_string instead of ourstatus.
7168 2015-08-04 Yao Qi <yao.qi@linaro.org>
7170 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7171 if current_thread is 32 bit.
7173 2015-08-04 Yao Qi <yao.qi@linaro.org>
7175 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7176 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7177 * server.c (extended_protocol): Remove "static".
7178 * server.h (extended_protocol): Declare it.
7180 2015-08-04 Yao Qi <yao.qi@linaro.org>
7182 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7183 both aarch64 and aarch32.
7184 (aarch64_set_pc): Likewise.
7186 2015-08-04 Yao Qi <yao.qi@linaro.org>
7188 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7189 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7190 arm-with-neon.xml to srv_xmlfiles.
7191 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7192 (is_64bit_tdesc): New function.
7193 (aarch64_linux_read_description): New function.
7194 (aarch64_arch_setup): Call aarch64_linux_read_description.
7195 (regs_info): Rename to regs_info_aarch64.
7196 (aarch64_regs_info): Return right regs_info.
7197 (initialize_low_arch): Call initialize_low_arch_aarch32.
7199 2015-08-04 Yao Qi <yao.qi@linaro.org>
7201 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7202 * linux-aarch32-low.c: New file.
7203 * linux-aarch32-low.h: New file.
7204 * linux-arm-low.c (arm_fill_gregset): Move it to
7205 linux-aarch32-low.c.
7206 (arm_store_gregset): Likewise.
7207 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7208 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7209 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7210 (regs_info): Rename to regs_info_arm.
7211 (arm_regs_info): Return regs_info_aarch32 if
7212 have_ptrace_getregset is 1 and target description is
7213 arm_with_neon or arm_with_vfpv3.
7214 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7215 Call initialize_low_arch_aarch32 instead.
7217 2015-08-04 Yao Qi <yao.qi@linaro.org>
7219 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7220 * linux-low.c: ... here.
7221 * linux-low.h (have_ptrace_getregset): Declare it.
7223 2015-08-04 Pedro Alves <palves@redhat.com>
7225 * thread-db.c (struct thread_db): Use new typedefs.
7226 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7228 (disable_thread_event_reporting): Cast result of dlsym to
7229 destination function pointer type.
7230 (thread_db_mourn): Use td_ta_delete_ftype.
7232 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7234 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7236 (CDX_BREAKPOINT): Define for R2.
7237 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7238 (the_low_target): Add comments.
7240 2015-07-30 Yao Qi <yao.qi@linaro.org>
7242 * linux-arm-low.c (arm_hwcap): Remove it.
7243 (arm_read_description): New local variable arm_hwcap. Don't
7244 set arm_hwcap to zero.
7246 2015-07-30 Yao Qi <yao.qi@linaro.org>
7248 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7249 Use regcache->tdesc instead.
7250 (arm_store_wmmxregset): Likewise.
7251 (arm_fill_vfpregset): Likewise.
7252 (arm_store_vfpregset): Likewise.
7254 2015-07-30 Yao Qi <yao.qi@linaro.org>
7256 * linux-arm-low.c: Include arch/arm.h.
7257 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7258 (arm_store_gregset): Likewise.
7260 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7262 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7263 ptrace's 4th parameter.
7265 2015-07-27 Yao Qi <yao.qi@linaro.org>
7267 * configure.srv (case aarch64*-*-linux*): Don't set
7270 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7272 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7274 * linux-arm-low.c: Likewise.
7275 * linux-cris-low.c: Likewise.
7276 * linux-crisv32-low.c: Likewise.
7277 * linux-low.c: Likewise.
7278 * linux-m68k-low.c: Likewise.
7279 * linux-mips-low.c: Likewise.
7280 * linux-nios2-low.c: Likewise.
7281 * linux-s390-low.c: Likewise.
7282 * linux-sparc-low.c: Likewise.
7283 * linux-tic6x-low.c: Likewise.
7284 * linux-tile-low.c: Likewise.
7285 * linux-x86-low.c: Likewise.
7287 2015-07-24 Pedro Alves <palves@redhat.com>
7289 * config.in: Regenerate.
7290 * configure: Regenerate.
7292 2015-07-24 Pedro Alves <palves@redhat.com>
7294 * acinclude.m4: Include ../ptrace.m4.
7295 * configure.ac: Call GDB_AC_PTRACE.
7296 * config.in, configure: Regenerate.
7298 2015-07-24 Yao Qi <yao.qi@linaro.org>
7300 * linux-low.c (linux_create_inferior): Remove setting to
7301 proc->priv->new_inferior.
7302 (linux_attach): Likewise.
7303 (linux_low_filter_event): Likewise.
7304 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7306 2015-07-24 Yao Qi <yao.qi@linaro.org>
7308 * linux-low.c (linux_arch_setup): New function.
7309 (linux_low_filter_event): If proc->tdesc is NULL and
7310 proc->attached is true, call the_low_target.arch_setup.
7311 Otherwise, keep status pending, and return.
7312 (linux_resume_one_lwp_throw): Don't call get_pc if
7313 thread->while_stepping isn't NULL. Don't call
7314 get_thread_regcache if proc->tdesc is NULL.
7315 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7316 (linux_target_ops): Install arch_setup.
7317 * server.c (start_inferior): Call the_target->arch_setup.
7318 * target.h (struct target_ops) <arch_setup>: New field.
7319 (target_arch_setup): New marco.
7320 * lynx-low.c (lynx_target_ops): Update.
7321 * nto-low.c (nto_target_ops): Update.
7322 * spu-low.c (spu_target_ops): Update.
7323 * win32-low.c (win32_target_ops): Update.
7325 2015-07-24 Yao Qi <yao.qi@linaro.org>
7327 * linux-low.c (linux_add_process): Don't set
7328 proc->priv->new_inferior.
7329 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7330 (linux_attach): Likewise.
7332 2015-07-24 Yao Qi <yao.qi@linaro.org>
7334 * server.c (start_inferior): Code refactor.
7336 2015-07-24 Yao Qi <yao.qi@linaro.org>
7338 * server.c (process_serial_event): Set general_thread.
7340 2015-07-21 Yao Qi <yao.qi@linaro.org>
7342 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7343 aarch64_linux_get_debug_reg_capacity.
7345 2015-07-17 Yao Qi <yao.qi@linaro.org>
7347 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7348 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7349 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7350 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7351 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7352 (AARCH64_HWP_ALIGNMENT): Likewise.
7353 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7354 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7355 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7356 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7357 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7358 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7359 (struct aarch64_debug_reg_state): Likewise.
7360 (struct arch_lwp_info): Likewise.
7361 (aarch64_align_watchpoint): Likewise.
7362 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7363 (aarch64_watchpoint_length): Likewise.
7364 (aarch64_point_encode_ctrl_reg): Likewise
7365 (aarch64_point_is_aligned): Likewise.
7366 (aarch64_align_watchpoint): Likewise.
7367 (aarch64_linux_set_debug_regs):
7368 (aarch64_dr_state_insert_one_point): Likewise.
7369 (aarch64_dr_state_remove_one_point): Likewise.
7370 (aarch64_handle_breakpoint): Likewise.
7371 (aarch64_handle_aligned_watchpoint): Likewise.
7372 (aarch64_handle_unaligned_watchpoint): Likewise.
7373 (aarch64_handle_watchpoint): Likewise.
7375 2015-07-17 Yao Qi <yao.qi@linaro.org>
7377 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7378 and don't aarch64_get_debug_reg_state. All callers update.
7379 (aarch64_handle_aligned_watchpoint): Likewise.
7380 (aarch64_handle_unaligned_watchpoint): Likewise.
7381 (aarch64_handle_watchpoint): Likewise.
7382 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7383 (aarch64_remove_point): Likewise.
7385 2015-07-17 Yao Qi <yao.qi@linaro.org>
7387 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7389 (aarch64_handle_unaligned_watchpoint): Likewise.
7391 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7393 Revert the previous 3 commits:
7394 Move gdb_regex* to common/
7395 Move linux_find_memory_regions_full & co.
7396 gdbserver build-id attribute generator
7398 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7399 Jan Kratochvil <jan.kratochvil@redhat.com>
7401 gdbserver build-id attribute generator.
7402 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7403 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7404 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7406 (get_dynamic): Use find_pdhr to traverse program headers.
7407 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7408 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7409 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7410 (get_hex_build_id): New.
7411 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7412 to reply XML document.
7414 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7415 Jan Kratochvil <jan.kratochvil@redhat.com>
7417 * target.c: Include target/target-utils.h and fcntl.h.
7418 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7419 (target_fileio_read_stralloc): New functions.
7421 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7423 * Makefile.in (OBS): Add gdb_regex.o.
7425 * config.in: Rebuilt.
7426 * configure: Rebuilt.
7428 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7429 Jan Kratochvil <jan.kratochvil@redhat.com>
7431 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7432 * Makefile.in (OBS): Add target-utils.o.
7433 (linux-maps.o, target-utils.o): New.
7434 * configure.srv (srv_linux_obj): Add linux-maps.o.
7436 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7438 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7440 (the_low_target): Install it.
7442 2015-07-14 Pedro Alves <palves@redhat.com>
7444 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7445 Instead, ignore ECHILD, and throw an error for other errnos.
7447 2015-07-10 Pedro Alves <palves@redhat.com>
7449 * event-loop.c (struct callback_event) <data>: Change type to
7450 gdb_client_data instance instead of gdb_client_data pointer.
7451 (append_callback_event): Adjust.
7453 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7455 * linux-aarch64-low.c: Add comments for each linux_target_ops
7456 method. Remove comments already covered in target_ops and
7457 linux_target_ops definitions.
7458 (the_low_target): Add comments for each unimplemented method.
7460 2015-07-09 Yao Qi <yao.qi@linaro.org>
7462 * linux-aarch64-low.c (aarch64_regmap): Remove.
7463 (aarch64_usrregs_info): Remove.
7464 (regs_info): Set field usrregs to NULL.
7466 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7468 * linux-low.c: Include "rsp-low.h"
7469 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7470 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7471 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7472 (handle_btrace_enable_pt): New.
7473 (handle_btrace_general_set): Support "pt".
7474 (handle_btrace_conf_general_set): Support "pt:size".
7476 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7478 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7481 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7483 * linux-aarch64-low.c: Remove comment about endianness.
7484 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7485 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7488 2015-06-24 Gary Benson <gbenson@redhat.com>
7490 * linux-i386-ipa.c (stdint.h): Do not include.
7491 * lynx-i386-low.c (stdint.h): Likewise.
7492 * lynx-ppc-low.c (stdint.h): Likewise.
7493 * mem-break.c (stdint.h): Likewise.
7494 * thread-db.c (stdint.h): Likewise.
7495 * tracepoint.c (stdint.h): Likewise.
7496 * win32-low.c (stdint.h): Likewise.
7498 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7500 * server.c (write_qxfer_response): Update call to
7501 remote_escape_output.
7503 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7504 Jan Kratochvil <jan.kratochvil@redhat.com>
7506 Merge multiple hex conversions.
7507 * gdbreplay.c (tohex): Rename to 'fromhex'.
7508 (logchar): Use fromhex.
7510 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7512 * server.c (handle_qxfer_libraries): Set `version' attribute for
7515 2015-06-10 Gary Benson <gbenson@redhat.com>
7517 * target.h (struct target_ops) <multifs_open>: New field.
7518 <multifs_unlink>: Likewise.
7519 <multifs_readlink>: Likewise.
7520 * linux-low.c (nat/linux-namespaces.h): New include.
7521 (linux_target_ops): Initialize the_target->multifs_open,
7522 the_target->multifs_unlink and the_target->multifs_readlink.
7523 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7524 * hostio.c (hostio_fs_pid): New static variable.
7525 (hostio_handle_new_gdb_connection): New function.
7526 (handle_setfs): Likewise.
7527 (handle_open): Use the_target->multifs_open as appropriate.
7528 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7529 (handle_readlink): Use the_target->multifs_readlink as
7531 (handle_vFile): Handle vFile:setfs packets.
7532 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7533 after target_handle_new_gdb_connection.
7535 2015-06-10 Gary Benson <gbenson@redhat.com>
7537 * configure.ac (AC_CHECK_FUNCS): Add setns.
7538 * config.in: Regenerate.
7539 * configure: Likewise.
7540 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7541 (linux-namespaces.o): New rule.
7542 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7544 2015-06-09 Gary Benson <gbenson@redhat.com>
7546 * hostio.c (handle_open): Process mode argument with
7547 fileio_to_host_mode.
7549 2015-06-01 Yao Qi <yao.qi@linaro.org>
7551 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7552 * linux-x86-low.c: Likewise.
7554 2015-05-28 Don Breazeal <donb@codesourcery.com>
7556 * linux-low.c (handle_extended_wait): Initialize
7557 thread_info.last_resume_kind for new fork children.
7559 2015-05-15 Pedro Alves <palves@redhat.com>
7561 * target.h (target_handle_new_gdb_connection): Rewrite using if
7562 wrapped in do/while.
7564 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7566 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7567 * configure, config.in: Regenerate.
7568 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7571 2015-05-12 Don Breazeal <donb@codesourcery.com>
7573 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7574 PTRACE_EVENT_VFORK_DONE.
7575 (linux_low_ptrace_options, extended_event_reported): Add vfork
7577 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7578 and "vforkdone" for RSP 'T' Stop Reply Packet.
7579 * server.h (report_vfork_events): Declare
7582 2015-05-12 Don Breazeal <donb@codesourcery.com>
7584 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7585 (the_low_target) <new_fork>: Initialize new member.
7586 * linux-arm-low.c (arm_new_fork): New function.
7587 (the_low_target) <new_fork>: Initialize new member.
7588 * linux-low.c (handle_extended_wait): Call new target function
7590 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7591 * linux-mips-low.c (mips_add_watchpoint): New function
7592 extracted from mips_insert_point.
7593 (the_low_target) <new_fork>: Initialize new member.
7594 (mips_linux_new_fork): New function.
7595 (mips_insert_point): Call mips_add_watchpoint.
7596 * linux-x86-low.c (x86_linux_new_fork): New function.
7597 (the_low_target) <new_fork>: Initialize new member.
7599 2015-05-12 Don Breazeal <donb@codesourcery.com>
7601 * linux-low.c (handle_extended_wait): Implement return value,
7602 rename argument 'event_child' to 'event_lwp', handle
7603 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7604 (linux_low_ptrace_options): New function.
7605 (linux_low_filter_event): Call linux_low_ptrace_options,
7606 use different argument fo linux_enable_event_reporting,
7607 use return value from handle_extended_wait.
7608 (extended_event_reported): New function.
7609 (linux_wait_1): Call extended_event_reported and set
7610 status to report fork events.
7611 (linux_write_memory): Add pid to debug message.
7612 (reset_lwp_ptrace_options_callback): New function.
7613 (linux_handle_new_gdb_connection): New function.
7614 (linux_target_ops): Initialize new structure member.
7615 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7616 * lynx-low.c: Initialize new structure member.
7617 * remote-utils.c (prepare_resume_reply): Implement stop reason
7618 "fork" for "T" stop message.
7619 * server.c (handle_query): Call handle_new_gdb_connection.
7620 * server.h (report_fork_events): Declare global flag.
7621 * target.h (struct target_ops) <handle_new_gdb_connection>:
7623 (target_handle_new_gdb_connection): New macro.
7624 * win32-low.c: Initialize new structure member.
7626 2015-05-12 Don Breazeal <donb@codesourcery.com>
7628 * mem-break.c (APPEND_TO_LIST): Define macro.
7629 (clone_agent_expr): New function.
7630 (clone_one_breakpoint): New function.
7631 (clone_all_breakpoints): New function.
7632 * mem-break.h: Declare new functions.
7634 2015-05-12 Don Breazeal <donb@codesourcery.com>
7636 * linux-low.c (linux_supports_fork_events): New function.
7637 (linux_supports_vfork_events): New function.
7638 (linux_target_ops): Initialize new structure members.
7639 (initialize_low): Call linux_check_ptrace_features.
7640 * lynx-low.c (lynx_target_ops): Initialize new structure
7642 * server.c (report_fork_events, report_vfork_events):
7644 (handle_query): Add new features to qSupported packet and
7646 (captured_main): Initialize new global variables.
7647 * target.h (struct target_ops) <supports_fork_events>:
7649 <supports_vfork_events>: New member.
7650 (target_supports_fork_events): New macro.
7651 (target_supports_vfork_events): New macro.
7652 * win32-low.c (win32_target_ops): Initialize new structure
7655 2015-05-12 Gary Benson <gbenson@redhat.com>
7657 * server.c (handle_qxfer_exec_file): Use current process
7660 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7662 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7663 Remove HAVE_PTRACE_GETREGS conditionals.
7664 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7665 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7667 2015-05-08 Yao Qi <yao.qi@linaro.org>
7669 * linux-low.c (linux_supports_conditional_breakpoints): New
7671 (linux_target_ops): Install new target method.
7672 * lynx-low.c (lynx_target_ops): Install NULL hook for
7673 supports_conditional_breakpoints.
7674 * nto-low.c (nto_target_ops): Likewise.
7675 * spu-low.c (spu_target_ops): Likewise.
7676 * win32-low.c (win32_target_ops): Likewise.
7677 * server.c (handle_query): Check
7678 target_supports_conditional_breakpoints.
7679 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7681 (target_supports_conditional_breakpoints): New macro.
7683 2015-05-06 Pedro Alves <palves@redhat.com>
7686 * server.c (start_inferior): If the process exits, mourn it.
7688 2015-04-21 Gary Benson <gbenson@redhat.com>
7690 * hostio.c (fileio_open_flags_to_host): Factored out to
7691 fileio_to_host_openflags in common/fileio.c. Single use
7694 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7696 * linux-xtensa-low.c (xtensa_fill_gregset)
7697 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7700 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7702 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7703 (regs_info): Replace usrregs pointer with NULL.
7705 2015-04-17 Gary Benson <gbenson@redhat.com>
7707 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7708 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7709 * server.c (handle_qxfer_exec_file): New function.
7710 (qxfer_packets): Add exec-file entry.
7711 (handle_query): Report qXfer:exec-file:read as supported packet.
7713 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7715 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7717 2015-04-09 Gary Benson <gbenson@redhat.com>
7719 * hostio-errno.c (errno_to_fileio_error): Remove function.
7720 Update caller to use remote_fileio_to_fio_error.
7722 2015-04-09 Yao Qi <yao.qi@linaro.org>
7724 * linux-low.c (linux_insert_point): Call
7725 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7726 (linux_remove_point): Call remove_memory_breakpoint if type is
7728 * linux-x86-low.c (x86_insert_point): Don't call
7729 insert_memory_breakpoint.
7730 (x86_remove_point): Don't call remove_memory_breakpoint.
7732 2015-04-01 Pedro Alves <palves@redhat.com>
7733 Cleber Rosa <crosa@redhat.com>
7735 * server.c (gdbserver_usage): Reorganize and extend the usage
7738 2015-03-24 Pedro Alves <palves@redhat.com>
7740 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7741 output. Also dump TRAP_TRACE.
7742 (linux_low_filter_event): In debug output, distinguish a
7743 resume_stop SIGSTOP from a delayed SIGSTOP.
7745 2015-03-24 Gary Benson <gbenson@redhat.com>
7747 * linux-x86-low.c (x86_linux_new_thread): Moved to
7749 (x86_linux_prepare_to_resume): Likewise.
7751 2015-03-24 Gary Benson <gbenson@redhat.com>
7753 * Makefile.in (x86-linux-dregs.o): New rule.
7754 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7755 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7756 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7757 (x86_linux_dr_get): Likewise.
7758 (x86_linux_dr_set): Likewise.
7759 (update_debug_registers_callback): Likewise.
7760 (x86_linux_dr_set_addr): Likewise.
7761 (x86_linux_dr_get_addr): Likewise.
7762 (x86_linux_dr_set_control): Likewise.
7763 (x86_linux_dr_get_control): Likewise.
7764 (x86_linux_dr_get_status): Likewise.
7765 (x86_linux_update_debug_registers): Likewise.
7767 2015-03-24 Gary Benson <gbenson@redhat.com>
7769 * linux-x86-low.c (x86_linux_update_debug_registers):
7770 New function, factored out from...
7771 (x86_linux_prepare_to_resume): ...this.
7773 2015-03-24 Gary Benson <gbenson@redhat.com>
7775 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7776 (x86_linux_dr_set): Likewise.
7777 (update_debug_registers_callback): Likewise.
7778 (x86_linux_dr_set_addr): Likewise.
7779 (x86_linux_dr_get_addr): Likewise.
7780 (x86_linux_dr_set_control): Likewise.
7781 (x86_linux_dr_get_control): Likewise.
7782 (x86_linux_dr_get_status): Likewise.
7783 (x86_linux_prepare_to_resume): Likewise.
7785 2015-03-24 Gary Benson <gbenson@redhat.com>
7787 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7788 Use perror_with_name. Pass string through gettext.
7789 (x86_linux_dr_set): Likewise.
7791 2015-03-24 Gary Benson <gbenson@redhat.com>
7793 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7794 (x86_linux_dr_set_addr): ...this.
7795 (x86_dr_low_get_addr): Rename to...
7796 (x86_linux_dr_get_addr): ...this.
7797 (x86_dr_low_set_control): Rename to...
7798 (x86_linux_dr_set_control): ...this.
7799 (x86_dr_low_get_control): Rename to...
7800 (x86_linux_dr_get_control): ...this.
7801 (x86_dr_low_get_status): Rename to...
7802 (x86_linux_dr_get_status): ...this.
7803 (x86_dr_low): Update with new function names.
7805 2015-03-24 Gary Benson <gbenson@redhat.com>
7807 * Makefile.in (x86-linux.o): New rule.
7808 * configure.srv: Add x86-linux.o to relevant targets.
7809 * linux-low.c (lwp_set_arch_private_info): New function.
7810 (lwp_arch_private_info): Likewise.
7811 * linux-x86-low.c: Include nat/x86-linux.h.
7812 (arch_lwp_info): Removed structure.
7813 (update_debug_registers_callback):
7814 Use lwp_set_debug_registers_changed.
7815 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7816 and lwp_set_debug_registers_changed.
7817 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7819 2015-03-24 Gary Benson <gbenson@redhat.com>
7821 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7822 * linux-arm-low.c (arm_new_thread): Likewise.
7823 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7824 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7825 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7826 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7828 2015-03-24 Gary Benson <gbenson@redhat.com>
7830 * linux-low.c (ptid_of_lwp): New function.
7831 (lwp_is_stopped): Likewise.
7832 (lwp_stop_reason): Likewise.
7833 * linux-x86-low.c (update_debug_registers_callback):
7835 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7838 2015-03-24 Gary Benson <gbenson@redhat.com>
7840 * linux-low.h (linux_stop_lwp): Remove declaration.
7842 2015-03-24 Gary Benson <gbenson@redhat.com>
7844 * linux-low.h: Include nat/linux-nat.h.
7845 * linux-low.c (iterate_over_lwps_args): New structure.
7846 (iterate_over_lwps_filter): New function.
7847 (iterate_over_lwps): Likewise.
7848 * linux-x86-low.c (update_debug_registers_callback):
7849 Update signature to what iterate_over_lwps expects.
7850 Remove PID check that iterate_over_lwps now performs.
7851 (x86_dr_low_set_addr): Use iterate_over_lwps.
7852 (x86_dr_low_set_control): Likewise.
7854 2015-03-24 Gary Benson <gbenson@redhat.com>
7856 * linux-x86-low.c (x86_debug_reg_state): New function.
7857 (x86_linux_prepare_to_resume): Use the above.
7859 2015-03-24 Gary Benson <gbenson@redhat.com>
7861 * linux-low.c (current_lwp_ptid): New function.
7862 * linux-x86-low.c: Include nat/linux-nat.h.
7863 (x86_dr_low_get_addr): Use current_lwp_ptid.
7864 (x86_dr_low_get_control): Likewise.
7865 (x86_dr_low_get_status): Likewise.
7867 2015-03-20 Pedro Alves <palves@redhat.com>
7869 * tracepoint.c (cmd_qtstatus): Make "str" const.
7871 2015-03-20 Pedro Alves <palves@redhat.com>
7873 * server.c (handle_general_set): Make "req_str" const.
7875 2015-03-19 Pedro Alves <palves@redhat.com>
7877 * linux-low.c (linux_resume_one_lwp): Rename to ...
7878 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7879 instead call perror_with_name.
7880 (check_ptrace_stopped_lwp_gone): New function.
7881 (linux_resume_one_lwp): Reimplement as wrapper around
7882 linux_resume_one_lwp_throw that swallows errors if the LWP is
7885 2015-03-19 Pedro Alves <palves@redhat.com>
7887 * linux-low.c (count_events_callback, select_event_lwp_callback):
7888 No longer check whether the thread has resume_stop as last resume
7891 2015-03-19 Pedro Alves <palves@redhat.com>
7893 * linux-low.c (count_events_callback, select_event_lwp_callback):
7894 Use the lwp's status_pending_p field, not the thread's.
7896 2015-03-19 Pedro Alves <palves@redhat.com>
7898 * linux-low.c (select_event_lwp_callback): Update comments to
7899 no longer mention SIGTRAP.
7901 2015-03-18 Gary Benson <gbenson@redhat.com>
7903 * server.c (handle_query): Do not report vFile:fstat as supported.
7905 2015-03-11 Gary Benson <gbenson@redhat.com>
7907 * hostio.c (sys/types.h): New include.
7908 (sys/stat.h): Likewise.
7909 (common-remote-fileio.h): Likewise.
7910 (handle_fstat): New function.
7911 (handle_vFile): Handle vFile:fstat packets.
7913 2015-03-11 Gary Benson <gbenson@redhat.com>
7915 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7916 struct stat.st_blocks and struct stat.st_blksize.
7917 * configure: Regenerate.
7918 * config.in: Likewise.
7919 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7920 (OBS): Add common-remote-fileio.o.
7921 (common-remote-fileio.o): New rule.
7923 2015-03-09 Pedro Alves <palves@redhat.com>
7925 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7926 'struct sockaddr' pointer in 'accept' call.
7928 2015-03-09 Pedro Alves <palves@redhat.com>
7931 2015-03-07 Pedro Alves <palves@redhat.com>
7932 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7933 or <winsock2.h> here. Instead include "gdb_socket.h".
7934 (remote_open): Use union gdb_sockaddr_u.
7935 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7936 or <winsock2.h> here. Instead include "gdb_socket.h".
7937 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7938 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7940 (init_named_socket, gdb_agent_helper_thread): Use union
7943 2015-03-07 Pedro Alves <palves@redhat.com>
7945 * configure.ac (build_warnings): Move
7946 -Wdeclaration-after-statement to the C-specific set.
7947 * configure: Regenerate.
7949 2015-03-07 Pedro Alves <palves@redhat.com>
7951 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7952 or <winsock2.h> here. Instead include "gdb_socket.h".
7953 (remote_open): Use union gdb_sockaddr_u.
7954 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7955 or <winsock2.h> here. Instead include "gdb_socket.h".
7956 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7957 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7959 (init_named_socket, gdb_agent_helper_thread): Use union
7962 2015-03-07 Pedro Alves <palves@redhat.com>
7964 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7967 2015-03-06 Yao Qi <yao.qi@linaro.org>
7969 * linux-aarch64-low.c (aarch64_insert_point): Use
7970 show_debug_regs as a boolean.
7971 (aarch64_remove_point): Likewise.
7973 2015-03-05 Pedro Alves <palves@redhat.com>
7975 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7976 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7977 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7978 * nto-low.c (nto_target_ops): Likewise.
7979 * spu-low.c (spu_target_ops): Likewise.
7980 * win32-low.c (win32_target_ops): Likewise.
7982 2015-03-04 Pedro Alves <palves@redhat.com>
7984 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7985 Decide whether a breakpoint triggered based on the SIGTRAP's
7987 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7988 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7989 (linux_low_filter_event): Check for breakpoints before checking
7991 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7993 (linux_stopped_by_sw_breakpoint)
7994 (linux_supports_stopped_by_sw_breakpoint)
7995 (linux_stopped_by_hw_breakpoint)
7996 (linux_supports_stopped_by_hw_breakpoint): New functions.
7997 (linux_target_ops): Install new target methods.
7999 2015-03-04 Pedro Alves <palves@redhat.com>
8001 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8002 * server.c (swbreak_feature, hwbreak_feature): New globals.
8003 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8004 (captured_main): Clear swbreak_feature and hwbreak_feature.
8005 * server.h (swbreak_feature, hwbreak_feature): Declare.
8006 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8007 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8008 supports_stopped_by_hw_breakpoint>: New fields.
8009 (target_supports_stopped_by_sw_breakpoint)
8010 (target_stopped_by_sw_breakpoint)
8011 (target_supports_stopped_by_hw_breakpoint)
8012 (target_stopped_by_hw_breakpoint): Declare.
8014 2015-03-04 Pedro Alves <palves@redhat.com>
8016 enum lwp_stop_reason -> enum target_stop_reason
8017 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8018 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8019 (linux_wait_1, stuck_in_jump_pad_callback)
8020 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8021 (linux_stopped_by_watchpoint):
8022 * linux-low.h (enum lwp_stop_reason): Delete.
8023 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8024 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8026 2015-03-04 Yao Qi <yao.qi@linaro.org>
8028 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8030 2015-03-03 Gary Benson <gbenson@redhat.com>
8032 * hostio.c (handle_vFile): Fix prefix lengths.
8034 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8036 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8039 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8041 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8042 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8043 (clean): Add "rm -f" for above C files.
8044 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8045 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8046 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8047 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8048 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8049 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8050 (init_registers_s390x_vx_linux64)
8051 (init_registers_s390x_tevx_linux64)
8052 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8053 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8055 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8056 (s390_store_vxrs_high): New functions.
8057 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8059 (s390_arch_setup): Add logic for selecting one of the new target
8060 descriptions. Activate the new vector regsets if applicable.
8061 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8062 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8063 and init_registers_s390x_tevx_linux64.
8065 2015-03-01 Pedro Alves <palves@redhat.com>
8067 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8070 2015-02-27 Pedro Alves <palves@redhat.com>
8072 * linux-x86-low.c (u_debugreg_offset): New function.
8073 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8075 2015-02-27 Pedro Alves <palves@redhat.com>
8077 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8078 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8079 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8080 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8081 (ps_lsetfpregs, ps_getpid)
8082 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8083 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8084 (ps_lsetxregs, ps_plog): Declare.
8086 2015-02-27 Pedro Alves <palves@redhat.com>
8088 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8089 IP_AGENT_EXPORT_FUNC.
8090 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8091 IP_AGENT_EXPORT_FUNC.
8092 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8093 (IP_AGENT_EXPORT): Delete.
8094 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8095 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8096 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8097 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8098 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8099 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8100 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8101 (traceframe_read_count, traceframe_write_count)
8102 (traceframes_created, trace_state_variables, get_raw_reg)
8103 (get_trace_state_variable_value, set_trace_state_variable_value)
8104 (ust_loaded, helper_thread_id, cmd_buf): Use
8105 IPA_SYM_EXPORTED_NAME.
8106 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8107 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8108 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8109 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8110 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8111 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8112 EXTERN_C_PUSH/EXTERN_C_POP.
8113 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8114 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8115 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8116 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8117 (traceframe_write_count, traceframe_read_count)
8118 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8119 (about_to_request_buffer_space, get_trace_state_variable_value)
8120 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8121 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8122 EXTERN_C_PUSH/EXTERN_C_POP.
8123 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8124 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8125 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8126 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8127 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8128 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8129 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8130 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8132 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8133 (IP_AGENT_EXPORT_VAR_DECL): Define.
8135 (gdb_agent_get_raw_reg): Declare.
8137 2015-02-27 Tom Tromey <tromey@redhat.com>
8138 Pedro Alves <palves@redhat.com>
8140 Rename symbols whose names are reserved C++ keywords throughout.
8142 2015-02-27 Pedro Alves <palves@redhat.com>
8144 * Makefile.in (COMPILER): New, get it from autoconf.
8145 (CXX): Get from autoconf instead.
8146 (COMPILE.pre): Use COMPILER.
8147 (CC-LD): Rename to ...
8148 (CC_LD): ... this. Use COMPILER.
8149 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8150 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8151 * acinclude.m4: Include build-with-cxx.m4.
8152 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8153 Disable -Werror by default if building in C++ mode.
8154 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8155 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8156 the C++ compiler. Save/restore CXXFLAGS too.
8157 * configure: Regenerate.
8159 2015-02-27 Pedro Alves <palves@redhat.com>
8161 * acinclude.m4: Include libiberty.m4.
8162 * configure.ac: Call libiberty_INIT.
8163 * config.in, configure: Regenerate.
8165 2015-02-26 Pedro Alves <palves@redhat.com>
8167 * linux-low.c (linux_wait_1): When incrementing the PC past a
8168 program breakpoint always use the_low_target.breakpoint_len as
8169 increment, rather than the maximum between that and
8170 the_low_target.decr_pc_after_break.
8172 2015-02-23 Pedro Alves <palves@redhat.com>
8174 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8175 thread was doing a step-over; always adjust the PC if
8176 we stepped over a permanent breakpoint.
8177 (linux_wait_1): If we stepped over breakpoint that was on top of a
8178 permanent breakpoint, manually advance the PC past it.
8180 2015-02-23 Pedro Alves <palves@redhat.com>
8182 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8184 (x86_fill_gregset, x86_store_gregset): Use it when handling
8187 2015-02-20 Pedro Alves <palves@redhat.com>
8189 * thread-db.c: Include "nat/linux-procfs.h".
8190 (thread_db_init): Skip listing new threads if the kernel supports
8191 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8193 2015-02-20 Pedro Alves <palves@redhat.com>
8195 * linux-low.c (status_pending_p_callback): Use ptid_match.
8197 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8199 PR breakpoints/16812
8200 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8201 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8202 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8204 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8206 PR breakpoints/15956
8207 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8209 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8211 * linux-low.c (linux_low_btrace_conf): Print size.
8212 * server.c (handle_btrace_conf_general_set): New.
8213 (hanle_general_set): Call handle_btrace_conf_general_set.
8214 (handle_query): Report Qbtrace-conf:bts:size as supported.
8216 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8218 * linux-low.c (linux_low_enable_btrace): Update parameters.
8219 (linux_low_btrace_conf): New.
8220 (linux_target_ops)<to_btrace_conf>: Initialize.
8221 * server.c (current_btrace_conf): New.
8222 (handle_btrace_enable): Rename to ...
8223 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8224 to target_enable_btrace. Update comment. Update users.
8225 (handle_qxfer_btrace_conf): New.
8226 (qxfer_packets): Add btrace-conf entry.
8227 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8228 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8229 (target_ops)<read_btrace_conf>: New.
8230 (target_enable_btrace): Update parameters.
8231 (target_read_btrace_conf): New.
8233 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8235 * server.c (handle_btrace_general_set): Remove call to
8236 target_supports_btrace.
8237 (supported_btrace_packets): New.
8238 (handle_query): Call supported_btrace_packets.
8239 * target.h: include btrace-common.h.
8240 (btrace_target_info): Removed.
8241 (supports_btrace, target_supports_btrace): Update parameters.
8243 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8245 * Makefile.in (SFILES): Add common/btrace-common.c.
8246 (OBS): Add common/btrace-common.o.
8247 (btrace-common.o): Add build rules.
8248 * linux-low: Include btrace-common.h.
8249 (linux_low_read_btrace): Use struct btrace_data. Call
8250 btrace_data_init and btrace_data_fini.
8252 2015-02-06 Pedro Alves <palves@redhat.com>
8254 * thread-db.c (find_new_threads_callback): Add debug output.
8256 2015-02-04 Pedro Alves <palves@redhat.com>
8258 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8259 (resume_stopped_resumed_lwps): New function.
8260 (linux_wait_for_event_filtered): Use it.
8262 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8264 * Makefile.in (SFILES): Add linux-personality.c.
8265 (linux-personality.o): New rule.
8266 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8267 list of objects to be built.
8268 * linux-low.c: Include nat/linux-personality.h.
8269 (linux_create_inferior): Remove code to disable address space
8270 randomization (moved to ../nat/linux-personality.c). Create
8271 cleanup to disable address space randomization.
8273 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8275 * Makefile.in (posix-strerror.o): New rule.
8276 (mingw-strerror.o): Likewise.
8277 * configure: Regenerated.
8278 * configure.ac: Source file ../common/common.host. Initialize new
8279 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8281 2015-01-14 Yao Qi <yao@codesourcery.com>
8283 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8284 (ppc-linux.o): New rule.
8285 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8286 * configure.ac: AC_CHECK_FUNCS(getauxval).
8287 * config.in: Re-generated.
8288 * configure: Re-generated.
8289 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8290 ppc64_64bit_inferior_p
8292 2015-01-14 Yao Qi <yao@codesourcery.com>
8294 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8295 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8296 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8297 (PT_ORIG_R3, PT_TRAP): Likewise.
8298 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8299 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8300 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8302 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8304 * i387-fp.c (i387_cache_to_xsave): In look over
8305 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8306 zmmh_low_space field by use of zmmh_high_space.
8308 2015-01-09 Pedro Alves <palves@redhat.com>
8310 * linux-low.c (step_over_bkpt): Move higher up in the file.
8311 (handle_extended_wait): Don't store the stop_pc here.
8312 (get_stop_pc): Adjust comments and rename to ...
8313 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8314 stopped for a software breakpoint or hardware breakpoint.
8315 (thread_still_has_status_pending_p): New function.
8316 (status_pending_p_callback): Use
8317 thread_still_has_status_pending_p. If the event is no longer
8318 interesting, resume the LWP.
8319 (handle_tracepoints): Add assert.
8320 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8321 (wstatus_maybe_breakpoint): New function.
8322 (cancel_breakpoint): Delete function.
8323 (check_stopped_by_watchpoint): New function, factored out from
8324 linux_low_filter_event.
8325 (lp_status_maybe_breakpoint): Delete function.
8326 (linux_low_filter_event): Remove filter_ptid argument.
8327 Leave thread group exits pending here. Store the LWP's stop PC.
8328 Always leave events pending.
8329 (linux_wait_for_event_filtered): Pull all events out of the
8330 kernel, and leave them all pending.
8331 (count_events_callback, select_event_lwp_callback): Consider all
8333 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8334 (select_event_lwp): Only give preference to the stepping LWP in
8335 all-stop mode. Adjust comments.
8336 (ignore_event): New function.
8337 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8338 references to cancel_breakpoints. Adjust to renames. Also give
8339 equal priority to all LWPs that have had events in non-stop mode.
8340 If reporting a software breakpoint event, unadjust the LWP's PC.
8341 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8342 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8344 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8345 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8346 (linux_stopped_by_watchpoint): Adjust.
8347 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8348 * linux-low.h (enum lwp_stop_reason): New.
8349 (struct lwp_info) <stop_pc>: Adjust comment.
8350 <stopped_by_watchpoint>: Delete field.
8351 <stop_reason>: New field.
8352 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8353 * mem-break.c (software_breakpoint_inserted_here)
8354 (hardware_breakpoint_inserted_here): New function.
8355 * mem-break.h (software_breakpoint_inserted_here)
8356 (hardware_breakpoint_inserted_here): Declare.
8357 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8358 (cancel_breakpoints): Delete.
8359 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8360 (upload_fast_traceframes): Remove references to
8363 2015-01-09 Pedro Alves <palves@redhat.com>
8365 * thread-db.c (find_new_threads_callback): Ignore thread if the
8366 kernel thread ID is -1.
8368 2015-01-09 Pedro Alves <palves@redhat.com>
8370 * linux-low.c (linux_attach_fail_reason_string): Move to
8371 nat/linux-ptrace.c, and rename.
8372 (linux_attach_lwp): Update comment.
8373 (attach_proc_task_lwp_callback): New function.
8374 (linux_attach): Adjust to rename and use
8375 linux_proc_attach_tgid_threads.
8376 (linux_attach_fail_reason_string): Delete declaration.
8378 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8380 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8381 * server.c (gdbserver_version): Likewise.
8383 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8385 * remote-utils.c: Include ctype.h.
8386 (input_interrupt): Explicitly handle the case when the char
8387 received is the NUL byte. Improve the printing of non-ASCII
8390 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8392 * linux-low.c (linux_low_filter_event): Update call to
8393 linux_enable_event_reporting following the addition of
8394 a new parameter to that function.
8396 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8399 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8400 (AARCH64_FPCR_REGNO): Likewise.
8401 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8402 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8403 (aarch64_store_fpregset): Likewise.
8405 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8407 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8408 Remove FIXME comment about assumption about N.
8410 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8412 * configure.ac: If large-file support is disabled in GDBserver,
8413 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8414 * configure: Regenerate.
8416 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8418 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8419 warning upon ENODATA from ptrace.
8420 * linux-s390-low.c (s390_store_tdb): New.
8421 (s390_regsets): Add regset for NT_S390_TDB.
8423 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8425 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8426 without a fill_function.
8427 * linux-s390-low.c (s390_fill_last_break): Remove.
8428 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8429 (s390_arch_setup): Use regset's size instead of fill_function for
8432 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8434 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8435 the regset's store function when ptrace returned an error.
8436 * regcache.c (get_thread_regcache): Invalidate register cache
8437 before fetching inferior's registers.
8439 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8441 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8442 while-loop as for-loop.
8443 (regsets_store_inferior_registers): Likewise.
8445 2014-11-28 Yao Qi <yao@codesourcery.com>
8447 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8448 * config.in, configure: Re-generate.
8449 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8452 2014-11-21 Yao Qi <yao@codesourcery.com>
8454 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8455 (AC_CHECK_HEADERS): Remove malloc.h.
8456 * configure: Re-generated.
8457 * config.in: Re-generated.
8458 * server.h: Don't include alloca.h and malloc.h.
8459 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8460 Don't include malloc.h.
8462 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8464 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8465 corresponding ERRNO check in same block.
8467 2014-11-12 Pedro Alves <palves@redhat.com>
8469 * server.c (cont_thread): Update comment.
8470 (start_inferior, attach_inferior): No longer clear cont_thread.
8471 (handle_v_cont): No longer set cont_thread.
8472 (captured_main): Clear cont_thread each time a GDB connects.
8474 2014-11-12 Pedro Alves <palves@redhat.com>
8476 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8477 thread, and don't resume all threads if the Hc thread has exited.
8479 2014-11-12 Pedro Alves <palves@redhat.com>
8481 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8482 the process group instead of to a specific LWP.
8484 2014-10-15 Pedro Alves <palves@redhat.com>
8487 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8489 (arm_set_thread_context): Delete.
8490 (the_low_target): Adjust.
8491 * win32-i386-low.c (debug_registers_changed)
8492 (debug_registers_used): Delete.
8493 (update_debug_registers_callback): New function.
8494 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8495 needing to update their debug registers.
8496 (win32_get_current_dr): New function.
8497 (x86_dr_low_get_addr, x86_dr_low_get_control)
8498 (x86_dr_low_get_status): Fetch the debug register from the thread
8500 (i386_initial_stuff): Adjust.
8501 (i386_get_thread_context): Remove current_event parameter. Don't
8502 clear debug_registers_changed nor copy DR values to
8504 (i386_set_thread_context): Delete.
8505 (i386_prepare_to_resume): New function.
8506 (i386_thread_added): Mark the thread as needing to update irs
8508 (the_low_target): Remove i386_set_thread_context and install
8509 i386_prepare_to_resume.
8510 * win32-low.c (win32_get_thread_context): Adjust.
8511 (win32_set_thread_context): Use SetThreadContext
8513 (win32_prepare_to_resume): New function.
8514 (win32_require_context): New function, factored out from ...
8515 (thread_rec): ... this.
8516 (continue_one_thread): Call win32_prepare_to_resume on each thread
8517 we're about to continue.
8518 (win32_resume): Call win32_prepare_to_resume on the event thread.
8519 * win32-low.h (struct win32_thread_info)
8520 <debug_registers_changed>: New field.
8521 (struct win32_target_ops): Change prototype of set_thread_context,
8522 delete set_thread_context and add prepare_to_resume.
8523 (win32_require_context): New declaration.
8525 2014-10-08 Gary Benson <gbenson@redhat.com>
8527 * server.h: Do not include common-exceptions.h.
8529 2014-10-08 Gary Benson <gbenson@redhat.com>
8531 * server.h: Do not include cleanups.h.
8533 2014-09-30 James Hogan <james.hogan@imgtec.com>
8535 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8538 2014-09-23 Yao Qi <yao@codesourcery.com>
8540 * linux-low.c (lp_status_maybe_breakpoint): New function.
8541 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8542 (count_events_callback): Likewise.
8543 (select_event_lwp_callback): Likewise.
8544 (cancel_breakpoints_callback): Likewise.
8546 2014-09-19 Don Breazeal <donb@codesourcery.com>
8548 * linux-low.c (handle_extended_wait): Call
8549 linux_ptrace_get_extended_event.
8550 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8551 linux_is_extended_waitstatus.
8553 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8555 * Makefile.in (CPPFLAGS): Define.
8556 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8557 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8559 2014-09-16 Gary Benson <gbenson@redhat.com>
8561 * inferiors.h (current_inferior): Renamed as...
8562 (current_thread): New variable. All uses updated.
8563 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8564 (maybe_move_out_of_jump_pad): Likewise.
8565 (cancel_breakpoint): Likewise.
8566 (linux_low_filter_event): Likewise.
8567 (wait_for_sigstop): Likewise.
8568 (linux_resume_one_lwp): Likewise.
8569 (need_step_over_p): Likewise.
8570 (start_step_over): Likewise.
8571 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8572 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8573 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8574 and save_inferior as saved_thread.
8575 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8577 (regcache_invalidate_thread): Likewise.
8578 * remote-utils.c (prepare_resume_reply): Likewise.
8579 * thread-db.c (thread_db_get_tls_address): Likewise.
8580 (disable_thread_event_reporting): Likewise.
8581 (remove_thread_event_breakpoints): Likewise.
8582 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8584 * target.h (set_desired_inferior): Renamed as...
8585 (set_desired_thread): New declaration. All uses updated.
8586 * server.c (myresume): Updated comment to reference thread instead
8588 (handle_serial_event): Likewise.
8589 (handle_target_event): Likewise.
8591 2014-09-12 Tom Tromey <tromey@redhat.com>
8592 Gary Benson <gbenson@redhat.com>
8594 * regcache.h: Include common-regcache.h.
8595 (regcache_read_pc): Don't declare.
8596 * regcache.c (get_thread_regcache_for_ptid): New function.
8598 2014-09-11 Tom Tromey <tromey@redhat.com>
8599 Gary Benson <gbenson@redhat.com>
8601 * symbol.c: New file.
8602 * Makefile.in (SFILES): Add symbol.c.
8603 (OBS): Add symbol.o.
8605 2014-09-11 Gary Benson <gbenson@redhat.com>
8607 * target.c (target_stop_ptid, target_continue_ptid): New
8610 2014-09-11 Tom Tromey <tromey@redhat.com>
8611 Gary Benson <gbenson@redhat.com>
8613 * target.h: Include target/target.h.
8614 * target.c (target_read_memory, target_read_uint32)
8615 (target_write_memory): New functions.
8617 2014-09-11 Gary Benson <gbenson@redhat.com>
8619 * server.h (debug_hw_points): Don't declare.
8620 * server.c (debug_hw_points): Don't define. Replace all uses
8621 with show_debug_regs.
8622 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8623 all uses with show_debug_regs.
8625 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8627 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8628 endianness into account.
8629 (ppc_supply_ptrace_register): Likewise.
8631 2014-09-03 James Hogan <james.hogan@imgtec.com>
8633 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8634 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8636 2014-09-03 Gary Benson <gbenson@redhat.com>
8638 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8639 ALL_DEBUG_ADDRESS_REGISTERS.
8641 2014-09-02 Gary Benson <gbenson@redhat.com>
8643 * i386-low.h: Renamed as...
8644 * x86-low.h: New file. All type, function and variable name
8645 prefixes changed from "i386_" to "x86_". All references updated.
8646 * i386-low.c: Renamed as...
8647 * x86-low.c: New file. All type, function and variable name
8648 prefixes changed from "i386_" to "x86_". All references updated.
8650 2014-09-02 Gary Benson <gbenson@redhat.com>
8652 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8653 (x86_linux_new_thread): Likewise.
8655 2014-08-29 Gary Benson <gbenson@redhat.com>
8657 * server.h (setjmp.h): Do not include.
8658 (toplevel): Do not declare.
8659 (common-exceptions.h): Include.
8660 (cleanups.h): Likewise.
8661 * server.c (toplevel): Do not define.
8662 (exit_code): New static global.
8663 (detach_or_kill_for_exit_cleanup): New function.
8664 (main): New function. Original main renamed to...
8665 (captured_main): New function.
8666 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8668 2014-08-29 Gary Benson <gbenson@redhat.com>
8670 * Makefile.in (SFILES): Add common/common-exceptions.c.
8671 (OBS): Add common-exceptions.o.
8672 (common-exceptions.o): New rule.
8673 * utils.c (prepare_to_throw_exception): New function.
8675 2014-08-29 Gary Benson <gbenson@redhat.com>
8677 * config.in: Regenerate.
8678 * configure: Likewise.
8680 2014-08-29 Gary Benson <gbenson@redhat.com>
8682 * Makefile.in (SFILES): Add common/cleanups.c.
8684 (cleanups.o): New rule.
8686 2014-08-29 Gary Benson <gbenson@redhat.com>
8688 * utils.c (internal_vwarning): New function.
8690 2014-08-28 Gary Benson <gbenson@redhat.com>
8692 * utils.h (fatal): Remove declaration.
8693 * utils.c (fatal): Remove function.
8695 2014-08-28 Gary Benson <gbenson@redhat.com>
8697 * tracepoint.c (gdb_agent_init): Replace fatal with
8699 (initialize_tracepoint): Likewise.
8701 2014-08-28 Gary Benson <gbenson@redhat.com>
8703 * remote-utils.c (remote_prepare): Replace fatal with error.
8705 2014-08-28 Gary Benson <gbenson@redhat.com>
8707 * linux-low.c (linux_async): Replace fatal with warning.
8709 (linux_start_non_stop): Return -1 if linux_async failed.
8711 2014-08-28 Gary Benson <gbenson@redhat.com>
8713 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8715 (i386_dr_low_get_addr): Remove vague comment.
8716 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8719 2014-08-28 Gary Benson <gbenson@redhat.com>
8721 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8722 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8724 (linux_resume_one_lwp): Likewise.
8725 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8727 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8728 with internal_error.
8729 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8730 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8731 (find_register_by_name): Replace fatal with internal_error.
8732 (find_regno): Likewise.
8733 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8734 * thread-db.c (thread_db_create_event): Likewise.
8735 (thread_db_load_search): Likewise.
8736 (try_thread_db_load_1): Likewise.
8737 * tracepoint.c (get_jump_space_head): Replace fatal with
8739 (claim_trampoline_space): Likewise.
8740 (have_fast_tracepoint_trampoline_buffer): Likewise.
8741 (cmd_qtstart): Likewise.
8742 (stop_tracing): Likewise.
8743 (fast_tracepoint_collecting): Likewise.
8744 (target_malloc): Likewise.
8745 (download_tracepoint): Likewise.
8746 (download_trace_state_variables): Replace check with gdb_assert.
8747 (upload_fast_traceframes): Replace fatal with internal_error.
8749 2014-08-19 Tom Tromey <tromey@redhat.com>
8750 Gary Benson <gbenson@redhat.com>
8752 * Makefile.in (SFILES): Add common/common-debug.c.
8753 (OBS): Add common-debug.o.
8754 (common-debug.o): New rule.
8755 * debug.h (debug_printf): Don't declare.
8756 * debug.c (debug_printf): Renamed and rewritten as...
8757 (debug_vprintf): New function.
8759 2014-08-19 Gary Benson <gbenson@redhat.com>
8761 * utils.h: Do not include print-utils.h.
8763 2014-08-19 Tom Tromey <tromey@redhat.com>
8764 Gary Benson <gbenson@redhat.com>
8766 * server.h: Add static assertion.
8767 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8769 2014-08-19 Tom Tromey <tromey@redhat.com>
8770 Gary Benson <gbenson@redhat.com>
8772 * Makefile.in (SFILES): Add common/errors.c.
8773 (OBS): Add errors.o.
8774 (IPA_OBS): Add errors-ipa.o.
8775 (errors.o): New rule.
8776 (errors-ipa.o): Likewise.
8777 * utils.h (perror_with_name, error, warning): Don't declare.
8778 * utils.c (warning): Renamed and rewritten as...
8779 (vwarning): New function.
8780 (error): Renamed and rewritten as...
8781 (verror): New function.
8782 (internal_error): Renamed and rewritten as...
8783 (internal_verror): New function.
8785 2014-08-07 Gary Benson <gbenson@redhat.com>
8787 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8788 * configure: Regenerate.
8789 * config.in: Likewise.
8790 * server.h: Do not include errno.h.
8791 * event-loop.c: Likewise.
8792 * hostio-errno.c: Likewise.
8793 * linux-low.c: Likewise.
8794 * remote-utils.c: Likewise.
8795 * spu-low.c: Likewise.
8796 * utils.c: Likewise.
8797 * gdbreplay.c: Unconditionally include errno.h.
8799 2014-08-07 Gary Benson <gbenson@redhat.com>
8801 * server.h: Do not include string.h.
8802 * event-loop.c: Likewise.
8803 * linux-low.c: Likewise.
8804 * regcache.c: Likewise.
8805 * remote-utils.c: Likewise.
8806 * spu-low.c: Likewise.
8807 * utils.c: Likewise.
8809 2014-08-07 Gary Benson <gbenson@redhat.com>
8811 * server.h: Do not include gdb_assert.h.
8813 2014-08-07 Gary Benson <gbenson@redhat.com>
8815 * server.h: Do not include common-utils.h.
8817 2014-08-07 Gary Benson <gbenson@redhat.com>
8819 * server.h: Do not include ptid.h.
8820 * notif.h: Likewise.
8822 2014-08-07 Gary Benson <gbenson@redhat.com>
8824 * server.h: Do not include gdb_locale.h.
8826 2014-08-07 Gary Benson <gbenson@redhat.com>
8828 * server.h: Do not include gdb/signals.h.
8829 * win32-low.c: Likewise.
8831 2014-08-07 Gary Benson <gbenson@redhat.com>
8833 * server.h: Do not include pathmax.h.
8835 2014-08-07 Gary Benson <gbenson@redhat.com>
8837 * server.h: Do not include libiberty.h.
8838 * linux-bfin-low.c: Likewise.
8840 2014-08-07 Gary Benson <gbenson@redhat.com>
8842 * server.h: Do not include ansidecl.h.
8844 2014-08-07 Gary Benson <gbenson@redhat.com>
8846 * linux-x86-low.c: Do not include stddef.h.
8847 * lynx-ppc-low.c: Likewise.
8848 * tracepoint.c: Likewise.
8850 2014-08-07 Gary Benson <gbenson@redhat.com>
8852 * server.h: Do not include stdarg.h.
8853 * nto-low.c: Likewise.
8855 2014-08-07 Gary Benson <gbenson@redhat.com>
8857 * server.h: Do not include stdlib.h.
8858 * inferiors.c: Likewise.
8859 * linux-low.c: Likewise.
8860 * regcache.c: Likewise.
8861 * spu-low.c: Likewise.
8862 * tracepoint.c: Likewise.
8863 * utils.c: Likewise.
8865 2014-08-07 Gary Benson <gbenson@redhat.com>
8867 * server.h: Do not include stdio.h.
8868 * linux-low.c: Likewise.
8869 * remote-utils.c: Likewise.
8870 * spu-low.c: Likewise.
8871 * utils.c: Likewise.
8872 * wincecompat.c: Likewise.
8874 2014-08-06 Gary Benson <gbenson@redhat.com>
8876 * regcache.c (init_register_cache): Move conditionals inside if.
8878 2014-08-06 Gary Benson <gbenson@redhat.com>
8880 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8882 2014-07-31 Gary Benson <gbenson@redhat.com>
8884 * ax.h: Do not include server.h.
8885 * gdbthread.h: Likewise.
8886 * lynx-low.h: Likewise.
8887 * notif.h: Likewise.
8889 2014-07-30 Gary Benson <gbenson@redhat.com>
8891 * server.h: Include common-defs.h.
8892 Do not include config.h or build-gnulib-gdbserver/config.h.
8894 2014-07-30 Gary Benson <gbenson@redhat.com>
8896 * hostio-errno.c: Move server.h to top of includes list.
8897 * inferiors.c: Likewise.
8898 * linux-x86-low.c: Likewise.
8899 * notif.c: Include server.h.
8901 2014-07-24 Tom Tromey <tromey@redhat.com>
8902 Gary Benson <gbenson@redhat.com>
8904 * server.h (CORE_ADDR): Now unsigned.
8906 2014-07-16 Pedro Alves <palves@redhat.com>
8908 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8910 2014-07-15 Pedro Alves <palves@redhat.com>
8912 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8915 2014-07-11 Pedro Alves <palves@redhat.com>
8917 * linux-low.c (kill_wait_lwp): New function, based on
8918 kill_one_lwp_callback, but use my_waitpid directly.
8919 (kill_one_lwp_callback, linux_kill): Use it.
8921 2014-06-23 Pedro Alves <palves@redhat.com>
8923 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8924 before setting DR0..DR3.
8926 2014-06-20 Gary Benson <gbenson@redhat.com>
8928 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8929 * configure: Regenerated.
8930 * config.in: Likewise.
8932 2014-06-20 Gary Benson <gbenson@redhat.com>
8934 * Makefile.in (SFILES): Update locations for files moved
8936 (object file files): Reordered.
8938 2014-06-20 Gary Benson <gbenson@redhat.com>
8940 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8941 (i386_dr_low_set_addr): Likewise.
8942 (i386_dr_low_get_addr): Likewise.
8943 (i386_dr_low_can_set_control): Likewise.
8944 (i386_dr_low_set_control): Likewise.
8945 (i386_dr_low_get_control): Likewise.
8946 (i386_dr_low_get_status): Likewise.
8947 (i386_get_debug_register_length): Likewise.
8948 * linux-x86-low.c (i386_dr_low_set_addr):
8949 Changed signature. Made static.
8950 (i386_dr_low_get_addr): Likewise.
8951 (i386_dr_low_set_control): Likewise.
8952 (i386_dr_low_get_control): Likewise.
8953 (i386_dr_low_get_status): Likewise.
8954 (i386_dr_low): New global variable.
8955 * win32-i386-low.c (i386_dr_low_set_addr):
8956 Changed signature. Made static.
8957 (i386_dr_low_get_addr): Likewise.
8958 (i386_dr_low_set_control): Likewise.
8959 (i386_dr_low_get_control): Likewise.
8960 (i386_dr_low_get_status): Likewise.
8961 (i386_dr_low): New global variable.
8963 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8965 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8966 * Makefile.in (AR, AR_FLAGS): Define.
8967 * configure: Regenerate.
8969 2014-06-19 Gary Benson <gbenson@redhat.com>
8971 * Makefile.in (i386-dregs.o): New rule.
8972 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8973 * i386-low.c (target.h): Remove include.
8974 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8975 (DR_CONTROL_SHIFT): Likewise.
8976 (DR_CONTROL_SIZE): Likewise.
8977 (DR_RW_EXECUTE): Likewise.
8978 (DR_RW_WRITE): Likewise.
8979 (DR_RW_READ): Likewise.
8980 (DR_RW_IORW): Likewise.
8981 (DR_LEN_1): Likewise.
8982 (DR_LEN_2): Likewise.
8983 (DR_LEN_4): Likewise.
8984 (DR_LEN_8): Likewise.
8985 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8986 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8987 (DR_ENABLE_SIZE): Likewise.
8988 (DR_LOCAL_SLOWDOWN): Likewise.
8989 (DR_GLOBAL_SLOWDOWN): Likewise.
8990 (DR_CONTROL_RESERVED): Likewise.
8991 (I386_DR_CONTROL_MASK): Likewise.
8992 (I386_DR_VACANT): Likewise.
8993 (I386_DR_LOCAL_ENABLE): Likewise.
8994 (I386_DR_GLOBAL_ENABLE): Likewise.
8995 (I386_DR_DISABLE): Likewise.
8996 (I386_DR_SET_RW_LEN): Likewise.
8997 (I386_DR_GET_RW_LEN): Likewise.
8998 (I386_DR_WATCH_HIT): Likewise.
8999 (i386_wp_op_t): Likewise.
9000 (i386_show_dr): Likewise.
9001 (i386_length_and_rw_bits): Likewise.
9002 (i386_insert_aligned_watchpoint): Likewise.
9003 (i386_remove_aligned_watchpoint): Likewise.
9004 (i386_handle_nonaligned_watchpoint): Likewise.
9005 i386_update_inferior_debug_regs(): Likewise.
9006 (i386_dr_insert_watchpoint): Likewise.
9007 (i386_dr_remove_watchpoint): Likewise.
9008 (i386_dr_region_ok_for_watchpoint): Likewise.
9009 (i386_dr_stopped_data_address): Likewise.
9010 (i386_dr_stopped_by_watchpoint): Likewise.
9012 2014-06-19 Gary Benson <gbenson@redhat.com>
9014 * i386-low.c (i386_dr_show): Renamed to
9015 i386_show_dr and made static. All uses updated.
9016 (i386_dr_length_and_rw_bits): Renamed to
9017 i386_length_and_rw_bits and made static.
9019 (i386_dr_insert_aligned_watchpoint): Renamed to
9020 i386_insert_aligned_watchpoint and made static.
9022 (i386_dr_remove_aligned_watchpoint): Renamed to
9023 i386_remove_aligned_watchpoint and made static.
9025 (i386_dr_update_inferior_debug_regs): Renamed to
9026 i386_update_inferior_debug_regs and made static.
9029 2014-06-18 Gary Benson <gbenson@redhat.com>
9031 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9032 (i386_dr_low_can_set_control): Likewise.
9033 (i386_get_debug_register_length): Likewise.
9034 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9035 (i386_dr_low_can_set_control): Likewise.
9036 (i386_get_debug_register_length): Likewise.
9038 2014-06-17 Gary Benson <gbenson@redhat.com>
9040 * i386-low.h (i386-dregs.h): New include.
9041 (DR_FIRSTADDR): Now in i386-dregs.h.
9042 (DR_LASTADDR): Likewise.
9043 (DR_NADDR): Likewise.
9044 (DR_STATUS): Likewise.
9045 (DR_CONTROL): Likewise.
9046 (i386_debug_reg_state): Likewise.
9047 (i386_dr_insert_watchpoint): Likewise.
9048 (i386_dr_remove_watchpoint): Likewise.
9049 (i386_dr_region_ok_for_watchpoint): Likewise.
9050 (i386_dr_stopped_data_address): Likewise.
9051 (i386_dr_stopped_by_watchpoint): Likewise.
9052 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9054 2014-06-18 Gary Benson <gbenson@redhat.com>
9056 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9057 i386_dr_insert_watchpoint.
9058 (i386_low_remove_watchpoint): Renamed to
9059 i386_dr_remove_watchpoint.
9060 (i386_low_region_ok_for_watchpoint): Renamed to
9061 i386_dr_region_ok_for_watchpoint.
9062 (i386_low_stopped_data_address): Renamed to
9063 i386_dr_stopped_data_address.
9064 (i386_low_stopped_by_watchpoint): Renamed to
9065 i386_dr_stopped_by_watchpoint.
9066 * i386-low.c (i386_show_dr): Renamed to
9067 i386_dr_show and made nonstatic. All uses updated.
9068 (i386_length_and_rw_bits): Renamed to
9069 i386_dr_length_and_rw_bits and made nonstatic.
9071 (i386_insert_aligned_watchpoint): Renamed to
9072 i386_dr_insert_aligned_watchpoint and made nonstatic.
9074 (i386_remove_aligned_watchpoint): Renamed to
9075 i386_dr_remove_aligned_watchpoint and made nonstatic.
9077 (i386_update_inferior_debug_regs): Renamed to
9078 i386_dr_update_inferior_debug_regs and made nonstatic.
9080 (i386_low_insert_watchpoint): Renamed to
9081 i386_dr_insert_watchpoint. All uses updated.
9082 (i386_low_remove_watchpoint): Renamed to
9083 i386_dr_remove_watchpoint. All uses updated.
9084 (i386_low_region_ok_for_watchpoint): Renamed to
9085 i386_dr_region_ok_for_watchpoint. All uses updated.
9086 (i386_low_stopped_data_address): Renamed to
9087 i386_dr_stopped_data_address. All uses updated.
9088 (i386_low_stopped_by_watchpoint): Renamed to
9089 i386_dr_stopped_by_watchpoint. All uses updated.
9091 2014-06-18 Gary Benson <gbenson@redhat.com>
9093 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9094 (i386_dr_low_can_set_control): Likewise.
9095 (i386_insert_aligned_watchpoint): New check.
9097 2014-06-18 Gary Benson <gbenson@redhat.com>
9099 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9102 2014-06-18 Gary Benson <gbenson@redhat.com>
9104 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9105 instead of fatal and error.
9106 (i386_handle_nonaligned_watchpoint): Likewise.
9108 2014-06-18 Gary Benson <gbenson@redhat.com>
9110 * i386-low.c (i386_get_debug_register_length): New macro.
9111 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9112 (i386_show_dr): Use debug_printf instead of fprintf. Use
9113 phex to format values.
9115 2014-06-18 Gary Benson <gbenson@redhat.com>
9117 * i386-low.h: Comment changes.
9118 * i386-low.c: Likewise.
9120 2014-06-18 Gary Benson <gbenson@redhat.com>
9122 * i386-low.c: Whitespace changes.
9124 2014-06-12 Tom Tromey <tromey@redhat.com>
9126 * utils.c (freeargv): Remove.
9128 2014-06-12 Tom Tromey <tromey@redhat.com>
9130 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9131 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9132 (parse_debug_format_options): Likewise.
9133 (gdbserver_usage): Likewise.
9134 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9135 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9136 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9138 ($(LIBGNU)): Depend on libiberty.
9139 (all-lib): Recurse into all subdirs.
9140 (install-only): Invoke "install" target in subdirs.
9141 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9143 * configure: Rebuild.
9144 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9145 for vasprintf, vsnprintf, or gettimeofday.
9146 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9149 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9151 * development.sh: Delete.
9152 * Makefile.in (config.status): Adjust dependency on development.sh.
9153 * configure.ac: Adjust development.sh source call.
9154 * configure: Regenerate.
9156 2014-06-02 Pedro Alves <palves@redhat.com>
9158 * ax.c (gdb_free_agent_expr): New function.
9159 * ax.h (gdb_free_agent_expr): New declaration.
9160 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9162 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9164 (clear_breakpoint_conditions_and_commands): New function.
9165 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9166 (clear_breakpoint_conditions_and_commands): New declaration.
9168 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9170 * linux-aarch64-low.c (asm/ptrace.h): Include.
9172 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9174 Fix TLS access for -static -pthread.
9175 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9176 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9177 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9179 2014-05-20 Pedro Alves <palves@redhat.com>
9181 * linux-aarch64-low.c (aarch64_insert_point)
9182 (aarch64_remove_point): No longer check whether the type is
9183 supported here. Adjust to new interface.
9184 (the_low_target): Install aarch64_supports_z_point_type as
9185 supports_z_point_type method.
9186 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9187 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9188 instead of a Z packet char. Adjust.
9189 (arm_supports_z_point_type): New function.
9190 (arm_insert_point, arm_remove_point): Adjust to new interface.
9191 (the_low_target): Install arm_supports_z_point_type.
9192 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9193 (cris_insert_point, cris_remove_point): Adjust to new interface.
9194 Don't check whether the type is supported here.
9195 (the_low_target): Install cris_supports_z_point_type.
9196 * linux-low.c (linux_supports_z_point_type): New function.
9197 (linux_insert_point, linux_remove_point): Adjust to new interface.
9198 * linux-low.h (struct linux_target_ops) <insert_point,
9199 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9200 raw_breakpoint pointer parameter.
9201 <supports_z_point_type>: New method.
9202 * linux-mips-low.c (mips_supports_z_point_type): New function.
9203 (mips_insert_point, mips_remove_point): Adjust to new interface.
9204 Use mips_supports_z_point_type.
9205 (the_low_target): Install mips_supports_z_point_type.
9206 * linux-ppc-low.c (the_low_target): Install NULL as
9207 supports_z_point_type method.
9208 * linux-s390-low.c (the_low_target): Install NULL as
9209 supports_z_point_type method.
9210 * linux-sparc-low.c (the_low_target): Install NULL as
9211 supports_z_point_type method.
9212 * linux-x86-low.c (x86_supports_z_point_type): New function.
9213 (x86_insert_point): Adjust to new insert_point interface. Use
9214 insert_memory_breakpoint. Adjust to new
9215 i386_low_insert_watchpoint interface.
9216 (x86_remove_point): Adjust to remove_point interface. Use
9217 remove_memory_breakpoint. Adjust to new
9218 i386_low_remove_watchpoint interface.
9219 (the_low_target): Install x86_supports_z_point_type.
9220 * lynx-low.c (lynx_target_ops): Install NULL as
9221 supports_z_point_type callback.
9222 * nto-low.c (nto_supports_z_point_type): New.
9223 (nto_insert_point, nto_remove_point): Adjust to new interface.
9224 (nto_target_ops): Install nto_supports_z_point_type.
9225 * mem-break.c: Adjust intro comment.
9226 (struct raw_breakpoint) <raw_type, size>: New fields.
9227 <inserted>: Update comment.
9228 <shlib_disabled>: Delete field.
9229 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9230 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9231 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9232 (raw_bkpt_type_to_target_hw_bp_type): New function.
9233 (find_enabled_raw_code_breakpoint_at): New function.
9234 (find_raw_breakpoint_at): New type and size parameters. Use them.
9235 (insert_memory_breakpoint): New function, based off
9236 set_raw_breakpoint_at.
9237 (remove_memory_breakpoint): New function.
9238 (set_raw_breakpoint_at): Reimplement.
9239 (set_breakpoint): New, based on set_breakpoint_at.
9240 (set_breakpoint_at): Reimplement.
9241 (delete_raw_breakpoint): Go through the_target->remove_point
9242 instead of assuming memory breakpoints.
9243 (find_gdb_breakpoint_at): Delete.
9244 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9245 (find_gdb_breakpoint): New function.
9246 (set_gdb_breakpoint_at): Delete.
9247 (z_type_supported): New function.
9248 (set_gdb_breakpoint_1): New function, loosely based off
9249 set_gdb_breakpoint_at.
9250 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9251 (delete_gdb_breakpoint_at): Delete.
9252 (delete_gdb_breakpoint_1): New function, loosely based off
9253 delete_gdb_breakpoint_at.
9254 (delete_gdb_breakpoint): New function.
9255 (clear_gdb_breakpoint_conditions): Rename to ...
9256 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9258 (add_condition_to_breakpoint): Make static.
9259 (add_breakpoint_condition): Take a struct breakpoint pointer
9260 instead of an address. Adjust.
9261 (gdb_condition_true_at_breakpoint): Rename to ...
9262 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9264 (gdb_condition_true_at_breakpoint): Reimplement.
9265 (add_breakpoint_commands): Take a struct breakpoint pointer
9266 instead of an address. Adjust.
9267 (gdb_no_commands_at_breakpoint): Rename to ...
9268 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9269 parameter. Return true if no breakpoint was found. Change debug
9271 (gdb_no_commands_at_breakpoint): Reimplement.
9272 (run_breakpoint_commands): Rename to ...
9273 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9274 and change return type to boolean.
9275 (run_breakpoint_commands): New function.
9276 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9277 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9278 breakpoint. Go through the_target->remove_point instead of
9279 assuming memory breakpoint.
9280 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9281 software and hardware breakpoints.
9282 (reinsert_raw_breakpoint): Go through the_target->insert_point
9283 instead of assuming memory breakpoint.
9284 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9285 software and hardware breakpoints.
9286 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9287 Check both software and hardware breakpoints.
9288 (validate_inserted_breakpoint): Assert the breakpoint is a
9289 software breakpoint. Set the inserted flag to -1 instead of
9290 setting shlib_disabled.
9291 (delete_disabled_breakpoints): Adjust.
9292 (validate_breakpoints): Only validate software breakpoints.
9293 Adjust to inserted flag change.
9294 (check_mem_read, check_mem_write): Skip breakpoint types other
9295 than software breakpoints. Adjust to inserted flag change.
9296 * mem-break.h (enum raw_bkpt_type): New enum.
9297 (raw_breakpoint, struct process_info): Forward declare.
9298 (Z_packet_to_target_hw_bp_type): Delete declaration.
9299 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9300 (set_gdb_breakpoint, delete_gdb_breakpoint)
9301 (clear_breakpoint_conditions): New declarations.
9302 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9303 (breakpoint_inserted_here): Update comment.
9304 (add_breakpoint_condition, add_breakpoint_commands): Replace
9305 address parameter with a breakpoint pointer parameter.
9306 (gdb_breakpoint_here): Update comment.
9307 (delete_gdb_breakpoint_at): Delete.
9308 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9309 * server.c (process_point_options): Take a struct breakpoint
9310 pointer instead of an address. Adjust.
9311 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9312 delete_gdb_breakpoint.
9313 * spu-low.c (spu_target_ops): Install NULL as
9314 supports_z_point_type method.
9315 * target.h: Include mem-break.h.
9316 (struct target_ops) <prepare_to_access_memory>: Update comment.
9317 <supports_z_point_type>: New field.
9318 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9319 instead of a char. Also take a raw breakpoint pointer.
9320 * win32-arm-low.c (the_low_target): Install NULL as
9321 supports_z_point_type.
9322 * win32-i386-low.c (i386_supports_z_point_type): New function.
9323 (i386_insert_point, i386_remove_point): Adjust to new interface.
9324 (the_low_target): Install i386_supports_z_point_type.
9325 * win32-low.c (win32_supports_z_point_type): New function.
9326 (win32_insert_point, win32_remove_point): Adjust to new interface.
9327 (win32_target_ops): Install win32_supports_z_point_type.
9328 * win32-low.h (struct win32_target_ops):
9329 <supports_z_point_type>: New method.
9330 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9331 instead of a char. Also take a raw breakpoint pointer.
9333 2014-05-20 Pedro Alves <palves@redhat.com>
9335 * mem-break.h: Include break-common.h.
9336 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9337 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9338 (Z_packet_to_target_hw_bp_type): New declaration.
9339 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9340 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9341 (Z_PACKET_ACCESS_WP): Delete macros.
9342 (Z_packet_to_hw_type): Delete function.
9343 * i386-low.h: Don't include break-common.h here.
9344 (Z_packet_to_hw_type): Delete declaration.
9345 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9346 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9347 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9348 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9349 * linux-aarch64-low.c: Don't include break-common.h here.
9350 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9351 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9352 (Z_packet_to_target_hw_bp_type): Delete function.
9353 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9355 (mips_insert_point, mips_remove_point): Use
9356 Z_packet_to_target_hw_bp_type.
9358 2014-05-20 Pedro Alves <palves@redhat.com>
9360 * linux-aarch64-low.c: Include break-common.h.
9361 (enum target_point_type): Delete.
9362 (Z_packet_to_point_type): Rename to ...
9363 (Z_packet_to_target_hw_bp_type): ... this, and return a
9364 target_hw_bp_type instead.
9365 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9366 instead of an enum target_point_type.
9367 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9369 (aarch64_dr_state_insert_one_point)
9370 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9371 (aarch64_handle_aligned_watchpoint)
9372 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9373 Take an enum target_hw_bp_type instead of an enum
9375 (aarch64_supports_z_point_type): New function.
9376 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9377 use Z_packet_to_target_hw_bp_type.
9379 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9381 * configure.ac: Only use -Werror by default when DEVELOPMENT
9383 * configure: Regenerate.
9385 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9387 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9388 * linux-x86-low.c (X86_64_USER_REGS): New.
9389 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9391 2014-04-28 Yao Qi <yao@codesourcery.com>
9393 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9396 2014-04-25 Pedro Alves <palves@redhat.com>
9399 * linux-low.c (linux_attach_fail_reason_string): New function.
9400 (linux_attach_lwp): Delete.
9401 (linux_attach_lwp_1): Rename to ...
9402 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9403 argument. Remove "initial" parameter. Return int instead of
9404 void. Don't error or warn here.
9405 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9406 failure to attach to the tgid. Call warning when failing to
9408 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9409 argument. Remove "initial" parameter. Return int instead of
9410 void. Don't error or warn here.
9411 (linux_attach_fail_reason_string): New declaration.
9412 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9413 interface change. Use linux_attach_fail_reason_string.
9415 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9416 Walfred Tedeschi <walfred.tedeschi@intel.com>
9418 * Makefile.in: Added rules to handle new files
9419 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9420 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9421 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9422 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9423 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9424 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9426 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9427 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9428 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9429 i386/x32-avx512.xml.
9430 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9431 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9432 i386/x32-avx512-linux.xml.
9433 * i387-fp.c (num_avx512_k_registers): New constant for number
9435 (num_avx512_zmmh_low_registers): New constant for number of
9436 lower ZMM registers (0-15).
9437 (num_avx512_zmmh_high_registers): New constant for number of
9438 higher ZMM registers (16-31).
9439 (num_avx512_ymmh_registers): New contant for number of higher
9440 YMM registers (ymm16-31 added by avx521 on x86_64).
9441 (num_avx512_xmm_registers): New constant for number of higher
9442 XMM registers (xmm16-31 added by AVX512 on x86_64).
9443 (struct i387_xsave): Add space for AVX512 registers.
9444 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9445 Add code to handle AVX512 registers.
9446 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9447 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9448 prototypei from generated file.
9449 (tdesc_amd64_avx512_linux): Likewise.
9450 (init_registers_x32_avx512_linux): Likewise.
9451 (tdesc_x32_avx512_linux): Likewise.
9452 (init_registers_i386_avx512_linux): Likewise.
9453 (tdesc_i386_avx512_linux): Likewise.
9454 (x86_64_regmap): Add AVX512 registers.
9455 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9457 (initialize_low_arch): Add code to initialize AVX512 registers.
9459 2014-04-23 Pedro Alves <palves@redhat.com>
9461 * mem-break.c (find_gdb_breakpoint_at): Make static.
9462 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9464 2014-04-23 Pedro Alves <palves@redhat.com>
9466 * i386-low.c: Don't include break-common.h here.
9467 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9468 prototype to take target_hw_bp_type as argument instead of a Z
9470 * i386-low.h: Include break-common.h here.
9471 (Z_packet_to_hw_type): Declare.
9472 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9474 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9475 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9476 (x86_remove_point): Convert the packet number to a
9477 target_hw_bp_type before calling i386_low_remove_watchpoint.
9478 * win32-i386-low.c (i386_insert_point): Convert the packet number
9479 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9480 (i386_remove_point): Convert the packet number to a
9481 target_hw_bp_type before calling i386_low_remove_watchpoint.
9483 2014-04-23 Pedro Alves <palves@redhat.com>
9485 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9487 2014-04-10 Pedro Alves <palves@redhat.com>
9489 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9490 Check if the condition or command is NULL before checking if the
9491 breakpoint is known. On success, return true.
9492 * mem-break.h (add_breakpoint_condition): Document return.
9493 (add_breakpoint_commands): Add describing comment.
9494 * server.c (skip_to_semicolon): New function.
9495 (process_point_options): Use it.
9497 2014-04-09 Pedro Alves <palves@redhat.com>
9499 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9502 2014-02-27 Pedro Alves <palves@redhat.com>
9505 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9507 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9509 (last_thread_of_process_p): Take a PID argument instead of a
9511 (linux_wait_for_lwp): Delete.
9512 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9514 (linux_low_filter_event): New function, party factored out from
9515 linux_wait_for_event.
9516 (linux_wait_for_event): Rename to ...
9517 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9518 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9519 sigsuspend. Check for zombie leaders.
9520 (linux_wait_for_event): Reimplement as wrapper around
9521 linux_wait_for_event_filtered.
9522 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9523 a normal or signal exit is seen, it's the whole process exiting.
9524 (wait_for_sigstop): No longer a for_each_inferior callback.
9525 Rewrite on top of linux_wait_for_event_filtered.
9526 (stop_all_lwps): Call wait_for_sigstop directly.
9527 * server.c (resume, handle_target_event): Handle
9528 TARGET_WAITKIND_NO_RESUMED.
9530 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9532 * win32-low.c (psapi_get_dll_name,
9533 * win32_CreateToolhelp32Snapshot): Delete.
9534 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9535 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9537 (handle_load_dll): Add function description.
9538 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9540 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9542 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9544 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9545 base address when calling win32_add_one_solib.
9546 (handle_load_dll): Delete local variable load_addr.
9547 Remove 0x1000 offset applied to DLL base address when calling
9548 win32_add_one_solib.
9549 (handle_unload_dll): Add comment.
9551 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9553 * win32-low.c (win32_add_all_dlls): Renames
9554 win32_ensure_ntdll_loaded. Rewrite function documentation.
9555 Adjust implementation to always load all DLLs.
9556 Add 0x1000 offset to DLL base address when calling
9557 win32_add_one_solib.
9558 (child_initialization_done): New static global.
9559 (do_initial_child_stuff): Set child_initialization_done to
9560 zero during child initialization, and 1 after. Replace call
9561 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9563 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9564 (handle_unload_dll): Add function documentation.
9565 (get_child_debug_event): Ignore load and unload DLL events
9566 during child initialization.
9568 2014-02-20 Doug Evans <dje@google.com>
9570 Remove global all_lwps.
9571 * inferiors.h (ptid_of): Move here from linux-low.h.
9572 (pid_of, lwpid_of): Ditto.
9573 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9574 parameter is a struct thread_info * now.
9575 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9576 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9577 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9579 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9580 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9581 * linux-arm-low.c (update_registers_callback): Update, "entry"
9582 parameter is a struct thread_info * now.
9583 Fetch lwpid from current_inferior directly.
9584 (arm_insert_point): Pass &all_threads to find_inferior instead of
9586 (arm_remove_point): Ditto.
9587 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9588 (arm_prepare_to_resume): Fetch pid from thread.
9589 (arm_read_description): Fetch lwpid from current_inferior directly.
9590 * linux-low.c (all_lwps): Delete.
9591 (delete_lwp): Delete call to remove_inferior.
9592 (handle_extended_wait): Fetch lwpid from thread.
9593 (add_lwp): Don't set lwp->entry.id. Remove call to
9594 add_inferior_to_list.
9595 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9596 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9597 (kill_one_lwp_callback): Ditto.
9598 (linux_kill): Don't dereference NULL pointer.
9599 Fetch ptid,lwpid from thread.
9600 (get_detach_signal): Fetch ptid from thread.
9601 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9602 Simplify call to regcache_invalidate_thread.
9603 (delete_lwp_callback): Update, "entry" parameter is a
9604 struct thread_info * now. Fetch pid from thread.
9605 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9606 (status_pending_p_callback): Update, "entry" parameter is a
9607 struct thread_info * now. Fetch ptid from thread.
9608 (find_lwp_pid): Update, "entry" parameter is a
9609 struct thread_info * now.
9610 (linux_wait_for_lwp): Fetch pid from thread.
9611 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9612 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9613 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9614 (dequeue_one_deferred_signal): Ditto.
9615 (cancel_breakpoint): Fetch ptid from current_inferior.
9616 (linux_wait_for_event): Pass &all_threads to find_inferior,
9617 not &all_lwps. Fetch ptid, lwpid from thread.
9618 (count_events_callback): Update, "entry" parameter is a
9619 struct thread_info * now.
9620 (select_singlestep_lwp_callback): Ditto.
9621 (select_event_lwp_callback): Ditto.
9622 (cancel_breakpoints_callback): Ditto.
9623 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9625 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9626 (unsuspend_one_lwp): Update, "entry" parameter is a
9627 struct thread_info * now.
9628 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9630 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9631 Fetch lwpid from thread, not lwp.
9632 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9633 Pass &all_threads to find_inferior, not &all_lwps.
9634 (send_sigstop): Fetch lwpid from thread, not lwp.
9635 (send_sigstop_callback): Update, "entry" parameter is a
9636 struct thread_info * now.
9637 (suspend_and_send_sigstop_callback): Ditto.
9638 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9639 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9640 struct thread_info * now.
9641 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9643 (lwp_running): Update, "entry" parameter is a
9644 struct thread_info * now.
9645 (stop_all_lwps): Fetch ptid from thread.
9646 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9647 (linux_resume_one_lwp): Fetch lwpid from thread.
9648 (linux_set_resume_request): Update, "entry" parameter is a
9649 struct thread_info * now. Fetch pid, lwpid from thread.
9650 (resume_status_pending_p): Update, "entry" parameter is a
9651 struct thread_info * now.
9652 (need_step_over_p): Ditto. Fetch lwpid from thread.
9653 (start_step_over): Fetch lwpid from thread.
9654 (linux_resume_one_thread): Update, "entry" parameter is a
9655 struct thread_info * now. Fetch lwpid from thread.
9656 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9657 (proceed_one_lwp): Update, "entry" parameter is a
9658 struct thread_info * now. Fetch lwpid from thread.
9659 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9660 struct thread_info * now.
9661 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9662 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9663 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9665 (regsets_store_inferior_registers): Ditto.
9666 (fetch_register, store_register): Ditto.
9667 (linux_read_memory, linux_write_memory): Ditto.
9668 (linux_request_interrupt): Ditto.
9669 (linux_read_auxv): Ditto.
9670 (linux_xfer_siginfo): Ditto.
9671 (linux_qxfer_spu): Ditto.
9672 (linux_qxfer_libraries_svr4): Ditto.
9673 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9674 moved to inferiors.h.
9676 (get_thread_lwp): Update.
9677 (struct lwp_info): Delete member "entry". Simplify comment for
9680 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9681 current_inferior directly.
9682 (update_watch_registers_callback): Update, "entry" parameter is a
9683 struct thread_info * now. Fetch pid from thread.
9684 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9685 (mips_insert_point): Fetch lwpid from current_inferior.
9686 Pass &all_threads to find_inferior, not &all_lwps.
9687 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9688 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9690 (mips_stopped_data_address): Ditto.
9691 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9693 * linux-tile-low.c (tile_arch_setup): Ditto.
9694 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9695 (update_debug_registers_callback): Update, "entry" parameter is a
9696 struct thread_info * now. Fetch pid from thread.
9697 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9698 Pass &all_threads to find_inferior, not &all_lwps.
9699 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9700 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9701 Pass &all_threads to find_inferior, not &all_lwps.
9702 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9703 (i386_dr_low_get_status): Ditto.
9704 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9705 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9706 (x86_linux_read_description): Ditto.
9707 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9709 2014-02-20 Doug Evans <dje@google.com>
9711 * inferiors.c (get_first_inferior): Fix buglet.
9713 2014-02-19 Doug Evans <dje@google.com>
9715 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9716 * inferiors.c (add_thread): Change result type to struct thread_info *.
9717 All callers updated.
9718 (add_lwp): Call add_thread here instead of in callers.
9719 All callers updated.
9720 * linux-low.h (get_lwp_thread): Rewrite.
9721 (struct lwp_info): New member "thread".
9723 2014-02-19 Doug Evans <dje@google.com>
9725 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9726 All callers updated.
9728 2014-02-19 Doug Evans <dje@google.com>
9730 * inferiors.c (add_thread): Fix whitespace.
9732 2014-02-19 Doug Evans <dje@google.com>
9734 * dll.c (clear_dlls): Replace accessing list implemention details
9736 * gdbthread.h (get_first_thread): Declare.
9737 * inferiors.c (for_each_inferior_with_data): New function.
9738 (get_first_thread): New function.
9739 (find_thread_ptid): Simplify.
9740 (get_first_inferior): New function.
9741 (clear_list): Delete.
9742 (one_inferior_p): New function.
9743 (clear_inferior_list): New function.
9744 (clear_inferiors): Update.
9745 * inferiors.h (for_each_inferior_with_data): Declare.
9746 (clear_inferior_list): Declare.
9747 (one_inferior_p): Declare.
9748 (get_first_inferior): Declare.
9749 * linux-low.c (linux_wait_for_event): Replace accessing list
9750 implemention details with API function.
9751 * server.c (target_running): Ditto.
9752 (accumulate_file_name_length): New function.
9753 (emit_dll_description): New function.
9754 (handle_qxfer_libraries): Replace accessing list implemention
9755 details with API function.
9756 (handle_qxfer_threads_worker): New function.
9757 (handle_qxfer_threads_proper): Replace accessing list implemention
9758 details with API function.
9759 (handle_query): Ditto.
9760 (visit_actioned_threads_callback_ftype): New typedef.
9761 (visit_actioned_threads_data): New struct.
9762 (visit_actioned_threads): Rewrite to be find_inferior callback.
9763 (resume): Call find_inferior.
9764 (handle_status): Replace accessing list implemention
9765 details with API function.
9766 (process_serial_event): Replace accessing list implemention details
9768 * target.c (set_desired_inferior): Replace accessing list implemention
9769 details with API function.
9770 * tracepoint.c (same_process_p): New function.
9771 (gdb_agent_about_to_close): Replace accessing list implemention
9772 details with API function.
9773 * win32-low.c (child_delete_thread): Replace accessing list
9774 implemention details with API function.
9775 (match_dll_by_basename): New function.
9776 (dll_is_loaded_by_basename): New function.
9777 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9778 details call to dll_is_loaded_by_basename.
9780 2014-02-19 Doug Evans <dje@google.com>
9782 * dll.h (struct dll_info): Add comment.
9783 * gdbthread.h (struct thread_info): Add comment.
9784 (current_ptid): Simplify.
9785 * inferiors.c (add_process): Update.
9786 (remove_process): Update.
9787 * inferiors.h (struct process_info): Rename member "head" to "entry".
9788 * linux-low.c (delete_lwp): Update.
9790 (last_thread_of_process_p): Update.
9791 (kill_one_lwp_callback, linux_kill): Update.
9792 (status_pending_p_callback): Update.
9793 (wait_for_sigstop): Update. Simplify read of ptid.
9794 (start_step_over): Update.
9795 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9796 (get_lwp_thread): Update.
9797 (struct lwp_info): Rename member "head" to "entry".
9798 * regcache.h (inferior_list_entry): Delete.
9799 * server.c (kill_inferior_callback): Update.
9800 (detach_or_kill_inferior_callback): Update.
9801 (print_started_pid): Update.
9802 (print_attached_pid): Update.
9803 (process_serial_event): Simplify read of ptid.
9804 * thread-db.c (thread_db_create_event): Update.
9805 (thread_db_get_tls_address): Update.
9806 * win32-low.c (current_inferior_ptid): Simplify.
9808 2014-02-19 Tom Tromey <tromey@redhat.com>
9810 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9812 (target_supports_btrace): Update.
9814 2014-02-14 Yao Qi <yao@codesourcery.com>
9816 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9817 (rsp-low-ipa.o): New target.
9819 2014-02-12 Tom Tromey <tromey@redhat.com>
9821 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9822 convert_ascii_to_int.
9823 * regcache.c (registers_to_string): Likewise.
9824 * remote-utils.c (decode_M_packet): Likewise.
9825 * server.c (process_serial_event): Likewise.
9827 2014-02-12 Tom Tromey <tromey@redhat.com>
9829 * server.c (handle_query, handle_v_run): Use hex2bin, not
9831 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9833 2014-02-12 Tom Tromey <tromey@redhat.com>
9835 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9836 convert_int_to_ascii.
9837 * regcache.c (registers_to_string, collect_register_as_string):
9839 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9841 * server.c (process_serial_event): Likewise.
9842 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9843 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9845 2014-02-12 Tom Tromey <tromey@redhat.com>
9847 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9848 bin2hex, not hexify.
9849 * tracepoint.c (cmd_qtstatus): Likewise.
9851 2014-02-12 Tom Tromey <tromey@redhat.com>
9853 * remote-utils.c (monitor_output): Pass explicit length to
9856 2014-02-12 Tom Tromey <tromey@redhat.com>
9858 * tracepoint.c: Include rsp-low.h.
9859 * server.c: Include rsp-low.h.
9860 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9861 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9863 * remote-utils.c: Include rsp-low.h.
9864 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9865 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9866 (convert_int_to_ascii, convert_ascii_to_int): Move to
9868 * regcache.c: Include rsp-low.h.
9869 * ax.c: Include rsp-low.h.
9870 * Makefile.in (SFILES): Add common/rsp-low.c.
9871 (OBS): Add rsp-low.o.
9872 (rsp-low.o): New target.
9874 2014-02-12 Tom Tromey <tromey@redhat.com>
9876 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9877 Include print-utils.h.
9878 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9879 (plongest, thirty_two, phex_nz): Remove.
9880 * Makefile.in (SFILES): Add common/print-utils.c.
9881 (OBS): Add print-utils.o.
9882 (print-utils-ipa.o): New target.
9883 (print-utils.o): New target.
9884 (IPA_OBJS): Add print-utils-ipa.o.
9886 2014-02-06 Tom Tromey <tromey@redhat.com>
9888 * Makefile.in (SFILES): Fix indentation.
9890 2014-02-05 Doug Evans <dje@google.com>
9892 * linux-low.c (linux_wait_for_event): Improve comment.
9893 (linux_wait_1): Keep current_inferior in sync with event_child.
9895 2014-01-22 Doug Evans <dje@google.com>
9897 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9899 2014-01-22 Doug Evans <dje@google.com>
9901 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9902 * configure: Regenerate.
9903 * config.in: Regenerate.
9904 * Makefile.in (SFILES): Add debug.c.
9906 * debug.c: New file.
9907 * debug.h: New file.
9908 * linux-aarch64-low.c (*): Update all debugging printfs to use
9909 debug_printf instead of fprintf.
9910 * linux-arm-low.c (*): Ditto.
9911 * linux-cris-low.c (*): Ditto.
9912 * linux-crisv32-low.c (*): Ditto.
9913 * linux-m32r-low.c (*): Ditto.
9914 * linux-sparc-low.c (*): Ditto.
9915 * linux-x86.c (*): Ditto.
9916 * linux-low.c (*): Ditto.
9917 (linux_wait_1): Add calls to debug_enter, debug_exit.
9918 (linux_wait): Remove redundant debugging printf.
9919 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9920 (linux_resume, unstop_all_lwps): Ditto.
9921 * mem-break.c (*): Update all debugging printfs to use
9922 debug_printf instead of fprintf.
9923 * remote-utils.c (*): Ditto.
9924 * thread-db.c (*): Ditto.
9925 * server.c #include <ctype.h>, "gdb_vecs.h".
9926 (debug_threads): Moved to debug.c.
9927 (*): Update all debugging printfs to use debug_printf instead of
9929 (start_inferior): Replace call to fflush with call to debug_flush.
9930 (monitor_show_help): Mention set debug-format.
9931 (parse_debug_format_options): New function.
9932 (handle_monitor_command): Handle "monitor set debug-format".
9933 (gdbserver_usage): Mention --debug-format.
9934 (main): Parse --debug-format.
9935 * server.h (debug_threads): Declaration moved to debug.h.
9937 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9938 trace_debug_1 that uses debug_printf.
9939 (tracepoint_look_up_symbols): Update all debugging printfs to use
9940 debug_printf instead of fprintf.
9942 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9944 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9947 2014-01-17 Pedro Alves <palves@redhat.com>
9950 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9951 defined after including gdb_proc_service.h.
9953 2014-01-16 Doug Evans <dje@google.com>
9955 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9956 (match_dll): Use it.
9958 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9960 * target.h (target_ops) <read_btrace>: Change parameters and
9961 return type to allow error reporting.
9962 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9963 trace reading errors on.
9964 * linux-low.c (linux_low_read_btrace): Pass trace reading
9966 (linux_low_disable_btrace): New.
9968 2014-01-15 Doug Evans <dje@google.com>
9970 * inferiors.c (thread_id_to_gdb_id): Delete.
9971 * inferiors.h (thread_id_to_gdb_id): Delete.
9973 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9975 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9976 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9979 2014-01-08 Pedro Alves <palves@redhat.com>
9981 * server.c (handle_status): Don't discard previous queued stop
9982 replies or thread's pending status here.
9983 (main) <disconnection>: Do it here instead.
9985 2014-01-08 Pedro Alves <palves@redhat.com>
9987 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9988 * server.c (visit_actioned_threads, handle_pending_status): New
9990 (handle_v_cont): Factor out parts to ...
9991 (resume): ... this new function. If in all-stop, and a thread
9992 being resumed has a pending status, report it without actually
9994 (myresume): Adjust to use the new 'resume' function.
9995 (clear_pending_status_callback, set_pending_status_callback)
9996 (find_status_pending_thread_callback): New functions.
9997 (handle_status): Handle the case of multiple threads having
9998 interesting statuses to report. Report threads' real last signal
9999 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10000 with an interesting thread to report the status for, instead of
10001 always reporting the status of the first thread.
10003 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10005 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10006 * gdbreplay.c (gdbreplay_version): Likewise.
10008 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10010 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10011 iov.iov_len with the real length in use.
10013 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10015 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10016 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10017 for all targets that use win32-low.c.
10018 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10019 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10021 2013-12-13 Pedro Alves <palves@redhat.com>
10023 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10024 if equal to TARGET_WAITKIND_LOADED.
10025 * win32-low.c (cached_status): New static global.
10026 (win32_wait): Add declaration.
10027 (do_initial_child_stuff): Flush all initial pending debug events
10028 up to the initial breakpoint.
10029 (win32_wait): If CACHED_STATUS was set, return that instead
10030 of doing a real wait. Remove the code resuming the execution
10031 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10032 during the initial phase. Also remove the code changing
10033 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10034 TARGET_WAITKIND_STOPPED.
10036 2013-12-11 Yao Qi <yao@codesourcery.com>
10038 * notif.c (handle_notif_ack): Return 0 if no notification
10041 2013-11-20 Doug Evans <dje@google.com>
10043 * linux-low.c (linux_set_resume_request): Fix comment.
10045 2013-11-20 Doug Evans <dje@google.com>
10047 * linux-low.c (resume_status_pending_p): Tweak comment.
10049 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10051 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10052 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10053 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10054 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10055 (srv_amd64_regobj): Add amd64-mpx.o.
10056 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10057 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10058 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10059 * i387-fp.c (num_pl_bnd_register) Added constant.
10060 (num_pl_bnd_cfg_registers) Added constant.
10061 (struct i387_xsave) Added reserved area and MPX fields.
10062 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10063 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10065 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10066 (init_registers_amd64_mpx_linux): Declare new function.
10067 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10068 (x86_64_regmap): Add MPX registers.
10069 (x86_linux_read_description): Add MPX case.
10070 (initialize_low_arch): Initialize MPX targets.
10072 2013-11-18 Tom Tromey <tromey@redhat.com>
10074 * configure: Rebuild.
10075 * configure.ac: Don't check for stdlib.h.
10076 * gdbreplay.c: Unconditionally include stdlib.h.
10078 2013-11-18 Tom Tromey <tromey@redhat.com>
10080 * config.in: Rebuild.
10081 * configure: Rebuild.
10082 * configure.ac: Don't use AC_HEADER_DIRENT.
10084 2013-11-18 Tom Tromey <tromey@redhat.com>
10086 * server.h: Don't check HAVE_STRING_H.
10087 * gdbreplay.c: Don't check HAVE_STRING_H.
10088 * configure: Rebuild.
10090 2013-11-18 Tom Tromey <tromey@redhat.com>
10092 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10095 2013-11-08 Tom Tromey <tromey@redhat.com>
10097 * configure, config.in: Rebuild.
10098 * configure.ac: Remove unused configury.
10100 2013-11-08 Tom Tromey <tromey@redhat.com>
10102 * acinclude.m4: Include common.m4, codeset.m4.
10103 * configure, config.in: Rebuild.
10104 * configure.ac: Use GDB_AC_COMMON.
10106 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10108 * linux-s390-low.c (HWCAP_S390_TE): New define.
10109 (s390_arch_setup): Consider the TE field in the HWCAP for
10110 determining 'have_regset_tdb'.
10112 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10115 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10118 2013-10-02 Pedro Alves <palves@redhat.com>
10120 * server.c (process_serial_event): Don't output "GDBserver
10121 exiting" if GDB is connected through stdio.
10122 * target.c (mywait): Likewise, be silent if GDB is connected
10125 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10127 * lynx-low.c (lynx_add_threads_after_attach): New function.
10128 (lynx_attach): Remove call to add_thread. Add call to
10129 lynx_add_threads_after_attach instead.
10131 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10133 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10134 * config.in, configure: Regenerated.
10136 2013-09-18 Yao Qi <yao@codesourcery.com>
10139 * server.c (start_inferior): Clear 'resume_info'.
10141 2013-09-16 Jiong Wang <jiwang@tilera.com>
10143 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10146 2013-09-16 Jiong Wang <jiwang@tilera.com>
10148 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10149 linux-tile-low.o to srv_tgtobj.
10151 2013-09-16 Will Newton <will.newton@linaro.org>
10153 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10156 2013-09-06 Pedro Alves <palves@redhat.com>
10158 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10159 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10160 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10161 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10162 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10163 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10165 2013-09-06 Pedro Alves <palves@redhat.com>
10167 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10168 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10170 2013-09-06 Pedro Alves <palves@redhat.com>
10172 * linux-amd64-ipa.c: Include tracepoint.h.
10173 * linux-i386-ipa.c: Include tracepoint.h.
10175 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10177 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10178 (ps_get_thread_area): New function.
10180 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10182 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10183 (initialize_low_arch): Call init_registers_crisv32 rather than
10184 init_register_crisv32.
10186 2013-09-05 Pedro Alves <palves@redhat.com>
10188 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10190 * hostio.h: ... this new file.
10191 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10192 win32-low.c: Include hostio.h.
10194 2013-09-05 Pedro Alves <palves@redhat.com>
10196 * server.h (gdb_client_data, handler_func, callback_handler_func)
10197 (delete_file_handler, add_file_handler, append_callback_event)
10198 (delete_callback_event, start_event_loop, initialize_event_loop):
10199 Move to event-loop.h and include it.
10200 * event-loop.h: New file.
10202 2013-09-05 Pedro Alves <palves@redhat.com>
10204 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10205 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10206 (loaded_dll, unloaded_dll): Move to ...
10207 * dll.h: ... this new file.
10208 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10210 2013-09-05 Pedro Alves <palves@redhat.com>
10212 * server.h (current_process, get_thread_process, all_processes)
10213 (add_inferior_to_list, for_each_inferior, current_inferior)
10214 (remove_inferior, add_process, remove_process, find_process_pid)
10215 (have_started_inferiors_p, have_attached_inferiors_p)
10216 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10217 (clear_inferiors, find_inferior, find_inferior_id)
10218 (inferior_target_data, set_inferior_target_data)
10219 (inferior_regcache_data, set_inferior_regcache_data): Move to
10220 inferiors.h, and include it.
10221 * inferiors.h: New file.
10223 2013-09-05 Pedro Alves <palves@redhat.com>
10225 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10229 2013-09-05 Pedro Alves <palves@redhat.com>
10231 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10233 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10234 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10235 (handle_tracepoint_general_set, handle_tracepoint_query)
10236 (tracepoint_finished_step, tracepoint_was_hit)
10237 (release_while_stepping_state_list, current_traceframe)
10238 (in_readonly_region, traceframe_read_mem)
10239 (fetch_traceframe_registers, traceframe_read_sdata)
10240 (traceframe_read_info, struct fast_tpoint_collect_status)
10241 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10242 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10243 (supply_fast_tracepoint_registers)
10244 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10245 (ipa_tdesc, claim_trampoline_space)
10246 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10247 (agent_mem_read, agent_get_trace_state_variable_value)
10248 (agent_set_trace_state_variable_value, agent_tsv_read)
10249 (agent_mem_read_string, get_raw_reg_func_addr)
10250 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10251 * tracepoint.h: ... this new file.
10253 2013-09-05 Pedro Alves <palves@redhat.com>
10255 * server.h (perror_with_name, error, fatal, warning, paddress)
10256 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10258 * utils.h: New file.
10260 2013-09-05 Pedro Alves <palves@redhat.com>
10262 * server.h (remote_debug, noack_mode, transport_is_reliable)
10263 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10264 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10265 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10266 (write_enn, initialize_async_io, enable_async_io)
10267 (disable_async_io, check_remote_input_interrupt_request)
10268 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10269 (dead_thread_notify, prepare_resume_reply)
10270 (decode_address_to_semicolon, decode_address, decode_m_packet)
10271 (decode_M_packet, decode_X_packet, decode_xfer_write)
10272 (decode_search_memory_packet, unhexify, hexify)
10273 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10274 (look_up_one_symbol, relocate_instruction)
10275 (monitor_output): Move to remote-utils.h, and include it.
10276 * remote-utils.h: New file.
10278 2013-09-05 Pedro Alves <palves@redhat.com>
10280 * server.h (_): Delete.
10282 2013-09-02 Pedro Alves <palves@redhat.com>
10284 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10285 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10287 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10289 2013-09-02 Pierre Muller <muller@sourceware.org>
10291 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10292 or WriteProcessMemory complete successfully and handle
10293 ERROR_PARTIAL_COPY error.
10295 2013-09-02 Pedro Alves <palves@redhat.com>
10297 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10298 error instead of EIO.
10300 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10303 * linux-low.c: Include filestuff.h.
10304 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10305 * lynx-low.c: Include filestuff.h.
10306 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10307 * server.c: Include filestuff.h.
10308 (main): Call notice_open_fds.
10309 * spu-low.c: Include filestuff.h.
10310 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10312 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10314 * Makefile.in: Explain why ../target and ../nat are not
10315 listed as include file search paths.
10316 (linux-waitpid.o): New object file rule.
10317 * configure.srv (srv_native_linux_obj): New variable.
10318 Replace all occurrences of linux native object files with
10319 $srv_native_linux_obj.
10320 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10321 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10322 (linux_enable_event_reporting): Remove declaration.
10323 (my_waitpid): Moved to common/linux-waitpid.c.
10324 (linux_wait_for_event): Pass ptid when calling
10325 linux_enable_event_reporting.
10326 (linux_supports_tracefork_flag): Remove.
10327 (linux_enable_event_reporting): Likewise.
10328 (linux_tracefork_grandchild): Remove.
10329 (STACK_SIZE): Moved to common/linux-ptrace.c.
10330 (linux_tracefork_child): Remove.
10331 (linux_test_for_tracefork): Remove.
10332 (linux_look_up_symbols): Call linux_supports_traceclone.
10333 (initialize_low): Remove call to linux_test_for_tracefork.
10334 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10335 common/linux-ptrace.h.
10336 (PTRACE_TYPE_ARG4): Likewise.
10337 Include linux-ptrace.h.
10339 2013-08-21 Pedro Alves <palves@redhat.com>
10341 * config.in: Renegerate.
10343 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10345 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10346 (SFILES): Remove $(srcdir)/common/target-common.c and
10347 add $(srcdir)/target/waitstatus.c.
10348 (OBS): Remove target-common.o and add waitstatus.o.
10349 (server_h): Remove $(srcdir)/../common/target-common.h and
10350 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10351 and $(srcdir)/../target/waitstatus.h.
10352 (target-common.o): Remove.
10353 (waitstatus.o): New target object file.
10354 * target.h: Do not include target-common.h and
10355 include target/resume.h, target/wait.h and
10356 target/waitstatus.h.
10358 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10360 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10361 to PTRACE_TYPE_ARG3.
10362 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10363 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10365 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10366 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10368 2013-07-27 Jie Zhang <jie@codesourcery.com>
10369 Daniel Jacobowitz <dan@codesourcery.com>
10370 Yao Qi <yao@codesourcery.com>
10372 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10373 (mips-linux-watch.o): New rule.
10374 (mips_linux_watch_h): New variable.
10375 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10377 * linux-mips-low.c: Include mips-linux-watch.h.
10378 (struct arch_process_info, struct arch_lwp_info): New.
10379 (update_watch_registers_callback): New function.
10380 (mips_linux_new_process, mips_linux_new_thread) New functions.
10381 (mips_linux_prepare_to_resume, mips_insert_point): New
10383 (mips_remove_point, mips_stopped_by_watchpoint): New
10385 (rsp_bp_type_to_target_hw_bp_type): New function.
10386 (mips_stopped_data_address): New function.
10387 (the_low_target): Add watchpoint support functions.
10389 2013-07-27 Yao Qi <yao@codesourcery.com>
10391 * i386-low.c: Include break-common.h.
10392 (enum target_hw_bp_type): Remove.
10394 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10396 * Makefile.in (SFILES): /common/target-common.c.
10397 (OBS): Add target-common.o.
10398 (server_h): Add $(srcdir)/../common/target-common.h.
10399 (target-common.o): New target.
10400 * server.c (queue_stop_reply_callback): Free
10401 status string after use.
10402 * target.c (target_waitstatus_to_string): Remove.
10403 * target.h: Include target-common.h.
10404 (resume_kind): Likewise.
10405 (target_waitkind): Likewise.
10406 (target_waitstatus): Likewise.
10407 (TARGET_WNOHANG): Likewise.
10409 2013-07-04 Yao Qi <yao@codesourcery.com>
10411 * Makefile.in (host_alias): Use @host_noncanonical@.
10412 (target_alias): Use @target_noncanonical@.
10413 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10414 ACX_NONCANONICAL_HOST.
10415 * configure: Regenerated.
10418 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10420 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10421 * configure: Rebuild.
10422 * Makefile.in (version_host, version_target): Get from configure.
10423 (version.c): Use $(version_host) and $(version_target).
10425 2013-07-03 Pedro Alves <palves@redhat.com>
10427 * Makefile.in (config.status): Depend on development.sh.
10428 * acinclude.m4: Include libmcheck.m4.
10429 * configure: Regenerate.
10431 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10433 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10434 attribute inside the parentheses.
10435 (winapi_DebugSetProcessKillOnExit): Ditto.
10436 (winapi_DebugBreakProcess): Ditto.
10437 (winapi_GenerateConsoleCtrlEvent): Ditto.
10439 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10441 * notif.h (notif_event): Add a dummy member to avoid compiler
10444 2013-07-01 Pedro Alves <palves@redhat.com>
10446 * hostio.c (HOSTIO_PATH_MAX): Define.
10447 (require_filename, handle_open, handle_unlink, handle_readlink):
10450 2013-07-01 Pedro Alves <palves@redhat.com>
10452 * server.h: Include "pathmax.h".
10453 * linux-low.c: Don't include sys/param.h.
10454 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10456 * win32-low.c: Don't include sys/param.h.
10457 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10459 2013-07-01 Pedro Alves <palves@redhat.com>
10461 * event-loop.c: Don't check HAVE_UNISTD_H before including
10463 * gdbreplay.c: Likewise.
10464 * remote-utils.c: Likewise.
10465 * server.c: Likewise.
10466 * configure.ac: Don't check for unistd.h.
10467 * configure: Regenerate.
10469 2013-06-28 Tom Tromey <tromey@redhat.com>
10471 * Makefile.in (version.c): Use version.in, not
10474 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10476 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10477 * configure: Rebuild.
10478 * Makefile.in (version_host, version_target): Get from configure.
10479 (version.c): Use $(version_host) and $(version_target).
10481 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10483 Fix trace-status to output user name without trailing colon.
10484 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10486 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10488 Fix trace-status to output proper start-time and stop-time.
10489 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10490 output start time and stop time in hex as gdb expects.
10492 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10494 * tracepoint.c (build_traceframe_info_xml): Output trace state
10495 variables present in the trace buffer.
10497 2013-06-24 Tom Tromey <tromey@redhat.com>
10499 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10501 (version.o): Remove.
10502 * gdbreplay.c: Include version.h.
10503 (version, host_name): Don't declare.
10504 * server.h: Include version.h.
10505 (version, host_name): Don't declare.
10507 2013-06-12 Pedro Alves <palves@redhat.com>
10509 * linux-x86-low.c (linux_is_elf64): Delete global.
10510 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10511 with local linux_pid_exe_is_elf_64_file use.
10513 2013-06-11 Pedro Alves <palves@redhat.com>
10515 * linux-low.c (regset_disabled, disable_regset): New functions.
10516 (regsets_fetch_inferior_registers)
10517 (regsets_store_inferior_registers): Use them.
10518 (initialize_regsets_info); Don't allocate the disabled_regsets
10520 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10523 2013-06-11 Pedro Alves <palves@redhat.com>
10525 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10528 2013-06-11 Pedro Alves <palves@redhat.com>
10530 * linux-x86-low.c (initialize_low_arch): Call
10531 init_registers_x32_avx_linux.
10533 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10535 Fix compatibility with Android Bionic.
10536 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10539 2013-06-07 Pedro Alves <palves@redhat.com>
10542 * Makefile.in (OBS): Add tdesc.o.
10543 (IPA_OBJS): Add tdesc-ipa.o.
10544 (tdesc-ipa.o): New rule.
10545 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10547 * linux-low.c (new_inferior): Delete.
10548 (disabled_regsets, num_regsets): Delete.
10549 (linux_add_process): Adjust to set the new per-process
10551 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10552 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10553 was a stop. When calling arch_setup, switch the current inferior
10554 to the thread that got an event.
10555 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10556 (regsets_fetch_inferior_registers)
10557 (regsets_store_inferior_registers): New regsets_info parameter.
10559 (linux_register_in_regsets): New regs_info parameter. Adjust to
10561 (register_addr, fetch_register, store_register): New usrregs_info
10562 parameter. Adjust to use it.
10563 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10564 parameter regs_info. Adjust to use it.
10565 (linux_fetch_registers): Get the current inferior's regs_info, and
10567 (linux_store_registers): Ditto.
10568 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10569 (initialize_low): Don't initialize the target_regsets here. Call
10570 initialize_low_arch.
10571 * linux-low.h (target_regsets): Delete declaration.
10572 (struct regsets_info): New.
10573 (struct usrregs_info): New.
10574 (struct regs_info): New.
10575 (struct process_info_private) <new_inferior>: New field.
10576 (struct linux_target_ops): Delete the num_regs, regmap, and
10577 regset_bitmap fields. New field regs_info.
10578 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10579 * i387-fp.c (num_xmm_registers): Delete.
10580 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10581 calls to new interface.
10582 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10583 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10584 Infer the number of xmm registers from the regcache's target
10586 * i387-fp.h (num_xmm_registers): Delete.
10587 * inferiors.c (add_thread): Don't install the thread's regcache
10589 * proc-service.c (gregset_info): Fetch the current inferior's
10590 regs_info. Adjust to use it.
10591 * regcache.c: Include tdesc.h.
10592 (register_bytes, reg_defs, num_registers)
10593 (gdbserver_expedite_regs): Delete.
10594 (get_thread_regcache): If the thread doesn't have a regcache yet,
10595 create one, instead of aborting gdbserver.
10596 (regcache_invalidate_one): Rename to ...
10597 (regcache_invalidate_thread): ... this.
10598 (regcache_invalidate_one): New.
10599 (regcache_invalidate): Only invalidate registers of the current
10601 (init_register_cache): Add target_desc parameter, and use it.
10602 (new_register_cache): Ditto. Assert the target description has a
10603 non zero registers_size.
10604 (regcache_cpy): Add assertions. Adjust.
10605 (realloc_register_cache, set_register_cache): Delete.
10606 (registers_to_string, registers_from_string): Adjust.
10607 (find_register_by_name, find_regno, find_register_by_number)
10608 (register_cache_size): Add target_desc parameter, and use it.
10609 (free_register_cache_thread, free_register_cache_thread_one)
10610 (regcache_release, register_cache_size): New.
10611 (register_size): Add target_desc parameter, and use it.
10612 (register_data, supply_register, supply_register_zeroed)
10613 (supply_regblock, supply_register_by_name, collect_register)
10614 (collect_register_as_string, collect_register_by_name): Adjust.
10615 * regcache.h (struct target_desc): Forward declare.
10616 (struct regcache) <tdesc>: New field.
10617 (init_register_cache, new_register_cache): Add target_desc
10619 (regcache_invalidate_thread): Declare.
10620 (regcache_invalidate_one): Delete declaration.
10621 (regcache_release): Declare.
10622 (find_register_by_number, register_cache_size, register_size)
10623 (find_regno): Add target_desc parameter.
10624 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10626 * remote-utils.c: Include tdesc.h.
10627 (outreg, prepare_resume_reply): Adjust.
10628 * server.c: Include tdesc.h.
10629 (gdbserver_xmltarget): Delete declaration.
10630 (get_features_xml, process_serial_event): Adjust.
10631 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10633 (struct process_info) <tdesc>: New field.
10634 (ipa_tdesc): Declare.
10635 * tdesc.c: New file.
10636 * tdesc.h: New file.
10637 * tracepoint.c: Include tdesc.h.
10638 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10639 (get_context_regcache): Adjust to pass ipa_tdesc down.
10640 (do_action_at_tracepoint): Adjust to get the register cache size
10641 from the context regcache's description.
10642 (traceframe_walk_blocks): Adjust to get the register cache size
10643 from the current trace frame's description.
10644 (traceframe_get_pc): Adjust to get current trace frame's
10645 description and pass it down.
10646 (gdb_collect): Adjust to get the register cache size from the
10648 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10649 (gdbserver_xmltarget): Delete.
10650 (initialize_low_tracepoint): Set the ipa's target description.
10651 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10652 (initialize_low_tracepoint): Set the ipa's target description.
10653 * linux-x86-low.c: Include tdesc.h.
10654 [__x86_64__] (is_64bit_tdesc): New.
10655 (ps_get_thread_area, x86_get_thread_area): Use it.
10656 (i386_cannot_store_register): Rename to ...
10657 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10658 (i386_cannot_fetch_register): Rename to ...
10659 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10660 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10662 (target_regsets): Rename to ...
10663 (x86_regsets): ... this.
10664 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10666 (x86_siginfo_fixup): Use is_64bit_tdesc.
10667 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10668 (tdesc_x32_avx_linux, tdesc_x32_linux)
10669 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10671 (x86_linux_update_xmltarget): Delete.
10672 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10673 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10674 (AMD64_LINUX_USER64_CS): New.
10675 (x86_linux_read_description): New, based on
10676 x86_linux_update_xmltarget.
10677 (same_process_callback): New.
10678 (x86_arch_setup_process_callback): New.
10679 (x86_linux_update_xmltarget): New.
10680 (x86_regsets_info): New.
10681 (amd64_linux_regs_info): New.
10682 (i386_linux_usrregs_info): New.
10683 (i386_linux_regs_info): New.
10684 (x86_linux_regs_info): New.
10685 (x86_arch_setup): Reimplement.
10686 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10687 (x86_emit_ops): Ditto.
10688 (the_low_target): Adjust. Install x86_linux_regs_info,
10689 x86_cannot_fetch_register, and x86_cannot_store_register.
10690 (initialize_low_arch): New.
10691 * linux-ia64-low.c (tdesc_ia64): Declare.
10692 (ia64_fetch_register): Adjust.
10693 (ia64_usrregs_info, regs_info): New globals.
10694 (ia64_regs_info): New function.
10695 (the_low_target): Adjust.
10696 (initialize_low_arch): New function.
10697 * linux-sparc-low.c (tdesc_sparc64): Declare.
10698 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10700 (sparc_arch_setup): New function.
10701 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10702 (the_low_target): Adjust.
10703 (initialize_low_arch): New function.
10704 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10705 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10706 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10707 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10708 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10709 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10710 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10711 (tdesc_powerpc_isa205_vsx64l): Declare.
10712 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10713 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10714 (ppc_set_pc, ppc_get_hwcap): Adjust.
10715 (ppc_usrregs_info): Forward declare.
10716 (!__powerpc64__) ppc_regmap_adjusted: New global.
10717 (ppc_arch_setup): Adjust to the current process'es target
10719 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10720 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10721 (ppc_store_evrregset): Adjust.
10722 (target_regsets): Rename to ...
10723 (ppc_regsets): ... this, and make static.
10724 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10725 (ppc_regs_info): New function.
10726 (the_low_target): Adjust.
10727 (initialize_low_arch): New function.
10728 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10729 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10730 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10731 (tdesc_s390x_linux64v2): Declare.
10732 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10733 (s390_fill_gregset, s390_store_last_break): Adjust.
10734 (target_regsets): Rename to ...
10735 (s390_regsets): ... this, and make static.
10736 (s390_get_pc, s390_set_pc): Adjust.
10737 (s390_get_hwcap): New target_desc parameter, and use it.
10738 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10739 (s390_arch_setup): Adjust to set the current process'es target
10740 description. Don't adjust the regmap.
10741 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10742 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10743 (regs_info_3264): New globals.
10744 (s390_regs_info): New function.
10745 (the_low_target): Adjust.
10746 (initialize_low_arch): New function.
10747 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10748 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10749 [__mips64] (init_registers_mips_linux)
10750 (init_registers_mips_dsp_linux): Delete defines.
10751 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10752 (have_dsp): New global.
10753 (mips_read_description): New, based on mips_arch_setup.
10754 (mips_arch_setup): Reimplement.
10755 (get_usrregs_info): New function.
10756 (mips_cannot_fetch_register, mips_cannot_store_register)
10757 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10758 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10759 (target_regsets): Rename to ...
10760 (mips_regsets): ... this, and make static.
10761 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10762 (dsp_regs_info, regs_info): New globals.
10763 (mips_regs_info): New function.
10764 (the_low_target): Adjust.
10765 (initialize_low_arch): New function.
10766 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10767 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10769 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10770 (arm_read_description): New, with bits factored from
10772 (arm_arch_setup): Reimplement.
10773 (target_regsets): Rename to ...
10774 (arm_regsets): ... this, and make static.
10775 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10776 (arm_regs_info): New function.
10777 (the_low_target): Adjust.
10778 (initialize_low_arch): New function.
10779 * linux-m68k-low.c (tdesc_m68k): Declare.
10780 (target_regsets): Rename to ...
10781 (m68k_regsets): ... this, and make static.
10782 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10783 (m68k_regs_info): New function.
10784 (m68k_arch_setup): New function.
10785 (the_low_target): Adjust.
10786 (initialize_low_arch): New function.
10787 * linux-sh-low.c (tdesc_sharch): Declare.
10788 (target_regsets): Rename to ...
10789 (sh_regsets): ... this, and make static.
10790 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10791 (sh_regs_info, sh_arch_setup): New functions.
10792 (the_low_target): Adjust.
10793 (initialize_low_arch): New function.
10794 * linux-bfin-low.c (tdesc_bfin): Declare.
10795 (bfin_arch_setup): New function.
10796 (bfin_usrregs_info, regs_info): New globals.
10797 (bfin_regs_info): New function.
10798 (the_low_target): Adjust.
10799 (initialize_low_arch): New function.
10800 * linux-cris-low.c (tdesc_cris): Declare.
10801 (cris_arch_setup): New function.
10802 (cris_usrregs_info, regs_info): New globals.
10803 (cris_regs_info): New function.
10804 (the_low_target): Adjust.
10805 (initialize_low_arch): New function.
10806 * linux-cris-low.c (tdesc_crisv32): Declare.
10807 (cris_arch_setup): New function.
10808 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10809 (cris_regs_info): New function.
10810 (the_low_target): Adjust.
10811 (initialize_low_arch): New function.
10812 * linux-m32r-low.c (tdesc_m32r): Declare.
10813 (m32r_arch_setup): New function.
10814 (m32r_usrregs_info, regs_info): New globals.
10815 (m32r_regs_info): Adjust.
10816 (initialize_low_arch): New function.
10817 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10818 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10819 (tic6x_usrregs_info): Forward declare.
10820 (tic6x_read_description): New function, based on ...
10821 (tic6x_arch_setup): ... this. Reimplement.
10822 (target_regsets): Rename to ...
10823 (tic6x_regsets): ... this, and make static.
10824 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10825 (tic6x_regs_info): New function.
10826 (the_low_target): Adjust.
10827 (initialize_low_arch): New function.
10828 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10829 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10830 (target_regsets): Rename to ...
10831 (xtensa_regsets): ... this, and make static.
10832 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10834 (xtensa_arch_setup, xtensa_regs_info): New functions.
10835 (the_low_target): Adjust.
10836 (initialize_low_arch): New function.
10837 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10838 (nios2_arch_setup): Set the current process'es tdesc.
10839 (target_regsets): Rename to ...
10840 (nios2_regsets): ... this.
10841 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10842 (nios2_regs_info): New function.
10843 (the_low_target): Adjust.
10844 (initialize_low_arch): New function.
10845 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10846 (aarch64_arch_setup): Set the current process'es tdesc.
10847 (target_regsets): Rename to ...
10848 (aarch64_regsets): ... this.
10849 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10850 (aarch64_regs_info): New function.
10851 (the_low_target): Adjust.
10852 (initialize_low_arch): New function.
10853 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10855 (target_regsets): Rename to ...
10856 (tile_regsets): ... this.
10857 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10858 (tile_regs_info): New function.
10859 (tile_arch_setup): Set the current process'es tdesc.
10860 (the_low_target): Adjust.
10861 (initialize_low_arch): New function.
10862 * spu-low.c (tdesc_spu): Declare.
10863 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10864 * win32-arm-low.c (tdesc_arm): Declare.
10865 (arm_arch_setup): New function.
10866 (the_low_target): Install arm_arch_setup instead of
10867 init_registers_arm.
10868 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10869 (init_windows_x86): Rename to ...
10870 (i386_arch_setup): ... this. Set `win32_tdesc'.
10871 (the_low_target): Adjust.
10872 * win32-low.c (win32_tdesc): New global.
10873 (child_add_thread): Don't create the thread cache here.
10874 (do_initial_child_stuff): Set the new process'es tdesc.
10875 * win32-low.h (struct target_desc): Forward declare.
10876 (win32_tdesc): Declare.
10877 * lynx-i386-low.c (tdesc_i386): Declare global.
10878 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10879 * lynx-low.c (lynx_tdesc): New global.
10880 (lynx_add_process): Set the new process'es tdesc.
10881 * lynx-low.h (struct target_desc): Forward declare.
10882 (lynx_tdesc): Declare global.
10883 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10884 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10885 * nto-low.c (nto_tdesc): New global.
10886 (do_attach): Set the new process'es tdesc.
10887 * nto-low.h (struct target_desc): Forward declare.
10888 (nto_tdesc): Declare.
10889 * nto-x86-low.c (tdesc_i386): Declare.
10890 (nto_x86_arch_setup): Set `nto_tdesc'.
10892 2013-06-04 Gary Benson <gbenson@redhat.com>
10894 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10895 to qSupported response when appropriate.
10896 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10897 with nonzero-length annex.
10898 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10899 arguments supplied in annex.
10901 2013-05-31 Doug Evans <dje@google.com>
10904 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10905 64 bits in 64-cross-32 environment.
10907 2013-05-28 Pedro Alves <palves@redhat.com>
10909 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10910 (aarch64-without-fpu.c): Delete rule.
10911 * configure.srv (aarch64*-*-linux*): Remove references to
10912 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10913 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10916 2013-05-24 Pedro Alves <palves@redhat.com>
10918 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10919 instead of strchr/decode_address. Error if the range isn't split
10920 with a ','. Don't assume there's be a ':' in the action.
10922 2013-05-23 Yao Qi <yao@codesourcery.com>
10923 Pedro Alves <palves@redhat.com>
10925 * linux-low.c (lwp_in_step_range): New function.
10926 (linux_wait_1): If the thread was range stepping and stopped
10927 outside the stepping range, report the stop to GDB. Otherwise,
10928 continue stepping. Add range stepping debug output.
10929 (linux_set_resume_request): Copy the step range from the resume
10930 request to the lwp.
10931 (linux_supports_range_stepping): New.
10932 (linux_target_ops) <supports_range_stepping>: Set to
10933 linux_supports_range_stepping.
10934 * linux-low.h (struct linux_target_ops)
10935 <supports_range_stepping>: New field.
10936 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10937 * linux-x86-low.c (x86_supports_range_stepping): New.
10938 (the_low_target) <supports_range_stepping>: Set to
10939 x86_supports_range_stepping.
10940 * server.c (handle_v_cont): Handle 'r' action.
10941 (handle_v_requests): Append ";r" if the target supports range
10943 * target.h (struct thread_resume) <step_range_start,
10944 step_range_end>: New fields.
10945 (struct target_ops) <supports_range_stepping>:
10947 (target_supports_range_stepping): New macro.
10949 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10951 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10952 confusion in comment.
10954 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10956 * lynx-low.c (struct process_info_private): New type.
10957 (lynx_add_process): New function.
10958 (lynx_create_inferior, lynx_attach): Replace calls to
10959 add_process by calls to lynx_add_process.
10960 (lynx_resume): If PTID is null, then try using
10961 current_process()->private->last_wait_event_ptid.
10963 (lynx_clear_inferiors): Delete. The contents of that function
10964 has been inlined in lynx_mourn;
10965 (lynx_wait_1): Save the ptid in the process's private data.
10966 (lynx_mourn): Free the process' private data. Replace call
10967 to lynx_clear_inferiors by call to clear_inferiors.
10969 2013-05-17 Yao Qi <yao@codesourcery.com>
10971 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10974 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10976 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10977 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10978 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10979 PT_TEXT_END_ADDR guards. Update comments.
10980 (linux_target_op) <read_offsets>: Conditionally define to
10981 linux_read_offsets if the target is UCLIBC and if it defines
10982 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10984 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10985 Andrew Jenner <andrew@codesourcery.com>
10987 * Makefile.in (SFILES): Add linux-nios2-low.c.
10988 (clean): Add action to delete nios2-linux.c.
10989 (nios2-linux.c): New rule.
10990 * configure.srv: Add nios2*-*-linux*.
10991 * linux-nios2-low.c: New.
10993 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10995 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10997 2013-04-25 Hui Zhu <hui@codesourcery.com>
11000 * ax.c (ax_printf): Add fflush.
11002 2013-04-22 Tom Tromey <tromey@redhat.com>
11004 * Makefile.in (SFILES): Add filestuff.c.
11005 (OBS): Add filestuff.o.
11006 (filestuff.o): New target.
11007 * config.in, configure: Rebuild.
11008 * configure.ac: Check for fdwalk, pipe2.
11010 2013-04-17 Pedro Alves <palves@redhat.com>
11012 * configure.ac (USE_THREAD_DB): Delete variable.
11013 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11014 Don't AC_SUBST USE_THREAD_DB.
11015 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11016 * config.in, configure: Regenerate.
11018 2013-04-16 Pedro Alves <palves@redhat.com>
11020 * linux-low.h (struct lwp_info) <thread_known>: Move under
11021 the USE_THREAD_DB #ifdef.
11023 2013-04-16 Pedro Alves <palves@redhat.com>
11025 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11026 (linux-low.o): Delete rule.
11027 * linux-low.h: Always include "gdb_thread_db.h" instead of
11028 conditionally including thread_db.h.
11029 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11032 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11034 * Makefile.in (install-only): Fix make install regression.
11036 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11038 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11039 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11041 * gdbserver.1: Remove.
11043 2013-03-22 Pedro Alves <palves@redhat.com>
11045 * linux-low.c (handle_extended_wait): Don't call
11046 linux_enable_event_reporting.
11048 2013-03-15 Tony Theodore <tonyt@logyst.com>
11051 * Makefile.in (SHELL): Use @SHELL@.
11053 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11055 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11058 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11060 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11061 Remove extraneous NULL element.
11063 2013-03-13 Yao Qi <yao@codesourcery.com>
11065 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11066 'V' block in trace frame.
11068 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11070 * target.h (struct target_ops): Add btrace ops.
11071 (target_supports_btrace): New macro.
11072 (target_enable_btrace): New macro.
11073 (target_disable_btrace): New macro.
11074 (target_read_btrace): New macro.
11075 * gdbthread.h (struct thread_info): Add btrace field.
11076 * server.c: Include btrace-common.h.
11077 (handle_btrace_general_set): New function.
11078 (handle_btrace_enable): New function.
11079 (handle_btrace_disable): New function.
11080 (handle_general_set): Call handle_btrace_general_set.
11081 (handle_qxfer_btrace): New function.
11082 (struct qxfer qxfer_packets[]): Add btrace entry.
11083 * inferiors.c (remove_thread): Disable btrace.
11084 * linux-low: Include linux-btrace.h.
11085 (linux_low_enable_btrace): New function.
11086 (linux_low_read_btrace): New function.
11087 (linux_target_ops): Add btrace ops.
11088 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11089 Add srv_linux_btrace=yes.
11090 (x86_64-*-linux*): Add linux-btrace.o.
11091 Add srv_linux_btrace=yes.
11092 * configure.ac: Define HAVE_LINUX_BTRACE.
11093 * config.in: Regenerated.
11094 * configure: Regenerated.
11096 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11098 * server.c (handle_qxfer): Preserve error message if -3 is
11100 (qxfer): Document the -3 return value.
11102 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11104 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11105 (linux_btrace_h): New variable.
11106 (linux-btrace.o): New rule.
11108 2013-03-08 Stan Shebs <stan@codesourcery.com>
11109 Hafiz Abid Qadeer <abidh@codesourcery.com>
11111 * tracepoint.c (trace_buffer_size): New global.
11112 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11113 (init_trace_buffer): Change to one-argument function. Allocate
11114 trace buffer memory.
11115 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11116 handle QTBuffer:size packet.
11117 (cmd_bigqtbuffer_size): New function.
11118 (initialize_tracepoint): Call init_trace_buffer with
11119 DEFAULT_TRACE_BUFFER_SIZE.
11120 * server.c (handle_query): Add QTBuffer:size in the
11123 2013-03-07 Yao Qi <yao@codesourcery.com>
11125 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11126 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11128 (cmd_qtsp): Adjust condition. Do post increment.
11129 Set cur_action and cur_step_action back to 0.
11131 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11134 * linux-low.c (linux_write_memory): Return early success if LEN is
11137 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11139 * configure.srv: Add x86_64-*-cygwin* as target.
11141 2013-02-28 Tom Tromey <tromey@redhat.com>
11143 * configure.ac: Invoke AC_SYS_LARGEFILE.
11144 * configure, config.in: Rebuild.
11146 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11148 * win32-low.c: Throughout, fix format strings and casts of
11149 printf-like functions to avoid type related warnings on all
11151 (get_child_debug_event): Print dwDebugEventCode as hex since
11152 that's how it's usually documented.
11154 2013-02-28 Yao Qi <yao@codesourcery.com>
11156 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11159 2013-02-27 Jiong Wang <jiwang@tilera.com>
11161 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11162 (reg-tilegx32.c): New rule.
11163 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11164 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11165 different register info initializer according to elf class.
11166 (init_registers_tilgx32): New function. The tilegx32 register info
11168 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11169 (tile_store_gregset): Likewise.
11171 2013-02-27 Yao Qi <yao@codesourcery.com>
11173 * server.c (process_point_options): Print debug message when
11174 debug_threads is true.
11176 2013-02-26 Yao Qi <yao@codesourcery.com>
11178 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11180 2013-02-19 Pedro Alves <palves@redhat.com>
11181 Kai Tietz <ktietz@redhat.com>
11185 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11186 instead of strtoul to extract address from packet.
11187 (process_serial_event) <'z'>: Likewise.
11189 2013-02-18 Yao Qi <yao@codesourcery.com>
11191 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11193 2013-02-14 Pedro Alves <palves@redhat.com>
11197 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11198 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11200 2013-02-14 Pedro Alves <palves@redhat.com>
11202 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11204 2013-02-14 Pedro Alves <palves@redhat.com>
11206 * tracepoint.c (save_string): Delete.
11207 (add_tracepoint_action): Use savestring instead of save_string.
11209 2013-02-12 Pedro Alves <palves@redhat.com>
11211 * linux-xtensa-low.c: Ditto.
11212 * xtensa-xtregs.c: Ditto.
11214 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11216 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11219 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11221 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11222 aarch64_num_wp_regs and aarch64_num_bp_regs to
11223 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11225 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11227 * linux-aarch64-low.c (ps_get_thread_area): Replace
11228 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11230 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11231 Marcus Shawcroft <marcus.shawcroft@arm.com>
11232 Nigel Stephens <nigel.stephens@arm.com>
11233 Yufeng Zhang <yufeng.zhang@arm.com>
11235 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11236 (aarch64.c, aarch64-without-fpu.c): New targets.
11237 * configure.srv (aarch64*-*-linux*): New.
11238 * linux-aarch64-low.c: New file.
11240 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11242 * linux-low.c (handle_extended_wait, linux_create_inferior)
11243 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11244 (dequeue_one_deferred_signal, linux_resume_one_thread)
11245 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11246 (linux_tracefork_grandchild, linux_test_for_tracefork)
11247 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11248 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11249 where the argument is 0.
11251 2013-01-25 Yao Qi <yao@codesourcery.com>
11253 * event-loop.c: Include "queue.h".
11254 (gdb_event_p): New typedef.
11255 (struct gdb_event) <next_event>: Remove.
11256 (event_queue): Change to QUEUE(gdb_event_p).
11257 (async_queue_event): Remove.
11258 (gdb_event_xfree): New.
11259 (initialize_event_loop): New.
11260 (process_event): Use API from QUEUE.
11261 (wait_for_event): Likewise.
11262 * server.c (main): Call initialize_event_loop.
11263 * server.h (initialize_event_loop): Declare.
11265 2013-01-18 Yao Qi <yao@codesourcery.com>
11267 * ax.h (struct eval_agent_expr_context): New.
11268 (gdb_eval_agent_expr): Update declaration.
11269 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11270 TFRAME. Add new argument CTX.
11271 * server.h (struct eval_agent_expr_context): Declare.
11272 (agent_mem_read, agent_tsv_read): Update declaration.
11273 (agent_mem_read_string): Likewise.
11274 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11275 (add_traceframe_block): Add new argument TPOINT.
11276 Increase TPOINT->traceframe_usage.
11277 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11278 eval_tracepoint_agent_expr.
11279 (condition_true_at_tracepoint): Likewise.
11280 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11281 (agent_mem_read_string, agent_tsv_read): Likewise.
11283 2013-01-16 Yao Qi <yao@codesourcery.com>
11285 * linux-low.c (linux_resume_one_lwp): Don't check
11286 'lwp->bp_reinsert != 0'.
11288 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11289 Pedro Alves <palves@redhat.com>
11291 * lynx-low.c (ptrace_request_to_str): Define a temporary
11292 macro and use it to simplify this function's implementation.
11294 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11296 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11299 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11301 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11303 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11305 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11307 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11309 * lynx-low.c (lynx_resume): Use the resume_info parameter
11310 to determine the ptid for the lynx_ptrace call, unless
11311 it is equal to minus_one_ptid, in which case we use the
11312 ptid of the current_inferior.
11313 (lynx_wait_1): After having received a thread create/exit
11314 event, resume the inferior's execution using the signaling
11315 thread's ptid, rather than the old ptid.
11317 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11319 * lynx-low.c (lynx_resume): Delete variable ret.
11321 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11323 * gdbreplay.c (gdbreplay_version): Update copyright year.
11324 * server.c (gdbserver_version): Likewise.
11326 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11328 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11331 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11333 * lynx-low.c (ptrace_request_to_str): Add handling for
11334 PTRACE_GETTRACESIG.
11336 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11338 * lynx-low.c (lynx_attach): Delete variable new_process.
11340 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11342 * lynx-low.c (lynx_create_inferior): Delete variable
11345 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11347 * lynx-low.c (ptrace_request_to_str): Do not handle
11348 PTRACE_GETTHREADLIST if this macro does not exist.
11350 2012-12-15 Yao Qi <yao@codesourcery.com>
11352 * Makefile.in (OBS): Add notif.o.
11353 * notif.c, notif.h: New.
11354 * server.c: Include "notif.h".
11355 (struct vstop_notif) <next>: Remove.
11357 (queue_stop_reply): Update.
11358 (push_event, send_next_stop_reply): Remove.
11359 (discard_queued_stop_replies): Update.
11360 (notif_stop): New variable.
11361 (handle_v_stopped): Remove.
11362 (handle_v_requests): Don't call handle_v_stopped. Call
11363 handle_ack_notif instead.
11364 (queue_stop_reply_callback): Call notif_event_enque instead
11365 of queue_stop_reply.
11366 (handle_status): Don't call send_next_stop_reply, call
11367 notif_write_event instead.
11368 (kill_inferior_callback): Likewise.
11369 (detach_or_kill_inferior_callback): Likewise.
11370 (main): Call initialize_notif.
11371 (process_serial_event): Call QUEUE_is_empty.
11372 (handle_target_event): Call notif_push instead of push event.
11373 * server.h (push_event): Remove declaration.
11375 2012-12-10 Tom Tromey <tromey@redhat.com>
11377 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11378 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11381 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11382 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11383 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11384 (amd64-linux-ipa.o, ax.o): Rewrite.
11385 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11386 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11387 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11388 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11389 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11390 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11391 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11392 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11393 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11394 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11395 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11396 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11397 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11398 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11399 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11400 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11401 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11402 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11403 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11404 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11405 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11406 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11407 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11408 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11409 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11410 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11411 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11412 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11413 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11414 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11415 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11416 (reg-tilegx.o): Remove.
11417 (all_object_files): New macro.
11418 Include .deps files.
11419 * aclocal.m4, configure: Rebuild.
11420 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11421 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11422 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11424 2012-12-05 Tom Tromey <tromey@redhat.com>
11427 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11429 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11431 * configure.ac: Check for linux/perf_event.h.
11432 * config.in: Regenerated.
11433 * configure: Regenerated.
11435 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11437 * hostio.c (handle_readlink): Decrease buffer size
11438 parameter passed to readlink by one byte.
11440 2012-11-26 Yao Qi <yao@codesourcery.com>
11442 * configure.ac (build_warnings): Append '-Wempty-body'.
11443 * configure: Regenerated.
11444 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11447 2012-11-15 Pierre Muller <muller@sourceware.org>
11449 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11450 * config.in: Regenerate.
11451 * configure: Regenerate.
11452 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11453 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11454 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11455 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11457 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11458 instead of <sys/wait.h> header.
11459 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11461 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11463 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11464 (various make rules): Remove -DGDBSERVER
11466 2012-11-09 Yao Qi <yao@codesourcery.com>
11468 * spu-low.c (current_ptid): Move it to ..
11469 * gdbthread.h: ... here. New.
11470 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11471 * server.c (myresume, process_serial_event): Likewise.
11472 * thread-db.c (thread_db_find_new_threads): Likewise.
11473 * tracepoint.c (run_inferior_command): Likewise.
11475 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11477 * server.c (handle_search_memory_1): Include access length in
11480 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11482 * linux-crisv32-low.c: Fix compile errors.
11484 2012-09-04 Yao Qi <yao@codesourcery.com>
11486 * tracepoint.c (cmd_qtsv): Adjust debug message.
11487 Don't check CUR_TPOINT.
11489 2012-08-28 Yao Qi <yao@codesourcery.com>
11491 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11492 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11493 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11494 Remove declarations of xmalloc, xreallloc, xstrdup and
11496 * Makefile.in (libiberty_h): New.
11497 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11498 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11500 2012-08-23 Yao Qi <yao@codesourcery.com>
11502 * server.h: Remove declaration of 'xsnprintf'.
11504 2012-08-22 Keith Seitz <keiths@redhat.com>
11506 * server.h: Include build-gnulib-gbserver/config.h.
11507 * gdbreplay.c: Likewise.
11509 2012-08-08 Doug Evans <dje@google.com>
11511 * Makefile.in (SFILES): Add gdb_vecs.c.
11512 (OBS): Add gdb_vecs.o.
11513 (gdb_vecs_h, host_defs_h): New variables.
11514 (thread-db.o): Add $(gdb_vecs_h) dependency.
11515 (gdb_vecs.o): New rule.
11516 * thread-db.c: #include "gdb_vecs.h".
11517 (thread_db_load_search): Use a vector to iterate over path elements.
11518 Handle text appearing after "$pdir".
11520 * configure.ac: Add check for strstr.
11521 * config.in: Regenerate.
11522 * configure: Regenerate.
11524 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11526 * hostio.c (handle_pread): If pread fails, fall back to attempting
11528 (handle_pwrite): Likewise for pwrite.
11530 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11532 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11533 between unsupported TYPE and unimplementable ADDR/LEN combination.
11534 (arm_insert_point): Act on new return value.
11536 2012-07-31 Pedro Alves <palves@redhat.com>
11538 * server.c (process_point_options): Only skip tokens if we find
11539 one that is unrecognized. Don't treat 'X' specially while
11540 skipping unrecognized tokens.
11542 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11544 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11545 to 4-byte-align HW breakpoint addresses for Thumb.
11547 2012-07-27 Yao Qi <yao@codesourcery.com>
11551 * server.h: Declare gdb_agent_about_to_close.
11552 * target.c (kill_inferior): Include "agent.h".
11553 New. Send command 'kill'.
11554 * target.h (kill_inferior): Removed macro.
11555 * tracepoint.c (gdb_agent_about_to_close): New.
11556 (gdb_agent_helper_thread): Handle command 'close'.
11557 Wait endlessly until the inferior stops.
11558 Install gdb_agent_remove_socket to atexit hook.
11559 (agent_socket_name): New static variable.
11560 (gdb_agent_socket_init): Replace local variable 'name' with
11561 'agent_socket_name'.
11562 (gdb_agent_remove_socket): New.
11564 2012-07-27 Yao Qi <yao@codesourcery.com>
11566 * server.c (process_point_options): Stop at 'X' when parsing.
11568 2012-07-19 Michael Eager <eager@eagercon.com>
11570 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11572 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11573 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11574 hardware breakpoint.
11576 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11578 * gdbserver/linux-low.c (initialize_low): Call
11579 linux_ptrace_init_warnings.
11581 2012-07-02 Doug Evans <dje@google.com>
11583 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11586 2012-07-02 Stan Shebs <stan@codesourcery.com>
11588 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11589 (ax.o): Add it to build rule.
11591 (OBS): Add format.o.
11592 (IPA_OBS): Add format.o.
11593 * server.c (handle_query): Claim support for breakpoint commands.
11594 (process_point_options): Add command case.
11595 (process_serial_event): Leave running if there are printfs in
11597 * mem-break.h (any_persistent_commands): Declare.
11598 (add_breakpoint_commands): Declare.
11599 (gdb_no_commands_at_breakpoint): Declare.
11600 (run_breakpoint_commands): Declare.
11601 * mem-break.c (struct point_command_list): New struct.
11602 (struct breakpoint): New field command_list.
11603 (any_persistent_commands): New function.
11604 (add_commands_to_breakpoint): New function.
11605 (add_breakpoint_commands): New function.
11606 (gdb_no_commands_at_breakpoint): New function.
11607 (run_breakpoint_commands): New function.
11608 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11610 * ax.c: Include format.h.
11611 (ax_printf): New function.
11612 (gdb_eval_agent_expr): Add printf opcode.
11614 2012-06-13 Yao Qi <yao@codesourcery.com>
11616 * server.c (start_inferior): Remove duplicated writes to fields
11617 'last_resume_kind' and 'last_status' of 'current_inferior'.
11619 2012-06-12 Yao Qi <yao@codesourcery.com>
11620 Pedro Alves <palves@redhat.com>
11622 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11624 * server.c (handle_v_cont): Extend comment.
11626 2012-06-11 Yao Qi <yao@codesourcery.com>
11628 * linux-low.c (linux_attach): Add 'static'.
11630 2012-06-06 Yao Qi <yao@codesourcery.com>
11632 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11634 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11636 Fix gcc -flto compilation warning.
11637 * server.c (main): Make variable multi_mode and attach volatile.
11639 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11641 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11642 if the platform doesn't know about it.
11644 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11646 * Makefile.in (SFILES): Add linux-tile-low.c.
11647 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11648 * configure.srv: Handle tilegx-*-linux*.
11649 * linux-tile-low.c: New file.
11651 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11653 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11655 2012-05-24 Pedro Alves <palves@redhat.com>
11659 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11661 2012-05-24 Pedro Alves <palves@redhat.com>
11665 Replace target_signal with gdb_signal throughout.
11667 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11669 * linux-low.c (linux_store_registers): Avoid the copying sequence
11670 when no data has been retrieved by ptrace.
11672 2012-05-22 Will Deacon <will.deacon@arm.com>
11674 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11675 Include asm/ptrace.h.
11676 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11679 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11681 * linux-low.c (linux_store_registers): Don't re-retrieve data
11682 with ptrace that has already been obtained from /proc. Always
11683 copy any data retrieved with ptrace to the buffer supplied.
11685 2012-05-11 Yao Qi <yao@codesourcery.com>
11686 Pedro Alves <palves@redhat.com>
11688 * linux-low.c (enum stopping_threads_kind): New.
11689 (stopping_threads): Change type to `enum stopping_threads_kind'.
11690 (handle_extended_wait): If stopping and suspending threads, leave
11691 the new_lwp suspended too.
11692 (linux_wait_for_event): Adjust.
11693 (stop_all_lwps): Set `stopping_threads' to
11694 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11695 whether we're suspending threads or just stopping them. Assert no
11698 2012-04-29 Yao Qi <yao@codesourcery.com>
11700 * server.h: Move some code to ...
11701 * gdbthread.h: ... here. New.
11702 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11703 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11704 (nto-low.o, win32-low.o): Likewise.
11705 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11706 * regcache.c, remote-utils.c, server.c: Likewise.
11707 * target.c, tracepoint.c, win32-low.c: Likewise.
11709 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11711 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11712 (PTRACE_ARG4_TYPE): Likewise.
11713 (PTRACE_XFER_TYPE): Likewise.
11714 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11715 ptrace to PTRACE_ARG3_TYPE.
11716 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11717 (PTRACE_ARG4_TYPE): Likewise.
11718 (PTRACE_XFER_TYPE): Likewise.
11719 (linux_detach_one_lwp): Cast fourth argument of
11720 ptrace to long then PTRACE_ARG4_TYPE.
11721 (regsets_fetch_inferior_registers): Cast third argument of
11722 ptrace to long then PTRACE_ARG3_TYPE.
11723 (regsets_store_inferior_registers): Likewise.
11725 2012-04-20 Pedro Alves <palves@redhat.com>
11727 * configure: Regenerate.
11729 2012-04-19 Pedro Alves <palves@redhat.com>
11731 * Makefile.in (GNULIB_BUILDDIR): New.
11732 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11733 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11734 (all, install-only, uninstall, clean-info, all-lib, clean): No
11735 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11736 (maintainer-clean realclean distclean): Use subdir_do.
11738 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11739 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11740 * acinclude.m4: Include acx_configure_dir.m4.
11741 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11742 calls. Call AC_PROG_RANLIB. Configure gnulib using
11745 (GNULIB_STDINT_H): Adjust.
11746 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11747 * gdbreplay.c: Include build-gnulib/config.h.
11748 * server.h: Likewise.
11749 * aclocal.m4: Regenerate.
11750 * config.in: Regenerate.
11751 * configure: Regenerate.
11753 2012-04-19 Pedro Alves <palves@redhat.com>
11755 * Makefile.in (LIBGNU, INCGNU): Adjust.
11756 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11757 (all, install-only, uninstall, clean-info, all-lib, clean)
11758 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11759 * configure.ac: Adjust AC_OUTPUT output.
11760 * aclocal.m4: Regenerate.
11761 * configure: Regenerate.
11763 2012-04-19 Pedro Alves <palves@redhat.com>
11765 * Makefile.in (generated_files): New.
11766 (server_h): Remove the explicit dependency on config.h, and depend
11767 on $generated_files.
11769 2012-04-19 Pedro Alves <palves@redhat.com>
11771 * Makefile.in (INCGNU): Add -Ignulib.
11773 2012-04-19 Pedro Alves <palves@redhat.com>
11775 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11776 (INCGNU): ... this, and spell out -I here.
11777 (GNULIB_LIB): Rename to ...
11778 (LIBGNU): ... this.
11779 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11781 2012-04-19 Pedro Alves <palves@redhat.com>
11783 * config.in: Regenerate.
11785 2012-04-19 Pedro Alves <palves@redhat.com>
11787 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11788 * server.h (memmem): Remove declaration.
11789 * config.in: Regenerate.
11790 * configure: Regenerate.
11792 2012-04-19 Yao Qi <yao@codesourcery.com>
11794 * Makefile.in (SFILES): Add common/vec.c.
11798 2012-04-19 Yao Qi <yao@codesourcery.com>
11800 * remote-utils.c (prepare_resume_reply): Replace with macro
11801 target_core_of_thread.
11802 * server.c (handle_qxfer_threads_proper): Likewise.
11803 * target.h (traget_core_of_thread): New macro.
11805 2012-04-18 Pedro Alves <palves@redhat.com>
11807 * aclocal.m4: Regenerate.
11808 * configure: Regenerate.
11810 2012-04-16 Yao Qi <yao@codesourcery.com>
11812 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11813 duplicated on address.
11815 2012-04-16 Yao Qi <yao@codesourcery.com>
11817 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11818 (struct tracepoint_action_ops) <send>: New field.
11819 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11820 (agent_expr_send, x_tracepoint_action_send): New.
11821 (l_tracepoint_action_send): New.
11822 (cmd_qtdp): Download and install tracepoint
11823 according to `use_agent'.
11824 (run_inferior_command): Add one more parameter `len'.
11826 (tracepoint_send_agent): New.
11827 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11829 2012-04-16 Yao Qi <yao@codesourcery.com>
11831 * tracepoint.c (download_tracepoints): Moved to ...
11832 (cmd_qtstart): ... here.
11834 2012-04-14 Yao Qi <yao@codesourcery.com>
11836 * tracepoint.c: Include inttypes.h.
11837 (struct collect_memory_action): Use sized types.
11838 (struct tracepoint): Likewise.
11839 (cmd_qtdp, stop_tracing): Update print specifiers.
11840 (cmd_qtp, response_tracepoint): Likewise.
11841 (collect_data_at_tracepoint): Likewise.
11842 (collect_data_at_step): Likewise.
11844 2012-04-14 Yao Qi <yao@codesourcery.com>
11846 Import gnulib module inttypes.
11847 * aclocal.m4, config.in, configure: Regenerated.
11849 2012-04-14 Yao Qi <yao@codesourcery.com>
11851 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11852 Makefile and config.status at last.
11854 2012-04-13 Yao Qi <yao@codesourcery.com>
11856 * tracepoint.c: Include stdint.h unconditionally.
11858 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11860 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11861 on BFD_HAVE_SYS_PROCFS_TYPE.
11862 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11863 * configure: Regenerate.
11864 * config.in: Likewise.
11866 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11868 * Makefile.in (clean): Also remove x32.c x32-linux.c
11869 x32-avx.c x32-avx-linux.c.
11870 (x32.o): New target.
11872 (x32-linux.o): Likewise.
11873 (x32-linux.c): Likewise.
11874 (x32-avx.o): Likewise.
11875 (x32-avx.c): Likewise.
11876 (x32-avx-linux.o): Likewise.
11877 (x32-avx-linux.c): Likewise.
11879 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11880 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11881 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11882 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11883 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11884 i386/x32-avx-linux.xml.
11886 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11887 (init_registers_x32_avx_linux): Likwise.
11888 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11889 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11891 2012-04-13 Pedro Alves <palves@redhat.com>
11893 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11894 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11895 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11896 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11899 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11901 * linux-x86-low.c (compat_x32_clock_t): New.
11902 (compat_x32_siginfo_t): Likewise.
11903 (compat_x32_siginfo_from_siginfo): Likewise.
11904 (siginfo_from_compat_x32_siginfo): Likewise.
11905 (linux_is_elf64): Likewise.
11906 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11907 and siginfo_from_compat_x32_siginfo for x32.
11908 (x86_arch_setup): Set linux_is_elf64.
11910 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11913 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11915 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11916 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11917 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11918 compatible with process.
11920 2012-04-12 Yao Qi <yao@codesourcery.com>
11922 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11923 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11924 (install-only, install-info, clean): Handle sub dir gnulib.
11925 (all-lib, am--refresh): New targets.
11926 (memmem.o): Remove target.
11927 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11928 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11929 (AC_REPLACE_FUNCS): Remove memmem.
11930 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11931 (AC_OUTPUT): Generate Makefile in gnulib/.
11932 * aclocal.m4, config.in, configure: Regenerated.
11934 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11936 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11938 2012-04-05 Pedro Alves <palves@redhat.com>
11940 -Werror=strict-aliasing
11942 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11945 2012-04-04 Pedro Alves <palves@redhat.com>
11947 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11948 (sparc_store_gregset_from_stack, sparc_store_gregset)
11949 (sparc_breakpoint_at): Fix formatting.
11951 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11953 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11955 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11956 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11957 * config.in: Regenerate.
11958 * configure: Likewise.
11960 2012-03-29 Pedro Alves <palves@redhat.com>
11962 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11963 Correct ptrace arguments.
11965 2012-03-28 Pedro Alves <palves@redhat.com>
11967 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11968 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11969 (IA64_FR1_REGNUM): New defines.
11970 (ia64_fetch_register): New.
11971 (the_low_target): Install it.
11972 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11974 * linux-low.c (linux_fetch_registers): Try the
11975 the_low_target.fetch_register hook first.
11977 * linux-arm-low.c (the_low_target): Adjust.
11978 * linux-bfin-low.c (the_low_target): Adjust.
11979 * linux-cris-low.c (the_low_target): Adjust.
11980 * linux-crisv32-low.c (the_low_target): Adjust.
11981 * linux-m32r-low.c (the_low_target): Adjust.
11982 * linux-m68k-low.c (the_low_target): Adjust.
11983 * linux-mips-low.c (the_low_target): Adjust.
11984 * linux-ppc-low.c (the_low_target): Adjust.
11985 * linux-s390-low.c (the_low_target): Adjust.
11986 * linux-sh-low.c (the_low_target): Adjust.
11987 * linux-sparc-low.c (the_low_target): Adjust.
11988 * linux-tic6x-low.c (the_low_target): Adjust.
11989 * linux-x86-low.c (the_low_target): Adjust.
11990 * linux-xtensa-low.c (the_low_target): Adjust.
11992 2012-03-26 Pedro Alves <palves@redhat.com>
11994 * server.c (handle_qxfer_libraries): Don't bail early if
11995 the_target->qxfer_libraries_svr4 is not NULL.
11997 2012-03-26 Pedro Alves <palves@redhat.com>
11999 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12001 2012-03-23 Pedro Alves <palves@redhat.com>
12003 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12004 "library-list-svr4" element's start tag when the the DSO list is
12007 2012-03-23 Pedro Alves <palves@redhat.com>
12009 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12010 a variable whose type size is the same as the inferior's pointer
12013 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12015 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12017 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12018 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12019 * linux-low.h: Include <signal.h>.
12020 (struct siginfo): Remove forward declaration.
12021 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12024 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12026 * .gitignore: Ignore more files.
12028 2012-03-19 Pedro Alves <palves@redhat.com>
12029 Jan Kratochvil <jan.kratochvil@redhat.com>
12031 * server.c (cont_thread, general_thread): Add describing comments.
12032 (start_inferior): Clear `cont_thread'.
12033 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12036 2012-03-15 Yao Qi <yao@codesourcery.com>
12038 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12040 (cmd_qtdp): ... here.
12042 2012-03-15 Yao Qi <yao@codesourcery.com>
12044 * tracepoint.c (struct tracepoint_action_ops): New.
12045 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12046 (m_tracepoint_action_download): New.
12047 (r_tracepoint_action_download): New.
12048 (x_tracepoint_action_download): New.
12049 (l_tracepoint_action_download): New.
12050 (add_tracepoint_action): Install `action->ops' according type.
12051 (download_tracepoint_1): Move code `download' function pointer
12052 of various tracepoint_action_ops.
12054 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12056 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12057 linux_ptrace_attach_warnings.
12059 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12061 * Makefile.in (linux-ptrace.o): New.
12062 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12063 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12064 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12065 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12066 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12068 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12070 2012-03-08 Yao Qi <yao@codesourcery.com>
12071 Pedro Alves <palves@redhat.com>
12073 Fix PR server/13392.
12074 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12075 offset of JMP insn.
12076 * tracepoint.c (remove_tracepoint): New.
12077 (cmd_qtdp): Call remove_tracepoint when failed to install.
12079 2012-03-07 Pedro Alves <palves@redhat.com>
12081 * linux-low.c (get_detach_signal): New.
12082 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12083 Pass on pending signals to PTRACE_DETACH. Check the result of the
12085 * server.c (program_signals, program_signals_p): New.
12086 (handle_general_set): Handle QProgramSignals.
12087 * server.h (program_signals, program_signals_p): Declare.
12089 2012-03-05 Pedro Alves <palves@redhat.com>
12090 Jan Kratochvil <jan.kratochvil@redhat.com>
12092 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12095 2012-03-03 Yao Qi <yao@codesourcery.com>
12097 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12098 agent_look_up_symbols.
12100 2012-03-03 Yao Qi <yao@codesourcery.com>
12102 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12103 (linux-x86-low.o): Likewise.
12104 * server.h: Remove in_process_agent_loaded.
12105 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12109 2012-03-03 Yao Qi <yao@codesourcery.com>
12111 * tracepoint.c (gdb_agent_capability): New global.
12112 (in_process_agent_loaded_ust): Renamed to
12113 `in_process_agent_supports_ust'.
12115 (in_process_agent_supports_ust): Call agent_capability_check.
12116 (clear_installed_tracepoints): Assert that agent supports
12119 2012-03-03 Yao Qi <yao@codesourcery.com>
12121 * linux-low.c (linux_supports_agent): New.
12122 (linux_target_ops): Initialize field `supports_agent' with
12123 linux_supports_agent.
12124 * target.h (struct target_ops) <supports_agent>: New.
12125 (target_supports_agent): New macro.
12126 * server.c (handle_general_set): Handle packet 'QAgent'.
12127 (handle_query): Send `QAgent+'.
12128 * Makefile.in (server.o): Depends on agent.h.
12130 2012-03-03 Yao Qi <yao@codesourcery.com>
12132 * Makefile.in (OBS): Add agent.o.
12133 Add new rule for agent.o.
12134 Track dependence of tracepoint.c on agent.h.
12135 * tracepoint.c (run_inferior_command_1):
12136 (run_inferior_command): Call agent_run_command.
12137 (gdb_ust_connect_sync_socket): Deleted. Move it to
12139 (resume_thread, stop_thread): Likewise.
12140 (gdb_ust_socket_init): Renamed to ...
12141 (gdb_agent_socket_init): ... New.
12142 (gdb_ust_thread): Renamed to ...
12143 (gdb_agent_helper_thread): ... New.
12144 (gdb_ust_init): Move some code to ...
12145 (gdb_agent_init): ... here. New.
12146 [HAVE_UST]: Call gdb_ust_init.
12147 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12148 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12149 * config.in, configure: Regenerated.
12151 2012-03-02 Pedro Alves <palves@redhat.com>
12153 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12154 * linux-low.c (struct simple_pid_list): New.
12155 (stopped_pids): New a struct simple_pid_list pointer.
12156 (add_to_pid_list, pull_pid_from_list): New.
12157 (handle_extended_wait): Don't assume the first signal new children
12158 report is SIGSTOP. Adjust call to pull_pid_from_list.
12159 (linux_wait_for_lwp): Adjust.
12161 2012-03-02 Yao Qi <yao@codesourcery.com>
12163 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12166 2012-03-02 Yao Qi <yao@codesourcery.com>
12168 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12169 `stop_pc' and `tpoint'. Update caller.
12171 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12173 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12174 * linux-low.c (use_linux_regsets): New macro.
12175 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12176 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12177 (linux_register_in_regsets): New function.
12178 (usr_fetch_inferior_registers): Skip registers covered by
12180 (usr_store_inferior_registers): Likewise.
12181 (usr_fetch_inferior_registers): New macro.
12182 (usr_store_inferior_registers): Likewise.
12183 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12184 (linux_store_registers): Likewise.
12185 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12187 (init_registers_mips64_dsp_linux): Likewise.
12188 (init_registers_mips_linux): New macro.
12189 (init_registers_mips_dsp_linux): Likewise.
12190 (mips_dsp_num_regs): Likewise.
12191 (DSP_BASE, DSP_CONTROL): New fallback macros.
12192 (mips_base_regs): New macro.
12193 (mips_regmap): Use it. Fix the size.
12194 (mips_dsp_regmap): New variable.
12195 (mips_dsp_regset_bitmap): Likewise.
12196 (mips_arch_setup): New function.
12197 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12199 (mips_cannot_store_register): Likewise.
12200 (the_low_target): Update .arch_setup, .num_regs and .regmap
12201 initializers. Add .regset_bitmap initializer.
12202 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12204 * linux-bfin-low.c (the_low_target): Likewise.
12205 * linux-cris-low.c (the_low_target): Likewise.
12206 * linux-crisv32-low.c (the_low_target): Likewise.
12207 * linux-ia64-low.c (the_low_target): Likewise.
12208 * linux-m32r-low.c (the_low_target): Likewise.
12209 * linux-m68k-low.c (the_low_target): Likewise.
12210 * linux-ppc-low.c (the_low_target): Likewise.
12211 * linux-s390-low.c (the_low_target): Likewise.
12212 * linux-sh-low.c (the_low_target): Likewise.
12213 * linux-sparc-low.c (the_low_target): Likewise.
12214 * linux-tic6x-low.c (the_low_target): Likewise.
12215 * linux-x86-low.c (the_low_target): Likewise.
12216 * linux-xtensa-low.c (the_low_target): Likewise.
12217 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12218 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12219 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12221 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12222 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12224 2012-02-29 Yao Qi <yao@codesourcery.com>
12225 Pedro Alves <palves@redhat.com>
12227 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12228 `step_over_finished' is true.
12230 2012-02-27 Pedro Alves <palves@redhat.com>
12232 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12233 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12235 2012-02-27 Pedro Alves <palves@redhat.com>
12238 * linux-low.c (pid_is_stopped): New.
12239 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12241 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12243 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12246 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12248 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12250 2012-02-24 Luis Machado <lgustavo@codesourcery>
12252 * server.c (handle_query): Advertise support for target-side
12253 breakpoint condition evaluation.
12254 (process_point_options): New function.
12255 (process_serial_event): When inserting a breakpoint, check for
12256 a target-side condition that should be evaluated.
12258 * mem-break.c: Include regcache.h and ax.h.
12259 (point_cond_list_t): New data structure.
12260 (breakpoint) <cond_list>: New field.
12261 (find_gdb_breakpoint_at): Make non-static.
12262 (delete_gdb_breakpoint_at): Clear any target-side
12264 (clear_gdb_breakpoint_conditions): New function.
12265 (add_condition_to_breakpoint): Likewise.
12266 (add_breakpoint_condition): Likewise.
12267 (gdb_condition_true_at_breakpoint): Likewise.
12268 (gdb_breakpoint_here): Return result directly instead
12269 of going through a local variable.
12271 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12272 (clear_gdb_breakpoint_conditions): Likewise.
12273 (add_breakpoint_condition): Likewise.
12274 (gdb_condition_true_at_breakpoint): Likewise.
12276 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12277 (need_step_over_p): Take target-side breakpoint condition into
12280 2012-02-24 Luis Machado <lgustavo@codesourcery>
12282 * server.h: Include tracepoint.h.
12283 (agent_mem_read, agent_get_trace_state_variable_value,
12284 agent_set_trace_state_variable_value,
12285 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12286 get_set_tsv_func_addr): New prototypes.
12288 * ax.h: New include file.
12289 * ax.c: New source file.
12291 * tracepoint.c: Include ax.h.
12292 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12293 agent_expr, eval_result_type): Move to ax.h.
12294 (parse_agent_expr): Rename to ...
12295 (gdb_parse_agent_expr): ... this, make it non-static and move
12297 (unparse_agent_expr) Rename to ...
12298 (gdb_unparse_agent_expr): ... this, make it non-static and move
12300 (eval_agent_expr): Rename to ...
12301 (eval_tracepoint_agent_expr): ... this.
12302 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12303 forward declarations.
12304 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12305 (agent_get_trace_state_variable_value): New function.
12306 (agent_set_trace_state_variable_value): New function.
12307 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12308 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12309 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12310 (condition_true_at_tracepoint): Likewise.
12311 (parse_agent_expr): Rename to ...
12312 (gdb_parse_agent_expr): ... this and move to ax.c.
12313 (unparse_agent_expr): Rename to ...
12314 (gdb_unparse_agent_expr): ... this and move to ax.c.
12315 (gdb_agent_op_name): Move to ax.c.
12316 (eval_agent_expr): Rename to ...
12317 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12319 (eval_tracepoint_agent_expr): New function.
12320 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12322 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12324 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12325 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12326 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12327 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12328 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12329 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12330 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12331 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12332 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12333 (compile_bytecodes): Remove forward declaration.
12334 (is_goto_target): Move to ax.c.
12335 (compile_bytecodes): Move to ax.c and call
12336 agent_get_trace_state_variable_value (...) and
12337 agent_set_trace_state_variable_value (...).
12339 * Makefile.in: Update ax.c and IPA dependencies.
12341 2012-02-24 Pedro Alves <palves@redhat.com>
12343 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12344 (cmd_bigqtbuffer_circular): ... this. Only handle
12345 'QTBuffer:circular:'.
12346 (handle_tracepoint_general_set): Adjust.
12348 2012-02-16 Yao Qi <yao@codesourcery.com>
12350 * inferiors.c: Move code to ...
12351 * dll.c: .... here. New.
12352 * server.h: Declare clear_dlls.
12353 * Makefile.in (SFILES): Add dll.c.
12357 2012-02-11 Yao Qi <yao@codesourcery.com>
12359 * server.c: (handle_monitor_command): Add a new parameter
12361 (handle_query): Update caller.
12363 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12365 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12366 * configure, config.in: Regenerate.
12367 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12370 2012-02-02 Pedro Alves <palves@redhat.com>
12372 Try SIGKILL first, then PTRACE_KILL.
12373 * linux-low.c (linux_kill_one_lwp): New.
12374 (linux_kill_one_lwp): Rename to ...
12375 (kill_one_lwp_callback): ... this. Use the new
12376 linux_kill_one_lwp.
12378 2012-02-02 Pedro Alves <palves@redhat.com>
12380 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12383 2012-01-27 Pedro Alves <palves@redhat.com>
12385 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12386 (elf_64_file_p): Make static.
12387 (linux_pid_exe_is_elf_64_file): New.
12388 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12389 Delete declarations.
12390 (linux_pid_exe_is_elf_64_file): Declare.
12391 * linux-x86-low.c (x86_arch_setup): Use
12392 linux_pid_exe_is_elf_64_file.
12394 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12396 * linux-low.c (linux_wait_for_event_1): Rename to ...
12397 (linux_wait_for_event): ... here and merge it with former
12398 linux_wait_for_event - new variable wait_ptid, use it.
12399 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12401 2012-01-23 Pedro Alves <palves@redhat.com>
12403 * server.c (main): Avoid yet another case of infinite loop while
12404 detaching/killing after a longjmp.
12406 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12409 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12411 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12413 * hostio.c (handle_readlink): New function.
12414 (handle_vFile): Call it to handle "vFile:readlink" packets.
12416 2012-01-20 Pedro Alves <palves@redhat.com>
12417 Ulrich Weigand <ulrich.weigand@linaro.org>
12419 * server.c (handle_v_requests): Only support vAttach and vRun to
12420 start multiple processes when in extended protocol mode.
12422 2012-01-17 Pedro Alves <palves@redhat.com>
12424 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12425 memalign plus mprotect to allocate the scratch buffer.
12427 2012-01-13 Pedro Alves <palves@redhat.com>
12429 * server.c (attach_inferior): Clear `cont_thread'.
12431 2012-01-13 Pedro Alves <palves@redhat.com>
12433 * server.c (main): Avoid infinite loop while detaching/killing
12436 2012-01-09 Doug Evans <dje@google.com>
12438 * server.c (start_inferior): Set last_ptid in --wrapper case.
12440 2012-01-06 Yao Qi <yao@codesourcery.com>
12442 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12444 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12446 2012-01-04 Yao Qi <yao@codesourcery.com>
12448 * tracepoint.c (cmd_qtdp): Print debug message
12449 for static tracepoint.
12451 2012-01-04 Yao Qi <yao@codesourcery.com>
12453 * tracepoint.c (trace_vdebug): Differentiate debug message
12454 between gdbserver and IPA.
12456 2012-01-03 Yao Qi <yao@codesourcery.com>
12458 * tracepoint.c (tracepoint_was_hit): Don't collect for
12461 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12463 * terminal.h: Reformat copyright header.
12465 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12467 * server.c (gdbserver_version): Update copyright year.
12468 * gdbreplay.c (gdbreplay_version): Likewise.
12470 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12472 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12475 2011-12-18 Hui Zhu <teawater@gmail.com>
12476 * linux-low.c (linux_create_inferior): Save return value to ret.
12478 2011-12-18 Hui Zhu <teawater@gmail.com>
12480 * linux-low.c (linux_create_inferior): Save return value to ret.
12482 2011-12-16 Doug Evans <dje@google.com>
12484 * linux-low.c (linux_create_inferior): If stdio connection,
12485 redirect stdin from /dev/null, stdout to stderr.
12486 * remote-utils.c (remote_is_stdio): New static global.
12487 (remote_connection_is_stdio): New function.
12488 (remote_prepare): Handle stdio connection.
12489 (remote_open): Ditto.
12490 (remote_close): Don't close stdin for stdio connections.
12491 (read_prim,write_prim): New functions. Replace all calls to
12492 read/write to these.
12493 * server.c (main): Watch for "-" argument. Move call to
12494 remote_prepare before start_inferior.
12495 * server.h (STDIO_CONNECTION_NAME): New macro.
12496 (remote_connection_is_stdio): Declare.
12498 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12499 in debugging output.
12501 2011-12-15 Yao Qi <yao@codesourcery.com>
12503 * tracepoint.c: Include sys/syscall.h.
12504 (gdb_ust_thread): Remove preprocessor conditional.
12506 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12508 * linux-low.c (linux_detach_one_lwp): Call
12509 the_low_target.prepare_to_resume before detaching.
12511 2011-12-14 Yao Qi <yao@codesourcery.com>
12513 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12516 2011-12-14 Yao Qi <yao@codesourcery.com>
12518 * i386-low.c (i386_low_stopped_data_address): Initialize local
12519 variable `control'.
12521 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12525 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12526 DR_CONTROL unless necessary. Extend comments.
12527 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12528 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12530 2011-12-13 Yao Qi <yao@codesourcery.com>
12532 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12534 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12536 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12538 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12539 Print new debug message for such case.
12541 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12543 Fix overlapping memcpy.
12544 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12545 the read_inferior_memory transfer.
12546 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12547 write_inferior_memory transfer.
12548 (set_fast_tracepoint_jump): New variable buf. Use it for the
12549 read_inferior_memory and write_inferior_memory transfers.
12550 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12551 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12552 Use it for the write_inferior_memory transfer.
12553 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12556 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12558 * linux-low.c (fetch_register, store_register): Make code
12559 consistent, fix formatting.
12561 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12563 * linux-low.c (usr_store_inferior_registers): Factor out code
12564 to handle individual registers into...
12565 (store_register): ... this new function.
12567 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12569 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12570 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12571 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12572 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12573 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12574 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12575 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12576 (srv_xmlfiles): Add new XML files.
12578 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12580 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12581 (init_registers_s390_linux32v1): Add prototype.
12582 (init_registers_s390_linux32v2): Likewise.
12583 (init_registers_s390_linux64v1): Likewise.
12584 (init_registers_s390_linux64v2): Likewise.
12585 (init_registers_s390x_linux64v1): Likewise.
12586 (init_registers_s390x_linux64v2): Likewise.
12587 (s390_num_regs): Increment to 52.
12588 (s390_regmap): Add orig_r2 register.
12589 (s390_num_regs_3264): Increment to 68.
12590 (s390_regmap_3264): Add orig_r2 register.
12591 (s390_collect_ptrace_register): Handle orig_r2 register.
12592 (s390_supply_ptrace_register): Likewise.
12593 (s390_fill_last_break): New function.
12594 (s390_store_last_break): Likewise.
12595 (s390_fill_system_call): New function.
12596 (s390_store_system_call): Likewise.
12597 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12599 (s390_check_regset): New function.
12600 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12601 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12602 Update target_regsets for available register sets.
12604 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12605 Jan Kratochvil <jan.kratochvil@redhat.com>
12607 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12608 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12610 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12611 * linux-low.h (struct process_info_private): New member r_debug.
12612 * server.c (handle_qxfer_libraries): Call
12613 the_target->qxfer_libraries_svr4.
12614 (handle_qxfer_libraries_svr4): New function.
12615 (qxfer_packets): New entry "libraries-svr4".
12616 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12617 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12618 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12619 PACKET_qXfer_libraries_svr4.
12621 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12623 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12624 PSW address/mask between 8-byte and 16-byte formats.
12625 (s390_supply_ptrace_register): Likewise.
12626 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12627 basic addressing mode bit.
12629 2011-11-24 Stan Shebs <stan@codesourcery.com>
12631 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12633 2011-11-17 Stan Shebs <stan@codesourcery.com>
12635 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12636 (tracing_start_time): New global.
12637 (tracing_stop_time): New global.
12638 (tracing_user_name): New global.
12639 (tracing_notes): New global.
12640 (tracing_stop_note): New global.
12641 (cmd_qtstart): Set traceframe_usage, start_time.
12642 (stop_tracing): Set stop_time.
12643 (cmd_qtstatus): Report additional status.
12644 (cmd_qtp): New function.
12645 (handle_tracepoint_query): Call it.
12646 (cmd_qtnotes): New function.
12647 (handle_tracepoint_general_set): Call it.
12648 (get_timestamp): Rename from tsv_get_timestamp.
12650 2011-11-14 Stan Shebs <stan@codesourcery.com>
12651 Kwok Cheung Yeung <kcy@codesourcery.com>
12653 * linux-x86-low.c (small_jump_insn): New.
12654 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12655 trampoline and error message, build a trampoline and issue a small
12656 jump instruction to it.
12657 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12658 trampoline and error message.
12659 (x86_get_min_fast_tracepoint_insn_len): New.
12660 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12661 * linux-low.h (struct linux_target_ops): Add arguments to
12662 install_fast_tracepoint_jump_pad operation, add new operation.
12663 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12665 (linux_get_min_fast_tracepoint_insn_len): New function.
12666 (linux_target_op): Add new operation.
12667 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12668 (gdb_trampoline_buffer_end): Ditto.
12669 (gdb_trampoline_buffer_error): Ditto.
12670 (struct ipa_sym_addresses): Add fields for new IPA variables.
12671 (symbol_list): Add entries for new IPA variables.
12672 (struct tracepoint): Add fields to hold the address range of the
12673 trampoline used by the tracepoint.
12674 (trampoline_buffer_head): New static variable.
12675 (trampoline_buffer_tail): Ditto.
12676 (claim_trampoline_space): New function.
12677 (have_fast_tracepoint_trampoline_buffer): New function.
12678 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12680 (install_fast_tracepoint): Ditto, also add error buffer argument.
12681 (cmd_qtminftpilen): New function.
12682 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12683 (fast_tracepoint_from_trampoline_address): New function.
12684 (fast_tracepoint_collecting): Handle trampoline as part of jump
12686 (set_trampoline_buffer_space): New function.
12687 (initialize_tracepoint): Initialize new IPA variables.
12688 * target.h (struct target_ops): Add arguments to
12689 install_fast_tracepoint_jump_pad operation, add new
12690 get_min_fast_tracepoint_insn_len operation.
12691 (target_get_min_fast_tracepoint_insn_len): New.
12692 (install_fast_tracepoint_jump_pad): Add arguments.
12693 * server.h (IPA_BUFSIZ): Define.
12694 * linux-i386-ipa.c: Include extra header files.
12695 (initialize_fast_tracepoint_trampoline_buffer): New function.
12696 (initialize_low_tracepoint): Call it.
12697 * server.h (set_trampoline_buffer_space): Declare.
12698 (claim_trampoline_space): Ditto.
12699 (have_fast_tracepoint_trampoline_buffer): Ditto.
12701 2011-11-14 Yao Qi <yao@codesourcery.com>
12703 * server.c (handle_query): Handle InstallInTrace for qSupported.
12704 * tracepoint.c (add_tracepoint): Sort list.
12705 (install_tracepoint, download_tracepoint): New.
12706 (cmd_qtdp): Call them to install and download tracepoints.
12707 (sort_tracepoints): Removed.
12708 (cmd_qtstart): Update.
12710 2011-11-14 Yao Qi <yao@codesourcery.com>
12712 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12713 * mem-break.h: Declare.
12714 * tracepoint.c (cmd_qtstart): Move some code to ...
12715 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12717 (download_tracepoints): Move some code to ...
12718 (download_tracepoint_1): ... here. New.
12720 2011-11-08 Yao Qi <yao@codesourcery.com>
12722 * remote-utils.c (relocate_instruction): A comment fix.
12724 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12726 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12727 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12728 dr_status_mirror and dr_control_mirror from debug_reg_state.
12729 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12730 (i386_initial_stuff): Remove use of deleted globals.
12731 (i386_get_thread_context, i386_set_thread_context,
12732 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12733 from debug_reg_state.
12735 2011-11-05 Yao Qi <yao@codesourcery.com>
12737 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12738 address as TPOINT's.
12740 2011-11-02 Stan Shebs <stan@codesourcery.com>
12742 * tracepoint.c (agent_mem_read_string): New function.
12743 (eval_agent_expr): Call it for tracenz.
12744 * server.c (handle_query): Report support for tracenz.
12746 2011-11-02 Yao Qi <yao@codesourcery.com>
12748 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12750 2011-11-02 Yao Qi <yao@codesourcery.com>
12752 * target.h: Fix a typo in comment.
12754 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12756 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12757 clobber the breakpoints' shadows with fast tracepoint jumps.
12758 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12759 * target.c (write_inferior_memory): Also pass MYADDR down to
12762 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12764 * configure.ac: Check support for personality routine.
12765 * configure: Regenerate.
12766 * config.in: Likewise.
12767 * linux-low.c: Include <sys/personality.h>.
12768 Define ADDR_NO_RANDOMIZE if necessary.
12769 (linux_create_inferior): Disable address space randomization when
12770 forking inferior, if requested.
12771 (linux_supports_disable_randomization): New function.
12772 (linux_target_ops): Install it.
12773 * server.h (disable_randomization): Declare.
12774 * server.c (disable_randomization): New global variable.
12775 (handle_general_set): Handle QDisableRandomization.
12776 (handle_query): Likewise for qSupported.
12777 (main): Support --disable-randomization and --no-disable-randomization
12778 command line arguments.
12779 * target.h (struct target_ops): Add supports_disable_randomization.
12780 (target_supports_disable_randomization): New macro.
12782 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12784 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12786 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12787 [!PT_GETDSBT] (target_loadmap): New definition.
12788 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12789 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12790 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12791 and PT_GETDSBT to LINUX_LOADMAP.
12792 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12793 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12795 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12797 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12798 (arm_linux_hwbp_cap): New static variable.
12799 (arm_linux_get_hwbp_cap): Replace by ...
12800 (arm_linux_init_hwbp_cap): ... this new function.
12801 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12802 (arm_linux_get_hw_watchpoint_count): Likewise.
12803 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12804 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12805 (arm_prepare_to_resume): Use perror_with_name instead of error.
12807 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12809 * linux-arm-low.c: Include <signal.h>.
12810 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12811 (struct arm_linux_hwbp_cap): New data type.
12812 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12813 (struct arm_linux_hw_breakpoint): New data type.
12814 (MAX_BPTS, MAX_WPTS): Define.
12815 (struct arch_process_info, struct arch_lwp_info): New data types.
12816 (arm_linux_get_hwbp_cap): New function.
12817 (arm_linux_get_hw_breakpoint_count): Likewise.
12818 (arm_linux_get_hw_watchpoint_count): Likewise.
12819 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12820 (arm_hwbp_control_initialize): Likewise.
12821 (arm_hwbp_control_is_enabled): Likewise.
12822 (arm_hwbp_control_is_initialized): Likewise.
12823 (arm_hwbp_control_disable): Likewise.
12824 (arm_linux_hw_breakpoint_equal): Likewise.
12825 (arm_linux_hw_point_initialize): Likewise.
12826 (struct update_registers_data): New data structure.
12827 (update_registers_callback: New function.
12828 (arm_insert_point): Likewise.
12829 (arm_remove_point): Likewise.
12830 (arm_stopped_by_watchpoint): Likewise.
12831 (arm_stopped_data_address): Likewise.
12832 (arm_new_process): Likewise.
12833 (arm_new_thread): Likewise.
12834 (arm_prepare_to_resume): Likewise.
12835 (the_low_target): Register arm_insert_point, arm_remove_point,
12836 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12837 arm_new_thread, and arm_prepare_to_resume.
12839 2011-09-15 Stan Shebs <stan@codesourcery.com>
12841 * server.h (struct emit_ops): Add compare-goto fields.
12842 * tracepoint.c (gdb_agent_op_sizes): New table.
12843 (emit_eq_goto): New function.
12844 (emit_ne_goto): New function.
12845 (emit_lt_goto): New function.
12846 (emit_le_goto): New function.
12847 (emit_gt_goto): New function.
12848 (emit_ge_goto): New function.
12849 (is_goto_target): New function.
12850 (compile_bytecodes): Recognize special cases of compare-goto
12851 combinations and call specialized emitters for them.
12852 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12853 (amd64_emit_ne_goto): New function.
12854 (amd64_emit_lt_goto): New function.
12855 (amd64_emit_le_goto): New function.
12856 (amd64_emit_gt_goto): New function.
12857 (amd64_emit_ge_goto): New function.
12858 (amd64_emit_ops): Add the new functions.
12859 (i386_emit_eq_goto): New function.
12860 (i386_emit_ne_goto): New function.
12861 (i386_emit_lt_goto): New function.
12862 (i386_emit_le_goto): New function.
12863 (i386_emit_gt_goto): New function.
12864 (i386_emit_ge_goto): New function.
12865 (i386_emit_ops): Add the new functions.
12867 2011-09-08 Stan Shebs <stan@codesourcery.com>
12869 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12870 (i386_emit_epilogue): Restore %ebx.
12872 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12874 * server.c (step_thread): Remove definition.
12875 (process_serial_event): Don't handle Hs.
12876 * server.h (step_thread): Remove declaration.
12877 * target.c (set_desired_inferior): Remove use of step_thread.
12879 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12881 * linux-low.c: Include linux-procfs.h.
12882 (linux_attach_lwp_1): Update comments.
12883 (linux_attach): Scan for existing threads when attaching to a
12884 process that is the tgid.
12885 * Makefile.in: Update dependencies.
12887 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12889 * configure.srv: Add linux-procfs.o dependencies.
12891 2011-08-14 Yao Qi <yao@codesourcery.com>
12893 * target.h (struct target_ops): Fix indent.
12894 * win32-low.c (win32_target_ops): Fix comment.
12896 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12897 Yao Qi <yao@codesourcery.com>
12899 * Makefile.in (clean): Remove tic6x-*.c files.
12900 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12901 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12902 (tic6x-c64xp-linux.c): Likewise.
12903 * configure.srv: Add support for tic6x-*-uclinux.
12904 * linux-tic6x-low.c: New.
12905 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12907 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12908 Yao Qi <yao@codesourcery.com>
12910 * target.h (struct target_ops): Add read_loadmap.
12911 * linux-low.c (struct target_loadseg): New type.
12912 (struct target_loadmap): New type.
12913 (linux_read_loadmap): New function.
12914 (linux_target_ops): Add linux_read_loadmap.
12915 * server.c (handle_query): Support qXfer:fdpic:read packet.
12916 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12919 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12921 * win32-low.c: Include <stdint.h>.
12923 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12925 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12926 to the inferior here.
12927 (i386_remove_aligned_watchpoint): Ditto.
12928 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12929 fit part of the watchpoint in the debug registers.
12930 (i386_update_inferior_debug_regs): New.
12931 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12932 registers, and only update the inferior on success.
12933 (i386_low_remove_watchpoint): Ditto.
12935 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12937 * linux-low.c (compare_ints, unique, list_threads, show_process,
12938 linux_core_of_thread): Delete.
12939 (linux_target_ops): Change linux_core_of_thread to
12940 linux_common_core_of_thread.
12941 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12942 * utils.c (malloc_failure): Change type of argument.
12943 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12944 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12945 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12946 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12947 (IPA_OBJS): Add common-utils-ipa.o.
12948 (ptid_h, linux_osdata_h): New macros.
12949 (server_h): Add common/common-utils.h, common/xml-utils.h,
12950 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12952 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12953 ptid.o, buffer.o): New rules.
12954 (linux-low.o): Add common/linux-osdata.h as a dependency.
12955 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12956 * configure.ac: Add AC_HEADER_DIRENT check.
12957 * config.in: Regenerate.
12958 * configure: Regenerate.
12959 * remote-utils.c (xml_escape_text): Delete.
12960 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12961 buffer_xml_printf): Move to common/buffer.c.
12962 * server.c (main): Remove call to initialize_inferiors.
12963 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12964 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12965 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12966 internal_error, gdb_assert, gdb_assert_fail): Delete.
12967 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12968 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12970 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12971 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12972 initialize_inferiors): Delete.
12974 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12976 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12979 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12981 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12983 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12985 2011-05-26 Yao Qi <yao@codesourcery.com>
12987 * Makefile.in (thread-db.o): Track dependence to
12988 common/gdb_thread_db.h.
12989 * thread-db.c: include gdb_thread_db.h from right place.
12991 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12993 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12994 __FILE__ and __LINE__ to internal_error.
12996 2011-05-13 Doug Evans <dje@google.com>
12998 * thread-db.c (try_thread_db_load_from_sdir): New function.
12999 (try_thread_db_load_from_dir): New function.
13000 (thread_db_load_search): Handle $sdir, ignore $pdir.
13001 Remove trying of system directories if search of
13002 libthread-db-search-path fails, that is now done via $sdir.
13004 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13006 * server.c (handle_query): Add EnableDisableTracepoints to the list
13007 of supported features.
13008 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13010 (cmd_qtenable_disable): New.
13011 (cmd_qtstart): Install tracepoints even if disabled.
13012 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13013 receiving a QTEnable or QTDisable packet.
13014 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13015 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13017 (gdb_probe): Skip data collection if static tracepoint is disabled.
13019 2011-05-10 Doug Evans <dje@google.com>
13021 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13023 2011-05-04 Doug Evans <dje@google.com>
13025 * linux-low.c (linux_join): Skip process lookup.
13026 * spu-low.c (spu_join): Ditto.
13027 * server.c (join_inferiors_callback): Delete.
13028 (process_serial_event): For 'D' packet (detach) call join_inferior
13031 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13033 * README: Don't mention xscale*-*-linux*.
13034 * configure.srv (xscale*-*-linux*): Don't handle target.
13036 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13038 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13040 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13041 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13042 (i386_emit_void_call_2): Likewise.
13044 2011-04-26 Yao Qi <yao@codesourcery.com>
13046 * linux-low.c: Move common macros to linux-ptrace.h.
13047 Include linux-ptrace.h.
13048 * Makefile.in (linux_ptrace_h): New.
13049 (linux-low.o): Depends on linux-ptrace.h.
13051 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13053 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13054 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13055 (remote_prepare): New function with most of the TCP code from ...
13056 (remote_open): ... here. Detect PORT here unconditionally. Move also
13057 setting transport_is_reliable.
13058 * server.c (run_once): New variable.
13059 (gdbserver_usage): Document it.
13060 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13061 the first run if RUN_ONCE.
13062 * server.h (run_once, remote_prepare): New declarations.
13064 2011-04-19 Tom Tromey <tromey@redhat.com>
13066 * win32-low.c (handle_load_dll): Remove duplicate "the".
13068 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13070 Remove support for old Cygwin 1.5 versions.
13071 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13072 function to avoid warning.
13073 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13076 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13078 * gdbserver/server.h (Macro _): Define it if not available.
13080 2011-03-14 Michael Snyder <msnyder@vmware.com>
13082 * hostio.c (handle_close): Remove unnecessary null test.
13084 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13086 * Makefile.in (maintainer-clean realclean distclean): Remove
13087 "make ... subdir_do" command.
13089 2011-03-10 Michael Snyder <msnyder@vmware.com>
13091 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13093 * server.c (handle_v_run): Free alloced buffer on early return.
13095 2011-03-09 Yao Qi <yao@codesourcery.com>
13098 2011-03-04 Yao Qi <yao@codesourcery.com>
13100 * Makefile.in: Remove GNU make feature --directory.
13102 2011-03-05 Yao Qi <yao@codesourcery.com>
13104 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13105 (subdir_do): New make target. Copied from gdb/Makefile.
13106 (maintainer-clean, realclean, distclean, clean): Call corresponding
13107 make targets in common/Makefile.
13109 2011-02-11 Yao Qi <yao@codesourcery.com>
13111 * configure.ac: Call AC_PROG_RANLIB.
13112 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13113 * configure: Regenerate.
13115 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13117 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13119 2011-03-06 Yao Qi <yao@codesourcery.com>
13121 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13123 2011-03-05 Yao Qi <yao@codesourcery.com>
13125 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13126 (subdir_do): New make target. Copied from gdb/Makefile.
13127 (maintainer-clean, realclean, distclean, clean): Call corresponding
13128 make targets in common/Makefile.
13130 2011-03-04 Yao Qi <yao@codesourcery.com>
13132 * Makefile.in: Remove GNU make feature --directory.
13134 2011-03-04 Michael Snyder <msnyder@vmware.com>
13136 * server.c (queue_stop_reply): Call xmalloc not malloc.
13138 2011-03-02 Michael Snyder <msnyder@vmware.com>
13140 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13142 2011-02-28 Michael Snyder <msnyder@vmware.com>
13144 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13145 (cmd_qtframe): Ditto.
13146 (cmd_qtbuffer): Ditto.
13147 (cmd_bigqtbuffer): Ditto.
13149 * utils.c (decimal2str): Initialize 'width' to nine, then
13150 don't mess with it.
13152 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13154 * hostio.c (require_data): Free *data, not data.
13156 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13158 * hostio.c (require_data): Use free, not xfree.
13160 2011-02-27 Michael Snyder <msnyder@vmware.com>
13162 * server.c (handle_query): Discard unused value.
13164 * hostio.c (require_data): Free malloc memory before returning
13167 2011-02-26 Michael Snyder <msnyder@vmware.com>
13169 * linux-low.c (list_threads): Call closedir for dirent.
13171 2011-02-27 Michael Snyder <msnyder@vmware.com>
13173 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13174 a case statement falls through.
13176 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13178 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13181 2011-02-26 Michael Snyder <msnyder@vmware.com>
13183 * utils.c (decimal2str): Eliminate dead code and dead param.
13184 (pulongest): Drop dead param from call to decimal2str.
13187 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13189 Revert the following patch (not approved yet):
13190 2011-02-21 Hui Zhu <teawater@gmail.com>
13191 * tracepoint.c (tp_printf): New function.
13192 (eval_agent_expr): Handle gdb_agent_op_printf.
13194 2011-02-21 Hui Zhu <teawater@gmail.com>
13196 * tracepoint.c (tp_printf): New function.
13197 (eval_agent_expr): Handle gdb_agent_op_printf.
13199 2011-02-18 Tom Tromey <tromey@redhat.com>
13201 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13202 (tracepoint.o): Likewise.
13203 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13204 (gdb_agent_op_names): Likewise.
13206 2011-02-18 Tom Tromey <tromey@redhat.com>
13208 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13209 gdb_agent_op_rot>: New constants.
13210 (gdb_agent_op_names): Add pick and roll.
13211 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13214 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13216 * aclocal.m4: Regenerated with aclocal-1.11.1.
13218 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13220 * server.c (handle_qxfer_traceframe_info): New.
13221 (qxfer_packets): Register "traceframe-info".
13222 (handle_query): Report support for qXfer:traceframe-info:read+.
13223 * tracepoint.c (match_blocktype): New.
13224 (traceframe_find_block_type): Rename to ...
13225 (traceframe_walk_blocks): ... this. Add callback filter argument,
13227 (traceframe_find_block_type): New, reimplemented on top of
13228 traceframe_walk_blocks.
13229 (build_traceframe_info_xml): New.
13230 (traceframe_read_info): New.
13231 * server.h (traceframe_read_info): Declare.
13233 2011-02-11 Yao Qi <yao@codesourcery.com>
13235 * configure.ac: Call AC_PROG_RANLIB.
13236 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13237 * configure: Regenerate.
13239 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13241 * server.c (gdb_read_memory): Change return semantics to allow
13243 (handle_search_memory_1): Adjust.
13244 (process_serial_event) <'m' packet>: Handle partial transfers.
13245 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13247 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13249 * regcache.c (init_register_cache): Initialize
13250 regcache->register_status.
13251 (free_register_cache): Release regcache->register_status.
13252 (regcache_cpy): Copy register_status.
13253 (registers_to_string): Print 'x's for unavailable registers.
13254 (supply_register): Mark the register's status valid or
13255 unavailable, depending on whether a buffer was passed in or not.
13256 (supply_register_zeroed): New.
13257 (supply_regblock): Mark the registers' status valid or
13258 unavailable, depending on whether a buffer was passed in or not.
13259 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13260 (struct regcache): New `register_status' field.
13261 (supply_register_zeroed): Declare.
13262 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13263 supply_register_zeroed, rather than passing a NULL buffer to
13265 * tracepoint.c (fetch_traceframe_registers): Update comment.
13267 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13269 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13272 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13274 * server.h (decode_xfer_write): Change prototype.
13275 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13276 and don't extract the annex here.
13277 * server.c (decode_xfer_read): Remove `annex' parameter,
13278 and don't extract the annex here.
13279 (decode_xfer): New.
13280 (struct qxfer): New.
13281 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13282 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13283 (handle_qxfer_statictrace): New functions, abstracted out from
13284 handle_query, and made to use the struct qxfer interface.
13285 (handle_threads_qxfer_proper): Rename to ...
13286 (handle_qxfer_threads_proper): ... this.
13287 (handle_threads_qxfer): Rename to ...
13288 (handle_qxfer_threads): ... this. Adjust.
13289 (qxfer_packets): New array.
13290 (handle_qxfer): New function.
13291 (handle_query): Use handle_qxfer.
13293 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13295 * gdbreplay.c: Shorten lines of >= 80 columns.
13296 * linux-low.c: Ditto.
13297 * linux-ppc-low.c: Ditto.
13298 * linux-s390-low.c: Ditto.
13299 * linux-sparc-low.c: Ditto.
13300 * linux-x86-low.c: Ditto.
13301 * linux-xtensa-low.c: Ditto.
13302 * mem-break.c: Ditto.
13303 * nto-low.c: Ditto.
13304 * regcache.h: Ditto.
13305 * remote-utils.c: Ditto.
13308 * thread-db.c: Ditto.
13309 * tracepoint.c: Ditto.
13311 * win32-low.h: Ditto.
13313 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13315 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13318 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13320 * server.c (gdbserver_version): Update copyright year in version
13322 * gdbreplay.c (gdbreplay_version): Ditto.
13324 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13326 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13327 * linux-bfin-low.c: New file.
13328 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13329 PT_DATA_ADDR for BFIN targets.
13330 * Makefile.in (SFILES): Add linux-bfin-low.c.
13331 (clean): Remove reg-bfin.c.
13332 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13333 * README: Mention supported Blackfin targets.
13335 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13337 * .gitignore: New file.
13339 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13341 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13343 2010-10-22 Jie Zhang <jie@codesourcery.com>
13345 * Makefile.in: Add FLAGS_TO_PASS variable.
13346 (install): Remove dependency of install-only and recursively
13347 invoke make for install-only.
13349 2010-10-04 Doug Evans <dje@google.com>
13351 * Makefile.in (uninstall): Use $(DESTDIR).
13353 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13357 * linux-x86-low.c (compat_siginfo_from_siginfo)
13358 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13359 si_code is < 0. Check for si_code == SI_TIMER before checking for
13362 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13364 * lynx-i386-low.c: New file.
13365 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13367 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13369 * lynx-low.c (ptrace_request_to_str): Remove handling for
13370 request values that have been removed in LynxOS 5.x.
13372 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13374 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13377 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13379 * configure.ac: Add --enable-inprocess-agent option.
13380 * configure: Rebuilt.
13382 2010-09-06 Yao Qi <yao@codesourcery.com>
13384 * linux-low.c (linux_kill): Remove unused variable.
13385 (linux_stabilize_threads): Likewise.
13386 * server.c (start_inferior): Likewise.
13387 (queue_stop_reply_callback): Likewise.
13388 * tracepoint.c (do_action_at_tracepoint): Likewise.
13390 2010-09-06 Yao Qi <yao@codesourcery.com>
13392 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13395 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13397 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13399 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13401 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13404 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13406 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13407 gdbserver/lynx-ppc-low.c: New files.
13408 * Makefile.in (lynx_low_h): New variable.
13409 (lynx-low.o, lynx-ppc-low.o): New rules.
13410 * configure.ac: On LynxOS, link with -lnetinet.
13411 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13412 * configure: regenerate.
13414 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13416 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13417 * configure.ac: Add check for vasprintf and vsnprintf.
13418 * configure, config.in: Regenerate.
13419 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13421 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13423 * gdbreplay.c: Move include of alloca.h up, next to include of
13425 * server.h: Add include of malloc.h.
13426 * mem-break.c: Remove include of malloc.h.
13427 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13429 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13431 * Makefile.in (memmem.o): Build with -Wno-error.
13433 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13435 * utils.c (xsnprintf): Make non-static.
13436 * server.h: Add xsnprintf declaration.
13437 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13438 replace calls to snprintf by calls to xsnprintf throughout.
13440 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13442 * configure.ac: Add configure check for alloca.
13443 * configure, config.in: Regenerate.
13444 * server.h: Include alloca.h if it exists.
13445 * gdbreplay.c: Include alloca.h if it exists.
13447 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13449 * linux-low.c (__SIGRTMIN): Define if not already defined.
13450 (linux_create_inferior): Check for __ANDROID__ rather than
13452 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13453 are already deferred.
13454 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13455 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13456 stopped and already has a pending signal to report.
13457 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13458 a pending signal to report or is moving out of a jump pad.
13459 (linux_init_signals): Check for __ANDROID__ rather than
13462 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13464 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13465 debug_threads check. Avoid a linear search when not doing debug
13468 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13470 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13471 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13472 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13473 (process_event): Change local fd's type to gdb_fildes_t.
13474 (create_file_handler): Adjust prototype.
13475 (delete_file_handler): Adjust prototype.
13476 (handle_file_event): Adjust prototype. Use pfildes.
13477 (create_file_event): Adjsut prototype.
13478 * remote-utils.c (remote_desc, listen_desc): Change type to
13480 * server.h: New gdb_fildes_t typedef.
13481 [USE_WIN32API]: Include winsock2.h.
13482 (delete_file_handler, add_file_handler): Adjust prototypes.
13483 (pfildes): Declare.
13484 * utils.c (pfildes): New.
13486 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13488 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13489 * configure: Regenerate.
13491 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13493 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13494 (linux_done_accessing_memory): ... this.
13495 (linux_target_ops): Adjust.
13496 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13497 * nto-low.c (nto_target_ops): Adjust comment.
13498 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13499 * spu-low.c (spu_target_ops): Adjust comment.
13500 * target.h (target_ops): Rename unprepare_to_access_memory field
13501 to done_accessing_memory.
13502 (unprepare_to_access_memory): Rename to ...
13503 (done_accessing_memory): ... this.
13505 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13507 * linux-low.c (linux_prepare_to_access_memory): New.
13508 (linux_unprepare_to_access_memory): New.
13509 (linux_target_ops): Install them.
13510 * server.c (read_memory): Rename to ...
13511 (gdb_read_memory): ... this. Use
13512 prepare_to_access_memory/prepare_to_access_memory.
13513 (write_memory): Rename to ...
13514 (gdb_write_memory): ... this. Use
13515 prepare_to_access_memory/prepare_to_access_memory.
13516 (handle_search_memory_1): Adjust.
13517 (process_serial_event): Adjust.
13518 * target.h (struct target_ops): New fields
13519 prepare_to_access_memory and unprepare_to_access_memory.
13520 (prepare_to_access_memory, unprepare_to_access_memory): New.
13521 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13522 prepare_to_access_memory/prepare_to_access_memory.
13523 * nto-low.c (nto_target_ops): Adjust.
13524 * spu-low.c (spu_target_ops): Adjust.
13525 * win32-low.c (win32_target_ops): Adjust.
13527 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13529 * Makefile.in (WARN_CFLAGS): Get it from configure.
13530 (WERROR_CFLAGS): New.
13531 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13532 * configure.ac: Introduce --enable-werror, which adds -Werror to
13533 the compiler command line. Enabled by default. Disable with
13534 --disable-werror. Add -Wdeclaration-after-statement
13535 Wpointer-arith and -Wformat-nonliteral to warning flags.
13536 * configure: Regenerate.
13538 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13540 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13542 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13544 * gdbreplay.c (remote_error): New.
13546 (expect): Use gdbchar. Check for error reading from GDB.
13547 Clarify sync error output.
13548 (play): Check for errors writing to GDB.
13549 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13550 * remote-utils.c (getpkt): Check for errors writing to the remote
13553 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13555 * linux-low.c (linux_wait_1): Move non-debugging code out of
13556 `debug_threads' control.
13558 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13560 * linux-low.c (linux_wait_1): Don't set last_status here.
13561 * server.c (push_event, queue_stop_reply_callback): Assert we're
13562 not pushing a TARGET_WAITKIND_IGNORE event.
13563 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13564 (myresume, handle_target_event): Set the thread's last_resume_kind
13565 and last_status from the target returned status.
13567 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13571 * linux-x86-low.c (update_debug_registers_callback): New.
13572 (i386_dr_low_set_addr): Use it.
13573 (i386_dr_low_get_addr): New.
13574 (i386_dr_low_set_control): Use update_debug_registers_callback.
13575 (i386_dr_low_get_control): New.
13576 (i386_dr_low_get_status): Adjust.
13577 * linux-low.c (linux_stop_lwp): New.
13578 * linux-low.h (linux_stop_lwp): Declare.
13580 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13581 argument instead of a i386_debug_reg_state.
13582 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13583 a i386_debug_reg_state.
13584 (i386_insert_aligned_watchpoint): Adjust.
13585 (i386_remove_aligned_watchpoint): Adjust.
13586 (i386_low_stopped_data_address): Read the debug registers from the
13587 inferior instead of from the mirrors.
13588 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13589 (i386_dr_low_get_addr): Declare.
13590 (i386_dr_low_get_control): Declare.
13591 (i386_dr_low_get_status): Change prototype.
13593 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13594 (i386_dr_low_get_addr): New.
13595 (i386_dr_low_get_control): New.
13596 (i386_dr_low_get_status): Adjust prototype. Return
13598 (i386_initial_stuff): Clear dr_status_mirror and
13600 (i386_get_thread_context): Adjust.
13601 (i386_set_thread_context): Adjust.
13602 (i386_thread_added): Adjust.
13604 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13606 * linux-low.h (linux_thread_area): Delete declaration.
13608 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13610 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13611 after its termination.
13613 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13615 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13616 (gdb_wants_all_stopped): Delete.
13617 (linux_wait_1): Don't call them.
13618 * server.c (handle_v_cont): Tag all threads as want-stopped.
13619 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13620 stopped as "client-wants-stopped".
13622 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13624 * Makefile.in (signals_h): New.
13625 (server_h): Depend on it.
13626 (server.o): Don't depend on $(signals_def).
13627 (signals.o): Depend on $(signals_def).
13629 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13631 * Makefile.in (signals_def): New.
13632 (server_h): Append include/gdb/signals.h and signals_def.
13633 (server.o): Append signals_def.
13635 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13637 * server.c (handle_target_event): Use target_signal_to_host for
13638 resume_info.sig initialization.
13639 * target.h (struct thread_resume) <sig>: New comment.
13641 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13643 * server.c (handle_query): strcpy() the returned string from paddress()
13644 instead of sprintf().
13645 * utils.c (paddress): Return phex_nz().
13647 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13649 * server.c (handle_v_cont): Call mourn_inferior if process
13651 (myresume): Likewise.
13653 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13655 Static tracepoints, and integration with UST.
13657 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13658 * mem-break.c (uninsert_all_breakpoints)
13659 (reinsert_all_breakpoints): New.
13660 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13661 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13662 (gdb_agent_ust_loaded, helper_thread_id)
13663 (gdb_agent_helper_thread_id): New macros.
13664 (struct ipa_sym_addresses): Add addr_ust_loaded,
13665 addr_helper_thread_id, addr_cmd_buf.
13666 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13667 (in_process_agent_loaded_ust): New.
13668 (write_e_ust_not_loaded): New.
13669 (maybe_write_ipa_ust_not_loaded): New.
13670 (struct collect_static_trace_data_action): New.
13671 (enum tracepoint_type) <static_tracepoint>: New.
13672 (struct tracepoint) <handle>: Mention static tracepoints.
13673 (struct static_tracepoint_ctx): New.
13674 (CMD_BUF_SIZE): New.
13675 (add_tracepoint_action): Handle static tracepoint actions.
13676 (unprobe_marker_at): New.
13677 (clear_installed_tracepoints): Handle static tracepoints.
13678 (cmd_qtdp): Handle static tracepoints.
13679 (probe_marker_at): New.
13680 (cmd_qtstart): Handle static tracepoints.
13681 (response_tracepoint): Handle static tracepoints.
13682 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13683 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13684 (get_context_regcache): Handle static tracepoints.
13685 (do_action_at_tracepoint): Handle static tracepoint actions.
13686 (traceframe_find_block_type): Handle static trace data blocks.
13687 (traceframe_read_sdata): New.
13688 (download_tracepoints): Download static tracepoint actions.
13689 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13690 (GDB_PROBE_NAME): New.
13692 (GET_UST_SYM): New.
13695 (ust_marker_to_static_tracepoint): New.
13697 (collect_ust_data_at_tracepoint): New.
13698 (gdb_ust_probe): New.
13699 (UNIX_PATH_MAX, SOCK_DIR): New.
13700 (gdb_ust_connect_sync_socket): New.
13701 (resume_thread, stop_thread): New.
13702 (run_inferior_command): New.
13703 (init_named_socket): New.
13704 (gdb_ust_socket_init): New.
13705 (cstr_to_hexstr): New.
13707 (first_marker, next_marker): New.
13708 (response_ust_marker): New.
13709 (cmd_qtfstm, cmd_qtsstm): New.
13710 (unprobe_marker_at, probe_marker_at): New.
13711 (cmd_qtstmat, gdb_ust_thread): New.
13712 (gdb_ust_init): New.
13713 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13714 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13715 (ST_REGENTRY): New.
13716 (x86_64_st_collect_regmap): New.
13717 (X86_64_NUM_ST_COLLECT_GREGS): New.
13718 (AMD64_RIP_REGNUM): New.
13719 (supply_static_tracepoint_registers): New.
13720 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13721 (ST_REGENTRY): New.
13722 (i386_st_collect_regmap): New.
13723 (i386_NUM_ST_COLLECT_GREGS): New.
13724 (supply_static_tracepoint_registers): New.
13725 * server.c (handle_query): Handle qXfer:statictrace:read.
13726 <qSupported>: Report support for StaticTracepoints, and
13727 qXfer:statictrace:read features.
13728 * server.h (traceframe_read_sdata)
13729 (supply_static_tracepoint_registers): Declare.
13730 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13731 (unpack_varlen_hex): Include in IPA build.
13732 * Makefile.in (ustlibs, ustinc): New.
13733 (IPA_OBJS): Add remote-utils-ipa.o.
13734 ($(IPA_LIB)): Link -ldl and -lpthread.
13736 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13737 * config.in, configure: Regenerate.
13739 2010-06-20 Ian Lance Taylor <iant@google.com>
13740 Pedro Alves <pedro@codesourcery.com>
13742 * linux-x86-low.c (always_true): Delete.
13743 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13744 trying to fool the compiler with always_true.
13746 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13748 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13749 conditions in gdbserver.
13751 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13753 * spu-low.c (spu_read_memory): Wrap around local store limit.
13754 (spu_write_memory): Likewise.
13756 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13758 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13759 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13761 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13763 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13764 uses with LONGEST uses.
13766 2010-06-14 Stan Shebs <stan@codesourcery.com>
13767 Pedro Alves <pedro@codesourcery.com>
13771 * linux-x86-low.c: Include limits.h.
13773 (always_true): New.
13776 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13777 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13778 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13779 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13780 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13781 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13782 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13783 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13784 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13785 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13786 (amd64_emit_void_call_2): New.
13787 (amd64_emit_ops): New.
13788 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13789 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13790 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13791 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13792 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13793 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13794 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13795 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13796 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13797 (i386_emit_stack_adjust, i386_emit_int_call_1)
13798 (i386_emit_void_call_2): New.
13799 (i386_emit_ops): New.
13800 (x86_emit_ops): New.
13801 (the_low_target): Install x86_emit_ops.
13802 * server.h (struct emit_ops): New.
13803 (get_raw_reg_func_addr): Declare.
13804 (current_insn_ptr, emit_error): Declare.
13805 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13806 (set_trace_state_variable_value): New defines.
13807 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13808 addr_get_trace_state_variable_value and
13809 addr_set_trace_state_variable_value.
13810 (symbol_list): New fields for get_raw_reg,
13811 get_trace_state_variable_value and set_trace_state_variable_value.
13812 (condfn): New typedef.
13813 (struct tracepoint): New field `compiled_cond'.
13814 (do_action_at_tracepoint): Clear compiled_cond.
13815 (get_trace_state_variable_value, set_trace_state_variable_value):
13817 (condition_true_at_tracepoint): If there's a compiled condition,
13819 (current_insn_ptr, emit_error): New globals.
13820 (struct bytecode_address): New.
13821 (get_raw_reg_func_addr): New.
13822 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13823 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13824 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13825 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13826 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13827 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13828 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13829 (compile_tracepoint_condition, compile_bytecodes): New.
13830 * target.h (emit_ops): Forward declare.
13831 (struct target_ops): New field emit_ops.
13832 (target_emit_ops): New.
13833 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13834 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13835 * linux-low.c (linux_emit_ops): New.
13836 (linux_target_ops): Install it.
13837 * linux-low.h (struct linux_target_ops): New field emit_ops.
13839 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13841 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13842 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13844 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13845 Stan Shebs <stan@codesourcery.com>
13847 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13848 (all): Depend on $(extra_libraries).
13849 (install-only): Install the IPA.
13850 (IPA_OBJS, IPA_LIB): New.
13851 (clean): Remove the IPA lib.
13852 (IPAGENT_CFLAGS): New.
13853 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13854 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13855 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13856 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13857 * configure.ac: Check for atomic builtins support in the compiler.
13858 (IPA_DEPFILES, extra_libraries): Define.
13859 * configure.srv (ipa_obj): Add description.
13860 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13861 (i[34567]86-*-linux*): Set ipa_obj.
13862 (x86_64-*-linux*): Set ipa_obj.
13863 * linux-low.c (stabilizing_threads): New.
13864 (supports_fast_tracepoints): New.
13865 (linux_detach): Stabilize threads before detaching.
13866 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13867 the lwp is either not stabilizing, or is moving out of a jump pad.
13868 (linux_fast_tracepoint_collecting): New.
13869 (maybe_move_out_of_jump_pad): New.
13870 (enqueue_one_deferred_signal): New.
13871 (dequeue_one_deferred_signal): New.
13872 (linux_wait_for_event_1): If moving out of a jump pad, defer
13873 pending signals to later.
13874 (linux_stabilize_threads): New.
13875 (linux_wait_1): Check if threads need moving out of jump pads, and
13877 (stuck_in_jump_pad_callback): New.
13878 (move_out_of_jump_pad_callback): New.
13879 (lwp_running): New.
13880 (linux_resume_one_lwp): Handle moving out of jump pads.
13881 (linux_set_resume_request): Dequeue deferred signals.
13882 (need_step_over_p): Also step over fast tracepoint jumps.
13883 (start_step_over): Also uninsert fast tracepoint jumps.
13884 (finish_step_over): Also reinsert fast tracepoint jumps.
13885 (linux_install_fast_tracepoint_jump): New.
13886 (linux_target_ops): Install linux_stabilize_threads and
13887 linux_install_fast_tracepoint_jump_pad.
13888 * linux-low.h (linux_target_ops) <get_thread_area,
13889 install_fast_tracepoint_jump_pad>: New fields.
13890 (struct lwp_info) <collecting_fast_tracepoint,
13891 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13892 (linux_get_thread_area): Declare.
13893 * linux-x86-low.c (jump_insn): New.
13894 (x86_get_thread_area): New.
13895 (append_insns): New.
13896 (push_opcode): New.
13897 (amd64_install_fast_tracepoint_jump_pad): New.
13898 (i386_install_fast_tracepoint_jump_pad): New.
13899 (x86_install_fast_tracepoint_jump_pad): New.
13900 (the_low_target): Install x86_get_thread_area and
13901 x86_install_fast_tracepoint_jump_pad.
13902 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13903 (struct fast_tracepoint_jump): New.
13904 (fast_tracepoint_jump_insn): New.
13905 (fast_tracepoint_jump_shadow): New.
13906 (find_fast_tracepoint_jump_at): New.
13907 (fast_tracepoint_jump_here): New.
13908 (delete_fast_tracepoint_jump): New.
13909 (set_fast_tracepoint_jump): New.
13910 (uninsert_fast_tracepoint_jumps_at): New.
13911 (reinsert_fast_tracepoint_jumps_at): New.
13912 (set_breakpoint_at): Use write_inferior_memory.
13913 (uninsert_raw_breakpoint): Use write_inferior_memory.
13914 (check_mem_read): Mask out fast tracepoint jumps.
13915 (check_mem_write): Mask out fast tracepoint jumps.
13916 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13917 (set_fast_tracepoint_jump): Declare.
13918 (delete_fast_tracepoint_jump)
13919 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13920 (reinsert_fast_tracepoint_jumps_at): Declare.
13921 * regcache.c: Don't compile many functions when building the
13922 in-process agent library.
13923 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13924 the register buffer in the heap.
13925 (free_register_cache): If the register buffer isn't owned by the
13926 regcache, don't free it.
13927 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13928 pre-existing register caches.
13929 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13931 (convert_ascii_to_int): : Constify `from' parameter type.
13932 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13933 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13934 the needed buffer in-place.
13935 (relocate_instruction): New.
13936 * server.c (handle_query) <qSymbols>: If the target supports
13937 tracepoints, give it a chance of looking up symbols. Report
13938 support for fast tracepoints.
13939 (handle_status): Stabilize threads.
13940 (process_serial_event): Adjust.
13941 * server.h (struct fast_tracepoint_jump): Forward declare.
13942 (struct process_info) <fast_tracepoint_jumps>: New field.
13943 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13944 (decode_X_packet, decode_M_packet): Adjust.
13945 (relocate_instruction): Declare.
13946 (in_process_agent_loaded): Declare.
13947 (tracepoint_look_up_symbols): Declare.
13948 (struct fast_tpoint_collect_status): Declare.
13949 (fast_tracepoint_collecting): Declare.
13950 (force_unlock_trace_buffer): Declare.
13951 (handle_tracepoint_bkpts): Declare.
13952 (initialize_low_tracepoint)
13953 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13954 * target.h (struct target_ops) <stabilize_threads,
13955 install_fast_tracepoint_jump_pad>: New fields.
13956 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13957 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13958 [HAVE_STDINT_H]: Include stdint.h.
13959 (trace_debug_1): Rename to ...
13960 (trace_vdebug): ... this.
13961 (trace_debug): Rename to ...
13962 (trace_debug_1): ... this. Add `level' parameter.
13963 (trace_debug): New.
13964 (ATTR_USED, ATTR_NOINLINE): New.
13965 (IP_AGENT_EXPORT): New.
13966 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13967 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13968 (about_to_request_buffer_space, trace_buffer_is_full)
13969 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13970 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13971 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13972 (traceframe_write_count, traceframes_created)
13973 (trace_state_variables)
13974 New renaming defines.
13975 (struct ipa_sym_addresses): New.
13976 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13977 (symbol_list): New.
13978 (ipa_sym_addrs): New.
13979 (all_tracepoint_symbols_looked_up): New.
13980 (in_process_agent_loaded): New.
13981 (write_e_ipa_not_loaded): New.
13982 (maybe_write_ipa_not_loaded): New.
13983 (tracepoint_look_up_symbols): New.
13984 (debug_threads) [IN_PROCESS_AGENT]: New.
13985 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13986 (UNKNOWN_SIDE_EFFECTS): New.
13987 (stop_tracing): New.
13988 (flush_trace_buffer): New.
13989 (stop_tracing_bkpt): New.
13990 (flush_trace_buffer_bkpt): New.
13991 (read_inferior_integer): New.
13992 (read_inferior_uinteger): New.
13993 (read_inferior_data_pointer): New.
13994 (write_inferior_data_pointer): New.
13995 (write_inferior_integer): New.
13996 (write_inferior_uinteger): New.
13997 (struct collect_static_trace_data_action): Delete.
13998 (enum tracepoint_type): New.
13999 (struct tracepoint) <type>: New field `type'.
14000 <actions_str, step_actions, step_actions_str>: Only include in
14002 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14003 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14004 (tracepoints): Use IP_AGENT_EXPORT.
14005 (last_tracepoint): Don't include in the IPA.
14006 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14007 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14008 (alloced_trace_state_variables): New.
14009 (trace_state_variables): Use IP_AGENT_EXPORT.
14010 (traceframe_t): Delete unused variable.
14011 (circular_trace_buffer): Don't include in the IPA.
14012 (trace_buffer_start): Delete.
14013 (struct trace_buffer_control): New.
14014 (trace_buffer_free): Delete.
14015 (struct ipa_trace_buffer_control): New.
14016 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14017 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14019 (trace_buffer_ctrl): New.
14020 (TRACE_BUFFER_CTRL_CURR): New.
14021 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14022 Reimplement as macros.
14023 (trace_buffer_wrap): Delete.
14024 (traceframe_write_count, traceframe_read_count)
14025 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14026 (struct tracepoint_hit_ctx) <type>: New field.
14027 (struct fast_tracepoint_ctx): New.
14028 (memory_barrier): New.
14030 (record_tracepoint_error): Update atomically in the IPA.
14031 (clear_inferior_trace_buffer): New.
14032 (about_to_request_buffer_space): New.
14033 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14034 updating the same buffer.
14035 (add_tracepoint): Default the tracepoint's type to trap
14036 tracepoint, and orig_size to -1.
14037 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14038 internal variables.
14039 (create_trace_state_variable): New parameter `gdb'. Handle it.
14040 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14041 (cmd_qtdp): Handle fast tracepoints.
14042 (cmd_qtdv): Adjust.
14043 (max_jump_pad_size): New.
14044 (gdb_jump_pad_head): New.
14045 (get_jump_space_head): New.
14046 (claim_jump_space): New.
14047 (sort_tracepoints): New.
14048 (MAX_JUMP_SIZE): New.
14049 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14051 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14052 support. Upload fast traceframes, and delete internal IPA
14054 (stop_tracing_handler): New.
14055 (flush_trace_buffer_handler): New.
14056 (cmd_qtstop): Upload fast tracepoints.
14057 (response_tracepoint): Handle fast tracepoints.
14058 (tracepoint_finished_step): Upload fast traceframes. Set the
14059 tracepoint hit context's tracepoint type.
14060 (handle_tracepoint_bkpts): New.
14061 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14062 type. Add comment about fast tracepoints.
14063 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14064 non-existing action_str field.
14065 (get_context_regcache): Handle fast tracepoints.
14066 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14068 (fast_tracepoint_from_jump_pad_address): New.
14069 (fast_tracepoint_from_ipa_tpoint_address): New.
14070 (collecting_t): New.
14071 (force_unlock_trace_buffer): New.
14072 (fast_tracepoint_collecting): New.
14074 (gdb_collect): New.
14075 (write_inferior_data_ptr): New.
14076 (target_tp_heap): New.
14077 (target_malloc): New.
14078 (download_agent_expr): New.
14080 (download_tracepoints): New.
14081 (download_trace_state_variables): New.
14082 (upload_fast_traceframes): New.
14083 (IPA_FIRST_TRACEFRAME): New.
14084 (IPA_NEXT_TRACEFRAME_1): New.
14085 (IPA_NEXT_TRACEFRAME): New.
14086 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14087 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14088 (gdb_jump_pad_buffer_end): New.
14089 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14090 (initialize_tracepoint): Adjust.
14091 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14092 buffer. Initialize the low module.
14093 * utils.c (PREFIX, TOOLNAME): New.
14094 (malloc_failure): Use PREFIX.
14095 (error): In the IPA, an error causes an exit.
14096 (fatal, warning): Use PREFIX.
14097 (internal_error): Use TOOLNAME.
14098 (NUMCELLS): Increase to 10.
14099 * configure, config.in: Regenerate.
14101 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14103 * server.c (handle_query) <qSupported>: Do two passes over the
14104 qSupported string to avoid nesting strtok.
14106 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14108 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14110 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14111 -Wl,--dynamic-list.
14112 * configure: Regenerate.
14113 * proc-service.list: New.
14115 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14117 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14120 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14122 * gdbreplay.c (remote_open): Check error return from socket() call by
14123 its equality to -1 not by it being negative.
14124 * remote-utils.c (remote_open): Likewise.
14126 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14128 * config.h: Regenerate.
14130 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14132 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14133 doesn't provide PTRACE_GET_THREAD_AREA.
14135 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14137 * linux-m68k-low.c: Include <asm/ptrace.h>
14138 (ps_get_thread_area): Implement.
14140 2010-05-03 Doug Evans <dje@google.com>
14142 * event-loop.c (struct callback_event): New struct.
14143 (callback_list): New global.
14144 (append_callback_event, delete_callback_event): New functions.
14145 (process_callback): New function.
14146 (start_event_loop): Call it.
14147 * remote-utils.c (NOT_SCHEDULED): Define.
14148 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14149 moved out of readchar.
14150 (readchar): Rewrite. Call reschedule before returning.
14151 (reset_readchar): New function.
14152 (remote_close): Call it.
14153 (process_remaining, reschedule): New functions.
14154 * server.h (callback_handler_func): New typedef.
14155 (append_callback_event, delete_callback_event): Declare.
14157 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14159 * proc-service.c (ps_pglobal_lookup): Use
14160 thread_db_look_up_one_symbol.
14161 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14162 parameter. Use it instead of all_symbols_looked_up.
14163 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14165 (all_symbols_looked_up): Don't declare.
14166 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14167 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14169 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14170 Set all_symbols_looked_up here.
14171 (thread_db_look_up_one_symbol): New.
14172 (thread_db_get_tls_address): Adjust.
14173 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14174 thread_db object on the heap, and tentatively set it in the
14176 (thread_db_init): Don't set all_symbols_looked_up here.
14177 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14179 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14181 * linux-low.c (linux_kill, linux_detach): Adjust.
14182 (status_pending_p_callback): Remove redundant statement. Check
14183 for !TARGET_WAITIKIND_IGNORE, instead of
14184 TARGET_WAITKIND_STOPPED.
14185 (handle_tracepoints): Make sure LWP is locked. Adjust.
14186 (linux_wait_for_event_1): Adjust.
14187 (linux_cancel_breakpoints): New.
14188 (unsuspend_one_lwp): New.
14189 (unsuspend_all_lwps): New.
14190 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14191 (send_sigstop_callback): Change return type to int, add new
14192 `except' parameter and handle it.
14193 (suspend_and_send_sigstop_callback): New.
14194 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14195 pass them down. If SUSPEND, also increment the lwp's suspend
14197 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14198 (need_step_over_p): Don't consider suspended LWPs.
14199 (start_step_over): Adjust.
14200 (proceed_one_lwp): Change return type to int, add new `except'
14201 parameter and handle it.
14202 (unsuspend_and_proceed_one_lwp): New.
14203 (proceed_all_lwps): Use find_inferior instead of
14205 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14206 also decrement the suspend count of LWPs. Pass `except' down,
14207 instead of hacking its suspend count.
14208 (linux_pause_all): Add `freeze' parameter. Adjust.
14209 (linux_unpause_all): New.
14210 (linux_target_ops): Install linux_unpause_all.
14211 * server.c (handle_status): Adjust.
14212 * target.h (struct target_ops): New fields `unpause_all' and
14213 `cancel_breakpoints'. Add new parameter to `pause_all'.
14214 (pause_all): Add new `freeze' parameter.
14215 (unpause_all): New.
14216 (cancel_breakpoints): New.
14217 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14218 cancel breakpoints.
14219 (cmd_qtstart): Pause threads.
14220 (stop_tracing): Pause threads, and cancel breakpoints.
14221 * win32-low.c (win32_target_ops): Adjust.
14223 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14225 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14226 the inferior right away from here...
14227 (linux_wait_1): ... to here, and adjust to check the thread's
14228 last_resume_kind instead of the lwp's step or stop_expected flags.
14230 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14232 * README: Use consistent `GDB' and `GDBserver' spellings.
14234 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14236 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14237 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14238 (linux_detach_one_lwp): Assume the lwp is stopped.
14239 (any_thread_of): Delete.
14240 (linux_detach): Stop all lwps here. Don't blindly delete all
14242 (delete_lwp_callback): New.
14243 (linux_mourn): Delete all lwps of the process that is gone.
14244 (linux_wait_1): Don't delete the last lwp of the process here.
14245 * mem-break.h (mark_breakpoints_out): Declare.
14246 * mem-break.c (mark_breakpoints_out): New.
14247 (free_all_breakpoints): Use it.
14248 * server.c (handle_target_event): If the process is gone, mark
14250 * thread-db.c (struct thread_db) <create_bp>: New field.
14251 (thread_db_enable_reporting): Fix prototype. Store a thread event
14252 breakpoint reference in the thread_db struct.
14253 (thread_db_load_search): Clear the thread_db object.
14254 (try_thread_db_load_1): Ditto.
14255 (switch_to_process): New.
14256 (disable_thread_event_reporting): Use it.
14257 (remove_thread_event_breakpoints): New.
14258 (thread_db_detach, thread_db_mourn): Use it.
14260 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14262 * linux-low.c (linux_enable_event_reporting): New.
14263 (linux_wait_for_event_1, handle_extended_wait): Use it.
14265 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14267 * linux-low.c (linux_kill_one_lwp, linux_kill)
14268 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14269 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14270 SIGSTOP even if the LWP is stopped.
14271 (send_sigstop_callback): New.
14272 (stop_all_lwps): Use send_sigstop_callback instead.
14273 (linux_resume_one_thread): Adjust.
14274 (proceed_one_lwp): Still proceed an LWP that the client has
14275 requested to stop, if we haven't reported it as stopped yet. Make
14276 sure that LWPs the client want stopped, have a pending SIGSTOP.
14278 2010-04-26 Doug Evans <dje@google.com>
14280 * server.c (handle_general_set): Make static.
14282 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14283 Print received char after testing for error/eof instead of before.
14284 (input_interrupt): Tweak comment.
14286 2010-04-23 Doug Evans <dje@google.com>
14288 * server.c (start_inferior): Print inferior argv if --debug.
14290 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14292 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14293 * nto-x86-low.c: Include server.h
14295 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14297 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14298 be consistent with other sources of this directory.
14299 (init_registers_amd64): Correct name of source file of this function
14302 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14304 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14305 64-bit executables.
14307 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14309 * win32-i386-low.c: Add 64-bit support.
14310 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14311 (init_registers_amd64): Declare.
14312 (mappings): Add 64-bit version of array.
14313 (init_windows_x86): New function.
14314 (the_low_target): Change init_arch field to init_windows_x86.
14316 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14318 * win32-low.c: Adapt to support also 64-bit architecture.
14319 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14320 (get_image_name): Use SIZE_T type for local variable `done'.
14321 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14322 (toolhelp_get_dll_name): Idem.
14323 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14324 Use uintptr_t typecast to avoid warning.
14325 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14326 (handle_exception): Use phex_nz to avoid warning.
14327 (win32_wait): Remove unused local variable `process'.
14329 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14331 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14334 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14336 * configure.ac: Use `ws2_32' library for srv_mingw.
14337 * configure: Regenerate.
14338 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14339 * remote-utils.c: Likewise.
14341 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14343 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14344 if __x86_64__ is defined.
14346 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14348 * configure: Regenerate.
14350 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14352 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14353 * target.h (target_ops): New get_tib_address field.
14354 * win32-low.h (win32_thread_info): Add thread_local_base field.
14355 * win32-low.c (child_add_thread): Add tlb argument.
14356 Set thread_local_base field to TLB.
14357 (get_child_debug_event): Adapt to child_add_thread change.
14358 (win32_get_tib_address): New function.
14359 (win32_target_ops): Set get_tib_address field to
14360 win32_get_tib_address.
14361 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14363 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14365 * linux-low.c (linux_mourn): Also remove the process.
14366 * server.c (handle_target_event): Don't remove the process here.
14367 * nto-low.c (nto_mourn): New.
14368 (nto_target_ops): Install it.
14369 * spu-low.c (spu_mourn): New.
14370 (spu_target_ops): Install it.
14371 * win32-low.c (win32_mourn): New.
14372 (win32_target_ops): Install it.
14374 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14376 * server.h (buffer_xml_printf): Remove redundant `;'.
14378 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14380 * regcache.c (set_register_cache): Invalidate regcaches before
14381 changing the register cache layout.
14382 (regcache_invalidate_one): Allow a NULL regcache.
14383 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14384 regcaches before changing the register cache layout or the target
14387 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14389 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14390 variable warning on Linux/x86-64.
14392 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14394 GDBserver disconnected tracing support.
14396 * linux-low.c (linux_remove_process): Delete.
14397 (add_lwp): Don't set last_resume_kind here.
14398 (linux_kill): Use `mourn'.
14399 (linux_detach): Use `thread_db_detach', and `mourn'.
14400 (linux_mourn): New.
14401 (linux_attach_lwp_1): Adjust comment.
14402 (linux_attach): last_resume_kind moved the thread_info; adjust.
14403 (status_pending_p_callback): Adjust.
14404 (linux_wait_for_event_1): Adjust.
14405 (count_events_callback, select_singlestep_lwp_callback)
14406 (select_event_lwp_callback, cancel_breakpoints_callback)
14407 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14408 (proceed_one_lwp): Adjust.
14409 (linux_async): Add debug output.
14410 (linux_thread_stopped): New.
14411 (linux_pause_all): New.
14412 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14414 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14415 (thread_db_free): Delete declaration.
14416 (thread_db_detach, thread_db_mourn): Declare.
14417 * thread-db.c (thread_db_init): Use thread_db_mourn.
14418 (thread_db_free): Delete, split in two.
14419 (disable_thread_event_reporting): New.
14420 (thread_db_detach): New.
14421 (thread_db_mourn): New.
14423 * server.h (struct thread_info) <last_resume_kind>: New field.
14424 <attached>: Add comment.
14425 <gdb_detached>: New field.
14426 (handler_func): Change return type to int.
14427 (handle_serial_event, handle_target_event): Ditto.
14428 (gdb_connected): Declare.
14430 (disconnected_tracing): Declare.
14431 (stop_tracing): Declare.
14433 * server.c (handle_query) <qSupported>: Report support for
14434 disconnected tracing.
14435 (queue_stop_reply_callback): Account for running threads.
14436 (gdb_wants_thread_stopped): New.
14437 (gdb_wants_all_threads_stopped): New.
14438 (gdb_reattached_process): New.
14439 (handle_status): Clear the `gdb_detached' flag of all processes.
14440 In all-stop, stop all threads.
14441 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14442 (process_serial_event): If the remote connection breaks, or if an
14443 exit was forced with "monitor exit", force an event loop exit.
14444 Handle disconnected tracing on detach.
14445 (handle_serial_event): Adjust.
14446 (handle_target_event): If GDB isn't connected, forward events back
14447 to the inferior, unless the last process exited, in which case,
14448 exit gdbserver. Adjust interface.
14450 * remote-utils.c (remote_open): Don't block in accept. Instead
14451 register an event loop source on the listen socket file
14452 descriptor. Refactor bits into ...
14453 (listen_desc): ... this new global.
14454 (gdb_connected): ... this new function.
14455 (enable_async_notification): ... this new function.
14456 (handle_accept_event): ... this new function.
14457 (remote_close): Clear remote_desc.
14459 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14461 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14463 (mourn_inferior): Define.
14464 (target_process_qsupported): Avoid the dangling else problem.
14465 (thread_stopped): Define.
14466 (pause_all): Define.
14467 (target_waitstatus_to_string): Declare.
14468 * target.c (target_waitstatus_to_string): New.
14470 * tracepoint.c (tracing): Make extern.
14471 (disconnected_tracing): New.
14472 (stop_tracing): Make extern. Handle tracing stops due to GDB
14474 (cmd_qtdisconnected): New.
14475 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14476 (handle_tracepoint_general_set): Handle QTDisconnected.
14478 * event-loop.c (event_handler_func): Change return type to int.
14479 (process_event): Bail out if the event handler wants the event
14481 (handle_file_event): Ditto.
14482 (start_event_loop): Bail out if the event handler wants the event
14485 * nto-low.c (nto_target_ops): Adjust.
14486 * spu-low.c (spu_wait): Don't remove the process here.
14487 (spu_target_ops): Adjust.
14488 * win32-low.c (win32_wait): Don't remove the process here.
14489 (win32_target_ops): Adjust.
14491 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14493 * regcache.c (realloc_register_cache): Invalidate inferior's
14494 regcache before recreating it.
14496 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14498 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14500 2010-04-09 Stan Shebs <stan@codesourcery.com>
14501 Pedro Alves <pedro@codesourcery.com>
14503 * server.h (LONGEST): New.
14504 (struct thread_info) <while_stepping>: New field.
14505 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14507 (initialize_tracepoint, handle_tracepoint_general_set)
14508 (handle_tracepoint_query, tracepoint_finished_step)
14509 (tracepoint_was_hit, release_while_stepping_state_list):
14510 (current_traceframe): Declare.
14511 * server.c (handle_general_set): Handle tracepoint packets.
14512 (read_memory): New.
14513 (write_memory): New.
14514 (handle_search_memory_1): Use read_memory.
14515 (handle_query): Report support for conditional tracepoints, trace
14516 state variables, and tracepoint sources. Handle tracepoint
14518 (main): Initialize the tracepoints module.
14519 (process_serial_event): Handle traceframe reads/writes.
14521 * linux-low.c (handle_tracepoints): New.
14522 (linux_wait_1): Call it.
14523 (linux_resume_one_lwp): Handle while-stepping.
14524 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14525 (linux_target_ops): Install them.
14526 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14528 * linux-x86-low.c (x86_supports_tracepoints): New.
14529 (the_low_target). Install it.
14531 * mem-break.h (delete_breakpoint): Declare.
14532 * mem-break.c (delete_breakpoint): Make external.
14534 * target.h (struct target_ops): Add `supports_tracepoints',
14535 `read_pc', and `write_pc' fields.
14536 (target_supports_tracepoints): Define.
14537 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14540 * regcache.h (struct regcache) <registers_owned>: New field.
14541 (init_register_cache, regcache_cpy): Declare.
14542 (regcache_read_pc, regcache_write_pc): Declare.
14543 (register_cache_size): Declare.
14544 (supply_regblock): Declare.
14545 * regcache.c (init_register_cache): New.
14546 (new_register_cache): Use it.
14547 (regcache_cpy): New.
14548 (register_cache_size): New.
14549 (supply_regblock): New.
14550 (regcache_read_pc, regcache_write_pc): New.
14552 * tracepoint.c: New.
14554 * Makefile.in (OBS): Add tracepoint.o.
14555 (tracepoint.o): New rule.
14557 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14559 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14561 (i386-mmx.c): Likewise.
14562 (i386-mmx-linux.o): Likewise.
14563 (i386-mmx-linux.c): Likewise.
14565 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14566 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14567 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14568 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14570 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14571 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14572 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14574 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14576 * Makefile.in (clean): Updated.
14578 (i386-avx.c): Likewise.
14579 (i386-avx-linux.o): Likewise.
14580 (i386-avx-linux.c): Likewise.
14581 (amd64-avx.o): Likewise.
14582 (amd64-avx.c): Likewise.
14583 (amd64-avx-linux.o): Likewise.
14584 (amd64-avx-linux.c): Likewise.
14586 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14587 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14588 (srv_amd64_regobj): Add amd64-avx.o.
14589 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14590 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14591 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14592 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14593 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14594 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14595 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14597 * i387-fp.c: Include "i386-xstate.h".
14599 (i387_cache_to_xsave): Likewise.
14600 (i387_xsave_to_cache): Likewise.
14601 (x86_xcr0): Likewise.
14603 * i387-fp.h (i387_cache_to_xsave): Likewise.
14604 (i387_xsave_to_cache): Likewise.
14605 (x86_xcr0): Likewise.
14607 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14608 * linux-crisv32-low.c (target_regsets): Likewise.
14609 * linux-m68k-low.c (target_regsets): Likewise.
14610 * linux-mips-low.c (target_regsets): Likewise.
14611 * linux-ppc-low.c (target_regsets): Likewise.
14612 * linux-s390-low.c (target_regsets): Likewise.
14613 * linux-sh-low.c (target_regsets): Likewise.
14614 * linux-sparc-low.c (target_regsets): Likewise.
14615 * linux-xtensa-low.c (target_regsets): Likewise.
14617 * linux-low.c: Include <sys/uio.h>.
14618 (regsets_fetch_inferior_registers): Support nt_type.
14619 (regsets_store_inferior_registers): Likewise.
14620 (linux_process_qsupported): New.
14621 (linux_target_ops): Add linux_process_qsupported.
14623 * linux-low.h (regset_info): Add nt_type.
14624 (linux_target_ops): Add process_qsupported.
14626 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14628 (init_registers_i386_avx_linux): New.
14629 (init_registers_amd64_avx_linux): Likewise.
14630 (xmltarget_i386_linux_no_xml): Likewise.
14631 (xmltarget_amd64_linux_no_xml): Likewise.
14632 (PTRACE_GETREGSET): Likewise.
14633 (PTRACE_SETREGSET): Likewise.
14634 (x86_fill_xstateregset): Likewise.
14635 (x86_store_xstateregset): Likewise.
14636 (use_xml): Likewise.
14637 (x86_linux_update_xmltarget): Likewise.
14638 (x86_linux_process_qsupported): Likewise.
14639 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14640 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14641 init_registers_i386_linux here. Call
14642 x86_linux_update_xmltarget.
14643 (the_low_target): Add x86_linux_process_qsupported.
14645 * server.c (handle_query): Call target_process_qsupported.
14647 * target.h (target_ops): Add process_qsupported.
14648 (target_process_qsupported): New.
14650 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14652 * inferiors.c (add_thread): Set last_status kind to
14653 TARGET_WAITKIND_IGNORE.
14654 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14655 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14656 (linux_wait_1): Move `thread' local definition to block that uses
14657 it. Don't NULL initialize `event_child'.
14658 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14659 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14660 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14662 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14664 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14665 an extended waitstatus, or by a watchpoint.
14666 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14667 thread was stepping or has been stopped by a watchpoint.
14669 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14671 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14672 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14673 of another, then delete the previous, and validate all
14675 (validate_inserted_breakpoint): New.
14676 (delete_disabled_breakpoints): New.
14677 (validate_breakpoints): New.
14678 (check_mem_read): Validate breakpoints before trusting their
14679 shadow. Delete disabled breakpoints.
14680 (check_mem_write): Validate breakpoints before trusting they
14681 should be inserted. Delete disabled breakpoints.
14682 * mem-break.h (validate_breakpoints):
14683 * server.c (handle_query): Validate breakpoints when we see a
14686 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14688 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14689 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14690 if we could tell there's a GDB breakpoint at stop_pc.
14691 (need_step_over_p): Don't do a step over if we find a GDB
14692 breakpoint at the resume PC.
14694 * mem-break.c (struct raw_breakpoint): New.
14695 (enum bkpt_type): New type `gdb_breakpoint'.
14696 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14697 fields. New field `raw'.
14698 (find_raw_breakpoint_at): New.
14699 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14700 breakpoint instead.
14701 (set_breakpoint_at): Adjust.
14702 (delete_raw_breakpoint): New.
14703 (release_breakpoint): New.
14704 (delete_breakpoint): Rename to...
14705 (delete_breakpoint_1): ... this. Add proc parameter. Use
14706 release_breakpoint. Return ENOENT.
14707 (delete_breakpoint): Reimplement.
14708 (find_breakpoint_at): Delete.
14709 (find_gdb_breakpoint_at): New.
14710 (delete_breakpoint_at): Delete.
14711 (set_gdb_breakpoint_at): New.
14712 (delete_gdb_breakpoint_at): New.
14713 (gdb_breakpoint_here): New.
14714 (set_reinsert_breakpoint): Use release_breakpoint.
14715 (uninsert_breakpoint): Rename to ...
14716 (uninsert_raw_breakpoint): ... this.
14717 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14718 (reinsert_raw_breakpoint): Change parameter type to
14720 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14722 (check_breakpoints): Adjust. Use release_breakpoint.
14723 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14724 (breakpoint_inserted_here): Ditto.
14725 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14726 Don't trust the breakpoint's shadow if it is not inserted.
14727 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14728 (delete_all_breakpoints): Adjust.
14729 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14730 use delete_breakpoint_1.
14732 * mem-break.h (breakpoints_supported): Delete declaration.
14733 (set_gdb_breakpoint_at): Declare.
14734 (gdb_breakpoint_here): Declare.
14735 (delete_breakpoint_at): Delete.
14736 (delete_gdb_breakpoint_at): Declare.
14738 * server.h (struct raw_breakpoint): Forward declare.
14739 (struct process_info): New field `raw_breakpoints'.
14741 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14744 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14746 * linux-low.c (status_pending_p_callback): Fix comment.
14747 (linux_wait_for_event_1): Move most of the internal breakpoint
14748 handling from here...
14749 (linux_wait_1): ... to here.
14750 (count_events_callback): New.
14751 (select_singlestep_lwp_callback): New.
14752 (select_event_lwp_callback): New.
14753 (cancel_breakpoints_callback): New.
14754 (select_event_lwp): New.
14755 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14756 priority to all LWPs that have had events that should be reported
14757 to the client. Cancel breakpoints when about to reporting the
14758 event to the client, not while stopping lwps. No longer cancel
14759 finished single-steps here.
14760 (cancel_finished_single_step): Delete.
14761 (cancel_finished_single_steps): Delete.
14763 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14765 * mem-break.c (enum bkpt_type): New.
14766 (struct breakpoint): New field `type'.
14767 (set_breakpoint_at): Change return type to struct breakpoint
14768 pointer. Set type to `other_breakpoint' by default.
14769 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14770 in the breakpoint list.
14771 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14772 (reinsert_breakpoint): Rename to ...
14773 (reinsert_raw_breakpoint): ... this.
14774 (reinsert_breakpoints_at): Adjust.
14775 * mem-break.h (struct breakpoint): Declare.
14776 (set_breakpoint_at): Change return type to struct breakpoint
14779 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14781 * server.c (handle_query): Assign, not compare.
14783 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14785 Teach linux gdbserver to step-over-breakpoints.
14787 * linux-low.c (can_hardware_single_step): New.
14788 (supports_breakpoints): New.
14789 (handle_extended_wait): If stopping threads, read the stop pc of
14790 the new cloned LWP.
14792 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14793 low target doesn't support retrieving the PC.
14794 (add_lwp): Set last_resume_kind to resume_continue.
14795 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14796 (linux_attach): Don't clear stop_expected. Set the lwp's
14797 last_resume_kind to resume_stop.
14798 (linux_detach_one_lwp): Don't check for removed breakpoints.
14799 (check_removed_breakpoint): Delete.
14800 (status_pending_p): Rename to ...
14801 (status_pending_p_callback): ... this. Don't check for removed
14802 breakpoints. Don't consider threads that are stopped from GDB's
14804 (linux_wait_for_lwp): Always read the stop_pc here.
14805 (cancel_breakpoint): New.
14806 (step_over_bkpt): New global.
14807 (linux_wait_for_event_1): Implement stepping over breakpoints.
14808 (gdb_wants_lwp_stopped): New.
14809 (gdb_wants_all_stopped): New.
14810 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14811 single-step traps here. Store the thread's last reported target
14813 (send_sigstop): Don't clear stop_expected. Always set it,
14815 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14816 (cancel_finished_single_step): New.
14817 (cancel_finished_single_steps): New.
14818 (wait_for_sigstop): Don't cancel finished single-step traps here.
14819 (linux_resume_one_lwp): Don't check for removed breakpoints.
14820 Don't set `step' on non-hardware step archs.
14821 (linux_set_resume_request): Ignore resume_stop requests if already
14822 stopping or stopped. Set the lwp's last_resume_kind.
14823 (resume_status_pending_p): Don't check for removed breakpoints.
14824 (need_step_over_p): New.
14825 (start_step_over): New.
14826 (finish_step_over): New.
14827 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14828 requests. Clear the thread's last reported target waitstatus.
14829 Don't use the `suspended' flag. Don't consider pending breakpoints.
14830 (linux_resume): Start a step-over if necessary.
14831 (proceed_one_lwp): New.
14832 (proceed_all_lwps): New.
14833 (unstop_all_lwps): New.
14834 * linux-low.h (struct lwp_info): Rewrite comment for the
14835 `suspended' flag. Add the `stop_pc' field. Delete the
14836 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14837 Add `'last_resume_kind' and `need_step_over' fields.
14838 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14839 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14840 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14841 (set_raw_breakpoint_at): New.
14842 (set_breakpoint_at): Rewrite to use it.
14843 (reinsert_breakpoint_handler): Delete.
14844 (set_reinsert_breakpoint): New.
14845 (reinsert_breakpoint_by_bp): Delete.
14846 (delete_reinsert_breakpoints): New.
14847 (uninsert_breakpoint): Rewrite.
14848 (uninsert_breakpoints_at): New.
14849 (reinsert_breakpoint): Rewrite.
14850 (reinsert_breakpoints_at): New.
14851 (check_breakpoints): Rewrite.
14852 (breakpoint_here): New.
14853 (breakpoint_inserted_here): New.
14854 (check_mem_read): Adjust.
14855 * mem-break.h (breakpoints_supported, breakpoint_here)
14856 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14857 (reinsert_breakpoint_by_bp): Delete declaration.
14858 (delete_reinsert_breakpoints): Declare.
14859 (reinsert_breakpoint): Delete declaration.
14860 (reinsert_breakpoints_at): Declare.
14861 (uninsert_breakpoint): Delete declaration.
14862 (uninsert_breakpoints_at): Declare.
14863 (check_breakpoints): Adjust prototype.
14864 * server.h: Adjust include order.
14865 (struct thread_info): Declare here. Add a `last_status' field.
14867 2010-03-23 Michael Snyder <msnyder@vmware.com>
14869 * server.c (crc32): New function.
14870 (handle_query): Add handling for 'qCRC:' request.
14872 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14874 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14875 lwp had been stopped by a watchpoint.
14877 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14879 * server.h (internal_error): Declare.
14880 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14881 * utils.c (internal_error): New function.
14883 2010-03-15 Andreas Schwab <schwab@redhat.com>
14885 * configure.srv: Fix typo setting srv_regobj.
14887 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14889 * linux-low.c (fetch_register): Avoid passing a non string literal
14891 (usr_store_inferior_registers): Ditto.
14893 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14895 * linux-low.c (linux_write_memory): Bail out early if peeking
14898 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14900 * linux-low.h (struct lwp_info): New fields
14901 `stopped_by_watchpoint' and `stopped_data_address'.
14902 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14903 here, and cache them in the lwp object.
14904 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14906 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14908 (linux_stopped_by_watchpoint): Rewrite.
14909 (linux_stopped_data_address): Rewrite.
14911 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14913 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14914 switching the current inferior, not before.
14916 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14918 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14919 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14920 i386-linux.c and amd64-linux.c.
14921 (reg-i386.o): Removed.
14922 (reg-i386.c): Likewise.
14923 (reg-i386-linux.o): Likewise.
14924 (reg-i386-linux.c): Likewise.
14925 (reg-x86-64.o): Likewise.
14926 (reg-x86-64.c): Likewise.
14927 (reg-x86-64-linux.o): Likewise.
14928 (reg-x86-64-linux.c): Likewise.
14930 (i386.c): Likewise.
14931 (i386-linux.o): Likewise.
14932 (i386-linux.c): Likewise.
14933 (amd64.o): Likewise.
14934 (amd64.c): Likewise.
14935 (amd64-linux.o): Likewise.
14936 (amd64-linux.c): Likewise.
14938 * configure.srv (srv_i386_regobj): New.
14939 (srv_i386_linux_regobj): Likewise.
14940 (srv_amd64_regobj): Likewise.
14941 (srv_amd64_linux_regobj): Likewise.
14942 (srv_i386_32bit_xmlfiles): Likewise.
14943 (srv_i386_64bit_xmlfiles): Likewise.
14944 (srv_i386_xmlfiles): Likewise.
14945 (srv_amd64_xmlfiles): Likewise.
14946 (srv_i386_linux_xmlfiles): Likewise.
14947 (srv_amd64_linux_xmlfiles): Likewise.
14948 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14949 srv_xmlfiles to $srv_i386_xmlfiles.
14950 (i[34567]86-*-mingw32ce*): Likewise.
14951 (i[34567]86-*-mingw*): Likewise.
14952 (i[34567]86-*-nto*): Likewise.
14953 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14954 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14955 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14956 (x86_64-*-linux*): Likewise.
14958 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14959 (init_registers_amd64_linux): New.
14960 (x86_arch_setup): Replace init_registers_x86_64_linux with
14961 init_registers_amd64_linux.
14963 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14965 * configure.ac: Check for libdl. If it is not available link against
14966 static libthread_db.
14967 * configure: Regenerate.
14969 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14973 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14974 handing a read watchpoint.
14975 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14977 2010-02-12 Doug Evans <dje@google.com>
14979 * linux-low.c (linux_supports_tracefork_flag): Document.
14980 (linux_look_up_symbols): Add comment.
14982 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14984 * regcache.c (supply_register): Clear regcache if buf is NULL.
14986 2010-02-02 Nicolas Roche <roche@sourceware.org>
14987 Joel Brobecker <brobecker@adacore.com>
14989 * inferiors.c (find_inferior): Add function documentation.
14990 (unloaded_dll): Handle the case where the unloaded dll has not
14991 been previously registered in the dll list.
14993 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14995 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14996 (thumb2_breakpoint): New.
14997 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14999 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15001 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15002 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15005 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15007 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15009 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15011 * linux-s390-low.c (s390_collect_ptrace_register)
15012 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15014 2010-01-21 Doug Evans <dje@google.com>
15016 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15017 (PTRACE_ARG4_TYPE): New macro.
15018 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15019 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15020 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15021 (usr_store_inferior_registers): Ditto.
15022 (linux_read_memory, linux_write_memory): Ditto.
15023 (linux_test_for_tracefork): Ditto.
15025 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15026 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15028 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15030 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15033 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15035 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15036 prototype to take a regcache. Adjust.
15038 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15040 * regcache.h (struct thread_info): Forward declare.
15041 (struct regcache): New.
15042 (new_register_cache): Adjust prototype.
15043 (get_thread_regcache): Declare.
15044 (free_register_cache): Adjust prototype.
15045 (registers_to_string, registers_from_string): Ditto.
15046 (supply_register, supply_register_by_name, collect_register)
15047 (collect_register_as_string, collect_register_by_name): Ditto.
15048 * regcache.c (struct inferior_regcache_data): Delete.
15049 (get_regcache): Rename to ...
15050 (get_thread_regcache): ... this. Adjust. Switch inferior before
15051 fetching registers.
15052 (regcache_invalidate_one): Adjust.
15053 (regcache_invalidate): Fix prototype.
15054 (new_register_cache): Return the new register cache.
15055 (free_register_cache): Change prototype.
15056 (realloc_register_cache): Adjust.
15057 (registers_to_string): Change prototype to take a regcache. Adjust.
15058 (registers_from_string): Ditto.
15059 (register_data): Ditto.
15060 (supply_register): Ditto.
15061 (supply_register_by_name): Ditto.
15062 (collect_register): Ditto.
15063 (collect_register_as_string): Ditto.
15064 (collect_register_by_name): Ditto.
15065 * server.c (process_serial_event): Adjust.
15066 * linux-low.h (regset_fill_func, regset_store_func): Change
15068 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15070 * linux-low.c (get_stop_pc): Adjust.
15071 (check_removed_breakpoint): Adjust.
15072 (linux_wait_for_event): Adjust.
15073 (linux_resume_one_lwp): Adjust.
15074 (fetch_register): Add regcache parameter. Adjust.
15075 (usr_store_inferior_registers): Ditto.
15076 (regsets_fetch_inferior_registers): Ditto.
15077 (regsets_store_inferior_registers): Ditto.
15078 (linux_fetch_registers, linux_store_registers): Ditto.
15079 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15081 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15083 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15084 prototype to take a regcache.
15085 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15086 * remote-utils.c (convert_ascii_to_int, outreg)
15087 (prepare_resume_reply): Change prototype to take a regcache.
15089 * target.h (struct target_ops) <fetch_registers, store_registers>:
15090 Change prototype to take a regcache.
15091 (fetch_inferior_registers, store_inferior_registers): Change
15092 prototype to take a regcache. Adjust.
15093 * proc-service.c (ps_lgetregs): Adjust.
15094 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15095 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15096 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15097 take a regcache. Adjust.
15098 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15099 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15100 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15101 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15102 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15103 (cris_cannot_fetch_register):
15104 (cris_breakpoint_at): Change prototype to take a regcache.
15106 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15107 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15108 to take a regcache. Adjust.
15109 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15111 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15112 take a regcache. Adjust.
15113 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15114 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15115 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15116 * linux-mips-low.c (mips_get_pc):
15117 (mips_set_pc): Change prototype to take a regcache. Adjust.
15118 (mips_reinsert_addr): Adjust.
15119 (mips_collect_register): Change prototype to take a regcache.
15121 (mips_supply_register):
15122 (mips_collect_register_32bit, mips_supply_register_32bit)
15123 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15124 (mips_store_fpregset): Ditto.
15125 * linux-ppc-low.c (ppc_supply_ptrace_register)
15126 (ppc_supply_ptrace_register): Ditto.
15127 (parse_spufs_run): Adjust.
15128 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15129 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15130 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15131 take a regcache. Adjust.
15132 * linux-s390-low.c (s390_collect_ptrace_register)
15133 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15134 (s390_set_pc): Change prototype to take a regcache. Adjust.
15135 (s390_arch_setup): Adjust.
15136 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15137 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15138 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15139 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15140 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15142 (sparc_breakpoint_at): Adjust.
15143 * linux-xtensa-low.c (xtensa_fill_gregset):
15144 (xtensa_store_gregset):
15145 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15146 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15147 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15148 prototype to take a regcache. Adjust.
15149 * win32-arm-low.c (arm_fetch_inferior_register)
15150 (arm_store_inferior_register): Change prototype to take a
15152 * win32-i386-low.c (i386_fetch_inferior_register)
15153 (i386_store_inferior_register): Change prototype to take a
15155 * win32-low.c (child_fetch_inferior_registers)
15156 (child_store_inferior_registers): Change prototype to take a
15158 (win32_wait): Adjust.
15159 (win32_fetch_inferior_registers): Change prototype to take a
15161 (win32_store_inferior_registers): Adjust.
15162 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15163 store_inferior_register>: Change prototype to take a regcache.
15165 2010-01-20 Doug Evans <dje@google.com>
15167 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15169 (linux_wait_for_event1, linux_init_signals): Ditto.
15170 (W_STOPCODE): Provide definition if missing.
15172 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15174 * linux-low.c (linux_core_of_thread): New.
15175 (compare_ints, show_process, list_threads): New.
15176 (linux_qxfer_osdata): Report threads and cores.
15177 (linux_target_op): Register linux_core_of_thread.
15178 * remote-utils.c (prepare_resume_reply): Report the core.
15179 (buffer_xml_printf): Support %d specifier.
15180 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15182 (handle_query): Handle qXfer:threads. Announce availability
15184 * target.h (struct target_ops): New field core_of_thread.
15186 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15188 * Makefile.in (clean): Remove new generated files.
15189 (reg-s390.o, reg-s390.c): Remove rules.
15190 (reg-s390x.o, reg-s390x.c): Likewise.
15191 (s390-linux32.o, s390-linux32.c): Add rules.
15192 (s390-linux64.o, s390-linux64.c): Likewise.
15193 (s390x-linux64.o, s390x-linux64.c): Likewise.
15194 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15195 * linux-s390-low.c: Include <elf.h>.
15196 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15197 (init_registers_s390): Remove prototype.
15198 (init_registers_s390x): Likewise.
15199 (init_registers_s390_linux32): Add prototype.
15200 (init_registers_s390_linux64): Likewise.
15201 (init_registers_s390x_linux64): Likewise.
15202 (s390_num_regs_3264): New define.
15203 (s390_regmap_3264): New global variable.
15204 (s390_cannot_fetch_register): Remove obsolete check.
15205 (s390_cannot_store_register): Likewise.
15206 (s390_collect_ptrace_register): Handle upper/lower register halves.
15207 (s390_supply_ptrace_register): Likewise.
15208 (s390_fill_gregset): Update to register number changes.
15209 (s390_get_hwcap): New routine.
15210 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15211 Install appropriate regmap and register set.
15213 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15215 * server.c (gdbserver_version): Update copyright year to 2010.
15216 * gdbreplay.c (gdbreplay_version): Likewise.
15218 2009-12-28 Doug Evans <dje@google.com>
15220 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15221 elf/external.h. Include <elf.h> instead but only if necessary.
15223 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15225 * linux-low.c (linux_remove_process): Remove `detaching'
15226 parameter. Don't release/detach from thread_db here.
15227 (linux_kill): Release/detach from thread_db here, ...
15228 (linux_detach): ... and here, before actually detaching.
15229 (linux_wait_1): ... and here, when a process exits.
15230 * thread-db.c (any_thread_of): New.
15231 (thread_db_free): Switch the current inferior to a thread of the
15234 2009-12-21 Doug Evans <dje@google.com>
15236 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15238 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15239 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15240 warning ifndef __NR_tkill. Move setting of errno there too.
15241 Delete unnecessary resetting of errno after syscall.
15242 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15244 * configure.ac: Check for dladdr.
15245 * config.in: Regenerate.
15246 * configure: Regenerate.
15247 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15248 (try_thread_db_load): Update.
15250 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15252 2009-12-18 Doug Evans <dje@google.com>
15254 * event-loop.c: Include unistd.h if it exists.
15256 * linux-low.c (my_waitpid): Move definition away from being in
15257 between linux_tracefork_child/linux_test_for_tracefork.
15259 * gdb_proc_service.h (psaddr_t): Fix type.
15260 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15261 signature to match glibc.
15263 2009-12-16 Doug Evans <dje@google.com>
15265 * linux-low.c (linux_read_memory): Fix argument to read.
15267 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15269 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15270 events, don't leave current_inferior pointing at null.
15272 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15274 * win32-low.c (LOG): Delete.
15275 (OUTMSG): Output to stderr.
15276 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15277 on compile time LOG macro.
15278 (win32_wait): Fix debug output.
15280 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15282 * win32-low.c (win32_add_one_solib): If the dll name is
15283 "ntdll.dll", prepend the system directory to the dll path.
15285 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15287 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15289 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15290 Vladimir Prus <vladimir@codesourcery.com>
15292 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15293 * configure.ac: Check for __mcoldfire__ and set
15294 gdb_cv_m68k_is_coldfire.
15295 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15296 reg-cf.o and reg-m68k.o.
15297 * configure: Regenerated.
15299 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15301 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15302 Pass it to thread_db_free.
15303 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15304 proper `detaching' argument to linux_remove_process.
15305 * linux-low.h (thread_db_free): Add `detaching' parameter.
15306 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15308 (thread_db_free): Add `detaching' parameter. Only
15309 call td_ta_clear_event if detaching from process.
15311 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15313 * thread-db.c (thread_db_free): Fix typo.
15315 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15318 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15320 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15322 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15323 with an i686 compiler.
15324 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15326 * configure: Rebuilt.
15328 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15332 * server.c (handle_search_memory_1): Correct read_addr initialization
15333 in loop for searching subsequent chunks.
15335 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15337 * configure.ac: New --with-libthread-db option.
15338 * thread-db.c: Allow direct dependence on libthread_db.
15339 (thread_db_free): Adjust.
15340 * config.in: Regenerate.
15341 * configure: Likewise.
15343 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15346 * thread-db.c (attach_thread): New function.
15347 (maybe_attach_thread): Return success/failure.
15348 (find_new_threads_callback): Adjust.
15349 (thread_db_find_new_threads): Loop until no new threads.
15351 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15353 * proc-service.c (ps_lgetregs): Formatting.
15355 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15357 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15358 * configure.ac: Adjust.
15359 * linux-low.h (struct process_info_private): Move members to struct
15361 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15362 * linux-low.c (linux_remove_process): Adjust.
15363 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15364 * server.c (handle_query): Move code ...
15365 (handle_monitor_command): ... here. New function.
15366 * target.h (struct target_ops): New member.
15367 * thread-db.c (struct thread_db): New.
15368 (libthread_db_search_path): New variable.
15369 (thread_db_create_event, thread_db_enable_reporting)
15370 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15371 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15372 (try_thread_db_load_1, dladdr_to_soname): New functions.
15373 (try_thread_db_load, thread_db_load_search): New functions.
15374 (thread_db_init): Search for libthread_db.
15375 (thread_db_free): New function.
15376 (thread_db_handle_monitor_command): Likewise.
15377 * config.in: Regenerate.
15378 * configure: Regenerate.
15380 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15382 * spu-low.c (spu_kill): Wait for inferior to terminate.
15383 Call clear_inferiors.
15384 (spu_detach): Call clear_inferiors.
15386 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15388 * aclocal.m4: Regenerate.
15389 * config.in: Likewise.
15390 * configure: Likewise.
15392 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15394 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15395 (parse_spufs_run): New function.
15396 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15397 (ppc_breakpoint_at): Handle SPU breakpoints.
15399 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15401 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15402 (SPUFS_MAGIC): Define.
15403 (spu_enumerate_spu_ids): New function.
15404 (linux_qxfer_spu): New function.
15405 (linux_target_ops): Install linux_qxfer_spu.
15407 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15409 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15410 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15411 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15412 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15413 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15414 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15415 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15416 (init_registers_powerpc_cell32l): Add prototype.
15417 (init_registers_powerpc_cell64l): Likewise.
15418 (ppc_arch_setup): Detect Cell/B.E. architecture.
15420 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15422 * Makefile.in (datarootdir): New variable.
15424 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15426 * linux-low.c (linux_write_memory): Update debugging output.
15427 * Makefile.in (clean): Add new descriptions.
15428 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15429 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15430 * configure.srv: Add new files for arm*-*-linux*.
15431 * linux-arm-low.c: Add new declarations.
15432 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15433 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15434 (HWCAP_VFPv3D16): New.
15435 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15436 instead of __IWMMXT__.
15437 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15438 (arm_arch_setup): New.
15439 (target_regsets): Remove #ifdef. Add VFP regset.
15440 (the_low_target): Use arm_arch_setup.
15442 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15444 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15445 the main thread again.
15447 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15449 Adding Neutrino gdbserver.
15450 * configure: Regenerated.
15451 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15452 * configure.srv (i[34567]86-*-nto*): New target.
15453 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15454 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15455 (nto_comctrl) [__QNX__]: New function.
15456 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15458 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15460 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15463 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15464 Pedro Alves <pedro@codesourcery.com>
15466 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15467 don't support CONTEXT_EXTENDED_REGISTERS.
15468 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15469 (the_low_target): Install them.
15470 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15471 failing with ERROR_PIPE_NOT_CONNECTED.
15473 2009-06-30 Doug Evans <dje@google.com>
15474 Pierre Muller <muller@ics.u-strasbg.fr>
15476 Add h/w watchpoint support to x86-linux, win32-i386.
15477 * Makefile.in (SFILES): Add i386-low.c
15478 (i386_low_h): Define.
15479 (i386-low.o): Add dependencies.
15480 (linux-x86-low.o): Add i386-low.h dependency.
15481 (win32-i386-low.o): Ditto.
15482 * i386-low.c: New file.
15483 * i386-low.h: New file.
15484 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15485 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15486 * linux-low.c (linux_add_process): Initialize arch_private.
15487 (linux_remove_process): Free arch_private.
15488 (add_lwp): Initialize arch_private.
15489 (delete_lwp): Free arch_private.
15490 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15492 * linux-low.h (process_info_private): New member arch_private.
15493 (lwp_info): New member arch_private.
15494 (linux_target_ops): New members new_process, new_thread,
15496 (ptid_of): New macro.
15497 * linux-x86-low.c: Include stddef.h, i386-low.h.
15498 (arch_process_info): New struct.
15499 (arch_lwp_info): New struct.
15500 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15501 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15502 (i386_dr_low_get_status): New function.
15503 (x86_insert_point, x86_remove_point): New functions.
15504 (x86_stopped_by_watchpoint): New function.
15505 (x86_stopped_data_address): New function.
15506 (x86_linux_new_process, x86_linux_new_thread): New functions.
15507 (x86_linux_prepare_to_resume): New function.
15508 (the_low_target): Add entries for insert_point, remove_point,
15509 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15511 * server.c (debug_hw_points): New global.
15512 (monitor_show_help): Document set debug-hw-points.
15513 (handle_query): Process "set debug-hw-points".
15514 * server.h (debug_hw_points): Declare.
15515 (paddress): Declare.
15516 * utils.c (NUMCELLS, CELLSIZE): New macros.
15517 (get_sell, xsnprintf, paddress): New functions.
15518 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15519 remove_point, stopped_by_watchpoint, stopped_data_address.
15520 * win32-i386-low.c: Include i386-low.h.
15521 (debug_reg_state): Replaces dr.
15522 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15523 (i386_dr_low_get_status): New function.
15524 (i386_insert_point, i386_remove_point): New functions.
15525 (i386_stopped_by_watchpoint): New function.
15526 (i386_stopped_data_address): New function.
15527 (i386_initial_stuff): Update.
15528 (get_thread_context,set_thread_context,i386_thread_added): Update.
15529 (the_low_target): Add entries for insert_point,
15530 remove_point, stopped_by_watchpoint, stopped_data_address.
15531 * win32-low.c (win32_insert_watchpoint): New function.
15532 (win32_remove_watchpoint): New function.
15533 (win32_stopped_by_watchpoint): New function.
15534 (win32_stopped_data_address): New function.
15535 (win32_target_ops): Add entries for insert_watchpoint,
15536 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15537 * win32-low.h (win32_target_ops): New members insert_point,
15538 remove_point, stopped_by_watchpoint, stopped_data_address.
15540 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15542 * server.c (process_serial_event): Re-return unsupported, not
15543 error, if the type isn't recognized. Re-allow supporting only
15544 insert or remove packets. Also call require_running for
15545 breakpoints. Add missing break statement to default case. Tidy.
15546 * target.h (struct target_ops): Rename insert_watchpoint to
15547 insert_point, and remove_watchpoint to remove_point.
15549 * linux-low.h (struct linux_target_ops): Likewise.
15550 * linux-low.c (linux_insert_watchpoint): Rename to ...
15551 (linux_insert_point): ... this. Adjust.
15552 (linux_remove_watchpoint): Rename to ...
15553 (linux_remove_point): ... this. Adjust.
15554 (linux_target_ops): Adjust.
15555 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15556 (cris_insert_point): ... this.
15557 (cris_remove_watchpoint): Rename to ...
15558 (cris_remove_point): ... this.
15559 (the_low_target): Adjust.
15561 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15563 * server.c (handle_v_kill): Pass signal_pid to
15564 kill_inferior if multi_process is zero.
15566 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15568 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15569 * target.h (target_ops): Comment for *_watchpoint to make it clear
15570 the functions can get types '0' and '1'.
15572 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15574 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15575 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15576 * regcache.c (get_regcache): Likewise.
15577 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15578 * win32-low.c (child_fetch_inferior_registers): Remove check for
15581 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15582 Pedro Alves <pedro@codesourcery.com>
15584 * target.h (struct target_ops) <supports_multi_process>: New
15586 (target_supports_multi_process): New.
15587 * server.c (handle_query): Even if GDB reports support, only
15588 enable multi-process if the target also supports it. Report
15589 multi-process support only if the target backend supports it.
15590 * linux-low.c (linux_supports_multi_process): New function.
15591 (linux_target_ops): Install it as target_supports_multi_process
15594 2009-05-24 Doug Evans <dje@google.com>
15596 Global renaming of find_thread_pid to find_thread_ptid.
15597 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15598 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15599 All callers updated.
15601 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15602 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15605 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15606 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15607 (linux_resume_one_lwp): Ditto.
15609 2009-05-23 Doug Evans <dje@google.com>
15611 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15612 from struct inferior_list_entry * to struct lwp_info *.
15613 All callers updated.
15615 2009-05-13 Doug Evans <dje@google.com>
15617 * linux-x86-low.c: Don't include assert.h.
15618 (x86_siginfo_fixup): Use fatal, not assert.
15619 (x86_arch_setup): Fix comment.
15621 2009-05-12 Doug Evans <dje@google.com>
15623 Biarch support for i386/amd64 gdbserver.
15624 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15625 Add linux-x86-low.c.
15626 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15627 (linux-x86-low.o): Add.
15628 * linux-x86-64-low.c: Delete.
15629 * linux-i386-low.c: Delete.
15630 * linux-x86-low.c: New file.
15631 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15633 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15635 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15636 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15637 (linux_child_pid_to_exec_file): New function.
15638 (elf_64_header_p, elf_64_file_p): New functions.
15639 (siginfo_fixup): New function.
15640 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15641 give target a chance to convert layout.
15642 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15643 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15645 2009-05-07 Doug Evans <dje@google.com>
15647 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15648 (regsets_store_inferior_registers): Ditto.
15650 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15654 * linux-low.c (must_set_ptrace_flags): Delete.
15655 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15657 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15658 `lwp->must_set_ptrace_flags' instead.
15659 (linux_wait_for_event_1): Set ptrace options here.
15660 (linux_wait_1): ... not here.
15662 2009-04-30 Doug Evans <dje@google.com>
15664 * inferiors.c (started_inferior_callback): New function.
15665 (attached_inferior_callback): New function.
15666 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15667 * server.c (print_started_pid, print_attached_pid): New functions.
15668 (detach_or_kill_for_exit): New function.
15669 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15670 * server.h (have_started_inferiors_p): Declare.
15671 (have_attached_inferiors_p): Declare.
15673 * inferiors.c (remove_process): Fix memory leak, free process.
15674 * linux-low.c (linux_remove_process): New function.
15675 (linux_kill): Call it instead of remove_process.
15676 (linux_detach, linux_wait_1): Ditto.
15678 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15680 * configure.srv: Add x86 Windows CE target.
15682 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15684 * inferiors.c (get_thread_process): Make global.
15685 * server.h (get_thread_process): Add prototype.
15686 * thread-db.c (find_one_thread): Use get_thread_process
15687 instead of current_process.
15688 (thread_db_get_tls_address): Do not crash if called when
15689 thread layer is not yet initialized.
15691 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15693 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15694 * spu-low.c (current_tid): Rename to ...
15695 (current_ptid): ... this.
15696 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15697 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15698 ptid_get_lwp (current_ptid) instead of current_tid.
15699 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15700 instead of current_tid. Use find_process_pid to verify pid
15701 argument is valid. Pass proper argument to remove_process.
15702 (spu_thread_alive): Compare current_ptid instead of current_tid.
15703 (spu_resume): Likewise.
15705 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15707 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15710 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15712 Implement the multiprocess extensions, and add linux multiprocess
15715 * server.h (ULONGEST): Declare.
15716 (struct ptid, ptid_t): New.
15717 (minus_one_ptid, null_ptid): Declare.
15718 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15719 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15720 (struct inferior_list_entry): Change `id' type from unsigned from
15722 (struct sym_cache, struct breakpoint, struct
15723 process_info_private): Forward declare.
15724 (struct process_info): Declare.
15725 (current_process): Declare.
15726 (all_processes): Declare.
15727 (initialize_inferiors): Declare.
15728 (add_thread): Adjust to use ptid_t.
15729 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15730 (add_process, remove_process, find_thread_pid): Declare.
15731 (find_inferior_id): Adjust to use ptid_t.
15732 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15733 (multi_process): Declare.
15734 (push_event): Adjust to use ptid_t.
15735 (read_ptid, write_ptid): Declare.
15736 (prepare_resume_reply): Adjust to use ptid_t.
15737 (clear_symbol_cache): Declare.
15738 * inferiors.c (all_processes): New.
15739 (null_ptid, minus_one_ptid): New.
15740 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15741 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15742 (add_thread): Change unsigned long to ptid. Remove gdb_id
15744 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15745 (gdb_id_to_thread): Rename to ...
15746 (find_thread_pid): ... this. Change unsigned long to ptid.
15747 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15748 (loaded_dll, pull_pid_from_list): Adjust.
15749 (add_process, remove_process, find_process_pid)
15750 (get_thread_process, current_process, initialize_inferiors): New.
15751 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15752 (struct target_waitstatus) <related_pid>: Ditto.
15753 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15754 return type to int.
15755 (struct target_ops) <join>: Add `pid' argument.
15756 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15757 (struct target_ops) <wait>: Add `ptid' field. Change return type
15759 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15760 (mywait): Add `ptid' argument. Change return type to ptid_t.
15761 (target_pid_to_str): Declare.
15762 * target.c (set_desired_inferior): Adjust to use ptids.
15763 (mywait): Add new `ptid' argument. Adjust.
15764 (target_pid_to_str): New.
15765 * mem-break.h (free_all_breakpoints): Declare.
15766 * mem-break.c (breakpoints): Delelete.
15767 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15768 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15769 to use per-process breakpoint list.
15770 (free_all_breakpoints): New.
15771 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15772 (symbol_cache, all_symbols_looked_up): Delete.
15774 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15776 (prepare_resume_reply): Change ptid argument's type from unsigned
15777 long to ptid_t. Adjust. Implement W;process and X;process.
15778 (free_sym_cache, clear_symbol_cache): New.
15779 (look_up_one_symbol): Adjust to per-process symbol cache. *
15780 * server.c (cont_thread, general_thread, step_thread): Change type
15782 (attached): Delete.
15783 (multi_process): New.
15784 (last_ptid): Change type to ptid_t.
15785 (struct vstop_notif) <ptid>: Change type to ptid_t.
15786 (queue_stop_reply, push_event): Change `ptid' argument's type to
15788 (discard_queued_stop_replies): Add `pid' argument.
15789 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15790 changes. Don't reference the `attached' global.
15791 (attach_inferior): Adjust to mywait interface changes.
15792 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15793 features. Handle and report "multiprocess+". Handle
15795 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15797 (handle_v_kill): New.
15798 (handle_v_stopped): Adjust to use target_pid_to_str.
15799 (handle_v_requests): Allow multiple attaches and runs when
15800 multiprocess extensions are in effect. Handle "vKill".
15801 (myresume): Adjust to use ptids.
15802 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15803 (handle_status): Adjust to discard_queued_stop_replies interface
15805 (first_thread_of, kill_inferior_callback)
15806 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15807 (main): Call initialize_inferiors. Adjust to use ptids, killing
15808 and detaching from all inferiors. Handle multiprocess packet
15810 * linux-low.h: Include gdb_proc_service.h.
15811 (struct process_info_private): New.
15812 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15813 <lwpid_of>: Use ptid_get_lwp.
15814 (get_lwp_thread): Adjust.
15815 (struct lwp_info): Add `dead' member.
15816 (find_lwp_pid): Declare.
15817 * linux-low.c (thread_db_active): Delete.
15818 (new_inferior): Adjust comment.
15819 (inferior_pid): Delete.
15820 (linux_add_process): New.
15821 (handle_extended_wait): Adjust.
15822 (add_lwp): Change unsigned long to ptid.
15823 (linux_create_inferior): Add process to processes table. Adjust
15824 to use ptids. Don't set new_inferior here.
15825 (linux_attach_lwp): Rename to ...
15826 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15827 it. Adjust to use ptids.
15828 (linux_attach_lwp): New.
15829 (linux_attach): Add process to processes table. Don't set
15831 (struct counter): New.
15832 (second_thread_of_pid_p, last_thread_of_process_p): New.
15833 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15834 multiple processes.
15835 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15836 processes. Remove process from process table.
15837 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15838 to multiple processes.
15839 (any_thread_of): New.
15840 (linux_detach): Add `pid' argument, and handle it. Remove process
15841 from processes table.
15842 (linux_join): Add `pid' argument. Handle it.
15843 (linux_thread_alive): Change unsighed long argument to ptid_t.
15844 Consider dead lwps as not being alive.
15845 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15846 threads we're not interested in.
15847 (same_lwp, find_lwp_pid): New.
15848 (linux_wait_for_lwp): Change `pid' argument's type from int to
15850 (linux_wait_for_event): Rename to ...
15851 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15852 from int to ptid_t. Adjust.
15853 (linux_wait_for_event): New.
15854 (linux_wait_1): Add `ptid' argument. Change return type to
15855 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15856 that exit from the process table.
15857 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15859 (mark_lwp_dead): New.
15860 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15861 stopping all threads, mark its main lwp as dead.
15862 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15864 (fetch_register, usr_store_inferior_registers)
15865 (regsets_fetch_inferior_registers)
15866 (regsets_store_inferior_registers, linux_read_memory)
15867 (linux_write_memory): Inline `inferior_pid'.
15868 (linux_look_up_symbols): Adjust to use per-process
15869 `thread_db_active'.
15870 (linux_request_interrupt): Adjust to use ptids.
15871 (linux_read_auxv): Inline `inferior_pid'.
15872 (initialize_low): Don't reference thread_db_active.
15873 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15874 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15875 (ps_getpid): Return the pid of the current inferior.
15876 * thread-db.c (proc_handle, thread_agent): Delete.
15877 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15879 (find_one_thread): Change argument type to ptid_t. Adjust to
15881 (maybe_attach_thread): Adjust to per-process data and ptids.
15882 (thread_db_find_new_threads): Ditto.
15883 (thread_db_init): Ditto.
15884 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15885 processes table. Adjust to use ptids.
15886 (spu_kill, spu_detach): Adjust interface. Remove process from
15888 (spu_join, spu_thread_alive): Adjust interface.
15889 (spu_wait): Adjust interface. Remove process from processes
15890 table. Adjust to use ptids.
15891 * win32-low.c (current_inferior_tid): Delete.
15892 (current_inferior_ptid): New.
15893 (debug_event_ptid): New.
15894 (thread_rec): Take a ptid. Adjust.
15895 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15896 (child_delete_thread): Ditto.
15897 (do_initial_child_stuff): Add `attached' argument. Add process to
15899 (child_fetch_inferior_registers, child_store_inferior_registers):
15901 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15902 (win32_attach): Pass 1 to do_initial_child_stuff.
15903 (win32_kill): Adjust interface. Remove process from processes
15905 (win32_detach): Ditto.
15906 (win32_join): Adjust interface.
15907 (win32_thread_alive): Take a ptid.
15908 (win32_resume): Adjust to use ptids.
15909 (get_child_debug_event): Ditto.
15910 (win32_wait): Adjust interface. Remove exiting process from
15913 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15915 Non-stop mode support.
15917 * server.h (non_stop): Declare.
15918 (gdb_client_data, handler_func): Declare.
15919 (delete_file_handler, add_file_handler, start_event_loop):
15921 (handle_serial_event, handle_target_event, push_event)
15922 (putpkt_notif): Declare.
15923 * target.h (enum resume_kind): New.
15924 (struct thread_resume): Replace `step' field by `kind' field.
15925 (TARGET_WNOHANG): Define.
15926 (struct target_ops) <wait>: Add `options' argument.
15927 <supports_non_stop, async, start_non_stop>: New fields.
15928 (target_supports_non_stop, target_async): New.
15929 (start_non_stop): Declare.
15930 (mywait): Add `options' argument.
15931 * target.c (mywait): Add `options' argument. Print child exit
15932 notifications here.
15933 (start_non_stop): New.
15934 * server.c (non_stop, own_buf, mem_buf): New globals.
15935 (struct vstop_notif): New.
15936 (notif_queue): New global.
15937 (queue_stop_reply, push_event, discard_queued_stop_replies)
15938 (send_next_stop_reply): New.
15939 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15941 (attach_inferior): In non-stop mode, don't wait for the target
15943 (handle_general_set): Handle QNonStop.
15944 (handle_query): When handling qC, return the current general
15945 thread, instead of the first thread of the list.
15946 (handle_query): If the backend supports non-stop mode, include
15947 QNonStop+ in the qSupported query response.
15948 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15950 (handle_v_attach, handle_v_run): Handle non-stop mode.
15951 (handle_v_stopped): New.
15952 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15953 (myresume): Adjust to use resume_kind. Handle non-stop.
15954 (queue_stop_reply_callback): New.
15955 (handle_status): Handle non-stop mode.
15956 (main): Clear non_stop flag on reconnection. Use the event-loop.
15957 Refactor serial protocol handling from here ...
15958 (process_serial_event): ... to this new function. When GDB
15959 selects any thread, select one here. In non-stop mode, wait until
15960 GDB acks all pending events before exiting.
15961 (handle_serial_event, handle_target_event): New.
15962 * remote-utils.c (remote_open): Install remote_desc in the event
15964 (remote_close): Remove remote_desc from the event loop.
15965 (putpkt_binary): Rename to...
15966 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15967 (putpkt_binary): New as wrapper around putpkt_binary_1.
15968 (putpkt_notif): New.
15969 (prepare_resume_reply): In non-stop mode, don't change the
15971 * event-loop.c: New.
15972 * Makefile.in (OBJ): Add event-loop.o.
15973 (event-loop.o): New rule.
15975 * linux-low.h (pid_of): Moved here.
15977 (get_lwp_thread): Use lwpid_of.
15978 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15979 * linux-low.c (pid_of): Delete.
15980 (inferior_pid): Use lwpid_of.
15981 (linux_event_pipe): New.
15982 (target_is_async_p): New.
15984 (handle_extended_wait): Use lwpid_of.
15985 (add_lwp): Don't set lwpid field.
15986 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15987 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15988 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15989 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15990 first. Adjust to linux_wait_for_event interface changes. Use
15992 (linux_detach): Don't delete the main lwp here.
15993 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15994 (status_pending_p): Don't consider explicitly suspended lwps.
15995 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15996 pointer. Add OPTIONS argument. Change return type to int. Use
15997 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15998 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15999 pointer. Add status pointer argument. Return a pid instead of a
16000 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16001 changes. In non-stop mode, don't switch to a random thread.
16002 (linux_wait): Rename to...
16003 (linux_wait_1): ... this. Add target_options argument, and handle
16004 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16005 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16006 clean exit and signal exit code. Don't stop all threads in
16007 non-stop mode. In all-stop mode, only stop all threads when
16008 reporting a stop to GDB. Handle explicit thread stop requests.
16009 (async_file_flush, async_file_mark): New.
16011 (send_sigstop): Use lwpid_of.
16012 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16013 interface changes. In non-stop mode, don't switch to a random
16015 (linux_resume_one_lwp): Use lwpid_of.
16016 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16017 (linux_resume_one_thread): ... this. Handle resume_stop. In
16018 non-stop mode, don't look for pending flag in all threads.
16019 (resume_status_pending_p): Don't consider explicitly suspended
16021 (my_waitpid): Reimplement. Emulate __WALL.
16022 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16024 (sigchld_handler, linux_supports_non_stop, linux_async)
16025 (linux_start_non_stop): New.
16026 (linux_target_ops): Register linux_supports_non_stop, linux_async
16027 and linux_start_non_stop.
16028 (initialize_low): Install SIGCHLD handler.
16029 * thread-db.c (thread_db_create_event, find_one_thread)
16030 (thread_db_get_tls_address): Use lwpid_of.
16031 * win32-low.c (win32_detach): Adjust to use resume_kind.
16032 (win32_wait): Add `options' argument.
16033 * spu-low.c (spu_resume): Adjust to use resume_kind.
16034 (spu_wait): Add `options' argument.
16036 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16038 Decouple target code from remote protocol.
16040 * target.h (enum target_waitkind): New.
16041 (struct target_waitstatus): New.
16042 (struct target_ops) <wait>: Return an unsigned long. Take a
16043 target_waitstatus pointer instead of a char pointer.
16044 (mywait): Likewise.
16045 * target.c (mywait): Change prototype to return an unsigned long.
16046 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16047 * server.h (thread_from_wait, old_thread_from_wait): Delete
16049 (prepare_resume_reply): Change prototype to take a
16051 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16052 (last_status, last_ptid): New.
16053 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16054 pid instead of a signal.
16055 (attach_inferior): Remove "status" and "signal" parameters.
16057 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16059 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16060 (handle_v_requests, myresume): Remove "status" and "signal"
16061 parameters. Adjust.
16062 (handle_status): New.
16063 (main): Delete local `status'. Adjust.
16064 * remote-utils.c: Include target.h.
16065 (prepare_resume_reply): Change prototype to take a
16066 target_waitstatus. Adjust.
16068 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16070 * spu-low.c (spu_wait): Adjust.
16071 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16073 (win32_wait): Adjust.
16075 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16077 * target.h (struct thread_resume): Delete leave_stopped member.
16078 (struct target_ops): Add a `n' argument to the `resume' callback.
16079 * server.c (start_inferior): Adjust.
16080 (handle_v_cont, myresume): Adjust.
16081 * linux-low.c (check_removed_breakpoint): Adjust to resume
16082 interface change, and to removed leave_stopped field.
16083 (resume_ptr): Delete.
16084 (struct thread_resume_array): New.
16085 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16086 resume interface change.
16087 (linux_continue_one_thread, linux_queue_one_thread)
16088 (resume_status_pending_p): Check if the resume field is NULL
16089 instead of checking the leave_stopped member.
16090 (linux_resume): Adjust to the target resume interface change.
16091 * spu-low.c (spu_resume): Adjust to the target resume interface
16093 * win32-low.c (win32_detach, win32_resume): Ditto.
16095 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16097 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16099 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16101 (linux_continue_one_thread): Only preserve the stepping flag if
16102 there's a pending breakpoint.
16104 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16106 * server.c (main): After the inferior having exited, call
16107 remote_close before exiting gdbserver.
16109 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16111 Fix size of FPSCR in Power 7 processors.
16112 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16113 (PPC_FEATURE_HAS_DFP): New #define.
16114 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16117 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16119 * server.c (handle_query) Whitespace and formatting.
16121 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16123 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16124 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16125 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16126 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16127 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16128 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16129 Makefile.in, configure.ac: Fix whitespace throughout.
16130 * configure: Regenerate.
16132 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16134 * inferiors.c (find_inferior): Make it safe for the callback
16135 function to delete the currently iterated inferior.
16137 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16139 * Makefile.in (linuw_low_h): Move higher.
16140 (thread-db.o): Depend on $(linux_low_h).
16142 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16144 Rename "process" to "lwp" throughout.
16146 * linux-low.c (all_processes): Rename to...
16147 (all_lwps): ... this.
16148 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16149 (add_process): Rename to ...
16150 (add_lwp): ... this. Adjust.
16151 (linux_create_inferior): Adjust.
16152 (linux_attach_lwp): Adjust.
16153 (linux_attach): Adjust.
16154 (linux_kill_one_process): Rename to ...
16155 (linux_kill_one_lwp): ... this. Adjust.
16156 (linux_kill): Adjust.
16157 (linux_detach_one_process): Rename to ...
16158 (linux_detach_one_lwp): ... this. Adjust.
16159 (linux_detach): Adjust.
16160 (check_removed_breakpoint): Adjust.
16161 (status_pending_p): Adjust.
16162 (linux_wait_for_process): Rename to ...
16163 (linux_wait_for_lwp): ... this. Adjust.
16164 (linux_wait_for_event): Adjust.
16165 (send_sigstop): Adjust.
16166 (wait_for_sigstop): Adjust.
16167 (stop_all_processes): Rename to ...
16168 (stop_all_lwps): ... this.
16169 (linux_resume_one_process): Rename to ...
16170 (linux_resume_one_lwp): ... this. Adjust.
16171 (linux_set_resume_request, linux_continue_one_thread)
16172 (linux_queue_one_thread, resume_status_pending_p)
16173 (usr_store_inferior_registers, regsets_store_inferior_registers)
16174 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16176 * linux-low.h (get_process): Rename to ...
16177 (get_lwp): ... this. Adjust.
16178 (get_thread_process): Rename to ...
16179 (get_thread_lwp): ... this. Adjust.
16180 (get_process_thread): Rename to ...
16181 (get_lwp_thread): ... this. Adjust.
16182 (struct process_info): Rename to ...
16183 (struct lwp_info): ... this.
16184 (all_processes): Rename to ...
16185 (all_lwps): ... this.
16186 * proc-service.c (ps_lgetregs): Adjust.
16187 * thread-db.c (thread_db_create_event, find_one_thread)
16188 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16190 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16192 * server.c (handle_query): Handle "qAttached".
16194 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16196 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16197 GPLv3, update license URL.
16199 2009-03-01 Doug Evans <dje@google.com>
16201 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16202 (server_h): Add gdb_signals.h.
16203 (signals.o): Update.
16204 * server.h (target_signal_from_host,target_signal_to_host_p)
16205 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16207 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16209 * remote-utils.c (getpkt): Also generate remote-debug
16210 information if noack_mode is set.
16212 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16214 * server.c (handle_query): Report qXfer:siginfo:read and
16215 qXfer:siginfo:write as supported and handle them.
16216 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16217 * linux-low.c (linux_xfer_siginfo): New.
16218 (linux_target_ops): Set it.
16220 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16222 * server.c (gdbserver_usage): Mention --remote-debug.
16223 (main): Accept '--remote-debug' switch.
16225 2009-01-18 Doug Evans <dje@google.com>
16227 * regcache.c (new_register_cache): No need to check result of xcalloc.
16228 * server.c (handle_search_memory): Back out calls to xmalloc,
16229 result is checked and error is returned to user upon failure.
16230 (handle_query): Ditto. Add more checks for result of malloc.
16231 (handle_v_cont): Check result of malloc, report error back to
16233 (handle_v_run): Ditto. Call freeargv.
16234 * server.h (freeargv): Declare.
16235 * utils.c (freeargv): New fn.
16237 2009-01-15 Doug Evans <dje@google.com>
16239 * gdbreplay.c (perror_with_name): Make arg const char *.
16240 * server.h (target_signal_to_name): Make return type const char *.
16241 * thread-db.c (thread_db_err_str): Make return type const char *.
16242 * utils.c (perror_with_name): Make arg const char *.
16244 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16246 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16247 when handling a EXIT_PROCESS_DEBUG_EVENT.
16249 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16251 * gdbreplay.c (gdbreplay_version): Update copyright year.
16252 * server.c (gdbserver_version): Likewise.
16254 2009-01-05 Doug Evans <dje@google.com>
16256 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16257 (handle_extended_wait): Improve comment.
16259 2008-12-13 Doug Evans <dje@google.com>
16261 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16262 * server.h (ATTR_MALLOC): New macro.
16263 (xmalloc,xcalloc,xstrdup): Declare.
16264 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16265 * inferiors.c: Ditto.
16266 * linux-low.c: Ditto.
16267 * mem-break.c: Ditto.
16268 * regcache.c: Ditto.
16269 * remote-utils.c: Ditto.
16272 * win32-low.c: Ditto.
16274 2008-12-12 Doug Evans <dje@google.com>
16276 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16277 in debugging printf.
16279 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16281 2008-12-09 Doug Evans <dje@google.com>
16283 * linux-low.h (struct process_info): Delete member tid, unused.
16284 * thread-db.c (find_one_thread): Update.
16285 (maybe_attach_thread): Update.
16287 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16289 * target.h (struct target_ops): Add qxfer_osdata member.
16290 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16292 (linux_qxfer_osdata): New functions.
16293 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16295 * server.c (handle_query): Handle "qXfer:osdata:read:".
16296 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16297 (buffer_xml_printf): New functions.
16298 * server.h (struct buffer): New.
16299 (buffer_grow_str, buffer_grow_str0): New macros.
16300 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16301 (buffer_xml_printf): Declare.
16303 2008-11-24 Doug Evans <dje@google.com>
16305 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16307 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16309 * server.c (handle_v_run): Always use the supplied argument list.
16311 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16313 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16314 (xtensa_regmap_table): Add entry for scompare1.
16316 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16318 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16319 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16320 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16321 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16322 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16323 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16324 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16325 XML target descriptions.
16326 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16327 when inferior is running on an ISA 2.05 or later processor. Add
16328 special case to return offset for full 64-bit slot of FPSCR when
16331 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16333 * Makefile.in (SFILES, clean): Added sparc64 files.
16334 (reg-sparc64.o, reg-sparc64.c): New.
16335 * configure.srv (sparc*-*-linux*): New configuration.
16336 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16337 syscall arguments for SPARC.
16338 (regsets_store_inferior_registers): Likewise.
16339 * linux-sparc-low.c: New file.
16341 2008-10-21 Doug Evans <dje@google.com>
16343 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16344 (READLINE_DIR,READLINE_DEP): Delete.
16345 (INTERNAL_CFLAGS): Update.
16346 (LINTFLAGS): Update.
16348 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16350 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16351 whole argv from the last run, not just argv[0].
16353 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16355 * regcache.c (new_register_cache): Return NULL if the register
16356 cache size isn't known yet.
16357 (free_register_cache): Avoid dereferencing a NULL regcache.
16359 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16361 * configure.srv: Merge MIPS and MIPS64.
16363 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16365 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16367 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16369 * Makefile.in: Add required vsx dependencies.
16371 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16372 Declare init_registers_powerpc_vsx32l.
16373 Declare init_registers_powerpc_vsx64l.
16374 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16375 (ppc_arch_setup): Check for VSX in hwcap.
16376 (ppc_fill_vsxregset): New function.
16377 (ppc_store_vsxregset): New function.
16378 Add new VSX entry in regset_info target_regsets.
16380 * configure.srv: Add new VSX dependencies.
16382 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16384 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16385 (remote_open): Set or clear transport_is_reliable.
16386 (putpkt_binary): Don't expect acks in noack mode.
16387 (getpkt): Don't send ack/nac in noack mode.
16388 * server.c (handle_general_set): Handle QStartNoAckMode.
16389 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16391 (main): Reset noack_mode on every connection.
16392 * server.h (noack_mode): Declare.
16394 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16396 * Makefile.in (GDBREPLAY_OBS): New variable.
16397 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16399 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16400 Daniel Jacobowitz <dan@codesourcery.com>
16402 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16403 (usr_store_inferior_registers): Likewise.
16404 (regsets_store_inferior_registers): Likewise.
16406 2008-07-31 Rolf Jansen <rj@surtec.com>
16407 Pedro Alves <pedro@codesourcery.com>
16409 * configure.ac: Check for memmem declaration.
16410 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16411 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16412 (disable_packet_qfThreadInfo): Unconditionally compile.
16413 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16414 * configure, config.in: Regenerate.
16416 2008-07-28 Doug Kwan <dougkwan@google.com>
16418 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16419 (linux_write_memory): Remove declaration of errno.
16421 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16423 * linux-low.c (handle_extended_wait): Do not use "status"
16424 variable uninitialized.
16426 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16428 * server.c (handle_v_attach): Inhibit reporting dll changes.
16430 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16432 * remote-utils.c (prepare_resume_reply): If requested, don't
16433 output "thread:TID" in the T stop reply.
16435 * server.c (disable_packet_vCont, disable_packet_Tthread)
16436 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16437 (handle_query): If requested, disable support for qC, qfThreadInfo
16439 (handle_v_requests): If requested, disable support for vCont.
16440 (gdbserver_show_disableable): New.
16441 (main): Handle --disable-packet and --disable-packet=LIST.
16443 * server.h (disable_packet_vCont, disable_packet_Tthread)
16444 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16446 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16448 * server.c (gdbserver_usage): Mention --version.
16450 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16452 * Makefile.in (gdbreplay.o): New rule.
16454 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16456 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16457 message, not gdbserver.
16459 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16460 Nathan Sidwell <nathan@codesourcery.com>
16461 Joseph Myers <joseph@codesourcery.com>
16463 * acinclude.m4: Include ../../config/acx.m4.
16464 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16465 * configure, config.in: Regenerate.
16466 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16467 * server.c (gdbserver_version): Print PKGVERSION.
16468 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16469 (main): Adjust gdbserver_usage calls.
16470 * gdbreplay.c (version, host_name): Add declarations.
16471 (gdbreplay_version, gdbreplay_usage): New.
16472 (main): Accept --version and --help options.
16474 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16476 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16477 (arm_breakpoint_at): Handle Thumb.
16478 (the_low_target): Add comment.
16480 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16482 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16484 2008-05-09 Doug Evans <dje@google.com>
16486 * server.h (decode_search_memory_packet): Declare.
16487 * remote-utils.c (decode_search_memory_packet): New fn.
16488 * server.c (handle_search_memory_1): New fn.
16489 (handle_search_memory): New fn.
16490 (handle_query): Process qSearch:memory packets.
16492 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16494 * regcache.c (registers_length): Remove.
16495 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16496 full register packet.
16497 * regcache.h (registers_length): Remove prototype.
16498 * server.h (PBUFSIZ): Define to 16384.
16500 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16502 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16503 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16504 powerpc-64l.o, and powerpc-altivec64l.o.
16505 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16506 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16507 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16508 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16509 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16512 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16513 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16514 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16515 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16516 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16517 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16518 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16519 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16520 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16521 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16524 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16525 (init_registers_powerpc_32l): ... this new prototype.
16526 (init_registers_powerpc_32): Remove, replace by ...
16527 (init_registers_powerpc_altivec32l): ... this new prototype.
16528 (init_registers_powerpc_e500): Remove, replace by ...
16529 (init_registers_powerpc_e500l): ... this new prototype.
16530 (init_registers_ppc64): Remove, replace by ...
16531 (init_registers_powerpc_64l): ... this new prototype.
16532 (init_registers_powerpc_64): Remove, replace by ...
16533 (init_registers_powerpc_altivec64l): ... this new prototype.
16534 (ppc_num_regs): Set to 73.
16535 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16536 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16537 (ppc_cannot_store_register): Handle orig_r3 and trap.
16538 (ppc_arch_setup): Update init_registers_... calls.
16539 (ppc_fill_gregset): Handle orig_r3 and trap.
16541 * inferiors.c (clear_inferiors): Reset current_inferior.
16543 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16545 * acinclude.m4: Add override.m4.
16546 * configure: Regenerate.
16548 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16550 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16551 initial call to init_register_ppc64.
16553 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16555 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16556 single powerpc*-*-linux* case.
16557 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16559 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16561 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16562 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16564 * linux-ppc-low.c: Include <elf.h>.
16565 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16566 (ppc_hwcap): New global variable.
16567 (ppc_regmap): Remove __SPE__ #ifdef sections.
16568 (ppc_regmap_e500): New global variable.
16569 (ppc_cannot_store_register): Update __SPE__ special case.
16570 (ppc_get_hwcap): New function.
16571 (ppc_arch_setup): Use it to determine whether inferior supports
16572 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16573 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16574 Do not access registers if target does not support AltiVec.
16575 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16576 Do not access registers if target does not support SPE.
16577 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16579 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16581 * linux-low.c (disabled_regsets, num_regsets): New.
16582 (use_regsets_p): Delete.
16583 (linux_wait_for_process): Clear disabled_regsets.
16584 (regsets_fetch_inferior_registers): Check and set it.
16585 (regsets_store_inferior_registers): Likewise.
16586 (linux_fetch_registers, linux_store_registers): Do not use
16588 (initialize_low): Allocate disabled_regsets.
16590 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16592 * Makefile.in (LIBOBJS): New.
16593 (OBS): Use LIBOBJS.
16594 (memmem.o): New rule.
16595 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16596 * configure: Regenerated.
16598 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16600 * server.c (handle_query): Never return "unsupported" for
16601 qXfer:features:read queries.
16603 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16605 * server.c (get_features_xml): Fix inverted condition.
16606 (handle_query): Always support qXfer:feature:read.
16608 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16610 * server.c (wrapper_argv): New.
16611 (start_inferior): Handle wrapper_argv. If set, expect an extra
16613 (gdbserver_usage): Document --wrapper.
16614 (main): Parse --wrapper.
16616 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16618 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16619 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16620 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16621 (ppc_set_pc): Likewise.
16622 (ppc_arch_setup): New function.
16623 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16624 of collect_register.
16625 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16627 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16629 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16630 instead of linux-ppc64-low.o.
16631 * linux-ppc64-low.c: Remove file.
16632 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16633 (linux-ppc64-low.o): Remove rule.
16635 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16636 (init_registers_powerpc_64): Likewise.
16637 (ppc_regmap): Conditionally define depending on __powerpc64__.
16638 (ppc_cannot_store_register): Do not special-case "fpscr" when
16639 compiled on __powerpc64__.
16640 (ppc_collect_ptrace_register): New function.
16641 (ppc_supply_ptrace_register): New function.
16642 (ppc_breakpoint): Change type to "unsigned int".
16643 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16644 (the_low_target): Conditionally provide initializers for the
16645 arch_setup member depending on __powerpc64__. Install
16646 collect_ptrace_register and supply_ptrace_register members.
16648 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16650 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16651 * server.c (gdbserver_xmltarget): Define.
16652 (get_features_xml): Use it to replace "target.xml" and arch_string.
16654 * configure.srv: Remove srv_xmltarget. Add XML files that were
16655 mentioned there to srv_xmlfiles instead. Remove conditional tests
16656 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16657 srv_xmlfiles and srv_regobj to include all possible choices.
16658 * configure.ac (srv_xmltarget): Remove.
16659 (srv_xmlfiles): Do not add "target.xml".
16660 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16661 checks for supplementary target information.
16662 * configure: Regenerate.
16663 * Makefile.in (XML_TARGET): Remove.
16664 (target.xml): Remove rule.
16665 (clean): Do not clean up target.xml.
16666 (.PRECIOUS): Do not mention target.xml.
16668 * target.h (struct target_ops): Remove arch_string member.
16669 * linux-low.c (linux_arch_string): Remove.
16670 (linux_target_ops): Remove arch_string initializer.
16671 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16672 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16673 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16674 * spu-low.c (spu_arch_string): Remove.
16675 (spu_target_ops): Remove arch_string initializer.
16676 * win32-low.c (win32_arch_string): Remove.
16677 (win32_target_ops): Remove arch_string initializer.
16678 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16679 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16680 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16682 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16684 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16685 by collect_ptrace_register and supply_ptrace_register hooks.
16686 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16687 instead of checking for the_low_target.left_pad_xfer.
16688 (usr_store_inferior_registers): Use collect_ptrace_register callback
16689 instead of checking for the_low_target.left_pad_xfer.
16691 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16692 (s390_supply_ptrace_register): Likewise.
16693 (s390_fill_gregset): Call s390_collect_ptrace_register.
16694 (the_low_target): Update.
16696 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16697 (ppc_supply_ptrace_register): Likewise.
16698 (the_low_target): Update.
16700 * linux-i386-low.c (the_low_target): Update.
16701 * linux-x86-64-low.c (the_low_target): Update.
16703 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16705 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16706 reg-s390.o and reg-s390x.o.
16708 * linux-low.c (new_inferior): New global variable.
16709 (linux_create_inferior, linux_attach): Set it.
16710 (linux_wait_for_process): Call the_low_target.arch_setup after the
16711 target has stopped for the first time.
16712 (initialize_low): Do not call the_low_target.arch_setup.
16714 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16715 (s390_set_pc): Likewise.
16716 (s390_arch_setup): New function.
16717 (the_low_target): Use s390_arch_setup as arch_setup routine.
16719 * regcache.c (realloc_register_cache): New function.
16720 (set_register_cache): Call it for each existing regcache.
16722 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16724 * server.h (init_registers): Remove prototype.
16726 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16727 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16728 instead of init_registers ().
16729 * linux-arm-low.c (init_registers_arm): Add prototype.
16730 (init_registers_arm_with_iwmmxt): Likewise.
16731 (the_low_target): Add initializer for arch_setup field.
16732 * linux-cris-low.c (init_registers_cris): Add prototype.
16733 (the_low_target): Add initializer for arch_setup field.
16734 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16735 (the_low_target): Add initializer for arch_setup field.
16736 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16737 (the_low_target): Add initializer for arch_setup field.
16738 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16739 (the_low_target): Add initializer for arch_setup field.
16740 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16741 (the_low_target): Add initializer for arch_setup field.
16742 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16743 (the_low_target): Add initializer for arch_setup field.
16744 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16745 (init_registers_mips64_linux): Likewise.
16746 (the_low_target): Add initializer for arch_setup field.
16747 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16748 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16749 (the_low_target): Add initializer for arch_setup field.
16750 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16751 (init_registers_powerpc_64): Likewise.
16752 (the_low_target): Add initializer for arch_setup field.
16753 * linux-s390-low.c (init_registers_s390): Add prototype.
16754 (init_registers_s390x): Likewise.
16755 (the_low_target): Add initializer for arch_setup field.
16756 * linux-sh-low.c (init_registers_sh): Add prototype.
16757 (the_low_target): Add initializer for arch_setup field.
16758 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16759 (the_low_target): Add initializer for arch_setup field.
16760 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16761 (the_low_target): Add initializer for arch_setup field.
16763 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16764 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16765 instead of init_registers ().
16766 * win32-arm-low.c (init_registers_arm): Add prototype.
16767 (the_low_target): Add initializer for arch_setup field.
16768 * win32-i386-low.c (init_registers_i386): Add prototype.
16769 (the_low_target): Add initializer for arch_setup field.
16771 * spu-low.c (init_registers_spu): Add prototype.
16772 (initialize_low): Call initialie_registers_spu () instead of
16773 initialize_registers ().
16775 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16777 * server.c (handle_v_requests): When handling the vRun and vAttach
16778 packets, if already debugging a process, don't kill it. Return an
16781 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16783 * server.c (handle_query): Correct length check.
16785 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16787 * win32-low.c (do_initial_child_stuff): Add process handle
16788 parameter. Set current_process_handle and current_process_id from the
16789 parameters. Clear globals.
16790 (win32_create_inferior): Don't set current_process_handle and
16791 current_process_id here. Instead pass them on the call to
16792 do_initial_child_stuff.
16793 (win32_attach): Likewise.
16794 (win32_clear_inferiors): New.
16795 (win32_kill): Don't close the current process handle or the
16796 current thread handle here. Instead call win32_clear_inferiors.
16797 (win32_detach): Don't open a new handle to the process. Call
16798 win32_clear_inferiors.
16799 (win32_join): Don't rely on current_process_handle; open a new
16800 handle using the process id.
16801 (win32_wait): Call win32_clear_inferiors when the inferior process
16804 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16806 * server.c (monitor_show_help): Add "exit".
16808 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16810 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16811 (clean): Add reg-xtensa.c.
16812 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16813 * configure.srv (xtensa*-*-linux*) New target.
16814 * linux-xtensa-low.c: New.
16815 * xtensa-xtregs.c: New.
16817 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16819 * hostio.c: Don't include errno.h.
16820 (errno_to_fileio_errno): Move to hostio-errno.
16821 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16822 error number outputting to the target->hostio_last_error callback.
16823 (hostio_packet_error): Use FILEIO_EINVAL directly.
16824 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16825 calls to hostio_error.
16826 * hostio-errno.c: New.
16827 * server.h (hostio_last_error_from_errno): Declare.
16828 * target.h (target_ops): Add hostio_last_error member.
16829 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16830 as hostio_last_error handler.
16831 * spu-low.c (spu_target_ops): Likewise.
16832 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16833 (wince_hostio_last_error): New functions.
16834 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16835 as hostio_last_error handler.
16836 (win32_target_ops) [!_WIN32_WCE]: Register
16837 hostio_last_error_from_errno as hostio_last_error handler.
16838 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16839 (hostio-errno.o): New rule.
16840 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16841 * configure.srv (srv_hostio_err_objs): New variable. Default to
16843 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16844 * configure: Regenerate.
16846 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16848 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16849 (linux_kill, linux_detach): Clean up the process list.
16850 * remote-utils.c (remote_open): Improve port number parsing.
16851 (putpkt_binary, input_interrupt): Only send interrupts if the target
16853 * server.c (extended_protocol): Make static.
16854 (attached): Define earlier.
16855 (exit_requested, response_needed, program_argv): New variables.
16856 (target_running): New.
16857 (start_inferior): Clear attached here.
16858 (attach_inferior): Set attached here.
16859 (require_running): Define.
16860 (handle_query): Use require_running and target_running. Implement
16862 (handle_v_attach, handle_v_run): New.
16863 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16864 (gdbserver_usage): Update.
16865 (main): Redo argument parsing. Handle --debug and --multi. Handle
16866 --attach along with other options or after the port. Save
16867 program_argv. Support no initial program. Resynchronize
16868 communication with GDB after an error. Handle "monitor exit".
16869 Use require_running and target_running. Always allow the extended
16870 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16871 restart in extended mode.
16872 * README: Refer to the GDB manual. Update --attach usage.
16874 2007-12-20 Andreas Schwab <schwab@suse.de>
16876 * linux-low.c (STACK_SIZE): Define.
16877 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16878 (linux_test_for_tracefork): Likewise.
16880 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16882 * linux-low.c (linux_wait_for_event): Update messages. Do not
16883 reinsert auto-delete breakpoints.
16884 * mem-break.c (struct breakpoint): Change return type of handler to
16886 (set_breakpoint_at): Update handler type.
16887 (reinsert_breakpoint_handler): Return 1 instead of calling
16889 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16891 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16892 * mem-break.h (set_breakpoint_at): Update handler type.
16893 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16894 * win32-low.c (auto_delete_breakpoint): New.
16895 (get_child_debug_event): Use it.
16897 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16899 * configure.ac: Check for pread and pwrite.
16900 * hostio.c (handle_pread): Fall back to lseek and read.
16901 (handle_pwrite): Fall back to lseek and write.
16902 * config.in, configure: Regenerated.
16904 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16906 * server.c (myresume): Add own_buf argument.
16907 (main): Update calls.
16909 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16911 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16912 * remote-utils.c (remote_open): Do not call disable_async_io.
16913 (block_async_io): Delete.
16914 (unblock_async_io): Make static.
16915 (initialize_async_io): New.
16916 * server.c (handle_v_cont): Handle async I/O here.
16917 (myresume): Likewise. Move other common resume tasks here...
16918 (main): ... from here. Call initialize_async_io. Disable async
16919 I/O before the main loop.
16920 * server.h (initialize_async_io): Declare.
16921 (block_async_io, unblock_async_io): Delete prototypes.
16922 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16924 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16926 * remote-utils.c (readchar): Allow binary data in received messages.
16928 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16930 * win32-low.c (attaching): New global.
16931 (win32_create_inferior): Clear the `attaching' global.
16932 (win32_attach): Set the `attaching' global.
16933 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16934 attaching. Only set a breakpoint at the entry point if not
16937 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16939 * server.c (main): Don't report dll events on the initial
16940 connection on attaches.
16942 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16944 * server.c (main): Relax numerical bases supported for the pid of
16945 the --attach command line argument.
16947 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16949 * win32-low.c (win32_attach): Call OpenProcess before
16950 DebugActiveProcess, not after. Add last error output to error
16953 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16955 * win32-low.c (win32_get_thread_context)
16956 (win32_set_thread_context): New functions.
16957 (thread_rec): Use win32_get_thread_context.
16958 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16959 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16962 2007-12-03 Leo Zayas
16963 Pedro Alves <pedro_alves@portugalmail.pt>
16965 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16967 (child_add_thread): Minor cleanup.
16968 (child_continue): Resume artificially suspended threads before
16969 calling ContinueDebugEvent.
16970 (suspend_one_thread): New.
16971 (fake_breakpoint_event): New.
16972 (get_child_debug_event): Change return type to int. Check here if
16973 gdb sent an interrupt request. If a soft interrupt was requested,
16974 fake a breakpoint event. Return 0 if there is no event to handle,
16976 (win32_wait): Don't check here if gdb sent an interrupt request.
16977 Ensure there is a valid event to handle.
16978 (win32_request_interrupt): Add soft interruption method as last
16981 2007-12-03 Leo Zayas
16982 Pedro Alves <pedro_alves@portugalmail.pt>
16984 * win32-low.h (win32_thread_info): Add descriptions to the
16985 structure members. Replace `suspend_count' counter by a
16987 * win32-low.c (thread_rec): Update condition of when to get the
16988 context from the inferior. Rely on ContextFlags being set if it
16989 has already been retrieved. Only suspend the inferior thread if
16990 we haven't already. Warn if that fails.
16991 (continue_one_thread): s/suspend_count/suspended/. Only call
16992 ResumeThread once. Warn if that fails.
16994 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16996 * win32-low.c (win32_wait): Don't read from the inferior when it
16997 has already exited.
16999 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17001 * Makefile.in (win32_low_h): New variable.
17002 (win32-low.o): Add dependency on $(win32_low_h).
17003 (win32-arm-low.o, win32-i386-low.o): New rules.
17005 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17007 * hostio.c: Correct copyright year.
17009 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17011 * Makefile.in (OBS): Add hostio.o.
17012 (hostio.o): New rule.
17013 * server.h (handle_vFile): Declare.
17014 * hostio.c: New file.
17015 * server.c (handle_v_requests): Take packet_len and new_packet_len
17016 for binary packets. Call handle_vFile.
17017 (main): Update call to handle_v_requests.
17019 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17021 * linux-low.c: Include <sched.h>.
17023 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17025 * linux-low.c (linux_tracefork_grandchild): New.
17026 (linux_tracefork_child): Use clone.
17027 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17029 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17031 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17033 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17035 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17037 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17039 * inferiors.c (change_inferior_id): Delete.
17040 (add_pid_to_list, pull_pid_from_list): New.
17041 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17042 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17043 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17044 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17045 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17046 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17047 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17048 (using_threads): Always set to 1.
17049 (handle_extended_wait): New.
17050 (add_process): Do not set TID.
17051 (linux_create_inferior): Set must_set_ptrace_flags.
17052 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17053 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17054 (linux_thread_alive): Rename TID argument to LWPID.
17055 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17056 (linux_wait_for_event): Do not use TID or check using_threads. Update
17057 call to dead_thread_notify. Call handle_extended_wait.
17058 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17059 (send_sigstop): Delete sigstop_sent.
17060 (wait_for_sigstop): Avoid TID.
17061 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17062 (linux_test_for_tracefork): New.
17063 (linux_lookup_signals): Use thread_db_active and
17064 linux_supports_tracefork_flag.
17065 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17066 * linux-low.h (get_process_thread): Avoid TID.
17067 (struct process_ifo): Move thread_known and tid to the end. Remove
17069 (linux_attach_lwp, thread_db_init): Update prototypes.
17070 * server.h (change_inferior_id): Delete prototype.
17071 (add_pid_to_list, pull_pid_from_list): New prototypes.
17072 * thread-db.c (thread_db_use_events): New.
17073 (find_first_thread): Rename to...
17074 (find_one_thread): ...this. Update callers and messages. Do not
17075 call fatal. Check thread_db_use_events. Do not call
17076 change_inferior_id or new_thread_notify.
17077 (maybe_attach_thread): Update. Do not call new_thread_notify.
17078 (thread_db_init): Set thread_db_use_events. Check use_events.
17079 * utils.c (fatal, warning): Correct message prefix.
17081 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17083 * Makefile.in (clean): Remove new files.
17084 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17085 (powerpc-64.o, powerpc-64.c): New rules.
17086 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17087 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17089 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17091 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17092 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17093 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17094 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17095 (target_regsets): Add AltiVec and SPE register sets.
17096 * configure.ac: Check for AltiVec and SPE.
17097 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17098 (ppc_fill_vrregset, ppc_store_vrregset): New.
17099 (target_regsets): Add AltiVec register set.
17100 * configure: Regenerated.
17102 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17104 * linux-low.c (O_LARGEFILE): Define.
17105 (linux_read_memory): Use /proc/PID/mem.
17106 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17107 * configure, config.in: Regenerated.
17109 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17111 * linux-low.c (linux_wait_for_event): Do not pass signals while
17114 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17116 * win32-low.c (create_process): New.
17117 (win32_create_inferior): Use create_process instead of
17118 CreateProcess. If create_process failed retry appending an ".exe"
17119 suffix. Store the GetLastError result immediatelly after
17120 create_process calls and use it on the call to error.
17122 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17124 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17126 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17128 * configure.ac: Switch license to GPLv3.
17130 2007-08-01 Michael Snyder <msnyder@access-company.com>
17132 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17134 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17136 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17138 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17139 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17140 CloseToolhelp32Snapshot.
17141 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17142 CloseToolhelp32Snapshot.
17144 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17146 * server.c (main): Check for inferior exit before main loop.
17148 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17150 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17151 instead of on tmp_desc.
17153 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17154 Daniel Jacobowitz <dan@codesourcery.com>
17156 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17157 (add_thread): Minor cleanups.
17158 (clear_inferiors): Move lower in the file. Clear the DLL
17160 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17161 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17162 (xml_escape_text): New.
17163 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17165 (handle_v_cont): Report errors.
17166 (gdbserver_version): Update.
17167 (main): Correct size of own_buf. Do not report initial DLL events.
17168 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17169 (unloaded_dll, xml_escape_text): New.
17170 * win32-low.c (enum target_waitkind): Update comments.
17171 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17172 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17173 (win32_EnumProcessModules, win32_GetModuleInformation)
17174 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17175 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17176 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17177 (win32_Module32First, win32_Module32Next, load_toolhelp)
17178 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17179 (get_child_debug_event): Handle DLL events.
17180 (win32_wait): Likewise.
17182 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17184 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17185 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17187 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17189 * win32-low.c (handle_output_debug_string): Ignore event if not
17192 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17194 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17196 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17198 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17200 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17202 * inferiors.c (change_inferior_id): Add comment.
17203 * linux-low.c (check_removed_breakpoint): Add an early
17204 prototype. Improve debug output.
17205 (linux_attach): Doc update.
17206 (linux_detach_one_process, linux_detach): Clean up before releasing
17208 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17209 * linux-low.h (struct process_info): Doc improvement.
17210 * mem-break.c (delete_all_breakpoints): New.
17211 * mem-break.h (delete_all_breakpoints): New prototype.
17212 * thread-db.c (find_first_thread): New.
17213 (thread_db_create_event): Call it instead of
17214 thread_db_find_new_threads. Clean up unused variables.
17215 (maybe_attach_thread): Remove first thread handling.
17216 (thread_db_find_new_threads): Use find_first_thread.
17217 (thread_db_get_tls_address): Likewise.
17219 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17221 * thread-db.c (thread_db_find_new_threads): Add prototype.
17222 (thread_db_create_event): Check for the main thread before adding
17224 (maybe_attach_thread): Only enable event reporting if TID == 0.
17225 (thread_db_get_tls_address): Check for new threads.
17227 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17229 * linux-low.c (linux_create_inferior): Try execv before execvp.
17230 * spu-low.c (spu_create_inferior): Likewise.
17232 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17234 * linux-low.c (linux_create_inferior): Change execv to execvp.
17235 * spu-low.c (spu_create_inferior): Likewies.
17237 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17239 * Makefile.in (clean): Clean new files instead of deleted ones.
17240 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17241 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17243 * configure.srv: Specify XML files and new regformats for MIPS and
17245 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17246 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17247 an entry for the restart register.
17248 (mips_cannot_fetch_register, mips_cannot_store_register)
17249 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17250 register names to match the XML descriptions.
17251 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17252 restart register instead of $0.
17254 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17255 Markus Deuling <deuling@de.ibm.com>
17257 * remote-utils.c (decode_xfer_write): New function.
17258 * server.h (decode_xfer_write): Add prototype.
17259 * server.c (handle_query): Add PACKET_LEN argument. Support
17260 qXfer:spu:read and qXfer:spu:write packets.
17261 (main): Pass packet_len to handle_query.
17262 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17263 * target.h (target_ops): Add qxfer_spu.
17265 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17267 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17268 accessing non-seekable spufs files.
17270 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17272 * server.c (handle_query): Add reply for qC packet.
17274 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17275 Leo Zayas <lerele@champenstudios@com>
17277 * server.h (check_remote_input_interrupt_request): New function.
17278 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17279 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17280 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17281 (check_remote_input_interrupt_request): New function.
17282 * server.h (check_remote_input_interrupt_request): Declare.
17283 * win32-low.c (winapi_DebugBreakProcess,
17284 winapi_GenerateConsoleCtrlEvent): New typedefs.
17285 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17287 (win32_wait): Check for remote interrupt request
17288 with check_remote_input_interrupt_request.
17289 (win32_request_interrupt): New function.
17290 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17292 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17294 * win32-low.c (debug_registers_changed,
17295 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17296 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17297 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17298 (thread_rec): Get context using the low target.
17299 (child_add_thread): Call thread_added on the low target,
17300 which does the same thing.
17302 (do_initial_child_stuff): Remove debug registers references.
17303 Set context using the low target. Resume threads after
17304 setting the contexts.
17305 (child_continue): Remove dead variable. Remove debug
17306 registers references.
17307 (child_fetch_inferior_registers): Go through the low target.
17308 (do_child_store_inferior_registers): Remove.
17309 (child_store_inferior_registers): Go through the low target.
17310 (win32_resume): Remove debug registers references.
17311 Set context using the low target.
17312 (handle_exception): Change return type to void. Don't record
17313 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17314 first chance exception.
17315 (get_child_debug_event): Change return type to void. Remove
17316 goto loop. Always return after waiting for debug event.
17317 (win32_wait): Convert to switch statement. Handle spurious
17320 * win32-i386-low.c (debug_registers_changed,
17321 debug_registers_used): New.
17322 (initial_stuff): Rename to ...
17323 (i386_initial_stuff): ... this. Clear debug registers
17325 (store_debug_registers): Delete.
17326 (i386_get_thread_context): New.
17327 (load_debug_registers): Delete.
17328 (i386_set_thread_context): New.
17329 (i386_thread_added): New.
17330 (single_step): Rename to ...
17331 (i386_single_step): ... this.
17332 (do_fetch_inferior_registers): Rename to ...
17333 (i386_fetch_inferior_register): ... this.
17334 (i386_store_inferior_register): New.
17335 (the_low_target): Adapt to new interface.
17337 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17338 (arm_get_thread_context): New.
17339 (arm_set_thread_context): New.
17341 (do_fetch_inferior_registers): Rename to ...
17342 (arm_fetch_inferior_register): ... this.
17343 (arm_store_inferior_register): New.
17344 (arm_wince_breakpoint): Reimplement as unsigned long.
17345 (arm_wince_breakpoint_len): Define.
17346 (the_low_target): Adapt to new interface.
17348 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17349 load_debug_registers. Add get_thread_context, set_thread_context,
17350 thread_added and store_inferior_register. Rename
17351 fetch_inferior_registers to fetch_inferior_register.
17352 (regptr): Remove declaration.
17354 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17356 * linux-low.c (linux_detach): Change return type to int. Return 0.
17357 * spu-low.c (spu_detach): Likewise.
17359 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17361 * target.h (target_ops): Change return type of detach to int.
17363 (join_inferior): New.
17364 * server.c (main): Don't skip detach support on mingw32.
17365 If the inferior doesn't support detaching return error.
17366 Call join_inferior instead of using waitpid.
17367 * linux-low.c (linux_join): New.
17368 (linux_target_op): Add linux_join.
17369 * spu-low.c (spu_join): New.
17370 (spu_target_ops): Add spu_join.
17371 * win32-low.c (win32_detach): Adapt to new interface.
17372 Reopen current_process_handle before detaching. Issue a child
17373 resume before detaching.
17375 (win32_target_op): Add win32_join.
17377 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17379 * win32-low.c (win32-attach): Fix return value.
17380 * target.h (target_ops): Describe ATTACH return values.
17382 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17384 * win32-low.c (GETPROCADDRESS): Define.
17385 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17386 (winapi_DebugSetProcessKillOnExit): Likewise.
17387 (win32_create_inferior): Force usage of ansi CreateProcessA.
17388 (win32_attach): Use GETPROCADDRESS.
17389 (win32_detach): Likewise.
17391 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17393 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17395 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17397 * win32-low.c: Commit leftover changes from 2007-03-29.
17399 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17401 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17402 fields short instead of int. Add explicit padding.
17403 (i387_cache_to_fsave): Remove unnecessary casts.
17404 (i387_fsave_to_cache): Doc fix.
17405 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17407 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17409 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17410 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17412 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17414 * configure.srv (arm*-*-mingw32ce*): Move near the other
17417 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17419 * configure.ac: Add errno checking.
17420 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17421 sys/file.h and malloc.h.
17422 (AC_CHECK_DECLS): Add perror.
17423 (srv_mingwce): Handle.
17424 * configure.srv (i[34567]86-*-cygwin*): Add
17425 win32-i386-low.o to srv_tgtobj.
17426 (i[34567]86-*-mingw*): Likewise.
17427 (arm*-*-mingw32ce*): Add case.
17428 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17429 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17430 [__MINGW32CE__] (strerror): New function.
17431 [__MINGW32CE__] (errno): Define to GetLastError.
17432 [__MINGW32CE__] (COUNTOF): New macro.
17433 (remote_open): Remove extra close call.
17434 * mem-break.c (delete_breakpoint_at): New function.
17435 * mem-break.h (delete_breakpoint_at): Declare.
17436 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17437 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17438 [USE_WIN32API] (read, write): Add char* casts.
17439 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17440 * server.h: Include wincecompat.h on Windows CE.
17441 [HAVE_ERRNO_H]: Check.
17442 (perror): Declare if not declared.
17443 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17444 (perror_with_name): Remove errno declaration.
17445 * wincecompat.h: New.
17446 * wincecompat.c: New.
17447 * win32-low.h: New.
17448 * win32-arm-low.c: New.
17449 * win32-i386-low.c: New.
17450 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17451 (OUTMSG2): Make it safe.
17453 (COUNTOF): New macro.
17454 (NUM_REGS): Get it from the low target.
17455 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17456 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17457 (thread_rec): Let low target handle debug registers.
17458 (child_add_thread): Likewise.
17459 (child_init_thread_list): Likewise.
17460 (continue_one_thread): Likewise.
17462 (do_child_fetch_inferior_registers): Move to ...
17463 * win32-i386-low.c: ... here, and rename to ...
17464 (do_fetch_inferior_registers): ... this.
17465 * win32-low.c (child_fetch_inferior_registers):
17466 Go through the low target.
17467 (do_child_store_inferior_registers): Use regptr.
17468 (strwinerror): New function.
17469 (win32_create_inferior): Handle Windows CE.
17470 Use strwinerror instead of strerror on Windows error
17471 codes. Add program to the error output.
17472 Don't close the main thread handle on Windows CE.
17473 (win32_attach): Use coredll.dll on Windows CE.
17474 (win32_kill): Close current process and current
17476 (win32_detach): Use coredll.dll on Windows CE.
17477 (win32_resume): Let low target handle debug registers, and
17479 (handle_exception): Add/Remove initial breakpoint. Avoid
17480 non-existant WSTOPSIG on Windows CE.
17481 (win32_read_inferior_memory): Cast to remove warning.
17482 (win32_arch_string): Go through the low target.
17483 (initialize_low): Call set_breakpoint_data with the low
17484 target's breakpoint.
17485 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17486 FOP_REGNUM, mappings): Move to ...
17487 * win32-i386-low.c: ... here.
17488 * win32-low.c (win32_thread_info): Move to ...
17489 * win32-low.h: ... here.
17490 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17491 win32-arm-low.c and wincecompat.c.
17492 (all:): Add $EXEEXT.
17493 (install-only:): Likewise.
17494 (gdbserver:): Likewise.
17495 (gdbreplay:): Likewise.
17496 * config.in: Regenerate.
17497 * configure: Regenerate.
17499 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17501 * win32-low.c: Rename typedef thread_info to
17502 win32_thread_info throughout.
17504 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17506 * win32-i386-low.c: Rename to ...
17507 * win32-low.c: ... this.
17508 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17509 * Makefile.in: Likewise.
17511 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17513 * remote-utils.c (monitor_output): Constify msg parameter.
17514 * server.h (monitor_output): Likewise.
17515 * win32-i386-low.c (handle_output_debug_string): New.
17516 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17517 handle_output_debug_string.
17518 (get_child_debug_event): Likewise.
17520 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17522 * server.c (main): Correct strtoul check.
17524 2007-03-27 Jon Ringle <jon@ringle.org>
17526 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17528 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17530 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17532 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17534 * terminal.h: Check HAVE_SGTTY_H.
17536 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17538 * remote-utils.c (remote_open): Print out the assigned port number.
17540 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17542 * remote-utils.c (monitor_output): New function.
17543 * server.c (debug_threads): Define here.
17544 (monitor_show_help): New function.
17545 (handle_query): Handle qRcmd.
17546 (main): Do not handle 'd' packet.
17547 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17548 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17551 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17553 * Makefile.in (EXEEXT): New.
17554 (clean): Use $(EXEEXT).
17556 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17558 * target.h (target_ops): Rename send_signal to request_interrupt,
17559 and remove enum target_signal parameter.
17560 * linux-low.c (linux_request_interrupt): Rename from
17561 linux_send_signal, and always send SIGINT.
17562 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17563 and always send SIGINT.
17564 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17566 (input_interrupt): Likewise.
17568 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17570 * server.c (get_features_xml): Check if target implemented
17572 * win32-i386-low.c (win32_arch_string): New.
17573 (win32_target_ops): Add win32_arch_string as arch_string member.
17575 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17577 * spu-low.c (spu_arch_string): New.
17578 (spu_target_ops): Add spu_arch_string.
17580 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17582 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17583 * configure.ac: Do not check for terminal.h.
17584 * configure, config.in: Regenerated.
17586 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17588 * Makefile.in (OBS): Add $(XML_BUILTIN).
17589 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17591 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17592 (arm-with-iwmmxt.c): New.
17593 * config.in, configure: Regenerate.
17594 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17595 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17596 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17597 (arm*-*-linux*): Add iWMMXt and regset support.
17598 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17599 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17600 (arm_store_wmmxregset, target_regsets): New.
17601 * server.c (get_features_xml): Take annex argument. Check builtin
17603 (handle_query): Handle multiple annexes.
17605 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17607 * remote-utils.c [USE_WIN32API] (read, write): Define.
17608 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17611 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17613 * linux-i386-low.c (the_low_target): Set arch_string.
17614 * linux-x86-64-low.c (the_low_target): Likewise.
17615 * linux-low.c (linux_arch_string): New.
17616 (linux_target_ops): Add it.
17617 * linux-low.h (struct linux_target_ops): Add arch_string.
17618 * server.c (write_qxfer_response): Use const void * for DATA.
17619 (get_features_xml): New.
17620 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17621 * target.h (struct target_ops): Add arch_string method.
17623 2007-01-03 Denis Pilat <denis.pilat@st.com>
17624 Daniel Jacobowitz <dan@codesourcery.com>
17626 * linux-low.c (linux_kill): Handle being called with no threads.
17627 * win32-i386-low.c (win32_kill): Likewise.
17628 (get_child_debug_event): Clear current_process_handle.
17630 2006-12-30 Denis PILAT <denis.pilat@st.com>
17631 Daniel Jacobowitz <dan@codesourcery.com>
17633 * remote-utils.c (remote_open): Check the type of specified
17634 serial port devices before opening them.
17635 * server.c (main): Kill the inferior if an error occurs during
17636 the first remote_open.
17638 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17640 * README: Update supported targets.
17642 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17644 * Makefile.in (clean): Remove reg-mips64.c.
17645 (reg-mips64.c, reg-mips64.o): New rules.
17646 * configure.srv: Handle mips64. Include regset support for mips.
17647 * linux-mips-low.c (union mips_register): New.
17648 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17649 (mips_breakpoint, mips_breakpoint_at): Use int.
17650 (mips_collect_register, mips_supply_register)
17651 (mips_collect_register_32bit, mips_supply_register_32bit)
17652 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17653 (mips_store_fpregset, target_regsets): New.
17654 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17656 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17658 * configure.srv: Add target "spu*-*-*".
17659 * Makefile.in (clean): Remove reg-spu.c.
17660 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17661 * spu-low.c: New file.
17663 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17665 * configure.ac: Correct td_thr_tls_get_addr test.
17666 * configure: Regenerated.
17668 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17670 * linux-low.c (linux_wait_for_event): Reformat. Use the
17671 pass_signals array.
17672 * remote-utils.c (decode_address_to_semicolon): New.
17673 * server.c (pass_signals, handle_general_set): New.
17674 (handle_query): Mention QPassSignals for qSupported.
17675 (main): Call handle_general_set.
17676 * server.h (pass_signals, decode_address_to_semicolon): New.
17678 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17680 * server.c (handle_query): Correct error handling for read_auxv.
17682 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17684 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17685 and srv_linux_thread_db to yes.
17686 * linux-s390-low.c (s390_fill_gregset): New function.
17687 (target_regsets): Define data structure.
17689 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17691 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17692 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17693 * config.in, configure: Regenerated.
17694 * inferiors.c (gdb_id_to_thread): New function.
17695 (gdb_id_to_thread_id): Use it.
17696 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17697 * linux-low.h (struct process_info): Add th member.
17698 (thread_db_get_tls_address): New prototype.
17699 * remote-utils.c (decode_address): Make non-static.
17700 * server.c (handle_query): Handle qGetTLSAddr.
17701 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17702 * target.h (struct target_ops): Add get_tls_address.
17703 * thread-db.c (maybe_attach_thread): Save the thread handle.
17704 (thread_db_get_tls_address): New.
17706 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17708 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17709 (linux_resume_one_process): Take a siginfo_t *. Update all
17710 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17711 (struct pending_signals): Add a siginfo_t.
17712 (linux_wait_for_process): Always set last_status.
17713 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17714 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17715 * linux-low.h (struct process_info): Add last_status.
17717 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17719 * remote-utils.c (try_rle): New function.
17720 (putpkt_binary): Use it.
17722 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17724 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17725 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17726 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17727 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17728 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17731 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17733 * server.c (terminal_fd): New variable.
17734 (old_foreground_pgrp): Likewise.
17735 (restore_old_foreground_pgrp): New function.
17736 (start_inferior): Record the terminal file descriptor in terminal_fd
17737 and its original foreground group in old_foreground_pgrp. Register
17738 restore_old_foreground_pgrp with atexit().
17740 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17742 * server.c (handle_query): Correct qPart to qXfer.
17744 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17746 * configure.ac: Check for more headers which are missing on
17747 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17748 * configure.srv: Add Cygwin and mingw32.
17749 * remote-utils.c: Don't include headers unconditionally which
17750 are missing on mingw32. Include <winsock.h> for mingw32.
17751 (remote_open): Adjust for mingw32 support. Flush
17752 standard error after writing to it.
17753 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17754 (unblock_async_io, enable_async_io, disable_async_io)
17755 (readchar, getpkt): Update for Winsock support.
17756 (prepare_resume_reply): Expect a protocol signal number.
17757 * server.c: Disable <sys/wait.h> on mingw32.
17758 (start_inferior): Adjust for mingw32 support. Flush
17759 standard error after writing to it.
17760 (attach_inferior): Likewise. Use protocol signal
17762 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17764 * win32-i386-low.c: New file.
17765 * Makefile.in (XM_CLIBS): Set.
17766 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17767 (win32-i386-low.o): New dependency rule.
17768 * linux-low.c (linux_wait): Use target signal numbers.
17769 * target.h (struct target_ops): Doc fix.
17770 * server.h (target_signal_to_name): New prototype.
17771 * gdbreplay.c: Don't include headers unconditionally which
17772 are missing on mingw32. Include <winsock.h> for mingw32.
17773 (remote_close, remote_open): Adjust for Winsock support.
17774 * configure, config.in: Regenerated.
17776 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17778 * server.c (decode_xfer_read, write_qxfer_response): New.
17779 (handle_query): Take a packet length argument. Handle
17780 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17781 the qSupported response.
17782 (main): Update call to handle_query.
17784 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17786 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17787 (putpkt_binary): Renamed from putpkt and adjusted for binary
17789 (putpkt): New wrapper for putpkt_binary.
17790 (readchar): Don't mask off the high bit.
17791 (decode_X_packet): New function.
17792 * server.c (main): Call putpkt_binary if a handler sets the packet
17793 length. Save the length of the incoming packet. Handle 'X'.
17794 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17796 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17798 * server.c (handle_query): Handle qSupported.
17800 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17802 * remote-utils.c (all_symbols_looked_up): New variable.
17803 (look_up_one_symbol): Check it.
17804 * server.h (look_up_one_symbol): New declaration.
17805 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17807 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17809 * Makefile.in (linux-arm-low.o): Update dependencies.
17810 * linux-arm-low.c: Include "gdb_proc_service.h".
17811 (PTRACE_GET_THREAD_AREA): Define.
17812 (ps_get_thread_area): New function.
17814 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17816 * configure.srv (m68k*-*-uclinux*): New target.
17817 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17818 (linux_resume_one_process): Remove extraneous cast.
17819 (linux_read_offsets): New.
17820 (linux_target_op): Add linux_read_offsets on mmuless systems.
17821 * server.c (handle_query): Add qOffsets logic.
17822 * target.h (struct target_ops): Add read_offsets.
17824 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17826 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17827 (PTRACE_GET_THREAD_AREA): Define.
17828 (ps_get_thread_area): New function.
17829 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17830 (linux-x86-64-low.o): Update.
17832 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17834 * configure.ac: Remove checks for prfpregset_t.
17835 * gdb_proc_service.h: New file.
17836 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17837 new "gdb_proc_service.h".
17838 * proc-service.c: Likewise.
17839 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17840 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17841 * Makefile.in (gdb_proc_service_h): Updated.
17842 * configure, config.in: Regenerated.
17844 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17846 * remote-utils.c (prepare_resume_reply): Move declaration
17847 of gdb_id_from_wait to the top of the block.
17849 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17851 * linux-low.c (regsets_store_inferior_registers): Read the regset
17852 from the target before filling it.
17854 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17856 * server.c (attach_inferior): Return SIGTRAP for a successful
17859 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17861 * Makefile.in (OBS): Add version.o.
17862 (STAGESTUFF): Delete.
17863 (version.o): Add dependencies.
17864 (version.c): Replace rule.
17865 (clean): Remove version.c.
17866 * server.c (gdbserver_version): New.
17867 (gdbserver_usage): Use printf.
17868 (main): Handle --version and --help.
17869 * server.h (version, host_name): Add declarations.
17871 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17883 * linux-x86-64-low.c:
17885 * linux-s390-low.c:
17886 * linux-ppc64-low.c:
17888 * linux-mips-low.c:
17889 * linux-m68k-low.c:
17890 * linux-m32r-low.c:
17893 * linux-ia64-low.c:
17894 * linux-i386-low.c:
17895 * linux-crisv32-low.c:
17907 * gdbserver.1: Add (C) after Copyright. Update the FSF
17910 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17912 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17913 (arm_breakpoint_at): Recognize both breakpoints.
17914 (the_low_target): Use the correct breakpoint instruction.
17916 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17918 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17919 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17920 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17921 (the_low_target): Update.
17923 2005-10-25 Andreas Schwab <schwab@suse.de>
17925 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17927 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17928 (ia64_num_regs): Reduce to 462.
17930 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17932 * acinclude.m4: Correct quoting.
17933 * aclocal.m4: Regenerated.
17935 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17936 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17937 (thread_db_init): Call thread_db_err_str.
17938 * configure.ac: Check for TD_VERSION.
17939 * config.in, configure: Regenerated.
17941 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17943 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17945 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17947 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17948 is not available. Define HAVE_PTRACE_GETREGS if it is.
17949 * config.in, configure: Regenerated.
17950 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17951 * linux-i386-low.c, linux-m68k-low.c: Update to use
17952 HAVE_PTRACE_GETREGS.
17953 * linux-low.c (regsets_fetch_inferior_registers)
17954 (regsets_store_inferior_registers): Only return 0 if we processed
17956 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17957 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17959 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17961 * inferiors.c (struct thread_info): Add gdb_id.
17962 (add_thread): Add gdb_id argument.
17963 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17964 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17965 calls to add_thread.
17966 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17967 * server.c (handle_query): Use thread_to_gdb_id.
17968 (handle_v_cont, main): Use gdb_id_to_thread_id.
17969 * server.h (add_thread): Update prototype.
17970 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17973 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17975 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17976 left-padded registers.
17977 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17978 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17980 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17982 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17983 * configure: Regenerate.
17984 * config.in: Regenerate.
17985 * server.h (NEED_DECLARATION_STRERROR):
17986 Replace with !HAVE_DECL_STRERROR.
17988 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17990 * linux-low.c (linux_wait, linux_send_signal): Don't test
17991 an unsigned long variable for > 0 if it could be MAX_ULONG.
17992 * server.c (myresume): Likewise.
17993 * target.c (set_desired_inferior): Likewise.
17995 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17997 * configure.ac: Simplify and improve check for socklen_t.
17998 * configure, config.in: Regenerate.
18000 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18002 * acconfig.h: Remove.
18003 * configure.ac: Add a test for socklen_t. Use three-argument
18004 AC_DEFINE throughout.
18005 * config.in: Regenerated using autoheader 2.59.
18006 * configure: Regenerated.
18008 * gdbreplay.c (socklen_t): Provide a default.
18009 (remote_open): Use socklen_t.
18010 * remote-utils.c (socklen_t): Provide a default.
18011 (remote_open): Use socklen_t.
18012 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18015 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18017 * linux-low.c (linux_read_memory, linux_write_memory)
18018 (linux_read_auxv): Likewise.
18019 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18020 (check_mem_write): Likewise.
18021 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18023 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18024 (registers_from_string, register_data): Likewise.
18025 * server.c (handle_query, main): Likewise.
18026 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18027 (decode_M_packet): Likewise.
18028 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18029 * target.h (struct target_ops): Update read_memory, write_memory,
18031 (read_inferior_memory, write_inferior_memory): Update.
18032 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18033 to unsigned char *.
18034 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18035 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18036 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18037 linux-s390-low.c, linux-sh-low.c: Update for changes in
18038 read_inferior_memory and the_low_target->breakpoint.
18040 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18042 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18043 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18044 * configure.srv: Add powerpc64-*-linux*.
18045 * linux-ppc64-low.c: New file.
18047 2005-05-23 Orjan Friberg <orjanf@axis.com>
18049 * linux-cris-low.c: New file with support for CRIS.
18050 * linux-crisv32-low.c: Ditto for CRISv32.
18051 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18052 (clean): Add reg-cris.c and reg-crisv32.c.
18053 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18054 reg-crisv32.o, and reg-crisv32.c to make rules.
18055 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18056 recognized targets.
18058 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18060 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18061 of sizeof (PTRACE_XFER_TYPE).
18062 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18064 2005-05-12 Orjan Friberg <orjanf@axis.com>
18066 * target.h (struct target_ops): Add insert_watchpoint,
18067 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18068 pointers for hardware watchpoint support.
18069 * linux-low.h (struct linux_target_ops): Ditto.
18070 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18071 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18072 to linux_target_ops.
18073 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18075 * server.c (main): Recognize 'Z' and 'z' packets.
18077 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18079 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18080 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18081 (the_low_target): Add new members.
18083 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18085 * proc-service.c (ps_lgetregs): Search all_processes instead of
18088 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18090 * server.c (start_inferior): Change return type to int.
18091 (attach_inferior): Change sigptr to int *.
18092 (handle_v_cont, handle_v_requests): Change signal to int *.
18093 (main): Change signal to int.
18095 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18097 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18098 * configure.srv: Add m32r*-*-linux*.
18099 * linux-m32r-low.c: New file.
18101 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18103 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18105 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18107 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18108 Take unsigned long arguments for PIDs.
18109 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18110 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18111 (wait_for_sigstop, linux_resume_one_process)
18112 (regsets_fetch_inferior_registers, linux_send_signal)
18113 (linux_read_auxv): Likewise. Update the types of variables holding
18114 PIDs. Update format string specifiers.
18115 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18116 * remote-utils.c (prepare_resume_reply): Likewise.
18117 * server.c (cont_thread, general_thread, step_thread)
18118 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18120 (handle_query): Update format specifiers.
18121 (handle_v_cont, main): Use strtoul for thread IDs.
18122 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18123 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18124 (general_thread, step_thread, thread_from_wait)
18125 (old_thread_from_wait): Update.
18126 * target.h (struct thread_resume): Use unsigned long for THREAD.
18127 (struct target_ops): Use unsigned long for arguments to attach and
18130 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18132 * acinclude.m4: Include bfd/bfd.m4 directly.
18133 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18134 <agriffis@toolchain.org>.
18135 * aclocal.m4, configure: Regenerated.
18137 2005-01-07 Andrew Cagney <cagney@gnu.org>
18139 * configure.ac: Rename configure.in, require autoconf 2.59.
18140 * configure: Re-generate.
18142 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18144 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18145 LIBS when finished.
18146 * aclocal.m4: Regenerated.
18147 * configure: Regenerated.
18149 2004-11-21 Andreas Schwab <schwab@suse.de>
18151 * linux-m68k-low.c (m68k_num_gregs): Define.
18152 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18153 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18154 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18155 (m68k_breakpoint_at): New. Add to the_low_target.
18157 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18158 srv_linux_thread_db to yes.
18160 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18162 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18163 (ARCH_SET_FS): Likewise.
18164 (ARCH_GET_FS): Likewise.
18165 (ARCH_GET_GS): Likewise.
18167 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18169 * linux-i386-low.c (ps_get_thread_area): New.
18170 * linux-x86-64-low.c (ps_get_thread_area): New.
18171 * linux-low.c: Include <sys/syscall.h>.
18172 (linux_kill_one_process): Don't kill the first thread here.
18173 (linux_kill): Kill the first thread here.
18174 (kill_lwp): New function.
18175 (send_sigstop, linux_send_signal): Use it.
18176 * proc-service.c: Clean up #ifdefs.
18177 (fpregset_info): Delete.
18178 (ps_lgetregs): Update and enable implementation.
18179 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18181 * remote-utils.c (struct sym_cache, symbol_cache): New.
18182 (input_interrupt): Print a clearer message.
18183 (async_io_enabled): New variable.
18184 (enable_async_io, disable_async_io): Use it. Update comments.
18185 (look_up_one_symbol): Use the symbol cache.
18186 * thread-db.c (thread_db_look_up_symbols): New function.
18187 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18189 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18191 * configure.in: Test for -rdynamic.
18192 * configure: Regenerated.
18193 * Makefile (INTERNAL_LDFLAGS): New.
18194 (gdbserver, gdbreplay): Use it.
18196 2004-09-02 Andrew Cagney <cagney@gnu.org>
18198 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18200 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18202 * linux-low.c (linux_wait): Clear all_processes list also.
18204 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18206 * linux-low.c: Include <errno.h>. Remove extern declaration of
18209 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18211 * gdbreplay.c, server.h, utils.c: Update copyright years.
18213 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18215 * server.c (main): Print child status or termination signal from
18216 variable 'signal', not 'sig'.
18218 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18220 * linux-low.c (linux_read_memory): Change return type to
18221 int. Check for and return error from ptrace().
18222 * target.c (read_inferior_memory): Change return type to int. Pass
18223 back return status from the_target->read_memory().
18224 * target.h (struct target_ops): Adapt *read_memory() prototype.
18226 (read_inferior_memory): Adapt prototype.
18227 * server.c (main): Return an error packet if
18228 read_inferior_memory() returns an error.
18230 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18232 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18233 Unify with other clean targets.
18235 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18237 * server.c (handle_v_cont): Call set_desired_inferior.
18239 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18241 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18243 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18245 * linux-low.c (linux_wait): Unblock async I/O.
18246 (linux_resume): Block and enable async I/O.
18247 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18248 * server.h (block_async_io, unblock_async_io): Add prototypes.
18250 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18252 * remote-utils.c (remote_open): Print a status notice after
18253 opening a TCP port.
18254 * server.c (attach_inferior): Print a status notice after
18257 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18259 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18261 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18263 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18265 * server.c, target.h: Update copyright years.
18267 2004-02-25 Roland McGrath <roland@redhat.com>
18269 * target.h (struct target_ops): New member `read_auxv'.
18270 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18271 * linux-low.c (linux_read_auxv): New function.
18272 (linux_target_ops): Initialize `read_auxv' member to that.
18274 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18276 Committed by Jim Blandy <jimb@redhat.com>.
18278 * linux-s390-low.c (s390_num_regs): Update.
18279 (s390_regmap): Remove control registers. Use __s390x__ predefine
18280 instead of GPR_SIZE to distiguish s390 and s390x targets.
18282 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18284 * linux-low.c: Update copyright year.
18285 (check_removed_breakpoint): Clear pending_is_breakpoint.
18286 (linux_set_resume_request, linux_queue_one_thread)
18287 (resume_status_pending_p): New functions.
18288 (linux_continue_one_thread): Use process->resume.
18289 (linux_resume): Only resume threads if there are no pending events.
18290 * linux-low.h (struct process_info): Add resume request
18293 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18295 * regcache.c (new_register_cache): Clear the allocated register
18296 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18298 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18300 * linux-low.c (linux_resume): Take a struct thread_resume *
18302 (linux_wait): Update call.
18303 (resume_ptr): New static variable.
18304 (linux_continue_one_thread): Renamed from
18305 linux_continue_one_process. Use resume_ptr.
18306 (linux_resume): Use linux_continue_one_thread.
18307 * server.c (handle_v_cont, handle_v_requests): New functions.
18308 (myresume): New function.
18309 (main): Handle 'v' case.
18310 * target.h (struct thread_resume): New type.
18311 (struct target_ops): Change argument of "resume" to struct
18313 (myresume): Delete macro.
18315 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18317 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18318 (uninstall): Support DESTDIR.
18320 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18322 * configure.srv: Add xscale*linux copy of arm*linux entry.
18324 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18326 * linux-arm-low.c (arm_reinsert_addr): New function.
18327 (the_low_target): Add arm_reinsert_addr.
18329 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18331 * mem-break.c: Remove whitespace at end of file.
18333 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18335 * configure.in: Check whether we need to prototype strerror.
18336 * server.h: Optionally prototype strerror.
18337 * gdbreplay.c (perror_with_name): Use strerror.
18338 * linux-low.c (linux_attach_lwp): Use strerror.
18339 * utils.c (perror_with_name): Use strerror.
18340 * config.in, configure: Regenerated.
18342 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18344 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18345 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18347 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18349 * Makefile.in (SFILES): Update.
18350 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18351 low-sun3.c: Remove files.
18353 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18355 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18356 (linux_detach_one_process, linux_detach): New functions.
18357 (linux_target_ops): Add linux_detach.
18358 * server.c (main): Handle 'D' packet.
18359 * target.h (struct target_ops): Add "detach" member.
18360 (detach_inferior): Define.
18362 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18364 From Kelley Cook <kelleycook@wideopenwest.com>:
18365 * configure.srv: Accept i[34567]86 variants.
18367 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18369 * linux-low.c (linux_wait_for_event): Correct comment typos.
18370 (linux_resume_one_process): Call check_removed_breakpoint.
18371 (linux_send_signal): New function.
18372 (linux_target_ops): Add linux_send_signal.
18373 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18375 * target.h (struct target_ops): Add send_signal.
18377 2003-05-29 Jim Blandy <jimb@redhat.com>
18379 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18380 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18381 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18382 away part of the register's value.
18384 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18386 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18387 (linux_wait_for_event, linux_init_signals): Likewise.
18389 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18391 * configure.in: Check for stdlib.h.
18392 * configure: Regenerated.
18393 * config.in: Regenerated.
18395 2003-01-04 Andreas Schwab <schwab@suse.de>
18397 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18399 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18401 * Makefile.in: Remove obsolete code.
18403 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18405 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18406 defined(PT_FPR0_HI).
18408 2002-11-17 Stuart Hughes <seh@zee2.com>
18410 * linux-arm-low.c (arm_num_regs): Increase.
18411 (arm_regmap): Include status register.
18413 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18415 * linux-low.c (register_addr): Remove incorrect -1 check.
18417 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18419 * linux-low.c (linux_create_inferior): Call setpgid. Return
18421 (unstopped_p, linux_signal_pid): Remove.
18422 (linux_target_ops): Remove linux_signal_pid.
18423 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18424 global instead of target method.
18425 * target.h (struct target_ops): Remove signal_pid. Update comment
18426 for create_inferior.
18427 * server.c (signal_pid): New variable.
18428 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18429 gdbserver. Set the child to be the foreground process group.
18430 (attach_inferior): Set signal_pid.
18432 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18434 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18436 2002-08-20 Jim Blandy <jimb@redhat.com>
18438 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18441 2002-08-01 Andrew Cagney <cagney@redhat.com>
18443 * Makefile.in: Make chill references obsolete.
18445 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18447 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18448 * configure: Regenerate.
18449 * config.in: Regenerate.
18451 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18453 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18454 (perror_with_name, remote_close, remote_open, expect, play): Static.
18456 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18458 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18459 byte offsets instead of an array of indexes.
18460 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18462 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18464 * regcache.c: Add comment.
18466 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18468 * thread-db.c: New file.
18469 * proc-service.c: New file.
18470 * acinclude.m4: New file.
18471 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18472 proc-service.o, and thread-db.o.
18473 (linux-low.o): Add USE_THREAD_DB.
18474 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18475 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18476 * aclocal.m4: Regenerated.
18477 * config.in: Regenerated.
18478 * configure: Regenerated.
18479 * configure.in: Check for proc_service.h, sys/procfs.h,
18480 thread_db.h, and linux/elf.h headrs.
18481 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18482 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18483 Check for -lthread_db and thread support.
18484 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18485 PowerPC, and SuperH.
18486 * i387-fp.c: Constify arguments.
18487 * i387-fp.h: Likewise.
18488 * inferiors.c: (struct thread_info): Renamed from
18489 `struct inferior_info'. Remove PID member. Use generic inferior
18490 list header. All uses updated.
18491 (inferiors, signal_pid): Removed.
18492 (all_threads): New variable.
18493 (get_thread): Define.
18494 (add_inferior_to_list): New function.
18495 (for_each_inferior): New function.
18496 (change_inferior_id): New function.
18497 (add_inferior): Removed.
18498 (remove_inferior): New function.
18499 (add_thread): New function.
18500 (free_one_thread): New function.
18501 (remove_thread): New function.
18502 (clear_inferiors): Use for_each_inferior and free_one_thread.
18503 (find_inferior): New function.
18504 (find_inferior_id): New function.
18505 (inferior_target_data): Update argument type.
18506 (set_inferior_target_data): Likewise.
18507 (inferior_regcache_data): Likewise.
18508 (set_inferior_regcache_data): Likewise.
18509 * linux-low.c (linux_bp_reinsert): Remove.
18510 (all_processes, stopping_threads, using_thrads)
18511 (struct pending_signals, debug_threads, pid_of): New.
18512 (inferior_pid): Replace with macro.
18513 (struct inferior_linux_data): Remove.
18514 (get_stop_pc, add_process): New functions.
18515 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18516 Use add_process and add_thread.
18517 (linux_attach_lwp): New function, based on old linux_attach. Use
18518 add_process and add_thread. Set stop_expected for new threads.
18519 (linux_attach): New function.
18520 (linux_kill_one_process): New function.
18521 (linux_kill): Kill all LWPs.
18522 (linux_thread_alive): Use find_inferior_id.
18523 (check_removed_breakpoints, status_pending_p): New functions.
18524 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18525 Update. Use WNOHANG. Wait for cloned processes also. Update process
18526 struct for the found process.
18527 (linux_wait_for_event): New function.
18528 (linux_wait): Use it. Support LWPs.
18529 (send_sigstop, wait_for_sigstop, stop_all_processes)
18530 (linux_resume_one_process, linux_continue_one_process): New functions.
18531 (linux_resume): Support LWPs.
18532 (REGISTER_RAW_SIZE): Remove.
18533 (fetch_register): Use register_size instead. Call supply_register.
18534 (usr_store_inferior_registers): Likewise. Call collect_register.
18535 Fix recursive case.
18536 (regsets_fetch_inferior_registers): Improve error message.
18537 (regsets_store_inferior_registers): Add debugging.
18538 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18539 (unstopped_p, linux_signal_pid): New functions.
18540 (linux_target_ops): Add linux_signal_pid.
18541 (linux_init_signals): New function.
18542 (initialize_low): Call it. Initialize using_threads.
18543 * regcache.c (inferior_regcache_data): Add valid
18545 (get_regcache): Fetch registers lazily. Add fetch argument
18546 and update all callers.
18547 (regcache_invalidate_one, regcache_invalidate): New
18549 (new_register_cache): Renamed from create_register_cache.
18550 Return the new regcache.
18551 (free_register_cache): Change argument to a void *.
18552 (registers_to_string, registers_from_string): Call get_regcache
18553 with fetch flag set.
18554 (register_data): Make static. Pass fetch flag to get_regcache.
18555 (supply_register): Call get_regcache with fetch flag clear.
18556 (collect_register): Call get_regcache with fetch flag set.
18557 (collect_register_as_string): New function.
18558 * regcache.h: Update.
18559 * remote-utils.c (putpkt): Flush after debug output and use
18561 Handle input interrupts while waiting for an ACK.
18562 (input_interrupt): Use signal_pid method.
18563 (getpkt): Flush after debug output and use stderr.
18564 (outreg): Use collect_register_as_string.
18565 (new_thread_notify, dead_thread_notify): New functions.
18566 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18567 and general_thread.
18568 (look_up_one_symbol): Flush after debug output.
18569 * server.c (step_thread, server_waiting): New variables.
18570 (start_inferior): Don't use signal_pid. Update call to mywait.
18571 (attach_inferior): Update call to mywait.
18572 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18573 (main): Don't fetch/store registers explicitly. Use
18574 set_desired_inferior. Support proposed ``Hs'' packet. Update
18576 * server.h: Update.
18577 (struct inferior_list, struct_inferior_list_entry): New.
18578 * target.c (set_desired_inferior): New.
18579 (write_inferior_memory): Constify.
18580 (mywait): New function.
18581 * target.h: Update.
18582 (struct target_ops): New signal_pid method.
18583 (mywait): Removed macro, added prototype.
18585 * linux-low.h (regset_func): Removed.
18586 (regset_fill_func, regset_store_func): New.
18587 (enum regset_type): New.
18588 (struct regset_info): Add type field. Use new operation types.
18589 (struct linux_target_ops): stop_pc renamed to get_pc.
18590 Add decr_pc_after_break and breakpoint_at.
18591 (get_process, get_thread_proess, get_process_thread)
18592 (strut process_info, all_processes, linux_attach_lwp)
18593 (thread_db_init): New.
18595 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18596 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18597 (the_low_target): Add new members.
18598 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18599 (i386_store_fpxregset): Constify.
18600 (target_regsets): Add new kind identifier.
18601 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18602 (i386_set_pc): Add debugging.
18603 (i386_breakpoint_at): New function.
18604 (the_low_target): Add new members.
18605 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18606 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18607 (mips_breakpoint_at): New.
18608 (the_low_target): Add new members.
18609 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18610 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18611 (the_low_target): Add new members.
18612 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18613 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18614 (the_low_target): Add new members.
18615 * linux-x86-64-low.c (target_regsets): Add new kind
18618 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18620 From Martin Pool <mbp@samba.org>:
18621 * server.c (gdbserver_usage): New function.
18624 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18626 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18627 stop_at -> stop_pc.
18629 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18631 * Makefile.in: Remove obsolete code.
18633 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18635 * linux-low.c (regsets_fetch_inferior_registers),
18636 (regsets_store_inferior_registers): Removed cast to int from
18638 * regcache.h: Added declaration of struct inferior_info.
18640 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18642 * inferiors.c (struct inferior_info): Add regcache_data.
18643 (add_inferior): Call create_register_cache.
18644 (clear_inferiors): Call free_register_cache.
18645 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18646 * regcache.c (struct inferior_regcache_data): New.
18647 (registers): Remove.
18648 (get_regcache): New function.
18649 (create_register_cache, free_register_cache): New functions.
18650 (set_register_cache): Don't initialize the register cache here.
18651 (registers_to_string, registers_from_string, register_data): Call
18653 * regcache.h: Add prototypes.
18654 * server.h: Likewise.
18656 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18658 * mem-break.c: New file.
18659 * mem-break.h: New file.
18660 * Makefile.in: Add mem-break.o rule; update server.h
18662 * inferiors.c (struct inferior_info): Add target_data
18664 (clear_inferiors): Free target_data member if set.
18665 (inferior_target_data, set_inferior_target_data): New functions.
18666 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18667 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18668 * linux-low.c (linux_bp_reinsert): New variable.
18669 (struct inferior_linux_data): New.
18670 (linux_create_inferior): Use set_inferior_target_data.
18671 (linux_attach): Likewise. Call add_inferior.
18672 (linux_wait_for_one_inferior): New function.
18673 (linux_wait): Call it.
18674 (linux_write_memory): Add const.
18675 (initialize_low): Call set_breakpoint_data.
18676 * linux-low.h (struct linux_target_ops): Add breakpoint
18678 * server.c (attach_inferior): Remove extra add_inferior
18680 * server.h: Include mem-break.h. Update inferior.c
18682 * target.c (read_inferior_memory)
18683 (write_inferior_memory): New functions.
18684 * target.h (read_inferior_memory)
18685 (write_inferior_memory): Change macros to prototypes.
18686 (struct target_ops): Update comments. Add const to write_memory
18689 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18691 * linux-low.c (usr_store_inferior_registers): Support
18692 registers which are allowed to fail to store.
18693 * linux-low.h (linux_target_ops): Likewise.
18694 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18695 (ppc_cannot_store_register): FPSCR may not be storable.
18697 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18699 * server.h: Include <string.h> if HAVE_STRING_H.
18700 * ChangeLog: Correct paths in last ChangeLog entry.
18702 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18704 * linux-low.h: Remove obsolete prototypes.
18705 (struct linux_target_ops): New.
18706 (extern the_low_target): New.
18707 * linux-low.c (num_regs, regmap): Remove declarations.
18708 (register_addr): Use the_low_target explicitly.
18709 (fetch_register): Likewise.
18710 (usr_fetch_inferior_registers): Likewise.
18711 (usr_store_inferior_registers): Likewise.
18712 * linux-arm-low.c (num_regs): Remove.
18713 (arm_num_regs): Define.
18714 (arm_regmap): Renamed from regmap, made static.
18715 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18717 (arm_cannot_store_register): Renamed from cannot_store_register,
18719 (the_low_target): New.
18720 * linux-i386-low.c (num_regs): Remove.
18721 (i386_num_regs): Define.
18722 (i386_regmap): Renamed from regmap, made static.
18723 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18725 (i386_cannot_store_register): Renamed from cannot_store_register,
18727 (the_low_target): New.
18728 * linux-ia64-low.c (num_regs): Remove.
18729 (ia64_num_regs): Define.
18730 (ia64_regmap): Renamed from regmap, made static.
18731 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18733 (ia64_cannot_store_register): Renamed from cannot_store_register,
18735 (the_low_target): New.
18736 * linux-m68k-low.c (num_regs): Remove.
18737 (m68k_num_regs): Define.
18738 (m68k_regmap): Renamed from regmap, made static.
18739 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18741 (m68k_cannot_store_register): Renamed from cannot_store_register,
18743 (the_low_target): New.
18744 * linux-mips-low.c (num_regs): Remove.
18745 (mips_num_regs): Define.
18746 (mips_regmap): Renamed from regmap, made static.
18747 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18749 (mips_cannot_store_register): Renamed from cannot_store_register,
18751 (the_low_target): New.
18752 * linux-ppc-low.c (num_regs): Remove.
18753 (ppc_num_regs): Define.
18754 (ppc_regmap): Renamed from regmap, made static.
18755 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18757 (ppc_cannot_store_register): Renamed from cannot_store_register,
18759 (the_low_target): New.
18760 * linux-s390-low.c (num_regs): Remove.
18761 (s390_num_regs): Define.
18762 (s390_regmap): Renamed from regmap, made static.
18763 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18765 (s390_cannot_store_register): Renamed from cannot_store_register,
18767 (the_low_target): New.
18768 * linux-sh-low.c (num_regs): Remove.
18769 (sh_num_regs): Define.
18770 (sh_regmap): Renamed from regmap, made static.
18771 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18773 (sh_cannot_store_register): Renamed from cannot_store_register,
18775 (the_low_target): New.
18776 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18777 (the_low_target): New.
18779 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18781 * Makefile.in: Add stamp-h target.
18782 * configure.in: Create stamp-h.
18783 * configure: Regenerated.
18785 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18787 * inferiors.c: New file.
18788 * target.c: New file.
18789 * target.h: New file.
18790 * Makefile.in: Add target.o and inferiors.o. Update
18792 * linux-low.c (inferior_pid): New static variable,
18793 moved from server.c.
18794 (linux_create_inferior): Renamed from create_inferior.
18795 Call add_inferior. Return 0 on success instead of a PID.
18796 (linux_attach): Renamed from myattach.
18797 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18798 (linux_thread_alive): Renamed from mythread_alive.
18799 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18801 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18802 (regsets_store_inferior_registers): Correct error message.
18803 Add missing ``return 0''.
18804 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18805 (linux_store_registers): Renamed from store_inferior_registers.
18806 (linux_read_memory): Renamed from read_inferior_memory.
18807 (linux_write_memory): Renamed from write_inferior_memory.
18808 (linux_target_ops): New structure.
18809 (initialize_low): Call set_target_ops ().
18810 * remote-utils.c (unhexify): New function.
18811 (hexify): New function.
18812 (input_interrupt): Send signals to ``signal_pid''.
18813 * server.c (inferior_pid): Remove.
18814 (start_inferior): Update create_inferior call.
18815 (attach_inferior): Call add_inferior.
18816 (handle_query): New function.
18817 (main): Call handle_query for `q' packets.
18818 * server.h: Include "target.h". Remove obsolete prototypes.
18819 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18821 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18823 * Makefile.in: Add WARN_CFLAGS. Update configury
18825 * configure.in: Check for <string.h>
18826 * configure: Regenerate.
18827 * config.in: Regenerate.
18828 * gdbreplay.c: Include needed system headers.
18829 (remote_open): Remove strchr prototype.
18830 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18831 * regcache.c (supply_register): Change buf argument to const void *.
18832 (supply_register_by_name): Likewise.
18833 (collect_register): Change buf argument to void *.
18834 (collect_register_by_name): Likewise.
18835 * regcache.h: Add missing prototypes.
18836 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18837 * server.c (handle_query): New function.
18838 (attached): New static variable, moved out of main.
18839 (main): Quiet longjmp clobber warnings.
18840 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18841 * utils.c (error): Remove NORETURN.