1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's hostio_last_error op into a
4 method of process_target.
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 * target.cc: Add "hostio.h" to includes.
9 (process_target::hostio_last_error): Define.
11 Update the derived classes and callers below.
13 * hostio.cc (hostio_error): Update.
14 * linux-low.cc: Remove "hostio.h" from includes.
15 (linux_target_ops): Update.
16 * lynx-low.cc (lynx_target_ops): Update.
17 * nto-low.cc (nto_target_ops): Update.
18 * win32-low.h (class win32_process_target): Update.
19 * win32-low.cc (win32_target_ops): Update.
20 (wince_hostio_last_error): Turn into ...
21 (win32_process_target::hostio_last_error): ... this.
23 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
25 Turn process_stratum_target's get_tls_address op into a method of
28 * target.h (struct process_stratum_target): Remove the target op.
29 (class process_target): Add the target op. Also add
30 'supports_get_tls_address'.
31 * target.cc (process_target::get_tls_address): Define.
32 (process_target::supports_get_tls_address): Define.
34 Update the derived classes and callers below.
36 * server.cc (handle_query): Update.
37 * linux-low.cc (linux_target_ops): Update.
38 (linux_process_target::supports_get_tls_address): Define.
39 (linux_process_target::get_tls_address): Define.
40 * linux-low.h (class linux_process_target): Update.
41 * lynx-low.cc (lynx_target_ops): Update.
42 * nto-low.cc (nto_target_ops): Update.
43 * win32-low.cc (win32_target_ops): Update.
45 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
47 Turn process_stratum_target's read_offsets op into a method of
50 * target.h (struct process_stratum_target): Remove the target op.
51 (class process_target): Add the target op. Also add
52 'supports_read_offsets'.
53 * target.cc (process_target::read_offsets): Define.
54 (process_target::supports_read_offsets): Define.
56 Update the derived classes and callers below.
58 * server.cc (handle_query): Update.
59 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
60 (linux_target_ops): Update.
61 (linux_process_target::supports_read_offsets): Define.
62 (linux_read_offsets): Turn into ...
63 (linux_process_target::read_offsets): ... this.
64 * linux-low.h (class linux_process_target): Update.
65 * lynx-low.cc (lynx_target_ops): Update.
66 * nto-low.cc (nto_target_ops): Update.
67 * win32-low.cc (win32_target_ops): Update.
69 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
71 Turn process_stratum_target's stopped_by_watchpoint and
72 stopped_data_address ops into methods of process_target.
74 * target.h (struct process_stratum_target): Remove the target ops.
75 (class process_target): Add the target ops.
76 * target.cc (process_target::stopped_by_watchpoint): Define.
77 (process_target::stopped_data_address): Define.
79 Update the derived classes and callers below.
81 * remote-utils.cc (prepare_resume_reply): Update.
82 * linux-low.cc (linux_target_ops): Update.
83 (linux_stopped_by_watchpoint): Turn into ...
84 (linux_process_target::stopped_by_watchpoint): ... this.
85 (linux_stopped_data_address): Turn into ...
86 (linux_process_target::stopped_data_address): ... this.
87 * linux-low.h (class linux_process_target): Update.
88 * lynx-low.cc (lynx_target_ops): Update.
89 * nto-low.cc (nto_target_ops): Update.
90 (nto_stopped_by_watchpoint): Turn into ...
91 (nto_process_target::stopped_by_watchpoint): ... this.
92 (nto_stopped_data_address): Turn into ...
93 (nto_process_target::stopped_data_address): ... this.
94 * nto-low.h (class nto_process_target): Update.
95 * win32-low.cc (win32_target_ops): Update.
96 (win32_stopped_by_watchpoint): Turn into ...
97 (win32_process_target::stopped_by_watchpoint): ... this.
98 (win32_stopped_data_address): Turn into ...
99 (win32_process_target::stopped_data_address): ... this.
100 * win32-low.h (class win32_process_target): Update.
102 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
104 Turn process_stratum_target's supports_hardware_single_step op into
105 a method of process_target.
107 * target.h (struct process_stratum_target): Remove the target op.
108 (class process_target): Add the target op.
109 (target_supports_hardware_single_step): Update the macro.
110 (target_can_do_hardware_single_step): Remove declaration.
111 * target.cc (process_target::supports_hardware_single_step): Define.
112 (target_can_do_hardware_single_step): Remove.
114 Update the derived classes and callers below.
116 * linux-low.h (class linux_process_target): Update.
117 * linux-low.cc (linux_target_ops): Update.
118 (linux_supports_hardware_single_step): Turn into ...
119 (linux_process_target::supports_hardware_single_step): ... this.
120 * lynx-low.h (class lynx_process_target): Update.
121 * lynx-low.cc (lynx_target_ops): Update.
122 (lynx_process_target::supports_hardware_single_step): Define.
123 * nto-low.h (class nto_process_target): Update.
124 * nto-low.cc (nto_target_ops): Update.
125 (nto_process_target::supports_hardware_single_step): Define.
126 * win32-low.h (class win32_process_target): Update.
127 * win32-low.cc (win32_target_ops): Update.
128 (win32_process_target::supports_hardware_single_step): Define.
130 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
132 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
133 ops into methods of process_target.
135 * target.h (struct process_stratum_target): Remove the target ops.
136 (class process_target): Add the target ops.
137 (target_stopped_by_hw_breakpoint): Update the macro.
138 (target_supports_stopped_by_hw_breakpoint): Update the macro.
139 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
140 (process_target::supports_stopped_by_hw_breakpoint): Define.
142 Update the derived classes and callers below.
144 * linux-low.cc (linux_target_ops): Update.
145 (linux_stopped_by_hw_breakpoint): Turn into ...
146 (linux_process_target::stopped_by_hw_breakpoint): ... this.
147 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
148 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
149 * linux-low.h (class linux_process_target): Update.
150 * lynx-low.cc (lynx_target_ops): Update.
151 * nto-low.cc (nto_target_ops): Update.
152 * win32-low.cc (win32_target_ops): Update.
154 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
156 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
157 ops into methods of process_target.
159 * target.h (struct process_stratum_target): Remove the target ops.
160 (class process_target): Add the target ops.
161 (target_stopped_by_sw_breakpoint): Update the macro.
162 (target_supports_stopped_by_sw_breakpoint): Update the macro.
163 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
164 (process_target::supports_stopped_by_sw_breakpoint): Define.
166 Update the derived classes and callers below.
168 * linux-low.cc (linux_target_ops): Update.
169 (linux_stopped_by_sw_breakpoint): Turn into ...
170 (linux_process_target::stopped_by_sw_breakpoint): ... this.
171 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
172 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
173 * linux-low.h (class linux_process_target): Update.
174 * lynx-low.cc (lynx_target_ops): Update.
175 * nto-low.cc (nto_target_ops): Update.
176 * win32-low.cc (win32_target_ops): Update.
178 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
180 Turn process_stratum_target's insert_point and remove_point ops
181 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.cc (process_target::insert_point): Define.
186 (process_target::remove_point): Define.
188 Update the derived classes and callers below.
190 * mem-break.cc (set_raw_breakpoint_at): Update.
191 (delete_raw_breakpoint): Update.
192 (uninsert_raw_breakpoint): Update.
193 (reinsert_raw_breakpoint): Update.
194 * linux-low.cc (linux_target_ops): Update.
195 (linux_insert_point): Turn into ...
196 (linux_process_target::insert_point): ... this.
197 (linux_remove_point): Turn into ...
198 (linux_process_target::remove_point): ... this.
199 * linux-low.h (class linux_process_target): Update.
200 * lynx-low.cc (lynx_target_ops): Update.
201 * nto-low.cc (nto_target_ops): Update.
202 (nto_insert_point): Turn into ...
203 (nto_process_target::insert_point): ... this.
204 (nto_remove_point): Turn into ...
205 (nto_process_target::remove_point): ... this.
206 * nto-low.h (class nto_process_target): Update.
207 * win32-low.cc (win32_target_ops): Update.
208 (win32_insert_point): Turn into ...
209 (win32_process_target::insert_point): ... this.
210 (win32_remove_point): Turn into ...
211 (win32_process_target::remove_point): ... this.
212 * win32-low.h (class win32_process_target): Update.
214 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
216 Turn process_stratum_target's supports_z_point_type op into a
217 method of process_target.
219 * target.h (struct process_stratum_target): Remove the target op.
220 (class process_target): Add the target op.
221 * target.cc (process_target::supports_z_point_type): Define.
223 Update the derived classes and callers below.
225 * mem-break.cc (z_type_supported): Update.
226 * linux-low.cc (linux_target_ops): Update.
227 (linux_supports_z_point_type): Turn into ...
228 (linux_process_target::supports_z_point_type): ... this.
229 * linux-low.h (class linux_process_target): Update.
230 * lynx-low.cc (lynx_target_ops): Update.
231 * nto-low.cc (nto_target_ops): Update.
232 (nto_supports_z_point_type): Turn into ...
233 (nto_process_target::supports_z_point_type): ... this.
234 * nto-low.h (class nto_process_target): Update.
235 * win32-low.cc (win32_target_ops): Update.
236 (win32_supports_z_point_type): Turn into ...
237 (win32_process_target::supports_z_point_type): ... this.
238 * win32-low.h (class win32_process_target): Update.
240 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
242 Turn process_stratum_target's read_auxv op into a method of
245 * target.h (class process_stratum_target): Remove the target op.
246 (struct process_target): Add the target op. Also add
247 'supports_read_auxv'.
248 * target.cc (process_target::read_auxv): Define.
249 (process_target::supports_read_auxv): Define.
251 Update the derived classes and callers below.
253 * server.cc (handle_qxfer_auxv): Update.
254 (handle_query): Update.
255 * linux-low.cc (linux_target_ops): Update.
256 (linux_process_target::supports_read_auxv): Define.
257 (linux_read_auxv): Turn into ...
258 (linux_process_target::read_auxv): ... this.
259 * linux-low.h (class linux_process_target): Update.
260 * lynx-low.cc (lynx_target_ops): Update.
261 * nto-low.cc (nto_target_ops): Update.
262 (nto_process_target::supports_read_auxv): Define.
263 (nto_read_auxv): Turn into ...
264 (nto_process_target::read_auxv): ... this.
265 * nto-low.h (class nto_process_target): Update.
266 * win32-low.cc (win32_target_ops): Update.
268 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
270 Turn process_stratum_target's request_interrupt op into a method of
273 * target.h (struct process_stratum_target): Remove the target op.
274 (class process_target): Add the target op.
276 Update the derived classes and callers below.
278 * remote-utils.cc (putpkt_binary_1): Update.
279 (input_interrupt): Update.
281 * server.cc (handle_v_requests): Update.
282 * linux-low.cc (linux_target_ops): Update.
283 (linux_request_interrupt): Turn into ...
284 (linux_process_target::request_interrupt): ... this.
285 * linux-low.h (class linux_process_target): Update.
286 * lynx-low.cc (lynx_target_ops): Update.
287 (lynx_request_interrupt): Turn into ...
288 (lynx_process_target::request_interrupt): ... this.
289 * lynx-low.h (class lynx_process_target): Update.
290 * nto-low.cc (nto_target_ops): Update.
291 (nto_request_interrupt): Turn into ...
292 (nto_process_target::request_interrupt): ... this.
293 * nto-low.h (class nto_process_target): Update.
294 * win32-low.cc (win32_target_ops): Update.
295 (win32_request_interrupt): Turn into ...
296 (win32_process_target::request_interrupt): ... this.
297 * win32-low.h (class win32_process_target): Update.
299 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
301 Turn process_stratum_target's look_up_symbols op into a method of
304 * target.h (struct process_stratum_target): Remove the target op.
305 (class process_target): Add the target op.
306 * target.cc (process_target::look_up_symbols): Define.
308 Update the derived classes and callers below.
310 * server.cc (handle_query): Update.
311 * linux-low.cc (linux_target_ops): Update.
312 (linux_look_up_symbols): Turn into ...
313 (linux_process_target::look_up_symbols): ... this.
314 * linux-low.h (class linux_process_target): Update.
315 * lynx-low.cc (lynx_target_ops): Update.
316 * nto-low.cc (nto_target_ops): Update.
317 * win32-low.cc (win32_target_ops): Update.
319 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
321 Turn process_stratum_target's read_memory and write_memory
322 ops into methods of process_target.
324 * target.h (struct process_stratum_target): Remove the target ops.
325 (class process_target): Add the target ops.
327 Update the derived classes and callers below.
329 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
330 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
331 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
332 (arm_get_syscall_trapinfo): Update.
333 * linux-cris-low.cc (cris_breakpoint_at): Update.
334 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
335 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
336 * linux-mips-low.cc (mips_breakpoint_at): Update.
337 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
338 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
339 * linux-sh-low.cc (sh_breakpoint_at): Update.
340 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
341 (sparc_store_gregset_from_stack): Update.
342 (sparc_breakpoint_at): Update.
343 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
344 * linux-tile-low.cc (tile_breakpoint_at): Update.
345 * linux-x86-low.cc (x86_breakpoint_at): Update.
346 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
347 * mem-brea.cc (insert_memory_breakpoint): Update.
348 (validate_inserted_breakpoint): Update.
349 * target.cc (read_inferior_memory): Update.
350 (target_write_memory): Update.
351 * linux-low.cc (linux_target_ops): Update.
352 (linux_read_memory): Make a wrapper around the read_memory target
354 (linux_process_target::read_memory): Rename from linux_read_memory.
355 (linux_write_memory): Turn into ...
356 (linux_process_target::write_memory): ... this.
357 * linux-low.h (class linux_process_target): Update.
358 * lynx-low.cc (lynx_target_ops): Update.
359 (lynx_read_memory): Turn into ...
360 (lynx_process_target::read_memory): ... this.
361 (lynx_write_memory): Turn into ...
362 (lynx_process_target::write_memory): ... this.
363 * lynx-low.h (class lynx_process_target): Update.
364 * nto-low.cc (nto_target_ops): Update.
365 (nto_read_memory): Turn into ...
366 (nto_process_target::read_memory): ... this.
367 (nto_write_memory): Turn into ...
368 (nto_process_target::write_memory): ... this.
369 * nto-low.h (class nto_process_target): Update.
370 * win32-low.cc (win32_target_ops): Update.
371 (win32_read_inferior_memory): Turn into ...
372 (win32_process_target::read_memory): ... this.
373 (win32_write_inferior_memory): Turn into ...
374 (win32_process_target::write_memory): ... this.
375 * win32-low.h (class win32_process_target): Update.
377 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
379 Turn process_stratum_target's prepare_to_access_memory and
380 done_accessing_memory ops into methods of process_target.
382 * target.h (struct process_stratum_target): Remove the target ops.
383 (class process_target): Add the target ops.
384 * target.cc (process_target::prepare_to_access_memory): Define.
385 (process_target::done_accessing_memory): Define.
386 (prepare_to_access_memory): Update.
387 (done_accessing_memory): Update.
389 Update the derived classes and callers below.
391 * linux-low.cc (linux_target_ops): Update.
392 (linux_prepare_to_access_memory): Turn into ...
393 (linux_process_target::prepare_to_access_memory): ... this.
394 (linux_done_accessing_memory): Turn into ...
395 (linux_process_target::done_accessing_memory): ... this.
396 * linux-low.h (class linux_process_target): Update.
397 * lynx-low.cc (lynx_target_ops): Update.
398 * nto-low.cc (nto_target_ops): Update.
399 * win32-low.cc (win32_target_ops): Update.
401 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
403 Turn process_stratum_target's fetch_registers and store_registers
404 ops into methods of process_target.
406 * target.h (struct process_stratum_target): Remove the target ops.
407 (class process_target): Add the target ops.
408 (fetch_inferior_registers): Update the macro.
409 (store_inferior_registers): Update the macro.
411 Update the derived classes and callers below.
413 * linux-low.cc (linux_target_ops): Update.
414 (linux_fetch_registers): Turn into ...
415 (linux_process_target::fetch_registers): ... this.
416 (linux_store_registers): Turn into ...
417 (linux_process_target::store_registers): ... this.
418 * linux-low.h (class linux_process_target): Update.
419 * lynx-low.cc (lynx_target_ops): Update.
420 (lynx_fetch_registers): Turn into ...
421 (lynx_process_target::fetch_registers): ... this.
422 (lynx_store_registers): Turn into ...
423 (lynx_process_target::store_registers): ... this.
424 * lynx-low.h (class lynx_process_target): Update.
425 * nto-low.cc (nto_target_ops): Update.
426 (nto_fetch_registers): Turn into ...
427 (nto_process_target::fetch_registers): ... this.
428 (nto_store_registers): Turn into ...
429 (nto_process_target::store_registers): ... this.
430 * nto-low.h (class nto_process_target): Update.
431 * win32-low.cc (win32_target_ops): Update.
432 (win32_fetch_inferior_registers): Turn into ...
433 (win32_process_target::fetch_registers): ... this.
434 (win32_store_inferior_registers): Turn into ...
435 (win32_process_target::store_registers): ... this.
436 * win32-low.h (class win32_process_target): Update.
438 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
440 Turn process_stratum_target's wait op into a method of
443 * target.h (struct process_stratum_target): Remove the target op.
444 (class process_target): Add the target op.
446 Update the derived classes and callers below.
448 * target.cc (target_wait): Update.
449 * linux-low.cc (linux_target_ops): Update.
450 (linux_wait): Turn into ...
451 (linux_process_target::wait): ... this.
452 * linux-low.h (class linux_process_target): Update.
453 * lynx-low.cc (lynx_target_ops): Update.
454 (lynx_wait): Turn into ...
455 (lynx_process_target::wait): ... this.
456 * lynx-low.h (class lynx_process_target): Update.
457 * nto-low.cc (nto_target_ops): Update.
458 (nto_wait): Turn into ...
459 (nto_process_target::wait): ... this.
460 * nto-low.h (class nto_process_target): Update.
461 * win32-low.cc (win32_target_ops): Update.
462 (win32_wait): Turn into ...
463 (win32_process_target::wait): ... this.
464 (do_initial_child_stuff): Update.
465 * win32-low.h (class win32_process_target): Update.
467 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
469 Turn process_stratum_target's resume op into a method of
472 * target.h (struct process_stratum_target): Remove the target op.
473 (class process_target): Add the target op.
475 Update the derived classes and callers below.
477 * server.cc (resume): Update.
478 * target.cc (target_stop_and_wait): Update.
479 (target_continue_no_signal): Update.
480 (target_continue): Update.
481 * linux-low.cc (linux_target_ops): Update.
482 (linux_resume): Turn into ...
483 (linux_process_target::resume): ... this.
484 * linux-low.h (class linux_process_target): Update.
485 * lynx-low.cc (lynx_target_ops): Update.
486 (lynx_resume): Turn into ...
487 (lynx_process_target::resume): ... this.
488 * lynx-low.h (class lynx_process_target): Update.
489 * nto-low.cc (nto_target_ops): Update.
490 (nto_resume): Turn into ...
491 (nto_process_target::resume): ... this.
492 * nto-low.h (class nto_process_target): Update.
493 * win32-low.cc (win32_target_ops): Update.
494 (win32_resume): Turn into ...
495 (win32_process_target::resume): ... this.
496 (win32_process_target::detach): Update.
497 (do_initial_child_stuff): Update.
498 * win32-low.h (class win32_process_target): Update.
500 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
502 Turn process_stratum_target's thread_alive op into a method of
505 * target.h (struct process_stratum_target): Remove the target op.
506 (class process_target): Add the target op.
507 (mythread_alive): Update the macro.
509 Update the derived classes and callers below.
511 * linux-low.cc (linux_target_ops): Update.
512 (linux_thread_alive): Turn into ...
513 (linux_process_target::thread_alive): ... this.
514 (wait_for_sigstop): Update.
515 * linux-low.h (class linux_process_target): Update.
516 * lynx-low.cc (lynx_target_ops): Update.
517 (lynx_thread_alive): Turn into ...
518 (lynx_process_target::thread_alive): ... this.
519 * lynx-low.h (class lynx_process_target): Update.
520 * nto-low.cc (nto_target_ops): Update.
521 (nto_thread_alive): Turn into ...
522 (nto_process_target::thread_alive): ... this.
523 * nto-low.h (class nto_process_target): Update.
524 * win32-low.cc (win32_target_ops): Update.
525 (win32_thread_alive): Turn into ...
526 (win32_process_target::thread_alive): ... this.
527 * win32-low.h (class win32_process_target): Update.
529 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
531 Turn process_stratum_target's join op into a method of
534 * target.h (struct process_stratum_target): Remove the target op.
535 (class process_target): Add the target op.
536 (join_inferior): Update the macro.
538 Update the derived classes and callers below.
540 * linux-low.cc (linux_target_ops): Update.
541 (linux_join): Turn into ...
542 (linux_process_target::join): ... this.
543 * linux-low.h (class linux_process_target): Update.
544 * lynx-low.cc (lynx_target_ops): Update.
545 (lynx_join): Turn into ...
546 (lynx_process_target::join): ... this.
547 * lynx-low.h (class lynx_process_target): Update.
548 * nto-low.cc (nto_target_ops): Update.
549 (nto_process_target::join): Define.
550 * nto-low.h (class nto_process_target): Update.
551 * win32-low.cc (win32_target_ops): Update.
552 (win32_join): Turn into ...
553 (win32_process_target::join): ... this.
554 * win32-low.h (class win32_process_target): Update.
556 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
558 Turn process_stratum_target's mourn op into a method of
561 * target.h (struct process_stratum_target): Remove the target op.
562 (class process_target): Add the target op.
564 Update the derived classes and callers below.
566 * target.cc (target_mourn_inferior): Update.
567 * linux-low.cc (linux_target_ops): Update.
568 (linux_mourn): Turn into ...
569 (linux_process_target::mourn): ... this.
570 (handle_extended_wait): Update.
571 (linux_process_target::kill): Update.
572 (linux_process_target::detach): Update.
573 * linux-low.h (class linux_process_target): Update.
574 * lynx-low.cc (lynx_target_ops): Update.
575 (lynx_mourn): Turn into ...
576 (lynx_process_target::mourn): ... this.
577 * lynx-low.h (class lynx_process_target): Update.
578 * nto-low.cc (nto_target_ops): Update.
579 (nto_mourn): Turn into ...
580 (nto_process_target::mourn): ... this.
581 * nto-low.h (class nto_process_target): Update.
582 * win32-low.cc (win32_target_ops): Update.
583 (win32_mourn): Turn into ...
584 (win32_process_target::mourn): ... this.
585 * win32-low.h (class win32_process_target): Update.
587 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
589 Turn process_stratum_target's detach op into a method of
592 * target.h (struct process_stratum_target): Remove the target op.
593 (class process_target): Add the target op.
594 (detach_inferior): Update the macro.
596 Update the derived classes and callers below.
598 * linux-low.cc (linux_target_ops): Update.
599 (linux_detach): Turn into ...
600 (linux_process_target::detach): ... this.
601 * linux-low.h (class linux_process_target): Update.
602 * lynx-low.cc (lynx_target_ops): Update.
603 (lynx_detach): Turn into ...
604 (lynx_process_target::detach): ... this.
605 * lynx-low.h (class lynx_process_target): Update.
606 * nto-low.cc (nto_target_ops): Update.
607 (nto_detach): Turn into ...
608 (nto_process_target::detach): ... this.
609 * nto-low.h (class nto_process_target): Update.
610 * win32-low.cc (win32_target_ops): Update.
611 (win32_detach): Turn into ...
612 (win32_process_target::detach): ... this.
613 * win32-low.h (class win32_process_target): Update.
615 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
617 Turn process_stratum_target's kill op into a method of
620 * target.h (struct process_stratum_target): Remove the target op.
621 (class process_target): Add the target op.
623 Update the derived classes and callers below.
625 * target.cc (kill_inferior): Update.
626 * linux-low.cc (linux_target_ops): Update.
627 (linux_kill): Turn into ...
628 (linux_process_target::kill): ... this.
629 * linux-low.h (class linux_process_target): Update.
630 * lynx-low.cc (lynx_target_ops): Update.
631 (lynx_kill): Turn into ...
632 (lynx_process_target::kill): ... this.
633 * lynx-low.h (class lynx_process_target): Update.
634 * nto-low.cc (nto_target_ops): Update.
635 (nto_kill): Turn into ...
636 (nto_process_target::kill): ... this.
637 * nto-low.h (class nto_process_target): Update.
638 * win32-low.cc (win32_target_ops): Update.
639 (win32_kill): Turn into ...
640 (win32_process_target::kill): ... this.
641 * win32-low.h (class win32_process_target): Update.
643 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
645 Turn process_stratum_target's attach op into a method of
648 * target.h (struct process_stratum_target): Remove the target op.
649 (class process_target): Add the target op.
650 (myattach): Update the macro.
652 Update the derived classes and callers below.
654 * linux-low.cc (linux_target_ops): Update.
655 (linux_attach): Turn into ...
656 (linux_process_target::attach): ... this.
657 * linux-low.h (class linux_process_target): Update.
658 * lynx-low.cc (lynx_target_ops): Update.
659 (lynx_attach): Turn into ...
660 (lynx_process_target::attach): ... this.
661 * lynx-low.h (class lynx_process_target): Update.
662 * nto-low.cc (nto_target_ops): Update.
663 (nto_attach): Turn into ...
664 (nto_process_target::attach): ... this.
665 * nto-low.h (class nto_process_target): Update.
666 * win32-low.cc (win32_target_ops): Update.
667 (win32_attach): Turn into ...
668 (win32_process_target::attach): ... this.
669 * win32-low.h (class win32_process_target): Update.
671 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
673 Turn process_stratum_target's post_create_inferior op into a method
676 * target.h (struct process_stratum_target): Remove the target op.
677 (class process_target): Add the target op.
678 (target_post_create_inferior): Update the macro.
679 * target.cc (process_target::post_create_inferior): Define.
681 Update the derived classes and callers below.
683 * linux-low.cc (linux_target_ops): Update.
684 (linux_post_create_inferior): Turn into ...
685 (linux_process_target::post_create_inferior): ... this.
686 * linux-low.h (class linux_process_target): Update.
687 * lynx-low.cc (lynx_target_ops): Update.
688 * nto-low.cc (nto_target_ops): Update.
689 * win32-low.cc (win32_target_ops): Update.
691 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
693 Turn process_stratum_target's create_inferior 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 (create_inferior): Rename the macro to ...
699 (target_create_inferior): ... this.
701 Update the derived classes and callers below.
703 * server.cc (handle_v_run): Update.
704 (captured_main): Update.
705 (process_serial_event): Update.
706 * linux-low.cc (linux_target_ops): Update.
707 (linux_create_inferior): Turn into ...
708 (linux_process_target::create_inferior): ... this.
709 * linux-low.h (class linux_process_target): Update.
710 * lynx-low.cc (lynx_target_ops): Update.
711 (lynx_create_inferior): Turn into ...
712 (lynx_process_target::create_inferior): ... this.
713 * lynx-low.h (class lynx_process_target): Update.
714 * nto-low.cc (nto_target_ops): Update.
715 (nto_create_inferior): Turn into ...
716 (nto_process_target::create_inferior): ... this.
717 * nto-low.h (class nto_process_target): Update.
718 * win32-low.cc (win32_target_ops): Update.
719 (win32_create_inferior): Turn into ...
720 (win32_process_target::create_inferior): ... this.
721 * win32-low.h (class win32_process_target): Update.
723 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
725 * target.h (class process_target): New class definition.
726 (struct process_stratum_target) <pt>: New field with type
728 * linux-low.h (class linux_process_target): Define as a derived
729 class of 'process_target'.
730 * linux-low.cc (linux_target_ops): Add a linux_process_target*
732 * lynx-low.h (class lynx_process_target): Define as a derived
733 class of 'process_target'.
734 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
736 * nto-low.h (class nto_process_target): Define as a derived
737 class of 'process_target'.
738 * nto-low.cc (nto_target_ops): Add an nto_process_target*
740 * win32-low.h (class win32_process_target): Define as a derived
741 class of 'process_target'.
742 * win32-low.cc (win32_target_ops): Add a win32_process_target*
745 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
747 * configure: Regenerate.
749 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
750 Andrew Burgess <andrew.burgess@embecosm.com>
752 * linux-riscv-low.cc: New file.
753 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
754 and nat/riscv-linux-tdesc.c.
755 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
756 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
759 2020-02-14 Tom Tromey <tom@tromey.com>
761 * acinclude.m4: Don't include acx_configure_dir.m4.
762 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
763 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
764 (all, install-only, uninstall, clean-info, clean)
765 (maintainer-clean): Don't recurse.
766 (subdir_do, all-lib): Remove.
767 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
769 (generated_files): Update.
770 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
771 * configure: Rebuild.
772 * configure.ac: Don't configure gnulib or libiberty.
775 2020-02-14 Eli Zaretskii <eliz@gnu.org>
777 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
778 preparing the command line for CreateProcess.
779 (win32_create_inferior): Reflect the program name in debugging
780 output that shows the process and its command line.
782 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
784 * Makefile.in: Rename source files from .c to .cc.
785 * %.c: Rename to %.cc.
786 * configure.ac: Rename server.c to server.cc.
787 * configure: Re-generate.
789 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
791 * Makefile.in: Rename gdbsupport source files from .c to .cc.
793 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
795 * win32-low.c (win32_create_inferior): Set signal_pid.
797 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
798 Pedro Alves <palves@redhat.com>
800 Skip building gdbserver in a cross-configuration.
801 * configure.srv: Set $gdbserver_host depending on whether $target
802 is $host. Use $gdbserver_host instead of $host.
804 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
806 * configure: Re-generate.
808 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
810 * configure: Re-generate.
812 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
814 * acinclude.m4: Update warning.m4 path.
816 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
818 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
819 (handle_exception): Set siginfo_er.
820 (win32_xfer_siginfo): New function.
822 2020-02-07 Tom Tromey <tom@tromey.com>
823 Pedro Alves <palves@redhat.com>
825 * README: Update build documentation.
826 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
828 * configure.ac: Update paths.
829 * configure: Rebuild.
830 * acinclude.m4: Update paths.
831 * Makefile.in: Update include paths.
832 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
833 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
834 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
835 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
836 (%-generated.c): Update paths.
837 * Move entire directory from ../gdb/gdbserver.
839 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
841 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
843 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
845 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
846 assignment instead of srv_linux_obj.
848 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
850 * server.c (handle_qxfer_libraries): Write segment-address with
853 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
855 * Makefile.in (install-strip): New target.
856 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
857 * aclocal.m4: Regenerate.
858 * configure: Regenerate.
859 * configure.ac: Add AM_PROG_INSTALL_STRIP.
861 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
863 * Makefile.in (SFILES): Adjust paths to point to real files.
864 (OBS): Move waitstatus.o to target/waitstatus.o.
865 (TAGS): Transform paths appropriately.
867 (nat/%.o): ... this pattern rule.
869 (target/%.o): ... this pattern rule.
870 * configure.srv: Adjust paths throughout to include nat/ prefix
871 with the revant files.
872 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
873 * configure: Regenerate.
875 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
877 * Makefile.in (TAGS): Remove config files from the recipe.
879 2020-01-14 Tom Tromey <tom@tromey.com>
881 * configure: Rebuild.
882 * configure.ac: Remove any checks that were added to common.m4.
883 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
886 2020-01-14 Tom Tromey <tom@tromey.com>
888 * server.h: Include config.h.
889 * gdbreplay.c: Include config.h.
890 * configure: Rebuild.
891 * configure.ac: Don't source common.host.
892 * acinclude.m4: Update path.
893 * Makefile.in (INCSUPPORT): New variable.
894 (INCLUDE_CFLAGS): Add INCSUPPORT.
895 (SFILES): Update paths.
896 (version-generated.c): Update path to create-version.sh.
897 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
899 2020-01-14 Tom Tromey <tom@tromey.com>
901 * configure.ac (LIBS): Use WIN32APILIBS.
902 (USE_WIN32API): Don't define.
903 * configure: Rebuild.
905 2020-01-14 Tom Tromey <tom@tromey.com>
907 * configure: Rebuild.
909 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
911 * Makefile.in (%-generated.c): Remove rule for files from
914 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
916 * configure: Re-generate.
918 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
920 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
922 * tracepoint.c (stop_tracing, flush_trace_buffer,
923 about_to_request_buffer_space, get_trace_state_variable_value,
924 set_trace_state_variable_value, gdb_collect): Add declaration.
926 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
928 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
929 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
930 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
931 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
932 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
935 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
937 * inferiors.c: Include gdbsupport/common-inferior.h.
939 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
941 * hostio-errno.c: Include hostio.h.
943 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
945 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
948 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
950 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
951 * linux-arm-tdesc.h: Include arch/arm.h.
953 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
955 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
957 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
959 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
960 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
962 2020-01-10 Pedro Alves <palves@redhat.com>
964 * fork-child.c (post_fork_inferior): Pass target down to
966 * inferiors.c (switch_to_thread): Add process_stratum_target
968 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
969 * nto-low.c (nto_target_ops): Now a process_stratum_target.
970 * linux-low.c (linux_target_ops): Now a process_stratum_target.
971 * remote-utils.c (prepare_resume_reply): Pass the target to
973 * target.c (the_target): Now a process_stratum_target.
974 (done_accessing_memory): Pass the target to switch_to_thread.
975 (set_target_ops): Ajust to use process_stratum_target.
976 * target.h (struct target_ops): Rename to ...
977 (struct process_stratum_target): ... this.
978 (the_target, set_target_ops): Adjust.
979 (prepare_to_access_memory): Adjust comment.
980 * win32-low.c (child_xfer_memory): Adjust to use
981 process_stratum_target.
982 (win32_target_ops): Now a process_stratum_target.
984 2020-01-06 Eli Zaretskii <eliz@gnu.org>
985 Pedro Alves <palves@redhat.com>
987 * win32-low.c (get_child_debug_event): Extract the fatal exception
988 from the exit status and convert to the equivalent Posix signal
990 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
991 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
993 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
995 * Makefile.in: Use INSTALL_PROGRAM_ENV.
997 2020-01-01 Joel Brobecker <brobecker@adacore.com>
999 * server.c (gdbserver_version): Change copyright year to 2020.
1000 * gdbreplay.c (gdbreplay_version): Likewise.
1002 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1004 * configure: Regenerate.
1005 * configure.ac: Quote variable arguments of test.
1007 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1009 * Makefile.in: Fix build with GNU Make 3.81
1011 2019-12-16 Tom Tromey <tromey@adacore.com>
1013 * server.c (get_exec_file): Constify result.
1015 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1017 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1018 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1019 * config.in: Regenerate.
1020 * configure: Regenerate.
1021 * configure.ac: Don't check for strerror.
1022 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1023 Call safe_strerror instead of strerror.
1024 * server.h (strerror): Remove this now-unnecessary declaration.
1025 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1027 (gdb_agent_helper_thread): Likewise.
1028 * utils.c (perror_with_name): Likewise.
1030 2019-11-26 Tom Tromey <tom@tromey.com>
1032 * configure, config.in: Rebuild.
1034 2019-11-26 Tom Tromey <tom@tromey.com>
1036 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1037 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1039 * configure, config.in: Rebuild.
1041 2019-11-26 Tom Tromey <tom@tromey.com>
1043 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1044 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1045 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1046 * acinclude.m4: Include ax_pthread.m4.
1047 * config.in, configure: Rebuild.
1049 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1051 * debug.c (debug_set_output): Call safe_strerror instead of
1053 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1054 (linux_kill_one_lwp): Likewise.
1055 (linux_detach_one_lwp): Likewise.
1056 (linux_wait_for_event_filtered): Likewise.
1057 (store_register): Likewise.
1058 * lynx-low.c (lynx_attach): Likewise.
1059 * mem-break.c (insert_memory_breakpoint): Likewise.
1060 (remove_memory_breakpoint): Likewise.
1061 (delete_fast_tracepoint_jump): Likewise.
1062 (set_fast_tracepoint_jump): Likewise.
1063 (uninsert_fast_tracepoint_jumps_at): Likewise.
1064 (reinsert_fast_tracepoint_jumps_at): Likewise.
1065 * nto-low.c (nto_xfer_memory): Likewise.
1066 (nto_resume): Likewise.
1068 2019-11-20 Luis Machado <luis.machado@linaro.org>
1070 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1071 instead of register count.
1072 * tdesc.c (tdesc_contains_feature): New function.
1073 * tdesc.h (tdesc_contains_feature): New prototype.
1075 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1077 * Makefile.in: Add safe-strerror.c.
1078 * configure: Regenerate.
1079 * configure.ac: Don't source common.host.
1081 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1083 * config.in: Regenerate.
1084 * configure: Regenerate.
1086 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1088 * ax.c (ax_printf): Handle size_t_arg.
1090 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1092 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1093 * mi/mi-main.c (output_cores): Likewise.
1094 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1095 (linux_xfer_osdata_modules): Likewise.
1096 * remote.c (register_remote_support_xml): Likewise.
1097 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1098 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1100 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1102 * configure: Regenerate.
1103 * configure.ac: Remove check for strerror_r.
1105 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1107 * config.in: Regenerate.
1108 * configure: Regenerate.
1109 * configure.ac: Also check for strerror_r.
1111 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1113 * ax.h (debug_agent): Remove duplicate declaration.
1115 2019-10-26 Tom de Vries <tdevries@suse.de>
1117 * linux-aarch64-low.c: Fix typos in comments.
1118 * linux-arm-low.c: Same.
1119 * linux-low.c: Same.
1120 * linux-ppc-low.c: Same.
1121 * proc-service.c: Same.
1124 * tracepoint.c: Same.
1125 * win32-low.c: Same.
1127 2019-10-25 Tom Tromey <tromey@adacore.com>
1129 * utils.c (xstrdup): Remove.
1131 2019-10-23 Tom Tromey <tom@tromey.com>
1133 * configure, config.in: Rebuild.
1135 2019-10-23 Tom Tromey <tom@tromey.com>
1137 * configure: Rebuild.
1138 * acinclude.m4: Use m4_include, not sinclude.
1140 2019-10-17 Tom Tromey <tromey@adacore.com>
1142 * configure: Rebuild.
1143 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1144 in AC_CONFIG_FILES invocation.
1145 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1148 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1150 * server.c: Include xml-builtin.h.
1151 (get_xml_features): Don't declare xml_builtins here.
1153 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1155 * Makefile.in: Remove references to vec-ipa.o.
1157 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1159 * Makefile.in: Remove references to vec.c.
1161 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1163 * server.c (server_waiting): Change to bool.
1164 (extended_protocol): Likewise.
1165 (response_needed): Likewise.
1166 (exit_requested): Likewise.
1167 (run_once): Likewise.
1168 (report_no_resumed): Likewise.
1169 (non_stop): Likewise.
1170 (disable_packet_vCont): Likewise.
1171 (disable_packet_Tthread): Likewise.
1172 (disable_packet_qC): Likewise.
1173 (disable_packet_qfThreadInfo): Likewise.
1174 (handle_general_set): Update.
1175 (handle_detach): Update.
1176 (handle_monitor_command): Update.
1177 (handle_query): Update.
1178 (captured_main): Update.
1179 (process_serial_event): Update.
1180 * server.h (server_waiting): Change to bool.
1181 (disable_packet_vCont): Likewise.
1182 (disable_packet_Tthread): Likewise.
1183 (disable_packet_qC): Likewise.
1184 (disable_packet_qfThreadInfo): Likewise.
1185 (run_once): Likewise.
1186 (non_stop): Likewise.
1187 * target.c (target_stop_and_wait): Update.
1189 2019-10-02 Tom Tromey <tromey@adacore.com>
1191 * Makefile.in (SFILES): Add common-inferior.c.
1192 (OBS): Add common-inferior.o.
1193 * server.c (startup_with_shell): Don't define.
1195 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1197 * linux-low.c (linux_low_read_btrace): Update for change to
1200 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1202 * debug.c (debug_threads): Remove comment in favor of the header.
1203 * debug.h (using_threads): Add declaration.
1204 (debug_threads): Add comment.
1205 * linux-aarch64-low.c: Include debug.h and remove declaration of
1207 * nto-low.c: Likewise.
1208 * remote-utils.c: Likewise.
1209 * thread-db.c: Likewise.
1211 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1213 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1214 and powerpc-cell64l-ipa.o.
1215 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1216 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1217 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1220 * spu-low.c: Remove file.
1222 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1223 (parse_spufs_run): Remove.
1224 (ppc_get_pc): Remove Cell/B.E. support.
1225 (ppc_set_pc): Likewise.
1226 (ppc_breakpoint_at): Likewise.
1227 (ppc_arch_setup): Likewise.
1228 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1229 tdesc_powerpc_cell32l.
1230 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1231 or init_registers_powerpc_cell32l.
1232 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1233 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1234 or init_registers_powerpc_cell32l.
1235 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1236 (init_registers_powerpc_cell32l): Remove prototype.
1237 (init_registers_powerpc_cell64l): Likewise.
1239 * target.h (struct target_ops): Remove qxfer_spu member.
1240 * server.c (handle_qxfer_spu): Remove.
1241 (qxfer_packets): Remove entry for "spu".
1242 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1243 * linux-low.c (SPUFS_MAGIC): Remove.
1244 (spu_enumerate_spu_ids): Remove.
1245 (linux_qxfer_spu): Remove.
1246 (linux_target_ops): Remove qxfer_spu member.
1247 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1248 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1249 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1251 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1253 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1254 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1255 * config.in: Regenerate.
1256 * configure: Regenerate.
1258 2019-08-15 Tom Tromey <tromey@adacore.com>
1260 * target.c (target_write_memory): Use gdb::byte_vector.
1262 2019-08-15 Tom Tromey <tromey@adacore.com>
1264 * tracepoint.c (write_inferior_data_pointer)
1265 (write_inferior_integer, write_inferior_int8)
1266 (write_inferior_uinteger, m_tracepoint_action_download)
1267 (r_tracepoint_action_download, x_tracepoint_action_download)
1268 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1269 (download_agent_expr, download_tracepoint_1)
1270 (download_trace_state_variables, upload_fast_traceframes): Update.
1271 * server.c (gdb_write_memory): Update.
1272 * remote-utils.c (relocate_instruction): Update.
1273 * proc-service.c (ps_pdwrite): Update.
1274 * mem-break.c (remove_memory_breakpoint)
1275 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1276 (uninsert_fast_tracepoint_jumps_at)
1277 (reinsert_fast_tracepoint_jumps_at): Update.
1278 * linux-x86-low.c (append_insns)
1279 (i386_install_fast_tracepoint_jump_pad)
1280 (amd64_write_goto_address, i386_write_goto_address): Update.
1281 * linux-s390-low.c (append_insns, s390_write_goto_address):
1283 * linux-ppc-low.c (ppc_relocate_instruction)
1284 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1285 (ppc_write_goto_address): Update.
1286 * linux-aarch64-low.c (append_insns): Update.
1287 * target.h (struct target_ops): Update.
1288 (write_inferior_memory): Don't declare.
1289 * target.c (target_write_memory): Rename from
1290 write_inferior_memory. Remove old target_write_memory.
1292 2019-08-15 Tom Tromey <tromey@adacore.com>
1294 * target.c (write_inferior_memory): Use std::vector.
1296 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1299 * configure.ac: Drop enable-libmcheck support.
1300 * configure, config.in: Rebuild.
1301 * acinclude.m4: Don't include it.
1303 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1305 * configure.srv: Remove Arm xml files.
1307 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1309 * configure.srv: Add new files. Remove xml generated files.
1310 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1312 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1313 * linux-aarch32-tdesc.c: New file.
1314 * linux-aarch32-tdesc.h: New file.
1315 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1316 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1317 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1318 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1319 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1320 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1321 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1322 (arm_read_description): Call arm_linux_read_description.
1323 (initialize_low_arch): Don't init registers.
1324 * linux-arm-tdesc.c: New file.
1325 * linux-arm-tdesc.h: New file.
1327 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1329 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1330 Move counter inside for.
1331 (arm_read_description): Check ptrace earlier.
1332 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1334 2019-07-09 Tom Tromey <tom@tromey.com>
1336 * configure: Rebuild.
1337 * configure.ac: Change common to gdbsupport.
1338 * acinclude.m4: Change common to gdbsupport.
1339 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1340 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1341 common to gdbsupport.
1342 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1343 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1344 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1345 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1346 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1347 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1348 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1349 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1350 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1351 common to gdbsupport.
1353 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1355 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1357 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1359 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1361 * configure.srv: Remove legacy xml.
1362 * linux-aarch64-low.c (initialize_low_arch): Remove
1363 initialize_low_tdesc call.
1364 * linux-aarch64-tdesc-selftest.c: Remove file.
1365 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1366 * linux-x86-low.c (initialize_low_arch): Remove
1367 initialize_low_tdesc call.
1368 * linux-x86-tdesc-selftest.c: Remove file.
1369 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1371 2019-06-20 Tom de Vries <tdevries@suse.de>
1373 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1374 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1376 2019-06-19 Tom de Vries <tdevries@suse.de>
1378 * debug.h (debug_write): Change return type to ssize_t.
1379 * debug.c (debug_write): Same.
1381 2019-06-14 Tom Tromey <tom@tromey.com>
1383 * configure.ac: Use new path to gnulib.
1384 * configure: Rebuild.
1385 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1388 2019-06-11 Tom Tromey <tom@tromey.com>
1390 * Makefile.in (SFILES): Add alloc.c.
1392 (IPA_OBJS): Add alloc-ipa.o.
1393 (alloc-ipa.o): New target.
1394 (%.o: ../%.c): New pattern rule.
1396 2019-06-10 Tom Tromey <tromey@adacore.com>
1398 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1399 end warning with a newline.
1400 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1402 * thread-db.c (attach_thread): Don't end warning with a newline.
1403 (thread_db_notice_clone): Likewise.
1404 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1406 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1407 end warning with a newline.
1409 2019-06-04 Pedro Alves <palves@redhat.com>
1411 * server.c (captured_main): Use make_unique_xstrdup.
1413 2019-06-02 Tom Tromey <tom@tromey.com>
1415 * gdbreplay.c (fromhex): Remove.
1416 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1418 2019-05-29 Tom Tromey <tromey@adacore.com>
1420 * configure: Rebuild.
1422 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1424 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1425 sign extension code on 32-bit builds.
1427 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1430 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1432 2019-04-19 Tom Tromey <tom@tromey.com>
1434 * server.c (struct vstop_notif): Derive from notif_event.
1436 (queue_stop_reply): Update.
1437 (remove_all_on_match_ptid): Change type. Rewrite.
1438 (discard_queued_stop_replies): Rewrite.
1439 (in_queued_stop_replies_ptid): Change type.
1440 (in_queued_stop_replies): Rewrite.
1441 (notif_stop): Update.
1442 (queue_stop_reply_callback): Update.
1443 (captured_main): Don't call initialize_notif.
1444 (push_stop_notification): Update.
1445 * notif.c (notif_write_event, handle_notif_ack)
1446 (notif_event_enque, notif_push): Update.
1447 (notif_event_xfree, initialize_notif): Remove.
1448 * notif.h (struct notif_event): Include <list>, not
1450 (struct notif_server) <queue>: Now a std::list.
1451 (notif_event_p): Remove typedef.
1452 (initialize_notif): Don't declare.
1453 (struct notif_event): Add virtual destructor.
1455 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1457 * ax.c (ax_vdebug): Call debug_printf.
1458 * debug.c (debug_write): New function.
1459 * debug.h (debug_write): New declaration.
1460 * linux-low.c (sigchld_handler): Call debug_write.
1462 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1464 * debug.c (debug_set_output): New function.
1465 (debug_vprintf): Send output to debug_file.
1466 (debug_flush): Likewise.
1467 * debug.h (debug_set_output): New declaration.
1468 * server.c (handle_monitor_command): Add debug-file option.
1469 (captured_main): Likewise.
1471 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1473 * debug.c (remote_debug): Add definition.
1474 * debug.h (remote_debug): Add declaration.
1475 * hostio.c (remote_debug): Remove declaration.
1476 * remote-utils.c (struct ui_file): Likewise.
1477 (remote_debug): Likewise.
1478 * remote-utils.h (remote_debug): Likewise,
1479 * server.c (remote_debug): Remove definition.
1481 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1483 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1484 when using a 64-bit gdbserver.
1486 2019-04-09 Tom Tromey <tromey@adacore.com>
1488 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1490 2019-04-08 Tom Tromey <tom@tromey.com>
1492 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1494 (linux_resume_one_lwp): Likewise.
1496 2019-04-08 Tom Tromey <tom@tromey.com>
1498 * gdbreplay.c: Update.
1499 * linux-low.c: Update.
1502 2019-04-08 Tom Tromey <tom@tromey.com>
1504 * server.c: Use C++ exception handling.
1505 * linux-low.c: Use C++ exception handling.
1506 * gdbreplay.c: Use C++ exception handling.
1508 2019-04-08 Tom Tromey <tom@tromey.com>
1510 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1511 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1512 (captured_main, main): Update.
1513 * gdbreplay.c (main): Update.
1515 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1517 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1518 value in argument pointer, return 1 if the entry is found and 0
1519 otherwise. Move comment.
1520 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1521 * linux-low.h (linux_get_auxv): Declare.
1522 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1524 2019-04-05 Tom Tromey <tromey@adacore.com>
1526 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1529 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1531 * linux-low.c (AT_HWCAP2): Add define if not already included.
1533 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1535 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1536 (aarch64_arch_setup): Call linux_get_hwcap.
1537 * linux-arm-low.c (arm_get_hwcap): Remove function.
1538 (arm_read_description): Call linux_get_hwcap.
1539 * linux-low.c (linux_get_auxv): New function.
1540 (linux_get_hwcap): Likewise.
1541 (linux_get_hwcap2): Likewise.
1542 * linux-low.h (linux_get_hwcap): New declaration.
1543 (linux_get_hwcap2): Likewise.
1544 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1545 (ppc_arch_setup): Call linux_get_hwcap.
1546 * linux-s390-low.c (s390_get_hwcap): Remove function.
1547 (s390_arch_setup): Call linux_get_hwcap.
1549 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1550 Jiong Wang <jiong.wang@arm.com>
1552 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1553 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1555 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1557 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1558 Jiong Wang <jiong.wang@arm.com>
1560 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1561 (aarch64_get_hwcap): New function.
1562 (aarch64_arch_setup): Read APIA hwcap.
1564 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1565 Jiong Wang <jiong.wang@arm.com>
1567 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1568 (initialize_low_tracepoint): Likewise.
1569 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1570 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1571 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1572 (aarch64_linux_read_description): Likewise.
1573 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1575 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1577 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1578 i386_create_target_description for 'segments' parameter.
1579 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1580 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1581 * win32-i386-low.c (i386_arch_setup): Likewise.
1583 2019-03-12 Tom Tromey <tromey@adacore.com>
1585 * linux-low.c (iterate_over_lwps): Update.
1587 2019-03-06 Tom Tromey <tom@tromey.com>
1589 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1590 (captured_main): Use SCOPE_EXIT.
1592 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1594 * configure.srv: Use '$enable_unittest' instead of '$development'
1595 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1598 2019-02-27 Tom Tromey <tromey@adacore.com>
1600 * gdbreplay.c (logchar): Handle \r\n.
1602 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1604 * linux-low.c (linux_attach): Add process before lwp.
1605 * server.c (attach_inferior): Check if already attached.
1607 2019-02-07 Tom Tromey <tom@tromey.com>
1609 * x86-tdesc.h: Rename include guard.
1610 * x86-low.h: Add include guard.
1611 * wincecompat.h: Rename include guard.
1612 * win32-low.h: Add include guard.
1613 * utils.h: Rename include guard.
1614 * tracepoint.h: Rename include guard.
1615 * tdesc.h: Rename include guard.
1616 * target.h: Rename include guard.
1617 * server.h: Rename include guard.
1618 * remote-utils.h: Rename include guard.
1619 * regcache.h: Rename include guard.
1620 * nto-low.h: Rename include guard.
1621 * notif.h: Add include guard.
1622 * mem-break.h: Rename include guard.
1623 * lynx-low.h: Add include guard.
1624 * linux-x86-tdesc.h: Add include guard.
1625 * linux-s390-tdesc.h: Add include guard.
1626 * linux-ppc-tdesc-init.h: Add include guard.
1627 * linux-low.h: Add include guard.
1628 * linux-aarch64-tdesc.h: Add include guard.
1629 * linux-aarch32-low.h: Add include guard.
1630 * inferiors.h: Rename include guard.
1631 * i387-fp.h: Rename include guard.
1632 * hostio.h: Rename include guard.
1633 * gdbthread.h: Rename include guard.
1634 * gdb_proc_service.h: Rename include guard.
1635 * event-loop.h: Rename include guard.
1636 * dll.h: Rename include guard.
1637 * debug.h: Rename include guard.
1638 * ax.h: Rename include guard.
1640 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1643 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1644 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1646 2019-01-25 Tom Tromey <tom@tromey.com>
1648 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1650 2019-01-25 Tom Tromey <tom@tromey.com>
1652 * win32-low.c: Fix common/ includes.
1653 * win32-i386-low.c: Fix common/ includes.
1654 * tracepoint.c: Fix common/ includes.
1655 * thread-db.c: Fix common/ includes.
1656 * target.h: Fix common/ includes.
1657 * symbol.c: Fix common/ includes.
1658 * spu-low.c: Fix common/ includes.
1659 * server.h: Fix common/ includes.
1660 * server.c: Fix common/ includes.
1661 * remote-utils.c: Fix common/ includes.
1662 * regcache.h: Fix common/ includes.
1663 * regcache.c: Fix common/ includes.
1664 * nto-x86-low.c: Fix common/ includes.
1665 * notif.h: Fix common/ includes.
1666 * mem-break.h: Fix common/ includes.
1667 * lynx-low.c: Fix common/ includes.
1668 * lynx-i386-low.c: Fix common/ includes.
1669 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1670 * linux-x86-low.c: Fix common/ includes.
1671 * linux-low.c: Fix common/ includes.
1672 * inferiors.h: Fix common/ includes.
1673 * i387-fp.c: Fix common/ includes.
1674 * hostio.c: Fix common/ includes.
1675 * hostio-errno.c: Fix common/ includes.
1676 * gdbthread.h: Fix common/ includes.
1677 * gdbreplay.c: Fix common/ includes.
1678 * fork-child.c: Fix common/ includes.
1679 * event-loop.c: Fix common/ includes.
1681 (enum gdb_agent_op): Fix common/ includes.
1683 2019-01-21 Tom Tromey <tom@tromey.com>
1685 * tracepoint.c: Fix includes.
1686 * remote-utils.c: Fix includes.
1687 * linux-x86-low.c: Fix includes.
1689 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1691 * gdbreplay.c (gdbreplay_version): Update copyright year in
1693 * server.c (gdbserver_version): Likewise.
1695 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1697 * linux-low.c (add_lwp): Switch ordering.
1699 2018-11-29 Tom Tromey <tom@tromey.com>
1701 * win32-low.c (win32_join): Take pid, not process.
1702 * target.h (struct target_ops) <join>: Change argument type.
1703 (join_inferior): Change argument name.
1704 * spu-low.c (spu_join): Take pid, not process.
1705 * server.c (handle_detach): Preserve pid before destroying
1707 * lynx-low.c (lynx_join): Take pid, not process.
1708 * linux-low.c (linux_join): Take pid, not process.
1710 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1712 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1713 (aarch64_cannot_fetch_register): Likewise.
1714 (struct linux_target_ops): Update references.
1716 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1718 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1720 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1722 * configure.srv (ipa_ppc_linux_regobj): Add
1723 powerpc-isa207-htm-vsx32l-ipa.o and
1724 powerpc-isa207-htm-vsx64l-ipa.o.
1725 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1726 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1727 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1728 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1729 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1730 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1731 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1732 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1733 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1734 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1735 (init_registers_powerpc_isa207_htm_vsx32l)
1736 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1737 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1738 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1739 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1740 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1741 (ppc_store_tm_ctarregset): New functions.
1742 (ppc_regsets): Add entries for HTM regsets.
1743 (ppc_arch_setup): Set htm in features struct when needed. Set
1744 sizes for the HTM regsets.
1745 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1746 (initialize_low_arch): Call
1747 init_registers_powerpc_isa207_htm_vsx32l and
1748 init_registers_powerpc_isa207_htm_vsx64l.
1749 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1750 PPC_TDESC_ISA207_HTM_VSX.
1751 (initialize_low_tracepoint): Call
1752 init_registers_powerpc_isa207_htm_vsx32l and
1753 init_registers_powerpc_isa207_htm_vsx64l.
1755 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1757 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1758 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1759 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1760 (ppc_store_pmuregset): New functions.
1761 (ppc_regsets): Add entries for ebb and pmu regsets.
1762 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1763 pmu regsets are available. Set sizes for these regsets.
1765 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1767 * configure.srv (ipa_ppc_linux_regobj): Add
1768 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1769 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1770 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1771 rs6000/powerpc-isa207-vsx32l.xml, and
1772 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1773 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1774 <PPC_TDESC_ISA207_VSX>: New enum value.
1775 (init_registers_powerpc_isa207_vsx32l): Declare.
1776 (init_registers_powerpc_isa207_vsx64l): Declare.
1777 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1778 (ppc_store_tarregset): New function.
1779 (ppc_regsets): Add entry for the TAR regset.
1780 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1781 size for the TAR regsets.
1782 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1783 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1784 and init_registers_powerpc_isa207_vsx64l.
1785 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1786 (initialize_low_tracepoint): Call
1787 init_registers_powerpc_isa207_vsx32l and
1788 init_registers_powerpc_isa207_vsx64l.
1790 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1791 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1793 * configure.srv (ipa_ppc_linux_regobj): Add
1794 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1795 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1796 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1797 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1798 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1799 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1800 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1801 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1802 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1803 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1804 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1805 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1806 (ppc_hwcap): Add comment.
1807 (ppc_hwcap2): New global.
1808 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1809 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1810 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1811 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1812 when needed. Set sizes for the the DSCR and PPR regsets.
1813 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1814 (initialize_low_arch): Call
1815 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1816 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1817 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1818 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1819 (initialize_low_tracepoint): Call
1820 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1821 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1823 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1825 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1827 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1828 Simon Marchi <simark@simark.ca>
1830 * acinclude.m4: Include "../selftest.m4".
1831 * configure: Regenerate.
1832 * configure.ac: Use "GDB_AC_SELFTEST".
1833 * configure.srv: Use "$enable_unittests" instead of
1834 "$development" when checking whether unit tests have been
1836 * server.c (captured_main): Update message informing that
1837 selftests have been disabled.
1839 2018-10-04 Tom Tromey <tom@tromey.com>
1841 * configure: Rebuild.
1843 2018-10-04 Tom Tromey <tom@tromey.com>
1845 * server.c (handle_status): Rename inner "thread".
1846 (process_serial_event): Declare "res" in 'm' case.
1847 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1848 (iterate_over_lwps): Rename inner "thread".
1849 (linux_qxfer_libraries_svr4): Rename inner "len".
1850 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1852 2018-10-01 Gary Benson <gbenson@redhat.com>
1854 * gdb_proc_service.h: Moved common code to
1855 common/gdb_proc_service.h.
1857 2018-10-01 Gary Benson <gbenson@redhat.com>
1859 * gdb_proc_service.h: Synchronize comments and whitespace with
1860 GDB's version of this file.
1862 2018-09-25 Tom Tromey <tom@tromey.com>
1864 * configure: Rebuild.
1865 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1867 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1869 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1870 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1871 ($(IPA_LIB)): Sort IPA_OBJS.
1873 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1875 * Makefile.in: Remove references to $(ADD_DEPS).
1877 2018-09-16 Tom Tromey <tom@tromey.com>
1879 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1881 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1884 2018-09-05 Tom Tromey <tom@tromey.com>
1886 * configure: Rebuild.
1888 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1891 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1893 2018-08-27 Tom Tromey <tom@tromey.com>
1896 * configure: Rebuild.
1898 2018-08-27 Tom Tromey <tom@tromey.com>
1900 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1901 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1902 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1903 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1904 (s390x_emit_stack_adjust): Add casts to unsigned char.
1906 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1910 * server.h (struct client_state) <disable_randomization>:
1913 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1915 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1917 (mips_supply_ptrace_register): Likewise.
1919 2018-07-22 Tom Tromey <tom@tromey.com>
1921 * configure: Rebuild.
1923 2018-07-22 Tom Tromey <tom@tromey.com>
1925 * win32-low.c (win32_create_inferior): Remove unused variables.
1926 * gdbreplay.c (remote_open): Remove unused variable.
1927 * remote-utils.c (remote_prepare): Remove unused variable.
1928 * x86-tdesc.h (X86_TDESC_H): Define.
1929 (amd64_expedite_regs): Define conditionally.
1930 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1931 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1932 * remote-utils.c (readchar): Remove unused variable.
1934 2018-07-13 Pedro Alves <palves@redhat.com>
1936 * linux-low.c (linux_kill): Change parameter to process_info
1937 pointer instead of pid. Adjust.
1938 * lynx-low.c (lynx_kill): Likewise.
1939 * nto-low.c (nto_kill): Likewise.
1940 * spu-low.c (spu_kill): Likewise.
1941 * win32-low.c (win32_kill): Likewise.
1942 * server.c (handle_v_kill, kill_inferior_callback)
1943 (detach_or_kill_for_exit): Adjust.
1944 * target.c (kill_inferior): Change parameter to process_info
1945 pointer instead of pid. Adjust.
1946 * target.h (struct target_ops) <kill>: Change parameter to
1947 process_info pointer instead of pid. Adjust all implementations
1949 (kill_inferior): Likewise.
1951 2018-07-13 Pedro Alves <palves@redhat.com>
1953 * linux-low.c (linux_detach, linux_join): Change parameter to
1954 process_info pointer instead of pid. Adjust.
1955 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1956 * nto-low.c (nto_detach): Likewise.
1957 * spu-low.c (spu_detach, spu_join): Likewise.
1958 * win32-low.c (win32_detach, win32_join): Likewise.
1959 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1960 * target.h (struct target_ops) <detach, join>: Change parameter to
1961 process_info pointer instead of pid. Adjust all implementations
1963 (detach_inferior, join_inferior): Rename 'pid' parameter to
1966 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1967 Jan Kratochvil <jan.kratochvil@redhat.com>
1968 Paul Fertser <fercerpav@gmail.com>
1969 Tsutomu Seki <sekiriki@gmail.com>
1971 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1972 (OBS): Add 'common/netstuff.o'.
1973 (GDBREPLAY_OBS): Likewise.
1974 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1975 (remote_open): Implement support for IPv6
1977 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1979 (handle_accept_event): Accept connections from IPv6 sources.
1980 (remote_prepare): Handle IPv6-style hostnames; implement
1981 support for IPv6 connections.
1982 (remote_open): Implement support for printing connections from
1985 2018-07-11 Pedro Alves <palves@redhat.com>
1988 * mem-break.c (any_persistent_commands): Add process_info
1989 parameter and use it instead of relying on the current process.
1990 Change return type to bool.
1991 * mem-break.h (any_persistent_commands): Add process_info
1992 parameter and change return type to bool.
1993 * server.c (handle_detach): Remove require_running_or_return call.
1994 Look up the process_info for the process we're about to detach.
1995 If not found, return back error to GDB. Adjust
1996 any_persistent_commands call to pass down a process pointer.
1998 2018-07-11 Pedro Alves <palves@redhat.com>
2000 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2001 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2002 instead of collect_register_by_name.
2003 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2004 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2006 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2007 Pedro Alves <palves@redhat.com>
2009 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2011 2018-07-03 Tom Tromey <tom@tromey.com>
2013 * linux-low.c: Update.
2014 * lynx-low.c: Update.
2015 * mem-break.c: Update.
2016 * nto-low.c: Update.
2017 * remote-utils.c: Update.
2019 * spu-low.c: Update.
2021 * win32-low.c: Update.
2023 2018-07-03 Tom Tromey <tom@tromey.com>
2027 2018-07-03 Tom Tromey <tom@tromey.com>
2029 * linux-low.c: Update.
2031 2018-07-03 Tom Tromey <tom@tromey.com>
2035 2018-07-03 Tom Tromey <tom@tromey.com>
2037 * linux-low.c: Update.
2038 * linux-mips-low.c: Update.
2039 * lynx-low.c: Update.
2040 * nto-low.c: Update.
2041 * remote-utils.c: Update.
2043 * spu-low.c: Update.
2045 * thread-db.c: Update.
2047 2018-07-03 Tom Tromey <tom@tromey.com>
2049 * linux-low.c: Update.
2050 * linux-mips-low.c: Update.
2051 * lynx-low.c: Update.
2052 * mem-break.c: Update.
2053 * nto-low.c: Update.
2054 * remote-utils.c: Update.
2056 * spu-low.c: Update.
2058 * tracepoint.c: Update.
2060 2018-07-03 Tom Tromey <tom@tromey.com>
2062 * linux-low.c: Update.
2063 * linux-ppc-low.c: Update.
2064 * linux-x86-low.c: Update.
2065 * proc-service.c: Update.
2067 * spu-low.c: Update.
2068 * thread-db.c: Update.
2069 * win32-low.c: Update.
2071 2018-07-03 Tom Tromey <tom@tromey.com>
2073 * linux-low.c: Update.
2074 * lynx-low.c: Update.
2075 * nto-low.c: Update.
2076 * remote-utils.c: Update.
2077 * spu-low.c: Update.
2078 * thread-db.c: Update.
2079 * win32-low.c: Update.
2081 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2083 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2084 parameter in call to 'amd64_create_target_description'.
2086 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2088 * x86-tdesc.h: Remove executable permission flag.
2090 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2092 * configure.ac: Remove AC_PREREQ, add missing quoting.
2093 * configure: Re-generate.
2094 * config.in: Re-generate.
2095 * aclocal.m4: Re-generate.
2097 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2099 * tracepoint.h (current_traceframe): Remove declaration.
2101 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2103 * linux-aarch64-low.c (is_sve_tdesc): New function.
2104 (aarch64_sve_regs_copy_to_regcache): Likewise.
2105 (aarch64_sve_regs_copy_from_regcache): Likewise.
2106 (aarch64_regs_info): Add SVE checks.
2107 (initialize_low_arch): Initialize SVE.
2109 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2111 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2113 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2115 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2116 (initialize_low_tracepoint): Likewise
2117 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2118 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2120 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2122 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2124 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2126 * server.h (PBUFSIZ): Increase size
2128 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2130 * regcache.c (regcache::raw_compare): New function.
2131 * regcache.h (regcache::raw_compare): New declaration.
2133 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2135 * regcache.c (new_register_cache): Use new.
2136 (free_register_cache): Use delete.
2137 (register_data): Use const.
2138 (supply_register): Move body inside regcache.
2139 (regcache::raw_supply): New override function.
2140 (collect_register): Move body inside regcache.
2141 (regcache::raw_collect): New override function.
2142 (regcache::get_register_status): New override function.
2143 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2145 2018-06-09 Tom Tromey <tom@tromey.com>
2147 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2149 (event_queue): Use std::queue.
2150 (gdb_event_xfree): Remove.
2151 (initialize_event_loop, process_event, wait_for_event): Update.
2153 2018-06-08 Stan Cox <scox@redhat.com>
2155 * win32-low.c (win32_create_inferior): last_ptid and last_status
2156 moved to client_state.
2158 2018-06-08 Pedro Alves <palves@redhat.com>
2160 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2161 common/common-exceptions.o, common/common-utils.o,
2162 common/errors.o, common/print-utils.o and utils.o.
2163 * gdbreplay.c: Include "common-defs.h" instead of the two
2164 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2165 string.h or alloca.h.
2166 (perror_with_name): Delete.
2167 (remote_open): Use xstrdup instead of strdup.
2168 (main): Rename to ...
2169 (captured_main): ... this.
2172 2018-06-08 Tom Tromey <tom@tromey.com>
2174 * linux-low.c (linux_low_read_btrace): Update.
2176 2018-06-04 Stan Cox <scox@redhat.com>
2178 * server.h (struct client_state): New.
2179 * server.c (cont_thread, general_thread, multi_process)
2180 (report_fork_events, report_vfork_events, report_exec_events)
2181 (report_thread_events, swbreak_feature, hwbreak_feature)
2182 (vCont_supported, disable_randomization, pass_signals)
2183 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2184 Moved to client_state.
2185 * remote-utils.c (remote_debug, noack_mode)
2186 (transport_is_reliable): Moved to client_state.
2187 * tracepoint.c (current_traceframe): Moved to client_state.
2190 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2191 linux-low.c, remote-utils.h, target.c: Use client_state.
2193 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2195 * configure.srv: Add new c/h file.
2197 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2199 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2202 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2204 * gdb.arch/mips-fpregset-core.exp: New test.
2205 * gdb.arch/mips-fpregset-core.c: New test source.
2207 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2210 * hostio.c (require_int): Do not report overflow for integers
2211 between 0xfffffff and 0x7fffffff.
2213 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2215 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2216 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2217 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2219 (the_low_target): Wire them.
2221 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2223 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2224 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2225 mode. Call collect_register_by_name with vscr using
2226 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2227 (ppc_store_vrregset): Add and set vscr_offset variable as in
2228 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2231 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2233 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2234 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2235 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2237 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2239 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2240 (ppc_store_vsxregset): Likewise.
2241 (ppc_fill_vrregset): Likewise.
2242 (ppc_store_vrregset): Likewise.
2243 (ppc_fill_evrregset): Likewise.
2244 (ppc_store_evrregset): Likewise.
2245 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2246 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2249 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2251 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2252 wordsize of the inferior. Call ppc_linux_target_wordsize.
2254 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2256 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2257 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2258 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2259 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2260 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2261 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2262 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2263 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2264 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2265 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2266 (tdesc_powerpc_e500l): Remove.
2267 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2268 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2269 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2270 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2272 (ppc_arch_setup): Remove target description matching code. Fill a
2273 ppc_linux_features struct and call ppc_linux_match_description
2276 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2278 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2279 width of the requested register exceeds the width of the
2281 (mips_cannot_store_register): Likewise.
2283 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2285 * linux-mips-low.c (mips_fetch_register): New function. Update
2287 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2288 (the_low_target): Wire `mips_fetch_register'.
2290 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2292 * lynx-i386-low.c (LYNXOS_178): New macro.
2293 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2294 the layout on LynxOS-178.
2295 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2296 handle floating point registers that are not supported by
2299 2018-05-10 Tom Tromey <tom@tromey.com>
2301 * configure: Rebuild.
2303 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2306 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2307 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2308 Use it to set the expedite_regs field in the given tdesc.
2309 * x86-tdesc.h: New file.
2310 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2311 Adjust following the addition of the new expedite_regs parameter
2312 to init_target_desc.
2313 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2314 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2315 (i386_linux_read_description, amd64_linux_read_description):
2316 Adjust following the addition of the new expedite_regs parameter
2317 to init_target_desc.
2318 * lynx-i386-low.c: #include "x86-tdesc.h".
2319 (lynx_i386_arch_setup): Adjust following the addition of the new
2320 expedite_regs parameter to init_target_desc.
2321 * nto-x86-low.c: #include "x86-tdesc.h".
2322 (nto_x86_arch_setup): Adjust following the addition of the new
2323 expedite_regs parameter to init_target_desc.
2324 * win32-i386-low.c: #include "x86-tdesc.h".
2325 (i386_arch_setup): Adjust following the addition of the new
2326 expedite_regs parameter to init_target_desc.
2328 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2331 * win32-low.c (win32_create_inferior): Add call to my_wait
2332 setting last_status global.
2334 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2337 * win32-low.c (create_process): Only call gdb_tilde_expand if
2338 inferior_cwd is not NULL.
2340 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2342 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2343 registers to the cache if their values have changed.
2344 (i387_xsave_to_cache): Provide default values for x87 control
2345 registers when these features are available, but disabled.
2346 * regcache.c (supply_register_by_name_zeroed): New function.
2347 * regcache.h (supply_register_by_name_zeroed): Declare new
2350 2018-05-07 Tom Tromey <tom@tromey.com>
2352 * configure: Rebuild.
2354 2018-05-04 Tom Tromey <tom@tromey.com>
2356 * configure: Rebuild.
2358 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2359 Pedro Alves <palves@redhat.com>
2361 * linux-aarch64-low.c (aarch64_stopped_data_address):
2364 2018-04-27 Tom Tromey <tom@tromey.com>
2366 * configure: Rebuild.
2368 2018-04-23 Tom Tromey <tom@tromey.com>
2370 * configure: Rebuild.
2372 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2374 * Makefile.in (depcomp): Add "..".
2375 (all_deps_files): New and use it.
2377 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2379 * configure.srv (aarch64*-*-linux*): Don't include xml.
2380 (i[34567]86-*-cygwin*): Likewise.
2381 (i[34567]86-*-linux*): Likewise.
2382 (i[34567]86-*-lynxos*): Likewise.
2383 (i[34567]86-*-mingw32ce*): Likewise.
2384 (i[34567]86-*-mingw*): Likewise.
2385 (i[34567]86-*-nto*): Likewise.
2386 (tic6x-*-uclinux): Likewise.
2387 (x86_64-*-linux*): Likewise.
2388 (x86_64-*-mingw*): Likewise.
2389 (x86_64-*-cygwin*): Likewise.
2391 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2393 * tdesc.c: Remove xml parameter.
2395 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2397 * server.c (get_features_xml): Remove cast.
2398 * tdesc.c (void target_desc::accept): Fill in function.
2399 (tdesc_get_features_xml): Remove old xml creation.
2400 (print_xml_feature::visit_pre): Add xml vistor.
2401 * tdesc.h (struct target_desc): Make xmltarget mutable.
2402 (tdesc_get_features_xml): Remove declaration.
2404 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2406 * tdesc.c (tdesc_architecture_name): Add new function.
2407 (tdesc_osabi_name): Likewise.
2408 (tdesc_get_features_xml): Use new functions.
2410 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2412 * tdesc.c (tdesc_create_flags): Remove.
2413 (tdesc_add_flag): Likewise.
2414 (tdesc_named_type): Likewise.
2415 (tdesc_create_union): Likewise.
2416 (tdesc_create_struct): Likewise.
2417 (tdesc_create_vector): Likewise.
2418 (tdesc_add_bitfield): Likewise.
2419 (tdesc_add_field): Likewise.
2420 (tdesc_set_struct_size): Likewise.
2422 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2424 * tdesc.c (~target_desc): Remove implictly deleted items.
2425 (init_target_desc): Iterate all features.
2426 (tdesc_get_features_xml): Use vector.
2427 (tdesc_create_feature): Create feature.
2428 * tdesc.h (tdesc_feature) Remove
2429 (target_desc): Add features.
2431 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2433 * Makefile.in: Add common/tdesc.c
2434 * tdesc.c (init_target_desc): init all reg_defs from register
2436 (tdesc_create_reg): Create tdesc_reg.
2437 * tdesc.h (tdesc_feature): Add register vector.
2439 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2441 * tdesc.h (struct target_desc) <features>: Change type to
2442 std::vector<std::string>.
2443 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2445 (tdesc_get_features_xml): Likewise.
2446 (tdesc_create_feature): Likewise.
2448 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2450 * regcache.c (find_register_by_number): Return a ref.
2451 (find_regno): Use references.
2452 (register_size): Likewise.
2453 (register_data): Likewise.
2454 * tdesc.c (target_desc::~target_desc): Remove free calls.
2455 (target_desc::operator==): Use std::vector compare.
2456 (init_target_desc): Use reference.
2457 (tdesc_create_reg): Use reg constructors.
2458 * tdesc.h (struct target_desc): Replace pointer with object.
2460 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2462 * regcache.c (find_register_by_number): Make static.
2463 (find_regno): Use find_register_by_number
2464 * regcache.h (struct reg): Remove declaration.
2466 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2468 * tdesc.c (target_desc::~target_desc): Move to here.
2469 (target_desc::operator==): Likewise.
2470 * tdesc.h (target_desc::~target_desc): Move from here.
2471 (target_desc::operator==): Likewise.
2473 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2475 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2477 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2479 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2481 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2482 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2483 and init_registers_s390_gs_linux64.
2485 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2487 * linux-s390-low.c (s390_fill_gs): Remove function.
2488 (s390_fill_gsbc): Remove function.
2489 (s390_regsets): Set fill functions for the guarded storage regsets
2492 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2494 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2495 the word size. Add comment.
2496 (s390_get_wordsize): New function.
2497 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2498 pswm with it. Instead, use s390_get_wordsize to determine the
2499 word size first and derive the correct tdesc from that directly.
2501 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2503 * Makefile.in: Include silent-rules.mk.
2504 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2505 (COMPILE): Add ECHO_CXX.
2506 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2507 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2508 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2509 (version-generated.c): Add ECHO_GEN.
2510 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2511 (IPAGENT_COMPILE): Add ECHO_CXX.
2512 (%-generated.c): Add ECHO_REGDAT.
2514 2018-03-14 Tom Tromey <tom@tromey.com>
2517 * ax.c (ax_printf): Special case for NULL.
2519 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2521 * linux-low.c (linux_qxfer_libraries_svr4): Use
2522 xml_escape_text_append.
2524 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2526 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2528 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2530 * server.c (handle_general_set): Remove unnecessary xstrdup.
2532 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2534 * server.c (parse_debug_format_options): Adjust to
2535 delim_string_to_char_ptr_vec changes.
2536 * thread-db.c (thread_db_load_search): Adjust to
2537 dirnames_to_char_ptr_vec changes.
2539 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2541 * target.h (target_enable_btrace, target_disable_btrace)
2542 (target_read_btrace, target_read_btrace_conf): Turn macro into
2543 inline function. Throw error if target method is not defined.
2544 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2545 check for btrace target method. Be prepared to handle exceptions
2546 from btrace target methods.
2548 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2550 * server.c (captured_main): Change order of error message printed
2551 when the current working directory cannot be found.
2553 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2555 * server.c: Include "filenames.h" and "pathstuff.h".
2556 (program_name): Delete variable.
2557 (program_path): New anonymous class.
2558 (get_exec_wrapper): Use "program_path" instead of
2560 (handle_v_run): Likewise.
2561 (captured_main): Likewise.
2562 (process_serial_event): Likewise.
2564 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2566 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2567 (OBJS): Add "pathstuff.o".
2568 * server.c (current_directory): New global variable.
2569 (captured_main): Initialize "current_directory".
2571 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2573 * tdesc.c: Use common/tdesc.h.
2574 * tdesc.h: Likewise.
2576 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2577 Simon Marchi <simon.marchi@ericsson.com>
2579 * Makefile.in: Switch order of make rules.
2581 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2583 * Makefile.in: Add common directory in build.
2584 * configure.ac: Add common reference.
2585 * configure: Regenerate.
2587 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2589 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2590 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2591 * spu-low.c (spu_target_ops): Likewise.
2592 * win32-low.c (win32_target_ops): Likewise.
2593 * server.c (supported_btrace_packets): Report packets unconditionally.
2594 * target.h (target_ops) <supports_btrace>: Remove.
2595 (target_supports_btrace): Remove.
2597 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2599 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2600 (handle_btrace_disable): Change return type to void. Use exceptions
2602 (handle_btrace_general_set): Catch exception and copy message to
2605 2018-02-08 Tom Tromey <tom@tromey.com>
2607 * linux-low.c (install_software_single_step_breakpoints): Use
2608 make_scoped_restore.
2609 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2610 (do_restore_current_thread_cleanup): Remove.
2611 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2614 2018-02-08 Tom Tromey <tom@tromey.com>
2616 * mem-break.c (set_raw_breakpoint_at): Use
2617 gdb::unique_xmalloc_ptr.
2619 2018-01-30 Pedro Alves <palves@redhat.com>
2622 * target.c (target_terminal::terminal_state): Rename to ...
2623 (target_terminal::m_terminal_state): ... this.
2625 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2627 * linux-low.c (handle_extended_wait): Surround call to
2628 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2630 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2632 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2633 linux_ptrace_attach_fail_reason_string now returning an
2635 (linux_attach): Likewise.
2636 * thread-db.c (attach_thread): Likewise.
2638 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2641 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2642 checking for fs_base/gs_base fields in struct user_regs_struct.
2643 * configure: Regenerate.
2645 2018-01-16 Yao Qi <yao.qi@linaro.org>
2648 * linux-low.c (fetch_register): Call supply_register instead of
2651 2018-01-08 Yao Qi <yao.qi@linaro.org>
2652 Simon Marchi <simon.marchi@ericsson.com>
2654 * Makefile.in (OBS): Remove selftest.o.
2655 * configure.ac: Set srv_selftest_objs if $development is true.
2656 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2657 * configure: Re-generated.
2658 * server.c (captured_main): Wrap variable selftest_filter with
2661 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2663 * server.c (parse_debug_format_options): Return std::string.
2664 (handle_monitor_command, captured_main): Adjust.
2666 2018-01-05 Pedro Alves <palves@redhat.com>
2669 * server.c (captured_main): Pass quiet=false to
2670 save_original_signals_state.
2672 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2674 * gdbreplay.c (gdbreplay_version): Update copyright year in
2676 * server.c (gdbserver_version): Likewise.
2678 2017-12-08 Tom Tromey <tom@tromey.com>
2680 * ax.c (ax_printf): Update.
2682 2017-12-07 Yao Qi <yao.qi@linaro.org>
2684 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2685 aarch64_linux_read_description.
2686 * linux-amd64-ipa.c (idx2mask): New array.
2687 (get_ipa_tdesc): Move idx2mask out.
2688 (initialize_low_tracepoint): Initialize target descriptions.
2689 * linux-i386-ipa.c (idx2mask): New array.
2690 (get_ipa_tdesc): Move idx2mask out.
2691 (initialize_low_tracepoint): Initialize target descriptions.
2693 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2695 * tdesc.c (struct tdesc_type): Change return type.
2696 (tdesc_add_flag): Change parameter type.
2697 (tdesc_add_bitfield): Likewise.
2698 (tdesc_add_field): Likewise.
2699 (tdesc_set_struct_size): Likewise.
2701 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2703 * regcache.c (registers_to_string): Remove unused variable.
2705 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2707 * inferiors.c (for_each_inferior_with_data): Remove.
2708 * inferiors.h (for_each_inferior_with_data): Remove.
2709 * server.c (handle_qxfer_threads_worker): Change parameter type.
2710 (handle_qxfer_threads_proper): Use for_each_thread.
2712 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2714 * inferiors.c (for_each_inferior): Remove.
2715 (clear_inferiors): Use for_each_thread.
2716 * inferiors.h (for_each_inferior): Remove.
2717 * linux-low.c (linux_wait_for_event_filtered): Use
2719 (linux_stabilize_threads): Likewise.
2720 * regcache.c (regcache_release): Likewise.
2721 * server.c (gdb_wants_all_threads_stopped): Likewise.
2722 (clear_pending_status_callback): Remove.
2723 (handle_status): Use for_each_thread.
2724 (captured_main): Likewise.
2725 * win32-low.c (child_init_thread_list): Likewise.
2726 (win32_clear_inferiors): Likewise.
2727 (fake_breakpoint_event): Likewise.
2729 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2731 * inferiors.h (find_inferior): Remove.
2732 * inferiors.c (find_inferior): Remove.
2734 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2736 * linux-low.c (resume_status_pending_p): Update comment.
2737 (need_step_over_p): Update comment.
2739 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2741 * linux-low.c (proceed_one_lwp): Return void, change parameter
2743 (unsuspend_and_proceed_one_lwp): Likewise.
2744 (proceed_all_lwps): Use for_each_thread.
2745 (unstop_all_lwps): Likewise.
2747 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2749 * linux-low.c (linux_resume_one_thread): Return void, take
2751 (linux_resume): Use for_each_thread.
2753 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2755 * linux-low.c (send_sigstop_callback): Return void, change
2756 parameter type. Rename to...
2757 (send_sigstop): ... this.
2758 (suspend_and_send_sigstop_callback): Return void, change parameter
2760 (suspend_and_send_sigstop): ... this.
2761 (stop_all_lwps): Use for_each_thread.
2763 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2765 * linux-low.c (lwp_running): Return bool, remove unused
2767 (linux_stabilize_threads): Use find_thread.
2769 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2771 * linux-low.c (select_singlestep_lwp_callback): Remove.
2772 (count_events_callback): Remove.
2773 (select_event_lwp_callback): Remove.
2774 (select_event_lwp): Use find_thread/for_each_thread.
2776 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2778 * linux-low.c (not_stopped_callback): Return bool, take filter
2780 (linux_wait_for_event_filtered): Use find_thread.
2781 (linux_wait_1): Likewise.
2783 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2785 * linux-low.c (same_lwp): Remove.
2786 (find_lwp_pid): Use find_thread.
2788 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2790 * linux-low.c (delete_lwp_callback): Remove.
2791 (linux_mourn): Use for_each_thread.
2793 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2795 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2796 args parameter, don't check for pid.
2797 (linux_detach): Use for_each_thread.
2799 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2801 * linux-low.c (struct counter): Remove.
2802 (second_thread_of_pid_p): Remove.
2803 (last_thread_of_process_p): Use find_thread.
2805 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2807 * inferiors.c (find_inferior_in_random): Remove.
2808 * inferiors.h (find_inferior_in_random): Remove.
2809 * linux-low.c (status_pending_p_callback): Return bool, accept
2810 parameter ptid directly.
2811 (linux_wait_for_event_filtered): Use find_thread_in_random.
2812 (linux_wait_1): Likewise.
2814 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2816 * inferiors.c (find_inferior_id): Remove.
2817 (find_thread_ptid): Move implemention from find_inferior_id to
2819 * inferiors.h (find_inferior_id): Remove.
2820 * server.c (handle_status): Use find_thread_ptid.
2821 (process_serial_event): Likewise.
2822 * thread-db.c (find_one_thread): Likewise.
2823 (thread_db_thread_handle): Likewise.
2824 * win32-low.c (thread_rec): Likewise.
2825 (child_delete_thread): Likewise.
2826 (win32_thread_alive): Likewise.
2827 (get_child_debug_event): Likewise.
2829 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2831 * linux-mips-low.c (update_watch_registers_callback): Return
2832 void, remove pid_p parameter, don't check for pid.
2833 (mips_insert_point, mips_remove_point): Use for_each_thread.
2835 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2837 * lynx.low (lynx_delete_thread_callback): Remove.
2838 (lynx_mourn): Use for_each_thread.
2840 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2842 * regcache.c (regcache_invalidate_one): Remove.
2843 (regcache_invalidate_pid): use for_each_thread.
2845 2017-11-26 Tom Tromey <tom@tromey.com>
2847 * linux-low.c (linux_create_inferior): Update.
2849 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2851 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2853 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2855 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2856 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2857 * linux-aarch64-tdesc-selftest.c: New file.
2858 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2860 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2862 * configure.srv: Add new file.
2863 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2864 * linux-aarch64-tdesc-selftest.c: New file.
2865 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2867 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2869 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2870 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2871 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2873 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2875 * configure.srv: Add new files.
2876 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2877 aarch64_linux_read_description.
2878 * linux-aarch64-low.c (aarch64_linux_read_description):
2879 Merge with aarch64_arch_setup.
2880 (aarch64_arch_setup): Call aarch64_linux_read_description.
2881 * linux-aarch64-tdesc.c: New file.
2882 * linux-aarch64-tdesc.h: New file.
2884 2017-11-24 Yao Qi <yao.qi@linaro.org>
2886 * configure.srv: Set $srv_regobj for tic6x-linux.
2887 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2888 (tic6x_read_description): Move some code to tic6x_arch_setup.
2889 (tic6x_tdesc_test): New function.
2890 (initialize_low_arch): Call selftests::register_test.
2892 2017-11-22 Yao Qi <yao.qi@linaro.org>
2894 * remote-utils.c (prepare_resume_reply): Use memcpy.
2896 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2898 * linux-low.c (kill_one_lwp_callback): Return void, take
2899 argument directly, don't filter on pid.
2900 (linux_kill): Use for_each_thread.
2902 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2904 * linux-low.c (need_step_over_p): Return bool, remove dummy
2906 (linux_resume, proceed_all_lwps): Use find_thread.
2908 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2910 * linux-low.c (resume_status_pending_p): Return bool, remove
2912 (linux_resume): Use find_thread.
2914 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2916 * linux-low.c (struct thread_resume_array): Remove.
2917 (linux_set_resume_request): Return void, take arguments
2919 (linux_resume): Use for_each_thread.
2921 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2923 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2924 return bool, remove data argument.
2925 (linux_stabilize_threads): Use find_thread.
2927 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2929 * linux-low.c (unsuspend_one_lwp): Remove.
2930 (unsuspend_all_lwps): Use for_each_thread, inline code from
2933 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2935 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2936 * linux-low.c (struct iterate_over_lwps_args): Remove.
2937 (iterate_over_lwps_filter): Remove.
2938 (iterate_over_lwps): Use find_thread.
2940 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2942 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2943 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2944 code from reset_lwp_ptrace_options_callback.
2946 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2948 * linux-arm-low.c (struct update_registers_data): Remove.
2949 (update_registers_callback): Return void, take arguments
2950 directly, don't check thread's pid.
2951 (arm_insert_point, arm_remove_point): Use for_each_thread.
2953 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2955 * win32-low.c (continue_one_thread): Return void, take argument
2957 (child_continue): Use for_each_thread.
2959 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2961 * win32-i386-low.c (update_debug_registers_callback): Rename
2963 (update_debug_registers): ... this, return void, remove pid_p arg.
2964 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2966 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2968 * inferiors.h (struct process_info): Add constructor, initialize
2970 <syscalls_to_catch>: Change type to std::vector<int>.
2971 * inferiors.c (add_process): Allocate process_info with new.
2972 (remove_process): Free process_info with delete.
2973 * linux-low.c (handle_extended_wait): Adjust.
2974 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2975 * server.c (handle_general_set): Adjust.
2977 2017-11-16 Pedro Alves <palves@redhat.com>
2979 * remote-utils.c (remote_close): Block SIGIO signals instead of
2980 uninstalling the SIGIO handler.
2982 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2984 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2986 2017-11-16 Yao Qi <yao.qi@linaro.org>
2988 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2989 (tic6x_store_gregset): Likewise.
2990 (tic6x_usrregs_info): Move it up.
2992 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2994 * Makefile.in: Update arch rules.
2995 * configure.srv: Explicitly mark arch/ files.
2997 2017-11-13 Andreas Schwab <schwab@suse.de>
2999 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3001 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3003 2017-11-06 Pedro Alves <palves@redhat.com>
3005 * config.in, configure: Regenerate.
3007 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3009 * target.c (struct thread_search): Remove.
3010 (thread_search_callback): Remove.
3011 (prepare_to_access_memory): Use for_each_thread instead of
3012 find_inferior. Inline code from thread_search_callback.
3014 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3016 * server.c (struct visit_actioned_threads_data): Remove.
3017 (visit_actioned_threads): Change prototype to take arguments
3019 (resume): Use find_thread instead of find_inferior.
3021 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3023 * server.c (queue_stop_reply_callback): Change prototype, return
3025 (find_status_pending_thread_callback): Remove.
3026 (handle_status): Replace find_inferior with find_thread and
3029 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3031 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3033 (aarch64_store_gregset): Likewise.
3034 (aarch64_fill_fpregset): Likewise.
3035 (aarch64_store_fpregset): Likewise.
3037 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3039 * gdbthread.h (find_thread, for_each_thread): New functions.
3040 * inferiors.c (thread_of_pid): Remove.
3041 (find_any_thread_of_pid): Use find_thread.
3042 * linux-low.c (num_lwps): Use for_each_thread.
3044 2017-10-17 Yao Qi <yao.qi@linaro.org>
3046 * Makefile.in: Remove one rule.
3047 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3049 2017-10-17 Yao Qi <yao.qi@linaro.org>
3051 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3052 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3054 2017-10-17 Yao Qi <yao.qi@linaro.org>
3056 * configure.srv: Rename arm.o with arch/arm.o.
3058 2017-10-17 Yao Qi <yao.qi@linaro.org>
3060 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3061 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3062 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3063 (arch-i386.o, arch-amd64.o): Remove rules.
3064 (arch/%.o): New rule.
3065 Update POSTCOMPILE and COMPILE.pre.
3066 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3067 * configure: Re-generated.
3068 * configure.srv: Replace arch-i386.o with arch/i386.o.
3069 Replace arch-amd64.o with arch/amd64.o.
3071 2017-10-16 Yao Qi <yao.qi@linaro.org>
3073 * configure: Regenerated.
3075 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3077 * inferiors.h: (struct inferior_list): Remove.
3078 (struct inferior_list_entry); Remove.
3079 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3080 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3081 get_first_inferior): Remove.
3082 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3083 find_inferior_id, find_inferior_in_random): Change signature.
3084 * inferiors.c (all_threads): Change type to
3085 std::list<thread_info *>.
3086 (get_thread): Remove macro.
3087 (find_inferior, find_inferior_id): Change signature, implement
3089 (find_inferior_in_random): Change signature, implement using
3090 find_thread_in_random.
3091 (for_each_inferior, for_each_inferior_with_data): Change
3092 signature, implement using for_each_thread.
3093 (add_inferior_to_list, remove_inferior): Remove.
3094 (add_thread, get_first_thread, thread_of_pid,
3095 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3096 (get_first_inferior, one_inferior_p, clear_inferior_list):
3098 (clear_inferiors, get_thread_process): Update.
3099 * gdbthread.h: Include <list>.
3100 (struct thread_info) <entry>: Remove field.
3102 (all_threads): Change type to std::list<thread_info *>.
3103 (get_first_inferior): Add doc.
3104 (find_thread, for_each_thread, find_thread_in_random): New
3106 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3107 * linux-arm-low.c (update_registers_callback): Update.
3108 * linux-low.c (second_thread_of_pid_p): Update.
3109 (kill_one_lwp_callback, linux_detach_lwp_callback,
3110 delete_lwp_callback, status_pending_p_callback, same_lwp,
3111 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3112 iterate_over_lwps, not_stopped_callback,
3113 resume_stopped_resumed_lwps, count_events_callback,
3114 select_singlestep_lwp_callback, select_event_lwp_callback,
3115 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3116 suspend_and_send_sigstop_callback, wait_for_sigstop,
3117 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3118 lwp_running, linux_set_resume_request, resume_status_pending_p,
3119 need_step_over_p, start_step_over, linux_resume_one_thread,
3120 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3121 reset_lwp_ptrace_options_callback): Update.
3122 * linux-mips-low.c (update_watch_registers_callback): Update.
3123 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3125 (free_register_cache_thread_one): Remove.
3126 (regcache_release): Update.
3127 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3128 handle_qxfer_threads_worker): Update.
3129 (handle_query): Update, use list iterator.
3130 (visit_actioned_threads, handle_pending_status,
3131 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3132 clear_pending_status_callback, set_pending_status_callback,
3133 find_status_pending_thread_callback, handle_status,
3134 process_serial_event): Update.
3135 * target.c (thread_search_callback): Update.
3136 * thread-db.c (thread_db_get_tls_address): Update.
3137 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3139 * win32-i386-low.c (update_debug_registers_callback): Update.
3140 * win32-low.c (delete_thread_info, child_delete_thread,
3141 continue_one_thread, suspend_one_thread,
3142 get_child_debug_event): Adjust.
3144 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3146 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3147 * inferiors.h: Include <list>.
3148 (struct process_info) <entry>: Remove field.
3150 (pid_of): Change macro to function.
3151 (ptid_of, lwpid_of): Remove macro.
3152 (all_processes): Change type to std::list<process_info *>.
3153 (ALL_PROCESSES): Remove macro.
3154 (for_each_process, find_process): New function.
3155 * inferiors.c (all_processes): Change type to
3156 std::list<process_info *>.
3157 (find_thread_process): Adjust.
3158 (add_process): Likewise.
3159 (remove_process): Likewise.
3160 (find_process_pid): Likewise.
3161 (get_first_process): Likewise.
3162 (started_inferior_callback): Remove.
3163 (have_started_inferiors_p): Adjust.
3164 (attached_inferior_callback): Remove.
3165 (have_attached_inferiors_p): Adjust.
3166 * linux-low.c (check_zombie_leaders): Likewise.
3167 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3168 (x86_linux_update_xmltarget): Adjust.
3169 * server.c (handle_query): Likewise.
3170 (gdb_reattached_process): Remove.
3171 (handle_status): Adjust.
3172 (kill_inferior_callback): Likewise.
3173 (detach_or_kill_inferior): Remove.
3174 (print_started_pid): Likewise.
3175 (print_attached_pid): Likewise.
3176 (detach_or_kill_for_exit): Update.
3177 (process_serial_event): Likewise.
3178 * linux-arm-low.c (arm_new_fork): Likewise.
3180 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3182 * dll.h: Include <list>.
3183 (struct dll_info): Add constructor.
3184 <entry>: Remove field.
3185 (all_dlls): Change type to std::list<dll_info>.
3186 * dll.c: Include <algorithm>.
3187 (get_dll): Remove macro.
3188 (all_dlls): Change type to std::list<dll_info *>.
3189 (free_one_dll): Remove.
3190 (match_dll): Likewise.
3191 (loaded_dll): Adjust.
3192 (unloaded_dll): Adjust to all_dlls type change, use
3193 std::find_if. Inline code from match_dll.
3194 (clear_dlls): Adjust to all_dlls type change.
3195 * server.c (emit_dll_description): Remove.
3196 (handle_qxfer_libraries): Adjust to all_dlls type change,
3197 integrate emit_dll_description's functionality.
3199 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3201 * linux-low.h (struct linux_target_ops) <delete_process>: New
3203 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3204 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3205 (struct linux_target_ops): Add delete_process callback.
3206 * linux-arm-low.c (arm_delete_process): New.
3207 (struct linux_target_ops): Add delete_process callback.
3208 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3209 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3210 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3211 * linux-mips-low.c (mips_linux_delete_process): New.
3212 (struct linux_target_ops): Add delete_process callback.
3213 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3214 * linux-s390-low.c (struct linux_target_ops): Likewise.
3215 * linux-sh-low.c (struct linux_target_ops): Likewise.
3216 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3217 * linux-tile-low.c (struct linux_target_ops): Likewise.
3218 * linux-x86-low.c (x86_linux_delete_process): New.
3219 (struct linux_target_ops): Add delete_process callback.
3220 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3222 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3224 * linux-aarch64-low.c (the_low_target): Add thread delete
3226 * linux-arm-low.c (arm_delete_thread): New function.
3227 (the_low_target): Add thread delete callback.
3228 * linux-bfin-low.c (the_low_target): Likewise.
3229 * linux-crisv32-low.c (the_low_target): Likewise.
3230 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3232 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3234 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3235 * linux-mips-low.c (mips_linux_delete_thread): New function.
3236 (the_low_target): Add thread delete callback.
3237 * linux-ppc-low.c (the_low_target): Likewise.
3238 * linux-s390-low.c (the_low_target): Likewise.
3239 * linux-sh-low.c (the_low_target): Likewise.
3240 * linux-tic6x-low.c (the_low_target): Likewise.
3241 * linux-tile-low.c (the_low_target): Likewise.
3242 * linux-x86-low.c (the_low_target): Likewise.
3243 * linux-xtensa-low.c (the_low_target): Likewise.
3245 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3247 * win32-low.c: Include "common-inferior.h".
3249 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3251 * inferiors.c (set_inferior_cwd): New function.
3252 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3253 (handle_query): Inform that QSetWorkingDir is supported.
3254 * win32-low.c (create_process): Pass the inferior's cwd to
3257 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3259 * inferiors.c (current_inferior_cwd): New global variable.
3260 (get_inferior_cwd): New function.
3261 * inferiors.h (struct process_info) <cwd>: New field.
3263 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3265 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3266 (OBS): Add gdb_tilde_expand.o.
3268 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3270 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3271 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3273 2017-09-29 Pedro Alves <palves@redhat.com>
3275 * ax.c (gdb_parse_agent_expr): Constify.
3276 * ax.h (gdb_parse_agent_expr): Constify.
3277 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3279 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3280 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3281 * remote-utils.h (read_ptid): Constify.
3282 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3283 (process_point_options, process_serial_event): Constify.
3284 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3285 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3286 (cmd_qtbuffer): Constify.
3288 2017-09-29 Pedro Alves <palves@redhat.com>
3290 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3293 2017-09-29 Pedro Alves <palves@redhat.com>
3295 * linux-low.c (handle_extended_wait): Pass parent thread instead
3296 of process to thread_db_notice_clone.
3297 * linux-low.h (thread_db_notice_clone): Replace parent process
3298 parameter with parent thread parameter.
3299 * thread-db.c (find_one_thread): Add comment.
3300 (thread_db_notice_clone): Replace parent process parameter with
3301 parent thread parameter. Temporarily switch to the parent thread.
3303 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3305 * gdbthread.h: Include "common-gdbthread.h".
3306 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3307 "if" when validating the ptid.
3308 * remote-utils.c: Include "gdbthread.h".
3309 (prepare_resume_reply): Use "switch_to_thread".
3310 * target.c (done_accessing_memory): Likewise.
3312 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3314 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3315 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3316 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3317 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3318 s390x-gs-linux64-ipa.o to ipa_obj.
3319 * linux-s390-low.c (HWCAP_S390_GS): New define.
3320 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3322 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3323 (s390_arch_setup): Check for guarded-storage support and choose
3325 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3326 init_registers_s390x_gs_linux64.
3327 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3329 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3330 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3332 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3334 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3336 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3338 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3339 (thread_db_thread_handle): Declare.
3340 * linux-low.c (linux_target_ops): Initialize thread_handle.
3341 * server.c (handle_qxfer_threads_worker): Add support for
3343 * target.h (struct target_ops): Add new function pointer,
3345 (target_thread_handle): Define.
3346 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3348 (thread_db_thread_handle): New function.
3350 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3352 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3353 * linux-low.h (thread_db_notice_clone): Declare.
3354 * thread-db.c (thread_db_notice_clone): New function.
3356 2017-09-21 Pedro Alves <palves@redhat.com>
3358 * server.c (gdb_read_memory, handle_status, process_serial_event)
3359 (handle_serial_event, handle_target_event): Adjust to
3360 set_desired_thread prototype change.
3361 * target.c (set_desired_thread): Remove 'use_general' parameter
3363 * target.h (set_desired_thread): Remove 'use_general' parameter.
3365 2017-09-20 Tom Tromey <tom@tromey.com>
3367 * target.c (target_terminal::terminal_state): Define.
3368 (target_terminal::init): Rename from target_terminal_init.
3369 (target_terminal::inferior): Rename from
3370 target_terminal_inferior.
3371 (target_terminal::ours): Rename from target_terminal_ours.
3372 (target_terminal::ours_for_output, target_terminal::info): New.
3374 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3376 * server.c (accumulate_file_name_length): Remove.
3377 (emit_dll_description): Adjust to std::string change.
3378 (handle_qxfer_libraries): Use std::string to hold document.
3380 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3382 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3383 return type of xml_escape_text.
3384 * server.c (emit_dll_description): Likewise.
3386 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3388 * server.c (captured_main): Accept argument for --selftest.
3389 Update run_tests call.
3390 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3391 when registering selftests.
3393 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3395 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3396 instead of "VEC" for "target_desc.reg_defs".
3397 (regcache_cpy): Likewise.
3398 (registers_to_string): Likewise.
3399 (registers_from_string): Likewise.
3400 (find_regno): Likewise.
3401 (supply_regblock): Likewise.
3402 (regcache_raw_read_unsigned): Likewise.
3403 * tdesc.c (init_target_desc): Likewise.
3404 (tdesc_create_reg): Likewise.
3405 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3406 (struct target_desc) <reg_defs>: Convert to "std::vector".
3407 (target_desc): Do not initialize "reg_defs".
3408 (~target_desc): Update code to use "std::vector" instead of "VEC"
3409 for "target_desc.reg_defs".
3410 (operator==): Likewise.
3412 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3414 * inferiors.h (thread_to_gdb_id): Remove.
3415 * inferiors.c (thread_to_gdb_id): Remove.
3416 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3417 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3418 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3420 * nto-low.c (nto_fetch_registers, nto_store_registers,
3421 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3423 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3425 * inferiors.h (gdb_id_to_thread_id): Remove.
3426 * inferiors.c (gdb_id_to_thread_id): Remove.
3427 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3428 removal. Move pid declaration closer to where it's used.
3430 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3432 * server.c (handle_detach): New function.
3433 (process_serial_event): Move code out, call handle_detach.
3435 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3437 * server.c (require_running): Rename to ...
3438 (require_running_or_return): ... this ...
3439 (require_running_or_break): ... and this.
3440 (handle_query, process_serial_event): Adjust.
3442 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3444 * linux-low.c (linux_set_resume_request): Remove unused
3447 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3449 * server.c (first_thread_of): Remove.
3450 (process_serial_event): Replace usage of first_thread_of with
3451 find_any_thread_of_pid.
3452 * tracepoint.c (same_process_p): Remove.
3453 (gdb_agent_about_to_close): Replace usage of same_process_p with
3454 find_any_thread_of_pid.
3455 * linux-x86-low.c (same_process_callback): Remove.
3456 (x86_arch_setup_process_callback): Replace usage of
3457 same_process_callback with find_any_thread_of_pid.
3458 * thread-db.c (any_thread_of): Remove.
3459 (switch_to_process): Replace usage of any_thread_of with
3460 find_any_thread_of_pid.
3461 * inferiors.c (thread_pid_matches_callback): Remove.
3462 (find_thread_process): Adjust to use find_any_thread_of_pid.
3464 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3466 * regcache.c (get_thread_regcache): Guard calls to "memset"
3469 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3471 * linux-low.c (handle_extended_wait): Use
3472 "allocate_target_description" instead of "XNEW".
3473 * linux-x86-low.c (initialize_low_arch): Likewise.
3475 2017-09-05 Yao Qi <yao.qi@linaro.org>
3477 * configure.srv (srv_i386_regobj): Remove.
3478 (srv_amd64_regobj): Remove.
3479 (srv_regobj): Set it to "" for x86 non-linux targets.
3480 * linux-x86-tdesc.c (i386_linux_read_description):
3481 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3482 (init_registers_i386): Remove the declaration.
3483 (tdesc_i386): Remove the declaration.
3484 (lynx_i386_arch_setup): Call i386_create_target_description.
3485 * nto-x86-low.c: Likewise.
3486 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3487 [!__x86_64__]: include arch/i386.h.
3488 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3490 2017-09-05 Yao Qi <yao.qi@linaro.org>
3492 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3493 i386/amd64-XXX-linux from it.
3495 2017-09-05 Yao Qi <yao.qi@linaro.org>
3497 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3499 (ipa_amd64_linux_regobj): Remove.
3500 (ipa_x32_linux_regobj): Remove.
3502 2017-09-05 Yao Qi <yao.qi@linaro.org>
3504 * Makefile.in (arch-amd64.o): New rule.
3505 * configure.srv: Append arch-amd64.o.
3506 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3507 (get_ipa_tdesc): Call amd64_linux_read_description.
3508 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3509 and init_registers_amd64_XXX.
3510 * linux-x86-low.c (x86_linux_read_description): Call
3511 amd64_linux_read_description.
3512 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3513 (initialize_low_arch): Don't call init_registers_x32_XXX and
3514 init_registers_amd64_XXX.
3515 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3516 and tdesc_amd64_XXX.
3517 [__x86_64__] (amd64_tdesc_test): New function.
3518 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3519 and init_registers_amd64_XXX.
3520 * linux-x86-tdesc.c: Include arch/amd64.h.
3521 (xcr0_to_tdesc_idx): New function.
3522 (i386_linux_read_description): New function.
3523 (amd64_get_ipa_tdesc_idx): New function.
3524 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3525 (amd64_get_ipa_tdesc): Declare.
3527 2017-09-05 Yao Qi <yao.qi@linaro.org>
3529 * configure.srv (srv_i386_linux_xmlfiles): Remove
3530 i386/i386-XXX-linux.xml from it.
3532 2017-09-05 Yao Qi <yao.qi@linaro.org>
3534 * configure.srv: Set srv_i386_linux_regobj empty if $development
3536 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3537 initialize_low_tdesc.
3538 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3539 with #if initialize_low_tdesc.
3540 * linux-x86-tdesc-selftest.c: New file.
3541 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3543 2017-09-05 Yao Qi <yao.qi@linaro.org>
3545 * Makefile.in (arch-i386.o): New rule.
3546 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3547 (x86_64-*-linux*): Likewise.
3548 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3549 include arch/i386.h.
3550 (i386_linux_read_description): Remove code and call
3551 i386_create_target_description.
3552 * tdesc.c (allocate_target_description): New function.
3553 * tdesc.h (set_tdesc_architecture): Remove declaration.
3554 (set_tdesc_osabi): Likewise.
3556 2017-09-05 Yao Qi <yao.qi@linaro.org>
3558 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3559 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3560 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3562 * server.c (get_features_xml): Call tdesc_get_features_xml.
3563 * tdesc.c (set_tdesc_architecture): New function.
3564 (set_tdesc_osabi): New function.
3565 (tdesc_get_features_xml): New function.
3566 (tdesc_create_feature): Add an argument.
3567 * tdesc.h (struct target_desc) <features>: New field.
3568 <arch, osabi>: New field.
3569 (~target_desc): xfree features, arch, and osabi.
3570 (target_desc::oerator==): Don't compare .xmltarget.
3571 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3572 (set_tdesc_osabi): Likewise.
3573 (tdesc_get_features_xml): Likewise.
3575 2017-09-05 Yao Qi <yao.qi@linaro.org>
3577 * linux-x86-tdesc.c: Include selftest.h.
3578 (i386_tdesc_test): New function.
3579 (initialize_low_tdesc): Call selftests::register_test.
3580 * tdesc.h: Include regdef.h.
3581 (target_desc): Override operator == and !=.
3583 2017-09-05 Yao Qi <yao.qi@linaro.org>
3585 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3586 (ipa_obj): Likewise.
3587 * linux-i386-ipa.c: Include common/x86-xstate.h
3588 (get_ipa_tdesc): Call i386_linux_read_description.
3589 (initialize_low_tracepoint): Don't call init_registers_XXX
3590 functions, call initialize_low_tdesc instead.
3591 * linux-x86-low.c (x86_linux_read_description): Call
3592 i386_linux_read_description.
3593 (initialize_low_arch): Don't call init_registers_i386_XXX
3594 functions, call initialize_low_tdesc.
3595 * linux-x86-tdesc.c: New file.
3596 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3597 (i386_get_ipa_tdesc_idx): Declare.
3598 (i386_get_ipa_tdesc): Declare.
3599 (initialize_low_tdesc): Declare.
3601 2017-09-05 Yao Qi <yao.qi@linaro.org>
3603 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3606 2017-09-05 Yao Qi <yao.qi@linaro.org>
3608 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3609 * regcache.c (get_thread_regcache): Use VEC_length.
3610 (init_register_cache): Likewise.
3611 (regcache_cpy): Likewise.
3612 (registers_to_string): Iterate reg_defs via VEC_iterate.
3613 (find_regno): Likewise.
3614 (find_register_by_number): Use VEC_index.
3615 (register_size): Call find_register_by_number.
3616 (register_data): Call find_register_by_number.
3617 (supply_regblock): Use VEC_length.
3618 (regcache_raw_read_unsigned): Likewise.
3619 * tdesc.c (init_target_desc): Iterate reg_defs via
3621 (default_description): Update initializer.
3622 (copy_target_description): Don't update field num_registers.
3623 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3624 <num_registers>: Remove.
3626 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3628 * Makefile.in (.SECONDARY): Define target.
3630 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3632 * linux-low.c (linux_wait_1): Adjust.
3633 * server.c (queue_stop_reply_callback): Adjust.
3635 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3637 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3638 QEnvironmentUnset and QEnvironmentReset packets.
3639 (handle_query): Inform remote that QEnvironmentHexEncoded,
3640 QEnvironmentUnset and QEnvironmentReset are supported.
3642 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3644 * inferiors.h (inferior_target_data): Rename to ...
3645 (thread_target_data): ... this.
3646 (inferior_regcache_data): Rename to ...
3647 (thread_regcache_data): ... this.
3648 (set_inferior_regcache_data): Rename to ...
3649 (set_thread_regcache_data): ... this.
3650 * inferiors.c (inferior_target_data): Rename to ...
3651 (thread_target_data): ... this.
3652 (inferior_regcache_data): Rename to ...
3653 (thread_regcache_data): ... this.
3654 (set_inferior_regcache_data): Rename to ...
3655 (set_thread_regcache_data): ... this.
3656 (free_one_thread): Update.
3657 * linux-low.h (get_thread_lwp): Update.
3658 * regcache.c (get_thread_regcache): Update.
3659 (regcache_invalidate_thread): Update.
3660 (free_register_cache_thread): Update.
3661 * win32-i386-low.c (update_debug_registers_callback): Update.
3662 (win32_get_current_dr): Update.
3663 * win32-low.c (thread_rec): Update.
3664 (delete_thread_info): Update.
3665 (continue_one_thread): Update.
3666 (suspend_one_thread): Update.
3668 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3670 * inferiors.c (set_inferior_target_data): Remove.
3671 * inferiors.h (set_inferior_target_data): Remove.
3673 2017-08-18 Yao Qi <yao.qi@linaro.org>
3675 * Makefile.in (OBS): Add selftest.o.
3676 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3677 * configure, config.in: Re-generated.
3678 * server.c: Include common/sefltest.h.
3679 (captured_main): Handle option --selftest.
3681 2017-08-09 Yao Qi <yao.qi@linaro.org>
3683 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3684 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3685 i386-avx-mpx.o and i386-mmx.o.
3686 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3687 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3688 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3689 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3690 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3691 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3692 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3693 i386/amd64-avx-mpx.xml.
3695 2017-08-09 Yao Qi <yao.qi@linaro.org>
3697 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3698 and x32-avx-avx512.o.
3699 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3700 i386/x32-avx-avx512.xml.
3702 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3704 * tracepoint.h (enum class fast_tpoint_collect_result): New
3706 (fast_tracepoint_collecting): Change return type to
3707 fast_tpoint_collect_result.
3708 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3709 * linux-low.h: Include tracepoint.h.
3710 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3711 fast_tpoint_collect_result.
3712 * linux-low.c (handle_tracepoints): Adjust.
3713 (linux_fast_tracepoint_collecting): Change return type to
3714 fast_tpoint_collect_result.
3715 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3716 linux_wait_1, stuck_in_jump_pad_callback,
3717 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3718 proceed_one_lwp): Adjust to type change.
3720 2017-07-10 Yao Qi <yao.qi@linaro.org>
3722 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3724 2017-06-29 Yao Qi <yao.qi@linaro.org>
3726 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3728 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3730 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3732 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3734 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3736 * linux-low.c (linux_create_inferior): Adjust code to access the
3737 environment information via 'gdb_environ' class.
3738 * lynx-low.c (lynx_create_inferior): Likewise.
3739 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3740 (get_environ): Return a pointer to 'our_environ'.
3741 (captured_main): Initialize 'our_environ'.
3742 * server.h (get_environ): Adjust prototype.
3743 * spu-low.c (spu_create_inferior): Adjust code to access the
3744 environment information via 'gdb_environ' class.
3746 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3748 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3749 usage of "register" keyword.
3751 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3753 * configure: Re-generate.
3755 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3757 * configure: Re-generate.
3759 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3761 * Makefile.in (COMPILE.pre): Add "-x c++".
3763 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3765 * fork-child.c: Conditionally include <signal.h>.
3767 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3769 * server.c (handle_general_set): Handle new packet
3770 "QStartupWithShell".
3771 (handle_query): Add "QStartupWithShell" to the list of supported
3773 (gdbserver_usage): Add help text explaining the
3774 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3776 (captured_main): Recognize and act upon the presence of the new
3779 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3780 Pedro Alves <palves@redhat.com>
3782 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3783 * configure: Regenerate.
3784 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3786 (i[34567]86-*-lynxos*): Likewise.
3787 (spu*-*-*): Likewise.
3788 * fork-child.c: New file.
3789 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3791 (linux_ptrace_fun): New function.
3792 (linux_create_inferior): Adjust function prototype to reflect
3793 change on "target.h". Adjust function code to use
3795 (linux_request_interrupt): Delete "signal_pid".
3796 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3797 (lynx_ptrace_fun): New function.
3798 (lynx_create_inferior): Adjust function prototype to reflect
3799 change on "target.h". Adjust function code to use
3801 * nto-low.c (nto_create_inferior): Adjust function prototype and
3802 code to reflect change on "target.h". Update comments.
3803 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3804 "common-terminal.h" and "environ.h".
3805 (terminal_fd): Moved to fork-child.c.
3806 (old_foreground_pgrp): Likewise.
3807 (restore_old_foreground_pgrp): Likewise.
3808 (last_status): Make it global.
3809 (last_ptid): Likewise.
3810 (our_environ): New variable.
3811 (startup_with_shell): Likewise.
3812 (program_name): Likewise.
3813 (program_argv): Rename to...
3814 (program_args): ...this.
3815 (wrapper_argv): New variable.
3816 (start_inferior): Delete function.
3817 (get_exec_wrapper): New function.
3818 (get_exec_file): Likewise.
3819 (get_environ): Likewise.
3820 (prefork_hook): Likewise.
3821 (post_fork_inferior): Likewise.
3822 (postfork_hook): Likewise.
3823 (postfork_child_hook): Likewise.
3824 (handle_v_run): Update code to deal with arguments coming from the
3825 remote host. Update calls from "start_inferior" to
3827 (captured_main): Likewise. Initialize environment variable. Call
3829 * server.h (post_fork_inferior): New prototype.
3830 (get_environ): Likewise.
3831 (last_status): Declare.
3832 (last_ptid): Likewise.
3833 (signal_pid): Likewise.
3834 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3835 (spu_ptrace_fun): New function.
3836 (spu_create_inferior): Adjust function prototype to reflect change
3837 on "target.h". Adjust function code to use "fork_inferior".
3838 * target.c (target_terminal_init): New function.
3839 (target_terminal_inferior): Likewise.
3840 (target_terminal_ours): Likewise.
3841 * target.h: Include <vector>.
3842 (struct target_ops) <create_inferior>: Update prototype.
3843 (create_inferior): Update macro.
3844 * utils.c (gdb_flush_out_err): New function.
3845 * win32-low.c (win32_create_inferior): Adjust function prototype
3846 and code to reflect change on "target.h".
3848 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3850 * inferiors.c (switch_to_thread): New function.
3852 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3854 * Makefile.in (SFILE): Add "common/job-control.c".
3855 (OBS): Add "job-control.o".
3857 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3859 * Makefile: Remove "@host_makefile_frag@".
3861 2017-05-05 Pedro Alves <palves@redhat.com>
3863 * configure: Regenerate.
3865 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3867 * configure: Regenerate.
3869 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3871 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3872 software_single_step change of return type to
3873 std::vector<CORE_ADDR>.
3874 * linux-low.c (install_software_single_step_breakpoints):
3876 * linux-low.h (install_software_single_step_breakpoints):
3879 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3881 * remote-utils.c: Include "gdb_termios.h" instead of
3883 * terminal.h: Delete file.
3885 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3887 * server.c: Include <vector>.
3888 <program_argv, wrapper_argv>: Convert to std::vector.
3889 (start_inferior): Rewrite function to use C++.
3890 (handle_v_run): Likewise. Update code that calculates the argv
3891 based on the vRun packet; use C++.
3892 (captured_main): Likewise.
3894 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3896 * server.c (handle_v_cont): Initialize thread_resume::thread
3899 2017-04-05 Pedro Alves <palves@redhat.com>
3901 * configure: Regenerate.
3903 2017-04-05 Pedro Alves <palves@redhat.com>
3905 * gdbreplay.c (sync_error): Constify.
3906 * linux-x86-low.c (push_opcode): Constify.
3908 2017-04-05 Pedro Alves <palves@redhat.com>
3910 * win32-low.c (get_child_debug_event)
3911 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3912 Report TARGET_WAITKIND_SPURIOUS instead.
3914 2017-04-05 Pedro Alves <palves@redhat.com>
3916 * remote-utils.c (remote_prepare, remote_open): Constify.
3917 * remote-utils.h (remote_prepare, remote_open): Constify.
3918 * server.c (captured_main): Constify 'port' handling.
3920 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3922 * Makefile.in (clean): Clear .deps.
3924 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3926 * .gitignore: Remove generated files, replace with wildcard.
3927 * (clean): Replace removal of generated files with wildcard.
3928 (version.c): Replace with...
3929 (version-generated.c): ...this.
3930 (xml-builtin.c): Replace with...
3931 (xml-builtin-generated.c): ...this.
3932 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3933 (%.c: *regformats*): Replace with...
3934 (%-generated.c: *regformats*): ...this.
3936 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3938 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3939 (xtensa_fill_gregset): Call collect_register_by_name for
3941 (xtensa_store_gregset): Call supply_register_by_name for
3944 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3946 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3947 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3948 (xtensa_store_gregset): Call supply_register for all registers in
3949 a0_regnum..a0_regnum + C0_NREGS range.
3951 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3953 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3954 (ax-ipa.o: ax.c): Remove.
3955 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3956 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3957 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3958 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3959 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3961 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3963 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3964 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3965 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3966 (errors-ipa.o: ../common/errors.c): Remove.
3967 (format-ipa.o: ../common/format.c): Remove.
3968 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3970 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3972 * Makefile.in (%-ipa.o: %.c): New rule.
3973 (tracepoint-ipa.o: tracepoint.c): Remove.
3974 (utils-ipa.o: utils.c): Remove.
3975 (remote-utils-ipa.o: remote-utils.c): Remove.
3976 (regcache-ipa.o: regcache.c): Remove.
3977 (i386-linux-ipa.o: i386-linux.c): Remove.
3978 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3979 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3980 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3981 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3982 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3983 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3984 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3985 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3986 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3987 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3988 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3989 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3990 (aarch64-ipa.o: aarch64.c): Remove.
3991 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3992 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3993 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3994 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3995 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3996 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3997 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3998 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3999 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4000 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4001 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4002 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4003 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4004 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4005 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4006 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4007 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4008 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4009 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4010 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4011 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4012 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4013 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4014 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4015 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4016 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4017 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4018 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4019 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4020 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4021 (tdesc-ipa.o: tdesc.c): Remove.
4022 (x32-linux-ipa.o: x32-linux.c): Remove.
4023 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4024 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4026 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4028 * Makefile.in (%.o: ../arch/%.c): New rule.
4029 (arm.o: ../arch/arm.c): Remove.
4030 (arm-linux.o: ../arch/arm-linux.c): Remove.
4031 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4032 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4034 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4036 * Makefile.in (%.o: ../nat/%.c): New rule.
4037 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4038 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4039 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4040 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4041 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4042 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4043 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4044 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4045 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4046 (linux-personality.o: ../nat/linux-personality.c): Remove.
4047 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4048 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4049 (x86-linux.o: ../nat/x86-linux.c): Remove.
4050 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4051 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4053 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4055 * Makefile.in (%.o: ../common/%.c): New rule.
4056 (signals.o: ../common/signals.c): Remove.
4057 (print-utils.o: ../common/print-utils.c): Remove.
4058 (rsp-low.o: ../common/rsp-low.c): Remove.
4059 (common-utils.o: ../common/common-utils.c): Remove.
4060 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4061 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4062 (vec.o: ../common/vec.c): Remove.
4063 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4064 (xml-utils.o: ../common/xml-utils.c): Remove.
4065 (ptid.o: ../common/ptid.c): Remove.
4066 (buffer.o: ../common/buffer.c): Remove.
4067 (format.o: ../common/format.c): Remove.
4068 (filestuff.o: ../common/filestuff.c): Remove.
4069 (agent.o: ../common/agent.c): Remove.
4070 (errors.o: ../common/errors.c): Remove.
4071 (environ.o: ../common/environ.c): Remove.
4072 (common-debug.o: ../common/common-debug.c): Remove.
4073 (cleanups.o: ../common/cleanups.c): Remove.
4074 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4075 (fileio.o: ../common/fileio.c): Remove.
4076 (common-regcache.o: ../common/common-regcache.c): Remove.
4077 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4078 (new-op.o: ../common/new-op.c): Remove.
4079 (btrace-common.o: ../common/btrace-common.c): Remove.
4081 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4083 * Makefile.in (%.o: ../target/%.c): New rule.
4084 (waitstatus.o: ../target/waitstatus.c): Remove.
4086 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4089 (%.c: ../regformats/%.dat,
4090 (%.c: ../regformats/arm/%.dat,
4091 (%.c: ../regformats/i386/%.dat,
4092 (%.c: ../regformats/rs6000/%.dat): New rules.
4093 (aarch64.c): Remove.
4094 (reg-arm.c): Remove.
4095 (arm-with-iwmmxt.c): Remove.
4096 (arm-with-vfpv2.c): Remove.
4097 (arm-with-vfpv3.c): Remove.
4098 (arm-with-neon.c): Remove.
4099 (reg-bfin.c): Remove.
4100 (reg-cris.c): Remove.
4101 (reg-crisv32.c): Remove.
4103 (i386-linux.c): Remove.
4104 (i386-avx.c): Remove.
4105 (i386-avx-linux.c): Remove.
4106 (i386-avx-avx512.c): Remove.
4107 (i386-avx-avx512-linux.c): Remove.
4108 (i386-mpx.c): Remove.
4109 (i386-mpx-linux.c): Remove.
4110 (i386-avx-mpx-avx512-pku.c): Remove.
4111 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4112 (i386-avx-mpx.c): Remove.
4113 (i386-avx-mpx-linux.c): Remove.
4114 (i386-mmx.c): Remove.
4115 (i386-mmx-linux.c): Remove.
4116 (reg-ia64.c): Remove.
4117 (reg-m32r.c): Remove.
4118 (reg-m68k.c): Remove.
4120 (mips-linux.c): Remove.
4121 (mips-dsp-linux.c): Remove.
4122 (mips64-linux.c): Remove.
4123 (mips64-dsp-linux.c): Remove.
4124 (nios2-linux.c): Remove.
4125 (powerpc-32.c): Remove.
4126 (powerpc-32l.c): Remove.
4127 (powerpc-altivec32l.c): Remove.
4128 (powerpc-cell32l.c): Remove.
4129 (powerpc-vsx32l.c): Remove.
4130 (powerpc-isa205-32l.c): Remove.
4131 (powerpc-isa205-altivec32l.c): Remove.
4132 (powerpc-isa205-vsx32l.c): Remove.
4133 (powerpc-e500l.c): Remove.
4134 (powerpc-64l.c): Remove.
4135 (powerpc-altivec64l.c): Remove.
4136 (powerpc-cell64l.c): Remove.
4137 (powerpc-vsx64l.c): Remove.
4138 (powerpc-isa205-64l.c): Remove.
4139 (powerpc-isa205-altivec64l.c): Remove.
4140 (powerpc-isa205-vsx64l.c): Remove.
4141 (s390-linux32.c): Remove.
4142 (s390-linux32v1.c): Remove.
4143 (s390-linux32v2.c): Remove.
4144 (s390-linux64.c): Remove.
4145 (s390-linux64v1.c): Remove.
4146 (s390-linux64v2.c): Remove.
4147 (s390-te-linux64.c): Remove.
4148 (s390-vx-linux64.c): Remove.
4149 (s390-tevx-linux64.c): Remove.
4150 (s390x-linux64.c): Remove.
4151 (s390x-linux64v1.c): Remove.
4152 (s390x-linux64v2.c): Remove.
4153 (s390x-te-linux64.c): Remove.
4154 (s390x-vx-linux64.c): Remove.
4155 (s390x-tevx-linux64.c): Remove.
4156 (tic6x-c64xp-linux.c): Remove.
4157 (tic6x-c64x-linux.c): Remove.
4158 (tic6x-c62x-linux.c): Remove.
4160 (reg-sparc64.c): Remove.
4161 (reg-spu.c): Remove.
4163 (amd64-linux.c): Remove.
4164 (amd64-avx.c): Remove.
4165 (amd64-avx-linux.c): Remove.
4166 (amd64-avx-avx512.c): Remove.
4167 (amd64-avx-avx512-linux.c): Remove.
4168 (amd64-mpx.c): Remove.
4169 (amd64-mpx-linux.c): Remove.
4170 (amd64-avx-mpx-avx512-pku.c): Remove.
4171 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4172 (amd64-avx-mpx.c): Remove.
4173 (amd64-avx-mpx-linux.c): Remove.
4175 (x32-linux.c): Remove.
4176 (x32-avx.c): Remove.
4177 (x32-avx-linux.c): Remove.
4178 (x32-avx-avx512.c): Remove.
4179 (x32-avx-avx512-linux.c): Remove.
4180 (reg-xtensa.c): Remove.
4181 (reg-tilegx.c): Remove.
4182 (reg-tilegx32.c): Remove.
4184 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4186 * Makefile.in (SFILES): Add "common/environ.c".
4187 (OBJS): Add "common/environ.h".
4189 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4191 * configure.ac: Check if the fs_base and gs_base members of
4192 `struct user_regs_struct' exist.
4193 * config.in: Regenerated.
4194 * configure: Likewise.
4196 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4198 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4200 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4201 (get_next_pcs_syscall_next_pc): Likewise.
4203 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4205 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4206 * nto-x86-low.c: Likewise.
4208 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4210 * Makefile.in: Include disable-implicit-rules.mk.
4212 2016-11-23 Pedro Alves <palves@redhat.com>
4214 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4215 (debug_vprintf): Use std::chrono::steady_clock instead of
4216 gettimeofday. Use '.' instead of ':'.
4217 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4218 (get_timestamp): Use std::chrono::steady_clock instead of
4221 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4223 * Makefile.in: Fix whitespace formatting.
4225 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4227 * Makefile.in (SFILES, OBS): Flatten list and order
4230 2016-11-23 Pedro Alves <palves@redhat.com>
4232 * event-loop.c (handle_file_event): Use warning.
4233 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4234 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4237 2016-11-23 Pedro Alves <palves@redhat.com>
4239 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4241 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4242 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4243 debug_printf and debug_flush for debug output.
4244 * server.c (handle_general_set): Likewise.
4245 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4248 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4250 * Makefile.in (.c.o): Replace rule with ...
4251 (%.o: %.c): ... this one.
4253 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4255 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4256 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4258 * configure.ac: Remove checks for the make program.
4259 * configure: Re-generate.
4261 2016-10-28 Pedro Alves <palves@redhat.com>
4263 * Makefile.in (CXX_DIALECT): Get from configure.
4264 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4265 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4266 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4267 * config.in: Regenerate.
4268 * configure: Regenerate.
4270 2016-10-27 Yao Qi <yao.qi@linaro.org>
4272 * linux-low.c (linux_supports_range_stepping): Return true if
4273 can_software_single_step return true.
4275 2016-10-27 Yao Qi <yao.qi@linaro.org>
4277 * inferiors.c (find_inferior_in_random): New function.
4278 * inferiors.h (find_inferior_in_random): Declare.
4279 * linux-low.c (linux_wait_for_event_filtered): Call
4280 find_inferior_in_random instead of find_inferior.
4282 2016-10-27 Yao Qi <yao.qi@linaro.org>
4284 * linux-low.c (linux_wait_1): If single-step breakpoints are
4285 inserted, remove them.
4287 2016-10-26 Pedro Alves <palves@redhat.com>
4289 * linux-low.c (handle_extended_wait): Link parent/child fork
4291 (linux_wait_1): Unlink them.
4292 (linux_set_resume_request): Ignore resume requests for
4293 already-resumed and unhandled fork child threads.
4294 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4295 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4297 (handle_v_requests) <vCont>: Don't call require_running.
4298 * server.h (in_queued_stop_replies): New declaration.
4300 2016-10-24 Yao Qi <yao.qi@linaro.org>
4303 * linux-aarch64-low.c (append_insns): Cast the return value to
4306 2016-10-10 Yao Qi <yao.qi@linaro.org>
4308 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4310 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4312 * target.c (target_supports_multi_process): New function, moved
4314 * target.h (target_supports_multi_process): ... here. Remove
4317 2016-10-05 Tom Tromey <tom@tromey.com>
4320 * tracepoint.c (handle_tracepoint_bkpts): Check
4321 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4323 2016-10-05 Yao Qi <yao.qi@linaro.org>
4325 * configure.srv: Update the path of arm-*.xml files.
4327 2016-10-05 Terry Guo <terry.guo@arm.com>
4328 Yao Qi <yao.qi@linaro.org>
4330 * Makefile.in: Adjust the path of rules.
4331 * configure.srv: Update the path of xml files.
4332 * regformats/arm-with-iwmmxt.dat: Regenerated.
4333 * regformats/arm-with-neon.dat: Likewise.
4334 * regformats/arm-with-vfpv2.dat: Likewise.
4335 * regformats/arm-with-vfpv3.dat Likewise.
4337 2016-09-30 Yao Qi <yao.qi@linaro.org>
4340 * target.c (target_stop_and_wait): Don't call
4341 target_continue_no_signal, use resume_stop instead.
4343 2016-09-26 Yao Qi <yao.qi@linaro.org>
4345 * linux-low.c (linux_wait_1): Call debug_exit.
4347 2016-09-23 Pedro Alves <palves@redhat.com>
4349 * Makefile.in (SFILES): Add common/new-op.c.
4350 (OBS): Add common/new-op.o.
4351 (new-op.o): New rule.
4353 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4355 * .gitinore: Ignore more files.
4357 2016-09-21 Yao Qi <yao.qi@linaro.org>
4359 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4362 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4364 * server.c (start_inferior): Call target_mourn_inferior instead of
4365 mourn_inferior; pass ptid_t argument to it.
4367 (handle_target_event): Likewise.
4368 * target.c (target_mourn_inferior): New function.
4369 * target.h (mourn_inferior): Delete macro.
4371 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4373 * linux-low.c (lwp_is_stepping): New function.
4375 2016-09-06 Carl Love <cel@us.ibm.com>
4377 * server.c (start_inferior): Fixed comment, requested comment change
4378 didn't get updated correctly. Removed reference to ptrace () call as
4379 it is only true on Linux systems.
4381 2016-09-06 Carl Love <cel@us.ibm.com>
4383 * server.c (start_inferior): Do not call
4384 function target_post_create_inferior () if the
4385 inferior process has already exited.
4387 2016-09-05 Pedro Alves <palves@redhat.com>
4389 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4390 (COMPILE.pre, CC_LD): Use CXX directly.
4391 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4392 * acinclude.m4: Don't include build-with-cxx.m4.
4393 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4394 * configure: Regenerate.
4396 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4399 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4400 call writing data to own_buf.
4402 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4404 * target.c (mywait): Call target_wait instead of
4406 (target_wait): New function.
4408 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4410 * server.c (start_inferior): New variable 'ptid'. Replace calls
4411 to the_target->resume by target_continue{,_no_signal}, depending
4413 * target.c (target_stop_and_wait): Call target_continue_no_signal
4414 instead of the_target->resume.
4415 (target_continue): New function.
4417 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4419 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4421 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4424 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4426 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4427 * linux-arm-low.c (ps_get_thread_area): Likewise.
4428 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4429 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4430 * linux-mips-low.c (ps_get_thread_area): Likewise.
4431 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4432 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4433 * linux-x86-low.c (ps_get_thread_area): Likewise.
4434 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4436 2016-08-19 Pedro Alves <palves@redhat.com>
4438 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4440 2016-08-19 Pedro Alves <palves@redhat.com>
4442 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4443 comment. Use memcpy instead of casting through unsigned long.
4445 2016-08-19 Pedro Alves <palves@redhat.com>
4447 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4448 allocating around 0x80000000.
4450 2016-08-19 Pedro Alves <palves@redhat.com>
4453 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4454 (x32-avx512-linux-ipa.o): New rules.
4455 * configure.ac (x86_64-*-linux*): New x32 check.
4456 * configure.srv (ipa_x32_linux_regobj): New.
4457 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4458 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4460 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4462 * configure: Regenerate.
4464 2016-08-09 Pedro Alves <palves@redhat.com>
4467 * Makefile.in (OBS): Add signals-state-save-restore.o.
4468 (signals-state-save-restore.o): New rule.
4469 * config.in: Regenerate.
4470 * configure: Regenerate.
4471 * linux-low.c: Include "signals-state-save-restore.h".
4472 (linux_create_inferior): Call
4473 restore_original_signals_state.
4474 * server.c: Include "dispositions-save-restore.h".
4475 (captured_main): Call save_original_signals_state.
4477 2016-08-05 Pedro Alves <palves@redhat.com>
4479 * configure: Regenerate.
4481 2016-08-04 Yao Qi <yao.qi@linaro.org>
4483 * linux-low.c (regsets_fetch_inferior_registers): Check
4484 errno is ESRCH or not.
4486 2016-08-02 Yao Qi <yao.qi@linaro.org>
4488 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4489 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4490 (thread_db_load_search): Update.
4491 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4492 td_ta_set_event and td_ta_event_getmsg.
4494 2016-07-26 Pedro Alves <palves@redhat.com>
4497 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4498 of unsigned long for 64-bit registers and use uint32_t instead of
4499 unsigned int for 32-bit registers.
4501 2016-07-26 Pedro Alves <palves@redhat.com>
4503 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4506 2016-07-21 Tom Tromey <tom@tromey.com>
4508 * configure: Rebuild.
4510 2016-07-21 Yao Qi <yao.qi@linaro.org>
4512 * mem-break.c (find_gdb_breakpoint): Cast bp to
4513 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4515 2016-07-21 Yao Qi <yao.qi@linaro.org>
4517 * server.c (handle_v_requests): Support s and S actions
4518 if target_supports_software_single_step return true.
4520 2016-07-21 Yao Qi <yao.qi@linaro.org>
4522 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4523 is resume_step, call maybe_hw_step.
4524 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4526 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4528 (proceed_one_lwp): If resume request is resume_step, install
4529 reinsert breakpoints and call maybe_hw_step.
4531 2016-07-21 Yao Qi <yao.qi@linaro.org>
4533 * linux-low.c (proceed_one_lwp): Declare.
4534 (linux_resume_one_thread): Remove local variable 'step'.
4535 Lift code enqueue signal. Call proceed_one_lwp instead of
4536 linux_resume_one_lwp.
4538 2016-07-21 Yao Qi <yao.qi@linaro.org>
4540 * linux-low.c (linux_resume_one_thread): Call
4541 enqueue_pending_signal.
4543 2016-07-21 Yao Qi <yao.qi@linaro.org>
4545 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4546 * inferiors.c (do_restore_current_thread_cleanup): New function.
4547 (make_cleanup_restore_current_thread): Likewise.
4548 * linux-low.c (install_software_single_step_breakpoints): Call
4549 make_cleanup_restore_current_thread. Switch current_thread to
4552 2016-07-21 Yao Qi <yao.qi@linaro.org>
4554 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4555 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4556 (clone_one_breakpoint): Likewise.
4557 (delete_reinsert_breakpoints): Change parameter to thread.
4559 (has_reinsert_breakpoints): Likewise.
4560 (uninsert_reinsert_breakpoints): Likewise.
4561 (reinsert_reinsert_breakpoints): Likewise.
4562 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4563 (delete_reinsert_breakpoints): Likewise.
4564 (reinsert_reinsert_breakpoints): Likewise.
4565 (uninsert_reinsert_breakpoints): Likewise.
4566 (has_reinsert_breakpoints): Likewise.
4568 2016-07-21 Yao Qi <yao.qi@linaro.org>
4570 * inferiors.c (get_thread_process): Make parameter const.
4571 * inferiors.h (get_thread_process): Update declaration.
4572 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4573 Add new parameters child_thread and parent_thread. Callers
4575 * mem-break.h (clone_all_breakpoints): Update declaration.
4577 2016-07-21 Yao Qi <yao.qi@linaro.org>
4579 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4580 <command_list, handler>: Remove.
4581 (struct gdb_breakpoint): New.
4582 (struct other_breakpoint): New.
4583 (struct reinsert_breakpoint): New.
4584 (is_gdb_breakpoint): New function.
4585 (any_persistent_commands): Update command_list if
4586 is_gdb_breakpoint returns true.
4587 (set_breakpoint): Create breakpoints according to their types.
4588 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4589 (set_gdb_breakpoint_1): Likewise.
4590 (set_gdb_breakpoint): Likewise.
4591 (clear_breakpoint_conditions): Change parameter type to
4592 'struct gdb_breakpoint *'.
4593 (clear_breakpoint_commands): Likewise.
4594 (clear_breakpoint_conditions_and_commands): Likewise.
4595 (add_condition_to_breakpoint): Likewise.
4596 (add_breakpoint_condition): Likewise.
4597 (add_commands_to_breakpoint): Likewise.
4598 (check_breakpoints): Check other_breakpoint.
4599 (clone_one_breakpoint): Clone breakpopint according to its type.
4600 * mem-break.h (struct gdb_breakpoint): Declare.
4601 (set_gdb_breakpoint): Update declaration.
4602 (clear_breakpoint_conditions_and_commands): Likewise.
4603 (add_breakpoint_condition): Likewise.
4604 (add_breakpoint_commands): Likewise.
4605 * server.c (process_point_options): Change parameter type to
4606 'struct gdb_breakpoint *'.
4608 2016-07-21 Yao Qi <yao.qi@linaro.org>
4610 * mem-break.c (set_breakpoint_at): Rename it to ...
4611 (set_breakpoint_type_at): ... it.
4612 (set_breakpoint_at): Call set_breakpoint_type_at.
4613 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4614 * mem-break.h (set_breakpoint_at): Update comments.
4616 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4618 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4620 (nios2_store_gregset): Likewise.
4622 2016-07-01 Pedro Alves <palves@redhat.com>
4623 Antoine Tremblay <antoine.tremblay@ericsson.com>
4625 * linux-low.c: Change interface to take the target lwp_info
4626 pointer directly and return void. Handle detaching from a zombie
4628 (linux_detach_lwp_callback): New function.
4629 (linux_detach): Detach from the leader thread after detaching from
4632 2016-06-28 Yao Qi <yao.qi@linaro.org>
4634 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4635 for variable new_offset.
4636 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4637 (aarch64_ftrace_insn_reloc_cb): Likewise.
4638 (aarch64_ftrace_insn_reloc_tb): Likewise.
4639 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4640 PRIx64 instead of PRIx32.
4642 2016-06-28 Yao Qi <yao.qi@linaro.org>
4644 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4645 (the_low_target): Install arm_get_syscall_trapinfo.
4647 2016-06-28 Yao Qi <yao.qi@linaro.org>
4649 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4651 (the_low_target): Install aarch64_get_syscall_trapinfo.
4653 2016-06-28 Yao Qi <yao.qi@linaro.org>
4655 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4657 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4658 Remove parameter sysno.
4659 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4662 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4664 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4665 (s390_emit_ne_goto): Likewise.
4666 (s390_emit_lt_goto): Likewise.
4667 (s390_emit_le_goto): Likewise.
4668 (s390_emit_gt_goto): Likewise.
4669 (s390_emit_ge_goto): Likewise.
4670 (s390x_emit_eq_goto): Likewise.
4671 (s390x_emit_ne_goto): Likewise.
4672 (s390x_emit_lt_goto): Likewise.
4673 (s390x_emit_le_goto): Likewise.
4674 (s390x_emit_gt_goto): Likewise.
4675 (s390x_emit_ge_goto): Likewise.
4676 (s390_emit_ops_impl): Mark variable static.
4677 (s390x_emit_ops): Likewise.
4679 2016-06-17 Yao Qi <yao.qi@linaro.org>
4681 * linux-low.c (handle_extended_wait): Call
4682 uninsert_reinsert_breakpoints for the parent process. Remove
4683 reinsert breakpoints from the child process. Reinsert them to
4684 the parent process when vfork is done.
4685 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4686 (reinsert_reinsert_breakpoints): New function.
4687 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4688 (reinsert_reinsert_breakpoints): Declare.
4690 2016-06-17 Yao Qi <yao.qi@linaro.org>
4692 * linux-low.c (handle_extended_wait): If the parent is doing
4693 step-over, remove the reinsert breakpoints from the forked child.
4695 2016-06-17 Yao Qi <yao.qi@linaro.org>
4697 * linux-low.c (unsuspend_all_lwps): Declare.
4698 (linux_low_filter_event): If thread exited, call finish_step_over.
4699 If step-over is finished, unsuspend other threads.
4701 2016-06-17 Yao Qi <yao.qi@linaro.org>
4703 * linux-low.c (linux_resume_one_lwp_throw): Assert
4704 has_reinsert_breakpoints returns false.
4705 * mem-break.c (delete_disabled_breakpoints): Assert
4706 bp type isn't reinsert_breakpoint.
4708 2016-06-17 Yao Qi <yao.qi@linaro.org>
4710 * linux-low.c (maybe_hw_step): New function.
4711 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4712 (finish_step_over): Switch current_thread to lwp temporarily,
4713 and assert has_reinsert_breakpoints returns true.
4714 (proceed_one_lwp): Call maybe_hw_step.
4715 * mem-break.c (has_reinsert_breakpoints): New function.
4716 * mem-break.h (has_reinsert_breakpoints): Declare.
4718 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4720 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4722 2016-05-17 Yao Qi <yao.qi@linaro.org>
4724 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4725 instead of find_inferior.
4727 2016-05-05 Yao Qi <yao.qi@linaro.org>
4729 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4730 Initialize res to zero.
4732 2016-05-05 Yao Qi <yao.qi@linaro.org>
4734 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4737 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4739 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4740 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4741 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4743 2016-04-28 Par Olsson <par.olsson@windriver.com>
4744 Simon Marchi <simon.marchi@ericsson.com>
4746 * tracepoint.c (write_inferior_int8): New function.
4747 (cmd_qtenable_disable): Write enable flag using
4748 write_inferior_int8.
4750 2016-04-25 Yao Qi <yao.qi@linaro.org>
4752 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4753 (need_step_over_p): Return zero if the LWP has pending signals
4754 can be delivered on software single step target.
4756 2016-04-25 Yao Qi <yao.qi@linaro.org>
4758 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4759 return instead of error.
4761 2016-04-22 Yao Qi <yao.qi@linaro.org>
4763 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4766 2016-04-22 Yao Qi <yao.qi@linaro.org>
4768 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4769 signal when stepping over breakpoint with software single
4772 2016-04-21 Pedro Alves <palves@redhat.com>
4774 * linux-s390-low.c (s390_collect_ptrace_register)
4775 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4777 (s390_check_regset): Use void * instead of gdb_byte *.
4779 2016-04-20 Pedro Alves <palves@redhat.com>
4781 * configure: Renegerate.
4783 2016-04-20 Yao Qi <yao.qi@linaro.org>
4785 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4786 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4788 (arm_store_gregset): Likewise.
4790 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4792 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4793 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4794 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4795 (amd64-avx-mpx-linux.c): New rules.
4796 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4797 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4798 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4799 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4800 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4801 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4802 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4803 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4804 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4805 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4806 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4807 * linux-x86-low.c (x86_linux_read_description): Add case for
4808 X86_XSTATE_AVX_MPX_MASK.
4809 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4810 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4811 init_registers_i386_avx_mpx_linux.
4812 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4813 (initialize_low_tracepoint): Call
4814 init_registers_i386_avx_mpx_linux.
4815 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4816 (initialize_low_tracepoint): Call
4817 init_registers_amd64_avx_mpx_linux.
4818 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4819 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4820 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4823 2016-04-18 Pedro Alves <palves@redhat.com>
4825 * configure: Regenerate.
4827 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4829 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4830 (aarch64_emit_sub): Likewise.
4832 2016-04-12 Pedro Alves <palves@redhat.com>
4834 * utils.c (prepare_to_throw_exception): Delete.
4836 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4838 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4840 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4842 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4844 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4846 * linux-aarch64-ipa.c: Add <elf.h> include.
4847 * linux-ppc-ipa.c: Add <elf.h> include.
4848 * linux-s390-ipa.c: Add <elf.h> include.
4850 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4852 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4853 (get_raw_reg_ptr): Likewise.
4854 (get_trace_state_variable_value_ptr): Likewise.
4855 (set_trace_state_variable_value_ptr): Likewise.
4856 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4859 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4860 Marcin Kościelnicki <koriakin@0x04.net>
4863 * linux-ppc-low.c (emit_insns): New function.
4864 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4865 (ppc_emit_prologue): New function.
4866 (ppc_emit_epilogue): New function.
4867 (ppc_emit_add): New function.
4868 (ppc_emit_sub): New function.
4869 (ppc_emit_mul): New function.
4870 (ppc_emit_lsh): New function.
4871 (ppc_emit_rsh_signed): New function.
4872 (ppc_emit_rsh_unsigned): New function.
4873 (ppc_emit_ext): New function.
4874 (ppc_emit_zero_ext): New function.
4875 (ppc_emit_log_not): New function.
4876 (ppc_emit_bit_and): New function.
4877 (ppc_emit_bit_or): New function.
4878 (ppc_emit_bit_xor): New function.
4879 (ppc_emit_bit_not): New function.
4880 (ppc_emit_equal): New function.
4881 (ppc_emit_less_signed): New function.
4882 (ppc_emit_less_unsigned): New function.
4883 (ppc_emit_ref): New function.
4884 (ppc_emit_const): New function.
4885 (ppc_emit_reg): New function.
4886 (ppc_emit_pop): New function.
4887 (ppc_emit_stack_flush): New function.
4888 (ppc_emit_swap): New function.
4889 (ppc_emit_stack_adjust): New function.
4890 (ppc_emit_call): New function.
4891 (ppc_emit_int_call_1): New function.
4892 (ppc_emit_void_call_2): New function.
4893 (ppc_emit_if_goto): New function.
4894 (ppc_emit_goto): New function.
4895 (ppc_emit_eq_goto): New function.
4896 (ppc_emit_ne_goto): New function.
4897 (ppc_emit_lt_goto): New function.
4898 (ppc_emit_le_goto): New function.
4899 (ppc_emit_gt_goto): New function.
4900 (ppc_emit_ge_goto): New function.
4901 (ppc_write_goto_address): New function.
4902 (ppc_emit_ops_impl): New static variable.
4903 (ppc64v1_emit_prologue): New function.
4904 (ppc64v2_emit_prologue): New function.
4905 (ppc64_emit_epilogue): New function.
4906 (ppc64_emit_add): New function.
4907 (ppc64_emit_sub): New function.
4908 (ppc64_emit_mul): New function.
4909 (ppc64_emit_lsh): New function.
4910 (ppc64_emit_rsh_signed): New function.
4911 (ppc64_emit_rsh_unsigned): New function.
4912 (ppc64_emit_ext): New function.
4913 (ppc64_emit_zero_ext): New function.
4914 (ppc64_emit_log_not): New function.
4915 (ppc64_emit_bit_and): New function.
4916 (ppc64_emit_bit_or): New function.
4917 (ppc64_emit_bit_xor): New function.
4918 (ppc64_emit_bit_not): New function.
4919 (ppc64_emit_equal): New function.
4920 (ppc64_emit_less_signed): New function.
4921 (ppc64_emit_less_unsigned): New function.
4922 (ppc64_emit_ref): New function.
4923 (ppc64_emit_const): New function.
4924 (ppc64v1_emit_reg): New function.
4925 (ppc64v2_emit_reg): New function.
4926 (ppc64_emit_pop): New function.
4927 (ppc64_emit_stack_flush): New function.
4928 (ppc64_emit_swap): New function.
4929 (ppc64v1_emit_call): New function.
4930 (ppc64v2_emit_call): New function.
4931 (ppc64v1_emit_int_call_1): New function.
4932 (ppc64v2_emit_int_call_1): New function.
4933 (ppc64v1_emit_void_call_2): New function.
4934 (ppc64v2_emit_void_call_2): New function.
4935 (ppc64_emit_if_goto): New function.
4936 (ppc64_emit_eq_goto): New function.
4937 (ppc64_emit_ne_goto): New function.
4938 (ppc64_emit_lt_goto): New function.
4939 (ppc64_emit_le_goto): New function.
4940 (ppc64_emit_gt_goto): New function.
4941 (ppc64_emit_ge_goto): New function.
4942 (ppc64v1_emit_ops_impl): New static variable.
4943 (ppc64v2_emit_ops_impl): New static variable.
4944 (ppc_emit_ops): New function.
4945 (linux_low_target): Wire in ppc_emit_ops.
4947 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4948 Marcin Kościelnicki <koriakin@0x04.net>
4951 * Makefile.in: Add powerpc-*-ipa.o
4952 * configure.srv: Add ipa_obj for powerpc*-linux.
4953 * linux-ppc-ipa.c: New file.
4954 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4956 (PPC_FIELD): New macro.
4957 (PPC_SEXT): New macro.
4958 (PPC_OP6): New macro.
4959 (PPC_BO): New macro.
4960 (PPC_LI): New macro.
4961 (PPC_BD): New macro.
4962 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4963 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4964 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4965 (ppc_get_thread_area): New function.
4966 (is_elfv2_inferior): New function.
4967 (gen_ds_form): New function.
4968 (GEN_STD): New macro.
4969 (GEN_STDU): New macro.
4970 (GEN_LD): New macro.
4971 (GEN_LDU): New macro.
4972 (gen_d_form): New function.
4973 (GEN_ADDI): New macro.
4974 (GEN_ADDIS): New macro.
4975 (GEN_LI): New macro.
4976 (GEN_LIS): New macro.
4977 (GEN_ORI): New macro.
4978 (GEN_ORIS): New macro.
4979 (GEN_LWZ): New macro.
4980 (GEN_STW): New macro.
4981 (GEN_STWU): New macro.
4982 (gen_xfx_form): New function.
4983 (GEN_MFSPR): New macro.
4984 (GEN_MTSPR): New macro.
4985 (GEN_MFCR): New macro.
4986 (GEN_MTCR): New macro.
4987 (GEN_SYNC): New macro.
4988 (GEN_LWSYNC): New macro.
4989 (gen_x_form): New function.
4990 (GEN_OR): New macro.
4991 (GEN_MR): New macro.
4992 (GEN_LWARX): New macro.
4993 (GEN_STWCX): New macro.
4994 (GEN_CMPW): New macro.
4995 (gen_md_form): New function.
4996 (GEN_RLDICL): New macro.
4997 (GEN_RLDICR): New macro.
4998 (gen_i_form): New function.
5000 (GEN_BL): New macro.
5001 (gen_b_form): New function.
5002 (GEN_BNE): New macro.
5003 (GEN_LOAD): New macro.
5004 (GEN_STORE): New macro.
5005 (gen_limm): New function.
5006 (gen_atomic_xchg): New function.
5007 (gen_call): New function.
5008 (ppc_relocate_instruction): New function.
5009 (ppc_install_fast_tracepoint_jump_pad): New function.
5010 (ppc_get_min_fast_tracepoint_insn_len): New function.
5011 (ppc_get_ipa_tdesc_idx): New function.
5012 (the_low_target): Wire in the new functions.
5013 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5015 * linux-ppc-tdesc.h: New file.
5017 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5019 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5020 (alloc_jump_pad_buffer): New function.
5021 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5022 (alloc_jump_pad_buffer): New function.
5023 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5024 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5025 (alloc_jump_pad_buffer): New function.
5026 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5027 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5028 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5029 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5031 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5033 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5034 * linux-amd64-ipa.c: Likewise.
5035 * linux-i386-ipa.c: Likewise.
5036 * linux-s390-ipa.c: Likewise.
5037 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5038 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5039 set_trace_state_variable_value_ptr.
5040 (struct ipa_sym_addresses): Likewise.
5041 (symbol_list): Likewise.
5042 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5043 accessing gdb_collect directly.
5044 (gdb_collect_ptr_type): New typedef.
5045 (get_raw_reg_ptr_type): New typedef.
5046 (get_trace_state_variable_value_ptr_type): New typedef.
5047 (set_trace_state_variable_value_ptr_type): New typedef.
5048 (gdb_collect_ptr): New global.
5049 (get_raw_reg_ptr): New global.
5050 (get_trace_state_variable_value_ptr): New global.
5051 (set_trace_state_variable_value_ptr): New global.
5052 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5053 accessing get_raw_reg directly.
5054 (get_get_tsv_func_addr): Likewise for
5055 get_trace_state_variable_value_ptr.
5056 (get_set_tsv_func_addr): Likewise for
5057 set_trace_state_variable_value_ptr.
5058 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5060 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5062 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5064 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5066 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5068 (relocate_instruction): Remove own_buf.
5069 * server.c (own_buf): Make global.
5070 (handle_v_requests): Make global.
5071 * server.h (own_buf): New declaration.
5072 (handle_v_requests): New prototype.
5074 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5077 * linux-s390-low.c (add_insns): New function.
5078 (s390_emit_prologue): New function.
5079 (s390_emit_epilogue): New function.
5080 (s390_emit_add): New function.
5081 (s390_emit_sub): New function.
5082 (s390_emit_mul): New function.
5083 (s390_emit_lsh): New function.
5084 (s390_emit_rsh_signed): New function.
5085 (s390_emit_rsh_unsigned): New function.
5086 (s390_emit_ext): New function.
5087 (s390_emit_log_not): New function.
5088 (s390_emit_bit_and): New function.
5089 (s390_emit_bit_or): New function.
5090 (s390_emit_bit_xor): New function.
5091 (s390_emit_bit_not): New function.
5092 (s390_emit_equal): New function.
5093 (s390_emit_less_signed): New function.
5094 (s390_emit_less_unsigned): New function.
5095 (s390_emit_ref): New function.
5096 (s390_emit_if_goto): New function.
5097 (s390_emit_goto): New function.
5098 (s390_write_goto_address): New function.
5099 (s390_emit_litpool): New function.
5100 (s390_emit_const): New function.
5101 (s390_emit_call): New function.
5102 (s390_emit_reg): New function.
5103 (s390_emit_pop): New function.
5104 (s390_emit_stack_flush): New function.
5105 (s390_emit_zero_ext): New function.
5106 (s390_emit_swap): New function.
5107 (s390_emit_stack_adjust): New function.
5108 (s390_emit_set_r2): New function.
5109 (s390_emit_int_call_1): New function.
5110 (s390_emit_void_call_2): New function.
5111 (s390_emit_eq_goto): New function.
5112 (s390_emit_ne_goto): New function.
5113 (s390_emit_lt_goto): New function.
5114 (s390_emit_le_goto): New function.
5115 (s390_emit_gt_goto): New function.
5116 (s390_emit_ge_goto): New function.
5117 (s390x_emit_prologue): New function.
5118 (s390x_emit_epilogue): New function.
5119 (s390x_emit_add): New function.
5120 (s390x_emit_sub): New function.
5121 (s390x_emit_mul): New function.
5122 (s390x_emit_lsh): New function.
5123 (s390x_emit_rsh_signed): New function.
5124 (s390x_emit_rsh_unsigned): New function.
5125 (s390x_emit_ext): New function.
5126 (s390x_emit_log_not): New function.
5127 (s390x_emit_bit_and): New function.
5128 (s390x_emit_bit_or): New function.
5129 (s390x_emit_bit_xor): New function.
5130 (s390x_emit_bit_not): New function.
5131 (s390x_emit_equal): New function.
5132 (s390x_emit_less_signed): New function.
5133 (s390x_emit_less_unsigned): New function.
5134 (s390x_emit_ref): New function.
5135 (s390x_emit_if_goto): New function.
5136 (s390x_emit_const): New function.
5137 (s390x_emit_call): New function.
5138 (s390x_emit_reg): New function.
5139 (s390x_emit_pop): New function.
5140 (s390x_emit_stack_flush): New function.
5141 (s390x_emit_zero_ext): New function.
5142 (s390x_emit_swap): New function.
5143 (s390x_emit_stack_adjust): New function.
5144 (s390x_emit_int_call_1): New function.
5145 (s390x_emit_void_call_2): New function.
5146 (s390x_emit_eq_goto): New function.
5147 (s390x_emit_ne_goto): New function.
5148 (s390x_emit_lt_goto): New function.
5149 (s390x_emit_le_goto): New function.
5150 (s390x_emit_gt_goto): New function.
5151 (s390x_emit_ge_goto): New function.
5152 (s390_emit_ops): New function.
5153 (struct linux_target_ops): Fill in emit_ops hook.
5155 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5158 * Makefile.in: Add s390 IPA files.
5159 * configure.srv: Build IPA for s390.
5160 * linux-s390-ipa.c: New file.
5161 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5162 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5163 (tdesc_s390_linux32): Likewise.
5164 (init_registers_s390_linux32v1): Likewise.
5165 (tdesc_s390_linux32v1): Likewise.
5166 (init_registers_s390_linux32v2): Likewise.
5167 (tdesc_s390_linux32v2): Likewise.
5168 (init_registers_s390_linux64): Likewise.
5169 (tdesc_s390_linux64): Likewise.
5170 (init_registers_s390_linux64v1): Likewise.
5171 (tdesc_s390_linux64v1): Likewise.
5172 (init_registers_s390_linux64v2): Likewise.
5173 (tdesc_s390_linux64v2): Likewise.
5174 (init_registers_s390_te_linux64): Likewise.
5175 (tdesc_s390_te_linux64): Likewise.
5176 (init_registers_s390_vx_linux64): Likewise.
5177 (tdesc_s390_vx_linux64): Likewise.
5178 (init_registers_s390_tevx_linux64): Likewise.
5179 (tdesc_s390_tevx_linux64): Likewise.
5180 (init_registers_s390x_linux64): Likewise.
5181 (tdesc_s390x_linux64): Likewise.
5182 (init_registers_s390x_linux64v1): Likewise.
5183 (tdesc_s390x_linux64v1): Likewise.
5184 (init_registers_s390x_linux64v2): Likewise.
5185 (tdesc_s390x_linux64v2): Likewise.
5186 (init_registers_s390x_te_linux64): Likewise.
5187 (tdesc_s390x_te_linux64): Likewise.
5188 (init_registers_s390x_vx_linux64): Likewise.
5189 (tdesc_s390x_vx_linux64): Likewise.
5190 (init_registers_s390x_tevx_linux64): Likewise.
5191 (tdesc_s390x_tevx_linux64): Likewise.
5192 (have_hwcap_s390_vx): New static variable.
5193 (s390_arch_setup): Fill have_hwcap_s390_vx.
5194 (s390_get_thread_area): New function.
5195 (s390_ft_entry_gpr_esa): New const.
5196 (s390_ft_entry_gpr_zarch): New const.
5197 (s390_ft_entry_misc): New const.
5198 (s390_ft_entry_fr): New const.
5199 (s390_ft_entry_vr): New const.
5200 (s390_ft_main_31): New const.
5201 (s390_ft_main_64): New const.
5202 (s390_ft_exit_fr): New const.
5203 (s390_ft_exit_vr): New const.
5204 (s390_ft_exit_misc): New const.
5205 (s390_ft_exit_gpr_esa): New const.
5206 (s390_ft_exit_gpr_zarch): New const.
5207 (append_insns): New function.
5208 (s390_relocate_instruction): New function.
5209 (s390_install_fast_tracepoint_jump_pad): New function.
5210 (s390_get_min_fast_tracepoint_insn_len): New function.
5211 (s390_get_ipa_tdesc_idx): New function.
5212 (struct linux_target_ops): Wire in the above functions.
5213 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5214 * linux-s390-tdesc.h: New file.
5216 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5218 * linux-s390-low.c (s390_supports_tracepoints): New function.
5219 (struct linux_target_ops): Fill supports_tracepoints hook.
5221 2016-03-18 Yao Qi <yao.qi@linaro.org>
5223 * linux-low.c (lwp_signal_can_be_delivered): New function.
5224 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5226 2016-03-18 Yao Qi <yao.qi@linaro.org>
5228 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5229 0 if signal is enqueued. Remove 'signal' from one debugging
5230 message. Move one debugging message to some lines below.
5231 Remove code setting 'signal' to 0.
5233 2016-03-18 Yao Qi <yao.qi@linaro.org>
5235 * linux-low.c (linux_low_filter_event): Remove redundant
5236 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5238 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5240 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5241 (struct linux_target_ops): Wire in the above.
5243 2016-03-03 Yao Qi <yao.qi@linaro.org>
5245 * linux-low.c: Update comments to start_step_over.
5247 2016-03-03 Yao Qi <yao.qi@linaro.org>
5250 * linux-low.c (handle_extended_wait): Set child suspended
5251 if event_lwp->bp_reinsert isn't zero.
5253 2016-03-02 Yao Qi <yao.qi@linaro.org>
5255 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5256 enqueue_pending_signal.
5258 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5260 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5263 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5265 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5266 (s390_regmap_3264) [!__s390x__]: New global.
5267 (s390_collect_ptrace_register): Skip map entries containing -1.
5268 (s390_supply_ptrace_register): Ditto.
5269 (s390_fill_gprs_high): New function.
5270 (s390_store_gprs_high): New function.
5271 (s390_regsets): Add NT_S390_HIGH_GPRS.
5272 (s390_get_hwcap): Enable on 31-bit.
5273 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5274 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5275 Detect NT_S390_HIGH_GPRS.
5276 (s390_usrregs_info_3264): Enable on 31-bit.
5277 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5278 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5280 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5283 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5284 * configure.srv: Ditto.
5285 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5286 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5287 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5288 (init_registers_amd64_linux): Remove prototype.
5289 (tdesc_amd64_linux): Remove declaration.
5290 (get_ipa_tdesc): New function.
5291 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5292 initialize remaining tdescs.
5293 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5294 (init_registers_i386_linux): Remove prototype.
5295 (tdesc_i386_linux): Remove declaration.
5296 (get_ipa_tdesc): New function.
5297 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5298 initialize remaining tdescs.
5299 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5300 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5301 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5302 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5303 (x86_get_ipa_tdesc_idx): New function.
5304 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5305 * linux-x86-tdesc.h: New file.
5306 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5307 (target_get_ipa_tdesc_idx): New macro.
5308 * tracepoint.c (ipa_tdesc_idx): New macro.
5309 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5310 (symbol_list): Add ipa_tdesc_idx.
5311 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5312 (ipa_tdesc): Remove.
5313 (ipa_tdesc_idx): New variable.
5314 (get_context_regcache): Use get_ipa_tdesc.
5315 (gdb_collect): Ditto.
5317 * tracepoint.h (get_ipa_tdesc): New prototype.
5318 (ipa_tdesc): Remove.
5320 2016-02-24 Pedro Alves <palves@redhat.com>
5322 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5323 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5324 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5325 Factor out common code between the USE_SIGTRAP_SIGINFO and
5326 !USE_SIGTRAP_SIGINFO blocks.
5327 (linux_low_filter_event): Call save_stop_reason instead of
5328 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5330 (linux_wait_1): Update comments.
5332 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5334 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5335 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5336 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5337 ppc_insert_point, ppc_remove_point.
5339 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5341 * linux-s390-low.c (s390_supports_z_point_type): New function.
5342 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5344 2016-02-16 Yao Qi <yao.qi@linaro.org>
5346 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5347 PC. Get pc from regcache_read_pc.
5349 2016-02-12 Yao Qi <yao.qi@linaro.org>
5351 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5352 or linux_get_pc_32bit.
5353 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5355 2016-02-12 Yao Qi <yao.qi@linaro.org>
5357 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5358 arm_linux_get_next_pcs_fixup.
5360 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5362 * tracepoint.c (x_tracepoint_action_download): Change
5363 write_inferior_data_ptr to write_inferior_data_pointer.
5364 (cmd_qtstart): Likewise.
5365 (write_inferior_data_ptr): Remove.
5366 (download_agent_expr): Change write_inferior_data_ptr to
5367 write_inferior_data_pointer.
5368 (download_tracepoint_1): Likewise.
5369 (download_tracepoint): Likewise.
5370 (download_trace_state_variables): Likewise.
5372 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5373 Marcin Kościelnicki <koriakin@0x04.net>
5375 * tracepoint.c (struct tracepoint_action_ops): Remove.
5376 (struct tracepoint_action): Remove ops.
5377 (m_tracepoint_action_download, r_tracepoint_action_download)
5378 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5379 size and offset accordingly.
5380 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5381 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5382 (tracepoint_action_send, tracepoint_action_download): New functions.
5383 Helpers for trace action handlers.
5384 (add_tracepoint_action): Remove setup actions ops.
5385 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5387 2016-02-10 Yao Qi <yao.qi@linaro.org>
5389 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5391 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5393 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5395 * configure: Regenerate.
5397 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5399 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5400 void * to gdb_byte *.
5401 * linux-low.c (siginfo_fixup): Likewise.
5402 (linux_xfer_siginfo): Likewise.
5403 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5405 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5407 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5409 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5411 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5413 * linux-x86-low.c [__x86_64__]: Include
5414 "nat/amd64-linux-siginfo.h".
5415 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5416 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5417 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5418 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5419 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5420 (cpt_si_fd, si_timerid, si_overrun): Move from
5421 nat/amd64-linux-siginfo.c.
5422 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5424 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5426 * server.c (skip_to_semicolon): Remove.
5427 (process_point_options): Use strchrnul instead of
5430 2016-01-26 Yao Qi <yao.qi@linaro.org>
5432 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5433 * linux-low.c (install_software_single_step_breakpoints): Don't
5434 call regcache_read_pc.
5435 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5438 2016-01-26 Yao Qi <yao.qi@linaro.org>
5440 * linux-low.c (install_software_single_step_breakpoints): Call
5441 regcache_read_pc instead of get_pc.
5443 2016-01-26 Yao Qi <yao.qi@linaro.org>
5445 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5446 (unblock_async_io): Rename to ...
5447 (block_unblock_async_io): ... it. New function.
5448 (enable_async_io): Don't install SIGIO handler. Unblock it
5450 (disable_async_io): Don't ignore SIGIO. Block it instead.
5451 (initialize_async_io): Install SIGIO handler. Don't call
5454 2016-01-26 Yao Qi <yao.qi@linaro.org>
5456 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5457 first character is '\003', call *the_target->request_interrupt.
5459 2016-01-25 Yao Qi <yao.qi@linaro.org>
5461 * remote-utils.c (new_thread_notify): Remove.
5462 (dead_thread_notify): Likewise.
5463 * remote-utils.h (new_thread_notify): Remove declaration.
5464 (dead_thread_notify): Likewise.
5466 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5468 * gdb.trace/pending.exp: Fix expected message on continue.
5470 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5472 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5473 it works properly on big-endian machines where sizeof (CORE_ADDR)
5476 2016-01-21 Pedro Alves <palves@redhat.com>
5478 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5479 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5480 * configure: Regenerate.
5482 2016-01-21 Yao Qi <yao.qi@linaro.org>
5484 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5485 is_thumb and set it according to CPSR saved on the stack.
5486 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5487 arm_sigreturn_next_pc.
5489 2016-01-18 Yao Qi <yao.qi@linaro.org>
5491 * linux-low.c (linux_set_pc_64bit): New function.
5492 (linux_get_pc_64bit): New function.
5493 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5495 * linux-sparc-low.c (debug_threads): Remove declaration.
5496 (sparc_get_pc): Remove.
5497 (the_low_target): Use linux_get_pc_64bit instead of
5499 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5500 (the_low_target): Use linux_get_pc_64bit and
5503 2016-01-18 Yao Qi <yao.qi@linaro.org>
5505 * linux-arm-low.c (debug_threads): Remove declaration.
5506 (arm_get_pc, arm_set_pc): Remove.
5507 (the_low_target): Use linux_get_pc_32bit and
5509 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5510 (the_low_target): Use linux_get_pc_32bit and
5512 * linux-cris-low.c (debug_threads): Remove declaration.
5513 (cris_get_pc, cris_set_pc,): Remove.
5514 (the_low_target): Use linux_get_pc_32bit and
5516 * linux-crisv32-low.c (debug_threads): Remove declaration.
5517 (cris_get_pc, cris_set_pc): Remove.
5518 (the_low_target): Use linux_get_pc_32bit and
5520 * linux-low.c: Include inttypes.h.
5521 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5522 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5523 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5524 (the_low_target): Use linux_get_pc_32bit and
5526 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5527 (the_low_target): Use linux_get_pc_32bit and
5529 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5530 (the_low_target): Use linux_get_pc_32bit and
5532 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5533 (the_low_target): Use linux_get_pc_32bit and
5535 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5536 (the_low_target): Use linux_get_pc_32bit and
5539 2016-01-18 Gary Benson <gbenson@redhat.com>
5541 * configure.ac (AC_FUNC_FORK): New check.
5542 * config.in: Regenerate.
5543 * configure: Likewise.
5545 2016-01-14 Yao Qi <yao.qi@linaro.org>
5547 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5548 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5549 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5550 arm_get_next_pcs_ctor.
5552 2016-01-12 Josh Stone <jistone@redhat.com>
5553 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5555 * inferiors.h: Include "gdb_vecs.h".
5556 (struct process_info): Add syscalls_to_catch.
5557 * inferiors.c (remove_process): Free syscalls_to_catch.
5558 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5559 syscall_return stops.
5560 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5561 * server.c (handle_general_set): Handle QCatchSyscalls.
5562 (handle_query): Report support for QCatchSyscalls.
5563 * target.h (struct target_ops): Add supports_catch_syscall.
5564 (target_supports_catch_syscall): New macro.
5565 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5566 (struct lwp_info): Add syscall_state.
5567 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5568 Maintain syscall_state and syscalls_to_catch across exec.
5569 (get_syscall_trapinfo): New function, proxy to the_low_target.
5570 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5571 (linux_low_filter_event): Toggle syscall_state entry/return for
5572 syscall traps, and set it ignored for all others.
5573 (gdb_catching_syscalls_p): New function.
5574 (gdb_catch_this_syscall_p): New function.
5575 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5576 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5577 (linux_supports_catch_syscall): New function.
5578 (linux_target_ops): Install it.
5579 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5580 (the_low_target): Install it.
5582 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5584 * acinclude.m4: Include new ../warning.m4 file.
5585 * configure: Regenerated.
5586 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5588 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5590 * ax.c (is_goto_target): Mark static.
5591 * linux-low.c (register_addr): Likewise.
5592 (linux_fetch_registers, linux_store_registers): Likewise.
5593 * mem-break.c (any_persistent_commands): Fix old prototype.
5594 (add_commands_to_breakpoint): Mark static.
5595 * regcache.c (find_register_by_name): Delete unused func.
5596 * remote-utils.c (hex_or_minus_one): Mark static.
5597 * server.c (monitor_show_help): Mark static.
5598 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5599 handle_v_requests): Likewise.
5601 2016-01-12 Pedro Alves <palves@redhat.com>
5603 Remove use of the registered trademark symbol throughout.
5605 2016-01-08 Yao Qi <yao.qi@linaro.org>
5607 * remote-utils.c (getpkt): If c is '\003', call target hook
5610 2016-01-06 Yao Qi <yao.qi@linaro.org>
5612 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5613 linux-aarch32-low.c.
5614 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5615 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5616 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5617 (thumb2_breakpoint): Declare.
5618 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5619 linux-aarch32-low.h.
5620 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5621 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5622 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5624 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5626 * gdbreplay.c (gdbreplay_version): Change copyright year in
5628 * server.c (gdbserver_version): Likewise.
5630 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5632 * server.c (crc32_table): Delete.
5633 (crc32): Use libiberty's xcrc32 function.
5635 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5637 * lynx-low.c (lynx_delete_thread_callback): New function.
5638 (lynx_mourn): Properly delete our process and all of its
5639 threads. Remove call to clear_inferiors.
5641 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5643 * target.c (thread_search_callback): Add check that
5644 the thread_stopped target callback is not NULL before
5647 2015-12-21 Yao Qi <yao.qi@linaro.org>
5649 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5652 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5654 * server.c (handle_query): Call target_supports_software_single_step.
5656 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5658 * linux-low.c (single_step): New function.
5659 (linux_resume_one_lwp_throw): Call single_step.
5660 (start_step_over): Likewise.
5662 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5664 * Makefile.in (SFILES): Append arch/arm-linux.c,
5665 arch/arm-get-next-pcs.c.
5666 (arm-linux.o): New rule.
5667 (arm-get-next-pcs.o): New rule.
5668 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5670 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5671 to linux-aarch32-low.c.
5672 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5673 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5674 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5675 (thumb2_breakpoint_len): Likewise.
5676 (arm_is_thumb_mode): Make non-static.
5677 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5678 from linux-aarch32-low.c.
5679 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5680 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5681 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5682 (thumb2_breakpoint_len): Likewise.
5683 (arm_is_thumb_mode): New declaration.
5684 * linux-arm-low.c: Include arch/arm-linux.h
5685 aarch/arm-get-next-pcs.h, sys/syscall.h.
5686 (get_next_pcs_ops): New struct.
5687 (get_next_pcs_addr_bits_remove): New function.
5688 (get_next_pcs_is_thumb): New function.
5689 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5690 (arm_sigreturn_next_pc): Likewise.
5691 (get_next_pcs_syscall_next_pc): Likewise.
5692 (arm_gdbserver_get_next_pcs): Likewise.
5693 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5695 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5696 * server.h: Include gdb_vecs.h.
5698 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5700 * Makefile.in (SFILES): Append common/common-regcache.c.
5701 (OBS): Append common-regcache.o.
5702 (common-regcache.o): New rule.
5703 * regcache.c (init_register_cache): Initialize cache to
5705 (regcache_raw_read_unsigned): New function.
5706 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5707 register_status enum.
5709 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5711 * linux-aarch64-low.c (the_low_targets): Rename
5712 breakpoint_reinsert_addr to get_next_pcs.
5713 * linux-arm-low.c (the_low_targets): Likewise.
5714 * linux-bfin-low.c (the_low_targets): Likewise.
5715 * linux-cris-low.c (the_low_targets): Likewise.
5716 * linux-crisv32-low.c (the_low_targets): Likewise.
5717 * linux-low.c (can_software_single_step): Likewise.
5718 (install_software_single_step_breakpoints): New function.
5719 (start_step_over): Use install_software_single_step_breakpoints.
5720 * linux-low.h: New CORE_ADDR vector.
5721 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5723 * linux-mips-low.c (the_low_targets): Likewise.
5724 * linux-nios2-low.c (the_low_targets): Likewise.
5725 * linux-sparc-low.c (the_low_targets): Likewise.
5727 2015-12-17 Pedro Alves <palves@redhat.com>
5729 * linux-low.c (linux_kill_one_lwp): Remove references to
5731 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5733 (linux_init_signals): Delete.
5734 (initialize_low): Adjust.
5735 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5737 2015-12-16 Pedro Alves <palves@redhat.com>
5739 * configure.ac (compiler warning flags): When testing a
5740 -Wno-foo option, check whether -Wfoo works instead.
5741 * configure: Regenerate.
5743 2015-12-11 Don Breazeal <donb@codesourcery.com>
5745 * server.c (process_serial_event): Don't exit from gdbserver
5746 in remote mode if there are still active inferiors.
5748 2015-12-11 Yao Qi <yao.qi@linaro.org>
5750 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5751 arm_breakpoint_at if the process is 32-bit.
5753 2015-12-11 Yao Qi <yao.qi@linaro.org>
5755 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5758 2015-12-07 Yao Qi <yao.qi@linaro.org>
5760 * configure.srv: Append arm.o to srv_tgtobj for
5761 aarch64*-*-linux* target.
5762 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5763 from linux-arm-low.c.
5764 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5765 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5766 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5767 (thumb2_breakpoint_len): Likewise.
5768 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5769 (arm_breakpoint_kinds): Likewise.
5770 (arm_breakpoint_kind_from_pc): Likewise.
5771 (arm_sw_breakpoint_from_kind): Likewise.
5772 (arm_breakpoint_kind_from_current_state): Likewise.
5773 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5774 (arm_sw_breakpoint_from_kind): Declare.
5775 (arm_breakpoint_kind_from_current_state): Declare.
5776 (arm_breakpoint_at): Declare.
5777 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5778 arm_sw_breakpoint_from_kind if process is 32-bit.
5779 (aarch64_breakpoint_kind_from_pc): New function.
5780 (aarch64_breakpoint_kind_from_current_state): New function.
5781 (the_low_target): Initialize fields breakpoint_kind_from_pc
5782 and breakpoint_kind_from_current_state.
5783 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5784 linux-aarch32-low.c.
5785 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5786 (arm_breakpoint, arm_breakpoint_len): Likewise.
5787 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5788 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5789 (arm_is_thumb_mode): Likewise.
5790 (arm_breakpoint_at): Likewise.
5791 (arm_breakpoint_kind_from_pc): Likewise.
5792 (arm_sw_breakpoint_from_kind): Likewise.
5793 (arm_breakpoint_kind_from_current_state): Likewise.
5796 2015-08-04 Yao Qi <yao.qi@linaro.org>
5798 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5799 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5800 * server.c (extended_protocol): Remove "static".
5801 * server.h (extended_protocol): Declare it.
5803 2015-12-04 Josh Stone <jistone@redhat.com>
5805 * target.h (struct target_ops) <arch_setup>: Rename to ...
5806 (struct target_ops) <post_create_inferior>: ... this.
5807 (target_arch_setup): Rename to ...
5808 (target_post_create_inferior): ... this, calling post_create_inferior.
5809 * server.c (start_inferior): Update target_arch_setup calls to
5810 target_post_create_inferior.
5811 * linux-low.c (linux_low_ptrace_options): Forward declare.
5812 (linux_arch_setup): Update its comment for general use.
5813 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5814 (struct linux_target_ops): Use linux_post_create_inferior.
5815 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5816 to post_create_inferior.
5817 * nto-low.c (struct nto_target_ops): Likewise.
5818 * spu-low.c (struct spu_target_ops): Likewise.
5819 * win32-low.c (struct win32_target_ops): Likewise.
5821 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5823 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5825 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5827 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5828 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5829 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5830 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5831 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5832 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5833 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5834 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5835 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5836 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5837 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5838 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5840 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5842 * linux-low.c (linux_look_up_symbols): Don't call
5843 linux_supports_traceclone.
5844 * linux-low.h (thread_db_init): Remove use_events argument.
5845 * thread-db.c (thread_db_use_event): Remove global variable.
5846 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5847 (struct thread_db) <td_create_bp>: Remove field.
5848 (thread_db_create_event): Remove function.
5849 (thread_db_enable_reporting): Likewise.
5850 (find_one_thread): Don't check for thread_db_use_events.
5851 (attach_thread): Likewise.
5852 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5853 (try_thread_db_load_1): Don't check for thread_db_use_events.
5854 (thread_db_init): Remove use_events argument and thread events
5856 (remove_thread_event_breakpoints): Remove function.
5857 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5859 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5861 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5863 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5864 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5865 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5866 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5867 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5869 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5871 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5872 * linux-low.c (can_hardware_single_step): Use
5873 supports_hardware_single_step.
5874 (can_software_single_step): New function.
5875 (start_step_over): Call can_software_single_step.
5876 (linux_supports_hardware_single_step): New function.
5877 (struct target_ops) <supports_software_single_step>: Initialize.
5878 * linux-low.h (struct linux_target_ops)
5879 <supports_hardware_single_step>: Initialize.
5880 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5881 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5882 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5883 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5884 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5885 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5886 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5887 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5888 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5889 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5891 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5892 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5894 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5895 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5896 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5898 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5899 * target.h (struct target_ops): <supports_software_single_step>:
5901 (target_supports_software_single_step): New macro.
5903 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5905 * linux-low.c (linux_wait_1): Fix pc advance condition.
5906 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5907 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5909 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5911 * linux-arm-low.c (arm_is_thumb_mode): New function.
5912 (arm_breakpoint_at): Use arm_is_thumb_mode.
5913 (arm_breakpoint_kind_from_current_state): New function.
5914 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5916 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5917 (linux_breakpoint_kind_from_current_state): New function.
5918 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5919 * linux-low.h (struct linux_target_ops)
5920 <breakpoint_kind_from_current_state>: New field.
5921 * target.h (struct target_ops): Likewise.
5922 (target_breakpoint_kind_from_current_state): New macro.
5924 2015-11-30 Pedro Alves <palves@redhat.com>
5926 * linux-low.c (linux_resume): Wake up the event loop before
5929 2015-11-30 Pedro Alves <palves@redhat.com>
5931 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5933 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5935 * target.c (struct thread_search): New structure.
5936 (thread_search_callback): New function.
5937 (prev_general_thread): New global.
5938 (prepare_to_access_memory, done_accessing_memory): New functions.
5939 * target.h (prepare_to_access_memory, done_accessing_memory):
5940 Replace macros with function declarations.
5942 2015-11-30 Pedro Alves <palves@redhat.com>
5945 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5946 report TARGET_WAITKIND_NO_RESUMED.
5947 * remote-utils.c (prepare_resume_reply): Handle
5948 TARGET_WAITKIND_NO_RESUMED.
5949 * server.c (report_no_resumed): New global.
5950 (handle_query) <qSupported>: Handle "no-resumed+". Report
5951 "no-resumed+" support.
5952 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5953 return error if the client doesn't support no-resumed events.
5954 (push_stop_notification): New function.
5955 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5956 events if the client supports them.
5958 2015-11-30 Pedro Alves <palves@redhat.com>
5960 * linux-low.c (thread_still_has_status_pending_p): Don't check
5962 (lwp_resumed): New function.
5963 (status_pending_p_callback): Return early if the LWP is not
5964 supposed to be resumed.
5966 2015-11-30 Pedro Alves <palves@redhat.com>
5968 * linux-low.c (handle_extended_wait): Assert that the LWP's
5969 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5970 thread create events, leave the new child's status pending.
5971 (linux_low_filter_event): If GDB wants to hear about thread exit
5972 events, leave the LWP marked dead and don't delete it.
5973 (linux_wait_for_event_filtered): Don't check for thread exit.
5974 (filter_exit_event): New function.
5975 (linux_wait_1): Use it, when returning an exit event.
5976 (linux_resume_one_lwp_throw): Assert that the LWP's
5977 waitstatus is TARGET_WAITKIND_IGNORE.
5978 * remote-utils.c (prepare_resume_reply): Handle
5979 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5980 * server.c (report_thread_events): New global.
5981 (handle_general_set): Handle QThreadEvents.
5982 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5983 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5984 TARGET_WAITKIND_THREAD_EXITED.
5985 * server.h (report_thread_events): Declare.
5987 2015-11-30 Pedro Alves <palves@redhat.com>
5989 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5990 the thread's last_resume_kind was resume_stop.
5992 2015-11-30 Pedro Alves <palves@redhat.com>
5994 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5997 2015-11-30 Pedro Alves <palves@redhat.com>
5999 * server.c (handle_v_requests): Handle vCtrlC.
6001 2015-11-30 Pedro Alves <palves@redhat.com>
6003 * gdbthread.h (find_any_thread_of_pid): Declare.
6004 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6006 * server.c (handle_query): If current_thread is NULL, look for
6007 another thread of the selected process.
6009 2015-11-26 Daniel Colascione <dancol@dancol.org>
6010 Simon Marchi <simon.marchi@ericsson.com>
6012 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6013 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6015 * target.h (struct target_ops) <thread_name>: New field.
6016 (target_thread_name): New macro.
6018 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6020 * regcache.h (regcache_invalidate_pid): Add declaration.
6021 * regcache.c (regcache_invalidate_pid): New function, extracted
6022 from regcache_invalidate.
6023 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6024 Add trivial documentation comment.
6025 * lynx-low.c: Use regcache_invalidate_pid instead of
6026 regcache_invalidate.
6028 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6030 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6031 and Elf64_auxv_t if the target is Android.
6033 2015-11-22 Doug Evans <xdje42@gmail.com>
6035 * target.h: #include <sys/types.h>.
6037 2015-11-19 Pedro Alves <palves@redhat.com>
6039 * linux-low.c (linux_process_qsupported): Change prototype.
6041 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6043 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6044 and adjust to loop over all features.
6045 * server.c (handle_query) <qSupported>: Adjust to call
6046 target_process_qsupported once, passing it a vector of unprocessed
6048 * target.h (struct target_ops) <process_qsupported>: Change
6050 (target_process_qsupported): Adjust.
6052 2015-11-19 Pedro Alves <palves@redhat.com>
6054 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6056 * configure: Regenerate.
6058 2015-11-19 Pedro Alves <palves@redhat.com>
6060 * configure: Regenerate.
6062 2015-11-19 Yao Qi <yao.qi@linaro.org>
6064 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6067 2015-11-19 Yao Qi <yao.qi@linaro.org>
6069 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6070 (struct aarch64_operand): Move enum out.
6072 2015-11-19 Yao Qi <yao.qi@linaro.org>
6074 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6075 struct user_fpsimd_state *.
6076 (aarch64_store_fpregset): Likewise.
6078 2015-11-19 Yao Qi <yao.qi@linaro.org>
6080 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6081 struct user_pt_regs *.
6082 (aarch64_store_gregset): Likewise.
6084 2015-11-18 Pedro Alves <palves@redhat.com>
6086 * Makefile.in (all_object_files): Add $IPA_OBJS.
6088 2015-11-17 Pedro Alves <palves@redhat.com>
6090 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6091 GDB_SIGNAL_0 and gdb_signal_to_string.
6093 2015-11-17 Pedro Alves <palves@redhat.com>
6095 * win32-low.c (handle_output_debug_string): Remove parameter.
6096 (win32_kill): Remove our_status local and adjust call to
6097 handle_output_debug_string.
6098 (get_child_debug_event): Adjust call to
6099 handle_output_debug_string.
6101 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6103 * linux-mips-low.c (mips_fill_gregset): Add cast.
6104 (mips_store_gregset): Likewise.
6105 (mips_fill_fpregset): Likewise.
6106 (mips_store_fpregset): Likewise.
6108 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6110 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6113 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6115 * linux-mips-low.c (mips_linux_new_thread): Change type of
6116 watch_type to enum target_hw_bp_type.
6118 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6120 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6121 Change return type to arm_hwbp_type.
6123 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6125 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6126 (arm_store_gregset): Likewise.
6127 * linux-arm-low.c (arm_get_hwcap): Likewise.
6128 (arm_read_description): Likewise.
6130 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6132 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6134 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6136 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6137 (ppc_fill_vsxregset): Likewise.
6138 (ppc_store_vsxregset): Likewise.
6139 (ppc_fill_vrregset): Likewise.
6140 (ppc_store_vrregset): Likewise.
6141 (ppc_fill_evrregset): Likewise.
6142 (ppc_store_evrregset): Likewise.
6144 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6146 * linux-ppc-low.c (ppc_usrregs_info): Remove
6147 forward-declaration.
6148 (ppc_arch_setup): Move lower in file.
6150 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6152 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6153 (ps_pdwrite): Likewise.
6155 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6157 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6158 to after assert checks.
6160 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6162 * proc-service.c (ps_pdread): Add/adjust casts.
6163 (ps_pdwrite): Add/adjust casts.
6165 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6167 * server.c (handle_search_memory_1): Cast return value of
6170 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6172 * server.c (write_qxfer_response): Change type of data to
6175 2015-10-29 Pedro Alves <palves@redhat.com>
6177 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6179 2015-10-29 Pedro Alves <palves@redhat.com>
6181 * tracepoint.c (clear_installed_tracepoints): Add casts.
6183 2015-10-29 Pedro Alves <palves@redhat.com>
6185 * server.c (handle_v_cont, process_serial_event): Add enum
6186 gdb_signal casts to signal parsing code.
6188 2015-10-29 Pedro Alves <palves@redhat.com>
6190 * linux-low.h (NULL_REGSET): Define.
6191 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6192 * linux-arm-low.c (arm_regsets): Likewise.
6193 * linux-crisv32-low.c (cris_regsets): Likewise.
6194 * linux-m68k-low.c (m68k_regsets): Likewise.
6195 * linux-mips-low.c (mips_regsets): Likewise.
6196 * linux-nios2-low.c (nios2_regsets): Likewise.
6197 * linux-ppc-low.c (ppc_regsets): Likewise.
6198 * linux-s390-low.c (s390_regsets): Likewise.
6199 * linux-sh-low.c (sh_regsets): Likewise.
6200 * linux-sparc-low.c (sparc_regsets): Likewise.
6201 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6202 * linux-tile-low.c (tile_regsets): Likewise.
6203 * linux-x86-low.c (x86_regsets): Likewise.
6204 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6206 2015-10-29 Pedro Alves <palves@redhat.com>
6208 * linux-low.h (NULL_REGSET): Define.
6209 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6210 * linux-arm-low.c (arm_regsets): Likewise.
6211 * linux-crisv32-low.c (cris_regsets): Likewise.
6212 * linux-m68k-low.c (m68k_regsets): Likewise.
6213 * linux-mips-low.c (mips_regsets): Likewise.
6214 * linux-nios2-low.c (nios2_regsets): Likewise.
6215 * linux-ppc-low.c (ppc_regsets): Likewise.
6216 * linux-s390-low.c (s390_regsets): Likewise.
6217 * linux-sh-low.c (sh_regsets): Likewise.
6218 * linux-sparc-low.c (sparc_regsets): Likewise.
6219 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6220 * linux-tile-low.c (tile_regsets): Likewise.
6221 * linux-x86-low.c (x86_regsets): Likewise.
6222 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6224 2015-10-26 Doug Evans <dje@google.com>
6226 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6228 2015-10-26 Doug Evans <dje@google.com>
6230 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6232 2015-10-26 Doug Evans <dje@google.com>
6234 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6236 (attach_thread, find_new_threads_callback): Ditto.
6238 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6240 * mem-break.h (set_breakpoint_data): Remove.
6242 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6244 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6245 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6246 (initialize_low): Remove set_breakpoint_data call.
6247 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6248 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6249 (initialize_low): Remove set_breakpoint_data call.
6250 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6251 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6252 (initialize_low): Remove set_breakpoint_data call.
6254 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6256 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6257 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6258 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6259 * target.h (target_breakpoint_kind_from_pc): New macro.
6261 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6263 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6264 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6265 the default breakpoint kind.
6267 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6269 * linux-arm-low.c (arm_supports_z_point_type): Add software
6272 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6274 * linux-arm-low.c: Refactor breakpoint definitions.
6275 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6276 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6278 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6280 * Makefile.in: Add arm.c/o.
6281 * configure.srv: Likewise.
6282 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6283 (arm_breakpoint_kind_from_pc): New function.
6284 (arm_sw_breakpoint_from_kind): Return proper kind.
6285 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6287 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6289 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6291 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6292 (struct raw_breakpoint) <size>: Remove.
6293 (struct raw_breakpoint) <kind>: Add.
6294 (bp_size): New function.
6295 (bp_opcode): Likewise.
6296 (find_raw_breakpoint_at): Adjust for kind.
6297 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6298 (remove_memory_breakpoint): Adjust for kind call bp_size.
6299 (set_raw_breakpoint_at): Adjust for kind.
6300 (set_breakpoint): Likewise.
6301 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6302 (delete_raw_breakpoint): Adjust for kind.
6303 (delete_breakpoint): Likewise.
6304 (find_gdb_breakpoint): Likewise.
6305 (set_gdb_breakpoint_1): Likewise.
6306 (set_gdb_breakpoint): Likewise.
6307 (delete_gdb_breakpoint_1): Likewise.
6308 (delete_gdb_breakpoint): Likewise.
6309 (uninsert_raw_breakpoint): Likewise.
6310 (reinsert_raw_breakpoint): Likewise.
6311 (set_breakpoint_data): Remove.
6312 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6313 (check_mem_read): Adjust for kind call bp_size.
6314 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6315 (clone_one_breakpoint): Adjust for kind.
6316 * mem-break.h (set_gdb_breakpoint): Likewise.
6317 (delete_gdb_breakpoint): Likewise.
6318 * server.c (process_serial_event): Likewise.
6320 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6322 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6323 (struct linux_target_ops) <breakpoint>: Remove.
6324 (struct linux_target_ops) <breakpoint_len>: Remove.
6325 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6326 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6327 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6328 (arm_sw_breakpoint_from_kind): New function.
6329 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6330 (struct linux_target_ops) <breakpoint>: Remove.
6331 (struct linux_target_ops) <breakpoint_len>: Remove.
6332 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6333 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6334 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6335 (struct linux_target_ops) <breakpoint>: Remove.
6336 (struct linux_target_ops) <breakpoint_len>: Remove.
6337 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6338 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6339 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6340 (struct linux_target_ops) <breakpoint>: Remove.
6341 (struct linux_target_ops) <breakpoint_len>: Remove.
6342 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6343 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6344 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6345 and sw_breakpoint_from_kind to increment the pc.
6346 (linux_breakpoint_kind_from_pc): New function.
6347 (linux_sw_breakpoint_from_kind): New function.
6348 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6349 (initialize_low): Call breakpoint_kind_from_pc and
6350 sw_breakpoint_from_kind to replace breakpoint_data/len.
6351 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6353 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6354 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6355 (struct linux_target_ops) <breakpoint>: Remove.
6356 (struct linux_target_ops) <breakpoint_len>: Remove.
6357 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6358 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6359 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6360 (struct linux_target_ops) <breakpoint>: Remove.
6361 (struct linux_target_ops) <breakpoint_len>: Remove.
6362 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6363 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6364 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6365 (struct linux_target_ops) <breakpoint>: Remove.
6366 (struct linux_target_ops) <breakpoint_len>: Remove.
6367 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6368 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6369 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6370 (struct linux_target_ops) <breakpoint>: Remove.
6371 (struct linux_target_ops) <breakpoint_len>: Remove.
6372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6374 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6375 (struct linux_target_ops) <breakpoint>: Remove.
6376 (struct linux_target_ops) <breakpoint_len>: Remove.
6377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6379 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6380 (struct linux_target_ops) <breakpoint>: Remove.
6381 (struct linux_target_ops) <breakpoint_len>: Remove.
6382 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6383 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6384 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6385 (struct linux_target_ops) <breakpoint>: Remove.
6386 (struct linux_target_ops) <breakpoint_len>: Remove.
6387 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6388 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6389 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6390 (struct linux_target_ops) <breakpoint>: Remove.
6391 (struct linux_target_ops) <breakpoint_len>: Remove.
6392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6394 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6395 (struct linux_target_ops) <breakpoint>: Remove.
6396 (struct linux_target_ops) <breakpoint_len>: Remove.
6397 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6398 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6399 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6400 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6401 (struct linux_target_ops) <breakpoint>: Remove.
6402 (struct linux_target_ops) <breakpoint_len>: Remove.
6403 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6404 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6405 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6406 (struct linux_target_ops) <breakpoint>: Remove.
6407 (struct linux_target_ops) <breakpoint_len>: Remove.
6408 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6409 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6411 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6413 * linux-cris-low.c (cris_get_pc): Remove void arg.
6415 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6417 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6420 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6422 * inferiors.c (thread_pid_matches_callback): New function.
6423 (find_thread_process): New function.
6424 (remove_thread): Reset current_thread.
6425 (remove_process): Assert threads have been removed first.
6427 2015-10-15 Yao Qi <yao.qi@linaro.org>
6429 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6431 (aarch64_remove_point): Likewise.
6432 * regcache.c (regcache_register_size): New function.
6434 2015-10-12 Yao Qi <yao.qi@linaro.org>
6436 * linux-aarch64-low.c: Update all callers as emit_load_store
6437 is renamed to aarch64_emit_load_store.
6439 2015-10-12 Yao Qi <yao.qi@linaro.org>
6441 * linux-aarch64-low.c: Update all callers of function renaming
6442 from emit_insn to aarch64_emit_insn.
6444 2015-10-12 Yao Qi <yao.qi@linaro.org>
6446 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6447 arch/aarch64-insn.h.
6448 (struct aarch64_memory_operand): Likewise.
6450 (emit_insn): Move to arch/aarch64-insn.c.
6451 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6452 (emit_load_store): Move to arch/aarch64-insn.c.
6453 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6454 (can_encode_int32): Remove.
6456 2015-10-12 Yao Qi <yao.qi@linaro.org>
6458 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6459 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6460 (aarch64_relocate_instruction): Likewise.
6461 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6462 (struct aarch64_insn_visitor): Likewise.
6464 2015-10-12 Yao Qi <yao.qi@linaro.org>
6466 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6467 (struct aarch64_insn_visitor): New.
6468 (struct aarch64_insn_relocation_data): New.
6469 (aarch64_ftrace_insn_reloc_b): New function.
6470 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6471 (aarch64_ftrace_insn_reloc_cb): Likewise.
6472 (aarch64_ftrace_insn_reloc_tb): Likewise.
6473 (aarch64_ftrace_insn_reloc_adr): Likewise.
6474 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6475 (aarch64_ftrace_insn_reloc_others): Likewise.
6477 (aarch64_relocate_instruction): Use visitor.
6479 2015-10-12 Yao Qi <yao.qi@linaro.org>
6481 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6482 int. Add argument buf.
6483 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6484 aarch64_relocate_instruction.
6486 2015-10-12 Yao Qi <yao.qi@linaro.org>
6488 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6489 argument insn. Remove local variable insn. Don't call
6491 (aarch64_install_fast_tracepoint_jump_pad): Call
6494 2015-09-30 Yao Qi <yao.qi@linaro.org>
6496 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6497 (emit_load_store_pair): Likewise.
6499 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6501 * dll.c (match_dll): Add cast(s).
6502 (unloaded_dll): Likewise.
6503 * linux-low.c (second_thread_of_pid_p): Likewise.
6504 (delete_lwp_callback): Likewise.
6505 (count_events_callback): Likewise.
6506 (select_event_lwp_callback): Likewise.
6507 (linux_set_resume_request): Likewise.
6508 * server.c (accumulate_file_name_length): Likewise.
6509 (emit_dll_description): Likewise.
6510 (handle_qxfer_threads_worker): Likewise.
6511 (visit_actioned_threads): Likewise.
6512 * thread-db.c (any_thread_of): Likewise.
6513 * tracepoint.c (same_process_p): Likewise.
6514 (match_blocktype): Likewise.
6515 (build_traceframe_info_xml): Likewise.
6517 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6519 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6521 (gdb_unparse_agent_expr): Likewise.
6522 * hostio.c (require_data): Likewise.
6523 (handle_pread): Likewise.
6524 * linux-low.c (disable_regset): Likewise.
6525 (fetch_register): Likewise.
6526 (store_register): Likewise.
6527 (get_dynamic): Likewise.
6528 (linux_qxfer_libraries_svr4): Likewise.
6529 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6530 (set_fast_tracepoint_jump): Likewise.
6531 (uninsert_fast_tracepoint_jumps_at): Likewise.
6532 (reinsert_fast_tracepoint_jumps_at): Likewise.
6533 (validate_inserted_breakpoint): Likewise.
6534 (clone_agent_expr): Likewise.
6535 * regcache.c (init_register_cache): Likewise.
6536 * remote-utils.c (putpkt_binary_1): Likewise.
6537 (decode_M_packet): Likewise.
6538 (decode_X_packet): Likewise.
6539 (look_up_one_symbol): Likewise.
6540 (relocate_instruction): Likewise.
6541 (monitor_output): Likewise.
6542 * server.c (handle_search_memory): Likewise.
6543 (handle_qxfer_exec_file): Likewise.
6544 (handle_qxfer_libraries): Likewise.
6545 (handle_qxfer): Likewise.
6546 (handle_query): Likewise.
6547 (handle_v_cont): Likewise.
6548 (handle_v_run): Likewise.
6549 (captured_main): Likewise.
6550 * target.c (write_inferior_memory): Likewise.
6551 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6552 * tracepoint.c (init_trace_buffer): Likewise.
6553 (add_tracepoint_action): Likewise.
6554 (add_traceframe): Likewise.
6555 (add_traceframe_block): Likewise.
6556 (cmd_qtdpsrc): Likewise.
6557 (cmd_qtdv): Likewise.
6558 (cmd_qtstatus): Likewise.
6559 (response_source): Likewise.
6560 (response_tsv): Likewise.
6561 (cmd_qtnotes): Likewise.
6562 (gdb_collect): Likewise.
6563 (initialize_tracepoint): Likewise.
6565 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6567 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6568 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6569 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6571 (enum aarch64_condition_codes): New enum.
6572 (w0): New static global.
6575 (struct aarch64_memory_operand) <type>: New
6576 MEMORY_OPERAND_POSTINDEX type.
6577 (postindex_memory_operand): New helper function.
6578 (emit_ret): New function.
6579 (emit_load_store_pair): New function, factored out of emit_stp
6580 with support for MEMORY_OPERAND_POSTINDEX.
6581 (emit_stp): Rewrite using emit_load_store_pair.
6582 (emit_ldp): New function.
6583 (emit_load_store): Likewise.
6584 (emit_ldr): Mention post-index instruction in comment.
6585 (emit_ldrh): New function.
6586 (emit_ldrb): New function.
6587 (emit_ldrsw): Mention post-index instruction in comment.
6588 (emit_str): Likewise.
6589 (emit_subs): New function.
6590 (emit_cmp): Likewise.
6591 (emit_and): Likewise.
6592 (emit_orr): Likewise.
6593 (emit_orn): Likewise.
6594 (emit_eor): Likewise.
6595 (emit_mvn): Likewise.
6596 (emit_lslv): Likewise.
6597 (emit_lsrv): Likewise.
6598 (emit_asrv): Likewise.
6599 (emit_mul): Likewise.
6600 (emit_sbfm): Likewise.
6601 (emit_sbfx): Likewise.
6602 (emit_ubfm): Likewise.
6603 (emit_ubfx): Likewise.
6604 (emit_csinc): Likewise.
6605 (emit_cset): Likewise.
6606 (emit_nop): Likewise.
6607 (emit_ops_insns): New helper function.
6608 (emit_pop): Likewise.
6609 (emit_push): Likewise.
6610 (aarch64_emit_prologue): New function.
6611 (aarch64_emit_epilogue): Likewise.
6612 (aarch64_emit_add): Likewise.
6613 (aarch64_emit_sub): Likewise.
6614 (aarch64_emit_mul): Likewise.
6615 (aarch64_emit_lsh): Likewise.
6616 (aarch64_emit_rsh_signed): Likewise.
6617 (aarch64_emit_rsh_unsigned): Likewise.
6618 (aarch64_emit_ext): Likewise.
6619 (aarch64_emit_log_not): Likewise.
6620 (aarch64_emit_bit_and): Likewise.
6621 (aarch64_emit_bit_or): Likewise.
6622 (aarch64_emit_bit_xor): Likewise.
6623 (aarch64_emit_bit_not): Likewise.
6624 (aarch64_emit_equal): Likewise.
6625 (aarch64_emit_less_signed): Likewise.
6626 (aarch64_emit_less_unsigned): Likewise.
6627 (aarch64_emit_ref): Likewise.
6628 (aarch64_emit_if_goto): Likewise.
6629 (aarch64_emit_goto): Likewise.
6630 (aarch64_write_goto_address): Likewise.
6631 (aarch64_emit_const): Likewise.
6632 (aarch64_emit_call): Likewise.
6633 (aarch64_emit_reg): Likewise.
6634 (aarch64_emit_pop): Likewise.
6635 (aarch64_emit_stack_flush): Likewise.
6636 (aarch64_emit_zero_ext): Likewise.
6637 (aarch64_emit_swap): Likewise.
6638 (aarch64_emit_stack_adjust): Likewise.
6639 (aarch64_emit_int_call_1): Likewise.
6640 (aarch64_emit_void_call_2): Likewise.
6641 (aarch64_emit_eq_goto): Likewise.
6642 (aarch64_emit_ne_goto): Likewise.
6643 (aarch64_emit_lt_goto): Likewise.
6644 (aarch64_emit_le_goto): Likewise.
6645 (aarch64_emit_gt_goto): Likewise.
6646 (aarch64_emit_ge_got): Likewise.
6647 (aarch64_emit_ops_impl): New static global variable.
6648 (aarch64_emit_ops): New target function, return
6649 &aarch64_emit_ops_impl.
6650 (struct linux_target_ops): Install it.
6652 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6654 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6655 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6657 * linux-aarch64-ipa.c: New file.
6658 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6660 (aarch64_get_thread_area): New target method.
6661 (extract_signed_bitfield): New helper function.
6662 (aarch64_decode_ldr_literal): New function.
6663 (enum aarch64_opcodes): New enum.
6664 (struct aarch64_register): New struct.
6665 (struct aarch64_operand): New struct.
6666 (x0): New static global.
6675 (aarch64_register): New helper function.
6676 (register_operand): Likewise.
6677 (immediate_operand): Likewise.
6678 (struct aarch64_memory_operand): New struct.
6679 (offset_memory_operand): New helper function.
6680 (preindex_memory_operand): Likewise.
6681 (enum aarch64_system_control_registers): New enum.
6682 (ENCODE): New macro.
6683 (emit_insn): New helper function.
6684 (emit_b): New function.
6685 (emit_bcond): Likewise.
6686 (emit_cb): Likewise.
6687 (emit_tb): Likewise.
6688 (emit_blr): Likewise.
6689 (emit_stp): Likewise.
6690 (emit_ldp_q_offset): Likewise.
6691 (emit_stp_q_offset): Likewise.
6692 (emit_load_store): Likewise.
6693 (emit_ldr): Likewise.
6694 (emit_ldrsw): Likewise.
6695 (emit_str): Likewise.
6696 (emit_ldaxr): Likewise.
6697 (emit_stxr): Likewise.
6698 (emit_stlr): Likewise.
6699 (emit_data_processing_reg): Likewise.
6700 (emit_data_processing): Likewise.
6701 (emit_add): Likewise.
6702 (emit_sub): Likewise.
6703 (emit_mov): Likewise.
6704 (emit_movk): Likewise.
6705 (emit_mov_addr): Likewise.
6706 (emit_mrs): Likewise.
6707 (emit_msr): Likewise.
6708 (emit_sevl): Likewise.
6709 (emit_wfe): Likewise.
6710 (append_insns): Likewise.
6711 (can_encode_int32_in): New helper function.
6712 (aarch64_relocate_instruction): New function.
6713 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6714 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6715 (struct linux_target_ops): Install aarch64_get_thread_area,
6716 aarch64_install_fast_tracepoint_jump_pad and
6717 aarch64_get_min_fast_tracepoint_insn_len.
6719 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6721 * Makefile.in (aarch64-insn.o): New rule.
6722 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6724 2015-09-21 Yao Qi <yao.qi@linaro.org>
6726 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6728 2015-09-21 Yao Qi <yao.qi@linaro.org>
6730 * tracepoint.c (max_jump_pad_size): Remove.
6732 2015-09-18 Yao Qi <yao.qi@linaro.org>
6734 * linux-aarch64-low.c: Don't include sys/uio.h.
6735 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6737 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6739 * tracepoint.c (eval_result_type): Change prototype.
6740 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6742 2015-09-15 Pedro Alves <palves@redhat.com>
6744 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6745 Check whether to report exec events instead of checking whether
6746 multiprocess is enabled.
6748 2015-09-15 Pedro Alves <palves@redhat.com>
6751 * remote-utils.c (prepare_resume_reply): Merge
6752 TARGET_WAITKIND_VFORK_DONE switch case with the
6753 TARGET_WAITKIND_FORKED case.
6755 2015-09-15 Yao Qi <yao.qi@linaro.org>
6757 * server.c (handle_query): Check string comparison using
6758 "else if" instead of "if".
6760 2015-09-15 Yao Qi <yao.qi@linaro.org>
6762 * server.c (vCont_supported): New global variable.
6763 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6764 matches. Append ";vContSupported+" to own_buf.
6765 (handle_v_requests): Append ";s;S" to own_buf if target supports
6766 hardware single step or vCont_supported is false.
6767 (capture_main): Set vCont_supported to zero.
6769 2015-09-15 Yao Qi <yao.qi@linaro.org>
6771 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6773 (linux_supports_hardware_single_step): ... New function.
6774 (linux_target_ops): Update.
6775 * lynx-low.c (lynx_target_ops): Set field
6776 supports_hardware_single_step to target_can_do_hardware_single_step.
6777 * nto-low.c (nto_target_ops): Likewise.
6778 * spu-low.c (spu_target_ops): Likewise.
6779 * win32-low.c (win32_target_ops): Likewise.
6780 * target.c (target_can_do_hardware_single_step): New function.
6781 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6782 Remove. <supports_hardware_single_step>: New field.
6783 (target_supports_conditional_breakpoints): Remove.
6784 (target_supports_hardware_single_step): New macro.
6785 (target_can_do_hardware_single_step): Declare.
6786 * server.c (handle_query): Use target_supports_hardware_single_step
6787 instead of target_supports_conditional_breakpoints.
6789 2015-09-15 Yao Qi <yao.qi@linaro.org>
6791 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6793 (struct linux_target_ops the_low_target): Install
6794 aarch64_linux_siginfo_fixup.
6796 2015-09-11 Don Breazeal <donb@codesourcery.com>
6797 Luis Machado <lgustavo@codesourcery.com>
6799 * linux-low.c (linux_mourn): Static declaration.
6800 (linux_arch_setup): Move in front of
6801 handle_extended_wait.
6802 (linux_arch_setup_thread): New function.
6803 (handle_extended_wait): Handle exec events. Call
6804 linux_arch_setup_thread. Make event_lwp argument a
6805 pointer-to-a-pointer.
6806 (check_zombie_leaders): Do not check stopped threads.
6807 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6808 (linux_low_filter_event): Add lwp and thread for exec'ing
6809 non-leader thread if leader thread has been deleted.
6810 Refactor code into linux_arch_setup_thread and call it.
6811 Pass child lwp pointer by reference to handle_extended_wait.
6812 (linux_wait_for_event_filtered): Update comment.
6813 (linux_wait_1): Prevent clobbering exec event status.
6814 (linux_supports_exec_events): New function.
6815 (linux_target_ops) <supports_exec_events>: Initialize new member.
6816 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6818 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6819 * server.c (report_exec_events): New global variable.
6820 (handle_query): Handle qSupported query for exec-events feature.
6821 (captured_main): Initialize report_exec_events.
6822 * server.h (report_exec_events): Declare new global variable.
6823 * target.h (struct target_ops) <supports_exec_events>: New
6825 (target_supports_exec_events): New macro.
6826 * win32-low.c (win32_target_ops) <supports_exec_events>:
6827 Initialize new member.
6829 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6831 * linux-low.c (linux_low_enable_btrace): Remove.
6832 (linux_target_ops): Replace linux_low_enable_btrace with
6833 linux_enable_btrace.
6835 2015-09-03 Yao Qi <yao.qi@linaro.org>
6837 * linux-aarch64-low.c (aarch64_insert_point): Call
6838 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6841 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6843 * linux-low.c (check_stopped_by_breakpoint): Use
6844 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6846 2015-08-27 Pedro Alves <palves@redhat.com>
6848 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6850 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6852 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6853 the XNEW-family equivalent.
6854 (compile_bytecodes): Likewise.
6855 * dll.c (loaded_dll): Likewise.
6856 * event-loop.c (append_callback_event): Likewise.
6857 (create_file_handler): Likewise.
6858 (create_file_event): Likewise.
6859 * hostio.c (handle_open): Likewise.
6860 * inferiors.c (add_thread): Likewise.
6861 (add_process): Likewise.
6862 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6863 * linux-arm-low.c (arm_new_process): Likewise.
6864 (arm_new_thread): Likewise.
6865 * linux-low.c (add_to_pid_list): Likewise.
6866 (linux_add_process): Likewise.
6867 (handle_extended_wait): Likewise.
6868 (add_lwp): Likewise.
6869 (enqueue_one_deferred_signal): Likewise.
6870 (enqueue_pending_signal): Likewise.
6871 (linux_resume_one_lwp_throw): Likewise.
6872 (linux_resume_one_thread): Likewise.
6873 (linux_read_memory): Likewise.
6874 (linux_write_memory): Likewise.
6875 * linux-mips-low.c (mips_linux_new_process): Likewise.
6876 (mips_linux_new_thread): Likewise.
6877 (mips_add_watchpoint): Likewise.
6878 * linux-x86-low.c (initialize_low_arch): Likewise.
6879 * lynx-low.c (lynx_add_process): Likewise.
6880 * mem-break.c (set_raw_breakpoint_at): Likewise.
6881 (set_breakpoint): Likewise.
6882 (add_condition_to_breakpoint): Likewise.
6883 (add_commands_to_breakpoint): Likewise.
6884 (clone_agent_expr): Likewise.
6885 (clone_one_breakpoint): Likewise.
6886 * regcache.c (new_register_cache): Likewise.
6887 * remote-utils.c (look_up_one_symbol): Likewise.
6888 * server.c (queue_stop_reply): Likewise.
6889 (start_inferior): Likewise.
6890 (queue_stop_reply_callback): Likewise.
6891 (handle_target_event): Likewise.
6892 * spu-low.c (fetch_ppc_memory): Likewise.
6893 (store_ppc_memory): Likewise.
6894 * target.c (set_target_ops): Likewise.
6895 * thread-db.c (thread_db_load_search): Likewise.
6896 (try_thread_db_load_1): Likewise.
6897 * tracepoint.c (add_tracepoint): Likewise.
6898 (add_tracepoint_action): Likewise.
6899 (create_trace_state_variable): Likewise.
6900 (cmd_qtdpsrc): Likewise.
6901 (cmd_qtro): Likewise.
6902 (add_while_stepping_state): Likewise.
6903 * win32-low.c (child_add_thread): Likewise.
6904 (get_image_name): Likewise.
6906 2015-08-25 Yao Qi <yao.qi@linaro.org>
6908 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6910 2015-08-25 Yao Qi <yao.qi@linaro.org>
6912 * Makefile.in (aarch64-linux.o): New rule.
6913 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6915 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6916 (aarch64_init_debug_reg_state): Make it extern.
6917 (aarch64_linux_prepare_to_resume): Remove.
6919 2015-08-25 Yao Qi <yao.qi@linaro.org>
6921 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6922 lwp_arch_private_info and ptid_of_lwp.
6924 2015-08-25 Yao Qi <yao.qi@linaro.org>
6926 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6927 Find proc_info by find_process_pid. All callers updated.
6929 2015-08-25 Yao Qi <yao.qi@linaro.org>
6931 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6933 (debug_reg_change_callback): Remove.
6934 (aarch64_notify_debug_reg_change): Remove.
6936 2015-08-25 Yao Qi <yao.qi@linaro.org>
6938 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6939 Call current_lwp_ptid.
6941 2015-08-25 Yao Qi <yao.qi@linaro.org>
6943 * linux-aarch64-low.c (debug_reg_change_callback): Use
6946 2015-08-25 Yao Qi <yao.qi@linaro.org>
6948 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6950 2015-08-25 Yao Qi <yao.qi@linaro.org>
6952 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6954 2015-08-25 Yao Qi <yao.qi@linaro.org>
6956 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6959 2015-08-25 Yao Qi <yao.qi@linaro.org>
6961 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6963 (debug_reg_change_callback): Remove argument entry and add argument
6964 lwp. Remove local variable thread. Don't print thread id in the
6965 debugging output. Don't check whether pid of thread equals to pid.
6966 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6967 iterate_over_lwps instead find_inferior.
6969 2015-08-24 Pedro Alves <palves@redhat.com>
6971 * inferiors.c (get_first_process): New function.
6972 * inferiors.h (get_first_process): New declaration.
6973 * remote-utils.c (read_ptid): Default to the first process in the
6974 list, instead of to the current thread's process.
6976 2015-08-24 Pedro Alves <palves@redhat.com>
6978 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6979 * event-loop.c: Likewise.
6980 * remote-utils.c: Likewise.
6981 * tracepoint.c: Likewise.
6983 2015-08-24 Pedro Alves <palves@redhat.com>
6985 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6988 2015-08-21 Pedro Alves <palves@redhat.com>
6990 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6991 instead of literal 1.
6993 2015-08-21 Pedro Alves <palves@redhat.com>
6995 * tdesc.c (default_description): Explicitly zero-initialize.
6997 2015-08-21 Pedro Alves <palves@redhat.com>
7000 * inferiors.c (remove_thread): Discard any pending stop reply for
7002 * server.c (remove_all_on_match_pid): Rename to ...
7003 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7005 (discard_queued_stop_replies): Change parameter to a ptid. Now
7007 (handle_v_kill, kill_inferior_callback, captured_main)
7008 (process_serial_event): Adjust.
7009 * server.h (discard_queued_stop_replies): Declare.
7011 2015-08-21 Pedro Alves <palves@redhat.com>
7013 * linux-low.c (wait_for_sigstop): Always switch to no thread
7014 selected if the previously current thread dies.
7015 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7016 process instead of the current thread's.
7017 * remote-utils.c (input_interrupt): Don't check if there's no
7019 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7020 current thread to the general thread fails, error out.
7021 (handle_qxfer_auxv, handle_qxfer_libraries)
7022 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7023 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7024 (handle_query): Check if there's a thread selected instead of
7025 checking whether there's any thread in the thread list.
7026 (handle_qxfer_threads, handle_qxfer_btrace)
7027 (handle_qxfer_btrace_conf): Don't error out early if there's no
7028 thread in the thread list.
7029 (handle_v_cont, myresume): Don't set the current thread to the
7031 (process_serial_event) <Hg handling>: Also set thread_id if the
7032 previous general thread is still alive.
7033 (process_serial_event) <g/G handling>: If setting the current
7034 thread to the general thread fails, error out.
7035 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7036 thread's lwp instead of the current thread's.
7037 * target.c (set_desired_thread): If the desired thread was not
7038 found, leave the current thread pointing to NULL. Return an int
7039 (boolean) indicating success.
7040 * target.h (set_desired_thread): Change return type to int.
7042 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7044 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7045 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7047 (ps_get_thread_area): New function.
7049 2015-08-19 Gary Benson <gbenson@redhat.com>
7051 * hostio.c (handle_pread): Do not attempt to read more data
7052 than hostio_reply_with_data can fit in a packet.
7054 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7056 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7058 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7060 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7062 2015-08-06 Pedro Alves <palves@redhat.com>
7064 * tracepoint.c (expr_eval_result): Now an int.
7066 2015-08-06 Pedro Alves <palves@redhat.com>
7068 * gdbthread.h (struct regcache): Forward declare.
7069 (struct thread_info) <regcache_data>: Now a struct regcache
7071 * inferiors.c (inferior_regcache_data)
7072 (set_inferior_regcache_data): Now work with struct regcache
7074 * inferiors.h (struct regcache): Forward declare.
7075 (inferior_regcache_data, set_inferior_regcache_data): Now work
7076 with struct regcache pointers.
7077 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7078 (free_register_cache_thread): Remove struct regcache pointer
7081 2015-08-06 Pedro Alves <palves@redhat.com>
7083 * server.c (captured_main): On error, print the exception message
7084 to stderr, and if run_once is set, throw a quit.
7086 2015-08-06 Pedro Alves <palves@redhat.com>
7088 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7091 2015-08-06 Pedro Alves <palves@redhat.com>
7093 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7094 reading beyond the passed in buffer length.
7096 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7098 * tracepoint.c (symbol_list) <required>: Remove.
7100 2015-08-06 Pedro Alves <palves@redhat.com>
7102 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7103 count if stopping and suspending threads.
7104 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7105 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7106 (linux_detach): Complete an ongoing step-over.
7107 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7109 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7110 (linux_wait_1): If passing a signal to the inferior after
7111 finishing a step-over, unsuspend and re-resume all lwps. If we
7112 see a single-step event but the thread should be continuing, don't
7113 pass the trap to gdb.
7114 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7115 internal_error instead of gdb_assert.
7116 (enqueue_pending_signal): New function.
7117 (check_ptrace_stopped_lwp_gone): Add debug output.
7118 (start_step_over): Use internal_error instead of gdb_assert.
7119 (complete_ongoing_step_over): New function.
7120 (linux_resume_one_thread): Don't resume a suspended thread.
7121 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7124 2015-08-06 Pedro Alves <palves@redhat.com>
7126 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7127 (linux_thread_alive): Use lwp_is_marked_dead.
7128 (extended_event_reported): Delete.
7129 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7130 instead of extended_event_reported.
7131 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7133 (lwp_is_marked_dead): New function.
7134 (lwp_running): Use lwp_is_marked_dead.
7135 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7138 2015-08-06 Pedro Alves <palves@redhat.com>
7140 * linux-low.c (linux_wait_1): Move fork event output out of the
7141 !report_to_gdb check. Pass event_child->waitstatus to
7142 target_waitstatus_to_string instead of ourstatus.
7144 2015-08-04 Yao Qi <yao.qi@linaro.org>
7146 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7147 if current_thread is 32 bit.
7149 2015-08-04 Yao Qi <yao.qi@linaro.org>
7151 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7152 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7153 * server.c (extended_protocol): Remove "static".
7154 * server.h (extended_protocol): Declare it.
7156 2015-08-04 Yao Qi <yao.qi@linaro.org>
7158 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7159 both aarch64 and aarch32.
7160 (aarch64_set_pc): Likewise.
7162 2015-08-04 Yao Qi <yao.qi@linaro.org>
7164 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7165 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7166 arm-with-neon.xml to srv_xmlfiles.
7167 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7168 (is_64bit_tdesc): New function.
7169 (aarch64_linux_read_description): New function.
7170 (aarch64_arch_setup): Call aarch64_linux_read_description.
7171 (regs_info): Rename to regs_info_aarch64.
7172 (aarch64_regs_info): Return right regs_info.
7173 (initialize_low_arch): Call initialize_low_arch_aarch32.
7175 2015-08-04 Yao Qi <yao.qi@linaro.org>
7177 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7178 * linux-aarch32-low.c: New file.
7179 * linux-aarch32-low.h: New file.
7180 * linux-arm-low.c (arm_fill_gregset): Move it to
7181 linux-aarch32-low.c.
7182 (arm_store_gregset): Likewise.
7183 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7184 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7185 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7186 (regs_info): Rename to regs_info_arm.
7187 (arm_regs_info): Return regs_info_aarch32 if
7188 have_ptrace_getregset is 1 and target description is
7189 arm_with_neon or arm_with_vfpv3.
7190 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7191 Call initialize_low_arch_aarch32 instead.
7193 2015-08-04 Yao Qi <yao.qi@linaro.org>
7195 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7196 * linux-low.c: ... here.
7197 * linux-low.h (have_ptrace_getregset): Declare it.
7199 2015-08-04 Pedro Alves <palves@redhat.com>
7201 * thread-db.c (struct thread_db): Use new typedefs.
7202 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7204 (disable_thread_event_reporting): Cast result of dlsym to
7205 destination function pointer type.
7206 (thread_db_mourn): Use td_ta_delete_ftype.
7208 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7210 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7212 (CDX_BREAKPOINT): Define for R2.
7213 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7214 (the_low_target): Add comments.
7216 2015-07-30 Yao Qi <yao.qi@linaro.org>
7218 * linux-arm-low.c (arm_hwcap): Remove it.
7219 (arm_read_description): New local variable arm_hwcap. Don't
7220 set arm_hwcap to zero.
7222 2015-07-30 Yao Qi <yao.qi@linaro.org>
7224 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7225 Use regcache->tdesc instead.
7226 (arm_store_wmmxregset): Likewise.
7227 (arm_fill_vfpregset): Likewise.
7228 (arm_store_vfpregset): Likewise.
7230 2015-07-30 Yao Qi <yao.qi@linaro.org>
7232 * linux-arm-low.c: Include arch/arm.h.
7233 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7234 (arm_store_gregset): Likewise.
7236 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7238 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7239 ptrace's 4th parameter.
7241 2015-07-27 Yao Qi <yao.qi@linaro.org>
7243 * configure.srv (case aarch64*-*-linux*): Don't set
7246 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7248 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7250 * linux-arm-low.c: Likewise.
7251 * linux-cris-low.c: Likewise.
7252 * linux-crisv32-low.c: Likewise.
7253 * linux-low.c: Likewise.
7254 * linux-m68k-low.c: Likewise.
7255 * linux-mips-low.c: Likewise.
7256 * linux-nios2-low.c: Likewise.
7257 * linux-s390-low.c: Likewise.
7258 * linux-sparc-low.c: Likewise.
7259 * linux-tic6x-low.c: Likewise.
7260 * linux-tile-low.c: Likewise.
7261 * linux-x86-low.c: Likewise.
7263 2015-07-24 Pedro Alves <palves@redhat.com>
7265 * config.in: Regenerate.
7266 * configure: Regenerate.
7268 2015-07-24 Pedro Alves <palves@redhat.com>
7270 * acinclude.m4: Include ../ptrace.m4.
7271 * configure.ac: Call GDB_AC_PTRACE.
7272 * config.in, configure: Regenerate.
7274 2015-07-24 Yao Qi <yao.qi@linaro.org>
7276 * linux-low.c (linux_create_inferior): Remove setting to
7277 proc->priv->new_inferior.
7278 (linux_attach): Likewise.
7279 (linux_low_filter_event): Likewise.
7280 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7282 2015-07-24 Yao Qi <yao.qi@linaro.org>
7284 * linux-low.c (linux_arch_setup): New function.
7285 (linux_low_filter_event): If proc->tdesc is NULL and
7286 proc->attached is true, call the_low_target.arch_setup.
7287 Otherwise, keep status pending, and return.
7288 (linux_resume_one_lwp_throw): Don't call get_pc if
7289 thread->while_stepping isn't NULL. Don't call
7290 get_thread_regcache if proc->tdesc is NULL.
7291 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7292 (linux_target_ops): Install arch_setup.
7293 * server.c (start_inferior): Call the_target->arch_setup.
7294 * target.h (struct target_ops) <arch_setup>: New field.
7295 (target_arch_setup): New marco.
7296 * lynx-low.c (lynx_target_ops): Update.
7297 * nto-low.c (nto_target_ops): Update.
7298 * spu-low.c (spu_target_ops): Update.
7299 * win32-low.c (win32_target_ops): Update.
7301 2015-07-24 Yao Qi <yao.qi@linaro.org>
7303 * linux-low.c (linux_add_process): Don't set
7304 proc->priv->new_inferior.
7305 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7306 (linux_attach): Likewise.
7308 2015-07-24 Yao Qi <yao.qi@linaro.org>
7310 * server.c (start_inferior): Code refactor.
7312 2015-07-24 Yao Qi <yao.qi@linaro.org>
7314 * server.c (process_serial_event): Set general_thread.
7316 2015-07-21 Yao Qi <yao.qi@linaro.org>
7318 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7319 aarch64_linux_get_debug_reg_capacity.
7321 2015-07-17 Yao Qi <yao.qi@linaro.org>
7323 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7324 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7325 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7326 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7327 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7328 (AARCH64_HWP_ALIGNMENT): Likewise.
7329 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7330 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7331 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7332 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7333 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7334 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7335 (struct aarch64_debug_reg_state): Likewise.
7336 (struct arch_lwp_info): Likewise.
7337 (aarch64_align_watchpoint): Likewise.
7338 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7339 (aarch64_watchpoint_length): Likewise.
7340 (aarch64_point_encode_ctrl_reg): Likewise
7341 (aarch64_point_is_aligned): Likewise.
7342 (aarch64_align_watchpoint): Likewise.
7343 (aarch64_linux_set_debug_regs):
7344 (aarch64_dr_state_insert_one_point): Likewise.
7345 (aarch64_dr_state_remove_one_point): Likewise.
7346 (aarch64_handle_breakpoint): Likewise.
7347 (aarch64_handle_aligned_watchpoint): Likewise.
7348 (aarch64_handle_unaligned_watchpoint): Likewise.
7349 (aarch64_handle_watchpoint): Likewise.
7351 2015-07-17 Yao Qi <yao.qi@linaro.org>
7353 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7354 and don't aarch64_get_debug_reg_state. All callers update.
7355 (aarch64_handle_aligned_watchpoint): Likewise.
7356 (aarch64_handle_unaligned_watchpoint): Likewise.
7357 (aarch64_handle_watchpoint): Likewise.
7358 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7359 (aarch64_remove_point): Likewise.
7361 2015-07-17 Yao Qi <yao.qi@linaro.org>
7363 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7365 (aarch64_handle_unaligned_watchpoint): Likewise.
7367 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7369 Revert the previous 3 commits:
7370 Move gdb_regex* to common/
7371 Move linux_find_memory_regions_full & co.
7372 gdbserver build-id attribute generator
7374 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7375 Jan Kratochvil <jan.kratochvil@redhat.com>
7377 gdbserver build-id attribute generator.
7378 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7379 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7380 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7382 (get_dynamic): Use find_pdhr to traverse program headers.
7383 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7384 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7385 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7386 (get_hex_build_id): New.
7387 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7388 to reply XML document.
7390 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7391 Jan Kratochvil <jan.kratochvil@redhat.com>
7393 * target.c: Include target/target-utils.h and fcntl.h.
7394 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7395 (target_fileio_read_stralloc): New functions.
7397 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7399 * Makefile.in (OBS): Add gdb_regex.o.
7401 * config.in: Rebuilt.
7402 * configure: Rebuilt.
7404 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7405 Jan Kratochvil <jan.kratochvil@redhat.com>
7407 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7408 * Makefile.in (OBS): Add target-utils.o.
7409 (linux-maps.o, target-utils.o): New.
7410 * configure.srv (srv_linux_obj): Add linux-maps.o.
7412 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7414 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7416 (the_low_target): Install it.
7418 2015-07-14 Pedro Alves <palves@redhat.com>
7420 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7421 Instead, ignore ECHILD, and throw an error for other errnos.
7423 2015-07-10 Pedro Alves <palves@redhat.com>
7425 * event-loop.c (struct callback_event) <data>: Change type to
7426 gdb_client_data instance instead of gdb_client_data pointer.
7427 (append_callback_event): Adjust.
7429 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7431 * linux-aarch64-low.c: Add comments for each linux_target_ops
7432 method. Remove comments already covered in target_ops and
7433 linux_target_ops definitions.
7434 (the_low_target): Add comments for each unimplemented method.
7436 2015-07-09 Yao Qi <yao.qi@linaro.org>
7438 * linux-aarch64-low.c (aarch64_regmap): Remove.
7439 (aarch64_usrregs_info): Remove.
7440 (regs_info): Set field usrregs to NULL.
7442 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7444 * linux-low.c: Include "rsp-low.h"
7445 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7446 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7447 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7448 (handle_btrace_enable_pt): New.
7449 (handle_btrace_general_set): Support "pt".
7450 (handle_btrace_conf_general_set): Support "pt:size".
7452 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7454 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7457 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7459 * linux-aarch64-low.c: Remove comment about endianness.
7460 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7461 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7464 2015-06-24 Gary Benson <gbenson@redhat.com>
7466 * linux-i386-ipa.c (stdint.h): Do not include.
7467 * lynx-i386-low.c (stdint.h): Likewise.
7468 * lynx-ppc-low.c (stdint.h): Likewise.
7469 * mem-break.c (stdint.h): Likewise.
7470 * thread-db.c (stdint.h): Likewise.
7471 * tracepoint.c (stdint.h): Likewise.
7472 * win32-low.c (stdint.h): Likewise.
7474 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7476 * server.c (write_qxfer_response): Update call to
7477 remote_escape_output.
7479 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7480 Jan Kratochvil <jan.kratochvil@redhat.com>
7482 Merge multiple hex conversions.
7483 * gdbreplay.c (tohex): Rename to 'fromhex'.
7484 (logchar): Use fromhex.
7486 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7488 * server.c (handle_qxfer_libraries): Set `version' attribute for
7491 2015-06-10 Gary Benson <gbenson@redhat.com>
7493 * target.h (struct target_ops) <multifs_open>: New field.
7494 <multifs_unlink>: Likewise.
7495 <multifs_readlink>: Likewise.
7496 * linux-low.c (nat/linux-namespaces.h): New include.
7497 (linux_target_ops): Initialize the_target->multifs_open,
7498 the_target->multifs_unlink and the_target->multifs_readlink.
7499 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7500 * hostio.c (hostio_fs_pid): New static variable.
7501 (hostio_handle_new_gdb_connection): New function.
7502 (handle_setfs): Likewise.
7503 (handle_open): Use the_target->multifs_open as appropriate.
7504 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7505 (handle_readlink): Use the_target->multifs_readlink as
7507 (handle_vFile): Handle vFile:setfs packets.
7508 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7509 after target_handle_new_gdb_connection.
7511 2015-06-10 Gary Benson <gbenson@redhat.com>
7513 * configure.ac (AC_CHECK_FUNCS): Add setns.
7514 * config.in: Regenerate.
7515 * configure: Likewise.
7516 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7517 (linux-namespaces.o): New rule.
7518 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7520 2015-06-09 Gary Benson <gbenson@redhat.com>
7522 * hostio.c (handle_open): Process mode argument with
7523 fileio_to_host_mode.
7525 2015-06-01 Yao Qi <yao.qi@linaro.org>
7527 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7528 * linux-x86-low.c: Likewise.
7530 2015-05-28 Don Breazeal <donb@codesourcery.com>
7532 * linux-low.c (handle_extended_wait): Initialize
7533 thread_info.last_resume_kind for new fork children.
7535 2015-05-15 Pedro Alves <palves@redhat.com>
7537 * target.h (target_handle_new_gdb_connection): Rewrite using if
7538 wrapped in do/while.
7540 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7542 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7543 * configure, config.in: Regenerate.
7544 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7547 2015-05-12 Don Breazeal <donb@codesourcery.com>
7549 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7550 PTRACE_EVENT_VFORK_DONE.
7551 (linux_low_ptrace_options, extended_event_reported): Add vfork
7553 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7554 and "vforkdone" for RSP 'T' Stop Reply Packet.
7555 * server.h (report_vfork_events): Declare
7558 2015-05-12 Don Breazeal <donb@codesourcery.com>
7560 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7561 (the_low_target) <new_fork>: Initialize new member.
7562 * linux-arm-low.c (arm_new_fork): New function.
7563 (the_low_target) <new_fork>: Initialize new member.
7564 * linux-low.c (handle_extended_wait): Call new target function
7566 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7567 * linux-mips-low.c (mips_add_watchpoint): New function
7568 extracted from mips_insert_point.
7569 (the_low_target) <new_fork>: Initialize new member.
7570 (mips_linux_new_fork): New function.
7571 (mips_insert_point): Call mips_add_watchpoint.
7572 * linux-x86-low.c (x86_linux_new_fork): New function.
7573 (the_low_target) <new_fork>: Initialize new member.
7575 2015-05-12 Don Breazeal <donb@codesourcery.com>
7577 * linux-low.c (handle_extended_wait): Implement return value,
7578 rename argument 'event_child' to 'event_lwp', handle
7579 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7580 (linux_low_ptrace_options): New function.
7581 (linux_low_filter_event): Call linux_low_ptrace_options,
7582 use different argument fo linux_enable_event_reporting,
7583 use return value from handle_extended_wait.
7584 (extended_event_reported): New function.
7585 (linux_wait_1): Call extended_event_reported and set
7586 status to report fork events.
7587 (linux_write_memory): Add pid to debug message.
7588 (reset_lwp_ptrace_options_callback): New function.
7589 (linux_handle_new_gdb_connection): New function.
7590 (linux_target_ops): Initialize new structure member.
7591 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7592 * lynx-low.c: Initialize new structure member.
7593 * remote-utils.c (prepare_resume_reply): Implement stop reason
7594 "fork" for "T" stop message.
7595 * server.c (handle_query): Call handle_new_gdb_connection.
7596 * server.h (report_fork_events): Declare global flag.
7597 * target.h (struct target_ops) <handle_new_gdb_connection>:
7599 (target_handle_new_gdb_connection): New macro.
7600 * win32-low.c: Initialize new structure member.
7602 2015-05-12 Don Breazeal <donb@codesourcery.com>
7604 * mem-break.c (APPEND_TO_LIST): Define macro.
7605 (clone_agent_expr): New function.
7606 (clone_one_breakpoint): New function.
7607 (clone_all_breakpoints): New function.
7608 * mem-break.h: Declare new functions.
7610 2015-05-12 Don Breazeal <donb@codesourcery.com>
7612 * linux-low.c (linux_supports_fork_events): New function.
7613 (linux_supports_vfork_events): New function.
7614 (linux_target_ops): Initialize new structure members.
7615 (initialize_low): Call linux_check_ptrace_features.
7616 * lynx-low.c (lynx_target_ops): Initialize new structure
7618 * server.c (report_fork_events, report_vfork_events):
7620 (handle_query): Add new features to qSupported packet and
7622 (captured_main): Initialize new global variables.
7623 * target.h (struct target_ops) <supports_fork_events>:
7625 <supports_vfork_events>: New member.
7626 (target_supports_fork_events): New macro.
7627 (target_supports_vfork_events): New macro.
7628 * win32-low.c (win32_target_ops): Initialize new structure
7631 2015-05-12 Gary Benson <gbenson@redhat.com>
7633 * server.c (handle_qxfer_exec_file): Use current process
7636 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7638 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7639 Remove HAVE_PTRACE_GETREGS conditionals.
7640 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7641 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7643 2015-05-08 Yao Qi <yao.qi@linaro.org>
7645 * linux-low.c (linux_supports_conditional_breakpoints): New
7647 (linux_target_ops): Install new target method.
7648 * lynx-low.c (lynx_target_ops): Install NULL hook for
7649 supports_conditional_breakpoints.
7650 * nto-low.c (nto_target_ops): Likewise.
7651 * spu-low.c (spu_target_ops): Likewise.
7652 * win32-low.c (win32_target_ops): Likewise.
7653 * server.c (handle_query): Check
7654 target_supports_conditional_breakpoints.
7655 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7657 (target_supports_conditional_breakpoints): New macro.
7659 2015-05-06 Pedro Alves <palves@redhat.com>
7662 * server.c (start_inferior): If the process exits, mourn it.
7664 2015-04-21 Gary Benson <gbenson@redhat.com>
7666 * hostio.c (fileio_open_flags_to_host): Factored out to
7667 fileio_to_host_openflags in common/fileio.c. Single use
7670 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7672 * linux-xtensa-low.c (xtensa_fill_gregset)
7673 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7676 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7678 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7679 (regs_info): Replace usrregs pointer with NULL.
7681 2015-04-17 Gary Benson <gbenson@redhat.com>
7683 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7684 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7685 * server.c (handle_qxfer_exec_file): New function.
7686 (qxfer_packets): Add exec-file entry.
7687 (handle_query): Report qXfer:exec-file:read as supported packet.
7689 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7691 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7693 2015-04-09 Gary Benson <gbenson@redhat.com>
7695 * hostio-errno.c (errno_to_fileio_error): Remove function.
7696 Update caller to use remote_fileio_to_fio_error.
7698 2015-04-09 Yao Qi <yao.qi@linaro.org>
7700 * linux-low.c (linux_insert_point): Call
7701 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7702 (linux_remove_point): Call remove_memory_breakpoint if type is
7704 * linux-x86-low.c (x86_insert_point): Don't call
7705 insert_memory_breakpoint.
7706 (x86_remove_point): Don't call remove_memory_breakpoint.
7708 2015-04-01 Pedro Alves <palves@redhat.com>
7709 Cleber Rosa <crosa@redhat.com>
7711 * server.c (gdbserver_usage): Reorganize and extend the usage
7714 2015-03-24 Pedro Alves <palves@redhat.com>
7716 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7717 output. Also dump TRAP_TRACE.
7718 (linux_low_filter_event): In debug output, distinguish a
7719 resume_stop SIGSTOP from a delayed SIGSTOP.
7721 2015-03-24 Gary Benson <gbenson@redhat.com>
7723 * linux-x86-low.c (x86_linux_new_thread): Moved to
7725 (x86_linux_prepare_to_resume): Likewise.
7727 2015-03-24 Gary Benson <gbenson@redhat.com>
7729 * Makefile.in (x86-linux-dregs.o): New rule.
7730 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7731 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7732 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7733 (x86_linux_dr_get): Likewise.
7734 (x86_linux_dr_set): Likewise.
7735 (update_debug_registers_callback): Likewise.
7736 (x86_linux_dr_set_addr): Likewise.
7737 (x86_linux_dr_get_addr): Likewise.
7738 (x86_linux_dr_set_control): Likewise.
7739 (x86_linux_dr_get_control): Likewise.
7740 (x86_linux_dr_get_status): Likewise.
7741 (x86_linux_update_debug_registers): Likewise.
7743 2015-03-24 Gary Benson <gbenson@redhat.com>
7745 * linux-x86-low.c (x86_linux_update_debug_registers):
7746 New function, factored out from...
7747 (x86_linux_prepare_to_resume): ...this.
7749 2015-03-24 Gary Benson <gbenson@redhat.com>
7751 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7752 (x86_linux_dr_set): Likewise.
7753 (update_debug_registers_callback): Likewise.
7754 (x86_linux_dr_set_addr): Likewise.
7755 (x86_linux_dr_get_addr): Likewise.
7756 (x86_linux_dr_set_control): Likewise.
7757 (x86_linux_dr_get_control): Likewise.
7758 (x86_linux_dr_get_status): Likewise.
7759 (x86_linux_prepare_to_resume): Likewise.
7761 2015-03-24 Gary Benson <gbenson@redhat.com>
7763 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7764 Use perror_with_name. Pass string through gettext.
7765 (x86_linux_dr_set): Likewise.
7767 2015-03-24 Gary Benson <gbenson@redhat.com>
7769 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7770 (x86_linux_dr_set_addr): ...this.
7771 (x86_dr_low_get_addr): Rename to...
7772 (x86_linux_dr_get_addr): ...this.
7773 (x86_dr_low_set_control): Rename to...
7774 (x86_linux_dr_set_control): ...this.
7775 (x86_dr_low_get_control): Rename to...
7776 (x86_linux_dr_get_control): ...this.
7777 (x86_dr_low_get_status): Rename to...
7778 (x86_linux_dr_get_status): ...this.
7779 (x86_dr_low): Update with new function names.
7781 2015-03-24 Gary Benson <gbenson@redhat.com>
7783 * Makefile.in (x86-linux.o): New rule.
7784 * configure.srv: Add x86-linux.o to relevant targets.
7785 * linux-low.c (lwp_set_arch_private_info): New function.
7786 (lwp_arch_private_info): Likewise.
7787 * linux-x86-low.c: Include nat/x86-linux.h.
7788 (arch_lwp_info): Removed structure.
7789 (update_debug_registers_callback):
7790 Use lwp_set_debug_registers_changed.
7791 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7792 and lwp_set_debug_registers_changed.
7793 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7795 2015-03-24 Gary Benson <gbenson@redhat.com>
7797 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7798 * linux-arm-low.c (arm_new_thread): Likewise.
7799 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7800 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7801 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7802 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7804 2015-03-24 Gary Benson <gbenson@redhat.com>
7806 * linux-low.c (ptid_of_lwp): New function.
7807 (lwp_is_stopped): Likewise.
7808 (lwp_stop_reason): Likewise.
7809 * linux-x86-low.c (update_debug_registers_callback):
7811 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7814 2015-03-24 Gary Benson <gbenson@redhat.com>
7816 * linux-low.h (linux_stop_lwp): Remove declaration.
7818 2015-03-24 Gary Benson <gbenson@redhat.com>
7820 * linux-low.h: Include nat/linux-nat.h.
7821 * linux-low.c (iterate_over_lwps_args): New structure.
7822 (iterate_over_lwps_filter): New function.
7823 (iterate_over_lwps): Likewise.
7824 * linux-x86-low.c (update_debug_registers_callback):
7825 Update signature to what iterate_over_lwps expects.
7826 Remove PID check that iterate_over_lwps now performs.
7827 (x86_dr_low_set_addr): Use iterate_over_lwps.
7828 (x86_dr_low_set_control): Likewise.
7830 2015-03-24 Gary Benson <gbenson@redhat.com>
7832 * linux-x86-low.c (x86_debug_reg_state): New function.
7833 (x86_linux_prepare_to_resume): Use the above.
7835 2015-03-24 Gary Benson <gbenson@redhat.com>
7837 * linux-low.c (current_lwp_ptid): New function.
7838 * linux-x86-low.c: Include nat/linux-nat.h.
7839 (x86_dr_low_get_addr): Use current_lwp_ptid.
7840 (x86_dr_low_get_control): Likewise.
7841 (x86_dr_low_get_status): Likewise.
7843 2015-03-20 Pedro Alves <palves@redhat.com>
7845 * tracepoint.c (cmd_qtstatus): Make "str" const.
7847 2015-03-20 Pedro Alves <palves@redhat.com>
7849 * server.c (handle_general_set): Make "req_str" const.
7851 2015-03-19 Pedro Alves <palves@redhat.com>
7853 * linux-low.c (linux_resume_one_lwp): Rename to ...
7854 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7855 instead call perror_with_name.
7856 (check_ptrace_stopped_lwp_gone): New function.
7857 (linux_resume_one_lwp): Reimplement as wrapper around
7858 linux_resume_one_lwp_throw that swallows errors if the LWP is
7861 2015-03-19 Pedro Alves <palves@redhat.com>
7863 * linux-low.c (count_events_callback, select_event_lwp_callback):
7864 No longer check whether the thread has resume_stop as last resume
7867 2015-03-19 Pedro Alves <palves@redhat.com>
7869 * linux-low.c (count_events_callback, select_event_lwp_callback):
7870 Use the lwp's status_pending_p field, not the thread's.
7872 2015-03-19 Pedro Alves <palves@redhat.com>
7874 * linux-low.c (select_event_lwp_callback): Update comments to
7875 no longer mention SIGTRAP.
7877 2015-03-18 Gary Benson <gbenson@redhat.com>
7879 * server.c (handle_query): Do not report vFile:fstat as supported.
7881 2015-03-11 Gary Benson <gbenson@redhat.com>
7883 * hostio.c (sys/types.h): New include.
7884 (sys/stat.h): Likewise.
7885 (common-remote-fileio.h): Likewise.
7886 (handle_fstat): New function.
7887 (handle_vFile): Handle vFile:fstat packets.
7889 2015-03-11 Gary Benson <gbenson@redhat.com>
7891 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7892 struct stat.st_blocks and struct stat.st_blksize.
7893 * configure: Regenerate.
7894 * config.in: Likewise.
7895 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7896 (OBS): Add common-remote-fileio.o.
7897 (common-remote-fileio.o): New rule.
7899 2015-03-09 Pedro Alves <palves@redhat.com>
7901 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7902 'struct sockaddr' pointer in 'accept' call.
7904 2015-03-09 Pedro Alves <palves@redhat.com>
7907 2015-03-07 Pedro Alves <palves@redhat.com>
7908 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7909 or <winsock2.h> here. Instead include "gdb_socket.h".
7910 (remote_open): Use union gdb_sockaddr_u.
7911 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7912 or <winsock2.h> here. Instead include "gdb_socket.h".
7913 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7914 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7916 (init_named_socket, gdb_agent_helper_thread): Use union
7919 2015-03-07 Pedro Alves <palves@redhat.com>
7921 * configure.ac (build_warnings): Move
7922 -Wdeclaration-after-statement to the C-specific set.
7923 * configure: Regenerate.
7925 2015-03-07 Pedro Alves <palves@redhat.com>
7927 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7928 or <winsock2.h> here. Instead include "gdb_socket.h".
7929 (remote_open): Use union gdb_sockaddr_u.
7930 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7931 or <winsock2.h> here. Instead include "gdb_socket.h".
7932 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7933 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7935 (init_named_socket, gdb_agent_helper_thread): Use union
7938 2015-03-07 Pedro Alves <palves@redhat.com>
7940 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7943 2015-03-06 Yao Qi <yao.qi@linaro.org>
7945 * linux-aarch64-low.c (aarch64_insert_point): Use
7946 show_debug_regs as a boolean.
7947 (aarch64_remove_point): Likewise.
7949 2015-03-05 Pedro Alves <palves@redhat.com>
7951 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7952 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7953 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7954 * nto-low.c (nto_target_ops): Likewise.
7955 * spu-low.c (spu_target_ops): Likewise.
7956 * win32-low.c (win32_target_ops): Likewise.
7958 2015-03-04 Pedro Alves <palves@redhat.com>
7960 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7961 Decide whether a breakpoint triggered based on the SIGTRAP's
7963 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7964 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7965 (linux_low_filter_event): Check for breakpoints before checking
7967 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7969 (linux_stopped_by_sw_breakpoint)
7970 (linux_supports_stopped_by_sw_breakpoint)
7971 (linux_stopped_by_hw_breakpoint)
7972 (linux_supports_stopped_by_hw_breakpoint): New functions.
7973 (linux_target_ops): Install new target methods.
7975 2015-03-04 Pedro Alves <palves@redhat.com>
7977 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7978 * server.c (swbreak_feature, hwbreak_feature): New globals.
7979 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7980 (captured_main): Clear swbreak_feature and hwbreak_feature.
7981 * server.h (swbreak_feature, hwbreak_feature): Declare.
7982 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7983 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7984 supports_stopped_by_hw_breakpoint>: New fields.
7985 (target_supports_stopped_by_sw_breakpoint)
7986 (target_stopped_by_sw_breakpoint)
7987 (target_supports_stopped_by_hw_breakpoint)
7988 (target_stopped_by_hw_breakpoint): Declare.
7990 2015-03-04 Pedro Alves <palves@redhat.com>
7992 enum lwp_stop_reason -> enum target_stop_reason
7993 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7994 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7995 (linux_wait_1, stuck_in_jump_pad_callback)
7996 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7997 (linux_stopped_by_watchpoint):
7998 * linux-low.h (enum lwp_stop_reason): Delete.
7999 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8000 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8002 2015-03-04 Yao Qi <yao.qi@linaro.org>
8004 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8006 2015-03-03 Gary Benson <gbenson@redhat.com>
8008 * hostio.c (handle_vFile): Fix prefix lengths.
8010 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8012 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8015 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8017 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8018 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8019 (clean): Add "rm -f" for above C files.
8020 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8021 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8022 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8023 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8024 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8025 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8026 (init_registers_s390x_vx_linux64)
8027 (init_registers_s390x_tevx_linux64)
8028 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8029 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8031 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8032 (s390_store_vxrs_high): New functions.
8033 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8035 (s390_arch_setup): Add logic for selecting one of the new target
8036 descriptions. Activate the new vector regsets if applicable.
8037 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8038 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8039 and init_registers_s390x_tevx_linux64.
8041 2015-03-01 Pedro Alves <palves@redhat.com>
8043 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8046 2015-02-27 Pedro Alves <palves@redhat.com>
8048 * linux-x86-low.c (u_debugreg_offset): New function.
8049 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8051 2015-02-27 Pedro Alves <palves@redhat.com>
8053 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8054 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8055 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8056 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8057 (ps_lsetfpregs, ps_getpid)
8058 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8059 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8060 (ps_lsetxregs, ps_plog): Declare.
8062 2015-02-27 Pedro Alves <palves@redhat.com>
8064 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8065 IP_AGENT_EXPORT_FUNC.
8066 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8067 IP_AGENT_EXPORT_FUNC.
8068 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8069 (IP_AGENT_EXPORT): Delete.
8070 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8071 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8072 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8073 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8074 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8075 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8076 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8077 (traceframe_read_count, traceframe_write_count)
8078 (traceframes_created, trace_state_variables, get_raw_reg)
8079 (get_trace_state_variable_value, set_trace_state_variable_value)
8080 (ust_loaded, helper_thread_id, cmd_buf): Use
8081 IPA_SYM_EXPORTED_NAME.
8082 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8083 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8084 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8085 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8086 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8087 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8088 EXTERN_C_PUSH/EXTERN_C_POP.
8089 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8090 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8091 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8092 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8093 (traceframe_write_count, traceframe_read_count)
8094 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8095 (about_to_request_buffer_space, get_trace_state_variable_value)
8096 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8097 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8098 EXTERN_C_PUSH/EXTERN_C_POP.
8099 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8100 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8101 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8102 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8103 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8104 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8105 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8106 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8108 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8109 (IP_AGENT_EXPORT_VAR_DECL): Define.
8111 (gdb_agent_get_raw_reg): Declare.
8113 2015-02-27 Tom Tromey <tromey@redhat.com>
8114 Pedro Alves <palves@redhat.com>
8116 Rename symbols whose names are reserved C++ keywords throughout.
8118 2015-02-27 Pedro Alves <palves@redhat.com>
8120 * Makefile.in (COMPILER): New, get it from autoconf.
8121 (CXX): Get from autoconf instead.
8122 (COMPILE.pre): Use COMPILER.
8123 (CC-LD): Rename to ...
8124 (CC_LD): ... this. Use COMPILER.
8125 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8126 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8127 * acinclude.m4: Include build-with-cxx.m4.
8128 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8129 Disable -Werror by default if building in C++ mode.
8130 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8131 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8132 the C++ compiler. Save/restore CXXFLAGS too.
8133 * configure: Regenerate.
8135 2015-02-27 Pedro Alves <palves@redhat.com>
8137 * acinclude.m4: Include libiberty.m4.
8138 * configure.ac: Call libiberty_INIT.
8139 * config.in, configure: Regenerate.
8141 2015-02-26 Pedro Alves <palves@redhat.com>
8143 * linux-low.c (linux_wait_1): When incrementing the PC past a
8144 program breakpoint always use the_low_target.breakpoint_len as
8145 increment, rather than the maximum between that and
8146 the_low_target.decr_pc_after_break.
8148 2015-02-23 Pedro Alves <palves@redhat.com>
8150 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8151 thread was doing a step-over; always adjust the PC if
8152 we stepped over a permanent breakpoint.
8153 (linux_wait_1): If we stepped over breakpoint that was on top of a
8154 permanent breakpoint, manually advance the PC past it.
8156 2015-02-23 Pedro Alves <palves@redhat.com>
8158 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8160 (x86_fill_gregset, x86_store_gregset): Use it when handling
8163 2015-02-20 Pedro Alves <palves@redhat.com>
8165 * thread-db.c: Include "nat/linux-procfs.h".
8166 (thread_db_init): Skip listing new threads if the kernel supports
8167 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8169 2015-02-20 Pedro Alves <palves@redhat.com>
8171 * linux-low.c (status_pending_p_callback): Use ptid_match.
8173 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8175 PR breakpoints/16812
8176 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8177 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8178 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8180 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8182 PR breakpoints/15956
8183 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8185 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8187 * linux-low.c (linux_low_btrace_conf): Print size.
8188 * server.c (handle_btrace_conf_general_set): New.
8189 (hanle_general_set): Call handle_btrace_conf_general_set.
8190 (handle_query): Report Qbtrace-conf:bts:size as supported.
8192 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8194 * linux-low.c (linux_low_enable_btrace): Update parameters.
8195 (linux_low_btrace_conf): New.
8196 (linux_target_ops)<to_btrace_conf>: Initialize.
8197 * server.c (current_btrace_conf): New.
8198 (handle_btrace_enable): Rename to ...
8199 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8200 to target_enable_btrace. Update comment. Update users.
8201 (handle_qxfer_btrace_conf): New.
8202 (qxfer_packets): Add btrace-conf entry.
8203 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8204 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8205 (target_ops)<read_btrace_conf>: New.
8206 (target_enable_btrace): Update parameters.
8207 (target_read_btrace_conf): New.
8209 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8211 * server.c (handle_btrace_general_set): Remove call to
8212 target_supports_btrace.
8213 (supported_btrace_packets): New.
8214 (handle_query): Call supported_btrace_packets.
8215 * target.h: include btrace-common.h.
8216 (btrace_target_info): Removed.
8217 (supports_btrace, target_supports_btrace): Update parameters.
8219 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8221 * Makefile.in (SFILES): Add common/btrace-common.c.
8222 (OBS): Add common/btrace-common.o.
8223 (btrace-common.o): Add build rules.
8224 * linux-low: Include btrace-common.h.
8225 (linux_low_read_btrace): Use struct btrace_data. Call
8226 btrace_data_init and btrace_data_fini.
8228 2015-02-06 Pedro Alves <palves@redhat.com>
8230 * thread-db.c (find_new_threads_callback): Add debug output.
8232 2015-02-04 Pedro Alves <palves@redhat.com>
8234 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8235 (resume_stopped_resumed_lwps): New function.
8236 (linux_wait_for_event_filtered): Use it.
8238 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8240 * Makefile.in (SFILES): Add linux-personality.c.
8241 (linux-personality.o): New rule.
8242 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8243 list of objects to be built.
8244 * linux-low.c: Include nat/linux-personality.h.
8245 (linux_create_inferior): Remove code to disable address space
8246 randomization (moved to ../nat/linux-personality.c). Create
8247 cleanup to disable address space randomization.
8249 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8251 * Makefile.in (posix-strerror.o): New rule.
8252 (mingw-strerror.o): Likewise.
8253 * configure: Regenerated.
8254 * configure.ac: Source file ../common/common.host. Initialize new
8255 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8257 2015-01-14 Yao Qi <yao@codesourcery.com>
8259 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8260 (ppc-linux.o): New rule.
8261 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8262 * configure.ac: AC_CHECK_FUNCS(getauxval).
8263 * config.in: Re-generated.
8264 * configure: Re-generated.
8265 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8266 ppc64_64bit_inferior_p
8268 2015-01-14 Yao Qi <yao@codesourcery.com>
8270 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8271 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8272 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8273 (PT_ORIG_R3, PT_TRAP): Likewise.
8274 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8275 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8276 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8278 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8280 * i387-fp.c (i387_cache_to_xsave): In look over
8281 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8282 zmmh_low_space field by use of zmmh_high_space.
8284 2015-01-09 Pedro Alves <palves@redhat.com>
8286 * linux-low.c (step_over_bkpt): Move higher up in the file.
8287 (handle_extended_wait): Don't store the stop_pc here.
8288 (get_stop_pc): Adjust comments and rename to ...
8289 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8290 stopped for a software breakpoint or hardware breakpoint.
8291 (thread_still_has_status_pending_p): New function.
8292 (status_pending_p_callback): Use
8293 thread_still_has_status_pending_p. If the event is no longer
8294 interesting, resume the LWP.
8295 (handle_tracepoints): Add assert.
8296 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8297 (wstatus_maybe_breakpoint): New function.
8298 (cancel_breakpoint): Delete function.
8299 (check_stopped_by_watchpoint): New function, factored out from
8300 linux_low_filter_event.
8301 (lp_status_maybe_breakpoint): Delete function.
8302 (linux_low_filter_event): Remove filter_ptid argument.
8303 Leave thread group exits pending here. Store the LWP's stop PC.
8304 Always leave events pending.
8305 (linux_wait_for_event_filtered): Pull all events out of the
8306 kernel, and leave them all pending.
8307 (count_events_callback, select_event_lwp_callback): Consider all
8309 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8310 (select_event_lwp): Only give preference to the stepping LWP in
8311 all-stop mode. Adjust comments.
8312 (ignore_event): New function.
8313 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8314 references to cancel_breakpoints. Adjust to renames. Also give
8315 equal priority to all LWPs that have had events in non-stop mode.
8316 If reporting a software breakpoint event, unadjust the LWP's PC.
8317 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8318 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8320 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8321 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8322 (linux_stopped_by_watchpoint): Adjust.
8323 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8324 * linux-low.h (enum lwp_stop_reason): New.
8325 (struct lwp_info) <stop_pc>: Adjust comment.
8326 <stopped_by_watchpoint>: Delete field.
8327 <stop_reason>: New field.
8328 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8329 * mem-break.c (software_breakpoint_inserted_here)
8330 (hardware_breakpoint_inserted_here): New function.
8331 * mem-break.h (software_breakpoint_inserted_here)
8332 (hardware_breakpoint_inserted_here): Declare.
8333 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8334 (cancel_breakpoints): Delete.
8335 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8336 (upload_fast_traceframes): Remove references to
8339 2015-01-09 Pedro Alves <palves@redhat.com>
8341 * thread-db.c (find_new_threads_callback): Ignore thread if the
8342 kernel thread ID is -1.
8344 2015-01-09 Pedro Alves <palves@redhat.com>
8346 * linux-low.c (linux_attach_fail_reason_string): Move to
8347 nat/linux-ptrace.c, and rename.
8348 (linux_attach_lwp): Update comment.
8349 (attach_proc_task_lwp_callback): New function.
8350 (linux_attach): Adjust to rename and use
8351 linux_proc_attach_tgid_threads.
8352 (linux_attach_fail_reason_string): Delete declaration.
8354 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8356 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8357 * server.c (gdbserver_version): Likewise.
8359 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8361 * remote-utils.c: Include ctype.h.
8362 (input_interrupt): Explicitly handle the case when the char
8363 received is the NUL byte. Improve the printing of non-ASCII
8366 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8368 * linux-low.c (linux_low_filter_event): Update call to
8369 linux_enable_event_reporting following the addition of
8370 a new parameter to that function.
8372 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8375 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8376 (AARCH64_FPCR_REGNO): Likewise.
8377 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8378 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8379 (aarch64_store_fpregset): Likewise.
8381 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8383 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8384 Remove FIXME comment about assumption about N.
8386 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8388 * configure.ac: If large-file support is disabled in GDBserver,
8389 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8390 * configure: Regenerate.
8392 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8394 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8395 warning upon ENODATA from ptrace.
8396 * linux-s390-low.c (s390_store_tdb): New.
8397 (s390_regsets): Add regset for NT_S390_TDB.
8399 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8401 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8402 without a fill_function.
8403 * linux-s390-low.c (s390_fill_last_break): Remove.
8404 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8405 (s390_arch_setup): Use regset's size instead of fill_function for
8408 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8410 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8411 the regset's store function when ptrace returned an error.
8412 * regcache.c (get_thread_regcache): Invalidate register cache
8413 before fetching inferior's registers.
8415 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8417 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8418 while-loop as for-loop.
8419 (regsets_store_inferior_registers): Likewise.
8421 2014-11-28 Yao Qi <yao@codesourcery.com>
8423 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8424 * config.in, configure: Re-generate.
8425 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8428 2014-11-21 Yao Qi <yao@codesourcery.com>
8430 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8431 (AC_CHECK_HEADERS): Remove malloc.h.
8432 * configure: Re-generated.
8433 * config.in: Re-generated.
8434 * server.h: Don't include alloca.h and malloc.h.
8435 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8436 Don't include malloc.h.
8438 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8440 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8441 corresponding ERRNO check in same block.
8443 2014-11-12 Pedro Alves <palves@redhat.com>
8445 * server.c (cont_thread): Update comment.
8446 (start_inferior, attach_inferior): No longer clear cont_thread.
8447 (handle_v_cont): No longer set cont_thread.
8448 (captured_main): Clear cont_thread each time a GDB connects.
8450 2014-11-12 Pedro Alves <palves@redhat.com>
8452 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8453 thread, and don't resume all threads if the Hc thread has exited.
8455 2014-11-12 Pedro Alves <palves@redhat.com>
8457 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8458 the process group instead of to a specific LWP.
8460 2014-10-15 Pedro Alves <palves@redhat.com>
8463 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8465 (arm_set_thread_context): Delete.
8466 (the_low_target): Adjust.
8467 * win32-i386-low.c (debug_registers_changed)
8468 (debug_registers_used): Delete.
8469 (update_debug_registers_callback): New function.
8470 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8471 needing to update their debug registers.
8472 (win32_get_current_dr): New function.
8473 (x86_dr_low_get_addr, x86_dr_low_get_control)
8474 (x86_dr_low_get_status): Fetch the debug register from the thread
8476 (i386_initial_stuff): Adjust.
8477 (i386_get_thread_context): Remove current_event parameter. Don't
8478 clear debug_registers_changed nor copy DR values to
8480 (i386_set_thread_context): Delete.
8481 (i386_prepare_to_resume): New function.
8482 (i386_thread_added): Mark the thread as needing to update irs
8484 (the_low_target): Remove i386_set_thread_context and install
8485 i386_prepare_to_resume.
8486 * win32-low.c (win32_get_thread_context): Adjust.
8487 (win32_set_thread_context): Use SetThreadContext
8489 (win32_prepare_to_resume): New function.
8490 (win32_require_context): New function, factored out from ...
8491 (thread_rec): ... this.
8492 (continue_one_thread): Call win32_prepare_to_resume on each thread
8493 we're about to continue.
8494 (win32_resume): Call win32_prepare_to_resume on the event thread.
8495 * win32-low.h (struct win32_thread_info)
8496 <debug_registers_changed>: New field.
8497 (struct win32_target_ops): Change prototype of set_thread_context,
8498 delete set_thread_context and add prepare_to_resume.
8499 (win32_require_context): New declaration.
8501 2014-10-08 Gary Benson <gbenson@redhat.com>
8503 * server.h: Do not include common-exceptions.h.
8505 2014-10-08 Gary Benson <gbenson@redhat.com>
8507 * server.h: Do not include cleanups.h.
8509 2014-09-30 James Hogan <james.hogan@imgtec.com>
8511 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8514 2014-09-23 Yao Qi <yao@codesourcery.com>
8516 * linux-low.c (lp_status_maybe_breakpoint): New function.
8517 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8518 (count_events_callback): Likewise.
8519 (select_event_lwp_callback): Likewise.
8520 (cancel_breakpoints_callback): Likewise.
8522 2014-09-19 Don Breazeal <donb@codesourcery.com>
8524 * linux-low.c (handle_extended_wait): Call
8525 linux_ptrace_get_extended_event.
8526 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8527 linux_is_extended_waitstatus.
8529 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8531 * Makefile.in (CPPFLAGS): Define.
8532 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8533 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8535 2014-09-16 Gary Benson <gbenson@redhat.com>
8537 * inferiors.h (current_inferior): Renamed as...
8538 (current_thread): New variable. All uses updated.
8539 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8540 (maybe_move_out_of_jump_pad): Likewise.
8541 (cancel_breakpoint): Likewise.
8542 (linux_low_filter_event): Likewise.
8543 (wait_for_sigstop): Likewise.
8544 (linux_resume_one_lwp): Likewise.
8545 (need_step_over_p): Likewise.
8546 (start_step_over): Likewise.
8547 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8548 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8549 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8550 and save_inferior as saved_thread.
8551 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8553 (regcache_invalidate_thread): Likewise.
8554 * remote-utils.c (prepare_resume_reply): Likewise.
8555 * thread-db.c (thread_db_get_tls_address): Likewise.
8556 (disable_thread_event_reporting): Likewise.
8557 (remove_thread_event_breakpoints): Likewise.
8558 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8560 * target.h (set_desired_inferior): Renamed as...
8561 (set_desired_thread): New declaration. All uses updated.
8562 * server.c (myresume): Updated comment to reference thread instead
8564 (handle_serial_event): Likewise.
8565 (handle_target_event): Likewise.
8567 2014-09-12 Tom Tromey <tromey@redhat.com>
8568 Gary Benson <gbenson@redhat.com>
8570 * regcache.h: Include common-regcache.h.
8571 (regcache_read_pc): Don't declare.
8572 * regcache.c (get_thread_regcache_for_ptid): New function.
8574 2014-09-11 Tom Tromey <tromey@redhat.com>
8575 Gary Benson <gbenson@redhat.com>
8577 * symbol.c: New file.
8578 * Makefile.in (SFILES): Add symbol.c.
8579 (OBS): Add symbol.o.
8581 2014-09-11 Gary Benson <gbenson@redhat.com>
8583 * target.c (target_stop_ptid, target_continue_ptid): New
8586 2014-09-11 Tom Tromey <tromey@redhat.com>
8587 Gary Benson <gbenson@redhat.com>
8589 * target.h: Include target/target.h.
8590 * target.c (target_read_memory, target_read_uint32)
8591 (target_write_memory): New functions.
8593 2014-09-11 Gary Benson <gbenson@redhat.com>
8595 * server.h (debug_hw_points): Don't declare.
8596 * server.c (debug_hw_points): Don't define. Replace all uses
8597 with show_debug_regs.
8598 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8599 all uses with show_debug_regs.
8601 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8603 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8604 endianness into account.
8605 (ppc_supply_ptrace_register): Likewise.
8607 2014-09-03 James Hogan <james.hogan@imgtec.com>
8609 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8610 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8612 2014-09-03 Gary Benson <gbenson@redhat.com>
8614 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8615 ALL_DEBUG_ADDRESS_REGISTERS.
8617 2014-09-02 Gary Benson <gbenson@redhat.com>
8619 * i386-low.h: Renamed as...
8620 * x86-low.h: New file. All type, function and variable name
8621 prefixes changed from "i386_" to "x86_". All references updated.
8622 * i386-low.c: Renamed as...
8623 * x86-low.c: New file. All type, function and variable name
8624 prefixes changed from "i386_" to "x86_". All references updated.
8626 2014-09-02 Gary Benson <gbenson@redhat.com>
8628 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8629 (x86_linux_new_thread): Likewise.
8631 2014-08-29 Gary Benson <gbenson@redhat.com>
8633 * server.h (setjmp.h): Do not include.
8634 (toplevel): Do not declare.
8635 (common-exceptions.h): Include.
8636 (cleanups.h): Likewise.
8637 * server.c (toplevel): Do not define.
8638 (exit_code): New static global.
8639 (detach_or_kill_for_exit_cleanup): New function.
8640 (main): New function. Original main renamed to...
8641 (captured_main): New function.
8642 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8644 2014-08-29 Gary Benson <gbenson@redhat.com>
8646 * Makefile.in (SFILES): Add common/common-exceptions.c.
8647 (OBS): Add common-exceptions.o.
8648 (common-exceptions.o): New rule.
8649 * utils.c (prepare_to_throw_exception): New function.
8651 2014-08-29 Gary Benson <gbenson@redhat.com>
8653 * config.in: Regenerate.
8654 * configure: Likewise.
8656 2014-08-29 Gary Benson <gbenson@redhat.com>
8658 * Makefile.in (SFILES): Add common/cleanups.c.
8660 (cleanups.o): New rule.
8662 2014-08-29 Gary Benson <gbenson@redhat.com>
8664 * utils.c (internal_vwarning): New function.
8666 2014-08-28 Gary Benson <gbenson@redhat.com>
8668 * utils.h (fatal): Remove declaration.
8669 * utils.c (fatal): Remove function.
8671 2014-08-28 Gary Benson <gbenson@redhat.com>
8673 * tracepoint.c (gdb_agent_init): Replace fatal with
8675 (initialize_tracepoint): Likewise.
8677 2014-08-28 Gary Benson <gbenson@redhat.com>
8679 * remote-utils.c (remote_prepare): Replace fatal with error.
8681 2014-08-28 Gary Benson <gbenson@redhat.com>
8683 * linux-low.c (linux_async): Replace fatal with warning.
8685 (linux_start_non_stop): Return -1 if linux_async failed.
8687 2014-08-28 Gary Benson <gbenson@redhat.com>
8689 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8691 (i386_dr_low_get_addr): Remove vague comment.
8692 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8695 2014-08-28 Gary Benson <gbenson@redhat.com>
8697 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8698 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8700 (linux_resume_one_lwp): Likewise.
8701 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8703 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8704 with internal_error.
8705 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8706 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8707 (find_register_by_name): Replace fatal with internal_error.
8708 (find_regno): Likewise.
8709 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8710 * thread-db.c (thread_db_create_event): Likewise.
8711 (thread_db_load_search): Likewise.
8712 (try_thread_db_load_1): Likewise.
8713 * tracepoint.c (get_jump_space_head): Replace fatal with
8715 (claim_trampoline_space): Likewise.
8716 (have_fast_tracepoint_trampoline_buffer): Likewise.
8717 (cmd_qtstart): Likewise.
8718 (stop_tracing): Likewise.
8719 (fast_tracepoint_collecting): Likewise.
8720 (target_malloc): Likewise.
8721 (download_tracepoint): Likewise.
8722 (download_trace_state_variables): Replace check with gdb_assert.
8723 (upload_fast_traceframes): Replace fatal with internal_error.
8725 2014-08-19 Tom Tromey <tromey@redhat.com>
8726 Gary Benson <gbenson@redhat.com>
8728 * Makefile.in (SFILES): Add common/common-debug.c.
8729 (OBS): Add common-debug.o.
8730 (common-debug.o): New rule.
8731 * debug.h (debug_printf): Don't declare.
8732 * debug.c (debug_printf): Renamed and rewritten as...
8733 (debug_vprintf): New function.
8735 2014-08-19 Gary Benson <gbenson@redhat.com>
8737 * utils.h: Do not include print-utils.h.
8739 2014-08-19 Tom Tromey <tromey@redhat.com>
8740 Gary Benson <gbenson@redhat.com>
8742 * server.h: Add static assertion.
8743 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8745 2014-08-19 Tom Tromey <tromey@redhat.com>
8746 Gary Benson <gbenson@redhat.com>
8748 * Makefile.in (SFILES): Add common/errors.c.
8749 (OBS): Add errors.o.
8750 (IPA_OBS): Add errors-ipa.o.
8751 (errors.o): New rule.
8752 (errors-ipa.o): Likewise.
8753 * utils.h (perror_with_name, error, warning): Don't declare.
8754 * utils.c (warning): Renamed and rewritten as...
8755 (vwarning): New function.
8756 (error): Renamed and rewritten as...
8757 (verror): New function.
8758 (internal_error): Renamed and rewritten as...
8759 (internal_verror): New function.
8761 2014-08-07 Gary Benson <gbenson@redhat.com>
8763 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8764 * configure: Regenerate.
8765 * config.in: Likewise.
8766 * server.h: Do not include errno.h.
8767 * event-loop.c: Likewise.
8768 * hostio-errno.c: Likewise.
8769 * linux-low.c: Likewise.
8770 * remote-utils.c: Likewise.
8771 * spu-low.c: Likewise.
8772 * utils.c: Likewise.
8773 * gdbreplay.c: Unconditionally include errno.h.
8775 2014-08-07 Gary Benson <gbenson@redhat.com>
8777 * server.h: Do not include string.h.
8778 * event-loop.c: Likewise.
8779 * linux-low.c: Likewise.
8780 * regcache.c: Likewise.
8781 * remote-utils.c: Likewise.
8782 * spu-low.c: Likewise.
8783 * utils.c: Likewise.
8785 2014-08-07 Gary Benson <gbenson@redhat.com>
8787 * server.h: Do not include gdb_assert.h.
8789 2014-08-07 Gary Benson <gbenson@redhat.com>
8791 * server.h: Do not include common-utils.h.
8793 2014-08-07 Gary Benson <gbenson@redhat.com>
8795 * server.h: Do not include ptid.h.
8796 * notif.h: Likewise.
8798 2014-08-07 Gary Benson <gbenson@redhat.com>
8800 * server.h: Do not include gdb_locale.h.
8802 2014-08-07 Gary Benson <gbenson@redhat.com>
8804 * server.h: Do not include gdb/signals.h.
8805 * win32-low.c: Likewise.
8807 2014-08-07 Gary Benson <gbenson@redhat.com>
8809 * server.h: Do not include pathmax.h.
8811 2014-08-07 Gary Benson <gbenson@redhat.com>
8813 * server.h: Do not include libiberty.h.
8814 * linux-bfin-low.c: Likewise.
8816 2014-08-07 Gary Benson <gbenson@redhat.com>
8818 * server.h: Do not include ansidecl.h.
8820 2014-08-07 Gary Benson <gbenson@redhat.com>
8822 * linux-x86-low.c: Do not include stddef.h.
8823 * lynx-ppc-low.c: Likewise.
8824 * tracepoint.c: Likewise.
8826 2014-08-07 Gary Benson <gbenson@redhat.com>
8828 * server.h: Do not include stdarg.h.
8829 * nto-low.c: Likewise.
8831 2014-08-07 Gary Benson <gbenson@redhat.com>
8833 * server.h: Do not include stdlib.h.
8834 * inferiors.c: Likewise.
8835 * linux-low.c: Likewise.
8836 * regcache.c: Likewise.
8837 * spu-low.c: Likewise.
8838 * tracepoint.c: Likewise.
8839 * utils.c: Likewise.
8841 2014-08-07 Gary Benson <gbenson@redhat.com>
8843 * server.h: Do not include stdio.h.
8844 * linux-low.c: Likewise.
8845 * remote-utils.c: Likewise.
8846 * spu-low.c: Likewise.
8847 * utils.c: Likewise.
8848 * wincecompat.c: Likewise.
8850 2014-08-06 Gary Benson <gbenson@redhat.com>
8852 * regcache.c (init_register_cache): Move conditionals inside if.
8854 2014-08-06 Gary Benson <gbenson@redhat.com>
8856 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8858 2014-07-31 Gary Benson <gbenson@redhat.com>
8860 * ax.h: Do not include server.h.
8861 * gdbthread.h: Likewise.
8862 * lynx-low.h: Likewise.
8863 * notif.h: Likewise.
8865 2014-07-30 Gary Benson <gbenson@redhat.com>
8867 * server.h: Include common-defs.h.
8868 Do not include config.h or build-gnulib-gdbserver/config.h.
8870 2014-07-30 Gary Benson <gbenson@redhat.com>
8872 * hostio-errno.c: Move server.h to top of includes list.
8873 * inferiors.c: Likewise.
8874 * linux-x86-low.c: Likewise.
8875 * notif.c: Include server.h.
8877 2014-07-24 Tom Tromey <tromey@redhat.com>
8878 Gary Benson <gbenson@redhat.com>
8880 * server.h (CORE_ADDR): Now unsigned.
8882 2014-07-16 Pedro Alves <palves@redhat.com>
8884 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8886 2014-07-15 Pedro Alves <palves@redhat.com>
8888 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8891 2014-07-11 Pedro Alves <palves@redhat.com>
8893 * linux-low.c (kill_wait_lwp): New function, based on
8894 kill_one_lwp_callback, but use my_waitpid directly.
8895 (kill_one_lwp_callback, linux_kill): Use it.
8897 2014-06-23 Pedro Alves <palves@redhat.com>
8899 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8900 before setting DR0..DR3.
8902 2014-06-20 Gary Benson <gbenson@redhat.com>
8904 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8905 * configure: Regenerated.
8906 * config.in: Likewise.
8908 2014-06-20 Gary Benson <gbenson@redhat.com>
8910 * Makefile.in (SFILES): Update locations for files moved
8912 (object file files): Reordered.
8914 2014-06-20 Gary Benson <gbenson@redhat.com>
8916 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8917 (i386_dr_low_set_addr): Likewise.
8918 (i386_dr_low_get_addr): Likewise.
8919 (i386_dr_low_can_set_control): Likewise.
8920 (i386_dr_low_set_control): Likewise.
8921 (i386_dr_low_get_control): Likewise.
8922 (i386_dr_low_get_status): Likewise.
8923 (i386_get_debug_register_length): Likewise.
8924 * linux-x86-low.c (i386_dr_low_set_addr):
8925 Changed signature. Made static.
8926 (i386_dr_low_get_addr): Likewise.
8927 (i386_dr_low_set_control): Likewise.
8928 (i386_dr_low_get_control): Likewise.
8929 (i386_dr_low_get_status): Likewise.
8930 (i386_dr_low): New global variable.
8931 * win32-i386-low.c (i386_dr_low_set_addr):
8932 Changed signature. Made static.
8933 (i386_dr_low_get_addr): Likewise.
8934 (i386_dr_low_set_control): Likewise.
8935 (i386_dr_low_get_control): Likewise.
8936 (i386_dr_low_get_status): Likewise.
8937 (i386_dr_low): New global variable.
8939 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8941 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8942 * Makefile.in (AR, AR_FLAGS): Define.
8943 * configure: Regenerate.
8945 2014-06-19 Gary Benson <gbenson@redhat.com>
8947 * Makefile.in (i386-dregs.o): New rule.
8948 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8949 * i386-low.c (target.h): Remove include.
8950 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8951 (DR_CONTROL_SHIFT): Likewise.
8952 (DR_CONTROL_SIZE): Likewise.
8953 (DR_RW_EXECUTE): Likewise.
8954 (DR_RW_WRITE): Likewise.
8955 (DR_RW_READ): Likewise.
8956 (DR_RW_IORW): Likewise.
8957 (DR_LEN_1): Likewise.
8958 (DR_LEN_2): Likewise.
8959 (DR_LEN_4): Likewise.
8960 (DR_LEN_8): Likewise.
8961 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8962 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8963 (DR_ENABLE_SIZE): Likewise.
8964 (DR_LOCAL_SLOWDOWN): Likewise.
8965 (DR_GLOBAL_SLOWDOWN): Likewise.
8966 (DR_CONTROL_RESERVED): Likewise.
8967 (I386_DR_CONTROL_MASK): Likewise.
8968 (I386_DR_VACANT): Likewise.
8969 (I386_DR_LOCAL_ENABLE): Likewise.
8970 (I386_DR_GLOBAL_ENABLE): Likewise.
8971 (I386_DR_DISABLE): Likewise.
8972 (I386_DR_SET_RW_LEN): Likewise.
8973 (I386_DR_GET_RW_LEN): Likewise.
8974 (I386_DR_WATCH_HIT): Likewise.
8975 (i386_wp_op_t): Likewise.
8976 (i386_show_dr): Likewise.
8977 (i386_length_and_rw_bits): Likewise.
8978 (i386_insert_aligned_watchpoint): Likewise.
8979 (i386_remove_aligned_watchpoint): Likewise.
8980 (i386_handle_nonaligned_watchpoint): Likewise.
8981 i386_update_inferior_debug_regs(): Likewise.
8982 (i386_dr_insert_watchpoint): Likewise.
8983 (i386_dr_remove_watchpoint): Likewise.
8984 (i386_dr_region_ok_for_watchpoint): Likewise.
8985 (i386_dr_stopped_data_address): Likewise.
8986 (i386_dr_stopped_by_watchpoint): Likewise.
8988 2014-06-19 Gary Benson <gbenson@redhat.com>
8990 * i386-low.c (i386_dr_show): Renamed to
8991 i386_show_dr and made static. All uses updated.
8992 (i386_dr_length_and_rw_bits): Renamed to
8993 i386_length_and_rw_bits and made static.
8995 (i386_dr_insert_aligned_watchpoint): Renamed to
8996 i386_insert_aligned_watchpoint and made static.
8998 (i386_dr_remove_aligned_watchpoint): Renamed to
8999 i386_remove_aligned_watchpoint and made static.
9001 (i386_dr_update_inferior_debug_regs): Renamed to
9002 i386_update_inferior_debug_regs and made static.
9005 2014-06-18 Gary Benson <gbenson@redhat.com>
9007 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9008 (i386_dr_low_can_set_control): Likewise.
9009 (i386_get_debug_register_length): Likewise.
9010 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9011 (i386_dr_low_can_set_control): Likewise.
9012 (i386_get_debug_register_length): Likewise.
9014 2014-06-17 Gary Benson <gbenson@redhat.com>
9016 * i386-low.h (i386-dregs.h): New include.
9017 (DR_FIRSTADDR): Now in i386-dregs.h.
9018 (DR_LASTADDR): Likewise.
9019 (DR_NADDR): Likewise.
9020 (DR_STATUS): Likewise.
9021 (DR_CONTROL): Likewise.
9022 (i386_debug_reg_state): Likewise.
9023 (i386_dr_insert_watchpoint): Likewise.
9024 (i386_dr_remove_watchpoint): Likewise.
9025 (i386_dr_region_ok_for_watchpoint): Likewise.
9026 (i386_dr_stopped_data_address): Likewise.
9027 (i386_dr_stopped_by_watchpoint): Likewise.
9028 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9030 2014-06-18 Gary Benson <gbenson@redhat.com>
9032 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9033 i386_dr_insert_watchpoint.
9034 (i386_low_remove_watchpoint): Renamed to
9035 i386_dr_remove_watchpoint.
9036 (i386_low_region_ok_for_watchpoint): Renamed to
9037 i386_dr_region_ok_for_watchpoint.
9038 (i386_low_stopped_data_address): Renamed to
9039 i386_dr_stopped_data_address.
9040 (i386_low_stopped_by_watchpoint): Renamed to
9041 i386_dr_stopped_by_watchpoint.
9042 * i386-low.c (i386_show_dr): Renamed to
9043 i386_dr_show and made nonstatic. All uses updated.
9044 (i386_length_and_rw_bits): Renamed to
9045 i386_dr_length_and_rw_bits and made nonstatic.
9047 (i386_insert_aligned_watchpoint): Renamed to
9048 i386_dr_insert_aligned_watchpoint and made nonstatic.
9050 (i386_remove_aligned_watchpoint): Renamed to
9051 i386_dr_remove_aligned_watchpoint and made nonstatic.
9053 (i386_update_inferior_debug_regs): Renamed to
9054 i386_dr_update_inferior_debug_regs and made nonstatic.
9056 (i386_low_insert_watchpoint): Renamed to
9057 i386_dr_insert_watchpoint. All uses updated.
9058 (i386_low_remove_watchpoint): Renamed to
9059 i386_dr_remove_watchpoint. All uses updated.
9060 (i386_low_region_ok_for_watchpoint): Renamed to
9061 i386_dr_region_ok_for_watchpoint. All uses updated.
9062 (i386_low_stopped_data_address): Renamed to
9063 i386_dr_stopped_data_address. All uses updated.
9064 (i386_low_stopped_by_watchpoint): Renamed to
9065 i386_dr_stopped_by_watchpoint. All uses updated.
9067 2014-06-18 Gary Benson <gbenson@redhat.com>
9069 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9070 (i386_dr_low_can_set_control): Likewise.
9071 (i386_insert_aligned_watchpoint): New check.
9073 2014-06-18 Gary Benson <gbenson@redhat.com>
9075 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9078 2014-06-18 Gary Benson <gbenson@redhat.com>
9080 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9081 instead of fatal and error.
9082 (i386_handle_nonaligned_watchpoint): Likewise.
9084 2014-06-18 Gary Benson <gbenson@redhat.com>
9086 * i386-low.c (i386_get_debug_register_length): New macro.
9087 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9088 (i386_show_dr): Use debug_printf instead of fprintf. Use
9089 phex to format values.
9091 2014-06-18 Gary Benson <gbenson@redhat.com>
9093 * i386-low.h: Comment changes.
9094 * i386-low.c: Likewise.
9096 2014-06-18 Gary Benson <gbenson@redhat.com>
9098 * i386-low.c: Whitespace changes.
9100 2014-06-12 Tom Tromey <tromey@redhat.com>
9102 * utils.c (freeargv): Remove.
9104 2014-06-12 Tom Tromey <tromey@redhat.com>
9106 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9107 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9108 (parse_debug_format_options): Likewise.
9109 (gdbserver_usage): Likewise.
9110 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9111 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9112 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9114 ($(LIBGNU)): Depend on libiberty.
9115 (all-lib): Recurse into all subdirs.
9116 (install-only): Invoke "install" target in subdirs.
9117 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9119 * configure: Rebuild.
9120 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9121 for vasprintf, vsnprintf, or gettimeofday.
9122 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9125 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9127 * development.sh: Delete.
9128 * Makefile.in (config.status): Adjust dependency on development.sh.
9129 * configure.ac: Adjust development.sh source call.
9130 * configure: Regenerate.
9132 2014-06-02 Pedro Alves <palves@redhat.com>
9134 * ax.c (gdb_free_agent_expr): New function.
9135 * ax.h (gdb_free_agent_expr): New declaration.
9136 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9138 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9140 (clear_breakpoint_conditions_and_commands): New function.
9141 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9142 (clear_breakpoint_conditions_and_commands): New declaration.
9144 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9146 * linux-aarch64-low.c (asm/ptrace.h): Include.
9148 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9150 Fix TLS access for -static -pthread.
9151 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9152 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9153 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9155 2014-05-20 Pedro Alves <palves@redhat.com>
9157 * linux-aarch64-low.c (aarch64_insert_point)
9158 (aarch64_remove_point): No longer check whether the type is
9159 supported here. Adjust to new interface.
9160 (the_low_target): Install aarch64_supports_z_point_type as
9161 supports_z_point_type method.
9162 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9163 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9164 instead of a Z packet char. Adjust.
9165 (arm_supports_z_point_type): New function.
9166 (arm_insert_point, arm_remove_point): Adjust to new interface.
9167 (the_low_target): Install arm_supports_z_point_type.
9168 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9169 (cris_insert_point, cris_remove_point): Adjust to new interface.
9170 Don't check whether the type is supported here.
9171 (the_low_target): Install cris_supports_z_point_type.
9172 * linux-low.c (linux_supports_z_point_type): New function.
9173 (linux_insert_point, linux_remove_point): Adjust to new interface.
9174 * linux-low.h (struct linux_target_ops) <insert_point,
9175 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9176 raw_breakpoint pointer parameter.
9177 <supports_z_point_type>: New method.
9178 * linux-mips-low.c (mips_supports_z_point_type): New function.
9179 (mips_insert_point, mips_remove_point): Adjust to new interface.
9180 Use mips_supports_z_point_type.
9181 (the_low_target): Install mips_supports_z_point_type.
9182 * linux-ppc-low.c (the_low_target): Install NULL as
9183 supports_z_point_type method.
9184 * linux-s390-low.c (the_low_target): Install NULL as
9185 supports_z_point_type method.
9186 * linux-sparc-low.c (the_low_target): Install NULL as
9187 supports_z_point_type method.
9188 * linux-x86-low.c (x86_supports_z_point_type): New function.
9189 (x86_insert_point): Adjust to new insert_point interface. Use
9190 insert_memory_breakpoint. Adjust to new
9191 i386_low_insert_watchpoint interface.
9192 (x86_remove_point): Adjust to remove_point interface. Use
9193 remove_memory_breakpoint. Adjust to new
9194 i386_low_remove_watchpoint interface.
9195 (the_low_target): Install x86_supports_z_point_type.
9196 * lynx-low.c (lynx_target_ops): Install NULL as
9197 supports_z_point_type callback.
9198 * nto-low.c (nto_supports_z_point_type): New.
9199 (nto_insert_point, nto_remove_point): Adjust to new interface.
9200 (nto_target_ops): Install nto_supports_z_point_type.
9201 * mem-break.c: Adjust intro comment.
9202 (struct raw_breakpoint) <raw_type, size>: New fields.
9203 <inserted>: Update comment.
9204 <shlib_disabled>: Delete field.
9205 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9206 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9207 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9208 (raw_bkpt_type_to_target_hw_bp_type): New function.
9209 (find_enabled_raw_code_breakpoint_at): New function.
9210 (find_raw_breakpoint_at): New type and size parameters. Use them.
9211 (insert_memory_breakpoint): New function, based off
9212 set_raw_breakpoint_at.
9213 (remove_memory_breakpoint): New function.
9214 (set_raw_breakpoint_at): Reimplement.
9215 (set_breakpoint): New, based on set_breakpoint_at.
9216 (set_breakpoint_at): Reimplement.
9217 (delete_raw_breakpoint): Go through the_target->remove_point
9218 instead of assuming memory breakpoints.
9219 (find_gdb_breakpoint_at): Delete.
9220 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9221 (find_gdb_breakpoint): New function.
9222 (set_gdb_breakpoint_at): Delete.
9223 (z_type_supported): New function.
9224 (set_gdb_breakpoint_1): New function, loosely based off
9225 set_gdb_breakpoint_at.
9226 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9227 (delete_gdb_breakpoint_at): Delete.
9228 (delete_gdb_breakpoint_1): New function, loosely based off
9229 delete_gdb_breakpoint_at.
9230 (delete_gdb_breakpoint): New function.
9231 (clear_gdb_breakpoint_conditions): Rename to ...
9232 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9234 (add_condition_to_breakpoint): Make static.
9235 (add_breakpoint_condition): Take a struct breakpoint pointer
9236 instead of an address. Adjust.
9237 (gdb_condition_true_at_breakpoint): Rename to ...
9238 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9240 (gdb_condition_true_at_breakpoint): Reimplement.
9241 (add_breakpoint_commands): Take a struct breakpoint pointer
9242 instead of an address. Adjust.
9243 (gdb_no_commands_at_breakpoint): Rename to ...
9244 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9245 parameter. Return true if no breakpoint was found. Change debug
9247 (gdb_no_commands_at_breakpoint): Reimplement.
9248 (run_breakpoint_commands): Rename to ...
9249 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9250 and change return type to boolean.
9251 (run_breakpoint_commands): New function.
9252 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9253 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9254 breakpoint. Go through the_target->remove_point instead of
9255 assuming memory breakpoint.
9256 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9257 software and hardware breakpoints.
9258 (reinsert_raw_breakpoint): Go through the_target->insert_point
9259 instead of assuming memory breakpoint.
9260 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9261 software and hardware breakpoints.
9262 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9263 Check both software and hardware breakpoints.
9264 (validate_inserted_breakpoint): Assert the breakpoint is a
9265 software breakpoint. Set the inserted flag to -1 instead of
9266 setting shlib_disabled.
9267 (delete_disabled_breakpoints): Adjust.
9268 (validate_breakpoints): Only validate software breakpoints.
9269 Adjust to inserted flag change.
9270 (check_mem_read, check_mem_write): Skip breakpoint types other
9271 than software breakpoints. Adjust to inserted flag change.
9272 * mem-break.h (enum raw_bkpt_type): New enum.
9273 (raw_breakpoint, struct process_info): Forward declare.
9274 (Z_packet_to_target_hw_bp_type): Delete declaration.
9275 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9276 (set_gdb_breakpoint, delete_gdb_breakpoint)
9277 (clear_breakpoint_conditions): New declarations.
9278 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9279 (breakpoint_inserted_here): Update comment.
9280 (add_breakpoint_condition, add_breakpoint_commands): Replace
9281 address parameter with a breakpoint pointer parameter.
9282 (gdb_breakpoint_here): Update comment.
9283 (delete_gdb_breakpoint_at): Delete.
9284 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9285 * server.c (process_point_options): Take a struct breakpoint
9286 pointer instead of an address. Adjust.
9287 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9288 delete_gdb_breakpoint.
9289 * spu-low.c (spu_target_ops): Install NULL as
9290 supports_z_point_type method.
9291 * target.h: Include mem-break.h.
9292 (struct target_ops) <prepare_to_access_memory>: Update comment.
9293 <supports_z_point_type>: New field.
9294 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9295 instead of a char. Also take a raw breakpoint pointer.
9296 * win32-arm-low.c (the_low_target): Install NULL as
9297 supports_z_point_type.
9298 * win32-i386-low.c (i386_supports_z_point_type): New function.
9299 (i386_insert_point, i386_remove_point): Adjust to new interface.
9300 (the_low_target): Install i386_supports_z_point_type.
9301 * win32-low.c (win32_supports_z_point_type): New function.
9302 (win32_insert_point, win32_remove_point): Adjust to new interface.
9303 (win32_target_ops): Install win32_supports_z_point_type.
9304 * win32-low.h (struct win32_target_ops):
9305 <supports_z_point_type>: New method.
9306 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9307 instead of a char. Also take a raw breakpoint pointer.
9309 2014-05-20 Pedro Alves <palves@redhat.com>
9311 * mem-break.h: Include break-common.h.
9312 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9313 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9314 (Z_packet_to_target_hw_bp_type): New declaration.
9315 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9316 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9317 (Z_PACKET_ACCESS_WP): Delete macros.
9318 (Z_packet_to_hw_type): Delete function.
9319 * i386-low.h: Don't include break-common.h here.
9320 (Z_packet_to_hw_type): Delete declaration.
9321 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9322 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9323 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9324 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9325 * linux-aarch64-low.c: Don't include break-common.h here.
9326 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9327 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9328 (Z_packet_to_target_hw_bp_type): Delete function.
9329 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9331 (mips_insert_point, mips_remove_point): Use
9332 Z_packet_to_target_hw_bp_type.
9334 2014-05-20 Pedro Alves <palves@redhat.com>
9336 * linux-aarch64-low.c: Include break-common.h.
9337 (enum target_point_type): Delete.
9338 (Z_packet_to_point_type): Rename to ...
9339 (Z_packet_to_target_hw_bp_type): ... this, and return a
9340 target_hw_bp_type instead.
9341 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9342 instead of an enum target_point_type.
9343 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9345 (aarch64_dr_state_insert_one_point)
9346 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9347 (aarch64_handle_aligned_watchpoint)
9348 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9349 Take an enum target_hw_bp_type instead of an enum
9351 (aarch64_supports_z_point_type): New function.
9352 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9353 use Z_packet_to_target_hw_bp_type.
9355 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9357 * configure.ac: Only use -Werror by default when DEVELOPMENT
9359 * configure: Regenerate.
9361 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9363 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9364 * linux-x86-low.c (X86_64_USER_REGS): New.
9365 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9367 2014-04-28 Yao Qi <yao@codesourcery.com>
9369 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9372 2014-04-25 Pedro Alves <palves@redhat.com>
9375 * linux-low.c (linux_attach_fail_reason_string): New function.
9376 (linux_attach_lwp): Delete.
9377 (linux_attach_lwp_1): Rename to ...
9378 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9379 argument. Remove "initial" parameter. Return int instead of
9380 void. Don't error or warn here.
9381 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9382 failure to attach to the tgid. Call warning when failing to
9384 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9385 argument. Remove "initial" parameter. Return int instead of
9386 void. Don't error or warn here.
9387 (linux_attach_fail_reason_string): New declaration.
9388 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9389 interface change. Use linux_attach_fail_reason_string.
9391 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9392 Walfred Tedeschi <walfred.tedeschi@intel.com>
9394 * Makefile.in: Added rules to handle new files
9395 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9396 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9397 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9398 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9399 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9400 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9402 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9403 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9404 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9405 i386/x32-avx512.xml.
9406 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9407 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9408 i386/x32-avx512-linux.xml.
9409 * i387-fp.c (num_avx512_k_registers): New constant for number
9411 (num_avx512_zmmh_low_registers): New constant for number of
9412 lower ZMM registers (0-15).
9413 (num_avx512_zmmh_high_registers): New constant for number of
9414 higher ZMM registers (16-31).
9415 (num_avx512_ymmh_registers): New contant for number of higher
9416 YMM registers (ymm16-31 added by avx521 on x86_64).
9417 (num_avx512_xmm_registers): New constant for number of higher
9418 XMM registers (xmm16-31 added by AVX512 on x86_64).
9419 (struct i387_xsave): Add space for AVX512 registers.
9420 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9421 Add code to handle AVX512 registers.
9422 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9423 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9424 prototypei from generated file.
9425 (tdesc_amd64_avx512_linux): Likewise.
9426 (init_registers_x32_avx512_linux): Likewise.
9427 (tdesc_x32_avx512_linux): Likewise.
9428 (init_registers_i386_avx512_linux): Likewise.
9429 (tdesc_i386_avx512_linux): Likewise.
9430 (x86_64_regmap): Add AVX512 registers.
9431 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9433 (initialize_low_arch): Add code to initialize AVX512 registers.
9435 2014-04-23 Pedro Alves <palves@redhat.com>
9437 * mem-break.c (find_gdb_breakpoint_at): Make static.
9438 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9440 2014-04-23 Pedro Alves <palves@redhat.com>
9442 * i386-low.c: Don't include break-common.h here.
9443 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9444 prototype to take target_hw_bp_type as argument instead of a Z
9446 * i386-low.h: Include break-common.h here.
9447 (Z_packet_to_hw_type): Declare.
9448 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9450 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9451 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9452 (x86_remove_point): Convert the packet number to a
9453 target_hw_bp_type before calling i386_low_remove_watchpoint.
9454 * win32-i386-low.c (i386_insert_point): Convert the packet number
9455 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9456 (i386_remove_point): Convert the packet number to a
9457 target_hw_bp_type before calling i386_low_remove_watchpoint.
9459 2014-04-23 Pedro Alves <palves@redhat.com>
9461 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9463 2014-04-10 Pedro Alves <palves@redhat.com>
9465 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9466 Check if the condition or command is NULL before checking if the
9467 breakpoint is known. On success, return true.
9468 * mem-break.h (add_breakpoint_condition): Document return.
9469 (add_breakpoint_commands): Add describing comment.
9470 * server.c (skip_to_semicolon): New function.
9471 (process_point_options): Use it.
9473 2014-04-09 Pedro Alves <palves@redhat.com>
9475 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9478 2014-02-27 Pedro Alves <palves@redhat.com>
9481 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9483 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9485 (last_thread_of_process_p): Take a PID argument instead of a
9487 (linux_wait_for_lwp): Delete.
9488 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9490 (linux_low_filter_event): New function, party factored out from
9491 linux_wait_for_event.
9492 (linux_wait_for_event): Rename to ...
9493 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9494 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9495 sigsuspend. Check for zombie leaders.
9496 (linux_wait_for_event): Reimplement as wrapper around
9497 linux_wait_for_event_filtered.
9498 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9499 a normal or signal exit is seen, it's the whole process exiting.
9500 (wait_for_sigstop): No longer a for_each_inferior callback.
9501 Rewrite on top of linux_wait_for_event_filtered.
9502 (stop_all_lwps): Call wait_for_sigstop directly.
9503 * server.c (resume, handle_target_event): Handle
9504 TARGET_WAITKIND_NO_RESUMED.
9506 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9508 * win32-low.c (psapi_get_dll_name,
9509 * win32_CreateToolhelp32Snapshot): Delete.
9510 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9511 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9513 (handle_load_dll): Add function description.
9514 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9516 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9518 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9520 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9521 base address when calling win32_add_one_solib.
9522 (handle_load_dll): Delete local variable load_addr.
9523 Remove 0x1000 offset applied to DLL base address when calling
9524 win32_add_one_solib.
9525 (handle_unload_dll): Add comment.
9527 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9529 * win32-low.c (win32_add_all_dlls): Renames
9530 win32_ensure_ntdll_loaded. Rewrite function documentation.
9531 Adjust implementation to always load all DLLs.
9532 Add 0x1000 offset to DLL base address when calling
9533 win32_add_one_solib.
9534 (child_initialization_done): New static global.
9535 (do_initial_child_stuff): Set child_initialization_done to
9536 zero during child initialization, and 1 after. Replace call
9537 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9539 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9540 (handle_unload_dll): Add function documentation.
9541 (get_child_debug_event): Ignore load and unload DLL events
9542 during child initialization.
9544 2014-02-20 Doug Evans <dje@google.com>
9546 Remove global all_lwps.
9547 * inferiors.h (ptid_of): Move here from linux-low.h.
9548 (pid_of, lwpid_of): Ditto.
9549 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9550 parameter is a struct thread_info * now.
9551 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9552 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9553 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9555 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9556 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9557 * linux-arm-low.c (update_registers_callback): Update, "entry"
9558 parameter is a struct thread_info * now.
9559 Fetch lwpid from current_inferior directly.
9560 (arm_insert_point): Pass &all_threads to find_inferior instead of
9562 (arm_remove_point): Ditto.
9563 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9564 (arm_prepare_to_resume): Fetch pid from thread.
9565 (arm_read_description): Fetch lwpid from current_inferior directly.
9566 * linux-low.c (all_lwps): Delete.
9567 (delete_lwp): Delete call to remove_inferior.
9568 (handle_extended_wait): Fetch lwpid from thread.
9569 (add_lwp): Don't set lwp->entry.id. Remove call to
9570 add_inferior_to_list.
9571 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9572 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9573 (kill_one_lwp_callback): Ditto.
9574 (linux_kill): Don't dereference NULL pointer.
9575 Fetch ptid,lwpid from thread.
9576 (get_detach_signal): Fetch ptid from thread.
9577 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9578 Simplify call to regcache_invalidate_thread.
9579 (delete_lwp_callback): Update, "entry" parameter is a
9580 struct thread_info * now. Fetch pid from thread.
9581 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9582 (status_pending_p_callback): Update, "entry" parameter is a
9583 struct thread_info * now. Fetch ptid from thread.
9584 (find_lwp_pid): Update, "entry" parameter is a
9585 struct thread_info * now.
9586 (linux_wait_for_lwp): Fetch pid from thread.
9587 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9588 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9589 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9590 (dequeue_one_deferred_signal): Ditto.
9591 (cancel_breakpoint): Fetch ptid from current_inferior.
9592 (linux_wait_for_event): Pass &all_threads to find_inferior,
9593 not &all_lwps. Fetch ptid, lwpid from thread.
9594 (count_events_callback): Update, "entry" parameter is a
9595 struct thread_info * now.
9596 (select_singlestep_lwp_callback): Ditto.
9597 (select_event_lwp_callback): Ditto.
9598 (cancel_breakpoints_callback): Ditto.
9599 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9601 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9602 (unsuspend_one_lwp): Update, "entry" parameter is a
9603 struct thread_info * now.
9604 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9606 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9607 Fetch lwpid from thread, not lwp.
9608 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9609 Pass &all_threads to find_inferior, not &all_lwps.
9610 (send_sigstop): Fetch lwpid from thread, not lwp.
9611 (send_sigstop_callback): Update, "entry" parameter is a
9612 struct thread_info * now.
9613 (suspend_and_send_sigstop_callback): Ditto.
9614 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9615 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9616 struct thread_info * now.
9617 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9619 (lwp_running): Update, "entry" parameter is a
9620 struct thread_info * now.
9621 (stop_all_lwps): Fetch ptid from thread.
9622 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9623 (linux_resume_one_lwp): Fetch lwpid from thread.
9624 (linux_set_resume_request): Update, "entry" parameter is a
9625 struct thread_info * now. Fetch pid, lwpid from thread.
9626 (resume_status_pending_p): Update, "entry" parameter is a
9627 struct thread_info * now.
9628 (need_step_over_p): Ditto. Fetch lwpid from thread.
9629 (start_step_over): Fetch lwpid from thread.
9630 (linux_resume_one_thread): Update, "entry" parameter is a
9631 struct thread_info * now. Fetch lwpid from thread.
9632 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9633 (proceed_one_lwp): Update, "entry" parameter is a
9634 struct thread_info * now. Fetch lwpid from thread.
9635 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9636 struct thread_info * now.
9637 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9638 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9639 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9641 (regsets_store_inferior_registers): Ditto.
9642 (fetch_register, store_register): Ditto.
9643 (linux_read_memory, linux_write_memory): Ditto.
9644 (linux_request_interrupt): Ditto.
9645 (linux_read_auxv): Ditto.
9646 (linux_xfer_siginfo): Ditto.
9647 (linux_qxfer_spu): Ditto.
9648 (linux_qxfer_libraries_svr4): Ditto.
9649 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9650 moved to inferiors.h.
9652 (get_thread_lwp): Update.
9653 (struct lwp_info): Delete member "entry". Simplify comment for
9656 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9657 current_inferior directly.
9658 (update_watch_registers_callback): Update, "entry" parameter is a
9659 struct thread_info * now. Fetch pid from thread.
9660 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9661 (mips_insert_point): Fetch lwpid from current_inferior.
9662 Pass &all_threads to find_inferior, not &all_lwps.
9663 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9664 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9666 (mips_stopped_data_address): Ditto.
9667 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9669 * linux-tile-low.c (tile_arch_setup): Ditto.
9670 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9671 (update_debug_registers_callback): Update, "entry" parameter is a
9672 struct thread_info * now. Fetch pid from thread.
9673 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9674 Pass &all_threads to find_inferior, not &all_lwps.
9675 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9676 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9677 Pass &all_threads to find_inferior, not &all_lwps.
9678 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9679 (i386_dr_low_get_status): Ditto.
9680 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9681 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9682 (x86_linux_read_description): Ditto.
9683 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9685 2014-02-20 Doug Evans <dje@google.com>
9687 * inferiors.c (get_first_inferior): Fix buglet.
9689 2014-02-19 Doug Evans <dje@google.com>
9691 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9692 * inferiors.c (add_thread): Change result type to struct thread_info *.
9693 All callers updated.
9694 (add_lwp): Call add_thread here instead of in callers.
9695 All callers updated.
9696 * linux-low.h (get_lwp_thread): Rewrite.
9697 (struct lwp_info): New member "thread".
9699 2014-02-19 Doug Evans <dje@google.com>
9701 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9702 All callers updated.
9704 2014-02-19 Doug Evans <dje@google.com>
9706 * inferiors.c (add_thread): Fix whitespace.
9708 2014-02-19 Doug Evans <dje@google.com>
9710 * dll.c (clear_dlls): Replace accessing list implemention details
9712 * gdbthread.h (get_first_thread): Declare.
9713 * inferiors.c (for_each_inferior_with_data): New function.
9714 (get_first_thread): New function.
9715 (find_thread_ptid): Simplify.
9716 (get_first_inferior): New function.
9717 (clear_list): Delete.
9718 (one_inferior_p): New function.
9719 (clear_inferior_list): New function.
9720 (clear_inferiors): Update.
9721 * inferiors.h (for_each_inferior_with_data): Declare.
9722 (clear_inferior_list): Declare.
9723 (one_inferior_p): Declare.
9724 (get_first_inferior): Declare.
9725 * linux-low.c (linux_wait_for_event): Replace accessing list
9726 implemention details with API function.
9727 * server.c (target_running): Ditto.
9728 (accumulate_file_name_length): New function.
9729 (emit_dll_description): New function.
9730 (handle_qxfer_libraries): Replace accessing list implemention
9731 details with API function.
9732 (handle_qxfer_threads_worker): New function.
9733 (handle_qxfer_threads_proper): Replace accessing list implemention
9734 details with API function.
9735 (handle_query): Ditto.
9736 (visit_actioned_threads_callback_ftype): New typedef.
9737 (visit_actioned_threads_data): New struct.
9738 (visit_actioned_threads): Rewrite to be find_inferior callback.
9739 (resume): Call find_inferior.
9740 (handle_status): Replace accessing list implemention
9741 details with API function.
9742 (process_serial_event): Replace accessing list implemention details
9744 * target.c (set_desired_inferior): Replace accessing list implemention
9745 details with API function.
9746 * tracepoint.c (same_process_p): New function.
9747 (gdb_agent_about_to_close): Replace accessing list implemention
9748 details with API function.
9749 * win32-low.c (child_delete_thread): Replace accessing list
9750 implemention details with API function.
9751 (match_dll_by_basename): New function.
9752 (dll_is_loaded_by_basename): New function.
9753 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9754 details call to dll_is_loaded_by_basename.
9756 2014-02-19 Doug Evans <dje@google.com>
9758 * dll.h (struct dll_info): Add comment.
9759 * gdbthread.h (struct thread_info): Add comment.
9760 (current_ptid): Simplify.
9761 * inferiors.c (add_process): Update.
9762 (remove_process): Update.
9763 * inferiors.h (struct process_info): Rename member "head" to "entry".
9764 * linux-low.c (delete_lwp): Update.
9766 (last_thread_of_process_p): Update.
9767 (kill_one_lwp_callback, linux_kill): Update.
9768 (status_pending_p_callback): Update.
9769 (wait_for_sigstop): Update. Simplify read of ptid.
9770 (start_step_over): Update.
9771 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9772 (get_lwp_thread): Update.
9773 (struct lwp_info): Rename member "head" to "entry".
9774 * regcache.h (inferior_list_entry): Delete.
9775 * server.c (kill_inferior_callback): Update.
9776 (detach_or_kill_inferior_callback): Update.
9777 (print_started_pid): Update.
9778 (print_attached_pid): Update.
9779 (process_serial_event): Simplify read of ptid.
9780 * thread-db.c (thread_db_create_event): Update.
9781 (thread_db_get_tls_address): Update.
9782 * win32-low.c (current_inferior_ptid): Simplify.
9784 2014-02-19 Tom Tromey <tromey@redhat.com>
9786 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9788 (target_supports_btrace): Update.
9790 2014-02-14 Yao Qi <yao@codesourcery.com>
9792 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9793 (rsp-low-ipa.o): New target.
9795 2014-02-12 Tom Tromey <tromey@redhat.com>
9797 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9798 convert_ascii_to_int.
9799 * regcache.c (registers_to_string): Likewise.
9800 * remote-utils.c (decode_M_packet): Likewise.
9801 * server.c (process_serial_event): Likewise.
9803 2014-02-12 Tom Tromey <tromey@redhat.com>
9805 * server.c (handle_query, handle_v_run): Use hex2bin, not
9807 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9809 2014-02-12 Tom Tromey <tromey@redhat.com>
9811 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9812 convert_int_to_ascii.
9813 * regcache.c (registers_to_string, collect_register_as_string):
9815 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9817 * server.c (process_serial_event): Likewise.
9818 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9819 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9821 2014-02-12 Tom Tromey <tromey@redhat.com>
9823 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9824 bin2hex, not hexify.
9825 * tracepoint.c (cmd_qtstatus): Likewise.
9827 2014-02-12 Tom Tromey <tromey@redhat.com>
9829 * remote-utils.c (monitor_output): Pass explicit length to
9832 2014-02-12 Tom Tromey <tromey@redhat.com>
9834 * tracepoint.c: Include rsp-low.h.
9835 * server.c: Include rsp-low.h.
9836 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9837 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9839 * remote-utils.c: Include rsp-low.h.
9840 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9841 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9842 (convert_int_to_ascii, convert_ascii_to_int): Move to
9844 * regcache.c: Include rsp-low.h.
9845 * ax.c: Include rsp-low.h.
9846 * Makefile.in (SFILES): Add common/rsp-low.c.
9847 (OBS): Add rsp-low.o.
9848 (rsp-low.o): New target.
9850 2014-02-12 Tom Tromey <tromey@redhat.com>
9852 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9853 Include print-utils.h.
9854 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9855 (plongest, thirty_two, phex_nz): Remove.
9856 * Makefile.in (SFILES): Add common/print-utils.c.
9857 (OBS): Add print-utils.o.
9858 (print-utils-ipa.o): New target.
9859 (print-utils.o): New target.
9860 (IPA_OBJS): Add print-utils-ipa.o.
9862 2014-02-06 Tom Tromey <tromey@redhat.com>
9864 * Makefile.in (SFILES): Fix indentation.
9866 2014-02-05 Doug Evans <dje@google.com>
9868 * linux-low.c (linux_wait_for_event): Improve comment.
9869 (linux_wait_1): Keep current_inferior in sync with event_child.
9871 2014-01-22 Doug Evans <dje@google.com>
9873 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9875 2014-01-22 Doug Evans <dje@google.com>
9877 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9878 * configure: Regenerate.
9879 * config.in: Regenerate.
9880 * Makefile.in (SFILES): Add debug.c.
9882 * debug.c: New file.
9883 * debug.h: New file.
9884 * linux-aarch64-low.c (*): Update all debugging printfs to use
9885 debug_printf instead of fprintf.
9886 * linux-arm-low.c (*): Ditto.
9887 * linux-cris-low.c (*): Ditto.
9888 * linux-crisv32-low.c (*): Ditto.
9889 * linux-m32r-low.c (*): Ditto.
9890 * linux-sparc-low.c (*): Ditto.
9891 * linux-x86.c (*): Ditto.
9892 * linux-low.c (*): Ditto.
9893 (linux_wait_1): Add calls to debug_enter, debug_exit.
9894 (linux_wait): Remove redundant debugging printf.
9895 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9896 (linux_resume, unstop_all_lwps): Ditto.
9897 * mem-break.c (*): Update all debugging printfs to use
9898 debug_printf instead of fprintf.
9899 * remote-utils.c (*): Ditto.
9900 * thread-db.c (*): Ditto.
9901 * server.c #include <ctype.h>, "gdb_vecs.h".
9902 (debug_threads): Moved to debug.c.
9903 (*): Update all debugging printfs to use debug_printf instead of
9905 (start_inferior): Replace call to fflush with call to debug_flush.
9906 (monitor_show_help): Mention set debug-format.
9907 (parse_debug_format_options): New function.
9908 (handle_monitor_command): Handle "monitor set debug-format".
9909 (gdbserver_usage): Mention --debug-format.
9910 (main): Parse --debug-format.
9911 * server.h (debug_threads): Declaration moved to debug.h.
9913 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9914 trace_debug_1 that uses debug_printf.
9915 (tracepoint_look_up_symbols): Update all debugging printfs to use
9916 debug_printf instead of fprintf.
9918 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9920 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9923 2014-01-17 Pedro Alves <palves@redhat.com>
9926 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9927 defined after including gdb_proc_service.h.
9929 2014-01-16 Doug Evans <dje@google.com>
9931 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9932 (match_dll): Use it.
9934 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9936 * target.h (target_ops) <read_btrace>: Change parameters and
9937 return type to allow error reporting.
9938 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9939 trace reading errors on.
9940 * linux-low.c (linux_low_read_btrace): Pass trace reading
9942 (linux_low_disable_btrace): New.
9944 2014-01-15 Doug Evans <dje@google.com>
9946 * inferiors.c (thread_id_to_gdb_id): Delete.
9947 * inferiors.h (thread_id_to_gdb_id): Delete.
9949 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9951 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9952 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9955 2014-01-08 Pedro Alves <palves@redhat.com>
9957 * server.c (handle_status): Don't discard previous queued stop
9958 replies or thread's pending status here.
9959 (main) <disconnection>: Do it here instead.
9961 2014-01-08 Pedro Alves <palves@redhat.com>
9963 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9964 * server.c (visit_actioned_threads, handle_pending_status): New
9966 (handle_v_cont): Factor out parts to ...
9967 (resume): ... this new function. If in all-stop, and a thread
9968 being resumed has a pending status, report it without actually
9970 (myresume): Adjust to use the new 'resume' function.
9971 (clear_pending_status_callback, set_pending_status_callback)
9972 (find_status_pending_thread_callback): New functions.
9973 (handle_status): Handle the case of multiple threads having
9974 interesting statuses to report. Report threads' real last signal
9975 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9976 with an interesting thread to report the status for, instead of
9977 always reporting the status of the first thread.
9979 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9981 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9982 * gdbreplay.c (gdbreplay_version): Likewise.
9984 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9986 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9987 iov.iov_len with the real length in use.
9989 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9991 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9992 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9993 for all targets that use win32-low.c.
9994 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9995 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9997 2013-12-13 Pedro Alves <palves@redhat.com>
9999 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10000 if equal to TARGET_WAITKIND_LOADED.
10001 * win32-low.c (cached_status): New static global.
10002 (win32_wait): Add declaration.
10003 (do_initial_child_stuff): Flush all initial pending debug events
10004 up to the initial breakpoint.
10005 (win32_wait): If CACHED_STATUS was set, return that instead
10006 of doing a real wait. Remove the code resuming the execution
10007 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10008 during the initial phase. Also remove the code changing
10009 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10010 TARGET_WAITKIND_STOPPED.
10012 2013-12-11 Yao Qi <yao@codesourcery.com>
10014 * notif.c (handle_notif_ack): Return 0 if no notification
10017 2013-11-20 Doug Evans <dje@google.com>
10019 * linux-low.c (linux_set_resume_request): Fix comment.
10021 2013-11-20 Doug Evans <dje@google.com>
10023 * linux-low.c (resume_status_pending_p): Tweak comment.
10025 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10027 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10028 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10029 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10030 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10031 (srv_amd64_regobj): Add amd64-mpx.o.
10032 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10033 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10034 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10035 * i387-fp.c (num_pl_bnd_register) Added constant.
10036 (num_pl_bnd_cfg_registers) Added constant.
10037 (struct i387_xsave) Added reserved area and MPX fields.
10038 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10039 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10041 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10042 (init_registers_amd64_mpx_linux): Declare new function.
10043 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10044 (x86_64_regmap): Add MPX registers.
10045 (x86_linux_read_description): Add MPX case.
10046 (initialize_low_arch): Initialize MPX targets.
10048 2013-11-18 Tom Tromey <tromey@redhat.com>
10050 * configure: Rebuild.
10051 * configure.ac: Don't check for stdlib.h.
10052 * gdbreplay.c: Unconditionally include stdlib.h.
10054 2013-11-18 Tom Tromey <tromey@redhat.com>
10056 * config.in: Rebuild.
10057 * configure: Rebuild.
10058 * configure.ac: Don't use AC_HEADER_DIRENT.
10060 2013-11-18 Tom Tromey <tromey@redhat.com>
10062 * server.h: Don't check HAVE_STRING_H.
10063 * gdbreplay.c: Don't check HAVE_STRING_H.
10064 * configure: Rebuild.
10066 2013-11-18 Tom Tromey <tromey@redhat.com>
10068 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10071 2013-11-08 Tom Tromey <tromey@redhat.com>
10073 * configure, config.in: Rebuild.
10074 * configure.ac: Remove unused configury.
10076 2013-11-08 Tom Tromey <tromey@redhat.com>
10078 * acinclude.m4: Include common.m4, codeset.m4.
10079 * configure, config.in: Rebuild.
10080 * configure.ac: Use GDB_AC_COMMON.
10082 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10084 * linux-s390-low.c (HWCAP_S390_TE): New define.
10085 (s390_arch_setup): Consider the TE field in the HWCAP for
10086 determining 'have_regset_tdb'.
10088 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10091 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10094 2013-10-02 Pedro Alves <palves@redhat.com>
10096 * server.c (process_serial_event): Don't output "GDBserver
10097 exiting" if GDB is connected through stdio.
10098 * target.c (mywait): Likewise, be silent if GDB is connected
10101 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10103 * lynx-low.c (lynx_add_threads_after_attach): New function.
10104 (lynx_attach): Remove call to add_thread. Add call to
10105 lynx_add_threads_after_attach instead.
10107 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10109 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10110 * config.in, configure: Regenerated.
10112 2013-09-18 Yao Qi <yao@codesourcery.com>
10115 * server.c (start_inferior): Clear 'resume_info'.
10117 2013-09-16 Jiong Wang <jiwang@tilera.com>
10119 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10122 2013-09-16 Jiong Wang <jiwang@tilera.com>
10124 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10125 linux-tile-low.o to srv_tgtobj.
10127 2013-09-16 Will Newton <will.newton@linaro.org>
10129 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10132 2013-09-06 Pedro Alves <palves@redhat.com>
10134 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10135 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10136 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10137 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10138 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10139 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10141 2013-09-06 Pedro Alves <palves@redhat.com>
10143 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10144 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10146 2013-09-06 Pedro Alves <palves@redhat.com>
10148 * linux-amd64-ipa.c: Include tracepoint.h.
10149 * linux-i386-ipa.c: Include tracepoint.h.
10151 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10153 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10154 (ps_get_thread_area): New function.
10156 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10158 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10159 (initialize_low_arch): Call init_registers_crisv32 rather than
10160 init_register_crisv32.
10162 2013-09-05 Pedro Alves <palves@redhat.com>
10164 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10166 * hostio.h: ... this new file.
10167 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10168 win32-low.c: Include hostio.h.
10170 2013-09-05 Pedro Alves <palves@redhat.com>
10172 * server.h (gdb_client_data, handler_func, callback_handler_func)
10173 (delete_file_handler, add_file_handler, append_callback_event)
10174 (delete_callback_event, start_event_loop, initialize_event_loop):
10175 Move to event-loop.h and include it.
10176 * event-loop.h: New file.
10178 2013-09-05 Pedro Alves <palves@redhat.com>
10180 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10181 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10182 (loaded_dll, unloaded_dll): Move to ...
10183 * dll.h: ... this new file.
10184 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10186 2013-09-05 Pedro Alves <palves@redhat.com>
10188 * server.h (current_process, get_thread_process, all_processes)
10189 (add_inferior_to_list, for_each_inferior, current_inferior)
10190 (remove_inferior, add_process, remove_process, find_process_pid)
10191 (have_started_inferiors_p, have_attached_inferiors_p)
10192 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10193 (clear_inferiors, find_inferior, find_inferior_id)
10194 (inferior_target_data, set_inferior_target_data)
10195 (inferior_regcache_data, set_inferior_regcache_data): Move to
10196 inferiors.h, and include it.
10197 * inferiors.h: New file.
10199 2013-09-05 Pedro Alves <palves@redhat.com>
10201 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10205 2013-09-05 Pedro Alves <palves@redhat.com>
10207 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10209 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10210 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10211 (handle_tracepoint_general_set, handle_tracepoint_query)
10212 (tracepoint_finished_step, tracepoint_was_hit)
10213 (release_while_stepping_state_list, current_traceframe)
10214 (in_readonly_region, traceframe_read_mem)
10215 (fetch_traceframe_registers, traceframe_read_sdata)
10216 (traceframe_read_info, struct fast_tpoint_collect_status)
10217 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10218 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10219 (supply_fast_tracepoint_registers)
10220 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10221 (ipa_tdesc, claim_trampoline_space)
10222 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10223 (agent_mem_read, agent_get_trace_state_variable_value)
10224 (agent_set_trace_state_variable_value, agent_tsv_read)
10225 (agent_mem_read_string, get_raw_reg_func_addr)
10226 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10227 * tracepoint.h: ... this new file.
10229 2013-09-05 Pedro Alves <palves@redhat.com>
10231 * server.h (perror_with_name, error, fatal, warning, paddress)
10232 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10234 * utils.h: New file.
10236 2013-09-05 Pedro Alves <palves@redhat.com>
10238 * server.h (remote_debug, noack_mode, transport_is_reliable)
10239 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10240 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10241 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10242 (write_enn, initialize_async_io, enable_async_io)
10243 (disable_async_io, check_remote_input_interrupt_request)
10244 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10245 (dead_thread_notify, prepare_resume_reply)
10246 (decode_address_to_semicolon, decode_address, decode_m_packet)
10247 (decode_M_packet, decode_X_packet, decode_xfer_write)
10248 (decode_search_memory_packet, unhexify, hexify)
10249 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10250 (look_up_one_symbol, relocate_instruction)
10251 (monitor_output): Move to remote-utils.h, and include it.
10252 * remote-utils.h: New file.
10254 2013-09-05 Pedro Alves <palves@redhat.com>
10256 * server.h (_): Delete.
10258 2013-09-02 Pedro Alves <palves@redhat.com>
10260 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10261 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10263 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10265 2013-09-02 Pierre Muller <muller@sourceware.org>
10267 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10268 or WriteProcessMemory complete successfully and handle
10269 ERROR_PARTIAL_COPY error.
10271 2013-09-02 Pedro Alves <palves@redhat.com>
10273 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10274 error instead of EIO.
10276 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10279 * linux-low.c: Include filestuff.h.
10280 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10281 * lynx-low.c: Include filestuff.h.
10282 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10283 * server.c: Include filestuff.h.
10284 (main): Call notice_open_fds.
10285 * spu-low.c: Include filestuff.h.
10286 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10288 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10290 * Makefile.in: Explain why ../target and ../nat are not
10291 listed as include file search paths.
10292 (linux-waitpid.o): New object file rule.
10293 * configure.srv (srv_native_linux_obj): New variable.
10294 Replace all occurrences of linux native object files with
10295 $srv_native_linux_obj.
10296 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10297 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10298 (linux_enable_event_reporting): Remove declaration.
10299 (my_waitpid): Moved to common/linux-waitpid.c.
10300 (linux_wait_for_event): Pass ptid when calling
10301 linux_enable_event_reporting.
10302 (linux_supports_tracefork_flag): Remove.
10303 (linux_enable_event_reporting): Likewise.
10304 (linux_tracefork_grandchild): Remove.
10305 (STACK_SIZE): Moved to common/linux-ptrace.c.
10306 (linux_tracefork_child): Remove.
10307 (linux_test_for_tracefork): Remove.
10308 (linux_look_up_symbols): Call linux_supports_traceclone.
10309 (initialize_low): Remove call to linux_test_for_tracefork.
10310 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10311 common/linux-ptrace.h.
10312 (PTRACE_TYPE_ARG4): Likewise.
10313 Include linux-ptrace.h.
10315 2013-08-21 Pedro Alves <palves@redhat.com>
10317 * config.in: Renegerate.
10319 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10321 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10322 (SFILES): Remove $(srcdir)/common/target-common.c and
10323 add $(srcdir)/target/waitstatus.c.
10324 (OBS): Remove target-common.o and add waitstatus.o.
10325 (server_h): Remove $(srcdir)/../common/target-common.h and
10326 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10327 and $(srcdir)/../target/waitstatus.h.
10328 (target-common.o): Remove.
10329 (waitstatus.o): New target object file.
10330 * target.h: Do not include target-common.h and
10331 include target/resume.h, target/wait.h and
10332 target/waitstatus.h.
10334 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10336 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10337 to PTRACE_TYPE_ARG3.
10338 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10339 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10341 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10342 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10344 2013-07-27 Jie Zhang <jie@codesourcery.com>
10345 Daniel Jacobowitz <dan@codesourcery.com>
10346 Yao Qi <yao@codesourcery.com>
10348 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10349 (mips-linux-watch.o): New rule.
10350 (mips_linux_watch_h): New variable.
10351 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10353 * linux-mips-low.c: Include mips-linux-watch.h.
10354 (struct arch_process_info, struct arch_lwp_info): New.
10355 (update_watch_registers_callback): New function.
10356 (mips_linux_new_process, mips_linux_new_thread) New functions.
10357 (mips_linux_prepare_to_resume, mips_insert_point): New
10359 (mips_remove_point, mips_stopped_by_watchpoint): New
10361 (rsp_bp_type_to_target_hw_bp_type): New function.
10362 (mips_stopped_data_address): New function.
10363 (the_low_target): Add watchpoint support functions.
10365 2013-07-27 Yao Qi <yao@codesourcery.com>
10367 * i386-low.c: Include break-common.h.
10368 (enum target_hw_bp_type): Remove.
10370 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10372 * Makefile.in (SFILES): /common/target-common.c.
10373 (OBS): Add target-common.o.
10374 (server_h): Add $(srcdir)/../common/target-common.h.
10375 (target-common.o): New target.
10376 * server.c (queue_stop_reply_callback): Free
10377 status string after use.
10378 * target.c (target_waitstatus_to_string): Remove.
10379 * target.h: Include target-common.h.
10380 (resume_kind): Likewise.
10381 (target_waitkind): Likewise.
10382 (target_waitstatus): Likewise.
10383 (TARGET_WNOHANG): Likewise.
10385 2013-07-04 Yao Qi <yao@codesourcery.com>
10387 * Makefile.in (host_alias): Use @host_noncanonical@.
10388 (target_alias): Use @target_noncanonical@.
10389 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10390 ACX_NONCANONICAL_HOST.
10391 * configure: Regenerated.
10394 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10396 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10397 * configure: Rebuild.
10398 * Makefile.in (version_host, version_target): Get from configure.
10399 (version.c): Use $(version_host) and $(version_target).
10401 2013-07-03 Pedro Alves <palves@redhat.com>
10403 * Makefile.in (config.status): Depend on development.sh.
10404 * acinclude.m4: Include libmcheck.m4.
10405 * configure: Regenerate.
10407 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10409 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10410 attribute inside the parentheses.
10411 (winapi_DebugSetProcessKillOnExit): Ditto.
10412 (winapi_DebugBreakProcess): Ditto.
10413 (winapi_GenerateConsoleCtrlEvent): Ditto.
10415 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10417 * notif.h (notif_event): Add a dummy member to avoid compiler
10420 2013-07-01 Pedro Alves <palves@redhat.com>
10422 * hostio.c (HOSTIO_PATH_MAX): Define.
10423 (require_filename, handle_open, handle_unlink, handle_readlink):
10426 2013-07-01 Pedro Alves <palves@redhat.com>
10428 * server.h: Include "pathmax.h".
10429 * linux-low.c: Don't include sys/param.h.
10430 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10432 * win32-low.c: Don't include sys/param.h.
10433 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10435 2013-07-01 Pedro Alves <palves@redhat.com>
10437 * event-loop.c: Don't check HAVE_UNISTD_H before including
10439 * gdbreplay.c: Likewise.
10440 * remote-utils.c: Likewise.
10441 * server.c: Likewise.
10442 * configure.ac: Don't check for unistd.h.
10443 * configure: Regenerate.
10445 2013-06-28 Tom Tromey <tromey@redhat.com>
10447 * Makefile.in (version.c): Use version.in, not
10450 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10452 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10453 * configure: Rebuild.
10454 * Makefile.in (version_host, version_target): Get from configure.
10455 (version.c): Use $(version_host) and $(version_target).
10457 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10459 Fix trace-status to output user name without trailing colon.
10460 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10462 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10464 Fix trace-status to output proper start-time and stop-time.
10465 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10466 output start time and stop time in hex as gdb expects.
10468 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10470 * tracepoint.c (build_traceframe_info_xml): Output trace state
10471 variables present in the trace buffer.
10473 2013-06-24 Tom Tromey <tromey@redhat.com>
10475 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10477 (version.o): Remove.
10478 * gdbreplay.c: Include version.h.
10479 (version, host_name): Don't declare.
10480 * server.h: Include version.h.
10481 (version, host_name): Don't declare.
10483 2013-06-12 Pedro Alves <palves@redhat.com>
10485 * linux-x86-low.c (linux_is_elf64): Delete global.
10486 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10487 with local linux_pid_exe_is_elf_64_file use.
10489 2013-06-11 Pedro Alves <palves@redhat.com>
10491 * linux-low.c (regset_disabled, disable_regset): New functions.
10492 (regsets_fetch_inferior_registers)
10493 (regsets_store_inferior_registers): Use them.
10494 (initialize_regsets_info); Don't allocate the disabled_regsets
10496 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10499 2013-06-11 Pedro Alves <palves@redhat.com>
10501 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10504 2013-06-11 Pedro Alves <palves@redhat.com>
10506 * linux-x86-low.c (initialize_low_arch): Call
10507 init_registers_x32_avx_linux.
10509 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10511 Fix compatibility with Android Bionic.
10512 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10515 2013-06-07 Pedro Alves <palves@redhat.com>
10518 * Makefile.in (OBS): Add tdesc.o.
10519 (IPA_OBJS): Add tdesc-ipa.o.
10520 (tdesc-ipa.o): New rule.
10521 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10523 * linux-low.c (new_inferior): Delete.
10524 (disabled_regsets, num_regsets): Delete.
10525 (linux_add_process): Adjust to set the new per-process
10527 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10528 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10529 was a stop. When calling arch_setup, switch the current inferior
10530 to the thread that got an event.
10531 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10532 (regsets_fetch_inferior_registers)
10533 (regsets_store_inferior_registers): New regsets_info parameter.
10535 (linux_register_in_regsets): New regs_info parameter. Adjust to
10537 (register_addr, fetch_register, store_register): New usrregs_info
10538 parameter. Adjust to use it.
10539 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10540 parameter regs_info. Adjust to use it.
10541 (linux_fetch_registers): Get the current inferior's regs_info, and
10543 (linux_store_registers): Ditto.
10544 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10545 (initialize_low): Don't initialize the target_regsets here. Call
10546 initialize_low_arch.
10547 * linux-low.h (target_regsets): Delete declaration.
10548 (struct regsets_info): New.
10549 (struct usrregs_info): New.
10550 (struct regs_info): New.
10551 (struct process_info_private) <new_inferior>: New field.
10552 (struct linux_target_ops): Delete the num_regs, regmap, and
10553 regset_bitmap fields. New field regs_info.
10554 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10555 * i387-fp.c (num_xmm_registers): Delete.
10556 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10557 calls to new interface.
10558 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10559 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10560 Infer the number of xmm registers from the regcache's target
10562 * i387-fp.h (num_xmm_registers): Delete.
10563 * inferiors.c (add_thread): Don't install the thread's regcache
10565 * proc-service.c (gregset_info): Fetch the current inferior's
10566 regs_info. Adjust to use it.
10567 * regcache.c: Include tdesc.h.
10568 (register_bytes, reg_defs, num_registers)
10569 (gdbserver_expedite_regs): Delete.
10570 (get_thread_regcache): If the thread doesn't have a regcache yet,
10571 create one, instead of aborting gdbserver.
10572 (regcache_invalidate_one): Rename to ...
10573 (regcache_invalidate_thread): ... this.
10574 (regcache_invalidate_one): New.
10575 (regcache_invalidate): Only invalidate registers of the current
10577 (init_register_cache): Add target_desc parameter, and use it.
10578 (new_register_cache): Ditto. Assert the target description has a
10579 non zero registers_size.
10580 (regcache_cpy): Add assertions. Adjust.
10581 (realloc_register_cache, set_register_cache): Delete.
10582 (registers_to_string, registers_from_string): Adjust.
10583 (find_register_by_name, find_regno, find_register_by_number)
10584 (register_cache_size): Add target_desc parameter, and use it.
10585 (free_register_cache_thread, free_register_cache_thread_one)
10586 (regcache_release, register_cache_size): New.
10587 (register_size): Add target_desc parameter, and use it.
10588 (register_data, supply_register, supply_register_zeroed)
10589 (supply_regblock, supply_register_by_name, collect_register)
10590 (collect_register_as_string, collect_register_by_name): Adjust.
10591 * regcache.h (struct target_desc): Forward declare.
10592 (struct regcache) <tdesc>: New field.
10593 (init_register_cache, new_register_cache): Add target_desc
10595 (regcache_invalidate_thread): Declare.
10596 (regcache_invalidate_one): Delete declaration.
10597 (regcache_release): Declare.
10598 (find_register_by_number, register_cache_size, register_size)
10599 (find_regno): Add target_desc parameter.
10600 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10602 * remote-utils.c: Include tdesc.h.
10603 (outreg, prepare_resume_reply): Adjust.
10604 * server.c: Include tdesc.h.
10605 (gdbserver_xmltarget): Delete declaration.
10606 (get_features_xml, process_serial_event): Adjust.
10607 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10609 (struct process_info) <tdesc>: New field.
10610 (ipa_tdesc): Declare.
10611 * tdesc.c: New file.
10612 * tdesc.h: New file.
10613 * tracepoint.c: Include tdesc.h.
10614 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10615 (get_context_regcache): Adjust to pass ipa_tdesc down.
10616 (do_action_at_tracepoint): Adjust to get the register cache size
10617 from the context regcache's description.
10618 (traceframe_walk_blocks): Adjust to get the register cache size
10619 from the current trace frame's description.
10620 (traceframe_get_pc): Adjust to get current trace frame's
10621 description and pass it down.
10622 (gdb_collect): Adjust to get the register cache size from the
10624 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10625 (gdbserver_xmltarget): Delete.
10626 (initialize_low_tracepoint): Set the ipa's target description.
10627 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10628 (initialize_low_tracepoint): Set the ipa's target description.
10629 * linux-x86-low.c: Include tdesc.h.
10630 [__x86_64__] (is_64bit_tdesc): New.
10631 (ps_get_thread_area, x86_get_thread_area): Use it.
10632 (i386_cannot_store_register): Rename to ...
10633 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10634 (i386_cannot_fetch_register): Rename to ...
10635 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10636 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10638 (target_regsets): Rename to ...
10639 (x86_regsets): ... this.
10640 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10642 (x86_siginfo_fixup): Use is_64bit_tdesc.
10643 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10644 (tdesc_x32_avx_linux, tdesc_x32_linux)
10645 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10647 (x86_linux_update_xmltarget): Delete.
10648 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10649 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10650 (AMD64_LINUX_USER64_CS): New.
10651 (x86_linux_read_description): New, based on
10652 x86_linux_update_xmltarget.
10653 (same_process_callback): New.
10654 (x86_arch_setup_process_callback): New.
10655 (x86_linux_update_xmltarget): New.
10656 (x86_regsets_info): New.
10657 (amd64_linux_regs_info): New.
10658 (i386_linux_usrregs_info): New.
10659 (i386_linux_regs_info): New.
10660 (x86_linux_regs_info): New.
10661 (x86_arch_setup): Reimplement.
10662 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10663 (x86_emit_ops): Ditto.
10664 (the_low_target): Adjust. Install x86_linux_regs_info,
10665 x86_cannot_fetch_register, and x86_cannot_store_register.
10666 (initialize_low_arch): New.
10667 * linux-ia64-low.c (tdesc_ia64): Declare.
10668 (ia64_fetch_register): Adjust.
10669 (ia64_usrregs_info, regs_info): New globals.
10670 (ia64_regs_info): New function.
10671 (the_low_target): Adjust.
10672 (initialize_low_arch): New function.
10673 * linux-sparc-low.c (tdesc_sparc64): Declare.
10674 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10676 (sparc_arch_setup): New function.
10677 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10678 (the_low_target): Adjust.
10679 (initialize_low_arch): New function.
10680 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10681 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10682 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10683 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10684 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10685 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10686 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10687 (tdesc_powerpc_isa205_vsx64l): Declare.
10688 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10689 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10690 (ppc_set_pc, ppc_get_hwcap): Adjust.
10691 (ppc_usrregs_info): Forward declare.
10692 (!__powerpc64__) ppc_regmap_adjusted: New global.
10693 (ppc_arch_setup): Adjust to the current process'es target
10695 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10696 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10697 (ppc_store_evrregset): Adjust.
10698 (target_regsets): Rename to ...
10699 (ppc_regsets): ... this, and make static.
10700 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10701 (ppc_regs_info): New function.
10702 (the_low_target): Adjust.
10703 (initialize_low_arch): New function.
10704 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10705 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10706 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10707 (tdesc_s390x_linux64v2): Declare.
10708 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10709 (s390_fill_gregset, s390_store_last_break): Adjust.
10710 (target_regsets): Rename to ...
10711 (s390_regsets): ... this, and make static.
10712 (s390_get_pc, s390_set_pc): Adjust.
10713 (s390_get_hwcap): New target_desc parameter, and use it.
10714 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10715 (s390_arch_setup): Adjust to set the current process'es target
10716 description. Don't adjust the regmap.
10717 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10718 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10719 (regs_info_3264): New globals.
10720 (s390_regs_info): New function.
10721 (the_low_target): Adjust.
10722 (initialize_low_arch): New function.
10723 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10724 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10725 [__mips64] (init_registers_mips_linux)
10726 (init_registers_mips_dsp_linux): Delete defines.
10727 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10728 (have_dsp): New global.
10729 (mips_read_description): New, based on mips_arch_setup.
10730 (mips_arch_setup): Reimplement.
10731 (get_usrregs_info): New function.
10732 (mips_cannot_fetch_register, mips_cannot_store_register)
10733 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10734 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10735 (target_regsets): Rename to ...
10736 (mips_regsets): ... this, and make static.
10737 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10738 (dsp_regs_info, regs_info): New globals.
10739 (mips_regs_info): New function.
10740 (the_low_target): Adjust.
10741 (initialize_low_arch): New function.
10742 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10743 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10745 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10746 (arm_read_description): New, with bits factored from
10748 (arm_arch_setup): Reimplement.
10749 (target_regsets): Rename to ...
10750 (arm_regsets): ... this, and make static.
10751 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10752 (arm_regs_info): New function.
10753 (the_low_target): Adjust.
10754 (initialize_low_arch): New function.
10755 * linux-m68k-low.c (tdesc_m68k): Declare.
10756 (target_regsets): Rename to ...
10757 (m68k_regsets): ... this, and make static.
10758 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10759 (m68k_regs_info): New function.
10760 (m68k_arch_setup): New function.
10761 (the_low_target): Adjust.
10762 (initialize_low_arch): New function.
10763 * linux-sh-low.c (tdesc_sharch): Declare.
10764 (target_regsets): Rename to ...
10765 (sh_regsets): ... this, and make static.
10766 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10767 (sh_regs_info, sh_arch_setup): New functions.
10768 (the_low_target): Adjust.
10769 (initialize_low_arch): New function.
10770 * linux-bfin-low.c (tdesc_bfin): Declare.
10771 (bfin_arch_setup): New function.
10772 (bfin_usrregs_info, regs_info): New globals.
10773 (bfin_regs_info): New function.
10774 (the_low_target): Adjust.
10775 (initialize_low_arch): New function.
10776 * linux-cris-low.c (tdesc_cris): Declare.
10777 (cris_arch_setup): New function.
10778 (cris_usrregs_info, regs_info): New globals.
10779 (cris_regs_info): New function.
10780 (the_low_target): Adjust.
10781 (initialize_low_arch): New function.
10782 * linux-cris-low.c (tdesc_crisv32): Declare.
10783 (cris_arch_setup): New function.
10784 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10785 (cris_regs_info): New function.
10786 (the_low_target): Adjust.
10787 (initialize_low_arch): New function.
10788 * linux-m32r-low.c (tdesc_m32r): Declare.
10789 (m32r_arch_setup): New function.
10790 (m32r_usrregs_info, regs_info): New globals.
10791 (m32r_regs_info): Adjust.
10792 (initialize_low_arch): New function.
10793 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10794 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10795 (tic6x_usrregs_info): Forward declare.
10796 (tic6x_read_description): New function, based on ...
10797 (tic6x_arch_setup): ... this. Reimplement.
10798 (target_regsets): Rename to ...
10799 (tic6x_regsets): ... this, and make static.
10800 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10801 (tic6x_regs_info): New function.
10802 (the_low_target): Adjust.
10803 (initialize_low_arch): New function.
10804 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10805 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10806 (target_regsets): Rename to ...
10807 (xtensa_regsets): ... this, and make static.
10808 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10810 (xtensa_arch_setup, xtensa_regs_info): New functions.
10811 (the_low_target): Adjust.
10812 (initialize_low_arch): New function.
10813 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10814 (nios2_arch_setup): Set the current process'es tdesc.
10815 (target_regsets): Rename to ...
10816 (nios2_regsets): ... this.
10817 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10818 (nios2_regs_info): New function.
10819 (the_low_target): Adjust.
10820 (initialize_low_arch): New function.
10821 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10822 (aarch64_arch_setup): Set the current process'es tdesc.
10823 (target_regsets): Rename to ...
10824 (aarch64_regsets): ... this.
10825 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10826 (aarch64_regs_info): New function.
10827 (the_low_target): Adjust.
10828 (initialize_low_arch): New function.
10829 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10831 (target_regsets): Rename to ...
10832 (tile_regsets): ... this.
10833 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10834 (tile_regs_info): New function.
10835 (tile_arch_setup): Set the current process'es tdesc.
10836 (the_low_target): Adjust.
10837 (initialize_low_arch): New function.
10838 * spu-low.c (tdesc_spu): Declare.
10839 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10840 * win32-arm-low.c (tdesc_arm): Declare.
10841 (arm_arch_setup): New function.
10842 (the_low_target): Install arm_arch_setup instead of
10843 init_registers_arm.
10844 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10845 (init_windows_x86): Rename to ...
10846 (i386_arch_setup): ... this. Set `win32_tdesc'.
10847 (the_low_target): Adjust.
10848 * win32-low.c (win32_tdesc): New global.
10849 (child_add_thread): Don't create the thread cache here.
10850 (do_initial_child_stuff): Set the new process'es tdesc.
10851 * win32-low.h (struct target_desc): Forward declare.
10852 (win32_tdesc): Declare.
10853 * lynx-i386-low.c (tdesc_i386): Declare global.
10854 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10855 * lynx-low.c (lynx_tdesc): New global.
10856 (lynx_add_process): Set the new process'es tdesc.
10857 * lynx-low.h (struct target_desc): Forward declare.
10858 (lynx_tdesc): Declare global.
10859 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10860 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10861 * nto-low.c (nto_tdesc): New global.
10862 (do_attach): Set the new process'es tdesc.
10863 * nto-low.h (struct target_desc): Forward declare.
10864 (nto_tdesc): Declare.
10865 * nto-x86-low.c (tdesc_i386): Declare.
10866 (nto_x86_arch_setup): Set `nto_tdesc'.
10868 2013-06-04 Gary Benson <gbenson@redhat.com>
10870 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10871 to qSupported response when appropriate.
10872 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10873 with nonzero-length annex.
10874 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10875 arguments supplied in annex.
10877 2013-05-31 Doug Evans <dje@google.com>
10880 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10881 64 bits in 64-cross-32 environment.
10883 2013-05-28 Pedro Alves <palves@redhat.com>
10885 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10886 (aarch64-without-fpu.c): Delete rule.
10887 * configure.srv (aarch64*-*-linux*): Remove references to
10888 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10889 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10892 2013-05-24 Pedro Alves <palves@redhat.com>
10894 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10895 instead of strchr/decode_address. Error if the range isn't split
10896 with a ','. Don't assume there's be a ':' in the action.
10898 2013-05-23 Yao Qi <yao@codesourcery.com>
10899 Pedro Alves <palves@redhat.com>
10901 * linux-low.c (lwp_in_step_range): New function.
10902 (linux_wait_1): If the thread was range stepping and stopped
10903 outside the stepping range, report the stop to GDB. Otherwise,
10904 continue stepping. Add range stepping debug output.
10905 (linux_set_resume_request): Copy the step range from the resume
10906 request to the lwp.
10907 (linux_supports_range_stepping): New.
10908 (linux_target_ops) <supports_range_stepping>: Set to
10909 linux_supports_range_stepping.
10910 * linux-low.h (struct linux_target_ops)
10911 <supports_range_stepping>: New field.
10912 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10913 * linux-x86-low.c (x86_supports_range_stepping): New.
10914 (the_low_target) <supports_range_stepping>: Set to
10915 x86_supports_range_stepping.
10916 * server.c (handle_v_cont): Handle 'r' action.
10917 (handle_v_requests): Append ";r" if the target supports range
10919 * target.h (struct thread_resume) <step_range_start,
10920 step_range_end>: New fields.
10921 (struct target_ops) <supports_range_stepping>:
10923 (target_supports_range_stepping): New macro.
10925 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10927 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10928 confusion in comment.
10930 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10932 * lynx-low.c (struct process_info_private): New type.
10933 (lynx_add_process): New function.
10934 (lynx_create_inferior, lynx_attach): Replace calls to
10935 add_process by calls to lynx_add_process.
10936 (lynx_resume): If PTID is null, then try using
10937 current_process()->private->last_wait_event_ptid.
10939 (lynx_clear_inferiors): Delete. The contents of that function
10940 has been inlined in lynx_mourn;
10941 (lynx_wait_1): Save the ptid in the process's private data.
10942 (lynx_mourn): Free the process' private data. Replace call
10943 to lynx_clear_inferiors by call to clear_inferiors.
10945 2013-05-17 Yao Qi <yao@codesourcery.com>
10947 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10950 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10952 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10953 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10954 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10955 PT_TEXT_END_ADDR guards. Update comments.
10956 (linux_target_op) <read_offsets>: Conditionally define to
10957 linux_read_offsets if the target is UCLIBC and if it defines
10958 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10960 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10961 Andrew Jenner <andrew@codesourcery.com>
10963 * Makefile.in (SFILES): Add linux-nios2-low.c.
10964 (clean): Add action to delete nios2-linux.c.
10965 (nios2-linux.c): New rule.
10966 * configure.srv: Add nios2*-*-linux*.
10967 * linux-nios2-low.c: New.
10969 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10971 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10973 2013-04-25 Hui Zhu <hui@codesourcery.com>
10976 * ax.c (ax_printf): Add fflush.
10978 2013-04-22 Tom Tromey <tromey@redhat.com>
10980 * Makefile.in (SFILES): Add filestuff.c.
10981 (OBS): Add filestuff.o.
10982 (filestuff.o): New target.
10983 * config.in, configure: Rebuild.
10984 * configure.ac: Check for fdwalk, pipe2.
10986 2013-04-17 Pedro Alves <palves@redhat.com>
10988 * configure.ac (USE_THREAD_DB): Delete variable.
10989 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10990 Don't AC_SUBST USE_THREAD_DB.
10991 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10992 * config.in, configure: Regenerate.
10994 2013-04-16 Pedro Alves <palves@redhat.com>
10996 * linux-low.h (struct lwp_info) <thread_known>: Move under
10997 the USE_THREAD_DB #ifdef.
10999 2013-04-16 Pedro Alves <palves@redhat.com>
11001 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11002 (linux-low.o): Delete rule.
11003 * linux-low.h: Always include "gdb_thread_db.h" instead of
11004 conditionally including thread_db.h.
11005 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11008 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11010 * Makefile.in (install-only): Fix make install regression.
11012 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11014 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11015 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11017 * gdbserver.1: Remove.
11019 2013-03-22 Pedro Alves <palves@redhat.com>
11021 * linux-low.c (handle_extended_wait): Don't call
11022 linux_enable_event_reporting.
11024 2013-03-15 Tony Theodore <tonyt@logyst.com>
11027 * Makefile.in (SHELL): Use @SHELL@.
11029 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11031 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11034 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11036 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11037 Remove extraneous NULL element.
11039 2013-03-13 Yao Qi <yao@codesourcery.com>
11041 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11042 'V' block in trace frame.
11044 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11046 * target.h (struct target_ops): Add btrace ops.
11047 (target_supports_btrace): New macro.
11048 (target_enable_btrace): New macro.
11049 (target_disable_btrace): New macro.
11050 (target_read_btrace): New macro.
11051 * gdbthread.h (struct thread_info): Add btrace field.
11052 * server.c: Include btrace-common.h.
11053 (handle_btrace_general_set): New function.
11054 (handle_btrace_enable): New function.
11055 (handle_btrace_disable): New function.
11056 (handle_general_set): Call handle_btrace_general_set.
11057 (handle_qxfer_btrace): New function.
11058 (struct qxfer qxfer_packets[]): Add btrace entry.
11059 * inferiors.c (remove_thread): Disable btrace.
11060 * linux-low: Include linux-btrace.h.
11061 (linux_low_enable_btrace): New function.
11062 (linux_low_read_btrace): New function.
11063 (linux_target_ops): Add btrace ops.
11064 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11065 Add srv_linux_btrace=yes.
11066 (x86_64-*-linux*): Add linux-btrace.o.
11067 Add srv_linux_btrace=yes.
11068 * configure.ac: Define HAVE_LINUX_BTRACE.
11069 * config.in: Regenerated.
11070 * configure: Regenerated.
11072 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11074 * server.c (handle_qxfer): Preserve error message if -3 is
11076 (qxfer): Document the -3 return value.
11078 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11080 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11081 (linux_btrace_h): New variable.
11082 (linux-btrace.o): New rule.
11084 2013-03-08 Stan Shebs <stan@codesourcery.com>
11085 Hafiz Abid Qadeer <abidh@codesourcery.com>
11087 * tracepoint.c (trace_buffer_size): New global.
11088 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11089 (init_trace_buffer): Change to one-argument function. Allocate
11090 trace buffer memory.
11091 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11092 handle QTBuffer:size packet.
11093 (cmd_bigqtbuffer_size): New function.
11094 (initialize_tracepoint): Call init_trace_buffer with
11095 DEFAULT_TRACE_BUFFER_SIZE.
11096 * server.c (handle_query): Add QTBuffer:size in the
11099 2013-03-07 Yao Qi <yao@codesourcery.com>
11101 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11102 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11104 (cmd_qtsp): Adjust condition. Do post increment.
11105 Set cur_action and cur_step_action back to 0.
11107 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11110 * linux-low.c (linux_write_memory): Return early success if LEN is
11113 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11115 * configure.srv: Add x86_64-*-cygwin* as target.
11117 2013-02-28 Tom Tromey <tromey@redhat.com>
11119 * configure.ac: Invoke AC_SYS_LARGEFILE.
11120 * configure, config.in: Rebuild.
11122 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11124 * win32-low.c: Throughout, fix format strings and casts of
11125 printf-like functions to avoid type related warnings on all
11127 (get_child_debug_event): Print dwDebugEventCode as hex since
11128 that's how it's usually documented.
11130 2013-02-28 Yao Qi <yao@codesourcery.com>
11132 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11135 2013-02-27 Jiong Wang <jiwang@tilera.com>
11137 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11138 (reg-tilegx32.c): New rule.
11139 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11140 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11141 different register info initializer according to elf class.
11142 (init_registers_tilgx32): New function. The tilegx32 register info
11144 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11145 (tile_store_gregset): Likewise.
11147 2013-02-27 Yao Qi <yao@codesourcery.com>
11149 * server.c (process_point_options): Print debug message when
11150 debug_threads is true.
11152 2013-02-26 Yao Qi <yao@codesourcery.com>
11154 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11156 2013-02-19 Pedro Alves <palves@redhat.com>
11157 Kai Tietz <ktietz@redhat.com>
11161 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11162 instead of strtoul to extract address from packet.
11163 (process_serial_event) <'z'>: Likewise.
11165 2013-02-18 Yao Qi <yao@codesourcery.com>
11167 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11169 2013-02-14 Pedro Alves <palves@redhat.com>
11173 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11174 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11176 2013-02-14 Pedro Alves <palves@redhat.com>
11178 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11180 2013-02-14 Pedro Alves <palves@redhat.com>
11182 * tracepoint.c (save_string): Delete.
11183 (add_tracepoint_action): Use savestring instead of save_string.
11185 2013-02-12 Pedro Alves <palves@redhat.com>
11187 * linux-xtensa-low.c: Ditto.
11188 * xtensa-xtregs.c: Ditto.
11190 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11192 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11195 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11197 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11198 aarch64_num_wp_regs and aarch64_num_bp_regs to
11199 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11201 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11203 * linux-aarch64-low.c (ps_get_thread_area): Replace
11204 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11206 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11207 Marcus Shawcroft <marcus.shawcroft@arm.com>
11208 Nigel Stephens <nigel.stephens@arm.com>
11209 Yufeng Zhang <yufeng.zhang@arm.com>
11211 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11212 (aarch64.c, aarch64-without-fpu.c): New targets.
11213 * configure.srv (aarch64*-*-linux*): New.
11214 * linux-aarch64-low.c: New file.
11216 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11218 * linux-low.c (handle_extended_wait, linux_create_inferior)
11219 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11220 (dequeue_one_deferred_signal, linux_resume_one_thread)
11221 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11222 (linux_tracefork_grandchild, linux_test_for_tracefork)
11223 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11224 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11225 where the argument is 0.
11227 2013-01-25 Yao Qi <yao@codesourcery.com>
11229 * event-loop.c: Include "queue.h".
11230 (gdb_event_p): New typedef.
11231 (struct gdb_event) <next_event>: Remove.
11232 (event_queue): Change to QUEUE(gdb_event_p).
11233 (async_queue_event): Remove.
11234 (gdb_event_xfree): New.
11235 (initialize_event_loop): New.
11236 (process_event): Use API from QUEUE.
11237 (wait_for_event): Likewise.
11238 * server.c (main): Call initialize_event_loop.
11239 * server.h (initialize_event_loop): Declare.
11241 2013-01-18 Yao Qi <yao@codesourcery.com>
11243 * ax.h (struct eval_agent_expr_context): New.
11244 (gdb_eval_agent_expr): Update declaration.
11245 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11246 TFRAME. Add new argument CTX.
11247 * server.h (struct eval_agent_expr_context): Declare.
11248 (agent_mem_read, agent_tsv_read): Update declaration.
11249 (agent_mem_read_string): Likewise.
11250 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11251 (add_traceframe_block): Add new argument TPOINT.
11252 Increase TPOINT->traceframe_usage.
11253 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11254 eval_tracepoint_agent_expr.
11255 (condition_true_at_tracepoint): Likewise.
11256 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11257 (agent_mem_read_string, agent_tsv_read): Likewise.
11259 2013-01-16 Yao Qi <yao@codesourcery.com>
11261 * linux-low.c (linux_resume_one_lwp): Don't check
11262 'lwp->bp_reinsert != 0'.
11264 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11265 Pedro Alves <palves@redhat.com>
11267 * lynx-low.c (ptrace_request_to_str): Define a temporary
11268 macro and use it to simplify this function's implementation.
11270 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11272 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11275 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11277 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11279 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11281 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11283 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11285 * lynx-low.c (lynx_resume): Use the resume_info parameter
11286 to determine the ptid for the lynx_ptrace call, unless
11287 it is equal to minus_one_ptid, in which case we use the
11288 ptid of the current_inferior.
11289 (lynx_wait_1): After having received a thread create/exit
11290 event, resume the inferior's execution using the signaling
11291 thread's ptid, rather than the old ptid.
11293 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11295 * lynx-low.c (lynx_resume): Delete variable ret.
11297 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11299 * gdbreplay.c (gdbreplay_version): Update copyright year.
11300 * server.c (gdbserver_version): Likewise.
11302 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11304 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11307 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11309 * lynx-low.c (ptrace_request_to_str): Add handling for
11310 PTRACE_GETTRACESIG.
11312 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11314 * lynx-low.c (lynx_attach): Delete variable new_process.
11316 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11318 * lynx-low.c (lynx_create_inferior): Delete variable
11321 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11323 * lynx-low.c (ptrace_request_to_str): Do not handle
11324 PTRACE_GETTHREADLIST if this macro does not exist.
11326 2012-12-15 Yao Qi <yao@codesourcery.com>
11328 * Makefile.in (OBS): Add notif.o.
11329 * notif.c, notif.h: New.
11330 * server.c: Include "notif.h".
11331 (struct vstop_notif) <next>: Remove.
11333 (queue_stop_reply): Update.
11334 (push_event, send_next_stop_reply): Remove.
11335 (discard_queued_stop_replies): Update.
11336 (notif_stop): New variable.
11337 (handle_v_stopped): Remove.
11338 (handle_v_requests): Don't call handle_v_stopped. Call
11339 handle_ack_notif instead.
11340 (queue_stop_reply_callback): Call notif_event_enque instead
11341 of queue_stop_reply.
11342 (handle_status): Don't call send_next_stop_reply, call
11343 notif_write_event instead.
11344 (kill_inferior_callback): Likewise.
11345 (detach_or_kill_inferior_callback): Likewise.
11346 (main): Call initialize_notif.
11347 (process_serial_event): Call QUEUE_is_empty.
11348 (handle_target_event): Call notif_push instead of push event.
11349 * server.h (push_event): Remove declaration.
11351 2012-12-10 Tom Tromey <tromey@redhat.com>
11353 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11354 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11357 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11358 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11359 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11360 (amd64-linux-ipa.o, ax.o): Rewrite.
11361 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11362 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11363 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11364 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11365 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11366 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11367 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11368 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11369 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11370 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11371 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11372 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11373 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11374 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11375 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11376 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11377 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11378 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11379 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11380 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11381 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11382 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11383 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11384 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11385 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11386 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11387 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11388 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11389 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11390 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11391 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11392 (reg-tilegx.o): Remove.
11393 (all_object_files): New macro.
11394 Include .deps files.
11395 * aclocal.m4, configure: Rebuild.
11396 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11397 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11398 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11400 2012-12-05 Tom Tromey <tromey@redhat.com>
11403 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11405 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11407 * configure.ac: Check for linux/perf_event.h.
11408 * config.in: Regenerated.
11409 * configure: Regenerated.
11411 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11413 * hostio.c (handle_readlink): Decrease buffer size
11414 parameter passed to readlink by one byte.
11416 2012-11-26 Yao Qi <yao@codesourcery.com>
11418 * configure.ac (build_warnings): Append '-Wempty-body'.
11419 * configure: Regenerated.
11420 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11423 2012-11-15 Pierre Muller <muller@sourceware.org>
11425 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11426 * config.in: Regenerate.
11427 * configure: Regenerate.
11428 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11429 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11430 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11431 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11433 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11434 instead of <sys/wait.h> header.
11435 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11437 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11439 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11440 (various make rules): Remove -DGDBSERVER
11442 2012-11-09 Yao Qi <yao@codesourcery.com>
11444 * spu-low.c (current_ptid): Move it to ..
11445 * gdbthread.h: ... here. New.
11446 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11447 * server.c (myresume, process_serial_event): Likewise.
11448 * thread-db.c (thread_db_find_new_threads): Likewise.
11449 * tracepoint.c (run_inferior_command): Likewise.
11451 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11453 * server.c (handle_search_memory_1): Include access length in
11456 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11458 * linux-crisv32-low.c: Fix compile errors.
11460 2012-09-04 Yao Qi <yao@codesourcery.com>
11462 * tracepoint.c (cmd_qtsv): Adjust debug message.
11463 Don't check CUR_TPOINT.
11465 2012-08-28 Yao Qi <yao@codesourcery.com>
11467 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11468 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11469 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11470 Remove declarations of xmalloc, xreallloc, xstrdup and
11472 * Makefile.in (libiberty_h): New.
11473 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11474 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11476 2012-08-23 Yao Qi <yao@codesourcery.com>
11478 * server.h: Remove declaration of 'xsnprintf'.
11480 2012-08-22 Keith Seitz <keiths@redhat.com>
11482 * server.h: Include build-gnulib-gbserver/config.h.
11483 * gdbreplay.c: Likewise.
11485 2012-08-08 Doug Evans <dje@google.com>
11487 * Makefile.in (SFILES): Add gdb_vecs.c.
11488 (OBS): Add gdb_vecs.o.
11489 (gdb_vecs_h, host_defs_h): New variables.
11490 (thread-db.o): Add $(gdb_vecs_h) dependency.
11491 (gdb_vecs.o): New rule.
11492 * thread-db.c: #include "gdb_vecs.h".
11493 (thread_db_load_search): Use a vector to iterate over path elements.
11494 Handle text appearing after "$pdir".
11496 * configure.ac: Add check for strstr.
11497 * config.in: Regenerate.
11498 * configure: Regenerate.
11500 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11502 * hostio.c (handle_pread): If pread fails, fall back to attempting
11504 (handle_pwrite): Likewise for pwrite.
11506 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11508 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11509 between unsupported TYPE and unimplementable ADDR/LEN combination.
11510 (arm_insert_point): Act on new return value.
11512 2012-07-31 Pedro Alves <palves@redhat.com>
11514 * server.c (process_point_options): Only skip tokens if we find
11515 one that is unrecognized. Don't treat 'X' specially while
11516 skipping unrecognized tokens.
11518 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11520 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11521 to 4-byte-align HW breakpoint addresses for Thumb.
11523 2012-07-27 Yao Qi <yao@codesourcery.com>
11527 * server.h: Declare gdb_agent_about_to_close.
11528 * target.c (kill_inferior): Include "agent.h".
11529 New. Send command 'kill'.
11530 * target.h (kill_inferior): Removed macro.
11531 * tracepoint.c (gdb_agent_about_to_close): New.
11532 (gdb_agent_helper_thread): Handle command 'close'.
11533 Wait endlessly until the inferior stops.
11534 Install gdb_agent_remove_socket to atexit hook.
11535 (agent_socket_name): New static variable.
11536 (gdb_agent_socket_init): Replace local variable 'name' with
11537 'agent_socket_name'.
11538 (gdb_agent_remove_socket): New.
11540 2012-07-27 Yao Qi <yao@codesourcery.com>
11542 * server.c (process_point_options): Stop at 'X' when parsing.
11544 2012-07-19 Michael Eager <eager@eagercon.com>
11546 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11548 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11549 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11550 hardware breakpoint.
11552 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11554 * gdbserver/linux-low.c (initialize_low): Call
11555 linux_ptrace_init_warnings.
11557 2012-07-02 Doug Evans <dje@google.com>
11559 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11562 2012-07-02 Stan Shebs <stan@codesourcery.com>
11564 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11565 (ax.o): Add it to build rule.
11567 (OBS): Add format.o.
11568 (IPA_OBS): Add format.o.
11569 * server.c (handle_query): Claim support for breakpoint commands.
11570 (process_point_options): Add command case.
11571 (process_serial_event): Leave running if there are printfs in
11573 * mem-break.h (any_persistent_commands): Declare.
11574 (add_breakpoint_commands): Declare.
11575 (gdb_no_commands_at_breakpoint): Declare.
11576 (run_breakpoint_commands): Declare.
11577 * mem-break.c (struct point_command_list): New struct.
11578 (struct breakpoint): New field command_list.
11579 (any_persistent_commands): New function.
11580 (add_commands_to_breakpoint): New function.
11581 (add_breakpoint_commands): New function.
11582 (gdb_no_commands_at_breakpoint): New function.
11583 (run_breakpoint_commands): New function.
11584 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11586 * ax.c: Include format.h.
11587 (ax_printf): New function.
11588 (gdb_eval_agent_expr): Add printf opcode.
11590 2012-06-13 Yao Qi <yao@codesourcery.com>
11592 * server.c (start_inferior): Remove duplicated writes to fields
11593 'last_resume_kind' and 'last_status' of 'current_inferior'.
11595 2012-06-12 Yao Qi <yao@codesourcery.com>
11596 Pedro Alves <palves@redhat.com>
11598 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11600 * server.c (handle_v_cont): Extend comment.
11602 2012-06-11 Yao Qi <yao@codesourcery.com>
11604 * linux-low.c (linux_attach): Add 'static'.
11606 2012-06-06 Yao Qi <yao@codesourcery.com>
11608 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11610 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11612 Fix gcc -flto compilation warning.
11613 * server.c (main): Make variable multi_mode and attach volatile.
11615 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11617 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11618 if the platform doesn't know about it.
11620 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11622 * Makefile.in (SFILES): Add linux-tile-low.c.
11623 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11624 * configure.srv: Handle tilegx-*-linux*.
11625 * linux-tile-low.c: New file.
11627 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11629 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11631 2012-05-24 Pedro Alves <palves@redhat.com>
11635 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11637 2012-05-24 Pedro Alves <palves@redhat.com>
11641 Replace target_signal with gdb_signal throughout.
11643 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11645 * linux-low.c (linux_store_registers): Avoid the copying sequence
11646 when no data has been retrieved by ptrace.
11648 2012-05-22 Will Deacon <will.deacon@arm.com>
11650 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11651 Include asm/ptrace.h.
11652 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11655 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11657 * linux-low.c (linux_store_registers): Don't re-retrieve data
11658 with ptrace that has already been obtained from /proc. Always
11659 copy any data retrieved with ptrace to the buffer supplied.
11661 2012-05-11 Yao Qi <yao@codesourcery.com>
11662 Pedro Alves <palves@redhat.com>
11664 * linux-low.c (enum stopping_threads_kind): New.
11665 (stopping_threads): Change type to `enum stopping_threads_kind'.
11666 (handle_extended_wait): If stopping and suspending threads, leave
11667 the new_lwp suspended too.
11668 (linux_wait_for_event): Adjust.
11669 (stop_all_lwps): Set `stopping_threads' to
11670 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11671 whether we're suspending threads or just stopping them. Assert no
11674 2012-04-29 Yao Qi <yao@codesourcery.com>
11676 * server.h: Move some code to ...
11677 * gdbthread.h: ... here. New.
11678 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11679 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11680 (nto-low.o, win32-low.o): Likewise.
11681 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11682 * regcache.c, remote-utils.c, server.c: Likewise.
11683 * target.c, tracepoint.c, win32-low.c: Likewise.
11685 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11687 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11688 (PTRACE_ARG4_TYPE): Likewise.
11689 (PTRACE_XFER_TYPE): Likewise.
11690 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11691 ptrace to PTRACE_ARG3_TYPE.
11692 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11693 (PTRACE_ARG4_TYPE): Likewise.
11694 (PTRACE_XFER_TYPE): Likewise.
11695 (linux_detach_one_lwp): Cast fourth argument of
11696 ptrace to long then PTRACE_ARG4_TYPE.
11697 (regsets_fetch_inferior_registers): Cast third argument of
11698 ptrace to long then PTRACE_ARG3_TYPE.
11699 (regsets_store_inferior_registers): Likewise.
11701 2012-04-20 Pedro Alves <palves@redhat.com>
11703 * configure: Regenerate.
11705 2012-04-19 Pedro Alves <palves@redhat.com>
11707 * Makefile.in (GNULIB_BUILDDIR): New.
11708 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11709 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11710 (all, install-only, uninstall, clean-info, all-lib, clean): No
11711 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11712 (maintainer-clean realclean distclean): Use subdir_do.
11714 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11715 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11716 * acinclude.m4: Include acx_configure_dir.m4.
11717 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11718 calls. Call AC_PROG_RANLIB. Configure gnulib using
11721 (GNULIB_STDINT_H): Adjust.
11722 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11723 * gdbreplay.c: Include build-gnulib/config.h.
11724 * server.h: Likewise.
11725 * aclocal.m4: Regenerate.
11726 * config.in: Regenerate.
11727 * configure: Regenerate.
11729 2012-04-19 Pedro Alves <palves@redhat.com>
11731 * Makefile.in (LIBGNU, INCGNU): Adjust.
11732 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11733 (all, install-only, uninstall, clean-info, all-lib, clean)
11734 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11735 * configure.ac: Adjust AC_OUTPUT output.
11736 * aclocal.m4: Regenerate.
11737 * configure: Regenerate.
11739 2012-04-19 Pedro Alves <palves@redhat.com>
11741 * Makefile.in (generated_files): New.
11742 (server_h): Remove the explicit dependency on config.h, and depend
11743 on $generated_files.
11745 2012-04-19 Pedro Alves <palves@redhat.com>
11747 * Makefile.in (INCGNU): Add -Ignulib.
11749 2012-04-19 Pedro Alves <palves@redhat.com>
11751 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11752 (INCGNU): ... this, and spell out -I here.
11753 (GNULIB_LIB): Rename to ...
11754 (LIBGNU): ... this.
11755 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11757 2012-04-19 Pedro Alves <palves@redhat.com>
11759 * config.in: Regenerate.
11761 2012-04-19 Pedro Alves <palves@redhat.com>
11763 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11764 * server.h (memmem): Remove declaration.
11765 * config.in: Regenerate.
11766 * configure: Regenerate.
11768 2012-04-19 Yao Qi <yao@codesourcery.com>
11770 * Makefile.in (SFILES): Add common/vec.c.
11774 2012-04-19 Yao Qi <yao@codesourcery.com>
11776 * remote-utils.c (prepare_resume_reply): Replace with macro
11777 target_core_of_thread.
11778 * server.c (handle_qxfer_threads_proper): Likewise.
11779 * target.h (traget_core_of_thread): New macro.
11781 2012-04-18 Pedro Alves <palves@redhat.com>
11783 * aclocal.m4: Regenerate.
11784 * configure: Regenerate.
11786 2012-04-16 Yao Qi <yao@codesourcery.com>
11788 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11789 duplicated on address.
11791 2012-04-16 Yao Qi <yao@codesourcery.com>
11793 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11794 (struct tracepoint_action_ops) <send>: New field.
11795 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11796 (agent_expr_send, x_tracepoint_action_send): New.
11797 (l_tracepoint_action_send): New.
11798 (cmd_qtdp): Download and install tracepoint
11799 according to `use_agent'.
11800 (run_inferior_command): Add one more parameter `len'.
11802 (tracepoint_send_agent): New.
11803 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11805 2012-04-16 Yao Qi <yao@codesourcery.com>
11807 * tracepoint.c (download_tracepoints): Moved to ...
11808 (cmd_qtstart): ... here.
11810 2012-04-14 Yao Qi <yao@codesourcery.com>
11812 * tracepoint.c: Include inttypes.h.
11813 (struct collect_memory_action): Use sized types.
11814 (struct tracepoint): Likewise.
11815 (cmd_qtdp, stop_tracing): Update print specifiers.
11816 (cmd_qtp, response_tracepoint): Likewise.
11817 (collect_data_at_tracepoint): Likewise.
11818 (collect_data_at_step): Likewise.
11820 2012-04-14 Yao Qi <yao@codesourcery.com>
11822 Import gnulib module inttypes.
11823 * aclocal.m4, config.in, configure: Regenerated.
11825 2012-04-14 Yao Qi <yao@codesourcery.com>
11827 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11828 Makefile and config.status at last.
11830 2012-04-13 Yao Qi <yao@codesourcery.com>
11832 * tracepoint.c: Include stdint.h unconditionally.
11834 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11836 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11837 on BFD_HAVE_SYS_PROCFS_TYPE.
11838 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11839 * configure: Regenerate.
11840 * config.in: Likewise.
11842 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11844 * Makefile.in (clean): Also remove x32.c x32-linux.c
11845 x32-avx.c x32-avx-linux.c.
11846 (x32.o): New target.
11848 (x32-linux.o): Likewise.
11849 (x32-linux.c): Likewise.
11850 (x32-avx.o): Likewise.
11851 (x32-avx.c): Likewise.
11852 (x32-avx-linux.o): Likewise.
11853 (x32-avx-linux.c): Likewise.
11855 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11856 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11857 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11858 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11859 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11860 i386/x32-avx-linux.xml.
11862 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11863 (init_registers_x32_avx_linux): Likwise.
11864 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11865 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11867 2012-04-13 Pedro Alves <palves@redhat.com>
11869 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11870 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11871 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11872 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11875 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11877 * linux-x86-low.c (compat_x32_clock_t): New.
11878 (compat_x32_siginfo_t): Likewise.
11879 (compat_x32_siginfo_from_siginfo): Likewise.
11880 (siginfo_from_compat_x32_siginfo): Likewise.
11881 (linux_is_elf64): Likewise.
11882 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11883 and siginfo_from_compat_x32_siginfo for x32.
11884 (x86_arch_setup): Set linux_is_elf64.
11886 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11889 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11891 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11892 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11893 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11894 compatible with process.
11896 2012-04-12 Yao Qi <yao@codesourcery.com>
11898 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11899 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11900 (install-only, install-info, clean): Handle sub dir gnulib.
11901 (all-lib, am--refresh): New targets.
11902 (memmem.o): Remove target.
11903 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11904 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11905 (AC_REPLACE_FUNCS): Remove memmem.
11906 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11907 (AC_OUTPUT): Generate Makefile in gnulib/.
11908 * aclocal.m4, config.in, configure: Regenerated.
11910 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11912 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11914 2012-04-05 Pedro Alves <palves@redhat.com>
11916 -Werror=strict-aliasing
11918 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11921 2012-04-04 Pedro Alves <palves@redhat.com>
11923 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11924 (sparc_store_gregset_from_stack, sparc_store_gregset)
11925 (sparc_breakpoint_at): Fix formatting.
11927 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11929 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11931 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11932 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11933 * config.in: Regenerate.
11934 * configure: Likewise.
11936 2012-03-29 Pedro Alves <palves@redhat.com>
11938 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11939 Correct ptrace arguments.
11941 2012-03-28 Pedro Alves <palves@redhat.com>
11943 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11944 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11945 (IA64_FR1_REGNUM): New defines.
11946 (ia64_fetch_register): New.
11947 (the_low_target): Install it.
11948 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11950 * linux-low.c (linux_fetch_registers): Try the
11951 the_low_target.fetch_register hook first.
11953 * linux-arm-low.c (the_low_target): Adjust.
11954 * linux-bfin-low.c (the_low_target): Adjust.
11955 * linux-cris-low.c (the_low_target): Adjust.
11956 * linux-crisv32-low.c (the_low_target): Adjust.
11957 * linux-m32r-low.c (the_low_target): Adjust.
11958 * linux-m68k-low.c (the_low_target): Adjust.
11959 * linux-mips-low.c (the_low_target): Adjust.
11960 * linux-ppc-low.c (the_low_target): Adjust.
11961 * linux-s390-low.c (the_low_target): Adjust.
11962 * linux-sh-low.c (the_low_target): Adjust.
11963 * linux-sparc-low.c (the_low_target): Adjust.
11964 * linux-tic6x-low.c (the_low_target): Adjust.
11965 * linux-x86-low.c (the_low_target): Adjust.
11966 * linux-xtensa-low.c (the_low_target): Adjust.
11968 2012-03-26 Pedro Alves <palves@redhat.com>
11970 * server.c (handle_qxfer_libraries): Don't bail early if
11971 the_target->qxfer_libraries_svr4 is not NULL.
11973 2012-03-26 Pedro Alves <palves@redhat.com>
11975 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11977 2012-03-23 Pedro Alves <palves@redhat.com>
11979 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11980 "library-list-svr4" element's start tag when the the DSO list is
11983 2012-03-23 Pedro Alves <palves@redhat.com>
11985 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11986 a variable whose type size is the same as the inferior's pointer
11989 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11991 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11993 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11994 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11995 * linux-low.h: Include <signal.h>.
11996 (struct siginfo): Remove forward declaration.
11997 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12000 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12002 * .gitignore: Ignore more files.
12004 2012-03-19 Pedro Alves <palves@redhat.com>
12005 Jan Kratochvil <jan.kratochvil@redhat.com>
12007 * server.c (cont_thread, general_thread): Add describing comments.
12008 (start_inferior): Clear `cont_thread'.
12009 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12012 2012-03-15 Yao Qi <yao@codesourcery.com>
12014 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12016 (cmd_qtdp): ... here.
12018 2012-03-15 Yao Qi <yao@codesourcery.com>
12020 * tracepoint.c (struct tracepoint_action_ops): New.
12021 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12022 (m_tracepoint_action_download): New.
12023 (r_tracepoint_action_download): New.
12024 (x_tracepoint_action_download): New.
12025 (l_tracepoint_action_download): New.
12026 (add_tracepoint_action): Install `action->ops' according type.
12027 (download_tracepoint_1): Move code `download' function pointer
12028 of various tracepoint_action_ops.
12030 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12032 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12033 linux_ptrace_attach_warnings.
12035 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12037 * Makefile.in (linux-ptrace.o): New.
12038 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12039 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12040 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12041 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12042 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12044 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12046 2012-03-08 Yao Qi <yao@codesourcery.com>
12047 Pedro Alves <palves@redhat.com>
12049 Fix PR server/13392.
12050 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12051 offset of JMP insn.
12052 * tracepoint.c (remove_tracepoint): New.
12053 (cmd_qtdp): Call remove_tracepoint when failed to install.
12055 2012-03-07 Pedro Alves <palves@redhat.com>
12057 * linux-low.c (get_detach_signal): New.
12058 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12059 Pass on pending signals to PTRACE_DETACH. Check the result of the
12061 * server.c (program_signals, program_signals_p): New.
12062 (handle_general_set): Handle QProgramSignals.
12063 * server.h (program_signals, program_signals_p): Declare.
12065 2012-03-05 Pedro Alves <palves@redhat.com>
12066 Jan Kratochvil <jan.kratochvil@redhat.com>
12068 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12071 2012-03-03 Yao Qi <yao@codesourcery.com>
12073 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12074 agent_look_up_symbols.
12076 2012-03-03 Yao Qi <yao@codesourcery.com>
12078 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12079 (linux-x86-low.o): Likewise.
12080 * server.h: Remove in_process_agent_loaded.
12081 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12085 2012-03-03 Yao Qi <yao@codesourcery.com>
12087 * tracepoint.c (gdb_agent_capability): New global.
12088 (in_process_agent_loaded_ust): Renamed to
12089 `in_process_agent_supports_ust'.
12091 (in_process_agent_supports_ust): Call agent_capability_check.
12092 (clear_installed_tracepoints): Assert that agent supports
12095 2012-03-03 Yao Qi <yao@codesourcery.com>
12097 * linux-low.c (linux_supports_agent): New.
12098 (linux_target_ops): Initialize field `supports_agent' with
12099 linux_supports_agent.
12100 * target.h (struct target_ops) <supports_agent>: New.
12101 (target_supports_agent): New macro.
12102 * server.c (handle_general_set): Handle packet 'QAgent'.
12103 (handle_query): Send `QAgent+'.
12104 * Makefile.in (server.o): Depends on agent.h.
12106 2012-03-03 Yao Qi <yao@codesourcery.com>
12108 * Makefile.in (OBS): Add agent.o.
12109 Add new rule for agent.o.
12110 Track dependence of tracepoint.c on agent.h.
12111 * tracepoint.c (run_inferior_command_1):
12112 (run_inferior_command): Call agent_run_command.
12113 (gdb_ust_connect_sync_socket): Deleted. Move it to
12115 (resume_thread, stop_thread): Likewise.
12116 (gdb_ust_socket_init): Renamed to ...
12117 (gdb_agent_socket_init): ... New.
12118 (gdb_ust_thread): Renamed to ...
12119 (gdb_agent_helper_thread): ... New.
12120 (gdb_ust_init): Move some code to ...
12121 (gdb_agent_init): ... here. New.
12122 [HAVE_UST]: Call gdb_ust_init.
12123 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12124 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12125 * config.in, configure: Regenerated.
12127 2012-03-02 Pedro Alves <palves@redhat.com>
12129 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12130 * linux-low.c (struct simple_pid_list): New.
12131 (stopped_pids): New a struct simple_pid_list pointer.
12132 (add_to_pid_list, pull_pid_from_list): New.
12133 (handle_extended_wait): Don't assume the first signal new children
12134 report is SIGSTOP. Adjust call to pull_pid_from_list.
12135 (linux_wait_for_lwp): Adjust.
12137 2012-03-02 Yao Qi <yao@codesourcery.com>
12139 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12142 2012-03-02 Yao Qi <yao@codesourcery.com>
12144 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12145 `stop_pc' and `tpoint'. Update caller.
12147 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12149 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12150 * linux-low.c (use_linux_regsets): New macro.
12151 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12152 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12153 (linux_register_in_regsets): New function.
12154 (usr_fetch_inferior_registers): Skip registers covered by
12156 (usr_store_inferior_registers): Likewise.
12157 (usr_fetch_inferior_registers): New macro.
12158 (usr_store_inferior_registers): Likewise.
12159 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12160 (linux_store_registers): Likewise.
12161 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12163 (init_registers_mips64_dsp_linux): Likewise.
12164 (init_registers_mips_linux): New macro.
12165 (init_registers_mips_dsp_linux): Likewise.
12166 (mips_dsp_num_regs): Likewise.
12167 (DSP_BASE, DSP_CONTROL): New fallback macros.
12168 (mips_base_regs): New macro.
12169 (mips_regmap): Use it. Fix the size.
12170 (mips_dsp_regmap): New variable.
12171 (mips_dsp_regset_bitmap): Likewise.
12172 (mips_arch_setup): New function.
12173 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12175 (mips_cannot_store_register): Likewise.
12176 (the_low_target): Update .arch_setup, .num_regs and .regmap
12177 initializers. Add .regset_bitmap initializer.
12178 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12180 * linux-bfin-low.c (the_low_target): Likewise.
12181 * linux-cris-low.c (the_low_target): Likewise.
12182 * linux-crisv32-low.c (the_low_target): Likewise.
12183 * linux-ia64-low.c (the_low_target): Likewise.
12184 * linux-m32r-low.c (the_low_target): Likewise.
12185 * linux-m68k-low.c (the_low_target): Likewise.
12186 * linux-ppc-low.c (the_low_target): Likewise.
12187 * linux-s390-low.c (the_low_target): Likewise.
12188 * linux-sh-low.c (the_low_target): Likewise.
12189 * linux-sparc-low.c (the_low_target): Likewise.
12190 * linux-tic6x-low.c (the_low_target): Likewise.
12191 * linux-x86-low.c (the_low_target): Likewise.
12192 * linux-xtensa-low.c (the_low_target): Likewise.
12193 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12194 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12195 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12197 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12198 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12200 2012-02-29 Yao Qi <yao@codesourcery.com>
12201 Pedro Alves <palves@redhat.com>
12203 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12204 `step_over_finished' is true.
12206 2012-02-27 Pedro Alves <palves@redhat.com>
12208 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12209 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12211 2012-02-27 Pedro Alves <palves@redhat.com>
12214 * linux-low.c (pid_is_stopped): New.
12215 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12217 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12219 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12222 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12224 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12226 2012-02-24 Luis Machado <lgustavo@codesourcery>
12228 * server.c (handle_query): Advertise support for target-side
12229 breakpoint condition evaluation.
12230 (process_point_options): New function.
12231 (process_serial_event): When inserting a breakpoint, check for
12232 a target-side condition that should be evaluated.
12234 * mem-break.c: Include regcache.h and ax.h.
12235 (point_cond_list_t): New data structure.
12236 (breakpoint) <cond_list>: New field.
12237 (find_gdb_breakpoint_at): Make non-static.
12238 (delete_gdb_breakpoint_at): Clear any target-side
12240 (clear_gdb_breakpoint_conditions): New function.
12241 (add_condition_to_breakpoint): Likewise.
12242 (add_breakpoint_condition): Likewise.
12243 (gdb_condition_true_at_breakpoint): Likewise.
12244 (gdb_breakpoint_here): Return result directly instead
12245 of going through a local variable.
12247 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12248 (clear_gdb_breakpoint_conditions): Likewise.
12249 (add_breakpoint_condition): Likewise.
12250 (gdb_condition_true_at_breakpoint): Likewise.
12252 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12253 (need_step_over_p): Take target-side breakpoint condition into
12256 2012-02-24 Luis Machado <lgustavo@codesourcery>
12258 * server.h: Include tracepoint.h.
12259 (agent_mem_read, agent_get_trace_state_variable_value,
12260 agent_set_trace_state_variable_value,
12261 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12262 get_set_tsv_func_addr): New prototypes.
12264 * ax.h: New include file.
12265 * ax.c: New source file.
12267 * tracepoint.c: Include ax.h.
12268 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12269 agent_expr, eval_result_type): Move to ax.h.
12270 (parse_agent_expr): Rename to ...
12271 (gdb_parse_agent_expr): ... this, make it non-static and move
12273 (unparse_agent_expr) Rename to ...
12274 (gdb_unparse_agent_expr): ... this, make it non-static and move
12276 (eval_agent_expr): Rename to ...
12277 (eval_tracepoint_agent_expr): ... this.
12278 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12279 forward declarations.
12280 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12281 (agent_get_trace_state_variable_value): New function.
12282 (agent_set_trace_state_variable_value): New function.
12283 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12284 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12285 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12286 (condition_true_at_tracepoint): Likewise.
12287 (parse_agent_expr): Rename to ...
12288 (gdb_parse_agent_expr): ... this and move to ax.c.
12289 (unparse_agent_expr): Rename to ...
12290 (gdb_unparse_agent_expr): ... this and move to ax.c.
12291 (gdb_agent_op_name): Move to ax.c.
12292 (eval_agent_expr): Rename to ...
12293 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12295 (eval_tracepoint_agent_expr): New function.
12296 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12298 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12300 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12301 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12302 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12303 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12304 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12305 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12306 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12307 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12308 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12309 (compile_bytecodes): Remove forward declaration.
12310 (is_goto_target): Move to ax.c.
12311 (compile_bytecodes): Move to ax.c and call
12312 agent_get_trace_state_variable_value (...) and
12313 agent_set_trace_state_variable_value (...).
12315 * Makefile.in: Update ax.c and IPA dependencies.
12317 2012-02-24 Pedro Alves <palves@redhat.com>
12319 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12320 (cmd_bigqtbuffer_circular): ... this. Only handle
12321 'QTBuffer:circular:'.
12322 (handle_tracepoint_general_set): Adjust.
12324 2012-02-16 Yao Qi <yao@codesourcery.com>
12326 * inferiors.c: Move code to ...
12327 * dll.c: .... here. New.
12328 * server.h: Declare clear_dlls.
12329 * Makefile.in (SFILES): Add dll.c.
12333 2012-02-11 Yao Qi <yao@codesourcery.com>
12335 * server.c: (handle_monitor_command): Add a new parameter
12337 (handle_query): Update caller.
12339 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12341 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12342 * configure, config.in: Regenerate.
12343 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12346 2012-02-02 Pedro Alves <palves@redhat.com>
12348 Try SIGKILL first, then PTRACE_KILL.
12349 * linux-low.c (linux_kill_one_lwp): New.
12350 (linux_kill_one_lwp): Rename to ...
12351 (kill_one_lwp_callback): ... this. Use the new
12352 linux_kill_one_lwp.
12354 2012-02-02 Pedro Alves <palves@redhat.com>
12356 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12359 2012-01-27 Pedro Alves <palves@redhat.com>
12361 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12362 (elf_64_file_p): Make static.
12363 (linux_pid_exe_is_elf_64_file): New.
12364 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12365 Delete declarations.
12366 (linux_pid_exe_is_elf_64_file): Declare.
12367 * linux-x86-low.c (x86_arch_setup): Use
12368 linux_pid_exe_is_elf_64_file.
12370 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12372 * linux-low.c (linux_wait_for_event_1): Rename to ...
12373 (linux_wait_for_event): ... here and merge it with former
12374 linux_wait_for_event - new variable wait_ptid, use it.
12375 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12377 2012-01-23 Pedro Alves <palves@redhat.com>
12379 * server.c (main): Avoid yet another case of infinite loop while
12380 detaching/killing after a longjmp.
12382 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12385 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12387 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12389 * hostio.c (handle_readlink): New function.
12390 (handle_vFile): Call it to handle "vFile:readlink" packets.
12392 2012-01-20 Pedro Alves <palves@redhat.com>
12393 Ulrich Weigand <ulrich.weigand@linaro.org>
12395 * server.c (handle_v_requests): Only support vAttach and vRun to
12396 start multiple processes when in extended protocol mode.
12398 2012-01-17 Pedro Alves <palves@redhat.com>
12400 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12401 memalign plus mprotect to allocate the scratch buffer.
12403 2012-01-13 Pedro Alves <palves@redhat.com>
12405 * server.c (attach_inferior): Clear `cont_thread'.
12407 2012-01-13 Pedro Alves <palves@redhat.com>
12409 * server.c (main): Avoid infinite loop while detaching/killing
12412 2012-01-09 Doug Evans <dje@google.com>
12414 * server.c (start_inferior): Set last_ptid in --wrapper case.
12416 2012-01-06 Yao Qi <yao@codesourcery.com>
12418 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12420 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12422 2012-01-04 Yao Qi <yao@codesourcery.com>
12424 * tracepoint.c (cmd_qtdp): Print debug message
12425 for static tracepoint.
12427 2012-01-04 Yao Qi <yao@codesourcery.com>
12429 * tracepoint.c (trace_vdebug): Differentiate debug message
12430 between gdbserver and IPA.
12432 2012-01-03 Yao Qi <yao@codesourcery.com>
12434 * tracepoint.c (tracepoint_was_hit): Don't collect for
12437 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12439 * terminal.h: Reformat copyright header.
12441 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12443 * server.c (gdbserver_version): Update copyright year.
12444 * gdbreplay.c (gdbreplay_version): Likewise.
12446 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12448 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12451 2011-12-18 Hui Zhu <teawater@gmail.com>
12452 * linux-low.c (linux_create_inferior): Save return value to ret.
12454 2011-12-18 Hui Zhu <teawater@gmail.com>
12456 * linux-low.c (linux_create_inferior): Save return value to ret.
12458 2011-12-16 Doug Evans <dje@google.com>
12460 * linux-low.c (linux_create_inferior): If stdio connection,
12461 redirect stdin from /dev/null, stdout to stderr.
12462 * remote-utils.c (remote_is_stdio): New static global.
12463 (remote_connection_is_stdio): New function.
12464 (remote_prepare): Handle stdio connection.
12465 (remote_open): Ditto.
12466 (remote_close): Don't close stdin for stdio connections.
12467 (read_prim,write_prim): New functions. Replace all calls to
12468 read/write to these.
12469 * server.c (main): Watch for "-" argument. Move call to
12470 remote_prepare before start_inferior.
12471 * server.h (STDIO_CONNECTION_NAME): New macro.
12472 (remote_connection_is_stdio): Declare.
12474 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12475 in debugging output.
12477 2011-12-15 Yao Qi <yao@codesourcery.com>
12479 * tracepoint.c: Include sys/syscall.h.
12480 (gdb_ust_thread): Remove preprocessor conditional.
12482 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12484 * linux-low.c (linux_detach_one_lwp): Call
12485 the_low_target.prepare_to_resume before detaching.
12487 2011-12-14 Yao Qi <yao@codesourcery.com>
12489 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12492 2011-12-14 Yao Qi <yao@codesourcery.com>
12494 * i386-low.c (i386_low_stopped_data_address): Initialize local
12495 variable `control'.
12497 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12501 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12502 DR_CONTROL unless necessary. Extend comments.
12503 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12504 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12506 2011-12-13 Yao Qi <yao@codesourcery.com>
12508 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12510 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12512 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12514 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12515 Print new debug message for such case.
12517 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12519 Fix overlapping memcpy.
12520 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12521 the read_inferior_memory transfer.
12522 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12523 write_inferior_memory transfer.
12524 (set_fast_tracepoint_jump): New variable buf. Use it for the
12525 read_inferior_memory and write_inferior_memory transfers.
12526 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12527 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12528 Use it for the write_inferior_memory transfer.
12529 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12532 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12534 * linux-low.c (fetch_register, store_register): Make code
12535 consistent, fix formatting.
12537 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12539 * linux-low.c (usr_store_inferior_registers): Factor out code
12540 to handle individual registers into...
12541 (store_register): ... this new function.
12543 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12545 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12546 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12547 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12548 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12549 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12550 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12551 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12552 (srv_xmlfiles): Add new XML files.
12554 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12556 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12557 (init_registers_s390_linux32v1): Add prototype.
12558 (init_registers_s390_linux32v2): Likewise.
12559 (init_registers_s390_linux64v1): Likewise.
12560 (init_registers_s390_linux64v2): Likewise.
12561 (init_registers_s390x_linux64v1): Likewise.
12562 (init_registers_s390x_linux64v2): Likewise.
12563 (s390_num_regs): Increment to 52.
12564 (s390_regmap): Add orig_r2 register.
12565 (s390_num_regs_3264): Increment to 68.
12566 (s390_regmap_3264): Add orig_r2 register.
12567 (s390_collect_ptrace_register): Handle orig_r2 register.
12568 (s390_supply_ptrace_register): Likewise.
12569 (s390_fill_last_break): New function.
12570 (s390_store_last_break): Likewise.
12571 (s390_fill_system_call): New function.
12572 (s390_store_system_call): Likewise.
12573 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12575 (s390_check_regset): New function.
12576 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12577 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12578 Update target_regsets for available register sets.
12580 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12581 Jan Kratochvil <jan.kratochvil@redhat.com>
12583 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12584 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12586 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12587 * linux-low.h (struct process_info_private): New member r_debug.
12588 * server.c (handle_qxfer_libraries): Call
12589 the_target->qxfer_libraries_svr4.
12590 (handle_qxfer_libraries_svr4): New function.
12591 (qxfer_packets): New entry "libraries-svr4".
12592 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12593 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12594 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12595 PACKET_qXfer_libraries_svr4.
12597 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12599 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12600 PSW address/mask between 8-byte and 16-byte formats.
12601 (s390_supply_ptrace_register): Likewise.
12602 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12603 basic addressing mode bit.
12605 2011-11-24 Stan Shebs <stan@codesourcery.com>
12607 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12609 2011-11-17 Stan Shebs <stan@codesourcery.com>
12611 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12612 (tracing_start_time): New global.
12613 (tracing_stop_time): New global.
12614 (tracing_user_name): New global.
12615 (tracing_notes): New global.
12616 (tracing_stop_note): New global.
12617 (cmd_qtstart): Set traceframe_usage, start_time.
12618 (stop_tracing): Set stop_time.
12619 (cmd_qtstatus): Report additional status.
12620 (cmd_qtp): New function.
12621 (handle_tracepoint_query): Call it.
12622 (cmd_qtnotes): New function.
12623 (handle_tracepoint_general_set): Call it.
12624 (get_timestamp): Rename from tsv_get_timestamp.
12626 2011-11-14 Stan Shebs <stan@codesourcery.com>
12627 Kwok Cheung Yeung <kcy@codesourcery.com>
12629 * linux-x86-low.c (small_jump_insn): New.
12630 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12631 trampoline and error message, build a trampoline and issue a small
12632 jump instruction to it.
12633 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12634 trampoline and error message.
12635 (x86_get_min_fast_tracepoint_insn_len): New.
12636 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12637 * linux-low.h (struct linux_target_ops): Add arguments to
12638 install_fast_tracepoint_jump_pad operation, add new operation.
12639 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12641 (linux_get_min_fast_tracepoint_insn_len): New function.
12642 (linux_target_op): Add new operation.
12643 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12644 (gdb_trampoline_buffer_end): Ditto.
12645 (gdb_trampoline_buffer_error): Ditto.
12646 (struct ipa_sym_addresses): Add fields for new IPA variables.
12647 (symbol_list): Add entries for new IPA variables.
12648 (struct tracepoint): Add fields to hold the address range of the
12649 trampoline used by the tracepoint.
12650 (trampoline_buffer_head): New static variable.
12651 (trampoline_buffer_tail): Ditto.
12652 (claim_trampoline_space): New function.
12653 (have_fast_tracepoint_trampoline_buffer): New function.
12654 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12656 (install_fast_tracepoint): Ditto, also add error buffer argument.
12657 (cmd_qtminftpilen): New function.
12658 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12659 (fast_tracepoint_from_trampoline_address): New function.
12660 (fast_tracepoint_collecting): Handle trampoline as part of jump
12662 (set_trampoline_buffer_space): New function.
12663 (initialize_tracepoint): Initialize new IPA variables.
12664 * target.h (struct target_ops): Add arguments to
12665 install_fast_tracepoint_jump_pad operation, add new
12666 get_min_fast_tracepoint_insn_len operation.
12667 (target_get_min_fast_tracepoint_insn_len): New.
12668 (install_fast_tracepoint_jump_pad): Add arguments.
12669 * server.h (IPA_BUFSIZ): Define.
12670 * linux-i386-ipa.c: Include extra header files.
12671 (initialize_fast_tracepoint_trampoline_buffer): New function.
12672 (initialize_low_tracepoint): Call it.
12673 * server.h (set_trampoline_buffer_space): Declare.
12674 (claim_trampoline_space): Ditto.
12675 (have_fast_tracepoint_trampoline_buffer): Ditto.
12677 2011-11-14 Yao Qi <yao@codesourcery.com>
12679 * server.c (handle_query): Handle InstallInTrace for qSupported.
12680 * tracepoint.c (add_tracepoint): Sort list.
12681 (install_tracepoint, download_tracepoint): New.
12682 (cmd_qtdp): Call them to install and download tracepoints.
12683 (sort_tracepoints): Removed.
12684 (cmd_qtstart): Update.
12686 2011-11-14 Yao Qi <yao@codesourcery.com>
12688 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12689 * mem-break.h: Declare.
12690 * tracepoint.c (cmd_qtstart): Move some code to ...
12691 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12693 (download_tracepoints): Move some code to ...
12694 (download_tracepoint_1): ... here. New.
12696 2011-11-08 Yao Qi <yao@codesourcery.com>
12698 * remote-utils.c (relocate_instruction): A comment fix.
12700 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12702 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12703 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12704 dr_status_mirror and dr_control_mirror from debug_reg_state.
12705 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12706 (i386_initial_stuff): Remove use of deleted globals.
12707 (i386_get_thread_context, i386_set_thread_context,
12708 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12709 from debug_reg_state.
12711 2011-11-05 Yao Qi <yao@codesourcery.com>
12713 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12714 address as TPOINT's.
12716 2011-11-02 Stan Shebs <stan@codesourcery.com>
12718 * tracepoint.c (agent_mem_read_string): New function.
12719 (eval_agent_expr): Call it for tracenz.
12720 * server.c (handle_query): Report support for tracenz.
12722 2011-11-02 Yao Qi <yao@codesourcery.com>
12724 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12726 2011-11-02 Yao Qi <yao@codesourcery.com>
12728 * target.h: Fix a typo in comment.
12730 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12732 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12733 clobber the breakpoints' shadows with fast tracepoint jumps.
12734 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12735 * target.c (write_inferior_memory): Also pass MYADDR down to
12738 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12740 * configure.ac: Check support for personality routine.
12741 * configure: Regenerate.
12742 * config.in: Likewise.
12743 * linux-low.c: Include <sys/personality.h>.
12744 Define ADDR_NO_RANDOMIZE if necessary.
12745 (linux_create_inferior): Disable address space randomization when
12746 forking inferior, if requested.
12747 (linux_supports_disable_randomization): New function.
12748 (linux_target_ops): Install it.
12749 * server.h (disable_randomization): Declare.
12750 * server.c (disable_randomization): New global variable.
12751 (handle_general_set): Handle QDisableRandomization.
12752 (handle_query): Likewise for qSupported.
12753 (main): Support --disable-randomization and --no-disable-randomization
12754 command line arguments.
12755 * target.h (struct target_ops): Add supports_disable_randomization.
12756 (target_supports_disable_randomization): New macro.
12758 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12760 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12762 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12763 [!PT_GETDSBT] (target_loadmap): New definition.
12764 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12765 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12766 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12767 and PT_GETDSBT to LINUX_LOADMAP.
12768 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12769 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12771 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12773 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12774 (arm_linux_hwbp_cap): New static variable.
12775 (arm_linux_get_hwbp_cap): Replace by ...
12776 (arm_linux_init_hwbp_cap): ... this new function.
12777 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12778 (arm_linux_get_hw_watchpoint_count): Likewise.
12779 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12780 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12781 (arm_prepare_to_resume): Use perror_with_name instead of error.
12783 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12785 * linux-arm-low.c: Include <signal.h>.
12786 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12787 (struct arm_linux_hwbp_cap): New data type.
12788 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12789 (struct arm_linux_hw_breakpoint): New data type.
12790 (MAX_BPTS, MAX_WPTS): Define.
12791 (struct arch_process_info, struct arch_lwp_info): New data types.
12792 (arm_linux_get_hwbp_cap): New function.
12793 (arm_linux_get_hw_breakpoint_count): Likewise.
12794 (arm_linux_get_hw_watchpoint_count): Likewise.
12795 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12796 (arm_hwbp_control_initialize): Likewise.
12797 (arm_hwbp_control_is_enabled): Likewise.
12798 (arm_hwbp_control_is_initialized): Likewise.
12799 (arm_hwbp_control_disable): Likewise.
12800 (arm_linux_hw_breakpoint_equal): Likewise.
12801 (arm_linux_hw_point_initialize): Likewise.
12802 (struct update_registers_data): New data structure.
12803 (update_registers_callback: New function.
12804 (arm_insert_point): Likewise.
12805 (arm_remove_point): Likewise.
12806 (arm_stopped_by_watchpoint): Likewise.
12807 (arm_stopped_data_address): Likewise.
12808 (arm_new_process): Likewise.
12809 (arm_new_thread): Likewise.
12810 (arm_prepare_to_resume): Likewise.
12811 (the_low_target): Register arm_insert_point, arm_remove_point,
12812 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12813 arm_new_thread, and arm_prepare_to_resume.
12815 2011-09-15 Stan Shebs <stan@codesourcery.com>
12817 * server.h (struct emit_ops): Add compare-goto fields.
12818 * tracepoint.c (gdb_agent_op_sizes): New table.
12819 (emit_eq_goto): New function.
12820 (emit_ne_goto): New function.
12821 (emit_lt_goto): New function.
12822 (emit_le_goto): New function.
12823 (emit_gt_goto): New function.
12824 (emit_ge_goto): New function.
12825 (is_goto_target): New function.
12826 (compile_bytecodes): Recognize special cases of compare-goto
12827 combinations and call specialized emitters for them.
12828 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12829 (amd64_emit_ne_goto): New function.
12830 (amd64_emit_lt_goto): New function.
12831 (amd64_emit_le_goto): New function.
12832 (amd64_emit_gt_goto): New function.
12833 (amd64_emit_ge_goto): New function.
12834 (amd64_emit_ops): Add the new functions.
12835 (i386_emit_eq_goto): New function.
12836 (i386_emit_ne_goto): New function.
12837 (i386_emit_lt_goto): New function.
12838 (i386_emit_le_goto): New function.
12839 (i386_emit_gt_goto): New function.
12840 (i386_emit_ge_goto): New function.
12841 (i386_emit_ops): Add the new functions.
12843 2011-09-08 Stan Shebs <stan@codesourcery.com>
12845 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12846 (i386_emit_epilogue): Restore %ebx.
12848 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12850 * server.c (step_thread): Remove definition.
12851 (process_serial_event): Don't handle Hs.
12852 * server.h (step_thread): Remove declaration.
12853 * target.c (set_desired_inferior): Remove use of step_thread.
12855 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12857 * linux-low.c: Include linux-procfs.h.
12858 (linux_attach_lwp_1): Update comments.
12859 (linux_attach): Scan for existing threads when attaching to a
12860 process that is the tgid.
12861 * Makefile.in: Update dependencies.
12863 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12865 * configure.srv: Add linux-procfs.o dependencies.
12867 2011-08-14 Yao Qi <yao@codesourcery.com>
12869 * target.h (struct target_ops): Fix indent.
12870 * win32-low.c (win32_target_ops): Fix comment.
12872 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12873 Yao Qi <yao@codesourcery.com>
12875 * Makefile.in (clean): Remove tic6x-*.c files.
12876 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12877 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12878 (tic6x-c64xp-linux.c): Likewise.
12879 * configure.srv: Add support for tic6x-*-uclinux.
12880 * linux-tic6x-low.c: New.
12881 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12883 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12884 Yao Qi <yao@codesourcery.com>
12886 * target.h (struct target_ops): Add read_loadmap.
12887 * linux-low.c (struct target_loadseg): New type.
12888 (struct target_loadmap): New type.
12889 (linux_read_loadmap): New function.
12890 (linux_target_ops): Add linux_read_loadmap.
12891 * server.c (handle_query): Support qXfer:fdpic:read packet.
12892 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12895 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12897 * win32-low.c: Include <stdint.h>.
12899 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12901 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12902 to the inferior here.
12903 (i386_remove_aligned_watchpoint): Ditto.
12904 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12905 fit part of the watchpoint in the debug registers.
12906 (i386_update_inferior_debug_regs): New.
12907 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12908 registers, and only update the inferior on success.
12909 (i386_low_remove_watchpoint): Ditto.
12911 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12913 * linux-low.c (compare_ints, unique, list_threads, show_process,
12914 linux_core_of_thread): Delete.
12915 (linux_target_ops): Change linux_core_of_thread to
12916 linux_common_core_of_thread.
12917 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12918 * utils.c (malloc_failure): Change type of argument.
12919 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12920 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12921 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12922 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12923 (IPA_OBJS): Add common-utils-ipa.o.
12924 (ptid_h, linux_osdata_h): New macros.
12925 (server_h): Add common/common-utils.h, common/xml-utils.h,
12926 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12928 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12929 ptid.o, buffer.o): New rules.
12930 (linux-low.o): Add common/linux-osdata.h as a dependency.
12931 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12932 * configure.ac: Add AC_HEADER_DIRENT check.
12933 * config.in: Regenerate.
12934 * configure: Regenerate.
12935 * remote-utils.c (xml_escape_text): Delete.
12936 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12937 buffer_xml_printf): Move to common/buffer.c.
12938 * server.c (main): Remove call to initialize_inferiors.
12939 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12940 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12941 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12942 internal_error, gdb_assert, gdb_assert_fail): Delete.
12943 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12944 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12946 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12947 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12948 initialize_inferiors): Delete.
12950 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12952 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12955 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12957 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12959 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12961 2011-05-26 Yao Qi <yao@codesourcery.com>
12963 * Makefile.in (thread-db.o): Track dependence to
12964 common/gdb_thread_db.h.
12965 * thread-db.c: include gdb_thread_db.h from right place.
12967 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12969 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12970 __FILE__ and __LINE__ to internal_error.
12972 2011-05-13 Doug Evans <dje@google.com>
12974 * thread-db.c (try_thread_db_load_from_sdir): New function.
12975 (try_thread_db_load_from_dir): New function.
12976 (thread_db_load_search): Handle $sdir, ignore $pdir.
12977 Remove trying of system directories if search of
12978 libthread-db-search-path fails, that is now done via $sdir.
12980 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12982 * server.c (handle_query): Add EnableDisableTracepoints to the list
12983 of supported features.
12984 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12986 (cmd_qtenable_disable): New.
12987 (cmd_qtstart): Install tracepoints even if disabled.
12988 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12989 receiving a QTEnable or QTDisable packet.
12990 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12991 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12993 (gdb_probe): Skip data collection if static tracepoint is disabled.
12995 2011-05-10 Doug Evans <dje@google.com>
12997 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12999 2011-05-04 Doug Evans <dje@google.com>
13001 * linux-low.c (linux_join): Skip process lookup.
13002 * spu-low.c (spu_join): Ditto.
13003 * server.c (join_inferiors_callback): Delete.
13004 (process_serial_event): For 'D' packet (detach) call join_inferior
13007 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13009 * README: Don't mention xscale*-*-linux*.
13010 * configure.srv (xscale*-*-linux*): Don't handle target.
13012 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13014 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13016 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13017 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13018 (i386_emit_void_call_2): Likewise.
13020 2011-04-26 Yao Qi <yao@codesourcery.com>
13022 * linux-low.c: Move common macros to linux-ptrace.h.
13023 Include linux-ptrace.h.
13024 * Makefile.in (linux_ptrace_h): New.
13025 (linux-low.o): Depends on linux-ptrace.h.
13027 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13029 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13030 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13031 (remote_prepare): New function with most of the TCP code from ...
13032 (remote_open): ... here. Detect PORT here unconditionally. Move also
13033 setting transport_is_reliable.
13034 * server.c (run_once): New variable.
13035 (gdbserver_usage): Document it.
13036 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13037 the first run if RUN_ONCE.
13038 * server.h (run_once, remote_prepare): New declarations.
13040 2011-04-19 Tom Tromey <tromey@redhat.com>
13042 * win32-low.c (handle_load_dll): Remove duplicate "the".
13044 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13046 Remove support for old Cygwin 1.5 versions.
13047 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13048 function to avoid warning.
13049 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13052 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13054 * gdbserver/server.h (Macro _): Define it if not available.
13056 2011-03-14 Michael Snyder <msnyder@vmware.com>
13058 * hostio.c (handle_close): Remove unnecessary null test.
13060 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13062 * Makefile.in (maintainer-clean realclean distclean): Remove
13063 "make ... subdir_do" command.
13065 2011-03-10 Michael Snyder <msnyder@vmware.com>
13067 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13069 * server.c (handle_v_run): Free alloced buffer on early return.
13071 2011-03-09 Yao Qi <yao@codesourcery.com>
13074 2011-03-04 Yao Qi <yao@codesourcery.com>
13076 * Makefile.in: Remove GNU make feature --directory.
13078 2011-03-05 Yao Qi <yao@codesourcery.com>
13080 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13081 (subdir_do): New make target. Copied from gdb/Makefile.
13082 (maintainer-clean, realclean, distclean, clean): Call corresponding
13083 make targets in common/Makefile.
13085 2011-02-11 Yao Qi <yao@codesourcery.com>
13087 * configure.ac: Call AC_PROG_RANLIB.
13088 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13089 * configure: Regenerate.
13091 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13093 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13095 2011-03-06 Yao Qi <yao@codesourcery.com>
13097 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13099 2011-03-05 Yao Qi <yao@codesourcery.com>
13101 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13102 (subdir_do): New make target. Copied from gdb/Makefile.
13103 (maintainer-clean, realclean, distclean, clean): Call corresponding
13104 make targets in common/Makefile.
13106 2011-03-04 Yao Qi <yao@codesourcery.com>
13108 * Makefile.in: Remove GNU make feature --directory.
13110 2011-03-04 Michael Snyder <msnyder@vmware.com>
13112 * server.c (queue_stop_reply): Call xmalloc not malloc.
13114 2011-03-02 Michael Snyder <msnyder@vmware.com>
13116 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13118 2011-02-28 Michael Snyder <msnyder@vmware.com>
13120 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13121 (cmd_qtframe): Ditto.
13122 (cmd_qtbuffer): Ditto.
13123 (cmd_bigqtbuffer): Ditto.
13125 * utils.c (decimal2str): Initialize 'width' to nine, then
13126 don't mess with it.
13128 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13130 * hostio.c (require_data): Free *data, not data.
13132 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13134 * hostio.c (require_data): Use free, not xfree.
13136 2011-02-27 Michael Snyder <msnyder@vmware.com>
13138 * server.c (handle_query): Discard unused value.
13140 * hostio.c (require_data): Free malloc memory before returning
13143 2011-02-26 Michael Snyder <msnyder@vmware.com>
13145 * linux-low.c (list_threads): Call closedir for dirent.
13147 2011-02-27 Michael Snyder <msnyder@vmware.com>
13149 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13150 a case statement falls through.
13152 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13154 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13157 2011-02-26 Michael Snyder <msnyder@vmware.com>
13159 * utils.c (decimal2str): Eliminate dead code and dead param.
13160 (pulongest): Drop dead param from call to decimal2str.
13163 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13165 Revert the following patch (not approved yet):
13166 2011-02-21 Hui Zhu <teawater@gmail.com>
13167 * tracepoint.c (tp_printf): New function.
13168 (eval_agent_expr): Handle gdb_agent_op_printf.
13170 2011-02-21 Hui Zhu <teawater@gmail.com>
13172 * tracepoint.c (tp_printf): New function.
13173 (eval_agent_expr): Handle gdb_agent_op_printf.
13175 2011-02-18 Tom Tromey <tromey@redhat.com>
13177 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13178 (tracepoint.o): Likewise.
13179 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13180 (gdb_agent_op_names): Likewise.
13182 2011-02-18 Tom Tromey <tromey@redhat.com>
13184 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13185 gdb_agent_op_rot>: New constants.
13186 (gdb_agent_op_names): Add pick and roll.
13187 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13190 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13192 * aclocal.m4: Regenerated with aclocal-1.11.1.
13194 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13196 * server.c (handle_qxfer_traceframe_info): New.
13197 (qxfer_packets): Register "traceframe-info".
13198 (handle_query): Report support for qXfer:traceframe-info:read+.
13199 * tracepoint.c (match_blocktype): New.
13200 (traceframe_find_block_type): Rename to ...
13201 (traceframe_walk_blocks): ... this. Add callback filter argument,
13203 (traceframe_find_block_type): New, reimplemented on top of
13204 traceframe_walk_blocks.
13205 (build_traceframe_info_xml): New.
13206 (traceframe_read_info): New.
13207 * server.h (traceframe_read_info): Declare.
13209 2011-02-11 Yao Qi <yao@codesourcery.com>
13211 * configure.ac: Call AC_PROG_RANLIB.
13212 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13213 * configure: Regenerate.
13215 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13217 * server.c (gdb_read_memory): Change return semantics to allow
13219 (handle_search_memory_1): Adjust.
13220 (process_serial_event) <'m' packet>: Handle partial transfers.
13221 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13223 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13225 * regcache.c (init_register_cache): Initialize
13226 regcache->register_status.
13227 (free_register_cache): Release regcache->register_status.
13228 (regcache_cpy): Copy register_status.
13229 (registers_to_string): Print 'x's for unavailable registers.
13230 (supply_register): Mark the register's status valid or
13231 unavailable, depending on whether a buffer was passed in or not.
13232 (supply_register_zeroed): New.
13233 (supply_regblock): Mark the registers' status valid or
13234 unavailable, depending on whether a buffer was passed in or not.
13235 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13236 (struct regcache): New `register_status' field.
13237 (supply_register_zeroed): Declare.
13238 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13239 supply_register_zeroed, rather than passing a NULL buffer to
13241 * tracepoint.c (fetch_traceframe_registers): Update comment.
13243 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13245 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13248 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13250 * server.h (decode_xfer_write): Change prototype.
13251 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13252 and don't extract the annex here.
13253 * server.c (decode_xfer_read): Remove `annex' parameter,
13254 and don't extract the annex here.
13255 (decode_xfer): New.
13256 (struct qxfer): New.
13257 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13258 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13259 (handle_qxfer_statictrace): New functions, abstracted out from
13260 handle_query, and made to use the struct qxfer interface.
13261 (handle_threads_qxfer_proper): Rename to ...
13262 (handle_qxfer_threads_proper): ... this.
13263 (handle_threads_qxfer): Rename to ...
13264 (handle_qxfer_threads): ... this. Adjust.
13265 (qxfer_packets): New array.
13266 (handle_qxfer): New function.
13267 (handle_query): Use handle_qxfer.
13269 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13271 * gdbreplay.c: Shorten lines of >= 80 columns.
13272 * linux-low.c: Ditto.
13273 * linux-ppc-low.c: Ditto.
13274 * linux-s390-low.c: Ditto.
13275 * linux-sparc-low.c: Ditto.
13276 * linux-x86-low.c: Ditto.
13277 * linux-xtensa-low.c: Ditto.
13278 * mem-break.c: Ditto.
13279 * nto-low.c: Ditto.
13280 * regcache.h: Ditto.
13281 * remote-utils.c: Ditto.
13284 * thread-db.c: Ditto.
13285 * tracepoint.c: Ditto.
13287 * win32-low.h: Ditto.
13289 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13291 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13294 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13296 * server.c (gdbserver_version): Update copyright year in version
13298 * gdbreplay.c (gdbreplay_version): Ditto.
13300 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13302 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13303 * linux-bfin-low.c: New file.
13304 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13305 PT_DATA_ADDR for BFIN targets.
13306 * Makefile.in (SFILES): Add linux-bfin-low.c.
13307 (clean): Remove reg-bfin.c.
13308 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13309 * README: Mention supported Blackfin targets.
13311 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13313 * .gitignore: New file.
13315 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13317 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13319 2010-10-22 Jie Zhang <jie@codesourcery.com>
13321 * Makefile.in: Add FLAGS_TO_PASS variable.
13322 (install): Remove dependency of install-only and recursively
13323 invoke make for install-only.
13325 2010-10-04 Doug Evans <dje@google.com>
13327 * Makefile.in (uninstall): Use $(DESTDIR).
13329 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13333 * linux-x86-low.c (compat_siginfo_from_siginfo)
13334 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13335 si_code is < 0. Check for si_code == SI_TIMER before checking for
13338 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13340 * lynx-i386-low.c: New file.
13341 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13343 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13345 * lynx-low.c (ptrace_request_to_str): Remove handling for
13346 request values that have been removed in LynxOS 5.x.
13348 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13350 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13353 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13355 * configure.ac: Add --enable-inprocess-agent option.
13356 * configure: Rebuilt.
13358 2010-09-06 Yao Qi <yao@codesourcery.com>
13360 * linux-low.c (linux_kill): Remove unused variable.
13361 (linux_stabilize_threads): Likewise.
13362 * server.c (start_inferior): Likewise.
13363 (queue_stop_reply_callback): Likewise.
13364 * tracepoint.c (do_action_at_tracepoint): Likewise.
13366 2010-09-06 Yao Qi <yao@codesourcery.com>
13368 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13371 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13373 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13375 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13377 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13380 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13382 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13383 gdbserver/lynx-ppc-low.c: New files.
13384 * Makefile.in (lynx_low_h): New variable.
13385 (lynx-low.o, lynx-ppc-low.o): New rules.
13386 * configure.ac: On LynxOS, link with -lnetinet.
13387 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13388 * configure: regenerate.
13390 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13392 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13393 * configure.ac: Add check for vasprintf and vsnprintf.
13394 * configure, config.in: Regenerate.
13395 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13397 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13399 * gdbreplay.c: Move include of alloca.h up, next to include of
13401 * server.h: Add include of malloc.h.
13402 * mem-break.c: Remove include of malloc.h.
13403 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13405 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13407 * Makefile.in (memmem.o): Build with -Wno-error.
13409 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13411 * utils.c (xsnprintf): Make non-static.
13412 * server.h: Add xsnprintf declaration.
13413 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13414 replace calls to snprintf by calls to xsnprintf throughout.
13416 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13418 * configure.ac: Add configure check for alloca.
13419 * configure, config.in: Regenerate.
13420 * server.h: Include alloca.h if it exists.
13421 * gdbreplay.c: Include alloca.h if it exists.
13423 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13425 * linux-low.c (__SIGRTMIN): Define if not already defined.
13426 (linux_create_inferior): Check for __ANDROID__ rather than
13428 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13429 are already deferred.
13430 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13431 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13432 stopped and already has a pending signal to report.
13433 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13434 a pending signal to report or is moving out of a jump pad.
13435 (linux_init_signals): Check for __ANDROID__ rather than
13438 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13440 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13441 debug_threads check. Avoid a linear search when not doing debug
13444 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13446 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13447 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13448 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13449 (process_event): Change local fd's type to gdb_fildes_t.
13450 (create_file_handler): Adjust prototype.
13451 (delete_file_handler): Adjust prototype.
13452 (handle_file_event): Adjust prototype. Use pfildes.
13453 (create_file_event): Adjsut prototype.
13454 * remote-utils.c (remote_desc, listen_desc): Change type to
13456 * server.h: New gdb_fildes_t typedef.
13457 [USE_WIN32API]: Include winsock2.h.
13458 (delete_file_handler, add_file_handler): Adjust prototypes.
13459 (pfildes): Declare.
13460 * utils.c (pfildes): New.
13462 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13464 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13465 * configure: Regenerate.
13467 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13469 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13470 (linux_done_accessing_memory): ... this.
13471 (linux_target_ops): Adjust.
13472 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13473 * nto-low.c (nto_target_ops): Adjust comment.
13474 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13475 * spu-low.c (spu_target_ops): Adjust comment.
13476 * target.h (target_ops): Rename unprepare_to_access_memory field
13477 to done_accessing_memory.
13478 (unprepare_to_access_memory): Rename to ...
13479 (done_accessing_memory): ... this.
13481 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13483 * linux-low.c (linux_prepare_to_access_memory): New.
13484 (linux_unprepare_to_access_memory): New.
13485 (linux_target_ops): Install them.
13486 * server.c (read_memory): Rename to ...
13487 (gdb_read_memory): ... this. Use
13488 prepare_to_access_memory/prepare_to_access_memory.
13489 (write_memory): Rename to ...
13490 (gdb_write_memory): ... this. Use
13491 prepare_to_access_memory/prepare_to_access_memory.
13492 (handle_search_memory_1): Adjust.
13493 (process_serial_event): Adjust.
13494 * target.h (struct target_ops): New fields
13495 prepare_to_access_memory and unprepare_to_access_memory.
13496 (prepare_to_access_memory, unprepare_to_access_memory): New.
13497 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13498 prepare_to_access_memory/prepare_to_access_memory.
13499 * nto-low.c (nto_target_ops): Adjust.
13500 * spu-low.c (spu_target_ops): Adjust.
13501 * win32-low.c (win32_target_ops): Adjust.
13503 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13505 * Makefile.in (WARN_CFLAGS): Get it from configure.
13506 (WERROR_CFLAGS): New.
13507 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13508 * configure.ac: Introduce --enable-werror, which adds -Werror to
13509 the compiler command line. Enabled by default. Disable with
13510 --disable-werror. Add -Wdeclaration-after-statement
13511 Wpointer-arith and -Wformat-nonliteral to warning flags.
13512 * configure: Regenerate.
13514 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13516 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13518 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13520 * gdbreplay.c (remote_error): New.
13522 (expect): Use gdbchar. Check for error reading from GDB.
13523 Clarify sync error output.
13524 (play): Check for errors writing to GDB.
13525 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13526 * remote-utils.c (getpkt): Check for errors writing to the remote
13529 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13531 * linux-low.c (linux_wait_1): Move non-debugging code out of
13532 `debug_threads' control.
13534 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13536 * linux-low.c (linux_wait_1): Don't set last_status here.
13537 * server.c (push_event, queue_stop_reply_callback): Assert we're
13538 not pushing a TARGET_WAITKIND_IGNORE event.
13539 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13540 (myresume, handle_target_event): Set the thread's last_resume_kind
13541 and last_status from the target returned status.
13543 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13547 * linux-x86-low.c (update_debug_registers_callback): New.
13548 (i386_dr_low_set_addr): Use it.
13549 (i386_dr_low_get_addr): New.
13550 (i386_dr_low_set_control): Use update_debug_registers_callback.
13551 (i386_dr_low_get_control): New.
13552 (i386_dr_low_get_status): Adjust.
13553 * linux-low.c (linux_stop_lwp): New.
13554 * linux-low.h (linux_stop_lwp): Declare.
13556 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13557 argument instead of a i386_debug_reg_state.
13558 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13559 a i386_debug_reg_state.
13560 (i386_insert_aligned_watchpoint): Adjust.
13561 (i386_remove_aligned_watchpoint): Adjust.
13562 (i386_low_stopped_data_address): Read the debug registers from the
13563 inferior instead of from the mirrors.
13564 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13565 (i386_dr_low_get_addr): Declare.
13566 (i386_dr_low_get_control): Declare.
13567 (i386_dr_low_get_status): Change prototype.
13569 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13570 (i386_dr_low_get_addr): New.
13571 (i386_dr_low_get_control): New.
13572 (i386_dr_low_get_status): Adjust prototype. Return
13574 (i386_initial_stuff): Clear dr_status_mirror and
13576 (i386_get_thread_context): Adjust.
13577 (i386_set_thread_context): Adjust.
13578 (i386_thread_added): Adjust.
13580 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13582 * linux-low.h (linux_thread_area): Delete declaration.
13584 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13586 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13587 after its termination.
13589 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13591 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13592 (gdb_wants_all_stopped): Delete.
13593 (linux_wait_1): Don't call them.
13594 * server.c (handle_v_cont): Tag all threads as want-stopped.
13595 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13596 stopped as "client-wants-stopped".
13598 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13600 * Makefile.in (signals_h): New.
13601 (server_h): Depend on it.
13602 (server.o): Don't depend on $(signals_def).
13603 (signals.o): Depend on $(signals_def).
13605 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13607 * Makefile.in (signals_def): New.
13608 (server_h): Append include/gdb/signals.h and signals_def.
13609 (server.o): Append signals_def.
13611 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13613 * server.c (handle_target_event): Use target_signal_to_host for
13614 resume_info.sig initialization.
13615 * target.h (struct thread_resume) <sig>: New comment.
13617 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13619 * server.c (handle_query): strcpy() the returned string from paddress()
13620 instead of sprintf().
13621 * utils.c (paddress): Return phex_nz().
13623 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13625 * server.c (handle_v_cont): Call mourn_inferior if process
13627 (myresume): Likewise.
13629 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13631 Static tracepoints, and integration with UST.
13633 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13634 * mem-break.c (uninsert_all_breakpoints)
13635 (reinsert_all_breakpoints): New.
13636 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13637 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13638 (gdb_agent_ust_loaded, helper_thread_id)
13639 (gdb_agent_helper_thread_id): New macros.
13640 (struct ipa_sym_addresses): Add addr_ust_loaded,
13641 addr_helper_thread_id, addr_cmd_buf.
13642 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13643 (in_process_agent_loaded_ust): New.
13644 (write_e_ust_not_loaded): New.
13645 (maybe_write_ipa_ust_not_loaded): New.
13646 (struct collect_static_trace_data_action): New.
13647 (enum tracepoint_type) <static_tracepoint>: New.
13648 (struct tracepoint) <handle>: Mention static tracepoints.
13649 (struct static_tracepoint_ctx): New.
13650 (CMD_BUF_SIZE): New.
13651 (add_tracepoint_action): Handle static tracepoint actions.
13652 (unprobe_marker_at): New.
13653 (clear_installed_tracepoints): Handle static tracepoints.
13654 (cmd_qtdp): Handle static tracepoints.
13655 (probe_marker_at): New.
13656 (cmd_qtstart): Handle static tracepoints.
13657 (response_tracepoint): Handle static tracepoints.
13658 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13659 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13660 (get_context_regcache): Handle static tracepoints.
13661 (do_action_at_tracepoint): Handle static tracepoint actions.
13662 (traceframe_find_block_type): Handle static trace data blocks.
13663 (traceframe_read_sdata): New.
13664 (download_tracepoints): Download static tracepoint actions.
13665 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13666 (GDB_PROBE_NAME): New.
13668 (GET_UST_SYM): New.
13671 (ust_marker_to_static_tracepoint): New.
13673 (collect_ust_data_at_tracepoint): New.
13674 (gdb_ust_probe): New.
13675 (UNIX_PATH_MAX, SOCK_DIR): New.
13676 (gdb_ust_connect_sync_socket): New.
13677 (resume_thread, stop_thread): New.
13678 (run_inferior_command): New.
13679 (init_named_socket): New.
13680 (gdb_ust_socket_init): New.
13681 (cstr_to_hexstr): New.
13683 (first_marker, next_marker): New.
13684 (response_ust_marker): New.
13685 (cmd_qtfstm, cmd_qtsstm): New.
13686 (unprobe_marker_at, probe_marker_at): New.
13687 (cmd_qtstmat, gdb_ust_thread): New.
13688 (gdb_ust_init): New.
13689 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13690 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13691 (ST_REGENTRY): New.
13692 (x86_64_st_collect_regmap): New.
13693 (X86_64_NUM_ST_COLLECT_GREGS): New.
13694 (AMD64_RIP_REGNUM): New.
13695 (supply_static_tracepoint_registers): New.
13696 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13697 (ST_REGENTRY): New.
13698 (i386_st_collect_regmap): New.
13699 (i386_NUM_ST_COLLECT_GREGS): New.
13700 (supply_static_tracepoint_registers): New.
13701 * server.c (handle_query): Handle qXfer:statictrace:read.
13702 <qSupported>: Report support for StaticTracepoints, and
13703 qXfer:statictrace:read features.
13704 * server.h (traceframe_read_sdata)
13705 (supply_static_tracepoint_registers): Declare.
13706 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13707 (unpack_varlen_hex): Include in IPA build.
13708 * Makefile.in (ustlibs, ustinc): New.
13709 (IPA_OBJS): Add remote-utils-ipa.o.
13710 ($(IPA_LIB)): Link -ldl and -lpthread.
13712 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13713 * config.in, configure: Regenerate.
13715 2010-06-20 Ian Lance Taylor <iant@google.com>
13716 Pedro Alves <pedro@codesourcery.com>
13718 * linux-x86-low.c (always_true): Delete.
13719 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13720 trying to fool the compiler with always_true.
13722 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13724 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13725 conditions in gdbserver.
13727 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13729 * spu-low.c (spu_read_memory): Wrap around local store limit.
13730 (spu_write_memory): Likewise.
13732 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13734 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13735 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13737 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13739 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13740 uses with LONGEST uses.
13742 2010-06-14 Stan Shebs <stan@codesourcery.com>
13743 Pedro Alves <pedro@codesourcery.com>
13747 * linux-x86-low.c: Include limits.h.
13749 (always_true): New.
13752 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13753 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13754 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13755 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13756 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13757 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13758 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13759 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13760 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13761 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13762 (amd64_emit_void_call_2): New.
13763 (amd64_emit_ops): New.
13764 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13765 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13766 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13767 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13768 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13769 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13770 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13771 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13772 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13773 (i386_emit_stack_adjust, i386_emit_int_call_1)
13774 (i386_emit_void_call_2): New.
13775 (i386_emit_ops): New.
13776 (x86_emit_ops): New.
13777 (the_low_target): Install x86_emit_ops.
13778 * server.h (struct emit_ops): New.
13779 (get_raw_reg_func_addr): Declare.
13780 (current_insn_ptr, emit_error): Declare.
13781 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13782 (set_trace_state_variable_value): New defines.
13783 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13784 addr_get_trace_state_variable_value and
13785 addr_set_trace_state_variable_value.
13786 (symbol_list): New fields for get_raw_reg,
13787 get_trace_state_variable_value and set_trace_state_variable_value.
13788 (condfn): New typedef.
13789 (struct tracepoint): New field `compiled_cond'.
13790 (do_action_at_tracepoint): Clear compiled_cond.
13791 (get_trace_state_variable_value, set_trace_state_variable_value):
13793 (condition_true_at_tracepoint): If there's a compiled condition,
13795 (current_insn_ptr, emit_error): New globals.
13796 (struct bytecode_address): New.
13797 (get_raw_reg_func_addr): New.
13798 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13799 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13800 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13801 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13802 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13803 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13804 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13805 (compile_tracepoint_condition, compile_bytecodes): New.
13806 * target.h (emit_ops): Forward declare.
13807 (struct target_ops): New field emit_ops.
13808 (target_emit_ops): New.
13809 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13810 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13811 * linux-low.c (linux_emit_ops): New.
13812 (linux_target_ops): Install it.
13813 * linux-low.h (struct linux_target_ops): New field emit_ops.
13815 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13817 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13818 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13820 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13821 Stan Shebs <stan@codesourcery.com>
13823 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13824 (all): Depend on $(extra_libraries).
13825 (install-only): Install the IPA.
13826 (IPA_OBJS, IPA_LIB): New.
13827 (clean): Remove the IPA lib.
13828 (IPAGENT_CFLAGS): New.
13829 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13830 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13831 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13832 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13833 * configure.ac: Check for atomic builtins support in the compiler.
13834 (IPA_DEPFILES, extra_libraries): Define.
13835 * configure.srv (ipa_obj): Add description.
13836 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13837 (i[34567]86-*-linux*): Set ipa_obj.
13838 (x86_64-*-linux*): Set ipa_obj.
13839 * linux-low.c (stabilizing_threads): New.
13840 (supports_fast_tracepoints): New.
13841 (linux_detach): Stabilize threads before detaching.
13842 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13843 the lwp is either not stabilizing, or is moving out of a jump pad.
13844 (linux_fast_tracepoint_collecting): New.
13845 (maybe_move_out_of_jump_pad): New.
13846 (enqueue_one_deferred_signal): New.
13847 (dequeue_one_deferred_signal): New.
13848 (linux_wait_for_event_1): If moving out of a jump pad, defer
13849 pending signals to later.
13850 (linux_stabilize_threads): New.
13851 (linux_wait_1): Check if threads need moving out of jump pads, and
13853 (stuck_in_jump_pad_callback): New.
13854 (move_out_of_jump_pad_callback): New.
13855 (lwp_running): New.
13856 (linux_resume_one_lwp): Handle moving out of jump pads.
13857 (linux_set_resume_request): Dequeue deferred signals.
13858 (need_step_over_p): Also step over fast tracepoint jumps.
13859 (start_step_over): Also uninsert fast tracepoint jumps.
13860 (finish_step_over): Also reinsert fast tracepoint jumps.
13861 (linux_install_fast_tracepoint_jump): New.
13862 (linux_target_ops): Install linux_stabilize_threads and
13863 linux_install_fast_tracepoint_jump_pad.
13864 * linux-low.h (linux_target_ops) <get_thread_area,
13865 install_fast_tracepoint_jump_pad>: New fields.
13866 (struct lwp_info) <collecting_fast_tracepoint,
13867 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13868 (linux_get_thread_area): Declare.
13869 * linux-x86-low.c (jump_insn): New.
13870 (x86_get_thread_area): New.
13871 (append_insns): New.
13872 (push_opcode): New.
13873 (amd64_install_fast_tracepoint_jump_pad): New.
13874 (i386_install_fast_tracepoint_jump_pad): New.
13875 (x86_install_fast_tracepoint_jump_pad): New.
13876 (the_low_target): Install x86_get_thread_area and
13877 x86_install_fast_tracepoint_jump_pad.
13878 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13879 (struct fast_tracepoint_jump): New.
13880 (fast_tracepoint_jump_insn): New.
13881 (fast_tracepoint_jump_shadow): New.
13882 (find_fast_tracepoint_jump_at): New.
13883 (fast_tracepoint_jump_here): New.
13884 (delete_fast_tracepoint_jump): New.
13885 (set_fast_tracepoint_jump): New.
13886 (uninsert_fast_tracepoint_jumps_at): New.
13887 (reinsert_fast_tracepoint_jumps_at): New.
13888 (set_breakpoint_at): Use write_inferior_memory.
13889 (uninsert_raw_breakpoint): Use write_inferior_memory.
13890 (check_mem_read): Mask out fast tracepoint jumps.
13891 (check_mem_write): Mask out fast tracepoint jumps.
13892 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13893 (set_fast_tracepoint_jump): Declare.
13894 (delete_fast_tracepoint_jump)
13895 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13896 (reinsert_fast_tracepoint_jumps_at): Declare.
13897 * regcache.c: Don't compile many functions when building the
13898 in-process agent library.
13899 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13900 the register buffer in the heap.
13901 (free_register_cache): If the register buffer isn't owned by the
13902 regcache, don't free it.
13903 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13904 pre-existing register caches.
13905 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13907 (convert_ascii_to_int): : Constify `from' parameter type.
13908 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13909 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13910 the needed buffer in-place.
13911 (relocate_instruction): New.
13912 * server.c (handle_query) <qSymbols>: If the target supports
13913 tracepoints, give it a chance of looking up symbols. Report
13914 support for fast tracepoints.
13915 (handle_status): Stabilize threads.
13916 (process_serial_event): Adjust.
13917 * server.h (struct fast_tracepoint_jump): Forward declare.
13918 (struct process_info) <fast_tracepoint_jumps>: New field.
13919 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13920 (decode_X_packet, decode_M_packet): Adjust.
13921 (relocate_instruction): Declare.
13922 (in_process_agent_loaded): Declare.
13923 (tracepoint_look_up_symbols): Declare.
13924 (struct fast_tpoint_collect_status): Declare.
13925 (fast_tracepoint_collecting): Declare.
13926 (force_unlock_trace_buffer): Declare.
13927 (handle_tracepoint_bkpts): Declare.
13928 (initialize_low_tracepoint)
13929 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13930 * target.h (struct target_ops) <stabilize_threads,
13931 install_fast_tracepoint_jump_pad>: New fields.
13932 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13933 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13934 [HAVE_STDINT_H]: Include stdint.h.
13935 (trace_debug_1): Rename to ...
13936 (trace_vdebug): ... this.
13937 (trace_debug): Rename to ...
13938 (trace_debug_1): ... this. Add `level' parameter.
13939 (trace_debug): New.
13940 (ATTR_USED, ATTR_NOINLINE): New.
13941 (IP_AGENT_EXPORT): New.
13942 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13943 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13944 (about_to_request_buffer_space, trace_buffer_is_full)
13945 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13946 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13947 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13948 (traceframe_write_count, traceframes_created)
13949 (trace_state_variables)
13950 New renaming defines.
13951 (struct ipa_sym_addresses): New.
13952 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13953 (symbol_list): New.
13954 (ipa_sym_addrs): New.
13955 (all_tracepoint_symbols_looked_up): New.
13956 (in_process_agent_loaded): New.
13957 (write_e_ipa_not_loaded): New.
13958 (maybe_write_ipa_not_loaded): New.
13959 (tracepoint_look_up_symbols): New.
13960 (debug_threads) [IN_PROCESS_AGENT]: New.
13961 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13962 (UNKNOWN_SIDE_EFFECTS): New.
13963 (stop_tracing): New.
13964 (flush_trace_buffer): New.
13965 (stop_tracing_bkpt): New.
13966 (flush_trace_buffer_bkpt): New.
13967 (read_inferior_integer): New.
13968 (read_inferior_uinteger): New.
13969 (read_inferior_data_pointer): New.
13970 (write_inferior_data_pointer): New.
13971 (write_inferior_integer): New.
13972 (write_inferior_uinteger): New.
13973 (struct collect_static_trace_data_action): Delete.
13974 (enum tracepoint_type): New.
13975 (struct tracepoint) <type>: New field `type'.
13976 <actions_str, step_actions, step_actions_str>: Only include in
13978 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13979 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13980 (tracepoints): Use IP_AGENT_EXPORT.
13981 (last_tracepoint): Don't include in the IPA.
13982 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13983 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13984 (alloced_trace_state_variables): New.
13985 (trace_state_variables): Use IP_AGENT_EXPORT.
13986 (traceframe_t): Delete unused variable.
13987 (circular_trace_buffer): Don't include in the IPA.
13988 (trace_buffer_start): Delete.
13989 (struct trace_buffer_control): New.
13990 (trace_buffer_free): Delete.
13991 (struct ipa_trace_buffer_control): New.
13992 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13993 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13995 (trace_buffer_ctrl): New.
13996 (TRACE_BUFFER_CTRL_CURR): New.
13997 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13998 Reimplement as macros.
13999 (trace_buffer_wrap): Delete.
14000 (traceframe_write_count, traceframe_read_count)
14001 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14002 (struct tracepoint_hit_ctx) <type>: New field.
14003 (struct fast_tracepoint_ctx): New.
14004 (memory_barrier): New.
14006 (record_tracepoint_error): Update atomically in the IPA.
14007 (clear_inferior_trace_buffer): New.
14008 (about_to_request_buffer_space): New.
14009 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14010 updating the same buffer.
14011 (add_tracepoint): Default the tracepoint's type to trap
14012 tracepoint, and orig_size to -1.
14013 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14014 internal variables.
14015 (create_trace_state_variable): New parameter `gdb'. Handle it.
14016 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14017 (cmd_qtdp): Handle fast tracepoints.
14018 (cmd_qtdv): Adjust.
14019 (max_jump_pad_size): New.
14020 (gdb_jump_pad_head): New.
14021 (get_jump_space_head): New.
14022 (claim_jump_space): New.
14023 (sort_tracepoints): New.
14024 (MAX_JUMP_SIZE): New.
14025 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14027 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14028 support. Upload fast traceframes, and delete internal IPA
14030 (stop_tracing_handler): New.
14031 (flush_trace_buffer_handler): New.
14032 (cmd_qtstop): Upload fast tracepoints.
14033 (response_tracepoint): Handle fast tracepoints.
14034 (tracepoint_finished_step): Upload fast traceframes. Set the
14035 tracepoint hit context's tracepoint type.
14036 (handle_tracepoint_bkpts): New.
14037 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14038 type. Add comment about fast tracepoints.
14039 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14040 non-existing action_str field.
14041 (get_context_regcache): Handle fast tracepoints.
14042 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14044 (fast_tracepoint_from_jump_pad_address): New.
14045 (fast_tracepoint_from_ipa_tpoint_address): New.
14046 (collecting_t): New.
14047 (force_unlock_trace_buffer): New.
14048 (fast_tracepoint_collecting): New.
14050 (gdb_collect): New.
14051 (write_inferior_data_ptr): New.
14052 (target_tp_heap): New.
14053 (target_malloc): New.
14054 (download_agent_expr): New.
14056 (download_tracepoints): New.
14057 (download_trace_state_variables): New.
14058 (upload_fast_traceframes): New.
14059 (IPA_FIRST_TRACEFRAME): New.
14060 (IPA_NEXT_TRACEFRAME_1): New.
14061 (IPA_NEXT_TRACEFRAME): New.
14062 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14063 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14064 (gdb_jump_pad_buffer_end): New.
14065 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14066 (initialize_tracepoint): Adjust.
14067 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14068 buffer. Initialize the low module.
14069 * utils.c (PREFIX, TOOLNAME): New.
14070 (malloc_failure): Use PREFIX.
14071 (error): In the IPA, an error causes an exit.
14072 (fatal, warning): Use PREFIX.
14073 (internal_error): Use TOOLNAME.
14074 (NUMCELLS): Increase to 10.
14075 * configure, config.in: Regenerate.
14077 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14079 * server.c (handle_query) <qSupported>: Do two passes over the
14080 qSupported string to avoid nesting strtok.
14082 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14084 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14086 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14087 -Wl,--dynamic-list.
14088 * configure: Regenerate.
14089 * proc-service.list: New.
14091 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14093 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14096 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14098 * gdbreplay.c (remote_open): Check error return from socket() call by
14099 its equality to -1 not by it being negative.
14100 * remote-utils.c (remote_open): Likewise.
14102 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14104 * config.h: Regenerate.
14106 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14108 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14109 doesn't provide PTRACE_GET_THREAD_AREA.
14111 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14113 * linux-m68k-low.c: Include <asm/ptrace.h>
14114 (ps_get_thread_area): Implement.
14116 2010-05-03 Doug Evans <dje@google.com>
14118 * event-loop.c (struct callback_event): New struct.
14119 (callback_list): New global.
14120 (append_callback_event, delete_callback_event): New functions.
14121 (process_callback): New function.
14122 (start_event_loop): Call it.
14123 * remote-utils.c (NOT_SCHEDULED): Define.
14124 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14125 moved out of readchar.
14126 (readchar): Rewrite. Call reschedule before returning.
14127 (reset_readchar): New function.
14128 (remote_close): Call it.
14129 (process_remaining, reschedule): New functions.
14130 * server.h (callback_handler_func): New typedef.
14131 (append_callback_event, delete_callback_event): Declare.
14133 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14135 * proc-service.c (ps_pglobal_lookup): Use
14136 thread_db_look_up_one_symbol.
14137 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14138 parameter. Use it instead of all_symbols_looked_up.
14139 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14141 (all_symbols_looked_up): Don't declare.
14142 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14143 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14145 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14146 Set all_symbols_looked_up here.
14147 (thread_db_look_up_one_symbol): New.
14148 (thread_db_get_tls_address): Adjust.
14149 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14150 thread_db object on the heap, and tentatively set it in the
14152 (thread_db_init): Don't set all_symbols_looked_up here.
14153 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14155 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14157 * linux-low.c (linux_kill, linux_detach): Adjust.
14158 (status_pending_p_callback): Remove redundant statement. Check
14159 for !TARGET_WAITIKIND_IGNORE, instead of
14160 TARGET_WAITKIND_STOPPED.
14161 (handle_tracepoints): Make sure LWP is locked. Adjust.
14162 (linux_wait_for_event_1): Adjust.
14163 (linux_cancel_breakpoints): New.
14164 (unsuspend_one_lwp): New.
14165 (unsuspend_all_lwps): New.
14166 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14167 (send_sigstop_callback): Change return type to int, add new
14168 `except' parameter and handle it.
14169 (suspend_and_send_sigstop_callback): New.
14170 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14171 pass them down. If SUSPEND, also increment the lwp's suspend
14173 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14174 (need_step_over_p): Don't consider suspended LWPs.
14175 (start_step_over): Adjust.
14176 (proceed_one_lwp): Change return type to int, add new `except'
14177 parameter and handle it.
14178 (unsuspend_and_proceed_one_lwp): New.
14179 (proceed_all_lwps): Use find_inferior instead of
14181 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14182 also decrement the suspend count of LWPs. Pass `except' down,
14183 instead of hacking its suspend count.
14184 (linux_pause_all): Add `freeze' parameter. Adjust.
14185 (linux_unpause_all): New.
14186 (linux_target_ops): Install linux_unpause_all.
14187 * server.c (handle_status): Adjust.
14188 * target.h (struct target_ops): New fields `unpause_all' and
14189 `cancel_breakpoints'. Add new parameter to `pause_all'.
14190 (pause_all): Add new `freeze' parameter.
14191 (unpause_all): New.
14192 (cancel_breakpoints): New.
14193 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14194 cancel breakpoints.
14195 (cmd_qtstart): Pause threads.
14196 (stop_tracing): Pause threads, and cancel breakpoints.
14197 * win32-low.c (win32_target_ops): Adjust.
14199 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14201 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14202 the inferior right away from here...
14203 (linux_wait_1): ... to here, and adjust to check the thread's
14204 last_resume_kind instead of the lwp's step or stop_expected flags.
14206 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14208 * README: Use consistent `GDB' and `GDBserver' spellings.
14210 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14212 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14213 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14214 (linux_detach_one_lwp): Assume the lwp is stopped.
14215 (any_thread_of): Delete.
14216 (linux_detach): Stop all lwps here. Don't blindly delete all
14218 (delete_lwp_callback): New.
14219 (linux_mourn): Delete all lwps of the process that is gone.
14220 (linux_wait_1): Don't delete the last lwp of the process here.
14221 * mem-break.h (mark_breakpoints_out): Declare.
14222 * mem-break.c (mark_breakpoints_out): New.
14223 (free_all_breakpoints): Use it.
14224 * server.c (handle_target_event): If the process is gone, mark
14226 * thread-db.c (struct thread_db) <create_bp>: New field.
14227 (thread_db_enable_reporting): Fix prototype. Store a thread event
14228 breakpoint reference in the thread_db struct.
14229 (thread_db_load_search): Clear the thread_db object.
14230 (try_thread_db_load_1): Ditto.
14231 (switch_to_process): New.
14232 (disable_thread_event_reporting): Use it.
14233 (remove_thread_event_breakpoints): New.
14234 (thread_db_detach, thread_db_mourn): Use it.
14236 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14238 * linux-low.c (linux_enable_event_reporting): New.
14239 (linux_wait_for_event_1, handle_extended_wait): Use it.
14241 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14243 * linux-low.c (linux_kill_one_lwp, linux_kill)
14244 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14245 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14246 SIGSTOP even if the LWP is stopped.
14247 (send_sigstop_callback): New.
14248 (stop_all_lwps): Use send_sigstop_callback instead.
14249 (linux_resume_one_thread): Adjust.
14250 (proceed_one_lwp): Still proceed an LWP that the client has
14251 requested to stop, if we haven't reported it as stopped yet. Make
14252 sure that LWPs the client want stopped, have a pending SIGSTOP.
14254 2010-04-26 Doug Evans <dje@google.com>
14256 * server.c (handle_general_set): Make static.
14258 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14259 Print received char after testing for error/eof instead of before.
14260 (input_interrupt): Tweak comment.
14262 2010-04-23 Doug Evans <dje@google.com>
14264 * server.c (start_inferior): Print inferior argv if --debug.
14266 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14268 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14269 * nto-x86-low.c: Include server.h
14271 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14273 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14274 be consistent with other sources of this directory.
14275 (init_registers_amd64): Correct name of source file of this function
14278 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14280 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14281 64-bit executables.
14283 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14285 * win32-i386-low.c: Add 64-bit support.
14286 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14287 (init_registers_amd64): Declare.
14288 (mappings): Add 64-bit version of array.
14289 (init_windows_x86): New function.
14290 (the_low_target): Change init_arch field to init_windows_x86.
14292 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14294 * win32-low.c: Adapt to support also 64-bit architecture.
14295 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14296 (get_image_name): Use SIZE_T type for local variable `done'.
14297 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14298 (toolhelp_get_dll_name): Idem.
14299 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14300 Use uintptr_t typecast to avoid warning.
14301 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14302 (handle_exception): Use phex_nz to avoid warning.
14303 (win32_wait): Remove unused local variable `process'.
14305 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14307 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14310 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14312 * configure.ac: Use `ws2_32' library for srv_mingw.
14313 * configure: Regenerate.
14314 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14315 * remote-utils.c: Likewise.
14317 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14319 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14320 if __x86_64__ is defined.
14322 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14324 * configure: Regenerate.
14326 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14328 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14329 * target.h (target_ops): New get_tib_address field.
14330 * win32-low.h (win32_thread_info): Add thread_local_base field.
14331 * win32-low.c (child_add_thread): Add tlb argument.
14332 Set thread_local_base field to TLB.
14333 (get_child_debug_event): Adapt to child_add_thread change.
14334 (win32_get_tib_address): New function.
14335 (win32_target_ops): Set get_tib_address field to
14336 win32_get_tib_address.
14337 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14339 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14341 * linux-low.c (linux_mourn): Also remove the process.
14342 * server.c (handle_target_event): Don't remove the process here.
14343 * nto-low.c (nto_mourn): New.
14344 (nto_target_ops): Install it.
14345 * spu-low.c (spu_mourn): New.
14346 (spu_target_ops): Install it.
14347 * win32-low.c (win32_mourn): New.
14348 (win32_target_ops): Install it.
14350 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14352 * server.h (buffer_xml_printf): Remove redundant `;'.
14354 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14356 * regcache.c (set_register_cache): Invalidate regcaches before
14357 changing the register cache layout.
14358 (regcache_invalidate_one): Allow a NULL regcache.
14359 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14360 regcaches before changing the register cache layout or the target
14363 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14365 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14366 variable warning on Linux/x86-64.
14368 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14370 GDBserver disconnected tracing support.
14372 * linux-low.c (linux_remove_process): Delete.
14373 (add_lwp): Don't set last_resume_kind here.
14374 (linux_kill): Use `mourn'.
14375 (linux_detach): Use `thread_db_detach', and `mourn'.
14376 (linux_mourn): New.
14377 (linux_attach_lwp_1): Adjust comment.
14378 (linux_attach): last_resume_kind moved the thread_info; adjust.
14379 (status_pending_p_callback): Adjust.
14380 (linux_wait_for_event_1): Adjust.
14381 (count_events_callback, select_singlestep_lwp_callback)
14382 (select_event_lwp_callback, cancel_breakpoints_callback)
14383 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14384 (proceed_one_lwp): Adjust.
14385 (linux_async): Add debug output.
14386 (linux_thread_stopped): New.
14387 (linux_pause_all): New.
14388 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14390 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14391 (thread_db_free): Delete declaration.
14392 (thread_db_detach, thread_db_mourn): Declare.
14393 * thread-db.c (thread_db_init): Use thread_db_mourn.
14394 (thread_db_free): Delete, split in two.
14395 (disable_thread_event_reporting): New.
14396 (thread_db_detach): New.
14397 (thread_db_mourn): New.
14399 * server.h (struct thread_info) <last_resume_kind>: New field.
14400 <attached>: Add comment.
14401 <gdb_detached>: New field.
14402 (handler_func): Change return type to int.
14403 (handle_serial_event, handle_target_event): Ditto.
14404 (gdb_connected): Declare.
14406 (disconnected_tracing): Declare.
14407 (stop_tracing): Declare.
14409 * server.c (handle_query) <qSupported>: Report support for
14410 disconnected tracing.
14411 (queue_stop_reply_callback): Account for running threads.
14412 (gdb_wants_thread_stopped): New.
14413 (gdb_wants_all_threads_stopped): New.
14414 (gdb_reattached_process): New.
14415 (handle_status): Clear the `gdb_detached' flag of all processes.
14416 In all-stop, stop all threads.
14417 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14418 (process_serial_event): If the remote connection breaks, or if an
14419 exit was forced with "monitor exit", force an event loop exit.
14420 Handle disconnected tracing on detach.
14421 (handle_serial_event): Adjust.
14422 (handle_target_event): If GDB isn't connected, forward events back
14423 to the inferior, unless the last process exited, in which case,
14424 exit gdbserver. Adjust interface.
14426 * remote-utils.c (remote_open): Don't block in accept. Instead
14427 register an event loop source on the listen socket file
14428 descriptor. Refactor bits into ...
14429 (listen_desc): ... this new global.
14430 (gdb_connected): ... this new function.
14431 (enable_async_notification): ... this new function.
14432 (handle_accept_event): ... this new function.
14433 (remote_close): Clear remote_desc.
14435 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14437 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14439 (mourn_inferior): Define.
14440 (target_process_qsupported): Avoid the dangling else problem.
14441 (thread_stopped): Define.
14442 (pause_all): Define.
14443 (target_waitstatus_to_string): Declare.
14444 * target.c (target_waitstatus_to_string): New.
14446 * tracepoint.c (tracing): Make extern.
14447 (disconnected_tracing): New.
14448 (stop_tracing): Make extern. Handle tracing stops due to GDB
14450 (cmd_qtdisconnected): New.
14451 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14452 (handle_tracepoint_general_set): Handle QTDisconnected.
14454 * event-loop.c (event_handler_func): Change return type to int.
14455 (process_event): Bail out if the event handler wants the event
14457 (handle_file_event): Ditto.
14458 (start_event_loop): Bail out if the event handler wants the event
14461 * nto-low.c (nto_target_ops): Adjust.
14462 * spu-low.c (spu_wait): Don't remove the process here.
14463 (spu_target_ops): Adjust.
14464 * win32-low.c (win32_wait): Don't remove the process here.
14465 (win32_target_ops): Adjust.
14467 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14469 * regcache.c (realloc_register_cache): Invalidate inferior's
14470 regcache before recreating it.
14472 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14474 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14476 2010-04-09 Stan Shebs <stan@codesourcery.com>
14477 Pedro Alves <pedro@codesourcery.com>
14479 * server.h (LONGEST): New.
14480 (struct thread_info) <while_stepping>: New field.
14481 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14483 (initialize_tracepoint, handle_tracepoint_general_set)
14484 (handle_tracepoint_query, tracepoint_finished_step)
14485 (tracepoint_was_hit, release_while_stepping_state_list):
14486 (current_traceframe): Declare.
14487 * server.c (handle_general_set): Handle tracepoint packets.
14488 (read_memory): New.
14489 (write_memory): New.
14490 (handle_search_memory_1): Use read_memory.
14491 (handle_query): Report support for conditional tracepoints, trace
14492 state variables, and tracepoint sources. Handle tracepoint
14494 (main): Initialize the tracepoints module.
14495 (process_serial_event): Handle traceframe reads/writes.
14497 * linux-low.c (handle_tracepoints): New.
14498 (linux_wait_1): Call it.
14499 (linux_resume_one_lwp): Handle while-stepping.
14500 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14501 (linux_target_ops): Install them.
14502 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14504 * linux-x86-low.c (x86_supports_tracepoints): New.
14505 (the_low_target). Install it.
14507 * mem-break.h (delete_breakpoint): Declare.
14508 * mem-break.c (delete_breakpoint): Make external.
14510 * target.h (struct target_ops): Add `supports_tracepoints',
14511 `read_pc', and `write_pc' fields.
14512 (target_supports_tracepoints): Define.
14513 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14516 * regcache.h (struct regcache) <registers_owned>: New field.
14517 (init_register_cache, regcache_cpy): Declare.
14518 (regcache_read_pc, regcache_write_pc): Declare.
14519 (register_cache_size): Declare.
14520 (supply_regblock): Declare.
14521 * regcache.c (init_register_cache): New.
14522 (new_register_cache): Use it.
14523 (regcache_cpy): New.
14524 (register_cache_size): New.
14525 (supply_regblock): New.
14526 (regcache_read_pc, regcache_write_pc): New.
14528 * tracepoint.c: New.
14530 * Makefile.in (OBS): Add tracepoint.o.
14531 (tracepoint.o): New rule.
14533 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14535 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14537 (i386-mmx.c): Likewise.
14538 (i386-mmx-linux.o): Likewise.
14539 (i386-mmx-linux.c): Likewise.
14541 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14542 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14543 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14544 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14546 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14547 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14548 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14550 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14552 * Makefile.in (clean): Updated.
14554 (i386-avx.c): Likewise.
14555 (i386-avx-linux.o): Likewise.
14556 (i386-avx-linux.c): Likewise.
14557 (amd64-avx.o): Likewise.
14558 (amd64-avx.c): Likewise.
14559 (amd64-avx-linux.o): Likewise.
14560 (amd64-avx-linux.c): Likewise.
14562 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14563 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14564 (srv_amd64_regobj): Add amd64-avx.o.
14565 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14566 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14567 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14568 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14569 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14570 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14571 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14573 * i387-fp.c: Include "i386-xstate.h".
14575 (i387_cache_to_xsave): Likewise.
14576 (i387_xsave_to_cache): Likewise.
14577 (x86_xcr0): Likewise.
14579 * i387-fp.h (i387_cache_to_xsave): Likewise.
14580 (i387_xsave_to_cache): Likewise.
14581 (x86_xcr0): Likewise.
14583 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14584 * linux-crisv32-low.c (target_regsets): Likewise.
14585 * linux-m68k-low.c (target_regsets): Likewise.
14586 * linux-mips-low.c (target_regsets): Likewise.
14587 * linux-ppc-low.c (target_regsets): Likewise.
14588 * linux-s390-low.c (target_regsets): Likewise.
14589 * linux-sh-low.c (target_regsets): Likewise.
14590 * linux-sparc-low.c (target_regsets): Likewise.
14591 * linux-xtensa-low.c (target_regsets): Likewise.
14593 * linux-low.c: Include <sys/uio.h>.
14594 (regsets_fetch_inferior_registers): Support nt_type.
14595 (regsets_store_inferior_registers): Likewise.
14596 (linux_process_qsupported): New.
14597 (linux_target_ops): Add linux_process_qsupported.
14599 * linux-low.h (regset_info): Add nt_type.
14600 (linux_target_ops): Add process_qsupported.
14602 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14604 (init_registers_i386_avx_linux): New.
14605 (init_registers_amd64_avx_linux): Likewise.
14606 (xmltarget_i386_linux_no_xml): Likewise.
14607 (xmltarget_amd64_linux_no_xml): Likewise.
14608 (PTRACE_GETREGSET): Likewise.
14609 (PTRACE_SETREGSET): Likewise.
14610 (x86_fill_xstateregset): Likewise.
14611 (x86_store_xstateregset): Likewise.
14612 (use_xml): Likewise.
14613 (x86_linux_update_xmltarget): Likewise.
14614 (x86_linux_process_qsupported): Likewise.
14615 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14616 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14617 init_registers_i386_linux here. Call
14618 x86_linux_update_xmltarget.
14619 (the_low_target): Add x86_linux_process_qsupported.
14621 * server.c (handle_query): Call target_process_qsupported.
14623 * target.h (target_ops): Add process_qsupported.
14624 (target_process_qsupported): New.
14626 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14628 * inferiors.c (add_thread): Set last_status kind to
14629 TARGET_WAITKIND_IGNORE.
14630 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14631 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14632 (linux_wait_1): Move `thread' local definition to block that uses
14633 it. Don't NULL initialize `event_child'.
14634 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14635 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14636 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14638 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14640 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14641 an extended waitstatus, or by a watchpoint.
14642 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14643 thread was stepping or has been stopped by a watchpoint.
14645 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14647 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14648 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14649 of another, then delete the previous, and validate all
14651 (validate_inserted_breakpoint): New.
14652 (delete_disabled_breakpoints): New.
14653 (validate_breakpoints): New.
14654 (check_mem_read): Validate breakpoints before trusting their
14655 shadow. Delete disabled breakpoints.
14656 (check_mem_write): Validate breakpoints before trusting they
14657 should be inserted. Delete disabled breakpoints.
14658 * mem-break.h (validate_breakpoints):
14659 * server.c (handle_query): Validate breakpoints when we see a
14662 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14664 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14665 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14666 if we could tell there's a GDB breakpoint at stop_pc.
14667 (need_step_over_p): Don't do a step over if we find a GDB
14668 breakpoint at the resume PC.
14670 * mem-break.c (struct raw_breakpoint): New.
14671 (enum bkpt_type): New type `gdb_breakpoint'.
14672 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14673 fields. New field `raw'.
14674 (find_raw_breakpoint_at): New.
14675 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14676 breakpoint instead.
14677 (set_breakpoint_at): Adjust.
14678 (delete_raw_breakpoint): New.
14679 (release_breakpoint): New.
14680 (delete_breakpoint): Rename to...
14681 (delete_breakpoint_1): ... this. Add proc parameter. Use
14682 release_breakpoint. Return ENOENT.
14683 (delete_breakpoint): Reimplement.
14684 (find_breakpoint_at): Delete.
14685 (find_gdb_breakpoint_at): New.
14686 (delete_breakpoint_at): Delete.
14687 (set_gdb_breakpoint_at): New.
14688 (delete_gdb_breakpoint_at): New.
14689 (gdb_breakpoint_here): New.
14690 (set_reinsert_breakpoint): Use release_breakpoint.
14691 (uninsert_breakpoint): Rename to ...
14692 (uninsert_raw_breakpoint): ... this.
14693 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14694 (reinsert_raw_breakpoint): Change parameter type to
14696 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14698 (check_breakpoints): Adjust. Use release_breakpoint.
14699 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14700 (breakpoint_inserted_here): Ditto.
14701 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14702 Don't trust the breakpoint's shadow if it is not inserted.
14703 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14704 (delete_all_breakpoints): Adjust.
14705 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14706 use delete_breakpoint_1.
14708 * mem-break.h (breakpoints_supported): Delete declaration.
14709 (set_gdb_breakpoint_at): Declare.
14710 (gdb_breakpoint_here): Declare.
14711 (delete_breakpoint_at): Delete.
14712 (delete_gdb_breakpoint_at): Declare.
14714 * server.h (struct raw_breakpoint): Forward declare.
14715 (struct process_info): New field `raw_breakpoints'.
14717 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14720 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14722 * linux-low.c (status_pending_p_callback): Fix comment.
14723 (linux_wait_for_event_1): Move most of the internal breakpoint
14724 handling from here...
14725 (linux_wait_1): ... to here.
14726 (count_events_callback): New.
14727 (select_singlestep_lwp_callback): New.
14728 (select_event_lwp_callback): New.
14729 (cancel_breakpoints_callback): New.
14730 (select_event_lwp): New.
14731 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14732 priority to all LWPs that have had events that should be reported
14733 to the client. Cancel breakpoints when about to reporting the
14734 event to the client, not while stopping lwps. No longer cancel
14735 finished single-steps here.
14736 (cancel_finished_single_step): Delete.
14737 (cancel_finished_single_steps): Delete.
14739 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14741 * mem-break.c (enum bkpt_type): New.
14742 (struct breakpoint): New field `type'.
14743 (set_breakpoint_at): Change return type to struct breakpoint
14744 pointer. Set type to `other_breakpoint' by default.
14745 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14746 in the breakpoint list.
14747 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14748 (reinsert_breakpoint): Rename to ...
14749 (reinsert_raw_breakpoint): ... this.
14750 (reinsert_breakpoints_at): Adjust.
14751 * mem-break.h (struct breakpoint): Declare.
14752 (set_breakpoint_at): Change return type to struct breakpoint
14755 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14757 * server.c (handle_query): Assign, not compare.
14759 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14761 Teach linux gdbserver to step-over-breakpoints.
14763 * linux-low.c (can_hardware_single_step): New.
14764 (supports_breakpoints): New.
14765 (handle_extended_wait): If stopping threads, read the stop pc of
14766 the new cloned LWP.
14768 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14769 low target doesn't support retrieving the PC.
14770 (add_lwp): Set last_resume_kind to resume_continue.
14771 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14772 (linux_attach): Don't clear stop_expected. Set the lwp's
14773 last_resume_kind to resume_stop.
14774 (linux_detach_one_lwp): Don't check for removed breakpoints.
14775 (check_removed_breakpoint): Delete.
14776 (status_pending_p): Rename to ...
14777 (status_pending_p_callback): ... this. Don't check for removed
14778 breakpoints. Don't consider threads that are stopped from GDB's
14780 (linux_wait_for_lwp): Always read the stop_pc here.
14781 (cancel_breakpoint): New.
14782 (step_over_bkpt): New global.
14783 (linux_wait_for_event_1): Implement stepping over breakpoints.
14784 (gdb_wants_lwp_stopped): New.
14785 (gdb_wants_all_stopped): New.
14786 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14787 single-step traps here. Store the thread's last reported target
14789 (send_sigstop): Don't clear stop_expected. Always set it,
14791 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14792 (cancel_finished_single_step): New.
14793 (cancel_finished_single_steps): New.
14794 (wait_for_sigstop): Don't cancel finished single-step traps here.
14795 (linux_resume_one_lwp): Don't check for removed breakpoints.
14796 Don't set `step' on non-hardware step archs.
14797 (linux_set_resume_request): Ignore resume_stop requests if already
14798 stopping or stopped. Set the lwp's last_resume_kind.
14799 (resume_status_pending_p): Don't check for removed breakpoints.
14800 (need_step_over_p): New.
14801 (start_step_over): New.
14802 (finish_step_over): New.
14803 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14804 requests. Clear the thread's last reported target waitstatus.
14805 Don't use the `suspended' flag. Don't consider pending breakpoints.
14806 (linux_resume): Start a step-over if necessary.
14807 (proceed_one_lwp): New.
14808 (proceed_all_lwps): New.
14809 (unstop_all_lwps): New.
14810 * linux-low.h (struct lwp_info): Rewrite comment for the
14811 `suspended' flag. Add the `stop_pc' field. Delete the
14812 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14813 Add `'last_resume_kind' and `need_step_over' fields.
14814 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14815 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14816 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14817 (set_raw_breakpoint_at): New.
14818 (set_breakpoint_at): Rewrite to use it.
14819 (reinsert_breakpoint_handler): Delete.
14820 (set_reinsert_breakpoint): New.
14821 (reinsert_breakpoint_by_bp): Delete.
14822 (delete_reinsert_breakpoints): New.
14823 (uninsert_breakpoint): Rewrite.
14824 (uninsert_breakpoints_at): New.
14825 (reinsert_breakpoint): Rewrite.
14826 (reinsert_breakpoints_at): New.
14827 (check_breakpoints): Rewrite.
14828 (breakpoint_here): New.
14829 (breakpoint_inserted_here): New.
14830 (check_mem_read): Adjust.
14831 * mem-break.h (breakpoints_supported, breakpoint_here)
14832 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14833 (reinsert_breakpoint_by_bp): Delete declaration.
14834 (delete_reinsert_breakpoints): Declare.
14835 (reinsert_breakpoint): Delete declaration.
14836 (reinsert_breakpoints_at): Declare.
14837 (uninsert_breakpoint): Delete declaration.
14838 (uninsert_breakpoints_at): Declare.
14839 (check_breakpoints): Adjust prototype.
14840 * server.h: Adjust include order.
14841 (struct thread_info): Declare here. Add a `last_status' field.
14843 2010-03-23 Michael Snyder <msnyder@vmware.com>
14845 * server.c (crc32): New function.
14846 (handle_query): Add handling for 'qCRC:' request.
14848 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14850 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14851 lwp had been stopped by a watchpoint.
14853 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14855 * server.h (internal_error): Declare.
14856 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14857 * utils.c (internal_error): New function.
14859 2010-03-15 Andreas Schwab <schwab@redhat.com>
14861 * configure.srv: Fix typo setting srv_regobj.
14863 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14865 * linux-low.c (fetch_register): Avoid passing a non string literal
14867 (usr_store_inferior_registers): Ditto.
14869 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14871 * linux-low.c (linux_write_memory): Bail out early if peeking
14874 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14876 * linux-low.h (struct lwp_info): New fields
14877 `stopped_by_watchpoint' and `stopped_data_address'.
14878 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14879 here, and cache them in the lwp object.
14880 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14882 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14884 (linux_stopped_by_watchpoint): Rewrite.
14885 (linux_stopped_data_address): Rewrite.
14887 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14889 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14890 switching the current inferior, not before.
14892 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14894 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14895 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14896 i386-linux.c and amd64-linux.c.
14897 (reg-i386.o): Removed.
14898 (reg-i386.c): Likewise.
14899 (reg-i386-linux.o): Likewise.
14900 (reg-i386-linux.c): Likewise.
14901 (reg-x86-64.o): Likewise.
14902 (reg-x86-64.c): Likewise.
14903 (reg-x86-64-linux.o): Likewise.
14904 (reg-x86-64-linux.c): Likewise.
14906 (i386.c): Likewise.
14907 (i386-linux.o): Likewise.
14908 (i386-linux.c): Likewise.
14909 (amd64.o): Likewise.
14910 (amd64.c): Likewise.
14911 (amd64-linux.o): Likewise.
14912 (amd64-linux.c): Likewise.
14914 * configure.srv (srv_i386_regobj): New.
14915 (srv_i386_linux_regobj): Likewise.
14916 (srv_amd64_regobj): Likewise.
14917 (srv_amd64_linux_regobj): Likewise.
14918 (srv_i386_32bit_xmlfiles): Likewise.
14919 (srv_i386_64bit_xmlfiles): Likewise.
14920 (srv_i386_xmlfiles): Likewise.
14921 (srv_amd64_xmlfiles): Likewise.
14922 (srv_i386_linux_xmlfiles): Likewise.
14923 (srv_amd64_linux_xmlfiles): Likewise.
14924 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14925 srv_xmlfiles to $srv_i386_xmlfiles.
14926 (i[34567]86-*-mingw32ce*): Likewise.
14927 (i[34567]86-*-mingw*): Likewise.
14928 (i[34567]86-*-nto*): Likewise.
14929 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14930 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14931 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14932 (x86_64-*-linux*): Likewise.
14934 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14935 (init_registers_amd64_linux): New.
14936 (x86_arch_setup): Replace init_registers_x86_64_linux with
14937 init_registers_amd64_linux.
14939 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14941 * configure.ac: Check for libdl. If it is not available link against
14942 static libthread_db.
14943 * configure: Regenerate.
14945 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14949 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14950 handing a read watchpoint.
14951 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14953 2010-02-12 Doug Evans <dje@google.com>
14955 * linux-low.c (linux_supports_tracefork_flag): Document.
14956 (linux_look_up_symbols): Add comment.
14958 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14960 * regcache.c (supply_register): Clear regcache if buf is NULL.
14962 2010-02-02 Nicolas Roche <roche@sourceware.org>
14963 Joel Brobecker <brobecker@adacore.com>
14965 * inferiors.c (find_inferior): Add function documentation.
14966 (unloaded_dll): Handle the case where the unloaded dll has not
14967 been previously registered in the dll list.
14969 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14971 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14972 (thumb2_breakpoint): New.
14973 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14975 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14977 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14978 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14981 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14983 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14985 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14987 * linux-s390-low.c (s390_collect_ptrace_register)
14988 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14990 2010-01-21 Doug Evans <dje@google.com>
14992 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14993 (PTRACE_ARG4_TYPE): New macro.
14994 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14995 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14996 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14997 (usr_store_inferior_registers): Ditto.
14998 (linux_read_memory, linux_write_memory): Ditto.
14999 (linux_test_for_tracefork): Ditto.
15001 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15002 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15004 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15006 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15009 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15011 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15012 prototype to take a regcache. Adjust.
15014 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15016 * regcache.h (struct thread_info): Forward declare.
15017 (struct regcache): New.
15018 (new_register_cache): Adjust prototype.
15019 (get_thread_regcache): Declare.
15020 (free_register_cache): Adjust prototype.
15021 (registers_to_string, registers_from_string): Ditto.
15022 (supply_register, supply_register_by_name, collect_register)
15023 (collect_register_as_string, collect_register_by_name): Ditto.
15024 * regcache.c (struct inferior_regcache_data): Delete.
15025 (get_regcache): Rename to ...
15026 (get_thread_regcache): ... this. Adjust. Switch inferior before
15027 fetching registers.
15028 (regcache_invalidate_one): Adjust.
15029 (regcache_invalidate): Fix prototype.
15030 (new_register_cache): Return the new register cache.
15031 (free_register_cache): Change prototype.
15032 (realloc_register_cache): Adjust.
15033 (registers_to_string): Change prototype to take a regcache. Adjust.
15034 (registers_from_string): Ditto.
15035 (register_data): Ditto.
15036 (supply_register): Ditto.
15037 (supply_register_by_name): Ditto.
15038 (collect_register): Ditto.
15039 (collect_register_as_string): Ditto.
15040 (collect_register_by_name): Ditto.
15041 * server.c (process_serial_event): Adjust.
15042 * linux-low.h (regset_fill_func, regset_store_func): Change
15044 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15046 * linux-low.c (get_stop_pc): Adjust.
15047 (check_removed_breakpoint): Adjust.
15048 (linux_wait_for_event): Adjust.
15049 (linux_resume_one_lwp): Adjust.
15050 (fetch_register): Add regcache parameter. Adjust.
15051 (usr_store_inferior_registers): Ditto.
15052 (regsets_fetch_inferior_registers): Ditto.
15053 (regsets_store_inferior_registers): Ditto.
15054 (linux_fetch_registers, linux_store_registers): Ditto.
15055 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15057 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15059 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15060 prototype to take a regcache.
15061 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15062 * remote-utils.c (convert_ascii_to_int, outreg)
15063 (prepare_resume_reply): Change prototype to take a regcache.
15065 * target.h (struct target_ops) <fetch_registers, store_registers>:
15066 Change prototype to take a regcache.
15067 (fetch_inferior_registers, store_inferior_registers): Change
15068 prototype to take a regcache. Adjust.
15069 * proc-service.c (ps_lgetregs): Adjust.
15070 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15071 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15072 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15073 take a regcache. Adjust.
15074 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15075 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15076 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15077 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15078 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15079 (cris_cannot_fetch_register):
15080 (cris_breakpoint_at): Change prototype to take a regcache.
15082 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15083 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15084 to take a regcache. Adjust.
15085 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15087 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15088 take a regcache. Adjust.
15089 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15090 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15091 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15092 * linux-mips-low.c (mips_get_pc):
15093 (mips_set_pc): Change prototype to take a regcache. Adjust.
15094 (mips_reinsert_addr): Adjust.
15095 (mips_collect_register): Change prototype to take a regcache.
15097 (mips_supply_register):
15098 (mips_collect_register_32bit, mips_supply_register_32bit)
15099 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15100 (mips_store_fpregset): Ditto.
15101 * linux-ppc-low.c (ppc_supply_ptrace_register)
15102 (ppc_supply_ptrace_register): Ditto.
15103 (parse_spufs_run): Adjust.
15104 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15105 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15106 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15107 take a regcache. Adjust.
15108 * linux-s390-low.c (s390_collect_ptrace_register)
15109 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15110 (s390_set_pc): Change prototype to take a regcache. Adjust.
15111 (s390_arch_setup): Adjust.
15112 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15113 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15114 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15115 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15116 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15118 (sparc_breakpoint_at): Adjust.
15119 * linux-xtensa-low.c (xtensa_fill_gregset):
15120 (xtensa_store_gregset):
15121 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15122 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15123 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15124 prototype to take a regcache. Adjust.
15125 * win32-arm-low.c (arm_fetch_inferior_register)
15126 (arm_store_inferior_register): Change prototype to take a
15128 * win32-i386-low.c (i386_fetch_inferior_register)
15129 (i386_store_inferior_register): Change prototype to take a
15131 * win32-low.c (child_fetch_inferior_registers)
15132 (child_store_inferior_registers): Change prototype to take a
15134 (win32_wait): Adjust.
15135 (win32_fetch_inferior_registers): Change prototype to take a
15137 (win32_store_inferior_registers): Adjust.
15138 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15139 store_inferior_register>: Change prototype to take a regcache.
15141 2010-01-20 Doug Evans <dje@google.com>
15143 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15145 (linux_wait_for_event1, linux_init_signals): Ditto.
15146 (W_STOPCODE): Provide definition if missing.
15148 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15150 * linux-low.c (linux_core_of_thread): New.
15151 (compare_ints, show_process, list_threads): New.
15152 (linux_qxfer_osdata): Report threads and cores.
15153 (linux_target_op): Register linux_core_of_thread.
15154 * remote-utils.c (prepare_resume_reply): Report the core.
15155 (buffer_xml_printf): Support %d specifier.
15156 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15158 (handle_query): Handle qXfer:threads. Announce availability
15160 * target.h (struct target_ops): New field core_of_thread.
15162 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15164 * Makefile.in (clean): Remove new generated files.
15165 (reg-s390.o, reg-s390.c): Remove rules.
15166 (reg-s390x.o, reg-s390x.c): Likewise.
15167 (s390-linux32.o, s390-linux32.c): Add rules.
15168 (s390-linux64.o, s390-linux64.c): Likewise.
15169 (s390x-linux64.o, s390x-linux64.c): Likewise.
15170 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15171 * linux-s390-low.c: Include <elf.h>.
15172 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15173 (init_registers_s390): Remove prototype.
15174 (init_registers_s390x): Likewise.
15175 (init_registers_s390_linux32): Add prototype.
15176 (init_registers_s390_linux64): Likewise.
15177 (init_registers_s390x_linux64): Likewise.
15178 (s390_num_regs_3264): New define.
15179 (s390_regmap_3264): New global variable.
15180 (s390_cannot_fetch_register): Remove obsolete check.
15181 (s390_cannot_store_register): Likewise.
15182 (s390_collect_ptrace_register): Handle upper/lower register halves.
15183 (s390_supply_ptrace_register): Likewise.
15184 (s390_fill_gregset): Update to register number changes.
15185 (s390_get_hwcap): New routine.
15186 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15187 Install appropriate regmap and register set.
15189 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15191 * server.c (gdbserver_version): Update copyright year to 2010.
15192 * gdbreplay.c (gdbreplay_version): Likewise.
15194 2009-12-28 Doug Evans <dje@google.com>
15196 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15197 elf/external.h. Include <elf.h> instead but only if necessary.
15199 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15201 * linux-low.c (linux_remove_process): Remove `detaching'
15202 parameter. Don't release/detach from thread_db here.
15203 (linux_kill): Release/detach from thread_db here, ...
15204 (linux_detach): ... and here, before actually detaching.
15205 (linux_wait_1): ... and here, when a process exits.
15206 * thread-db.c (any_thread_of): New.
15207 (thread_db_free): Switch the current inferior to a thread of the
15210 2009-12-21 Doug Evans <dje@google.com>
15212 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15214 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15215 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15216 warning ifndef __NR_tkill. Move setting of errno there too.
15217 Delete unnecessary resetting of errno after syscall.
15218 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15220 * configure.ac: Check for dladdr.
15221 * config.in: Regenerate.
15222 * configure: Regenerate.
15223 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15224 (try_thread_db_load): Update.
15226 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15228 2009-12-18 Doug Evans <dje@google.com>
15230 * event-loop.c: Include unistd.h if it exists.
15232 * linux-low.c (my_waitpid): Move definition away from being in
15233 between linux_tracefork_child/linux_test_for_tracefork.
15235 * gdb_proc_service.h (psaddr_t): Fix type.
15236 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15237 signature to match glibc.
15239 2009-12-16 Doug Evans <dje@google.com>
15241 * linux-low.c (linux_read_memory): Fix argument to read.
15243 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15245 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15246 events, don't leave current_inferior pointing at null.
15248 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15250 * win32-low.c (LOG): Delete.
15251 (OUTMSG): Output to stderr.
15252 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15253 on compile time LOG macro.
15254 (win32_wait): Fix debug output.
15256 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15258 * win32-low.c (win32_add_one_solib): If the dll name is
15259 "ntdll.dll", prepend the system directory to the dll path.
15261 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15263 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15265 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15266 Vladimir Prus <vladimir@codesourcery.com>
15268 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15269 * configure.ac: Check for __mcoldfire__ and set
15270 gdb_cv_m68k_is_coldfire.
15271 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15272 reg-cf.o and reg-m68k.o.
15273 * configure: Regenerated.
15275 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15277 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15278 Pass it to thread_db_free.
15279 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15280 proper `detaching' argument to linux_remove_process.
15281 * linux-low.h (thread_db_free): Add `detaching' parameter.
15282 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15284 (thread_db_free): Add `detaching' parameter. Only
15285 call td_ta_clear_event if detaching from process.
15287 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15289 * thread-db.c (thread_db_free): Fix typo.
15291 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15294 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15296 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15298 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15299 with an i686 compiler.
15300 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15302 * configure: Rebuilt.
15304 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15308 * server.c (handle_search_memory_1): Correct read_addr initialization
15309 in loop for searching subsequent chunks.
15311 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15313 * configure.ac: New --with-libthread-db option.
15314 * thread-db.c: Allow direct dependence on libthread_db.
15315 (thread_db_free): Adjust.
15316 * config.in: Regenerate.
15317 * configure: Likewise.
15319 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15322 * thread-db.c (attach_thread): New function.
15323 (maybe_attach_thread): Return success/failure.
15324 (find_new_threads_callback): Adjust.
15325 (thread_db_find_new_threads): Loop until no new threads.
15327 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15329 * proc-service.c (ps_lgetregs): Formatting.
15331 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15333 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15334 * configure.ac: Adjust.
15335 * linux-low.h (struct process_info_private): Move members to struct
15337 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15338 * linux-low.c (linux_remove_process): Adjust.
15339 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15340 * server.c (handle_query): Move code ...
15341 (handle_monitor_command): ... here. New function.
15342 * target.h (struct target_ops): New member.
15343 * thread-db.c (struct thread_db): New.
15344 (libthread_db_search_path): New variable.
15345 (thread_db_create_event, thread_db_enable_reporting)
15346 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15347 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15348 (try_thread_db_load_1, dladdr_to_soname): New functions.
15349 (try_thread_db_load, thread_db_load_search): New functions.
15350 (thread_db_init): Search for libthread_db.
15351 (thread_db_free): New function.
15352 (thread_db_handle_monitor_command): Likewise.
15353 * config.in: Regenerate.
15354 * configure: Regenerate.
15356 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15358 * spu-low.c (spu_kill): Wait for inferior to terminate.
15359 Call clear_inferiors.
15360 (spu_detach): Call clear_inferiors.
15362 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15364 * aclocal.m4: Regenerate.
15365 * config.in: Likewise.
15366 * configure: Likewise.
15368 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15370 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15371 (parse_spufs_run): New function.
15372 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15373 (ppc_breakpoint_at): Handle SPU breakpoints.
15375 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15377 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15378 (SPUFS_MAGIC): Define.
15379 (spu_enumerate_spu_ids): New function.
15380 (linux_qxfer_spu): New function.
15381 (linux_target_ops): Install linux_qxfer_spu.
15383 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15385 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15386 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15387 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15388 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15389 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15390 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15391 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15392 (init_registers_powerpc_cell32l): Add prototype.
15393 (init_registers_powerpc_cell64l): Likewise.
15394 (ppc_arch_setup): Detect Cell/B.E. architecture.
15396 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15398 * Makefile.in (datarootdir): New variable.
15400 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15402 * linux-low.c (linux_write_memory): Update debugging output.
15403 * Makefile.in (clean): Add new descriptions.
15404 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15405 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15406 * configure.srv: Add new files for arm*-*-linux*.
15407 * linux-arm-low.c: Add new declarations.
15408 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15409 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15410 (HWCAP_VFPv3D16): New.
15411 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15412 instead of __IWMMXT__.
15413 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15414 (arm_arch_setup): New.
15415 (target_regsets): Remove #ifdef. Add VFP regset.
15416 (the_low_target): Use arm_arch_setup.
15418 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15420 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15421 the main thread again.
15423 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15425 Adding Neutrino gdbserver.
15426 * configure: Regenerated.
15427 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15428 * configure.srv (i[34567]86-*-nto*): New target.
15429 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15430 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15431 (nto_comctrl) [__QNX__]: New function.
15432 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15434 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15436 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15439 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15440 Pedro Alves <pedro@codesourcery.com>
15442 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15443 don't support CONTEXT_EXTENDED_REGISTERS.
15444 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15445 (the_low_target): Install them.
15446 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15447 failing with ERROR_PIPE_NOT_CONNECTED.
15449 2009-06-30 Doug Evans <dje@google.com>
15450 Pierre Muller <muller@ics.u-strasbg.fr>
15452 Add h/w watchpoint support to x86-linux, win32-i386.
15453 * Makefile.in (SFILES): Add i386-low.c
15454 (i386_low_h): Define.
15455 (i386-low.o): Add dependencies.
15456 (linux-x86-low.o): Add i386-low.h dependency.
15457 (win32-i386-low.o): Ditto.
15458 * i386-low.c: New file.
15459 * i386-low.h: New file.
15460 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15461 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15462 * linux-low.c (linux_add_process): Initialize arch_private.
15463 (linux_remove_process): Free arch_private.
15464 (add_lwp): Initialize arch_private.
15465 (delete_lwp): Free arch_private.
15466 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15468 * linux-low.h (process_info_private): New member arch_private.
15469 (lwp_info): New member arch_private.
15470 (linux_target_ops): New members new_process, new_thread,
15472 (ptid_of): New macro.
15473 * linux-x86-low.c: Include stddef.h, i386-low.h.
15474 (arch_process_info): New struct.
15475 (arch_lwp_info): New struct.
15476 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15477 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15478 (i386_dr_low_get_status): New function.
15479 (x86_insert_point, x86_remove_point): New functions.
15480 (x86_stopped_by_watchpoint): New function.
15481 (x86_stopped_data_address): New function.
15482 (x86_linux_new_process, x86_linux_new_thread): New functions.
15483 (x86_linux_prepare_to_resume): New function.
15484 (the_low_target): Add entries for insert_point, remove_point,
15485 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15487 * server.c (debug_hw_points): New global.
15488 (monitor_show_help): Document set debug-hw-points.
15489 (handle_query): Process "set debug-hw-points".
15490 * server.h (debug_hw_points): Declare.
15491 (paddress): Declare.
15492 * utils.c (NUMCELLS, CELLSIZE): New macros.
15493 (get_sell, xsnprintf, paddress): New functions.
15494 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15495 remove_point, stopped_by_watchpoint, stopped_data_address.
15496 * win32-i386-low.c: Include i386-low.h.
15497 (debug_reg_state): Replaces dr.
15498 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15499 (i386_dr_low_get_status): New function.
15500 (i386_insert_point, i386_remove_point): New functions.
15501 (i386_stopped_by_watchpoint): New function.
15502 (i386_stopped_data_address): New function.
15503 (i386_initial_stuff): Update.
15504 (get_thread_context,set_thread_context,i386_thread_added): Update.
15505 (the_low_target): Add entries for insert_point,
15506 remove_point, stopped_by_watchpoint, stopped_data_address.
15507 * win32-low.c (win32_insert_watchpoint): New function.
15508 (win32_remove_watchpoint): New function.
15509 (win32_stopped_by_watchpoint): New function.
15510 (win32_stopped_data_address): New function.
15511 (win32_target_ops): Add entries for insert_watchpoint,
15512 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15513 * win32-low.h (win32_target_ops): New members insert_point,
15514 remove_point, stopped_by_watchpoint, stopped_data_address.
15516 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15518 * server.c (process_serial_event): Re-return unsupported, not
15519 error, if the type isn't recognized. Re-allow supporting only
15520 insert or remove packets. Also call require_running for
15521 breakpoints. Add missing break statement to default case. Tidy.
15522 * target.h (struct target_ops): Rename insert_watchpoint to
15523 insert_point, and remove_watchpoint to remove_point.
15525 * linux-low.h (struct linux_target_ops): Likewise.
15526 * linux-low.c (linux_insert_watchpoint): Rename to ...
15527 (linux_insert_point): ... this. Adjust.
15528 (linux_remove_watchpoint): Rename to ...
15529 (linux_remove_point): ... this. Adjust.
15530 (linux_target_ops): Adjust.
15531 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15532 (cris_insert_point): ... this.
15533 (cris_remove_watchpoint): Rename to ...
15534 (cris_remove_point): ... this.
15535 (the_low_target): Adjust.
15537 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15539 * server.c (handle_v_kill): Pass signal_pid to
15540 kill_inferior if multi_process is zero.
15542 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15544 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15545 * target.h (target_ops): Comment for *_watchpoint to make it clear
15546 the functions can get types '0' and '1'.
15548 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15550 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15551 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15552 * regcache.c (get_regcache): Likewise.
15553 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15554 * win32-low.c (child_fetch_inferior_registers): Remove check for
15557 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15558 Pedro Alves <pedro@codesourcery.com>
15560 * target.h (struct target_ops) <supports_multi_process>: New
15562 (target_supports_multi_process): New.
15563 * server.c (handle_query): Even if GDB reports support, only
15564 enable multi-process if the target also supports it. Report
15565 multi-process support only if the target backend supports it.
15566 * linux-low.c (linux_supports_multi_process): New function.
15567 (linux_target_ops): Install it as target_supports_multi_process
15570 2009-05-24 Doug Evans <dje@google.com>
15572 Global renaming of find_thread_pid to find_thread_ptid.
15573 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15574 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15575 All callers updated.
15577 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15578 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15581 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15582 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15583 (linux_resume_one_lwp): Ditto.
15585 2009-05-23 Doug Evans <dje@google.com>
15587 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15588 from struct inferior_list_entry * to struct lwp_info *.
15589 All callers updated.
15591 2009-05-13 Doug Evans <dje@google.com>
15593 * linux-x86-low.c: Don't include assert.h.
15594 (x86_siginfo_fixup): Use fatal, not assert.
15595 (x86_arch_setup): Fix comment.
15597 2009-05-12 Doug Evans <dje@google.com>
15599 Biarch support for i386/amd64 gdbserver.
15600 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15601 Add linux-x86-low.c.
15602 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15603 (linux-x86-low.o): Add.
15604 * linux-x86-64-low.c: Delete.
15605 * linux-i386-low.c: Delete.
15606 * linux-x86-low.c: New file.
15607 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15609 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15611 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15612 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15613 (linux_child_pid_to_exec_file): New function.
15614 (elf_64_header_p, elf_64_file_p): New functions.
15615 (siginfo_fixup): New function.
15616 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15617 give target a chance to convert layout.
15618 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15619 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15621 2009-05-07 Doug Evans <dje@google.com>
15623 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15624 (regsets_store_inferior_registers): Ditto.
15626 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15630 * linux-low.c (must_set_ptrace_flags): Delete.
15631 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15633 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15634 `lwp->must_set_ptrace_flags' instead.
15635 (linux_wait_for_event_1): Set ptrace options here.
15636 (linux_wait_1): ... not here.
15638 2009-04-30 Doug Evans <dje@google.com>
15640 * inferiors.c (started_inferior_callback): New function.
15641 (attached_inferior_callback): New function.
15642 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15643 * server.c (print_started_pid, print_attached_pid): New functions.
15644 (detach_or_kill_for_exit): New function.
15645 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15646 * server.h (have_started_inferiors_p): Declare.
15647 (have_attached_inferiors_p): Declare.
15649 * inferiors.c (remove_process): Fix memory leak, free process.
15650 * linux-low.c (linux_remove_process): New function.
15651 (linux_kill): Call it instead of remove_process.
15652 (linux_detach, linux_wait_1): Ditto.
15654 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15656 * configure.srv: Add x86 Windows CE target.
15658 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15660 * inferiors.c (get_thread_process): Make global.
15661 * server.h (get_thread_process): Add prototype.
15662 * thread-db.c (find_one_thread): Use get_thread_process
15663 instead of current_process.
15664 (thread_db_get_tls_address): Do not crash if called when
15665 thread layer is not yet initialized.
15667 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15669 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15670 * spu-low.c (current_tid): Rename to ...
15671 (current_ptid): ... this.
15672 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15673 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15674 ptid_get_lwp (current_ptid) instead of current_tid.
15675 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15676 instead of current_tid. Use find_process_pid to verify pid
15677 argument is valid. Pass proper argument to remove_process.
15678 (spu_thread_alive): Compare current_ptid instead of current_tid.
15679 (spu_resume): Likewise.
15681 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15683 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15686 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15688 Implement the multiprocess extensions, and add linux multiprocess
15691 * server.h (ULONGEST): Declare.
15692 (struct ptid, ptid_t): New.
15693 (minus_one_ptid, null_ptid): Declare.
15694 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15695 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15696 (struct inferior_list_entry): Change `id' type from unsigned from
15698 (struct sym_cache, struct breakpoint, struct
15699 process_info_private): Forward declare.
15700 (struct process_info): Declare.
15701 (current_process): Declare.
15702 (all_processes): Declare.
15703 (initialize_inferiors): Declare.
15704 (add_thread): Adjust to use ptid_t.
15705 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15706 (add_process, remove_process, find_thread_pid): Declare.
15707 (find_inferior_id): Adjust to use ptid_t.
15708 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15709 (multi_process): Declare.
15710 (push_event): Adjust to use ptid_t.
15711 (read_ptid, write_ptid): Declare.
15712 (prepare_resume_reply): Adjust to use ptid_t.
15713 (clear_symbol_cache): Declare.
15714 * inferiors.c (all_processes): New.
15715 (null_ptid, minus_one_ptid): New.
15716 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15717 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15718 (add_thread): Change unsigned long to ptid. Remove gdb_id
15720 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15721 (gdb_id_to_thread): Rename to ...
15722 (find_thread_pid): ... this. Change unsigned long to ptid.
15723 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15724 (loaded_dll, pull_pid_from_list): Adjust.
15725 (add_process, remove_process, find_process_pid)
15726 (get_thread_process, current_process, initialize_inferiors): New.
15727 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15728 (struct target_waitstatus) <related_pid>: Ditto.
15729 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15730 return type to int.
15731 (struct target_ops) <join>: Add `pid' argument.
15732 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15733 (struct target_ops) <wait>: Add `ptid' field. Change return type
15735 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15736 (mywait): Add `ptid' argument. Change return type to ptid_t.
15737 (target_pid_to_str): Declare.
15738 * target.c (set_desired_inferior): Adjust to use ptids.
15739 (mywait): Add new `ptid' argument. Adjust.
15740 (target_pid_to_str): New.
15741 * mem-break.h (free_all_breakpoints): Declare.
15742 * mem-break.c (breakpoints): Delelete.
15743 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15744 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15745 to use per-process breakpoint list.
15746 (free_all_breakpoints): New.
15747 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15748 (symbol_cache, all_symbols_looked_up): Delete.
15750 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15752 (prepare_resume_reply): Change ptid argument's type from unsigned
15753 long to ptid_t. Adjust. Implement W;process and X;process.
15754 (free_sym_cache, clear_symbol_cache): New.
15755 (look_up_one_symbol): Adjust to per-process symbol cache. *
15756 * server.c (cont_thread, general_thread, step_thread): Change type
15758 (attached): Delete.
15759 (multi_process): New.
15760 (last_ptid): Change type to ptid_t.
15761 (struct vstop_notif) <ptid>: Change type to ptid_t.
15762 (queue_stop_reply, push_event): Change `ptid' argument's type to
15764 (discard_queued_stop_replies): Add `pid' argument.
15765 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15766 changes. Don't reference the `attached' global.
15767 (attach_inferior): Adjust to mywait interface changes.
15768 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15769 features. Handle and report "multiprocess+". Handle
15771 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15773 (handle_v_kill): New.
15774 (handle_v_stopped): Adjust to use target_pid_to_str.
15775 (handle_v_requests): Allow multiple attaches and runs when
15776 multiprocess extensions are in effect. Handle "vKill".
15777 (myresume): Adjust to use ptids.
15778 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15779 (handle_status): Adjust to discard_queued_stop_replies interface
15781 (first_thread_of, kill_inferior_callback)
15782 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15783 (main): Call initialize_inferiors. Adjust to use ptids, killing
15784 and detaching from all inferiors. Handle multiprocess packet
15786 * linux-low.h: Include gdb_proc_service.h.
15787 (struct process_info_private): New.
15788 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15789 <lwpid_of>: Use ptid_get_lwp.
15790 (get_lwp_thread): Adjust.
15791 (struct lwp_info): Add `dead' member.
15792 (find_lwp_pid): Declare.
15793 * linux-low.c (thread_db_active): Delete.
15794 (new_inferior): Adjust comment.
15795 (inferior_pid): Delete.
15796 (linux_add_process): New.
15797 (handle_extended_wait): Adjust.
15798 (add_lwp): Change unsigned long to ptid.
15799 (linux_create_inferior): Add process to processes table. Adjust
15800 to use ptids. Don't set new_inferior here.
15801 (linux_attach_lwp): Rename to ...
15802 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15803 it. Adjust to use ptids.
15804 (linux_attach_lwp): New.
15805 (linux_attach): Add process to processes table. Don't set
15807 (struct counter): New.
15808 (second_thread_of_pid_p, last_thread_of_process_p): New.
15809 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15810 multiple processes.
15811 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15812 processes. Remove process from process table.
15813 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15814 to multiple processes.
15815 (any_thread_of): New.
15816 (linux_detach): Add `pid' argument, and handle it. Remove process
15817 from processes table.
15818 (linux_join): Add `pid' argument. Handle it.
15819 (linux_thread_alive): Change unsighed long argument to ptid_t.
15820 Consider dead lwps as not being alive.
15821 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15822 threads we're not interested in.
15823 (same_lwp, find_lwp_pid): New.
15824 (linux_wait_for_lwp): Change `pid' argument's type from int to
15826 (linux_wait_for_event): Rename to ...
15827 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15828 from int to ptid_t. Adjust.
15829 (linux_wait_for_event): New.
15830 (linux_wait_1): Add `ptid' argument. Change return type to
15831 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15832 that exit from the process table.
15833 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15835 (mark_lwp_dead): New.
15836 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15837 stopping all threads, mark its main lwp as dead.
15838 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15840 (fetch_register, usr_store_inferior_registers)
15841 (regsets_fetch_inferior_registers)
15842 (regsets_store_inferior_registers, linux_read_memory)
15843 (linux_write_memory): Inline `inferior_pid'.
15844 (linux_look_up_symbols): Adjust to use per-process
15845 `thread_db_active'.
15846 (linux_request_interrupt): Adjust to use ptids.
15847 (linux_read_auxv): Inline `inferior_pid'.
15848 (initialize_low): Don't reference thread_db_active.
15849 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15850 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15851 (ps_getpid): Return the pid of the current inferior.
15852 * thread-db.c (proc_handle, thread_agent): Delete.
15853 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15855 (find_one_thread): Change argument type to ptid_t. Adjust to
15857 (maybe_attach_thread): Adjust to per-process data and ptids.
15858 (thread_db_find_new_threads): Ditto.
15859 (thread_db_init): Ditto.
15860 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15861 processes table. Adjust to use ptids.
15862 (spu_kill, spu_detach): Adjust interface. Remove process from
15864 (spu_join, spu_thread_alive): Adjust interface.
15865 (spu_wait): Adjust interface. Remove process from processes
15866 table. Adjust to use ptids.
15867 * win32-low.c (current_inferior_tid): Delete.
15868 (current_inferior_ptid): New.
15869 (debug_event_ptid): New.
15870 (thread_rec): Take a ptid. Adjust.
15871 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15872 (child_delete_thread): Ditto.
15873 (do_initial_child_stuff): Add `attached' argument. Add process to
15875 (child_fetch_inferior_registers, child_store_inferior_registers):
15877 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15878 (win32_attach): Pass 1 to do_initial_child_stuff.
15879 (win32_kill): Adjust interface. Remove process from processes
15881 (win32_detach): Ditto.
15882 (win32_join): Adjust interface.
15883 (win32_thread_alive): Take a ptid.
15884 (win32_resume): Adjust to use ptids.
15885 (get_child_debug_event): Ditto.
15886 (win32_wait): Adjust interface. Remove exiting process from
15889 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15891 Non-stop mode support.
15893 * server.h (non_stop): Declare.
15894 (gdb_client_data, handler_func): Declare.
15895 (delete_file_handler, add_file_handler, start_event_loop):
15897 (handle_serial_event, handle_target_event, push_event)
15898 (putpkt_notif): Declare.
15899 * target.h (enum resume_kind): New.
15900 (struct thread_resume): Replace `step' field by `kind' field.
15901 (TARGET_WNOHANG): Define.
15902 (struct target_ops) <wait>: Add `options' argument.
15903 <supports_non_stop, async, start_non_stop>: New fields.
15904 (target_supports_non_stop, target_async): New.
15905 (start_non_stop): Declare.
15906 (mywait): Add `options' argument.
15907 * target.c (mywait): Add `options' argument. Print child exit
15908 notifications here.
15909 (start_non_stop): New.
15910 * server.c (non_stop, own_buf, mem_buf): New globals.
15911 (struct vstop_notif): New.
15912 (notif_queue): New global.
15913 (queue_stop_reply, push_event, discard_queued_stop_replies)
15914 (send_next_stop_reply): New.
15915 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15917 (attach_inferior): In non-stop mode, don't wait for the target
15919 (handle_general_set): Handle QNonStop.
15920 (handle_query): When handling qC, return the current general
15921 thread, instead of the first thread of the list.
15922 (handle_query): If the backend supports non-stop mode, include
15923 QNonStop+ in the qSupported query response.
15924 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15926 (handle_v_attach, handle_v_run): Handle non-stop mode.
15927 (handle_v_stopped): New.
15928 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15929 (myresume): Adjust to use resume_kind. Handle non-stop.
15930 (queue_stop_reply_callback): New.
15931 (handle_status): Handle non-stop mode.
15932 (main): Clear non_stop flag on reconnection. Use the event-loop.
15933 Refactor serial protocol handling from here ...
15934 (process_serial_event): ... to this new function. When GDB
15935 selects any thread, select one here. In non-stop mode, wait until
15936 GDB acks all pending events before exiting.
15937 (handle_serial_event, handle_target_event): New.
15938 * remote-utils.c (remote_open): Install remote_desc in the event
15940 (remote_close): Remove remote_desc from the event loop.
15941 (putpkt_binary): Rename to...
15942 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15943 (putpkt_binary): New as wrapper around putpkt_binary_1.
15944 (putpkt_notif): New.
15945 (prepare_resume_reply): In non-stop mode, don't change the
15947 * event-loop.c: New.
15948 * Makefile.in (OBJ): Add event-loop.o.
15949 (event-loop.o): New rule.
15951 * linux-low.h (pid_of): Moved here.
15953 (get_lwp_thread): Use lwpid_of.
15954 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15955 * linux-low.c (pid_of): Delete.
15956 (inferior_pid): Use lwpid_of.
15957 (linux_event_pipe): New.
15958 (target_is_async_p): New.
15960 (handle_extended_wait): Use lwpid_of.
15961 (add_lwp): Don't set lwpid field.
15962 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15963 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15964 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15965 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15966 first. Adjust to linux_wait_for_event interface changes. Use
15968 (linux_detach): Don't delete the main lwp here.
15969 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15970 (status_pending_p): Don't consider explicitly suspended lwps.
15971 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15972 pointer. Add OPTIONS argument. Change return type to int. Use
15973 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15974 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15975 pointer. Add status pointer argument. Return a pid instead of a
15976 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15977 changes. In non-stop mode, don't switch to a random thread.
15978 (linux_wait): Rename to...
15979 (linux_wait_1): ... this. Add target_options argument, and handle
15980 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15981 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15982 clean exit and signal exit code. Don't stop all threads in
15983 non-stop mode. In all-stop mode, only stop all threads when
15984 reporting a stop to GDB. Handle explicit thread stop requests.
15985 (async_file_flush, async_file_mark): New.
15987 (send_sigstop): Use lwpid_of.
15988 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15989 interface changes. In non-stop mode, don't switch to a random
15991 (linux_resume_one_lwp): Use lwpid_of.
15992 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15993 (linux_resume_one_thread): ... this. Handle resume_stop. In
15994 non-stop mode, don't look for pending flag in all threads.
15995 (resume_status_pending_p): Don't consider explicitly suspended
15997 (my_waitpid): Reimplement. Emulate __WALL.
15998 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16000 (sigchld_handler, linux_supports_non_stop, linux_async)
16001 (linux_start_non_stop): New.
16002 (linux_target_ops): Register linux_supports_non_stop, linux_async
16003 and linux_start_non_stop.
16004 (initialize_low): Install SIGCHLD handler.
16005 * thread-db.c (thread_db_create_event, find_one_thread)
16006 (thread_db_get_tls_address): Use lwpid_of.
16007 * win32-low.c (win32_detach): Adjust to use resume_kind.
16008 (win32_wait): Add `options' argument.
16009 * spu-low.c (spu_resume): Adjust to use resume_kind.
16010 (spu_wait): Add `options' argument.
16012 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16014 Decouple target code from remote protocol.
16016 * target.h (enum target_waitkind): New.
16017 (struct target_waitstatus): New.
16018 (struct target_ops) <wait>: Return an unsigned long. Take a
16019 target_waitstatus pointer instead of a char pointer.
16020 (mywait): Likewise.
16021 * target.c (mywait): Change prototype to return an unsigned long.
16022 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16023 * server.h (thread_from_wait, old_thread_from_wait): Delete
16025 (prepare_resume_reply): Change prototype to take a
16027 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16028 (last_status, last_ptid): New.
16029 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16030 pid instead of a signal.
16031 (attach_inferior): Remove "status" and "signal" parameters.
16033 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16035 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16036 (handle_v_requests, myresume): Remove "status" and "signal"
16037 parameters. Adjust.
16038 (handle_status): New.
16039 (main): Delete local `status'. Adjust.
16040 * remote-utils.c: Include target.h.
16041 (prepare_resume_reply): Change prototype to take a
16042 target_waitstatus. Adjust.
16044 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16046 * spu-low.c (spu_wait): Adjust.
16047 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16049 (win32_wait): Adjust.
16051 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16053 * target.h (struct thread_resume): Delete leave_stopped member.
16054 (struct target_ops): Add a `n' argument to the `resume' callback.
16055 * server.c (start_inferior): Adjust.
16056 (handle_v_cont, myresume): Adjust.
16057 * linux-low.c (check_removed_breakpoint): Adjust to resume
16058 interface change, and to removed leave_stopped field.
16059 (resume_ptr): Delete.
16060 (struct thread_resume_array): New.
16061 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16062 resume interface change.
16063 (linux_continue_one_thread, linux_queue_one_thread)
16064 (resume_status_pending_p): Check if the resume field is NULL
16065 instead of checking the leave_stopped member.
16066 (linux_resume): Adjust to the target resume interface change.
16067 * spu-low.c (spu_resume): Adjust to the target resume interface
16069 * win32-low.c (win32_detach, win32_resume): Ditto.
16071 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16073 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16075 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16077 (linux_continue_one_thread): Only preserve the stepping flag if
16078 there's a pending breakpoint.
16080 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16082 * server.c (main): After the inferior having exited, call
16083 remote_close before exiting gdbserver.
16085 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16087 Fix size of FPSCR in Power 7 processors.
16088 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16089 (PPC_FEATURE_HAS_DFP): New #define.
16090 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16093 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16095 * server.c (handle_query) Whitespace and formatting.
16097 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16099 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16100 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16101 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16102 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16103 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16104 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16105 Makefile.in, configure.ac: Fix whitespace throughout.
16106 * configure: Regenerate.
16108 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16110 * inferiors.c (find_inferior): Make it safe for the callback
16111 function to delete the currently iterated inferior.
16113 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16115 * Makefile.in (linuw_low_h): Move higher.
16116 (thread-db.o): Depend on $(linux_low_h).
16118 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16120 Rename "process" to "lwp" throughout.
16122 * linux-low.c (all_processes): Rename to...
16123 (all_lwps): ... this.
16124 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16125 (add_process): Rename to ...
16126 (add_lwp): ... this. Adjust.
16127 (linux_create_inferior): Adjust.
16128 (linux_attach_lwp): Adjust.
16129 (linux_attach): Adjust.
16130 (linux_kill_one_process): Rename to ...
16131 (linux_kill_one_lwp): ... this. Adjust.
16132 (linux_kill): Adjust.
16133 (linux_detach_one_process): Rename to ...
16134 (linux_detach_one_lwp): ... this. Adjust.
16135 (linux_detach): Adjust.
16136 (check_removed_breakpoint): Adjust.
16137 (status_pending_p): Adjust.
16138 (linux_wait_for_process): Rename to ...
16139 (linux_wait_for_lwp): ... this. Adjust.
16140 (linux_wait_for_event): Adjust.
16141 (send_sigstop): Adjust.
16142 (wait_for_sigstop): Adjust.
16143 (stop_all_processes): Rename to ...
16144 (stop_all_lwps): ... this.
16145 (linux_resume_one_process): Rename to ...
16146 (linux_resume_one_lwp): ... this. Adjust.
16147 (linux_set_resume_request, linux_continue_one_thread)
16148 (linux_queue_one_thread, resume_status_pending_p)
16149 (usr_store_inferior_registers, regsets_store_inferior_registers)
16150 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16152 * linux-low.h (get_process): Rename to ...
16153 (get_lwp): ... this. Adjust.
16154 (get_thread_process): Rename to ...
16155 (get_thread_lwp): ... this. Adjust.
16156 (get_process_thread): Rename to ...
16157 (get_lwp_thread): ... this. Adjust.
16158 (struct process_info): Rename to ...
16159 (struct lwp_info): ... this.
16160 (all_processes): Rename to ...
16161 (all_lwps): ... this.
16162 * proc-service.c (ps_lgetregs): Adjust.
16163 * thread-db.c (thread_db_create_event, find_one_thread)
16164 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16166 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16168 * server.c (handle_query): Handle "qAttached".
16170 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16172 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16173 GPLv3, update license URL.
16175 2009-03-01 Doug Evans <dje@google.com>
16177 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16178 (server_h): Add gdb_signals.h.
16179 (signals.o): Update.
16180 * server.h (target_signal_from_host,target_signal_to_host_p)
16181 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16183 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16185 * remote-utils.c (getpkt): Also generate remote-debug
16186 information if noack_mode is set.
16188 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16190 * server.c (handle_query): Report qXfer:siginfo:read and
16191 qXfer:siginfo:write as supported and handle them.
16192 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16193 * linux-low.c (linux_xfer_siginfo): New.
16194 (linux_target_ops): Set it.
16196 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16198 * server.c (gdbserver_usage): Mention --remote-debug.
16199 (main): Accept '--remote-debug' switch.
16201 2009-01-18 Doug Evans <dje@google.com>
16203 * regcache.c (new_register_cache): No need to check result of xcalloc.
16204 * server.c (handle_search_memory): Back out calls to xmalloc,
16205 result is checked and error is returned to user upon failure.
16206 (handle_query): Ditto. Add more checks for result of malloc.
16207 (handle_v_cont): Check result of malloc, report error back to
16209 (handle_v_run): Ditto. Call freeargv.
16210 * server.h (freeargv): Declare.
16211 * utils.c (freeargv): New fn.
16213 2009-01-15 Doug Evans <dje@google.com>
16215 * gdbreplay.c (perror_with_name): Make arg const char *.
16216 * server.h (target_signal_to_name): Make return type const char *.
16217 * thread-db.c (thread_db_err_str): Make return type const char *.
16218 * utils.c (perror_with_name): Make arg const char *.
16220 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16222 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16223 when handling a EXIT_PROCESS_DEBUG_EVENT.
16225 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16227 * gdbreplay.c (gdbreplay_version): Update copyright year.
16228 * server.c (gdbserver_version): Likewise.
16230 2009-01-05 Doug Evans <dje@google.com>
16232 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16233 (handle_extended_wait): Improve comment.
16235 2008-12-13 Doug Evans <dje@google.com>
16237 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16238 * server.h (ATTR_MALLOC): New macro.
16239 (xmalloc,xcalloc,xstrdup): Declare.
16240 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16241 * inferiors.c: Ditto.
16242 * linux-low.c: Ditto.
16243 * mem-break.c: Ditto.
16244 * regcache.c: Ditto.
16245 * remote-utils.c: Ditto.
16248 * win32-low.c: Ditto.
16250 2008-12-12 Doug Evans <dje@google.com>
16252 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16253 in debugging printf.
16255 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16257 2008-12-09 Doug Evans <dje@google.com>
16259 * linux-low.h (struct process_info): Delete member tid, unused.
16260 * thread-db.c (find_one_thread): Update.
16261 (maybe_attach_thread): Update.
16263 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16265 * target.h (struct target_ops): Add qxfer_osdata member.
16266 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16268 (linux_qxfer_osdata): New functions.
16269 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16271 * server.c (handle_query): Handle "qXfer:osdata:read:".
16272 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16273 (buffer_xml_printf): New functions.
16274 * server.h (struct buffer): New.
16275 (buffer_grow_str, buffer_grow_str0): New macros.
16276 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16277 (buffer_xml_printf): Declare.
16279 2008-11-24 Doug Evans <dje@google.com>
16281 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16283 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16285 * server.c (handle_v_run): Always use the supplied argument list.
16287 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16289 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16290 (xtensa_regmap_table): Add entry for scompare1.
16292 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16294 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16295 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16296 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16297 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16298 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16299 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16300 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16301 XML target descriptions.
16302 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16303 when inferior is running on an ISA 2.05 or later processor. Add
16304 special case to return offset for full 64-bit slot of FPSCR when
16307 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16309 * Makefile.in (SFILES, clean): Added sparc64 files.
16310 (reg-sparc64.o, reg-sparc64.c): New.
16311 * configure.srv (sparc*-*-linux*): New configuration.
16312 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16313 syscall arguments for SPARC.
16314 (regsets_store_inferior_registers): Likewise.
16315 * linux-sparc-low.c: New file.
16317 2008-10-21 Doug Evans <dje@google.com>
16319 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16320 (READLINE_DIR,READLINE_DEP): Delete.
16321 (INTERNAL_CFLAGS): Update.
16322 (LINTFLAGS): Update.
16324 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16326 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16327 whole argv from the last run, not just argv[0].
16329 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16331 * regcache.c (new_register_cache): Return NULL if the register
16332 cache size isn't known yet.
16333 (free_register_cache): Avoid dereferencing a NULL regcache.
16335 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16337 * configure.srv: Merge MIPS and MIPS64.
16339 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16341 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16343 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16345 * Makefile.in: Add required vsx dependencies.
16347 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16348 Declare init_registers_powerpc_vsx32l.
16349 Declare init_registers_powerpc_vsx64l.
16350 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16351 (ppc_arch_setup): Check for VSX in hwcap.
16352 (ppc_fill_vsxregset): New function.
16353 (ppc_store_vsxregset): New function.
16354 Add new VSX entry in regset_info target_regsets.
16356 * configure.srv: Add new VSX dependencies.
16358 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16360 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16361 (remote_open): Set or clear transport_is_reliable.
16362 (putpkt_binary): Don't expect acks in noack mode.
16363 (getpkt): Don't send ack/nac in noack mode.
16364 * server.c (handle_general_set): Handle QStartNoAckMode.
16365 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16367 (main): Reset noack_mode on every connection.
16368 * server.h (noack_mode): Declare.
16370 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16372 * Makefile.in (GDBREPLAY_OBS): New variable.
16373 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16375 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16376 Daniel Jacobowitz <dan@codesourcery.com>
16378 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16379 (usr_store_inferior_registers): Likewise.
16380 (regsets_store_inferior_registers): Likewise.
16382 2008-07-31 Rolf Jansen <rj@surtec.com>
16383 Pedro Alves <pedro@codesourcery.com>
16385 * configure.ac: Check for memmem declaration.
16386 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16387 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16388 (disable_packet_qfThreadInfo): Unconditionally compile.
16389 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16390 * configure, config.in: Regenerate.
16392 2008-07-28 Doug Kwan <dougkwan@google.com>
16394 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16395 (linux_write_memory): Remove declaration of errno.
16397 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16399 * linux-low.c (handle_extended_wait): Do not use "status"
16400 variable uninitialized.
16402 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16404 * server.c (handle_v_attach): Inhibit reporting dll changes.
16406 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16408 * remote-utils.c (prepare_resume_reply): If requested, don't
16409 output "thread:TID" in the T stop reply.
16411 * server.c (disable_packet_vCont, disable_packet_Tthread)
16412 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16413 (handle_query): If requested, disable support for qC, qfThreadInfo
16415 (handle_v_requests): If requested, disable support for vCont.
16416 (gdbserver_show_disableable): New.
16417 (main): Handle --disable-packet and --disable-packet=LIST.
16419 * server.h (disable_packet_vCont, disable_packet_Tthread)
16420 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16422 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16424 * server.c (gdbserver_usage): Mention --version.
16426 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16428 * Makefile.in (gdbreplay.o): New rule.
16430 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16432 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16433 message, not gdbserver.
16435 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16436 Nathan Sidwell <nathan@codesourcery.com>
16437 Joseph Myers <joseph@codesourcery.com>
16439 * acinclude.m4: Include ../../config/acx.m4.
16440 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16441 * configure, config.in: Regenerate.
16442 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16443 * server.c (gdbserver_version): Print PKGVERSION.
16444 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16445 (main): Adjust gdbserver_usage calls.
16446 * gdbreplay.c (version, host_name): Add declarations.
16447 (gdbreplay_version, gdbreplay_usage): New.
16448 (main): Accept --version and --help options.
16450 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16452 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16453 (arm_breakpoint_at): Handle Thumb.
16454 (the_low_target): Add comment.
16456 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16458 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16460 2008-05-09 Doug Evans <dje@google.com>
16462 * server.h (decode_search_memory_packet): Declare.
16463 * remote-utils.c (decode_search_memory_packet): New fn.
16464 * server.c (handle_search_memory_1): New fn.
16465 (handle_search_memory): New fn.
16466 (handle_query): Process qSearch:memory packets.
16468 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16470 * regcache.c (registers_length): Remove.
16471 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16472 full register packet.
16473 * regcache.h (registers_length): Remove prototype.
16474 * server.h (PBUFSIZ): Define to 16384.
16476 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16478 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16479 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16480 powerpc-64l.o, and powerpc-altivec64l.o.
16481 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16482 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16483 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16484 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16485 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16488 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16489 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16490 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16491 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16492 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16493 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16494 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16495 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16496 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16497 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16500 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16501 (init_registers_powerpc_32l): ... this new prototype.
16502 (init_registers_powerpc_32): Remove, replace by ...
16503 (init_registers_powerpc_altivec32l): ... this new prototype.
16504 (init_registers_powerpc_e500): Remove, replace by ...
16505 (init_registers_powerpc_e500l): ... this new prototype.
16506 (init_registers_ppc64): Remove, replace by ...
16507 (init_registers_powerpc_64l): ... this new prototype.
16508 (init_registers_powerpc_64): Remove, replace by ...
16509 (init_registers_powerpc_altivec64l): ... this new prototype.
16510 (ppc_num_regs): Set to 73.
16511 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16512 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16513 (ppc_cannot_store_register): Handle orig_r3 and trap.
16514 (ppc_arch_setup): Update init_registers_... calls.
16515 (ppc_fill_gregset): Handle orig_r3 and trap.
16517 * inferiors.c (clear_inferiors): Reset current_inferior.
16519 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16521 * acinclude.m4: Add override.m4.
16522 * configure: Regenerate.
16524 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16526 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16527 initial call to init_register_ppc64.
16529 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16531 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16532 single powerpc*-*-linux* case.
16533 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16535 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16537 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16538 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16540 * linux-ppc-low.c: Include <elf.h>.
16541 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16542 (ppc_hwcap): New global variable.
16543 (ppc_regmap): Remove __SPE__ #ifdef sections.
16544 (ppc_regmap_e500): New global variable.
16545 (ppc_cannot_store_register): Update __SPE__ special case.
16546 (ppc_get_hwcap): New function.
16547 (ppc_arch_setup): Use it to determine whether inferior supports
16548 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16549 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16550 Do not access registers if target does not support AltiVec.
16551 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16552 Do not access registers if target does not support SPE.
16553 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16555 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16557 * linux-low.c (disabled_regsets, num_regsets): New.
16558 (use_regsets_p): Delete.
16559 (linux_wait_for_process): Clear disabled_regsets.
16560 (regsets_fetch_inferior_registers): Check and set it.
16561 (regsets_store_inferior_registers): Likewise.
16562 (linux_fetch_registers, linux_store_registers): Do not use
16564 (initialize_low): Allocate disabled_regsets.
16566 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16568 * Makefile.in (LIBOBJS): New.
16569 (OBS): Use LIBOBJS.
16570 (memmem.o): New rule.
16571 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16572 * configure: Regenerated.
16574 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16576 * server.c (handle_query): Never return "unsupported" for
16577 qXfer:features:read queries.
16579 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16581 * server.c (get_features_xml): Fix inverted condition.
16582 (handle_query): Always support qXfer:feature:read.
16584 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16586 * server.c (wrapper_argv): New.
16587 (start_inferior): Handle wrapper_argv. If set, expect an extra
16589 (gdbserver_usage): Document --wrapper.
16590 (main): Parse --wrapper.
16592 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16594 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16595 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16596 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16597 (ppc_set_pc): Likewise.
16598 (ppc_arch_setup): New function.
16599 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16600 of collect_register.
16601 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16603 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16605 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16606 instead of linux-ppc64-low.o.
16607 * linux-ppc64-low.c: Remove file.
16608 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16609 (linux-ppc64-low.o): Remove rule.
16611 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16612 (init_registers_powerpc_64): Likewise.
16613 (ppc_regmap): Conditionally define depending on __powerpc64__.
16614 (ppc_cannot_store_register): Do not special-case "fpscr" when
16615 compiled on __powerpc64__.
16616 (ppc_collect_ptrace_register): New function.
16617 (ppc_supply_ptrace_register): New function.
16618 (ppc_breakpoint): Change type to "unsigned int".
16619 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16620 (the_low_target): Conditionally provide initializers for the
16621 arch_setup member depending on __powerpc64__. Install
16622 collect_ptrace_register and supply_ptrace_register members.
16624 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16626 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16627 * server.c (gdbserver_xmltarget): Define.
16628 (get_features_xml): Use it to replace "target.xml" and arch_string.
16630 * configure.srv: Remove srv_xmltarget. Add XML files that were
16631 mentioned there to srv_xmlfiles instead. Remove conditional tests
16632 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16633 srv_xmlfiles and srv_regobj to include all possible choices.
16634 * configure.ac (srv_xmltarget): Remove.
16635 (srv_xmlfiles): Do not add "target.xml".
16636 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16637 checks for supplementary target information.
16638 * configure: Regenerate.
16639 * Makefile.in (XML_TARGET): Remove.
16640 (target.xml): Remove rule.
16641 (clean): Do not clean up target.xml.
16642 (.PRECIOUS): Do not mention target.xml.
16644 * target.h (struct target_ops): Remove arch_string member.
16645 * linux-low.c (linux_arch_string): Remove.
16646 (linux_target_ops): Remove arch_string initializer.
16647 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16648 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16649 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16650 * spu-low.c (spu_arch_string): Remove.
16651 (spu_target_ops): Remove arch_string initializer.
16652 * win32-low.c (win32_arch_string): Remove.
16653 (win32_target_ops): Remove arch_string initializer.
16654 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16655 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16656 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16658 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16660 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16661 by collect_ptrace_register and supply_ptrace_register hooks.
16662 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16663 instead of checking for the_low_target.left_pad_xfer.
16664 (usr_store_inferior_registers): Use collect_ptrace_register callback
16665 instead of checking for the_low_target.left_pad_xfer.
16667 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16668 (s390_supply_ptrace_register): Likewise.
16669 (s390_fill_gregset): Call s390_collect_ptrace_register.
16670 (the_low_target): Update.
16672 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16673 (ppc_supply_ptrace_register): Likewise.
16674 (the_low_target): Update.
16676 * linux-i386-low.c (the_low_target): Update.
16677 * linux-x86-64-low.c (the_low_target): Update.
16679 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16681 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16682 reg-s390.o and reg-s390x.o.
16684 * linux-low.c (new_inferior): New global variable.
16685 (linux_create_inferior, linux_attach): Set it.
16686 (linux_wait_for_process): Call the_low_target.arch_setup after the
16687 target has stopped for the first time.
16688 (initialize_low): Do not call the_low_target.arch_setup.
16690 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16691 (s390_set_pc): Likewise.
16692 (s390_arch_setup): New function.
16693 (the_low_target): Use s390_arch_setup as arch_setup routine.
16695 * regcache.c (realloc_register_cache): New function.
16696 (set_register_cache): Call it for each existing regcache.
16698 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16700 * server.h (init_registers): Remove prototype.
16702 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16703 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16704 instead of init_registers ().
16705 * linux-arm-low.c (init_registers_arm): Add prototype.
16706 (init_registers_arm_with_iwmmxt): Likewise.
16707 (the_low_target): Add initializer for arch_setup field.
16708 * linux-cris-low.c (init_registers_cris): Add prototype.
16709 (the_low_target): Add initializer for arch_setup field.
16710 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16711 (the_low_target): Add initializer for arch_setup field.
16712 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16713 (the_low_target): Add initializer for arch_setup field.
16714 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16715 (the_low_target): Add initializer for arch_setup field.
16716 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16717 (the_low_target): Add initializer for arch_setup field.
16718 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16719 (the_low_target): Add initializer for arch_setup field.
16720 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16721 (init_registers_mips64_linux): Likewise.
16722 (the_low_target): Add initializer for arch_setup field.
16723 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16724 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16725 (the_low_target): Add initializer for arch_setup field.
16726 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16727 (init_registers_powerpc_64): Likewise.
16728 (the_low_target): Add initializer for arch_setup field.
16729 * linux-s390-low.c (init_registers_s390): Add prototype.
16730 (init_registers_s390x): Likewise.
16731 (the_low_target): Add initializer for arch_setup field.
16732 * linux-sh-low.c (init_registers_sh): Add prototype.
16733 (the_low_target): Add initializer for arch_setup field.
16734 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16735 (the_low_target): Add initializer for arch_setup field.
16736 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16737 (the_low_target): Add initializer for arch_setup field.
16739 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16740 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16741 instead of init_registers ().
16742 * win32-arm-low.c (init_registers_arm): Add prototype.
16743 (the_low_target): Add initializer for arch_setup field.
16744 * win32-i386-low.c (init_registers_i386): Add prototype.
16745 (the_low_target): Add initializer for arch_setup field.
16747 * spu-low.c (init_registers_spu): Add prototype.
16748 (initialize_low): Call initialie_registers_spu () instead of
16749 initialize_registers ().
16751 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16753 * server.c (handle_v_requests): When handling the vRun and vAttach
16754 packets, if already debugging a process, don't kill it. Return an
16757 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16759 * server.c (handle_query): Correct length check.
16761 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16763 * win32-low.c (do_initial_child_stuff): Add process handle
16764 parameter. Set current_process_handle and current_process_id from the
16765 parameters. Clear globals.
16766 (win32_create_inferior): Don't set current_process_handle and
16767 current_process_id here. Instead pass them on the call to
16768 do_initial_child_stuff.
16769 (win32_attach): Likewise.
16770 (win32_clear_inferiors): New.
16771 (win32_kill): Don't close the current process handle or the
16772 current thread handle here. Instead call win32_clear_inferiors.
16773 (win32_detach): Don't open a new handle to the process. Call
16774 win32_clear_inferiors.
16775 (win32_join): Don't rely on current_process_handle; open a new
16776 handle using the process id.
16777 (win32_wait): Call win32_clear_inferiors when the inferior process
16780 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16782 * server.c (monitor_show_help): Add "exit".
16784 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16786 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16787 (clean): Add reg-xtensa.c.
16788 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16789 * configure.srv (xtensa*-*-linux*) New target.
16790 * linux-xtensa-low.c: New.
16791 * xtensa-xtregs.c: New.
16793 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16795 * hostio.c: Don't include errno.h.
16796 (errno_to_fileio_errno): Move to hostio-errno.
16797 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16798 error number outputting to the target->hostio_last_error callback.
16799 (hostio_packet_error): Use FILEIO_EINVAL directly.
16800 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16801 calls to hostio_error.
16802 * hostio-errno.c: New.
16803 * server.h (hostio_last_error_from_errno): Declare.
16804 * target.h (target_ops): Add hostio_last_error member.
16805 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16806 as hostio_last_error handler.
16807 * spu-low.c (spu_target_ops): Likewise.
16808 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16809 (wince_hostio_last_error): New functions.
16810 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16811 as hostio_last_error handler.
16812 (win32_target_ops) [!_WIN32_WCE]: Register
16813 hostio_last_error_from_errno as hostio_last_error handler.
16814 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16815 (hostio-errno.o): New rule.
16816 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16817 * configure.srv (srv_hostio_err_objs): New variable. Default to
16819 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16820 * configure: Regenerate.
16822 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16824 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16825 (linux_kill, linux_detach): Clean up the process list.
16826 * remote-utils.c (remote_open): Improve port number parsing.
16827 (putpkt_binary, input_interrupt): Only send interrupts if the target
16829 * server.c (extended_protocol): Make static.
16830 (attached): Define earlier.
16831 (exit_requested, response_needed, program_argv): New variables.
16832 (target_running): New.
16833 (start_inferior): Clear attached here.
16834 (attach_inferior): Set attached here.
16835 (require_running): Define.
16836 (handle_query): Use require_running and target_running. Implement
16838 (handle_v_attach, handle_v_run): New.
16839 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16840 (gdbserver_usage): Update.
16841 (main): Redo argument parsing. Handle --debug and --multi. Handle
16842 --attach along with other options or after the port. Save
16843 program_argv. Support no initial program. Resynchronize
16844 communication with GDB after an error. Handle "monitor exit".
16845 Use require_running and target_running. Always allow the extended
16846 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16847 restart in extended mode.
16848 * README: Refer to the GDB manual. Update --attach usage.
16850 2007-12-20 Andreas Schwab <schwab@suse.de>
16852 * linux-low.c (STACK_SIZE): Define.
16853 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16854 (linux_test_for_tracefork): Likewise.
16856 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16858 * linux-low.c (linux_wait_for_event): Update messages. Do not
16859 reinsert auto-delete breakpoints.
16860 * mem-break.c (struct breakpoint): Change return type of handler to
16862 (set_breakpoint_at): Update handler type.
16863 (reinsert_breakpoint_handler): Return 1 instead of calling
16865 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16867 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16868 * mem-break.h (set_breakpoint_at): Update handler type.
16869 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16870 * win32-low.c (auto_delete_breakpoint): New.
16871 (get_child_debug_event): Use it.
16873 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16875 * configure.ac: Check for pread and pwrite.
16876 * hostio.c (handle_pread): Fall back to lseek and read.
16877 (handle_pwrite): Fall back to lseek and write.
16878 * config.in, configure: Regenerated.
16880 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16882 * server.c (myresume): Add own_buf argument.
16883 (main): Update calls.
16885 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16887 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16888 * remote-utils.c (remote_open): Do not call disable_async_io.
16889 (block_async_io): Delete.
16890 (unblock_async_io): Make static.
16891 (initialize_async_io): New.
16892 * server.c (handle_v_cont): Handle async I/O here.
16893 (myresume): Likewise. Move other common resume tasks here...
16894 (main): ... from here. Call initialize_async_io. Disable async
16895 I/O before the main loop.
16896 * server.h (initialize_async_io): Declare.
16897 (block_async_io, unblock_async_io): Delete prototypes.
16898 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16900 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16902 * remote-utils.c (readchar): Allow binary data in received messages.
16904 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16906 * win32-low.c (attaching): New global.
16907 (win32_create_inferior): Clear the `attaching' global.
16908 (win32_attach): Set the `attaching' global.
16909 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16910 attaching. Only set a breakpoint at the entry point if not
16913 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16915 * server.c (main): Don't report dll events on the initial
16916 connection on attaches.
16918 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16920 * server.c (main): Relax numerical bases supported for the pid of
16921 the --attach command line argument.
16923 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16925 * win32-low.c (win32_attach): Call OpenProcess before
16926 DebugActiveProcess, not after. Add last error output to error
16929 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16931 * win32-low.c (win32_get_thread_context)
16932 (win32_set_thread_context): New functions.
16933 (thread_rec): Use win32_get_thread_context.
16934 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16935 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16938 2007-12-03 Leo Zayas
16939 Pedro Alves <pedro_alves@portugalmail.pt>
16941 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16943 (child_add_thread): Minor cleanup.
16944 (child_continue): Resume artificially suspended threads before
16945 calling ContinueDebugEvent.
16946 (suspend_one_thread): New.
16947 (fake_breakpoint_event): New.
16948 (get_child_debug_event): Change return type to int. Check here if
16949 gdb sent an interrupt request. If a soft interrupt was requested,
16950 fake a breakpoint event. Return 0 if there is no event to handle,
16952 (win32_wait): Don't check here if gdb sent an interrupt request.
16953 Ensure there is a valid event to handle.
16954 (win32_request_interrupt): Add soft interruption method as last
16957 2007-12-03 Leo Zayas
16958 Pedro Alves <pedro_alves@portugalmail.pt>
16960 * win32-low.h (win32_thread_info): Add descriptions to the
16961 structure members. Replace `suspend_count' counter by a
16963 * win32-low.c (thread_rec): Update condition of when to get the
16964 context from the inferior. Rely on ContextFlags being set if it
16965 has already been retrieved. Only suspend the inferior thread if
16966 we haven't already. Warn if that fails.
16967 (continue_one_thread): s/suspend_count/suspended/. Only call
16968 ResumeThread once. Warn if that fails.
16970 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16972 * win32-low.c (win32_wait): Don't read from the inferior when it
16973 has already exited.
16975 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16977 * Makefile.in (win32_low_h): New variable.
16978 (win32-low.o): Add dependency on $(win32_low_h).
16979 (win32-arm-low.o, win32-i386-low.o): New rules.
16981 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16983 * hostio.c: Correct copyright year.
16985 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16987 * Makefile.in (OBS): Add hostio.o.
16988 (hostio.o): New rule.
16989 * server.h (handle_vFile): Declare.
16990 * hostio.c: New file.
16991 * server.c (handle_v_requests): Take packet_len and new_packet_len
16992 for binary packets. Call handle_vFile.
16993 (main): Update call to handle_v_requests.
16995 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16997 * linux-low.c: Include <sched.h>.
16999 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17001 * linux-low.c (linux_tracefork_grandchild): New.
17002 (linux_tracefork_child): Use clone.
17003 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17005 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17007 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17009 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17011 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17013 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17015 * inferiors.c (change_inferior_id): Delete.
17016 (add_pid_to_list, pull_pid_from_list): New.
17017 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17018 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17019 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17020 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17021 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17022 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17023 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17024 (using_threads): Always set to 1.
17025 (handle_extended_wait): New.
17026 (add_process): Do not set TID.
17027 (linux_create_inferior): Set must_set_ptrace_flags.
17028 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17029 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17030 (linux_thread_alive): Rename TID argument to LWPID.
17031 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17032 (linux_wait_for_event): Do not use TID or check using_threads. Update
17033 call to dead_thread_notify. Call handle_extended_wait.
17034 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17035 (send_sigstop): Delete sigstop_sent.
17036 (wait_for_sigstop): Avoid TID.
17037 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17038 (linux_test_for_tracefork): New.
17039 (linux_lookup_signals): Use thread_db_active and
17040 linux_supports_tracefork_flag.
17041 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17042 * linux-low.h (get_process_thread): Avoid TID.
17043 (struct process_ifo): Move thread_known and tid to the end. Remove
17045 (linux_attach_lwp, thread_db_init): Update prototypes.
17046 * server.h (change_inferior_id): Delete prototype.
17047 (add_pid_to_list, pull_pid_from_list): New prototypes.
17048 * thread-db.c (thread_db_use_events): New.
17049 (find_first_thread): Rename to...
17050 (find_one_thread): ...this. Update callers and messages. Do not
17051 call fatal. Check thread_db_use_events. Do not call
17052 change_inferior_id or new_thread_notify.
17053 (maybe_attach_thread): Update. Do not call new_thread_notify.
17054 (thread_db_init): Set thread_db_use_events. Check use_events.
17055 * utils.c (fatal, warning): Correct message prefix.
17057 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17059 * Makefile.in (clean): Remove new files.
17060 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17061 (powerpc-64.o, powerpc-64.c): New rules.
17062 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17063 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17065 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17067 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17068 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17069 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17070 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17071 (target_regsets): Add AltiVec and SPE register sets.
17072 * configure.ac: Check for AltiVec and SPE.
17073 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17074 (ppc_fill_vrregset, ppc_store_vrregset): New.
17075 (target_regsets): Add AltiVec register set.
17076 * configure: Regenerated.
17078 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17080 * linux-low.c (O_LARGEFILE): Define.
17081 (linux_read_memory): Use /proc/PID/mem.
17082 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17083 * configure, config.in: Regenerated.
17085 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17087 * linux-low.c (linux_wait_for_event): Do not pass signals while
17090 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17092 * win32-low.c (create_process): New.
17093 (win32_create_inferior): Use create_process instead of
17094 CreateProcess. If create_process failed retry appending an ".exe"
17095 suffix. Store the GetLastError result immediatelly after
17096 create_process calls and use it on the call to error.
17098 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17100 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17102 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17104 * configure.ac: Switch license to GPLv3.
17106 2007-08-01 Michael Snyder <msnyder@access-company.com>
17108 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17110 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17112 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17114 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17115 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17116 CloseToolhelp32Snapshot.
17117 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17118 CloseToolhelp32Snapshot.
17120 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17122 * server.c (main): Check for inferior exit before main loop.
17124 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17126 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17127 instead of on tmp_desc.
17129 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17130 Daniel Jacobowitz <dan@codesourcery.com>
17132 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17133 (add_thread): Minor cleanups.
17134 (clear_inferiors): Move lower in the file. Clear the DLL
17136 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17137 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17138 (xml_escape_text): New.
17139 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17141 (handle_v_cont): Report errors.
17142 (gdbserver_version): Update.
17143 (main): Correct size of own_buf. Do not report initial DLL events.
17144 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17145 (unloaded_dll, xml_escape_text): New.
17146 * win32-low.c (enum target_waitkind): Update comments.
17147 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17148 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17149 (win32_EnumProcessModules, win32_GetModuleInformation)
17150 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17151 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17152 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17153 (win32_Module32First, win32_Module32Next, load_toolhelp)
17154 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17155 (get_child_debug_event): Handle DLL events.
17156 (win32_wait): Likewise.
17158 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17160 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17161 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17163 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17165 * win32-low.c (handle_output_debug_string): Ignore event if not
17168 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17170 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17172 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17174 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17176 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17178 * inferiors.c (change_inferior_id): Add comment.
17179 * linux-low.c (check_removed_breakpoint): Add an early
17180 prototype. Improve debug output.
17181 (linux_attach): Doc update.
17182 (linux_detach_one_process, linux_detach): Clean up before releasing
17184 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17185 * linux-low.h (struct process_info): Doc improvement.
17186 * mem-break.c (delete_all_breakpoints): New.
17187 * mem-break.h (delete_all_breakpoints): New prototype.
17188 * thread-db.c (find_first_thread): New.
17189 (thread_db_create_event): Call it instead of
17190 thread_db_find_new_threads. Clean up unused variables.
17191 (maybe_attach_thread): Remove first thread handling.
17192 (thread_db_find_new_threads): Use find_first_thread.
17193 (thread_db_get_tls_address): Likewise.
17195 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17197 * thread-db.c (thread_db_find_new_threads): Add prototype.
17198 (thread_db_create_event): Check for the main thread before adding
17200 (maybe_attach_thread): Only enable event reporting if TID == 0.
17201 (thread_db_get_tls_address): Check for new threads.
17203 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17205 * linux-low.c (linux_create_inferior): Try execv before execvp.
17206 * spu-low.c (spu_create_inferior): Likewise.
17208 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17210 * linux-low.c (linux_create_inferior): Change execv to execvp.
17211 * spu-low.c (spu_create_inferior): Likewies.
17213 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17215 * Makefile.in (clean): Clean new files instead of deleted ones.
17216 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17217 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17219 * configure.srv: Specify XML files and new regformats for MIPS and
17221 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17222 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17223 an entry for the restart register.
17224 (mips_cannot_fetch_register, mips_cannot_store_register)
17225 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17226 register names to match the XML descriptions.
17227 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17228 restart register instead of $0.
17230 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17231 Markus Deuling <deuling@de.ibm.com>
17233 * remote-utils.c (decode_xfer_write): New function.
17234 * server.h (decode_xfer_write): Add prototype.
17235 * server.c (handle_query): Add PACKET_LEN argument. Support
17236 qXfer:spu:read and qXfer:spu:write packets.
17237 (main): Pass packet_len to handle_query.
17238 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17239 * target.h (target_ops): Add qxfer_spu.
17241 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17243 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17244 accessing non-seekable spufs files.
17246 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17248 * server.c (handle_query): Add reply for qC packet.
17250 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17251 Leo Zayas <lerele@champenstudios@com>
17253 * server.h (check_remote_input_interrupt_request): New function.
17254 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17255 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17256 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17257 (check_remote_input_interrupt_request): New function.
17258 * server.h (check_remote_input_interrupt_request): Declare.
17259 * win32-low.c (winapi_DebugBreakProcess,
17260 winapi_GenerateConsoleCtrlEvent): New typedefs.
17261 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17263 (win32_wait): Check for remote interrupt request
17264 with check_remote_input_interrupt_request.
17265 (win32_request_interrupt): New function.
17266 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17268 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17270 * win32-low.c (debug_registers_changed,
17271 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17272 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17273 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17274 (thread_rec): Get context using the low target.
17275 (child_add_thread): Call thread_added on the low target,
17276 which does the same thing.
17278 (do_initial_child_stuff): Remove debug registers references.
17279 Set context using the low target. Resume threads after
17280 setting the contexts.
17281 (child_continue): Remove dead variable. Remove debug
17282 registers references.
17283 (child_fetch_inferior_registers): Go through the low target.
17284 (do_child_store_inferior_registers): Remove.
17285 (child_store_inferior_registers): Go through the low target.
17286 (win32_resume): Remove debug registers references.
17287 Set context using the low target.
17288 (handle_exception): Change return type to void. Don't record
17289 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17290 first chance exception.
17291 (get_child_debug_event): Change return type to void. Remove
17292 goto loop. Always return after waiting for debug event.
17293 (win32_wait): Convert to switch statement. Handle spurious
17296 * win32-i386-low.c (debug_registers_changed,
17297 debug_registers_used): New.
17298 (initial_stuff): Rename to ...
17299 (i386_initial_stuff): ... this. Clear debug registers
17301 (store_debug_registers): Delete.
17302 (i386_get_thread_context): New.
17303 (load_debug_registers): Delete.
17304 (i386_set_thread_context): New.
17305 (i386_thread_added): New.
17306 (single_step): Rename to ...
17307 (i386_single_step): ... this.
17308 (do_fetch_inferior_registers): Rename to ...
17309 (i386_fetch_inferior_register): ... this.
17310 (i386_store_inferior_register): New.
17311 (the_low_target): Adapt to new interface.
17313 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17314 (arm_get_thread_context): New.
17315 (arm_set_thread_context): New.
17317 (do_fetch_inferior_registers): Rename to ...
17318 (arm_fetch_inferior_register): ... this.
17319 (arm_store_inferior_register): New.
17320 (arm_wince_breakpoint): Reimplement as unsigned long.
17321 (arm_wince_breakpoint_len): Define.
17322 (the_low_target): Adapt to new interface.
17324 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17325 load_debug_registers. Add get_thread_context, set_thread_context,
17326 thread_added and store_inferior_register. Rename
17327 fetch_inferior_registers to fetch_inferior_register.
17328 (regptr): Remove declaration.
17330 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17332 * linux-low.c (linux_detach): Change return type to int. Return 0.
17333 * spu-low.c (spu_detach): Likewise.
17335 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17337 * target.h (target_ops): Change return type of detach to int.
17339 (join_inferior): New.
17340 * server.c (main): Don't skip detach support on mingw32.
17341 If the inferior doesn't support detaching return error.
17342 Call join_inferior instead of using waitpid.
17343 * linux-low.c (linux_join): New.
17344 (linux_target_op): Add linux_join.
17345 * spu-low.c (spu_join): New.
17346 (spu_target_ops): Add spu_join.
17347 * win32-low.c (win32_detach): Adapt to new interface.
17348 Reopen current_process_handle before detaching. Issue a child
17349 resume before detaching.
17351 (win32_target_op): Add win32_join.
17353 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17355 * win32-low.c (win32-attach): Fix return value.
17356 * target.h (target_ops): Describe ATTACH return values.
17358 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17360 * win32-low.c (GETPROCADDRESS): Define.
17361 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17362 (winapi_DebugSetProcessKillOnExit): Likewise.
17363 (win32_create_inferior): Force usage of ansi CreateProcessA.
17364 (win32_attach): Use GETPROCADDRESS.
17365 (win32_detach): Likewise.
17367 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17369 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17371 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17373 * win32-low.c: Commit leftover changes from 2007-03-29.
17375 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17377 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17378 fields short instead of int. Add explicit padding.
17379 (i387_cache_to_fsave): Remove unnecessary casts.
17380 (i387_fsave_to_cache): Doc fix.
17381 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17383 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17385 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17386 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17388 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17390 * configure.srv (arm*-*-mingw32ce*): Move near the other
17393 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17395 * configure.ac: Add errno checking.
17396 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17397 sys/file.h and malloc.h.
17398 (AC_CHECK_DECLS): Add perror.
17399 (srv_mingwce): Handle.
17400 * configure.srv (i[34567]86-*-cygwin*): Add
17401 win32-i386-low.o to srv_tgtobj.
17402 (i[34567]86-*-mingw*): Likewise.
17403 (arm*-*-mingw32ce*): Add case.
17404 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17405 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17406 [__MINGW32CE__] (strerror): New function.
17407 [__MINGW32CE__] (errno): Define to GetLastError.
17408 [__MINGW32CE__] (COUNTOF): New macro.
17409 (remote_open): Remove extra close call.
17410 * mem-break.c (delete_breakpoint_at): New function.
17411 * mem-break.h (delete_breakpoint_at): Declare.
17412 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17413 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17414 [USE_WIN32API] (read, write): Add char* casts.
17415 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17416 * server.h: Include wincecompat.h on Windows CE.
17417 [HAVE_ERRNO_H]: Check.
17418 (perror): Declare if not declared.
17419 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17420 (perror_with_name): Remove errno declaration.
17421 * wincecompat.h: New.
17422 * wincecompat.c: New.
17423 * win32-low.h: New.
17424 * win32-arm-low.c: New.
17425 * win32-i386-low.c: New.
17426 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17427 (OUTMSG2): Make it safe.
17429 (COUNTOF): New macro.
17430 (NUM_REGS): Get it from the low target.
17431 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17432 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17433 (thread_rec): Let low target handle debug registers.
17434 (child_add_thread): Likewise.
17435 (child_init_thread_list): Likewise.
17436 (continue_one_thread): Likewise.
17438 (do_child_fetch_inferior_registers): Move to ...
17439 * win32-i386-low.c: ... here, and rename to ...
17440 (do_fetch_inferior_registers): ... this.
17441 * win32-low.c (child_fetch_inferior_registers):
17442 Go through the low target.
17443 (do_child_store_inferior_registers): Use regptr.
17444 (strwinerror): New function.
17445 (win32_create_inferior): Handle Windows CE.
17446 Use strwinerror instead of strerror on Windows error
17447 codes. Add program to the error output.
17448 Don't close the main thread handle on Windows CE.
17449 (win32_attach): Use coredll.dll on Windows CE.
17450 (win32_kill): Close current process and current
17452 (win32_detach): Use coredll.dll on Windows CE.
17453 (win32_resume): Let low target handle debug registers, and
17455 (handle_exception): Add/Remove initial breakpoint. Avoid
17456 non-existant WSTOPSIG on Windows CE.
17457 (win32_read_inferior_memory): Cast to remove warning.
17458 (win32_arch_string): Go through the low target.
17459 (initialize_low): Call set_breakpoint_data with the low
17460 target's breakpoint.
17461 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17462 FOP_REGNUM, mappings): Move to ...
17463 * win32-i386-low.c: ... here.
17464 * win32-low.c (win32_thread_info): Move to ...
17465 * win32-low.h: ... here.
17466 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17467 win32-arm-low.c and wincecompat.c.
17468 (all:): Add $EXEEXT.
17469 (install-only:): Likewise.
17470 (gdbserver:): Likewise.
17471 (gdbreplay:): Likewise.
17472 * config.in: Regenerate.
17473 * configure: Regenerate.
17475 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17477 * win32-low.c: Rename typedef thread_info to
17478 win32_thread_info throughout.
17480 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17482 * win32-i386-low.c: Rename to ...
17483 * win32-low.c: ... this.
17484 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17485 * Makefile.in: Likewise.
17487 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17489 * remote-utils.c (monitor_output): Constify msg parameter.
17490 * server.h (monitor_output): Likewise.
17491 * win32-i386-low.c (handle_output_debug_string): New.
17492 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17493 handle_output_debug_string.
17494 (get_child_debug_event): Likewise.
17496 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17498 * server.c (main): Correct strtoul check.
17500 2007-03-27 Jon Ringle <jon@ringle.org>
17502 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17504 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17506 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17508 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17510 * terminal.h: Check HAVE_SGTTY_H.
17512 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17514 * remote-utils.c (remote_open): Print out the assigned port number.
17516 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17518 * remote-utils.c (monitor_output): New function.
17519 * server.c (debug_threads): Define here.
17520 (monitor_show_help): New function.
17521 (handle_query): Handle qRcmd.
17522 (main): Do not handle 'd' packet.
17523 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17524 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17527 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17529 * Makefile.in (EXEEXT): New.
17530 (clean): Use $(EXEEXT).
17532 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17534 * target.h (target_ops): Rename send_signal to request_interrupt,
17535 and remove enum target_signal parameter.
17536 * linux-low.c (linux_request_interrupt): Rename from
17537 linux_send_signal, and always send SIGINT.
17538 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17539 and always send SIGINT.
17540 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17542 (input_interrupt): Likewise.
17544 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17546 * server.c (get_features_xml): Check if target implemented
17548 * win32-i386-low.c (win32_arch_string): New.
17549 (win32_target_ops): Add win32_arch_string as arch_string member.
17551 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17553 * spu-low.c (spu_arch_string): New.
17554 (spu_target_ops): Add spu_arch_string.
17556 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17558 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17559 * configure.ac: Do not check for terminal.h.
17560 * configure, config.in: Regenerated.
17562 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17564 * Makefile.in (OBS): Add $(XML_BUILTIN).
17565 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17567 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17568 (arm-with-iwmmxt.c): New.
17569 * config.in, configure: Regenerate.
17570 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17571 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17572 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17573 (arm*-*-linux*): Add iWMMXt and regset support.
17574 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17575 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17576 (arm_store_wmmxregset, target_regsets): New.
17577 * server.c (get_features_xml): Take annex argument. Check builtin
17579 (handle_query): Handle multiple annexes.
17581 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17583 * remote-utils.c [USE_WIN32API] (read, write): Define.
17584 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17587 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17589 * linux-i386-low.c (the_low_target): Set arch_string.
17590 * linux-x86-64-low.c (the_low_target): Likewise.
17591 * linux-low.c (linux_arch_string): New.
17592 (linux_target_ops): Add it.
17593 * linux-low.h (struct linux_target_ops): Add arch_string.
17594 * server.c (write_qxfer_response): Use const void * for DATA.
17595 (get_features_xml): New.
17596 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17597 * target.h (struct target_ops): Add arch_string method.
17599 2007-01-03 Denis Pilat <denis.pilat@st.com>
17600 Daniel Jacobowitz <dan@codesourcery.com>
17602 * linux-low.c (linux_kill): Handle being called with no threads.
17603 * win32-i386-low.c (win32_kill): Likewise.
17604 (get_child_debug_event): Clear current_process_handle.
17606 2006-12-30 Denis PILAT <denis.pilat@st.com>
17607 Daniel Jacobowitz <dan@codesourcery.com>
17609 * remote-utils.c (remote_open): Check the type of specified
17610 serial port devices before opening them.
17611 * server.c (main): Kill the inferior if an error occurs during
17612 the first remote_open.
17614 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17616 * README: Update supported targets.
17618 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17620 * Makefile.in (clean): Remove reg-mips64.c.
17621 (reg-mips64.c, reg-mips64.o): New rules.
17622 * configure.srv: Handle mips64. Include regset support for mips.
17623 * linux-mips-low.c (union mips_register): New.
17624 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17625 (mips_breakpoint, mips_breakpoint_at): Use int.
17626 (mips_collect_register, mips_supply_register)
17627 (mips_collect_register_32bit, mips_supply_register_32bit)
17628 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17629 (mips_store_fpregset, target_regsets): New.
17630 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17632 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17634 * configure.srv: Add target "spu*-*-*".
17635 * Makefile.in (clean): Remove reg-spu.c.
17636 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17637 * spu-low.c: New file.
17639 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17641 * configure.ac: Correct td_thr_tls_get_addr test.
17642 * configure: Regenerated.
17644 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17646 * linux-low.c (linux_wait_for_event): Reformat. Use the
17647 pass_signals array.
17648 * remote-utils.c (decode_address_to_semicolon): New.
17649 * server.c (pass_signals, handle_general_set): New.
17650 (handle_query): Mention QPassSignals for qSupported.
17651 (main): Call handle_general_set.
17652 * server.h (pass_signals, decode_address_to_semicolon): New.
17654 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17656 * server.c (handle_query): Correct error handling for read_auxv.
17658 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17660 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17661 and srv_linux_thread_db to yes.
17662 * linux-s390-low.c (s390_fill_gregset): New function.
17663 (target_regsets): Define data structure.
17665 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17667 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17668 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17669 * config.in, configure: Regenerated.
17670 * inferiors.c (gdb_id_to_thread): New function.
17671 (gdb_id_to_thread_id): Use it.
17672 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17673 * linux-low.h (struct process_info): Add th member.
17674 (thread_db_get_tls_address): New prototype.
17675 * remote-utils.c (decode_address): Make non-static.
17676 * server.c (handle_query): Handle qGetTLSAddr.
17677 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17678 * target.h (struct target_ops): Add get_tls_address.
17679 * thread-db.c (maybe_attach_thread): Save the thread handle.
17680 (thread_db_get_tls_address): New.
17682 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17684 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17685 (linux_resume_one_process): Take a siginfo_t *. Update all
17686 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17687 (struct pending_signals): Add a siginfo_t.
17688 (linux_wait_for_process): Always set last_status.
17689 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17690 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17691 * linux-low.h (struct process_info): Add last_status.
17693 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17695 * remote-utils.c (try_rle): New function.
17696 (putpkt_binary): Use it.
17698 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17700 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17701 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17702 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17703 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17704 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17707 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17709 * server.c (terminal_fd): New variable.
17710 (old_foreground_pgrp): Likewise.
17711 (restore_old_foreground_pgrp): New function.
17712 (start_inferior): Record the terminal file descriptor in terminal_fd
17713 and its original foreground group in old_foreground_pgrp. Register
17714 restore_old_foreground_pgrp with atexit().
17716 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17718 * server.c (handle_query): Correct qPart to qXfer.
17720 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17722 * configure.ac: Check for more headers which are missing on
17723 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17724 * configure.srv: Add Cygwin and mingw32.
17725 * remote-utils.c: Don't include headers unconditionally which
17726 are missing on mingw32. Include <winsock.h> for mingw32.
17727 (remote_open): Adjust for mingw32 support. Flush
17728 standard error after writing to it.
17729 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17730 (unblock_async_io, enable_async_io, disable_async_io)
17731 (readchar, getpkt): Update for Winsock support.
17732 (prepare_resume_reply): Expect a protocol signal number.
17733 * server.c: Disable <sys/wait.h> on mingw32.
17734 (start_inferior): Adjust for mingw32 support. Flush
17735 standard error after writing to it.
17736 (attach_inferior): Likewise. Use protocol signal
17738 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17740 * win32-i386-low.c: New file.
17741 * Makefile.in (XM_CLIBS): Set.
17742 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17743 (win32-i386-low.o): New dependency rule.
17744 * linux-low.c (linux_wait): Use target signal numbers.
17745 * target.h (struct target_ops): Doc fix.
17746 * server.h (target_signal_to_name): New prototype.
17747 * gdbreplay.c: Don't include headers unconditionally which
17748 are missing on mingw32. Include <winsock.h> for mingw32.
17749 (remote_close, remote_open): Adjust for Winsock support.
17750 * configure, config.in: Regenerated.
17752 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17754 * server.c (decode_xfer_read, write_qxfer_response): New.
17755 (handle_query): Take a packet length argument. Handle
17756 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17757 the qSupported response.
17758 (main): Update call to handle_query.
17760 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17762 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17763 (putpkt_binary): Renamed from putpkt and adjusted for binary
17765 (putpkt): New wrapper for putpkt_binary.
17766 (readchar): Don't mask off the high bit.
17767 (decode_X_packet): New function.
17768 * server.c (main): Call putpkt_binary if a handler sets the packet
17769 length. Save the length of the incoming packet. Handle 'X'.
17770 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17772 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17774 * server.c (handle_query): Handle qSupported.
17776 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17778 * remote-utils.c (all_symbols_looked_up): New variable.
17779 (look_up_one_symbol): Check it.
17780 * server.h (look_up_one_symbol): New declaration.
17781 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17783 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17785 * Makefile.in (linux-arm-low.o): Update dependencies.
17786 * linux-arm-low.c: Include "gdb_proc_service.h".
17787 (PTRACE_GET_THREAD_AREA): Define.
17788 (ps_get_thread_area): New function.
17790 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17792 * configure.srv (m68k*-*-uclinux*): New target.
17793 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17794 (linux_resume_one_process): Remove extraneous cast.
17795 (linux_read_offsets): New.
17796 (linux_target_op): Add linux_read_offsets on mmuless systems.
17797 * server.c (handle_query): Add qOffsets logic.
17798 * target.h (struct target_ops): Add read_offsets.
17800 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17802 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17803 (PTRACE_GET_THREAD_AREA): Define.
17804 (ps_get_thread_area): New function.
17805 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17806 (linux-x86-64-low.o): Update.
17808 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17810 * configure.ac: Remove checks for prfpregset_t.
17811 * gdb_proc_service.h: New file.
17812 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17813 new "gdb_proc_service.h".
17814 * proc-service.c: Likewise.
17815 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17816 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17817 * Makefile.in (gdb_proc_service_h): Updated.
17818 * configure, config.in: Regenerated.
17820 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17822 * remote-utils.c (prepare_resume_reply): Move declaration
17823 of gdb_id_from_wait to the top of the block.
17825 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17827 * linux-low.c (regsets_store_inferior_registers): Read the regset
17828 from the target before filling it.
17830 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17832 * server.c (attach_inferior): Return SIGTRAP for a successful
17835 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17837 * Makefile.in (OBS): Add version.o.
17838 (STAGESTUFF): Delete.
17839 (version.o): Add dependencies.
17840 (version.c): Replace rule.
17841 (clean): Remove version.c.
17842 * server.c (gdbserver_version): New.
17843 (gdbserver_usage): Use printf.
17844 (main): Handle --version and --help.
17845 * server.h (version, host_name): Add declarations.
17847 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17859 * linux-x86-64-low.c:
17861 * linux-s390-low.c:
17862 * linux-ppc64-low.c:
17864 * linux-mips-low.c:
17865 * linux-m68k-low.c:
17866 * linux-m32r-low.c:
17869 * linux-ia64-low.c:
17870 * linux-i386-low.c:
17871 * linux-crisv32-low.c:
17883 * gdbserver.1: Add (C) after Copyright. Update the FSF
17886 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17888 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17889 (arm_breakpoint_at): Recognize both breakpoints.
17890 (the_low_target): Use the correct breakpoint instruction.
17892 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17894 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17895 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17896 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17897 (the_low_target): Update.
17899 2005-10-25 Andreas Schwab <schwab@suse.de>
17901 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17903 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17904 (ia64_num_regs): Reduce to 462.
17906 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17908 * acinclude.m4: Correct quoting.
17909 * aclocal.m4: Regenerated.
17911 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17912 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17913 (thread_db_init): Call thread_db_err_str.
17914 * configure.ac: Check for TD_VERSION.
17915 * config.in, configure: Regenerated.
17917 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17919 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17921 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17923 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17924 is not available. Define HAVE_PTRACE_GETREGS if it is.
17925 * config.in, configure: Regenerated.
17926 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17927 * linux-i386-low.c, linux-m68k-low.c: Update to use
17928 HAVE_PTRACE_GETREGS.
17929 * linux-low.c (regsets_fetch_inferior_registers)
17930 (regsets_store_inferior_registers): Only return 0 if we processed
17932 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17933 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17935 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17937 * inferiors.c (struct thread_info): Add gdb_id.
17938 (add_thread): Add gdb_id argument.
17939 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17940 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17941 calls to add_thread.
17942 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17943 * server.c (handle_query): Use thread_to_gdb_id.
17944 (handle_v_cont, main): Use gdb_id_to_thread_id.
17945 * server.h (add_thread): Update prototype.
17946 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17949 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17951 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17952 left-padded registers.
17953 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17954 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17956 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17958 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17959 * configure: Regenerate.
17960 * config.in: Regenerate.
17961 * server.h (NEED_DECLARATION_STRERROR):
17962 Replace with !HAVE_DECL_STRERROR.
17964 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17966 * linux-low.c (linux_wait, linux_send_signal): Don't test
17967 an unsigned long variable for > 0 if it could be MAX_ULONG.
17968 * server.c (myresume): Likewise.
17969 * target.c (set_desired_inferior): Likewise.
17971 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17973 * configure.ac: Simplify and improve check for socklen_t.
17974 * configure, config.in: Regenerate.
17976 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17978 * acconfig.h: Remove.
17979 * configure.ac: Add a test for socklen_t. Use three-argument
17980 AC_DEFINE throughout.
17981 * config.in: Regenerated using autoheader 2.59.
17982 * configure: Regenerated.
17984 * gdbreplay.c (socklen_t): Provide a default.
17985 (remote_open): Use socklen_t.
17986 * remote-utils.c (socklen_t): Provide a default.
17987 (remote_open): Use socklen_t.
17988 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17991 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17993 * linux-low.c (linux_read_memory, linux_write_memory)
17994 (linux_read_auxv): Likewise.
17995 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17996 (check_mem_write): Likewise.
17997 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17999 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18000 (registers_from_string, register_data): Likewise.
18001 * server.c (handle_query, main): Likewise.
18002 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18003 (decode_M_packet): Likewise.
18004 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18005 * target.h (struct target_ops): Update read_memory, write_memory,
18007 (read_inferior_memory, write_inferior_memory): Update.
18008 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18009 to unsigned char *.
18010 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18011 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18012 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18013 linux-s390-low.c, linux-sh-low.c: Update for changes in
18014 read_inferior_memory and the_low_target->breakpoint.
18016 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18018 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18019 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18020 * configure.srv: Add powerpc64-*-linux*.
18021 * linux-ppc64-low.c: New file.
18023 2005-05-23 Orjan Friberg <orjanf@axis.com>
18025 * linux-cris-low.c: New file with support for CRIS.
18026 * linux-crisv32-low.c: Ditto for CRISv32.
18027 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18028 (clean): Add reg-cris.c and reg-crisv32.c.
18029 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18030 reg-crisv32.o, and reg-crisv32.c to make rules.
18031 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18032 recognized targets.
18034 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18036 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18037 of sizeof (PTRACE_XFER_TYPE).
18038 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18040 2005-05-12 Orjan Friberg <orjanf@axis.com>
18042 * target.h (struct target_ops): Add insert_watchpoint,
18043 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18044 pointers for hardware watchpoint support.
18045 * linux-low.h (struct linux_target_ops): Ditto.
18046 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18047 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18048 to linux_target_ops.
18049 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18051 * server.c (main): Recognize 'Z' and 'z' packets.
18053 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18055 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18056 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18057 (the_low_target): Add new members.
18059 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18061 * proc-service.c (ps_lgetregs): Search all_processes instead of
18064 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18066 * server.c (start_inferior): Change return type to int.
18067 (attach_inferior): Change sigptr to int *.
18068 (handle_v_cont, handle_v_requests): Change signal to int *.
18069 (main): Change signal to int.
18071 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18073 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18074 * configure.srv: Add m32r*-*-linux*.
18075 * linux-m32r-low.c: New file.
18077 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18079 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18081 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18083 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18084 Take unsigned long arguments for PIDs.
18085 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18086 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18087 (wait_for_sigstop, linux_resume_one_process)
18088 (regsets_fetch_inferior_registers, linux_send_signal)
18089 (linux_read_auxv): Likewise. Update the types of variables holding
18090 PIDs. Update format string specifiers.
18091 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18092 * remote-utils.c (prepare_resume_reply): Likewise.
18093 * server.c (cont_thread, general_thread, step_thread)
18094 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18096 (handle_query): Update format specifiers.
18097 (handle_v_cont, main): Use strtoul for thread IDs.
18098 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18099 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18100 (general_thread, step_thread, thread_from_wait)
18101 (old_thread_from_wait): Update.
18102 * target.h (struct thread_resume): Use unsigned long for THREAD.
18103 (struct target_ops): Use unsigned long for arguments to attach and
18106 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18108 * acinclude.m4: Include bfd/bfd.m4 directly.
18109 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18110 <agriffis@toolchain.org>.
18111 * aclocal.m4, configure: Regenerated.
18113 2005-01-07 Andrew Cagney <cagney@gnu.org>
18115 * configure.ac: Rename configure.in, require autoconf 2.59.
18116 * configure: Re-generate.
18118 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18120 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18121 LIBS when finished.
18122 * aclocal.m4: Regenerated.
18123 * configure: Regenerated.
18125 2004-11-21 Andreas Schwab <schwab@suse.de>
18127 * linux-m68k-low.c (m68k_num_gregs): Define.
18128 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18129 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18130 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18131 (m68k_breakpoint_at): New. Add to the_low_target.
18133 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18134 srv_linux_thread_db to yes.
18136 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18138 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18139 (ARCH_SET_FS): Likewise.
18140 (ARCH_GET_FS): Likewise.
18141 (ARCH_GET_GS): Likewise.
18143 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18145 * linux-i386-low.c (ps_get_thread_area): New.
18146 * linux-x86-64-low.c (ps_get_thread_area): New.
18147 * linux-low.c: Include <sys/syscall.h>.
18148 (linux_kill_one_process): Don't kill the first thread here.
18149 (linux_kill): Kill the first thread here.
18150 (kill_lwp): New function.
18151 (send_sigstop, linux_send_signal): Use it.
18152 * proc-service.c: Clean up #ifdefs.
18153 (fpregset_info): Delete.
18154 (ps_lgetregs): Update and enable implementation.
18155 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18157 * remote-utils.c (struct sym_cache, symbol_cache): New.
18158 (input_interrupt): Print a clearer message.
18159 (async_io_enabled): New variable.
18160 (enable_async_io, disable_async_io): Use it. Update comments.
18161 (look_up_one_symbol): Use the symbol cache.
18162 * thread-db.c (thread_db_look_up_symbols): New function.
18163 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18165 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18167 * configure.in: Test for -rdynamic.
18168 * configure: Regenerated.
18169 * Makefile (INTERNAL_LDFLAGS): New.
18170 (gdbserver, gdbreplay): Use it.
18172 2004-09-02 Andrew Cagney <cagney@gnu.org>
18174 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18176 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18178 * linux-low.c (linux_wait): Clear all_processes list also.
18180 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18182 * linux-low.c: Include <errno.h>. Remove extern declaration of
18185 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18187 * gdbreplay.c, server.h, utils.c: Update copyright years.
18189 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18191 * server.c (main): Print child status or termination signal from
18192 variable 'signal', not 'sig'.
18194 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18196 * linux-low.c (linux_read_memory): Change return type to
18197 int. Check for and return error from ptrace().
18198 * target.c (read_inferior_memory): Change return type to int. Pass
18199 back return status from the_target->read_memory().
18200 * target.h (struct target_ops): Adapt *read_memory() prototype.
18202 (read_inferior_memory): Adapt prototype.
18203 * server.c (main): Return an error packet if
18204 read_inferior_memory() returns an error.
18206 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18208 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18209 Unify with other clean targets.
18211 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18213 * server.c (handle_v_cont): Call set_desired_inferior.
18215 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18217 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18219 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18221 * linux-low.c (linux_wait): Unblock async I/O.
18222 (linux_resume): Block and enable async I/O.
18223 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18224 * server.h (block_async_io, unblock_async_io): Add prototypes.
18226 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18228 * remote-utils.c (remote_open): Print a status notice after
18229 opening a TCP port.
18230 * server.c (attach_inferior): Print a status notice after
18233 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18235 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18237 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18239 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18241 * server.c, target.h: Update copyright years.
18243 2004-02-25 Roland McGrath <roland@redhat.com>
18245 * target.h (struct target_ops): New member `read_auxv'.
18246 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18247 * linux-low.c (linux_read_auxv): New function.
18248 (linux_target_ops): Initialize `read_auxv' member to that.
18250 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18252 Committed by Jim Blandy <jimb@redhat.com>.
18254 * linux-s390-low.c (s390_num_regs): Update.
18255 (s390_regmap): Remove control registers. Use __s390x__ predefine
18256 instead of GPR_SIZE to distiguish s390 and s390x targets.
18258 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18260 * linux-low.c: Update copyright year.
18261 (check_removed_breakpoint): Clear pending_is_breakpoint.
18262 (linux_set_resume_request, linux_queue_one_thread)
18263 (resume_status_pending_p): New functions.
18264 (linux_continue_one_thread): Use process->resume.
18265 (linux_resume): Only resume threads if there are no pending events.
18266 * linux-low.h (struct process_info): Add resume request
18269 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18271 * regcache.c (new_register_cache): Clear the allocated register
18272 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18274 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18276 * linux-low.c (linux_resume): Take a struct thread_resume *
18278 (linux_wait): Update call.
18279 (resume_ptr): New static variable.
18280 (linux_continue_one_thread): Renamed from
18281 linux_continue_one_process. Use resume_ptr.
18282 (linux_resume): Use linux_continue_one_thread.
18283 * server.c (handle_v_cont, handle_v_requests): New functions.
18284 (myresume): New function.
18285 (main): Handle 'v' case.
18286 * target.h (struct thread_resume): New type.
18287 (struct target_ops): Change argument of "resume" to struct
18289 (myresume): Delete macro.
18291 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18293 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18294 (uninstall): Support DESTDIR.
18296 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18298 * configure.srv: Add xscale*linux copy of arm*linux entry.
18300 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18302 * linux-arm-low.c (arm_reinsert_addr): New function.
18303 (the_low_target): Add arm_reinsert_addr.
18305 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18307 * mem-break.c: Remove whitespace at end of file.
18309 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18311 * configure.in: Check whether we need to prototype strerror.
18312 * server.h: Optionally prototype strerror.
18313 * gdbreplay.c (perror_with_name): Use strerror.
18314 * linux-low.c (linux_attach_lwp): Use strerror.
18315 * utils.c (perror_with_name): Use strerror.
18316 * config.in, configure: Regenerated.
18318 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18320 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18321 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18323 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18325 * Makefile.in (SFILES): Update.
18326 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18327 low-sun3.c: Remove files.
18329 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18331 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18332 (linux_detach_one_process, linux_detach): New functions.
18333 (linux_target_ops): Add linux_detach.
18334 * server.c (main): Handle 'D' packet.
18335 * target.h (struct target_ops): Add "detach" member.
18336 (detach_inferior): Define.
18338 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18340 From Kelley Cook <kelleycook@wideopenwest.com>:
18341 * configure.srv: Accept i[34567]86 variants.
18343 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18345 * linux-low.c (linux_wait_for_event): Correct comment typos.
18346 (linux_resume_one_process): Call check_removed_breakpoint.
18347 (linux_send_signal): New function.
18348 (linux_target_ops): Add linux_send_signal.
18349 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18351 * target.h (struct target_ops): Add send_signal.
18353 2003-05-29 Jim Blandy <jimb@redhat.com>
18355 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18356 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18357 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18358 away part of the register's value.
18360 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18362 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18363 (linux_wait_for_event, linux_init_signals): Likewise.
18365 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18367 * configure.in: Check for stdlib.h.
18368 * configure: Regenerated.
18369 * config.in: Regenerated.
18371 2003-01-04 Andreas Schwab <schwab@suse.de>
18373 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18375 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18377 * Makefile.in: Remove obsolete code.
18379 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18381 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18382 defined(PT_FPR0_HI).
18384 2002-11-17 Stuart Hughes <seh@zee2.com>
18386 * linux-arm-low.c (arm_num_regs): Increase.
18387 (arm_regmap): Include status register.
18389 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18391 * linux-low.c (register_addr): Remove incorrect -1 check.
18393 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18395 * linux-low.c (linux_create_inferior): Call setpgid. Return
18397 (unstopped_p, linux_signal_pid): Remove.
18398 (linux_target_ops): Remove linux_signal_pid.
18399 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18400 global instead of target method.
18401 * target.h (struct target_ops): Remove signal_pid. Update comment
18402 for create_inferior.
18403 * server.c (signal_pid): New variable.
18404 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18405 gdbserver. Set the child to be the foreground process group.
18406 (attach_inferior): Set signal_pid.
18408 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18410 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18412 2002-08-20 Jim Blandy <jimb@redhat.com>
18414 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18417 2002-08-01 Andrew Cagney <cagney@redhat.com>
18419 * Makefile.in: Make chill references obsolete.
18421 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18423 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18424 * configure: Regenerate.
18425 * config.in: Regenerate.
18427 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18429 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18430 (perror_with_name, remote_close, remote_open, expect, play): Static.
18432 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18434 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18435 byte offsets instead of an array of indexes.
18436 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18438 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18440 * regcache.c: Add comment.
18442 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18444 * thread-db.c: New file.
18445 * proc-service.c: New file.
18446 * acinclude.m4: New file.
18447 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18448 proc-service.o, and thread-db.o.
18449 (linux-low.o): Add USE_THREAD_DB.
18450 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18451 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18452 * aclocal.m4: Regenerated.
18453 * config.in: Regenerated.
18454 * configure: Regenerated.
18455 * configure.in: Check for proc_service.h, sys/procfs.h,
18456 thread_db.h, and linux/elf.h headrs.
18457 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18458 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18459 Check for -lthread_db and thread support.
18460 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18461 PowerPC, and SuperH.
18462 * i387-fp.c: Constify arguments.
18463 * i387-fp.h: Likewise.
18464 * inferiors.c: (struct thread_info): Renamed from
18465 `struct inferior_info'. Remove PID member. Use generic inferior
18466 list header. All uses updated.
18467 (inferiors, signal_pid): Removed.
18468 (all_threads): New variable.
18469 (get_thread): Define.
18470 (add_inferior_to_list): New function.
18471 (for_each_inferior): New function.
18472 (change_inferior_id): New function.
18473 (add_inferior): Removed.
18474 (remove_inferior): New function.
18475 (add_thread): New function.
18476 (free_one_thread): New function.
18477 (remove_thread): New function.
18478 (clear_inferiors): Use for_each_inferior and free_one_thread.
18479 (find_inferior): New function.
18480 (find_inferior_id): New function.
18481 (inferior_target_data): Update argument type.
18482 (set_inferior_target_data): Likewise.
18483 (inferior_regcache_data): Likewise.
18484 (set_inferior_regcache_data): Likewise.
18485 * linux-low.c (linux_bp_reinsert): Remove.
18486 (all_processes, stopping_threads, using_thrads)
18487 (struct pending_signals, debug_threads, pid_of): New.
18488 (inferior_pid): Replace with macro.
18489 (struct inferior_linux_data): Remove.
18490 (get_stop_pc, add_process): New functions.
18491 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18492 Use add_process and add_thread.
18493 (linux_attach_lwp): New function, based on old linux_attach. Use
18494 add_process and add_thread. Set stop_expected for new threads.
18495 (linux_attach): New function.
18496 (linux_kill_one_process): New function.
18497 (linux_kill): Kill all LWPs.
18498 (linux_thread_alive): Use find_inferior_id.
18499 (check_removed_breakpoints, status_pending_p): New functions.
18500 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18501 Update. Use WNOHANG. Wait for cloned processes also. Update process
18502 struct for the found process.
18503 (linux_wait_for_event): New function.
18504 (linux_wait): Use it. Support LWPs.
18505 (send_sigstop, wait_for_sigstop, stop_all_processes)
18506 (linux_resume_one_process, linux_continue_one_process): New functions.
18507 (linux_resume): Support LWPs.
18508 (REGISTER_RAW_SIZE): Remove.
18509 (fetch_register): Use register_size instead. Call supply_register.
18510 (usr_store_inferior_registers): Likewise. Call collect_register.
18511 Fix recursive case.
18512 (regsets_fetch_inferior_registers): Improve error message.
18513 (regsets_store_inferior_registers): Add debugging.
18514 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18515 (unstopped_p, linux_signal_pid): New functions.
18516 (linux_target_ops): Add linux_signal_pid.
18517 (linux_init_signals): New function.
18518 (initialize_low): Call it. Initialize using_threads.
18519 * regcache.c (inferior_regcache_data): Add valid
18521 (get_regcache): Fetch registers lazily. Add fetch argument
18522 and update all callers.
18523 (regcache_invalidate_one, regcache_invalidate): New
18525 (new_register_cache): Renamed from create_register_cache.
18526 Return the new regcache.
18527 (free_register_cache): Change argument to a void *.
18528 (registers_to_string, registers_from_string): Call get_regcache
18529 with fetch flag set.
18530 (register_data): Make static. Pass fetch flag to get_regcache.
18531 (supply_register): Call get_regcache with fetch flag clear.
18532 (collect_register): Call get_regcache with fetch flag set.
18533 (collect_register_as_string): New function.
18534 * regcache.h: Update.
18535 * remote-utils.c (putpkt): Flush after debug output and use
18537 Handle input interrupts while waiting for an ACK.
18538 (input_interrupt): Use signal_pid method.
18539 (getpkt): Flush after debug output and use stderr.
18540 (outreg): Use collect_register_as_string.
18541 (new_thread_notify, dead_thread_notify): New functions.
18542 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18543 and general_thread.
18544 (look_up_one_symbol): Flush after debug output.
18545 * server.c (step_thread, server_waiting): New variables.
18546 (start_inferior): Don't use signal_pid. Update call to mywait.
18547 (attach_inferior): Update call to mywait.
18548 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18549 (main): Don't fetch/store registers explicitly. Use
18550 set_desired_inferior. Support proposed ``Hs'' packet. Update
18552 * server.h: Update.
18553 (struct inferior_list, struct_inferior_list_entry): New.
18554 * target.c (set_desired_inferior): New.
18555 (write_inferior_memory): Constify.
18556 (mywait): New function.
18557 * target.h: Update.
18558 (struct target_ops): New signal_pid method.
18559 (mywait): Removed macro, added prototype.
18561 * linux-low.h (regset_func): Removed.
18562 (regset_fill_func, regset_store_func): New.
18563 (enum regset_type): New.
18564 (struct regset_info): Add type field. Use new operation types.
18565 (struct linux_target_ops): stop_pc renamed to get_pc.
18566 Add decr_pc_after_break and breakpoint_at.
18567 (get_process, get_thread_proess, get_process_thread)
18568 (strut process_info, all_processes, linux_attach_lwp)
18569 (thread_db_init): New.
18571 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18572 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18573 (the_low_target): Add new members.
18574 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18575 (i386_store_fpxregset): Constify.
18576 (target_regsets): Add new kind identifier.
18577 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18578 (i386_set_pc): Add debugging.
18579 (i386_breakpoint_at): New function.
18580 (the_low_target): Add new members.
18581 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18582 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18583 (mips_breakpoint_at): New.
18584 (the_low_target): Add new members.
18585 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18586 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18587 (the_low_target): Add new members.
18588 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18589 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18590 (the_low_target): Add new members.
18591 * linux-x86-64-low.c (target_regsets): Add new kind
18594 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18596 From Martin Pool <mbp@samba.org>:
18597 * server.c (gdbserver_usage): New function.
18600 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18602 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18603 stop_at -> stop_pc.
18605 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18607 * Makefile.in: Remove obsolete code.
18609 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18611 * linux-low.c (regsets_fetch_inferior_registers),
18612 (regsets_store_inferior_registers): Removed cast to int from
18614 * regcache.h: Added declaration of struct inferior_info.
18616 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18618 * inferiors.c (struct inferior_info): Add regcache_data.
18619 (add_inferior): Call create_register_cache.
18620 (clear_inferiors): Call free_register_cache.
18621 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18622 * regcache.c (struct inferior_regcache_data): New.
18623 (registers): Remove.
18624 (get_regcache): New function.
18625 (create_register_cache, free_register_cache): New functions.
18626 (set_register_cache): Don't initialize the register cache here.
18627 (registers_to_string, registers_from_string, register_data): Call
18629 * regcache.h: Add prototypes.
18630 * server.h: Likewise.
18632 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18634 * mem-break.c: New file.
18635 * mem-break.h: New file.
18636 * Makefile.in: Add mem-break.o rule; update server.h
18638 * inferiors.c (struct inferior_info): Add target_data
18640 (clear_inferiors): Free target_data member if set.
18641 (inferior_target_data, set_inferior_target_data): New functions.
18642 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18643 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18644 * linux-low.c (linux_bp_reinsert): New variable.
18645 (struct inferior_linux_data): New.
18646 (linux_create_inferior): Use set_inferior_target_data.
18647 (linux_attach): Likewise. Call add_inferior.
18648 (linux_wait_for_one_inferior): New function.
18649 (linux_wait): Call it.
18650 (linux_write_memory): Add const.
18651 (initialize_low): Call set_breakpoint_data.
18652 * linux-low.h (struct linux_target_ops): Add breakpoint
18654 * server.c (attach_inferior): Remove extra add_inferior
18656 * server.h: Include mem-break.h. Update inferior.c
18658 * target.c (read_inferior_memory)
18659 (write_inferior_memory): New functions.
18660 * target.h (read_inferior_memory)
18661 (write_inferior_memory): Change macros to prototypes.
18662 (struct target_ops): Update comments. Add const to write_memory
18665 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18667 * linux-low.c (usr_store_inferior_registers): Support
18668 registers which are allowed to fail to store.
18669 * linux-low.h (linux_target_ops): Likewise.
18670 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18671 (ppc_cannot_store_register): FPSCR may not be storable.
18673 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18675 * server.h: Include <string.h> if HAVE_STRING_H.
18676 * ChangeLog: Correct paths in last ChangeLog entry.
18678 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18680 * linux-low.h: Remove obsolete prototypes.
18681 (struct linux_target_ops): New.
18682 (extern the_low_target): New.
18683 * linux-low.c (num_regs, regmap): Remove declarations.
18684 (register_addr): Use the_low_target explicitly.
18685 (fetch_register): Likewise.
18686 (usr_fetch_inferior_registers): Likewise.
18687 (usr_store_inferior_registers): Likewise.
18688 * linux-arm-low.c (num_regs): Remove.
18689 (arm_num_regs): Define.
18690 (arm_regmap): Renamed from regmap, made static.
18691 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18693 (arm_cannot_store_register): Renamed from cannot_store_register,
18695 (the_low_target): New.
18696 * linux-i386-low.c (num_regs): Remove.
18697 (i386_num_regs): Define.
18698 (i386_regmap): Renamed from regmap, made static.
18699 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18701 (i386_cannot_store_register): Renamed from cannot_store_register,
18703 (the_low_target): New.
18704 * linux-ia64-low.c (num_regs): Remove.
18705 (ia64_num_regs): Define.
18706 (ia64_regmap): Renamed from regmap, made static.
18707 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18709 (ia64_cannot_store_register): Renamed from cannot_store_register,
18711 (the_low_target): New.
18712 * linux-m68k-low.c (num_regs): Remove.
18713 (m68k_num_regs): Define.
18714 (m68k_regmap): Renamed from regmap, made static.
18715 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18717 (m68k_cannot_store_register): Renamed from cannot_store_register,
18719 (the_low_target): New.
18720 * linux-mips-low.c (num_regs): Remove.
18721 (mips_num_regs): Define.
18722 (mips_regmap): Renamed from regmap, made static.
18723 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18725 (mips_cannot_store_register): Renamed from cannot_store_register,
18727 (the_low_target): New.
18728 * linux-ppc-low.c (num_regs): Remove.
18729 (ppc_num_regs): Define.
18730 (ppc_regmap): Renamed from regmap, made static.
18731 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18733 (ppc_cannot_store_register): Renamed from cannot_store_register,
18735 (the_low_target): New.
18736 * linux-s390-low.c (num_regs): Remove.
18737 (s390_num_regs): Define.
18738 (s390_regmap): Renamed from regmap, made static.
18739 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18741 (s390_cannot_store_register): Renamed from cannot_store_register,
18743 (the_low_target): New.
18744 * linux-sh-low.c (num_regs): Remove.
18745 (sh_num_regs): Define.
18746 (sh_regmap): Renamed from regmap, made static.
18747 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18749 (sh_cannot_store_register): Renamed from cannot_store_register,
18751 (the_low_target): New.
18752 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18753 (the_low_target): New.
18755 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18757 * Makefile.in: Add stamp-h target.
18758 * configure.in: Create stamp-h.
18759 * configure: Regenerated.
18761 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18763 * inferiors.c: New file.
18764 * target.c: New file.
18765 * target.h: New file.
18766 * Makefile.in: Add target.o and inferiors.o. Update
18768 * linux-low.c (inferior_pid): New static variable,
18769 moved from server.c.
18770 (linux_create_inferior): Renamed from create_inferior.
18771 Call add_inferior. Return 0 on success instead of a PID.
18772 (linux_attach): Renamed from myattach.
18773 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18774 (linux_thread_alive): Renamed from mythread_alive.
18775 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18777 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18778 (regsets_store_inferior_registers): Correct error message.
18779 Add missing ``return 0''.
18780 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18781 (linux_store_registers): Renamed from store_inferior_registers.
18782 (linux_read_memory): Renamed from read_inferior_memory.
18783 (linux_write_memory): Renamed from write_inferior_memory.
18784 (linux_target_ops): New structure.
18785 (initialize_low): Call set_target_ops ().
18786 * remote-utils.c (unhexify): New function.
18787 (hexify): New function.
18788 (input_interrupt): Send signals to ``signal_pid''.
18789 * server.c (inferior_pid): Remove.
18790 (start_inferior): Update create_inferior call.
18791 (attach_inferior): Call add_inferior.
18792 (handle_query): New function.
18793 (main): Call handle_query for `q' packets.
18794 * server.h: Include "target.h". Remove obsolete prototypes.
18795 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18797 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18799 * Makefile.in: Add WARN_CFLAGS. Update configury
18801 * configure.in: Check for <string.h>
18802 * configure: Regenerate.
18803 * config.in: Regenerate.
18804 * gdbreplay.c: Include needed system headers.
18805 (remote_open): Remove strchr prototype.
18806 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18807 * regcache.c (supply_register): Change buf argument to const void *.
18808 (supply_register_by_name): Likewise.
18809 (collect_register): Change buf argument to void *.
18810 (collect_register_by_name): Likewise.
18811 * regcache.h: Add missing prototypes.
18812 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18813 * server.c (handle_query): New function.
18814 (attached): New static variable, moved out of main.
18815 (main): Quiet longjmp clobber warnings.
18816 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18817 * utils.c (error): Remove NORETURN.