1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's qxfer_siginfo 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_siginfo'.
9 * target.cc (process_target::qxfer_siginfo): Define.
10 (process_target::supports_qxfer_siginfo): Define.
12 Update the derived classes and callers below.
14 * server.cc (handle_qxfer_siginfo): Update.
15 (handle_query): Update.
16 * linux-low.cc (linux_target_ops): Update.
17 (linux_process_target::supports_qxfer_siginfo): Define.
18 (linux_xfer_siginfo): Turn into ...
19 (linux_process_target::qxfer_siginfo): ... 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 qxfer_osdata op into a method of
30 * target.h (struct process_stratum_target): Remove the target op.
31 (class process_target): Add the target op. Also add
32 'supports_qxfer_osdata'.
33 * target.cc (process_target::qxfer_osdata): Define.
34 (process_target::supports_qxfer_osdata): Define.
36 Update the derived classes and callers below.
38 * server.cc (handle_qxfer_osdata): Update.
39 (handle_query): Update.
40 * linux-low.cc (linux_target_ops): Update.
41 (linux_process_target::supports_qxfer_osdata): Define.
42 (linux_qxfer_osdata): Turn into ...
43 (linux_process_target::qxfer_osdata): ... this.
44 * linux-low.h (class linux_process_target): Update.
45 * lynx-low.cc (lynx_target_ops): Update.
46 * nto-low.cc (nto_target_ops): Update.
47 * win32-low.cc (win32_target_ops): Update.
49 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
51 Turn process_stratum_target's hostio_last_error op into a
52 method of process_target.
54 * target.h (struct process_stratum_target): Remove the target op.
55 (class process_target): Add the target op.
56 * target.cc: Add "hostio.h" to includes.
57 (process_target::hostio_last_error): Define.
59 Update the derived classes and callers below.
61 * hostio.cc (hostio_error): Update.
62 * linux-low.cc: Remove "hostio.h" from includes.
63 (linux_target_ops): Update.
64 * lynx-low.cc (lynx_target_ops): Update.
65 * nto-low.cc (nto_target_ops): Update.
66 * win32-low.h (class win32_process_target): Update.
67 * win32-low.cc (win32_target_ops): Update.
68 (wince_hostio_last_error): Turn into ...
69 (win32_process_target::hostio_last_error): ... this.
71 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
73 Turn process_stratum_target's get_tls_address op into a method of
76 * target.h (struct process_stratum_target): Remove the target op.
77 (class process_target): Add the target op. Also add
78 'supports_get_tls_address'.
79 * target.cc (process_target::get_tls_address): Define.
80 (process_target::supports_get_tls_address): Define.
82 Update the derived classes and callers below.
84 * server.cc (handle_query): Update.
85 * linux-low.cc (linux_target_ops): Update.
86 (linux_process_target::supports_get_tls_address): Define.
87 (linux_process_target::get_tls_address): Define.
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 read_offsets op into a method of
98 * target.h (struct process_stratum_target): Remove the target op.
99 (class process_target): Add the target op. Also add
100 'supports_read_offsets'.
101 * target.cc (process_target::read_offsets): Define.
102 (process_target::supports_read_offsets): Define.
104 Update the derived classes and callers below.
106 * server.cc (handle_query): Update.
107 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
108 (linux_target_ops): Update.
109 (linux_process_target::supports_read_offsets): Define.
110 (linux_read_offsets): Turn into ...
111 (linux_process_target::read_offsets): ... this.
112 * linux-low.h (class linux_process_target): Update.
113 * lynx-low.cc (lynx_target_ops): Update.
114 * nto-low.cc (nto_target_ops): Update.
115 * win32-low.cc (win32_target_ops): Update.
117 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
119 Turn process_stratum_target's stopped_by_watchpoint and
120 stopped_data_address ops into methods of process_target.
122 * target.h (struct process_stratum_target): Remove the target ops.
123 (class process_target): Add the target ops.
124 * target.cc (process_target::stopped_by_watchpoint): Define.
125 (process_target::stopped_data_address): Define.
127 Update the derived classes and callers below.
129 * remote-utils.cc (prepare_resume_reply): Update.
130 * linux-low.cc (linux_target_ops): Update.
131 (linux_stopped_by_watchpoint): Turn into ...
132 (linux_process_target::stopped_by_watchpoint): ... this.
133 (linux_stopped_data_address): Turn into ...
134 (linux_process_target::stopped_data_address): ... this.
135 * linux-low.h (class linux_process_target): Update.
136 * lynx-low.cc (lynx_target_ops): Update.
137 * nto-low.cc (nto_target_ops): Update.
138 (nto_stopped_by_watchpoint): Turn into ...
139 (nto_process_target::stopped_by_watchpoint): ... this.
140 (nto_stopped_data_address): Turn into ...
141 (nto_process_target::stopped_data_address): ... this.
142 * nto-low.h (class nto_process_target): Update.
143 * win32-low.cc (win32_target_ops): Update.
144 (win32_stopped_by_watchpoint): Turn into ...
145 (win32_process_target::stopped_by_watchpoint): ... this.
146 (win32_stopped_data_address): Turn into ...
147 (win32_process_target::stopped_data_address): ... this.
148 * win32-low.h (class win32_process_target): Update.
150 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
152 Turn process_stratum_target's supports_hardware_single_step op into
153 a method of process_target.
155 * target.h (struct process_stratum_target): Remove the target op.
156 (class process_target): Add the target op.
157 (target_supports_hardware_single_step): Update the macro.
158 (target_can_do_hardware_single_step): Remove declaration.
159 * target.cc (process_target::supports_hardware_single_step): Define.
160 (target_can_do_hardware_single_step): Remove.
162 Update the derived classes and callers below.
164 * linux-low.h (class linux_process_target): Update.
165 * linux-low.cc (linux_target_ops): Update.
166 (linux_supports_hardware_single_step): Turn into ...
167 (linux_process_target::supports_hardware_single_step): ... this.
168 * lynx-low.h (class lynx_process_target): Update.
169 * lynx-low.cc (lynx_target_ops): Update.
170 (lynx_process_target::supports_hardware_single_step): Define.
171 * nto-low.h (class nto_process_target): Update.
172 * nto-low.cc (nto_target_ops): Update.
173 (nto_process_target::supports_hardware_single_step): Define.
174 * win32-low.h (class win32_process_target): Update.
175 * win32-low.cc (win32_target_ops): Update.
176 (win32_process_target::supports_hardware_single_step): Define.
178 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
180 Turn process_stratum_target's {supports_}stopped_by_hw_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_hw_breakpoint): Update the macro.
186 (target_supports_stopped_by_hw_breakpoint): Update the macro.
187 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
188 (process_target::supports_stopped_by_hw_breakpoint): Define.
190 Update the derived classes and callers below.
192 * linux-low.cc (linux_target_ops): Update.
193 (linux_stopped_by_hw_breakpoint): Turn into ...
194 (linux_process_target::stopped_by_hw_breakpoint): ... this.
195 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
196 (linux_process_target::supports_stopped_by_hw_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 {supports_}stopped_by_sw_breakpoint
205 ops 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_stopped_by_sw_breakpoint): Update the macro.
210 (target_supports_stopped_by_sw_breakpoint): Update the macro.
211 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
212 (process_target::supports_stopped_by_sw_breakpoint): Define.
214 Update the derived classes and callers below.
216 * linux-low.cc (linux_target_ops): Update.
217 (linux_stopped_by_sw_breakpoint): Turn into ...
218 (linux_process_target::stopped_by_sw_breakpoint): ... this.
219 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
220 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
221 * linux-low.h (class linux_process_target): Update.
222 * lynx-low.cc (lynx_target_ops): Update.
223 * nto-low.cc (nto_target_ops): Update.
224 * win32-low.cc (win32_target_ops): Update.
226 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
228 Turn process_stratum_target's insert_point and remove_point ops
229 into methods of process_target.
231 * target.h (struct process_stratum_target): Remove the target ops.
232 (class process_target): Add the target ops.
233 * target.cc (process_target::insert_point): Define.
234 (process_target::remove_point): Define.
236 Update the derived classes and callers below.
238 * mem-break.cc (set_raw_breakpoint_at): Update.
239 (delete_raw_breakpoint): Update.
240 (uninsert_raw_breakpoint): Update.
241 (reinsert_raw_breakpoint): Update.
242 * linux-low.cc (linux_target_ops): Update.
243 (linux_insert_point): Turn into ...
244 (linux_process_target::insert_point): ... this.
245 (linux_remove_point): Turn into ...
246 (linux_process_target::remove_point): ... this.
247 * linux-low.h (class linux_process_target): Update.
248 * lynx-low.cc (lynx_target_ops): Update.
249 * nto-low.cc (nto_target_ops): Update.
250 (nto_insert_point): Turn into ...
251 (nto_process_target::insert_point): ... this.
252 (nto_remove_point): Turn into ...
253 (nto_process_target::remove_point): ... this.
254 * nto-low.h (class nto_process_target): Update.
255 * win32-low.cc (win32_target_ops): Update.
256 (win32_insert_point): Turn into ...
257 (win32_process_target::insert_point): ... this.
258 (win32_remove_point): Turn into ...
259 (win32_process_target::remove_point): ... this.
260 * win32-low.h (class win32_process_target): Update.
262 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
264 Turn process_stratum_target's supports_z_point_type op into a
265 method of process_target.
267 * target.h (struct process_stratum_target): Remove the target op.
268 (class process_target): Add the target op.
269 * target.cc (process_target::supports_z_point_type): Define.
271 Update the derived classes and callers below.
273 * mem-break.cc (z_type_supported): Update.
274 * linux-low.cc (linux_target_ops): Update.
275 (linux_supports_z_point_type): Turn into ...
276 (linux_process_target::supports_z_point_type): ... this.
277 * linux-low.h (class linux_process_target): Update.
278 * lynx-low.cc (lynx_target_ops): Update.
279 * nto-low.cc (nto_target_ops): Update.
280 (nto_supports_z_point_type): Turn into ...
281 (nto_process_target::supports_z_point_type): ... this.
282 * nto-low.h (class nto_process_target): Update.
283 * win32-low.cc (win32_target_ops): Update.
284 (win32_supports_z_point_type): Turn into ...
285 (win32_process_target::supports_z_point_type): ... this.
286 * win32-low.h (class win32_process_target): Update.
288 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
290 Turn process_stratum_target's read_auxv op into a method of
293 * target.h (class process_stratum_target): Remove the target op.
294 (struct process_target): Add the target op. Also add
295 'supports_read_auxv'.
296 * target.cc (process_target::read_auxv): Define.
297 (process_target::supports_read_auxv): Define.
299 Update the derived classes and callers below.
301 * server.cc (handle_qxfer_auxv): Update.
302 (handle_query): Update.
303 * linux-low.cc (linux_target_ops): Update.
304 (linux_process_target::supports_read_auxv): Define.
305 (linux_read_auxv): Turn into ...
306 (linux_process_target::read_auxv): ... this.
307 * linux-low.h (class linux_process_target): Update.
308 * lynx-low.cc (lynx_target_ops): Update.
309 * nto-low.cc (nto_target_ops): Update.
310 (nto_process_target::supports_read_auxv): Define.
311 (nto_read_auxv): Turn into ...
312 (nto_process_target::read_auxv): ... this.
313 * nto-low.h (class nto_process_target): Update.
314 * win32-low.cc (win32_target_ops): Update.
316 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
318 Turn process_stratum_target's request_interrupt op into a method of
321 * target.h (struct process_stratum_target): Remove the target op.
322 (class process_target): Add the target op.
324 Update the derived classes and callers below.
326 * remote-utils.cc (putpkt_binary_1): Update.
327 (input_interrupt): Update.
329 * server.cc (handle_v_requests): Update.
330 * linux-low.cc (linux_target_ops): Update.
331 (linux_request_interrupt): Turn into ...
332 (linux_process_target::request_interrupt): ... this.
333 * linux-low.h (class linux_process_target): Update.
334 * lynx-low.cc (lynx_target_ops): Update.
335 (lynx_request_interrupt): Turn into ...
336 (lynx_process_target::request_interrupt): ... this.
337 * lynx-low.h (class lynx_process_target): Update.
338 * nto-low.cc (nto_target_ops): Update.
339 (nto_request_interrupt): Turn into ...
340 (nto_process_target::request_interrupt): ... this.
341 * nto-low.h (class nto_process_target): Update.
342 * win32-low.cc (win32_target_ops): Update.
343 (win32_request_interrupt): Turn into ...
344 (win32_process_target::request_interrupt): ... this.
345 * win32-low.h (class win32_process_target): Update.
347 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
349 Turn process_stratum_target's look_up_symbols op into a method of
352 * target.h (struct process_stratum_target): Remove the target op.
353 (class process_target): Add the target op.
354 * target.cc (process_target::look_up_symbols): Define.
356 Update the derived classes and callers below.
358 * server.cc (handle_query): Update.
359 * linux-low.cc (linux_target_ops): Update.
360 (linux_look_up_symbols): Turn into ...
361 (linux_process_target::look_up_symbols): ... this.
362 * linux-low.h (class linux_process_target): Update.
363 * lynx-low.cc (lynx_target_ops): Update.
364 * nto-low.cc (nto_target_ops): Update.
365 * win32-low.cc (win32_target_ops): Update.
367 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
369 Turn process_stratum_target's read_memory and write_memory
370 ops into methods of process_target.
372 * target.h (struct process_stratum_target): Remove the target ops.
373 (class process_target): Add the target ops.
375 Update the derived classes and callers below.
377 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
378 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
379 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
380 (arm_get_syscall_trapinfo): Update.
381 * linux-cris-low.cc (cris_breakpoint_at): Update.
382 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
383 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
384 * linux-mips-low.cc (mips_breakpoint_at): Update.
385 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
386 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
387 * linux-sh-low.cc (sh_breakpoint_at): Update.
388 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
389 (sparc_store_gregset_from_stack): Update.
390 (sparc_breakpoint_at): Update.
391 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
392 * linux-tile-low.cc (tile_breakpoint_at): Update.
393 * linux-x86-low.cc (x86_breakpoint_at): Update.
394 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
395 * mem-brea.cc (insert_memory_breakpoint): Update.
396 (validate_inserted_breakpoint): Update.
397 * target.cc (read_inferior_memory): Update.
398 (target_write_memory): Update.
399 * linux-low.cc (linux_target_ops): Update.
400 (linux_read_memory): Make a wrapper around the read_memory target
402 (linux_process_target::read_memory): Rename from linux_read_memory.
403 (linux_write_memory): Turn into ...
404 (linux_process_target::write_memory): ... this.
405 * linux-low.h (class linux_process_target): Update.
406 * lynx-low.cc (lynx_target_ops): Update.
407 (lynx_read_memory): Turn into ...
408 (lynx_process_target::read_memory): ... this.
409 (lynx_write_memory): Turn into ...
410 (lynx_process_target::write_memory): ... this.
411 * lynx-low.h (class lynx_process_target): Update.
412 * nto-low.cc (nto_target_ops): Update.
413 (nto_read_memory): Turn into ...
414 (nto_process_target::read_memory): ... this.
415 (nto_write_memory): Turn into ...
416 (nto_process_target::write_memory): ... this.
417 * nto-low.h (class nto_process_target): Update.
418 * win32-low.cc (win32_target_ops): Update.
419 (win32_read_inferior_memory): Turn into ...
420 (win32_process_target::read_memory): ... this.
421 (win32_write_inferior_memory): Turn into ...
422 (win32_process_target::write_memory): ... this.
423 * win32-low.h (class win32_process_target): Update.
425 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
427 Turn process_stratum_target's prepare_to_access_memory and
428 done_accessing_memory 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 * target.cc (process_target::prepare_to_access_memory): Define.
433 (process_target::done_accessing_memory): Define.
434 (prepare_to_access_memory): Update.
435 (done_accessing_memory): Update.
437 Update the derived classes and callers below.
439 * linux-low.cc (linux_target_ops): Update.
440 (linux_prepare_to_access_memory): Turn into ...
441 (linux_process_target::prepare_to_access_memory): ... this.
442 (linux_done_accessing_memory): Turn into ...
443 (linux_process_target::done_accessing_memory): ... this.
444 * linux-low.h (class linux_process_target): Update.
445 * lynx-low.cc (lynx_target_ops): Update.
446 * nto-low.cc (nto_target_ops): Update.
447 * win32-low.cc (win32_target_ops): Update.
449 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
451 Turn process_stratum_target's fetch_registers and store_registers
452 ops into methods of process_target.
454 * target.h (struct process_stratum_target): Remove the target ops.
455 (class process_target): Add the target ops.
456 (fetch_inferior_registers): Update the macro.
457 (store_inferior_registers): Update the macro.
459 Update the derived classes and callers below.
461 * linux-low.cc (linux_target_ops): Update.
462 (linux_fetch_registers): Turn into ...
463 (linux_process_target::fetch_registers): ... this.
464 (linux_store_registers): Turn into ...
465 (linux_process_target::store_registers): ... this.
466 * linux-low.h (class linux_process_target): Update.
467 * lynx-low.cc (lynx_target_ops): Update.
468 (lynx_fetch_registers): Turn into ...
469 (lynx_process_target::fetch_registers): ... this.
470 (lynx_store_registers): Turn into ...
471 (lynx_process_target::store_registers): ... this.
472 * lynx-low.h (class lynx_process_target): Update.
473 * nto-low.cc (nto_target_ops): Update.
474 (nto_fetch_registers): Turn into ...
475 (nto_process_target::fetch_registers): ... this.
476 (nto_store_registers): Turn into ...
477 (nto_process_target::store_registers): ... this.
478 * nto-low.h (class nto_process_target): Update.
479 * win32-low.cc (win32_target_ops): Update.
480 (win32_fetch_inferior_registers): Turn into ...
481 (win32_process_target::fetch_registers): ... this.
482 (win32_store_inferior_registers): Turn into ...
483 (win32_process_target::store_registers): ... this.
484 * win32-low.h (class win32_process_target): Update.
486 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
488 Turn process_stratum_target's wait op into a method of
491 * target.h (struct process_stratum_target): Remove the target op.
492 (class process_target): Add the target op.
494 Update the derived classes and callers below.
496 * target.cc (target_wait): Update.
497 * linux-low.cc (linux_target_ops): Update.
498 (linux_wait): Turn into ...
499 (linux_process_target::wait): ... this.
500 * linux-low.h (class linux_process_target): Update.
501 * lynx-low.cc (lynx_target_ops): Update.
502 (lynx_wait): Turn into ...
503 (lynx_process_target::wait): ... this.
504 * lynx-low.h (class lynx_process_target): Update.
505 * nto-low.cc (nto_target_ops): Update.
506 (nto_wait): Turn into ...
507 (nto_process_target::wait): ... this.
508 * nto-low.h (class nto_process_target): Update.
509 * win32-low.cc (win32_target_ops): Update.
510 (win32_wait): Turn into ...
511 (win32_process_target::wait): ... this.
512 (do_initial_child_stuff): Update.
513 * win32-low.h (class win32_process_target): Update.
515 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
517 Turn process_stratum_target's resume op into a method of
520 * target.h (struct process_stratum_target): Remove the target op.
521 (class process_target): Add the target op.
523 Update the derived classes and callers below.
525 * server.cc (resume): Update.
526 * target.cc (target_stop_and_wait): Update.
527 (target_continue_no_signal): Update.
528 (target_continue): Update.
529 * linux-low.cc (linux_target_ops): Update.
530 (linux_resume): Turn into ...
531 (linux_process_target::resume): ... this.
532 * linux-low.h (class linux_process_target): Update.
533 * lynx-low.cc (lynx_target_ops): Update.
534 (lynx_resume): Turn into ...
535 (lynx_process_target::resume): ... this.
536 * lynx-low.h (class lynx_process_target): Update.
537 * nto-low.cc (nto_target_ops): Update.
538 (nto_resume): Turn into ...
539 (nto_process_target::resume): ... this.
540 * nto-low.h (class nto_process_target): Update.
541 * win32-low.cc (win32_target_ops): Update.
542 (win32_resume): Turn into ...
543 (win32_process_target::resume): ... this.
544 (win32_process_target::detach): Update.
545 (do_initial_child_stuff): Update.
546 * win32-low.h (class win32_process_target): Update.
548 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
550 Turn process_stratum_target's thread_alive op into a method of
553 * target.h (struct process_stratum_target): Remove the target op.
554 (class process_target): Add the target op.
555 (mythread_alive): Update the macro.
557 Update the derived classes and callers below.
559 * linux-low.cc (linux_target_ops): Update.
560 (linux_thread_alive): Turn into ...
561 (linux_process_target::thread_alive): ... this.
562 (wait_for_sigstop): Update.
563 * linux-low.h (class linux_process_target): Update.
564 * lynx-low.cc (lynx_target_ops): Update.
565 (lynx_thread_alive): Turn into ...
566 (lynx_process_target::thread_alive): ... this.
567 * lynx-low.h (class lynx_process_target): Update.
568 * nto-low.cc (nto_target_ops): Update.
569 (nto_thread_alive): Turn into ...
570 (nto_process_target::thread_alive): ... this.
571 * nto-low.h (class nto_process_target): Update.
572 * win32-low.cc (win32_target_ops): Update.
573 (win32_thread_alive): Turn into ...
574 (win32_process_target::thread_alive): ... this.
575 * win32-low.h (class win32_process_target): Update.
577 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
579 Turn process_stratum_target's join op into a method of
582 * target.h (struct process_stratum_target): Remove the target op.
583 (class process_target): Add the target op.
584 (join_inferior): Update the macro.
586 Update the derived classes and callers below.
588 * linux-low.cc (linux_target_ops): Update.
589 (linux_join): Turn into ...
590 (linux_process_target::join): ... this.
591 * linux-low.h (class linux_process_target): Update.
592 * lynx-low.cc (lynx_target_ops): Update.
593 (lynx_join): Turn into ...
594 (lynx_process_target::join): ... this.
595 * lynx-low.h (class lynx_process_target): Update.
596 * nto-low.cc (nto_target_ops): Update.
597 (nto_process_target::join): Define.
598 * nto-low.h (class nto_process_target): Update.
599 * win32-low.cc (win32_target_ops): Update.
600 (win32_join): Turn into ...
601 (win32_process_target::join): ... this.
602 * win32-low.h (class win32_process_target): Update.
604 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
606 Turn process_stratum_target's mourn op into a method of
609 * target.h (struct process_stratum_target): Remove the target op.
610 (class process_target): Add the target op.
612 Update the derived classes and callers below.
614 * target.cc (target_mourn_inferior): Update.
615 * linux-low.cc (linux_target_ops): Update.
616 (linux_mourn): Turn into ...
617 (linux_process_target::mourn): ... this.
618 (handle_extended_wait): Update.
619 (linux_process_target::kill): Update.
620 (linux_process_target::detach): Update.
621 * linux-low.h (class linux_process_target): Update.
622 * lynx-low.cc (lynx_target_ops): Update.
623 (lynx_mourn): Turn into ...
624 (lynx_process_target::mourn): ... this.
625 * lynx-low.h (class lynx_process_target): Update.
626 * nto-low.cc (nto_target_ops): Update.
627 (nto_mourn): Turn into ...
628 (nto_process_target::mourn): ... this.
629 * nto-low.h (class nto_process_target): Update.
630 * win32-low.cc (win32_target_ops): Update.
631 (win32_mourn): Turn into ...
632 (win32_process_target::mourn): ... this.
633 * win32-low.h (class win32_process_target): Update.
635 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
637 Turn process_stratum_target's detach op into a method of
640 * target.h (struct process_stratum_target): Remove the target op.
641 (class process_target): Add the target op.
642 (detach_inferior): Update the macro.
644 Update the derived classes and callers below.
646 * linux-low.cc (linux_target_ops): Update.
647 (linux_detach): Turn into ...
648 (linux_process_target::detach): ... this.
649 * linux-low.h (class linux_process_target): Update.
650 * lynx-low.cc (lynx_target_ops): Update.
651 (lynx_detach): Turn into ...
652 (lynx_process_target::detach): ... this.
653 * lynx-low.h (class lynx_process_target): Update.
654 * nto-low.cc (nto_target_ops): Update.
655 (nto_detach): Turn into ...
656 (nto_process_target::detach): ... this.
657 * nto-low.h (class nto_process_target): Update.
658 * win32-low.cc (win32_target_ops): Update.
659 (win32_detach): Turn into ...
660 (win32_process_target::detach): ... this.
661 * win32-low.h (class win32_process_target): Update.
663 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
665 Turn process_stratum_target's kill op into a method of
668 * target.h (struct process_stratum_target): Remove the target op.
669 (class process_target): Add the target op.
671 Update the derived classes and callers below.
673 * target.cc (kill_inferior): Update.
674 * linux-low.cc (linux_target_ops): Update.
675 (linux_kill): Turn into ...
676 (linux_process_target::kill): ... this.
677 * linux-low.h (class linux_process_target): Update.
678 * lynx-low.cc (lynx_target_ops): Update.
679 (lynx_kill): Turn into ...
680 (lynx_process_target::kill): ... this.
681 * lynx-low.h (class lynx_process_target): Update.
682 * nto-low.cc (nto_target_ops): Update.
683 (nto_kill): Turn into ...
684 (nto_process_target::kill): ... this.
685 * nto-low.h (class nto_process_target): Update.
686 * win32-low.cc (win32_target_ops): Update.
687 (win32_kill): Turn into ...
688 (win32_process_target::kill): ... this.
689 * win32-low.h (class win32_process_target): Update.
691 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
693 Turn process_stratum_target's attach op into a method of
696 * target.h (struct process_stratum_target): Remove the target op.
697 (class process_target): Add the target op.
698 (myattach): Update the macro.
700 Update the derived classes and callers below.
702 * linux-low.cc (linux_target_ops): Update.
703 (linux_attach): Turn into ...
704 (linux_process_target::attach): ... this.
705 * linux-low.h (class linux_process_target): Update.
706 * lynx-low.cc (lynx_target_ops): Update.
707 (lynx_attach): Turn into ...
708 (lynx_process_target::attach): ... this.
709 * lynx-low.h (class lynx_process_target): Update.
710 * nto-low.cc (nto_target_ops): Update.
711 (nto_attach): Turn into ...
712 (nto_process_target::attach): ... this.
713 * nto-low.h (class nto_process_target): Update.
714 * win32-low.cc (win32_target_ops): Update.
715 (win32_attach): Turn into ...
716 (win32_process_target::attach): ... this.
717 * win32-low.h (class win32_process_target): Update.
719 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
721 Turn process_stratum_target's post_create_inferior op into a method
724 * target.h (struct process_stratum_target): Remove the target op.
725 (class process_target): Add the target op.
726 (target_post_create_inferior): Update the macro.
727 * target.cc (process_target::post_create_inferior): Define.
729 Update the derived classes and callers below.
731 * linux-low.cc (linux_target_ops): Update.
732 (linux_post_create_inferior): Turn into ...
733 (linux_process_target::post_create_inferior): ... this.
734 * linux-low.h (class linux_process_target): Update.
735 * lynx-low.cc (lynx_target_ops): Update.
736 * nto-low.cc (nto_target_ops): Update.
737 * win32-low.cc (win32_target_ops): Update.
739 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
741 Turn process_stratum_target's create_inferior op into a method of
744 * target.h (struct process_stratum_target): Remove the target op.
745 (class process_target): Add the target op.
746 (create_inferior): Rename the macro to ...
747 (target_create_inferior): ... this.
749 Update the derived classes and callers below.
751 * server.cc (handle_v_run): Update.
752 (captured_main): Update.
753 (process_serial_event): Update.
754 * linux-low.cc (linux_target_ops): Update.
755 (linux_create_inferior): Turn into ...
756 (linux_process_target::create_inferior): ... this.
757 * linux-low.h (class linux_process_target): Update.
758 * lynx-low.cc (lynx_target_ops): Update.
759 (lynx_create_inferior): Turn into ...
760 (lynx_process_target::create_inferior): ... this.
761 * lynx-low.h (class lynx_process_target): Update.
762 * nto-low.cc (nto_target_ops): Update.
763 (nto_create_inferior): Turn into ...
764 (nto_process_target::create_inferior): ... this.
765 * nto-low.h (class nto_process_target): Update.
766 * win32-low.cc (win32_target_ops): Update.
767 (win32_create_inferior): Turn into ...
768 (win32_process_target::create_inferior): ... this.
769 * win32-low.h (class win32_process_target): Update.
771 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
773 * target.h (class process_target): New class definition.
774 (struct process_stratum_target) <pt>: New field with type
776 * linux-low.h (class linux_process_target): Define as a derived
777 class of 'process_target'.
778 * linux-low.cc (linux_target_ops): Add a linux_process_target*
780 * lynx-low.h (class lynx_process_target): Define as a derived
781 class of 'process_target'.
782 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
784 * nto-low.h (class nto_process_target): Define as a derived
785 class of 'process_target'.
786 * nto-low.cc (nto_target_ops): Add an nto_process_target*
788 * win32-low.h (class win32_process_target): Define as a derived
789 class of 'process_target'.
790 * win32-low.cc (win32_target_ops): Add a win32_process_target*
793 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
795 * configure: Regenerate.
797 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
798 Andrew Burgess <andrew.burgess@embecosm.com>
800 * linux-riscv-low.cc: New file.
801 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
802 and nat/riscv-linux-tdesc.c.
803 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
804 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
807 2020-02-14 Tom Tromey <tom@tromey.com>
809 * acinclude.m4: Don't include acx_configure_dir.m4.
810 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
811 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
812 (all, install-only, uninstall, clean-info, clean)
813 (maintainer-clean): Don't recurse.
814 (subdir_do, all-lib): Remove.
815 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
817 (generated_files): Update.
818 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
819 * configure: Rebuild.
820 * configure.ac: Don't configure gnulib or libiberty.
823 2020-02-14 Eli Zaretskii <eliz@gnu.org>
825 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
826 preparing the command line for CreateProcess.
827 (win32_create_inferior): Reflect the program name in debugging
828 output that shows the process and its command line.
830 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
832 * Makefile.in: Rename source files from .c to .cc.
833 * %.c: Rename to %.cc.
834 * configure.ac: Rename server.c to server.cc.
835 * configure: Re-generate.
837 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
839 * Makefile.in: Rename gdbsupport source files from .c to .cc.
841 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
843 * win32-low.c (win32_create_inferior): Set signal_pid.
845 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
846 Pedro Alves <palves@redhat.com>
848 Skip building gdbserver in a cross-configuration.
849 * configure.srv: Set $gdbserver_host depending on whether $target
850 is $host. Use $gdbserver_host instead of $host.
852 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
854 * configure: Re-generate.
856 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
858 * configure: Re-generate.
860 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
862 * acinclude.m4: Update warning.m4 path.
864 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
866 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
867 (handle_exception): Set siginfo_er.
868 (win32_xfer_siginfo): New function.
870 2020-02-07 Tom Tromey <tom@tromey.com>
871 Pedro Alves <palves@redhat.com>
873 * README: Update build documentation.
874 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
876 * configure.ac: Update paths.
877 * configure: Rebuild.
878 * acinclude.m4: Update paths.
879 * Makefile.in: Update include paths.
880 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
881 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
882 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
883 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
884 (%-generated.c): Update paths.
885 * Move entire directory from ../gdb/gdbserver.
887 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
889 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
891 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
893 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
894 assignment instead of srv_linux_obj.
896 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
898 * server.c (handle_qxfer_libraries): Write segment-address with
901 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
903 * Makefile.in (install-strip): New target.
904 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
905 * aclocal.m4: Regenerate.
906 * configure: Regenerate.
907 * configure.ac: Add AM_PROG_INSTALL_STRIP.
909 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
911 * Makefile.in (SFILES): Adjust paths to point to real files.
912 (OBS): Move waitstatus.o to target/waitstatus.o.
913 (TAGS): Transform paths appropriately.
915 (nat/%.o): ... this pattern rule.
917 (target/%.o): ... this pattern rule.
918 * configure.srv: Adjust paths throughout to include nat/ prefix
919 with the revant files.
920 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
921 * configure: Regenerate.
923 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
925 * Makefile.in (TAGS): Remove config files from the recipe.
927 2020-01-14 Tom Tromey <tom@tromey.com>
929 * configure: Rebuild.
930 * configure.ac: Remove any checks that were added to common.m4.
931 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
934 2020-01-14 Tom Tromey <tom@tromey.com>
936 * server.h: Include config.h.
937 * gdbreplay.c: Include config.h.
938 * configure: Rebuild.
939 * configure.ac: Don't source common.host.
940 * acinclude.m4: Update path.
941 * Makefile.in (INCSUPPORT): New variable.
942 (INCLUDE_CFLAGS): Add INCSUPPORT.
943 (SFILES): Update paths.
944 (version-generated.c): Update path to create-version.sh.
945 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
947 2020-01-14 Tom Tromey <tom@tromey.com>
949 * configure.ac (LIBS): Use WIN32APILIBS.
950 (USE_WIN32API): Don't define.
951 * configure: Rebuild.
953 2020-01-14 Tom Tromey <tom@tromey.com>
955 * configure: Rebuild.
957 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
959 * Makefile.in (%-generated.c): Remove rule for files from
962 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
964 * configure: Re-generate.
966 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
968 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
970 * tracepoint.c (stop_tracing, flush_trace_buffer,
971 about_to_request_buffer_space, get_trace_state_variable_value,
972 set_trace_state_variable_value, gdb_collect): Add declaration.
974 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
976 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
977 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
978 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
979 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
980 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
983 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
985 * inferiors.c: Include gdbsupport/common-inferior.h.
987 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
989 * hostio-errno.c: Include hostio.h.
991 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
993 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
996 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
998 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
999 * linux-arm-tdesc.h: Include arch/arm.h.
1001 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1003 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1005 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1007 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1008 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1010 2020-01-10 Pedro Alves <palves@redhat.com>
1012 * fork-child.c (post_fork_inferior): Pass target down to
1014 * inferiors.c (switch_to_thread): Add process_stratum_target
1016 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1017 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1018 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1019 * remote-utils.c (prepare_resume_reply): Pass the target to
1021 * target.c (the_target): Now a process_stratum_target.
1022 (done_accessing_memory): Pass the target to switch_to_thread.
1023 (set_target_ops): Ajust to use process_stratum_target.
1024 * target.h (struct target_ops): Rename to ...
1025 (struct process_stratum_target): ... this.
1026 (the_target, set_target_ops): Adjust.
1027 (prepare_to_access_memory): Adjust comment.
1028 * win32-low.c (child_xfer_memory): Adjust to use
1029 process_stratum_target.
1030 (win32_target_ops): Now a process_stratum_target.
1032 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1033 Pedro Alves <palves@redhat.com>
1035 * win32-low.c (get_child_debug_event): Extract the fatal exception
1036 from the exit status and convert to the equivalent Posix signal
1038 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1039 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1041 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1043 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1045 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1047 * server.c (gdbserver_version): Change copyright year to 2020.
1048 * gdbreplay.c (gdbreplay_version): Likewise.
1050 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1052 * configure: Regenerate.
1053 * configure.ac: Quote variable arguments of test.
1055 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1057 * Makefile.in: Fix build with GNU Make 3.81
1059 2019-12-16 Tom Tromey <tromey@adacore.com>
1061 * server.c (get_exec_file): Constify result.
1063 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1065 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1066 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1067 * config.in: Regenerate.
1068 * configure: Regenerate.
1069 * configure.ac: Don't check for strerror.
1070 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1071 Call safe_strerror instead of strerror.
1072 * server.h (strerror): Remove this now-unnecessary declaration.
1073 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1075 (gdb_agent_helper_thread): Likewise.
1076 * utils.c (perror_with_name): Likewise.
1078 2019-11-26 Tom Tromey <tom@tromey.com>
1080 * configure, config.in: Rebuild.
1082 2019-11-26 Tom Tromey <tom@tromey.com>
1084 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1085 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1087 * configure, config.in: Rebuild.
1089 2019-11-26 Tom Tromey <tom@tromey.com>
1091 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1092 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1093 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1094 * acinclude.m4: Include ax_pthread.m4.
1095 * config.in, configure: Rebuild.
1097 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1099 * debug.c (debug_set_output): Call safe_strerror instead of
1101 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1102 (linux_kill_one_lwp): Likewise.
1103 (linux_detach_one_lwp): Likewise.
1104 (linux_wait_for_event_filtered): Likewise.
1105 (store_register): Likewise.
1106 * lynx-low.c (lynx_attach): Likewise.
1107 * mem-break.c (insert_memory_breakpoint): Likewise.
1108 (remove_memory_breakpoint): Likewise.
1109 (delete_fast_tracepoint_jump): Likewise.
1110 (set_fast_tracepoint_jump): Likewise.
1111 (uninsert_fast_tracepoint_jumps_at): Likewise.
1112 (reinsert_fast_tracepoint_jumps_at): Likewise.
1113 * nto-low.c (nto_xfer_memory): Likewise.
1114 (nto_resume): Likewise.
1116 2019-11-20 Luis Machado <luis.machado@linaro.org>
1118 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1119 instead of register count.
1120 * tdesc.c (tdesc_contains_feature): New function.
1121 * tdesc.h (tdesc_contains_feature): New prototype.
1123 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1125 * Makefile.in: Add safe-strerror.c.
1126 * configure: Regenerate.
1127 * configure.ac: Don't source common.host.
1129 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1131 * config.in: Regenerate.
1132 * configure: Regenerate.
1134 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1136 * ax.c (ax_printf): Handle size_t_arg.
1138 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1140 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1141 * mi/mi-main.c (output_cores): Likewise.
1142 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1143 (linux_xfer_osdata_modules): Likewise.
1144 * remote.c (register_remote_support_xml): Likewise.
1145 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1146 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1148 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1150 * configure: Regenerate.
1151 * configure.ac: Remove check for strerror_r.
1153 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1155 * config.in: Regenerate.
1156 * configure: Regenerate.
1157 * configure.ac: Also check for strerror_r.
1159 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1161 * ax.h (debug_agent): Remove duplicate declaration.
1163 2019-10-26 Tom de Vries <tdevries@suse.de>
1165 * linux-aarch64-low.c: Fix typos in comments.
1166 * linux-arm-low.c: Same.
1167 * linux-low.c: Same.
1168 * linux-ppc-low.c: Same.
1169 * proc-service.c: Same.
1172 * tracepoint.c: Same.
1173 * win32-low.c: Same.
1175 2019-10-25 Tom Tromey <tromey@adacore.com>
1177 * utils.c (xstrdup): Remove.
1179 2019-10-23 Tom Tromey <tom@tromey.com>
1181 * configure, config.in: Rebuild.
1183 2019-10-23 Tom Tromey <tom@tromey.com>
1185 * configure: Rebuild.
1186 * acinclude.m4: Use m4_include, not sinclude.
1188 2019-10-17 Tom Tromey <tromey@adacore.com>
1190 * configure: Rebuild.
1191 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1192 in AC_CONFIG_FILES invocation.
1193 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1196 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1198 * server.c: Include xml-builtin.h.
1199 (get_xml_features): Don't declare xml_builtins here.
1201 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1203 * Makefile.in: Remove references to vec-ipa.o.
1205 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1207 * Makefile.in: Remove references to vec.c.
1209 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1211 * server.c (server_waiting): Change to bool.
1212 (extended_protocol): Likewise.
1213 (response_needed): Likewise.
1214 (exit_requested): Likewise.
1215 (run_once): Likewise.
1216 (report_no_resumed): Likewise.
1217 (non_stop): Likewise.
1218 (disable_packet_vCont): Likewise.
1219 (disable_packet_Tthread): Likewise.
1220 (disable_packet_qC): Likewise.
1221 (disable_packet_qfThreadInfo): Likewise.
1222 (handle_general_set): Update.
1223 (handle_detach): Update.
1224 (handle_monitor_command): Update.
1225 (handle_query): Update.
1226 (captured_main): Update.
1227 (process_serial_event): Update.
1228 * server.h (server_waiting): Change to bool.
1229 (disable_packet_vCont): Likewise.
1230 (disable_packet_Tthread): Likewise.
1231 (disable_packet_qC): Likewise.
1232 (disable_packet_qfThreadInfo): Likewise.
1233 (run_once): Likewise.
1234 (non_stop): Likewise.
1235 * target.c (target_stop_and_wait): Update.
1237 2019-10-02 Tom Tromey <tromey@adacore.com>
1239 * Makefile.in (SFILES): Add common-inferior.c.
1240 (OBS): Add common-inferior.o.
1241 * server.c (startup_with_shell): Don't define.
1243 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1245 * linux-low.c (linux_low_read_btrace): Update for change to
1248 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1250 * debug.c (debug_threads): Remove comment in favor of the header.
1251 * debug.h (using_threads): Add declaration.
1252 (debug_threads): Add comment.
1253 * linux-aarch64-low.c: Include debug.h and remove declaration of
1255 * nto-low.c: Likewise.
1256 * remote-utils.c: Likewise.
1257 * thread-db.c: Likewise.
1259 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1261 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1262 and powerpc-cell64l-ipa.o.
1263 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1264 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1265 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1268 * spu-low.c: Remove file.
1270 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1271 (parse_spufs_run): Remove.
1272 (ppc_get_pc): Remove Cell/B.E. support.
1273 (ppc_set_pc): Likewise.
1274 (ppc_breakpoint_at): Likewise.
1275 (ppc_arch_setup): Likewise.
1276 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1277 tdesc_powerpc_cell32l.
1278 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1279 or init_registers_powerpc_cell32l.
1280 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1281 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1282 or init_registers_powerpc_cell32l.
1283 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1284 (init_registers_powerpc_cell32l): Remove prototype.
1285 (init_registers_powerpc_cell64l): Likewise.
1287 * target.h (struct target_ops): Remove qxfer_spu member.
1288 * server.c (handle_qxfer_spu): Remove.
1289 (qxfer_packets): Remove entry for "spu".
1290 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1291 * linux-low.c (SPUFS_MAGIC): Remove.
1292 (spu_enumerate_spu_ids): Remove.
1293 (linux_qxfer_spu): Remove.
1294 (linux_target_ops): Remove qxfer_spu member.
1295 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1296 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1297 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1299 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1301 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1302 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1303 * config.in: Regenerate.
1304 * configure: Regenerate.
1306 2019-08-15 Tom Tromey <tromey@adacore.com>
1308 * target.c (target_write_memory): Use gdb::byte_vector.
1310 2019-08-15 Tom Tromey <tromey@adacore.com>
1312 * tracepoint.c (write_inferior_data_pointer)
1313 (write_inferior_integer, write_inferior_int8)
1314 (write_inferior_uinteger, m_tracepoint_action_download)
1315 (r_tracepoint_action_download, x_tracepoint_action_download)
1316 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1317 (download_agent_expr, download_tracepoint_1)
1318 (download_trace_state_variables, upload_fast_traceframes): Update.
1319 * server.c (gdb_write_memory): Update.
1320 * remote-utils.c (relocate_instruction): Update.
1321 * proc-service.c (ps_pdwrite): Update.
1322 * mem-break.c (remove_memory_breakpoint)
1323 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1324 (uninsert_fast_tracepoint_jumps_at)
1325 (reinsert_fast_tracepoint_jumps_at): Update.
1326 * linux-x86-low.c (append_insns)
1327 (i386_install_fast_tracepoint_jump_pad)
1328 (amd64_write_goto_address, i386_write_goto_address): Update.
1329 * linux-s390-low.c (append_insns, s390_write_goto_address):
1331 * linux-ppc-low.c (ppc_relocate_instruction)
1332 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1333 (ppc_write_goto_address): Update.
1334 * linux-aarch64-low.c (append_insns): Update.
1335 * target.h (struct target_ops): Update.
1336 (write_inferior_memory): Don't declare.
1337 * target.c (target_write_memory): Rename from
1338 write_inferior_memory. Remove old target_write_memory.
1340 2019-08-15 Tom Tromey <tromey@adacore.com>
1342 * target.c (write_inferior_memory): Use std::vector.
1344 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1347 * configure.ac: Drop enable-libmcheck support.
1348 * configure, config.in: Rebuild.
1349 * acinclude.m4: Don't include it.
1351 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1353 * configure.srv: Remove Arm xml files.
1355 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1357 * configure.srv: Add new files. Remove xml generated files.
1358 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1360 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1361 * linux-aarch32-tdesc.c: New file.
1362 * linux-aarch32-tdesc.h: New file.
1363 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1364 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1365 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1366 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1367 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1368 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1369 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1370 (arm_read_description): Call arm_linux_read_description.
1371 (initialize_low_arch): Don't init registers.
1372 * linux-arm-tdesc.c: New file.
1373 * linux-arm-tdesc.h: New file.
1375 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1377 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1378 Move counter inside for.
1379 (arm_read_description): Check ptrace earlier.
1380 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1382 2019-07-09 Tom Tromey <tom@tromey.com>
1384 * configure: Rebuild.
1385 * configure.ac: Change common to gdbsupport.
1386 * acinclude.m4: Change common to gdbsupport.
1387 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1388 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1389 common to gdbsupport.
1390 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1391 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1392 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1393 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1394 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1395 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1396 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1397 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1398 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1399 common to gdbsupport.
1401 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1403 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1405 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1407 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1409 * configure.srv: Remove legacy xml.
1410 * linux-aarch64-low.c (initialize_low_arch): Remove
1411 initialize_low_tdesc call.
1412 * linux-aarch64-tdesc-selftest.c: Remove file.
1413 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1414 * linux-x86-low.c (initialize_low_arch): Remove
1415 initialize_low_tdesc call.
1416 * linux-x86-tdesc-selftest.c: Remove file.
1417 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1419 2019-06-20 Tom de Vries <tdevries@suse.de>
1421 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1422 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1424 2019-06-19 Tom de Vries <tdevries@suse.de>
1426 * debug.h (debug_write): Change return type to ssize_t.
1427 * debug.c (debug_write): Same.
1429 2019-06-14 Tom Tromey <tom@tromey.com>
1431 * configure.ac: Use new path to gnulib.
1432 * configure: Rebuild.
1433 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1436 2019-06-11 Tom Tromey <tom@tromey.com>
1438 * Makefile.in (SFILES): Add alloc.c.
1440 (IPA_OBJS): Add alloc-ipa.o.
1441 (alloc-ipa.o): New target.
1442 (%.o: ../%.c): New pattern rule.
1444 2019-06-10 Tom Tromey <tromey@adacore.com>
1446 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1447 end warning with a newline.
1448 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1450 * thread-db.c (attach_thread): Don't end warning with a newline.
1451 (thread_db_notice_clone): Likewise.
1452 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1454 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1455 end warning with a newline.
1457 2019-06-04 Pedro Alves <palves@redhat.com>
1459 * server.c (captured_main): Use make_unique_xstrdup.
1461 2019-06-02 Tom Tromey <tom@tromey.com>
1463 * gdbreplay.c (fromhex): Remove.
1464 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1466 2019-05-29 Tom Tromey <tromey@adacore.com>
1468 * configure: Rebuild.
1470 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1472 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1473 sign extension code on 32-bit builds.
1475 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1478 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1480 2019-04-19 Tom Tromey <tom@tromey.com>
1482 * server.c (struct vstop_notif): Derive from notif_event.
1484 (queue_stop_reply): Update.
1485 (remove_all_on_match_ptid): Change type. Rewrite.
1486 (discard_queued_stop_replies): Rewrite.
1487 (in_queued_stop_replies_ptid): Change type.
1488 (in_queued_stop_replies): Rewrite.
1489 (notif_stop): Update.
1490 (queue_stop_reply_callback): Update.
1491 (captured_main): Don't call initialize_notif.
1492 (push_stop_notification): Update.
1493 * notif.c (notif_write_event, handle_notif_ack)
1494 (notif_event_enque, notif_push): Update.
1495 (notif_event_xfree, initialize_notif): Remove.
1496 * notif.h (struct notif_event): Include <list>, not
1498 (struct notif_server) <queue>: Now a std::list.
1499 (notif_event_p): Remove typedef.
1500 (initialize_notif): Don't declare.
1501 (struct notif_event): Add virtual destructor.
1503 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1505 * ax.c (ax_vdebug): Call debug_printf.
1506 * debug.c (debug_write): New function.
1507 * debug.h (debug_write): New declaration.
1508 * linux-low.c (sigchld_handler): Call debug_write.
1510 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1512 * debug.c (debug_set_output): New function.
1513 (debug_vprintf): Send output to debug_file.
1514 (debug_flush): Likewise.
1515 * debug.h (debug_set_output): New declaration.
1516 * server.c (handle_monitor_command): Add debug-file option.
1517 (captured_main): Likewise.
1519 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1521 * debug.c (remote_debug): Add definition.
1522 * debug.h (remote_debug): Add declaration.
1523 * hostio.c (remote_debug): Remove declaration.
1524 * remote-utils.c (struct ui_file): Likewise.
1525 (remote_debug): Likewise.
1526 * remote-utils.h (remote_debug): Likewise,
1527 * server.c (remote_debug): Remove definition.
1529 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1531 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1532 when using a 64-bit gdbserver.
1534 2019-04-09 Tom Tromey <tromey@adacore.com>
1536 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1538 2019-04-08 Tom Tromey <tom@tromey.com>
1540 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1542 (linux_resume_one_lwp): Likewise.
1544 2019-04-08 Tom Tromey <tom@tromey.com>
1546 * gdbreplay.c: Update.
1547 * linux-low.c: Update.
1550 2019-04-08 Tom Tromey <tom@tromey.com>
1552 * server.c: Use C++ exception handling.
1553 * linux-low.c: Use C++ exception handling.
1554 * gdbreplay.c: Use C++ exception handling.
1556 2019-04-08 Tom Tromey <tom@tromey.com>
1558 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1559 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1560 (captured_main, main): Update.
1561 * gdbreplay.c (main): Update.
1563 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1565 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1566 value in argument pointer, return 1 if the entry is found and 0
1567 otherwise. Move comment.
1568 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1569 * linux-low.h (linux_get_auxv): Declare.
1570 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1572 2019-04-05 Tom Tromey <tromey@adacore.com>
1574 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1577 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1579 * linux-low.c (AT_HWCAP2): Add define if not already included.
1581 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1583 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1584 (aarch64_arch_setup): Call linux_get_hwcap.
1585 * linux-arm-low.c (arm_get_hwcap): Remove function.
1586 (arm_read_description): Call linux_get_hwcap.
1587 * linux-low.c (linux_get_auxv): New function.
1588 (linux_get_hwcap): Likewise.
1589 (linux_get_hwcap2): Likewise.
1590 * linux-low.h (linux_get_hwcap): New declaration.
1591 (linux_get_hwcap2): Likewise.
1592 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1593 (ppc_arch_setup): Call linux_get_hwcap.
1594 * linux-s390-low.c (s390_get_hwcap): Remove function.
1595 (s390_arch_setup): Call linux_get_hwcap.
1597 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1598 Jiong Wang <jiong.wang@arm.com>
1600 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1601 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1603 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1605 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1606 Jiong Wang <jiong.wang@arm.com>
1608 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1609 (aarch64_get_hwcap): New function.
1610 (aarch64_arch_setup): Read APIA hwcap.
1612 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1613 Jiong Wang <jiong.wang@arm.com>
1615 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1616 (initialize_low_tracepoint): Likewise.
1617 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1618 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1619 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1620 (aarch64_linux_read_description): Likewise.
1621 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1623 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1625 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1626 i386_create_target_description for 'segments' parameter.
1627 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1628 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1629 * win32-i386-low.c (i386_arch_setup): Likewise.
1631 2019-03-12 Tom Tromey <tromey@adacore.com>
1633 * linux-low.c (iterate_over_lwps): Update.
1635 2019-03-06 Tom Tromey <tom@tromey.com>
1637 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1638 (captured_main): Use SCOPE_EXIT.
1640 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1642 * configure.srv: Use '$enable_unittest' instead of '$development'
1643 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1646 2019-02-27 Tom Tromey <tromey@adacore.com>
1648 * gdbreplay.c (logchar): Handle \r\n.
1650 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1652 * linux-low.c (linux_attach): Add process before lwp.
1653 * server.c (attach_inferior): Check if already attached.
1655 2019-02-07 Tom Tromey <tom@tromey.com>
1657 * x86-tdesc.h: Rename include guard.
1658 * x86-low.h: Add include guard.
1659 * wincecompat.h: Rename include guard.
1660 * win32-low.h: Add include guard.
1661 * utils.h: Rename include guard.
1662 * tracepoint.h: Rename include guard.
1663 * tdesc.h: Rename include guard.
1664 * target.h: Rename include guard.
1665 * server.h: Rename include guard.
1666 * remote-utils.h: Rename include guard.
1667 * regcache.h: Rename include guard.
1668 * nto-low.h: Rename include guard.
1669 * notif.h: Add include guard.
1670 * mem-break.h: Rename include guard.
1671 * lynx-low.h: Add include guard.
1672 * linux-x86-tdesc.h: Add include guard.
1673 * linux-s390-tdesc.h: Add include guard.
1674 * linux-ppc-tdesc-init.h: Add include guard.
1675 * linux-low.h: Add include guard.
1676 * linux-aarch64-tdesc.h: Add include guard.
1677 * linux-aarch32-low.h: Add include guard.
1678 * inferiors.h: Rename include guard.
1679 * i387-fp.h: Rename include guard.
1680 * hostio.h: Rename include guard.
1681 * gdbthread.h: Rename include guard.
1682 * gdb_proc_service.h: Rename include guard.
1683 * event-loop.h: Rename include guard.
1684 * dll.h: Rename include guard.
1685 * debug.h: Rename include guard.
1686 * ax.h: Rename include guard.
1688 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1691 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1692 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1694 2019-01-25 Tom Tromey <tom@tromey.com>
1696 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1698 2019-01-25 Tom Tromey <tom@tromey.com>
1700 * win32-low.c: Fix common/ includes.
1701 * win32-i386-low.c: Fix common/ includes.
1702 * tracepoint.c: Fix common/ includes.
1703 * thread-db.c: Fix common/ includes.
1704 * target.h: Fix common/ includes.
1705 * symbol.c: Fix common/ includes.
1706 * spu-low.c: Fix common/ includes.
1707 * server.h: Fix common/ includes.
1708 * server.c: Fix common/ includes.
1709 * remote-utils.c: Fix common/ includes.
1710 * regcache.h: Fix common/ includes.
1711 * regcache.c: Fix common/ includes.
1712 * nto-x86-low.c: Fix common/ includes.
1713 * notif.h: Fix common/ includes.
1714 * mem-break.h: Fix common/ includes.
1715 * lynx-low.c: Fix common/ includes.
1716 * lynx-i386-low.c: Fix common/ includes.
1717 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1718 * linux-x86-low.c: Fix common/ includes.
1719 * linux-low.c: Fix common/ includes.
1720 * inferiors.h: Fix common/ includes.
1721 * i387-fp.c: Fix common/ includes.
1722 * hostio.c: Fix common/ includes.
1723 * hostio-errno.c: Fix common/ includes.
1724 * gdbthread.h: Fix common/ includes.
1725 * gdbreplay.c: Fix common/ includes.
1726 * fork-child.c: Fix common/ includes.
1727 * event-loop.c: Fix common/ includes.
1729 (enum gdb_agent_op): Fix common/ includes.
1731 2019-01-21 Tom Tromey <tom@tromey.com>
1733 * tracepoint.c: Fix includes.
1734 * remote-utils.c: Fix includes.
1735 * linux-x86-low.c: Fix includes.
1737 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1739 * gdbreplay.c (gdbreplay_version): Update copyright year in
1741 * server.c (gdbserver_version): Likewise.
1743 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1745 * linux-low.c (add_lwp): Switch ordering.
1747 2018-11-29 Tom Tromey <tom@tromey.com>
1749 * win32-low.c (win32_join): Take pid, not process.
1750 * target.h (struct target_ops) <join>: Change argument type.
1751 (join_inferior): Change argument name.
1752 * spu-low.c (spu_join): Take pid, not process.
1753 * server.c (handle_detach): Preserve pid before destroying
1755 * lynx-low.c (lynx_join): Take pid, not process.
1756 * linux-low.c (linux_join): Take pid, not process.
1758 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1760 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1761 (aarch64_cannot_fetch_register): Likewise.
1762 (struct linux_target_ops): Update references.
1764 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1766 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1768 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1770 * configure.srv (ipa_ppc_linux_regobj): Add
1771 powerpc-isa207-htm-vsx32l-ipa.o and
1772 powerpc-isa207-htm-vsx64l-ipa.o.
1773 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1774 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1775 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1776 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1777 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1778 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1779 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1780 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1781 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1782 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1783 (init_registers_powerpc_isa207_htm_vsx32l)
1784 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1785 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1786 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1787 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1788 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1789 (ppc_store_tm_ctarregset): New functions.
1790 (ppc_regsets): Add entries for HTM regsets.
1791 (ppc_arch_setup): Set htm in features struct when needed. Set
1792 sizes for the HTM regsets.
1793 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1794 (initialize_low_arch): Call
1795 init_registers_powerpc_isa207_htm_vsx32l and
1796 init_registers_powerpc_isa207_htm_vsx64l.
1797 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1798 PPC_TDESC_ISA207_HTM_VSX.
1799 (initialize_low_tracepoint): Call
1800 init_registers_powerpc_isa207_htm_vsx32l and
1801 init_registers_powerpc_isa207_htm_vsx64l.
1803 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1805 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1806 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1807 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1808 (ppc_store_pmuregset): New functions.
1809 (ppc_regsets): Add entries for ebb and pmu regsets.
1810 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1811 pmu regsets are available. Set sizes for these regsets.
1813 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1815 * configure.srv (ipa_ppc_linux_regobj): Add
1816 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1817 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1818 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1819 rs6000/powerpc-isa207-vsx32l.xml, and
1820 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1821 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1822 <PPC_TDESC_ISA207_VSX>: New enum value.
1823 (init_registers_powerpc_isa207_vsx32l): Declare.
1824 (init_registers_powerpc_isa207_vsx64l): Declare.
1825 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1826 (ppc_store_tarregset): New function.
1827 (ppc_regsets): Add entry for the TAR regset.
1828 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1829 size for the TAR regsets.
1830 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1831 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1832 and init_registers_powerpc_isa207_vsx64l.
1833 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1834 (initialize_low_tracepoint): Call
1835 init_registers_powerpc_isa207_vsx32l and
1836 init_registers_powerpc_isa207_vsx64l.
1838 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1839 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1841 * configure.srv (ipa_ppc_linux_regobj): Add
1842 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1843 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1844 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1845 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1846 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1847 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1848 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1849 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1850 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1851 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1852 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1853 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1854 (ppc_hwcap): Add comment.
1855 (ppc_hwcap2): New global.
1856 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1857 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1858 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1859 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1860 when needed. Set sizes for the the DSCR and PPR regsets.
1861 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1862 (initialize_low_arch): Call
1863 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1864 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1865 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1866 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1867 (initialize_low_tracepoint): Call
1868 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1869 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1871 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1873 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1875 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1876 Simon Marchi <simark@simark.ca>
1878 * acinclude.m4: Include "../selftest.m4".
1879 * configure: Regenerate.
1880 * configure.ac: Use "GDB_AC_SELFTEST".
1881 * configure.srv: Use "$enable_unittests" instead of
1882 "$development" when checking whether unit tests have been
1884 * server.c (captured_main): Update message informing that
1885 selftests have been disabled.
1887 2018-10-04 Tom Tromey <tom@tromey.com>
1889 * configure: Rebuild.
1891 2018-10-04 Tom Tromey <tom@tromey.com>
1893 * server.c (handle_status): Rename inner "thread".
1894 (process_serial_event): Declare "res" in 'm' case.
1895 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1896 (iterate_over_lwps): Rename inner "thread".
1897 (linux_qxfer_libraries_svr4): Rename inner "len".
1898 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1900 2018-10-01 Gary Benson <gbenson@redhat.com>
1902 * gdb_proc_service.h: Moved common code to
1903 common/gdb_proc_service.h.
1905 2018-10-01 Gary Benson <gbenson@redhat.com>
1907 * gdb_proc_service.h: Synchronize comments and whitespace with
1908 GDB's version of this file.
1910 2018-09-25 Tom Tromey <tom@tromey.com>
1912 * configure: Rebuild.
1913 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1915 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1917 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1918 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1919 ($(IPA_LIB)): Sort IPA_OBJS.
1921 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1923 * Makefile.in: Remove references to $(ADD_DEPS).
1925 2018-09-16 Tom Tromey <tom@tromey.com>
1927 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1929 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1932 2018-09-05 Tom Tromey <tom@tromey.com>
1934 * configure: Rebuild.
1936 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1939 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1941 2018-08-27 Tom Tromey <tom@tromey.com>
1944 * configure: Rebuild.
1946 2018-08-27 Tom Tromey <tom@tromey.com>
1948 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1949 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1950 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1951 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1952 (s390x_emit_stack_adjust): Add casts to unsigned char.
1954 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1958 * server.h (struct client_state) <disable_randomization>:
1961 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1963 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1965 (mips_supply_ptrace_register): Likewise.
1967 2018-07-22 Tom Tromey <tom@tromey.com>
1969 * configure: Rebuild.
1971 2018-07-22 Tom Tromey <tom@tromey.com>
1973 * win32-low.c (win32_create_inferior): Remove unused variables.
1974 * gdbreplay.c (remote_open): Remove unused variable.
1975 * remote-utils.c (remote_prepare): Remove unused variable.
1976 * x86-tdesc.h (X86_TDESC_H): Define.
1977 (amd64_expedite_regs): Define conditionally.
1978 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1979 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1980 * remote-utils.c (readchar): Remove unused variable.
1982 2018-07-13 Pedro Alves <palves@redhat.com>
1984 * linux-low.c (linux_kill): Change parameter to process_info
1985 pointer instead of pid. Adjust.
1986 * lynx-low.c (lynx_kill): Likewise.
1987 * nto-low.c (nto_kill): Likewise.
1988 * spu-low.c (spu_kill): Likewise.
1989 * win32-low.c (win32_kill): Likewise.
1990 * server.c (handle_v_kill, kill_inferior_callback)
1991 (detach_or_kill_for_exit): Adjust.
1992 * target.c (kill_inferior): Change parameter to process_info
1993 pointer instead of pid. Adjust.
1994 * target.h (struct target_ops) <kill>: Change parameter to
1995 process_info pointer instead of pid. Adjust all implementations
1997 (kill_inferior): Likewise.
1999 2018-07-13 Pedro Alves <palves@redhat.com>
2001 * linux-low.c (linux_detach, linux_join): Change parameter to
2002 process_info pointer instead of pid. Adjust.
2003 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2004 * nto-low.c (nto_detach): Likewise.
2005 * spu-low.c (spu_detach, spu_join): Likewise.
2006 * win32-low.c (win32_detach, win32_join): Likewise.
2007 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2008 * target.h (struct target_ops) <detach, join>: Change parameter to
2009 process_info pointer instead of pid. Adjust all implementations
2011 (detach_inferior, join_inferior): Rename 'pid' parameter to
2014 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2015 Jan Kratochvil <jan.kratochvil@redhat.com>
2016 Paul Fertser <fercerpav@gmail.com>
2017 Tsutomu Seki <sekiriki@gmail.com>
2019 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2020 (OBS): Add 'common/netstuff.o'.
2021 (GDBREPLAY_OBS): Likewise.
2022 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2023 (remote_open): Implement support for IPv6
2025 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2027 (handle_accept_event): Accept connections from IPv6 sources.
2028 (remote_prepare): Handle IPv6-style hostnames; implement
2029 support for IPv6 connections.
2030 (remote_open): Implement support for printing connections from
2033 2018-07-11 Pedro Alves <palves@redhat.com>
2036 * mem-break.c (any_persistent_commands): Add process_info
2037 parameter and use it instead of relying on the current process.
2038 Change return type to bool.
2039 * mem-break.h (any_persistent_commands): Add process_info
2040 parameter and change return type to bool.
2041 * server.c (handle_detach): Remove require_running_or_return call.
2042 Look up the process_info for the process we're about to detach.
2043 If not found, return back error to GDB. Adjust
2044 any_persistent_commands call to pass down a process pointer.
2046 2018-07-11 Pedro Alves <palves@redhat.com>
2048 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2049 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2050 instead of collect_register_by_name.
2051 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2052 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2054 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2055 Pedro Alves <palves@redhat.com>
2057 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2059 2018-07-03 Tom Tromey <tom@tromey.com>
2061 * linux-low.c: Update.
2062 * lynx-low.c: Update.
2063 * mem-break.c: Update.
2064 * nto-low.c: Update.
2065 * remote-utils.c: Update.
2067 * spu-low.c: Update.
2069 * win32-low.c: Update.
2071 2018-07-03 Tom Tromey <tom@tromey.com>
2075 2018-07-03 Tom Tromey <tom@tromey.com>
2077 * linux-low.c: Update.
2079 2018-07-03 Tom Tromey <tom@tromey.com>
2083 2018-07-03 Tom Tromey <tom@tromey.com>
2085 * linux-low.c: Update.
2086 * linux-mips-low.c: Update.
2087 * lynx-low.c: Update.
2088 * nto-low.c: Update.
2089 * remote-utils.c: Update.
2091 * spu-low.c: Update.
2093 * thread-db.c: Update.
2095 2018-07-03 Tom Tromey <tom@tromey.com>
2097 * linux-low.c: Update.
2098 * linux-mips-low.c: Update.
2099 * lynx-low.c: Update.
2100 * mem-break.c: Update.
2101 * nto-low.c: Update.
2102 * remote-utils.c: Update.
2104 * spu-low.c: Update.
2106 * tracepoint.c: Update.
2108 2018-07-03 Tom Tromey <tom@tromey.com>
2110 * linux-low.c: Update.
2111 * linux-ppc-low.c: Update.
2112 * linux-x86-low.c: Update.
2113 * proc-service.c: Update.
2115 * spu-low.c: Update.
2116 * thread-db.c: Update.
2117 * win32-low.c: Update.
2119 2018-07-03 Tom Tromey <tom@tromey.com>
2121 * linux-low.c: Update.
2122 * lynx-low.c: Update.
2123 * nto-low.c: Update.
2124 * remote-utils.c: Update.
2125 * spu-low.c: Update.
2126 * thread-db.c: Update.
2127 * win32-low.c: Update.
2129 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2131 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2132 parameter in call to 'amd64_create_target_description'.
2134 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2136 * x86-tdesc.h: Remove executable permission flag.
2138 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2140 * configure.ac: Remove AC_PREREQ, add missing quoting.
2141 * configure: Re-generate.
2142 * config.in: Re-generate.
2143 * aclocal.m4: Re-generate.
2145 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2147 * tracepoint.h (current_traceframe): Remove declaration.
2149 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2151 * linux-aarch64-low.c (is_sve_tdesc): New function.
2152 (aarch64_sve_regs_copy_to_regcache): Likewise.
2153 (aarch64_sve_regs_copy_from_regcache): Likewise.
2154 (aarch64_regs_info): Add SVE checks.
2155 (initialize_low_arch): Initialize SVE.
2157 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2159 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2161 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2163 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2164 (initialize_low_tracepoint): Likewise
2165 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2166 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2168 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2170 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2172 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2174 * server.h (PBUFSIZ): Increase size
2176 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2178 * regcache.c (regcache::raw_compare): New function.
2179 * regcache.h (regcache::raw_compare): New declaration.
2181 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2183 * regcache.c (new_register_cache): Use new.
2184 (free_register_cache): Use delete.
2185 (register_data): Use const.
2186 (supply_register): Move body inside regcache.
2187 (regcache::raw_supply): New override function.
2188 (collect_register): Move body inside regcache.
2189 (regcache::raw_collect): New override function.
2190 (regcache::get_register_status): New override function.
2191 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2193 2018-06-09 Tom Tromey <tom@tromey.com>
2195 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2197 (event_queue): Use std::queue.
2198 (gdb_event_xfree): Remove.
2199 (initialize_event_loop, process_event, wait_for_event): Update.
2201 2018-06-08 Stan Cox <scox@redhat.com>
2203 * win32-low.c (win32_create_inferior): last_ptid and last_status
2204 moved to client_state.
2206 2018-06-08 Pedro Alves <palves@redhat.com>
2208 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2209 common/common-exceptions.o, common/common-utils.o,
2210 common/errors.o, common/print-utils.o and utils.o.
2211 * gdbreplay.c: Include "common-defs.h" instead of the two
2212 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2213 string.h or alloca.h.
2214 (perror_with_name): Delete.
2215 (remote_open): Use xstrdup instead of strdup.
2216 (main): Rename to ...
2217 (captured_main): ... this.
2220 2018-06-08 Tom Tromey <tom@tromey.com>
2222 * linux-low.c (linux_low_read_btrace): Update.
2224 2018-06-04 Stan Cox <scox@redhat.com>
2226 * server.h (struct client_state): New.
2227 * server.c (cont_thread, general_thread, multi_process)
2228 (report_fork_events, report_vfork_events, report_exec_events)
2229 (report_thread_events, swbreak_feature, hwbreak_feature)
2230 (vCont_supported, disable_randomization, pass_signals)
2231 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2232 Moved to client_state.
2233 * remote-utils.c (remote_debug, noack_mode)
2234 (transport_is_reliable): Moved to client_state.
2235 * tracepoint.c (current_traceframe): Moved to client_state.
2238 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2239 linux-low.c, remote-utils.h, target.c: Use client_state.
2241 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2243 * configure.srv: Add new c/h file.
2245 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2247 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2250 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2252 * gdb.arch/mips-fpregset-core.exp: New test.
2253 * gdb.arch/mips-fpregset-core.c: New test source.
2255 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2258 * hostio.c (require_int): Do not report overflow for integers
2259 between 0xfffffff and 0x7fffffff.
2261 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2263 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2264 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2265 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2267 (the_low_target): Wire them.
2269 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2271 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2272 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2273 mode. Call collect_register_by_name with vscr using
2274 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2275 (ppc_store_vrregset): Add and set vscr_offset variable as in
2276 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2279 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2281 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2282 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2283 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2285 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2287 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2288 (ppc_store_vsxregset): Likewise.
2289 (ppc_fill_vrregset): Likewise.
2290 (ppc_store_vrregset): Likewise.
2291 (ppc_fill_evrregset): Likewise.
2292 (ppc_store_evrregset): Likewise.
2293 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2294 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2297 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2299 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2300 wordsize of the inferior. Call ppc_linux_target_wordsize.
2302 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2304 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2305 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2306 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2307 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2308 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2309 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2310 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2311 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2312 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2313 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2314 (tdesc_powerpc_e500l): Remove.
2315 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2316 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2317 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2318 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2320 (ppc_arch_setup): Remove target description matching code. Fill a
2321 ppc_linux_features struct and call ppc_linux_match_description
2324 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2326 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2327 width of the requested register exceeds the width of the
2329 (mips_cannot_store_register): Likewise.
2331 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2333 * linux-mips-low.c (mips_fetch_register): New function. Update
2335 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2336 (the_low_target): Wire `mips_fetch_register'.
2338 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2340 * lynx-i386-low.c (LYNXOS_178): New macro.
2341 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2342 the layout on LynxOS-178.
2343 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2344 handle floating point registers that are not supported by
2347 2018-05-10 Tom Tromey <tom@tromey.com>
2349 * configure: Rebuild.
2351 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2354 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2355 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2356 Use it to set the expedite_regs field in the given tdesc.
2357 * x86-tdesc.h: New file.
2358 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2359 Adjust following the addition of the new expedite_regs parameter
2360 to init_target_desc.
2361 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2362 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2363 (i386_linux_read_description, amd64_linux_read_description):
2364 Adjust following the addition of the new expedite_regs parameter
2365 to init_target_desc.
2366 * lynx-i386-low.c: #include "x86-tdesc.h".
2367 (lynx_i386_arch_setup): Adjust following the addition of the new
2368 expedite_regs parameter to init_target_desc.
2369 * nto-x86-low.c: #include "x86-tdesc.h".
2370 (nto_x86_arch_setup): Adjust following the addition of the new
2371 expedite_regs parameter to init_target_desc.
2372 * win32-i386-low.c: #include "x86-tdesc.h".
2373 (i386_arch_setup): Adjust following the addition of the new
2374 expedite_regs parameter to init_target_desc.
2376 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2379 * win32-low.c (win32_create_inferior): Add call to my_wait
2380 setting last_status global.
2382 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2385 * win32-low.c (create_process): Only call gdb_tilde_expand if
2386 inferior_cwd is not NULL.
2388 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2390 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2391 registers to the cache if their values have changed.
2392 (i387_xsave_to_cache): Provide default values for x87 control
2393 registers when these features are available, but disabled.
2394 * regcache.c (supply_register_by_name_zeroed): New function.
2395 * regcache.h (supply_register_by_name_zeroed): Declare new
2398 2018-05-07 Tom Tromey <tom@tromey.com>
2400 * configure: Rebuild.
2402 2018-05-04 Tom Tromey <tom@tromey.com>
2404 * configure: Rebuild.
2406 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2407 Pedro Alves <palves@redhat.com>
2409 * linux-aarch64-low.c (aarch64_stopped_data_address):
2412 2018-04-27 Tom Tromey <tom@tromey.com>
2414 * configure: Rebuild.
2416 2018-04-23 Tom Tromey <tom@tromey.com>
2418 * configure: Rebuild.
2420 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2422 * Makefile.in (depcomp): Add "..".
2423 (all_deps_files): New and use it.
2425 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2427 * configure.srv (aarch64*-*-linux*): Don't include xml.
2428 (i[34567]86-*-cygwin*): Likewise.
2429 (i[34567]86-*-linux*): Likewise.
2430 (i[34567]86-*-lynxos*): Likewise.
2431 (i[34567]86-*-mingw32ce*): Likewise.
2432 (i[34567]86-*-mingw*): Likewise.
2433 (i[34567]86-*-nto*): Likewise.
2434 (tic6x-*-uclinux): Likewise.
2435 (x86_64-*-linux*): Likewise.
2436 (x86_64-*-mingw*): Likewise.
2437 (x86_64-*-cygwin*): Likewise.
2439 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2441 * tdesc.c: Remove xml parameter.
2443 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2445 * server.c (get_features_xml): Remove cast.
2446 * tdesc.c (void target_desc::accept): Fill in function.
2447 (tdesc_get_features_xml): Remove old xml creation.
2448 (print_xml_feature::visit_pre): Add xml vistor.
2449 * tdesc.h (struct target_desc): Make xmltarget mutable.
2450 (tdesc_get_features_xml): Remove declaration.
2452 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2454 * tdesc.c (tdesc_architecture_name): Add new function.
2455 (tdesc_osabi_name): Likewise.
2456 (tdesc_get_features_xml): Use new functions.
2458 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2460 * tdesc.c (tdesc_create_flags): Remove.
2461 (tdesc_add_flag): Likewise.
2462 (tdesc_named_type): Likewise.
2463 (tdesc_create_union): Likewise.
2464 (tdesc_create_struct): Likewise.
2465 (tdesc_create_vector): Likewise.
2466 (tdesc_add_bitfield): Likewise.
2467 (tdesc_add_field): Likewise.
2468 (tdesc_set_struct_size): Likewise.
2470 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2472 * tdesc.c (~target_desc): Remove implictly deleted items.
2473 (init_target_desc): Iterate all features.
2474 (tdesc_get_features_xml): Use vector.
2475 (tdesc_create_feature): Create feature.
2476 * tdesc.h (tdesc_feature) Remove
2477 (target_desc): Add features.
2479 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2481 * Makefile.in: Add common/tdesc.c
2482 * tdesc.c (init_target_desc): init all reg_defs from register
2484 (tdesc_create_reg): Create tdesc_reg.
2485 * tdesc.h (tdesc_feature): Add register vector.
2487 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2489 * tdesc.h (struct target_desc) <features>: Change type to
2490 std::vector<std::string>.
2491 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2493 (tdesc_get_features_xml): Likewise.
2494 (tdesc_create_feature): Likewise.
2496 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2498 * regcache.c (find_register_by_number): Return a ref.
2499 (find_regno): Use references.
2500 (register_size): Likewise.
2501 (register_data): Likewise.
2502 * tdesc.c (target_desc::~target_desc): Remove free calls.
2503 (target_desc::operator==): Use std::vector compare.
2504 (init_target_desc): Use reference.
2505 (tdesc_create_reg): Use reg constructors.
2506 * tdesc.h (struct target_desc): Replace pointer with object.
2508 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2510 * regcache.c (find_register_by_number): Make static.
2511 (find_regno): Use find_register_by_number
2512 * regcache.h (struct reg): Remove declaration.
2514 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2516 * tdesc.c (target_desc::~target_desc): Move to here.
2517 (target_desc::operator==): Likewise.
2518 * tdesc.h (target_desc::~target_desc): Move from here.
2519 (target_desc::operator==): Likewise.
2521 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2523 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2525 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2527 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2529 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2530 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2531 and init_registers_s390_gs_linux64.
2533 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2535 * linux-s390-low.c (s390_fill_gs): Remove function.
2536 (s390_fill_gsbc): Remove function.
2537 (s390_regsets): Set fill functions for the guarded storage regsets
2540 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2542 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2543 the word size. Add comment.
2544 (s390_get_wordsize): New function.
2545 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2546 pswm with it. Instead, use s390_get_wordsize to determine the
2547 word size first and derive the correct tdesc from that directly.
2549 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2551 * Makefile.in: Include silent-rules.mk.
2552 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2553 (COMPILE): Add ECHO_CXX.
2554 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2555 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2556 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2557 (version-generated.c): Add ECHO_GEN.
2558 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2559 (IPAGENT_COMPILE): Add ECHO_CXX.
2560 (%-generated.c): Add ECHO_REGDAT.
2562 2018-03-14 Tom Tromey <tom@tromey.com>
2565 * ax.c (ax_printf): Special case for NULL.
2567 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2569 * linux-low.c (linux_qxfer_libraries_svr4): Use
2570 xml_escape_text_append.
2572 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2574 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2576 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2578 * server.c (handle_general_set): Remove unnecessary xstrdup.
2580 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2582 * server.c (parse_debug_format_options): Adjust to
2583 delim_string_to_char_ptr_vec changes.
2584 * thread-db.c (thread_db_load_search): Adjust to
2585 dirnames_to_char_ptr_vec changes.
2587 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2589 * target.h (target_enable_btrace, target_disable_btrace)
2590 (target_read_btrace, target_read_btrace_conf): Turn macro into
2591 inline function. Throw error if target method is not defined.
2592 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2593 check for btrace target method. Be prepared to handle exceptions
2594 from btrace target methods.
2596 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2598 * server.c (captured_main): Change order of error message printed
2599 when the current working directory cannot be found.
2601 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2603 * server.c: Include "filenames.h" and "pathstuff.h".
2604 (program_name): Delete variable.
2605 (program_path): New anonymous class.
2606 (get_exec_wrapper): Use "program_path" instead of
2608 (handle_v_run): Likewise.
2609 (captured_main): Likewise.
2610 (process_serial_event): Likewise.
2612 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2614 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2615 (OBJS): Add "pathstuff.o".
2616 * server.c (current_directory): New global variable.
2617 (captured_main): Initialize "current_directory".
2619 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2621 * tdesc.c: Use common/tdesc.h.
2622 * tdesc.h: Likewise.
2624 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2625 Simon Marchi <simon.marchi@ericsson.com>
2627 * Makefile.in: Switch order of make rules.
2629 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2631 * Makefile.in: Add common directory in build.
2632 * configure.ac: Add common reference.
2633 * configure: Regenerate.
2635 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2637 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2638 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2639 * spu-low.c (spu_target_ops): Likewise.
2640 * win32-low.c (win32_target_ops): Likewise.
2641 * server.c (supported_btrace_packets): Report packets unconditionally.
2642 * target.h (target_ops) <supports_btrace>: Remove.
2643 (target_supports_btrace): Remove.
2645 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2647 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2648 (handle_btrace_disable): Change return type to void. Use exceptions
2650 (handle_btrace_general_set): Catch exception and copy message to
2653 2018-02-08 Tom Tromey <tom@tromey.com>
2655 * linux-low.c (install_software_single_step_breakpoints): Use
2656 make_scoped_restore.
2657 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2658 (do_restore_current_thread_cleanup): Remove.
2659 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2662 2018-02-08 Tom Tromey <tom@tromey.com>
2664 * mem-break.c (set_raw_breakpoint_at): Use
2665 gdb::unique_xmalloc_ptr.
2667 2018-01-30 Pedro Alves <palves@redhat.com>
2670 * target.c (target_terminal::terminal_state): Rename to ...
2671 (target_terminal::m_terminal_state): ... this.
2673 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2675 * linux-low.c (handle_extended_wait): Surround call to
2676 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2678 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2680 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2681 linux_ptrace_attach_fail_reason_string now returning an
2683 (linux_attach): Likewise.
2684 * thread-db.c (attach_thread): Likewise.
2686 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2689 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2690 checking for fs_base/gs_base fields in struct user_regs_struct.
2691 * configure: Regenerate.
2693 2018-01-16 Yao Qi <yao.qi@linaro.org>
2696 * linux-low.c (fetch_register): Call supply_register instead of
2699 2018-01-08 Yao Qi <yao.qi@linaro.org>
2700 Simon Marchi <simon.marchi@ericsson.com>
2702 * Makefile.in (OBS): Remove selftest.o.
2703 * configure.ac: Set srv_selftest_objs if $development is true.
2704 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2705 * configure: Re-generated.
2706 * server.c (captured_main): Wrap variable selftest_filter with
2709 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2711 * server.c (parse_debug_format_options): Return std::string.
2712 (handle_monitor_command, captured_main): Adjust.
2714 2018-01-05 Pedro Alves <palves@redhat.com>
2717 * server.c (captured_main): Pass quiet=false to
2718 save_original_signals_state.
2720 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2722 * gdbreplay.c (gdbreplay_version): Update copyright year in
2724 * server.c (gdbserver_version): Likewise.
2726 2017-12-08 Tom Tromey <tom@tromey.com>
2728 * ax.c (ax_printf): Update.
2730 2017-12-07 Yao Qi <yao.qi@linaro.org>
2732 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2733 aarch64_linux_read_description.
2734 * linux-amd64-ipa.c (idx2mask): New array.
2735 (get_ipa_tdesc): Move idx2mask out.
2736 (initialize_low_tracepoint): Initialize target descriptions.
2737 * linux-i386-ipa.c (idx2mask): New array.
2738 (get_ipa_tdesc): Move idx2mask out.
2739 (initialize_low_tracepoint): Initialize target descriptions.
2741 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2743 * tdesc.c (struct tdesc_type): Change return type.
2744 (tdesc_add_flag): Change parameter type.
2745 (tdesc_add_bitfield): Likewise.
2746 (tdesc_add_field): Likewise.
2747 (tdesc_set_struct_size): Likewise.
2749 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2751 * regcache.c (registers_to_string): Remove unused variable.
2753 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2755 * inferiors.c (for_each_inferior_with_data): Remove.
2756 * inferiors.h (for_each_inferior_with_data): Remove.
2757 * server.c (handle_qxfer_threads_worker): Change parameter type.
2758 (handle_qxfer_threads_proper): Use for_each_thread.
2760 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2762 * inferiors.c (for_each_inferior): Remove.
2763 (clear_inferiors): Use for_each_thread.
2764 * inferiors.h (for_each_inferior): Remove.
2765 * linux-low.c (linux_wait_for_event_filtered): Use
2767 (linux_stabilize_threads): Likewise.
2768 * regcache.c (regcache_release): Likewise.
2769 * server.c (gdb_wants_all_threads_stopped): Likewise.
2770 (clear_pending_status_callback): Remove.
2771 (handle_status): Use for_each_thread.
2772 (captured_main): Likewise.
2773 * win32-low.c (child_init_thread_list): Likewise.
2774 (win32_clear_inferiors): Likewise.
2775 (fake_breakpoint_event): Likewise.
2777 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2779 * inferiors.h (find_inferior): Remove.
2780 * inferiors.c (find_inferior): Remove.
2782 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2784 * linux-low.c (resume_status_pending_p): Update comment.
2785 (need_step_over_p): Update comment.
2787 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2789 * linux-low.c (proceed_one_lwp): Return void, change parameter
2791 (unsuspend_and_proceed_one_lwp): Likewise.
2792 (proceed_all_lwps): Use for_each_thread.
2793 (unstop_all_lwps): Likewise.
2795 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2797 * linux-low.c (linux_resume_one_thread): Return void, take
2799 (linux_resume): Use for_each_thread.
2801 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2803 * linux-low.c (send_sigstop_callback): Return void, change
2804 parameter type. Rename to...
2805 (send_sigstop): ... this.
2806 (suspend_and_send_sigstop_callback): Return void, change parameter
2808 (suspend_and_send_sigstop): ... this.
2809 (stop_all_lwps): Use for_each_thread.
2811 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2813 * linux-low.c (lwp_running): Return bool, remove unused
2815 (linux_stabilize_threads): Use find_thread.
2817 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2819 * linux-low.c (select_singlestep_lwp_callback): Remove.
2820 (count_events_callback): Remove.
2821 (select_event_lwp_callback): Remove.
2822 (select_event_lwp): Use find_thread/for_each_thread.
2824 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2826 * linux-low.c (not_stopped_callback): Return bool, take filter
2828 (linux_wait_for_event_filtered): Use find_thread.
2829 (linux_wait_1): Likewise.
2831 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2833 * linux-low.c (same_lwp): Remove.
2834 (find_lwp_pid): Use find_thread.
2836 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2838 * linux-low.c (delete_lwp_callback): Remove.
2839 (linux_mourn): Use for_each_thread.
2841 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2843 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2844 args parameter, don't check for pid.
2845 (linux_detach): Use for_each_thread.
2847 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2849 * linux-low.c (struct counter): Remove.
2850 (second_thread_of_pid_p): Remove.
2851 (last_thread_of_process_p): Use find_thread.
2853 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2855 * inferiors.c (find_inferior_in_random): Remove.
2856 * inferiors.h (find_inferior_in_random): Remove.
2857 * linux-low.c (status_pending_p_callback): Return bool, accept
2858 parameter ptid directly.
2859 (linux_wait_for_event_filtered): Use find_thread_in_random.
2860 (linux_wait_1): Likewise.
2862 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2864 * inferiors.c (find_inferior_id): Remove.
2865 (find_thread_ptid): Move implemention from find_inferior_id to
2867 * inferiors.h (find_inferior_id): Remove.
2868 * server.c (handle_status): Use find_thread_ptid.
2869 (process_serial_event): Likewise.
2870 * thread-db.c (find_one_thread): Likewise.
2871 (thread_db_thread_handle): Likewise.
2872 * win32-low.c (thread_rec): Likewise.
2873 (child_delete_thread): Likewise.
2874 (win32_thread_alive): Likewise.
2875 (get_child_debug_event): Likewise.
2877 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2879 * linux-mips-low.c (update_watch_registers_callback): Return
2880 void, remove pid_p parameter, don't check for pid.
2881 (mips_insert_point, mips_remove_point): Use for_each_thread.
2883 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2885 * lynx.low (lynx_delete_thread_callback): Remove.
2886 (lynx_mourn): Use for_each_thread.
2888 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2890 * regcache.c (regcache_invalidate_one): Remove.
2891 (regcache_invalidate_pid): use for_each_thread.
2893 2017-11-26 Tom Tromey <tom@tromey.com>
2895 * linux-low.c (linux_create_inferior): Update.
2897 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2899 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2901 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2903 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2904 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2905 * linux-aarch64-tdesc-selftest.c: New file.
2906 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2908 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2910 * configure.srv: Add new file.
2911 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2912 * linux-aarch64-tdesc-selftest.c: New file.
2913 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2915 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2917 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2918 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2919 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2921 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2923 * configure.srv: Add new files.
2924 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2925 aarch64_linux_read_description.
2926 * linux-aarch64-low.c (aarch64_linux_read_description):
2927 Merge with aarch64_arch_setup.
2928 (aarch64_arch_setup): Call aarch64_linux_read_description.
2929 * linux-aarch64-tdesc.c: New file.
2930 * linux-aarch64-tdesc.h: New file.
2932 2017-11-24 Yao Qi <yao.qi@linaro.org>
2934 * configure.srv: Set $srv_regobj for tic6x-linux.
2935 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2936 (tic6x_read_description): Move some code to tic6x_arch_setup.
2937 (tic6x_tdesc_test): New function.
2938 (initialize_low_arch): Call selftests::register_test.
2940 2017-11-22 Yao Qi <yao.qi@linaro.org>
2942 * remote-utils.c (prepare_resume_reply): Use memcpy.
2944 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2946 * linux-low.c (kill_one_lwp_callback): Return void, take
2947 argument directly, don't filter on pid.
2948 (linux_kill): Use for_each_thread.
2950 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2952 * linux-low.c (need_step_over_p): Return bool, remove dummy
2954 (linux_resume, proceed_all_lwps): Use find_thread.
2956 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2958 * linux-low.c (resume_status_pending_p): Return bool, remove
2960 (linux_resume): Use find_thread.
2962 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2964 * linux-low.c (struct thread_resume_array): Remove.
2965 (linux_set_resume_request): Return void, take arguments
2967 (linux_resume): Use for_each_thread.
2969 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2971 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2972 return bool, remove data argument.
2973 (linux_stabilize_threads): Use find_thread.
2975 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2977 * linux-low.c (unsuspend_one_lwp): Remove.
2978 (unsuspend_all_lwps): Use for_each_thread, inline code from
2981 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2983 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2984 * linux-low.c (struct iterate_over_lwps_args): Remove.
2985 (iterate_over_lwps_filter): Remove.
2986 (iterate_over_lwps): Use find_thread.
2988 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2990 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2991 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2992 code from reset_lwp_ptrace_options_callback.
2994 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2996 * linux-arm-low.c (struct update_registers_data): Remove.
2997 (update_registers_callback): Return void, take arguments
2998 directly, don't check thread's pid.
2999 (arm_insert_point, arm_remove_point): Use for_each_thread.
3001 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3003 * win32-low.c (continue_one_thread): Return void, take argument
3005 (child_continue): Use for_each_thread.
3007 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3009 * win32-i386-low.c (update_debug_registers_callback): Rename
3011 (update_debug_registers): ... this, return void, remove pid_p arg.
3012 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3014 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3016 * inferiors.h (struct process_info): Add constructor, initialize
3018 <syscalls_to_catch>: Change type to std::vector<int>.
3019 * inferiors.c (add_process): Allocate process_info with new.
3020 (remove_process): Free process_info with delete.
3021 * linux-low.c (handle_extended_wait): Adjust.
3022 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3023 * server.c (handle_general_set): Adjust.
3025 2017-11-16 Pedro Alves <palves@redhat.com>
3027 * remote-utils.c (remote_close): Block SIGIO signals instead of
3028 uninstalling the SIGIO handler.
3030 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3032 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3034 2017-11-16 Yao Qi <yao.qi@linaro.org>
3036 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3037 (tic6x_store_gregset): Likewise.
3038 (tic6x_usrregs_info): Move it up.
3040 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3042 * Makefile.in: Update arch rules.
3043 * configure.srv: Explicitly mark arch/ files.
3045 2017-11-13 Andreas Schwab <schwab@suse.de>
3047 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3049 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3051 2017-11-06 Pedro Alves <palves@redhat.com>
3053 * config.in, configure: Regenerate.
3055 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3057 * target.c (struct thread_search): Remove.
3058 (thread_search_callback): Remove.
3059 (prepare_to_access_memory): Use for_each_thread instead of
3060 find_inferior. Inline code from thread_search_callback.
3062 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3064 * server.c (struct visit_actioned_threads_data): Remove.
3065 (visit_actioned_threads): Change prototype to take arguments
3067 (resume): Use find_thread instead of find_inferior.
3069 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3071 * server.c (queue_stop_reply_callback): Change prototype, return
3073 (find_status_pending_thread_callback): Remove.
3074 (handle_status): Replace find_inferior with find_thread and
3077 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3079 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3081 (aarch64_store_gregset): Likewise.
3082 (aarch64_fill_fpregset): Likewise.
3083 (aarch64_store_fpregset): Likewise.
3085 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3087 * gdbthread.h (find_thread, for_each_thread): New functions.
3088 * inferiors.c (thread_of_pid): Remove.
3089 (find_any_thread_of_pid): Use find_thread.
3090 * linux-low.c (num_lwps): Use for_each_thread.
3092 2017-10-17 Yao Qi <yao.qi@linaro.org>
3094 * Makefile.in: Remove one rule.
3095 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3097 2017-10-17 Yao Qi <yao.qi@linaro.org>
3099 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3100 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3102 2017-10-17 Yao Qi <yao.qi@linaro.org>
3104 * configure.srv: Rename arm.o with arch/arm.o.
3106 2017-10-17 Yao Qi <yao.qi@linaro.org>
3108 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3109 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3110 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3111 (arch-i386.o, arch-amd64.o): Remove rules.
3112 (arch/%.o): New rule.
3113 Update POSTCOMPILE and COMPILE.pre.
3114 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3115 * configure: Re-generated.
3116 * configure.srv: Replace arch-i386.o with arch/i386.o.
3117 Replace arch-amd64.o with arch/amd64.o.
3119 2017-10-16 Yao Qi <yao.qi@linaro.org>
3121 * configure: Regenerated.
3123 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3125 * inferiors.h: (struct inferior_list): Remove.
3126 (struct inferior_list_entry); Remove.
3127 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3128 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3129 get_first_inferior): Remove.
3130 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3131 find_inferior_id, find_inferior_in_random): Change signature.
3132 * inferiors.c (all_threads): Change type to
3133 std::list<thread_info *>.
3134 (get_thread): Remove macro.
3135 (find_inferior, find_inferior_id): Change signature, implement
3137 (find_inferior_in_random): Change signature, implement using
3138 find_thread_in_random.
3139 (for_each_inferior, for_each_inferior_with_data): Change
3140 signature, implement using for_each_thread.
3141 (add_inferior_to_list, remove_inferior): Remove.
3142 (add_thread, get_first_thread, thread_of_pid,
3143 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3144 (get_first_inferior, one_inferior_p, clear_inferior_list):
3146 (clear_inferiors, get_thread_process): Update.
3147 * gdbthread.h: Include <list>.
3148 (struct thread_info) <entry>: Remove field.
3150 (all_threads): Change type to std::list<thread_info *>.
3151 (get_first_inferior): Add doc.
3152 (find_thread, for_each_thread, find_thread_in_random): New
3154 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3155 * linux-arm-low.c (update_registers_callback): Update.
3156 * linux-low.c (second_thread_of_pid_p): Update.
3157 (kill_one_lwp_callback, linux_detach_lwp_callback,
3158 delete_lwp_callback, status_pending_p_callback, same_lwp,
3159 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3160 iterate_over_lwps, not_stopped_callback,
3161 resume_stopped_resumed_lwps, count_events_callback,
3162 select_singlestep_lwp_callback, select_event_lwp_callback,
3163 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3164 suspend_and_send_sigstop_callback, wait_for_sigstop,
3165 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3166 lwp_running, linux_set_resume_request, resume_status_pending_p,
3167 need_step_over_p, start_step_over, linux_resume_one_thread,
3168 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3169 reset_lwp_ptrace_options_callback): Update.
3170 * linux-mips-low.c (update_watch_registers_callback): Update.
3171 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3173 (free_register_cache_thread_one): Remove.
3174 (regcache_release): Update.
3175 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3176 handle_qxfer_threads_worker): Update.
3177 (handle_query): Update, use list iterator.
3178 (visit_actioned_threads, handle_pending_status,
3179 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3180 clear_pending_status_callback, set_pending_status_callback,
3181 find_status_pending_thread_callback, handle_status,
3182 process_serial_event): Update.
3183 * target.c (thread_search_callback): Update.
3184 * thread-db.c (thread_db_get_tls_address): Update.
3185 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3187 * win32-i386-low.c (update_debug_registers_callback): Update.
3188 * win32-low.c (delete_thread_info, child_delete_thread,
3189 continue_one_thread, suspend_one_thread,
3190 get_child_debug_event): Adjust.
3192 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3194 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3195 * inferiors.h: Include <list>.
3196 (struct process_info) <entry>: Remove field.
3198 (pid_of): Change macro to function.
3199 (ptid_of, lwpid_of): Remove macro.
3200 (all_processes): Change type to std::list<process_info *>.
3201 (ALL_PROCESSES): Remove macro.
3202 (for_each_process, find_process): New function.
3203 * inferiors.c (all_processes): Change type to
3204 std::list<process_info *>.
3205 (find_thread_process): Adjust.
3206 (add_process): Likewise.
3207 (remove_process): Likewise.
3208 (find_process_pid): Likewise.
3209 (get_first_process): Likewise.
3210 (started_inferior_callback): Remove.
3211 (have_started_inferiors_p): Adjust.
3212 (attached_inferior_callback): Remove.
3213 (have_attached_inferiors_p): Adjust.
3214 * linux-low.c (check_zombie_leaders): Likewise.
3215 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3216 (x86_linux_update_xmltarget): Adjust.
3217 * server.c (handle_query): Likewise.
3218 (gdb_reattached_process): Remove.
3219 (handle_status): Adjust.
3220 (kill_inferior_callback): Likewise.
3221 (detach_or_kill_inferior): Remove.
3222 (print_started_pid): Likewise.
3223 (print_attached_pid): Likewise.
3224 (detach_or_kill_for_exit): Update.
3225 (process_serial_event): Likewise.
3226 * linux-arm-low.c (arm_new_fork): Likewise.
3228 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3230 * dll.h: Include <list>.
3231 (struct dll_info): Add constructor.
3232 <entry>: Remove field.
3233 (all_dlls): Change type to std::list<dll_info>.
3234 * dll.c: Include <algorithm>.
3235 (get_dll): Remove macro.
3236 (all_dlls): Change type to std::list<dll_info *>.
3237 (free_one_dll): Remove.
3238 (match_dll): Likewise.
3239 (loaded_dll): Adjust.
3240 (unloaded_dll): Adjust to all_dlls type change, use
3241 std::find_if. Inline code from match_dll.
3242 (clear_dlls): Adjust to all_dlls type change.
3243 * server.c (emit_dll_description): Remove.
3244 (handle_qxfer_libraries): Adjust to all_dlls type change,
3245 integrate emit_dll_description's functionality.
3247 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3249 * linux-low.h (struct linux_target_ops) <delete_process>: New
3251 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3252 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3253 (struct linux_target_ops): Add delete_process callback.
3254 * linux-arm-low.c (arm_delete_process): New.
3255 (struct linux_target_ops): Add delete_process callback.
3256 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3257 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3258 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3259 * linux-mips-low.c (mips_linux_delete_process): New.
3260 (struct linux_target_ops): Add delete_process callback.
3261 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3262 * linux-s390-low.c (struct linux_target_ops): Likewise.
3263 * linux-sh-low.c (struct linux_target_ops): Likewise.
3264 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3265 * linux-tile-low.c (struct linux_target_ops): Likewise.
3266 * linux-x86-low.c (x86_linux_delete_process): New.
3267 (struct linux_target_ops): Add delete_process callback.
3268 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3270 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3272 * linux-aarch64-low.c (the_low_target): Add thread delete
3274 * linux-arm-low.c (arm_delete_thread): New function.
3275 (the_low_target): Add thread delete callback.
3276 * linux-bfin-low.c (the_low_target): Likewise.
3277 * linux-crisv32-low.c (the_low_target): Likewise.
3278 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3280 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3282 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3283 * linux-mips-low.c (mips_linux_delete_thread): New function.
3284 (the_low_target): Add thread delete callback.
3285 * linux-ppc-low.c (the_low_target): Likewise.
3286 * linux-s390-low.c (the_low_target): Likewise.
3287 * linux-sh-low.c (the_low_target): Likewise.
3288 * linux-tic6x-low.c (the_low_target): Likewise.
3289 * linux-tile-low.c (the_low_target): Likewise.
3290 * linux-x86-low.c (the_low_target): Likewise.
3291 * linux-xtensa-low.c (the_low_target): Likewise.
3293 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3295 * win32-low.c: Include "common-inferior.h".
3297 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3299 * inferiors.c (set_inferior_cwd): New function.
3300 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3301 (handle_query): Inform that QSetWorkingDir is supported.
3302 * win32-low.c (create_process): Pass the inferior's cwd to
3305 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3307 * inferiors.c (current_inferior_cwd): New global variable.
3308 (get_inferior_cwd): New function.
3309 * inferiors.h (struct process_info) <cwd>: New field.
3311 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3313 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3314 (OBS): Add gdb_tilde_expand.o.
3316 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3318 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3319 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3321 2017-09-29 Pedro Alves <palves@redhat.com>
3323 * ax.c (gdb_parse_agent_expr): Constify.
3324 * ax.h (gdb_parse_agent_expr): Constify.
3325 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3327 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3328 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3329 * remote-utils.h (read_ptid): Constify.
3330 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3331 (process_point_options, process_serial_event): Constify.
3332 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3333 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3334 (cmd_qtbuffer): Constify.
3336 2017-09-29 Pedro Alves <palves@redhat.com>
3338 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3341 2017-09-29 Pedro Alves <palves@redhat.com>
3343 * linux-low.c (handle_extended_wait): Pass parent thread instead
3344 of process to thread_db_notice_clone.
3345 * linux-low.h (thread_db_notice_clone): Replace parent process
3346 parameter with parent thread parameter.
3347 * thread-db.c (find_one_thread): Add comment.
3348 (thread_db_notice_clone): Replace parent process parameter with
3349 parent thread parameter. Temporarily switch to the parent thread.
3351 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3353 * gdbthread.h: Include "common-gdbthread.h".
3354 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3355 "if" when validating the ptid.
3356 * remote-utils.c: Include "gdbthread.h".
3357 (prepare_resume_reply): Use "switch_to_thread".
3358 * target.c (done_accessing_memory): Likewise.
3360 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3362 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3363 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3364 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3365 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3366 s390x-gs-linux64-ipa.o to ipa_obj.
3367 * linux-s390-low.c (HWCAP_S390_GS): New define.
3368 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3370 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3371 (s390_arch_setup): Check for guarded-storage support and choose
3373 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3374 init_registers_s390x_gs_linux64.
3375 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3377 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3378 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3380 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3382 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3384 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3386 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3387 (thread_db_thread_handle): Declare.
3388 * linux-low.c (linux_target_ops): Initialize thread_handle.
3389 * server.c (handle_qxfer_threads_worker): Add support for
3391 * target.h (struct target_ops): Add new function pointer,
3393 (target_thread_handle): Define.
3394 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3396 (thread_db_thread_handle): New function.
3398 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3400 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3401 * linux-low.h (thread_db_notice_clone): Declare.
3402 * thread-db.c (thread_db_notice_clone): New function.
3404 2017-09-21 Pedro Alves <palves@redhat.com>
3406 * server.c (gdb_read_memory, handle_status, process_serial_event)
3407 (handle_serial_event, handle_target_event): Adjust to
3408 set_desired_thread prototype change.
3409 * target.c (set_desired_thread): Remove 'use_general' parameter
3411 * target.h (set_desired_thread): Remove 'use_general' parameter.
3413 2017-09-20 Tom Tromey <tom@tromey.com>
3415 * target.c (target_terminal::terminal_state): Define.
3416 (target_terminal::init): Rename from target_terminal_init.
3417 (target_terminal::inferior): Rename from
3418 target_terminal_inferior.
3419 (target_terminal::ours): Rename from target_terminal_ours.
3420 (target_terminal::ours_for_output, target_terminal::info): New.
3422 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3424 * server.c (accumulate_file_name_length): Remove.
3425 (emit_dll_description): Adjust to std::string change.
3426 (handle_qxfer_libraries): Use std::string to hold document.
3428 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3430 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3431 return type of xml_escape_text.
3432 * server.c (emit_dll_description): Likewise.
3434 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3436 * server.c (captured_main): Accept argument for --selftest.
3437 Update run_tests call.
3438 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3439 when registering selftests.
3441 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3443 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3444 instead of "VEC" for "target_desc.reg_defs".
3445 (regcache_cpy): Likewise.
3446 (registers_to_string): Likewise.
3447 (registers_from_string): Likewise.
3448 (find_regno): Likewise.
3449 (supply_regblock): Likewise.
3450 (regcache_raw_read_unsigned): Likewise.
3451 * tdesc.c (init_target_desc): Likewise.
3452 (tdesc_create_reg): Likewise.
3453 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3454 (struct target_desc) <reg_defs>: Convert to "std::vector".
3455 (target_desc): Do not initialize "reg_defs".
3456 (~target_desc): Update code to use "std::vector" instead of "VEC"
3457 for "target_desc.reg_defs".
3458 (operator==): Likewise.
3460 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3462 * inferiors.h (thread_to_gdb_id): Remove.
3463 * inferiors.c (thread_to_gdb_id): Remove.
3464 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3465 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3466 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3468 * nto-low.c (nto_fetch_registers, nto_store_registers,
3469 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3471 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3473 * inferiors.h (gdb_id_to_thread_id): Remove.
3474 * inferiors.c (gdb_id_to_thread_id): Remove.
3475 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3476 removal. Move pid declaration closer to where it's used.
3478 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3480 * server.c (handle_detach): New function.
3481 (process_serial_event): Move code out, call handle_detach.
3483 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3485 * server.c (require_running): Rename to ...
3486 (require_running_or_return): ... this ...
3487 (require_running_or_break): ... and this.
3488 (handle_query, process_serial_event): Adjust.
3490 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3492 * linux-low.c (linux_set_resume_request): Remove unused
3495 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3497 * server.c (first_thread_of): Remove.
3498 (process_serial_event): Replace usage of first_thread_of with
3499 find_any_thread_of_pid.
3500 * tracepoint.c (same_process_p): Remove.
3501 (gdb_agent_about_to_close): Replace usage of same_process_p with
3502 find_any_thread_of_pid.
3503 * linux-x86-low.c (same_process_callback): Remove.
3504 (x86_arch_setup_process_callback): Replace usage of
3505 same_process_callback with find_any_thread_of_pid.
3506 * thread-db.c (any_thread_of): Remove.
3507 (switch_to_process): Replace usage of any_thread_of with
3508 find_any_thread_of_pid.
3509 * inferiors.c (thread_pid_matches_callback): Remove.
3510 (find_thread_process): Adjust to use find_any_thread_of_pid.
3512 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3514 * regcache.c (get_thread_regcache): Guard calls to "memset"
3517 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3519 * linux-low.c (handle_extended_wait): Use
3520 "allocate_target_description" instead of "XNEW".
3521 * linux-x86-low.c (initialize_low_arch): Likewise.
3523 2017-09-05 Yao Qi <yao.qi@linaro.org>
3525 * configure.srv (srv_i386_regobj): Remove.
3526 (srv_amd64_regobj): Remove.
3527 (srv_regobj): Set it to "" for x86 non-linux targets.
3528 * linux-x86-tdesc.c (i386_linux_read_description):
3529 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3530 (init_registers_i386): Remove the declaration.
3531 (tdesc_i386): Remove the declaration.
3532 (lynx_i386_arch_setup): Call i386_create_target_description.
3533 * nto-x86-low.c: Likewise.
3534 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3535 [!__x86_64__]: include arch/i386.h.
3536 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3538 2017-09-05 Yao Qi <yao.qi@linaro.org>
3540 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3541 i386/amd64-XXX-linux from it.
3543 2017-09-05 Yao Qi <yao.qi@linaro.org>
3545 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3547 (ipa_amd64_linux_regobj): Remove.
3548 (ipa_x32_linux_regobj): Remove.
3550 2017-09-05 Yao Qi <yao.qi@linaro.org>
3552 * Makefile.in (arch-amd64.o): New rule.
3553 * configure.srv: Append arch-amd64.o.
3554 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3555 (get_ipa_tdesc): Call amd64_linux_read_description.
3556 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3557 and init_registers_amd64_XXX.
3558 * linux-x86-low.c (x86_linux_read_description): Call
3559 amd64_linux_read_description.
3560 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3561 (initialize_low_arch): Don't call init_registers_x32_XXX and
3562 init_registers_amd64_XXX.
3563 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3564 and tdesc_amd64_XXX.
3565 [__x86_64__] (amd64_tdesc_test): New function.
3566 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3567 and init_registers_amd64_XXX.
3568 * linux-x86-tdesc.c: Include arch/amd64.h.
3569 (xcr0_to_tdesc_idx): New function.
3570 (i386_linux_read_description): New function.
3571 (amd64_get_ipa_tdesc_idx): New function.
3572 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3573 (amd64_get_ipa_tdesc): Declare.
3575 2017-09-05 Yao Qi <yao.qi@linaro.org>
3577 * configure.srv (srv_i386_linux_xmlfiles): Remove
3578 i386/i386-XXX-linux.xml from it.
3580 2017-09-05 Yao Qi <yao.qi@linaro.org>
3582 * configure.srv: Set srv_i386_linux_regobj empty if $development
3584 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3585 initialize_low_tdesc.
3586 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3587 with #if initialize_low_tdesc.
3588 * linux-x86-tdesc-selftest.c: New file.
3589 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3591 2017-09-05 Yao Qi <yao.qi@linaro.org>
3593 * Makefile.in (arch-i386.o): New rule.
3594 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3595 (x86_64-*-linux*): Likewise.
3596 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3597 include arch/i386.h.
3598 (i386_linux_read_description): Remove code and call
3599 i386_create_target_description.
3600 * tdesc.c (allocate_target_description): New function.
3601 * tdesc.h (set_tdesc_architecture): Remove declaration.
3602 (set_tdesc_osabi): Likewise.
3604 2017-09-05 Yao Qi <yao.qi@linaro.org>
3606 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3607 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3608 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3610 * server.c (get_features_xml): Call tdesc_get_features_xml.
3611 * tdesc.c (set_tdesc_architecture): New function.
3612 (set_tdesc_osabi): New function.
3613 (tdesc_get_features_xml): New function.
3614 (tdesc_create_feature): Add an argument.
3615 * tdesc.h (struct target_desc) <features>: New field.
3616 <arch, osabi>: New field.
3617 (~target_desc): xfree features, arch, and osabi.
3618 (target_desc::oerator==): Don't compare .xmltarget.
3619 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3620 (set_tdesc_osabi): Likewise.
3621 (tdesc_get_features_xml): Likewise.
3623 2017-09-05 Yao Qi <yao.qi@linaro.org>
3625 * linux-x86-tdesc.c: Include selftest.h.
3626 (i386_tdesc_test): New function.
3627 (initialize_low_tdesc): Call selftests::register_test.
3628 * tdesc.h: Include regdef.h.
3629 (target_desc): Override operator == and !=.
3631 2017-09-05 Yao Qi <yao.qi@linaro.org>
3633 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3634 (ipa_obj): Likewise.
3635 * linux-i386-ipa.c: Include common/x86-xstate.h
3636 (get_ipa_tdesc): Call i386_linux_read_description.
3637 (initialize_low_tracepoint): Don't call init_registers_XXX
3638 functions, call initialize_low_tdesc instead.
3639 * linux-x86-low.c (x86_linux_read_description): Call
3640 i386_linux_read_description.
3641 (initialize_low_arch): Don't call init_registers_i386_XXX
3642 functions, call initialize_low_tdesc.
3643 * linux-x86-tdesc.c: New file.
3644 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3645 (i386_get_ipa_tdesc_idx): Declare.
3646 (i386_get_ipa_tdesc): Declare.
3647 (initialize_low_tdesc): Declare.
3649 2017-09-05 Yao Qi <yao.qi@linaro.org>
3651 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3654 2017-09-05 Yao Qi <yao.qi@linaro.org>
3656 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3657 * regcache.c (get_thread_regcache): Use VEC_length.
3658 (init_register_cache): Likewise.
3659 (regcache_cpy): Likewise.
3660 (registers_to_string): Iterate reg_defs via VEC_iterate.
3661 (find_regno): Likewise.
3662 (find_register_by_number): Use VEC_index.
3663 (register_size): Call find_register_by_number.
3664 (register_data): Call find_register_by_number.
3665 (supply_regblock): Use VEC_length.
3666 (regcache_raw_read_unsigned): Likewise.
3667 * tdesc.c (init_target_desc): Iterate reg_defs via
3669 (default_description): Update initializer.
3670 (copy_target_description): Don't update field num_registers.
3671 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3672 <num_registers>: Remove.
3674 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3676 * Makefile.in (.SECONDARY): Define target.
3678 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3680 * linux-low.c (linux_wait_1): Adjust.
3681 * server.c (queue_stop_reply_callback): Adjust.
3683 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3685 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3686 QEnvironmentUnset and QEnvironmentReset packets.
3687 (handle_query): Inform remote that QEnvironmentHexEncoded,
3688 QEnvironmentUnset and QEnvironmentReset are supported.
3690 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3692 * inferiors.h (inferior_target_data): Rename to ...
3693 (thread_target_data): ... this.
3694 (inferior_regcache_data): Rename to ...
3695 (thread_regcache_data): ... this.
3696 (set_inferior_regcache_data): Rename to ...
3697 (set_thread_regcache_data): ... this.
3698 * inferiors.c (inferior_target_data): Rename to ...
3699 (thread_target_data): ... this.
3700 (inferior_regcache_data): Rename to ...
3701 (thread_regcache_data): ... this.
3702 (set_inferior_regcache_data): Rename to ...
3703 (set_thread_regcache_data): ... this.
3704 (free_one_thread): Update.
3705 * linux-low.h (get_thread_lwp): Update.
3706 * regcache.c (get_thread_regcache): Update.
3707 (regcache_invalidate_thread): Update.
3708 (free_register_cache_thread): Update.
3709 * win32-i386-low.c (update_debug_registers_callback): Update.
3710 (win32_get_current_dr): Update.
3711 * win32-low.c (thread_rec): Update.
3712 (delete_thread_info): Update.
3713 (continue_one_thread): Update.
3714 (suspend_one_thread): Update.
3716 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3718 * inferiors.c (set_inferior_target_data): Remove.
3719 * inferiors.h (set_inferior_target_data): Remove.
3721 2017-08-18 Yao Qi <yao.qi@linaro.org>
3723 * Makefile.in (OBS): Add selftest.o.
3724 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3725 * configure, config.in: Re-generated.
3726 * server.c: Include common/sefltest.h.
3727 (captured_main): Handle option --selftest.
3729 2017-08-09 Yao Qi <yao.qi@linaro.org>
3731 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3732 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3733 i386-avx-mpx.o and i386-mmx.o.
3734 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3735 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3736 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3737 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3738 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3739 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3740 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3741 i386/amd64-avx-mpx.xml.
3743 2017-08-09 Yao Qi <yao.qi@linaro.org>
3745 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3746 and x32-avx-avx512.o.
3747 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3748 i386/x32-avx-avx512.xml.
3750 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3752 * tracepoint.h (enum class fast_tpoint_collect_result): New
3754 (fast_tracepoint_collecting): Change return type to
3755 fast_tpoint_collect_result.
3756 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3757 * linux-low.h: Include tracepoint.h.
3758 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3759 fast_tpoint_collect_result.
3760 * linux-low.c (handle_tracepoints): Adjust.
3761 (linux_fast_tracepoint_collecting): Change return type to
3762 fast_tpoint_collect_result.
3763 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3764 linux_wait_1, stuck_in_jump_pad_callback,
3765 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3766 proceed_one_lwp): Adjust to type change.
3768 2017-07-10 Yao Qi <yao.qi@linaro.org>
3770 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3772 2017-06-29 Yao Qi <yao.qi@linaro.org>
3774 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3776 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3778 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3780 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3782 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3784 * linux-low.c (linux_create_inferior): Adjust code to access the
3785 environment information via 'gdb_environ' class.
3786 * lynx-low.c (lynx_create_inferior): Likewise.
3787 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3788 (get_environ): Return a pointer to 'our_environ'.
3789 (captured_main): Initialize 'our_environ'.
3790 * server.h (get_environ): Adjust prototype.
3791 * spu-low.c (spu_create_inferior): Adjust code to access the
3792 environment information via 'gdb_environ' class.
3794 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3796 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3797 usage of "register" keyword.
3799 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3801 * configure: Re-generate.
3803 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3805 * configure: Re-generate.
3807 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3809 * Makefile.in (COMPILE.pre): Add "-x c++".
3811 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3813 * fork-child.c: Conditionally include <signal.h>.
3815 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3817 * server.c (handle_general_set): Handle new packet
3818 "QStartupWithShell".
3819 (handle_query): Add "QStartupWithShell" to the list of supported
3821 (gdbserver_usage): Add help text explaining the
3822 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3824 (captured_main): Recognize and act upon the presence of the new
3827 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3828 Pedro Alves <palves@redhat.com>
3830 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3831 * configure: Regenerate.
3832 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3834 (i[34567]86-*-lynxos*): Likewise.
3835 (spu*-*-*): Likewise.
3836 * fork-child.c: New file.
3837 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3839 (linux_ptrace_fun): New function.
3840 (linux_create_inferior): Adjust function prototype to reflect
3841 change on "target.h". Adjust function code to use
3843 (linux_request_interrupt): Delete "signal_pid".
3844 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3845 (lynx_ptrace_fun): New function.
3846 (lynx_create_inferior): Adjust function prototype to reflect
3847 change on "target.h". Adjust function code to use
3849 * nto-low.c (nto_create_inferior): Adjust function prototype and
3850 code to reflect change on "target.h". Update comments.
3851 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3852 "common-terminal.h" and "environ.h".
3853 (terminal_fd): Moved to fork-child.c.
3854 (old_foreground_pgrp): Likewise.
3855 (restore_old_foreground_pgrp): Likewise.
3856 (last_status): Make it global.
3857 (last_ptid): Likewise.
3858 (our_environ): New variable.
3859 (startup_with_shell): Likewise.
3860 (program_name): Likewise.
3861 (program_argv): Rename to...
3862 (program_args): ...this.
3863 (wrapper_argv): New variable.
3864 (start_inferior): Delete function.
3865 (get_exec_wrapper): New function.
3866 (get_exec_file): Likewise.
3867 (get_environ): Likewise.
3868 (prefork_hook): Likewise.
3869 (post_fork_inferior): Likewise.
3870 (postfork_hook): Likewise.
3871 (postfork_child_hook): Likewise.
3872 (handle_v_run): Update code to deal with arguments coming from the
3873 remote host. Update calls from "start_inferior" to
3875 (captured_main): Likewise. Initialize environment variable. Call
3877 * server.h (post_fork_inferior): New prototype.
3878 (get_environ): Likewise.
3879 (last_status): Declare.
3880 (last_ptid): Likewise.
3881 (signal_pid): Likewise.
3882 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3883 (spu_ptrace_fun): New function.
3884 (spu_create_inferior): Adjust function prototype to reflect change
3885 on "target.h". Adjust function code to use "fork_inferior".
3886 * target.c (target_terminal_init): New function.
3887 (target_terminal_inferior): Likewise.
3888 (target_terminal_ours): Likewise.
3889 * target.h: Include <vector>.
3890 (struct target_ops) <create_inferior>: Update prototype.
3891 (create_inferior): Update macro.
3892 * utils.c (gdb_flush_out_err): New function.
3893 * win32-low.c (win32_create_inferior): Adjust function prototype
3894 and code to reflect change on "target.h".
3896 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3898 * inferiors.c (switch_to_thread): New function.
3900 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3902 * Makefile.in (SFILE): Add "common/job-control.c".
3903 (OBS): Add "job-control.o".
3905 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3907 * Makefile: Remove "@host_makefile_frag@".
3909 2017-05-05 Pedro Alves <palves@redhat.com>
3911 * configure: Regenerate.
3913 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3915 * configure: Regenerate.
3917 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3919 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3920 software_single_step change of return type to
3921 std::vector<CORE_ADDR>.
3922 * linux-low.c (install_software_single_step_breakpoints):
3924 * linux-low.h (install_software_single_step_breakpoints):
3927 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3929 * remote-utils.c: Include "gdb_termios.h" instead of
3931 * terminal.h: Delete file.
3933 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3935 * server.c: Include <vector>.
3936 <program_argv, wrapper_argv>: Convert to std::vector.
3937 (start_inferior): Rewrite function to use C++.
3938 (handle_v_run): Likewise. Update code that calculates the argv
3939 based on the vRun packet; use C++.
3940 (captured_main): Likewise.
3942 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3944 * server.c (handle_v_cont): Initialize thread_resume::thread
3947 2017-04-05 Pedro Alves <palves@redhat.com>
3949 * configure: Regenerate.
3951 2017-04-05 Pedro Alves <palves@redhat.com>
3953 * gdbreplay.c (sync_error): Constify.
3954 * linux-x86-low.c (push_opcode): Constify.
3956 2017-04-05 Pedro Alves <palves@redhat.com>
3958 * win32-low.c (get_child_debug_event)
3959 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3960 Report TARGET_WAITKIND_SPURIOUS instead.
3962 2017-04-05 Pedro Alves <palves@redhat.com>
3964 * remote-utils.c (remote_prepare, remote_open): Constify.
3965 * remote-utils.h (remote_prepare, remote_open): Constify.
3966 * server.c (captured_main): Constify 'port' handling.
3968 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3970 * Makefile.in (clean): Clear .deps.
3972 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3974 * .gitignore: Remove generated files, replace with wildcard.
3975 * (clean): Replace removal of generated files with wildcard.
3976 (version.c): Replace with...
3977 (version-generated.c): ...this.
3978 (xml-builtin.c): Replace with...
3979 (xml-builtin-generated.c): ...this.
3980 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3981 (%.c: *regformats*): Replace with...
3982 (%-generated.c: *regformats*): ...this.
3984 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3986 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3987 (xtensa_fill_gregset): Call collect_register_by_name for
3989 (xtensa_store_gregset): Call supply_register_by_name for
3992 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3994 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3995 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3996 (xtensa_store_gregset): Call supply_register for all registers in
3997 a0_regnum..a0_regnum + C0_NREGS range.
3999 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4001 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4002 (ax-ipa.o: ax.c): Remove.
4003 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4004 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4005 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4006 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4007 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4009 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4011 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4012 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4013 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4014 (errors-ipa.o: ../common/errors.c): Remove.
4015 (format-ipa.o: ../common/format.c): Remove.
4016 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4018 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4020 * Makefile.in (%-ipa.o: %.c): New rule.
4021 (tracepoint-ipa.o: tracepoint.c): Remove.
4022 (utils-ipa.o: utils.c): Remove.
4023 (remote-utils-ipa.o: remote-utils.c): Remove.
4024 (regcache-ipa.o: regcache.c): Remove.
4025 (i386-linux-ipa.o: i386-linux.c): Remove.
4026 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4027 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4028 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4029 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4030 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4031 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4032 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4033 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4034 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4035 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4036 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4037 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4038 (aarch64-ipa.o: aarch64.c): Remove.
4039 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4040 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4041 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4042 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4043 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4044 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4045 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4046 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4047 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4048 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4049 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4050 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4051 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4052 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4053 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4054 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4055 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4056 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4057 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4058 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4059 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4060 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4061 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4062 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4063 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4064 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4065 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4066 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4067 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4068 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4069 (tdesc-ipa.o: tdesc.c): Remove.
4070 (x32-linux-ipa.o: x32-linux.c): Remove.
4071 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4072 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4074 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4076 * Makefile.in (%.o: ../arch/%.c): New rule.
4077 (arm.o: ../arch/arm.c): Remove.
4078 (arm-linux.o: ../arch/arm-linux.c): Remove.
4079 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4080 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4082 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4084 * Makefile.in (%.o: ../nat/%.c): New rule.
4085 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4086 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4087 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4088 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4089 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4090 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4091 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4092 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4093 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4094 (linux-personality.o: ../nat/linux-personality.c): Remove.
4095 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4096 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4097 (x86-linux.o: ../nat/x86-linux.c): Remove.
4098 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4099 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4101 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4103 * Makefile.in (%.o: ../common/%.c): New rule.
4104 (signals.o: ../common/signals.c): Remove.
4105 (print-utils.o: ../common/print-utils.c): Remove.
4106 (rsp-low.o: ../common/rsp-low.c): Remove.
4107 (common-utils.o: ../common/common-utils.c): Remove.
4108 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4109 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4110 (vec.o: ../common/vec.c): Remove.
4111 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4112 (xml-utils.o: ../common/xml-utils.c): Remove.
4113 (ptid.o: ../common/ptid.c): Remove.
4114 (buffer.o: ../common/buffer.c): Remove.
4115 (format.o: ../common/format.c): Remove.
4116 (filestuff.o: ../common/filestuff.c): Remove.
4117 (agent.o: ../common/agent.c): Remove.
4118 (errors.o: ../common/errors.c): Remove.
4119 (environ.o: ../common/environ.c): Remove.
4120 (common-debug.o: ../common/common-debug.c): Remove.
4121 (cleanups.o: ../common/cleanups.c): Remove.
4122 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4123 (fileio.o: ../common/fileio.c): Remove.
4124 (common-regcache.o: ../common/common-regcache.c): Remove.
4125 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4126 (new-op.o: ../common/new-op.c): Remove.
4127 (btrace-common.o: ../common/btrace-common.c): Remove.
4129 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4131 * Makefile.in (%.o: ../target/%.c): New rule.
4132 (waitstatus.o: ../target/waitstatus.c): Remove.
4134 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4137 (%.c: ../regformats/%.dat,
4138 (%.c: ../regformats/arm/%.dat,
4139 (%.c: ../regformats/i386/%.dat,
4140 (%.c: ../regformats/rs6000/%.dat): New rules.
4141 (aarch64.c): Remove.
4142 (reg-arm.c): Remove.
4143 (arm-with-iwmmxt.c): Remove.
4144 (arm-with-vfpv2.c): Remove.
4145 (arm-with-vfpv3.c): Remove.
4146 (arm-with-neon.c): Remove.
4147 (reg-bfin.c): Remove.
4148 (reg-cris.c): Remove.
4149 (reg-crisv32.c): Remove.
4151 (i386-linux.c): Remove.
4152 (i386-avx.c): Remove.
4153 (i386-avx-linux.c): Remove.
4154 (i386-avx-avx512.c): Remove.
4155 (i386-avx-avx512-linux.c): Remove.
4156 (i386-mpx.c): Remove.
4157 (i386-mpx-linux.c): Remove.
4158 (i386-avx-mpx-avx512-pku.c): Remove.
4159 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4160 (i386-avx-mpx.c): Remove.
4161 (i386-avx-mpx-linux.c): Remove.
4162 (i386-mmx.c): Remove.
4163 (i386-mmx-linux.c): Remove.
4164 (reg-ia64.c): Remove.
4165 (reg-m32r.c): Remove.
4166 (reg-m68k.c): Remove.
4168 (mips-linux.c): Remove.
4169 (mips-dsp-linux.c): Remove.
4170 (mips64-linux.c): Remove.
4171 (mips64-dsp-linux.c): Remove.
4172 (nios2-linux.c): Remove.
4173 (powerpc-32.c): Remove.
4174 (powerpc-32l.c): Remove.
4175 (powerpc-altivec32l.c): Remove.
4176 (powerpc-cell32l.c): Remove.
4177 (powerpc-vsx32l.c): Remove.
4178 (powerpc-isa205-32l.c): Remove.
4179 (powerpc-isa205-altivec32l.c): Remove.
4180 (powerpc-isa205-vsx32l.c): Remove.
4181 (powerpc-e500l.c): Remove.
4182 (powerpc-64l.c): Remove.
4183 (powerpc-altivec64l.c): Remove.
4184 (powerpc-cell64l.c): Remove.
4185 (powerpc-vsx64l.c): Remove.
4186 (powerpc-isa205-64l.c): Remove.
4187 (powerpc-isa205-altivec64l.c): Remove.
4188 (powerpc-isa205-vsx64l.c): Remove.
4189 (s390-linux32.c): Remove.
4190 (s390-linux32v1.c): Remove.
4191 (s390-linux32v2.c): Remove.
4192 (s390-linux64.c): Remove.
4193 (s390-linux64v1.c): Remove.
4194 (s390-linux64v2.c): Remove.
4195 (s390-te-linux64.c): Remove.
4196 (s390-vx-linux64.c): Remove.
4197 (s390-tevx-linux64.c): Remove.
4198 (s390x-linux64.c): Remove.
4199 (s390x-linux64v1.c): Remove.
4200 (s390x-linux64v2.c): Remove.
4201 (s390x-te-linux64.c): Remove.
4202 (s390x-vx-linux64.c): Remove.
4203 (s390x-tevx-linux64.c): Remove.
4204 (tic6x-c64xp-linux.c): Remove.
4205 (tic6x-c64x-linux.c): Remove.
4206 (tic6x-c62x-linux.c): Remove.
4208 (reg-sparc64.c): Remove.
4209 (reg-spu.c): Remove.
4211 (amd64-linux.c): Remove.
4212 (amd64-avx.c): Remove.
4213 (amd64-avx-linux.c): Remove.
4214 (amd64-avx-avx512.c): Remove.
4215 (amd64-avx-avx512-linux.c): Remove.
4216 (amd64-mpx.c): Remove.
4217 (amd64-mpx-linux.c): Remove.
4218 (amd64-avx-mpx-avx512-pku.c): Remove.
4219 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4220 (amd64-avx-mpx.c): Remove.
4221 (amd64-avx-mpx-linux.c): Remove.
4223 (x32-linux.c): Remove.
4224 (x32-avx.c): Remove.
4225 (x32-avx-linux.c): Remove.
4226 (x32-avx-avx512.c): Remove.
4227 (x32-avx-avx512-linux.c): Remove.
4228 (reg-xtensa.c): Remove.
4229 (reg-tilegx.c): Remove.
4230 (reg-tilegx32.c): Remove.
4232 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4234 * Makefile.in (SFILES): Add "common/environ.c".
4235 (OBJS): Add "common/environ.h".
4237 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4239 * configure.ac: Check if the fs_base and gs_base members of
4240 `struct user_regs_struct' exist.
4241 * config.in: Regenerated.
4242 * configure: Likewise.
4244 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4246 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4248 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4249 (get_next_pcs_syscall_next_pc): Likewise.
4251 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4253 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4254 * nto-x86-low.c: Likewise.
4256 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4258 * Makefile.in: Include disable-implicit-rules.mk.
4260 2016-11-23 Pedro Alves <palves@redhat.com>
4262 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4263 (debug_vprintf): Use std::chrono::steady_clock instead of
4264 gettimeofday. Use '.' instead of ':'.
4265 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4266 (get_timestamp): Use std::chrono::steady_clock instead of
4269 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4271 * Makefile.in: Fix whitespace formatting.
4273 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4275 * Makefile.in (SFILES, OBS): Flatten list and order
4278 2016-11-23 Pedro Alves <palves@redhat.com>
4280 * event-loop.c (handle_file_event): Use warning.
4281 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4282 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4285 2016-11-23 Pedro Alves <palves@redhat.com>
4287 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4289 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4290 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4291 debug_printf and debug_flush for debug output.
4292 * server.c (handle_general_set): Likewise.
4293 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4296 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4298 * Makefile.in (.c.o): Replace rule with ...
4299 (%.o: %.c): ... this one.
4301 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4303 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4304 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4306 * configure.ac: Remove checks for the make program.
4307 * configure: Re-generate.
4309 2016-10-28 Pedro Alves <palves@redhat.com>
4311 * Makefile.in (CXX_DIALECT): Get from configure.
4312 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4313 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4314 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4315 * config.in: Regenerate.
4316 * configure: Regenerate.
4318 2016-10-27 Yao Qi <yao.qi@linaro.org>
4320 * linux-low.c (linux_supports_range_stepping): Return true if
4321 can_software_single_step return true.
4323 2016-10-27 Yao Qi <yao.qi@linaro.org>
4325 * inferiors.c (find_inferior_in_random): New function.
4326 * inferiors.h (find_inferior_in_random): Declare.
4327 * linux-low.c (linux_wait_for_event_filtered): Call
4328 find_inferior_in_random instead of find_inferior.
4330 2016-10-27 Yao Qi <yao.qi@linaro.org>
4332 * linux-low.c (linux_wait_1): If single-step breakpoints are
4333 inserted, remove them.
4335 2016-10-26 Pedro Alves <palves@redhat.com>
4337 * linux-low.c (handle_extended_wait): Link parent/child fork
4339 (linux_wait_1): Unlink them.
4340 (linux_set_resume_request): Ignore resume requests for
4341 already-resumed and unhandled fork child threads.
4342 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4343 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4345 (handle_v_requests) <vCont>: Don't call require_running.
4346 * server.h (in_queued_stop_replies): New declaration.
4348 2016-10-24 Yao Qi <yao.qi@linaro.org>
4351 * linux-aarch64-low.c (append_insns): Cast the return value to
4354 2016-10-10 Yao Qi <yao.qi@linaro.org>
4356 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4358 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4360 * target.c (target_supports_multi_process): New function, moved
4362 * target.h (target_supports_multi_process): ... here. Remove
4365 2016-10-05 Tom Tromey <tom@tromey.com>
4368 * tracepoint.c (handle_tracepoint_bkpts): Check
4369 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4371 2016-10-05 Yao Qi <yao.qi@linaro.org>
4373 * configure.srv: Update the path of arm-*.xml files.
4375 2016-10-05 Terry Guo <terry.guo@arm.com>
4376 Yao Qi <yao.qi@linaro.org>
4378 * Makefile.in: Adjust the path of rules.
4379 * configure.srv: Update the path of xml files.
4380 * regformats/arm-with-iwmmxt.dat: Regenerated.
4381 * regformats/arm-with-neon.dat: Likewise.
4382 * regformats/arm-with-vfpv2.dat: Likewise.
4383 * regformats/arm-with-vfpv3.dat Likewise.
4385 2016-09-30 Yao Qi <yao.qi@linaro.org>
4388 * target.c (target_stop_and_wait): Don't call
4389 target_continue_no_signal, use resume_stop instead.
4391 2016-09-26 Yao Qi <yao.qi@linaro.org>
4393 * linux-low.c (linux_wait_1): Call debug_exit.
4395 2016-09-23 Pedro Alves <palves@redhat.com>
4397 * Makefile.in (SFILES): Add common/new-op.c.
4398 (OBS): Add common/new-op.o.
4399 (new-op.o): New rule.
4401 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4403 * .gitinore: Ignore more files.
4405 2016-09-21 Yao Qi <yao.qi@linaro.org>
4407 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4410 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4412 * server.c (start_inferior): Call target_mourn_inferior instead of
4413 mourn_inferior; pass ptid_t argument to it.
4415 (handle_target_event): Likewise.
4416 * target.c (target_mourn_inferior): New function.
4417 * target.h (mourn_inferior): Delete macro.
4419 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4421 * linux-low.c (lwp_is_stepping): New function.
4423 2016-09-06 Carl Love <cel@us.ibm.com>
4425 * server.c (start_inferior): Fixed comment, requested comment change
4426 didn't get updated correctly. Removed reference to ptrace () call as
4427 it is only true on Linux systems.
4429 2016-09-06 Carl Love <cel@us.ibm.com>
4431 * server.c (start_inferior): Do not call
4432 function target_post_create_inferior () if the
4433 inferior process has already exited.
4435 2016-09-05 Pedro Alves <palves@redhat.com>
4437 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4438 (COMPILE.pre, CC_LD): Use CXX directly.
4439 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4440 * acinclude.m4: Don't include build-with-cxx.m4.
4441 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4442 * configure: Regenerate.
4444 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4447 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4448 call writing data to own_buf.
4450 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4452 * target.c (mywait): Call target_wait instead of
4454 (target_wait): New function.
4456 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4458 * server.c (start_inferior): New variable 'ptid'. Replace calls
4459 to the_target->resume by target_continue{,_no_signal}, depending
4461 * target.c (target_stop_and_wait): Call target_continue_no_signal
4462 instead of the_target->resume.
4463 (target_continue): New function.
4465 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4467 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4469 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4472 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4474 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4475 * linux-arm-low.c (ps_get_thread_area): Likewise.
4476 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4477 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4478 * linux-mips-low.c (ps_get_thread_area): Likewise.
4479 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4480 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4481 * linux-x86-low.c (ps_get_thread_area): Likewise.
4482 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4484 2016-08-19 Pedro Alves <palves@redhat.com>
4486 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4488 2016-08-19 Pedro Alves <palves@redhat.com>
4490 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4491 comment. Use memcpy instead of casting through unsigned long.
4493 2016-08-19 Pedro Alves <palves@redhat.com>
4495 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4496 allocating around 0x80000000.
4498 2016-08-19 Pedro Alves <palves@redhat.com>
4501 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4502 (x32-avx512-linux-ipa.o): New rules.
4503 * configure.ac (x86_64-*-linux*): New x32 check.
4504 * configure.srv (ipa_x32_linux_regobj): New.
4505 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4506 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4508 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4510 * configure: Regenerate.
4512 2016-08-09 Pedro Alves <palves@redhat.com>
4515 * Makefile.in (OBS): Add signals-state-save-restore.o.
4516 (signals-state-save-restore.o): New rule.
4517 * config.in: Regenerate.
4518 * configure: Regenerate.
4519 * linux-low.c: Include "signals-state-save-restore.h".
4520 (linux_create_inferior): Call
4521 restore_original_signals_state.
4522 * server.c: Include "dispositions-save-restore.h".
4523 (captured_main): Call save_original_signals_state.
4525 2016-08-05 Pedro Alves <palves@redhat.com>
4527 * configure: Regenerate.
4529 2016-08-04 Yao Qi <yao.qi@linaro.org>
4531 * linux-low.c (regsets_fetch_inferior_registers): Check
4532 errno is ESRCH or not.
4534 2016-08-02 Yao Qi <yao.qi@linaro.org>
4536 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4537 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4538 (thread_db_load_search): Update.
4539 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4540 td_ta_set_event and td_ta_event_getmsg.
4542 2016-07-26 Pedro Alves <palves@redhat.com>
4545 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4546 of unsigned long for 64-bit registers and use uint32_t instead of
4547 unsigned int for 32-bit registers.
4549 2016-07-26 Pedro Alves <palves@redhat.com>
4551 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4554 2016-07-21 Tom Tromey <tom@tromey.com>
4556 * configure: Rebuild.
4558 2016-07-21 Yao Qi <yao.qi@linaro.org>
4560 * mem-break.c (find_gdb_breakpoint): Cast bp to
4561 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4563 2016-07-21 Yao Qi <yao.qi@linaro.org>
4565 * server.c (handle_v_requests): Support s and S actions
4566 if target_supports_software_single_step return true.
4568 2016-07-21 Yao Qi <yao.qi@linaro.org>
4570 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4571 is resume_step, call maybe_hw_step.
4572 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4574 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4576 (proceed_one_lwp): If resume request is resume_step, install
4577 reinsert breakpoints and call maybe_hw_step.
4579 2016-07-21 Yao Qi <yao.qi@linaro.org>
4581 * linux-low.c (proceed_one_lwp): Declare.
4582 (linux_resume_one_thread): Remove local variable 'step'.
4583 Lift code enqueue signal. Call proceed_one_lwp instead of
4584 linux_resume_one_lwp.
4586 2016-07-21 Yao Qi <yao.qi@linaro.org>
4588 * linux-low.c (linux_resume_one_thread): Call
4589 enqueue_pending_signal.
4591 2016-07-21 Yao Qi <yao.qi@linaro.org>
4593 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4594 * inferiors.c (do_restore_current_thread_cleanup): New function.
4595 (make_cleanup_restore_current_thread): Likewise.
4596 * linux-low.c (install_software_single_step_breakpoints): Call
4597 make_cleanup_restore_current_thread. Switch current_thread to
4600 2016-07-21 Yao Qi <yao.qi@linaro.org>
4602 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4603 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4604 (clone_one_breakpoint): Likewise.
4605 (delete_reinsert_breakpoints): Change parameter to thread.
4607 (has_reinsert_breakpoints): Likewise.
4608 (uninsert_reinsert_breakpoints): Likewise.
4609 (reinsert_reinsert_breakpoints): Likewise.
4610 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4611 (delete_reinsert_breakpoints): Likewise.
4612 (reinsert_reinsert_breakpoints): Likewise.
4613 (uninsert_reinsert_breakpoints): Likewise.
4614 (has_reinsert_breakpoints): Likewise.
4616 2016-07-21 Yao Qi <yao.qi@linaro.org>
4618 * inferiors.c (get_thread_process): Make parameter const.
4619 * inferiors.h (get_thread_process): Update declaration.
4620 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4621 Add new parameters child_thread and parent_thread. Callers
4623 * mem-break.h (clone_all_breakpoints): Update declaration.
4625 2016-07-21 Yao Qi <yao.qi@linaro.org>
4627 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4628 <command_list, handler>: Remove.
4629 (struct gdb_breakpoint): New.
4630 (struct other_breakpoint): New.
4631 (struct reinsert_breakpoint): New.
4632 (is_gdb_breakpoint): New function.
4633 (any_persistent_commands): Update command_list if
4634 is_gdb_breakpoint returns true.
4635 (set_breakpoint): Create breakpoints according to their types.
4636 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4637 (set_gdb_breakpoint_1): Likewise.
4638 (set_gdb_breakpoint): Likewise.
4639 (clear_breakpoint_conditions): Change parameter type to
4640 'struct gdb_breakpoint *'.
4641 (clear_breakpoint_commands): Likewise.
4642 (clear_breakpoint_conditions_and_commands): Likewise.
4643 (add_condition_to_breakpoint): Likewise.
4644 (add_breakpoint_condition): Likewise.
4645 (add_commands_to_breakpoint): Likewise.
4646 (check_breakpoints): Check other_breakpoint.
4647 (clone_one_breakpoint): Clone breakpopint according to its type.
4648 * mem-break.h (struct gdb_breakpoint): Declare.
4649 (set_gdb_breakpoint): Update declaration.
4650 (clear_breakpoint_conditions_and_commands): Likewise.
4651 (add_breakpoint_condition): Likewise.
4652 (add_breakpoint_commands): Likewise.
4653 * server.c (process_point_options): Change parameter type to
4654 'struct gdb_breakpoint *'.
4656 2016-07-21 Yao Qi <yao.qi@linaro.org>
4658 * mem-break.c (set_breakpoint_at): Rename it to ...
4659 (set_breakpoint_type_at): ... it.
4660 (set_breakpoint_at): Call set_breakpoint_type_at.
4661 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4662 * mem-break.h (set_breakpoint_at): Update comments.
4664 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4666 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4668 (nios2_store_gregset): Likewise.
4670 2016-07-01 Pedro Alves <palves@redhat.com>
4671 Antoine Tremblay <antoine.tremblay@ericsson.com>
4673 * linux-low.c: Change interface to take the target lwp_info
4674 pointer directly and return void. Handle detaching from a zombie
4676 (linux_detach_lwp_callback): New function.
4677 (linux_detach): Detach from the leader thread after detaching from
4680 2016-06-28 Yao Qi <yao.qi@linaro.org>
4682 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4683 for variable new_offset.
4684 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4685 (aarch64_ftrace_insn_reloc_cb): Likewise.
4686 (aarch64_ftrace_insn_reloc_tb): Likewise.
4687 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4688 PRIx64 instead of PRIx32.
4690 2016-06-28 Yao Qi <yao.qi@linaro.org>
4692 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4693 (the_low_target): Install arm_get_syscall_trapinfo.
4695 2016-06-28 Yao Qi <yao.qi@linaro.org>
4697 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4699 (the_low_target): Install aarch64_get_syscall_trapinfo.
4701 2016-06-28 Yao Qi <yao.qi@linaro.org>
4703 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4705 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4706 Remove parameter sysno.
4707 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4710 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4712 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4713 (s390_emit_ne_goto): Likewise.
4714 (s390_emit_lt_goto): Likewise.
4715 (s390_emit_le_goto): Likewise.
4716 (s390_emit_gt_goto): Likewise.
4717 (s390_emit_ge_goto): Likewise.
4718 (s390x_emit_eq_goto): Likewise.
4719 (s390x_emit_ne_goto): Likewise.
4720 (s390x_emit_lt_goto): Likewise.
4721 (s390x_emit_le_goto): Likewise.
4722 (s390x_emit_gt_goto): Likewise.
4723 (s390x_emit_ge_goto): Likewise.
4724 (s390_emit_ops_impl): Mark variable static.
4725 (s390x_emit_ops): Likewise.
4727 2016-06-17 Yao Qi <yao.qi@linaro.org>
4729 * linux-low.c (handle_extended_wait): Call
4730 uninsert_reinsert_breakpoints for the parent process. Remove
4731 reinsert breakpoints from the child process. Reinsert them to
4732 the parent process when vfork is done.
4733 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4734 (reinsert_reinsert_breakpoints): New function.
4735 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4736 (reinsert_reinsert_breakpoints): Declare.
4738 2016-06-17 Yao Qi <yao.qi@linaro.org>
4740 * linux-low.c (handle_extended_wait): If the parent is doing
4741 step-over, remove the reinsert breakpoints from the forked child.
4743 2016-06-17 Yao Qi <yao.qi@linaro.org>
4745 * linux-low.c (unsuspend_all_lwps): Declare.
4746 (linux_low_filter_event): If thread exited, call finish_step_over.
4747 If step-over is finished, unsuspend other threads.
4749 2016-06-17 Yao Qi <yao.qi@linaro.org>
4751 * linux-low.c (linux_resume_one_lwp_throw): Assert
4752 has_reinsert_breakpoints returns false.
4753 * mem-break.c (delete_disabled_breakpoints): Assert
4754 bp type isn't reinsert_breakpoint.
4756 2016-06-17 Yao Qi <yao.qi@linaro.org>
4758 * linux-low.c (maybe_hw_step): New function.
4759 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4760 (finish_step_over): Switch current_thread to lwp temporarily,
4761 and assert has_reinsert_breakpoints returns true.
4762 (proceed_one_lwp): Call maybe_hw_step.
4763 * mem-break.c (has_reinsert_breakpoints): New function.
4764 * mem-break.h (has_reinsert_breakpoints): Declare.
4766 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4768 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4770 2016-05-17 Yao Qi <yao.qi@linaro.org>
4772 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4773 instead of find_inferior.
4775 2016-05-05 Yao Qi <yao.qi@linaro.org>
4777 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4778 Initialize res to zero.
4780 2016-05-05 Yao Qi <yao.qi@linaro.org>
4782 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4785 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4787 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4788 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4789 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4791 2016-04-28 Par Olsson <par.olsson@windriver.com>
4792 Simon Marchi <simon.marchi@ericsson.com>
4794 * tracepoint.c (write_inferior_int8): New function.
4795 (cmd_qtenable_disable): Write enable flag using
4796 write_inferior_int8.
4798 2016-04-25 Yao Qi <yao.qi@linaro.org>
4800 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4801 (need_step_over_p): Return zero if the LWP has pending signals
4802 can be delivered on software single step target.
4804 2016-04-25 Yao Qi <yao.qi@linaro.org>
4806 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4807 return instead of error.
4809 2016-04-22 Yao Qi <yao.qi@linaro.org>
4811 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4814 2016-04-22 Yao Qi <yao.qi@linaro.org>
4816 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4817 signal when stepping over breakpoint with software single
4820 2016-04-21 Pedro Alves <palves@redhat.com>
4822 * linux-s390-low.c (s390_collect_ptrace_register)
4823 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4825 (s390_check_regset): Use void * instead of gdb_byte *.
4827 2016-04-20 Pedro Alves <palves@redhat.com>
4829 * configure: Renegerate.
4831 2016-04-20 Yao Qi <yao.qi@linaro.org>
4833 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4834 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4836 (arm_store_gregset): Likewise.
4838 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4840 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4841 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4842 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4843 (amd64-avx-mpx-linux.c): New rules.
4844 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4845 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4846 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4847 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4848 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4849 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4850 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4851 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4853 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4854 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4855 * linux-x86-low.c (x86_linux_read_description): Add case for
4856 X86_XSTATE_AVX_MPX_MASK.
4857 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4858 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4859 init_registers_i386_avx_mpx_linux.
4860 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4861 (initialize_low_tracepoint): Call
4862 init_registers_i386_avx_mpx_linux.
4863 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4864 (initialize_low_tracepoint): Call
4865 init_registers_amd64_avx_mpx_linux.
4866 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4867 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4868 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4871 2016-04-18 Pedro Alves <palves@redhat.com>
4873 * configure: Regenerate.
4875 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4877 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4878 (aarch64_emit_sub): Likewise.
4880 2016-04-12 Pedro Alves <palves@redhat.com>
4882 * utils.c (prepare_to_throw_exception): Delete.
4884 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4886 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4888 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4890 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4892 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4894 * linux-aarch64-ipa.c: Add <elf.h> include.
4895 * linux-ppc-ipa.c: Add <elf.h> include.
4896 * linux-s390-ipa.c: Add <elf.h> include.
4898 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4900 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4901 (get_raw_reg_ptr): Likewise.
4902 (get_trace_state_variable_value_ptr): Likewise.
4903 (set_trace_state_variable_value_ptr): Likewise.
4904 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4907 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4908 Marcin Kościelnicki <koriakin@0x04.net>
4911 * linux-ppc-low.c (emit_insns): New function.
4912 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4913 (ppc_emit_prologue): New function.
4914 (ppc_emit_epilogue): New function.
4915 (ppc_emit_add): New function.
4916 (ppc_emit_sub): New function.
4917 (ppc_emit_mul): New function.
4918 (ppc_emit_lsh): New function.
4919 (ppc_emit_rsh_signed): New function.
4920 (ppc_emit_rsh_unsigned): New function.
4921 (ppc_emit_ext): New function.
4922 (ppc_emit_zero_ext): New function.
4923 (ppc_emit_log_not): New function.
4924 (ppc_emit_bit_and): New function.
4925 (ppc_emit_bit_or): New function.
4926 (ppc_emit_bit_xor): New function.
4927 (ppc_emit_bit_not): New function.
4928 (ppc_emit_equal): New function.
4929 (ppc_emit_less_signed): New function.
4930 (ppc_emit_less_unsigned): New function.
4931 (ppc_emit_ref): New function.
4932 (ppc_emit_const): New function.
4933 (ppc_emit_reg): New function.
4934 (ppc_emit_pop): New function.
4935 (ppc_emit_stack_flush): New function.
4936 (ppc_emit_swap): New function.
4937 (ppc_emit_stack_adjust): New function.
4938 (ppc_emit_call): New function.
4939 (ppc_emit_int_call_1): New function.
4940 (ppc_emit_void_call_2): New function.
4941 (ppc_emit_if_goto): New function.
4942 (ppc_emit_goto): New function.
4943 (ppc_emit_eq_goto): New function.
4944 (ppc_emit_ne_goto): New function.
4945 (ppc_emit_lt_goto): New function.
4946 (ppc_emit_le_goto): New function.
4947 (ppc_emit_gt_goto): New function.
4948 (ppc_emit_ge_goto): New function.
4949 (ppc_write_goto_address): New function.
4950 (ppc_emit_ops_impl): New static variable.
4951 (ppc64v1_emit_prologue): New function.
4952 (ppc64v2_emit_prologue): New function.
4953 (ppc64_emit_epilogue): New function.
4954 (ppc64_emit_add): New function.
4955 (ppc64_emit_sub): New function.
4956 (ppc64_emit_mul): New function.
4957 (ppc64_emit_lsh): New function.
4958 (ppc64_emit_rsh_signed): New function.
4959 (ppc64_emit_rsh_unsigned): New function.
4960 (ppc64_emit_ext): New function.
4961 (ppc64_emit_zero_ext): New function.
4962 (ppc64_emit_log_not): New function.
4963 (ppc64_emit_bit_and): New function.
4964 (ppc64_emit_bit_or): New function.
4965 (ppc64_emit_bit_xor): New function.
4966 (ppc64_emit_bit_not): New function.
4967 (ppc64_emit_equal): New function.
4968 (ppc64_emit_less_signed): New function.
4969 (ppc64_emit_less_unsigned): New function.
4970 (ppc64_emit_ref): New function.
4971 (ppc64_emit_const): New function.
4972 (ppc64v1_emit_reg): New function.
4973 (ppc64v2_emit_reg): New function.
4974 (ppc64_emit_pop): New function.
4975 (ppc64_emit_stack_flush): New function.
4976 (ppc64_emit_swap): New function.
4977 (ppc64v1_emit_call): New function.
4978 (ppc64v2_emit_call): New function.
4979 (ppc64v1_emit_int_call_1): New function.
4980 (ppc64v2_emit_int_call_1): New function.
4981 (ppc64v1_emit_void_call_2): New function.
4982 (ppc64v2_emit_void_call_2): New function.
4983 (ppc64_emit_if_goto): New function.
4984 (ppc64_emit_eq_goto): New function.
4985 (ppc64_emit_ne_goto): New function.
4986 (ppc64_emit_lt_goto): New function.
4987 (ppc64_emit_le_goto): New function.
4988 (ppc64_emit_gt_goto): New function.
4989 (ppc64_emit_ge_goto): New function.
4990 (ppc64v1_emit_ops_impl): New static variable.
4991 (ppc64v2_emit_ops_impl): New static variable.
4992 (ppc_emit_ops): New function.
4993 (linux_low_target): Wire in ppc_emit_ops.
4995 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4996 Marcin Kościelnicki <koriakin@0x04.net>
4999 * Makefile.in: Add powerpc-*-ipa.o
5000 * configure.srv: Add ipa_obj for powerpc*-linux.
5001 * linux-ppc-ipa.c: New file.
5002 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5004 (PPC_FIELD): New macro.
5005 (PPC_SEXT): New macro.
5006 (PPC_OP6): New macro.
5007 (PPC_BO): New macro.
5008 (PPC_LI): New macro.
5009 (PPC_BD): New macro.
5010 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5011 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5012 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5013 (ppc_get_thread_area): New function.
5014 (is_elfv2_inferior): New function.
5015 (gen_ds_form): New function.
5016 (GEN_STD): New macro.
5017 (GEN_STDU): New macro.
5018 (GEN_LD): New macro.
5019 (GEN_LDU): New macro.
5020 (gen_d_form): New function.
5021 (GEN_ADDI): New macro.
5022 (GEN_ADDIS): New macro.
5023 (GEN_LI): New macro.
5024 (GEN_LIS): New macro.
5025 (GEN_ORI): New macro.
5026 (GEN_ORIS): New macro.
5027 (GEN_LWZ): New macro.
5028 (GEN_STW): New macro.
5029 (GEN_STWU): New macro.
5030 (gen_xfx_form): New function.
5031 (GEN_MFSPR): New macro.
5032 (GEN_MTSPR): New macro.
5033 (GEN_MFCR): New macro.
5034 (GEN_MTCR): New macro.
5035 (GEN_SYNC): New macro.
5036 (GEN_LWSYNC): New macro.
5037 (gen_x_form): New function.
5038 (GEN_OR): New macro.
5039 (GEN_MR): New macro.
5040 (GEN_LWARX): New macro.
5041 (GEN_STWCX): New macro.
5042 (GEN_CMPW): New macro.
5043 (gen_md_form): New function.
5044 (GEN_RLDICL): New macro.
5045 (GEN_RLDICR): New macro.
5046 (gen_i_form): New function.
5048 (GEN_BL): New macro.
5049 (gen_b_form): New function.
5050 (GEN_BNE): New macro.
5051 (GEN_LOAD): New macro.
5052 (GEN_STORE): New macro.
5053 (gen_limm): New function.
5054 (gen_atomic_xchg): New function.
5055 (gen_call): New function.
5056 (ppc_relocate_instruction): New function.
5057 (ppc_install_fast_tracepoint_jump_pad): New function.
5058 (ppc_get_min_fast_tracepoint_insn_len): New function.
5059 (ppc_get_ipa_tdesc_idx): New function.
5060 (the_low_target): Wire in the new functions.
5061 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5063 * linux-ppc-tdesc.h: New file.
5065 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5067 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5068 (alloc_jump_pad_buffer): New function.
5069 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5070 (alloc_jump_pad_buffer): New function.
5071 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5072 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5073 (alloc_jump_pad_buffer): New function.
5074 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5075 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5076 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5077 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5079 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5081 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5082 * linux-amd64-ipa.c: Likewise.
5083 * linux-i386-ipa.c: Likewise.
5084 * linux-s390-ipa.c: Likewise.
5085 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5086 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5087 set_trace_state_variable_value_ptr.
5088 (struct ipa_sym_addresses): Likewise.
5089 (symbol_list): Likewise.
5090 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5091 accessing gdb_collect directly.
5092 (gdb_collect_ptr_type): New typedef.
5093 (get_raw_reg_ptr_type): New typedef.
5094 (get_trace_state_variable_value_ptr_type): New typedef.
5095 (set_trace_state_variable_value_ptr_type): New typedef.
5096 (gdb_collect_ptr): New global.
5097 (get_raw_reg_ptr): New global.
5098 (get_trace_state_variable_value_ptr): New global.
5099 (set_trace_state_variable_value_ptr): New global.
5100 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5101 accessing get_raw_reg directly.
5102 (get_get_tsv_func_addr): Likewise for
5103 get_trace_state_variable_value_ptr.
5104 (get_set_tsv_func_addr): Likewise for
5105 set_trace_state_variable_value_ptr.
5106 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5108 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5110 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5112 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5114 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5116 (relocate_instruction): Remove own_buf.
5117 * server.c (own_buf): Make global.
5118 (handle_v_requests): Make global.
5119 * server.h (own_buf): New declaration.
5120 (handle_v_requests): New prototype.
5122 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5125 * linux-s390-low.c (add_insns): New function.
5126 (s390_emit_prologue): New function.
5127 (s390_emit_epilogue): New function.
5128 (s390_emit_add): New function.
5129 (s390_emit_sub): New function.
5130 (s390_emit_mul): New function.
5131 (s390_emit_lsh): New function.
5132 (s390_emit_rsh_signed): New function.
5133 (s390_emit_rsh_unsigned): New function.
5134 (s390_emit_ext): New function.
5135 (s390_emit_log_not): New function.
5136 (s390_emit_bit_and): New function.
5137 (s390_emit_bit_or): New function.
5138 (s390_emit_bit_xor): New function.
5139 (s390_emit_bit_not): New function.
5140 (s390_emit_equal): New function.
5141 (s390_emit_less_signed): New function.
5142 (s390_emit_less_unsigned): New function.
5143 (s390_emit_ref): New function.
5144 (s390_emit_if_goto): New function.
5145 (s390_emit_goto): New function.
5146 (s390_write_goto_address): New function.
5147 (s390_emit_litpool): New function.
5148 (s390_emit_const): New function.
5149 (s390_emit_call): New function.
5150 (s390_emit_reg): New function.
5151 (s390_emit_pop): New function.
5152 (s390_emit_stack_flush): New function.
5153 (s390_emit_zero_ext): New function.
5154 (s390_emit_swap): New function.
5155 (s390_emit_stack_adjust): New function.
5156 (s390_emit_set_r2): New function.
5157 (s390_emit_int_call_1): New function.
5158 (s390_emit_void_call_2): New function.
5159 (s390_emit_eq_goto): New function.
5160 (s390_emit_ne_goto): New function.
5161 (s390_emit_lt_goto): New function.
5162 (s390_emit_le_goto): New function.
5163 (s390_emit_gt_goto): New function.
5164 (s390_emit_ge_goto): New function.
5165 (s390x_emit_prologue): New function.
5166 (s390x_emit_epilogue): New function.
5167 (s390x_emit_add): New function.
5168 (s390x_emit_sub): New function.
5169 (s390x_emit_mul): New function.
5170 (s390x_emit_lsh): New function.
5171 (s390x_emit_rsh_signed): New function.
5172 (s390x_emit_rsh_unsigned): New function.
5173 (s390x_emit_ext): New function.
5174 (s390x_emit_log_not): New function.
5175 (s390x_emit_bit_and): New function.
5176 (s390x_emit_bit_or): New function.
5177 (s390x_emit_bit_xor): New function.
5178 (s390x_emit_bit_not): New function.
5179 (s390x_emit_equal): New function.
5180 (s390x_emit_less_signed): New function.
5181 (s390x_emit_less_unsigned): New function.
5182 (s390x_emit_ref): New function.
5183 (s390x_emit_if_goto): New function.
5184 (s390x_emit_const): New function.
5185 (s390x_emit_call): New function.
5186 (s390x_emit_reg): New function.
5187 (s390x_emit_pop): New function.
5188 (s390x_emit_stack_flush): New function.
5189 (s390x_emit_zero_ext): New function.
5190 (s390x_emit_swap): New function.
5191 (s390x_emit_stack_adjust): New function.
5192 (s390x_emit_int_call_1): New function.
5193 (s390x_emit_void_call_2): New function.
5194 (s390x_emit_eq_goto): New function.
5195 (s390x_emit_ne_goto): New function.
5196 (s390x_emit_lt_goto): New function.
5197 (s390x_emit_le_goto): New function.
5198 (s390x_emit_gt_goto): New function.
5199 (s390x_emit_ge_goto): New function.
5200 (s390_emit_ops): New function.
5201 (struct linux_target_ops): Fill in emit_ops hook.
5203 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5206 * Makefile.in: Add s390 IPA files.
5207 * configure.srv: Build IPA for s390.
5208 * linux-s390-ipa.c: New file.
5209 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5210 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5211 (tdesc_s390_linux32): Likewise.
5212 (init_registers_s390_linux32v1): Likewise.
5213 (tdesc_s390_linux32v1): Likewise.
5214 (init_registers_s390_linux32v2): Likewise.
5215 (tdesc_s390_linux32v2): Likewise.
5216 (init_registers_s390_linux64): Likewise.
5217 (tdesc_s390_linux64): Likewise.
5218 (init_registers_s390_linux64v1): Likewise.
5219 (tdesc_s390_linux64v1): Likewise.
5220 (init_registers_s390_linux64v2): Likewise.
5221 (tdesc_s390_linux64v2): Likewise.
5222 (init_registers_s390_te_linux64): Likewise.
5223 (tdesc_s390_te_linux64): Likewise.
5224 (init_registers_s390_vx_linux64): Likewise.
5225 (tdesc_s390_vx_linux64): Likewise.
5226 (init_registers_s390_tevx_linux64): Likewise.
5227 (tdesc_s390_tevx_linux64): Likewise.
5228 (init_registers_s390x_linux64): Likewise.
5229 (tdesc_s390x_linux64): Likewise.
5230 (init_registers_s390x_linux64v1): Likewise.
5231 (tdesc_s390x_linux64v1): Likewise.
5232 (init_registers_s390x_linux64v2): Likewise.
5233 (tdesc_s390x_linux64v2): Likewise.
5234 (init_registers_s390x_te_linux64): Likewise.
5235 (tdesc_s390x_te_linux64): Likewise.
5236 (init_registers_s390x_vx_linux64): Likewise.
5237 (tdesc_s390x_vx_linux64): Likewise.
5238 (init_registers_s390x_tevx_linux64): Likewise.
5239 (tdesc_s390x_tevx_linux64): Likewise.
5240 (have_hwcap_s390_vx): New static variable.
5241 (s390_arch_setup): Fill have_hwcap_s390_vx.
5242 (s390_get_thread_area): New function.
5243 (s390_ft_entry_gpr_esa): New const.
5244 (s390_ft_entry_gpr_zarch): New const.
5245 (s390_ft_entry_misc): New const.
5246 (s390_ft_entry_fr): New const.
5247 (s390_ft_entry_vr): New const.
5248 (s390_ft_main_31): New const.
5249 (s390_ft_main_64): New const.
5250 (s390_ft_exit_fr): New const.
5251 (s390_ft_exit_vr): New const.
5252 (s390_ft_exit_misc): New const.
5253 (s390_ft_exit_gpr_esa): New const.
5254 (s390_ft_exit_gpr_zarch): New const.
5255 (append_insns): New function.
5256 (s390_relocate_instruction): New function.
5257 (s390_install_fast_tracepoint_jump_pad): New function.
5258 (s390_get_min_fast_tracepoint_insn_len): New function.
5259 (s390_get_ipa_tdesc_idx): New function.
5260 (struct linux_target_ops): Wire in the above functions.
5261 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5262 * linux-s390-tdesc.h: New file.
5264 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5266 * linux-s390-low.c (s390_supports_tracepoints): New function.
5267 (struct linux_target_ops): Fill supports_tracepoints hook.
5269 2016-03-18 Yao Qi <yao.qi@linaro.org>
5271 * linux-low.c (lwp_signal_can_be_delivered): New function.
5272 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5274 2016-03-18 Yao Qi <yao.qi@linaro.org>
5276 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5277 0 if signal is enqueued. Remove 'signal' from one debugging
5278 message. Move one debugging message to some lines below.
5279 Remove code setting 'signal' to 0.
5281 2016-03-18 Yao Qi <yao.qi@linaro.org>
5283 * linux-low.c (linux_low_filter_event): Remove redundant
5284 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5286 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5288 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5289 (struct linux_target_ops): Wire in the above.
5291 2016-03-03 Yao Qi <yao.qi@linaro.org>
5293 * linux-low.c: Update comments to start_step_over.
5295 2016-03-03 Yao Qi <yao.qi@linaro.org>
5298 * linux-low.c (handle_extended_wait): Set child suspended
5299 if event_lwp->bp_reinsert isn't zero.
5301 2016-03-02 Yao Qi <yao.qi@linaro.org>
5303 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5304 enqueue_pending_signal.
5306 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5308 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5311 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5313 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5314 (s390_regmap_3264) [!__s390x__]: New global.
5315 (s390_collect_ptrace_register): Skip map entries containing -1.
5316 (s390_supply_ptrace_register): Ditto.
5317 (s390_fill_gprs_high): New function.
5318 (s390_store_gprs_high): New function.
5319 (s390_regsets): Add NT_S390_HIGH_GPRS.
5320 (s390_get_hwcap): Enable on 31-bit.
5321 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5322 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5323 Detect NT_S390_HIGH_GPRS.
5324 (s390_usrregs_info_3264): Enable on 31-bit.
5325 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5326 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5328 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5331 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5332 * configure.srv: Ditto.
5333 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5334 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5335 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5336 (init_registers_amd64_linux): Remove prototype.
5337 (tdesc_amd64_linux): Remove declaration.
5338 (get_ipa_tdesc): New function.
5339 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5340 initialize remaining tdescs.
5341 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5342 (init_registers_i386_linux): Remove prototype.
5343 (tdesc_i386_linux): Remove declaration.
5344 (get_ipa_tdesc): New function.
5345 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5346 initialize remaining tdescs.
5347 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5348 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5349 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5350 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5351 (x86_get_ipa_tdesc_idx): New function.
5352 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5353 * linux-x86-tdesc.h: New file.
5354 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5355 (target_get_ipa_tdesc_idx): New macro.
5356 * tracepoint.c (ipa_tdesc_idx): New macro.
5357 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5358 (symbol_list): Add ipa_tdesc_idx.
5359 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5360 (ipa_tdesc): Remove.
5361 (ipa_tdesc_idx): New variable.
5362 (get_context_regcache): Use get_ipa_tdesc.
5363 (gdb_collect): Ditto.
5365 * tracepoint.h (get_ipa_tdesc): New prototype.
5366 (ipa_tdesc): Remove.
5368 2016-02-24 Pedro Alves <palves@redhat.com>
5370 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5371 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5372 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5373 Factor out common code between the USE_SIGTRAP_SIGINFO and
5374 !USE_SIGTRAP_SIGINFO blocks.
5375 (linux_low_filter_event): Call save_stop_reason instead of
5376 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5378 (linux_wait_1): Update comments.
5380 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5382 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5383 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5384 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5385 ppc_insert_point, ppc_remove_point.
5387 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5389 * linux-s390-low.c (s390_supports_z_point_type): New function.
5390 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5392 2016-02-16 Yao Qi <yao.qi@linaro.org>
5394 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5395 PC. Get pc from regcache_read_pc.
5397 2016-02-12 Yao Qi <yao.qi@linaro.org>
5399 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5400 or linux_get_pc_32bit.
5401 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5403 2016-02-12 Yao Qi <yao.qi@linaro.org>
5405 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5406 arm_linux_get_next_pcs_fixup.
5408 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5410 * tracepoint.c (x_tracepoint_action_download): Change
5411 write_inferior_data_ptr to write_inferior_data_pointer.
5412 (cmd_qtstart): Likewise.
5413 (write_inferior_data_ptr): Remove.
5414 (download_agent_expr): Change write_inferior_data_ptr to
5415 write_inferior_data_pointer.
5416 (download_tracepoint_1): Likewise.
5417 (download_tracepoint): Likewise.
5418 (download_trace_state_variables): Likewise.
5420 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5421 Marcin Kościelnicki <koriakin@0x04.net>
5423 * tracepoint.c (struct tracepoint_action_ops): Remove.
5424 (struct tracepoint_action): Remove ops.
5425 (m_tracepoint_action_download, r_tracepoint_action_download)
5426 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5427 size and offset accordingly.
5428 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5429 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5430 (tracepoint_action_send, tracepoint_action_download): New functions.
5431 Helpers for trace action handlers.
5432 (add_tracepoint_action): Remove setup actions ops.
5433 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5435 2016-02-10 Yao Qi <yao.qi@linaro.org>
5437 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5439 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5441 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5443 * configure: Regenerate.
5445 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5447 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5448 void * to gdb_byte *.
5449 * linux-low.c (siginfo_fixup): Likewise.
5450 (linux_xfer_siginfo): Likewise.
5451 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5453 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5455 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5457 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5459 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5461 * linux-x86-low.c [__x86_64__]: Include
5462 "nat/amd64-linux-siginfo.h".
5463 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5464 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5465 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5466 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5467 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5468 (cpt_si_fd, si_timerid, si_overrun): Move from
5469 nat/amd64-linux-siginfo.c.
5470 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5472 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5474 * server.c (skip_to_semicolon): Remove.
5475 (process_point_options): Use strchrnul instead of
5478 2016-01-26 Yao Qi <yao.qi@linaro.org>
5480 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5481 * linux-low.c (install_software_single_step_breakpoints): Don't
5482 call regcache_read_pc.
5483 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5486 2016-01-26 Yao Qi <yao.qi@linaro.org>
5488 * linux-low.c (install_software_single_step_breakpoints): Call
5489 regcache_read_pc instead of get_pc.
5491 2016-01-26 Yao Qi <yao.qi@linaro.org>
5493 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5494 (unblock_async_io): Rename to ...
5495 (block_unblock_async_io): ... it. New function.
5496 (enable_async_io): Don't install SIGIO handler. Unblock it
5498 (disable_async_io): Don't ignore SIGIO. Block it instead.
5499 (initialize_async_io): Install SIGIO handler. Don't call
5502 2016-01-26 Yao Qi <yao.qi@linaro.org>
5504 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5505 first character is '\003', call *the_target->request_interrupt.
5507 2016-01-25 Yao Qi <yao.qi@linaro.org>
5509 * remote-utils.c (new_thread_notify): Remove.
5510 (dead_thread_notify): Likewise.
5511 * remote-utils.h (new_thread_notify): Remove declaration.
5512 (dead_thread_notify): Likewise.
5514 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5516 * gdb.trace/pending.exp: Fix expected message on continue.
5518 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5520 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5521 it works properly on big-endian machines where sizeof (CORE_ADDR)
5524 2016-01-21 Pedro Alves <palves@redhat.com>
5526 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5527 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5528 * configure: Regenerate.
5530 2016-01-21 Yao Qi <yao.qi@linaro.org>
5532 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5533 is_thumb and set it according to CPSR saved on the stack.
5534 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5535 arm_sigreturn_next_pc.
5537 2016-01-18 Yao Qi <yao.qi@linaro.org>
5539 * linux-low.c (linux_set_pc_64bit): New function.
5540 (linux_get_pc_64bit): New function.
5541 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5543 * linux-sparc-low.c (debug_threads): Remove declaration.
5544 (sparc_get_pc): Remove.
5545 (the_low_target): Use linux_get_pc_64bit instead of
5547 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5548 (the_low_target): Use linux_get_pc_64bit and
5551 2016-01-18 Yao Qi <yao.qi@linaro.org>
5553 * linux-arm-low.c (debug_threads): Remove declaration.
5554 (arm_get_pc, arm_set_pc): Remove.
5555 (the_low_target): Use linux_get_pc_32bit and
5557 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5558 (the_low_target): Use linux_get_pc_32bit and
5560 * linux-cris-low.c (debug_threads): Remove declaration.
5561 (cris_get_pc, cris_set_pc,): Remove.
5562 (the_low_target): Use linux_get_pc_32bit and
5564 * linux-crisv32-low.c (debug_threads): Remove declaration.
5565 (cris_get_pc, cris_set_pc): Remove.
5566 (the_low_target): Use linux_get_pc_32bit and
5568 * linux-low.c: Include inttypes.h.
5569 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5570 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5571 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5572 (the_low_target): Use linux_get_pc_32bit and
5574 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5575 (the_low_target): Use linux_get_pc_32bit and
5577 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5578 (the_low_target): Use linux_get_pc_32bit and
5580 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5581 (the_low_target): Use linux_get_pc_32bit and
5583 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5584 (the_low_target): Use linux_get_pc_32bit and
5587 2016-01-18 Gary Benson <gbenson@redhat.com>
5589 * configure.ac (AC_FUNC_FORK): New check.
5590 * config.in: Regenerate.
5591 * configure: Likewise.
5593 2016-01-14 Yao Qi <yao.qi@linaro.org>
5595 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5596 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5597 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5598 arm_get_next_pcs_ctor.
5600 2016-01-12 Josh Stone <jistone@redhat.com>
5601 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5603 * inferiors.h: Include "gdb_vecs.h".
5604 (struct process_info): Add syscalls_to_catch.
5605 * inferiors.c (remove_process): Free syscalls_to_catch.
5606 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5607 syscall_return stops.
5608 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5609 * server.c (handle_general_set): Handle QCatchSyscalls.
5610 (handle_query): Report support for QCatchSyscalls.
5611 * target.h (struct target_ops): Add supports_catch_syscall.
5612 (target_supports_catch_syscall): New macro.
5613 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5614 (struct lwp_info): Add syscall_state.
5615 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5616 Maintain syscall_state and syscalls_to_catch across exec.
5617 (get_syscall_trapinfo): New function, proxy to the_low_target.
5618 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5619 (linux_low_filter_event): Toggle syscall_state entry/return for
5620 syscall traps, and set it ignored for all others.
5621 (gdb_catching_syscalls_p): New function.
5622 (gdb_catch_this_syscall_p): New function.
5623 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5624 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5625 (linux_supports_catch_syscall): New function.
5626 (linux_target_ops): Install it.
5627 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5628 (the_low_target): Install it.
5630 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5632 * acinclude.m4: Include new ../warning.m4 file.
5633 * configure: Regenerated.
5634 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5636 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5638 * ax.c (is_goto_target): Mark static.
5639 * linux-low.c (register_addr): Likewise.
5640 (linux_fetch_registers, linux_store_registers): Likewise.
5641 * mem-break.c (any_persistent_commands): Fix old prototype.
5642 (add_commands_to_breakpoint): Mark static.
5643 * regcache.c (find_register_by_name): Delete unused func.
5644 * remote-utils.c (hex_or_minus_one): Mark static.
5645 * server.c (monitor_show_help): Mark static.
5646 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5647 handle_v_requests): Likewise.
5649 2016-01-12 Pedro Alves <palves@redhat.com>
5651 Remove use of the registered trademark symbol throughout.
5653 2016-01-08 Yao Qi <yao.qi@linaro.org>
5655 * remote-utils.c (getpkt): If c is '\003', call target hook
5658 2016-01-06 Yao Qi <yao.qi@linaro.org>
5660 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5661 linux-aarch32-low.c.
5662 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5663 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5664 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5665 (thumb2_breakpoint): Declare.
5666 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5667 linux-aarch32-low.h.
5668 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5669 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5670 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5672 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5674 * gdbreplay.c (gdbreplay_version): Change copyright year in
5676 * server.c (gdbserver_version): Likewise.
5678 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5680 * server.c (crc32_table): Delete.
5681 (crc32): Use libiberty's xcrc32 function.
5683 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5685 * lynx-low.c (lynx_delete_thread_callback): New function.
5686 (lynx_mourn): Properly delete our process and all of its
5687 threads. Remove call to clear_inferiors.
5689 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5691 * target.c (thread_search_callback): Add check that
5692 the thread_stopped target callback is not NULL before
5695 2015-12-21 Yao Qi <yao.qi@linaro.org>
5697 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5700 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5702 * server.c (handle_query): Call target_supports_software_single_step.
5704 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5706 * linux-low.c (single_step): New function.
5707 (linux_resume_one_lwp_throw): Call single_step.
5708 (start_step_over): Likewise.
5710 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5712 * Makefile.in (SFILES): Append arch/arm-linux.c,
5713 arch/arm-get-next-pcs.c.
5714 (arm-linux.o): New rule.
5715 (arm-get-next-pcs.o): New rule.
5716 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5718 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5719 to linux-aarch32-low.c.
5720 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5721 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5722 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5723 (thumb2_breakpoint_len): Likewise.
5724 (arm_is_thumb_mode): Make non-static.
5725 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5726 from linux-aarch32-low.c.
5727 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5728 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5729 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5730 (thumb2_breakpoint_len): Likewise.
5731 (arm_is_thumb_mode): New declaration.
5732 * linux-arm-low.c: Include arch/arm-linux.h
5733 aarch/arm-get-next-pcs.h, sys/syscall.h.
5734 (get_next_pcs_ops): New struct.
5735 (get_next_pcs_addr_bits_remove): New function.
5736 (get_next_pcs_is_thumb): New function.
5737 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5738 (arm_sigreturn_next_pc): Likewise.
5739 (get_next_pcs_syscall_next_pc): Likewise.
5740 (arm_gdbserver_get_next_pcs): Likewise.
5741 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5743 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5744 * server.h: Include gdb_vecs.h.
5746 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5748 * Makefile.in (SFILES): Append common/common-regcache.c.
5749 (OBS): Append common-regcache.o.
5750 (common-regcache.o): New rule.
5751 * regcache.c (init_register_cache): Initialize cache to
5753 (regcache_raw_read_unsigned): New function.
5754 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5755 register_status enum.
5757 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5759 * linux-aarch64-low.c (the_low_targets): Rename
5760 breakpoint_reinsert_addr to get_next_pcs.
5761 * linux-arm-low.c (the_low_targets): Likewise.
5762 * linux-bfin-low.c (the_low_targets): Likewise.
5763 * linux-cris-low.c (the_low_targets): Likewise.
5764 * linux-crisv32-low.c (the_low_targets): Likewise.
5765 * linux-low.c (can_software_single_step): Likewise.
5766 (install_software_single_step_breakpoints): New function.
5767 (start_step_over): Use install_software_single_step_breakpoints.
5768 * linux-low.h: New CORE_ADDR vector.
5769 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5771 * linux-mips-low.c (the_low_targets): Likewise.
5772 * linux-nios2-low.c (the_low_targets): Likewise.
5773 * linux-sparc-low.c (the_low_targets): Likewise.
5775 2015-12-17 Pedro Alves <palves@redhat.com>
5777 * linux-low.c (linux_kill_one_lwp): Remove references to
5779 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5781 (linux_init_signals): Delete.
5782 (initialize_low): Adjust.
5783 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5785 2015-12-16 Pedro Alves <palves@redhat.com>
5787 * configure.ac (compiler warning flags): When testing a
5788 -Wno-foo option, check whether -Wfoo works instead.
5789 * configure: Regenerate.
5791 2015-12-11 Don Breazeal <donb@codesourcery.com>
5793 * server.c (process_serial_event): Don't exit from gdbserver
5794 in remote mode if there are still active inferiors.
5796 2015-12-11 Yao Qi <yao.qi@linaro.org>
5798 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5799 arm_breakpoint_at if the process is 32-bit.
5801 2015-12-11 Yao Qi <yao.qi@linaro.org>
5803 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5806 2015-12-07 Yao Qi <yao.qi@linaro.org>
5808 * configure.srv: Append arm.o to srv_tgtobj for
5809 aarch64*-*-linux* target.
5810 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5811 from linux-arm-low.c.
5812 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5813 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5814 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5815 (thumb2_breakpoint_len): Likewise.
5816 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5817 (arm_breakpoint_kinds): Likewise.
5818 (arm_breakpoint_kind_from_pc): Likewise.
5819 (arm_sw_breakpoint_from_kind): Likewise.
5820 (arm_breakpoint_kind_from_current_state): Likewise.
5821 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5822 (arm_sw_breakpoint_from_kind): Declare.
5823 (arm_breakpoint_kind_from_current_state): Declare.
5824 (arm_breakpoint_at): Declare.
5825 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5826 arm_sw_breakpoint_from_kind if process is 32-bit.
5827 (aarch64_breakpoint_kind_from_pc): New function.
5828 (aarch64_breakpoint_kind_from_current_state): New function.
5829 (the_low_target): Initialize fields breakpoint_kind_from_pc
5830 and breakpoint_kind_from_current_state.
5831 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5832 linux-aarch32-low.c.
5833 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5834 (arm_breakpoint, arm_breakpoint_len): Likewise.
5835 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5836 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5837 (arm_is_thumb_mode): Likewise.
5838 (arm_breakpoint_at): Likewise.
5839 (arm_breakpoint_kind_from_pc): Likewise.
5840 (arm_sw_breakpoint_from_kind): Likewise.
5841 (arm_breakpoint_kind_from_current_state): Likewise.
5844 2015-08-04 Yao Qi <yao.qi@linaro.org>
5846 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5847 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5848 * server.c (extended_protocol): Remove "static".
5849 * server.h (extended_protocol): Declare it.
5851 2015-12-04 Josh Stone <jistone@redhat.com>
5853 * target.h (struct target_ops) <arch_setup>: Rename to ...
5854 (struct target_ops) <post_create_inferior>: ... this.
5855 (target_arch_setup): Rename to ...
5856 (target_post_create_inferior): ... this, calling post_create_inferior.
5857 * server.c (start_inferior): Update target_arch_setup calls to
5858 target_post_create_inferior.
5859 * linux-low.c (linux_low_ptrace_options): Forward declare.
5860 (linux_arch_setup): Update its comment for general use.
5861 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5862 (struct linux_target_ops): Use linux_post_create_inferior.
5863 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5864 to post_create_inferior.
5865 * nto-low.c (struct nto_target_ops): Likewise.
5866 * spu-low.c (struct spu_target_ops): Likewise.
5867 * win32-low.c (struct win32_target_ops): Likewise.
5869 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5871 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5873 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5875 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5876 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5877 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5878 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5879 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5880 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5881 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5882 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5883 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5884 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5885 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5886 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5888 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5890 * linux-low.c (linux_look_up_symbols): Don't call
5891 linux_supports_traceclone.
5892 * linux-low.h (thread_db_init): Remove use_events argument.
5893 * thread-db.c (thread_db_use_event): Remove global variable.
5894 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5895 (struct thread_db) <td_create_bp>: Remove field.
5896 (thread_db_create_event): Remove function.
5897 (thread_db_enable_reporting): Likewise.
5898 (find_one_thread): Don't check for thread_db_use_events.
5899 (attach_thread): Likewise.
5900 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5901 (try_thread_db_load_1): Don't check for thread_db_use_events.
5902 (thread_db_init): Remove use_events argument and thread events
5904 (remove_thread_event_breakpoints): Remove function.
5905 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5907 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5909 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5911 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5912 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5913 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5914 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5915 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5917 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5919 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5920 * linux-low.c (can_hardware_single_step): Use
5921 supports_hardware_single_step.
5922 (can_software_single_step): New function.
5923 (start_step_over): Call can_software_single_step.
5924 (linux_supports_hardware_single_step): New function.
5925 (struct target_ops) <supports_software_single_step>: Initialize.
5926 * linux-low.h (struct linux_target_ops)
5927 <supports_hardware_single_step>: Initialize.
5928 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5930 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5931 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5932 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5933 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5934 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5935 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5936 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5937 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5939 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5940 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5942 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5944 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5946 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5947 * target.h (struct target_ops): <supports_software_single_step>:
5949 (target_supports_software_single_step): New macro.
5951 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5953 * linux-low.c (linux_wait_1): Fix pc advance condition.
5954 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5955 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5957 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5959 * linux-arm-low.c (arm_is_thumb_mode): New function.
5960 (arm_breakpoint_at): Use arm_is_thumb_mode.
5961 (arm_breakpoint_kind_from_current_state): New function.
5962 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5964 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5965 (linux_breakpoint_kind_from_current_state): New function.
5966 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5967 * linux-low.h (struct linux_target_ops)
5968 <breakpoint_kind_from_current_state>: New field.
5969 * target.h (struct target_ops): Likewise.
5970 (target_breakpoint_kind_from_current_state): New macro.
5972 2015-11-30 Pedro Alves <palves@redhat.com>
5974 * linux-low.c (linux_resume): Wake up the event loop before
5977 2015-11-30 Pedro Alves <palves@redhat.com>
5979 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5981 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5983 * target.c (struct thread_search): New structure.
5984 (thread_search_callback): New function.
5985 (prev_general_thread): New global.
5986 (prepare_to_access_memory, done_accessing_memory): New functions.
5987 * target.h (prepare_to_access_memory, done_accessing_memory):
5988 Replace macros with function declarations.
5990 2015-11-30 Pedro Alves <palves@redhat.com>
5993 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5994 report TARGET_WAITKIND_NO_RESUMED.
5995 * remote-utils.c (prepare_resume_reply): Handle
5996 TARGET_WAITKIND_NO_RESUMED.
5997 * server.c (report_no_resumed): New global.
5998 (handle_query) <qSupported>: Handle "no-resumed+". Report
5999 "no-resumed+" support.
6000 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6001 return error if the client doesn't support no-resumed events.
6002 (push_stop_notification): New function.
6003 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6004 events if the client supports them.
6006 2015-11-30 Pedro Alves <palves@redhat.com>
6008 * linux-low.c (thread_still_has_status_pending_p): Don't check
6010 (lwp_resumed): New function.
6011 (status_pending_p_callback): Return early if the LWP is not
6012 supposed to be resumed.
6014 2015-11-30 Pedro Alves <palves@redhat.com>
6016 * linux-low.c (handle_extended_wait): Assert that the LWP's
6017 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6018 thread create events, leave the new child's status pending.
6019 (linux_low_filter_event): If GDB wants to hear about thread exit
6020 events, leave the LWP marked dead and don't delete it.
6021 (linux_wait_for_event_filtered): Don't check for thread exit.
6022 (filter_exit_event): New function.
6023 (linux_wait_1): Use it, when returning an exit event.
6024 (linux_resume_one_lwp_throw): Assert that the LWP's
6025 waitstatus is TARGET_WAITKIND_IGNORE.
6026 * remote-utils.c (prepare_resume_reply): Handle
6027 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6028 * server.c (report_thread_events): New global.
6029 (handle_general_set): Handle QThreadEvents.
6030 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6031 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6032 TARGET_WAITKIND_THREAD_EXITED.
6033 * server.h (report_thread_events): Declare.
6035 2015-11-30 Pedro Alves <palves@redhat.com>
6037 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6038 the thread's last_resume_kind was resume_stop.
6040 2015-11-30 Pedro Alves <palves@redhat.com>
6042 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6045 2015-11-30 Pedro Alves <palves@redhat.com>
6047 * server.c (handle_v_requests): Handle vCtrlC.
6049 2015-11-30 Pedro Alves <palves@redhat.com>
6051 * gdbthread.h (find_any_thread_of_pid): Declare.
6052 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6054 * server.c (handle_query): If current_thread is NULL, look for
6055 another thread of the selected process.
6057 2015-11-26 Daniel Colascione <dancol@dancol.org>
6058 Simon Marchi <simon.marchi@ericsson.com>
6060 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6061 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6063 * target.h (struct target_ops) <thread_name>: New field.
6064 (target_thread_name): New macro.
6066 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6068 * regcache.h (regcache_invalidate_pid): Add declaration.
6069 * regcache.c (regcache_invalidate_pid): New function, extracted
6070 from regcache_invalidate.
6071 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6072 Add trivial documentation comment.
6073 * lynx-low.c: Use regcache_invalidate_pid instead of
6074 regcache_invalidate.
6076 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6078 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6079 and Elf64_auxv_t if the target is Android.
6081 2015-11-22 Doug Evans <xdje42@gmail.com>
6083 * target.h: #include <sys/types.h>.
6085 2015-11-19 Pedro Alves <palves@redhat.com>
6087 * linux-low.c (linux_process_qsupported): Change prototype.
6089 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6091 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6092 and adjust to loop over all features.
6093 * server.c (handle_query) <qSupported>: Adjust to call
6094 target_process_qsupported once, passing it a vector of unprocessed
6096 * target.h (struct target_ops) <process_qsupported>: Change
6098 (target_process_qsupported): Adjust.
6100 2015-11-19 Pedro Alves <palves@redhat.com>
6102 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6104 * configure: Regenerate.
6106 2015-11-19 Pedro Alves <palves@redhat.com>
6108 * configure: Regenerate.
6110 2015-11-19 Yao Qi <yao.qi@linaro.org>
6112 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6115 2015-11-19 Yao Qi <yao.qi@linaro.org>
6117 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6118 (struct aarch64_operand): Move enum out.
6120 2015-11-19 Yao Qi <yao.qi@linaro.org>
6122 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6123 struct user_fpsimd_state *.
6124 (aarch64_store_fpregset): Likewise.
6126 2015-11-19 Yao Qi <yao.qi@linaro.org>
6128 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6129 struct user_pt_regs *.
6130 (aarch64_store_gregset): Likewise.
6132 2015-11-18 Pedro Alves <palves@redhat.com>
6134 * Makefile.in (all_object_files): Add $IPA_OBJS.
6136 2015-11-17 Pedro Alves <palves@redhat.com>
6138 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6139 GDB_SIGNAL_0 and gdb_signal_to_string.
6141 2015-11-17 Pedro Alves <palves@redhat.com>
6143 * win32-low.c (handle_output_debug_string): Remove parameter.
6144 (win32_kill): Remove our_status local and adjust call to
6145 handle_output_debug_string.
6146 (get_child_debug_event): Adjust call to
6147 handle_output_debug_string.
6149 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6151 * linux-mips-low.c (mips_fill_gregset): Add cast.
6152 (mips_store_gregset): Likewise.
6153 (mips_fill_fpregset): Likewise.
6154 (mips_store_fpregset): Likewise.
6156 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6158 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6161 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6163 * linux-mips-low.c (mips_linux_new_thread): Change type of
6164 watch_type to enum target_hw_bp_type.
6166 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6168 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6169 Change return type to arm_hwbp_type.
6171 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6173 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6174 (arm_store_gregset): Likewise.
6175 * linux-arm-low.c (arm_get_hwcap): Likewise.
6176 (arm_read_description): Likewise.
6178 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6180 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6182 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6184 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6185 (ppc_fill_vsxregset): Likewise.
6186 (ppc_store_vsxregset): Likewise.
6187 (ppc_fill_vrregset): Likewise.
6188 (ppc_store_vrregset): Likewise.
6189 (ppc_fill_evrregset): Likewise.
6190 (ppc_store_evrregset): Likewise.
6192 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6194 * linux-ppc-low.c (ppc_usrregs_info): Remove
6195 forward-declaration.
6196 (ppc_arch_setup): Move lower in file.
6198 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6200 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6201 (ps_pdwrite): Likewise.
6203 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6205 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6206 to after assert checks.
6208 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6210 * proc-service.c (ps_pdread): Add/adjust casts.
6211 (ps_pdwrite): Add/adjust casts.
6213 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6215 * server.c (handle_search_memory_1): Cast return value of
6218 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6220 * server.c (write_qxfer_response): Change type of data to
6223 2015-10-29 Pedro Alves <palves@redhat.com>
6225 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6227 2015-10-29 Pedro Alves <palves@redhat.com>
6229 * tracepoint.c (clear_installed_tracepoints): Add casts.
6231 2015-10-29 Pedro Alves <palves@redhat.com>
6233 * server.c (handle_v_cont, process_serial_event): Add enum
6234 gdb_signal casts to signal parsing code.
6236 2015-10-29 Pedro Alves <palves@redhat.com>
6238 * linux-low.h (NULL_REGSET): Define.
6239 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6240 * linux-arm-low.c (arm_regsets): Likewise.
6241 * linux-crisv32-low.c (cris_regsets): Likewise.
6242 * linux-m68k-low.c (m68k_regsets): Likewise.
6243 * linux-mips-low.c (mips_regsets): Likewise.
6244 * linux-nios2-low.c (nios2_regsets): Likewise.
6245 * linux-ppc-low.c (ppc_regsets): Likewise.
6246 * linux-s390-low.c (s390_regsets): Likewise.
6247 * linux-sh-low.c (sh_regsets): Likewise.
6248 * linux-sparc-low.c (sparc_regsets): Likewise.
6249 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6250 * linux-tile-low.c (tile_regsets): Likewise.
6251 * linux-x86-low.c (x86_regsets): Likewise.
6252 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6254 2015-10-29 Pedro Alves <palves@redhat.com>
6256 * linux-low.h (NULL_REGSET): Define.
6257 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6258 * linux-arm-low.c (arm_regsets): Likewise.
6259 * linux-crisv32-low.c (cris_regsets): Likewise.
6260 * linux-m68k-low.c (m68k_regsets): Likewise.
6261 * linux-mips-low.c (mips_regsets): Likewise.
6262 * linux-nios2-low.c (nios2_regsets): Likewise.
6263 * linux-ppc-low.c (ppc_regsets): Likewise.
6264 * linux-s390-low.c (s390_regsets): Likewise.
6265 * linux-sh-low.c (sh_regsets): Likewise.
6266 * linux-sparc-low.c (sparc_regsets): Likewise.
6267 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6268 * linux-tile-low.c (tile_regsets): Likewise.
6269 * linux-x86-low.c (x86_regsets): Likewise.
6270 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6272 2015-10-26 Doug Evans <dje@google.com>
6274 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6276 2015-10-26 Doug Evans <dje@google.com>
6278 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6280 2015-10-26 Doug Evans <dje@google.com>
6282 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6284 (attach_thread, find_new_threads_callback): Ditto.
6286 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6288 * mem-break.h (set_breakpoint_data): Remove.
6290 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6292 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6293 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6294 (initialize_low): Remove set_breakpoint_data call.
6295 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6296 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6297 (initialize_low): Remove set_breakpoint_data call.
6298 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6299 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6300 (initialize_low): Remove set_breakpoint_data call.
6302 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6304 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6305 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6306 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6307 * target.h (target_breakpoint_kind_from_pc): New macro.
6309 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6311 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6312 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6313 the default breakpoint kind.
6315 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6317 * linux-arm-low.c (arm_supports_z_point_type): Add software
6320 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6322 * linux-arm-low.c: Refactor breakpoint definitions.
6323 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6324 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6326 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6328 * Makefile.in: Add arm.c/o.
6329 * configure.srv: Likewise.
6330 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6331 (arm_breakpoint_kind_from_pc): New function.
6332 (arm_sw_breakpoint_from_kind): Return proper kind.
6333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6335 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6337 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6339 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6340 (struct raw_breakpoint) <size>: Remove.
6341 (struct raw_breakpoint) <kind>: Add.
6342 (bp_size): New function.
6343 (bp_opcode): Likewise.
6344 (find_raw_breakpoint_at): Adjust for kind.
6345 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6346 (remove_memory_breakpoint): Adjust for kind call bp_size.
6347 (set_raw_breakpoint_at): Adjust for kind.
6348 (set_breakpoint): Likewise.
6349 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6350 (delete_raw_breakpoint): Adjust for kind.
6351 (delete_breakpoint): Likewise.
6352 (find_gdb_breakpoint): Likewise.
6353 (set_gdb_breakpoint_1): Likewise.
6354 (set_gdb_breakpoint): Likewise.
6355 (delete_gdb_breakpoint_1): Likewise.
6356 (delete_gdb_breakpoint): Likewise.
6357 (uninsert_raw_breakpoint): Likewise.
6358 (reinsert_raw_breakpoint): Likewise.
6359 (set_breakpoint_data): Remove.
6360 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6361 (check_mem_read): Adjust for kind call bp_size.
6362 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6363 (clone_one_breakpoint): Adjust for kind.
6364 * mem-break.h (set_gdb_breakpoint): Likewise.
6365 (delete_gdb_breakpoint): Likewise.
6366 * server.c (process_serial_event): Likewise.
6368 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6370 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6371 (struct linux_target_ops) <breakpoint>: Remove.
6372 (struct linux_target_ops) <breakpoint_len>: Remove.
6373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6374 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6375 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6376 (arm_sw_breakpoint_from_kind): New function.
6377 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6378 (struct linux_target_ops) <breakpoint>: Remove.
6379 (struct linux_target_ops) <breakpoint_len>: Remove.
6380 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6381 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6382 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6383 (struct linux_target_ops) <breakpoint>: Remove.
6384 (struct linux_target_ops) <breakpoint_len>: Remove.
6385 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6386 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6387 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6388 (struct linux_target_ops) <breakpoint>: Remove.
6389 (struct linux_target_ops) <breakpoint_len>: Remove.
6390 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6391 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6392 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6393 and sw_breakpoint_from_kind to increment the pc.
6394 (linux_breakpoint_kind_from_pc): New function.
6395 (linux_sw_breakpoint_from_kind): New function.
6396 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6397 (initialize_low): Call breakpoint_kind_from_pc and
6398 sw_breakpoint_from_kind to replace breakpoint_data/len.
6399 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6401 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6402 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6403 (struct linux_target_ops) <breakpoint>: Remove.
6404 (struct linux_target_ops) <breakpoint_len>: Remove.
6405 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6406 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6407 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6408 (struct linux_target_ops) <breakpoint>: Remove.
6409 (struct linux_target_ops) <breakpoint_len>: Remove.
6410 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6411 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6412 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6413 (struct linux_target_ops) <breakpoint>: Remove.
6414 (struct linux_target_ops) <breakpoint_len>: Remove.
6415 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6416 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6417 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6418 (struct linux_target_ops) <breakpoint>: Remove.
6419 (struct linux_target_ops) <breakpoint_len>: Remove.
6420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6422 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6423 (struct linux_target_ops) <breakpoint>: Remove.
6424 (struct linux_target_ops) <breakpoint_len>: Remove.
6425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6426 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6427 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6428 (struct linux_target_ops) <breakpoint>: Remove.
6429 (struct linux_target_ops) <breakpoint_len>: Remove.
6430 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6432 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6433 (struct linux_target_ops) <breakpoint>: Remove.
6434 (struct linux_target_ops) <breakpoint_len>: Remove.
6435 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6436 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6437 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6438 (struct linux_target_ops) <breakpoint>: Remove.
6439 (struct linux_target_ops) <breakpoint_len>: Remove.
6440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6442 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6443 (struct linux_target_ops) <breakpoint>: Remove.
6444 (struct linux_target_ops) <breakpoint_len>: Remove.
6445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6447 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6448 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6449 (struct linux_target_ops) <breakpoint>: Remove.
6450 (struct linux_target_ops) <breakpoint_len>: Remove.
6451 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6452 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6453 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6454 (struct linux_target_ops) <breakpoint>: Remove.
6455 (struct linux_target_ops) <breakpoint_len>: Remove.
6456 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6457 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6459 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6461 * linux-cris-low.c (cris_get_pc): Remove void arg.
6463 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6465 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6468 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6470 * inferiors.c (thread_pid_matches_callback): New function.
6471 (find_thread_process): New function.
6472 (remove_thread): Reset current_thread.
6473 (remove_process): Assert threads have been removed first.
6475 2015-10-15 Yao Qi <yao.qi@linaro.org>
6477 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6479 (aarch64_remove_point): Likewise.
6480 * regcache.c (regcache_register_size): New function.
6482 2015-10-12 Yao Qi <yao.qi@linaro.org>
6484 * linux-aarch64-low.c: Update all callers as emit_load_store
6485 is renamed to aarch64_emit_load_store.
6487 2015-10-12 Yao Qi <yao.qi@linaro.org>
6489 * linux-aarch64-low.c: Update all callers of function renaming
6490 from emit_insn to aarch64_emit_insn.
6492 2015-10-12 Yao Qi <yao.qi@linaro.org>
6494 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6495 arch/aarch64-insn.h.
6496 (struct aarch64_memory_operand): Likewise.
6498 (emit_insn): Move to arch/aarch64-insn.c.
6499 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6500 (emit_load_store): Move to arch/aarch64-insn.c.
6501 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6502 (can_encode_int32): Remove.
6504 2015-10-12 Yao Qi <yao.qi@linaro.org>
6506 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6507 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6508 (aarch64_relocate_instruction): Likewise.
6509 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6510 (struct aarch64_insn_visitor): Likewise.
6512 2015-10-12 Yao Qi <yao.qi@linaro.org>
6514 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6515 (struct aarch64_insn_visitor): New.
6516 (struct aarch64_insn_relocation_data): New.
6517 (aarch64_ftrace_insn_reloc_b): New function.
6518 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6519 (aarch64_ftrace_insn_reloc_cb): Likewise.
6520 (aarch64_ftrace_insn_reloc_tb): Likewise.
6521 (aarch64_ftrace_insn_reloc_adr): Likewise.
6522 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6523 (aarch64_ftrace_insn_reloc_others): Likewise.
6525 (aarch64_relocate_instruction): Use visitor.
6527 2015-10-12 Yao Qi <yao.qi@linaro.org>
6529 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6530 int. Add argument buf.
6531 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6532 aarch64_relocate_instruction.
6534 2015-10-12 Yao Qi <yao.qi@linaro.org>
6536 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6537 argument insn. Remove local variable insn. Don't call
6539 (aarch64_install_fast_tracepoint_jump_pad): Call
6542 2015-09-30 Yao Qi <yao.qi@linaro.org>
6544 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6545 (emit_load_store_pair): Likewise.
6547 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6549 * dll.c (match_dll): Add cast(s).
6550 (unloaded_dll): Likewise.
6551 * linux-low.c (second_thread_of_pid_p): Likewise.
6552 (delete_lwp_callback): Likewise.
6553 (count_events_callback): Likewise.
6554 (select_event_lwp_callback): Likewise.
6555 (linux_set_resume_request): Likewise.
6556 * server.c (accumulate_file_name_length): Likewise.
6557 (emit_dll_description): Likewise.
6558 (handle_qxfer_threads_worker): Likewise.
6559 (visit_actioned_threads): Likewise.
6560 * thread-db.c (any_thread_of): Likewise.
6561 * tracepoint.c (same_process_p): Likewise.
6562 (match_blocktype): Likewise.
6563 (build_traceframe_info_xml): Likewise.
6565 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6567 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6569 (gdb_unparse_agent_expr): Likewise.
6570 * hostio.c (require_data): Likewise.
6571 (handle_pread): Likewise.
6572 * linux-low.c (disable_regset): Likewise.
6573 (fetch_register): Likewise.
6574 (store_register): Likewise.
6575 (get_dynamic): Likewise.
6576 (linux_qxfer_libraries_svr4): Likewise.
6577 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6578 (set_fast_tracepoint_jump): Likewise.
6579 (uninsert_fast_tracepoint_jumps_at): Likewise.
6580 (reinsert_fast_tracepoint_jumps_at): Likewise.
6581 (validate_inserted_breakpoint): Likewise.
6582 (clone_agent_expr): Likewise.
6583 * regcache.c (init_register_cache): Likewise.
6584 * remote-utils.c (putpkt_binary_1): Likewise.
6585 (decode_M_packet): Likewise.
6586 (decode_X_packet): Likewise.
6587 (look_up_one_symbol): Likewise.
6588 (relocate_instruction): Likewise.
6589 (monitor_output): Likewise.
6590 * server.c (handle_search_memory): Likewise.
6591 (handle_qxfer_exec_file): Likewise.
6592 (handle_qxfer_libraries): Likewise.
6593 (handle_qxfer): Likewise.
6594 (handle_query): Likewise.
6595 (handle_v_cont): Likewise.
6596 (handle_v_run): Likewise.
6597 (captured_main): Likewise.
6598 * target.c (write_inferior_memory): Likewise.
6599 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6600 * tracepoint.c (init_trace_buffer): Likewise.
6601 (add_tracepoint_action): Likewise.
6602 (add_traceframe): Likewise.
6603 (add_traceframe_block): Likewise.
6604 (cmd_qtdpsrc): Likewise.
6605 (cmd_qtdv): Likewise.
6606 (cmd_qtstatus): Likewise.
6607 (response_source): Likewise.
6608 (response_tsv): Likewise.
6609 (cmd_qtnotes): Likewise.
6610 (gdb_collect): Likewise.
6611 (initialize_tracepoint): Likewise.
6613 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6615 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6616 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6617 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6619 (enum aarch64_condition_codes): New enum.
6620 (w0): New static global.
6623 (struct aarch64_memory_operand) <type>: New
6624 MEMORY_OPERAND_POSTINDEX type.
6625 (postindex_memory_operand): New helper function.
6626 (emit_ret): New function.
6627 (emit_load_store_pair): New function, factored out of emit_stp
6628 with support for MEMORY_OPERAND_POSTINDEX.
6629 (emit_stp): Rewrite using emit_load_store_pair.
6630 (emit_ldp): New function.
6631 (emit_load_store): Likewise.
6632 (emit_ldr): Mention post-index instruction in comment.
6633 (emit_ldrh): New function.
6634 (emit_ldrb): New function.
6635 (emit_ldrsw): Mention post-index instruction in comment.
6636 (emit_str): Likewise.
6637 (emit_subs): New function.
6638 (emit_cmp): Likewise.
6639 (emit_and): Likewise.
6640 (emit_orr): Likewise.
6641 (emit_orn): Likewise.
6642 (emit_eor): Likewise.
6643 (emit_mvn): Likewise.
6644 (emit_lslv): Likewise.
6645 (emit_lsrv): Likewise.
6646 (emit_asrv): Likewise.
6647 (emit_mul): Likewise.
6648 (emit_sbfm): Likewise.
6649 (emit_sbfx): Likewise.
6650 (emit_ubfm): Likewise.
6651 (emit_ubfx): Likewise.
6652 (emit_csinc): Likewise.
6653 (emit_cset): Likewise.
6654 (emit_nop): Likewise.
6655 (emit_ops_insns): New helper function.
6656 (emit_pop): Likewise.
6657 (emit_push): Likewise.
6658 (aarch64_emit_prologue): New function.
6659 (aarch64_emit_epilogue): Likewise.
6660 (aarch64_emit_add): Likewise.
6661 (aarch64_emit_sub): Likewise.
6662 (aarch64_emit_mul): Likewise.
6663 (aarch64_emit_lsh): Likewise.
6664 (aarch64_emit_rsh_signed): Likewise.
6665 (aarch64_emit_rsh_unsigned): Likewise.
6666 (aarch64_emit_ext): Likewise.
6667 (aarch64_emit_log_not): Likewise.
6668 (aarch64_emit_bit_and): Likewise.
6669 (aarch64_emit_bit_or): Likewise.
6670 (aarch64_emit_bit_xor): Likewise.
6671 (aarch64_emit_bit_not): Likewise.
6672 (aarch64_emit_equal): Likewise.
6673 (aarch64_emit_less_signed): Likewise.
6674 (aarch64_emit_less_unsigned): Likewise.
6675 (aarch64_emit_ref): Likewise.
6676 (aarch64_emit_if_goto): Likewise.
6677 (aarch64_emit_goto): Likewise.
6678 (aarch64_write_goto_address): Likewise.
6679 (aarch64_emit_const): Likewise.
6680 (aarch64_emit_call): Likewise.
6681 (aarch64_emit_reg): Likewise.
6682 (aarch64_emit_pop): Likewise.
6683 (aarch64_emit_stack_flush): Likewise.
6684 (aarch64_emit_zero_ext): Likewise.
6685 (aarch64_emit_swap): Likewise.
6686 (aarch64_emit_stack_adjust): Likewise.
6687 (aarch64_emit_int_call_1): Likewise.
6688 (aarch64_emit_void_call_2): Likewise.
6689 (aarch64_emit_eq_goto): Likewise.
6690 (aarch64_emit_ne_goto): Likewise.
6691 (aarch64_emit_lt_goto): Likewise.
6692 (aarch64_emit_le_goto): Likewise.
6693 (aarch64_emit_gt_goto): Likewise.
6694 (aarch64_emit_ge_got): Likewise.
6695 (aarch64_emit_ops_impl): New static global variable.
6696 (aarch64_emit_ops): New target function, return
6697 &aarch64_emit_ops_impl.
6698 (struct linux_target_ops): Install it.
6700 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6702 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6703 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6705 * linux-aarch64-ipa.c: New file.
6706 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6708 (aarch64_get_thread_area): New target method.
6709 (extract_signed_bitfield): New helper function.
6710 (aarch64_decode_ldr_literal): New function.
6711 (enum aarch64_opcodes): New enum.
6712 (struct aarch64_register): New struct.
6713 (struct aarch64_operand): New struct.
6714 (x0): New static global.
6723 (aarch64_register): New helper function.
6724 (register_operand): Likewise.
6725 (immediate_operand): Likewise.
6726 (struct aarch64_memory_operand): New struct.
6727 (offset_memory_operand): New helper function.
6728 (preindex_memory_operand): Likewise.
6729 (enum aarch64_system_control_registers): New enum.
6730 (ENCODE): New macro.
6731 (emit_insn): New helper function.
6732 (emit_b): New function.
6733 (emit_bcond): Likewise.
6734 (emit_cb): Likewise.
6735 (emit_tb): Likewise.
6736 (emit_blr): Likewise.
6737 (emit_stp): Likewise.
6738 (emit_ldp_q_offset): Likewise.
6739 (emit_stp_q_offset): Likewise.
6740 (emit_load_store): Likewise.
6741 (emit_ldr): Likewise.
6742 (emit_ldrsw): Likewise.
6743 (emit_str): Likewise.
6744 (emit_ldaxr): Likewise.
6745 (emit_stxr): Likewise.
6746 (emit_stlr): Likewise.
6747 (emit_data_processing_reg): Likewise.
6748 (emit_data_processing): Likewise.
6749 (emit_add): Likewise.
6750 (emit_sub): Likewise.
6751 (emit_mov): Likewise.
6752 (emit_movk): Likewise.
6753 (emit_mov_addr): Likewise.
6754 (emit_mrs): Likewise.
6755 (emit_msr): Likewise.
6756 (emit_sevl): Likewise.
6757 (emit_wfe): Likewise.
6758 (append_insns): Likewise.
6759 (can_encode_int32_in): New helper function.
6760 (aarch64_relocate_instruction): New function.
6761 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6762 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6763 (struct linux_target_ops): Install aarch64_get_thread_area,
6764 aarch64_install_fast_tracepoint_jump_pad and
6765 aarch64_get_min_fast_tracepoint_insn_len.
6767 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6769 * Makefile.in (aarch64-insn.o): New rule.
6770 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6772 2015-09-21 Yao Qi <yao.qi@linaro.org>
6774 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6776 2015-09-21 Yao Qi <yao.qi@linaro.org>
6778 * tracepoint.c (max_jump_pad_size): Remove.
6780 2015-09-18 Yao Qi <yao.qi@linaro.org>
6782 * linux-aarch64-low.c: Don't include sys/uio.h.
6783 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6785 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6787 * tracepoint.c (eval_result_type): Change prototype.
6788 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6790 2015-09-15 Pedro Alves <palves@redhat.com>
6792 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6793 Check whether to report exec events instead of checking whether
6794 multiprocess is enabled.
6796 2015-09-15 Pedro Alves <palves@redhat.com>
6799 * remote-utils.c (prepare_resume_reply): Merge
6800 TARGET_WAITKIND_VFORK_DONE switch case with the
6801 TARGET_WAITKIND_FORKED case.
6803 2015-09-15 Yao Qi <yao.qi@linaro.org>
6805 * server.c (handle_query): Check string comparison using
6806 "else if" instead of "if".
6808 2015-09-15 Yao Qi <yao.qi@linaro.org>
6810 * server.c (vCont_supported): New global variable.
6811 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6812 matches. Append ";vContSupported+" to own_buf.
6813 (handle_v_requests): Append ";s;S" to own_buf if target supports
6814 hardware single step or vCont_supported is false.
6815 (capture_main): Set vCont_supported to zero.
6817 2015-09-15 Yao Qi <yao.qi@linaro.org>
6819 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6821 (linux_supports_hardware_single_step): ... New function.
6822 (linux_target_ops): Update.
6823 * lynx-low.c (lynx_target_ops): Set field
6824 supports_hardware_single_step to target_can_do_hardware_single_step.
6825 * nto-low.c (nto_target_ops): Likewise.
6826 * spu-low.c (spu_target_ops): Likewise.
6827 * win32-low.c (win32_target_ops): Likewise.
6828 * target.c (target_can_do_hardware_single_step): New function.
6829 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6830 Remove. <supports_hardware_single_step>: New field.
6831 (target_supports_conditional_breakpoints): Remove.
6832 (target_supports_hardware_single_step): New macro.
6833 (target_can_do_hardware_single_step): Declare.
6834 * server.c (handle_query): Use target_supports_hardware_single_step
6835 instead of target_supports_conditional_breakpoints.
6837 2015-09-15 Yao Qi <yao.qi@linaro.org>
6839 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6841 (struct linux_target_ops the_low_target): Install
6842 aarch64_linux_siginfo_fixup.
6844 2015-09-11 Don Breazeal <donb@codesourcery.com>
6845 Luis Machado <lgustavo@codesourcery.com>
6847 * linux-low.c (linux_mourn): Static declaration.
6848 (linux_arch_setup): Move in front of
6849 handle_extended_wait.
6850 (linux_arch_setup_thread): New function.
6851 (handle_extended_wait): Handle exec events. Call
6852 linux_arch_setup_thread. Make event_lwp argument a
6853 pointer-to-a-pointer.
6854 (check_zombie_leaders): Do not check stopped threads.
6855 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6856 (linux_low_filter_event): Add lwp and thread for exec'ing
6857 non-leader thread if leader thread has been deleted.
6858 Refactor code into linux_arch_setup_thread and call it.
6859 Pass child lwp pointer by reference to handle_extended_wait.
6860 (linux_wait_for_event_filtered): Update comment.
6861 (linux_wait_1): Prevent clobbering exec event status.
6862 (linux_supports_exec_events): New function.
6863 (linux_target_ops) <supports_exec_events>: Initialize new member.
6864 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6866 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6867 * server.c (report_exec_events): New global variable.
6868 (handle_query): Handle qSupported query for exec-events feature.
6869 (captured_main): Initialize report_exec_events.
6870 * server.h (report_exec_events): Declare new global variable.
6871 * target.h (struct target_ops) <supports_exec_events>: New
6873 (target_supports_exec_events): New macro.
6874 * win32-low.c (win32_target_ops) <supports_exec_events>:
6875 Initialize new member.
6877 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6879 * linux-low.c (linux_low_enable_btrace): Remove.
6880 (linux_target_ops): Replace linux_low_enable_btrace with
6881 linux_enable_btrace.
6883 2015-09-03 Yao Qi <yao.qi@linaro.org>
6885 * linux-aarch64-low.c (aarch64_insert_point): Call
6886 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6889 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6891 * linux-low.c (check_stopped_by_breakpoint): Use
6892 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6894 2015-08-27 Pedro Alves <palves@redhat.com>
6896 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6898 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6900 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6901 the XNEW-family equivalent.
6902 (compile_bytecodes): Likewise.
6903 * dll.c (loaded_dll): Likewise.
6904 * event-loop.c (append_callback_event): Likewise.
6905 (create_file_handler): Likewise.
6906 (create_file_event): Likewise.
6907 * hostio.c (handle_open): Likewise.
6908 * inferiors.c (add_thread): Likewise.
6909 (add_process): Likewise.
6910 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6911 * linux-arm-low.c (arm_new_process): Likewise.
6912 (arm_new_thread): Likewise.
6913 * linux-low.c (add_to_pid_list): Likewise.
6914 (linux_add_process): Likewise.
6915 (handle_extended_wait): Likewise.
6916 (add_lwp): Likewise.
6917 (enqueue_one_deferred_signal): Likewise.
6918 (enqueue_pending_signal): Likewise.
6919 (linux_resume_one_lwp_throw): Likewise.
6920 (linux_resume_one_thread): Likewise.
6921 (linux_read_memory): Likewise.
6922 (linux_write_memory): Likewise.
6923 * linux-mips-low.c (mips_linux_new_process): Likewise.
6924 (mips_linux_new_thread): Likewise.
6925 (mips_add_watchpoint): Likewise.
6926 * linux-x86-low.c (initialize_low_arch): Likewise.
6927 * lynx-low.c (lynx_add_process): Likewise.
6928 * mem-break.c (set_raw_breakpoint_at): Likewise.
6929 (set_breakpoint): Likewise.
6930 (add_condition_to_breakpoint): Likewise.
6931 (add_commands_to_breakpoint): Likewise.
6932 (clone_agent_expr): Likewise.
6933 (clone_one_breakpoint): Likewise.
6934 * regcache.c (new_register_cache): Likewise.
6935 * remote-utils.c (look_up_one_symbol): Likewise.
6936 * server.c (queue_stop_reply): Likewise.
6937 (start_inferior): Likewise.
6938 (queue_stop_reply_callback): Likewise.
6939 (handle_target_event): Likewise.
6940 * spu-low.c (fetch_ppc_memory): Likewise.
6941 (store_ppc_memory): Likewise.
6942 * target.c (set_target_ops): Likewise.
6943 * thread-db.c (thread_db_load_search): Likewise.
6944 (try_thread_db_load_1): Likewise.
6945 * tracepoint.c (add_tracepoint): Likewise.
6946 (add_tracepoint_action): Likewise.
6947 (create_trace_state_variable): Likewise.
6948 (cmd_qtdpsrc): Likewise.
6949 (cmd_qtro): Likewise.
6950 (add_while_stepping_state): Likewise.
6951 * win32-low.c (child_add_thread): Likewise.
6952 (get_image_name): Likewise.
6954 2015-08-25 Yao Qi <yao.qi@linaro.org>
6956 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6958 2015-08-25 Yao Qi <yao.qi@linaro.org>
6960 * Makefile.in (aarch64-linux.o): New rule.
6961 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6963 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6964 (aarch64_init_debug_reg_state): Make it extern.
6965 (aarch64_linux_prepare_to_resume): Remove.
6967 2015-08-25 Yao Qi <yao.qi@linaro.org>
6969 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6970 lwp_arch_private_info and ptid_of_lwp.
6972 2015-08-25 Yao Qi <yao.qi@linaro.org>
6974 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6975 Find proc_info by find_process_pid. All callers updated.
6977 2015-08-25 Yao Qi <yao.qi@linaro.org>
6979 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6981 (debug_reg_change_callback): Remove.
6982 (aarch64_notify_debug_reg_change): Remove.
6984 2015-08-25 Yao Qi <yao.qi@linaro.org>
6986 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6987 Call current_lwp_ptid.
6989 2015-08-25 Yao Qi <yao.qi@linaro.org>
6991 * linux-aarch64-low.c (debug_reg_change_callback): Use
6994 2015-08-25 Yao Qi <yao.qi@linaro.org>
6996 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6998 2015-08-25 Yao Qi <yao.qi@linaro.org>
7000 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7002 2015-08-25 Yao Qi <yao.qi@linaro.org>
7004 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7007 2015-08-25 Yao Qi <yao.qi@linaro.org>
7009 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7011 (debug_reg_change_callback): Remove argument entry and add argument
7012 lwp. Remove local variable thread. Don't print thread id in the
7013 debugging output. Don't check whether pid of thread equals to pid.
7014 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7015 iterate_over_lwps instead find_inferior.
7017 2015-08-24 Pedro Alves <palves@redhat.com>
7019 * inferiors.c (get_first_process): New function.
7020 * inferiors.h (get_first_process): New declaration.
7021 * remote-utils.c (read_ptid): Default to the first process in the
7022 list, instead of to the current thread's process.
7024 2015-08-24 Pedro Alves <palves@redhat.com>
7026 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7027 * event-loop.c: Likewise.
7028 * remote-utils.c: Likewise.
7029 * tracepoint.c: Likewise.
7031 2015-08-24 Pedro Alves <palves@redhat.com>
7033 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7036 2015-08-21 Pedro Alves <palves@redhat.com>
7038 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7039 instead of literal 1.
7041 2015-08-21 Pedro Alves <palves@redhat.com>
7043 * tdesc.c (default_description): Explicitly zero-initialize.
7045 2015-08-21 Pedro Alves <palves@redhat.com>
7048 * inferiors.c (remove_thread): Discard any pending stop reply for
7050 * server.c (remove_all_on_match_pid): Rename to ...
7051 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7053 (discard_queued_stop_replies): Change parameter to a ptid. Now
7055 (handle_v_kill, kill_inferior_callback, captured_main)
7056 (process_serial_event): Adjust.
7057 * server.h (discard_queued_stop_replies): Declare.
7059 2015-08-21 Pedro Alves <palves@redhat.com>
7061 * linux-low.c (wait_for_sigstop): Always switch to no thread
7062 selected if the previously current thread dies.
7063 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7064 process instead of the current thread's.
7065 * remote-utils.c (input_interrupt): Don't check if there's no
7067 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7068 current thread to the general thread fails, error out.
7069 (handle_qxfer_auxv, handle_qxfer_libraries)
7070 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7071 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7072 (handle_query): Check if there's a thread selected instead of
7073 checking whether there's any thread in the thread list.
7074 (handle_qxfer_threads, handle_qxfer_btrace)
7075 (handle_qxfer_btrace_conf): Don't error out early if there's no
7076 thread in the thread list.
7077 (handle_v_cont, myresume): Don't set the current thread to the
7079 (process_serial_event) <Hg handling>: Also set thread_id if the
7080 previous general thread is still alive.
7081 (process_serial_event) <g/G handling>: If setting the current
7082 thread to the general thread fails, error out.
7083 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7084 thread's lwp instead of the current thread's.
7085 * target.c (set_desired_thread): If the desired thread was not
7086 found, leave the current thread pointing to NULL. Return an int
7087 (boolean) indicating success.
7088 * target.h (set_desired_thread): Change return type to int.
7090 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7092 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7093 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7095 (ps_get_thread_area): New function.
7097 2015-08-19 Gary Benson <gbenson@redhat.com>
7099 * hostio.c (handle_pread): Do not attempt to read more data
7100 than hostio_reply_with_data can fit in a packet.
7102 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7104 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7106 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7108 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7110 2015-08-06 Pedro Alves <palves@redhat.com>
7112 * tracepoint.c (expr_eval_result): Now an int.
7114 2015-08-06 Pedro Alves <palves@redhat.com>
7116 * gdbthread.h (struct regcache): Forward declare.
7117 (struct thread_info) <regcache_data>: Now a struct regcache
7119 * inferiors.c (inferior_regcache_data)
7120 (set_inferior_regcache_data): Now work with struct regcache
7122 * inferiors.h (struct regcache): Forward declare.
7123 (inferior_regcache_data, set_inferior_regcache_data): Now work
7124 with struct regcache pointers.
7125 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7126 (free_register_cache_thread): Remove struct regcache pointer
7129 2015-08-06 Pedro Alves <palves@redhat.com>
7131 * server.c (captured_main): On error, print the exception message
7132 to stderr, and if run_once is set, throw a quit.
7134 2015-08-06 Pedro Alves <palves@redhat.com>
7136 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7139 2015-08-06 Pedro Alves <palves@redhat.com>
7141 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7142 reading beyond the passed in buffer length.
7144 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7146 * tracepoint.c (symbol_list) <required>: Remove.
7148 2015-08-06 Pedro Alves <palves@redhat.com>
7150 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7151 count if stopping and suspending threads.
7152 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7153 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7154 (linux_detach): Complete an ongoing step-over.
7155 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7157 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7158 (linux_wait_1): If passing a signal to the inferior after
7159 finishing a step-over, unsuspend and re-resume all lwps. If we
7160 see a single-step event but the thread should be continuing, don't
7161 pass the trap to gdb.
7162 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7163 internal_error instead of gdb_assert.
7164 (enqueue_pending_signal): New function.
7165 (check_ptrace_stopped_lwp_gone): Add debug output.
7166 (start_step_over): Use internal_error instead of gdb_assert.
7167 (complete_ongoing_step_over): New function.
7168 (linux_resume_one_thread): Don't resume a suspended thread.
7169 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7172 2015-08-06 Pedro Alves <palves@redhat.com>
7174 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7175 (linux_thread_alive): Use lwp_is_marked_dead.
7176 (extended_event_reported): Delete.
7177 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7178 instead of extended_event_reported.
7179 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7181 (lwp_is_marked_dead): New function.
7182 (lwp_running): Use lwp_is_marked_dead.
7183 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7186 2015-08-06 Pedro Alves <palves@redhat.com>
7188 * linux-low.c (linux_wait_1): Move fork event output out of the
7189 !report_to_gdb check. Pass event_child->waitstatus to
7190 target_waitstatus_to_string instead of ourstatus.
7192 2015-08-04 Yao Qi <yao.qi@linaro.org>
7194 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7195 if current_thread is 32 bit.
7197 2015-08-04 Yao Qi <yao.qi@linaro.org>
7199 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7200 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7201 * server.c (extended_protocol): Remove "static".
7202 * server.h (extended_protocol): Declare it.
7204 2015-08-04 Yao Qi <yao.qi@linaro.org>
7206 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7207 both aarch64 and aarch32.
7208 (aarch64_set_pc): Likewise.
7210 2015-08-04 Yao Qi <yao.qi@linaro.org>
7212 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7213 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7214 arm-with-neon.xml to srv_xmlfiles.
7215 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7216 (is_64bit_tdesc): New function.
7217 (aarch64_linux_read_description): New function.
7218 (aarch64_arch_setup): Call aarch64_linux_read_description.
7219 (regs_info): Rename to regs_info_aarch64.
7220 (aarch64_regs_info): Return right regs_info.
7221 (initialize_low_arch): Call initialize_low_arch_aarch32.
7223 2015-08-04 Yao Qi <yao.qi@linaro.org>
7225 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7226 * linux-aarch32-low.c: New file.
7227 * linux-aarch32-low.h: New file.
7228 * linux-arm-low.c (arm_fill_gregset): Move it to
7229 linux-aarch32-low.c.
7230 (arm_store_gregset): Likewise.
7231 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7232 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7233 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7234 (regs_info): Rename to regs_info_arm.
7235 (arm_regs_info): Return regs_info_aarch32 if
7236 have_ptrace_getregset is 1 and target description is
7237 arm_with_neon or arm_with_vfpv3.
7238 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7239 Call initialize_low_arch_aarch32 instead.
7241 2015-08-04 Yao Qi <yao.qi@linaro.org>
7243 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7244 * linux-low.c: ... here.
7245 * linux-low.h (have_ptrace_getregset): Declare it.
7247 2015-08-04 Pedro Alves <palves@redhat.com>
7249 * thread-db.c (struct thread_db): Use new typedefs.
7250 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7252 (disable_thread_event_reporting): Cast result of dlsym to
7253 destination function pointer type.
7254 (thread_db_mourn): Use td_ta_delete_ftype.
7256 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7258 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7260 (CDX_BREAKPOINT): Define for R2.
7261 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7262 (the_low_target): Add comments.
7264 2015-07-30 Yao Qi <yao.qi@linaro.org>
7266 * linux-arm-low.c (arm_hwcap): Remove it.
7267 (arm_read_description): New local variable arm_hwcap. Don't
7268 set arm_hwcap to zero.
7270 2015-07-30 Yao Qi <yao.qi@linaro.org>
7272 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7273 Use regcache->tdesc instead.
7274 (arm_store_wmmxregset): Likewise.
7275 (arm_fill_vfpregset): Likewise.
7276 (arm_store_vfpregset): Likewise.
7278 2015-07-30 Yao Qi <yao.qi@linaro.org>
7280 * linux-arm-low.c: Include arch/arm.h.
7281 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7282 (arm_store_gregset): Likewise.
7284 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7286 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7287 ptrace's 4th parameter.
7289 2015-07-27 Yao Qi <yao.qi@linaro.org>
7291 * configure.srv (case aarch64*-*-linux*): Don't set
7294 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7296 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7298 * linux-arm-low.c: Likewise.
7299 * linux-cris-low.c: Likewise.
7300 * linux-crisv32-low.c: Likewise.
7301 * linux-low.c: Likewise.
7302 * linux-m68k-low.c: Likewise.
7303 * linux-mips-low.c: Likewise.
7304 * linux-nios2-low.c: Likewise.
7305 * linux-s390-low.c: Likewise.
7306 * linux-sparc-low.c: Likewise.
7307 * linux-tic6x-low.c: Likewise.
7308 * linux-tile-low.c: Likewise.
7309 * linux-x86-low.c: Likewise.
7311 2015-07-24 Pedro Alves <palves@redhat.com>
7313 * config.in: Regenerate.
7314 * configure: Regenerate.
7316 2015-07-24 Pedro Alves <palves@redhat.com>
7318 * acinclude.m4: Include ../ptrace.m4.
7319 * configure.ac: Call GDB_AC_PTRACE.
7320 * config.in, configure: Regenerate.
7322 2015-07-24 Yao Qi <yao.qi@linaro.org>
7324 * linux-low.c (linux_create_inferior): Remove setting to
7325 proc->priv->new_inferior.
7326 (linux_attach): Likewise.
7327 (linux_low_filter_event): Likewise.
7328 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7330 2015-07-24 Yao Qi <yao.qi@linaro.org>
7332 * linux-low.c (linux_arch_setup): New function.
7333 (linux_low_filter_event): If proc->tdesc is NULL and
7334 proc->attached is true, call the_low_target.arch_setup.
7335 Otherwise, keep status pending, and return.
7336 (linux_resume_one_lwp_throw): Don't call get_pc if
7337 thread->while_stepping isn't NULL. Don't call
7338 get_thread_regcache if proc->tdesc is NULL.
7339 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7340 (linux_target_ops): Install arch_setup.
7341 * server.c (start_inferior): Call the_target->arch_setup.
7342 * target.h (struct target_ops) <arch_setup>: New field.
7343 (target_arch_setup): New marco.
7344 * lynx-low.c (lynx_target_ops): Update.
7345 * nto-low.c (nto_target_ops): Update.
7346 * spu-low.c (spu_target_ops): Update.
7347 * win32-low.c (win32_target_ops): Update.
7349 2015-07-24 Yao Qi <yao.qi@linaro.org>
7351 * linux-low.c (linux_add_process): Don't set
7352 proc->priv->new_inferior.
7353 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7354 (linux_attach): Likewise.
7356 2015-07-24 Yao Qi <yao.qi@linaro.org>
7358 * server.c (start_inferior): Code refactor.
7360 2015-07-24 Yao Qi <yao.qi@linaro.org>
7362 * server.c (process_serial_event): Set general_thread.
7364 2015-07-21 Yao Qi <yao.qi@linaro.org>
7366 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7367 aarch64_linux_get_debug_reg_capacity.
7369 2015-07-17 Yao Qi <yao.qi@linaro.org>
7371 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7372 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7373 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7374 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7375 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7376 (AARCH64_HWP_ALIGNMENT): Likewise.
7377 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7378 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7379 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7380 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7381 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7382 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7383 (struct aarch64_debug_reg_state): Likewise.
7384 (struct arch_lwp_info): Likewise.
7385 (aarch64_align_watchpoint): Likewise.
7386 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7387 (aarch64_watchpoint_length): Likewise.
7388 (aarch64_point_encode_ctrl_reg): Likewise
7389 (aarch64_point_is_aligned): Likewise.
7390 (aarch64_align_watchpoint): Likewise.
7391 (aarch64_linux_set_debug_regs):
7392 (aarch64_dr_state_insert_one_point): Likewise.
7393 (aarch64_dr_state_remove_one_point): Likewise.
7394 (aarch64_handle_breakpoint): Likewise.
7395 (aarch64_handle_aligned_watchpoint): Likewise.
7396 (aarch64_handle_unaligned_watchpoint): Likewise.
7397 (aarch64_handle_watchpoint): Likewise.
7399 2015-07-17 Yao Qi <yao.qi@linaro.org>
7401 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7402 and don't aarch64_get_debug_reg_state. All callers update.
7403 (aarch64_handle_aligned_watchpoint): Likewise.
7404 (aarch64_handle_unaligned_watchpoint): Likewise.
7405 (aarch64_handle_watchpoint): Likewise.
7406 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7407 (aarch64_remove_point): Likewise.
7409 2015-07-17 Yao Qi <yao.qi@linaro.org>
7411 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7413 (aarch64_handle_unaligned_watchpoint): Likewise.
7415 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7417 Revert the previous 3 commits:
7418 Move gdb_regex* to common/
7419 Move linux_find_memory_regions_full & co.
7420 gdbserver build-id attribute generator
7422 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7423 Jan Kratochvil <jan.kratochvil@redhat.com>
7425 gdbserver build-id attribute generator.
7426 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7427 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7428 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7430 (get_dynamic): Use find_pdhr to traverse program headers.
7431 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7432 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7433 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7434 (get_hex_build_id): New.
7435 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7436 to reply XML document.
7438 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7439 Jan Kratochvil <jan.kratochvil@redhat.com>
7441 * target.c: Include target/target-utils.h and fcntl.h.
7442 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7443 (target_fileio_read_stralloc): New functions.
7445 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7447 * Makefile.in (OBS): Add gdb_regex.o.
7449 * config.in: Rebuilt.
7450 * configure: Rebuilt.
7452 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7453 Jan Kratochvil <jan.kratochvil@redhat.com>
7455 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7456 * Makefile.in (OBS): Add target-utils.o.
7457 (linux-maps.o, target-utils.o): New.
7458 * configure.srv (srv_linux_obj): Add linux-maps.o.
7460 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7462 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7464 (the_low_target): Install it.
7466 2015-07-14 Pedro Alves <palves@redhat.com>
7468 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7469 Instead, ignore ECHILD, and throw an error for other errnos.
7471 2015-07-10 Pedro Alves <palves@redhat.com>
7473 * event-loop.c (struct callback_event) <data>: Change type to
7474 gdb_client_data instance instead of gdb_client_data pointer.
7475 (append_callback_event): Adjust.
7477 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7479 * linux-aarch64-low.c: Add comments for each linux_target_ops
7480 method. Remove comments already covered in target_ops and
7481 linux_target_ops definitions.
7482 (the_low_target): Add comments for each unimplemented method.
7484 2015-07-09 Yao Qi <yao.qi@linaro.org>
7486 * linux-aarch64-low.c (aarch64_regmap): Remove.
7487 (aarch64_usrregs_info): Remove.
7488 (regs_info): Set field usrregs to NULL.
7490 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7492 * linux-low.c: Include "rsp-low.h"
7493 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7494 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7495 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7496 (handle_btrace_enable_pt): New.
7497 (handle_btrace_general_set): Support "pt".
7498 (handle_btrace_conf_general_set): Support "pt:size".
7500 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7502 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7505 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7507 * linux-aarch64-low.c: Remove comment about endianness.
7508 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7509 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7512 2015-06-24 Gary Benson <gbenson@redhat.com>
7514 * linux-i386-ipa.c (stdint.h): Do not include.
7515 * lynx-i386-low.c (stdint.h): Likewise.
7516 * lynx-ppc-low.c (stdint.h): Likewise.
7517 * mem-break.c (stdint.h): Likewise.
7518 * thread-db.c (stdint.h): Likewise.
7519 * tracepoint.c (stdint.h): Likewise.
7520 * win32-low.c (stdint.h): Likewise.
7522 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7524 * server.c (write_qxfer_response): Update call to
7525 remote_escape_output.
7527 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7528 Jan Kratochvil <jan.kratochvil@redhat.com>
7530 Merge multiple hex conversions.
7531 * gdbreplay.c (tohex): Rename to 'fromhex'.
7532 (logchar): Use fromhex.
7534 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7536 * server.c (handle_qxfer_libraries): Set `version' attribute for
7539 2015-06-10 Gary Benson <gbenson@redhat.com>
7541 * target.h (struct target_ops) <multifs_open>: New field.
7542 <multifs_unlink>: Likewise.
7543 <multifs_readlink>: Likewise.
7544 * linux-low.c (nat/linux-namespaces.h): New include.
7545 (linux_target_ops): Initialize the_target->multifs_open,
7546 the_target->multifs_unlink and the_target->multifs_readlink.
7547 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7548 * hostio.c (hostio_fs_pid): New static variable.
7549 (hostio_handle_new_gdb_connection): New function.
7550 (handle_setfs): Likewise.
7551 (handle_open): Use the_target->multifs_open as appropriate.
7552 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7553 (handle_readlink): Use the_target->multifs_readlink as
7555 (handle_vFile): Handle vFile:setfs packets.
7556 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7557 after target_handle_new_gdb_connection.
7559 2015-06-10 Gary Benson <gbenson@redhat.com>
7561 * configure.ac (AC_CHECK_FUNCS): Add setns.
7562 * config.in: Regenerate.
7563 * configure: Likewise.
7564 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7565 (linux-namespaces.o): New rule.
7566 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7568 2015-06-09 Gary Benson <gbenson@redhat.com>
7570 * hostio.c (handle_open): Process mode argument with
7571 fileio_to_host_mode.
7573 2015-06-01 Yao Qi <yao.qi@linaro.org>
7575 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7576 * linux-x86-low.c: Likewise.
7578 2015-05-28 Don Breazeal <donb@codesourcery.com>
7580 * linux-low.c (handle_extended_wait): Initialize
7581 thread_info.last_resume_kind for new fork children.
7583 2015-05-15 Pedro Alves <palves@redhat.com>
7585 * target.h (target_handle_new_gdb_connection): Rewrite using if
7586 wrapped in do/while.
7588 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7590 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7591 * configure, config.in: Regenerate.
7592 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7595 2015-05-12 Don Breazeal <donb@codesourcery.com>
7597 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7598 PTRACE_EVENT_VFORK_DONE.
7599 (linux_low_ptrace_options, extended_event_reported): Add vfork
7601 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7602 and "vforkdone" for RSP 'T' Stop Reply Packet.
7603 * server.h (report_vfork_events): Declare
7606 2015-05-12 Don Breazeal <donb@codesourcery.com>
7608 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7609 (the_low_target) <new_fork>: Initialize new member.
7610 * linux-arm-low.c (arm_new_fork): New function.
7611 (the_low_target) <new_fork>: Initialize new member.
7612 * linux-low.c (handle_extended_wait): Call new target function
7614 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7615 * linux-mips-low.c (mips_add_watchpoint): New function
7616 extracted from mips_insert_point.
7617 (the_low_target) <new_fork>: Initialize new member.
7618 (mips_linux_new_fork): New function.
7619 (mips_insert_point): Call mips_add_watchpoint.
7620 * linux-x86-low.c (x86_linux_new_fork): New function.
7621 (the_low_target) <new_fork>: Initialize new member.
7623 2015-05-12 Don Breazeal <donb@codesourcery.com>
7625 * linux-low.c (handle_extended_wait): Implement return value,
7626 rename argument 'event_child' to 'event_lwp', handle
7627 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7628 (linux_low_ptrace_options): New function.
7629 (linux_low_filter_event): Call linux_low_ptrace_options,
7630 use different argument fo linux_enable_event_reporting,
7631 use return value from handle_extended_wait.
7632 (extended_event_reported): New function.
7633 (linux_wait_1): Call extended_event_reported and set
7634 status to report fork events.
7635 (linux_write_memory): Add pid to debug message.
7636 (reset_lwp_ptrace_options_callback): New function.
7637 (linux_handle_new_gdb_connection): New function.
7638 (linux_target_ops): Initialize new structure member.
7639 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7640 * lynx-low.c: Initialize new structure member.
7641 * remote-utils.c (prepare_resume_reply): Implement stop reason
7642 "fork" for "T" stop message.
7643 * server.c (handle_query): Call handle_new_gdb_connection.
7644 * server.h (report_fork_events): Declare global flag.
7645 * target.h (struct target_ops) <handle_new_gdb_connection>:
7647 (target_handle_new_gdb_connection): New macro.
7648 * win32-low.c: Initialize new structure member.
7650 2015-05-12 Don Breazeal <donb@codesourcery.com>
7652 * mem-break.c (APPEND_TO_LIST): Define macro.
7653 (clone_agent_expr): New function.
7654 (clone_one_breakpoint): New function.
7655 (clone_all_breakpoints): New function.
7656 * mem-break.h: Declare new functions.
7658 2015-05-12 Don Breazeal <donb@codesourcery.com>
7660 * linux-low.c (linux_supports_fork_events): New function.
7661 (linux_supports_vfork_events): New function.
7662 (linux_target_ops): Initialize new structure members.
7663 (initialize_low): Call linux_check_ptrace_features.
7664 * lynx-low.c (lynx_target_ops): Initialize new structure
7666 * server.c (report_fork_events, report_vfork_events):
7668 (handle_query): Add new features to qSupported packet and
7670 (captured_main): Initialize new global variables.
7671 * target.h (struct target_ops) <supports_fork_events>:
7673 <supports_vfork_events>: New member.
7674 (target_supports_fork_events): New macro.
7675 (target_supports_vfork_events): New macro.
7676 * win32-low.c (win32_target_ops): Initialize new structure
7679 2015-05-12 Gary Benson <gbenson@redhat.com>
7681 * server.c (handle_qxfer_exec_file): Use current process
7684 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7686 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7687 Remove HAVE_PTRACE_GETREGS conditionals.
7688 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7689 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7691 2015-05-08 Yao Qi <yao.qi@linaro.org>
7693 * linux-low.c (linux_supports_conditional_breakpoints): New
7695 (linux_target_ops): Install new target method.
7696 * lynx-low.c (lynx_target_ops): Install NULL hook for
7697 supports_conditional_breakpoints.
7698 * nto-low.c (nto_target_ops): Likewise.
7699 * spu-low.c (spu_target_ops): Likewise.
7700 * win32-low.c (win32_target_ops): Likewise.
7701 * server.c (handle_query): Check
7702 target_supports_conditional_breakpoints.
7703 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7705 (target_supports_conditional_breakpoints): New macro.
7707 2015-05-06 Pedro Alves <palves@redhat.com>
7710 * server.c (start_inferior): If the process exits, mourn it.
7712 2015-04-21 Gary Benson <gbenson@redhat.com>
7714 * hostio.c (fileio_open_flags_to_host): Factored out to
7715 fileio_to_host_openflags in common/fileio.c. Single use
7718 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7720 * linux-xtensa-low.c (xtensa_fill_gregset)
7721 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7724 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7726 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7727 (regs_info): Replace usrregs pointer with NULL.
7729 2015-04-17 Gary Benson <gbenson@redhat.com>
7731 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7732 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7733 * server.c (handle_qxfer_exec_file): New function.
7734 (qxfer_packets): Add exec-file entry.
7735 (handle_query): Report qXfer:exec-file:read as supported packet.
7737 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7739 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7741 2015-04-09 Gary Benson <gbenson@redhat.com>
7743 * hostio-errno.c (errno_to_fileio_error): Remove function.
7744 Update caller to use remote_fileio_to_fio_error.
7746 2015-04-09 Yao Qi <yao.qi@linaro.org>
7748 * linux-low.c (linux_insert_point): Call
7749 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7750 (linux_remove_point): Call remove_memory_breakpoint if type is
7752 * linux-x86-low.c (x86_insert_point): Don't call
7753 insert_memory_breakpoint.
7754 (x86_remove_point): Don't call remove_memory_breakpoint.
7756 2015-04-01 Pedro Alves <palves@redhat.com>
7757 Cleber Rosa <crosa@redhat.com>
7759 * server.c (gdbserver_usage): Reorganize and extend the usage
7762 2015-03-24 Pedro Alves <palves@redhat.com>
7764 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7765 output. Also dump TRAP_TRACE.
7766 (linux_low_filter_event): In debug output, distinguish a
7767 resume_stop SIGSTOP from a delayed SIGSTOP.
7769 2015-03-24 Gary Benson <gbenson@redhat.com>
7771 * linux-x86-low.c (x86_linux_new_thread): Moved to
7773 (x86_linux_prepare_to_resume): Likewise.
7775 2015-03-24 Gary Benson <gbenson@redhat.com>
7777 * Makefile.in (x86-linux-dregs.o): New rule.
7778 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7779 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7780 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7781 (x86_linux_dr_get): Likewise.
7782 (x86_linux_dr_set): Likewise.
7783 (update_debug_registers_callback): Likewise.
7784 (x86_linux_dr_set_addr): Likewise.
7785 (x86_linux_dr_get_addr): Likewise.
7786 (x86_linux_dr_set_control): Likewise.
7787 (x86_linux_dr_get_control): Likewise.
7788 (x86_linux_dr_get_status): Likewise.
7789 (x86_linux_update_debug_registers): Likewise.
7791 2015-03-24 Gary Benson <gbenson@redhat.com>
7793 * linux-x86-low.c (x86_linux_update_debug_registers):
7794 New function, factored out from...
7795 (x86_linux_prepare_to_resume): ...this.
7797 2015-03-24 Gary Benson <gbenson@redhat.com>
7799 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7800 (x86_linux_dr_set): Likewise.
7801 (update_debug_registers_callback): Likewise.
7802 (x86_linux_dr_set_addr): Likewise.
7803 (x86_linux_dr_get_addr): Likewise.
7804 (x86_linux_dr_set_control): Likewise.
7805 (x86_linux_dr_get_control): Likewise.
7806 (x86_linux_dr_get_status): Likewise.
7807 (x86_linux_prepare_to_resume): Likewise.
7809 2015-03-24 Gary Benson <gbenson@redhat.com>
7811 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7812 Use perror_with_name. Pass string through gettext.
7813 (x86_linux_dr_set): Likewise.
7815 2015-03-24 Gary Benson <gbenson@redhat.com>
7817 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7818 (x86_linux_dr_set_addr): ...this.
7819 (x86_dr_low_get_addr): Rename to...
7820 (x86_linux_dr_get_addr): ...this.
7821 (x86_dr_low_set_control): Rename to...
7822 (x86_linux_dr_set_control): ...this.
7823 (x86_dr_low_get_control): Rename to...
7824 (x86_linux_dr_get_control): ...this.
7825 (x86_dr_low_get_status): Rename to...
7826 (x86_linux_dr_get_status): ...this.
7827 (x86_dr_low): Update with new function names.
7829 2015-03-24 Gary Benson <gbenson@redhat.com>
7831 * Makefile.in (x86-linux.o): New rule.
7832 * configure.srv: Add x86-linux.o to relevant targets.
7833 * linux-low.c (lwp_set_arch_private_info): New function.
7834 (lwp_arch_private_info): Likewise.
7835 * linux-x86-low.c: Include nat/x86-linux.h.
7836 (arch_lwp_info): Removed structure.
7837 (update_debug_registers_callback):
7838 Use lwp_set_debug_registers_changed.
7839 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7840 and lwp_set_debug_registers_changed.
7841 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7843 2015-03-24 Gary Benson <gbenson@redhat.com>
7845 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7846 * linux-arm-low.c (arm_new_thread): Likewise.
7847 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7848 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7849 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7850 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7852 2015-03-24 Gary Benson <gbenson@redhat.com>
7854 * linux-low.c (ptid_of_lwp): New function.
7855 (lwp_is_stopped): Likewise.
7856 (lwp_stop_reason): Likewise.
7857 * linux-x86-low.c (update_debug_registers_callback):
7859 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7862 2015-03-24 Gary Benson <gbenson@redhat.com>
7864 * linux-low.h (linux_stop_lwp): Remove declaration.
7866 2015-03-24 Gary Benson <gbenson@redhat.com>
7868 * linux-low.h: Include nat/linux-nat.h.
7869 * linux-low.c (iterate_over_lwps_args): New structure.
7870 (iterate_over_lwps_filter): New function.
7871 (iterate_over_lwps): Likewise.
7872 * linux-x86-low.c (update_debug_registers_callback):
7873 Update signature to what iterate_over_lwps expects.
7874 Remove PID check that iterate_over_lwps now performs.
7875 (x86_dr_low_set_addr): Use iterate_over_lwps.
7876 (x86_dr_low_set_control): Likewise.
7878 2015-03-24 Gary Benson <gbenson@redhat.com>
7880 * linux-x86-low.c (x86_debug_reg_state): New function.
7881 (x86_linux_prepare_to_resume): Use the above.
7883 2015-03-24 Gary Benson <gbenson@redhat.com>
7885 * linux-low.c (current_lwp_ptid): New function.
7886 * linux-x86-low.c: Include nat/linux-nat.h.
7887 (x86_dr_low_get_addr): Use current_lwp_ptid.
7888 (x86_dr_low_get_control): Likewise.
7889 (x86_dr_low_get_status): Likewise.
7891 2015-03-20 Pedro Alves <palves@redhat.com>
7893 * tracepoint.c (cmd_qtstatus): Make "str" const.
7895 2015-03-20 Pedro Alves <palves@redhat.com>
7897 * server.c (handle_general_set): Make "req_str" const.
7899 2015-03-19 Pedro Alves <palves@redhat.com>
7901 * linux-low.c (linux_resume_one_lwp): Rename to ...
7902 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7903 instead call perror_with_name.
7904 (check_ptrace_stopped_lwp_gone): New function.
7905 (linux_resume_one_lwp): Reimplement as wrapper around
7906 linux_resume_one_lwp_throw that swallows errors if the LWP is
7909 2015-03-19 Pedro Alves <palves@redhat.com>
7911 * linux-low.c (count_events_callback, select_event_lwp_callback):
7912 No longer check whether the thread has resume_stop as last resume
7915 2015-03-19 Pedro Alves <palves@redhat.com>
7917 * linux-low.c (count_events_callback, select_event_lwp_callback):
7918 Use the lwp's status_pending_p field, not the thread's.
7920 2015-03-19 Pedro Alves <palves@redhat.com>
7922 * linux-low.c (select_event_lwp_callback): Update comments to
7923 no longer mention SIGTRAP.
7925 2015-03-18 Gary Benson <gbenson@redhat.com>
7927 * server.c (handle_query): Do not report vFile:fstat as supported.
7929 2015-03-11 Gary Benson <gbenson@redhat.com>
7931 * hostio.c (sys/types.h): New include.
7932 (sys/stat.h): Likewise.
7933 (common-remote-fileio.h): Likewise.
7934 (handle_fstat): New function.
7935 (handle_vFile): Handle vFile:fstat packets.
7937 2015-03-11 Gary Benson <gbenson@redhat.com>
7939 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7940 struct stat.st_blocks and struct stat.st_blksize.
7941 * configure: Regenerate.
7942 * config.in: Likewise.
7943 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7944 (OBS): Add common-remote-fileio.o.
7945 (common-remote-fileio.o): New rule.
7947 2015-03-09 Pedro Alves <palves@redhat.com>
7949 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7950 'struct sockaddr' pointer in 'accept' call.
7952 2015-03-09 Pedro Alves <palves@redhat.com>
7955 2015-03-07 Pedro Alves <palves@redhat.com>
7956 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7957 or <winsock2.h> here. Instead include "gdb_socket.h".
7958 (remote_open): Use union gdb_sockaddr_u.
7959 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7960 or <winsock2.h> here. Instead include "gdb_socket.h".
7961 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7962 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7964 (init_named_socket, gdb_agent_helper_thread): Use union
7967 2015-03-07 Pedro Alves <palves@redhat.com>
7969 * configure.ac (build_warnings): Move
7970 -Wdeclaration-after-statement to the C-specific set.
7971 * configure: Regenerate.
7973 2015-03-07 Pedro Alves <palves@redhat.com>
7975 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7976 or <winsock2.h> here. Instead include "gdb_socket.h".
7977 (remote_open): Use union gdb_sockaddr_u.
7978 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7979 or <winsock2.h> here. Instead include "gdb_socket.h".
7980 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7981 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7983 (init_named_socket, gdb_agent_helper_thread): Use union
7986 2015-03-07 Pedro Alves <palves@redhat.com>
7988 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7991 2015-03-06 Yao Qi <yao.qi@linaro.org>
7993 * linux-aarch64-low.c (aarch64_insert_point): Use
7994 show_debug_regs as a boolean.
7995 (aarch64_remove_point): Likewise.
7997 2015-03-05 Pedro Alves <palves@redhat.com>
7999 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8000 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8001 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8002 * nto-low.c (nto_target_ops): Likewise.
8003 * spu-low.c (spu_target_ops): Likewise.
8004 * win32-low.c (win32_target_ops): Likewise.
8006 2015-03-04 Pedro Alves <palves@redhat.com>
8008 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8009 Decide whether a breakpoint triggered based on the SIGTRAP's
8011 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8012 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8013 (linux_low_filter_event): Check for breakpoints before checking
8015 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8017 (linux_stopped_by_sw_breakpoint)
8018 (linux_supports_stopped_by_sw_breakpoint)
8019 (linux_stopped_by_hw_breakpoint)
8020 (linux_supports_stopped_by_hw_breakpoint): New functions.
8021 (linux_target_ops): Install new target methods.
8023 2015-03-04 Pedro Alves <palves@redhat.com>
8025 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8026 * server.c (swbreak_feature, hwbreak_feature): New globals.
8027 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8028 (captured_main): Clear swbreak_feature and hwbreak_feature.
8029 * server.h (swbreak_feature, hwbreak_feature): Declare.
8030 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8031 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8032 supports_stopped_by_hw_breakpoint>: New fields.
8033 (target_supports_stopped_by_sw_breakpoint)
8034 (target_stopped_by_sw_breakpoint)
8035 (target_supports_stopped_by_hw_breakpoint)
8036 (target_stopped_by_hw_breakpoint): Declare.
8038 2015-03-04 Pedro Alves <palves@redhat.com>
8040 enum lwp_stop_reason -> enum target_stop_reason
8041 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8042 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8043 (linux_wait_1, stuck_in_jump_pad_callback)
8044 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8045 (linux_stopped_by_watchpoint):
8046 * linux-low.h (enum lwp_stop_reason): Delete.
8047 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8048 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8050 2015-03-04 Yao Qi <yao.qi@linaro.org>
8052 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8054 2015-03-03 Gary Benson <gbenson@redhat.com>
8056 * hostio.c (handle_vFile): Fix prefix lengths.
8058 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8060 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8063 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8065 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8066 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8067 (clean): Add "rm -f" for above C files.
8068 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8069 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8070 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8071 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8072 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8073 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8074 (init_registers_s390x_vx_linux64)
8075 (init_registers_s390x_tevx_linux64)
8076 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8077 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8079 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8080 (s390_store_vxrs_high): New functions.
8081 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8083 (s390_arch_setup): Add logic for selecting one of the new target
8084 descriptions. Activate the new vector regsets if applicable.
8085 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8086 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8087 and init_registers_s390x_tevx_linux64.
8089 2015-03-01 Pedro Alves <palves@redhat.com>
8091 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8094 2015-02-27 Pedro Alves <palves@redhat.com>
8096 * linux-x86-low.c (u_debugreg_offset): New function.
8097 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8099 2015-02-27 Pedro Alves <palves@redhat.com>
8101 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8102 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8103 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8104 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8105 (ps_lsetfpregs, ps_getpid)
8106 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8107 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8108 (ps_lsetxregs, ps_plog): Declare.
8110 2015-02-27 Pedro Alves <palves@redhat.com>
8112 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8113 IP_AGENT_EXPORT_FUNC.
8114 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8115 IP_AGENT_EXPORT_FUNC.
8116 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8117 (IP_AGENT_EXPORT): Delete.
8118 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8119 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8120 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8121 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8122 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8123 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8124 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8125 (traceframe_read_count, traceframe_write_count)
8126 (traceframes_created, trace_state_variables, get_raw_reg)
8127 (get_trace_state_variable_value, set_trace_state_variable_value)
8128 (ust_loaded, helper_thread_id, cmd_buf): Use
8129 IPA_SYM_EXPORTED_NAME.
8130 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8131 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8132 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8133 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8134 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8135 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8136 EXTERN_C_PUSH/EXTERN_C_POP.
8137 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8138 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8139 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8140 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8141 (traceframe_write_count, traceframe_read_count)
8142 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8143 (about_to_request_buffer_space, get_trace_state_variable_value)
8144 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8145 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8146 EXTERN_C_PUSH/EXTERN_C_POP.
8147 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8148 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8149 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8150 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8151 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8152 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8153 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8154 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8156 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8157 (IP_AGENT_EXPORT_VAR_DECL): Define.
8159 (gdb_agent_get_raw_reg): Declare.
8161 2015-02-27 Tom Tromey <tromey@redhat.com>
8162 Pedro Alves <palves@redhat.com>
8164 Rename symbols whose names are reserved C++ keywords throughout.
8166 2015-02-27 Pedro Alves <palves@redhat.com>
8168 * Makefile.in (COMPILER): New, get it from autoconf.
8169 (CXX): Get from autoconf instead.
8170 (COMPILE.pre): Use COMPILER.
8171 (CC-LD): Rename to ...
8172 (CC_LD): ... this. Use COMPILER.
8173 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8174 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8175 * acinclude.m4: Include build-with-cxx.m4.
8176 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8177 Disable -Werror by default if building in C++ mode.
8178 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8179 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8180 the C++ compiler. Save/restore CXXFLAGS too.
8181 * configure: Regenerate.
8183 2015-02-27 Pedro Alves <palves@redhat.com>
8185 * acinclude.m4: Include libiberty.m4.
8186 * configure.ac: Call libiberty_INIT.
8187 * config.in, configure: Regenerate.
8189 2015-02-26 Pedro Alves <palves@redhat.com>
8191 * linux-low.c (linux_wait_1): When incrementing the PC past a
8192 program breakpoint always use the_low_target.breakpoint_len as
8193 increment, rather than the maximum between that and
8194 the_low_target.decr_pc_after_break.
8196 2015-02-23 Pedro Alves <palves@redhat.com>
8198 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8199 thread was doing a step-over; always adjust the PC if
8200 we stepped over a permanent breakpoint.
8201 (linux_wait_1): If we stepped over breakpoint that was on top of a
8202 permanent breakpoint, manually advance the PC past it.
8204 2015-02-23 Pedro Alves <palves@redhat.com>
8206 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8208 (x86_fill_gregset, x86_store_gregset): Use it when handling
8211 2015-02-20 Pedro Alves <palves@redhat.com>
8213 * thread-db.c: Include "nat/linux-procfs.h".
8214 (thread_db_init): Skip listing new threads if the kernel supports
8215 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8217 2015-02-20 Pedro Alves <palves@redhat.com>
8219 * linux-low.c (status_pending_p_callback): Use ptid_match.
8221 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8223 PR breakpoints/16812
8224 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8225 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8226 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8228 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8230 PR breakpoints/15956
8231 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8233 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8235 * linux-low.c (linux_low_btrace_conf): Print size.
8236 * server.c (handle_btrace_conf_general_set): New.
8237 (hanle_general_set): Call handle_btrace_conf_general_set.
8238 (handle_query): Report Qbtrace-conf:bts:size as supported.
8240 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8242 * linux-low.c (linux_low_enable_btrace): Update parameters.
8243 (linux_low_btrace_conf): New.
8244 (linux_target_ops)<to_btrace_conf>: Initialize.
8245 * server.c (current_btrace_conf): New.
8246 (handle_btrace_enable): Rename to ...
8247 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8248 to target_enable_btrace. Update comment. Update users.
8249 (handle_qxfer_btrace_conf): New.
8250 (qxfer_packets): Add btrace-conf entry.
8251 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8252 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8253 (target_ops)<read_btrace_conf>: New.
8254 (target_enable_btrace): Update parameters.
8255 (target_read_btrace_conf): New.
8257 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8259 * server.c (handle_btrace_general_set): Remove call to
8260 target_supports_btrace.
8261 (supported_btrace_packets): New.
8262 (handle_query): Call supported_btrace_packets.
8263 * target.h: include btrace-common.h.
8264 (btrace_target_info): Removed.
8265 (supports_btrace, target_supports_btrace): Update parameters.
8267 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8269 * Makefile.in (SFILES): Add common/btrace-common.c.
8270 (OBS): Add common/btrace-common.o.
8271 (btrace-common.o): Add build rules.
8272 * linux-low: Include btrace-common.h.
8273 (linux_low_read_btrace): Use struct btrace_data. Call
8274 btrace_data_init and btrace_data_fini.
8276 2015-02-06 Pedro Alves <palves@redhat.com>
8278 * thread-db.c (find_new_threads_callback): Add debug output.
8280 2015-02-04 Pedro Alves <palves@redhat.com>
8282 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8283 (resume_stopped_resumed_lwps): New function.
8284 (linux_wait_for_event_filtered): Use it.
8286 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8288 * Makefile.in (SFILES): Add linux-personality.c.
8289 (linux-personality.o): New rule.
8290 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8291 list of objects to be built.
8292 * linux-low.c: Include nat/linux-personality.h.
8293 (linux_create_inferior): Remove code to disable address space
8294 randomization (moved to ../nat/linux-personality.c). Create
8295 cleanup to disable address space randomization.
8297 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8299 * Makefile.in (posix-strerror.o): New rule.
8300 (mingw-strerror.o): Likewise.
8301 * configure: Regenerated.
8302 * configure.ac: Source file ../common/common.host. Initialize new
8303 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8305 2015-01-14 Yao Qi <yao@codesourcery.com>
8307 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8308 (ppc-linux.o): New rule.
8309 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8310 * configure.ac: AC_CHECK_FUNCS(getauxval).
8311 * config.in: Re-generated.
8312 * configure: Re-generated.
8313 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8314 ppc64_64bit_inferior_p
8316 2015-01-14 Yao Qi <yao@codesourcery.com>
8318 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8319 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8320 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8321 (PT_ORIG_R3, PT_TRAP): Likewise.
8322 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8323 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8324 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8326 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8328 * i387-fp.c (i387_cache_to_xsave): In look over
8329 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8330 zmmh_low_space field by use of zmmh_high_space.
8332 2015-01-09 Pedro Alves <palves@redhat.com>
8334 * linux-low.c (step_over_bkpt): Move higher up in the file.
8335 (handle_extended_wait): Don't store the stop_pc here.
8336 (get_stop_pc): Adjust comments and rename to ...
8337 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8338 stopped for a software breakpoint or hardware breakpoint.
8339 (thread_still_has_status_pending_p): New function.
8340 (status_pending_p_callback): Use
8341 thread_still_has_status_pending_p. If the event is no longer
8342 interesting, resume the LWP.
8343 (handle_tracepoints): Add assert.
8344 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8345 (wstatus_maybe_breakpoint): New function.
8346 (cancel_breakpoint): Delete function.
8347 (check_stopped_by_watchpoint): New function, factored out from
8348 linux_low_filter_event.
8349 (lp_status_maybe_breakpoint): Delete function.
8350 (linux_low_filter_event): Remove filter_ptid argument.
8351 Leave thread group exits pending here. Store the LWP's stop PC.
8352 Always leave events pending.
8353 (linux_wait_for_event_filtered): Pull all events out of the
8354 kernel, and leave them all pending.
8355 (count_events_callback, select_event_lwp_callback): Consider all
8357 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8358 (select_event_lwp): Only give preference to the stepping LWP in
8359 all-stop mode. Adjust comments.
8360 (ignore_event): New function.
8361 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8362 references to cancel_breakpoints. Adjust to renames. Also give
8363 equal priority to all LWPs that have had events in non-stop mode.
8364 If reporting a software breakpoint event, unadjust the LWP's PC.
8365 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8366 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8368 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8369 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8370 (linux_stopped_by_watchpoint): Adjust.
8371 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8372 * linux-low.h (enum lwp_stop_reason): New.
8373 (struct lwp_info) <stop_pc>: Adjust comment.
8374 <stopped_by_watchpoint>: Delete field.
8375 <stop_reason>: New field.
8376 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8377 * mem-break.c (software_breakpoint_inserted_here)
8378 (hardware_breakpoint_inserted_here): New function.
8379 * mem-break.h (software_breakpoint_inserted_here)
8380 (hardware_breakpoint_inserted_here): Declare.
8381 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8382 (cancel_breakpoints): Delete.
8383 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8384 (upload_fast_traceframes): Remove references to
8387 2015-01-09 Pedro Alves <palves@redhat.com>
8389 * thread-db.c (find_new_threads_callback): Ignore thread if the
8390 kernel thread ID is -1.
8392 2015-01-09 Pedro Alves <palves@redhat.com>
8394 * linux-low.c (linux_attach_fail_reason_string): Move to
8395 nat/linux-ptrace.c, and rename.
8396 (linux_attach_lwp): Update comment.
8397 (attach_proc_task_lwp_callback): New function.
8398 (linux_attach): Adjust to rename and use
8399 linux_proc_attach_tgid_threads.
8400 (linux_attach_fail_reason_string): Delete declaration.
8402 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8404 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8405 * server.c (gdbserver_version): Likewise.
8407 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8409 * remote-utils.c: Include ctype.h.
8410 (input_interrupt): Explicitly handle the case when the char
8411 received is the NUL byte. Improve the printing of non-ASCII
8414 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8416 * linux-low.c (linux_low_filter_event): Update call to
8417 linux_enable_event_reporting following the addition of
8418 a new parameter to that function.
8420 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8423 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8424 (AARCH64_FPCR_REGNO): Likewise.
8425 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8426 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8427 (aarch64_store_fpregset): Likewise.
8429 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8431 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8432 Remove FIXME comment about assumption about N.
8434 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8436 * configure.ac: If large-file support is disabled in GDBserver,
8437 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8438 * configure: Regenerate.
8440 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8442 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8443 warning upon ENODATA from ptrace.
8444 * linux-s390-low.c (s390_store_tdb): New.
8445 (s390_regsets): Add regset for NT_S390_TDB.
8447 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8449 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8450 without a fill_function.
8451 * linux-s390-low.c (s390_fill_last_break): Remove.
8452 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8453 (s390_arch_setup): Use regset's size instead of fill_function for
8456 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8458 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8459 the regset's store function when ptrace returned an error.
8460 * regcache.c (get_thread_regcache): Invalidate register cache
8461 before fetching inferior's registers.
8463 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8465 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8466 while-loop as for-loop.
8467 (regsets_store_inferior_registers): Likewise.
8469 2014-11-28 Yao Qi <yao@codesourcery.com>
8471 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8472 * config.in, configure: Re-generate.
8473 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8476 2014-11-21 Yao Qi <yao@codesourcery.com>
8478 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8479 (AC_CHECK_HEADERS): Remove malloc.h.
8480 * configure: Re-generated.
8481 * config.in: Re-generated.
8482 * server.h: Don't include alloca.h and malloc.h.
8483 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8484 Don't include malloc.h.
8486 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8488 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8489 corresponding ERRNO check in same block.
8491 2014-11-12 Pedro Alves <palves@redhat.com>
8493 * server.c (cont_thread): Update comment.
8494 (start_inferior, attach_inferior): No longer clear cont_thread.
8495 (handle_v_cont): No longer set cont_thread.
8496 (captured_main): Clear cont_thread each time a GDB connects.
8498 2014-11-12 Pedro Alves <palves@redhat.com>
8500 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8501 thread, and don't resume all threads if the Hc thread has exited.
8503 2014-11-12 Pedro Alves <palves@redhat.com>
8505 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8506 the process group instead of to a specific LWP.
8508 2014-10-15 Pedro Alves <palves@redhat.com>
8511 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8513 (arm_set_thread_context): Delete.
8514 (the_low_target): Adjust.
8515 * win32-i386-low.c (debug_registers_changed)
8516 (debug_registers_used): Delete.
8517 (update_debug_registers_callback): New function.
8518 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8519 needing to update their debug registers.
8520 (win32_get_current_dr): New function.
8521 (x86_dr_low_get_addr, x86_dr_low_get_control)
8522 (x86_dr_low_get_status): Fetch the debug register from the thread
8524 (i386_initial_stuff): Adjust.
8525 (i386_get_thread_context): Remove current_event parameter. Don't
8526 clear debug_registers_changed nor copy DR values to
8528 (i386_set_thread_context): Delete.
8529 (i386_prepare_to_resume): New function.
8530 (i386_thread_added): Mark the thread as needing to update irs
8532 (the_low_target): Remove i386_set_thread_context and install
8533 i386_prepare_to_resume.
8534 * win32-low.c (win32_get_thread_context): Adjust.
8535 (win32_set_thread_context): Use SetThreadContext
8537 (win32_prepare_to_resume): New function.
8538 (win32_require_context): New function, factored out from ...
8539 (thread_rec): ... this.
8540 (continue_one_thread): Call win32_prepare_to_resume on each thread
8541 we're about to continue.
8542 (win32_resume): Call win32_prepare_to_resume on the event thread.
8543 * win32-low.h (struct win32_thread_info)
8544 <debug_registers_changed>: New field.
8545 (struct win32_target_ops): Change prototype of set_thread_context,
8546 delete set_thread_context and add prepare_to_resume.
8547 (win32_require_context): New declaration.
8549 2014-10-08 Gary Benson <gbenson@redhat.com>
8551 * server.h: Do not include common-exceptions.h.
8553 2014-10-08 Gary Benson <gbenson@redhat.com>
8555 * server.h: Do not include cleanups.h.
8557 2014-09-30 James Hogan <james.hogan@imgtec.com>
8559 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8562 2014-09-23 Yao Qi <yao@codesourcery.com>
8564 * linux-low.c (lp_status_maybe_breakpoint): New function.
8565 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8566 (count_events_callback): Likewise.
8567 (select_event_lwp_callback): Likewise.
8568 (cancel_breakpoints_callback): Likewise.
8570 2014-09-19 Don Breazeal <donb@codesourcery.com>
8572 * linux-low.c (handle_extended_wait): Call
8573 linux_ptrace_get_extended_event.
8574 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8575 linux_is_extended_waitstatus.
8577 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8579 * Makefile.in (CPPFLAGS): Define.
8580 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8581 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8583 2014-09-16 Gary Benson <gbenson@redhat.com>
8585 * inferiors.h (current_inferior): Renamed as...
8586 (current_thread): New variable. All uses updated.
8587 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8588 (maybe_move_out_of_jump_pad): Likewise.
8589 (cancel_breakpoint): Likewise.
8590 (linux_low_filter_event): Likewise.
8591 (wait_for_sigstop): Likewise.
8592 (linux_resume_one_lwp): Likewise.
8593 (need_step_over_p): Likewise.
8594 (start_step_over): Likewise.
8595 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8596 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8597 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8598 and save_inferior as saved_thread.
8599 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8601 (regcache_invalidate_thread): Likewise.
8602 * remote-utils.c (prepare_resume_reply): Likewise.
8603 * thread-db.c (thread_db_get_tls_address): Likewise.
8604 (disable_thread_event_reporting): Likewise.
8605 (remove_thread_event_breakpoints): Likewise.
8606 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8608 * target.h (set_desired_inferior): Renamed as...
8609 (set_desired_thread): New declaration. All uses updated.
8610 * server.c (myresume): Updated comment to reference thread instead
8612 (handle_serial_event): Likewise.
8613 (handle_target_event): Likewise.
8615 2014-09-12 Tom Tromey <tromey@redhat.com>
8616 Gary Benson <gbenson@redhat.com>
8618 * regcache.h: Include common-regcache.h.
8619 (regcache_read_pc): Don't declare.
8620 * regcache.c (get_thread_regcache_for_ptid): New function.
8622 2014-09-11 Tom Tromey <tromey@redhat.com>
8623 Gary Benson <gbenson@redhat.com>
8625 * symbol.c: New file.
8626 * Makefile.in (SFILES): Add symbol.c.
8627 (OBS): Add symbol.o.
8629 2014-09-11 Gary Benson <gbenson@redhat.com>
8631 * target.c (target_stop_ptid, target_continue_ptid): New
8634 2014-09-11 Tom Tromey <tromey@redhat.com>
8635 Gary Benson <gbenson@redhat.com>
8637 * target.h: Include target/target.h.
8638 * target.c (target_read_memory, target_read_uint32)
8639 (target_write_memory): New functions.
8641 2014-09-11 Gary Benson <gbenson@redhat.com>
8643 * server.h (debug_hw_points): Don't declare.
8644 * server.c (debug_hw_points): Don't define. Replace all uses
8645 with show_debug_regs.
8646 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8647 all uses with show_debug_regs.
8649 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8651 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8652 endianness into account.
8653 (ppc_supply_ptrace_register): Likewise.
8655 2014-09-03 James Hogan <james.hogan@imgtec.com>
8657 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8658 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8660 2014-09-03 Gary Benson <gbenson@redhat.com>
8662 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8663 ALL_DEBUG_ADDRESS_REGISTERS.
8665 2014-09-02 Gary Benson <gbenson@redhat.com>
8667 * i386-low.h: Renamed as...
8668 * x86-low.h: New file. All type, function and variable name
8669 prefixes changed from "i386_" to "x86_". All references updated.
8670 * i386-low.c: Renamed as...
8671 * x86-low.c: New file. All type, function and variable name
8672 prefixes changed from "i386_" to "x86_". All references updated.
8674 2014-09-02 Gary Benson <gbenson@redhat.com>
8676 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8677 (x86_linux_new_thread): Likewise.
8679 2014-08-29 Gary Benson <gbenson@redhat.com>
8681 * server.h (setjmp.h): Do not include.
8682 (toplevel): Do not declare.
8683 (common-exceptions.h): Include.
8684 (cleanups.h): Likewise.
8685 * server.c (toplevel): Do not define.
8686 (exit_code): New static global.
8687 (detach_or_kill_for_exit_cleanup): New function.
8688 (main): New function. Original main renamed to...
8689 (captured_main): New function.
8690 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8692 2014-08-29 Gary Benson <gbenson@redhat.com>
8694 * Makefile.in (SFILES): Add common/common-exceptions.c.
8695 (OBS): Add common-exceptions.o.
8696 (common-exceptions.o): New rule.
8697 * utils.c (prepare_to_throw_exception): New function.
8699 2014-08-29 Gary Benson <gbenson@redhat.com>
8701 * config.in: Regenerate.
8702 * configure: Likewise.
8704 2014-08-29 Gary Benson <gbenson@redhat.com>
8706 * Makefile.in (SFILES): Add common/cleanups.c.
8708 (cleanups.o): New rule.
8710 2014-08-29 Gary Benson <gbenson@redhat.com>
8712 * utils.c (internal_vwarning): New function.
8714 2014-08-28 Gary Benson <gbenson@redhat.com>
8716 * utils.h (fatal): Remove declaration.
8717 * utils.c (fatal): Remove function.
8719 2014-08-28 Gary Benson <gbenson@redhat.com>
8721 * tracepoint.c (gdb_agent_init): Replace fatal with
8723 (initialize_tracepoint): Likewise.
8725 2014-08-28 Gary Benson <gbenson@redhat.com>
8727 * remote-utils.c (remote_prepare): Replace fatal with error.
8729 2014-08-28 Gary Benson <gbenson@redhat.com>
8731 * linux-low.c (linux_async): Replace fatal with warning.
8733 (linux_start_non_stop): Return -1 if linux_async failed.
8735 2014-08-28 Gary Benson <gbenson@redhat.com>
8737 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8739 (i386_dr_low_get_addr): Remove vague comment.
8740 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8743 2014-08-28 Gary Benson <gbenson@redhat.com>
8745 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8746 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8748 (linux_resume_one_lwp): Likewise.
8749 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8751 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8752 with internal_error.
8753 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8754 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8755 (find_register_by_name): Replace fatal with internal_error.
8756 (find_regno): Likewise.
8757 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8758 * thread-db.c (thread_db_create_event): Likewise.
8759 (thread_db_load_search): Likewise.
8760 (try_thread_db_load_1): Likewise.
8761 * tracepoint.c (get_jump_space_head): Replace fatal with
8763 (claim_trampoline_space): Likewise.
8764 (have_fast_tracepoint_trampoline_buffer): Likewise.
8765 (cmd_qtstart): Likewise.
8766 (stop_tracing): Likewise.
8767 (fast_tracepoint_collecting): Likewise.
8768 (target_malloc): Likewise.
8769 (download_tracepoint): Likewise.
8770 (download_trace_state_variables): Replace check with gdb_assert.
8771 (upload_fast_traceframes): Replace fatal with internal_error.
8773 2014-08-19 Tom Tromey <tromey@redhat.com>
8774 Gary Benson <gbenson@redhat.com>
8776 * Makefile.in (SFILES): Add common/common-debug.c.
8777 (OBS): Add common-debug.o.
8778 (common-debug.o): New rule.
8779 * debug.h (debug_printf): Don't declare.
8780 * debug.c (debug_printf): Renamed and rewritten as...
8781 (debug_vprintf): New function.
8783 2014-08-19 Gary Benson <gbenson@redhat.com>
8785 * utils.h: Do not include print-utils.h.
8787 2014-08-19 Tom Tromey <tromey@redhat.com>
8788 Gary Benson <gbenson@redhat.com>
8790 * server.h: Add static assertion.
8791 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8793 2014-08-19 Tom Tromey <tromey@redhat.com>
8794 Gary Benson <gbenson@redhat.com>
8796 * Makefile.in (SFILES): Add common/errors.c.
8797 (OBS): Add errors.o.
8798 (IPA_OBS): Add errors-ipa.o.
8799 (errors.o): New rule.
8800 (errors-ipa.o): Likewise.
8801 * utils.h (perror_with_name, error, warning): Don't declare.
8802 * utils.c (warning): Renamed and rewritten as...
8803 (vwarning): New function.
8804 (error): Renamed and rewritten as...
8805 (verror): New function.
8806 (internal_error): Renamed and rewritten as...
8807 (internal_verror): New function.
8809 2014-08-07 Gary Benson <gbenson@redhat.com>
8811 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8812 * configure: Regenerate.
8813 * config.in: Likewise.
8814 * server.h: Do not include errno.h.
8815 * event-loop.c: Likewise.
8816 * hostio-errno.c: Likewise.
8817 * linux-low.c: Likewise.
8818 * remote-utils.c: Likewise.
8819 * spu-low.c: Likewise.
8820 * utils.c: Likewise.
8821 * gdbreplay.c: Unconditionally include errno.h.
8823 2014-08-07 Gary Benson <gbenson@redhat.com>
8825 * server.h: Do not include string.h.
8826 * event-loop.c: Likewise.
8827 * linux-low.c: Likewise.
8828 * regcache.c: Likewise.
8829 * remote-utils.c: Likewise.
8830 * spu-low.c: Likewise.
8831 * utils.c: Likewise.
8833 2014-08-07 Gary Benson <gbenson@redhat.com>
8835 * server.h: Do not include gdb_assert.h.
8837 2014-08-07 Gary Benson <gbenson@redhat.com>
8839 * server.h: Do not include common-utils.h.
8841 2014-08-07 Gary Benson <gbenson@redhat.com>
8843 * server.h: Do not include ptid.h.
8844 * notif.h: Likewise.
8846 2014-08-07 Gary Benson <gbenson@redhat.com>
8848 * server.h: Do not include gdb_locale.h.
8850 2014-08-07 Gary Benson <gbenson@redhat.com>
8852 * server.h: Do not include gdb/signals.h.
8853 * win32-low.c: Likewise.
8855 2014-08-07 Gary Benson <gbenson@redhat.com>
8857 * server.h: Do not include pathmax.h.
8859 2014-08-07 Gary Benson <gbenson@redhat.com>
8861 * server.h: Do not include libiberty.h.
8862 * linux-bfin-low.c: Likewise.
8864 2014-08-07 Gary Benson <gbenson@redhat.com>
8866 * server.h: Do not include ansidecl.h.
8868 2014-08-07 Gary Benson <gbenson@redhat.com>
8870 * linux-x86-low.c: Do not include stddef.h.
8871 * lynx-ppc-low.c: Likewise.
8872 * tracepoint.c: Likewise.
8874 2014-08-07 Gary Benson <gbenson@redhat.com>
8876 * server.h: Do not include stdarg.h.
8877 * nto-low.c: Likewise.
8879 2014-08-07 Gary Benson <gbenson@redhat.com>
8881 * server.h: Do not include stdlib.h.
8882 * inferiors.c: Likewise.
8883 * linux-low.c: Likewise.
8884 * regcache.c: Likewise.
8885 * spu-low.c: Likewise.
8886 * tracepoint.c: Likewise.
8887 * utils.c: Likewise.
8889 2014-08-07 Gary Benson <gbenson@redhat.com>
8891 * server.h: Do not include stdio.h.
8892 * linux-low.c: Likewise.
8893 * remote-utils.c: Likewise.
8894 * spu-low.c: Likewise.
8895 * utils.c: Likewise.
8896 * wincecompat.c: Likewise.
8898 2014-08-06 Gary Benson <gbenson@redhat.com>
8900 * regcache.c (init_register_cache): Move conditionals inside if.
8902 2014-08-06 Gary Benson <gbenson@redhat.com>
8904 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8906 2014-07-31 Gary Benson <gbenson@redhat.com>
8908 * ax.h: Do not include server.h.
8909 * gdbthread.h: Likewise.
8910 * lynx-low.h: Likewise.
8911 * notif.h: Likewise.
8913 2014-07-30 Gary Benson <gbenson@redhat.com>
8915 * server.h: Include common-defs.h.
8916 Do not include config.h or build-gnulib-gdbserver/config.h.
8918 2014-07-30 Gary Benson <gbenson@redhat.com>
8920 * hostio-errno.c: Move server.h to top of includes list.
8921 * inferiors.c: Likewise.
8922 * linux-x86-low.c: Likewise.
8923 * notif.c: Include server.h.
8925 2014-07-24 Tom Tromey <tromey@redhat.com>
8926 Gary Benson <gbenson@redhat.com>
8928 * server.h (CORE_ADDR): Now unsigned.
8930 2014-07-16 Pedro Alves <palves@redhat.com>
8932 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8934 2014-07-15 Pedro Alves <palves@redhat.com>
8936 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8939 2014-07-11 Pedro Alves <palves@redhat.com>
8941 * linux-low.c (kill_wait_lwp): New function, based on
8942 kill_one_lwp_callback, but use my_waitpid directly.
8943 (kill_one_lwp_callback, linux_kill): Use it.
8945 2014-06-23 Pedro Alves <palves@redhat.com>
8947 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8948 before setting DR0..DR3.
8950 2014-06-20 Gary Benson <gbenson@redhat.com>
8952 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8953 * configure: Regenerated.
8954 * config.in: Likewise.
8956 2014-06-20 Gary Benson <gbenson@redhat.com>
8958 * Makefile.in (SFILES): Update locations for files moved
8960 (object file files): Reordered.
8962 2014-06-20 Gary Benson <gbenson@redhat.com>
8964 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8965 (i386_dr_low_set_addr): Likewise.
8966 (i386_dr_low_get_addr): Likewise.
8967 (i386_dr_low_can_set_control): Likewise.
8968 (i386_dr_low_set_control): Likewise.
8969 (i386_dr_low_get_control): Likewise.
8970 (i386_dr_low_get_status): Likewise.
8971 (i386_get_debug_register_length): Likewise.
8972 * linux-x86-low.c (i386_dr_low_set_addr):
8973 Changed signature. Made static.
8974 (i386_dr_low_get_addr): Likewise.
8975 (i386_dr_low_set_control): Likewise.
8976 (i386_dr_low_get_control): Likewise.
8977 (i386_dr_low_get_status): Likewise.
8978 (i386_dr_low): New global variable.
8979 * win32-i386-low.c (i386_dr_low_set_addr):
8980 Changed signature. Made static.
8981 (i386_dr_low_get_addr): Likewise.
8982 (i386_dr_low_set_control): Likewise.
8983 (i386_dr_low_get_control): Likewise.
8984 (i386_dr_low_get_status): Likewise.
8985 (i386_dr_low): New global variable.
8987 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8989 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8990 * Makefile.in (AR, AR_FLAGS): Define.
8991 * configure: Regenerate.
8993 2014-06-19 Gary Benson <gbenson@redhat.com>
8995 * Makefile.in (i386-dregs.o): New rule.
8996 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8997 * i386-low.c (target.h): Remove include.
8998 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8999 (DR_CONTROL_SHIFT): Likewise.
9000 (DR_CONTROL_SIZE): Likewise.
9001 (DR_RW_EXECUTE): Likewise.
9002 (DR_RW_WRITE): Likewise.
9003 (DR_RW_READ): Likewise.
9004 (DR_RW_IORW): Likewise.
9005 (DR_LEN_1): Likewise.
9006 (DR_LEN_2): Likewise.
9007 (DR_LEN_4): Likewise.
9008 (DR_LEN_8): Likewise.
9009 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9010 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9011 (DR_ENABLE_SIZE): Likewise.
9012 (DR_LOCAL_SLOWDOWN): Likewise.
9013 (DR_GLOBAL_SLOWDOWN): Likewise.
9014 (DR_CONTROL_RESERVED): Likewise.
9015 (I386_DR_CONTROL_MASK): Likewise.
9016 (I386_DR_VACANT): Likewise.
9017 (I386_DR_LOCAL_ENABLE): Likewise.
9018 (I386_DR_GLOBAL_ENABLE): Likewise.
9019 (I386_DR_DISABLE): Likewise.
9020 (I386_DR_SET_RW_LEN): Likewise.
9021 (I386_DR_GET_RW_LEN): Likewise.
9022 (I386_DR_WATCH_HIT): Likewise.
9023 (i386_wp_op_t): Likewise.
9024 (i386_show_dr): Likewise.
9025 (i386_length_and_rw_bits): Likewise.
9026 (i386_insert_aligned_watchpoint): Likewise.
9027 (i386_remove_aligned_watchpoint): Likewise.
9028 (i386_handle_nonaligned_watchpoint): Likewise.
9029 i386_update_inferior_debug_regs(): Likewise.
9030 (i386_dr_insert_watchpoint): Likewise.
9031 (i386_dr_remove_watchpoint): Likewise.
9032 (i386_dr_region_ok_for_watchpoint): Likewise.
9033 (i386_dr_stopped_data_address): Likewise.
9034 (i386_dr_stopped_by_watchpoint): Likewise.
9036 2014-06-19 Gary Benson <gbenson@redhat.com>
9038 * i386-low.c (i386_dr_show): Renamed to
9039 i386_show_dr and made static. All uses updated.
9040 (i386_dr_length_and_rw_bits): Renamed to
9041 i386_length_and_rw_bits and made static.
9043 (i386_dr_insert_aligned_watchpoint): Renamed to
9044 i386_insert_aligned_watchpoint and made static.
9046 (i386_dr_remove_aligned_watchpoint): Renamed to
9047 i386_remove_aligned_watchpoint and made static.
9049 (i386_dr_update_inferior_debug_regs): Renamed to
9050 i386_update_inferior_debug_regs and made static.
9053 2014-06-18 Gary Benson <gbenson@redhat.com>
9055 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9056 (i386_dr_low_can_set_control): Likewise.
9057 (i386_get_debug_register_length): Likewise.
9058 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9059 (i386_dr_low_can_set_control): Likewise.
9060 (i386_get_debug_register_length): Likewise.
9062 2014-06-17 Gary Benson <gbenson@redhat.com>
9064 * i386-low.h (i386-dregs.h): New include.
9065 (DR_FIRSTADDR): Now in i386-dregs.h.
9066 (DR_LASTADDR): Likewise.
9067 (DR_NADDR): Likewise.
9068 (DR_STATUS): Likewise.
9069 (DR_CONTROL): Likewise.
9070 (i386_debug_reg_state): Likewise.
9071 (i386_dr_insert_watchpoint): Likewise.
9072 (i386_dr_remove_watchpoint): Likewise.
9073 (i386_dr_region_ok_for_watchpoint): Likewise.
9074 (i386_dr_stopped_data_address): Likewise.
9075 (i386_dr_stopped_by_watchpoint): Likewise.
9076 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9078 2014-06-18 Gary Benson <gbenson@redhat.com>
9080 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9081 i386_dr_insert_watchpoint.
9082 (i386_low_remove_watchpoint): Renamed to
9083 i386_dr_remove_watchpoint.
9084 (i386_low_region_ok_for_watchpoint): Renamed to
9085 i386_dr_region_ok_for_watchpoint.
9086 (i386_low_stopped_data_address): Renamed to
9087 i386_dr_stopped_data_address.
9088 (i386_low_stopped_by_watchpoint): Renamed to
9089 i386_dr_stopped_by_watchpoint.
9090 * i386-low.c (i386_show_dr): Renamed to
9091 i386_dr_show and made nonstatic. All uses updated.
9092 (i386_length_and_rw_bits): Renamed to
9093 i386_dr_length_and_rw_bits and made nonstatic.
9095 (i386_insert_aligned_watchpoint): Renamed to
9096 i386_dr_insert_aligned_watchpoint and made nonstatic.
9098 (i386_remove_aligned_watchpoint): Renamed to
9099 i386_dr_remove_aligned_watchpoint and made nonstatic.
9101 (i386_update_inferior_debug_regs): Renamed to
9102 i386_dr_update_inferior_debug_regs and made nonstatic.
9104 (i386_low_insert_watchpoint): Renamed to
9105 i386_dr_insert_watchpoint. All uses updated.
9106 (i386_low_remove_watchpoint): Renamed to
9107 i386_dr_remove_watchpoint. All uses updated.
9108 (i386_low_region_ok_for_watchpoint): Renamed to
9109 i386_dr_region_ok_for_watchpoint. All uses updated.
9110 (i386_low_stopped_data_address): Renamed to
9111 i386_dr_stopped_data_address. All uses updated.
9112 (i386_low_stopped_by_watchpoint): Renamed to
9113 i386_dr_stopped_by_watchpoint. All uses updated.
9115 2014-06-18 Gary Benson <gbenson@redhat.com>
9117 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9118 (i386_dr_low_can_set_control): Likewise.
9119 (i386_insert_aligned_watchpoint): New check.
9121 2014-06-18 Gary Benson <gbenson@redhat.com>
9123 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9126 2014-06-18 Gary Benson <gbenson@redhat.com>
9128 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9129 instead of fatal and error.
9130 (i386_handle_nonaligned_watchpoint): Likewise.
9132 2014-06-18 Gary Benson <gbenson@redhat.com>
9134 * i386-low.c (i386_get_debug_register_length): New macro.
9135 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9136 (i386_show_dr): Use debug_printf instead of fprintf. Use
9137 phex to format values.
9139 2014-06-18 Gary Benson <gbenson@redhat.com>
9141 * i386-low.h: Comment changes.
9142 * i386-low.c: Likewise.
9144 2014-06-18 Gary Benson <gbenson@redhat.com>
9146 * i386-low.c: Whitespace changes.
9148 2014-06-12 Tom Tromey <tromey@redhat.com>
9150 * utils.c (freeargv): Remove.
9152 2014-06-12 Tom Tromey <tromey@redhat.com>
9154 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9155 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9156 (parse_debug_format_options): Likewise.
9157 (gdbserver_usage): Likewise.
9158 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9159 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9160 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9162 ($(LIBGNU)): Depend on libiberty.
9163 (all-lib): Recurse into all subdirs.
9164 (install-only): Invoke "install" target in subdirs.
9165 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9167 * configure: Rebuild.
9168 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9169 for vasprintf, vsnprintf, or gettimeofday.
9170 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9173 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9175 * development.sh: Delete.
9176 * Makefile.in (config.status): Adjust dependency on development.sh.
9177 * configure.ac: Adjust development.sh source call.
9178 * configure: Regenerate.
9180 2014-06-02 Pedro Alves <palves@redhat.com>
9182 * ax.c (gdb_free_agent_expr): New function.
9183 * ax.h (gdb_free_agent_expr): New declaration.
9184 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9186 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9188 (clear_breakpoint_conditions_and_commands): New function.
9189 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9190 (clear_breakpoint_conditions_and_commands): New declaration.
9192 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9194 * linux-aarch64-low.c (asm/ptrace.h): Include.
9196 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9198 Fix TLS access for -static -pthread.
9199 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9200 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9201 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9203 2014-05-20 Pedro Alves <palves@redhat.com>
9205 * linux-aarch64-low.c (aarch64_insert_point)
9206 (aarch64_remove_point): No longer check whether the type is
9207 supported here. Adjust to new interface.
9208 (the_low_target): Install aarch64_supports_z_point_type as
9209 supports_z_point_type method.
9210 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9211 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9212 instead of a Z packet char. Adjust.
9213 (arm_supports_z_point_type): New function.
9214 (arm_insert_point, arm_remove_point): Adjust to new interface.
9215 (the_low_target): Install arm_supports_z_point_type.
9216 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9217 (cris_insert_point, cris_remove_point): Adjust to new interface.
9218 Don't check whether the type is supported here.
9219 (the_low_target): Install cris_supports_z_point_type.
9220 * linux-low.c (linux_supports_z_point_type): New function.
9221 (linux_insert_point, linux_remove_point): Adjust to new interface.
9222 * linux-low.h (struct linux_target_ops) <insert_point,
9223 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9224 raw_breakpoint pointer parameter.
9225 <supports_z_point_type>: New method.
9226 * linux-mips-low.c (mips_supports_z_point_type): New function.
9227 (mips_insert_point, mips_remove_point): Adjust to new interface.
9228 Use mips_supports_z_point_type.
9229 (the_low_target): Install mips_supports_z_point_type.
9230 * linux-ppc-low.c (the_low_target): Install NULL as
9231 supports_z_point_type method.
9232 * linux-s390-low.c (the_low_target): Install NULL as
9233 supports_z_point_type method.
9234 * linux-sparc-low.c (the_low_target): Install NULL as
9235 supports_z_point_type method.
9236 * linux-x86-low.c (x86_supports_z_point_type): New function.
9237 (x86_insert_point): Adjust to new insert_point interface. Use
9238 insert_memory_breakpoint. Adjust to new
9239 i386_low_insert_watchpoint interface.
9240 (x86_remove_point): Adjust to remove_point interface. Use
9241 remove_memory_breakpoint. Adjust to new
9242 i386_low_remove_watchpoint interface.
9243 (the_low_target): Install x86_supports_z_point_type.
9244 * lynx-low.c (lynx_target_ops): Install NULL as
9245 supports_z_point_type callback.
9246 * nto-low.c (nto_supports_z_point_type): New.
9247 (nto_insert_point, nto_remove_point): Adjust to new interface.
9248 (nto_target_ops): Install nto_supports_z_point_type.
9249 * mem-break.c: Adjust intro comment.
9250 (struct raw_breakpoint) <raw_type, size>: New fields.
9251 <inserted>: Update comment.
9252 <shlib_disabled>: Delete field.
9253 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9254 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9255 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9256 (raw_bkpt_type_to_target_hw_bp_type): New function.
9257 (find_enabled_raw_code_breakpoint_at): New function.
9258 (find_raw_breakpoint_at): New type and size parameters. Use them.
9259 (insert_memory_breakpoint): New function, based off
9260 set_raw_breakpoint_at.
9261 (remove_memory_breakpoint): New function.
9262 (set_raw_breakpoint_at): Reimplement.
9263 (set_breakpoint): New, based on set_breakpoint_at.
9264 (set_breakpoint_at): Reimplement.
9265 (delete_raw_breakpoint): Go through the_target->remove_point
9266 instead of assuming memory breakpoints.
9267 (find_gdb_breakpoint_at): Delete.
9268 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9269 (find_gdb_breakpoint): New function.
9270 (set_gdb_breakpoint_at): Delete.
9271 (z_type_supported): New function.
9272 (set_gdb_breakpoint_1): New function, loosely based off
9273 set_gdb_breakpoint_at.
9274 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9275 (delete_gdb_breakpoint_at): Delete.
9276 (delete_gdb_breakpoint_1): New function, loosely based off
9277 delete_gdb_breakpoint_at.
9278 (delete_gdb_breakpoint): New function.
9279 (clear_gdb_breakpoint_conditions): Rename to ...
9280 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9282 (add_condition_to_breakpoint): Make static.
9283 (add_breakpoint_condition): Take a struct breakpoint pointer
9284 instead of an address. Adjust.
9285 (gdb_condition_true_at_breakpoint): Rename to ...
9286 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9288 (gdb_condition_true_at_breakpoint): Reimplement.
9289 (add_breakpoint_commands): Take a struct breakpoint pointer
9290 instead of an address. Adjust.
9291 (gdb_no_commands_at_breakpoint): Rename to ...
9292 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9293 parameter. Return true if no breakpoint was found. Change debug
9295 (gdb_no_commands_at_breakpoint): Reimplement.
9296 (run_breakpoint_commands): Rename to ...
9297 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9298 and change return type to boolean.
9299 (run_breakpoint_commands): New function.
9300 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9301 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9302 breakpoint. Go through the_target->remove_point instead of
9303 assuming memory breakpoint.
9304 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9305 software and hardware breakpoints.
9306 (reinsert_raw_breakpoint): Go through the_target->insert_point
9307 instead of assuming memory breakpoint.
9308 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9309 software and hardware breakpoints.
9310 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9311 Check both software and hardware breakpoints.
9312 (validate_inserted_breakpoint): Assert the breakpoint is a
9313 software breakpoint. Set the inserted flag to -1 instead of
9314 setting shlib_disabled.
9315 (delete_disabled_breakpoints): Adjust.
9316 (validate_breakpoints): Only validate software breakpoints.
9317 Adjust to inserted flag change.
9318 (check_mem_read, check_mem_write): Skip breakpoint types other
9319 than software breakpoints. Adjust to inserted flag change.
9320 * mem-break.h (enum raw_bkpt_type): New enum.
9321 (raw_breakpoint, struct process_info): Forward declare.
9322 (Z_packet_to_target_hw_bp_type): Delete declaration.
9323 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9324 (set_gdb_breakpoint, delete_gdb_breakpoint)
9325 (clear_breakpoint_conditions): New declarations.
9326 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9327 (breakpoint_inserted_here): Update comment.
9328 (add_breakpoint_condition, add_breakpoint_commands): Replace
9329 address parameter with a breakpoint pointer parameter.
9330 (gdb_breakpoint_here): Update comment.
9331 (delete_gdb_breakpoint_at): Delete.
9332 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9333 * server.c (process_point_options): Take a struct breakpoint
9334 pointer instead of an address. Adjust.
9335 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9336 delete_gdb_breakpoint.
9337 * spu-low.c (spu_target_ops): Install NULL as
9338 supports_z_point_type method.
9339 * target.h: Include mem-break.h.
9340 (struct target_ops) <prepare_to_access_memory>: Update comment.
9341 <supports_z_point_type>: New field.
9342 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9343 instead of a char. Also take a raw breakpoint pointer.
9344 * win32-arm-low.c (the_low_target): Install NULL as
9345 supports_z_point_type.
9346 * win32-i386-low.c (i386_supports_z_point_type): New function.
9347 (i386_insert_point, i386_remove_point): Adjust to new interface.
9348 (the_low_target): Install i386_supports_z_point_type.
9349 * win32-low.c (win32_supports_z_point_type): New function.
9350 (win32_insert_point, win32_remove_point): Adjust to new interface.
9351 (win32_target_ops): Install win32_supports_z_point_type.
9352 * win32-low.h (struct win32_target_ops):
9353 <supports_z_point_type>: New method.
9354 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9355 instead of a char. Also take a raw breakpoint pointer.
9357 2014-05-20 Pedro Alves <palves@redhat.com>
9359 * mem-break.h: Include break-common.h.
9360 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9361 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9362 (Z_packet_to_target_hw_bp_type): New declaration.
9363 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9364 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9365 (Z_PACKET_ACCESS_WP): Delete macros.
9366 (Z_packet_to_hw_type): Delete function.
9367 * i386-low.h: Don't include break-common.h here.
9368 (Z_packet_to_hw_type): Delete declaration.
9369 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9370 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9371 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9372 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9373 * linux-aarch64-low.c: Don't include break-common.h here.
9374 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9375 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9376 (Z_packet_to_target_hw_bp_type): Delete function.
9377 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9379 (mips_insert_point, mips_remove_point): Use
9380 Z_packet_to_target_hw_bp_type.
9382 2014-05-20 Pedro Alves <palves@redhat.com>
9384 * linux-aarch64-low.c: Include break-common.h.
9385 (enum target_point_type): Delete.
9386 (Z_packet_to_point_type): Rename to ...
9387 (Z_packet_to_target_hw_bp_type): ... this, and return a
9388 target_hw_bp_type instead.
9389 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9390 instead of an enum target_point_type.
9391 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9393 (aarch64_dr_state_insert_one_point)
9394 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9395 (aarch64_handle_aligned_watchpoint)
9396 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9397 Take an enum target_hw_bp_type instead of an enum
9399 (aarch64_supports_z_point_type): New function.
9400 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9401 use Z_packet_to_target_hw_bp_type.
9403 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9405 * configure.ac: Only use -Werror by default when DEVELOPMENT
9407 * configure: Regenerate.
9409 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9411 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9412 * linux-x86-low.c (X86_64_USER_REGS): New.
9413 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9415 2014-04-28 Yao Qi <yao@codesourcery.com>
9417 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9420 2014-04-25 Pedro Alves <palves@redhat.com>
9423 * linux-low.c (linux_attach_fail_reason_string): New function.
9424 (linux_attach_lwp): Delete.
9425 (linux_attach_lwp_1): Rename to ...
9426 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9427 argument. Remove "initial" parameter. Return int instead of
9428 void. Don't error or warn here.
9429 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9430 failure to attach to the tgid. Call warning when failing to
9432 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9433 argument. Remove "initial" parameter. Return int instead of
9434 void. Don't error or warn here.
9435 (linux_attach_fail_reason_string): New declaration.
9436 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9437 interface change. Use linux_attach_fail_reason_string.
9439 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9440 Walfred Tedeschi <walfred.tedeschi@intel.com>
9442 * Makefile.in: Added rules to handle new files
9443 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9444 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9445 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9446 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9447 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9448 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9450 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9451 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9452 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9453 i386/x32-avx512.xml.
9454 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9455 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9456 i386/x32-avx512-linux.xml.
9457 * i387-fp.c (num_avx512_k_registers): New constant for number
9459 (num_avx512_zmmh_low_registers): New constant for number of
9460 lower ZMM registers (0-15).
9461 (num_avx512_zmmh_high_registers): New constant for number of
9462 higher ZMM registers (16-31).
9463 (num_avx512_ymmh_registers): New contant for number of higher
9464 YMM registers (ymm16-31 added by avx521 on x86_64).
9465 (num_avx512_xmm_registers): New constant for number of higher
9466 XMM registers (xmm16-31 added by AVX512 on x86_64).
9467 (struct i387_xsave): Add space for AVX512 registers.
9468 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9469 Add code to handle AVX512 registers.
9470 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9471 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9472 prototypei from generated file.
9473 (tdesc_amd64_avx512_linux): Likewise.
9474 (init_registers_x32_avx512_linux): Likewise.
9475 (tdesc_x32_avx512_linux): Likewise.
9476 (init_registers_i386_avx512_linux): Likewise.
9477 (tdesc_i386_avx512_linux): Likewise.
9478 (x86_64_regmap): Add AVX512 registers.
9479 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9481 (initialize_low_arch): Add code to initialize AVX512 registers.
9483 2014-04-23 Pedro Alves <palves@redhat.com>
9485 * mem-break.c (find_gdb_breakpoint_at): Make static.
9486 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9488 2014-04-23 Pedro Alves <palves@redhat.com>
9490 * i386-low.c: Don't include break-common.h here.
9491 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9492 prototype to take target_hw_bp_type as argument instead of a Z
9494 * i386-low.h: Include break-common.h here.
9495 (Z_packet_to_hw_type): Declare.
9496 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9498 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9499 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9500 (x86_remove_point): Convert the packet number to a
9501 target_hw_bp_type before calling i386_low_remove_watchpoint.
9502 * win32-i386-low.c (i386_insert_point): Convert the packet number
9503 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9504 (i386_remove_point): Convert the packet number to a
9505 target_hw_bp_type before calling i386_low_remove_watchpoint.
9507 2014-04-23 Pedro Alves <palves@redhat.com>
9509 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9511 2014-04-10 Pedro Alves <palves@redhat.com>
9513 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9514 Check if the condition or command is NULL before checking if the
9515 breakpoint is known. On success, return true.
9516 * mem-break.h (add_breakpoint_condition): Document return.
9517 (add_breakpoint_commands): Add describing comment.
9518 * server.c (skip_to_semicolon): New function.
9519 (process_point_options): Use it.
9521 2014-04-09 Pedro Alves <palves@redhat.com>
9523 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9526 2014-02-27 Pedro Alves <palves@redhat.com>
9529 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9531 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9533 (last_thread_of_process_p): Take a PID argument instead of a
9535 (linux_wait_for_lwp): Delete.
9536 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9538 (linux_low_filter_event): New function, party factored out from
9539 linux_wait_for_event.
9540 (linux_wait_for_event): Rename to ...
9541 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9542 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9543 sigsuspend. Check for zombie leaders.
9544 (linux_wait_for_event): Reimplement as wrapper around
9545 linux_wait_for_event_filtered.
9546 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9547 a normal or signal exit is seen, it's the whole process exiting.
9548 (wait_for_sigstop): No longer a for_each_inferior callback.
9549 Rewrite on top of linux_wait_for_event_filtered.
9550 (stop_all_lwps): Call wait_for_sigstop directly.
9551 * server.c (resume, handle_target_event): Handle
9552 TARGET_WAITKIND_NO_RESUMED.
9554 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9556 * win32-low.c (psapi_get_dll_name,
9557 * win32_CreateToolhelp32Snapshot): Delete.
9558 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9559 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9561 (handle_load_dll): Add function description.
9562 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9564 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9566 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9568 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9569 base address when calling win32_add_one_solib.
9570 (handle_load_dll): Delete local variable load_addr.
9571 Remove 0x1000 offset applied to DLL base address when calling
9572 win32_add_one_solib.
9573 (handle_unload_dll): Add comment.
9575 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9577 * win32-low.c (win32_add_all_dlls): Renames
9578 win32_ensure_ntdll_loaded. Rewrite function documentation.
9579 Adjust implementation to always load all DLLs.
9580 Add 0x1000 offset to DLL base address when calling
9581 win32_add_one_solib.
9582 (child_initialization_done): New static global.
9583 (do_initial_child_stuff): Set child_initialization_done to
9584 zero during child initialization, and 1 after. Replace call
9585 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9587 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9588 (handle_unload_dll): Add function documentation.
9589 (get_child_debug_event): Ignore load and unload DLL events
9590 during child initialization.
9592 2014-02-20 Doug Evans <dje@google.com>
9594 Remove global all_lwps.
9595 * inferiors.h (ptid_of): Move here from linux-low.h.
9596 (pid_of, lwpid_of): Ditto.
9597 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9598 parameter is a struct thread_info * now.
9599 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9600 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9601 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9603 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9604 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9605 * linux-arm-low.c (update_registers_callback): Update, "entry"
9606 parameter is a struct thread_info * now.
9607 Fetch lwpid from current_inferior directly.
9608 (arm_insert_point): Pass &all_threads to find_inferior instead of
9610 (arm_remove_point): Ditto.
9611 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9612 (arm_prepare_to_resume): Fetch pid from thread.
9613 (arm_read_description): Fetch lwpid from current_inferior directly.
9614 * linux-low.c (all_lwps): Delete.
9615 (delete_lwp): Delete call to remove_inferior.
9616 (handle_extended_wait): Fetch lwpid from thread.
9617 (add_lwp): Don't set lwp->entry.id. Remove call to
9618 add_inferior_to_list.
9619 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9620 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9621 (kill_one_lwp_callback): Ditto.
9622 (linux_kill): Don't dereference NULL pointer.
9623 Fetch ptid,lwpid from thread.
9624 (get_detach_signal): Fetch ptid from thread.
9625 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9626 Simplify call to regcache_invalidate_thread.
9627 (delete_lwp_callback): Update, "entry" parameter is a
9628 struct thread_info * now. Fetch pid from thread.
9629 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9630 (status_pending_p_callback): Update, "entry" parameter is a
9631 struct thread_info * now. Fetch ptid from thread.
9632 (find_lwp_pid): Update, "entry" parameter is a
9633 struct thread_info * now.
9634 (linux_wait_for_lwp): Fetch pid from thread.
9635 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9636 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9637 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9638 (dequeue_one_deferred_signal): Ditto.
9639 (cancel_breakpoint): Fetch ptid from current_inferior.
9640 (linux_wait_for_event): Pass &all_threads to find_inferior,
9641 not &all_lwps. Fetch ptid, lwpid from thread.
9642 (count_events_callback): Update, "entry" parameter is a
9643 struct thread_info * now.
9644 (select_singlestep_lwp_callback): Ditto.
9645 (select_event_lwp_callback): Ditto.
9646 (cancel_breakpoints_callback): Ditto.
9647 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9649 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9650 (unsuspend_one_lwp): Update, "entry" parameter is a
9651 struct thread_info * now.
9652 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9654 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9655 Fetch lwpid from thread, not lwp.
9656 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9657 Pass &all_threads to find_inferior, not &all_lwps.
9658 (send_sigstop): Fetch lwpid from thread, not lwp.
9659 (send_sigstop_callback): Update, "entry" parameter is a
9660 struct thread_info * now.
9661 (suspend_and_send_sigstop_callback): Ditto.
9662 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9663 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9664 struct thread_info * now.
9665 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9667 (lwp_running): Update, "entry" parameter is a
9668 struct thread_info * now.
9669 (stop_all_lwps): Fetch ptid from thread.
9670 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9671 (linux_resume_one_lwp): Fetch lwpid from thread.
9672 (linux_set_resume_request): Update, "entry" parameter is a
9673 struct thread_info * now. Fetch pid, lwpid from thread.
9674 (resume_status_pending_p): Update, "entry" parameter is a
9675 struct thread_info * now.
9676 (need_step_over_p): Ditto. Fetch lwpid from thread.
9677 (start_step_over): Fetch lwpid from thread.
9678 (linux_resume_one_thread): Update, "entry" parameter is a
9679 struct thread_info * now. Fetch lwpid from thread.
9680 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9681 (proceed_one_lwp): Update, "entry" parameter is a
9682 struct thread_info * now. Fetch lwpid from thread.
9683 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9684 struct thread_info * now.
9685 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9686 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9687 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9689 (regsets_store_inferior_registers): Ditto.
9690 (fetch_register, store_register): Ditto.
9691 (linux_read_memory, linux_write_memory): Ditto.
9692 (linux_request_interrupt): Ditto.
9693 (linux_read_auxv): Ditto.
9694 (linux_xfer_siginfo): Ditto.
9695 (linux_qxfer_spu): Ditto.
9696 (linux_qxfer_libraries_svr4): Ditto.
9697 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9698 moved to inferiors.h.
9700 (get_thread_lwp): Update.
9701 (struct lwp_info): Delete member "entry". Simplify comment for
9704 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9705 current_inferior directly.
9706 (update_watch_registers_callback): Update, "entry" parameter is a
9707 struct thread_info * now. Fetch pid from thread.
9708 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9709 (mips_insert_point): Fetch lwpid from current_inferior.
9710 Pass &all_threads to find_inferior, not &all_lwps.
9711 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9712 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9714 (mips_stopped_data_address): Ditto.
9715 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9717 * linux-tile-low.c (tile_arch_setup): Ditto.
9718 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9719 (update_debug_registers_callback): Update, "entry" parameter is a
9720 struct thread_info * now. Fetch pid from thread.
9721 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9722 Pass &all_threads to find_inferior, not &all_lwps.
9723 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9724 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9725 Pass &all_threads to find_inferior, not &all_lwps.
9726 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9727 (i386_dr_low_get_status): Ditto.
9728 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9729 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9730 (x86_linux_read_description): Ditto.
9731 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9733 2014-02-20 Doug Evans <dje@google.com>
9735 * inferiors.c (get_first_inferior): Fix buglet.
9737 2014-02-19 Doug Evans <dje@google.com>
9739 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9740 * inferiors.c (add_thread): Change result type to struct thread_info *.
9741 All callers updated.
9742 (add_lwp): Call add_thread here instead of in callers.
9743 All callers updated.
9744 * linux-low.h (get_lwp_thread): Rewrite.
9745 (struct lwp_info): New member "thread".
9747 2014-02-19 Doug Evans <dje@google.com>
9749 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9750 All callers updated.
9752 2014-02-19 Doug Evans <dje@google.com>
9754 * inferiors.c (add_thread): Fix whitespace.
9756 2014-02-19 Doug Evans <dje@google.com>
9758 * dll.c (clear_dlls): Replace accessing list implemention details
9760 * gdbthread.h (get_first_thread): Declare.
9761 * inferiors.c (for_each_inferior_with_data): New function.
9762 (get_first_thread): New function.
9763 (find_thread_ptid): Simplify.
9764 (get_first_inferior): New function.
9765 (clear_list): Delete.
9766 (one_inferior_p): New function.
9767 (clear_inferior_list): New function.
9768 (clear_inferiors): Update.
9769 * inferiors.h (for_each_inferior_with_data): Declare.
9770 (clear_inferior_list): Declare.
9771 (one_inferior_p): Declare.
9772 (get_first_inferior): Declare.
9773 * linux-low.c (linux_wait_for_event): Replace accessing list
9774 implemention details with API function.
9775 * server.c (target_running): Ditto.
9776 (accumulate_file_name_length): New function.
9777 (emit_dll_description): New function.
9778 (handle_qxfer_libraries): Replace accessing list implemention
9779 details with API function.
9780 (handle_qxfer_threads_worker): New function.
9781 (handle_qxfer_threads_proper): Replace accessing list implemention
9782 details with API function.
9783 (handle_query): Ditto.
9784 (visit_actioned_threads_callback_ftype): New typedef.
9785 (visit_actioned_threads_data): New struct.
9786 (visit_actioned_threads): Rewrite to be find_inferior callback.
9787 (resume): Call find_inferior.
9788 (handle_status): Replace accessing list implemention
9789 details with API function.
9790 (process_serial_event): Replace accessing list implemention details
9792 * target.c (set_desired_inferior): Replace accessing list implemention
9793 details with API function.
9794 * tracepoint.c (same_process_p): New function.
9795 (gdb_agent_about_to_close): Replace accessing list implemention
9796 details with API function.
9797 * win32-low.c (child_delete_thread): Replace accessing list
9798 implemention details with API function.
9799 (match_dll_by_basename): New function.
9800 (dll_is_loaded_by_basename): New function.
9801 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9802 details call to dll_is_loaded_by_basename.
9804 2014-02-19 Doug Evans <dje@google.com>
9806 * dll.h (struct dll_info): Add comment.
9807 * gdbthread.h (struct thread_info): Add comment.
9808 (current_ptid): Simplify.
9809 * inferiors.c (add_process): Update.
9810 (remove_process): Update.
9811 * inferiors.h (struct process_info): Rename member "head" to "entry".
9812 * linux-low.c (delete_lwp): Update.
9814 (last_thread_of_process_p): Update.
9815 (kill_one_lwp_callback, linux_kill): Update.
9816 (status_pending_p_callback): Update.
9817 (wait_for_sigstop): Update. Simplify read of ptid.
9818 (start_step_over): Update.
9819 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9820 (get_lwp_thread): Update.
9821 (struct lwp_info): Rename member "head" to "entry".
9822 * regcache.h (inferior_list_entry): Delete.
9823 * server.c (kill_inferior_callback): Update.
9824 (detach_or_kill_inferior_callback): Update.
9825 (print_started_pid): Update.
9826 (print_attached_pid): Update.
9827 (process_serial_event): Simplify read of ptid.
9828 * thread-db.c (thread_db_create_event): Update.
9829 (thread_db_get_tls_address): Update.
9830 * win32-low.c (current_inferior_ptid): Simplify.
9832 2014-02-19 Tom Tromey <tromey@redhat.com>
9834 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9836 (target_supports_btrace): Update.
9838 2014-02-14 Yao Qi <yao@codesourcery.com>
9840 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9841 (rsp-low-ipa.o): New target.
9843 2014-02-12 Tom Tromey <tromey@redhat.com>
9845 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9846 convert_ascii_to_int.
9847 * regcache.c (registers_to_string): Likewise.
9848 * remote-utils.c (decode_M_packet): Likewise.
9849 * server.c (process_serial_event): Likewise.
9851 2014-02-12 Tom Tromey <tromey@redhat.com>
9853 * server.c (handle_query, handle_v_run): Use hex2bin, not
9855 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9857 2014-02-12 Tom Tromey <tromey@redhat.com>
9859 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9860 convert_int_to_ascii.
9861 * regcache.c (registers_to_string, collect_register_as_string):
9863 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9865 * server.c (process_serial_event): Likewise.
9866 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9867 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9869 2014-02-12 Tom Tromey <tromey@redhat.com>
9871 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9872 bin2hex, not hexify.
9873 * tracepoint.c (cmd_qtstatus): Likewise.
9875 2014-02-12 Tom Tromey <tromey@redhat.com>
9877 * remote-utils.c (monitor_output): Pass explicit length to
9880 2014-02-12 Tom Tromey <tromey@redhat.com>
9882 * tracepoint.c: Include rsp-low.h.
9883 * server.c: Include rsp-low.h.
9884 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9885 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9887 * remote-utils.c: Include rsp-low.h.
9888 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9889 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9890 (convert_int_to_ascii, convert_ascii_to_int): Move to
9892 * regcache.c: Include rsp-low.h.
9893 * ax.c: Include rsp-low.h.
9894 * Makefile.in (SFILES): Add common/rsp-low.c.
9895 (OBS): Add rsp-low.o.
9896 (rsp-low.o): New target.
9898 2014-02-12 Tom Tromey <tromey@redhat.com>
9900 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9901 Include print-utils.h.
9902 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9903 (plongest, thirty_two, phex_nz): Remove.
9904 * Makefile.in (SFILES): Add common/print-utils.c.
9905 (OBS): Add print-utils.o.
9906 (print-utils-ipa.o): New target.
9907 (print-utils.o): New target.
9908 (IPA_OBJS): Add print-utils-ipa.o.
9910 2014-02-06 Tom Tromey <tromey@redhat.com>
9912 * Makefile.in (SFILES): Fix indentation.
9914 2014-02-05 Doug Evans <dje@google.com>
9916 * linux-low.c (linux_wait_for_event): Improve comment.
9917 (linux_wait_1): Keep current_inferior in sync with event_child.
9919 2014-01-22 Doug Evans <dje@google.com>
9921 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9923 2014-01-22 Doug Evans <dje@google.com>
9925 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9926 * configure: Regenerate.
9927 * config.in: Regenerate.
9928 * Makefile.in (SFILES): Add debug.c.
9930 * debug.c: New file.
9931 * debug.h: New file.
9932 * linux-aarch64-low.c (*): Update all debugging printfs to use
9933 debug_printf instead of fprintf.
9934 * linux-arm-low.c (*): Ditto.
9935 * linux-cris-low.c (*): Ditto.
9936 * linux-crisv32-low.c (*): Ditto.
9937 * linux-m32r-low.c (*): Ditto.
9938 * linux-sparc-low.c (*): Ditto.
9939 * linux-x86.c (*): Ditto.
9940 * linux-low.c (*): Ditto.
9941 (linux_wait_1): Add calls to debug_enter, debug_exit.
9942 (linux_wait): Remove redundant debugging printf.
9943 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9944 (linux_resume, unstop_all_lwps): Ditto.
9945 * mem-break.c (*): Update all debugging printfs to use
9946 debug_printf instead of fprintf.
9947 * remote-utils.c (*): Ditto.
9948 * thread-db.c (*): Ditto.
9949 * server.c #include <ctype.h>, "gdb_vecs.h".
9950 (debug_threads): Moved to debug.c.
9951 (*): Update all debugging printfs to use debug_printf instead of
9953 (start_inferior): Replace call to fflush with call to debug_flush.
9954 (monitor_show_help): Mention set debug-format.
9955 (parse_debug_format_options): New function.
9956 (handle_monitor_command): Handle "monitor set debug-format".
9957 (gdbserver_usage): Mention --debug-format.
9958 (main): Parse --debug-format.
9959 * server.h (debug_threads): Declaration moved to debug.h.
9961 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9962 trace_debug_1 that uses debug_printf.
9963 (tracepoint_look_up_symbols): Update all debugging printfs to use
9964 debug_printf instead of fprintf.
9966 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9968 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9971 2014-01-17 Pedro Alves <palves@redhat.com>
9974 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9975 defined after including gdb_proc_service.h.
9977 2014-01-16 Doug Evans <dje@google.com>
9979 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9980 (match_dll): Use it.
9982 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9984 * target.h (target_ops) <read_btrace>: Change parameters and
9985 return type to allow error reporting.
9986 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9987 trace reading errors on.
9988 * linux-low.c (linux_low_read_btrace): Pass trace reading
9990 (linux_low_disable_btrace): New.
9992 2014-01-15 Doug Evans <dje@google.com>
9994 * inferiors.c (thread_id_to_gdb_id): Delete.
9995 * inferiors.h (thread_id_to_gdb_id): Delete.
9997 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9999 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10000 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10003 2014-01-08 Pedro Alves <palves@redhat.com>
10005 * server.c (handle_status): Don't discard previous queued stop
10006 replies or thread's pending status here.
10007 (main) <disconnection>: Do it here instead.
10009 2014-01-08 Pedro Alves <palves@redhat.com>
10011 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10012 * server.c (visit_actioned_threads, handle_pending_status): New
10014 (handle_v_cont): Factor out parts to ...
10015 (resume): ... this new function. If in all-stop, and a thread
10016 being resumed has a pending status, report it without actually
10018 (myresume): Adjust to use the new 'resume' function.
10019 (clear_pending_status_callback, set_pending_status_callback)
10020 (find_status_pending_thread_callback): New functions.
10021 (handle_status): Handle the case of multiple threads having
10022 interesting statuses to report. Report threads' real last signal
10023 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10024 with an interesting thread to report the status for, instead of
10025 always reporting the status of the first thread.
10027 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10029 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10030 * gdbreplay.c (gdbreplay_version): Likewise.
10032 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10034 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10035 iov.iov_len with the real length in use.
10037 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10039 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10040 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10041 for all targets that use win32-low.c.
10042 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10043 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10045 2013-12-13 Pedro Alves <palves@redhat.com>
10047 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10048 if equal to TARGET_WAITKIND_LOADED.
10049 * win32-low.c (cached_status): New static global.
10050 (win32_wait): Add declaration.
10051 (do_initial_child_stuff): Flush all initial pending debug events
10052 up to the initial breakpoint.
10053 (win32_wait): If CACHED_STATUS was set, return that instead
10054 of doing a real wait. Remove the code resuming the execution
10055 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10056 during the initial phase. Also remove the code changing
10057 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10058 TARGET_WAITKIND_STOPPED.
10060 2013-12-11 Yao Qi <yao@codesourcery.com>
10062 * notif.c (handle_notif_ack): Return 0 if no notification
10065 2013-11-20 Doug Evans <dje@google.com>
10067 * linux-low.c (linux_set_resume_request): Fix comment.
10069 2013-11-20 Doug Evans <dje@google.com>
10071 * linux-low.c (resume_status_pending_p): Tweak comment.
10073 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10075 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10076 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10077 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10078 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10079 (srv_amd64_regobj): Add amd64-mpx.o.
10080 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10081 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10082 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10083 * i387-fp.c (num_pl_bnd_register) Added constant.
10084 (num_pl_bnd_cfg_registers) Added constant.
10085 (struct i387_xsave) Added reserved area and MPX fields.
10086 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10087 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10089 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10090 (init_registers_amd64_mpx_linux): Declare new function.
10091 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10092 (x86_64_regmap): Add MPX registers.
10093 (x86_linux_read_description): Add MPX case.
10094 (initialize_low_arch): Initialize MPX targets.
10096 2013-11-18 Tom Tromey <tromey@redhat.com>
10098 * configure: Rebuild.
10099 * configure.ac: Don't check for stdlib.h.
10100 * gdbreplay.c: Unconditionally include stdlib.h.
10102 2013-11-18 Tom Tromey <tromey@redhat.com>
10104 * config.in: Rebuild.
10105 * configure: Rebuild.
10106 * configure.ac: Don't use AC_HEADER_DIRENT.
10108 2013-11-18 Tom Tromey <tromey@redhat.com>
10110 * server.h: Don't check HAVE_STRING_H.
10111 * gdbreplay.c: Don't check HAVE_STRING_H.
10112 * configure: Rebuild.
10114 2013-11-18 Tom Tromey <tromey@redhat.com>
10116 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10119 2013-11-08 Tom Tromey <tromey@redhat.com>
10121 * configure, config.in: Rebuild.
10122 * configure.ac: Remove unused configury.
10124 2013-11-08 Tom Tromey <tromey@redhat.com>
10126 * acinclude.m4: Include common.m4, codeset.m4.
10127 * configure, config.in: Rebuild.
10128 * configure.ac: Use GDB_AC_COMMON.
10130 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10132 * linux-s390-low.c (HWCAP_S390_TE): New define.
10133 (s390_arch_setup): Consider the TE field in the HWCAP for
10134 determining 'have_regset_tdb'.
10136 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10139 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10142 2013-10-02 Pedro Alves <palves@redhat.com>
10144 * server.c (process_serial_event): Don't output "GDBserver
10145 exiting" if GDB is connected through stdio.
10146 * target.c (mywait): Likewise, be silent if GDB is connected
10149 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10151 * lynx-low.c (lynx_add_threads_after_attach): New function.
10152 (lynx_attach): Remove call to add_thread. Add call to
10153 lynx_add_threads_after_attach instead.
10155 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10157 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10158 * config.in, configure: Regenerated.
10160 2013-09-18 Yao Qi <yao@codesourcery.com>
10163 * server.c (start_inferior): Clear 'resume_info'.
10165 2013-09-16 Jiong Wang <jiwang@tilera.com>
10167 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10170 2013-09-16 Jiong Wang <jiwang@tilera.com>
10172 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10173 linux-tile-low.o to srv_tgtobj.
10175 2013-09-16 Will Newton <will.newton@linaro.org>
10177 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10180 2013-09-06 Pedro Alves <palves@redhat.com>
10182 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10183 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10184 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10185 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10186 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10187 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10189 2013-09-06 Pedro Alves <palves@redhat.com>
10191 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10192 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10194 2013-09-06 Pedro Alves <palves@redhat.com>
10196 * linux-amd64-ipa.c: Include tracepoint.h.
10197 * linux-i386-ipa.c: Include tracepoint.h.
10199 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10201 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10202 (ps_get_thread_area): New function.
10204 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10206 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10207 (initialize_low_arch): Call init_registers_crisv32 rather than
10208 init_register_crisv32.
10210 2013-09-05 Pedro Alves <palves@redhat.com>
10212 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10214 * hostio.h: ... this new file.
10215 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10216 win32-low.c: Include hostio.h.
10218 2013-09-05 Pedro Alves <palves@redhat.com>
10220 * server.h (gdb_client_data, handler_func, callback_handler_func)
10221 (delete_file_handler, add_file_handler, append_callback_event)
10222 (delete_callback_event, start_event_loop, initialize_event_loop):
10223 Move to event-loop.h and include it.
10224 * event-loop.h: New file.
10226 2013-09-05 Pedro Alves <palves@redhat.com>
10228 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10229 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10230 (loaded_dll, unloaded_dll): Move to ...
10231 * dll.h: ... this new file.
10232 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10234 2013-09-05 Pedro Alves <palves@redhat.com>
10236 * server.h (current_process, get_thread_process, all_processes)
10237 (add_inferior_to_list, for_each_inferior, current_inferior)
10238 (remove_inferior, add_process, remove_process, find_process_pid)
10239 (have_started_inferiors_p, have_attached_inferiors_p)
10240 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10241 (clear_inferiors, find_inferior, find_inferior_id)
10242 (inferior_target_data, set_inferior_target_data)
10243 (inferior_regcache_data, set_inferior_regcache_data): Move to
10244 inferiors.h, and include it.
10245 * inferiors.h: New file.
10247 2013-09-05 Pedro Alves <palves@redhat.com>
10249 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10253 2013-09-05 Pedro Alves <palves@redhat.com>
10255 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10257 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10258 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10259 (handle_tracepoint_general_set, handle_tracepoint_query)
10260 (tracepoint_finished_step, tracepoint_was_hit)
10261 (release_while_stepping_state_list, current_traceframe)
10262 (in_readonly_region, traceframe_read_mem)
10263 (fetch_traceframe_registers, traceframe_read_sdata)
10264 (traceframe_read_info, struct fast_tpoint_collect_status)
10265 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10266 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10267 (supply_fast_tracepoint_registers)
10268 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10269 (ipa_tdesc, claim_trampoline_space)
10270 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10271 (agent_mem_read, agent_get_trace_state_variable_value)
10272 (agent_set_trace_state_variable_value, agent_tsv_read)
10273 (agent_mem_read_string, get_raw_reg_func_addr)
10274 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10275 * tracepoint.h: ... this new file.
10277 2013-09-05 Pedro Alves <palves@redhat.com>
10279 * server.h (perror_with_name, error, fatal, warning, paddress)
10280 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10282 * utils.h: New file.
10284 2013-09-05 Pedro Alves <palves@redhat.com>
10286 * server.h (remote_debug, noack_mode, transport_is_reliable)
10287 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10288 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10289 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10290 (write_enn, initialize_async_io, enable_async_io)
10291 (disable_async_io, check_remote_input_interrupt_request)
10292 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10293 (dead_thread_notify, prepare_resume_reply)
10294 (decode_address_to_semicolon, decode_address, decode_m_packet)
10295 (decode_M_packet, decode_X_packet, decode_xfer_write)
10296 (decode_search_memory_packet, unhexify, hexify)
10297 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10298 (look_up_one_symbol, relocate_instruction)
10299 (monitor_output): Move to remote-utils.h, and include it.
10300 * remote-utils.h: New file.
10302 2013-09-05 Pedro Alves <palves@redhat.com>
10304 * server.h (_): Delete.
10306 2013-09-02 Pedro Alves <palves@redhat.com>
10308 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10309 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10311 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10313 2013-09-02 Pierre Muller <muller@sourceware.org>
10315 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10316 or WriteProcessMemory complete successfully and handle
10317 ERROR_PARTIAL_COPY error.
10319 2013-09-02 Pedro Alves <palves@redhat.com>
10321 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10322 error instead of EIO.
10324 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10327 * linux-low.c: Include filestuff.h.
10328 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10329 * lynx-low.c: Include filestuff.h.
10330 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10331 * server.c: Include filestuff.h.
10332 (main): Call notice_open_fds.
10333 * spu-low.c: Include filestuff.h.
10334 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10336 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10338 * Makefile.in: Explain why ../target and ../nat are not
10339 listed as include file search paths.
10340 (linux-waitpid.o): New object file rule.
10341 * configure.srv (srv_native_linux_obj): New variable.
10342 Replace all occurrences of linux native object files with
10343 $srv_native_linux_obj.
10344 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10345 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10346 (linux_enable_event_reporting): Remove declaration.
10347 (my_waitpid): Moved to common/linux-waitpid.c.
10348 (linux_wait_for_event): Pass ptid when calling
10349 linux_enable_event_reporting.
10350 (linux_supports_tracefork_flag): Remove.
10351 (linux_enable_event_reporting): Likewise.
10352 (linux_tracefork_grandchild): Remove.
10353 (STACK_SIZE): Moved to common/linux-ptrace.c.
10354 (linux_tracefork_child): Remove.
10355 (linux_test_for_tracefork): Remove.
10356 (linux_look_up_symbols): Call linux_supports_traceclone.
10357 (initialize_low): Remove call to linux_test_for_tracefork.
10358 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10359 common/linux-ptrace.h.
10360 (PTRACE_TYPE_ARG4): Likewise.
10361 Include linux-ptrace.h.
10363 2013-08-21 Pedro Alves <palves@redhat.com>
10365 * config.in: Renegerate.
10367 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10369 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10370 (SFILES): Remove $(srcdir)/common/target-common.c and
10371 add $(srcdir)/target/waitstatus.c.
10372 (OBS): Remove target-common.o and add waitstatus.o.
10373 (server_h): Remove $(srcdir)/../common/target-common.h and
10374 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10375 and $(srcdir)/../target/waitstatus.h.
10376 (target-common.o): Remove.
10377 (waitstatus.o): New target object file.
10378 * target.h: Do not include target-common.h and
10379 include target/resume.h, target/wait.h and
10380 target/waitstatus.h.
10382 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10384 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10385 to PTRACE_TYPE_ARG3.
10386 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10387 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10389 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10390 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10392 2013-07-27 Jie Zhang <jie@codesourcery.com>
10393 Daniel Jacobowitz <dan@codesourcery.com>
10394 Yao Qi <yao@codesourcery.com>
10396 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10397 (mips-linux-watch.o): New rule.
10398 (mips_linux_watch_h): New variable.
10399 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10401 * linux-mips-low.c: Include mips-linux-watch.h.
10402 (struct arch_process_info, struct arch_lwp_info): New.
10403 (update_watch_registers_callback): New function.
10404 (mips_linux_new_process, mips_linux_new_thread) New functions.
10405 (mips_linux_prepare_to_resume, mips_insert_point): New
10407 (mips_remove_point, mips_stopped_by_watchpoint): New
10409 (rsp_bp_type_to_target_hw_bp_type): New function.
10410 (mips_stopped_data_address): New function.
10411 (the_low_target): Add watchpoint support functions.
10413 2013-07-27 Yao Qi <yao@codesourcery.com>
10415 * i386-low.c: Include break-common.h.
10416 (enum target_hw_bp_type): Remove.
10418 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10420 * Makefile.in (SFILES): /common/target-common.c.
10421 (OBS): Add target-common.o.
10422 (server_h): Add $(srcdir)/../common/target-common.h.
10423 (target-common.o): New target.
10424 * server.c (queue_stop_reply_callback): Free
10425 status string after use.
10426 * target.c (target_waitstatus_to_string): Remove.
10427 * target.h: Include target-common.h.
10428 (resume_kind): Likewise.
10429 (target_waitkind): Likewise.
10430 (target_waitstatus): Likewise.
10431 (TARGET_WNOHANG): Likewise.
10433 2013-07-04 Yao Qi <yao@codesourcery.com>
10435 * Makefile.in (host_alias): Use @host_noncanonical@.
10436 (target_alias): Use @target_noncanonical@.
10437 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10438 ACX_NONCANONICAL_HOST.
10439 * configure: Regenerated.
10442 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10444 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10445 * configure: Rebuild.
10446 * Makefile.in (version_host, version_target): Get from configure.
10447 (version.c): Use $(version_host) and $(version_target).
10449 2013-07-03 Pedro Alves <palves@redhat.com>
10451 * Makefile.in (config.status): Depend on development.sh.
10452 * acinclude.m4: Include libmcheck.m4.
10453 * configure: Regenerate.
10455 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10457 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10458 attribute inside the parentheses.
10459 (winapi_DebugSetProcessKillOnExit): Ditto.
10460 (winapi_DebugBreakProcess): Ditto.
10461 (winapi_GenerateConsoleCtrlEvent): Ditto.
10463 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10465 * notif.h (notif_event): Add a dummy member to avoid compiler
10468 2013-07-01 Pedro Alves <palves@redhat.com>
10470 * hostio.c (HOSTIO_PATH_MAX): Define.
10471 (require_filename, handle_open, handle_unlink, handle_readlink):
10474 2013-07-01 Pedro Alves <palves@redhat.com>
10476 * server.h: Include "pathmax.h".
10477 * linux-low.c: Don't include sys/param.h.
10478 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10480 * win32-low.c: Don't include sys/param.h.
10481 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10483 2013-07-01 Pedro Alves <palves@redhat.com>
10485 * event-loop.c: Don't check HAVE_UNISTD_H before including
10487 * gdbreplay.c: Likewise.
10488 * remote-utils.c: Likewise.
10489 * server.c: Likewise.
10490 * configure.ac: Don't check for unistd.h.
10491 * configure: Regenerate.
10493 2013-06-28 Tom Tromey <tromey@redhat.com>
10495 * Makefile.in (version.c): Use version.in, not
10498 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10500 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10501 * configure: Rebuild.
10502 * Makefile.in (version_host, version_target): Get from configure.
10503 (version.c): Use $(version_host) and $(version_target).
10505 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10507 Fix trace-status to output user name without trailing colon.
10508 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10510 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10512 Fix trace-status to output proper start-time and stop-time.
10513 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10514 output start time and stop time in hex as gdb expects.
10516 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10518 * tracepoint.c (build_traceframe_info_xml): Output trace state
10519 variables present in the trace buffer.
10521 2013-06-24 Tom Tromey <tromey@redhat.com>
10523 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10525 (version.o): Remove.
10526 * gdbreplay.c: Include version.h.
10527 (version, host_name): Don't declare.
10528 * server.h: Include version.h.
10529 (version, host_name): Don't declare.
10531 2013-06-12 Pedro Alves <palves@redhat.com>
10533 * linux-x86-low.c (linux_is_elf64): Delete global.
10534 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10535 with local linux_pid_exe_is_elf_64_file use.
10537 2013-06-11 Pedro Alves <palves@redhat.com>
10539 * linux-low.c (regset_disabled, disable_regset): New functions.
10540 (regsets_fetch_inferior_registers)
10541 (regsets_store_inferior_registers): Use them.
10542 (initialize_regsets_info); Don't allocate the disabled_regsets
10544 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10547 2013-06-11 Pedro Alves <palves@redhat.com>
10549 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10552 2013-06-11 Pedro Alves <palves@redhat.com>
10554 * linux-x86-low.c (initialize_low_arch): Call
10555 init_registers_x32_avx_linux.
10557 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10559 Fix compatibility with Android Bionic.
10560 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10563 2013-06-07 Pedro Alves <palves@redhat.com>
10566 * Makefile.in (OBS): Add tdesc.o.
10567 (IPA_OBJS): Add tdesc-ipa.o.
10568 (tdesc-ipa.o): New rule.
10569 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10571 * linux-low.c (new_inferior): Delete.
10572 (disabled_regsets, num_regsets): Delete.
10573 (linux_add_process): Adjust to set the new per-process
10575 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10576 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10577 was a stop. When calling arch_setup, switch the current inferior
10578 to the thread that got an event.
10579 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10580 (regsets_fetch_inferior_registers)
10581 (regsets_store_inferior_registers): New regsets_info parameter.
10583 (linux_register_in_regsets): New regs_info parameter. Adjust to
10585 (register_addr, fetch_register, store_register): New usrregs_info
10586 parameter. Adjust to use it.
10587 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10588 parameter regs_info. Adjust to use it.
10589 (linux_fetch_registers): Get the current inferior's regs_info, and
10591 (linux_store_registers): Ditto.
10592 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10593 (initialize_low): Don't initialize the target_regsets here. Call
10594 initialize_low_arch.
10595 * linux-low.h (target_regsets): Delete declaration.
10596 (struct regsets_info): New.
10597 (struct usrregs_info): New.
10598 (struct regs_info): New.
10599 (struct process_info_private) <new_inferior>: New field.
10600 (struct linux_target_ops): Delete the num_regs, regmap, and
10601 regset_bitmap fields. New field regs_info.
10602 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10603 * i387-fp.c (num_xmm_registers): Delete.
10604 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10605 calls to new interface.
10606 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10607 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10608 Infer the number of xmm registers from the regcache's target
10610 * i387-fp.h (num_xmm_registers): Delete.
10611 * inferiors.c (add_thread): Don't install the thread's regcache
10613 * proc-service.c (gregset_info): Fetch the current inferior's
10614 regs_info. Adjust to use it.
10615 * regcache.c: Include tdesc.h.
10616 (register_bytes, reg_defs, num_registers)
10617 (gdbserver_expedite_regs): Delete.
10618 (get_thread_regcache): If the thread doesn't have a regcache yet,
10619 create one, instead of aborting gdbserver.
10620 (regcache_invalidate_one): Rename to ...
10621 (regcache_invalidate_thread): ... this.
10622 (regcache_invalidate_one): New.
10623 (regcache_invalidate): Only invalidate registers of the current
10625 (init_register_cache): Add target_desc parameter, and use it.
10626 (new_register_cache): Ditto. Assert the target description has a
10627 non zero registers_size.
10628 (regcache_cpy): Add assertions. Adjust.
10629 (realloc_register_cache, set_register_cache): Delete.
10630 (registers_to_string, registers_from_string): Adjust.
10631 (find_register_by_name, find_regno, find_register_by_number)
10632 (register_cache_size): Add target_desc parameter, and use it.
10633 (free_register_cache_thread, free_register_cache_thread_one)
10634 (regcache_release, register_cache_size): New.
10635 (register_size): Add target_desc parameter, and use it.
10636 (register_data, supply_register, supply_register_zeroed)
10637 (supply_regblock, supply_register_by_name, collect_register)
10638 (collect_register_as_string, collect_register_by_name): Adjust.
10639 * regcache.h (struct target_desc): Forward declare.
10640 (struct regcache) <tdesc>: New field.
10641 (init_register_cache, new_register_cache): Add target_desc
10643 (regcache_invalidate_thread): Declare.
10644 (regcache_invalidate_one): Delete declaration.
10645 (regcache_release): Declare.
10646 (find_register_by_number, register_cache_size, register_size)
10647 (find_regno): Add target_desc parameter.
10648 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10650 * remote-utils.c: Include tdesc.h.
10651 (outreg, prepare_resume_reply): Adjust.
10652 * server.c: Include tdesc.h.
10653 (gdbserver_xmltarget): Delete declaration.
10654 (get_features_xml, process_serial_event): Adjust.
10655 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10657 (struct process_info) <tdesc>: New field.
10658 (ipa_tdesc): Declare.
10659 * tdesc.c: New file.
10660 * tdesc.h: New file.
10661 * tracepoint.c: Include tdesc.h.
10662 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10663 (get_context_regcache): Adjust to pass ipa_tdesc down.
10664 (do_action_at_tracepoint): Adjust to get the register cache size
10665 from the context regcache's description.
10666 (traceframe_walk_blocks): Adjust to get the register cache size
10667 from the current trace frame's description.
10668 (traceframe_get_pc): Adjust to get current trace frame's
10669 description and pass it down.
10670 (gdb_collect): Adjust to get the register cache size from the
10672 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10673 (gdbserver_xmltarget): Delete.
10674 (initialize_low_tracepoint): Set the ipa's target description.
10675 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10676 (initialize_low_tracepoint): Set the ipa's target description.
10677 * linux-x86-low.c: Include tdesc.h.
10678 [__x86_64__] (is_64bit_tdesc): New.
10679 (ps_get_thread_area, x86_get_thread_area): Use it.
10680 (i386_cannot_store_register): Rename to ...
10681 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10682 (i386_cannot_fetch_register): Rename to ...
10683 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10684 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10686 (target_regsets): Rename to ...
10687 (x86_regsets): ... this.
10688 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10690 (x86_siginfo_fixup): Use is_64bit_tdesc.
10691 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10692 (tdesc_x32_avx_linux, tdesc_x32_linux)
10693 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10695 (x86_linux_update_xmltarget): Delete.
10696 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10697 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10698 (AMD64_LINUX_USER64_CS): New.
10699 (x86_linux_read_description): New, based on
10700 x86_linux_update_xmltarget.
10701 (same_process_callback): New.
10702 (x86_arch_setup_process_callback): New.
10703 (x86_linux_update_xmltarget): New.
10704 (x86_regsets_info): New.
10705 (amd64_linux_regs_info): New.
10706 (i386_linux_usrregs_info): New.
10707 (i386_linux_regs_info): New.
10708 (x86_linux_regs_info): New.
10709 (x86_arch_setup): Reimplement.
10710 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10711 (x86_emit_ops): Ditto.
10712 (the_low_target): Adjust. Install x86_linux_regs_info,
10713 x86_cannot_fetch_register, and x86_cannot_store_register.
10714 (initialize_low_arch): New.
10715 * linux-ia64-low.c (tdesc_ia64): Declare.
10716 (ia64_fetch_register): Adjust.
10717 (ia64_usrregs_info, regs_info): New globals.
10718 (ia64_regs_info): New function.
10719 (the_low_target): Adjust.
10720 (initialize_low_arch): New function.
10721 * linux-sparc-low.c (tdesc_sparc64): Declare.
10722 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10724 (sparc_arch_setup): New function.
10725 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10726 (the_low_target): Adjust.
10727 (initialize_low_arch): New function.
10728 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10729 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10730 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10731 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10732 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10733 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10734 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10735 (tdesc_powerpc_isa205_vsx64l): Declare.
10736 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10737 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10738 (ppc_set_pc, ppc_get_hwcap): Adjust.
10739 (ppc_usrregs_info): Forward declare.
10740 (!__powerpc64__) ppc_regmap_adjusted: New global.
10741 (ppc_arch_setup): Adjust to the current process'es target
10743 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10744 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10745 (ppc_store_evrregset): Adjust.
10746 (target_regsets): Rename to ...
10747 (ppc_regsets): ... this, and make static.
10748 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10749 (ppc_regs_info): New function.
10750 (the_low_target): Adjust.
10751 (initialize_low_arch): New function.
10752 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10753 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10754 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10755 (tdesc_s390x_linux64v2): Declare.
10756 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10757 (s390_fill_gregset, s390_store_last_break): Adjust.
10758 (target_regsets): Rename to ...
10759 (s390_regsets): ... this, and make static.
10760 (s390_get_pc, s390_set_pc): Adjust.
10761 (s390_get_hwcap): New target_desc parameter, and use it.
10762 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10763 (s390_arch_setup): Adjust to set the current process'es target
10764 description. Don't adjust the regmap.
10765 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10766 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10767 (regs_info_3264): New globals.
10768 (s390_regs_info): New function.
10769 (the_low_target): Adjust.
10770 (initialize_low_arch): New function.
10771 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10772 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10773 [__mips64] (init_registers_mips_linux)
10774 (init_registers_mips_dsp_linux): Delete defines.
10775 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10776 (have_dsp): New global.
10777 (mips_read_description): New, based on mips_arch_setup.
10778 (mips_arch_setup): Reimplement.
10779 (get_usrregs_info): New function.
10780 (mips_cannot_fetch_register, mips_cannot_store_register)
10781 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10782 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10783 (target_regsets): Rename to ...
10784 (mips_regsets): ... this, and make static.
10785 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10786 (dsp_regs_info, regs_info): New globals.
10787 (mips_regs_info): New function.
10788 (the_low_target): Adjust.
10789 (initialize_low_arch): New function.
10790 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10791 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10793 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10794 (arm_read_description): New, with bits factored from
10796 (arm_arch_setup): Reimplement.
10797 (target_regsets): Rename to ...
10798 (arm_regsets): ... this, and make static.
10799 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10800 (arm_regs_info): New function.
10801 (the_low_target): Adjust.
10802 (initialize_low_arch): New function.
10803 * linux-m68k-low.c (tdesc_m68k): Declare.
10804 (target_regsets): Rename to ...
10805 (m68k_regsets): ... this, and make static.
10806 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10807 (m68k_regs_info): New function.
10808 (m68k_arch_setup): New function.
10809 (the_low_target): Adjust.
10810 (initialize_low_arch): New function.
10811 * linux-sh-low.c (tdesc_sharch): Declare.
10812 (target_regsets): Rename to ...
10813 (sh_regsets): ... this, and make static.
10814 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10815 (sh_regs_info, sh_arch_setup): New functions.
10816 (the_low_target): Adjust.
10817 (initialize_low_arch): New function.
10818 * linux-bfin-low.c (tdesc_bfin): Declare.
10819 (bfin_arch_setup): New function.
10820 (bfin_usrregs_info, regs_info): New globals.
10821 (bfin_regs_info): New function.
10822 (the_low_target): Adjust.
10823 (initialize_low_arch): New function.
10824 * linux-cris-low.c (tdesc_cris): Declare.
10825 (cris_arch_setup): New function.
10826 (cris_usrregs_info, regs_info): New globals.
10827 (cris_regs_info): New function.
10828 (the_low_target): Adjust.
10829 (initialize_low_arch): New function.
10830 * linux-cris-low.c (tdesc_crisv32): Declare.
10831 (cris_arch_setup): New function.
10832 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10833 (cris_regs_info): New function.
10834 (the_low_target): Adjust.
10835 (initialize_low_arch): New function.
10836 * linux-m32r-low.c (tdesc_m32r): Declare.
10837 (m32r_arch_setup): New function.
10838 (m32r_usrregs_info, regs_info): New globals.
10839 (m32r_regs_info): Adjust.
10840 (initialize_low_arch): New function.
10841 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10842 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10843 (tic6x_usrregs_info): Forward declare.
10844 (tic6x_read_description): New function, based on ...
10845 (tic6x_arch_setup): ... this. Reimplement.
10846 (target_regsets): Rename to ...
10847 (tic6x_regsets): ... this, and make static.
10848 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10849 (tic6x_regs_info): New function.
10850 (the_low_target): Adjust.
10851 (initialize_low_arch): New function.
10852 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10853 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10854 (target_regsets): Rename to ...
10855 (xtensa_regsets): ... this, and make static.
10856 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10858 (xtensa_arch_setup, xtensa_regs_info): New functions.
10859 (the_low_target): Adjust.
10860 (initialize_low_arch): New function.
10861 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10862 (nios2_arch_setup): Set the current process'es tdesc.
10863 (target_regsets): Rename to ...
10864 (nios2_regsets): ... this.
10865 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10866 (nios2_regs_info): New function.
10867 (the_low_target): Adjust.
10868 (initialize_low_arch): New function.
10869 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10870 (aarch64_arch_setup): Set the current process'es tdesc.
10871 (target_regsets): Rename to ...
10872 (aarch64_regsets): ... this.
10873 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10874 (aarch64_regs_info): New function.
10875 (the_low_target): Adjust.
10876 (initialize_low_arch): New function.
10877 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10879 (target_regsets): Rename to ...
10880 (tile_regsets): ... this.
10881 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10882 (tile_regs_info): New function.
10883 (tile_arch_setup): Set the current process'es tdesc.
10884 (the_low_target): Adjust.
10885 (initialize_low_arch): New function.
10886 * spu-low.c (tdesc_spu): Declare.
10887 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10888 * win32-arm-low.c (tdesc_arm): Declare.
10889 (arm_arch_setup): New function.
10890 (the_low_target): Install arm_arch_setup instead of
10891 init_registers_arm.
10892 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10893 (init_windows_x86): Rename to ...
10894 (i386_arch_setup): ... this. Set `win32_tdesc'.
10895 (the_low_target): Adjust.
10896 * win32-low.c (win32_tdesc): New global.
10897 (child_add_thread): Don't create the thread cache here.
10898 (do_initial_child_stuff): Set the new process'es tdesc.
10899 * win32-low.h (struct target_desc): Forward declare.
10900 (win32_tdesc): Declare.
10901 * lynx-i386-low.c (tdesc_i386): Declare global.
10902 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10903 * lynx-low.c (lynx_tdesc): New global.
10904 (lynx_add_process): Set the new process'es tdesc.
10905 * lynx-low.h (struct target_desc): Forward declare.
10906 (lynx_tdesc): Declare global.
10907 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10908 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10909 * nto-low.c (nto_tdesc): New global.
10910 (do_attach): Set the new process'es tdesc.
10911 * nto-low.h (struct target_desc): Forward declare.
10912 (nto_tdesc): Declare.
10913 * nto-x86-low.c (tdesc_i386): Declare.
10914 (nto_x86_arch_setup): Set `nto_tdesc'.
10916 2013-06-04 Gary Benson <gbenson@redhat.com>
10918 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10919 to qSupported response when appropriate.
10920 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10921 with nonzero-length annex.
10922 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10923 arguments supplied in annex.
10925 2013-05-31 Doug Evans <dje@google.com>
10928 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10929 64 bits in 64-cross-32 environment.
10931 2013-05-28 Pedro Alves <palves@redhat.com>
10933 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10934 (aarch64-without-fpu.c): Delete rule.
10935 * configure.srv (aarch64*-*-linux*): Remove references to
10936 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10937 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10940 2013-05-24 Pedro Alves <palves@redhat.com>
10942 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10943 instead of strchr/decode_address. Error if the range isn't split
10944 with a ','. Don't assume there's be a ':' in the action.
10946 2013-05-23 Yao Qi <yao@codesourcery.com>
10947 Pedro Alves <palves@redhat.com>
10949 * linux-low.c (lwp_in_step_range): New function.
10950 (linux_wait_1): If the thread was range stepping and stopped
10951 outside the stepping range, report the stop to GDB. Otherwise,
10952 continue stepping. Add range stepping debug output.
10953 (linux_set_resume_request): Copy the step range from the resume
10954 request to the lwp.
10955 (linux_supports_range_stepping): New.
10956 (linux_target_ops) <supports_range_stepping>: Set to
10957 linux_supports_range_stepping.
10958 * linux-low.h (struct linux_target_ops)
10959 <supports_range_stepping>: New field.
10960 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10961 * linux-x86-low.c (x86_supports_range_stepping): New.
10962 (the_low_target) <supports_range_stepping>: Set to
10963 x86_supports_range_stepping.
10964 * server.c (handle_v_cont): Handle 'r' action.
10965 (handle_v_requests): Append ";r" if the target supports range
10967 * target.h (struct thread_resume) <step_range_start,
10968 step_range_end>: New fields.
10969 (struct target_ops) <supports_range_stepping>:
10971 (target_supports_range_stepping): New macro.
10973 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10975 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10976 confusion in comment.
10978 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10980 * lynx-low.c (struct process_info_private): New type.
10981 (lynx_add_process): New function.
10982 (lynx_create_inferior, lynx_attach): Replace calls to
10983 add_process by calls to lynx_add_process.
10984 (lynx_resume): If PTID is null, then try using
10985 current_process()->private->last_wait_event_ptid.
10987 (lynx_clear_inferiors): Delete. The contents of that function
10988 has been inlined in lynx_mourn;
10989 (lynx_wait_1): Save the ptid in the process's private data.
10990 (lynx_mourn): Free the process' private data. Replace call
10991 to lynx_clear_inferiors by call to clear_inferiors.
10993 2013-05-17 Yao Qi <yao@codesourcery.com>
10995 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10998 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11000 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11001 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11002 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11003 PT_TEXT_END_ADDR guards. Update comments.
11004 (linux_target_op) <read_offsets>: Conditionally define to
11005 linux_read_offsets if the target is UCLIBC and if it defines
11006 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11008 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11009 Andrew Jenner <andrew@codesourcery.com>
11011 * Makefile.in (SFILES): Add linux-nios2-low.c.
11012 (clean): Add action to delete nios2-linux.c.
11013 (nios2-linux.c): New rule.
11014 * configure.srv: Add nios2*-*-linux*.
11015 * linux-nios2-low.c: New.
11017 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11019 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11021 2013-04-25 Hui Zhu <hui@codesourcery.com>
11024 * ax.c (ax_printf): Add fflush.
11026 2013-04-22 Tom Tromey <tromey@redhat.com>
11028 * Makefile.in (SFILES): Add filestuff.c.
11029 (OBS): Add filestuff.o.
11030 (filestuff.o): New target.
11031 * config.in, configure: Rebuild.
11032 * configure.ac: Check for fdwalk, pipe2.
11034 2013-04-17 Pedro Alves <palves@redhat.com>
11036 * configure.ac (USE_THREAD_DB): Delete variable.
11037 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11038 Don't AC_SUBST USE_THREAD_DB.
11039 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11040 * config.in, configure: Regenerate.
11042 2013-04-16 Pedro Alves <palves@redhat.com>
11044 * linux-low.h (struct lwp_info) <thread_known>: Move under
11045 the USE_THREAD_DB #ifdef.
11047 2013-04-16 Pedro Alves <palves@redhat.com>
11049 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11050 (linux-low.o): Delete rule.
11051 * linux-low.h: Always include "gdb_thread_db.h" instead of
11052 conditionally including thread_db.h.
11053 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11056 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11058 * Makefile.in (install-only): Fix make install regression.
11060 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11062 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11063 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11065 * gdbserver.1: Remove.
11067 2013-03-22 Pedro Alves <palves@redhat.com>
11069 * linux-low.c (handle_extended_wait): Don't call
11070 linux_enable_event_reporting.
11072 2013-03-15 Tony Theodore <tonyt@logyst.com>
11075 * Makefile.in (SHELL): Use @SHELL@.
11077 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11079 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11082 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11084 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11085 Remove extraneous NULL element.
11087 2013-03-13 Yao Qi <yao@codesourcery.com>
11089 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11090 'V' block in trace frame.
11092 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11094 * target.h (struct target_ops): Add btrace ops.
11095 (target_supports_btrace): New macro.
11096 (target_enable_btrace): New macro.
11097 (target_disable_btrace): New macro.
11098 (target_read_btrace): New macro.
11099 * gdbthread.h (struct thread_info): Add btrace field.
11100 * server.c: Include btrace-common.h.
11101 (handle_btrace_general_set): New function.
11102 (handle_btrace_enable): New function.
11103 (handle_btrace_disable): New function.
11104 (handle_general_set): Call handle_btrace_general_set.
11105 (handle_qxfer_btrace): New function.
11106 (struct qxfer qxfer_packets[]): Add btrace entry.
11107 * inferiors.c (remove_thread): Disable btrace.
11108 * linux-low: Include linux-btrace.h.
11109 (linux_low_enable_btrace): New function.
11110 (linux_low_read_btrace): New function.
11111 (linux_target_ops): Add btrace ops.
11112 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11113 Add srv_linux_btrace=yes.
11114 (x86_64-*-linux*): Add linux-btrace.o.
11115 Add srv_linux_btrace=yes.
11116 * configure.ac: Define HAVE_LINUX_BTRACE.
11117 * config.in: Regenerated.
11118 * configure: Regenerated.
11120 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11122 * server.c (handle_qxfer): Preserve error message if -3 is
11124 (qxfer): Document the -3 return value.
11126 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11128 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11129 (linux_btrace_h): New variable.
11130 (linux-btrace.o): New rule.
11132 2013-03-08 Stan Shebs <stan@codesourcery.com>
11133 Hafiz Abid Qadeer <abidh@codesourcery.com>
11135 * tracepoint.c (trace_buffer_size): New global.
11136 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11137 (init_trace_buffer): Change to one-argument function. Allocate
11138 trace buffer memory.
11139 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11140 handle QTBuffer:size packet.
11141 (cmd_bigqtbuffer_size): New function.
11142 (initialize_tracepoint): Call init_trace_buffer with
11143 DEFAULT_TRACE_BUFFER_SIZE.
11144 * server.c (handle_query): Add QTBuffer:size in the
11147 2013-03-07 Yao Qi <yao@codesourcery.com>
11149 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11150 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11152 (cmd_qtsp): Adjust condition. Do post increment.
11153 Set cur_action and cur_step_action back to 0.
11155 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11158 * linux-low.c (linux_write_memory): Return early success if LEN is
11161 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11163 * configure.srv: Add x86_64-*-cygwin* as target.
11165 2013-02-28 Tom Tromey <tromey@redhat.com>
11167 * configure.ac: Invoke AC_SYS_LARGEFILE.
11168 * configure, config.in: Rebuild.
11170 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11172 * win32-low.c: Throughout, fix format strings and casts of
11173 printf-like functions to avoid type related warnings on all
11175 (get_child_debug_event): Print dwDebugEventCode as hex since
11176 that's how it's usually documented.
11178 2013-02-28 Yao Qi <yao@codesourcery.com>
11180 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11183 2013-02-27 Jiong Wang <jiwang@tilera.com>
11185 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11186 (reg-tilegx32.c): New rule.
11187 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11188 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11189 different register info initializer according to elf class.
11190 (init_registers_tilgx32): New function. The tilegx32 register info
11192 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11193 (tile_store_gregset): Likewise.
11195 2013-02-27 Yao Qi <yao@codesourcery.com>
11197 * server.c (process_point_options): Print debug message when
11198 debug_threads is true.
11200 2013-02-26 Yao Qi <yao@codesourcery.com>
11202 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11204 2013-02-19 Pedro Alves <palves@redhat.com>
11205 Kai Tietz <ktietz@redhat.com>
11209 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11210 instead of strtoul to extract address from packet.
11211 (process_serial_event) <'z'>: Likewise.
11213 2013-02-18 Yao Qi <yao@codesourcery.com>
11215 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11217 2013-02-14 Pedro Alves <palves@redhat.com>
11221 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11222 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11224 2013-02-14 Pedro Alves <palves@redhat.com>
11226 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11228 2013-02-14 Pedro Alves <palves@redhat.com>
11230 * tracepoint.c (save_string): Delete.
11231 (add_tracepoint_action): Use savestring instead of save_string.
11233 2013-02-12 Pedro Alves <palves@redhat.com>
11235 * linux-xtensa-low.c: Ditto.
11236 * xtensa-xtregs.c: Ditto.
11238 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11240 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11243 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11245 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11246 aarch64_num_wp_regs and aarch64_num_bp_regs to
11247 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11249 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11251 * linux-aarch64-low.c (ps_get_thread_area): Replace
11252 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11254 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11255 Marcus Shawcroft <marcus.shawcroft@arm.com>
11256 Nigel Stephens <nigel.stephens@arm.com>
11257 Yufeng Zhang <yufeng.zhang@arm.com>
11259 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11260 (aarch64.c, aarch64-without-fpu.c): New targets.
11261 * configure.srv (aarch64*-*-linux*): New.
11262 * linux-aarch64-low.c: New file.
11264 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11266 * linux-low.c (handle_extended_wait, linux_create_inferior)
11267 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11268 (dequeue_one_deferred_signal, linux_resume_one_thread)
11269 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11270 (linux_tracefork_grandchild, linux_test_for_tracefork)
11271 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11272 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11273 where the argument is 0.
11275 2013-01-25 Yao Qi <yao@codesourcery.com>
11277 * event-loop.c: Include "queue.h".
11278 (gdb_event_p): New typedef.
11279 (struct gdb_event) <next_event>: Remove.
11280 (event_queue): Change to QUEUE(gdb_event_p).
11281 (async_queue_event): Remove.
11282 (gdb_event_xfree): New.
11283 (initialize_event_loop): New.
11284 (process_event): Use API from QUEUE.
11285 (wait_for_event): Likewise.
11286 * server.c (main): Call initialize_event_loop.
11287 * server.h (initialize_event_loop): Declare.
11289 2013-01-18 Yao Qi <yao@codesourcery.com>
11291 * ax.h (struct eval_agent_expr_context): New.
11292 (gdb_eval_agent_expr): Update declaration.
11293 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11294 TFRAME. Add new argument CTX.
11295 * server.h (struct eval_agent_expr_context): Declare.
11296 (agent_mem_read, agent_tsv_read): Update declaration.
11297 (agent_mem_read_string): Likewise.
11298 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11299 (add_traceframe_block): Add new argument TPOINT.
11300 Increase TPOINT->traceframe_usage.
11301 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11302 eval_tracepoint_agent_expr.
11303 (condition_true_at_tracepoint): Likewise.
11304 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11305 (agent_mem_read_string, agent_tsv_read): Likewise.
11307 2013-01-16 Yao Qi <yao@codesourcery.com>
11309 * linux-low.c (linux_resume_one_lwp): Don't check
11310 'lwp->bp_reinsert != 0'.
11312 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11313 Pedro Alves <palves@redhat.com>
11315 * lynx-low.c (ptrace_request_to_str): Define a temporary
11316 macro and use it to simplify this function's implementation.
11318 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11320 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11323 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11325 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11327 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11329 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11331 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11333 * lynx-low.c (lynx_resume): Use the resume_info parameter
11334 to determine the ptid for the lynx_ptrace call, unless
11335 it is equal to minus_one_ptid, in which case we use the
11336 ptid of the current_inferior.
11337 (lynx_wait_1): After having received a thread create/exit
11338 event, resume the inferior's execution using the signaling
11339 thread's ptid, rather than the old ptid.
11341 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11343 * lynx-low.c (lynx_resume): Delete variable ret.
11345 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11347 * gdbreplay.c (gdbreplay_version): Update copyright year.
11348 * server.c (gdbserver_version): Likewise.
11350 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11352 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11355 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11357 * lynx-low.c (ptrace_request_to_str): Add handling for
11358 PTRACE_GETTRACESIG.
11360 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11362 * lynx-low.c (lynx_attach): Delete variable new_process.
11364 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11366 * lynx-low.c (lynx_create_inferior): Delete variable
11369 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11371 * lynx-low.c (ptrace_request_to_str): Do not handle
11372 PTRACE_GETTHREADLIST if this macro does not exist.
11374 2012-12-15 Yao Qi <yao@codesourcery.com>
11376 * Makefile.in (OBS): Add notif.o.
11377 * notif.c, notif.h: New.
11378 * server.c: Include "notif.h".
11379 (struct vstop_notif) <next>: Remove.
11381 (queue_stop_reply): Update.
11382 (push_event, send_next_stop_reply): Remove.
11383 (discard_queued_stop_replies): Update.
11384 (notif_stop): New variable.
11385 (handle_v_stopped): Remove.
11386 (handle_v_requests): Don't call handle_v_stopped. Call
11387 handle_ack_notif instead.
11388 (queue_stop_reply_callback): Call notif_event_enque instead
11389 of queue_stop_reply.
11390 (handle_status): Don't call send_next_stop_reply, call
11391 notif_write_event instead.
11392 (kill_inferior_callback): Likewise.
11393 (detach_or_kill_inferior_callback): Likewise.
11394 (main): Call initialize_notif.
11395 (process_serial_event): Call QUEUE_is_empty.
11396 (handle_target_event): Call notif_push instead of push event.
11397 * server.h (push_event): Remove declaration.
11399 2012-12-10 Tom Tromey <tromey@redhat.com>
11401 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11402 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11405 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11406 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11407 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11408 (amd64-linux-ipa.o, ax.o): Rewrite.
11409 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11410 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11411 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11412 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11413 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11414 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11415 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11416 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11417 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11418 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11419 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11420 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11421 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11422 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11423 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11424 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11425 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11426 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11427 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11428 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11429 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11430 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11431 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11432 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11433 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11434 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11435 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11436 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11437 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11438 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11439 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11440 (reg-tilegx.o): Remove.
11441 (all_object_files): New macro.
11442 Include .deps files.
11443 * aclocal.m4, configure: Rebuild.
11444 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11445 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11446 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11448 2012-12-05 Tom Tromey <tromey@redhat.com>
11451 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11453 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11455 * configure.ac: Check for linux/perf_event.h.
11456 * config.in: Regenerated.
11457 * configure: Regenerated.
11459 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11461 * hostio.c (handle_readlink): Decrease buffer size
11462 parameter passed to readlink by one byte.
11464 2012-11-26 Yao Qi <yao@codesourcery.com>
11466 * configure.ac (build_warnings): Append '-Wempty-body'.
11467 * configure: Regenerated.
11468 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11471 2012-11-15 Pierre Muller <muller@sourceware.org>
11473 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11474 * config.in: Regenerate.
11475 * configure: Regenerate.
11476 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11477 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11478 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11479 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11481 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11482 instead of <sys/wait.h> header.
11483 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11485 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11487 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11488 (various make rules): Remove -DGDBSERVER
11490 2012-11-09 Yao Qi <yao@codesourcery.com>
11492 * spu-low.c (current_ptid): Move it to ..
11493 * gdbthread.h: ... here. New.
11494 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11495 * server.c (myresume, process_serial_event): Likewise.
11496 * thread-db.c (thread_db_find_new_threads): Likewise.
11497 * tracepoint.c (run_inferior_command): Likewise.
11499 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11501 * server.c (handle_search_memory_1): Include access length in
11504 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11506 * linux-crisv32-low.c: Fix compile errors.
11508 2012-09-04 Yao Qi <yao@codesourcery.com>
11510 * tracepoint.c (cmd_qtsv): Adjust debug message.
11511 Don't check CUR_TPOINT.
11513 2012-08-28 Yao Qi <yao@codesourcery.com>
11515 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11516 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11517 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11518 Remove declarations of xmalloc, xreallloc, xstrdup and
11520 * Makefile.in (libiberty_h): New.
11521 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11522 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11524 2012-08-23 Yao Qi <yao@codesourcery.com>
11526 * server.h: Remove declaration of 'xsnprintf'.
11528 2012-08-22 Keith Seitz <keiths@redhat.com>
11530 * server.h: Include build-gnulib-gbserver/config.h.
11531 * gdbreplay.c: Likewise.
11533 2012-08-08 Doug Evans <dje@google.com>
11535 * Makefile.in (SFILES): Add gdb_vecs.c.
11536 (OBS): Add gdb_vecs.o.
11537 (gdb_vecs_h, host_defs_h): New variables.
11538 (thread-db.o): Add $(gdb_vecs_h) dependency.
11539 (gdb_vecs.o): New rule.
11540 * thread-db.c: #include "gdb_vecs.h".
11541 (thread_db_load_search): Use a vector to iterate over path elements.
11542 Handle text appearing after "$pdir".
11544 * configure.ac: Add check for strstr.
11545 * config.in: Regenerate.
11546 * configure: Regenerate.
11548 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11550 * hostio.c (handle_pread): If pread fails, fall back to attempting
11552 (handle_pwrite): Likewise for pwrite.
11554 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11556 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11557 between unsupported TYPE and unimplementable ADDR/LEN combination.
11558 (arm_insert_point): Act on new return value.
11560 2012-07-31 Pedro Alves <palves@redhat.com>
11562 * server.c (process_point_options): Only skip tokens if we find
11563 one that is unrecognized. Don't treat 'X' specially while
11564 skipping unrecognized tokens.
11566 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11568 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11569 to 4-byte-align HW breakpoint addresses for Thumb.
11571 2012-07-27 Yao Qi <yao@codesourcery.com>
11575 * server.h: Declare gdb_agent_about_to_close.
11576 * target.c (kill_inferior): Include "agent.h".
11577 New. Send command 'kill'.
11578 * target.h (kill_inferior): Removed macro.
11579 * tracepoint.c (gdb_agent_about_to_close): New.
11580 (gdb_agent_helper_thread): Handle command 'close'.
11581 Wait endlessly until the inferior stops.
11582 Install gdb_agent_remove_socket to atexit hook.
11583 (agent_socket_name): New static variable.
11584 (gdb_agent_socket_init): Replace local variable 'name' with
11585 'agent_socket_name'.
11586 (gdb_agent_remove_socket): New.
11588 2012-07-27 Yao Qi <yao@codesourcery.com>
11590 * server.c (process_point_options): Stop at 'X' when parsing.
11592 2012-07-19 Michael Eager <eager@eagercon.com>
11594 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11596 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11597 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11598 hardware breakpoint.
11600 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11602 * gdbserver/linux-low.c (initialize_low): Call
11603 linux_ptrace_init_warnings.
11605 2012-07-02 Doug Evans <dje@google.com>
11607 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11610 2012-07-02 Stan Shebs <stan@codesourcery.com>
11612 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11613 (ax.o): Add it to build rule.
11615 (OBS): Add format.o.
11616 (IPA_OBS): Add format.o.
11617 * server.c (handle_query): Claim support for breakpoint commands.
11618 (process_point_options): Add command case.
11619 (process_serial_event): Leave running if there are printfs in
11621 * mem-break.h (any_persistent_commands): Declare.
11622 (add_breakpoint_commands): Declare.
11623 (gdb_no_commands_at_breakpoint): Declare.
11624 (run_breakpoint_commands): Declare.
11625 * mem-break.c (struct point_command_list): New struct.
11626 (struct breakpoint): New field command_list.
11627 (any_persistent_commands): New function.
11628 (add_commands_to_breakpoint): New function.
11629 (add_breakpoint_commands): New function.
11630 (gdb_no_commands_at_breakpoint): New function.
11631 (run_breakpoint_commands): New function.
11632 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11634 * ax.c: Include format.h.
11635 (ax_printf): New function.
11636 (gdb_eval_agent_expr): Add printf opcode.
11638 2012-06-13 Yao Qi <yao@codesourcery.com>
11640 * server.c (start_inferior): Remove duplicated writes to fields
11641 'last_resume_kind' and 'last_status' of 'current_inferior'.
11643 2012-06-12 Yao Qi <yao@codesourcery.com>
11644 Pedro Alves <palves@redhat.com>
11646 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11648 * server.c (handle_v_cont): Extend comment.
11650 2012-06-11 Yao Qi <yao@codesourcery.com>
11652 * linux-low.c (linux_attach): Add 'static'.
11654 2012-06-06 Yao Qi <yao@codesourcery.com>
11656 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11658 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11660 Fix gcc -flto compilation warning.
11661 * server.c (main): Make variable multi_mode and attach volatile.
11663 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11665 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11666 if the platform doesn't know about it.
11668 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11670 * Makefile.in (SFILES): Add linux-tile-low.c.
11671 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11672 * configure.srv: Handle tilegx-*-linux*.
11673 * linux-tile-low.c: New file.
11675 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11677 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11679 2012-05-24 Pedro Alves <palves@redhat.com>
11683 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11685 2012-05-24 Pedro Alves <palves@redhat.com>
11689 Replace target_signal with gdb_signal throughout.
11691 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11693 * linux-low.c (linux_store_registers): Avoid the copying sequence
11694 when no data has been retrieved by ptrace.
11696 2012-05-22 Will Deacon <will.deacon@arm.com>
11698 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11699 Include asm/ptrace.h.
11700 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11703 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11705 * linux-low.c (linux_store_registers): Don't re-retrieve data
11706 with ptrace that has already been obtained from /proc. Always
11707 copy any data retrieved with ptrace to the buffer supplied.
11709 2012-05-11 Yao Qi <yao@codesourcery.com>
11710 Pedro Alves <palves@redhat.com>
11712 * linux-low.c (enum stopping_threads_kind): New.
11713 (stopping_threads): Change type to `enum stopping_threads_kind'.
11714 (handle_extended_wait): If stopping and suspending threads, leave
11715 the new_lwp suspended too.
11716 (linux_wait_for_event): Adjust.
11717 (stop_all_lwps): Set `stopping_threads' to
11718 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11719 whether we're suspending threads or just stopping them. Assert no
11722 2012-04-29 Yao Qi <yao@codesourcery.com>
11724 * server.h: Move some code to ...
11725 * gdbthread.h: ... here. New.
11726 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11727 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11728 (nto-low.o, win32-low.o): Likewise.
11729 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11730 * regcache.c, remote-utils.c, server.c: Likewise.
11731 * target.c, tracepoint.c, win32-low.c: Likewise.
11733 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11735 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11736 (PTRACE_ARG4_TYPE): Likewise.
11737 (PTRACE_XFER_TYPE): Likewise.
11738 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11739 ptrace to PTRACE_ARG3_TYPE.
11740 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11741 (PTRACE_ARG4_TYPE): Likewise.
11742 (PTRACE_XFER_TYPE): Likewise.
11743 (linux_detach_one_lwp): Cast fourth argument of
11744 ptrace to long then PTRACE_ARG4_TYPE.
11745 (regsets_fetch_inferior_registers): Cast third argument of
11746 ptrace to long then PTRACE_ARG3_TYPE.
11747 (regsets_store_inferior_registers): Likewise.
11749 2012-04-20 Pedro Alves <palves@redhat.com>
11751 * configure: Regenerate.
11753 2012-04-19 Pedro Alves <palves@redhat.com>
11755 * Makefile.in (GNULIB_BUILDDIR): New.
11756 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11757 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11758 (all, install-only, uninstall, clean-info, all-lib, clean): No
11759 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11760 (maintainer-clean realclean distclean): Use subdir_do.
11762 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11763 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11764 * acinclude.m4: Include acx_configure_dir.m4.
11765 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11766 calls. Call AC_PROG_RANLIB. Configure gnulib using
11769 (GNULIB_STDINT_H): Adjust.
11770 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11771 * gdbreplay.c: Include build-gnulib/config.h.
11772 * server.h: Likewise.
11773 * aclocal.m4: Regenerate.
11774 * config.in: Regenerate.
11775 * configure: Regenerate.
11777 2012-04-19 Pedro Alves <palves@redhat.com>
11779 * Makefile.in (LIBGNU, INCGNU): Adjust.
11780 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11781 (all, install-only, uninstall, clean-info, all-lib, clean)
11782 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11783 * configure.ac: Adjust AC_OUTPUT output.
11784 * aclocal.m4: Regenerate.
11785 * configure: Regenerate.
11787 2012-04-19 Pedro Alves <palves@redhat.com>
11789 * Makefile.in (generated_files): New.
11790 (server_h): Remove the explicit dependency on config.h, and depend
11791 on $generated_files.
11793 2012-04-19 Pedro Alves <palves@redhat.com>
11795 * Makefile.in (INCGNU): Add -Ignulib.
11797 2012-04-19 Pedro Alves <palves@redhat.com>
11799 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11800 (INCGNU): ... this, and spell out -I here.
11801 (GNULIB_LIB): Rename to ...
11802 (LIBGNU): ... this.
11803 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11805 2012-04-19 Pedro Alves <palves@redhat.com>
11807 * config.in: Regenerate.
11809 2012-04-19 Pedro Alves <palves@redhat.com>
11811 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11812 * server.h (memmem): Remove declaration.
11813 * config.in: Regenerate.
11814 * configure: Regenerate.
11816 2012-04-19 Yao Qi <yao@codesourcery.com>
11818 * Makefile.in (SFILES): Add common/vec.c.
11822 2012-04-19 Yao Qi <yao@codesourcery.com>
11824 * remote-utils.c (prepare_resume_reply): Replace with macro
11825 target_core_of_thread.
11826 * server.c (handle_qxfer_threads_proper): Likewise.
11827 * target.h (traget_core_of_thread): New macro.
11829 2012-04-18 Pedro Alves <palves@redhat.com>
11831 * aclocal.m4: Regenerate.
11832 * configure: Regenerate.
11834 2012-04-16 Yao Qi <yao@codesourcery.com>
11836 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11837 duplicated on address.
11839 2012-04-16 Yao Qi <yao@codesourcery.com>
11841 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11842 (struct tracepoint_action_ops) <send>: New field.
11843 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11844 (agent_expr_send, x_tracepoint_action_send): New.
11845 (l_tracepoint_action_send): New.
11846 (cmd_qtdp): Download and install tracepoint
11847 according to `use_agent'.
11848 (run_inferior_command): Add one more parameter `len'.
11850 (tracepoint_send_agent): New.
11851 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11853 2012-04-16 Yao Qi <yao@codesourcery.com>
11855 * tracepoint.c (download_tracepoints): Moved to ...
11856 (cmd_qtstart): ... here.
11858 2012-04-14 Yao Qi <yao@codesourcery.com>
11860 * tracepoint.c: Include inttypes.h.
11861 (struct collect_memory_action): Use sized types.
11862 (struct tracepoint): Likewise.
11863 (cmd_qtdp, stop_tracing): Update print specifiers.
11864 (cmd_qtp, response_tracepoint): Likewise.
11865 (collect_data_at_tracepoint): Likewise.
11866 (collect_data_at_step): Likewise.
11868 2012-04-14 Yao Qi <yao@codesourcery.com>
11870 Import gnulib module inttypes.
11871 * aclocal.m4, config.in, configure: Regenerated.
11873 2012-04-14 Yao Qi <yao@codesourcery.com>
11875 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11876 Makefile and config.status at last.
11878 2012-04-13 Yao Qi <yao@codesourcery.com>
11880 * tracepoint.c: Include stdint.h unconditionally.
11882 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11884 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11885 on BFD_HAVE_SYS_PROCFS_TYPE.
11886 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11887 * configure: Regenerate.
11888 * config.in: Likewise.
11890 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11892 * Makefile.in (clean): Also remove x32.c x32-linux.c
11893 x32-avx.c x32-avx-linux.c.
11894 (x32.o): New target.
11896 (x32-linux.o): Likewise.
11897 (x32-linux.c): Likewise.
11898 (x32-avx.o): Likewise.
11899 (x32-avx.c): Likewise.
11900 (x32-avx-linux.o): Likewise.
11901 (x32-avx-linux.c): Likewise.
11903 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11904 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11905 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11906 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11907 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11908 i386/x32-avx-linux.xml.
11910 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11911 (init_registers_x32_avx_linux): Likwise.
11912 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11913 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11915 2012-04-13 Pedro Alves <palves@redhat.com>
11917 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11918 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11919 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11920 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11923 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11925 * linux-x86-low.c (compat_x32_clock_t): New.
11926 (compat_x32_siginfo_t): Likewise.
11927 (compat_x32_siginfo_from_siginfo): Likewise.
11928 (siginfo_from_compat_x32_siginfo): Likewise.
11929 (linux_is_elf64): Likewise.
11930 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11931 and siginfo_from_compat_x32_siginfo for x32.
11932 (x86_arch_setup): Set linux_is_elf64.
11934 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11937 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11939 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11940 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11941 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11942 compatible with process.
11944 2012-04-12 Yao Qi <yao@codesourcery.com>
11946 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11947 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11948 (install-only, install-info, clean): Handle sub dir gnulib.
11949 (all-lib, am--refresh): New targets.
11950 (memmem.o): Remove target.
11951 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11952 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11953 (AC_REPLACE_FUNCS): Remove memmem.
11954 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11955 (AC_OUTPUT): Generate Makefile in gnulib/.
11956 * aclocal.m4, config.in, configure: Regenerated.
11958 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11960 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11962 2012-04-05 Pedro Alves <palves@redhat.com>
11964 -Werror=strict-aliasing
11966 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11969 2012-04-04 Pedro Alves <palves@redhat.com>
11971 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11972 (sparc_store_gregset_from_stack, sparc_store_gregset)
11973 (sparc_breakpoint_at): Fix formatting.
11975 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11977 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11979 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11980 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11981 * config.in: Regenerate.
11982 * configure: Likewise.
11984 2012-03-29 Pedro Alves <palves@redhat.com>
11986 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11987 Correct ptrace arguments.
11989 2012-03-28 Pedro Alves <palves@redhat.com>
11991 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11992 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11993 (IA64_FR1_REGNUM): New defines.
11994 (ia64_fetch_register): New.
11995 (the_low_target): Install it.
11996 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11998 * linux-low.c (linux_fetch_registers): Try the
11999 the_low_target.fetch_register hook first.
12001 * linux-arm-low.c (the_low_target): Adjust.
12002 * linux-bfin-low.c (the_low_target): Adjust.
12003 * linux-cris-low.c (the_low_target): Adjust.
12004 * linux-crisv32-low.c (the_low_target): Adjust.
12005 * linux-m32r-low.c (the_low_target): Adjust.
12006 * linux-m68k-low.c (the_low_target): Adjust.
12007 * linux-mips-low.c (the_low_target): Adjust.
12008 * linux-ppc-low.c (the_low_target): Adjust.
12009 * linux-s390-low.c (the_low_target): Adjust.
12010 * linux-sh-low.c (the_low_target): Adjust.
12011 * linux-sparc-low.c (the_low_target): Adjust.
12012 * linux-tic6x-low.c (the_low_target): Adjust.
12013 * linux-x86-low.c (the_low_target): Adjust.
12014 * linux-xtensa-low.c (the_low_target): Adjust.
12016 2012-03-26 Pedro Alves <palves@redhat.com>
12018 * server.c (handle_qxfer_libraries): Don't bail early if
12019 the_target->qxfer_libraries_svr4 is not NULL.
12021 2012-03-26 Pedro Alves <palves@redhat.com>
12023 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12025 2012-03-23 Pedro Alves <palves@redhat.com>
12027 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12028 "library-list-svr4" element's start tag when the the DSO list is
12031 2012-03-23 Pedro Alves <palves@redhat.com>
12033 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12034 a variable whose type size is the same as the inferior's pointer
12037 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12039 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12041 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12042 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12043 * linux-low.h: Include <signal.h>.
12044 (struct siginfo): Remove forward declaration.
12045 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12048 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12050 * .gitignore: Ignore more files.
12052 2012-03-19 Pedro Alves <palves@redhat.com>
12053 Jan Kratochvil <jan.kratochvil@redhat.com>
12055 * server.c (cont_thread, general_thread): Add describing comments.
12056 (start_inferior): Clear `cont_thread'.
12057 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12060 2012-03-15 Yao Qi <yao@codesourcery.com>
12062 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12064 (cmd_qtdp): ... here.
12066 2012-03-15 Yao Qi <yao@codesourcery.com>
12068 * tracepoint.c (struct tracepoint_action_ops): New.
12069 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12070 (m_tracepoint_action_download): New.
12071 (r_tracepoint_action_download): New.
12072 (x_tracepoint_action_download): New.
12073 (l_tracepoint_action_download): New.
12074 (add_tracepoint_action): Install `action->ops' according type.
12075 (download_tracepoint_1): Move code `download' function pointer
12076 of various tracepoint_action_ops.
12078 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12080 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12081 linux_ptrace_attach_warnings.
12083 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12085 * Makefile.in (linux-ptrace.o): New.
12086 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12087 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12088 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12089 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12090 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12092 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12094 2012-03-08 Yao Qi <yao@codesourcery.com>
12095 Pedro Alves <palves@redhat.com>
12097 Fix PR server/13392.
12098 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12099 offset of JMP insn.
12100 * tracepoint.c (remove_tracepoint): New.
12101 (cmd_qtdp): Call remove_tracepoint when failed to install.
12103 2012-03-07 Pedro Alves <palves@redhat.com>
12105 * linux-low.c (get_detach_signal): New.
12106 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12107 Pass on pending signals to PTRACE_DETACH. Check the result of the
12109 * server.c (program_signals, program_signals_p): New.
12110 (handle_general_set): Handle QProgramSignals.
12111 * server.h (program_signals, program_signals_p): Declare.
12113 2012-03-05 Pedro Alves <palves@redhat.com>
12114 Jan Kratochvil <jan.kratochvil@redhat.com>
12116 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12119 2012-03-03 Yao Qi <yao@codesourcery.com>
12121 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12122 agent_look_up_symbols.
12124 2012-03-03 Yao Qi <yao@codesourcery.com>
12126 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12127 (linux-x86-low.o): Likewise.
12128 * server.h: Remove in_process_agent_loaded.
12129 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12133 2012-03-03 Yao Qi <yao@codesourcery.com>
12135 * tracepoint.c (gdb_agent_capability): New global.
12136 (in_process_agent_loaded_ust): Renamed to
12137 `in_process_agent_supports_ust'.
12139 (in_process_agent_supports_ust): Call agent_capability_check.
12140 (clear_installed_tracepoints): Assert that agent supports
12143 2012-03-03 Yao Qi <yao@codesourcery.com>
12145 * linux-low.c (linux_supports_agent): New.
12146 (linux_target_ops): Initialize field `supports_agent' with
12147 linux_supports_agent.
12148 * target.h (struct target_ops) <supports_agent>: New.
12149 (target_supports_agent): New macro.
12150 * server.c (handle_general_set): Handle packet 'QAgent'.
12151 (handle_query): Send `QAgent+'.
12152 * Makefile.in (server.o): Depends on agent.h.
12154 2012-03-03 Yao Qi <yao@codesourcery.com>
12156 * Makefile.in (OBS): Add agent.o.
12157 Add new rule for agent.o.
12158 Track dependence of tracepoint.c on agent.h.
12159 * tracepoint.c (run_inferior_command_1):
12160 (run_inferior_command): Call agent_run_command.
12161 (gdb_ust_connect_sync_socket): Deleted. Move it to
12163 (resume_thread, stop_thread): Likewise.
12164 (gdb_ust_socket_init): Renamed to ...
12165 (gdb_agent_socket_init): ... New.
12166 (gdb_ust_thread): Renamed to ...
12167 (gdb_agent_helper_thread): ... New.
12168 (gdb_ust_init): Move some code to ...
12169 (gdb_agent_init): ... here. New.
12170 [HAVE_UST]: Call gdb_ust_init.
12171 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12172 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12173 * config.in, configure: Regenerated.
12175 2012-03-02 Pedro Alves <palves@redhat.com>
12177 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12178 * linux-low.c (struct simple_pid_list): New.
12179 (stopped_pids): New a struct simple_pid_list pointer.
12180 (add_to_pid_list, pull_pid_from_list): New.
12181 (handle_extended_wait): Don't assume the first signal new children
12182 report is SIGSTOP. Adjust call to pull_pid_from_list.
12183 (linux_wait_for_lwp): Adjust.
12185 2012-03-02 Yao Qi <yao@codesourcery.com>
12187 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12190 2012-03-02 Yao Qi <yao@codesourcery.com>
12192 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12193 `stop_pc' and `tpoint'. Update caller.
12195 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12197 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12198 * linux-low.c (use_linux_regsets): New macro.
12199 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12200 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12201 (linux_register_in_regsets): New function.
12202 (usr_fetch_inferior_registers): Skip registers covered by
12204 (usr_store_inferior_registers): Likewise.
12205 (usr_fetch_inferior_registers): New macro.
12206 (usr_store_inferior_registers): Likewise.
12207 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12208 (linux_store_registers): Likewise.
12209 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12211 (init_registers_mips64_dsp_linux): Likewise.
12212 (init_registers_mips_linux): New macro.
12213 (init_registers_mips_dsp_linux): Likewise.
12214 (mips_dsp_num_regs): Likewise.
12215 (DSP_BASE, DSP_CONTROL): New fallback macros.
12216 (mips_base_regs): New macro.
12217 (mips_regmap): Use it. Fix the size.
12218 (mips_dsp_regmap): New variable.
12219 (mips_dsp_regset_bitmap): Likewise.
12220 (mips_arch_setup): New function.
12221 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12223 (mips_cannot_store_register): Likewise.
12224 (the_low_target): Update .arch_setup, .num_regs and .regmap
12225 initializers. Add .regset_bitmap initializer.
12226 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12228 * linux-bfin-low.c (the_low_target): Likewise.
12229 * linux-cris-low.c (the_low_target): Likewise.
12230 * linux-crisv32-low.c (the_low_target): Likewise.
12231 * linux-ia64-low.c (the_low_target): Likewise.
12232 * linux-m32r-low.c (the_low_target): Likewise.
12233 * linux-m68k-low.c (the_low_target): Likewise.
12234 * linux-ppc-low.c (the_low_target): Likewise.
12235 * linux-s390-low.c (the_low_target): Likewise.
12236 * linux-sh-low.c (the_low_target): Likewise.
12237 * linux-sparc-low.c (the_low_target): Likewise.
12238 * linux-tic6x-low.c (the_low_target): Likewise.
12239 * linux-x86-low.c (the_low_target): Likewise.
12240 * linux-xtensa-low.c (the_low_target): Likewise.
12241 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12242 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12243 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12245 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12246 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12248 2012-02-29 Yao Qi <yao@codesourcery.com>
12249 Pedro Alves <palves@redhat.com>
12251 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12252 `step_over_finished' is true.
12254 2012-02-27 Pedro Alves <palves@redhat.com>
12256 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12257 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12259 2012-02-27 Pedro Alves <palves@redhat.com>
12262 * linux-low.c (pid_is_stopped): New.
12263 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12265 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12267 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12270 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12272 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12274 2012-02-24 Luis Machado <lgustavo@codesourcery>
12276 * server.c (handle_query): Advertise support for target-side
12277 breakpoint condition evaluation.
12278 (process_point_options): New function.
12279 (process_serial_event): When inserting a breakpoint, check for
12280 a target-side condition that should be evaluated.
12282 * mem-break.c: Include regcache.h and ax.h.
12283 (point_cond_list_t): New data structure.
12284 (breakpoint) <cond_list>: New field.
12285 (find_gdb_breakpoint_at): Make non-static.
12286 (delete_gdb_breakpoint_at): Clear any target-side
12288 (clear_gdb_breakpoint_conditions): New function.
12289 (add_condition_to_breakpoint): Likewise.
12290 (add_breakpoint_condition): Likewise.
12291 (gdb_condition_true_at_breakpoint): Likewise.
12292 (gdb_breakpoint_here): Return result directly instead
12293 of going through a local variable.
12295 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12296 (clear_gdb_breakpoint_conditions): Likewise.
12297 (add_breakpoint_condition): Likewise.
12298 (gdb_condition_true_at_breakpoint): Likewise.
12300 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12301 (need_step_over_p): Take target-side breakpoint condition into
12304 2012-02-24 Luis Machado <lgustavo@codesourcery>
12306 * server.h: Include tracepoint.h.
12307 (agent_mem_read, agent_get_trace_state_variable_value,
12308 agent_set_trace_state_variable_value,
12309 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12310 get_set_tsv_func_addr): New prototypes.
12312 * ax.h: New include file.
12313 * ax.c: New source file.
12315 * tracepoint.c: Include ax.h.
12316 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12317 agent_expr, eval_result_type): Move to ax.h.
12318 (parse_agent_expr): Rename to ...
12319 (gdb_parse_agent_expr): ... this, make it non-static and move
12321 (unparse_agent_expr) Rename to ...
12322 (gdb_unparse_agent_expr): ... this, make it non-static and move
12324 (eval_agent_expr): Rename to ...
12325 (eval_tracepoint_agent_expr): ... this.
12326 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12327 forward declarations.
12328 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12329 (agent_get_trace_state_variable_value): New function.
12330 (agent_set_trace_state_variable_value): New function.
12331 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12332 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12333 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12334 (condition_true_at_tracepoint): Likewise.
12335 (parse_agent_expr): Rename to ...
12336 (gdb_parse_agent_expr): ... this and move to ax.c.
12337 (unparse_agent_expr): Rename to ...
12338 (gdb_unparse_agent_expr): ... this and move to ax.c.
12339 (gdb_agent_op_name): Move to ax.c.
12340 (eval_agent_expr): Rename to ...
12341 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12343 (eval_tracepoint_agent_expr): New function.
12344 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12346 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12348 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12349 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12350 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12351 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12352 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12353 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12354 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12355 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12356 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12357 (compile_bytecodes): Remove forward declaration.
12358 (is_goto_target): Move to ax.c.
12359 (compile_bytecodes): Move to ax.c and call
12360 agent_get_trace_state_variable_value (...) and
12361 agent_set_trace_state_variable_value (...).
12363 * Makefile.in: Update ax.c and IPA dependencies.
12365 2012-02-24 Pedro Alves <palves@redhat.com>
12367 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12368 (cmd_bigqtbuffer_circular): ... this. Only handle
12369 'QTBuffer:circular:'.
12370 (handle_tracepoint_general_set): Adjust.
12372 2012-02-16 Yao Qi <yao@codesourcery.com>
12374 * inferiors.c: Move code to ...
12375 * dll.c: .... here. New.
12376 * server.h: Declare clear_dlls.
12377 * Makefile.in (SFILES): Add dll.c.
12381 2012-02-11 Yao Qi <yao@codesourcery.com>
12383 * server.c: (handle_monitor_command): Add a new parameter
12385 (handle_query): Update caller.
12387 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12389 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12390 * configure, config.in: Regenerate.
12391 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12394 2012-02-02 Pedro Alves <palves@redhat.com>
12396 Try SIGKILL first, then PTRACE_KILL.
12397 * linux-low.c (linux_kill_one_lwp): New.
12398 (linux_kill_one_lwp): Rename to ...
12399 (kill_one_lwp_callback): ... this. Use the new
12400 linux_kill_one_lwp.
12402 2012-02-02 Pedro Alves <palves@redhat.com>
12404 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12407 2012-01-27 Pedro Alves <palves@redhat.com>
12409 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12410 (elf_64_file_p): Make static.
12411 (linux_pid_exe_is_elf_64_file): New.
12412 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12413 Delete declarations.
12414 (linux_pid_exe_is_elf_64_file): Declare.
12415 * linux-x86-low.c (x86_arch_setup): Use
12416 linux_pid_exe_is_elf_64_file.
12418 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12420 * linux-low.c (linux_wait_for_event_1): Rename to ...
12421 (linux_wait_for_event): ... here and merge it with former
12422 linux_wait_for_event - new variable wait_ptid, use it.
12423 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12425 2012-01-23 Pedro Alves <palves@redhat.com>
12427 * server.c (main): Avoid yet another case of infinite loop while
12428 detaching/killing after a longjmp.
12430 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12433 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12435 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12437 * hostio.c (handle_readlink): New function.
12438 (handle_vFile): Call it to handle "vFile:readlink" packets.
12440 2012-01-20 Pedro Alves <palves@redhat.com>
12441 Ulrich Weigand <ulrich.weigand@linaro.org>
12443 * server.c (handle_v_requests): Only support vAttach and vRun to
12444 start multiple processes when in extended protocol mode.
12446 2012-01-17 Pedro Alves <palves@redhat.com>
12448 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12449 memalign plus mprotect to allocate the scratch buffer.
12451 2012-01-13 Pedro Alves <palves@redhat.com>
12453 * server.c (attach_inferior): Clear `cont_thread'.
12455 2012-01-13 Pedro Alves <palves@redhat.com>
12457 * server.c (main): Avoid infinite loop while detaching/killing
12460 2012-01-09 Doug Evans <dje@google.com>
12462 * server.c (start_inferior): Set last_ptid in --wrapper case.
12464 2012-01-06 Yao Qi <yao@codesourcery.com>
12466 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12468 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12470 2012-01-04 Yao Qi <yao@codesourcery.com>
12472 * tracepoint.c (cmd_qtdp): Print debug message
12473 for static tracepoint.
12475 2012-01-04 Yao Qi <yao@codesourcery.com>
12477 * tracepoint.c (trace_vdebug): Differentiate debug message
12478 between gdbserver and IPA.
12480 2012-01-03 Yao Qi <yao@codesourcery.com>
12482 * tracepoint.c (tracepoint_was_hit): Don't collect for
12485 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12487 * terminal.h: Reformat copyright header.
12489 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12491 * server.c (gdbserver_version): Update copyright year.
12492 * gdbreplay.c (gdbreplay_version): Likewise.
12494 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12496 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12499 2011-12-18 Hui Zhu <teawater@gmail.com>
12500 * linux-low.c (linux_create_inferior): Save return value to ret.
12502 2011-12-18 Hui Zhu <teawater@gmail.com>
12504 * linux-low.c (linux_create_inferior): Save return value to ret.
12506 2011-12-16 Doug Evans <dje@google.com>
12508 * linux-low.c (linux_create_inferior): If stdio connection,
12509 redirect stdin from /dev/null, stdout to stderr.
12510 * remote-utils.c (remote_is_stdio): New static global.
12511 (remote_connection_is_stdio): New function.
12512 (remote_prepare): Handle stdio connection.
12513 (remote_open): Ditto.
12514 (remote_close): Don't close stdin for stdio connections.
12515 (read_prim,write_prim): New functions. Replace all calls to
12516 read/write to these.
12517 * server.c (main): Watch for "-" argument. Move call to
12518 remote_prepare before start_inferior.
12519 * server.h (STDIO_CONNECTION_NAME): New macro.
12520 (remote_connection_is_stdio): Declare.
12522 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12523 in debugging output.
12525 2011-12-15 Yao Qi <yao@codesourcery.com>
12527 * tracepoint.c: Include sys/syscall.h.
12528 (gdb_ust_thread): Remove preprocessor conditional.
12530 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12532 * linux-low.c (linux_detach_one_lwp): Call
12533 the_low_target.prepare_to_resume before detaching.
12535 2011-12-14 Yao Qi <yao@codesourcery.com>
12537 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12540 2011-12-14 Yao Qi <yao@codesourcery.com>
12542 * i386-low.c (i386_low_stopped_data_address): Initialize local
12543 variable `control'.
12545 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12549 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12550 DR_CONTROL unless necessary. Extend comments.
12551 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12552 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12554 2011-12-13 Yao Qi <yao@codesourcery.com>
12556 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12558 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12560 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12562 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12563 Print new debug message for such case.
12565 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12567 Fix overlapping memcpy.
12568 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12569 the read_inferior_memory transfer.
12570 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12571 write_inferior_memory transfer.
12572 (set_fast_tracepoint_jump): New variable buf. Use it for the
12573 read_inferior_memory and write_inferior_memory transfers.
12574 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12575 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12576 Use it for the write_inferior_memory transfer.
12577 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12580 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12582 * linux-low.c (fetch_register, store_register): Make code
12583 consistent, fix formatting.
12585 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12587 * linux-low.c (usr_store_inferior_registers): Factor out code
12588 to handle individual registers into...
12589 (store_register): ... this new function.
12591 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12593 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12594 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12595 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12596 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12597 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12598 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12599 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12600 (srv_xmlfiles): Add new XML files.
12602 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12604 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12605 (init_registers_s390_linux32v1): Add prototype.
12606 (init_registers_s390_linux32v2): Likewise.
12607 (init_registers_s390_linux64v1): Likewise.
12608 (init_registers_s390_linux64v2): Likewise.
12609 (init_registers_s390x_linux64v1): Likewise.
12610 (init_registers_s390x_linux64v2): Likewise.
12611 (s390_num_regs): Increment to 52.
12612 (s390_regmap): Add orig_r2 register.
12613 (s390_num_regs_3264): Increment to 68.
12614 (s390_regmap_3264): Add orig_r2 register.
12615 (s390_collect_ptrace_register): Handle orig_r2 register.
12616 (s390_supply_ptrace_register): Likewise.
12617 (s390_fill_last_break): New function.
12618 (s390_store_last_break): Likewise.
12619 (s390_fill_system_call): New function.
12620 (s390_store_system_call): Likewise.
12621 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12623 (s390_check_regset): New function.
12624 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12625 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12626 Update target_regsets for available register sets.
12628 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12629 Jan Kratochvil <jan.kratochvil@redhat.com>
12631 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12632 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12634 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12635 * linux-low.h (struct process_info_private): New member r_debug.
12636 * server.c (handle_qxfer_libraries): Call
12637 the_target->qxfer_libraries_svr4.
12638 (handle_qxfer_libraries_svr4): New function.
12639 (qxfer_packets): New entry "libraries-svr4".
12640 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12641 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12642 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12643 PACKET_qXfer_libraries_svr4.
12645 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12647 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12648 PSW address/mask between 8-byte and 16-byte formats.
12649 (s390_supply_ptrace_register): Likewise.
12650 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12651 basic addressing mode bit.
12653 2011-11-24 Stan Shebs <stan@codesourcery.com>
12655 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12657 2011-11-17 Stan Shebs <stan@codesourcery.com>
12659 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12660 (tracing_start_time): New global.
12661 (tracing_stop_time): New global.
12662 (tracing_user_name): New global.
12663 (tracing_notes): New global.
12664 (tracing_stop_note): New global.
12665 (cmd_qtstart): Set traceframe_usage, start_time.
12666 (stop_tracing): Set stop_time.
12667 (cmd_qtstatus): Report additional status.
12668 (cmd_qtp): New function.
12669 (handle_tracepoint_query): Call it.
12670 (cmd_qtnotes): New function.
12671 (handle_tracepoint_general_set): Call it.
12672 (get_timestamp): Rename from tsv_get_timestamp.
12674 2011-11-14 Stan Shebs <stan@codesourcery.com>
12675 Kwok Cheung Yeung <kcy@codesourcery.com>
12677 * linux-x86-low.c (small_jump_insn): New.
12678 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12679 trampoline and error message, build a trampoline and issue a small
12680 jump instruction to it.
12681 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12682 trampoline and error message.
12683 (x86_get_min_fast_tracepoint_insn_len): New.
12684 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12685 * linux-low.h (struct linux_target_ops): Add arguments to
12686 install_fast_tracepoint_jump_pad operation, add new operation.
12687 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12689 (linux_get_min_fast_tracepoint_insn_len): New function.
12690 (linux_target_op): Add new operation.
12691 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12692 (gdb_trampoline_buffer_end): Ditto.
12693 (gdb_trampoline_buffer_error): Ditto.
12694 (struct ipa_sym_addresses): Add fields for new IPA variables.
12695 (symbol_list): Add entries for new IPA variables.
12696 (struct tracepoint): Add fields to hold the address range of the
12697 trampoline used by the tracepoint.
12698 (trampoline_buffer_head): New static variable.
12699 (trampoline_buffer_tail): Ditto.
12700 (claim_trampoline_space): New function.
12701 (have_fast_tracepoint_trampoline_buffer): New function.
12702 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12704 (install_fast_tracepoint): Ditto, also add error buffer argument.
12705 (cmd_qtminftpilen): New function.
12706 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12707 (fast_tracepoint_from_trampoline_address): New function.
12708 (fast_tracepoint_collecting): Handle trampoline as part of jump
12710 (set_trampoline_buffer_space): New function.
12711 (initialize_tracepoint): Initialize new IPA variables.
12712 * target.h (struct target_ops): Add arguments to
12713 install_fast_tracepoint_jump_pad operation, add new
12714 get_min_fast_tracepoint_insn_len operation.
12715 (target_get_min_fast_tracepoint_insn_len): New.
12716 (install_fast_tracepoint_jump_pad): Add arguments.
12717 * server.h (IPA_BUFSIZ): Define.
12718 * linux-i386-ipa.c: Include extra header files.
12719 (initialize_fast_tracepoint_trampoline_buffer): New function.
12720 (initialize_low_tracepoint): Call it.
12721 * server.h (set_trampoline_buffer_space): Declare.
12722 (claim_trampoline_space): Ditto.
12723 (have_fast_tracepoint_trampoline_buffer): Ditto.
12725 2011-11-14 Yao Qi <yao@codesourcery.com>
12727 * server.c (handle_query): Handle InstallInTrace for qSupported.
12728 * tracepoint.c (add_tracepoint): Sort list.
12729 (install_tracepoint, download_tracepoint): New.
12730 (cmd_qtdp): Call them to install and download tracepoints.
12731 (sort_tracepoints): Removed.
12732 (cmd_qtstart): Update.
12734 2011-11-14 Yao Qi <yao@codesourcery.com>
12736 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12737 * mem-break.h: Declare.
12738 * tracepoint.c (cmd_qtstart): Move some code to ...
12739 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12741 (download_tracepoints): Move some code to ...
12742 (download_tracepoint_1): ... here. New.
12744 2011-11-08 Yao Qi <yao@codesourcery.com>
12746 * remote-utils.c (relocate_instruction): A comment fix.
12748 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12750 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12751 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12752 dr_status_mirror and dr_control_mirror from debug_reg_state.
12753 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12754 (i386_initial_stuff): Remove use of deleted globals.
12755 (i386_get_thread_context, i386_set_thread_context,
12756 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12757 from debug_reg_state.
12759 2011-11-05 Yao Qi <yao@codesourcery.com>
12761 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12762 address as TPOINT's.
12764 2011-11-02 Stan Shebs <stan@codesourcery.com>
12766 * tracepoint.c (agent_mem_read_string): New function.
12767 (eval_agent_expr): Call it for tracenz.
12768 * server.c (handle_query): Report support for tracenz.
12770 2011-11-02 Yao Qi <yao@codesourcery.com>
12772 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12774 2011-11-02 Yao Qi <yao@codesourcery.com>
12776 * target.h: Fix a typo in comment.
12778 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12780 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12781 clobber the breakpoints' shadows with fast tracepoint jumps.
12782 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12783 * target.c (write_inferior_memory): Also pass MYADDR down to
12786 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12788 * configure.ac: Check support for personality routine.
12789 * configure: Regenerate.
12790 * config.in: Likewise.
12791 * linux-low.c: Include <sys/personality.h>.
12792 Define ADDR_NO_RANDOMIZE if necessary.
12793 (linux_create_inferior): Disable address space randomization when
12794 forking inferior, if requested.
12795 (linux_supports_disable_randomization): New function.
12796 (linux_target_ops): Install it.
12797 * server.h (disable_randomization): Declare.
12798 * server.c (disable_randomization): New global variable.
12799 (handle_general_set): Handle QDisableRandomization.
12800 (handle_query): Likewise for qSupported.
12801 (main): Support --disable-randomization and --no-disable-randomization
12802 command line arguments.
12803 * target.h (struct target_ops): Add supports_disable_randomization.
12804 (target_supports_disable_randomization): New macro.
12806 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12808 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12810 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12811 [!PT_GETDSBT] (target_loadmap): New definition.
12812 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12813 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12814 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12815 and PT_GETDSBT to LINUX_LOADMAP.
12816 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12817 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12819 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12821 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12822 (arm_linux_hwbp_cap): New static variable.
12823 (arm_linux_get_hwbp_cap): Replace by ...
12824 (arm_linux_init_hwbp_cap): ... this new function.
12825 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12826 (arm_linux_get_hw_watchpoint_count): Likewise.
12827 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12828 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12829 (arm_prepare_to_resume): Use perror_with_name instead of error.
12831 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12833 * linux-arm-low.c: Include <signal.h>.
12834 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12835 (struct arm_linux_hwbp_cap): New data type.
12836 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12837 (struct arm_linux_hw_breakpoint): New data type.
12838 (MAX_BPTS, MAX_WPTS): Define.
12839 (struct arch_process_info, struct arch_lwp_info): New data types.
12840 (arm_linux_get_hwbp_cap): New function.
12841 (arm_linux_get_hw_breakpoint_count): Likewise.
12842 (arm_linux_get_hw_watchpoint_count): Likewise.
12843 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12844 (arm_hwbp_control_initialize): Likewise.
12845 (arm_hwbp_control_is_enabled): Likewise.
12846 (arm_hwbp_control_is_initialized): Likewise.
12847 (arm_hwbp_control_disable): Likewise.
12848 (arm_linux_hw_breakpoint_equal): Likewise.
12849 (arm_linux_hw_point_initialize): Likewise.
12850 (struct update_registers_data): New data structure.
12851 (update_registers_callback: New function.
12852 (arm_insert_point): Likewise.
12853 (arm_remove_point): Likewise.
12854 (arm_stopped_by_watchpoint): Likewise.
12855 (arm_stopped_data_address): Likewise.
12856 (arm_new_process): Likewise.
12857 (arm_new_thread): Likewise.
12858 (arm_prepare_to_resume): Likewise.
12859 (the_low_target): Register arm_insert_point, arm_remove_point,
12860 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12861 arm_new_thread, and arm_prepare_to_resume.
12863 2011-09-15 Stan Shebs <stan@codesourcery.com>
12865 * server.h (struct emit_ops): Add compare-goto fields.
12866 * tracepoint.c (gdb_agent_op_sizes): New table.
12867 (emit_eq_goto): New function.
12868 (emit_ne_goto): New function.
12869 (emit_lt_goto): New function.
12870 (emit_le_goto): New function.
12871 (emit_gt_goto): New function.
12872 (emit_ge_goto): New function.
12873 (is_goto_target): New function.
12874 (compile_bytecodes): Recognize special cases of compare-goto
12875 combinations and call specialized emitters for them.
12876 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12877 (amd64_emit_ne_goto): New function.
12878 (amd64_emit_lt_goto): New function.
12879 (amd64_emit_le_goto): New function.
12880 (amd64_emit_gt_goto): New function.
12881 (amd64_emit_ge_goto): New function.
12882 (amd64_emit_ops): Add the new functions.
12883 (i386_emit_eq_goto): New function.
12884 (i386_emit_ne_goto): New function.
12885 (i386_emit_lt_goto): New function.
12886 (i386_emit_le_goto): New function.
12887 (i386_emit_gt_goto): New function.
12888 (i386_emit_ge_goto): New function.
12889 (i386_emit_ops): Add the new functions.
12891 2011-09-08 Stan Shebs <stan@codesourcery.com>
12893 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12894 (i386_emit_epilogue): Restore %ebx.
12896 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12898 * server.c (step_thread): Remove definition.
12899 (process_serial_event): Don't handle Hs.
12900 * server.h (step_thread): Remove declaration.
12901 * target.c (set_desired_inferior): Remove use of step_thread.
12903 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12905 * linux-low.c: Include linux-procfs.h.
12906 (linux_attach_lwp_1): Update comments.
12907 (linux_attach): Scan for existing threads when attaching to a
12908 process that is the tgid.
12909 * Makefile.in: Update dependencies.
12911 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12913 * configure.srv: Add linux-procfs.o dependencies.
12915 2011-08-14 Yao Qi <yao@codesourcery.com>
12917 * target.h (struct target_ops): Fix indent.
12918 * win32-low.c (win32_target_ops): Fix comment.
12920 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12921 Yao Qi <yao@codesourcery.com>
12923 * Makefile.in (clean): Remove tic6x-*.c files.
12924 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12925 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12926 (tic6x-c64xp-linux.c): Likewise.
12927 * configure.srv: Add support for tic6x-*-uclinux.
12928 * linux-tic6x-low.c: New.
12929 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12931 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12932 Yao Qi <yao@codesourcery.com>
12934 * target.h (struct target_ops): Add read_loadmap.
12935 * linux-low.c (struct target_loadseg): New type.
12936 (struct target_loadmap): New type.
12937 (linux_read_loadmap): New function.
12938 (linux_target_ops): Add linux_read_loadmap.
12939 * server.c (handle_query): Support qXfer:fdpic:read packet.
12940 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12943 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12945 * win32-low.c: Include <stdint.h>.
12947 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12949 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12950 to the inferior here.
12951 (i386_remove_aligned_watchpoint): Ditto.
12952 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12953 fit part of the watchpoint in the debug registers.
12954 (i386_update_inferior_debug_regs): New.
12955 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12956 registers, and only update the inferior on success.
12957 (i386_low_remove_watchpoint): Ditto.
12959 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12961 * linux-low.c (compare_ints, unique, list_threads, show_process,
12962 linux_core_of_thread): Delete.
12963 (linux_target_ops): Change linux_core_of_thread to
12964 linux_common_core_of_thread.
12965 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12966 * utils.c (malloc_failure): Change type of argument.
12967 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12968 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12969 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12970 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12971 (IPA_OBJS): Add common-utils-ipa.o.
12972 (ptid_h, linux_osdata_h): New macros.
12973 (server_h): Add common/common-utils.h, common/xml-utils.h,
12974 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12976 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12977 ptid.o, buffer.o): New rules.
12978 (linux-low.o): Add common/linux-osdata.h as a dependency.
12979 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12980 * configure.ac: Add AC_HEADER_DIRENT check.
12981 * config.in: Regenerate.
12982 * configure: Regenerate.
12983 * remote-utils.c (xml_escape_text): Delete.
12984 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12985 buffer_xml_printf): Move to common/buffer.c.
12986 * server.c (main): Remove call to initialize_inferiors.
12987 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12988 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12989 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12990 internal_error, gdb_assert, gdb_assert_fail): Delete.
12991 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12992 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12994 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12995 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12996 initialize_inferiors): Delete.
12998 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13000 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13003 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13005 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13007 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13009 2011-05-26 Yao Qi <yao@codesourcery.com>
13011 * Makefile.in (thread-db.o): Track dependence to
13012 common/gdb_thread_db.h.
13013 * thread-db.c: include gdb_thread_db.h from right place.
13015 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13017 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13018 __FILE__ and __LINE__ to internal_error.
13020 2011-05-13 Doug Evans <dje@google.com>
13022 * thread-db.c (try_thread_db_load_from_sdir): New function.
13023 (try_thread_db_load_from_dir): New function.
13024 (thread_db_load_search): Handle $sdir, ignore $pdir.
13025 Remove trying of system directories if search of
13026 libthread-db-search-path fails, that is now done via $sdir.
13028 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13030 * server.c (handle_query): Add EnableDisableTracepoints to the list
13031 of supported features.
13032 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13034 (cmd_qtenable_disable): New.
13035 (cmd_qtstart): Install tracepoints even if disabled.
13036 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13037 receiving a QTEnable or QTDisable packet.
13038 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13039 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13041 (gdb_probe): Skip data collection if static tracepoint is disabled.
13043 2011-05-10 Doug Evans <dje@google.com>
13045 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13047 2011-05-04 Doug Evans <dje@google.com>
13049 * linux-low.c (linux_join): Skip process lookup.
13050 * spu-low.c (spu_join): Ditto.
13051 * server.c (join_inferiors_callback): Delete.
13052 (process_serial_event): For 'D' packet (detach) call join_inferior
13055 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13057 * README: Don't mention xscale*-*-linux*.
13058 * configure.srv (xscale*-*-linux*): Don't handle target.
13060 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13062 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13064 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13065 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13066 (i386_emit_void_call_2): Likewise.
13068 2011-04-26 Yao Qi <yao@codesourcery.com>
13070 * linux-low.c: Move common macros to linux-ptrace.h.
13071 Include linux-ptrace.h.
13072 * Makefile.in (linux_ptrace_h): New.
13073 (linux-low.o): Depends on linux-ptrace.h.
13075 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13077 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13078 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13079 (remote_prepare): New function with most of the TCP code from ...
13080 (remote_open): ... here. Detect PORT here unconditionally. Move also
13081 setting transport_is_reliable.
13082 * server.c (run_once): New variable.
13083 (gdbserver_usage): Document it.
13084 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13085 the first run if RUN_ONCE.
13086 * server.h (run_once, remote_prepare): New declarations.
13088 2011-04-19 Tom Tromey <tromey@redhat.com>
13090 * win32-low.c (handle_load_dll): Remove duplicate "the".
13092 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13094 Remove support for old Cygwin 1.5 versions.
13095 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13096 function to avoid warning.
13097 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13100 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13102 * gdbserver/server.h (Macro _): Define it if not available.
13104 2011-03-14 Michael Snyder <msnyder@vmware.com>
13106 * hostio.c (handle_close): Remove unnecessary null test.
13108 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13110 * Makefile.in (maintainer-clean realclean distclean): Remove
13111 "make ... subdir_do" command.
13113 2011-03-10 Michael Snyder <msnyder@vmware.com>
13115 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13117 * server.c (handle_v_run): Free alloced buffer on early return.
13119 2011-03-09 Yao Qi <yao@codesourcery.com>
13122 2011-03-04 Yao Qi <yao@codesourcery.com>
13124 * Makefile.in: Remove GNU make feature --directory.
13126 2011-03-05 Yao Qi <yao@codesourcery.com>
13128 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13129 (subdir_do): New make target. Copied from gdb/Makefile.
13130 (maintainer-clean, realclean, distclean, clean): Call corresponding
13131 make targets in common/Makefile.
13133 2011-02-11 Yao Qi <yao@codesourcery.com>
13135 * configure.ac: Call AC_PROG_RANLIB.
13136 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13137 * configure: Regenerate.
13139 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13141 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13143 2011-03-06 Yao Qi <yao@codesourcery.com>
13145 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13147 2011-03-05 Yao Qi <yao@codesourcery.com>
13149 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13150 (subdir_do): New make target. Copied from gdb/Makefile.
13151 (maintainer-clean, realclean, distclean, clean): Call corresponding
13152 make targets in common/Makefile.
13154 2011-03-04 Yao Qi <yao@codesourcery.com>
13156 * Makefile.in: Remove GNU make feature --directory.
13158 2011-03-04 Michael Snyder <msnyder@vmware.com>
13160 * server.c (queue_stop_reply): Call xmalloc not malloc.
13162 2011-03-02 Michael Snyder <msnyder@vmware.com>
13164 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13166 2011-02-28 Michael Snyder <msnyder@vmware.com>
13168 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13169 (cmd_qtframe): Ditto.
13170 (cmd_qtbuffer): Ditto.
13171 (cmd_bigqtbuffer): Ditto.
13173 * utils.c (decimal2str): Initialize 'width' to nine, then
13174 don't mess with it.
13176 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13178 * hostio.c (require_data): Free *data, not data.
13180 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13182 * hostio.c (require_data): Use free, not xfree.
13184 2011-02-27 Michael Snyder <msnyder@vmware.com>
13186 * server.c (handle_query): Discard unused value.
13188 * hostio.c (require_data): Free malloc memory before returning
13191 2011-02-26 Michael Snyder <msnyder@vmware.com>
13193 * linux-low.c (list_threads): Call closedir for dirent.
13195 2011-02-27 Michael Snyder <msnyder@vmware.com>
13197 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13198 a case statement falls through.
13200 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13202 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13205 2011-02-26 Michael Snyder <msnyder@vmware.com>
13207 * utils.c (decimal2str): Eliminate dead code and dead param.
13208 (pulongest): Drop dead param from call to decimal2str.
13211 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13213 Revert the following patch (not approved yet):
13214 2011-02-21 Hui Zhu <teawater@gmail.com>
13215 * tracepoint.c (tp_printf): New function.
13216 (eval_agent_expr): Handle gdb_agent_op_printf.
13218 2011-02-21 Hui Zhu <teawater@gmail.com>
13220 * tracepoint.c (tp_printf): New function.
13221 (eval_agent_expr): Handle gdb_agent_op_printf.
13223 2011-02-18 Tom Tromey <tromey@redhat.com>
13225 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13226 (tracepoint.o): Likewise.
13227 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13228 (gdb_agent_op_names): Likewise.
13230 2011-02-18 Tom Tromey <tromey@redhat.com>
13232 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13233 gdb_agent_op_rot>: New constants.
13234 (gdb_agent_op_names): Add pick and roll.
13235 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13238 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13240 * aclocal.m4: Regenerated with aclocal-1.11.1.
13242 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13244 * server.c (handle_qxfer_traceframe_info): New.
13245 (qxfer_packets): Register "traceframe-info".
13246 (handle_query): Report support for qXfer:traceframe-info:read+.
13247 * tracepoint.c (match_blocktype): New.
13248 (traceframe_find_block_type): Rename to ...
13249 (traceframe_walk_blocks): ... this. Add callback filter argument,
13251 (traceframe_find_block_type): New, reimplemented on top of
13252 traceframe_walk_blocks.
13253 (build_traceframe_info_xml): New.
13254 (traceframe_read_info): New.
13255 * server.h (traceframe_read_info): Declare.
13257 2011-02-11 Yao Qi <yao@codesourcery.com>
13259 * configure.ac: Call AC_PROG_RANLIB.
13260 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13261 * configure: Regenerate.
13263 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13265 * server.c (gdb_read_memory): Change return semantics to allow
13267 (handle_search_memory_1): Adjust.
13268 (process_serial_event) <'m' packet>: Handle partial transfers.
13269 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13271 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13273 * regcache.c (init_register_cache): Initialize
13274 regcache->register_status.
13275 (free_register_cache): Release regcache->register_status.
13276 (regcache_cpy): Copy register_status.
13277 (registers_to_string): Print 'x's for unavailable registers.
13278 (supply_register): Mark the register's status valid or
13279 unavailable, depending on whether a buffer was passed in or not.
13280 (supply_register_zeroed): New.
13281 (supply_regblock): Mark the registers' status valid or
13282 unavailable, depending on whether a buffer was passed in or not.
13283 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13284 (struct regcache): New `register_status' field.
13285 (supply_register_zeroed): Declare.
13286 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13287 supply_register_zeroed, rather than passing a NULL buffer to
13289 * tracepoint.c (fetch_traceframe_registers): Update comment.
13291 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13293 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13296 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13298 * server.h (decode_xfer_write): Change prototype.
13299 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13300 and don't extract the annex here.
13301 * server.c (decode_xfer_read): Remove `annex' parameter,
13302 and don't extract the annex here.
13303 (decode_xfer): New.
13304 (struct qxfer): New.
13305 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13306 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13307 (handle_qxfer_statictrace): New functions, abstracted out from
13308 handle_query, and made to use the struct qxfer interface.
13309 (handle_threads_qxfer_proper): Rename to ...
13310 (handle_qxfer_threads_proper): ... this.
13311 (handle_threads_qxfer): Rename to ...
13312 (handle_qxfer_threads): ... this. Adjust.
13313 (qxfer_packets): New array.
13314 (handle_qxfer): New function.
13315 (handle_query): Use handle_qxfer.
13317 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13319 * gdbreplay.c: Shorten lines of >= 80 columns.
13320 * linux-low.c: Ditto.
13321 * linux-ppc-low.c: Ditto.
13322 * linux-s390-low.c: Ditto.
13323 * linux-sparc-low.c: Ditto.
13324 * linux-x86-low.c: Ditto.
13325 * linux-xtensa-low.c: Ditto.
13326 * mem-break.c: Ditto.
13327 * nto-low.c: Ditto.
13328 * regcache.h: Ditto.
13329 * remote-utils.c: Ditto.
13332 * thread-db.c: Ditto.
13333 * tracepoint.c: Ditto.
13335 * win32-low.h: Ditto.
13337 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13339 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13342 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13344 * server.c (gdbserver_version): Update copyright year in version
13346 * gdbreplay.c (gdbreplay_version): Ditto.
13348 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13350 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13351 * linux-bfin-low.c: New file.
13352 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13353 PT_DATA_ADDR for BFIN targets.
13354 * Makefile.in (SFILES): Add linux-bfin-low.c.
13355 (clean): Remove reg-bfin.c.
13356 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13357 * README: Mention supported Blackfin targets.
13359 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13361 * .gitignore: New file.
13363 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13365 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13367 2010-10-22 Jie Zhang <jie@codesourcery.com>
13369 * Makefile.in: Add FLAGS_TO_PASS variable.
13370 (install): Remove dependency of install-only and recursively
13371 invoke make for install-only.
13373 2010-10-04 Doug Evans <dje@google.com>
13375 * Makefile.in (uninstall): Use $(DESTDIR).
13377 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13381 * linux-x86-low.c (compat_siginfo_from_siginfo)
13382 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13383 si_code is < 0. Check for si_code == SI_TIMER before checking for
13386 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13388 * lynx-i386-low.c: New file.
13389 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13391 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13393 * lynx-low.c (ptrace_request_to_str): Remove handling for
13394 request values that have been removed in LynxOS 5.x.
13396 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13398 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13401 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13403 * configure.ac: Add --enable-inprocess-agent option.
13404 * configure: Rebuilt.
13406 2010-09-06 Yao Qi <yao@codesourcery.com>
13408 * linux-low.c (linux_kill): Remove unused variable.
13409 (linux_stabilize_threads): Likewise.
13410 * server.c (start_inferior): Likewise.
13411 (queue_stop_reply_callback): Likewise.
13412 * tracepoint.c (do_action_at_tracepoint): Likewise.
13414 2010-09-06 Yao Qi <yao@codesourcery.com>
13416 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13419 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13421 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13423 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13425 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13428 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13430 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13431 gdbserver/lynx-ppc-low.c: New files.
13432 * Makefile.in (lynx_low_h): New variable.
13433 (lynx-low.o, lynx-ppc-low.o): New rules.
13434 * configure.ac: On LynxOS, link with -lnetinet.
13435 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13436 * configure: regenerate.
13438 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13440 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13441 * configure.ac: Add check for vasprintf and vsnprintf.
13442 * configure, config.in: Regenerate.
13443 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13445 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13447 * gdbreplay.c: Move include of alloca.h up, next to include of
13449 * server.h: Add include of malloc.h.
13450 * mem-break.c: Remove include of malloc.h.
13451 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13453 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13455 * Makefile.in (memmem.o): Build with -Wno-error.
13457 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13459 * utils.c (xsnprintf): Make non-static.
13460 * server.h: Add xsnprintf declaration.
13461 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13462 replace calls to snprintf by calls to xsnprintf throughout.
13464 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13466 * configure.ac: Add configure check for alloca.
13467 * configure, config.in: Regenerate.
13468 * server.h: Include alloca.h if it exists.
13469 * gdbreplay.c: Include alloca.h if it exists.
13471 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13473 * linux-low.c (__SIGRTMIN): Define if not already defined.
13474 (linux_create_inferior): Check for __ANDROID__ rather than
13476 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13477 are already deferred.
13478 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13479 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13480 stopped and already has a pending signal to report.
13481 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13482 a pending signal to report or is moving out of a jump pad.
13483 (linux_init_signals): Check for __ANDROID__ rather than
13486 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13488 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13489 debug_threads check. Avoid a linear search when not doing debug
13492 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13494 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13495 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13496 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13497 (process_event): Change local fd's type to gdb_fildes_t.
13498 (create_file_handler): Adjust prototype.
13499 (delete_file_handler): Adjust prototype.
13500 (handle_file_event): Adjust prototype. Use pfildes.
13501 (create_file_event): Adjsut prototype.
13502 * remote-utils.c (remote_desc, listen_desc): Change type to
13504 * server.h: New gdb_fildes_t typedef.
13505 [USE_WIN32API]: Include winsock2.h.
13506 (delete_file_handler, add_file_handler): Adjust prototypes.
13507 (pfildes): Declare.
13508 * utils.c (pfildes): New.
13510 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13512 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13513 * configure: Regenerate.
13515 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13517 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13518 (linux_done_accessing_memory): ... this.
13519 (linux_target_ops): Adjust.
13520 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13521 * nto-low.c (nto_target_ops): Adjust comment.
13522 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13523 * spu-low.c (spu_target_ops): Adjust comment.
13524 * target.h (target_ops): Rename unprepare_to_access_memory field
13525 to done_accessing_memory.
13526 (unprepare_to_access_memory): Rename to ...
13527 (done_accessing_memory): ... this.
13529 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13531 * linux-low.c (linux_prepare_to_access_memory): New.
13532 (linux_unprepare_to_access_memory): New.
13533 (linux_target_ops): Install them.
13534 * server.c (read_memory): Rename to ...
13535 (gdb_read_memory): ... this. Use
13536 prepare_to_access_memory/prepare_to_access_memory.
13537 (write_memory): Rename to ...
13538 (gdb_write_memory): ... this. Use
13539 prepare_to_access_memory/prepare_to_access_memory.
13540 (handle_search_memory_1): Adjust.
13541 (process_serial_event): Adjust.
13542 * target.h (struct target_ops): New fields
13543 prepare_to_access_memory and unprepare_to_access_memory.
13544 (prepare_to_access_memory, unprepare_to_access_memory): New.
13545 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13546 prepare_to_access_memory/prepare_to_access_memory.
13547 * nto-low.c (nto_target_ops): Adjust.
13548 * spu-low.c (spu_target_ops): Adjust.
13549 * win32-low.c (win32_target_ops): Adjust.
13551 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13553 * Makefile.in (WARN_CFLAGS): Get it from configure.
13554 (WERROR_CFLAGS): New.
13555 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13556 * configure.ac: Introduce --enable-werror, which adds -Werror to
13557 the compiler command line. Enabled by default. Disable with
13558 --disable-werror. Add -Wdeclaration-after-statement
13559 Wpointer-arith and -Wformat-nonliteral to warning flags.
13560 * configure: Regenerate.
13562 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13564 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13566 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13568 * gdbreplay.c (remote_error): New.
13570 (expect): Use gdbchar. Check for error reading from GDB.
13571 Clarify sync error output.
13572 (play): Check for errors writing to GDB.
13573 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13574 * remote-utils.c (getpkt): Check for errors writing to the remote
13577 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13579 * linux-low.c (linux_wait_1): Move non-debugging code out of
13580 `debug_threads' control.
13582 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13584 * linux-low.c (linux_wait_1): Don't set last_status here.
13585 * server.c (push_event, queue_stop_reply_callback): Assert we're
13586 not pushing a TARGET_WAITKIND_IGNORE event.
13587 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13588 (myresume, handle_target_event): Set the thread's last_resume_kind
13589 and last_status from the target returned status.
13591 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13595 * linux-x86-low.c (update_debug_registers_callback): New.
13596 (i386_dr_low_set_addr): Use it.
13597 (i386_dr_low_get_addr): New.
13598 (i386_dr_low_set_control): Use update_debug_registers_callback.
13599 (i386_dr_low_get_control): New.
13600 (i386_dr_low_get_status): Adjust.
13601 * linux-low.c (linux_stop_lwp): New.
13602 * linux-low.h (linux_stop_lwp): Declare.
13604 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13605 argument instead of a i386_debug_reg_state.
13606 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13607 a i386_debug_reg_state.
13608 (i386_insert_aligned_watchpoint): Adjust.
13609 (i386_remove_aligned_watchpoint): Adjust.
13610 (i386_low_stopped_data_address): Read the debug registers from the
13611 inferior instead of from the mirrors.
13612 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13613 (i386_dr_low_get_addr): Declare.
13614 (i386_dr_low_get_control): Declare.
13615 (i386_dr_low_get_status): Change prototype.
13617 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13618 (i386_dr_low_get_addr): New.
13619 (i386_dr_low_get_control): New.
13620 (i386_dr_low_get_status): Adjust prototype. Return
13622 (i386_initial_stuff): Clear dr_status_mirror and
13624 (i386_get_thread_context): Adjust.
13625 (i386_set_thread_context): Adjust.
13626 (i386_thread_added): Adjust.
13628 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13630 * linux-low.h (linux_thread_area): Delete declaration.
13632 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13634 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13635 after its termination.
13637 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13639 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13640 (gdb_wants_all_stopped): Delete.
13641 (linux_wait_1): Don't call them.
13642 * server.c (handle_v_cont): Tag all threads as want-stopped.
13643 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13644 stopped as "client-wants-stopped".
13646 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13648 * Makefile.in (signals_h): New.
13649 (server_h): Depend on it.
13650 (server.o): Don't depend on $(signals_def).
13651 (signals.o): Depend on $(signals_def).
13653 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13655 * Makefile.in (signals_def): New.
13656 (server_h): Append include/gdb/signals.h and signals_def.
13657 (server.o): Append signals_def.
13659 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13661 * server.c (handle_target_event): Use target_signal_to_host for
13662 resume_info.sig initialization.
13663 * target.h (struct thread_resume) <sig>: New comment.
13665 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13667 * server.c (handle_query): strcpy() the returned string from paddress()
13668 instead of sprintf().
13669 * utils.c (paddress): Return phex_nz().
13671 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13673 * server.c (handle_v_cont): Call mourn_inferior if process
13675 (myresume): Likewise.
13677 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13679 Static tracepoints, and integration with UST.
13681 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13682 * mem-break.c (uninsert_all_breakpoints)
13683 (reinsert_all_breakpoints): New.
13684 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13685 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13686 (gdb_agent_ust_loaded, helper_thread_id)
13687 (gdb_agent_helper_thread_id): New macros.
13688 (struct ipa_sym_addresses): Add addr_ust_loaded,
13689 addr_helper_thread_id, addr_cmd_buf.
13690 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13691 (in_process_agent_loaded_ust): New.
13692 (write_e_ust_not_loaded): New.
13693 (maybe_write_ipa_ust_not_loaded): New.
13694 (struct collect_static_trace_data_action): New.
13695 (enum tracepoint_type) <static_tracepoint>: New.
13696 (struct tracepoint) <handle>: Mention static tracepoints.
13697 (struct static_tracepoint_ctx): New.
13698 (CMD_BUF_SIZE): New.
13699 (add_tracepoint_action): Handle static tracepoint actions.
13700 (unprobe_marker_at): New.
13701 (clear_installed_tracepoints): Handle static tracepoints.
13702 (cmd_qtdp): Handle static tracepoints.
13703 (probe_marker_at): New.
13704 (cmd_qtstart): Handle static tracepoints.
13705 (response_tracepoint): Handle static tracepoints.
13706 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13707 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13708 (get_context_regcache): Handle static tracepoints.
13709 (do_action_at_tracepoint): Handle static tracepoint actions.
13710 (traceframe_find_block_type): Handle static trace data blocks.
13711 (traceframe_read_sdata): New.
13712 (download_tracepoints): Download static tracepoint actions.
13713 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13714 (GDB_PROBE_NAME): New.
13716 (GET_UST_SYM): New.
13719 (ust_marker_to_static_tracepoint): New.
13721 (collect_ust_data_at_tracepoint): New.
13722 (gdb_ust_probe): New.
13723 (UNIX_PATH_MAX, SOCK_DIR): New.
13724 (gdb_ust_connect_sync_socket): New.
13725 (resume_thread, stop_thread): New.
13726 (run_inferior_command): New.
13727 (init_named_socket): New.
13728 (gdb_ust_socket_init): New.
13729 (cstr_to_hexstr): New.
13731 (first_marker, next_marker): New.
13732 (response_ust_marker): New.
13733 (cmd_qtfstm, cmd_qtsstm): New.
13734 (unprobe_marker_at, probe_marker_at): New.
13735 (cmd_qtstmat, gdb_ust_thread): New.
13736 (gdb_ust_init): New.
13737 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13738 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13739 (ST_REGENTRY): New.
13740 (x86_64_st_collect_regmap): New.
13741 (X86_64_NUM_ST_COLLECT_GREGS): New.
13742 (AMD64_RIP_REGNUM): New.
13743 (supply_static_tracepoint_registers): New.
13744 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13745 (ST_REGENTRY): New.
13746 (i386_st_collect_regmap): New.
13747 (i386_NUM_ST_COLLECT_GREGS): New.
13748 (supply_static_tracepoint_registers): New.
13749 * server.c (handle_query): Handle qXfer:statictrace:read.
13750 <qSupported>: Report support for StaticTracepoints, and
13751 qXfer:statictrace:read features.
13752 * server.h (traceframe_read_sdata)
13753 (supply_static_tracepoint_registers): Declare.
13754 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13755 (unpack_varlen_hex): Include in IPA build.
13756 * Makefile.in (ustlibs, ustinc): New.
13757 (IPA_OBJS): Add remote-utils-ipa.o.
13758 ($(IPA_LIB)): Link -ldl and -lpthread.
13760 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13761 * config.in, configure: Regenerate.
13763 2010-06-20 Ian Lance Taylor <iant@google.com>
13764 Pedro Alves <pedro@codesourcery.com>
13766 * linux-x86-low.c (always_true): Delete.
13767 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13768 trying to fool the compiler with always_true.
13770 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13772 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13773 conditions in gdbserver.
13775 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13777 * spu-low.c (spu_read_memory): Wrap around local store limit.
13778 (spu_write_memory): Likewise.
13780 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13782 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13783 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13785 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13787 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13788 uses with LONGEST uses.
13790 2010-06-14 Stan Shebs <stan@codesourcery.com>
13791 Pedro Alves <pedro@codesourcery.com>
13795 * linux-x86-low.c: Include limits.h.
13797 (always_true): New.
13800 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13801 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13802 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13803 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13804 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13805 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13806 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13807 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13808 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13809 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13810 (amd64_emit_void_call_2): New.
13811 (amd64_emit_ops): New.
13812 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13813 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13814 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13815 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13816 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13817 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13818 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13819 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13820 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13821 (i386_emit_stack_adjust, i386_emit_int_call_1)
13822 (i386_emit_void_call_2): New.
13823 (i386_emit_ops): New.
13824 (x86_emit_ops): New.
13825 (the_low_target): Install x86_emit_ops.
13826 * server.h (struct emit_ops): New.
13827 (get_raw_reg_func_addr): Declare.
13828 (current_insn_ptr, emit_error): Declare.
13829 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13830 (set_trace_state_variable_value): New defines.
13831 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13832 addr_get_trace_state_variable_value and
13833 addr_set_trace_state_variable_value.
13834 (symbol_list): New fields for get_raw_reg,
13835 get_trace_state_variable_value and set_trace_state_variable_value.
13836 (condfn): New typedef.
13837 (struct tracepoint): New field `compiled_cond'.
13838 (do_action_at_tracepoint): Clear compiled_cond.
13839 (get_trace_state_variable_value, set_trace_state_variable_value):
13841 (condition_true_at_tracepoint): If there's a compiled condition,
13843 (current_insn_ptr, emit_error): New globals.
13844 (struct bytecode_address): New.
13845 (get_raw_reg_func_addr): New.
13846 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13847 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13848 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13849 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13850 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13851 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13852 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13853 (compile_tracepoint_condition, compile_bytecodes): New.
13854 * target.h (emit_ops): Forward declare.
13855 (struct target_ops): New field emit_ops.
13856 (target_emit_ops): New.
13857 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13858 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13859 * linux-low.c (linux_emit_ops): New.
13860 (linux_target_ops): Install it.
13861 * linux-low.h (struct linux_target_ops): New field emit_ops.
13863 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13865 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13866 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13868 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13869 Stan Shebs <stan@codesourcery.com>
13871 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13872 (all): Depend on $(extra_libraries).
13873 (install-only): Install the IPA.
13874 (IPA_OBJS, IPA_LIB): New.
13875 (clean): Remove the IPA lib.
13876 (IPAGENT_CFLAGS): New.
13877 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13878 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13879 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13880 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13881 * configure.ac: Check for atomic builtins support in the compiler.
13882 (IPA_DEPFILES, extra_libraries): Define.
13883 * configure.srv (ipa_obj): Add description.
13884 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13885 (i[34567]86-*-linux*): Set ipa_obj.
13886 (x86_64-*-linux*): Set ipa_obj.
13887 * linux-low.c (stabilizing_threads): New.
13888 (supports_fast_tracepoints): New.
13889 (linux_detach): Stabilize threads before detaching.
13890 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13891 the lwp is either not stabilizing, or is moving out of a jump pad.
13892 (linux_fast_tracepoint_collecting): New.
13893 (maybe_move_out_of_jump_pad): New.
13894 (enqueue_one_deferred_signal): New.
13895 (dequeue_one_deferred_signal): New.
13896 (linux_wait_for_event_1): If moving out of a jump pad, defer
13897 pending signals to later.
13898 (linux_stabilize_threads): New.
13899 (linux_wait_1): Check if threads need moving out of jump pads, and
13901 (stuck_in_jump_pad_callback): New.
13902 (move_out_of_jump_pad_callback): New.
13903 (lwp_running): New.
13904 (linux_resume_one_lwp): Handle moving out of jump pads.
13905 (linux_set_resume_request): Dequeue deferred signals.
13906 (need_step_over_p): Also step over fast tracepoint jumps.
13907 (start_step_over): Also uninsert fast tracepoint jumps.
13908 (finish_step_over): Also reinsert fast tracepoint jumps.
13909 (linux_install_fast_tracepoint_jump): New.
13910 (linux_target_ops): Install linux_stabilize_threads and
13911 linux_install_fast_tracepoint_jump_pad.
13912 * linux-low.h (linux_target_ops) <get_thread_area,
13913 install_fast_tracepoint_jump_pad>: New fields.
13914 (struct lwp_info) <collecting_fast_tracepoint,
13915 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13916 (linux_get_thread_area): Declare.
13917 * linux-x86-low.c (jump_insn): New.
13918 (x86_get_thread_area): New.
13919 (append_insns): New.
13920 (push_opcode): New.
13921 (amd64_install_fast_tracepoint_jump_pad): New.
13922 (i386_install_fast_tracepoint_jump_pad): New.
13923 (x86_install_fast_tracepoint_jump_pad): New.
13924 (the_low_target): Install x86_get_thread_area and
13925 x86_install_fast_tracepoint_jump_pad.
13926 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13927 (struct fast_tracepoint_jump): New.
13928 (fast_tracepoint_jump_insn): New.
13929 (fast_tracepoint_jump_shadow): New.
13930 (find_fast_tracepoint_jump_at): New.
13931 (fast_tracepoint_jump_here): New.
13932 (delete_fast_tracepoint_jump): New.
13933 (set_fast_tracepoint_jump): New.
13934 (uninsert_fast_tracepoint_jumps_at): New.
13935 (reinsert_fast_tracepoint_jumps_at): New.
13936 (set_breakpoint_at): Use write_inferior_memory.
13937 (uninsert_raw_breakpoint): Use write_inferior_memory.
13938 (check_mem_read): Mask out fast tracepoint jumps.
13939 (check_mem_write): Mask out fast tracepoint jumps.
13940 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13941 (set_fast_tracepoint_jump): Declare.
13942 (delete_fast_tracepoint_jump)
13943 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13944 (reinsert_fast_tracepoint_jumps_at): Declare.
13945 * regcache.c: Don't compile many functions when building the
13946 in-process agent library.
13947 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13948 the register buffer in the heap.
13949 (free_register_cache): If the register buffer isn't owned by the
13950 regcache, don't free it.
13951 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13952 pre-existing register caches.
13953 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13955 (convert_ascii_to_int): : Constify `from' parameter type.
13956 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13957 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13958 the needed buffer in-place.
13959 (relocate_instruction): New.
13960 * server.c (handle_query) <qSymbols>: If the target supports
13961 tracepoints, give it a chance of looking up symbols. Report
13962 support for fast tracepoints.
13963 (handle_status): Stabilize threads.
13964 (process_serial_event): Adjust.
13965 * server.h (struct fast_tracepoint_jump): Forward declare.
13966 (struct process_info) <fast_tracepoint_jumps>: New field.
13967 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13968 (decode_X_packet, decode_M_packet): Adjust.
13969 (relocate_instruction): Declare.
13970 (in_process_agent_loaded): Declare.
13971 (tracepoint_look_up_symbols): Declare.
13972 (struct fast_tpoint_collect_status): Declare.
13973 (fast_tracepoint_collecting): Declare.
13974 (force_unlock_trace_buffer): Declare.
13975 (handle_tracepoint_bkpts): Declare.
13976 (initialize_low_tracepoint)
13977 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13978 * target.h (struct target_ops) <stabilize_threads,
13979 install_fast_tracepoint_jump_pad>: New fields.
13980 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13981 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13982 [HAVE_STDINT_H]: Include stdint.h.
13983 (trace_debug_1): Rename to ...
13984 (trace_vdebug): ... this.
13985 (trace_debug): Rename to ...
13986 (trace_debug_1): ... this. Add `level' parameter.
13987 (trace_debug): New.
13988 (ATTR_USED, ATTR_NOINLINE): New.
13989 (IP_AGENT_EXPORT): New.
13990 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13991 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13992 (about_to_request_buffer_space, trace_buffer_is_full)
13993 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13994 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13995 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13996 (traceframe_write_count, traceframes_created)
13997 (trace_state_variables)
13998 New renaming defines.
13999 (struct ipa_sym_addresses): New.
14000 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14001 (symbol_list): New.
14002 (ipa_sym_addrs): New.
14003 (all_tracepoint_symbols_looked_up): New.
14004 (in_process_agent_loaded): New.
14005 (write_e_ipa_not_loaded): New.
14006 (maybe_write_ipa_not_loaded): New.
14007 (tracepoint_look_up_symbols): New.
14008 (debug_threads) [IN_PROCESS_AGENT]: New.
14009 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14010 (UNKNOWN_SIDE_EFFECTS): New.
14011 (stop_tracing): New.
14012 (flush_trace_buffer): New.
14013 (stop_tracing_bkpt): New.
14014 (flush_trace_buffer_bkpt): New.
14015 (read_inferior_integer): New.
14016 (read_inferior_uinteger): New.
14017 (read_inferior_data_pointer): New.
14018 (write_inferior_data_pointer): New.
14019 (write_inferior_integer): New.
14020 (write_inferior_uinteger): New.
14021 (struct collect_static_trace_data_action): Delete.
14022 (enum tracepoint_type): New.
14023 (struct tracepoint) <type>: New field `type'.
14024 <actions_str, step_actions, step_actions_str>: Only include in
14026 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14027 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14028 (tracepoints): Use IP_AGENT_EXPORT.
14029 (last_tracepoint): Don't include in the IPA.
14030 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14031 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14032 (alloced_trace_state_variables): New.
14033 (trace_state_variables): Use IP_AGENT_EXPORT.
14034 (traceframe_t): Delete unused variable.
14035 (circular_trace_buffer): Don't include in the IPA.
14036 (trace_buffer_start): Delete.
14037 (struct trace_buffer_control): New.
14038 (trace_buffer_free): Delete.
14039 (struct ipa_trace_buffer_control): New.
14040 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14041 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14043 (trace_buffer_ctrl): New.
14044 (TRACE_BUFFER_CTRL_CURR): New.
14045 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14046 Reimplement as macros.
14047 (trace_buffer_wrap): Delete.
14048 (traceframe_write_count, traceframe_read_count)
14049 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14050 (struct tracepoint_hit_ctx) <type>: New field.
14051 (struct fast_tracepoint_ctx): New.
14052 (memory_barrier): New.
14054 (record_tracepoint_error): Update atomically in the IPA.
14055 (clear_inferior_trace_buffer): New.
14056 (about_to_request_buffer_space): New.
14057 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14058 updating the same buffer.
14059 (add_tracepoint): Default the tracepoint's type to trap
14060 tracepoint, and orig_size to -1.
14061 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14062 internal variables.
14063 (create_trace_state_variable): New parameter `gdb'. Handle it.
14064 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14065 (cmd_qtdp): Handle fast tracepoints.
14066 (cmd_qtdv): Adjust.
14067 (max_jump_pad_size): New.
14068 (gdb_jump_pad_head): New.
14069 (get_jump_space_head): New.
14070 (claim_jump_space): New.
14071 (sort_tracepoints): New.
14072 (MAX_JUMP_SIZE): New.
14073 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14075 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14076 support. Upload fast traceframes, and delete internal IPA
14078 (stop_tracing_handler): New.
14079 (flush_trace_buffer_handler): New.
14080 (cmd_qtstop): Upload fast tracepoints.
14081 (response_tracepoint): Handle fast tracepoints.
14082 (tracepoint_finished_step): Upload fast traceframes. Set the
14083 tracepoint hit context's tracepoint type.
14084 (handle_tracepoint_bkpts): New.
14085 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14086 type. Add comment about fast tracepoints.
14087 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14088 non-existing action_str field.
14089 (get_context_regcache): Handle fast tracepoints.
14090 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14092 (fast_tracepoint_from_jump_pad_address): New.
14093 (fast_tracepoint_from_ipa_tpoint_address): New.
14094 (collecting_t): New.
14095 (force_unlock_trace_buffer): New.
14096 (fast_tracepoint_collecting): New.
14098 (gdb_collect): New.
14099 (write_inferior_data_ptr): New.
14100 (target_tp_heap): New.
14101 (target_malloc): New.
14102 (download_agent_expr): New.
14104 (download_tracepoints): New.
14105 (download_trace_state_variables): New.
14106 (upload_fast_traceframes): New.
14107 (IPA_FIRST_TRACEFRAME): New.
14108 (IPA_NEXT_TRACEFRAME_1): New.
14109 (IPA_NEXT_TRACEFRAME): New.
14110 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14111 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14112 (gdb_jump_pad_buffer_end): New.
14113 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14114 (initialize_tracepoint): Adjust.
14115 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14116 buffer. Initialize the low module.
14117 * utils.c (PREFIX, TOOLNAME): New.
14118 (malloc_failure): Use PREFIX.
14119 (error): In the IPA, an error causes an exit.
14120 (fatal, warning): Use PREFIX.
14121 (internal_error): Use TOOLNAME.
14122 (NUMCELLS): Increase to 10.
14123 * configure, config.in: Regenerate.
14125 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14127 * server.c (handle_query) <qSupported>: Do two passes over the
14128 qSupported string to avoid nesting strtok.
14130 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14132 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14134 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14135 -Wl,--dynamic-list.
14136 * configure: Regenerate.
14137 * proc-service.list: New.
14139 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14141 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14144 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14146 * gdbreplay.c (remote_open): Check error return from socket() call by
14147 its equality to -1 not by it being negative.
14148 * remote-utils.c (remote_open): Likewise.
14150 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14152 * config.h: Regenerate.
14154 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14156 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14157 doesn't provide PTRACE_GET_THREAD_AREA.
14159 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14161 * linux-m68k-low.c: Include <asm/ptrace.h>
14162 (ps_get_thread_area): Implement.
14164 2010-05-03 Doug Evans <dje@google.com>
14166 * event-loop.c (struct callback_event): New struct.
14167 (callback_list): New global.
14168 (append_callback_event, delete_callback_event): New functions.
14169 (process_callback): New function.
14170 (start_event_loop): Call it.
14171 * remote-utils.c (NOT_SCHEDULED): Define.
14172 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14173 moved out of readchar.
14174 (readchar): Rewrite. Call reschedule before returning.
14175 (reset_readchar): New function.
14176 (remote_close): Call it.
14177 (process_remaining, reschedule): New functions.
14178 * server.h (callback_handler_func): New typedef.
14179 (append_callback_event, delete_callback_event): Declare.
14181 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14183 * proc-service.c (ps_pglobal_lookup): Use
14184 thread_db_look_up_one_symbol.
14185 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14186 parameter. Use it instead of all_symbols_looked_up.
14187 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14189 (all_symbols_looked_up): Don't declare.
14190 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14191 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14193 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14194 Set all_symbols_looked_up here.
14195 (thread_db_look_up_one_symbol): New.
14196 (thread_db_get_tls_address): Adjust.
14197 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14198 thread_db object on the heap, and tentatively set it in the
14200 (thread_db_init): Don't set all_symbols_looked_up here.
14201 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14203 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14205 * linux-low.c (linux_kill, linux_detach): Adjust.
14206 (status_pending_p_callback): Remove redundant statement. Check
14207 for !TARGET_WAITIKIND_IGNORE, instead of
14208 TARGET_WAITKIND_STOPPED.
14209 (handle_tracepoints): Make sure LWP is locked. Adjust.
14210 (linux_wait_for_event_1): Adjust.
14211 (linux_cancel_breakpoints): New.
14212 (unsuspend_one_lwp): New.
14213 (unsuspend_all_lwps): New.
14214 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14215 (send_sigstop_callback): Change return type to int, add new
14216 `except' parameter and handle it.
14217 (suspend_and_send_sigstop_callback): New.
14218 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14219 pass them down. If SUSPEND, also increment the lwp's suspend
14221 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14222 (need_step_over_p): Don't consider suspended LWPs.
14223 (start_step_over): Adjust.
14224 (proceed_one_lwp): Change return type to int, add new `except'
14225 parameter and handle it.
14226 (unsuspend_and_proceed_one_lwp): New.
14227 (proceed_all_lwps): Use find_inferior instead of
14229 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14230 also decrement the suspend count of LWPs. Pass `except' down,
14231 instead of hacking its suspend count.
14232 (linux_pause_all): Add `freeze' parameter. Adjust.
14233 (linux_unpause_all): New.
14234 (linux_target_ops): Install linux_unpause_all.
14235 * server.c (handle_status): Adjust.
14236 * target.h (struct target_ops): New fields `unpause_all' and
14237 `cancel_breakpoints'. Add new parameter to `pause_all'.
14238 (pause_all): Add new `freeze' parameter.
14239 (unpause_all): New.
14240 (cancel_breakpoints): New.
14241 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14242 cancel breakpoints.
14243 (cmd_qtstart): Pause threads.
14244 (stop_tracing): Pause threads, and cancel breakpoints.
14245 * win32-low.c (win32_target_ops): Adjust.
14247 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14249 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14250 the inferior right away from here...
14251 (linux_wait_1): ... to here, and adjust to check the thread's
14252 last_resume_kind instead of the lwp's step or stop_expected flags.
14254 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14256 * README: Use consistent `GDB' and `GDBserver' spellings.
14258 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14260 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14261 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14262 (linux_detach_one_lwp): Assume the lwp is stopped.
14263 (any_thread_of): Delete.
14264 (linux_detach): Stop all lwps here. Don't blindly delete all
14266 (delete_lwp_callback): New.
14267 (linux_mourn): Delete all lwps of the process that is gone.
14268 (linux_wait_1): Don't delete the last lwp of the process here.
14269 * mem-break.h (mark_breakpoints_out): Declare.
14270 * mem-break.c (mark_breakpoints_out): New.
14271 (free_all_breakpoints): Use it.
14272 * server.c (handle_target_event): If the process is gone, mark
14274 * thread-db.c (struct thread_db) <create_bp>: New field.
14275 (thread_db_enable_reporting): Fix prototype. Store a thread event
14276 breakpoint reference in the thread_db struct.
14277 (thread_db_load_search): Clear the thread_db object.
14278 (try_thread_db_load_1): Ditto.
14279 (switch_to_process): New.
14280 (disable_thread_event_reporting): Use it.
14281 (remove_thread_event_breakpoints): New.
14282 (thread_db_detach, thread_db_mourn): Use it.
14284 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14286 * linux-low.c (linux_enable_event_reporting): New.
14287 (linux_wait_for_event_1, handle_extended_wait): Use it.
14289 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14291 * linux-low.c (linux_kill_one_lwp, linux_kill)
14292 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14293 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14294 SIGSTOP even if the LWP is stopped.
14295 (send_sigstop_callback): New.
14296 (stop_all_lwps): Use send_sigstop_callback instead.
14297 (linux_resume_one_thread): Adjust.
14298 (proceed_one_lwp): Still proceed an LWP that the client has
14299 requested to stop, if we haven't reported it as stopped yet. Make
14300 sure that LWPs the client want stopped, have a pending SIGSTOP.
14302 2010-04-26 Doug Evans <dje@google.com>
14304 * server.c (handle_general_set): Make static.
14306 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14307 Print received char after testing for error/eof instead of before.
14308 (input_interrupt): Tweak comment.
14310 2010-04-23 Doug Evans <dje@google.com>
14312 * server.c (start_inferior): Print inferior argv if --debug.
14314 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14316 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14317 * nto-x86-low.c: Include server.h
14319 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14321 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14322 be consistent with other sources of this directory.
14323 (init_registers_amd64): Correct name of source file of this function
14326 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14328 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14329 64-bit executables.
14331 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14333 * win32-i386-low.c: Add 64-bit support.
14334 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14335 (init_registers_amd64): Declare.
14336 (mappings): Add 64-bit version of array.
14337 (init_windows_x86): New function.
14338 (the_low_target): Change init_arch field to init_windows_x86.
14340 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14342 * win32-low.c: Adapt to support also 64-bit architecture.
14343 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14344 (get_image_name): Use SIZE_T type for local variable `done'.
14345 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14346 (toolhelp_get_dll_name): Idem.
14347 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14348 Use uintptr_t typecast to avoid warning.
14349 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14350 (handle_exception): Use phex_nz to avoid warning.
14351 (win32_wait): Remove unused local variable `process'.
14353 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14355 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14358 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14360 * configure.ac: Use `ws2_32' library for srv_mingw.
14361 * configure: Regenerate.
14362 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14363 * remote-utils.c: Likewise.
14365 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14367 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14368 if __x86_64__ is defined.
14370 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14372 * configure: Regenerate.
14374 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14376 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14377 * target.h (target_ops): New get_tib_address field.
14378 * win32-low.h (win32_thread_info): Add thread_local_base field.
14379 * win32-low.c (child_add_thread): Add tlb argument.
14380 Set thread_local_base field to TLB.
14381 (get_child_debug_event): Adapt to child_add_thread change.
14382 (win32_get_tib_address): New function.
14383 (win32_target_ops): Set get_tib_address field to
14384 win32_get_tib_address.
14385 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14387 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14389 * linux-low.c (linux_mourn): Also remove the process.
14390 * server.c (handle_target_event): Don't remove the process here.
14391 * nto-low.c (nto_mourn): New.
14392 (nto_target_ops): Install it.
14393 * spu-low.c (spu_mourn): New.
14394 (spu_target_ops): Install it.
14395 * win32-low.c (win32_mourn): New.
14396 (win32_target_ops): Install it.
14398 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14400 * server.h (buffer_xml_printf): Remove redundant `;'.
14402 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14404 * regcache.c (set_register_cache): Invalidate regcaches before
14405 changing the register cache layout.
14406 (regcache_invalidate_one): Allow a NULL regcache.
14407 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14408 regcaches before changing the register cache layout or the target
14411 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14413 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14414 variable warning on Linux/x86-64.
14416 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14418 GDBserver disconnected tracing support.
14420 * linux-low.c (linux_remove_process): Delete.
14421 (add_lwp): Don't set last_resume_kind here.
14422 (linux_kill): Use `mourn'.
14423 (linux_detach): Use `thread_db_detach', and `mourn'.
14424 (linux_mourn): New.
14425 (linux_attach_lwp_1): Adjust comment.
14426 (linux_attach): last_resume_kind moved the thread_info; adjust.
14427 (status_pending_p_callback): Adjust.
14428 (linux_wait_for_event_1): Adjust.
14429 (count_events_callback, select_singlestep_lwp_callback)
14430 (select_event_lwp_callback, cancel_breakpoints_callback)
14431 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14432 (proceed_one_lwp): Adjust.
14433 (linux_async): Add debug output.
14434 (linux_thread_stopped): New.
14435 (linux_pause_all): New.
14436 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14438 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14439 (thread_db_free): Delete declaration.
14440 (thread_db_detach, thread_db_mourn): Declare.
14441 * thread-db.c (thread_db_init): Use thread_db_mourn.
14442 (thread_db_free): Delete, split in two.
14443 (disable_thread_event_reporting): New.
14444 (thread_db_detach): New.
14445 (thread_db_mourn): New.
14447 * server.h (struct thread_info) <last_resume_kind>: New field.
14448 <attached>: Add comment.
14449 <gdb_detached>: New field.
14450 (handler_func): Change return type to int.
14451 (handle_serial_event, handle_target_event): Ditto.
14452 (gdb_connected): Declare.
14454 (disconnected_tracing): Declare.
14455 (stop_tracing): Declare.
14457 * server.c (handle_query) <qSupported>: Report support for
14458 disconnected tracing.
14459 (queue_stop_reply_callback): Account for running threads.
14460 (gdb_wants_thread_stopped): New.
14461 (gdb_wants_all_threads_stopped): New.
14462 (gdb_reattached_process): New.
14463 (handle_status): Clear the `gdb_detached' flag of all processes.
14464 In all-stop, stop all threads.
14465 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14466 (process_serial_event): If the remote connection breaks, or if an
14467 exit was forced with "monitor exit", force an event loop exit.
14468 Handle disconnected tracing on detach.
14469 (handle_serial_event): Adjust.
14470 (handle_target_event): If GDB isn't connected, forward events back
14471 to the inferior, unless the last process exited, in which case,
14472 exit gdbserver. Adjust interface.
14474 * remote-utils.c (remote_open): Don't block in accept. Instead
14475 register an event loop source on the listen socket file
14476 descriptor. Refactor bits into ...
14477 (listen_desc): ... this new global.
14478 (gdb_connected): ... this new function.
14479 (enable_async_notification): ... this new function.
14480 (handle_accept_event): ... this new function.
14481 (remote_close): Clear remote_desc.
14483 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14485 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14487 (mourn_inferior): Define.
14488 (target_process_qsupported): Avoid the dangling else problem.
14489 (thread_stopped): Define.
14490 (pause_all): Define.
14491 (target_waitstatus_to_string): Declare.
14492 * target.c (target_waitstatus_to_string): New.
14494 * tracepoint.c (tracing): Make extern.
14495 (disconnected_tracing): New.
14496 (stop_tracing): Make extern. Handle tracing stops due to GDB
14498 (cmd_qtdisconnected): New.
14499 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14500 (handle_tracepoint_general_set): Handle QTDisconnected.
14502 * event-loop.c (event_handler_func): Change return type to int.
14503 (process_event): Bail out if the event handler wants the event
14505 (handle_file_event): Ditto.
14506 (start_event_loop): Bail out if the event handler wants the event
14509 * nto-low.c (nto_target_ops): Adjust.
14510 * spu-low.c (spu_wait): Don't remove the process here.
14511 (spu_target_ops): Adjust.
14512 * win32-low.c (win32_wait): Don't remove the process here.
14513 (win32_target_ops): Adjust.
14515 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14517 * regcache.c (realloc_register_cache): Invalidate inferior's
14518 regcache before recreating it.
14520 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14522 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14524 2010-04-09 Stan Shebs <stan@codesourcery.com>
14525 Pedro Alves <pedro@codesourcery.com>
14527 * server.h (LONGEST): New.
14528 (struct thread_info) <while_stepping>: New field.
14529 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14531 (initialize_tracepoint, handle_tracepoint_general_set)
14532 (handle_tracepoint_query, tracepoint_finished_step)
14533 (tracepoint_was_hit, release_while_stepping_state_list):
14534 (current_traceframe): Declare.
14535 * server.c (handle_general_set): Handle tracepoint packets.
14536 (read_memory): New.
14537 (write_memory): New.
14538 (handle_search_memory_1): Use read_memory.
14539 (handle_query): Report support for conditional tracepoints, trace
14540 state variables, and tracepoint sources. Handle tracepoint
14542 (main): Initialize the tracepoints module.
14543 (process_serial_event): Handle traceframe reads/writes.
14545 * linux-low.c (handle_tracepoints): New.
14546 (linux_wait_1): Call it.
14547 (linux_resume_one_lwp): Handle while-stepping.
14548 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14549 (linux_target_ops): Install them.
14550 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14552 * linux-x86-low.c (x86_supports_tracepoints): New.
14553 (the_low_target). Install it.
14555 * mem-break.h (delete_breakpoint): Declare.
14556 * mem-break.c (delete_breakpoint): Make external.
14558 * target.h (struct target_ops): Add `supports_tracepoints',
14559 `read_pc', and `write_pc' fields.
14560 (target_supports_tracepoints): Define.
14561 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14564 * regcache.h (struct regcache) <registers_owned>: New field.
14565 (init_register_cache, regcache_cpy): Declare.
14566 (regcache_read_pc, regcache_write_pc): Declare.
14567 (register_cache_size): Declare.
14568 (supply_regblock): Declare.
14569 * regcache.c (init_register_cache): New.
14570 (new_register_cache): Use it.
14571 (regcache_cpy): New.
14572 (register_cache_size): New.
14573 (supply_regblock): New.
14574 (regcache_read_pc, regcache_write_pc): New.
14576 * tracepoint.c: New.
14578 * Makefile.in (OBS): Add tracepoint.o.
14579 (tracepoint.o): New rule.
14581 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14583 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14585 (i386-mmx.c): Likewise.
14586 (i386-mmx-linux.o): Likewise.
14587 (i386-mmx-linux.c): Likewise.
14589 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14590 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14591 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14592 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14594 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14595 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14596 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14598 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14600 * Makefile.in (clean): Updated.
14602 (i386-avx.c): Likewise.
14603 (i386-avx-linux.o): Likewise.
14604 (i386-avx-linux.c): Likewise.
14605 (amd64-avx.o): Likewise.
14606 (amd64-avx.c): Likewise.
14607 (amd64-avx-linux.o): Likewise.
14608 (amd64-avx-linux.c): Likewise.
14610 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14611 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14612 (srv_amd64_regobj): Add amd64-avx.o.
14613 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14614 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14615 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14616 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14617 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14618 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14619 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14621 * i387-fp.c: Include "i386-xstate.h".
14623 (i387_cache_to_xsave): Likewise.
14624 (i387_xsave_to_cache): Likewise.
14625 (x86_xcr0): Likewise.
14627 * i387-fp.h (i387_cache_to_xsave): Likewise.
14628 (i387_xsave_to_cache): Likewise.
14629 (x86_xcr0): Likewise.
14631 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14632 * linux-crisv32-low.c (target_regsets): Likewise.
14633 * linux-m68k-low.c (target_regsets): Likewise.
14634 * linux-mips-low.c (target_regsets): Likewise.
14635 * linux-ppc-low.c (target_regsets): Likewise.
14636 * linux-s390-low.c (target_regsets): Likewise.
14637 * linux-sh-low.c (target_regsets): Likewise.
14638 * linux-sparc-low.c (target_regsets): Likewise.
14639 * linux-xtensa-low.c (target_regsets): Likewise.
14641 * linux-low.c: Include <sys/uio.h>.
14642 (regsets_fetch_inferior_registers): Support nt_type.
14643 (regsets_store_inferior_registers): Likewise.
14644 (linux_process_qsupported): New.
14645 (linux_target_ops): Add linux_process_qsupported.
14647 * linux-low.h (regset_info): Add nt_type.
14648 (linux_target_ops): Add process_qsupported.
14650 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14652 (init_registers_i386_avx_linux): New.
14653 (init_registers_amd64_avx_linux): Likewise.
14654 (xmltarget_i386_linux_no_xml): Likewise.
14655 (xmltarget_amd64_linux_no_xml): Likewise.
14656 (PTRACE_GETREGSET): Likewise.
14657 (PTRACE_SETREGSET): Likewise.
14658 (x86_fill_xstateregset): Likewise.
14659 (x86_store_xstateregset): Likewise.
14660 (use_xml): Likewise.
14661 (x86_linux_update_xmltarget): Likewise.
14662 (x86_linux_process_qsupported): Likewise.
14663 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14664 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14665 init_registers_i386_linux here. Call
14666 x86_linux_update_xmltarget.
14667 (the_low_target): Add x86_linux_process_qsupported.
14669 * server.c (handle_query): Call target_process_qsupported.
14671 * target.h (target_ops): Add process_qsupported.
14672 (target_process_qsupported): New.
14674 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14676 * inferiors.c (add_thread): Set last_status kind to
14677 TARGET_WAITKIND_IGNORE.
14678 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14679 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14680 (linux_wait_1): Move `thread' local definition to block that uses
14681 it. Don't NULL initialize `event_child'.
14682 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14683 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14684 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14686 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14688 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14689 an extended waitstatus, or by a watchpoint.
14690 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14691 thread was stepping or has been stopped by a watchpoint.
14693 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14695 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14696 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14697 of another, then delete the previous, and validate all
14699 (validate_inserted_breakpoint): New.
14700 (delete_disabled_breakpoints): New.
14701 (validate_breakpoints): New.
14702 (check_mem_read): Validate breakpoints before trusting their
14703 shadow. Delete disabled breakpoints.
14704 (check_mem_write): Validate breakpoints before trusting they
14705 should be inserted. Delete disabled breakpoints.
14706 * mem-break.h (validate_breakpoints):
14707 * server.c (handle_query): Validate breakpoints when we see a
14710 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14712 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14713 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14714 if we could tell there's a GDB breakpoint at stop_pc.
14715 (need_step_over_p): Don't do a step over if we find a GDB
14716 breakpoint at the resume PC.
14718 * mem-break.c (struct raw_breakpoint): New.
14719 (enum bkpt_type): New type `gdb_breakpoint'.
14720 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14721 fields. New field `raw'.
14722 (find_raw_breakpoint_at): New.
14723 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14724 breakpoint instead.
14725 (set_breakpoint_at): Adjust.
14726 (delete_raw_breakpoint): New.
14727 (release_breakpoint): New.
14728 (delete_breakpoint): Rename to...
14729 (delete_breakpoint_1): ... this. Add proc parameter. Use
14730 release_breakpoint. Return ENOENT.
14731 (delete_breakpoint): Reimplement.
14732 (find_breakpoint_at): Delete.
14733 (find_gdb_breakpoint_at): New.
14734 (delete_breakpoint_at): Delete.
14735 (set_gdb_breakpoint_at): New.
14736 (delete_gdb_breakpoint_at): New.
14737 (gdb_breakpoint_here): New.
14738 (set_reinsert_breakpoint): Use release_breakpoint.
14739 (uninsert_breakpoint): Rename to ...
14740 (uninsert_raw_breakpoint): ... this.
14741 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14742 (reinsert_raw_breakpoint): Change parameter type to
14744 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14746 (check_breakpoints): Adjust. Use release_breakpoint.
14747 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14748 (breakpoint_inserted_here): Ditto.
14749 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14750 Don't trust the breakpoint's shadow if it is not inserted.
14751 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14752 (delete_all_breakpoints): Adjust.
14753 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14754 use delete_breakpoint_1.
14756 * mem-break.h (breakpoints_supported): Delete declaration.
14757 (set_gdb_breakpoint_at): Declare.
14758 (gdb_breakpoint_here): Declare.
14759 (delete_breakpoint_at): Delete.
14760 (delete_gdb_breakpoint_at): Declare.
14762 * server.h (struct raw_breakpoint): Forward declare.
14763 (struct process_info): New field `raw_breakpoints'.
14765 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14768 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14770 * linux-low.c (status_pending_p_callback): Fix comment.
14771 (linux_wait_for_event_1): Move most of the internal breakpoint
14772 handling from here...
14773 (linux_wait_1): ... to here.
14774 (count_events_callback): New.
14775 (select_singlestep_lwp_callback): New.
14776 (select_event_lwp_callback): New.
14777 (cancel_breakpoints_callback): New.
14778 (select_event_lwp): New.
14779 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14780 priority to all LWPs that have had events that should be reported
14781 to the client. Cancel breakpoints when about to reporting the
14782 event to the client, not while stopping lwps. No longer cancel
14783 finished single-steps here.
14784 (cancel_finished_single_step): Delete.
14785 (cancel_finished_single_steps): Delete.
14787 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14789 * mem-break.c (enum bkpt_type): New.
14790 (struct breakpoint): New field `type'.
14791 (set_breakpoint_at): Change return type to struct breakpoint
14792 pointer. Set type to `other_breakpoint' by default.
14793 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14794 in the breakpoint list.
14795 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14796 (reinsert_breakpoint): Rename to ...
14797 (reinsert_raw_breakpoint): ... this.
14798 (reinsert_breakpoints_at): Adjust.
14799 * mem-break.h (struct breakpoint): Declare.
14800 (set_breakpoint_at): Change return type to struct breakpoint
14803 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14805 * server.c (handle_query): Assign, not compare.
14807 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14809 Teach linux gdbserver to step-over-breakpoints.
14811 * linux-low.c (can_hardware_single_step): New.
14812 (supports_breakpoints): New.
14813 (handle_extended_wait): If stopping threads, read the stop pc of
14814 the new cloned LWP.
14816 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14817 low target doesn't support retrieving the PC.
14818 (add_lwp): Set last_resume_kind to resume_continue.
14819 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14820 (linux_attach): Don't clear stop_expected. Set the lwp's
14821 last_resume_kind to resume_stop.
14822 (linux_detach_one_lwp): Don't check for removed breakpoints.
14823 (check_removed_breakpoint): Delete.
14824 (status_pending_p): Rename to ...
14825 (status_pending_p_callback): ... this. Don't check for removed
14826 breakpoints. Don't consider threads that are stopped from GDB's
14828 (linux_wait_for_lwp): Always read the stop_pc here.
14829 (cancel_breakpoint): New.
14830 (step_over_bkpt): New global.
14831 (linux_wait_for_event_1): Implement stepping over breakpoints.
14832 (gdb_wants_lwp_stopped): New.
14833 (gdb_wants_all_stopped): New.
14834 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14835 single-step traps here. Store the thread's last reported target
14837 (send_sigstop): Don't clear stop_expected. Always set it,
14839 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14840 (cancel_finished_single_step): New.
14841 (cancel_finished_single_steps): New.
14842 (wait_for_sigstop): Don't cancel finished single-step traps here.
14843 (linux_resume_one_lwp): Don't check for removed breakpoints.
14844 Don't set `step' on non-hardware step archs.
14845 (linux_set_resume_request): Ignore resume_stop requests if already
14846 stopping or stopped. Set the lwp's last_resume_kind.
14847 (resume_status_pending_p): Don't check for removed breakpoints.
14848 (need_step_over_p): New.
14849 (start_step_over): New.
14850 (finish_step_over): New.
14851 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14852 requests. Clear the thread's last reported target waitstatus.
14853 Don't use the `suspended' flag. Don't consider pending breakpoints.
14854 (linux_resume): Start a step-over if necessary.
14855 (proceed_one_lwp): New.
14856 (proceed_all_lwps): New.
14857 (unstop_all_lwps): New.
14858 * linux-low.h (struct lwp_info): Rewrite comment for the
14859 `suspended' flag. Add the `stop_pc' field. Delete the
14860 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14861 Add `'last_resume_kind' and `need_step_over' fields.
14862 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14863 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14864 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14865 (set_raw_breakpoint_at): New.
14866 (set_breakpoint_at): Rewrite to use it.
14867 (reinsert_breakpoint_handler): Delete.
14868 (set_reinsert_breakpoint): New.
14869 (reinsert_breakpoint_by_bp): Delete.
14870 (delete_reinsert_breakpoints): New.
14871 (uninsert_breakpoint): Rewrite.
14872 (uninsert_breakpoints_at): New.
14873 (reinsert_breakpoint): Rewrite.
14874 (reinsert_breakpoints_at): New.
14875 (check_breakpoints): Rewrite.
14876 (breakpoint_here): New.
14877 (breakpoint_inserted_here): New.
14878 (check_mem_read): Adjust.
14879 * mem-break.h (breakpoints_supported, breakpoint_here)
14880 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14881 (reinsert_breakpoint_by_bp): Delete declaration.
14882 (delete_reinsert_breakpoints): Declare.
14883 (reinsert_breakpoint): Delete declaration.
14884 (reinsert_breakpoints_at): Declare.
14885 (uninsert_breakpoint): Delete declaration.
14886 (uninsert_breakpoints_at): Declare.
14887 (check_breakpoints): Adjust prototype.
14888 * server.h: Adjust include order.
14889 (struct thread_info): Declare here. Add a `last_status' field.
14891 2010-03-23 Michael Snyder <msnyder@vmware.com>
14893 * server.c (crc32): New function.
14894 (handle_query): Add handling for 'qCRC:' request.
14896 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14898 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14899 lwp had been stopped by a watchpoint.
14901 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14903 * server.h (internal_error): Declare.
14904 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14905 * utils.c (internal_error): New function.
14907 2010-03-15 Andreas Schwab <schwab@redhat.com>
14909 * configure.srv: Fix typo setting srv_regobj.
14911 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14913 * linux-low.c (fetch_register): Avoid passing a non string literal
14915 (usr_store_inferior_registers): Ditto.
14917 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14919 * linux-low.c (linux_write_memory): Bail out early if peeking
14922 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14924 * linux-low.h (struct lwp_info): New fields
14925 `stopped_by_watchpoint' and `stopped_data_address'.
14926 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14927 here, and cache them in the lwp object.
14928 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14930 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14932 (linux_stopped_by_watchpoint): Rewrite.
14933 (linux_stopped_data_address): Rewrite.
14935 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14937 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14938 switching the current inferior, not before.
14940 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14942 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14943 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14944 i386-linux.c and amd64-linux.c.
14945 (reg-i386.o): Removed.
14946 (reg-i386.c): Likewise.
14947 (reg-i386-linux.o): Likewise.
14948 (reg-i386-linux.c): Likewise.
14949 (reg-x86-64.o): Likewise.
14950 (reg-x86-64.c): Likewise.
14951 (reg-x86-64-linux.o): Likewise.
14952 (reg-x86-64-linux.c): Likewise.
14954 (i386.c): Likewise.
14955 (i386-linux.o): Likewise.
14956 (i386-linux.c): Likewise.
14957 (amd64.o): Likewise.
14958 (amd64.c): Likewise.
14959 (amd64-linux.o): Likewise.
14960 (amd64-linux.c): Likewise.
14962 * configure.srv (srv_i386_regobj): New.
14963 (srv_i386_linux_regobj): Likewise.
14964 (srv_amd64_regobj): Likewise.
14965 (srv_amd64_linux_regobj): Likewise.
14966 (srv_i386_32bit_xmlfiles): Likewise.
14967 (srv_i386_64bit_xmlfiles): Likewise.
14968 (srv_i386_xmlfiles): Likewise.
14969 (srv_amd64_xmlfiles): Likewise.
14970 (srv_i386_linux_xmlfiles): Likewise.
14971 (srv_amd64_linux_xmlfiles): Likewise.
14972 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14973 srv_xmlfiles to $srv_i386_xmlfiles.
14974 (i[34567]86-*-mingw32ce*): Likewise.
14975 (i[34567]86-*-mingw*): Likewise.
14976 (i[34567]86-*-nto*): Likewise.
14977 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14978 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14979 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14980 (x86_64-*-linux*): Likewise.
14982 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14983 (init_registers_amd64_linux): New.
14984 (x86_arch_setup): Replace init_registers_x86_64_linux with
14985 init_registers_amd64_linux.
14987 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14989 * configure.ac: Check for libdl. If it is not available link against
14990 static libthread_db.
14991 * configure: Regenerate.
14993 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14997 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14998 handing a read watchpoint.
14999 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15001 2010-02-12 Doug Evans <dje@google.com>
15003 * linux-low.c (linux_supports_tracefork_flag): Document.
15004 (linux_look_up_symbols): Add comment.
15006 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15008 * regcache.c (supply_register): Clear regcache if buf is NULL.
15010 2010-02-02 Nicolas Roche <roche@sourceware.org>
15011 Joel Brobecker <brobecker@adacore.com>
15013 * inferiors.c (find_inferior): Add function documentation.
15014 (unloaded_dll): Handle the case where the unloaded dll has not
15015 been previously registered in the dll list.
15017 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15019 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15020 (thumb2_breakpoint): New.
15021 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15023 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15025 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15026 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15029 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15031 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15033 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15035 * linux-s390-low.c (s390_collect_ptrace_register)
15036 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15038 2010-01-21 Doug Evans <dje@google.com>
15040 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15041 (PTRACE_ARG4_TYPE): New macro.
15042 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15043 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15044 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15045 (usr_store_inferior_registers): Ditto.
15046 (linux_read_memory, linux_write_memory): Ditto.
15047 (linux_test_for_tracefork): Ditto.
15049 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15050 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15052 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15054 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15057 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15059 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15060 prototype to take a regcache. Adjust.
15062 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15064 * regcache.h (struct thread_info): Forward declare.
15065 (struct regcache): New.
15066 (new_register_cache): Adjust prototype.
15067 (get_thread_regcache): Declare.
15068 (free_register_cache): Adjust prototype.
15069 (registers_to_string, registers_from_string): Ditto.
15070 (supply_register, supply_register_by_name, collect_register)
15071 (collect_register_as_string, collect_register_by_name): Ditto.
15072 * regcache.c (struct inferior_regcache_data): Delete.
15073 (get_regcache): Rename to ...
15074 (get_thread_regcache): ... this. Adjust. Switch inferior before
15075 fetching registers.
15076 (regcache_invalidate_one): Adjust.
15077 (regcache_invalidate): Fix prototype.
15078 (new_register_cache): Return the new register cache.
15079 (free_register_cache): Change prototype.
15080 (realloc_register_cache): Adjust.
15081 (registers_to_string): Change prototype to take a regcache. Adjust.
15082 (registers_from_string): Ditto.
15083 (register_data): Ditto.
15084 (supply_register): Ditto.
15085 (supply_register_by_name): Ditto.
15086 (collect_register): Ditto.
15087 (collect_register_as_string): Ditto.
15088 (collect_register_by_name): Ditto.
15089 * server.c (process_serial_event): Adjust.
15090 * linux-low.h (regset_fill_func, regset_store_func): Change
15092 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15094 * linux-low.c (get_stop_pc): Adjust.
15095 (check_removed_breakpoint): Adjust.
15096 (linux_wait_for_event): Adjust.
15097 (linux_resume_one_lwp): Adjust.
15098 (fetch_register): Add regcache parameter. Adjust.
15099 (usr_store_inferior_registers): Ditto.
15100 (regsets_fetch_inferior_registers): Ditto.
15101 (regsets_store_inferior_registers): Ditto.
15102 (linux_fetch_registers, linux_store_registers): Ditto.
15103 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15105 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15107 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15108 prototype to take a regcache.
15109 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15110 * remote-utils.c (convert_ascii_to_int, outreg)
15111 (prepare_resume_reply): Change prototype to take a regcache.
15113 * target.h (struct target_ops) <fetch_registers, store_registers>:
15114 Change prototype to take a regcache.
15115 (fetch_inferior_registers, store_inferior_registers): Change
15116 prototype to take a regcache. Adjust.
15117 * proc-service.c (ps_lgetregs): Adjust.
15118 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15119 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15120 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15121 take a regcache. Adjust.
15122 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15123 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15124 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15125 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15126 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15127 (cris_cannot_fetch_register):
15128 (cris_breakpoint_at): Change prototype to take a regcache.
15130 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15131 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15132 to take a regcache. Adjust.
15133 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15135 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15136 take a regcache. Adjust.
15137 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15138 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15139 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15140 * linux-mips-low.c (mips_get_pc):
15141 (mips_set_pc): Change prototype to take a regcache. Adjust.
15142 (mips_reinsert_addr): Adjust.
15143 (mips_collect_register): Change prototype to take a regcache.
15145 (mips_supply_register):
15146 (mips_collect_register_32bit, mips_supply_register_32bit)
15147 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15148 (mips_store_fpregset): Ditto.
15149 * linux-ppc-low.c (ppc_supply_ptrace_register)
15150 (ppc_supply_ptrace_register): Ditto.
15151 (parse_spufs_run): Adjust.
15152 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15153 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15154 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15155 take a regcache. Adjust.
15156 * linux-s390-low.c (s390_collect_ptrace_register)
15157 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15158 (s390_set_pc): Change prototype to take a regcache. Adjust.
15159 (s390_arch_setup): Adjust.
15160 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15161 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15162 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15163 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15164 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15166 (sparc_breakpoint_at): Adjust.
15167 * linux-xtensa-low.c (xtensa_fill_gregset):
15168 (xtensa_store_gregset):
15169 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15170 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15171 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15172 prototype to take a regcache. Adjust.
15173 * win32-arm-low.c (arm_fetch_inferior_register)
15174 (arm_store_inferior_register): Change prototype to take a
15176 * win32-i386-low.c (i386_fetch_inferior_register)
15177 (i386_store_inferior_register): Change prototype to take a
15179 * win32-low.c (child_fetch_inferior_registers)
15180 (child_store_inferior_registers): Change prototype to take a
15182 (win32_wait): Adjust.
15183 (win32_fetch_inferior_registers): Change prototype to take a
15185 (win32_store_inferior_registers): Adjust.
15186 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15187 store_inferior_register>: Change prototype to take a regcache.
15189 2010-01-20 Doug Evans <dje@google.com>
15191 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15193 (linux_wait_for_event1, linux_init_signals): Ditto.
15194 (W_STOPCODE): Provide definition if missing.
15196 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15198 * linux-low.c (linux_core_of_thread): New.
15199 (compare_ints, show_process, list_threads): New.
15200 (linux_qxfer_osdata): Report threads and cores.
15201 (linux_target_op): Register linux_core_of_thread.
15202 * remote-utils.c (prepare_resume_reply): Report the core.
15203 (buffer_xml_printf): Support %d specifier.
15204 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15206 (handle_query): Handle qXfer:threads. Announce availability
15208 * target.h (struct target_ops): New field core_of_thread.
15210 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15212 * Makefile.in (clean): Remove new generated files.
15213 (reg-s390.o, reg-s390.c): Remove rules.
15214 (reg-s390x.o, reg-s390x.c): Likewise.
15215 (s390-linux32.o, s390-linux32.c): Add rules.
15216 (s390-linux64.o, s390-linux64.c): Likewise.
15217 (s390x-linux64.o, s390x-linux64.c): Likewise.
15218 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15219 * linux-s390-low.c: Include <elf.h>.
15220 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15221 (init_registers_s390): Remove prototype.
15222 (init_registers_s390x): Likewise.
15223 (init_registers_s390_linux32): Add prototype.
15224 (init_registers_s390_linux64): Likewise.
15225 (init_registers_s390x_linux64): Likewise.
15226 (s390_num_regs_3264): New define.
15227 (s390_regmap_3264): New global variable.
15228 (s390_cannot_fetch_register): Remove obsolete check.
15229 (s390_cannot_store_register): Likewise.
15230 (s390_collect_ptrace_register): Handle upper/lower register halves.
15231 (s390_supply_ptrace_register): Likewise.
15232 (s390_fill_gregset): Update to register number changes.
15233 (s390_get_hwcap): New routine.
15234 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15235 Install appropriate regmap and register set.
15237 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15239 * server.c (gdbserver_version): Update copyright year to 2010.
15240 * gdbreplay.c (gdbreplay_version): Likewise.
15242 2009-12-28 Doug Evans <dje@google.com>
15244 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15245 elf/external.h. Include <elf.h> instead but only if necessary.
15247 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15249 * linux-low.c (linux_remove_process): Remove `detaching'
15250 parameter. Don't release/detach from thread_db here.
15251 (linux_kill): Release/detach from thread_db here, ...
15252 (linux_detach): ... and here, before actually detaching.
15253 (linux_wait_1): ... and here, when a process exits.
15254 * thread-db.c (any_thread_of): New.
15255 (thread_db_free): Switch the current inferior to a thread of the
15258 2009-12-21 Doug Evans <dje@google.com>
15260 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15262 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15263 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15264 warning ifndef __NR_tkill. Move setting of errno there too.
15265 Delete unnecessary resetting of errno after syscall.
15266 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15268 * configure.ac: Check for dladdr.
15269 * config.in: Regenerate.
15270 * configure: Regenerate.
15271 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15272 (try_thread_db_load): Update.
15274 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15276 2009-12-18 Doug Evans <dje@google.com>
15278 * event-loop.c: Include unistd.h if it exists.
15280 * linux-low.c (my_waitpid): Move definition away from being in
15281 between linux_tracefork_child/linux_test_for_tracefork.
15283 * gdb_proc_service.h (psaddr_t): Fix type.
15284 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15285 signature to match glibc.
15287 2009-12-16 Doug Evans <dje@google.com>
15289 * linux-low.c (linux_read_memory): Fix argument to read.
15291 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15293 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15294 events, don't leave current_inferior pointing at null.
15296 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15298 * win32-low.c (LOG): Delete.
15299 (OUTMSG): Output to stderr.
15300 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15301 on compile time LOG macro.
15302 (win32_wait): Fix debug output.
15304 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15306 * win32-low.c (win32_add_one_solib): If the dll name is
15307 "ntdll.dll", prepend the system directory to the dll path.
15309 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15311 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15313 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15314 Vladimir Prus <vladimir@codesourcery.com>
15316 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15317 * configure.ac: Check for __mcoldfire__ and set
15318 gdb_cv_m68k_is_coldfire.
15319 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15320 reg-cf.o and reg-m68k.o.
15321 * configure: Regenerated.
15323 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15325 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15326 Pass it to thread_db_free.
15327 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15328 proper `detaching' argument to linux_remove_process.
15329 * linux-low.h (thread_db_free): Add `detaching' parameter.
15330 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15332 (thread_db_free): Add `detaching' parameter. Only
15333 call td_ta_clear_event if detaching from process.
15335 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15337 * thread-db.c (thread_db_free): Fix typo.
15339 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15342 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15344 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15346 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15347 with an i686 compiler.
15348 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15350 * configure: Rebuilt.
15352 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15356 * server.c (handle_search_memory_1): Correct read_addr initialization
15357 in loop for searching subsequent chunks.
15359 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15361 * configure.ac: New --with-libthread-db option.
15362 * thread-db.c: Allow direct dependence on libthread_db.
15363 (thread_db_free): Adjust.
15364 * config.in: Regenerate.
15365 * configure: Likewise.
15367 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15370 * thread-db.c (attach_thread): New function.
15371 (maybe_attach_thread): Return success/failure.
15372 (find_new_threads_callback): Adjust.
15373 (thread_db_find_new_threads): Loop until no new threads.
15375 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15377 * proc-service.c (ps_lgetregs): Formatting.
15379 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15381 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15382 * configure.ac: Adjust.
15383 * linux-low.h (struct process_info_private): Move members to struct
15385 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15386 * linux-low.c (linux_remove_process): Adjust.
15387 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15388 * server.c (handle_query): Move code ...
15389 (handle_monitor_command): ... here. New function.
15390 * target.h (struct target_ops): New member.
15391 * thread-db.c (struct thread_db): New.
15392 (libthread_db_search_path): New variable.
15393 (thread_db_create_event, thread_db_enable_reporting)
15394 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15395 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15396 (try_thread_db_load_1, dladdr_to_soname): New functions.
15397 (try_thread_db_load, thread_db_load_search): New functions.
15398 (thread_db_init): Search for libthread_db.
15399 (thread_db_free): New function.
15400 (thread_db_handle_monitor_command): Likewise.
15401 * config.in: Regenerate.
15402 * configure: Regenerate.
15404 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15406 * spu-low.c (spu_kill): Wait for inferior to terminate.
15407 Call clear_inferiors.
15408 (spu_detach): Call clear_inferiors.
15410 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15412 * aclocal.m4: Regenerate.
15413 * config.in: Likewise.
15414 * configure: Likewise.
15416 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15418 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15419 (parse_spufs_run): New function.
15420 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15421 (ppc_breakpoint_at): Handle SPU breakpoints.
15423 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15425 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15426 (SPUFS_MAGIC): Define.
15427 (spu_enumerate_spu_ids): New function.
15428 (linux_qxfer_spu): New function.
15429 (linux_target_ops): Install linux_qxfer_spu.
15431 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15433 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15434 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15435 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15436 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15437 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15438 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15439 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15440 (init_registers_powerpc_cell32l): Add prototype.
15441 (init_registers_powerpc_cell64l): Likewise.
15442 (ppc_arch_setup): Detect Cell/B.E. architecture.
15444 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15446 * Makefile.in (datarootdir): New variable.
15448 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15450 * linux-low.c (linux_write_memory): Update debugging output.
15451 * Makefile.in (clean): Add new descriptions.
15452 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15453 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15454 * configure.srv: Add new files for arm*-*-linux*.
15455 * linux-arm-low.c: Add new declarations.
15456 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15457 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15458 (HWCAP_VFPv3D16): New.
15459 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15460 instead of __IWMMXT__.
15461 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15462 (arm_arch_setup): New.
15463 (target_regsets): Remove #ifdef. Add VFP regset.
15464 (the_low_target): Use arm_arch_setup.
15466 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15468 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15469 the main thread again.
15471 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15473 Adding Neutrino gdbserver.
15474 * configure: Regenerated.
15475 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15476 * configure.srv (i[34567]86-*-nto*): New target.
15477 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15478 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15479 (nto_comctrl) [__QNX__]: New function.
15480 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15482 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15484 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15487 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15488 Pedro Alves <pedro@codesourcery.com>
15490 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15491 don't support CONTEXT_EXTENDED_REGISTERS.
15492 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15493 (the_low_target): Install them.
15494 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15495 failing with ERROR_PIPE_NOT_CONNECTED.
15497 2009-06-30 Doug Evans <dje@google.com>
15498 Pierre Muller <muller@ics.u-strasbg.fr>
15500 Add h/w watchpoint support to x86-linux, win32-i386.
15501 * Makefile.in (SFILES): Add i386-low.c
15502 (i386_low_h): Define.
15503 (i386-low.o): Add dependencies.
15504 (linux-x86-low.o): Add i386-low.h dependency.
15505 (win32-i386-low.o): Ditto.
15506 * i386-low.c: New file.
15507 * i386-low.h: New file.
15508 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15509 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15510 * linux-low.c (linux_add_process): Initialize arch_private.
15511 (linux_remove_process): Free arch_private.
15512 (add_lwp): Initialize arch_private.
15513 (delete_lwp): Free arch_private.
15514 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15516 * linux-low.h (process_info_private): New member arch_private.
15517 (lwp_info): New member arch_private.
15518 (linux_target_ops): New members new_process, new_thread,
15520 (ptid_of): New macro.
15521 * linux-x86-low.c: Include stddef.h, i386-low.h.
15522 (arch_process_info): New struct.
15523 (arch_lwp_info): New struct.
15524 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15525 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15526 (i386_dr_low_get_status): New function.
15527 (x86_insert_point, x86_remove_point): New functions.
15528 (x86_stopped_by_watchpoint): New function.
15529 (x86_stopped_data_address): New function.
15530 (x86_linux_new_process, x86_linux_new_thread): New functions.
15531 (x86_linux_prepare_to_resume): New function.
15532 (the_low_target): Add entries for insert_point, remove_point,
15533 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15535 * server.c (debug_hw_points): New global.
15536 (monitor_show_help): Document set debug-hw-points.
15537 (handle_query): Process "set debug-hw-points".
15538 * server.h (debug_hw_points): Declare.
15539 (paddress): Declare.
15540 * utils.c (NUMCELLS, CELLSIZE): New macros.
15541 (get_sell, xsnprintf, paddress): New functions.
15542 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15543 remove_point, stopped_by_watchpoint, stopped_data_address.
15544 * win32-i386-low.c: Include i386-low.h.
15545 (debug_reg_state): Replaces dr.
15546 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15547 (i386_dr_low_get_status): New function.
15548 (i386_insert_point, i386_remove_point): New functions.
15549 (i386_stopped_by_watchpoint): New function.
15550 (i386_stopped_data_address): New function.
15551 (i386_initial_stuff): Update.
15552 (get_thread_context,set_thread_context,i386_thread_added): Update.
15553 (the_low_target): Add entries for insert_point,
15554 remove_point, stopped_by_watchpoint, stopped_data_address.
15555 * win32-low.c (win32_insert_watchpoint): New function.
15556 (win32_remove_watchpoint): New function.
15557 (win32_stopped_by_watchpoint): New function.
15558 (win32_stopped_data_address): New function.
15559 (win32_target_ops): Add entries for insert_watchpoint,
15560 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15561 * win32-low.h (win32_target_ops): New members insert_point,
15562 remove_point, stopped_by_watchpoint, stopped_data_address.
15564 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15566 * server.c (process_serial_event): Re-return unsupported, not
15567 error, if the type isn't recognized. Re-allow supporting only
15568 insert or remove packets. Also call require_running for
15569 breakpoints. Add missing break statement to default case. Tidy.
15570 * target.h (struct target_ops): Rename insert_watchpoint to
15571 insert_point, and remove_watchpoint to remove_point.
15573 * linux-low.h (struct linux_target_ops): Likewise.
15574 * linux-low.c (linux_insert_watchpoint): Rename to ...
15575 (linux_insert_point): ... this. Adjust.
15576 (linux_remove_watchpoint): Rename to ...
15577 (linux_remove_point): ... this. Adjust.
15578 (linux_target_ops): Adjust.
15579 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15580 (cris_insert_point): ... this.
15581 (cris_remove_watchpoint): Rename to ...
15582 (cris_remove_point): ... this.
15583 (the_low_target): Adjust.
15585 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15587 * server.c (handle_v_kill): Pass signal_pid to
15588 kill_inferior if multi_process is zero.
15590 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15592 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15593 * target.h (target_ops): Comment for *_watchpoint to make it clear
15594 the functions can get types '0' and '1'.
15596 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15598 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15599 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15600 * regcache.c (get_regcache): Likewise.
15601 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15602 * win32-low.c (child_fetch_inferior_registers): Remove check for
15605 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15606 Pedro Alves <pedro@codesourcery.com>
15608 * target.h (struct target_ops) <supports_multi_process>: New
15610 (target_supports_multi_process): New.
15611 * server.c (handle_query): Even if GDB reports support, only
15612 enable multi-process if the target also supports it. Report
15613 multi-process support only if the target backend supports it.
15614 * linux-low.c (linux_supports_multi_process): New function.
15615 (linux_target_ops): Install it as target_supports_multi_process
15618 2009-05-24 Doug Evans <dje@google.com>
15620 Global renaming of find_thread_pid to find_thread_ptid.
15621 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15622 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15623 All callers updated.
15625 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15626 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15629 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15630 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15631 (linux_resume_one_lwp): Ditto.
15633 2009-05-23 Doug Evans <dje@google.com>
15635 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15636 from struct inferior_list_entry * to struct lwp_info *.
15637 All callers updated.
15639 2009-05-13 Doug Evans <dje@google.com>
15641 * linux-x86-low.c: Don't include assert.h.
15642 (x86_siginfo_fixup): Use fatal, not assert.
15643 (x86_arch_setup): Fix comment.
15645 2009-05-12 Doug Evans <dje@google.com>
15647 Biarch support for i386/amd64 gdbserver.
15648 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15649 Add linux-x86-low.c.
15650 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15651 (linux-x86-low.o): Add.
15652 * linux-x86-64-low.c: Delete.
15653 * linux-i386-low.c: Delete.
15654 * linux-x86-low.c: New file.
15655 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15657 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15659 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15660 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15661 (linux_child_pid_to_exec_file): New function.
15662 (elf_64_header_p, elf_64_file_p): New functions.
15663 (siginfo_fixup): New function.
15664 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15665 give target a chance to convert layout.
15666 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15667 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15669 2009-05-07 Doug Evans <dje@google.com>
15671 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15672 (regsets_store_inferior_registers): Ditto.
15674 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15678 * linux-low.c (must_set_ptrace_flags): Delete.
15679 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15681 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15682 `lwp->must_set_ptrace_flags' instead.
15683 (linux_wait_for_event_1): Set ptrace options here.
15684 (linux_wait_1): ... not here.
15686 2009-04-30 Doug Evans <dje@google.com>
15688 * inferiors.c (started_inferior_callback): New function.
15689 (attached_inferior_callback): New function.
15690 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15691 * server.c (print_started_pid, print_attached_pid): New functions.
15692 (detach_or_kill_for_exit): New function.
15693 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15694 * server.h (have_started_inferiors_p): Declare.
15695 (have_attached_inferiors_p): Declare.
15697 * inferiors.c (remove_process): Fix memory leak, free process.
15698 * linux-low.c (linux_remove_process): New function.
15699 (linux_kill): Call it instead of remove_process.
15700 (linux_detach, linux_wait_1): Ditto.
15702 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15704 * configure.srv: Add x86 Windows CE target.
15706 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15708 * inferiors.c (get_thread_process): Make global.
15709 * server.h (get_thread_process): Add prototype.
15710 * thread-db.c (find_one_thread): Use get_thread_process
15711 instead of current_process.
15712 (thread_db_get_tls_address): Do not crash if called when
15713 thread layer is not yet initialized.
15715 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15717 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15718 * spu-low.c (current_tid): Rename to ...
15719 (current_ptid): ... this.
15720 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15721 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15722 ptid_get_lwp (current_ptid) instead of current_tid.
15723 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15724 instead of current_tid. Use find_process_pid to verify pid
15725 argument is valid. Pass proper argument to remove_process.
15726 (spu_thread_alive): Compare current_ptid instead of current_tid.
15727 (spu_resume): Likewise.
15729 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15731 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15734 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15736 Implement the multiprocess extensions, and add linux multiprocess
15739 * server.h (ULONGEST): Declare.
15740 (struct ptid, ptid_t): New.
15741 (minus_one_ptid, null_ptid): Declare.
15742 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15743 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15744 (struct inferior_list_entry): Change `id' type from unsigned from
15746 (struct sym_cache, struct breakpoint, struct
15747 process_info_private): Forward declare.
15748 (struct process_info): Declare.
15749 (current_process): Declare.
15750 (all_processes): Declare.
15751 (initialize_inferiors): Declare.
15752 (add_thread): Adjust to use ptid_t.
15753 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15754 (add_process, remove_process, find_thread_pid): Declare.
15755 (find_inferior_id): Adjust to use ptid_t.
15756 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15757 (multi_process): Declare.
15758 (push_event): Adjust to use ptid_t.
15759 (read_ptid, write_ptid): Declare.
15760 (prepare_resume_reply): Adjust to use ptid_t.
15761 (clear_symbol_cache): Declare.
15762 * inferiors.c (all_processes): New.
15763 (null_ptid, minus_one_ptid): New.
15764 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15765 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15766 (add_thread): Change unsigned long to ptid. Remove gdb_id
15768 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15769 (gdb_id_to_thread): Rename to ...
15770 (find_thread_pid): ... this. Change unsigned long to ptid.
15771 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15772 (loaded_dll, pull_pid_from_list): Adjust.
15773 (add_process, remove_process, find_process_pid)
15774 (get_thread_process, current_process, initialize_inferiors): New.
15775 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15776 (struct target_waitstatus) <related_pid>: Ditto.
15777 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15778 return type to int.
15779 (struct target_ops) <join>: Add `pid' argument.
15780 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15781 (struct target_ops) <wait>: Add `ptid' field. Change return type
15783 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15784 (mywait): Add `ptid' argument. Change return type to ptid_t.
15785 (target_pid_to_str): Declare.
15786 * target.c (set_desired_inferior): Adjust to use ptids.
15787 (mywait): Add new `ptid' argument. Adjust.
15788 (target_pid_to_str): New.
15789 * mem-break.h (free_all_breakpoints): Declare.
15790 * mem-break.c (breakpoints): Delelete.
15791 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15792 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15793 to use per-process breakpoint list.
15794 (free_all_breakpoints): New.
15795 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15796 (symbol_cache, all_symbols_looked_up): Delete.
15798 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15800 (prepare_resume_reply): Change ptid argument's type from unsigned
15801 long to ptid_t. Adjust. Implement W;process and X;process.
15802 (free_sym_cache, clear_symbol_cache): New.
15803 (look_up_one_symbol): Adjust to per-process symbol cache. *
15804 * server.c (cont_thread, general_thread, step_thread): Change type
15806 (attached): Delete.
15807 (multi_process): New.
15808 (last_ptid): Change type to ptid_t.
15809 (struct vstop_notif) <ptid>: Change type to ptid_t.
15810 (queue_stop_reply, push_event): Change `ptid' argument's type to
15812 (discard_queued_stop_replies): Add `pid' argument.
15813 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15814 changes. Don't reference the `attached' global.
15815 (attach_inferior): Adjust to mywait interface changes.
15816 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15817 features. Handle and report "multiprocess+". Handle
15819 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15821 (handle_v_kill): New.
15822 (handle_v_stopped): Adjust to use target_pid_to_str.
15823 (handle_v_requests): Allow multiple attaches and runs when
15824 multiprocess extensions are in effect. Handle "vKill".
15825 (myresume): Adjust to use ptids.
15826 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15827 (handle_status): Adjust to discard_queued_stop_replies interface
15829 (first_thread_of, kill_inferior_callback)
15830 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15831 (main): Call initialize_inferiors. Adjust to use ptids, killing
15832 and detaching from all inferiors. Handle multiprocess packet
15834 * linux-low.h: Include gdb_proc_service.h.
15835 (struct process_info_private): New.
15836 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15837 <lwpid_of>: Use ptid_get_lwp.
15838 (get_lwp_thread): Adjust.
15839 (struct lwp_info): Add `dead' member.
15840 (find_lwp_pid): Declare.
15841 * linux-low.c (thread_db_active): Delete.
15842 (new_inferior): Adjust comment.
15843 (inferior_pid): Delete.
15844 (linux_add_process): New.
15845 (handle_extended_wait): Adjust.
15846 (add_lwp): Change unsigned long to ptid.
15847 (linux_create_inferior): Add process to processes table. Adjust
15848 to use ptids. Don't set new_inferior here.
15849 (linux_attach_lwp): Rename to ...
15850 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15851 it. Adjust to use ptids.
15852 (linux_attach_lwp): New.
15853 (linux_attach): Add process to processes table. Don't set
15855 (struct counter): New.
15856 (second_thread_of_pid_p, last_thread_of_process_p): New.
15857 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15858 multiple processes.
15859 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15860 processes. Remove process from process table.
15861 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15862 to multiple processes.
15863 (any_thread_of): New.
15864 (linux_detach): Add `pid' argument, and handle it. Remove process
15865 from processes table.
15866 (linux_join): Add `pid' argument. Handle it.
15867 (linux_thread_alive): Change unsighed long argument to ptid_t.
15868 Consider dead lwps as not being alive.
15869 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15870 threads we're not interested in.
15871 (same_lwp, find_lwp_pid): New.
15872 (linux_wait_for_lwp): Change `pid' argument's type from int to
15874 (linux_wait_for_event): Rename to ...
15875 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15876 from int to ptid_t. Adjust.
15877 (linux_wait_for_event): New.
15878 (linux_wait_1): Add `ptid' argument. Change return type to
15879 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15880 that exit from the process table.
15881 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15883 (mark_lwp_dead): New.
15884 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15885 stopping all threads, mark its main lwp as dead.
15886 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15888 (fetch_register, usr_store_inferior_registers)
15889 (regsets_fetch_inferior_registers)
15890 (regsets_store_inferior_registers, linux_read_memory)
15891 (linux_write_memory): Inline `inferior_pid'.
15892 (linux_look_up_symbols): Adjust to use per-process
15893 `thread_db_active'.
15894 (linux_request_interrupt): Adjust to use ptids.
15895 (linux_read_auxv): Inline `inferior_pid'.
15896 (initialize_low): Don't reference thread_db_active.
15897 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15898 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15899 (ps_getpid): Return the pid of the current inferior.
15900 * thread-db.c (proc_handle, thread_agent): Delete.
15901 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15903 (find_one_thread): Change argument type to ptid_t. Adjust to
15905 (maybe_attach_thread): Adjust to per-process data and ptids.
15906 (thread_db_find_new_threads): Ditto.
15907 (thread_db_init): Ditto.
15908 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15909 processes table. Adjust to use ptids.
15910 (spu_kill, spu_detach): Adjust interface. Remove process from
15912 (spu_join, spu_thread_alive): Adjust interface.
15913 (spu_wait): Adjust interface. Remove process from processes
15914 table. Adjust to use ptids.
15915 * win32-low.c (current_inferior_tid): Delete.
15916 (current_inferior_ptid): New.
15917 (debug_event_ptid): New.
15918 (thread_rec): Take a ptid. Adjust.
15919 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15920 (child_delete_thread): Ditto.
15921 (do_initial_child_stuff): Add `attached' argument. Add process to
15923 (child_fetch_inferior_registers, child_store_inferior_registers):
15925 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15926 (win32_attach): Pass 1 to do_initial_child_stuff.
15927 (win32_kill): Adjust interface. Remove process from processes
15929 (win32_detach): Ditto.
15930 (win32_join): Adjust interface.
15931 (win32_thread_alive): Take a ptid.
15932 (win32_resume): Adjust to use ptids.
15933 (get_child_debug_event): Ditto.
15934 (win32_wait): Adjust interface. Remove exiting process from
15937 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15939 Non-stop mode support.
15941 * server.h (non_stop): Declare.
15942 (gdb_client_data, handler_func): Declare.
15943 (delete_file_handler, add_file_handler, start_event_loop):
15945 (handle_serial_event, handle_target_event, push_event)
15946 (putpkt_notif): Declare.
15947 * target.h (enum resume_kind): New.
15948 (struct thread_resume): Replace `step' field by `kind' field.
15949 (TARGET_WNOHANG): Define.
15950 (struct target_ops) <wait>: Add `options' argument.
15951 <supports_non_stop, async, start_non_stop>: New fields.
15952 (target_supports_non_stop, target_async): New.
15953 (start_non_stop): Declare.
15954 (mywait): Add `options' argument.
15955 * target.c (mywait): Add `options' argument. Print child exit
15956 notifications here.
15957 (start_non_stop): New.
15958 * server.c (non_stop, own_buf, mem_buf): New globals.
15959 (struct vstop_notif): New.
15960 (notif_queue): New global.
15961 (queue_stop_reply, push_event, discard_queued_stop_replies)
15962 (send_next_stop_reply): New.
15963 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15965 (attach_inferior): In non-stop mode, don't wait for the target
15967 (handle_general_set): Handle QNonStop.
15968 (handle_query): When handling qC, return the current general
15969 thread, instead of the first thread of the list.
15970 (handle_query): If the backend supports non-stop mode, include
15971 QNonStop+ in the qSupported query response.
15972 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15974 (handle_v_attach, handle_v_run): Handle non-stop mode.
15975 (handle_v_stopped): New.
15976 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15977 (myresume): Adjust to use resume_kind. Handle non-stop.
15978 (queue_stop_reply_callback): New.
15979 (handle_status): Handle non-stop mode.
15980 (main): Clear non_stop flag on reconnection. Use the event-loop.
15981 Refactor serial protocol handling from here ...
15982 (process_serial_event): ... to this new function. When GDB
15983 selects any thread, select one here. In non-stop mode, wait until
15984 GDB acks all pending events before exiting.
15985 (handle_serial_event, handle_target_event): New.
15986 * remote-utils.c (remote_open): Install remote_desc in the event
15988 (remote_close): Remove remote_desc from the event loop.
15989 (putpkt_binary): Rename to...
15990 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15991 (putpkt_binary): New as wrapper around putpkt_binary_1.
15992 (putpkt_notif): New.
15993 (prepare_resume_reply): In non-stop mode, don't change the
15995 * event-loop.c: New.
15996 * Makefile.in (OBJ): Add event-loop.o.
15997 (event-loop.o): New rule.
15999 * linux-low.h (pid_of): Moved here.
16001 (get_lwp_thread): Use lwpid_of.
16002 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16003 * linux-low.c (pid_of): Delete.
16004 (inferior_pid): Use lwpid_of.
16005 (linux_event_pipe): New.
16006 (target_is_async_p): New.
16008 (handle_extended_wait): Use lwpid_of.
16009 (add_lwp): Don't set lwpid field.
16010 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16011 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16012 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16013 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16014 first. Adjust to linux_wait_for_event interface changes. Use
16016 (linux_detach): Don't delete the main lwp here.
16017 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16018 (status_pending_p): Don't consider explicitly suspended lwps.
16019 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16020 pointer. Add OPTIONS argument. Change return type to int. Use
16021 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16022 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16023 pointer. Add status pointer argument. Return a pid instead of a
16024 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16025 changes. In non-stop mode, don't switch to a random thread.
16026 (linux_wait): Rename to...
16027 (linux_wait_1): ... this. Add target_options argument, and handle
16028 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16029 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16030 clean exit and signal exit code. Don't stop all threads in
16031 non-stop mode. In all-stop mode, only stop all threads when
16032 reporting a stop to GDB. Handle explicit thread stop requests.
16033 (async_file_flush, async_file_mark): New.
16035 (send_sigstop): Use lwpid_of.
16036 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16037 interface changes. In non-stop mode, don't switch to a random
16039 (linux_resume_one_lwp): Use lwpid_of.
16040 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16041 (linux_resume_one_thread): ... this. Handle resume_stop. In
16042 non-stop mode, don't look for pending flag in all threads.
16043 (resume_status_pending_p): Don't consider explicitly suspended
16045 (my_waitpid): Reimplement. Emulate __WALL.
16046 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16048 (sigchld_handler, linux_supports_non_stop, linux_async)
16049 (linux_start_non_stop): New.
16050 (linux_target_ops): Register linux_supports_non_stop, linux_async
16051 and linux_start_non_stop.
16052 (initialize_low): Install SIGCHLD handler.
16053 * thread-db.c (thread_db_create_event, find_one_thread)
16054 (thread_db_get_tls_address): Use lwpid_of.
16055 * win32-low.c (win32_detach): Adjust to use resume_kind.
16056 (win32_wait): Add `options' argument.
16057 * spu-low.c (spu_resume): Adjust to use resume_kind.
16058 (spu_wait): Add `options' argument.
16060 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16062 Decouple target code from remote protocol.
16064 * target.h (enum target_waitkind): New.
16065 (struct target_waitstatus): New.
16066 (struct target_ops) <wait>: Return an unsigned long. Take a
16067 target_waitstatus pointer instead of a char pointer.
16068 (mywait): Likewise.
16069 * target.c (mywait): Change prototype to return an unsigned long.
16070 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16071 * server.h (thread_from_wait, old_thread_from_wait): Delete
16073 (prepare_resume_reply): Change prototype to take a
16075 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16076 (last_status, last_ptid): New.
16077 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16078 pid instead of a signal.
16079 (attach_inferior): Remove "status" and "signal" parameters.
16081 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16083 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16084 (handle_v_requests, myresume): Remove "status" and "signal"
16085 parameters. Adjust.
16086 (handle_status): New.
16087 (main): Delete local `status'. Adjust.
16088 * remote-utils.c: Include target.h.
16089 (prepare_resume_reply): Change prototype to take a
16090 target_waitstatus. Adjust.
16092 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16094 * spu-low.c (spu_wait): Adjust.
16095 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16097 (win32_wait): Adjust.
16099 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16101 * target.h (struct thread_resume): Delete leave_stopped member.
16102 (struct target_ops): Add a `n' argument to the `resume' callback.
16103 * server.c (start_inferior): Adjust.
16104 (handle_v_cont, myresume): Adjust.
16105 * linux-low.c (check_removed_breakpoint): Adjust to resume
16106 interface change, and to removed leave_stopped field.
16107 (resume_ptr): Delete.
16108 (struct thread_resume_array): New.
16109 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16110 resume interface change.
16111 (linux_continue_one_thread, linux_queue_one_thread)
16112 (resume_status_pending_p): Check if the resume field is NULL
16113 instead of checking the leave_stopped member.
16114 (linux_resume): Adjust to the target resume interface change.
16115 * spu-low.c (spu_resume): Adjust to the target resume interface
16117 * win32-low.c (win32_detach, win32_resume): Ditto.
16119 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16121 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16123 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16125 (linux_continue_one_thread): Only preserve the stepping flag if
16126 there's a pending breakpoint.
16128 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16130 * server.c (main): After the inferior having exited, call
16131 remote_close before exiting gdbserver.
16133 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16135 Fix size of FPSCR in Power 7 processors.
16136 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16137 (PPC_FEATURE_HAS_DFP): New #define.
16138 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16141 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16143 * server.c (handle_query) Whitespace and formatting.
16145 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16147 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16148 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16149 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16150 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16151 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16152 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16153 Makefile.in, configure.ac: Fix whitespace throughout.
16154 * configure: Regenerate.
16156 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16158 * inferiors.c (find_inferior): Make it safe for the callback
16159 function to delete the currently iterated inferior.
16161 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16163 * Makefile.in (linuw_low_h): Move higher.
16164 (thread-db.o): Depend on $(linux_low_h).
16166 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16168 Rename "process" to "lwp" throughout.
16170 * linux-low.c (all_processes): Rename to...
16171 (all_lwps): ... this.
16172 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16173 (add_process): Rename to ...
16174 (add_lwp): ... this. Adjust.
16175 (linux_create_inferior): Adjust.
16176 (linux_attach_lwp): Adjust.
16177 (linux_attach): Adjust.
16178 (linux_kill_one_process): Rename to ...
16179 (linux_kill_one_lwp): ... this. Adjust.
16180 (linux_kill): Adjust.
16181 (linux_detach_one_process): Rename to ...
16182 (linux_detach_one_lwp): ... this. Adjust.
16183 (linux_detach): Adjust.
16184 (check_removed_breakpoint): Adjust.
16185 (status_pending_p): Adjust.
16186 (linux_wait_for_process): Rename to ...
16187 (linux_wait_for_lwp): ... this. Adjust.
16188 (linux_wait_for_event): Adjust.
16189 (send_sigstop): Adjust.
16190 (wait_for_sigstop): Adjust.
16191 (stop_all_processes): Rename to ...
16192 (stop_all_lwps): ... this.
16193 (linux_resume_one_process): Rename to ...
16194 (linux_resume_one_lwp): ... this. Adjust.
16195 (linux_set_resume_request, linux_continue_one_thread)
16196 (linux_queue_one_thread, resume_status_pending_p)
16197 (usr_store_inferior_registers, regsets_store_inferior_registers)
16198 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16200 * linux-low.h (get_process): Rename to ...
16201 (get_lwp): ... this. Adjust.
16202 (get_thread_process): Rename to ...
16203 (get_thread_lwp): ... this. Adjust.
16204 (get_process_thread): Rename to ...
16205 (get_lwp_thread): ... this. Adjust.
16206 (struct process_info): Rename to ...
16207 (struct lwp_info): ... this.
16208 (all_processes): Rename to ...
16209 (all_lwps): ... this.
16210 * proc-service.c (ps_lgetregs): Adjust.
16211 * thread-db.c (thread_db_create_event, find_one_thread)
16212 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16214 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16216 * server.c (handle_query): Handle "qAttached".
16218 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16220 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16221 GPLv3, update license URL.
16223 2009-03-01 Doug Evans <dje@google.com>
16225 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16226 (server_h): Add gdb_signals.h.
16227 (signals.o): Update.
16228 * server.h (target_signal_from_host,target_signal_to_host_p)
16229 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16231 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16233 * remote-utils.c (getpkt): Also generate remote-debug
16234 information if noack_mode is set.
16236 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16238 * server.c (handle_query): Report qXfer:siginfo:read and
16239 qXfer:siginfo:write as supported and handle them.
16240 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16241 * linux-low.c (linux_xfer_siginfo): New.
16242 (linux_target_ops): Set it.
16244 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16246 * server.c (gdbserver_usage): Mention --remote-debug.
16247 (main): Accept '--remote-debug' switch.
16249 2009-01-18 Doug Evans <dje@google.com>
16251 * regcache.c (new_register_cache): No need to check result of xcalloc.
16252 * server.c (handle_search_memory): Back out calls to xmalloc,
16253 result is checked and error is returned to user upon failure.
16254 (handle_query): Ditto. Add more checks for result of malloc.
16255 (handle_v_cont): Check result of malloc, report error back to
16257 (handle_v_run): Ditto. Call freeargv.
16258 * server.h (freeargv): Declare.
16259 * utils.c (freeargv): New fn.
16261 2009-01-15 Doug Evans <dje@google.com>
16263 * gdbreplay.c (perror_with_name): Make arg const char *.
16264 * server.h (target_signal_to_name): Make return type const char *.
16265 * thread-db.c (thread_db_err_str): Make return type const char *.
16266 * utils.c (perror_with_name): Make arg const char *.
16268 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16270 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16271 when handling a EXIT_PROCESS_DEBUG_EVENT.
16273 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16275 * gdbreplay.c (gdbreplay_version): Update copyright year.
16276 * server.c (gdbserver_version): Likewise.
16278 2009-01-05 Doug Evans <dje@google.com>
16280 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16281 (handle_extended_wait): Improve comment.
16283 2008-12-13 Doug Evans <dje@google.com>
16285 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16286 * server.h (ATTR_MALLOC): New macro.
16287 (xmalloc,xcalloc,xstrdup): Declare.
16288 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16289 * inferiors.c: Ditto.
16290 * linux-low.c: Ditto.
16291 * mem-break.c: Ditto.
16292 * regcache.c: Ditto.
16293 * remote-utils.c: Ditto.
16296 * win32-low.c: Ditto.
16298 2008-12-12 Doug Evans <dje@google.com>
16300 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16301 in debugging printf.
16303 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16305 2008-12-09 Doug Evans <dje@google.com>
16307 * linux-low.h (struct process_info): Delete member tid, unused.
16308 * thread-db.c (find_one_thread): Update.
16309 (maybe_attach_thread): Update.
16311 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16313 * target.h (struct target_ops): Add qxfer_osdata member.
16314 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16316 (linux_qxfer_osdata): New functions.
16317 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16319 * server.c (handle_query): Handle "qXfer:osdata:read:".
16320 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16321 (buffer_xml_printf): New functions.
16322 * server.h (struct buffer): New.
16323 (buffer_grow_str, buffer_grow_str0): New macros.
16324 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16325 (buffer_xml_printf): Declare.
16327 2008-11-24 Doug Evans <dje@google.com>
16329 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16331 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16333 * server.c (handle_v_run): Always use the supplied argument list.
16335 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16337 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16338 (xtensa_regmap_table): Add entry for scompare1.
16340 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16342 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16343 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16344 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16345 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16346 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16347 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16348 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16349 XML target descriptions.
16350 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16351 when inferior is running on an ISA 2.05 or later processor. Add
16352 special case to return offset for full 64-bit slot of FPSCR when
16355 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16357 * Makefile.in (SFILES, clean): Added sparc64 files.
16358 (reg-sparc64.o, reg-sparc64.c): New.
16359 * configure.srv (sparc*-*-linux*): New configuration.
16360 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16361 syscall arguments for SPARC.
16362 (regsets_store_inferior_registers): Likewise.
16363 * linux-sparc-low.c: New file.
16365 2008-10-21 Doug Evans <dje@google.com>
16367 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16368 (READLINE_DIR,READLINE_DEP): Delete.
16369 (INTERNAL_CFLAGS): Update.
16370 (LINTFLAGS): Update.
16372 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16374 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16375 whole argv from the last run, not just argv[0].
16377 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16379 * regcache.c (new_register_cache): Return NULL if the register
16380 cache size isn't known yet.
16381 (free_register_cache): Avoid dereferencing a NULL regcache.
16383 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16385 * configure.srv: Merge MIPS and MIPS64.
16387 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16389 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16391 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16393 * Makefile.in: Add required vsx dependencies.
16395 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16396 Declare init_registers_powerpc_vsx32l.
16397 Declare init_registers_powerpc_vsx64l.
16398 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16399 (ppc_arch_setup): Check for VSX in hwcap.
16400 (ppc_fill_vsxregset): New function.
16401 (ppc_store_vsxregset): New function.
16402 Add new VSX entry in regset_info target_regsets.
16404 * configure.srv: Add new VSX dependencies.
16406 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16408 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16409 (remote_open): Set or clear transport_is_reliable.
16410 (putpkt_binary): Don't expect acks in noack mode.
16411 (getpkt): Don't send ack/nac in noack mode.
16412 * server.c (handle_general_set): Handle QStartNoAckMode.
16413 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16415 (main): Reset noack_mode on every connection.
16416 * server.h (noack_mode): Declare.
16418 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16420 * Makefile.in (GDBREPLAY_OBS): New variable.
16421 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16423 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16424 Daniel Jacobowitz <dan@codesourcery.com>
16426 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16427 (usr_store_inferior_registers): Likewise.
16428 (regsets_store_inferior_registers): Likewise.
16430 2008-07-31 Rolf Jansen <rj@surtec.com>
16431 Pedro Alves <pedro@codesourcery.com>
16433 * configure.ac: Check for memmem declaration.
16434 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16435 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16436 (disable_packet_qfThreadInfo): Unconditionally compile.
16437 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16438 * configure, config.in: Regenerate.
16440 2008-07-28 Doug Kwan <dougkwan@google.com>
16442 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16443 (linux_write_memory): Remove declaration of errno.
16445 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16447 * linux-low.c (handle_extended_wait): Do not use "status"
16448 variable uninitialized.
16450 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16452 * server.c (handle_v_attach): Inhibit reporting dll changes.
16454 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16456 * remote-utils.c (prepare_resume_reply): If requested, don't
16457 output "thread:TID" in the T stop reply.
16459 * server.c (disable_packet_vCont, disable_packet_Tthread)
16460 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16461 (handle_query): If requested, disable support for qC, qfThreadInfo
16463 (handle_v_requests): If requested, disable support for vCont.
16464 (gdbserver_show_disableable): New.
16465 (main): Handle --disable-packet and --disable-packet=LIST.
16467 * server.h (disable_packet_vCont, disable_packet_Tthread)
16468 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16470 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16472 * server.c (gdbserver_usage): Mention --version.
16474 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16476 * Makefile.in (gdbreplay.o): New rule.
16478 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16480 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16481 message, not gdbserver.
16483 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16484 Nathan Sidwell <nathan@codesourcery.com>
16485 Joseph Myers <joseph@codesourcery.com>
16487 * acinclude.m4: Include ../../config/acx.m4.
16488 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16489 * configure, config.in: Regenerate.
16490 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16491 * server.c (gdbserver_version): Print PKGVERSION.
16492 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16493 (main): Adjust gdbserver_usage calls.
16494 * gdbreplay.c (version, host_name): Add declarations.
16495 (gdbreplay_version, gdbreplay_usage): New.
16496 (main): Accept --version and --help options.
16498 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16500 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16501 (arm_breakpoint_at): Handle Thumb.
16502 (the_low_target): Add comment.
16504 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16506 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16508 2008-05-09 Doug Evans <dje@google.com>
16510 * server.h (decode_search_memory_packet): Declare.
16511 * remote-utils.c (decode_search_memory_packet): New fn.
16512 * server.c (handle_search_memory_1): New fn.
16513 (handle_search_memory): New fn.
16514 (handle_query): Process qSearch:memory packets.
16516 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16518 * regcache.c (registers_length): Remove.
16519 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16520 full register packet.
16521 * regcache.h (registers_length): Remove prototype.
16522 * server.h (PBUFSIZ): Define to 16384.
16524 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16526 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16527 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16528 powerpc-64l.o, and powerpc-altivec64l.o.
16529 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16530 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16531 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16532 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16533 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16536 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16537 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16538 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16539 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16540 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16541 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16542 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16543 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16544 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16545 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16548 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16549 (init_registers_powerpc_32l): ... this new prototype.
16550 (init_registers_powerpc_32): Remove, replace by ...
16551 (init_registers_powerpc_altivec32l): ... this new prototype.
16552 (init_registers_powerpc_e500): Remove, replace by ...
16553 (init_registers_powerpc_e500l): ... this new prototype.
16554 (init_registers_ppc64): Remove, replace by ...
16555 (init_registers_powerpc_64l): ... this new prototype.
16556 (init_registers_powerpc_64): Remove, replace by ...
16557 (init_registers_powerpc_altivec64l): ... this new prototype.
16558 (ppc_num_regs): Set to 73.
16559 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16560 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16561 (ppc_cannot_store_register): Handle orig_r3 and trap.
16562 (ppc_arch_setup): Update init_registers_... calls.
16563 (ppc_fill_gregset): Handle orig_r3 and trap.
16565 * inferiors.c (clear_inferiors): Reset current_inferior.
16567 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16569 * acinclude.m4: Add override.m4.
16570 * configure: Regenerate.
16572 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16574 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16575 initial call to init_register_ppc64.
16577 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16579 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16580 single powerpc*-*-linux* case.
16581 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16583 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16585 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16586 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16588 * linux-ppc-low.c: Include <elf.h>.
16589 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16590 (ppc_hwcap): New global variable.
16591 (ppc_regmap): Remove __SPE__ #ifdef sections.
16592 (ppc_regmap_e500): New global variable.
16593 (ppc_cannot_store_register): Update __SPE__ special case.
16594 (ppc_get_hwcap): New function.
16595 (ppc_arch_setup): Use it to determine whether inferior supports
16596 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16597 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16598 Do not access registers if target does not support AltiVec.
16599 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16600 Do not access registers if target does not support SPE.
16601 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16603 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16605 * linux-low.c (disabled_regsets, num_regsets): New.
16606 (use_regsets_p): Delete.
16607 (linux_wait_for_process): Clear disabled_regsets.
16608 (regsets_fetch_inferior_registers): Check and set it.
16609 (regsets_store_inferior_registers): Likewise.
16610 (linux_fetch_registers, linux_store_registers): Do not use
16612 (initialize_low): Allocate disabled_regsets.
16614 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16616 * Makefile.in (LIBOBJS): New.
16617 (OBS): Use LIBOBJS.
16618 (memmem.o): New rule.
16619 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16620 * configure: Regenerated.
16622 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16624 * server.c (handle_query): Never return "unsupported" for
16625 qXfer:features:read queries.
16627 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16629 * server.c (get_features_xml): Fix inverted condition.
16630 (handle_query): Always support qXfer:feature:read.
16632 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16634 * server.c (wrapper_argv): New.
16635 (start_inferior): Handle wrapper_argv. If set, expect an extra
16637 (gdbserver_usage): Document --wrapper.
16638 (main): Parse --wrapper.
16640 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16642 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16643 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16644 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16645 (ppc_set_pc): Likewise.
16646 (ppc_arch_setup): New function.
16647 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16648 of collect_register.
16649 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16651 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16653 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16654 instead of linux-ppc64-low.o.
16655 * linux-ppc64-low.c: Remove file.
16656 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16657 (linux-ppc64-low.o): Remove rule.
16659 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16660 (init_registers_powerpc_64): Likewise.
16661 (ppc_regmap): Conditionally define depending on __powerpc64__.
16662 (ppc_cannot_store_register): Do not special-case "fpscr" when
16663 compiled on __powerpc64__.
16664 (ppc_collect_ptrace_register): New function.
16665 (ppc_supply_ptrace_register): New function.
16666 (ppc_breakpoint): Change type to "unsigned int".
16667 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16668 (the_low_target): Conditionally provide initializers for the
16669 arch_setup member depending on __powerpc64__. Install
16670 collect_ptrace_register and supply_ptrace_register members.
16672 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16674 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16675 * server.c (gdbserver_xmltarget): Define.
16676 (get_features_xml): Use it to replace "target.xml" and arch_string.
16678 * configure.srv: Remove srv_xmltarget. Add XML files that were
16679 mentioned there to srv_xmlfiles instead. Remove conditional tests
16680 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16681 srv_xmlfiles and srv_regobj to include all possible choices.
16682 * configure.ac (srv_xmltarget): Remove.
16683 (srv_xmlfiles): Do not add "target.xml".
16684 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16685 checks for supplementary target information.
16686 * configure: Regenerate.
16687 * Makefile.in (XML_TARGET): Remove.
16688 (target.xml): Remove rule.
16689 (clean): Do not clean up target.xml.
16690 (.PRECIOUS): Do not mention target.xml.
16692 * target.h (struct target_ops): Remove arch_string member.
16693 * linux-low.c (linux_arch_string): Remove.
16694 (linux_target_ops): Remove arch_string initializer.
16695 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16696 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16697 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16698 * spu-low.c (spu_arch_string): Remove.
16699 (spu_target_ops): Remove arch_string initializer.
16700 * win32-low.c (win32_arch_string): Remove.
16701 (win32_target_ops): Remove arch_string initializer.
16702 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16703 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16704 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16706 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16708 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16709 by collect_ptrace_register and supply_ptrace_register hooks.
16710 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16711 instead of checking for the_low_target.left_pad_xfer.
16712 (usr_store_inferior_registers): Use collect_ptrace_register callback
16713 instead of checking for the_low_target.left_pad_xfer.
16715 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16716 (s390_supply_ptrace_register): Likewise.
16717 (s390_fill_gregset): Call s390_collect_ptrace_register.
16718 (the_low_target): Update.
16720 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16721 (ppc_supply_ptrace_register): Likewise.
16722 (the_low_target): Update.
16724 * linux-i386-low.c (the_low_target): Update.
16725 * linux-x86-64-low.c (the_low_target): Update.
16727 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16729 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16730 reg-s390.o and reg-s390x.o.
16732 * linux-low.c (new_inferior): New global variable.
16733 (linux_create_inferior, linux_attach): Set it.
16734 (linux_wait_for_process): Call the_low_target.arch_setup after the
16735 target has stopped for the first time.
16736 (initialize_low): Do not call the_low_target.arch_setup.
16738 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16739 (s390_set_pc): Likewise.
16740 (s390_arch_setup): New function.
16741 (the_low_target): Use s390_arch_setup as arch_setup routine.
16743 * regcache.c (realloc_register_cache): New function.
16744 (set_register_cache): Call it for each existing regcache.
16746 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16748 * server.h (init_registers): Remove prototype.
16750 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16751 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16752 instead of init_registers ().
16753 * linux-arm-low.c (init_registers_arm): Add prototype.
16754 (init_registers_arm_with_iwmmxt): Likewise.
16755 (the_low_target): Add initializer for arch_setup field.
16756 * linux-cris-low.c (init_registers_cris): Add prototype.
16757 (the_low_target): Add initializer for arch_setup field.
16758 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16759 (the_low_target): Add initializer for arch_setup field.
16760 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16761 (the_low_target): Add initializer for arch_setup field.
16762 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16763 (the_low_target): Add initializer for arch_setup field.
16764 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16765 (the_low_target): Add initializer for arch_setup field.
16766 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16767 (the_low_target): Add initializer for arch_setup field.
16768 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16769 (init_registers_mips64_linux): Likewise.
16770 (the_low_target): Add initializer for arch_setup field.
16771 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16772 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16773 (the_low_target): Add initializer for arch_setup field.
16774 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16775 (init_registers_powerpc_64): Likewise.
16776 (the_low_target): Add initializer for arch_setup field.
16777 * linux-s390-low.c (init_registers_s390): Add prototype.
16778 (init_registers_s390x): Likewise.
16779 (the_low_target): Add initializer for arch_setup field.
16780 * linux-sh-low.c (init_registers_sh): Add prototype.
16781 (the_low_target): Add initializer for arch_setup field.
16782 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16783 (the_low_target): Add initializer for arch_setup field.
16784 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16785 (the_low_target): Add initializer for arch_setup field.
16787 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16788 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16789 instead of init_registers ().
16790 * win32-arm-low.c (init_registers_arm): Add prototype.
16791 (the_low_target): Add initializer for arch_setup field.
16792 * win32-i386-low.c (init_registers_i386): Add prototype.
16793 (the_low_target): Add initializer for arch_setup field.
16795 * spu-low.c (init_registers_spu): Add prototype.
16796 (initialize_low): Call initialie_registers_spu () instead of
16797 initialize_registers ().
16799 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16801 * server.c (handle_v_requests): When handling the vRun and vAttach
16802 packets, if already debugging a process, don't kill it. Return an
16805 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16807 * server.c (handle_query): Correct length check.
16809 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16811 * win32-low.c (do_initial_child_stuff): Add process handle
16812 parameter. Set current_process_handle and current_process_id from the
16813 parameters. Clear globals.
16814 (win32_create_inferior): Don't set current_process_handle and
16815 current_process_id here. Instead pass them on the call to
16816 do_initial_child_stuff.
16817 (win32_attach): Likewise.
16818 (win32_clear_inferiors): New.
16819 (win32_kill): Don't close the current process handle or the
16820 current thread handle here. Instead call win32_clear_inferiors.
16821 (win32_detach): Don't open a new handle to the process. Call
16822 win32_clear_inferiors.
16823 (win32_join): Don't rely on current_process_handle; open a new
16824 handle using the process id.
16825 (win32_wait): Call win32_clear_inferiors when the inferior process
16828 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16830 * server.c (monitor_show_help): Add "exit".
16832 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16834 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16835 (clean): Add reg-xtensa.c.
16836 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16837 * configure.srv (xtensa*-*-linux*) New target.
16838 * linux-xtensa-low.c: New.
16839 * xtensa-xtregs.c: New.
16841 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16843 * hostio.c: Don't include errno.h.
16844 (errno_to_fileio_errno): Move to hostio-errno.
16845 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16846 error number outputting to the target->hostio_last_error callback.
16847 (hostio_packet_error): Use FILEIO_EINVAL directly.
16848 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16849 calls to hostio_error.
16850 * hostio-errno.c: New.
16851 * server.h (hostio_last_error_from_errno): Declare.
16852 * target.h (target_ops): Add hostio_last_error member.
16853 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16854 as hostio_last_error handler.
16855 * spu-low.c (spu_target_ops): Likewise.
16856 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16857 (wince_hostio_last_error): New functions.
16858 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16859 as hostio_last_error handler.
16860 (win32_target_ops) [!_WIN32_WCE]: Register
16861 hostio_last_error_from_errno as hostio_last_error handler.
16862 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16863 (hostio-errno.o): New rule.
16864 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16865 * configure.srv (srv_hostio_err_objs): New variable. Default to
16867 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16868 * configure: Regenerate.
16870 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16872 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16873 (linux_kill, linux_detach): Clean up the process list.
16874 * remote-utils.c (remote_open): Improve port number parsing.
16875 (putpkt_binary, input_interrupt): Only send interrupts if the target
16877 * server.c (extended_protocol): Make static.
16878 (attached): Define earlier.
16879 (exit_requested, response_needed, program_argv): New variables.
16880 (target_running): New.
16881 (start_inferior): Clear attached here.
16882 (attach_inferior): Set attached here.
16883 (require_running): Define.
16884 (handle_query): Use require_running and target_running. Implement
16886 (handle_v_attach, handle_v_run): New.
16887 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16888 (gdbserver_usage): Update.
16889 (main): Redo argument parsing. Handle --debug and --multi. Handle
16890 --attach along with other options or after the port. Save
16891 program_argv. Support no initial program. Resynchronize
16892 communication with GDB after an error. Handle "monitor exit".
16893 Use require_running and target_running. Always allow the extended
16894 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16895 restart in extended mode.
16896 * README: Refer to the GDB manual. Update --attach usage.
16898 2007-12-20 Andreas Schwab <schwab@suse.de>
16900 * linux-low.c (STACK_SIZE): Define.
16901 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16902 (linux_test_for_tracefork): Likewise.
16904 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16906 * linux-low.c (linux_wait_for_event): Update messages. Do not
16907 reinsert auto-delete breakpoints.
16908 * mem-break.c (struct breakpoint): Change return type of handler to
16910 (set_breakpoint_at): Update handler type.
16911 (reinsert_breakpoint_handler): Return 1 instead of calling
16913 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16915 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16916 * mem-break.h (set_breakpoint_at): Update handler type.
16917 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16918 * win32-low.c (auto_delete_breakpoint): New.
16919 (get_child_debug_event): Use it.
16921 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16923 * configure.ac: Check for pread and pwrite.
16924 * hostio.c (handle_pread): Fall back to lseek and read.
16925 (handle_pwrite): Fall back to lseek and write.
16926 * config.in, configure: Regenerated.
16928 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16930 * server.c (myresume): Add own_buf argument.
16931 (main): Update calls.
16933 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16935 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16936 * remote-utils.c (remote_open): Do not call disable_async_io.
16937 (block_async_io): Delete.
16938 (unblock_async_io): Make static.
16939 (initialize_async_io): New.
16940 * server.c (handle_v_cont): Handle async I/O here.
16941 (myresume): Likewise. Move other common resume tasks here...
16942 (main): ... from here. Call initialize_async_io. Disable async
16943 I/O before the main loop.
16944 * server.h (initialize_async_io): Declare.
16945 (block_async_io, unblock_async_io): Delete prototypes.
16946 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16948 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16950 * remote-utils.c (readchar): Allow binary data in received messages.
16952 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16954 * win32-low.c (attaching): New global.
16955 (win32_create_inferior): Clear the `attaching' global.
16956 (win32_attach): Set the `attaching' global.
16957 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16958 attaching. Only set a breakpoint at the entry point if not
16961 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16963 * server.c (main): Don't report dll events on the initial
16964 connection on attaches.
16966 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16968 * server.c (main): Relax numerical bases supported for the pid of
16969 the --attach command line argument.
16971 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16973 * win32-low.c (win32_attach): Call OpenProcess before
16974 DebugActiveProcess, not after. Add last error output to error
16977 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16979 * win32-low.c (win32_get_thread_context)
16980 (win32_set_thread_context): New functions.
16981 (thread_rec): Use win32_get_thread_context.
16982 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16983 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16986 2007-12-03 Leo Zayas
16987 Pedro Alves <pedro_alves@portugalmail.pt>
16989 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16991 (child_add_thread): Minor cleanup.
16992 (child_continue): Resume artificially suspended threads before
16993 calling ContinueDebugEvent.
16994 (suspend_one_thread): New.
16995 (fake_breakpoint_event): New.
16996 (get_child_debug_event): Change return type to int. Check here if
16997 gdb sent an interrupt request. If a soft interrupt was requested,
16998 fake a breakpoint event. Return 0 if there is no event to handle,
17000 (win32_wait): Don't check here if gdb sent an interrupt request.
17001 Ensure there is a valid event to handle.
17002 (win32_request_interrupt): Add soft interruption method as last
17005 2007-12-03 Leo Zayas
17006 Pedro Alves <pedro_alves@portugalmail.pt>
17008 * win32-low.h (win32_thread_info): Add descriptions to the
17009 structure members. Replace `suspend_count' counter by a
17011 * win32-low.c (thread_rec): Update condition of when to get the
17012 context from the inferior. Rely on ContextFlags being set if it
17013 has already been retrieved. Only suspend the inferior thread if
17014 we haven't already. Warn if that fails.
17015 (continue_one_thread): s/suspend_count/suspended/. Only call
17016 ResumeThread once. Warn if that fails.
17018 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17020 * win32-low.c (win32_wait): Don't read from the inferior when it
17021 has already exited.
17023 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17025 * Makefile.in (win32_low_h): New variable.
17026 (win32-low.o): Add dependency on $(win32_low_h).
17027 (win32-arm-low.o, win32-i386-low.o): New rules.
17029 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17031 * hostio.c: Correct copyright year.
17033 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17035 * Makefile.in (OBS): Add hostio.o.
17036 (hostio.o): New rule.
17037 * server.h (handle_vFile): Declare.
17038 * hostio.c: New file.
17039 * server.c (handle_v_requests): Take packet_len and new_packet_len
17040 for binary packets. Call handle_vFile.
17041 (main): Update call to handle_v_requests.
17043 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17045 * linux-low.c: Include <sched.h>.
17047 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17049 * linux-low.c (linux_tracefork_grandchild): New.
17050 (linux_tracefork_child): Use clone.
17051 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17053 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17055 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17057 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17059 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17061 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17063 * inferiors.c (change_inferior_id): Delete.
17064 (add_pid_to_list, pull_pid_from_list): New.
17065 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17066 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17067 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17068 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17069 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17070 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17071 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17072 (using_threads): Always set to 1.
17073 (handle_extended_wait): New.
17074 (add_process): Do not set TID.
17075 (linux_create_inferior): Set must_set_ptrace_flags.
17076 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17077 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17078 (linux_thread_alive): Rename TID argument to LWPID.
17079 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17080 (linux_wait_for_event): Do not use TID or check using_threads. Update
17081 call to dead_thread_notify. Call handle_extended_wait.
17082 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17083 (send_sigstop): Delete sigstop_sent.
17084 (wait_for_sigstop): Avoid TID.
17085 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17086 (linux_test_for_tracefork): New.
17087 (linux_lookup_signals): Use thread_db_active and
17088 linux_supports_tracefork_flag.
17089 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17090 * linux-low.h (get_process_thread): Avoid TID.
17091 (struct process_ifo): Move thread_known and tid to the end. Remove
17093 (linux_attach_lwp, thread_db_init): Update prototypes.
17094 * server.h (change_inferior_id): Delete prototype.
17095 (add_pid_to_list, pull_pid_from_list): New prototypes.
17096 * thread-db.c (thread_db_use_events): New.
17097 (find_first_thread): Rename to...
17098 (find_one_thread): ...this. Update callers and messages. Do not
17099 call fatal. Check thread_db_use_events. Do not call
17100 change_inferior_id or new_thread_notify.
17101 (maybe_attach_thread): Update. Do not call new_thread_notify.
17102 (thread_db_init): Set thread_db_use_events. Check use_events.
17103 * utils.c (fatal, warning): Correct message prefix.
17105 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17107 * Makefile.in (clean): Remove new files.
17108 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17109 (powerpc-64.o, powerpc-64.c): New rules.
17110 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17111 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17113 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17115 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17116 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17117 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17118 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17119 (target_regsets): Add AltiVec and SPE register sets.
17120 * configure.ac: Check for AltiVec and SPE.
17121 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17122 (ppc_fill_vrregset, ppc_store_vrregset): New.
17123 (target_regsets): Add AltiVec register set.
17124 * configure: Regenerated.
17126 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17128 * linux-low.c (O_LARGEFILE): Define.
17129 (linux_read_memory): Use /proc/PID/mem.
17130 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17131 * configure, config.in: Regenerated.
17133 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17135 * linux-low.c (linux_wait_for_event): Do not pass signals while
17138 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17140 * win32-low.c (create_process): New.
17141 (win32_create_inferior): Use create_process instead of
17142 CreateProcess. If create_process failed retry appending an ".exe"
17143 suffix. Store the GetLastError result immediatelly after
17144 create_process calls and use it on the call to error.
17146 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17148 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17150 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17152 * configure.ac: Switch license to GPLv3.
17154 2007-08-01 Michael Snyder <msnyder@access-company.com>
17156 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17158 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17160 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17162 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17163 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17164 CloseToolhelp32Snapshot.
17165 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17166 CloseToolhelp32Snapshot.
17168 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17170 * server.c (main): Check for inferior exit before main loop.
17172 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17174 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17175 instead of on tmp_desc.
17177 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17178 Daniel Jacobowitz <dan@codesourcery.com>
17180 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17181 (add_thread): Minor cleanups.
17182 (clear_inferiors): Move lower in the file. Clear the DLL
17184 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17185 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17186 (xml_escape_text): New.
17187 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17189 (handle_v_cont): Report errors.
17190 (gdbserver_version): Update.
17191 (main): Correct size of own_buf. Do not report initial DLL events.
17192 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17193 (unloaded_dll, xml_escape_text): New.
17194 * win32-low.c (enum target_waitkind): Update comments.
17195 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17196 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17197 (win32_EnumProcessModules, win32_GetModuleInformation)
17198 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17199 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17200 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17201 (win32_Module32First, win32_Module32Next, load_toolhelp)
17202 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17203 (get_child_debug_event): Handle DLL events.
17204 (win32_wait): Likewise.
17206 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17208 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17209 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17211 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17213 * win32-low.c (handle_output_debug_string): Ignore event if not
17216 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17218 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17220 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17222 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17224 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17226 * inferiors.c (change_inferior_id): Add comment.
17227 * linux-low.c (check_removed_breakpoint): Add an early
17228 prototype. Improve debug output.
17229 (linux_attach): Doc update.
17230 (linux_detach_one_process, linux_detach): Clean up before releasing
17232 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17233 * linux-low.h (struct process_info): Doc improvement.
17234 * mem-break.c (delete_all_breakpoints): New.
17235 * mem-break.h (delete_all_breakpoints): New prototype.
17236 * thread-db.c (find_first_thread): New.
17237 (thread_db_create_event): Call it instead of
17238 thread_db_find_new_threads. Clean up unused variables.
17239 (maybe_attach_thread): Remove first thread handling.
17240 (thread_db_find_new_threads): Use find_first_thread.
17241 (thread_db_get_tls_address): Likewise.
17243 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17245 * thread-db.c (thread_db_find_new_threads): Add prototype.
17246 (thread_db_create_event): Check for the main thread before adding
17248 (maybe_attach_thread): Only enable event reporting if TID == 0.
17249 (thread_db_get_tls_address): Check for new threads.
17251 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17253 * linux-low.c (linux_create_inferior): Try execv before execvp.
17254 * spu-low.c (spu_create_inferior): Likewise.
17256 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17258 * linux-low.c (linux_create_inferior): Change execv to execvp.
17259 * spu-low.c (spu_create_inferior): Likewies.
17261 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17263 * Makefile.in (clean): Clean new files instead of deleted ones.
17264 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17265 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17267 * configure.srv: Specify XML files and new regformats for MIPS and
17269 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17270 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17271 an entry for the restart register.
17272 (mips_cannot_fetch_register, mips_cannot_store_register)
17273 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17274 register names to match the XML descriptions.
17275 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17276 restart register instead of $0.
17278 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17279 Markus Deuling <deuling@de.ibm.com>
17281 * remote-utils.c (decode_xfer_write): New function.
17282 * server.h (decode_xfer_write): Add prototype.
17283 * server.c (handle_query): Add PACKET_LEN argument. Support
17284 qXfer:spu:read and qXfer:spu:write packets.
17285 (main): Pass packet_len to handle_query.
17286 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17287 * target.h (target_ops): Add qxfer_spu.
17289 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17291 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17292 accessing non-seekable spufs files.
17294 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17296 * server.c (handle_query): Add reply for qC packet.
17298 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17299 Leo Zayas <lerele@champenstudios@com>
17301 * server.h (check_remote_input_interrupt_request): New function.
17302 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17303 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17304 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17305 (check_remote_input_interrupt_request): New function.
17306 * server.h (check_remote_input_interrupt_request): Declare.
17307 * win32-low.c (winapi_DebugBreakProcess,
17308 winapi_GenerateConsoleCtrlEvent): New typedefs.
17309 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17311 (win32_wait): Check for remote interrupt request
17312 with check_remote_input_interrupt_request.
17313 (win32_request_interrupt): New function.
17314 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17316 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17318 * win32-low.c (debug_registers_changed,
17319 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17320 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17321 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17322 (thread_rec): Get context using the low target.
17323 (child_add_thread): Call thread_added on the low target,
17324 which does the same thing.
17326 (do_initial_child_stuff): Remove debug registers references.
17327 Set context using the low target. Resume threads after
17328 setting the contexts.
17329 (child_continue): Remove dead variable. Remove debug
17330 registers references.
17331 (child_fetch_inferior_registers): Go through the low target.
17332 (do_child_store_inferior_registers): Remove.
17333 (child_store_inferior_registers): Go through the low target.
17334 (win32_resume): Remove debug registers references.
17335 Set context using the low target.
17336 (handle_exception): Change return type to void. Don't record
17337 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17338 first chance exception.
17339 (get_child_debug_event): Change return type to void. Remove
17340 goto loop. Always return after waiting for debug event.
17341 (win32_wait): Convert to switch statement. Handle spurious
17344 * win32-i386-low.c (debug_registers_changed,
17345 debug_registers_used): New.
17346 (initial_stuff): Rename to ...
17347 (i386_initial_stuff): ... this. Clear debug registers
17349 (store_debug_registers): Delete.
17350 (i386_get_thread_context): New.
17351 (load_debug_registers): Delete.
17352 (i386_set_thread_context): New.
17353 (i386_thread_added): New.
17354 (single_step): Rename to ...
17355 (i386_single_step): ... this.
17356 (do_fetch_inferior_registers): Rename to ...
17357 (i386_fetch_inferior_register): ... this.
17358 (i386_store_inferior_register): New.
17359 (the_low_target): Adapt to new interface.
17361 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17362 (arm_get_thread_context): New.
17363 (arm_set_thread_context): New.
17365 (do_fetch_inferior_registers): Rename to ...
17366 (arm_fetch_inferior_register): ... this.
17367 (arm_store_inferior_register): New.
17368 (arm_wince_breakpoint): Reimplement as unsigned long.
17369 (arm_wince_breakpoint_len): Define.
17370 (the_low_target): Adapt to new interface.
17372 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17373 load_debug_registers. Add get_thread_context, set_thread_context,
17374 thread_added and store_inferior_register. Rename
17375 fetch_inferior_registers to fetch_inferior_register.
17376 (regptr): Remove declaration.
17378 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17380 * linux-low.c (linux_detach): Change return type to int. Return 0.
17381 * spu-low.c (spu_detach): Likewise.
17383 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17385 * target.h (target_ops): Change return type of detach to int.
17387 (join_inferior): New.
17388 * server.c (main): Don't skip detach support on mingw32.
17389 If the inferior doesn't support detaching return error.
17390 Call join_inferior instead of using waitpid.
17391 * linux-low.c (linux_join): New.
17392 (linux_target_op): Add linux_join.
17393 * spu-low.c (spu_join): New.
17394 (spu_target_ops): Add spu_join.
17395 * win32-low.c (win32_detach): Adapt to new interface.
17396 Reopen current_process_handle before detaching. Issue a child
17397 resume before detaching.
17399 (win32_target_op): Add win32_join.
17401 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17403 * win32-low.c (win32-attach): Fix return value.
17404 * target.h (target_ops): Describe ATTACH return values.
17406 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17408 * win32-low.c (GETPROCADDRESS): Define.
17409 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17410 (winapi_DebugSetProcessKillOnExit): Likewise.
17411 (win32_create_inferior): Force usage of ansi CreateProcessA.
17412 (win32_attach): Use GETPROCADDRESS.
17413 (win32_detach): Likewise.
17415 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17417 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17419 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17421 * win32-low.c: Commit leftover changes from 2007-03-29.
17423 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17425 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17426 fields short instead of int. Add explicit padding.
17427 (i387_cache_to_fsave): Remove unnecessary casts.
17428 (i387_fsave_to_cache): Doc fix.
17429 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17431 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17433 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17434 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17436 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17438 * configure.srv (arm*-*-mingw32ce*): Move near the other
17441 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17443 * configure.ac: Add errno checking.
17444 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17445 sys/file.h and malloc.h.
17446 (AC_CHECK_DECLS): Add perror.
17447 (srv_mingwce): Handle.
17448 * configure.srv (i[34567]86-*-cygwin*): Add
17449 win32-i386-low.o to srv_tgtobj.
17450 (i[34567]86-*-mingw*): Likewise.
17451 (arm*-*-mingw32ce*): Add case.
17452 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17453 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17454 [__MINGW32CE__] (strerror): New function.
17455 [__MINGW32CE__] (errno): Define to GetLastError.
17456 [__MINGW32CE__] (COUNTOF): New macro.
17457 (remote_open): Remove extra close call.
17458 * mem-break.c (delete_breakpoint_at): New function.
17459 * mem-break.h (delete_breakpoint_at): Declare.
17460 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17461 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17462 [USE_WIN32API] (read, write): Add char* casts.
17463 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17464 * server.h: Include wincecompat.h on Windows CE.
17465 [HAVE_ERRNO_H]: Check.
17466 (perror): Declare if not declared.
17467 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17468 (perror_with_name): Remove errno declaration.
17469 * wincecompat.h: New.
17470 * wincecompat.c: New.
17471 * win32-low.h: New.
17472 * win32-arm-low.c: New.
17473 * win32-i386-low.c: New.
17474 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17475 (OUTMSG2): Make it safe.
17477 (COUNTOF): New macro.
17478 (NUM_REGS): Get it from the low target.
17479 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17480 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17481 (thread_rec): Let low target handle debug registers.
17482 (child_add_thread): Likewise.
17483 (child_init_thread_list): Likewise.
17484 (continue_one_thread): Likewise.
17486 (do_child_fetch_inferior_registers): Move to ...
17487 * win32-i386-low.c: ... here, and rename to ...
17488 (do_fetch_inferior_registers): ... this.
17489 * win32-low.c (child_fetch_inferior_registers):
17490 Go through the low target.
17491 (do_child_store_inferior_registers): Use regptr.
17492 (strwinerror): New function.
17493 (win32_create_inferior): Handle Windows CE.
17494 Use strwinerror instead of strerror on Windows error
17495 codes. Add program to the error output.
17496 Don't close the main thread handle on Windows CE.
17497 (win32_attach): Use coredll.dll on Windows CE.
17498 (win32_kill): Close current process and current
17500 (win32_detach): Use coredll.dll on Windows CE.
17501 (win32_resume): Let low target handle debug registers, and
17503 (handle_exception): Add/Remove initial breakpoint. Avoid
17504 non-existant WSTOPSIG on Windows CE.
17505 (win32_read_inferior_memory): Cast to remove warning.
17506 (win32_arch_string): Go through the low target.
17507 (initialize_low): Call set_breakpoint_data with the low
17508 target's breakpoint.
17509 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17510 FOP_REGNUM, mappings): Move to ...
17511 * win32-i386-low.c: ... here.
17512 * win32-low.c (win32_thread_info): Move to ...
17513 * win32-low.h: ... here.
17514 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17515 win32-arm-low.c and wincecompat.c.
17516 (all:): Add $EXEEXT.
17517 (install-only:): Likewise.
17518 (gdbserver:): Likewise.
17519 (gdbreplay:): Likewise.
17520 * config.in: Regenerate.
17521 * configure: Regenerate.
17523 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17525 * win32-low.c: Rename typedef thread_info to
17526 win32_thread_info throughout.
17528 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17530 * win32-i386-low.c: Rename to ...
17531 * win32-low.c: ... this.
17532 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17533 * Makefile.in: Likewise.
17535 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17537 * remote-utils.c (monitor_output): Constify msg parameter.
17538 * server.h (monitor_output): Likewise.
17539 * win32-i386-low.c (handle_output_debug_string): New.
17540 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17541 handle_output_debug_string.
17542 (get_child_debug_event): Likewise.
17544 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17546 * server.c (main): Correct strtoul check.
17548 2007-03-27 Jon Ringle <jon@ringle.org>
17550 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17552 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17554 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17556 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17558 * terminal.h: Check HAVE_SGTTY_H.
17560 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17562 * remote-utils.c (remote_open): Print out the assigned port number.
17564 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17566 * remote-utils.c (monitor_output): New function.
17567 * server.c (debug_threads): Define here.
17568 (monitor_show_help): New function.
17569 (handle_query): Handle qRcmd.
17570 (main): Do not handle 'd' packet.
17571 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17572 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17575 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17577 * Makefile.in (EXEEXT): New.
17578 (clean): Use $(EXEEXT).
17580 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17582 * target.h (target_ops): Rename send_signal to request_interrupt,
17583 and remove enum target_signal parameter.
17584 * linux-low.c (linux_request_interrupt): Rename from
17585 linux_send_signal, and always send SIGINT.
17586 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17587 and always send SIGINT.
17588 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17590 (input_interrupt): Likewise.
17592 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17594 * server.c (get_features_xml): Check if target implemented
17596 * win32-i386-low.c (win32_arch_string): New.
17597 (win32_target_ops): Add win32_arch_string as arch_string member.
17599 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17601 * spu-low.c (spu_arch_string): New.
17602 (spu_target_ops): Add spu_arch_string.
17604 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17606 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17607 * configure.ac: Do not check for terminal.h.
17608 * configure, config.in: Regenerated.
17610 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17612 * Makefile.in (OBS): Add $(XML_BUILTIN).
17613 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17615 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17616 (arm-with-iwmmxt.c): New.
17617 * config.in, configure: Regenerate.
17618 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17619 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17620 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17621 (arm*-*-linux*): Add iWMMXt and regset support.
17622 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17623 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17624 (arm_store_wmmxregset, target_regsets): New.
17625 * server.c (get_features_xml): Take annex argument. Check builtin
17627 (handle_query): Handle multiple annexes.
17629 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17631 * remote-utils.c [USE_WIN32API] (read, write): Define.
17632 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17635 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17637 * linux-i386-low.c (the_low_target): Set arch_string.
17638 * linux-x86-64-low.c (the_low_target): Likewise.
17639 * linux-low.c (linux_arch_string): New.
17640 (linux_target_ops): Add it.
17641 * linux-low.h (struct linux_target_ops): Add arch_string.
17642 * server.c (write_qxfer_response): Use const void * for DATA.
17643 (get_features_xml): New.
17644 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17645 * target.h (struct target_ops): Add arch_string method.
17647 2007-01-03 Denis Pilat <denis.pilat@st.com>
17648 Daniel Jacobowitz <dan@codesourcery.com>
17650 * linux-low.c (linux_kill): Handle being called with no threads.
17651 * win32-i386-low.c (win32_kill): Likewise.
17652 (get_child_debug_event): Clear current_process_handle.
17654 2006-12-30 Denis PILAT <denis.pilat@st.com>
17655 Daniel Jacobowitz <dan@codesourcery.com>
17657 * remote-utils.c (remote_open): Check the type of specified
17658 serial port devices before opening them.
17659 * server.c (main): Kill the inferior if an error occurs during
17660 the first remote_open.
17662 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17664 * README: Update supported targets.
17666 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17668 * Makefile.in (clean): Remove reg-mips64.c.
17669 (reg-mips64.c, reg-mips64.o): New rules.
17670 * configure.srv: Handle mips64. Include regset support for mips.
17671 * linux-mips-low.c (union mips_register): New.
17672 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17673 (mips_breakpoint, mips_breakpoint_at): Use int.
17674 (mips_collect_register, mips_supply_register)
17675 (mips_collect_register_32bit, mips_supply_register_32bit)
17676 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17677 (mips_store_fpregset, target_regsets): New.
17678 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17680 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17682 * configure.srv: Add target "spu*-*-*".
17683 * Makefile.in (clean): Remove reg-spu.c.
17684 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17685 * spu-low.c: New file.
17687 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17689 * configure.ac: Correct td_thr_tls_get_addr test.
17690 * configure: Regenerated.
17692 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17694 * linux-low.c (linux_wait_for_event): Reformat. Use the
17695 pass_signals array.
17696 * remote-utils.c (decode_address_to_semicolon): New.
17697 * server.c (pass_signals, handle_general_set): New.
17698 (handle_query): Mention QPassSignals for qSupported.
17699 (main): Call handle_general_set.
17700 * server.h (pass_signals, decode_address_to_semicolon): New.
17702 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17704 * server.c (handle_query): Correct error handling for read_auxv.
17706 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17708 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17709 and srv_linux_thread_db to yes.
17710 * linux-s390-low.c (s390_fill_gregset): New function.
17711 (target_regsets): Define data structure.
17713 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17715 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17716 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17717 * config.in, configure: Regenerated.
17718 * inferiors.c (gdb_id_to_thread): New function.
17719 (gdb_id_to_thread_id): Use it.
17720 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17721 * linux-low.h (struct process_info): Add th member.
17722 (thread_db_get_tls_address): New prototype.
17723 * remote-utils.c (decode_address): Make non-static.
17724 * server.c (handle_query): Handle qGetTLSAddr.
17725 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17726 * target.h (struct target_ops): Add get_tls_address.
17727 * thread-db.c (maybe_attach_thread): Save the thread handle.
17728 (thread_db_get_tls_address): New.
17730 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17732 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17733 (linux_resume_one_process): Take a siginfo_t *. Update all
17734 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17735 (struct pending_signals): Add a siginfo_t.
17736 (linux_wait_for_process): Always set last_status.
17737 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17738 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17739 * linux-low.h (struct process_info): Add last_status.
17741 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17743 * remote-utils.c (try_rle): New function.
17744 (putpkt_binary): Use it.
17746 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17748 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17749 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17750 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17751 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17752 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17755 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17757 * server.c (terminal_fd): New variable.
17758 (old_foreground_pgrp): Likewise.
17759 (restore_old_foreground_pgrp): New function.
17760 (start_inferior): Record the terminal file descriptor in terminal_fd
17761 and its original foreground group in old_foreground_pgrp. Register
17762 restore_old_foreground_pgrp with atexit().
17764 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17766 * server.c (handle_query): Correct qPart to qXfer.
17768 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17770 * configure.ac: Check for more headers which are missing on
17771 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17772 * configure.srv: Add Cygwin and mingw32.
17773 * remote-utils.c: Don't include headers unconditionally which
17774 are missing on mingw32. Include <winsock.h> for mingw32.
17775 (remote_open): Adjust for mingw32 support. Flush
17776 standard error after writing to it.
17777 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17778 (unblock_async_io, enable_async_io, disable_async_io)
17779 (readchar, getpkt): Update for Winsock support.
17780 (prepare_resume_reply): Expect a protocol signal number.
17781 * server.c: Disable <sys/wait.h> on mingw32.
17782 (start_inferior): Adjust for mingw32 support. Flush
17783 standard error after writing to it.
17784 (attach_inferior): Likewise. Use protocol signal
17786 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17788 * win32-i386-low.c: New file.
17789 * Makefile.in (XM_CLIBS): Set.
17790 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17791 (win32-i386-low.o): New dependency rule.
17792 * linux-low.c (linux_wait): Use target signal numbers.
17793 * target.h (struct target_ops): Doc fix.
17794 * server.h (target_signal_to_name): New prototype.
17795 * gdbreplay.c: Don't include headers unconditionally which
17796 are missing on mingw32. Include <winsock.h> for mingw32.
17797 (remote_close, remote_open): Adjust for Winsock support.
17798 * configure, config.in: Regenerated.
17800 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17802 * server.c (decode_xfer_read, write_qxfer_response): New.
17803 (handle_query): Take a packet length argument. Handle
17804 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17805 the qSupported response.
17806 (main): Update call to handle_query.
17808 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17810 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17811 (putpkt_binary): Renamed from putpkt and adjusted for binary
17813 (putpkt): New wrapper for putpkt_binary.
17814 (readchar): Don't mask off the high bit.
17815 (decode_X_packet): New function.
17816 * server.c (main): Call putpkt_binary if a handler sets the packet
17817 length. Save the length of the incoming packet. Handle 'X'.
17818 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17820 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17822 * server.c (handle_query): Handle qSupported.
17824 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17826 * remote-utils.c (all_symbols_looked_up): New variable.
17827 (look_up_one_symbol): Check it.
17828 * server.h (look_up_one_symbol): New declaration.
17829 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17831 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17833 * Makefile.in (linux-arm-low.o): Update dependencies.
17834 * linux-arm-low.c: Include "gdb_proc_service.h".
17835 (PTRACE_GET_THREAD_AREA): Define.
17836 (ps_get_thread_area): New function.
17838 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17840 * configure.srv (m68k*-*-uclinux*): New target.
17841 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17842 (linux_resume_one_process): Remove extraneous cast.
17843 (linux_read_offsets): New.
17844 (linux_target_op): Add linux_read_offsets on mmuless systems.
17845 * server.c (handle_query): Add qOffsets logic.
17846 * target.h (struct target_ops): Add read_offsets.
17848 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17850 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17851 (PTRACE_GET_THREAD_AREA): Define.
17852 (ps_get_thread_area): New function.
17853 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17854 (linux-x86-64-low.o): Update.
17856 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17858 * configure.ac: Remove checks for prfpregset_t.
17859 * gdb_proc_service.h: New file.
17860 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17861 new "gdb_proc_service.h".
17862 * proc-service.c: Likewise.
17863 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17864 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17865 * Makefile.in (gdb_proc_service_h): Updated.
17866 * configure, config.in: Regenerated.
17868 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17870 * remote-utils.c (prepare_resume_reply): Move declaration
17871 of gdb_id_from_wait to the top of the block.
17873 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17875 * linux-low.c (regsets_store_inferior_registers): Read the regset
17876 from the target before filling it.
17878 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17880 * server.c (attach_inferior): Return SIGTRAP for a successful
17883 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17885 * Makefile.in (OBS): Add version.o.
17886 (STAGESTUFF): Delete.
17887 (version.o): Add dependencies.
17888 (version.c): Replace rule.
17889 (clean): Remove version.c.
17890 * server.c (gdbserver_version): New.
17891 (gdbserver_usage): Use printf.
17892 (main): Handle --version and --help.
17893 * server.h (version, host_name): Add declarations.
17895 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17907 * linux-x86-64-low.c:
17909 * linux-s390-low.c:
17910 * linux-ppc64-low.c:
17912 * linux-mips-low.c:
17913 * linux-m68k-low.c:
17914 * linux-m32r-low.c:
17917 * linux-ia64-low.c:
17918 * linux-i386-low.c:
17919 * linux-crisv32-low.c:
17931 * gdbserver.1: Add (C) after Copyright. Update the FSF
17934 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17936 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17937 (arm_breakpoint_at): Recognize both breakpoints.
17938 (the_low_target): Use the correct breakpoint instruction.
17940 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17942 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17943 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17944 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17945 (the_low_target): Update.
17947 2005-10-25 Andreas Schwab <schwab@suse.de>
17949 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17951 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17952 (ia64_num_regs): Reduce to 462.
17954 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17956 * acinclude.m4: Correct quoting.
17957 * aclocal.m4: Regenerated.
17959 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17960 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17961 (thread_db_init): Call thread_db_err_str.
17962 * configure.ac: Check for TD_VERSION.
17963 * config.in, configure: Regenerated.
17965 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17967 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17969 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17971 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17972 is not available. Define HAVE_PTRACE_GETREGS if it is.
17973 * config.in, configure: Regenerated.
17974 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17975 * linux-i386-low.c, linux-m68k-low.c: Update to use
17976 HAVE_PTRACE_GETREGS.
17977 * linux-low.c (regsets_fetch_inferior_registers)
17978 (regsets_store_inferior_registers): Only return 0 if we processed
17980 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17981 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17983 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17985 * inferiors.c (struct thread_info): Add gdb_id.
17986 (add_thread): Add gdb_id argument.
17987 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17988 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17989 calls to add_thread.
17990 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17991 * server.c (handle_query): Use thread_to_gdb_id.
17992 (handle_v_cont, main): Use gdb_id_to_thread_id.
17993 * server.h (add_thread): Update prototype.
17994 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17997 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17999 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18000 left-padded registers.
18001 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18002 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18004 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18006 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18007 * configure: Regenerate.
18008 * config.in: Regenerate.
18009 * server.h (NEED_DECLARATION_STRERROR):
18010 Replace with !HAVE_DECL_STRERROR.
18012 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18014 * linux-low.c (linux_wait, linux_send_signal): Don't test
18015 an unsigned long variable for > 0 if it could be MAX_ULONG.
18016 * server.c (myresume): Likewise.
18017 * target.c (set_desired_inferior): Likewise.
18019 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18021 * configure.ac: Simplify and improve check for socklen_t.
18022 * configure, config.in: Regenerate.
18024 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18026 * acconfig.h: Remove.
18027 * configure.ac: Add a test for socklen_t. Use three-argument
18028 AC_DEFINE throughout.
18029 * config.in: Regenerated using autoheader 2.59.
18030 * configure: Regenerated.
18032 * gdbreplay.c (socklen_t): Provide a default.
18033 (remote_open): Use socklen_t.
18034 * remote-utils.c (socklen_t): Provide a default.
18035 (remote_open): Use socklen_t.
18036 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18039 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18041 * linux-low.c (linux_read_memory, linux_write_memory)
18042 (linux_read_auxv): Likewise.
18043 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18044 (check_mem_write): Likewise.
18045 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18047 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18048 (registers_from_string, register_data): Likewise.
18049 * server.c (handle_query, main): Likewise.
18050 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18051 (decode_M_packet): Likewise.
18052 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18053 * target.h (struct target_ops): Update read_memory, write_memory,
18055 (read_inferior_memory, write_inferior_memory): Update.
18056 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18057 to unsigned char *.
18058 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18059 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18060 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18061 linux-s390-low.c, linux-sh-low.c: Update for changes in
18062 read_inferior_memory and the_low_target->breakpoint.
18064 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18066 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18067 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18068 * configure.srv: Add powerpc64-*-linux*.
18069 * linux-ppc64-low.c: New file.
18071 2005-05-23 Orjan Friberg <orjanf@axis.com>
18073 * linux-cris-low.c: New file with support for CRIS.
18074 * linux-crisv32-low.c: Ditto for CRISv32.
18075 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18076 (clean): Add reg-cris.c and reg-crisv32.c.
18077 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18078 reg-crisv32.o, and reg-crisv32.c to make rules.
18079 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18080 recognized targets.
18082 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18084 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18085 of sizeof (PTRACE_XFER_TYPE).
18086 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18088 2005-05-12 Orjan Friberg <orjanf@axis.com>
18090 * target.h (struct target_ops): Add insert_watchpoint,
18091 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18092 pointers for hardware watchpoint support.
18093 * linux-low.h (struct linux_target_ops): Ditto.
18094 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18095 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18096 to linux_target_ops.
18097 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18099 * server.c (main): Recognize 'Z' and 'z' packets.
18101 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18103 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18104 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18105 (the_low_target): Add new members.
18107 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18109 * proc-service.c (ps_lgetregs): Search all_processes instead of
18112 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18114 * server.c (start_inferior): Change return type to int.
18115 (attach_inferior): Change sigptr to int *.
18116 (handle_v_cont, handle_v_requests): Change signal to int *.
18117 (main): Change signal to int.
18119 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18121 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18122 * configure.srv: Add m32r*-*-linux*.
18123 * linux-m32r-low.c: New file.
18125 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18127 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18129 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18131 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18132 Take unsigned long arguments for PIDs.
18133 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18134 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18135 (wait_for_sigstop, linux_resume_one_process)
18136 (regsets_fetch_inferior_registers, linux_send_signal)
18137 (linux_read_auxv): Likewise. Update the types of variables holding
18138 PIDs. Update format string specifiers.
18139 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18140 * remote-utils.c (prepare_resume_reply): Likewise.
18141 * server.c (cont_thread, general_thread, step_thread)
18142 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18144 (handle_query): Update format specifiers.
18145 (handle_v_cont, main): Use strtoul for thread IDs.
18146 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18147 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18148 (general_thread, step_thread, thread_from_wait)
18149 (old_thread_from_wait): Update.
18150 * target.h (struct thread_resume): Use unsigned long for THREAD.
18151 (struct target_ops): Use unsigned long for arguments to attach and
18154 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18156 * acinclude.m4: Include bfd/bfd.m4 directly.
18157 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18158 <agriffis@toolchain.org>.
18159 * aclocal.m4, configure: Regenerated.
18161 2005-01-07 Andrew Cagney <cagney@gnu.org>
18163 * configure.ac: Rename configure.in, require autoconf 2.59.
18164 * configure: Re-generate.
18166 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18168 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18169 LIBS when finished.
18170 * aclocal.m4: Regenerated.
18171 * configure: Regenerated.
18173 2004-11-21 Andreas Schwab <schwab@suse.de>
18175 * linux-m68k-low.c (m68k_num_gregs): Define.
18176 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18177 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18178 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18179 (m68k_breakpoint_at): New. Add to the_low_target.
18181 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18182 srv_linux_thread_db to yes.
18184 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18186 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18187 (ARCH_SET_FS): Likewise.
18188 (ARCH_GET_FS): Likewise.
18189 (ARCH_GET_GS): Likewise.
18191 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18193 * linux-i386-low.c (ps_get_thread_area): New.
18194 * linux-x86-64-low.c (ps_get_thread_area): New.
18195 * linux-low.c: Include <sys/syscall.h>.
18196 (linux_kill_one_process): Don't kill the first thread here.
18197 (linux_kill): Kill the first thread here.
18198 (kill_lwp): New function.
18199 (send_sigstop, linux_send_signal): Use it.
18200 * proc-service.c: Clean up #ifdefs.
18201 (fpregset_info): Delete.
18202 (ps_lgetregs): Update and enable implementation.
18203 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18205 * remote-utils.c (struct sym_cache, symbol_cache): New.
18206 (input_interrupt): Print a clearer message.
18207 (async_io_enabled): New variable.
18208 (enable_async_io, disable_async_io): Use it. Update comments.
18209 (look_up_one_symbol): Use the symbol cache.
18210 * thread-db.c (thread_db_look_up_symbols): New function.
18211 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18213 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18215 * configure.in: Test for -rdynamic.
18216 * configure: Regenerated.
18217 * Makefile (INTERNAL_LDFLAGS): New.
18218 (gdbserver, gdbreplay): Use it.
18220 2004-09-02 Andrew Cagney <cagney@gnu.org>
18222 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18224 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18226 * linux-low.c (linux_wait): Clear all_processes list also.
18228 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18230 * linux-low.c: Include <errno.h>. Remove extern declaration of
18233 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18235 * gdbreplay.c, server.h, utils.c: Update copyright years.
18237 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18239 * server.c (main): Print child status or termination signal from
18240 variable 'signal', not 'sig'.
18242 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18244 * linux-low.c (linux_read_memory): Change return type to
18245 int. Check for and return error from ptrace().
18246 * target.c (read_inferior_memory): Change return type to int. Pass
18247 back return status from the_target->read_memory().
18248 * target.h (struct target_ops): Adapt *read_memory() prototype.
18250 (read_inferior_memory): Adapt prototype.
18251 * server.c (main): Return an error packet if
18252 read_inferior_memory() returns an error.
18254 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18256 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18257 Unify with other clean targets.
18259 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18261 * server.c (handle_v_cont): Call set_desired_inferior.
18263 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18265 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18267 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18269 * linux-low.c (linux_wait): Unblock async I/O.
18270 (linux_resume): Block and enable async I/O.
18271 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18272 * server.h (block_async_io, unblock_async_io): Add prototypes.
18274 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18276 * remote-utils.c (remote_open): Print a status notice after
18277 opening a TCP port.
18278 * server.c (attach_inferior): Print a status notice after
18281 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18283 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18285 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18287 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18289 * server.c, target.h: Update copyright years.
18291 2004-02-25 Roland McGrath <roland@redhat.com>
18293 * target.h (struct target_ops): New member `read_auxv'.
18294 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18295 * linux-low.c (linux_read_auxv): New function.
18296 (linux_target_ops): Initialize `read_auxv' member to that.
18298 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18300 Committed by Jim Blandy <jimb@redhat.com>.
18302 * linux-s390-low.c (s390_num_regs): Update.
18303 (s390_regmap): Remove control registers. Use __s390x__ predefine
18304 instead of GPR_SIZE to distiguish s390 and s390x targets.
18306 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18308 * linux-low.c: Update copyright year.
18309 (check_removed_breakpoint): Clear pending_is_breakpoint.
18310 (linux_set_resume_request, linux_queue_one_thread)
18311 (resume_status_pending_p): New functions.
18312 (linux_continue_one_thread): Use process->resume.
18313 (linux_resume): Only resume threads if there are no pending events.
18314 * linux-low.h (struct process_info): Add resume request
18317 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18319 * regcache.c (new_register_cache): Clear the allocated register
18320 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18322 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18324 * linux-low.c (linux_resume): Take a struct thread_resume *
18326 (linux_wait): Update call.
18327 (resume_ptr): New static variable.
18328 (linux_continue_one_thread): Renamed from
18329 linux_continue_one_process. Use resume_ptr.
18330 (linux_resume): Use linux_continue_one_thread.
18331 * server.c (handle_v_cont, handle_v_requests): New functions.
18332 (myresume): New function.
18333 (main): Handle 'v' case.
18334 * target.h (struct thread_resume): New type.
18335 (struct target_ops): Change argument of "resume" to struct
18337 (myresume): Delete macro.
18339 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18341 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18342 (uninstall): Support DESTDIR.
18344 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18346 * configure.srv: Add xscale*linux copy of arm*linux entry.
18348 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18350 * linux-arm-low.c (arm_reinsert_addr): New function.
18351 (the_low_target): Add arm_reinsert_addr.
18353 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18355 * mem-break.c: Remove whitespace at end of file.
18357 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18359 * configure.in: Check whether we need to prototype strerror.
18360 * server.h: Optionally prototype strerror.
18361 * gdbreplay.c (perror_with_name): Use strerror.
18362 * linux-low.c (linux_attach_lwp): Use strerror.
18363 * utils.c (perror_with_name): Use strerror.
18364 * config.in, configure: Regenerated.
18366 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18368 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18369 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18371 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18373 * Makefile.in (SFILES): Update.
18374 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18375 low-sun3.c: Remove files.
18377 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18379 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18380 (linux_detach_one_process, linux_detach): New functions.
18381 (linux_target_ops): Add linux_detach.
18382 * server.c (main): Handle 'D' packet.
18383 * target.h (struct target_ops): Add "detach" member.
18384 (detach_inferior): Define.
18386 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18388 From Kelley Cook <kelleycook@wideopenwest.com>:
18389 * configure.srv: Accept i[34567]86 variants.
18391 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18393 * linux-low.c (linux_wait_for_event): Correct comment typos.
18394 (linux_resume_one_process): Call check_removed_breakpoint.
18395 (linux_send_signal): New function.
18396 (linux_target_ops): Add linux_send_signal.
18397 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18399 * target.h (struct target_ops): Add send_signal.
18401 2003-05-29 Jim Blandy <jimb@redhat.com>
18403 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18404 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18405 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18406 away part of the register's value.
18408 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18410 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18411 (linux_wait_for_event, linux_init_signals): Likewise.
18413 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18415 * configure.in: Check for stdlib.h.
18416 * configure: Regenerated.
18417 * config.in: Regenerated.
18419 2003-01-04 Andreas Schwab <schwab@suse.de>
18421 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18423 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18425 * Makefile.in: Remove obsolete code.
18427 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18429 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18430 defined(PT_FPR0_HI).
18432 2002-11-17 Stuart Hughes <seh@zee2.com>
18434 * linux-arm-low.c (arm_num_regs): Increase.
18435 (arm_regmap): Include status register.
18437 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18439 * linux-low.c (register_addr): Remove incorrect -1 check.
18441 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18443 * linux-low.c (linux_create_inferior): Call setpgid. Return
18445 (unstopped_p, linux_signal_pid): Remove.
18446 (linux_target_ops): Remove linux_signal_pid.
18447 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18448 global instead of target method.
18449 * target.h (struct target_ops): Remove signal_pid. Update comment
18450 for create_inferior.
18451 * server.c (signal_pid): New variable.
18452 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18453 gdbserver. Set the child to be the foreground process group.
18454 (attach_inferior): Set signal_pid.
18456 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18458 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18460 2002-08-20 Jim Blandy <jimb@redhat.com>
18462 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18465 2002-08-01 Andrew Cagney <cagney@redhat.com>
18467 * Makefile.in: Make chill references obsolete.
18469 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18471 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18472 * configure: Regenerate.
18473 * config.in: Regenerate.
18475 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18477 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18478 (perror_with_name, remote_close, remote_open, expect, play): Static.
18480 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18482 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18483 byte offsets instead of an array of indexes.
18484 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18486 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18488 * regcache.c: Add comment.
18490 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18492 * thread-db.c: New file.
18493 * proc-service.c: New file.
18494 * acinclude.m4: New file.
18495 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18496 proc-service.o, and thread-db.o.
18497 (linux-low.o): Add USE_THREAD_DB.
18498 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18499 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18500 * aclocal.m4: Regenerated.
18501 * config.in: Regenerated.
18502 * configure: Regenerated.
18503 * configure.in: Check for proc_service.h, sys/procfs.h,
18504 thread_db.h, and linux/elf.h headrs.
18505 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18506 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18507 Check for -lthread_db and thread support.
18508 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18509 PowerPC, and SuperH.
18510 * i387-fp.c: Constify arguments.
18511 * i387-fp.h: Likewise.
18512 * inferiors.c: (struct thread_info): Renamed from
18513 `struct inferior_info'. Remove PID member. Use generic inferior
18514 list header. All uses updated.
18515 (inferiors, signal_pid): Removed.
18516 (all_threads): New variable.
18517 (get_thread): Define.
18518 (add_inferior_to_list): New function.
18519 (for_each_inferior): New function.
18520 (change_inferior_id): New function.
18521 (add_inferior): Removed.
18522 (remove_inferior): New function.
18523 (add_thread): New function.
18524 (free_one_thread): New function.
18525 (remove_thread): New function.
18526 (clear_inferiors): Use for_each_inferior and free_one_thread.
18527 (find_inferior): New function.
18528 (find_inferior_id): New function.
18529 (inferior_target_data): Update argument type.
18530 (set_inferior_target_data): Likewise.
18531 (inferior_regcache_data): Likewise.
18532 (set_inferior_regcache_data): Likewise.
18533 * linux-low.c (linux_bp_reinsert): Remove.
18534 (all_processes, stopping_threads, using_thrads)
18535 (struct pending_signals, debug_threads, pid_of): New.
18536 (inferior_pid): Replace with macro.
18537 (struct inferior_linux_data): Remove.
18538 (get_stop_pc, add_process): New functions.
18539 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18540 Use add_process and add_thread.
18541 (linux_attach_lwp): New function, based on old linux_attach. Use
18542 add_process and add_thread. Set stop_expected for new threads.
18543 (linux_attach): New function.
18544 (linux_kill_one_process): New function.
18545 (linux_kill): Kill all LWPs.
18546 (linux_thread_alive): Use find_inferior_id.
18547 (check_removed_breakpoints, status_pending_p): New functions.
18548 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18549 Update. Use WNOHANG. Wait for cloned processes also. Update process
18550 struct for the found process.
18551 (linux_wait_for_event): New function.
18552 (linux_wait): Use it. Support LWPs.
18553 (send_sigstop, wait_for_sigstop, stop_all_processes)
18554 (linux_resume_one_process, linux_continue_one_process): New functions.
18555 (linux_resume): Support LWPs.
18556 (REGISTER_RAW_SIZE): Remove.
18557 (fetch_register): Use register_size instead. Call supply_register.
18558 (usr_store_inferior_registers): Likewise. Call collect_register.
18559 Fix recursive case.
18560 (regsets_fetch_inferior_registers): Improve error message.
18561 (regsets_store_inferior_registers): Add debugging.
18562 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18563 (unstopped_p, linux_signal_pid): New functions.
18564 (linux_target_ops): Add linux_signal_pid.
18565 (linux_init_signals): New function.
18566 (initialize_low): Call it. Initialize using_threads.
18567 * regcache.c (inferior_regcache_data): Add valid
18569 (get_regcache): Fetch registers lazily. Add fetch argument
18570 and update all callers.
18571 (regcache_invalidate_one, regcache_invalidate): New
18573 (new_register_cache): Renamed from create_register_cache.
18574 Return the new regcache.
18575 (free_register_cache): Change argument to a void *.
18576 (registers_to_string, registers_from_string): Call get_regcache
18577 with fetch flag set.
18578 (register_data): Make static. Pass fetch flag to get_regcache.
18579 (supply_register): Call get_regcache with fetch flag clear.
18580 (collect_register): Call get_regcache with fetch flag set.
18581 (collect_register_as_string): New function.
18582 * regcache.h: Update.
18583 * remote-utils.c (putpkt): Flush after debug output and use
18585 Handle input interrupts while waiting for an ACK.
18586 (input_interrupt): Use signal_pid method.
18587 (getpkt): Flush after debug output and use stderr.
18588 (outreg): Use collect_register_as_string.
18589 (new_thread_notify, dead_thread_notify): New functions.
18590 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18591 and general_thread.
18592 (look_up_one_symbol): Flush after debug output.
18593 * server.c (step_thread, server_waiting): New variables.
18594 (start_inferior): Don't use signal_pid. Update call to mywait.
18595 (attach_inferior): Update call to mywait.
18596 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18597 (main): Don't fetch/store registers explicitly. Use
18598 set_desired_inferior. Support proposed ``Hs'' packet. Update
18600 * server.h: Update.
18601 (struct inferior_list, struct_inferior_list_entry): New.
18602 * target.c (set_desired_inferior): New.
18603 (write_inferior_memory): Constify.
18604 (mywait): New function.
18605 * target.h: Update.
18606 (struct target_ops): New signal_pid method.
18607 (mywait): Removed macro, added prototype.
18609 * linux-low.h (regset_func): Removed.
18610 (regset_fill_func, regset_store_func): New.
18611 (enum regset_type): New.
18612 (struct regset_info): Add type field. Use new operation types.
18613 (struct linux_target_ops): stop_pc renamed to get_pc.
18614 Add decr_pc_after_break and breakpoint_at.
18615 (get_process, get_thread_proess, get_process_thread)
18616 (strut process_info, all_processes, linux_attach_lwp)
18617 (thread_db_init): New.
18619 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18620 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18621 (the_low_target): Add new members.
18622 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18623 (i386_store_fpxregset): Constify.
18624 (target_regsets): Add new kind identifier.
18625 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18626 (i386_set_pc): Add debugging.
18627 (i386_breakpoint_at): New function.
18628 (the_low_target): Add new members.
18629 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18630 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18631 (mips_breakpoint_at): New.
18632 (the_low_target): Add new members.
18633 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18634 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18635 (the_low_target): Add new members.
18636 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18637 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18638 (the_low_target): Add new members.
18639 * linux-x86-64-low.c (target_regsets): Add new kind
18642 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18644 From Martin Pool <mbp@samba.org>:
18645 * server.c (gdbserver_usage): New function.
18648 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18650 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18651 stop_at -> stop_pc.
18653 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18655 * Makefile.in: Remove obsolete code.
18657 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18659 * linux-low.c (regsets_fetch_inferior_registers),
18660 (regsets_store_inferior_registers): Removed cast to int from
18662 * regcache.h: Added declaration of struct inferior_info.
18664 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18666 * inferiors.c (struct inferior_info): Add regcache_data.
18667 (add_inferior): Call create_register_cache.
18668 (clear_inferiors): Call free_register_cache.
18669 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18670 * regcache.c (struct inferior_regcache_data): New.
18671 (registers): Remove.
18672 (get_regcache): New function.
18673 (create_register_cache, free_register_cache): New functions.
18674 (set_register_cache): Don't initialize the register cache here.
18675 (registers_to_string, registers_from_string, register_data): Call
18677 * regcache.h: Add prototypes.
18678 * server.h: Likewise.
18680 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18682 * mem-break.c: New file.
18683 * mem-break.h: New file.
18684 * Makefile.in: Add mem-break.o rule; update server.h
18686 * inferiors.c (struct inferior_info): Add target_data
18688 (clear_inferiors): Free target_data member if set.
18689 (inferior_target_data, set_inferior_target_data): New functions.
18690 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18691 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18692 * linux-low.c (linux_bp_reinsert): New variable.
18693 (struct inferior_linux_data): New.
18694 (linux_create_inferior): Use set_inferior_target_data.
18695 (linux_attach): Likewise. Call add_inferior.
18696 (linux_wait_for_one_inferior): New function.
18697 (linux_wait): Call it.
18698 (linux_write_memory): Add const.
18699 (initialize_low): Call set_breakpoint_data.
18700 * linux-low.h (struct linux_target_ops): Add breakpoint
18702 * server.c (attach_inferior): Remove extra add_inferior
18704 * server.h: Include mem-break.h. Update inferior.c
18706 * target.c (read_inferior_memory)
18707 (write_inferior_memory): New functions.
18708 * target.h (read_inferior_memory)
18709 (write_inferior_memory): Change macros to prototypes.
18710 (struct target_ops): Update comments. Add const to write_memory
18713 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18715 * linux-low.c (usr_store_inferior_registers): Support
18716 registers which are allowed to fail to store.
18717 * linux-low.h (linux_target_ops): Likewise.
18718 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18719 (ppc_cannot_store_register): FPSCR may not be storable.
18721 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18723 * server.h: Include <string.h> if HAVE_STRING_H.
18724 * ChangeLog: Correct paths in last ChangeLog entry.
18726 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18728 * linux-low.h: Remove obsolete prototypes.
18729 (struct linux_target_ops): New.
18730 (extern the_low_target): New.
18731 * linux-low.c (num_regs, regmap): Remove declarations.
18732 (register_addr): Use the_low_target explicitly.
18733 (fetch_register): Likewise.
18734 (usr_fetch_inferior_registers): Likewise.
18735 (usr_store_inferior_registers): Likewise.
18736 * linux-arm-low.c (num_regs): Remove.
18737 (arm_num_regs): Define.
18738 (arm_regmap): Renamed from regmap, made static.
18739 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18741 (arm_cannot_store_register): Renamed from cannot_store_register,
18743 (the_low_target): New.
18744 * linux-i386-low.c (num_regs): Remove.
18745 (i386_num_regs): Define.
18746 (i386_regmap): Renamed from regmap, made static.
18747 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18749 (i386_cannot_store_register): Renamed from cannot_store_register,
18751 (the_low_target): New.
18752 * linux-ia64-low.c (num_regs): Remove.
18753 (ia64_num_regs): Define.
18754 (ia64_regmap): Renamed from regmap, made static.
18755 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18757 (ia64_cannot_store_register): Renamed from cannot_store_register,
18759 (the_low_target): New.
18760 * linux-m68k-low.c (num_regs): Remove.
18761 (m68k_num_regs): Define.
18762 (m68k_regmap): Renamed from regmap, made static.
18763 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18765 (m68k_cannot_store_register): Renamed from cannot_store_register,
18767 (the_low_target): New.
18768 * linux-mips-low.c (num_regs): Remove.
18769 (mips_num_regs): Define.
18770 (mips_regmap): Renamed from regmap, made static.
18771 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18773 (mips_cannot_store_register): Renamed from cannot_store_register,
18775 (the_low_target): New.
18776 * linux-ppc-low.c (num_regs): Remove.
18777 (ppc_num_regs): Define.
18778 (ppc_regmap): Renamed from regmap, made static.
18779 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18781 (ppc_cannot_store_register): Renamed from cannot_store_register,
18783 (the_low_target): New.
18784 * linux-s390-low.c (num_regs): Remove.
18785 (s390_num_regs): Define.
18786 (s390_regmap): Renamed from regmap, made static.
18787 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18789 (s390_cannot_store_register): Renamed from cannot_store_register,
18791 (the_low_target): New.
18792 * linux-sh-low.c (num_regs): Remove.
18793 (sh_num_regs): Define.
18794 (sh_regmap): Renamed from regmap, made static.
18795 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18797 (sh_cannot_store_register): Renamed from cannot_store_register,
18799 (the_low_target): New.
18800 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18801 (the_low_target): New.
18803 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18805 * Makefile.in: Add stamp-h target.
18806 * configure.in: Create stamp-h.
18807 * configure: Regenerated.
18809 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18811 * inferiors.c: New file.
18812 * target.c: New file.
18813 * target.h: New file.
18814 * Makefile.in: Add target.o and inferiors.o. Update
18816 * linux-low.c (inferior_pid): New static variable,
18817 moved from server.c.
18818 (linux_create_inferior): Renamed from create_inferior.
18819 Call add_inferior. Return 0 on success instead of a PID.
18820 (linux_attach): Renamed from myattach.
18821 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18822 (linux_thread_alive): Renamed from mythread_alive.
18823 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18825 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18826 (regsets_store_inferior_registers): Correct error message.
18827 Add missing ``return 0''.
18828 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18829 (linux_store_registers): Renamed from store_inferior_registers.
18830 (linux_read_memory): Renamed from read_inferior_memory.
18831 (linux_write_memory): Renamed from write_inferior_memory.
18832 (linux_target_ops): New structure.
18833 (initialize_low): Call set_target_ops ().
18834 * remote-utils.c (unhexify): New function.
18835 (hexify): New function.
18836 (input_interrupt): Send signals to ``signal_pid''.
18837 * server.c (inferior_pid): Remove.
18838 (start_inferior): Update create_inferior call.
18839 (attach_inferior): Call add_inferior.
18840 (handle_query): New function.
18841 (main): Call handle_query for `q' packets.
18842 * server.h: Include "target.h". Remove obsolete prototypes.
18843 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18845 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18847 * Makefile.in: Add WARN_CFLAGS. Update configury
18849 * configure.in: Check for <string.h>
18850 * configure: Regenerate.
18851 * config.in: Regenerate.
18852 * gdbreplay.c: Include needed system headers.
18853 (remote_open): Remove strchr prototype.
18854 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18855 * regcache.c (supply_register): Change buf argument to const void *.
18856 (supply_register_by_name): Likewise.
18857 (collect_register): Change buf argument to void *.
18858 (collect_register_by_name): Likewise.
18859 * regcache.h: Add missing prototypes.
18860 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18861 * server.c (handle_query): New function.
18862 (attached): New static variable, moved out of main.
18863 (main): Quiet longjmp clobber warnings.
18864 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18865 * utils.c (error): Remove NORETURN.