1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's supports_hardware_single_step op into
4 a 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_supports_hardware_single_step): Update the macro.
9 (target_can_do_hardware_single_step): Remove declaration.
10 * target.cc (process_target::supports_hardware_single_step): Define.
11 (target_can_do_hardware_single_step): Remove.
13 Update the derived classes and callers below.
15 * linux-low.h (class linux_process_target): Update.
16 * linux-low.cc (linux_target_ops): Update.
17 (linux_supports_hardware_single_step): Turn into ...
18 (linux_process_target::supports_hardware_single_step): ... this.
19 * lynx-low.h (class lynx_process_target): Update.
20 * lynx-low.cc (lynx_target_ops): Update.
21 (lynx_process_target::supports_hardware_single_step): Define.
22 * nto-low.h (class nto_process_target): Update.
23 * nto-low.cc (nto_target_ops): Update.
24 (nto_process_target::supports_hardware_single_step): Define.
25 * win32-low.h (class win32_process_target): Update.
26 * win32-low.cc (win32_target_ops): Update.
27 (win32_process_target::supports_hardware_single_step): Define.
29 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
31 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
32 ops into methods of process_target.
34 * target.h (struct process_stratum_target): Remove the target ops.
35 (class process_target): Add the target ops.
36 (target_stopped_by_hw_breakpoint): Update the macro.
37 (target_supports_stopped_by_hw_breakpoint): Update the macro.
38 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
39 (process_target::supports_stopped_by_hw_breakpoint): Define.
41 Update the derived classes and callers below.
43 * linux-low.cc (linux_target_ops): Update.
44 (linux_stopped_by_hw_breakpoint): Turn into ...
45 (linux_process_target::stopped_by_hw_breakpoint): ... this.
46 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
47 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
48 * linux-low.h (class linux_process_target): Update.
49 * lynx-low.cc (lynx_target_ops): Update.
50 * nto-low.cc (nto_target_ops): Update.
51 * win32-low.cc (win32_target_ops): Update.
53 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
55 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
56 ops into methods of process_target.
58 * target.h (struct process_stratum_target): Remove the target ops.
59 (class process_target): Add the target ops.
60 (target_stopped_by_sw_breakpoint): Update the macro.
61 (target_supports_stopped_by_sw_breakpoint): Update the macro.
62 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
63 (process_target::supports_stopped_by_sw_breakpoint): Define.
65 Update the derived classes and callers below.
67 * linux-low.cc (linux_target_ops): Update.
68 (linux_stopped_by_sw_breakpoint): Turn into ...
69 (linux_process_target::stopped_by_sw_breakpoint): ... this.
70 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
71 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
72 * linux-low.h (class linux_process_target): Update.
73 * lynx-low.cc (lynx_target_ops): Update.
74 * nto-low.cc (nto_target_ops): Update.
75 * win32-low.cc (win32_target_ops): Update.
77 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
79 Turn process_stratum_target's insert_point and remove_point ops
80 into methods of process_target.
82 * target.h (struct process_stratum_target): Remove the target ops.
83 (class process_target): Add the target ops.
84 * target.cc (process_target::insert_point): Define.
85 (process_target::remove_point): Define.
87 Update the derived classes and callers below.
89 * mem-break.cc (set_raw_breakpoint_at): Update.
90 (delete_raw_breakpoint): Update.
91 (uninsert_raw_breakpoint): Update.
92 (reinsert_raw_breakpoint): Update.
93 * linux-low.cc (linux_target_ops): Update.
94 (linux_insert_point): Turn into ...
95 (linux_process_target::insert_point): ... this.
96 (linux_remove_point): Turn into ...
97 (linux_process_target::remove_point): ... this.
98 * linux-low.h (class linux_process_target): Update.
99 * lynx-low.cc (lynx_target_ops): Update.
100 * nto-low.cc (nto_target_ops): Update.
101 (nto_insert_point): Turn into ...
102 (nto_process_target::insert_point): ... this.
103 (nto_remove_point): Turn into ...
104 (nto_process_target::remove_point): ... this.
105 * nto-low.h (class nto_process_target): Update.
106 * win32-low.cc (win32_target_ops): Update.
107 (win32_insert_point): Turn into ...
108 (win32_process_target::insert_point): ... this.
109 (win32_remove_point): Turn into ...
110 (win32_process_target::remove_point): ... this.
111 * win32-low.h (class win32_process_target): Update.
113 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
115 Turn process_stratum_target's supports_z_point_type op into a
116 method of process_target.
118 * target.h (struct process_stratum_target): Remove the target op.
119 (class process_target): Add the target op.
120 * target.cc (process_target::supports_z_point_type): Define.
122 Update the derived classes and callers below.
124 * mem-break.cc (z_type_supported): Update.
125 * linux-low.cc (linux_target_ops): Update.
126 (linux_supports_z_point_type): Turn into ...
127 (linux_process_target::supports_z_point_type): ... this.
128 * linux-low.h (class linux_process_target): Update.
129 * lynx-low.cc (lynx_target_ops): Update.
130 * nto-low.cc (nto_target_ops): Update.
131 (nto_supports_z_point_type): Turn into ...
132 (nto_process_target::supports_z_point_type): ... this.
133 * nto-low.h (class nto_process_target): Update.
134 * win32-low.cc (win32_target_ops): Update.
135 (win32_supports_z_point_type): Turn into ...
136 (win32_process_target::supports_z_point_type): ... this.
137 * win32-low.h (class win32_process_target): Update.
139 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
141 Turn process_stratum_target's read_auxv op into a method of
144 * target.h (class process_stratum_target): Remove the target op.
145 (struct process_target): Add the target op. Also add
146 'supports_read_auxv'.
147 * target.cc (process_target::read_auxv): Define.
148 (process_target::supports_read_auxv): Define.
150 Update the derived classes and callers below.
152 * server.cc (handle_qxfer_auxv): Update.
153 (handle_query): Update.
154 * linux-low.cc (linux_target_ops): Update.
155 (linux_process_target::supports_read_auxv): Define.
156 (linux_read_auxv): Turn into ...
157 (linux_process_target::read_auxv): ... this.
158 * linux-low.h (class linux_process_target): Update.
159 * lynx-low.cc (lynx_target_ops): Update.
160 * nto-low.cc (nto_target_ops): Update.
161 (nto_process_target::supports_read_auxv): Define.
162 (nto_read_auxv): Turn into ...
163 (nto_process_target::read_auxv): ... this.
164 * nto-low.h (class nto_process_target): Update.
165 * win32-low.cc (win32_target_ops): Update.
167 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
169 Turn process_stratum_target's request_interrupt op into a method of
172 * target.h (struct process_stratum_target): Remove the target op.
173 (class process_target): Add the target op.
175 Update the derived classes and callers below.
177 * remote-utils.cc (putpkt_binary_1): Update.
178 (input_interrupt): Update.
180 * server.cc (handle_v_requests): Update.
181 * linux-low.cc (linux_target_ops): Update.
182 (linux_request_interrupt): Turn into ...
183 (linux_process_target::request_interrupt): ... this.
184 * linux-low.h (class linux_process_target): Update.
185 * lynx-low.cc (lynx_target_ops): Update.
186 (lynx_request_interrupt): Turn into ...
187 (lynx_process_target::request_interrupt): ... this.
188 * lynx-low.h (class lynx_process_target): Update.
189 * nto-low.cc (nto_target_ops): Update.
190 (nto_request_interrupt): Turn into ...
191 (nto_process_target::request_interrupt): ... this.
192 * nto-low.h (class nto_process_target): Update.
193 * win32-low.cc (win32_target_ops): Update.
194 (win32_request_interrupt): Turn into ...
195 (win32_process_target::request_interrupt): ... this.
196 * win32-low.h (class win32_process_target): Update.
198 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
200 Turn process_stratum_target's look_up_symbols op into a method of
203 * target.h (struct process_stratum_target): Remove the target op.
204 (class process_target): Add the target op.
205 * target.cc (process_target::look_up_symbols): Define.
207 Update the derived classes and callers below.
209 * server.cc (handle_query): Update.
210 * linux-low.cc (linux_target_ops): Update.
211 (linux_look_up_symbols): Turn into ...
212 (linux_process_target::look_up_symbols): ... this.
213 * linux-low.h (class linux_process_target): Update.
214 * lynx-low.cc (lynx_target_ops): Update.
215 * nto-low.cc (nto_target_ops): Update.
216 * win32-low.cc (win32_target_ops): Update.
218 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
220 Turn process_stratum_target's read_memory and write_memory
221 ops into methods of process_target.
223 * target.h (struct process_stratum_target): Remove the target ops.
224 (class process_target): Add the target ops.
226 Update the derived classes and callers below.
228 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
229 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
230 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
231 (arm_get_syscall_trapinfo): Update.
232 * linux-cris-low.cc (cris_breakpoint_at): Update.
233 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
234 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
235 * linux-mips-low.cc (mips_breakpoint_at): Update.
236 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
237 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
238 * linux-sh-low.cc (sh_breakpoint_at): Update.
239 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
240 (sparc_store_gregset_from_stack): Update.
241 (sparc_breakpoint_at): Update.
242 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
243 * linux-tile-low.cc (tile_breakpoint_at): Update.
244 * linux-x86-low.cc (x86_breakpoint_at): Update.
245 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
246 * mem-brea.cc (insert_memory_breakpoint): Update.
247 (validate_inserted_breakpoint): Update.
248 * target.cc (read_inferior_memory): Update.
249 (target_write_memory): Update.
250 * linux-low.cc (linux_target_ops): Update.
251 (linux_read_memory): Make a wrapper around the read_memory target
253 (linux_process_target::read_memory): Rename from linux_read_memory.
254 (linux_write_memory): Turn into ...
255 (linux_process_target::write_memory): ... this.
256 * linux-low.h (class linux_process_target): Update.
257 * lynx-low.cc (lynx_target_ops): Update.
258 (lynx_read_memory): Turn into ...
259 (lynx_process_target::read_memory): ... this.
260 (lynx_write_memory): Turn into ...
261 (lynx_process_target::write_memory): ... this.
262 * lynx-low.h (class lynx_process_target): Update.
263 * nto-low.cc (nto_target_ops): Update.
264 (nto_read_memory): Turn into ...
265 (nto_process_target::read_memory): ... this.
266 (nto_write_memory): Turn into ...
267 (nto_process_target::write_memory): ... this.
268 * nto-low.h (class nto_process_target): Update.
269 * win32-low.cc (win32_target_ops): Update.
270 (win32_read_inferior_memory): Turn into ...
271 (win32_process_target::read_memory): ... this.
272 (win32_write_inferior_memory): Turn into ...
273 (win32_process_target::write_memory): ... this.
274 * win32-low.h (class win32_process_target): Update.
276 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
278 Turn process_stratum_target's prepare_to_access_memory and
279 done_accessing_memory ops into methods of process_target.
281 * target.h (struct process_stratum_target): Remove the target ops.
282 (class process_target): Add the target ops.
283 * target.cc (process_target::prepare_to_access_memory): Define.
284 (process_target::done_accessing_memory): Define.
285 (prepare_to_access_memory): Update.
286 (done_accessing_memory): Update.
288 Update the derived classes and callers below.
290 * linux-low.cc (linux_target_ops): Update.
291 (linux_prepare_to_access_memory): Turn into ...
292 (linux_process_target::prepare_to_access_memory): ... this.
293 (linux_done_accessing_memory): Turn into ...
294 (linux_process_target::done_accessing_memory): ... this.
295 * linux-low.h (class linux_process_target): Update.
296 * lynx-low.cc (lynx_target_ops): Update.
297 * nto-low.cc (nto_target_ops): Update.
298 * win32-low.cc (win32_target_ops): Update.
300 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
302 Turn process_stratum_target's fetch_registers and store_registers
303 ops into methods of process_target.
305 * target.h (struct process_stratum_target): Remove the target ops.
306 (class process_target): Add the target ops.
307 (fetch_inferior_registers): Update the macro.
308 (store_inferior_registers): Update the macro.
310 Update the derived classes and callers below.
312 * linux-low.cc (linux_target_ops): Update.
313 (linux_fetch_registers): Turn into ...
314 (linux_process_target::fetch_registers): ... this.
315 (linux_store_registers): Turn into ...
316 (linux_process_target::store_registers): ... this.
317 * linux-low.h (class linux_process_target): Update.
318 * lynx-low.cc (lynx_target_ops): Update.
319 (lynx_fetch_registers): Turn into ...
320 (lynx_process_target::fetch_registers): ... this.
321 (lynx_store_registers): Turn into ...
322 (lynx_process_target::store_registers): ... this.
323 * lynx-low.h (class lynx_process_target): Update.
324 * nto-low.cc (nto_target_ops): Update.
325 (nto_fetch_registers): Turn into ...
326 (nto_process_target::fetch_registers): ... this.
327 (nto_store_registers): Turn into ...
328 (nto_process_target::store_registers): ... this.
329 * nto-low.h (class nto_process_target): Update.
330 * win32-low.cc (win32_target_ops): Update.
331 (win32_fetch_inferior_registers): Turn into ...
332 (win32_process_target::fetch_registers): ... this.
333 (win32_store_inferior_registers): Turn into ...
334 (win32_process_target::store_registers): ... this.
335 * win32-low.h (class win32_process_target): Update.
337 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
339 Turn process_stratum_target's wait op into a method of
342 * target.h (struct process_stratum_target): Remove the target op.
343 (class process_target): Add the target op.
345 Update the derived classes and callers below.
347 * target.cc (target_wait): Update.
348 * linux-low.cc (linux_target_ops): Update.
349 (linux_wait): Turn into ...
350 (linux_process_target::wait): ... this.
351 * linux-low.h (class linux_process_target): Update.
352 * lynx-low.cc (lynx_target_ops): Update.
353 (lynx_wait): Turn into ...
354 (lynx_process_target::wait): ... this.
355 * lynx-low.h (class lynx_process_target): Update.
356 * nto-low.cc (nto_target_ops): Update.
357 (nto_wait): Turn into ...
358 (nto_process_target::wait): ... this.
359 * nto-low.h (class nto_process_target): Update.
360 * win32-low.cc (win32_target_ops): Update.
361 (win32_wait): Turn into ...
362 (win32_process_target::wait): ... this.
363 (do_initial_child_stuff): Update.
364 * win32-low.h (class win32_process_target): Update.
366 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
368 Turn process_stratum_target's resume op into a method of
371 * target.h (struct process_stratum_target): Remove the target op.
372 (class process_target): Add the target op.
374 Update the derived classes and callers below.
376 * server.cc (resume): Update.
377 * target.cc (target_stop_and_wait): Update.
378 (target_continue_no_signal): Update.
379 (target_continue): Update.
380 * linux-low.cc (linux_target_ops): Update.
381 (linux_resume): Turn into ...
382 (linux_process_target::resume): ... this.
383 * linux-low.h (class linux_process_target): Update.
384 * lynx-low.cc (lynx_target_ops): Update.
385 (lynx_resume): Turn into ...
386 (lynx_process_target::resume): ... this.
387 * lynx-low.h (class lynx_process_target): Update.
388 * nto-low.cc (nto_target_ops): Update.
389 (nto_resume): Turn into ...
390 (nto_process_target::resume): ... this.
391 * nto-low.h (class nto_process_target): Update.
392 * win32-low.cc (win32_target_ops): Update.
393 (win32_resume): Turn into ...
394 (win32_process_target::resume): ... this.
395 (win32_process_target::detach): Update.
396 (do_initial_child_stuff): Update.
397 * win32-low.h (class win32_process_target): Update.
399 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
401 Turn process_stratum_target's thread_alive op into a method of
404 * target.h (struct process_stratum_target): Remove the target op.
405 (class process_target): Add the target op.
406 (mythread_alive): Update the macro.
408 Update the derived classes and callers below.
410 * linux-low.cc (linux_target_ops): Update.
411 (linux_thread_alive): Turn into ...
412 (linux_process_target::thread_alive): ... this.
413 (wait_for_sigstop): Update.
414 * linux-low.h (class linux_process_target): Update.
415 * lynx-low.cc (lynx_target_ops): Update.
416 (lynx_thread_alive): Turn into ...
417 (lynx_process_target::thread_alive): ... this.
418 * lynx-low.h (class lynx_process_target): Update.
419 * nto-low.cc (nto_target_ops): Update.
420 (nto_thread_alive): Turn into ...
421 (nto_process_target::thread_alive): ... this.
422 * nto-low.h (class nto_process_target): Update.
423 * win32-low.cc (win32_target_ops): Update.
424 (win32_thread_alive): Turn into ...
425 (win32_process_target::thread_alive): ... this.
426 * win32-low.h (class win32_process_target): Update.
428 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
430 Turn process_stratum_target's join op into a method of
433 * target.h (struct process_stratum_target): Remove the target op.
434 (class process_target): Add the target op.
435 (join_inferior): Update the macro.
437 Update the derived classes and callers below.
439 * linux-low.cc (linux_target_ops): Update.
440 (linux_join): Turn into ...
441 (linux_process_target::join): ... this.
442 * linux-low.h (class linux_process_target): Update.
443 * lynx-low.cc (lynx_target_ops): Update.
444 (lynx_join): Turn into ...
445 (lynx_process_target::join): ... this.
446 * lynx-low.h (class lynx_process_target): Update.
447 * nto-low.cc (nto_target_ops): Update.
448 (nto_process_target::join): Define.
449 * nto-low.h (class nto_process_target): Update.
450 * win32-low.cc (win32_target_ops): Update.
451 (win32_join): Turn into ...
452 (win32_process_target::join): ... this.
453 * win32-low.h (class win32_process_target): Update.
455 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
457 Turn process_stratum_target's mourn op into a method of
460 * target.h (struct process_stratum_target): Remove the target op.
461 (class process_target): Add the target op.
463 Update the derived classes and callers below.
465 * target.cc (target_mourn_inferior): Update.
466 * linux-low.cc (linux_target_ops): Update.
467 (linux_mourn): Turn into ...
468 (linux_process_target::mourn): ... this.
469 (handle_extended_wait): Update.
470 (linux_process_target::kill): Update.
471 (linux_process_target::detach): Update.
472 * linux-low.h (class linux_process_target): Update.
473 * lynx-low.cc (lynx_target_ops): Update.
474 (lynx_mourn): Turn into ...
475 (lynx_process_target::mourn): ... this.
476 * lynx-low.h (class lynx_process_target): Update.
477 * nto-low.cc (nto_target_ops): Update.
478 (nto_mourn): Turn into ...
479 (nto_process_target::mourn): ... this.
480 * nto-low.h (class nto_process_target): Update.
481 * win32-low.cc (win32_target_ops): Update.
482 (win32_mourn): Turn into ...
483 (win32_process_target::mourn): ... this.
484 * win32-low.h (class win32_process_target): Update.
486 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
488 Turn process_stratum_target's detach op into a method of
491 * target.h (struct process_stratum_target): Remove the target op.
492 (class process_target): Add the target op.
493 (detach_inferior): Update the macro.
495 Update the derived classes and callers below.
497 * linux-low.cc (linux_target_ops): Update.
498 (linux_detach): Turn into ...
499 (linux_process_target::detach): ... this.
500 * linux-low.h (class linux_process_target): Update.
501 * lynx-low.cc (lynx_target_ops): Update.
502 (lynx_detach): Turn into ...
503 (lynx_process_target::detach): ... this.
504 * lynx-low.h (class lynx_process_target): Update.
505 * nto-low.cc (nto_target_ops): Update.
506 (nto_detach): Turn into ...
507 (nto_process_target::detach): ... this.
508 * nto-low.h (class nto_process_target): Update.
509 * win32-low.cc (win32_target_ops): Update.
510 (win32_detach): Turn into ...
511 (win32_process_target::detach): ... this.
512 * win32-low.h (class win32_process_target): Update.
514 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
516 Turn process_stratum_target's kill op into a method of
519 * target.h (struct process_stratum_target): Remove the target op.
520 (class process_target): Add the target op.
522 Update the derived classes and callers below.
524 * target.cc (kill_inferior): Update.
525 * linux-low.cc (linux_target_ops): Update.
526 (linux_kill): Turn into ...
527 (linux_process_target::kill): ... this.
528 * linux-low.h (class linux_process_target): Update.
529 * lynx-low.cc (lynx_target_ops): Update.
530 (lynx_kill): Turn into ...
531 (lynx_process_target::kill): ... this.
532 * lynx-low.h (class lynx_process_target): Update.
533 * nto-low.cc (nto_target_ops): Update.
534 (nto_kill): Turn into ...
535 (nto_process_target::kill): ... this.
536 * nto-low.h (class nto_process_target): Update.
537 * win32-low.cc (win32_target_ops): Update.
538 (win32_kill): Turn into ...
539 (win32_process_target::kill): ... this.
540 * win32-low.h (class win32_process_target): Update.
542 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
544 Turn process_stratum_target's attach op into a method of
547 * target.h (struct process_stratum_target): Remove the target op.
548 (class process_target): Add the target op.
549 (myattach): Update the macro.
551 Update the derived classes and callers below.
553 * linux-low.cc (linux_target_ops): Update.
554 (linux_attach): Turn into ...
555 (linux_process_target::attach): ... this.
556 * linux-low.h (class linux_process_target): Update.
557 * lynx-low.cc (lynx_target_ops): Update.
558 (lynx_attach): Turn into ...
559 (lynx_process_target::attach): ... this.
560 * lynx-low.h (class lynx_process_target): Update.
561 * nto-low.cc (nto_target_ops): Update.
562 (nto_attach): Turn into ...
563 (nto_process_target::attach): ... this.
564 * nto-low.h (class nto_process_target): Update.
565 * win32-low.cc (win32_target_ops): Update.
566 (win32_attach): Turn into ...
567 (win32_process_target::attach): ... this.
568 * win32-low.h (class win32_process_target): Update.
570 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
572 Turn process_stratum_target's post_create_inferior op into a method
575 * target.h (struct process_stratum_target): Remove the target op.
576 (class process_target): Add the target op.
577 (target_post_create_inferior): Update the macro.
578 * target.cc (process_target::post_create_inferior): Define.
580 Update the derived classes and callers below.
582 * linux-low.cc (linux_target_ops): Update.
583 (linux_post_create_inferior): Turn into ...
584 (linux_process_target::post_create_inferior): ... this.
585 * linux-low.h (class linux_process_target): Update.
586 * lynx-low.cc (lynx_target_ops): Update.
587 * nto-low.cc (nto_target_ops): Update.
588 * win32-low.cc (win32_target_ops): Update.
590 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
592 Turn process_stratum_target's create_inferior op into a method of
595 * target.h (struct process_stratum_target): Remove the target op.
596 (class process_target): Add the target op.
597 (create_inferior): Rename the macro to ...
598 (target_create_inferior): ... this.
600 Update the derived classes and callers below.
602 * server.cc (handle_v_run): Update.
603 (captured_main): Update.
604 (process_serial_event): Update.
605 * linux-low.cc (linux_target_ops): Update.
606 (linux_create_inferior): Turn into ...
607 (linux_process_target::create_inferior): ... this.
608 * linux-low.h (class linux_process_target): Update.
609 * lynx-low.cc (lynx_target_ops): Update.
610 (lynx_create_inferior): Turn into ...
611 (lynx_process_target::create_inferior): ... this.
612 * lynx-low.h (class lynx_process_target): Update.
613 * nto-low.cc (nto_target_ops): Update.
614 (nto_create_inferior): Turn into ...
615 (nto_process_target::create_inferior): ... this.
616 * nto-low.h (class nto_process_target): Update.
617 * win32-low.cc (win32_target_ops): Update.
618 (win32_create_inferior): Turn into ...
619 (win32_process_target::create_inferior): ... this.
620 * win32-low.h (class win32_process_target): Update.
622 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
624 * target.h (class process_target): New class definition.
625 (struct process_stratum_target) <pt>: New field with type
627 * linux-low.h (class linux_process_target): Define as a derived
628 class of 'process_target'.
629 * linux-low.cc (linux_target_ops): Add a linux_process_target*
631 * lynx-low.h (class lynx_process_target): Define as a derived
632 class of 'process_target'.
633 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
635 * nto-low.h (class nto_process_target): Define as a derived
636 class of 'process_target'.
637 * nto-low.cc (nto_target_ops): Add an nto_process_target*
639 * win32-low.h (class win32_process_target): Define as a derived
640 class of 'process_target'.
641 * win32-low.cc (win32_target_ops): Add a win32_process_target*
644 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
646 * configure: Regenerate.
648 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
649 Andrew Burgess <andrew.burgess@embecosm.com>
651 * linux-riscv-low.cc: New file.
652 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
653 and nat/riscv-linux-tdesc.c.
654 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
655 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
658 2020-02-14 Tom Tromey <tom@tromey.com>
660 * acinclude.m4: Don't include acx_configure_dir.m4.
661 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
662 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
663 (all, install-only, uninstall, clean-info, clean)
664 (maintainer-clean): Don't recurse.
665 (subdir_do, all-lib): Remove.
666 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
668 (generated_files): Update.
669 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
670 * configure: Rebuild.
671 * configure.ac: Don't configure gnulib or libiberty.
674 2020-02-14 Eli Zaretskii <eliz@gnu.org>
676 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
677 preparing the command line for CreateProcess.
678 (win32_create_inferior): Reflect the program name in debugging
679 output that shows the process and its command line.
681 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
683 * Makefile.in: Rename source files from .c to .cc.
684 * %.c: Rename to %.cc.
685 * configure.ac: Rename server.c to server.cc.
686 * configure: Re-generate.
688 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
690 * Makefile.in: Rename gdbsupport source files from .c to .cc.
692 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
694 * win32-low.c (win32_create_inferior): Set signal_pid.
696 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
697 Pedro Alves <palves@redhat.com>
699 Skip building gdbserver in a cross-configuration.
700 * configure.srv: Set $gdbserver_host depending on whether $target
701 is $host. Use $gdbserver_host instead of $host.
703 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
705 * configure: Re-generate.
707 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
709 * configure: Re-generate.
711 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
713 * acinclude.m4: Update warning.m4 path.
715 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
717 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
718 (handle_exception): Set siginfo_er.
719 (win32_xfer_siginfo): New function.
721 2020-02-07 Tom Tromey <tom@tromey.com>
722 Pedro Alves <palves@redhat.com>
724 * README: Update build documentation.
725 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
727 * configure.ac: Update paths.
728 * configure: Rebuild.
729 * acinclude.m4: Update paths.
730 * Makefile.in: Update include paths.
731 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
732 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
733 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
734 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
735 (%-generated.c): Update paths.
736 * Move entire directory from ../gdb/gdbserver.
738 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
740 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
742 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
744 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
745 assignment instead of srv_linux_obj.
747 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
749 * server.c (handle_qxfer_libraries): Write segment-address with
752 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
754 * Makefile.in (install-strip): New target.
755 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
756 * aclocal.m4: Regenerate.
757 * configure: Regenerate.
758 * configure.ac: Add AM_PROG_INSTALL_STRIP.
760 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
762 * Makefile.in (SFILES): Adjust paths to point to real files.
763 (OBS): Move waitstatus.o to target/waitstatus.o.
764 (TAGS): Transform paths appropriately.
766 (nat/%.o): ... this pattern rule.
768 (target/%.o): ... this pattern rule.
769 * configure.srv: Adjust paths throughout to include nat/ prefix
770 with the revant files.
771 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
772 * configure: Regenerate.
774 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
776 * Makefile.in (TAGS): Remove config files from the recipe.
778 2020-01-14 Tom Tromey <tom@tromey.com>
780 * configure: Rebuild.
781 * configure.ac: Remove any checks that were added to common.m4.
782 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
785 2020-01-14 Tom Tromey <tom@tromey.com>
787 * server.h: Include config.h.
788 * gdbreplay.c: Include config.h.
789 * configure: Rebuild.
790 * configure.ac: Don't source common.host.
791 * acinclude.m4: Update path.
792 * Makefile.in (INCSUPPORT): New variable.
793 (INCLUDE_CFLAGS): Add INCSUPPORT.
794 (SFILES): Update paths.
795 (version-generated.c): Update path to create-version.sh.
796 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
798 2020-01-14 Tom Tromey <tom@tromey.com>
800 * configure.ac (LIBS): Use WIN32APILIBS.
801 (USE_WIN32API): Don't define.
802 * configure: Rebuild.
804 2020-01-14 Tom Tromey <tom@tromey.com>
806 * configure: Rebuild.
808 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
810 * Makefile.in (%-generated.c): Remove rule for files from
813 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
815 * configure: Re-generate.
817 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
819 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
821 * tracepoint.c (stop_tracing, flush_trace_buffer,
822 about_to_request_buffer_space, get_trace_state_variable_value,
823 set_trace_state_variable_value, gdb_collect): Add declaration.
825 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
827 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
828 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
829 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
830 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
831 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
834 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
836 * inferiors.c: Include gdbsupport/common-inferior.h.
838 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
840 * hostio-errno.c: Include hostio.h.
842 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
844 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
847 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
849 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
850 * linux-arm-tdesc.h: Include arch/arm.h.
852 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
854 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
856 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
858 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
859 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
861 2020-01-10 Pedro Alves <palves@redhat.com>
863 * fork-child.c (post_fork_inferior): Pass target down to
865 * inferiors.c (switch_to_thread): Add process_stratum_target
867 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
868 * nto-low.c (nto_target_ops): Now a process_stratum_target.
869 * linux-low.c (linux_target_ops): Now a process_stratum_target.
870 * remote-utils.c (prepare_resume_reply): Pass the target to
872 * target.c (the_target): Now a process_stratum_target.
873 (done_accessing_memory): Pass the target to switch_to_thread.
874 (set_target_ops): Ajust to use process_stratum_target.
875 * target.h (struct target_ops): Rename to ...
876 (struct process_stratum_target): ... this.
877 (the_target, set_target_ops): Adjust.
878 (prepare_to_access_memory): Adjust comment.
879 * win32-low.c (child_xfer_memory): Adjust to use
880 process_stratum_target.
881 (win32_target_ops): Now a process_stratum_target.
883 2020-01-06 Eli Zaretskii <eliz@gnu.org>
884 Pedro Alves <palves@redhat.com>
886 * win32-low.c (get_child_debug_event): Extract the fatal exception
887 from the exit status and convert to the equivalent Posix signal
889 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
890 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
892 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
894 * Makefile.in: Use INSTALL_PROGRAM_ENV.
896 2020-01-01 Joel Brobecker <brobecker@adacore.com>
898 * server.c (gdbserver_version): Change copyright year to 2020.
899 * gdbreplay.c (gdbreplay_version): Likewise.
901 2019-12-19 Christian Biesinger <cbiesinger@google.com>
903 * configure: Regenerate.
904 * configure.ac: Quote variable arguments of test.
906 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
908 * Makefile.in: Fix build with GNU Make 3.81
910 2019-12-16 Tom Tromey <tromey@adacore.com>
912 * server.c (get_exec_file): Constify result.
914 2019-12-10 Christian Biesinger <cbiesinger@google.com>
916 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
917 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
918 * config.in: Regenerate.
919 * configure: Regenerate.
920 * configure.ac: Don't check for strerror.
921 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
922 Call safe_strerror instead of strerror.
923 * server.h (strerror): Remove this now-unnecessary declaration.
924 * tracepoint.c (init_named_socket): Call safe_strerror instead of
926 (gdb_agent_helper_thread): Likewise.
927 * utils.c (perror_with_name): Likewise.
929 2019-11-26 Tom Tromey <tom@tromey.com>
931 * configure, config.in: Rebuild.
933 2019-11-26 Tom Tromey <tom@tromey.com>
935 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
936 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
938 * configure, config.in: Rebuild.
940 2019-11-26 Tom Tromey <tom@tromey.com>
942 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
943 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
944 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
945 * acinclude.m4: Include ax_pthread.m4.
946 * config.in, configure: Rebuild.
948 2019-11-26 Christian Biesinger <cbiesinger@google.com>
950 * debug.c (debug_set_output): Call safe_strerror instead of
952 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
953 (linux_kill_one_lwp): Likewise.
954 (linux_detach_one_lwp): Likewise.
955 (linux_wait_for_event_filtered): Likewise.
956 (store_register): Likewise.
957 * lynx-low.c (lynx_attach): Likewise.
958 * mem-break.c (insert_memory_breakpoint): Likewise.
959 (remove_memory_breakpoint): Likewise.
960 (delete_fast_tracepoint_jump): Likewise.
961 (set_fast_tracepoint_jump): Likewise.
962 (uninsert_fast_tracepoint_jumps_at): Likewise.
963 (reinsert_fast_tracepoint_jumps_at): Likewise.
964 * nto-low.c (nto_xfer_memory): Likewise.
965 (nto_resume): Likewise.
967 2019-11-20 Luis Machado <luis.machado@linaro.org>
969 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
970 instead of register count.
971 * tdesc.c (tdesc_contains_feature): New function.
972 * tdesc.h (tdesc_contains_feature): New prototype.
974 2019-11-15 Christian Biesinger <cbiesinger@google.com>
976 * Makefile.in: Add safe-strerror.c.
977 * configure: Regenerate.
978 * configure.ac: Don't source common.host.
980 2019-11-15 Christian Biesinger <cbiesinger@google.com>
982 * config.in: Regenerate.
983 * configure: Regenerate.
985 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
987 * ax.c (ax_printf): Handle size_t_arg.
989 2019-11-06 Christian Biesinger <cbiesinger@google.com>
991 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
992 * mi/mi-main.c (output_cores): Likewise.
993 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
994 (linux_xfer_osdata_modules): Likewise.
995 * remote.c (register_remote_support_xml): Likewise.
996 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
997 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
999 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1001 * configure: Regenerate.
1002 * configure.ac: Remove check for strerror_r.
1004 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1006 * config.in: Regenerate.
1007 * configure: Regenerate.
1008 * configure.ac: Also check for strerror_r.
1010 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1012 * ax.h (debug_agent): Remove duplicate declaration.
1014 2019-10-26 Tom de Vries <tdevries@suse.de>
1016 * linux-aarch64-low.c: Fix typos in comments.
1017 * linux-arm-low.c: Same.
1018 * linux-low.c: Same.
1019 * linux-ppc-low.c: Same.
1020 * proc-service.c: Same.
1023 * tracepoint.c: Same.
1024 * win32-low.c: Same.
1026 2019-10-25 Tom Tromey <tromey@adacore.com>
1028 * utils.c (xstrdup): Remove.
1030 2019-10-23 Tom Tromey <tom@tromey.com>
1032 * configure, config.in: Rebuild.
1034 2019-10-23 Tom Tromey <tom@tromey.com>
1036 * configure: Rebuild.
1037 * acinclude.m4: Use m4_include, not sinclude.
1039 2019-10-17 Tom Tromey <tromey@adacore.com>
1041 * configure: Rebuild.
1042 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1043 in AC_CONFIG_FILES invocation.
1044 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1047 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1049 * server.c: Include xml-builtin.h.
1050 (get_xml_features): Don't declare xml_builtins here.
1052 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1054 * Makefile.in: Remove references to vec-ipa.o.
1056 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1058 * Makefile.in: Remove references to vec.c.
1060 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1062 * server.c (server_waiting): Change to bool.
1063 (extended_protocol): Likewise.
1064 (response_needed): Likewise.
1065 (exit_requested): Likewise.
1066 (run_once): Likewise.
1067 (report_no_resumed): Likewise.
1068 (non_stop): Likewise.
1069 (disable_packet_vCont): Likewise.
1070 (disable_packet_Tthread): Likewise.
1071 (disable_packet_qC): Likewise.
1072 (disable_packet_qfThreadInfo): Likewise.
1073 (handle_general_set): Update.
1074 (handle_detach): Update.
1075 (handle_monitor_command): Update.
1076 (handle_query): Update.
1077 (captured_main): Update.
1078 (process_serial_event): Update.
1079 * server.h (server_waiting): Change to bool.
1080 (disable_packet_vCont): Likewise.
1081 (disable_packet_Tthread): Likewise.
1082 (disable_packet_qC): Likewise.
1083 (disable_packet_qfThreadInfo): Likewise.
1084 (run_once): Likewise.
1085 (non_stop): Likewise.
1086 * target.c (target_stop_and_wait): Update.
1088 2019-10-02 Tom Tromey <tromey@adacore.com>
1090 * Makefile.in (SFILES): Add common-inferior.c.
1091 (OBS): Add common-inferior.o.
1092 * server.c (startup_with_shell): Don't define.
1094 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1096 * linux-low.c (linux_low_read_btrace): Update for change to
1099 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1101 * debug.c (debug_threads): Remove comment in favor of the header.
1102 * debug.h (using_threads): Add declaration.
1103 (debug_threads): Add comment.
1104 * linux-aarch64-low.c: Include debug.h and remove declaration of
1106 * nto-low.c: Likewise.
1107 * remote-utils.c: Likewise.
1108 * thread-db.c: Likewise.
1110 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1112 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1113 and powerpc-cell64l-ipa.o.
1114 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1115 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1116 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1119 * spu-low.c: Remove file.
1121 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1122 (parse_spufs_run): Remove.
1123 (ppc_get_pc): Remove Cell/B.E. support.
1124 (ppc_set_pc): Likewise.
1125 (ppc_breakpoint_at): Likewise.
1126 (ppc_arch_setup): Likewise.
1127 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1128 tdesc_powerpc_cell32l.
1129 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1130 or init_registers_powerpc_cell32l.
1131 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1132 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1133 or init_registers_powerpc_cell32l.
1134 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1135 (init_registers_powerpc_cell32l): Remove prototype.
1136 (init_registers_powerpc_cell64l): Likewise.
1138 * target.h (struct target_ops): Remove qxfer_spu member.
1139 * server.c (handle_qxfer_spu): Remove.
1140 (qxfer_packets): Remove entry for "spu".
1141 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1142 * linux-low.c (SPUFS_MAGIC): Remove.
1143 (spu_enumerate_spu_ids): Remove.
1144 (linux_qxfer_spu): Remove.
1145 (linux_target_ops): Remove qxfer_spu member.
1146 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1147 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1148 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1150 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1152 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1153 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1154 * config.in: Regenerate.
1155 * configure: Regenerate.
1157 2019-08-15 Tom Tromey <tromey@adacore.com>
1159 * target.c (target_write_memory): Use gdb::byte_vector.
1161 2019-08-15 Tom Tromey <tromey@adacore.com>
1163 * tracepoint.c (write_inferior_data_pointer)
1164 (write_inferior_integer, write_inferior_int8)
1165 (write_inferior_uinteger, m_tracepoint_action_download)
1166 (r_tracepoint_action_download, x_tracepoint_action_download)
1167 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1168 (download_agent_expr, download_tracepoint_1)
1169 (download_trace_state_variables, upload_fast_traceframes): Update.
1170 * server.c (gdb_write_memory): Update.
1171 * remote-utils.c (relocate_instruction): Update.
1172 * proc-service.c (ps_pdwrite): Update.
1173 * mem-break.c (remove_memory_breakpoint)
1174 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1175 (uninsert_fast_tracepoint_jumps_at)
1176 (reinsert_fast_tracepoint_jumps_at): Update.
1177 * linux-x86-low.c (append_insns)
1178 (i386_install_fast_tracepoint_jump_pad)
1179 (amd64_write_goto_address, i386_write_goto_address): Update.
1180 * linux-s390-low.c (append_insns, s390_write_goto_address):
1182 * linux-ppc-low.c (ppc_relocate_instruction)
1183 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1184 (ppc_write_goto_address): Update.
1185 * linux-aarch64-low.c (append_insns): Update.
1186 * target.h (struct target_ops): Update.
1187 (write_inferior_memory): Don't declare.
1188 * target.c (target_write_memory): Rename from
1189 write_inferior_memory. Remove old target_write_memory.
1191 2019-08-15 Tom Tromey <tromey@adacore.com>
1193 * target.c (write_inferior_memory): Use std::vector.
1195 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1198 * configure.ac: Drop enable-libmcheck support.
1199 * configure, config.in: Rebuild.
1200 * acinclude.m4: Don't include it.
1202 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1204 * configure.srv: Remove Arm xml files.
1206 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1208 * configure.srv: Add new files. Remove xml generated files.
1209 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1211 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1212 * linux-aarch32-tdesc.c: New file.
1213 * linux-aarch32-tdesc.h: New file.
1214 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1215 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1216 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1217 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1218 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1219 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1220 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1221 (arm_read_description): Call arm_linux_read_description.
1222 (initialize_low_arch): Don't init registers.
1223 * linux-arm-tdesc.c: New file.
1224 * linux-arm-tdesc.h: New file.
1226 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1228 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1229 Move counter inside for.
1230 (arm_read_description): Check ptrace earlier.
1231 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1233 2019-07-09 Tom Tromey <tom@tromey.com>
1235 * configure: Rebuild.
1236 * configure.ac: Change common to gdbsupport.
1237 * acinclude.m4: Change common to gdbsupport.
1238 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1239 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1240 common to gdbsupport.
1241 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1242 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1243 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1244 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1245 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1246 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1247 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1248 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1249 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1250 common to gdbsupport.
1252 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1254 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1256 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1258 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1260 * configure.srv: Remove legacy xml.
1261 * linux-aarch64-low.c (initialize_low_arch): Remove
1262 initialize_low_tdesc call.
1263 * linux-aarch64-tdesc-selftest.c: Remove file.
1264 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1265 * linux-x86-low.c (initialize_low_arch): Remove
1266 initialize_low_tdesc call.
1267 * linux-x86-tdesc-selftest.c: Remove file.
1268 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1270 2019-06-20 Tom de Vries <tdevries@suse.de>
1272 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1273 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1275 2019-06-19 Tom de Vries <tdevries@suse.de>
1277 * debug.h (debug_write): Change return type to ssize_t.
1278 * debug.c (debug_write): Same.
1280 2019-06-14 Tom Tromey <tom@tromey.com>
1282 * configure.ac: Use new path to gnulib.
1283 * configure: Rebuild.
1284 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1287 2019-06-11 Tom Tromey <tom@tromey.com>
1289 * Makefile.in (SFILES): Add alloc.c.
1291 (IPA_OBJS): Add alloc-ipa.o.
1292 (alloc-ipa.o): New target.
1293 (%.o: ../%.c): New pattern rule.
1295 2019-06-10 Tom Tromey <tromey@adacore.com>
1297 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1298 end warning with a newline.
1299 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1301 * thread-db.c (attach_thread): Don't end warning with a newline.
1302 (thread_db_notice_clone): Likewise.
1303 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1305 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1306 end warning with a newline.
1308 2019-06-04 Pedro Alves <palves@redhat.com>
1310 * server.c (captured_main): Use make_unique_xstrdup.
1312 2019-06-02 Tom Tromey <tom@tromey.com>
1314 * gdbreplay.c (fromhex): Remove.
1315 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1317 2019-05-29 Tom Tromey <tromey@adacore.com>
1319 * configure: Rebuild.
1321 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1323 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1324 sign extension code on 32-bit builds.
1326 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1329 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1331 2019-04-19 Tom Tromey <tom@tromey.com>
1333 * server.c (struct vstop_notif): Derive from notif_event.
1335 (queue_stop_reply): Update.
1336 (remove_all_on_match_ptid): Change type. Rewrite.
1337 (discard_queued_stop_replies): Rewrite.
1338 (in_queued_stop_replies_ptid): Change type.
1339 (in_queued_stop_replies): Rewrite.
1340 (notif_stop): Update.
1341 (queue_stop_reply_callback): Update.
1342 (captured_main): Don't call initialize_notif.
1343 (push_stop_notification): Update.
1344 * notif.c (notif_write_event, handle_notif_ack)
1345 (notif_event_enque, notif_push): Update.
1346 (notif_event_xfree, initialize_notif): Remove.
1347 * notif.h (struct notif_event): Include <list>, not
1349 (struct notif_server) <queue>: Now a std::list.
1350 (notif_event_p): Remove typedef.
1351 (initialize_notif): Don't declare.
1352 (struct notif_event): Add virtual destructor.
1354 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1356 * ax.c (ax_vdebug): Call debug_printf.
1357 * debug.c (debug_write): New function.
1358 * debug.h (debug_write): New declaration.
1359 * linux-low.c (sigchld_handler): Call debug_write.
1361 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1363 * debug.c (debug_set_output): New function.
1364 (debug_vprintf): Send output to debug_file.
1365 (debug_flush): Likewise.
1366 * debug.h (debug_set_output): New declaration.
1367 * server.c (handle_monitor_command): Add debug-file option.
1368 (captured_main): Likewise.
1370 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1372 * debug.c (remote_debug): Add definition.
1373 * debug.h (remote_debug): Add declaration.
1374 * hostio.c (remote_debug): Remove declaration.
1375 * remote-utils.c (struct ui_file): Likewise.
1376 (remote_debug): Likewise.
1377 * remote-utils.h (remote_debug): Likewise,
1378 * server.c (remote_debug): Remove definition.
1380 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1382 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1383 when using a 64-bit gdbserver.
1385 2019-04-09 Tom Tromey <tromey@adacore.com>
1387 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1389 2019-04-08 Tom Tromey <tom@tromey.com>
1391 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1393 (linux_resume_one_lwp): Likewise.
1395 2019-04-08 Tom Tromey <tom@tromey.com>
1397 * gdbreplay.c: Update.
1398 * linux-low.c: Update.
1401 2019-04-08 Tom Tromey <tom@tromey.com>
1403 * server.c: Use C++ exception handling.
1404 * linux-low.c: Use C++ exception handling.
1405 * gdbreplay.c: Use C++ exception handling.
1407 2019-04-08 Tom Tromey <tom@tromey.com>
1409 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1410 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1411 (captured_main, main): Update.
1412 * gdbreplay.c (main): Update.
1414 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1416 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1417 value in argument pointer, return 1 if the entry is found and 0
1418 otherwise. Move comment.
1419 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1420 * linux-low.h (linux_get_auxv): Declare.
1421 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1423 2019-04-05 Tom Tromey <tromey@adacore.com>
1425 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1428 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1430 * linux-low.c (AT_HWCAP2): Add define if not already included.
1432 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1434 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1435 (aarch64_arch_setup): Call linux_get_hwcap.
1436 * linux-arm-low.c (arm_get_hwcap): Remove function.
1437 (arm_read_description): Call linux_get_hwcap.
1438 * linux-low.c (linux_get_auxv): New function.
1439 (linux_get_hwcap): Likewise.
1440 (linux_get_hwcap2): Likewise.
1441 * linux-low.h (linux_get_hwcap): New declaration.
1442 (linux_get_hwcap2): Likewise.
1443 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1444 (ppc_arch_setup): Call linux_get_hwcap.
1445 * linux-s390-low.c (s390_get_hwcap): Remove function.
1446 (s390_arch_setup): Call linux_get_hwcap.
1448 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1449 Jiong Wang <jiong.wang@arm.com>
1451 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1452 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1454 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1456 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1457 Jiong Wang <jiong.wang@arm.com>
1459 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1460 (aarch64_get_hwcap): New function.
1461 (aarch64_arch_setup): Read APIA hwcap.
1463 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1464 Jiong Wang <jiong.wang@arm.com>
1466 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1467 (initialize_low_tracepoint): Likewise.
1468 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1469 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1470 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1471 (aarch64_linux_read_description): Likewise.
1472 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1474 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1476 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1477 i386_create_target_description for 'segments' parameter.
1478 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1479 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1480 * win32-i386-low.c (i386_arch_setup): Likewise.
1482 2019-03-12 Tom Tromey <tromey@adacore.com>
1484 * linux-low.c (iterate_over_lwps): Update.
1486 2019-03-06 Tom Tromey <tom@tromey.com>
1488 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1489 (captured_main): Use SCOPE_EXIT.
1491 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1493 * configure.srv: Use '$enable_unittest' instead of '$development'
1494 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1497 2019-02-27 Tom Tromey <tromey@adacore.com>
1499 * gdbreplay.c (logchar): Handle \r\n.
1501 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1503 * linux-low.c (linux_attach): Add process before lwp.
1504 * server.c (attach_inferior): Check if already attached.
1506 2019-02-07 Tom Tromey <tom@tromey.com>
1508 * x86-tdesc.h: Rename include guard.
1509 * x86-low.h: Add include guard.
1510 * wincecompat.h: Rename include guard.
1511 * win32-low.h: Add include guard.
1512 * utils.h: Rename include guard.
1513 * tracepoint.h: Rename include guard.
1514 * tdesc.h: Rename include guard.
1515 * target.h: Rename include guard.
1516 * server.h: Rename include guard.
1517 * remote-utils.h: Rename include guard.
1518 * regcache.h: Rename include guard.
1519 * nto-low.h: Rename include guard.
1520 * notif.h: Add include guard.
1521 * mem-break.h: Rename include guard.
1522 * lynx-low.h: Add include guard.
1523 * linux-x86-tdesc.h: Add include guard.
1524 * linux-s390-tdesc.h: Add include guard.
1525 * linux-ppc-tdesc-init.h: Add include guard.
1526 * linux-low.h: Add include guard.
1527 * linux-aarch64-tdesc.h: Add include guard.
1528 * linux-aarch32-low.h: Add include guard.
1529 * inferiors.h: Rename include guard.
1530 * i387-fp.h: Rename include guard.
1531 * hostio.h: Rename include guard.
1532 * gdbthread.h: Rename include guard.
1533 * gdb_proc_service.h: Rename include guard.
1534 * event-loop.h: Rename include guard.
1535 * dll.h: Rename include guard.
1536 * debug.h: Rename include guard.
1537 * ax.h: Rename include guard.
1539 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1542 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1543 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1545 2019-01-25 Tom Tromey <tom@tromey.com>
1547 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1549 2019-01-25 Tom Tromey <tom@tromey.com>
1551 * win32-low.c: Fix common/ includes.
1552 * win32-i386-low.c: Fix common/ includes.
1553 * tracepoint.c: Fix common/ includes.
1554 * thread-db.c: Fix common/ includes.
1555 * target.h: Fix common/ includes.
1556 * symbol.c: Fix common/ includes.
1557 * spu-low.c: Fix common/ includes.
1558 * server.h: Fix common/ includes.
1559 * server.c: Fix common/ includes.
1560 * remote-utils.c: Fix common/ includes.
1561 * regcache.h: Fix common/ includes.
1562 * regcache.c: Fix common/ includes.
1563 * nto-x86-low.c: Fix common/ includes.
1564 * notif.h: Fix common/ includes.
1565 * mem-break.h: Fix common/ includes.
1566 * lynx-low.c: Fix common/ includes.
1567 * lynx-i386-low.c: Fix common/ includes.
1568 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1569 * linux-x86-low.c: Fix common/ includes.
1570 * linux-low.c: Fix common/ includes.
1571 * inferiors.h: Fix common/ includes.
1572 * i387-fp.c: Fix common/ includes.
1573 * hostio.c: Fix common/ includes.
1574 * hostio-errno.c: Fix common/ includes.
1575 * gdbthread.h: Fix common/ includes.
1576 * gdbreplay.c: Fix common/ includes.
1577 * fork-child.c: Fix common/ includes.
1578 * event-loop.c: Fix common/ includes.
1580 (enum gdb_agent_op): Fix common/ includes.
1582 2019-01-21 Tom Tromey <tom@tromey.com>
1584 * tracepoint.c: Fix includes.
1585 * remote-utils.c: Fix includes.
1586 * linux-x86-low.c: Fix includes.
1588 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1590 * gdbreplay.c (gdbreplay_version): Update copyright year in
1592 * server.c (gdbserver_version): Likewise.
1594 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1596 * linux-low.c (add_lwp): Switch ordering.
1598 2018-11-29 Tom Tromey <tom@tromey.com>
1600 * win32-low.c (win32_join): Take pid, not process.
1601 * target.h (struct target_ops) <join>: Change argument type.
1602 (join_inferior): Change argument name.
1603 * spu-low.c (spu_join): Take pid, not process.
1604 * server.c (handle_detach): Preserve pid before destroying
1606 * lynx-low.c (lynx_join): Take pid, not process.
1607 * linux-low.c (linux_join): Take pid, not process.
1609 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1611 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1612 (aarch64_cannot_fetch_register): Likewise.
1613 (struct linux_target_ops): Update references.
1615 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1617 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1619 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1621 * configure.srv (ipa_ppc_linux_regobj): Add
1622 powerpc-isa207-htm-vsx32l-ipa.o and
1623 powerpc-isa207-htm-vsx64l-ipa.o.
1624 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1625 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1626 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1627 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1628 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1629 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1630 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1631 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1632 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1633 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1634 (init_registers_powerpc_isa207_htm_vsx32l)
1635 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1636 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1637 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1638 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1639 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1640 (ppc_store_tm_ctarregset): New functions.
1641 (ppc_regsets): Add entries for HTM regsets.
1642 (ppc_arch_setup): Set htm in features struct when needed. Set
1643 sizes for the HTM regsets.
1644 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1645 (initialize_low_arch): Call
1646 init_registers_powerpc_isa207_htm_vsx32l and
1647 init_registers_powerpc_isa207_htm_vsx64l.
1648 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1649 PPC_TDESC_ISA207_HTM_VSX.
1650 (initialize_low_tracepoint): Call
1651 init_registers_powerpc_isa207_htm_vsx32l and
1652 init_registers_powerpc_isa207_htm_vsx64l.
1654 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1656 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1657 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1658 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1659 (ppc_store_pmuregset): New functions.
1660 (ppc_regsets): Add entries for ebb and pmu regsets.
1661 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1662 pmu regsets are available. Set sizes for these regsets.
1664 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1666 * configure.srv (ipa_ppc_linux_regobj): Add
1667 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1668 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1669 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1670 rs6000/powerpc-isa207-vsx32l.xml, and
1671 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1672 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1673 <PPC_TDESC_ISA207_VSX>: New enum value.
1674 (init_registers_powerpc_isa207_vsx32l): Declare.
1675 (init_registers_powerpc_isa207_vsx64l): Declare.
1676 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1677 (ppc_store_tarregset): New function.
1678 (ppc_regsets): Add entry for the TAR regset.
1679 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1680 size for the TAR regsets.
1681 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1682 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1683 and init_registers_powerpc_isa207_vsx64l.
1684 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1685 (initialize_low_tracepoint): Call
1686 init_registers_powerpc_isa207_vsx32l and
1687 init_registers_powerpc_isa207_vsx64l.
1689 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1690 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1692 * configure.srv (ipa_ppc_linux_regobj): Add
1693 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1694 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1695 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1696 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1697 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1698 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1699 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1700 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1701 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1702 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1703 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1704 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1705 (ppc_hwcap): Add comment.
1706 (ppc_hwcap2): New global.
1707 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1708 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1709 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1710 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1711 when needed. Set sizes for the the DSCR and PPR regsets.
1712 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1713 (initialize_low_arch): Call
1714 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1715 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1716 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1717 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1718 (initialize_low_tracepoint): Call
1719 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1720 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1722 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1724 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1726 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1727 Simon Marchi <simark@simark.ca>
1729 * acinclude.m4: Include "../selftest.m4".
1730 * configure: Regenerate.
1731 * configure.ac: Use "GDB_AC_SELFTEST".
1732 * configure.srv: Use "$enable_unittests" instead of
1733 "$development" when checking whether unit tests have been
1735 * server.c (captured_main): Update message informing that
1736 selftests have been disabled.
1738 2018-10-04 Tom Tromey <tom@tromey.com>
1740 * configure: Rebuild.
1742 2018-10-04 Tom Tromey <tom@tromey.com>
1744 * server.c (handle_status): Rename inner "thread".
1745 (process_serial_event): Declare "res" in 'm' case.
1746 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1747 (iterate_over_lwps): Rename inner "thread".
1748 (linux_qxfer_libraries_svr4): Rename inner "len".
1749 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1751 2018-10-01 Gary Benson <gbenson@redhat.com>
1753 * gdb_proc_service.h: Moved common code to
1754 common/gdb_proc_service.h.
1756 2018-10-01 Gary Benson <gbenson@redhat.com>
1758 * gdb_proc_service.h: Synchronize comments and whitespace with
1759 GDB's version of this file.
1761 2018-09-25 Tom Tromey <tom@tromey.com>
1763 * configure: Rebuild.
1764 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1766 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1768 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1769 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1770 ($(IPA_LIB)): Sort IPA_OBJS.
1772 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1774 * Makefile.in: Remove references to $(ADD_DEPS).
1776 2018-09-16 Tom Tromey <tom@tromey.com>
1778 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1780 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1783 2018-09-05 Tom Tromey <tom@tromey.com>
1785 * configure: Rebuild.
1787 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1790 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1792 2018-08-27 Tom Tromey <tom@tromey.com>
1795 * configure: Rebuild.
1797 2018-08-27 Tom Tromey <tom@tromey.com>
1799 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1800 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1801 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1802 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1803 (s390x_emit_stack_adjust): Add casts to unsigned char.
1805 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1809 * server.h (struct client_state) <disable_randomization>:
1812 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1814 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1816 (mips_supply_ptrace_register): Likewise.
1818 2018-07-22 Tom Tromey <tom@tromey.com>
1820 * configure: Rebuild.
1822 2018-07-22 Tom Tromey <tom@tromey.com>
1824 * win32-low.c (win32_create_inferior): Remove unused variables.
1825 * gdbreplay.c (remote_open): Remove unused variable.
1826 * remote-utils.c (remote_prepare): Remove unused variable.
1827 * x86-tdesc.h (X86_TDESC_H): Define.
1828 (amd64_expedite_regs): Define conditionally.
1829 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1830 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1831 * remote-utils.c (readchar): Remove unused variable.
1833 2018-07-13 Pedro Alves <palves@redhat.com>
1835 * linux-low.c (linux_kill): Change parameter to process_info
1836 pointer instead of pid. Adjust.
1837 * lynx-low.c (lynx_kill): Likewise.
1838 * nto-low.c (nto_kill): Likewise.
1839 * spu-low.c (spu_kill): Likewise.
1840 * win32-low.c (win32_kill): Likewise.
1841 * server.c (handle_v_kill, kill_inferior_callback)
1842 (detach_or_kill_for_exit): Adjust.
1843 * target.c (kill_inferior): Change parameter to process_info
1844 pointer instead of pid. Adjust.
1845 * target.h (struct target_ops) <kill>: Change parameter to
1846 process_info pointer instead of pid. Adjust all implementations
1848 (kill_inferior): Likewise.
1850 2018-07-13 Pedro Alves <palves@redhat.com>
1852 * linux-low.c (linux_detach, linux_join): Change parameter to
1853 process_info pointer instead of pid. Adjust.
1854 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1855 * nto-low.c (nto_detach): Likewise.
1856 * spu-low.c (spu_detach, spu_join): Likewise.
1857 * win32-low.c (win32_detach, win32_join): Likewise.
1858 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1859 * target.h (struct target_ops) <detach, join>: Change parameter to
1860 process_info pointer instead of pid. Adjust all implementations
1862 (detach_inferior, join_inferior): Rename 'pid' parameter to
1865 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1866 Jan Kratochvil <jan.kratochvil@redhat.com>
1867 Paul Fertser <fercerpav@gmail.com>
1868 Tsutomu Seki <sekiriki@gmail.com>
1870 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1871 (OBS): Add 'common/netstuff.o'.
1872 (GDBREPLAY_OBS): Likewise.
1873 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1874 (remote_open): Implement support for IPv6
1876 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1878 (handle_accept_event): Accept connections from IPv6 sources.
1879 (remote_prepare): Handle IPv6-style hostnames; implement
1880 support for IPv6 connections.
1881 (remote_open): Implement support for printing connections from
1884 2018-07-11 Pedro Alves <palves@redhat.com>
1887 * mem-break.c (any_persistent_commands): Add process_info
1888 parameter and use it instead of relying on the current process.
1889 Change return type to bool.
1890 * mem-break.h (any_persistent_commands): Add process_info
1891 parameter and change return type to bool.
1892 * server.c (handle_detach): Remove require_running_or_return call.
1893 Look up the process_info for the process we're about to detach.
1894 If not found, return back error to GDB. Adjust
1895 any_persistent_commands call to pass down a process pointer.
1897 2018-07-11 Pedro Alves <palves@redhat.com>
1899 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1900 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1901 instead of collect_register_by_name.
1902 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1903 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1905 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1906 Pedro Alves <palves@redhat.com>
1908 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1910 2018-07-03 Tom Tromey <tom@tromey.com>
1912 * linux-low.c: Update.
1913 * lynx-low.c: Update.
1914 * mem-break.c: Update.
1915 * nto-low.c: Update.
1916 * remote-utils.c: Update.
1918 * spu-low.c: Update.
1920 * win32-low.c: Update.
1922 2018-07-03 Tom Tromey <tom@tromey.com>
1926 2018-07-03 Tom Tromey <tom@tromey.com>
1928 * linux-low.c: Update.
1930 2018-07-03 Tom Tromey <tom@tromey.com>
1934 2018-07-03 Tom Tromey <tom@tromey.com>
1936 * linux-low.c: Update.
1937 * linux-mips-low.c: Update.
1938 * lynx-low.c: Update.
1939 * nto-low.c: Update.
1940 * remote-utils.c: Update.
1942 * spu-low.c: Update.
1944 * thread-db.c: Update.
1946 2018-07-03 Tom Tromey <tom@tromey.com>
1948 * linux-low.c: Update.
1949 * linux-mips-low.c: Update.
1950 * lynx-low.c: Update.
1951 * mem-break.c: Update.
1952 * nto-low.c: Update.
1953 * remote-utils.c: Update.
1955 * spu-low.c: Update.
1957 * tracepoint.c: Update.
1959 2018-07-03 Tom Tromey <tom@tromey.com>
1961 * linux-low.c: Update.
1962 * linux-ppc-low.c: Update.
1963 * linux-x86-low.c: Update.
1964 * proc-service.c: Update.
1966 * spu-low.c: Update.
1967 * thread-db.c: Update.
1968 * win32-low.c: Update.
1970 2018-07-03 Tom Tromey <tom@tromey.com>
1972 * linux-low.c: Update.
1973 * lynx-low.c: Update.
1974 * nto-low.c: Update.
1975 * remote-utils.c: Update.
1976 * spu-low.c: Update.
1977 * thread-db.c: Update.
1978 * win32-low.c: Update.
1980 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1982 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1983 parameter in call to 'amd64_create_target_description'.
1985 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1987 * x86-tdesc.h: Remove executable permission flag.
1989 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1991 * configure.ac: Remove AC_PREREQ, add missing quoting.
1992 * configure: Re-generate.
1993 * config.in: Re-generate.
1994 * aclocal.m4: Re-generate.
1996 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1998 * tracepoint.h (current_traceframe): Remove declaration.
2000 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2002 * linux-aarch64-low.c (is_sve_tdesc): New function.
2003 (aarch64_sve_regs_copy_to_regcache): Likewise.
2004 (aarch64_sve_regs_copy_from_regcache): Likewise.
2005 (aarch64_regs_info): Add SVE checks.
2006 (initialize_low_arch): Initialize SVE.
2008 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2010 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2012 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2014 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2015 (initialize_low_tracepoint): Likewise
2016 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2017 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2019 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2021 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2023 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2025 * server.h (PBUFSIZ): Increase size
2027 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2029 * regcache.c (regcache::raw_compare): New function.
2030 * regcache.h (regcache::raw_compare): New declaration.
2032 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2034 * regcache.c (new_register_cache): Use new.
2035 (free_register_cache): Use delete.
2036 (register_data): Use const.
2037 (supply_register): Move body inside regcache.
2038 (regcache::raw_supply): New override function.
2039 (collect_register): Move body inside regcache.
2040 (regcache::raw_collect): New override function.
2041 (regcache::get_register_status): New override function.
2042 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2044 2018-06-09 Tom Tromey <tom@tromey.com>
2046 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2048 (event_queue): Use std::queue.
2049 (gdb_event_xfree): Remove.
2050 (initialize_event_loop, process_event, wait_for_event): Update.
2052 2018-06-08 Stan Cox <scox@redhat.com>
2054 * win32-low.c (win32_create_inferior): last_ptid and last_status
2055 moved to client_state.
2057 2018-06-08 Pedro Alves <palves@redhat.com>
2059 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2060 common/common-exceptions.o, common/common-utils.o,
2061 common/errors.o, common/print-utils.o and utils.o.
2062 * gdbreplay.c: Include "common-defs.h" instead of the two
2063 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2064 string.h or alloca.h.
2065 (perror_with_name): Delete.
2066 (remote_open): Use xstrdup instead of strdup.
2067 (main): Rename to ...
2068 (captured_main): ... this.
2071 2018-06-08 Tom Tromey <tom@tromey.com>
2073 * linux-low.c (linux_low_read_btrace): Update.
2075 2018-06-04 Stan Cox <scox@redhat.com>
2077 * server.h (struct client_state): New.
2078 * server.c (cont_thread, general_thread, multi_process)
2079 (report_fork_events, report_vfork_events, report_exec_events)
2080 (report_thread_events, swbreak_feature, hwbreak_feature)
2081 (vCont_supported, disable_randomization, pass_signals)
2082 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2083 Moved to client_state.
2084 * remote-utils.c (remote_debug, noack_mode)
2085 (transport_is_reliable): Moved to client_state.
2086 * tracepoint.c (current_traceframe): Moved to client_state.
2089 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2090 linux-low.c, remote-utils.h, target.c: Use client_state.
2092 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2094 * configure.srv: Add new c/h file.
2096 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2098 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2101 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2103 * gdb.arch/mips-fpregset-core.exp: New test.
2104 * gdb.arch/mips-fpregset-core.c: New test source.
2106 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2109 * hostio.c (require_int): Do not report overflow for integers
2110 between 0xfffffff and 0x7fffffff.
2112 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2114 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2115 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2116 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2118 (the_low_target): Wire them.
2120 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2122 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2123 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2124 mode. Call collect_register_by_name with vscr using
2125 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2126 (ppc_store_vrregset): Add and set vscr_offset variable as in
2127 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2130 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2132 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2133 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2134 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2136 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2138 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2139 (ppc_store_vsxregset): Likewise.
2140 (ppc_fill_vrregset): Likewise.
2141 (ppc_store_vrregset): Likewise.
2142 (ppc_fill_evrregset): Likewise.
2143 (ppc_store_evrregset): Likewise.
2144 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2145 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2148 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2150 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2151 wordsize of the inferior. Call ppc_linux_target_wordsize.
2153 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2155 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2156 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2157 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2158 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2159 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2160 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2161 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2162 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2163 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2164 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2165 (tdesc_powerpc_e500l): Remove.
2166 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2167 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2168 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2169 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2171 (ppc_arch_setup): Remove target description matching code. Fill a
2172 ppc_linux_features struct and call ppc_linux_match_description
2175 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2177 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2178 width of the requested register exceeds the width of the
2180 (mips_cannot_store_register): Likewise.
2182 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2184 * linux-mips-low.c (mips_fetch_register): New function. Update
2186 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2187 (the_low_target): Wire `mips_fetch_register'.
2189 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2191 * lynx-i386-low.c (LYNXOS_178): New macro.
2192 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2193 the layout on LynxOS-178.
2194 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2195 handle floating point registers that are not supported by
2198 2018-05-10 Tom Tromey <tom@tromey.com>
2200 * configure: Rebuild.
2202 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2205 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2206 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2207 Use it to set the expedite_regs field in the given tdesc.
2208 * x86-tdesc.h: New file.
2209 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2210 Adjust following the addition of the new expedite_regs parameter
2211 to init_target_desc.
2212 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2213 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2214 (i386_linux_read_description, amd64_linux_read_description):
2215 Adjust following the addition of the new expedite_regs parameter
2216 to init_target_desc.
2217 * lynx-i386-low.c: #include "x86-tdesc.h".
2218 (lynx_i386_arch_setup): Adjust following the addition of the new
2219 expedite_regs parameter to init_target_desc.
2220 * nto-x86-low.c: #include "x86-tdesc.h".
2221 (nto_x86_arch_setup): Adjust following the addition of the new
2222 expedite_regs parameter to init_target_desc.
2223 * win32-i386-low.c: #include "x86-tdesc.h".
2224 (i386_arch_setup): Adjust following the addition of the new
2225 expedite_regs parameter to init_target_desc.
2227 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2230 * win32-low.c (win32_create_inferior): Add call to my_wait
2231 setting last_status global.
2233 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2236 * win32-low.c (create_process): Only call gdb_tilde_expand if
2237 inferior_cwd is not NULL.
2239 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2241 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2242 registers to the cache if their values have changed.
2243 (i387_xsave_to_cache): Provide default values for x87 control
2244 registers when these features are available, but disabled.
2245 * regcache.c (supply_register_by_name_zeroed): New function.
2246 * regcache.h (supply_register_by_name_zeroed): Declare new
2249 2018-05-07 Tom Tromey <tom@tromey.com>
2251 * configure: Rebuild.
2253 2018-05-04 Tom Tromey <tom@tromey.com>
2255 * configure: Rebuild.
2257 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2258 Pedro Alves <palves@redhat.com>
2260 * linux-aarch64-low.c (aarch64_stopped_data_address):
2263 2018-04-27 Tom Tromey <tom@tromey.com>
2265 * configure: Rebuild.
2267 2018-04-23 Tom Tromey <tom@tromey.com>
2269 * configure: Rebuild.
2271 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2273 * Makefile.in (depcomp): Add "..".
2274 (all_deps_files): New and use it.
2276 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2278 * configure.srv (aarch64*-*-linux*): Don't include xml.
2279 (i[34567]86-*-cygwin*): Likewise.
2280 (i[34567]86-*-linux*): Likewise.
2281 (i[34567]86-*-lynxos*): Likewise.
2282 (i[34567]86-*-mingw32ce*): Likewise.
2283 (i[34567]86-*-mingw*): Likewise.
2284 (i[34567]86-*-nto*): Likewise.
2285 (tic6x-*-uclinux): Likewise.
2286 (x86_64-*-linux*): Likewise.
2287 (x86_64-*-mingw*): Likewise.
2288 (x86_64-*-cygwin*): Likewise.
2290 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2292 * tdesc.c: Remove xml parameter.
2294 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2296 * server.c (get_features_xml): Remove cast.
2297 * tdesc.c (void target_desc::accept): Fill in function.
2298 (tdesc_get_features_xml): Remove old xml creation.
2299 (print_xml_feature::visit_pre): Add xml vistor.
2300 * tdesc.h (struct target_desc): Make xmltarget mutable.
2301 (tdesc_get_features_xml): Remove declaration.
2303 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2305 * tdesc.c (tdesc_architecture_name): Add new function.
2306 (tdesc_osabi_name): Likewise.
2307 (tdesc_get_features_xml): Use new functions.
2309 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2311 * tdesc.c (tdesc_create_flags): Remove.
2312 (tdesc_add_flag): Likewise.
2313 (tdesc_named_type): Likewise.
2314 (tdesc_create_union): Likewise.
2315 (tdesc_create_struct): Likewise.
2316 (tdesc_create_vector): Likewise.
2317 (tdesc_add_bitfield): Likewise.
2318 (tdesc_add_field): Likewise.
2319 (tdesc_set_struct_size): Likewise.
2321 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2323 * tdesc.c (~target_desc): Remove implictly deleted items.
2324 (init_target_desc): Iterate all features.
2325 (tdesc_get_features_xml): Use vector.
2326 (tdesc_create_feature): Create feature.
2327 * tdesc.h (tdesc_feature) Remove
2328 (target_desc): Add features.
2330 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2332 * Makefile.in: Add common/tdesc.c
2333 * tdesc.c (init_target_desc): init all reg_defs from register
2335 (tdesc_create_reg): Create tdesc_reg.
2336 * tdesc.h (tdesc_feature): Add register vector.
2338 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2340 * tdesc.h (struct target_desc) <features>: Change type to
2341 std::vector<std::string>.
2342 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2344 (tdesc_get_features_xml): Likewise.
2345 (tdesc_create_feature): Likewise.
2347 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2349 * regcache.c (find_register_by_number): Return a ref.
2350 (find_regno): Use references.
2351 (register_size): Likewise.
2352 (register_data): Likewise.
2353 * tdesc.c (target_desc::~target_desc): Remove free calls.
2354 (target_desc::operator==): Use std::vector compare.
2355 (init_target_desc): Use reference.
2356 (tdesc_create_reg): Use reg constructors.
2357 * tdesc.h (struct target_desc): Replace pointer with object.
2359 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2361 * regcache.c (find_register_by_number): Make static.
2362 (find_regno): Use find_register_by_number
2363 * regcache.h (struct reg): Remove declaration.
2365 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2367 * tdesc.c (target_desc::~target_desc): Move to here.
2368 (target_desc::operator==): Likewise.
2369 * tdesc.h (target_desc::~target_desc): Move from here.
2370 (target_desc::operator==): Likewise.
2372 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2374 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2376 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2378 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2380 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2381 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2382 and init_registers_s390_gs_linux64.
2384 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2386 * linux-s390-low.c (s390_fill_gs): Remove function.
2387 (s390_fill_gsbc): Remove function.
2388 (s390_regsets): Set fill functions for the guarded storage regsets
2391 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2393 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2394 the word size. Add comment.
2395 (s390_get_wordsize): New function.
2396 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2397 pswm with it. Instead, use s390_get_wordsize to determine the
2398 word size first and derive the correct tdesc from that directly.
2400 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2402 * Makefile.in: Include silent-rules.mk.
2403 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2404 (COMPILE): Add ECHO_CXX.
2405 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2406 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2407 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2408 (version-generated.c): Add ECHO_GEN.
2409 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2410 (IPAGENT_COMPILE): Add ECHO_CXX.
2411 (%-generated.c): Add ECHO_REGDAT.
2413 2018-03-14 Tom Tromey <tom@tromey.com>
2416 * ax.c (ax_printf): Special case for NULL.
2418 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2420 * linux-low.c (linux_qxfer_libraries_svr4): Use
2421 xml_escape_text_append.
2423 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2425 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2427 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2429 * server.c (handle_general_set): Remove unnecessary xstrdup.
2431 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2433 * server.c (parse_debug_format_options): Adjust to
2434 delim_string_to_char_ptr_vec changes.
2435 * thread-db.c (thread_db_load_search): Adjust to
2436 dirnames_to_char_ptr_vec changes.
2438 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2440 * target.h (target_enable_btrace, target_disable_btrace)
2441 (target_read_btrace, target_read_btrace_conf): Turn macro into
2442 inline function. Throw error if target method is not defined.
2443 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2444 check for btrace target method. Be prepared to handle exceptions
2445 from btrace target methods.
2447 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2449 * server.c (captured_main): Change order of error message printed
2450 when the current working directory cannot be found.
2452 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2454 * server.c: Include "filenames.h" and "pathstuff.h".
2455 (program_name): Delete variable.
2456 (program_path): New anonymous class.
2457 (get_exec_wrapper): Use "program_path" instead of
2459 (handle_v_run): Likewise.
2460 (captured_main): Likewise.
2461 (process_serial_event): Likewise.
2463 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2465 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2466 (OBJS): Add "pathstuff.o".
2467 * server.c (current_directory): New global variable.
2468 (captured_main): Initialize "current_directory".
2470 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2472 * tdesc.c: Use common/tdesc.h.
2473 * tdesc.h: Likewise.
2475 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2476 Simon Marchi <simon.marchi@ericsson.com>
2478 * Makefile.in: Switch order of make rules.
2480 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2482 * Makefile.in: Add common directory in build.
2483 * configure.ac: Add common reference.
2484 * configure: Regenerate.
2486 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2488 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2489 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2490 * spu-low.c (spu_target_ops): Likewise.
2491 * win32-low.c (win32_target_ops): Likewise.
2492 * server.c (supported_btrace_packets): Report packets unconditionally.
2493 * target.h (target_ops) <supports_btrace>: Remove.
2494 (target_supports_btrace): Remove.
2496 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2498 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2499 (handle_btrace_disable): Change return type to void. Use exceptions
2501 (handle_btrace_general_set): Catch exception and copy message to
2504 2018-02-08 Tom Tromey <tom@tromey.com>
2506 * linux-low.c (install_software_single_step_breakpoints): Use
2507 make_scoped_restore.
2508 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2509 (do_restore_current_thread_cleanup): Remove.
2510 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2513 2018-02-08 Tom Tromey <tom@tromey.com>
2515 * mem-break.c (set_raw_breakpoint_at): Use
2516 gdb::unique_xmalloc_ptr.
2518 2018-01-30 Pedro Alves <palves@redhat.com>
2521 * target.c (target_terminal::terminal_state): Rename to ...
2522 (target_terminal::m_terminal_state): ... this.
2524 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2526 * linux-low.c (handle_extended_wait): Surround call to
2527 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2529 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2531 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2532 linux_ptrace_attach_fail_reason_string now returning an
2534 (linux_attach): Likewise.
2535 * thread-db.c (attach_thread): Likewise.
2537 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2540 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2541 checking for fs_base/gs_base fields in struct user_regs_struct.
2542 * configure: Regenerate.
2544 2018-01-16 Yao Qi <yao.qi@linaro.org>
2547 * linux-low.c (fetch_register): Call supply_register instead of
2550 2018-01-08 Yao Qi <yao.qi@linaro.org>
2551 Simon Marchi <simon.marchi@ericsson.com>
2553 * Makefile.in (OBS): Remove selftest.o.
2554 * configure.ac: Set srv_selftest_objs if $development is true.
2555 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2556 * configure: Re-generated.
2557 * server.c (captured_main): Wrap variable selftest_filter with
2560 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2562 * server.c (parse_debug_format_options): Return std::string.
2563 (handle_monitor_command, captured_main): Adjust.
2565 2018-01-05 Pedro Alves <palves@redhat.com>
2568 * server.c (captured_main): Pass quiet=false to
2569 save_original_signals_state.
2571 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2573 * gdbreplay.c (gdbreplay_version): Update copyright year in
2575 * server.c (gdbserver_version): Likewise.
2577 2017-12-08 Tom Tromey <tom@tromey.com>
2579 * ax.c (ax_printf): Update.
2581 2017-12-07 Yao Qi <yao.qi@linaro.org>
2583 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2584 aarch64_linux_read_description.
2585 * linux-amd64-ipa.c (idx2mask): New array.
2586 (get_ipa_tdesc): Move idx2mask out.
2587 (initialize_low_tracepoint): Initialize target descriptions.
2588 * linux-i386-ipa.c (idx2mask): New array.
2589 (get_ipa_tdesc): Move idx2mask out.
2590 (initialize_low_tracepoint): Initialize target descriptions.
2592 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2594 * tdesc.c (struct tdesc_type): Change return type.
2595 (tdesc_add_flag): Change parameter type.
2596 (tdesc_add_bitfield): Likewise.
2597 (tdesc_add_field): Likewise.
2598 (tdesc_set_struct_size): Likewise.
2600 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2602 * regcache.c (registers_to_string): Remove unused variable.
2604 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2606 * inferiors.c (for_each_inferior_with_data): Remove.
2607 * inferiors.h (for_each_inferior_with_data): Remove.
2608 * server.c (handle_qxfer_threads_worker): Change parameter type.
2609 (handle_qxfer_threads_proper): Use for_each_thread.
2611 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2613 * inferiors.c (for_each_inferior): Remove.
2614 (clear_inferiors): Use for_each_thread.
2615 * inferiors.h (for_each_inferior): Remove.
2616 * linux-low.c (linux_wait_for_event_filtered): Use
2618 (linux_stabilize_threads): Likewise.
2619 * regcache.c (regcache_release): Likewise.
2620 * server.c (gdb_wants_all_threads_stopped): Likewise.
2621 (clear_pending_status_callback): Remove.
2622 (handle_status): Use for_each_thread.
2623 (captured_main): Likewise.
2624 * win32-low.c (child_init_thread_list): Likewise.
2625 (win32_clear_inferiors): Likewise.
2626 (fake_breakpoint_event): Likewise.
2628 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2630 * inferiors.h (find_inferior): Remove.
2631 * inferiors.c (find_inferior): Remove.
2633 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2635 * linux-low.c (resume_status_pending_p): Update comment.
2636 (need_step_over_p): Update comment.
2638 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2640 * linux-low.c (proceed_one_lwp): Return void, change parameter
2642 (unsuspend_and_proceed_one_lwp): Likewise.
2643 (proceed_all_lwps): Use for_each_thread.
2644 (unstop_all_lwps): Likewise.
2646 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2648 * linux-low.c (linux_resume_one_thread): Return void, take
2650 (linux_resume): Use for_each_thread.
2652 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2654 * linux-low.c (send_sigstop_callback): Return void, change
2655 parameter type. Rename to...
2656 (send_sigstop): ... this.
2657 (suspend_and_send_sigstop_callback): Return void, change parameter
2659 (suspend_and_send_sigstop): ... this.
2660 (stop_all_lwps): Use for_each_thread.
2662 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2664 * linux-low.c (lwp_running): Return bool, remove unused
2666 (linux_stabilize_threads): Use find_thread.
2668 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2670 * linux-low.c (select_singlestep_lwp_callback): Remove.
2671 (count_events_callback): Remove.
2672 (select_event_lwp_callback): Remove.
2673 (select_event_lwp): Use find_thread/for_each_thread.
2675 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2677 * linux-low.c (not_stopped_callback): Return bool, take filter
2679 (linux_wait_for_event_filtered): Use find_thread.
2680 (linux_wait_1): Likewise.
2682 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2684 * linux-low.c (same_lwp): Remove.
2685 (find_lwp_pid): Use find_thread.
2687 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2689 * linux-low.c (delete_lwp_callback): Remove.
2690 (linux_mourn): Use for_each_thread.
2692 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2694 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2695 args parameter, don't check for pid.
2696 (linux_detach): Use for_each_thread.
2698 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2700 * linux-low.c (struct counter): Remove.
2701 (second_thread_of_pid_p): Remove.
2702 (last_thread_of_process_p): Use find_thread.
2704 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2706 * inferiors.c (find_inferior_in_random): Remove.
2707 * inferiors.h (find_inferior_in_random): Remove.
2708 * linux-low.c (status_pending_p_callback): Return bool, accept
2709 parameter ptid directly.
2710 (linux_wait_for_event_filtered): Use find_thread_in_random.
2711 (linux_wait_1): Likewise.
2713 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2715 * inferiors.c (find_inferior_id): Remove.
2716 (find_thread_ptid): Move implemention from find_inferior_id to
2718 * inferiors.h (find_inferior_id): Remove.
2719 * server.c (handle_status): Use find_thread_ptid.
2720 (process_serial_event): Likewise.
2721 * thread-db.c (find_one_thread): Likewise.
2722 (thread_db_thread_handle): Likewise.
2723 * win32-low.c (thread_rec): Likewise.
2724 (child_delete_thread): Likewise.
2725 (win32_thread_alive): Likewise.
2726 (get_child_debug_event): Likewise.
2728 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2730 * linux-mips-low.c (update_watch_registers_callback): Return
2731 void, remove pid_p parameter, don't check for pid.
2732 (mips_insert_point, mips_remove_point): Use for_each_thread.
2734 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2736 * lynx.low (lynx_delete_thread_callback): Remove.
2737 (lynx_mourn): Use for_each_thread.
2739 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2741 * regcache.c (regcache_invalidate_one): Remove.
2742 (regcache_invalidate_pid): use for_each_thread.
2744 2017-11-26 Tom Tromey <tom@tromey.com>
2746 * linux-low.c (linux_create_inferior): Update.
2748 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2750 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2752 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2754 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2755 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2756 * linux-aarch64-tdesc-selftest.c: New file.
2757 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2759 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2761 * configure.srv: Add new file.
2762 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2763 * linux-aarch64-tdesc-selftest.c: New file.
2764 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2766 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2768 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2769 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2770 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2772 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2774 * configure.srv: Add new files.
2775 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2776 aarch64_linux_read_description.
2777 * linux-aarch64-low.c (aarch64_linux_read_description):
2778 Merge with aarch64_arch_setup.
2779 (aarch64_arch_setup): Call aarch64_linux_read_description.
2780 * linux-aarch64-tdesc.c: New file.
2781 * linux-aarch64-tdesc.h: New file.
2783 2017-11-24 Yao Qi <yao.qi@linaro.org>
2785 * configure.srv: Set $srv_regobj for tic6x-linux.
2786 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2787 (tic6x_read_description): Move some code to tic6x_arch_setup.
2788 (tic6x_tdesc_test): New function.
2789 (initialize_low_arch): Call selftests::register_test.
2791 2017-11-22 Yao Qi <yao.qi@linaro.org>
2793 * remote-utils.c (prepare_resume_reply): Use memcpy.
2795 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2797 * linux-low.c (kill_one_lwp_callback): Return void, take
2798 argument directly, don't filter on pid.
2799 (linux_kill): Use for_each_thread.
2801 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2803 * linux-low.c (need_step_over_p): Return bool, remove dummy
2805 (linux_resume, proceed_all_lwps): Use find_thread.
2807 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2809 * linux-low.c (resume_status_pending_p): Return bool, remove
2811 (linux_resume): Use find_thread.
2813 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2815 * linux-low.c (struct thread_resume_array): Remove.
2816 (linux_set_resume_request): Return void, take arguments
2818 (linux_resume): Use for_each_thread.
2820 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2822 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2823 return bool, remove data argument.
2824 (linux_stabilize_threads): Use find_thread.
2826 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2828 * linux-low.c (unsuspend_one_lwp): Remove.
2829 (unsuspend_all_lwps): Use for_each_thread, inline code from
2832 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2834 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2835 * linux-low.c (struct iterate_over_lwps_args): Remove.
2836 (iterate_over_lwps_filter): Remove.
2837 (iterate_over_lwps): Use find_thread.
2839 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2841 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2842 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2843 code from reset_lwp_ptrace_options_callback.
2845 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2847 * linux-arm-low.c (struct update_registers_data): Remove.
2848 (update_registers_callback): Return void, take arguments
2849 directly, don't check thread's pid.
2850 (arm_insert_point, arm_remove_point): Use for_each_thread.
2852 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2854 * win32-low.c (continue_one_thread): Return void, take argument
2856 (child_continue): Use for_each_thread.
2858 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2860 * win32-i386-low.c (update_debug_registers_callback): Rename
2862 (update_debug_registers): ... this, return void, remove pid_p arg.
2863 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2865 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2867 * inferiors.h (struct process_info): Add constructor, initialize
2869 <syscalls_to_catch>: Change type to std::vector<int>.
2870 * inferiors.c (add_process): Allocate process_info with new.
2871 (remove_process): Free process_info with delete.
2872 * linux-low.c (handle_extended_wait): Adjust.
2873 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2874 * server.c (handle_general_set): Adjust.
2876 2017-11-16 Pedro Alves <palves@redhat.com>
2878 * remote-utils.c (remote_close): Block SIGIO signals instead of
2879 uninstalling the SIGIO handler.
2881 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2883 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2885 2017-11-16 Yao Qi <yao.qi@linaro.org>
2887 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2888 (tic6x_store_gregset): Likewise.
2889 (tic6x_usrregs_info): Move it up.
2891 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2893 * Makefile.in: Update arch rules.
2894 * configure.srv: Explicitly mark arch/ files.
2896 2017-11-13 Andreas Schwab <schwab@suse.de>
2898 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2900 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2902 2017-11-06 Pedro Alves <palves@redhat.com>
2904 * config.in, configure: Regenerate.
2906 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2908 * target.c (struct thread_search): Remove.
2909 (thread_search_callback): Remove.
2910 (prepare_to_access_memory): Use for_each_thread instead of
2911 find_inferior. Inline code from thread_search_callback.
2913 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2915 * server.c (struct visit_actioned_threads_data): Remove.
2916 (visit_actioned_threads): Change prototype to take arguments
2918 (resume): Use find_thread instead of find_inferior.
2920 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2922 * server.c (queue_stop_reply_callback): Change prototype, return
2924 (find_status_pending_thread_callback): Remove.
2925 (handle_status): Replace find_inferior with find_thread and
2928 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2930 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2932 (aarch64_store_gregset): Likewise.
2933 (aarch64_fill_fpregset): Likewise.
2934 (aarch64_store_fpregset): Likewise.
2936 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2938 * gdbthread.h (find_thread, for_each_thread): New functions.
2939 * inferiors.c (thread_of_pid): Remove.
2940 (find_any_thread_of_pid): Use find_thread.
2941 * linux-low.c (num_lwps): Use for_each_thread.
2943 2017-10-17 Yao Qi <yao.qi@linaro.org>
2945 * Makefile.in: Remove one rule.
2946 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2948 2017-10-17 Yao Qi <yao.qi@linaro.org>
2950 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2951 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2953 2017-10-17 Yao Qi <yao.qi@linaro.org>
2955 * configure.srv: Rename arm.o with arch/arm.o.
2957 2017-10-17 Yao Qi <yao.qi@linaro.org>
2959 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2960 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2961 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2962 (arch-i386.o, arch-amd64.o): Remove rules.
2963 (arch/%.o): New rule.
2964 Update POSTCOMPILE and COMPILE.pre.
2965 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2966 * configure: Re-generated.
2967 * configure.srv: Replace arch-i386.o with arch/i386.o.
2968 Replace arch-amd64.o with arch/amd64.o.
2970 2017-10-16 Yao Qi <yao.qi@linaro.org>
2972 * configure: Regenerated.
2974 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2976 * inferiors.h: (struct inferior_list): Remove.
2977 (struct inferior_list_entry); Remove.
2978 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2979 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2980 get_first_inferior): Remove.
2981 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2982 find_inferior_id, find_inferior_in_random): Change signature.
2983 * inferiors.c (all_threads): Change type to
2984 std::list<thread_info *>.
2985 (get_thread): Remove macro.
2986 (find_inferior, find_inferior_id): Change signature, implement
2988 (find_inferior_in_random): Change signature, implement using
2989 find_thread_in_random.
2990 (for_each_inferior, for_each_inferior_with_data): Change
2991 signature, implement using for_each_thread.
2992 (add_inferior_to_list, remove_inferior): Remove.
2993 (add_thread, get_first_thread, thread_of_pid,
2994 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2995 (get_first_inferior, one_inferior_p, clear_inferior_list):
2997 (clear_inferiors, get_thread_process): Update.
2998 * gdbthread.h: Include <list>.
2999 (struct thread_info) <entry>: Remove field.
3001 (all_threads): Change type to std::list<thread_info *>.
3002 (get_first_inferior): Add doc.
3003 (find_thread, for_each_thread, find_thread_in_random): New
3005 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3006 * linux-arm-low.c (update_registers_callback): Update.
3007 * linux-low.c (second_thread_of_pid_p): Update.
3008 (kill_one_lwp_callback, linux_detach_lwp_callback,
3009 delete_lwp_callback, status_pending_p_callback, same_lwp,
3010 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3011 iterate_over_lwps, not_stopped_callback,
3012 resume_stopped_resumed_lwps, count_events_callback,
3013 select_singlestep_lwp_callback, select_event_lwp_callback,
3014 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3015 suspend_and_send_sigstop_callback, wait_for_sigstop,
3016 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3017 lwp_running, linux_set_resume_request, resume_status_pending_p,
3018 need_step_over_p, start_step_over, linux_resume_one_thread,
3019 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3020 reset_lwp_ptrace_options_callback): Update.
3021 * linux-mips-low.c (update_watch_registers_callback): Update.
3022 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3024 (free_register_cache_thread_one): Remove.
3025 (regcache_release): Update.
3026 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3027 handle_qxfer_threads_worker): Update.
3028 (handle_query): Update, use list iterator.
3029 (visit_actioned_threads, handle_pending_status,
3030 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3031 clear_pending_status_callback, set_pending_status_callback,
3032 find_status_pending_thread_callback, handle_status,
3033 process_serial_event): Update.
3034 * target.c (thread_search_callback): Update.
3035 * thread-db.c (thread_db_get_tls_address): Update.
3036 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3038 * win32-i386-low.c (update_debug_registers_callback): Update.
3039 * win32-low.c (delete_thread_info, child_delete_thread,
3040 continue_one_thread, suspend_one_thread,
3041 get_child_debug_event): Adjust.
3043 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3045 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3046 * inferiors.h: Include <list>.
3047 (struct process_info) <entry>: Remove field.
3049 (pid_of): Change macro to function.
3050 (ptid_of, lwpid_of): Remove macro.
3051 (all_processes): Change type to std::list<process_info *>.
3052 (ALL_PROCESSES): Remove macro.
3053 (for_each_process, find_process): New function.
3054 * inferiors.c (all_processes): Change type to
3055 std::list<process_info *>.
3056 (find_thread_process): Adjust.
3057 (add_process): Likewise.
3058 (remove_process): Likewise.
3059 (find_process_pid): Likewise.
3060 (get_first_process): Likewise.
3061 (started_inferior_callback): Remove.
3062 (have_started_inferiors_p): Adjust.
3063 (attached_inferior_callback): Remove.
3064 (have_attached_inferiors_p): Adjust.
3065 * linux-low.c (check_zombie_leaders): Likewise.
3066 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3067 (x86_linux_update_xmltarget): Adjust.
3068 * server.c (handle_query): Likewise.
3069 (gdb_reattached_process): Remove.
3070 (handle_status): Adjust.
3071 (kill_inferior_callback): Likewise.
3072 (detach_or_kill_inferior): Remove.
3073 (print_started_pid): Likewise.
3074 (print_attached_pid): Likewise.
3075 (detach_or_kill_for_exit): Update.
3076 (process_serial_event): Likewise.
3077 * linux-arm-low.c (arm_new_fork): Likewise.
3079 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3081 * dll.h: Include <list>.
3082 (struct dll_info): Add constructor.
3083 <entry>: Remove field.
3084 (all_dlls): Change type to std::list<dll_info>.
3085 * dll.c: Include <algorithm>.
3086 (get_dll): Remove macro.
3087 (all_dlls): Change type to std::list<dll_info *>.
3088 (free_one_dll): Remove.
3089 (match_dll): Likewise.
3090 (loaded_dll): Adjust.
3091 (unloaded_dll): Adjust to all_dlls type change, use
3092 std::find_if. Inline code from match_dll.
3093 (clear_dlls): Adjust to all_dlls type change.
3094 * server.c (emit_dll_description): Remove.
3095 (handle_qxfer_libraries): Adjust to all_dlls type change,
3096 integrate emit_dll_description's functionality.
3098 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3100 * linux-low.h (struct linux_target_ops) <delete_process>: New
3102 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3103 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3104 (struct linux_target_ops): Add delete_process callback.
3105 * linux-arm-low.c (arm_delete_process): New.
3106 (struct linux_target_ops): Add delete_process callback.
3107 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3108 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3109 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3110 * linux-mips-low.c (mips_linux_delete_process): New.
3111 (struct linux_target_ops): Add delete_process callback.
3112 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3113 * linux-s390-low.c (struct linux_target_ops): Likewise.
3114 * linux-sh-low.c (struct linux_target_ops): Likewise.
3115 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3116 * linux-tile-low.c (struct linux_target_ops): Likewise.
3117 * linux-x86-low.c (x86_linux_delete_process): New.
3118 (struct linux_target_ops): Add delete_process callback.
3119 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3121 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3123 * linux-aarch64-low.c (the_low_target): Add thread delete
3125 * linux-arm-low.c (arm_delete_thread): New function.
3126 (the_low_target): Add thread delete callback.
3127 * linux-bfin-low.c (the_low_target): Likewise.
3128 * linux-crisv32-low.c (the_low_target): Likewise.
3129 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3131 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3133 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3134 * linux-mips-low.c (mips_linux_delete_thread): New function.
3135 (the_low_target): Add thread delete callback.
3136 * linux-ppc-low.c (the_low_target): Likewise.
3137 * linux-s390-low.c (the_low_target): Likewise.
3138 * linux-sh-low.c (the_low_target): Likewise.
3139 * linux-tic6x-low.c (the_low_target): Likewise.
3140 * linux-tile-low.c (the_low_target): Likewise.
3141 * linux-x86-low.c (the_low_target): Likewise.
3142 * linux-xtensa-low.c (the_low_target): Likewise.
3144 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3146 * win32-low.c: Include "common-inferior.h".
3148 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3150 * inferiors.c (set_inferior_cwd): New function.
3151 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3152 (handle_query): Inform that QSetWorkingDir is supported.
3153 * win32-low.c (create_process): Pass the inferior's cwd to
3156 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3158 * inferiors.c (current_inferior_cwd): New global variable.
3159 (get_inferior_cwd): New function.
3160 * inferiors.h (struct process_info) <cwd>: New field.
3162 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3164 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3165 (OBS): Add gdb_tilde_expand.o.
3167 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3169 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3170 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3172 2017-09-29 Pedro Alves <palves@redhat.com>
3174 * ax.c (gdb_parse_agent_expr): Constify.
3175 * ax.h (gdb_parse_agent_expr): Constify.
3176 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3178 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3179 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3180 * remote-utils.h (read_ptid): Constify.
3181 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3182 (process_point_options, process_serial_event): Constify.
3183 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3184 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3185 (cmd_qtbuffer): Constify.
3187 2017-09-29 Pedro Alves <palves@redhat.com>
3189 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3192 2017-09-29 Pedro Alves <palves@redhat.com>
3194 * linux-low.c (handle_extended_wait): Pass parent thread instead
3195 of process to thread_db_notice_clone.
3196 * linux-low.h (thread_db_notice_clone): Replace parent process
3197 parameter with parent thread parameter.
3198 * thread-db.c (find_one_thread): Add comment.
3199 (thread_db_notice_clone): Replace parent process parameter with
3200 parent thread parameter. Temporarily switch to the parent thread.
3202 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3204 * gdbthread.h: Include "common-gdbthread.h".
3205 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3206 "if" when validating the ptid.
3207 * remote-utils.c: Include "gdbthread.h".
3208 (prepare_resume_reply): Use "switch_to_thread".
3209 * target.c (done_accessing_memory): Likewise.
3211 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3213 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3214 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3215 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3216 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3217 s390x-gs-linux64-ipa.o to ipa_obj.
3218 * linux-s390-low.c (HWCAP_S390_GS): New define.
3219 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3221 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3222 (s390_arch_setup): Check for guarded-storage support and choose
3224 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3225 init_registers_s390x_gs_linux64.
3226 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3228 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3229 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3231 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3233 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3235 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3237 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3238 (thread_db_thread_handle): Declare.
3239 * linux-low.c (linux_target_ops): Initialize thread_handle.
3240 * server.c (handle_qxfer_threads_worker): Add support for
3242 * target.h (struct target_ops): Add new function pointer,
3244 (target_thread_handle): Define.
3245 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3247 (thread_db_thread_handle): New function.
3249 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3251 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3252 * linux-low.h (thread_db_notice_clone): Declare.
3253 * thread-db.c (thread_db_notice_clone): New function.
3255 2017-09-21 Pedro Alves <palves@redhat.com>
3257 * server.c (gdb_read_memory, handle_status, process_serial_event)
3258 (handle_serial_event, handle_target_event): Adjust to
3259 set_desired_thread prototype change.
3260 * target.c (set_desired_thread): Remove 'use_general' parameter
3262 * target.h (set_desired_thread): Remove 'use_general' parameter.
3264 2017-09-20 Tom Tromey <tom@tromey.com>
3266 * target.c (target_terminal::terminal_state): Define.
3267 (target_terminal::init): Rename from target_terminal_init.
3268 (target_terminal::inferior): Rename from
3269 target_terminal_inferior.
3270 (target_terminal::ours): Rename from target_terminal_ours.
3271 (target_terminal::ours_for_output, target_terminal::info): New.
3273 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3275 * server.c (accumulate_file_name_length): Remove.
3276 (emit_dll_description): Adjust to std::string change.
3277 (handle_qxfer_libraries): Use std::string to hold document.
3279 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3281 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3282 return type of xml_escape_text.
3283 * server.c (emit_dll_description): Likewise.
3285 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3287 * server.c (captured_main): Accept argument for --selftest.
3288 Update run_tests call.
3289 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3290 when registering selftests.
3292 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3294 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3295 instead of "VEC" for "target_desc.reg_defs".
3296 (regcache_cpy): Likewise.
3297 (registers_to_string): Likewise.
3298 (registers_from_string): Likewise.
3299 (find_regno): Likewise.
3300 (supply_regblock): Likewise.
3301 (regcache_raw_read_unsigned): Likewise.
3302 * tdesc.c (init_target_desc): Likewise.
3303 (tdesc_create_reg): Likewise.
3304 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3305 (struct target_desc) <reg_defs>: Convert to "std::vector".
3306 (target_desc): Do not initialize "reg_defs".
3307 (~target_desc): Update code to use "std::vector" instead of "VEC"
3308 for "target_desc.reg_defs".
3309 (operator==): Likewise.
3311 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3313 * inferiors.h (thread_to_gdb_id): Remove.
3314 * inferiors.c (thread_to_gdb_id): Remove.
3315 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3316 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3317 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3319 * nto-low.c (nto_fetch_registers, nto_store_registers,
3320 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3322 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3324 * inferiors.h (gdb_id_to_thread_id): Remove.
3325 * inferiors.c (gdb_id_to_thread_id): Remove.
3326 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3327 removal. Move pid declaration closer to where it's used.
3329 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3331 * server.c (handle_detach): New function.
3332 (process_serial_event): Move code out, call handle_detach.
3334 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3336 * server.c (require_running): Rename to ...
3337 (require_running_or_return): ... this ...
3338 (require_running_or_break): ... and this.
3339 (handle_query, process_serial_event): Adjust.
3341 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3343 * linux-low.c (linux_set_resume_request): Remove unused
3346 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3348 * server.c (first_thread_of): Remove.
3349 (process_serial_event): Replace usage of first_thread_of with
3350 find_any_thread_of_pid.
3351 * tracepoint.c (same_process_p): Remove.
3352 (gdb_agent_about_to_close): Replace usage of same_process_p with
3353 find_any_thread_of_pid.
3354 * linux-x86-low.c (same_process_callback): Remove.
3355 (x86_arch_setup_process_callback): Replace usage of
3356 same_process_callback with find_any_thread_of_pid.
3357 * thread-db.c (any_thread_of): Remove.
3358 (switch_to_process): Replace usage of any_thread_of with
3359 find_any_thread_of_pid.
3360 * inferiors.c (thread_pid_matches_callback): Remove.
3361 (find_thread_process): Adjust to use find_any_thread_of_pid.
3363 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3365 * regcache.c (get_thread_regcache): Guard calls to "memset"
3368 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3370 * linux-low.c (handle_extended_wait): Use
3371 "allocate_target_description" instead of "XNEW".
3372 * linux-x86-low.c (initialize_low_arch): Likewise.
3374 2017-09-05 Yao Qi <yao.qi@linaro.org>
3376 * configure.srv (srv_i386_regobj): Remove.
3377 (srv_amd64_regobj): Remove.
3378 (srv_regobj): Set it to "" for x86 non-linux targets.
3379 * linux-x86-tdesc.c (i386_linux_read_description):
3380 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3381 (init_registers_i386): Remove the declaration.
3382 (tdesc_i386): Remove the declaration.
3383 (lynx_i386_arch_setup): Call i386_create_target_description.
3384 * nto-x86-low.c: Likewise.
3385 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3386 [!__x86_64__]: include arch/i386.h.
3387 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3389 2017-09-05 Yao Qi <yao.qi@linaro.org>
3391 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3392 i386/amd64-XXX-linux from it.
3394 2017-09-05 Yao Qi <yao.qi@linaro.org>
3396 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3398 (ipa_amd64_linux_regobj): Remove.
3399 (ipa_x32_linux_regobj): Remove.
3401 2017-09-05 Yao Qi <yao.qi@linaro.org>
3403 * Makefile.in (arch-amd64.o): New rule.
3404 * configure.srv: Append arch-amd64.o.
3405 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3406 (get_ipa_tdesc): Call amd64_linux_read_description.
3407 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3408 and init_registers_amd64_XXX.
3409 * linux-x86-low.c (x86_linux_read_description): Call
3410 amd64_linux_read_description.
3411 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3412 (initialize_low_arch): Don't call init_registers_x32_XXX and
3413 init_registers_amd64_XXX.
3414 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3415 and tdesc_amd64_XXX.
3416 [__x86_64__] (amd64_tdesc_test): New function.
3417 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3418 and init_registers_amd64_XXX.
3419 * linux-x86-tdesc.c: Include arch/amd64.h.
3420 (xcr0_to_tdesc_idx): New function.
3421 (i386_linux_read_description): New function.
3422 (amd64_get_ipa_tdesc_idx): New function.
3423 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3424 (amd64_get_ipa_tdesc): Declare.
3426 2017-09-05 Yao Qi <yao.qi@linaro.org>
3428 * configure.srv (srv_i386_linux_xmlfiles): Remove
3429 i386/i386-XXX-linux.xml from it.
3431 2017-09-05 Yao Qi <yao.qi@linaro.org>
3433 * configure.srv: Set srv_i386_linux_regobj empty if $development
3435 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3436 initialize_low_tdesc.
3437 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3438 with #if initialize_low_tdesc.
3439 * linux-x86-tdesc-selftest.c: New file.
3440 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3442 2017-09-05 Yao Qi <yao.qi@linaro.org>
3444 * Makefile.in (arch-i386.o): New rule.
3445 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3446 (x86_64-*-linux*): Likewise.
3447 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3448 include arch/i386.h.
3449 (i386_linux_read_description): Remove code and call
3450 i386_create_target_description.
3451 * tdesc.c (allocate_target_description): New function.
3452 * tdesc.h (set_tdesc_architecture): Remove declaration.
3453 (set_tdesc_osabi): Likewise.
3455 2017-09-05 Yao Qi <yao.qi@linaro.org>
3457 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3458 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3459 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3461 * server.c (get_features_xml): Call tdesc_get_features_xml.
3462 * tdesc.c (set_tdesc_architecture): New function.
3463 (set_tdesc_osabi): New function.
3464 (tdesc_get_features_xml): New function.
3465 (tdesc_create_feature): Add an argument.
3466 * tdesc.h (struct target_desc) <features>: New field.
3467 <arch, osabi>: New field.
3468 (~target_desc): xfree features, arch, and osabi.
3469 (target_desc::oerator==): Don't compare .xmltarget.
3470 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3471 (set_tdesc_osabi): Likewise.
3472 (tdesc_get_features_xml): Likewise.
3474 2017-09-05 Yao Qi <yao.qi@linaro.org>
3476 * linux-x86-tdesc.c: Include selftest.h.
3477 (i386_tdesc_test): New function.
3478 (initialize_low_tdesc): Call selftests::register_test.
3479 * tdesc.h: Include regdef.h.
3480 (target_desc): Override operator == and !=.
3482 2017-09-05 Yao Qi <yao.qi@linaro.org>
3484 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3485 (ipa_obj): Likewise.
3486 * linux-i386-ipa.c: Include common/x86-xstate.h
3487 (get_ipa_tdesc): Call i386_linux_read_description.
3488 (initialize_low_tracepoint): Don't call init_registers_XXX
3489 functions, call initialize_low_tdesc instead.
3490 * linux-x86-low.c (x86_linux_read_description): Call
3491 i386_linux_read_description.
3492 (initialize_low_arch): Don't call init_registers_i386_XXX
3493 functions, call initialize_low_tdesc.
3494 * linux-x86-tdesc.c: New file.
3495 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3496 (i386_get_ipa_tdesc_idx): Declare.
3497 (i386_get_ipa_tdesc): Declare.
3498 (initialize_low_tdesc): Declare.
3500 2017-09-05 Yao Qi <yao.qi@linaro.org>
3502 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3505 2017-09-05 Yao Qi <yao.qi@linaro.org>
3507 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3508 * regcache.c (get_thread_regcache): Use VEC_length.
3509 (init_register_cache): Likewise.
3510 (regcache_cpy): Likewise.
3511 (registers_to_string): Iterate reg_defs via VEC_iterate.
3512 (find_regno): Likewise.
3513 (find_register_by_number): Use VEC_index.
3514 (register_size): Call find_register_by_number.
3515 (register_data): Call find_register_by_number.
3516 (supply_regblock): Use VEC_length.
3517 (regcache_raw_read_unsigned): Likewise.
3518 * tdesc.c (init_target_desc): Iterate reg_defs via
3520 (default_description): Update initializer.
3521 (copy_target_description): Don't update field num_registers.
3522 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3523 <num_registers>: Remove.
3525 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3527 * Makefile.in (.SECONDARY): Define target.
3529 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3531 * linux-low.c (linux_wait_1): Adjust.
3532 * server.c (queue_stop_reply_callback): Adjust.
3534 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3536 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3537 QEnvironmentUnset and QEnvironmentReset packets.
3538 (handle_query): Inform remote that QEnvironmentHexEncoded,
3539 QEnvironmentUnset and QEnvironmentReset are supported.
3541 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3543 * inferiors.h (inferior_target_data): Rename to ...
3544 (thread_target_data): ... this.
3545 (inferior_regcache_data): Rename to ...
3546 (thread_regcache_data): ... this.
3547 (set_inferior_regcache_data): Rename to ...
3548 (set_thread_regcache_data): ... this.
3549 * inferiors.c (inferior_target_data): Rename to ...
3550 (thread_target_data): ... this.
3551 (inferior_regcache_data): Rename to ...
3552 (thread_regcache_data): ... this.
3553 (set_inferior_regcache_data): Rename to ...
3554 (set_thread_regcache_data): ... this.
3555 (free_one_thread): Update.
3556 * linux-low.h (get_thread_lwp): Update.
3557 * regcache.c (get_thread_regcache): Update.
3558 (regcache_invalidate_thread): Update.
3559 (free_register_cache_thread): Update.
3560 * win32-i386-low.c (update_debug_registers_callback): Update.
3561 (win32_get_current_dr): Update.
3562 * win32-low.c (thread_rec): Update.
3563 (delete_thread_info): Update.
3564 (continue_one_thread): Update.
3565 (suspend_one_thread): Update.
3567 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3569 * inferiors.c (set_inferior_target_data): Remove.
3570 * inferiors.h (set_inferior_target_data): Remove.
3572 2017-08-18 Yao Qi <yao.qi@linaro.org>
3574 * Makefile.in (OBS): Add selftest.o.
3575 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3576 * configure, config.in: Re-generated.
3577 * server.c: Include common/sefltest.h.
3578 (captured_main): Handle option --selftest.
3580 2017-08-09 Yao Qi <yao.qi@linaro.org>
3582 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3583 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3584 i386-avx-mpx.o and i386-mmx.o.
3585 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3586 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3587 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3588 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3589 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3590 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3591 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3592 i386/amd64-avx-mpx.xml.
3594 2017-08-09 Yao Qi <yao.qi@linaro.org>
3596 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3597 and x32-avx-avx512.o.
3598 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3599 i386/x32-avx-avx512.xml.
3601 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3603 * tracepoint.h (enum class fast_tpoint_collect_result): New
3605 (fast_tracepoint_collecting): Change return type to
3606 fast_tpoint_collect_result.
3607 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3608 * linux-low.h: Include tracepoint.h.
3609 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3610 fast_tpoint_collect_result.
3611 * linux-low.c (handle_tracepoints): Adjust.
3612 (linux_fast_tracepoint_collecting): Change return type to
3613 fast_tpoint_collect_result.
3614 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3615 linux_wait_1, stuck_in_jump_pad_callback,
3616 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3617 proceed_one_lwp): Adjust to type change.
3619 2017-07-10 Yao Qi <yao.qi@linaro.org>
3621 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3623 2017-06-29 Yao Qi <yao.qi@linaro.org>
3625 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3627 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3629 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3631 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3633 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3635 * linux-low.c (linux_create_inferior): Adjust code to access the
3636 environment information via 'gdb_environ' class.
3637 * lynx-low.c (lynx_create_inferior): Likewise.
3638 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3639 (get_environ): Return a pointer to 'our_environ'.
3640 (captured_main): Initialize 'our_environ'.
3641 * server.h (get_environ): Adjust prototype.
3642 * spu-low.c (spu_create_inferior): Adjust code to access the
3643 environment information via 'gdb_environ' class.
3645 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3647 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3648 usage of "register" keyword.
3650 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3652 * configure: Re-generate.
3654 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3656 * configure: Re-generate.
3658 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3660 * Makefile.in (COMPILE.pre): Add "-x c++".
3662 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3664 * fork-child.c: Conditionally include <signal.h>.
3666 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3668 * server.c (handle_general_set): Handle new packet
3669 "QStartupWithShell".
3670 (handle_query): Add "QStartupWithShell" to the list of supported
3672 (gdbserver_usage): Add help text explaining the
3673 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3675 (captured_main): Recognize and act upon the presence of the new
3678 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3679 Pedro Alves <palves@redhat.com>
3681 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3682 * configure: Regenerate.
3683 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3685 (i[34567]86-*-lynxos*): Likewise.
3686 (spu*-*-*): Likewise.
3687 * fork-child.c: New file.
3688 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3690 (linux_ptrace_fun): New function.
3691 (linux_create_inferior): Adjust function prototype to reflect
3692 change on "target.h". Adjust function code to use
3694 (linux_request_interrupt): Delete "signal_pid".
3695 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3696 (lynx_ptrace_fun): New function.
3697 (lynx_create_inferior): Adjust function prototype to reflect
3698 change on "target.h". Adjust function code to use
3700 * nto-low.c (nto_create_inferior): Adjust function prototype and
3701 code to reflect change on "target.h". Update comments.
3702 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3703 "common-terminal.h" and "environ.h".
3704 (terminal_fd): Moved to fork-child.c.
3705 (old_foreground_pgrp): Likewise.
3706 (restore_old_foreground_pgrp): Likewise.
3707 (last_status): Make it global.
3708 (last_ptid): Likewise.
3709 (our_environ): New variable.
3710 (startup_with_shell): Likewise.
3711 (program_name): Likewise.
3712 (program_argv): Rename to...
3713 (program_args): ...this.
3714 (wrapper_argv): New variable.
3715 (start_inferior): Delete function.
3716 (get_exec_wrapper): New function.
3717 (get_exec_file): Likewise.
3718 (get_environ): Likewise.
3719 (prefork_hook): Likewise.
3720 (post_fork_inferior): Likewise.
3721 (postfork_hook): Likewise.
3722 (postfork_child_hook): Likewise.
3723 (handle_v_run): Update code to deal with arguments coming from the
3724 remote host. Update calls from "start_inferior" to
3726 (captured_main): Likewise. Initialize environment variable. Call
3728 * server.h (post_fork_inferior): New prototype.
3729 (get_environ): Likewise.
3730 (last_status): Declare.
3731 (last_ptid): Likewise.
3732 (signal_pid): Likewise.
3733 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3734 (spu_ptrace_fun): New function.
3735 (spu_create_inferior): Adjust function prototype to reflect change
3736 on "target.h". Adjust function code to use "fork_inferior".
3737 * target.c (target_terminal_init): New function.
3738 (target_terminal_inferior): Likewise.
3739 (target_terminal_ours): Likewise.
3740 * target.h: Include <vector>.
3741 (struct target_ops) <create_inferior>: Update prototype.
3742 (create_inferior): Update macro.
3743 * utils.c (gdb_flush_out_err): New function.
3744 * win32-low.c (win32_create_inferior): Adjust function prototype
3745 and code to reflect change on "target.h".
3747 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3749 * inferiors.c (switch_to_thread): New function.
3751 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3753 * Makefile.in (SFILE): Add "common/job-control.c".
3754 (OBS): Add "job-control.o".
3756 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3758 * Makefile: Remove "@host_makefile_frag@".
3760 2017-05-05 Pedro Alves <palves@redhat.com>
3762 * configure: Regenerate.
3764 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3766 * configure: Regenerate.
3768 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3770 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3771 software_single_step change of return type to
3772 std::vector<CORE_ADDR>.
3773 * linux-low.c (install_software_single_step_breakpoints):
3775 * linux-low.h (install_software_single_step_breakpoints):
3778 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3780 * remote-utils.c: Include "gdb_termios.h" instead of
3782 * terminal.h: Delete file.
3784 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3786 * server.c: Include <vector>.
3787 <program_argv, wrapper_argv>: Convert to std::vector.
3788 (start_inferior): Rewrite function to use C++.
3789 (handle_v_run): Likewise. Update code that calculates the argv
3790 based on the vRun packet; use C++.
3791 (captured_main): Likewise.
3793 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3795 * server.c (handle_v_cont): Initialize thread_resume::thread
3798 2017-04-05 Pedro Alves <palves@redhat.com>
3800 * configure: Regenerate.
3802 2017-04-05 Pedro Alves <palves@redhat.com>
3804 * gdbreplay.c (sync_error): Constify.
3805 * linux-x86-low.c (push_opcode): Constify.
3807 2017-04-05 Pedro Alves <palves@redhat.com>
3809 * win32-low.c (get_child_debug_event)
3810 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3811 Report TARGET_WAITKIND_SPURIOUS instead.
3813 2017-04-05 Pedro Alves <palves@redhat.com>
3815 * remote-utils.c (remote_prepare, remote_open): Constify.
3816 * remote-utils.h (remote_prepare, remote_open): Constify.
3817 * server.c (captured_main): Constify 'port' handling.
3819 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3821 * Makefile.in (clean): Clear .deps.
3823 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3825 * .gitignore: Remove generated files, replace with wildcard.
3826 * (clean): Replace removal of generated files with wildcard.
3827 (version.c): Replace with...
3828 (version-generated.c): ...this.
3829 (xml-builtin.c): Replace with...
3830 (xml-builtin-generated.c): ...this.
3831 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3832 (%.c: *regformats*): Replace with...
3833 (%-generated.c: *regformats*): ...this.
3835 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3837 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3838 (xtensa_fill_gregset): Call collect_register_by_name for
3840 (xtensa_store_gregset): Call supply_register_by_name for
3843 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3845 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3846 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3847 (xtensa_store_gregset): Call supply_register for all registers in
3848 a0_regnum..a0_regnum + C0_NREGS range.
3850 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3852 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3853 (ax-ipa.o: ax.c): Remove.
3854 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3855 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3856 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3857 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3858 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3860 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3862 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3863 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3864 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3865 (errors-ipa.o: ../common/errors.c): Remove.
3866 (format-ipa.o: ../common/format.c): Remove.
3867 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3869 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3871 * Makefile.in (%-ipa.o: %.c): New rule.
3872 (tracepoint-ipa.o: tracepoint.c): Remove.
3873 (utils-ipa.o: utils.c): Remove.
3874 (remote-utils-ipa.o: remote-utils.c): Remove.
3875 (regcache-ipa.o: regcache.c): Remove.
3876 (i386-linux-ipa.o: i386-linux.c): Remove.
3877 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3878 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3879 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3880 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3881 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3882 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3883 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3884 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3885 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3886 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3887 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3888 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3889 (aarch64-ipa.o: aarch64.c): Remove.
3890 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3891 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3892 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3893 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3894 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3895 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3896 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3897 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3898 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3899 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3900 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3901 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3902 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3903 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3904 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3905 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3906 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3907 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3908 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3909 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3910 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3911 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3912 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3913 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3914 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3915 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3916 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3917 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3918 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3919 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3920 (tdesc-ipa.o: tdesc.c): Remove.
3921 (x32-linux-ipa.o: x32-linux.c): Remove.
3922 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3923 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3925 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3927 * Makefile.in (%.o: ../arch/%.c): New rule.
3928 (arm.o: ../arch/arm.c): Remove.
3929 (arm-linux.o: ../arch/arm-linux.c): Remove.
3930 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3931 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3933 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3935 * Makefile.in (%.o: ../nat/%.c): New rule.
3936 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3937 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3938 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3939 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3940 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3941 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3942 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3943 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3944 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3945 (linux-personality.o: ../nat/linux-personality.c): Remove.
3946 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3947 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3948 (x86-linux.o: ../nat/x86-linux.c): Remove.
3949 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3950 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3952 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3954 * Makefile.in (%.o: ../common/%.c): New rule.
3955 (signals.o: ../common/signals.c): Remove.
3956 (print-utils.o: ../common/print-utils.c): Remove.
3957 (rsp-low.o: ../common/rsp-low.c): Remove.
3958 (common-utils.o: ../common/common-utils.c): Remove.
3959 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3960 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3961 (vec.o: ../common/vec.c): Remove.
3962 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3963 (xml-utils.o: ../common/xml-utils.c): Remove.
3964 (ptid.o: ../common/ptid.c): Remove.
3965 (buffer.o: ../common/buffer.c): Remove.
3966 (format.o: ../common/format.c): Remove.
3967 (filestuff.o: ../common/filestuff.c): Remove.
3968 (agent.o: ../common/agent.c): Remove.
3969 (errors.o: ../common/errors.c): Remove.
3970 (environ.o: ../common/environ.c): Remove.
3971 (common-debug.o: ../common/common-debug.c): Remove.
3972 (cleanups.o: ../common/cleanups.c): Remove.
3973 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3974 (fileio.o: ../common/fileio.c): Remove.
3975 (common-regcache.o: ../common/common-regcache.c): Remove.
3976 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3977 (new-op.o: ../common/new-op.c): Remove.
3978 (btrace-common.o: ../common/btrace-common.c): Remove.
3980 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3982 * Makefile.in (%.o: ../target/%.c): New rule.
3983 (waitstatus.o: ../target/waitstatus.c): Remove.
3985 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3988 (%.c: ../regformats/%.dat,
3989 (%.c: ../regformats/arm/%.dat,
3990 (%.c: ../regformats/i386/%.dat,
3991 (%.c: ../regformats/rs6000/%.dat): New rules.
3992 (aarch64.c): Remove.
3993 (reg-arm.c): Remove.
3994 (arm-with-iwmmxt.c): Remove.
3995 (arm-with-vfpv2.c): Remove.
3996 (arm-with-vfpv3.c): Remove.
3997 (arm-with-neon.c): Remove.
3998 (reg-bfin.c): Remove.
3999 (reg-cris.c): Remove.
4000 (reg-crisv32.c): Remove.
4002 (i386-linux.c): Remove.
4003 (i386-avx.c): Remove.
4004 (i386-avx-linux.c): Remove.
4005 (i386-avx-avx512.c): Remove.
4006 (i386-avx-avx512-linux.c): Remove.
4007 (i386-mpx.c): Remove.
4008 (i386-mpx-linux.c): Remove.
4009 (i386-avx-mpx-avx512-pku.c): Remove.
4010 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4011 (i386-avx-mpx.c): Remove.
4012 (i386-avx-mpx-linux.c): Remove.
4013 (i386-mmx.c): Remove.
4014 (i386-mmx-linux.c): Remove.
4015 (reg-ia64.c): Remove.
4016 (reg-m32r.c): Remove.
4017 (reg-m68k.c): Remove.
4019 (mips-linux.c): Remove.
4020 (mips-dsp-linux.c): Remove.
4021 (mips64-linux.c): Remove.
4022 (mips64-dsp-linux.c): Remove.
4023 (nios2-linux.c): Remove.
4024 (powerpc-32.c): Remove.
4025 (powerpc-32l.c): Remove.
4026 (powerpc-altivec32l.c): Remove.
4027 (powerpc-cell32l.c): Remove.
4028 (powerpc-vsx32l.c): Remove.
4029 (powerpc-isa205-32l.c): Remove.
4030 (powerpc-isa205-altivec32l.c): Remove.
4031 (powerpc-isa205-vsx32l.c): Remove.
4032 (powerpc-e500l.c): Remove.
4033 (powerpc-64l.c): Remove.
4034 (powerpc-altivec64l.c): Remove.
4035 (powerpc-cell64l.c): Remove.
4036 (powerpc-vsx64l.c): Remove.
4037 (powerpc-isa205-64l.c): Remove.
4038 (powerpc-isa205-altivec64l.c): Remove.
4039 (powerpc-isa205-vsx64l.c): Remove.
4040 (s390-linux32.c): Remove.
4041 (s390-linux32v1.c): Remove.
4042 (s390-linux32v2.c): Remove.
4043 (s390-linux64.c): Remove.
4044 (s390-linux64v1.c): Remove.
4045 (s390-linux64v2.c): Remove.
4046 (s390-te-linux64.c): Remove.
4047 (s390-vx-linux64.c): Remove.
4048 (s390-tevx-linux64.c): Remove.
4049 (s390x-linux64.c): Remove.
4050 (s390x-linux64v1.c): Remove.
4051 (s390x-linux64v2.c): Remove.
4052 (s390x-te-linux64.c): Remove.
4053 (s390x-vx-linux64.c): Remove.
4054 (s390x-tevx-linux64.c): Remove.
4055 (tic6x-c64xp-linux.c): Remove.
4056 (tic6x-c64x-linux.c): Remove.
4057 (tic6x-c62x-linux.c): Remove.
4059 (reg-sparc64.c): Remove.
4060 (reg-spu.c): Remove.
4062 (amd64-linux.c): Remove.
4063 (amd64-avx.c): Remove.
4064 (amd64-avx-linux.c): Remove.
4065 (amd64-avx-avx512.c): Remove.
4066 (amd64-avx-avx512-linux.c): Remove.
4067 (amd64-mpx.c): Remove.
4068 (amd64-mpx-linux.c): Remove.
4069 (amd64-avx-mpx-avx512-pku.c): Remove.
4070 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4071 (amd64-avx-mpx.c): Remove.
4072 (amd64-avx-mpx-linux.c): Remove.
4074 (x32-linux.c): Remove.
4075 (x32-avx.c): Remove.
4076 (x32-avx-linux.c): Remove.
4077 (x32-avx-avx512.c): Remove.
4078 (x32-avx-avx512-linux.c): Remove.
4079 (reg-xtensa.c): Remove.
4080 (reg-tilegx.c): Remove.
4081 (reg-tilegx32.c): Remove.
4083 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4085 * Makefile.in (SFILES): Add "common/environ.c".
4086 (OBJS): Add "common/environ.h".
4088 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4090 * configure.ac: Check if the fs_base and gs_base members of
4091 `struct user_regs_struct' exist.
4092 * config.in: Regenerated.
4093 * configure: Likewise.
4095 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4097 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4099 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4100 (get_next_pcs_syscall_next_pc): Likewise.
4102 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4104 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4105 * nto-x86-low.c: Likewise.
4107 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4109 * Makefile.in: Include disable-implicit-rules.mk.
4111 2016-11-23 Pedro Alves <palves@redhat.com>
4113 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4114 (debug_vprintf): Use std::chrono::steady_clock instead of
4115 gettimeofday. Use '.' instead of ':'.
4116 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4117 (get_timestamp): Use std::chrono::steady_clock instead of
4120 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4122 * Makefile.in: Fix whitespace formatting.
4124 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4126 * Makefile.in (SFILES, OBS): Flatten list and order
4129 2016-11-23 Pedro Alves <palves@redhat.com>
4131 * event-loop.c (handle_file_event): Use warning.
4132 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4133 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4136 2016-11-23 Pedro Alves <palves@redhat.com>
4138 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4140 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4141 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4142 debug_printf and debug_flush for debug output.
4143 * server.c (handle_general_set): Likewise.
4144 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4147 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4149 * Makefile.in (.c.o): Replace rule with ...
4150 (%.o: %.c): ... this one.
4152 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4154 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4155 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4157 * configure.ac: Remove checks for the make program.
4158 * configure: Re-generate.
4160 2016-10-28 Pedro Alves <palves@redhat.com>
4162 * Makefile.in (CXX_DIALECT): Get from configure.
4163 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4164 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4165 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4166 * config.in: Regenerate.
4167 * configure: Regenerate.
4169 2016-10-27 Yao Qi <yao.qi@linaro.org>
4171 * linux-low.c (linux_supports_range_stepping): Return true if
4172 can_software_single_step return true.
4174 2016-10-27 Yao Qi <yao.qi@linaro.org>
4176 * inferiors.c (find_inferior_in_random): New function.
4177 * inferiors.h (find_inferior_in_random): Declare.
4178 * linux-low.c (linux_wait_for_event_filtered): Call
4179 find_inferior_in_random instead of find_inferior.
4181 2016-10-27 Yao Qi <yao.qi@linaro.org>
4183 * linux-low.c (linux_wait_1): If single-step breakpoints are
4184 inserted, remove them.
4186 2016-10-26 Pedro Alves <palves@redhat.com>
4188 * linux-low.c (handle_extended_wait): Link parent/child fork
4190 (linux_wait_1): Unlink them.
4191 (linux_set_resume_request): Ignore resume requests for
4192 already-resumed and unhandled fork child threads.
4193 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4194 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4196 (handle_v_requests) <vCont>: Don't call require_running.
4197 * server.h (in_queued_stop_replies): New declaration.
4199 2016-10-24 Yao Qi <yao.qi@linaro.org>
4202 * linux-aarch64-low.c (append_insns): Cast the return value to
4205 2016-10-10 Yao Qi <yao.qi@linaro.org>
4207 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4209 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4211 * target.c (target_supports_multi_process): New function, moved
4213 * target.h (target_supports_multi_process): ... here. Remove
4216 2016-10-05 Tom Tromey <tom@tromey.com>
4219 * tracepoint.c (handle_tracepoint_bkpts): Check
4220 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4222 2016-10-05 Yao Qi <yao.qi@linaro.org>
4224 * configure.srv: Update the path of arm-*.xml files.
4226 2016-10-05 Terry Guo <terry.guo@arm.com>
4227 Yao Qi <yao.qi@linaro.org>
4229 * Makefile.in: Adjust the path of rules.
4230 * configure.srv: Update the path of xml files.
4231 * regformats/arm-with-iwmmxt.dat: Regenerated.
4232 * regformats/arm-with-neon.dat: Likewise.
4233 * regformats/arm-with-vfpv2.dat: Likewise.
4234 * regformats/arm-with-vfpv3.dat Likewise.
4236 2016-09-30 Yao Qi <yao.qi@linaro.org>
4239 * target.c (target_stop_and_wait): Don't call
4240 target_continue_no_signal, use resume_stop instead.
4242 2016-09-26 Yao Qi <yao.qi@linaro.org>
4244 * linux-low.c (linux_wait_1): Call debug_exit.
4246 2016-09-23 Pedro Alves <palves@redhat.com>
4248 * Makefile.in (SFILES): Add common/new-op.c.
4249 (OBS): Add common/new-op.o.
4250 (new-op.o): New rule.
4252 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4254 * .gitinore: Ignore more files.
4256 2016-09-21 Yao Qi <yao.qi@linaro.org>
4258 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4261 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4263 * server.c (start_inferior): Call target_mourn_inferior instead of
4264 mourn_inferior; pass ptid_t argument to it.
4266 (handle_target_event): Likewise.
4267 * target.c (target_mourn_inferior): New function.
4268 * target.h (mourn_inferior): Delete macro.
4270 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4272 * linux-low.c (lwp_is_stepping): New function.
4274 2016-09-06 Carl Love <cel@us.ibm.com>
4276 * server.c (start_inferior): Fixed comment, requested comment change
4277 didn't get updated correctly. Removed reference to ptrace () call as
4278 it is only true on Linux systems.
4280 2016-09-06 Carl Love <cel@us.ibm.com>
4282 * server.c (start_inferior): Do not call
4283 function target_post_create_inferior () if the
4284 inferior process has already exited.
4286 2016-09-05 Pedro Alves <palves@redhat.com>
4288 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4289 (COMPILE.pre, CC_LD): Use CXX directly.
4290 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4291 * acinclude.m4: Don't include build-with-cxx.m4.
4292 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4293 * configure: Regenerate.
4295 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4298 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4299 call writing data to own_buf.
4301 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4303 * target.c (mywait): Call target_wait instead of
4305 (target_wait): New function.
4307 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4309 * server.c (start_inferior): New variable 'ptid'. Replace calls
4310 to the_target->resume by target_continue{,_no_signal}, depending
4312 * target.c (target_stop_and_wait): Call target_continue_no_signal
4313 instead of the_target->resume.
4314 (target_continue): New function.
4316 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4318 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4320 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4323 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4325 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4326 * linux-arm-low.c (ps_get_thread_area): Likewise.
4327 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4328 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4329 * linux-mips-low.c (ps_get_thread_area): Likewise.
4330 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4331 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4332 * linux-x86-low.c (ps_get_thread_area): Likewise.
4333 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4335 2016-08-19 Pedro Alves <palves@redhat.com>
4337 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4339 2016-08-19 Pedro Alves <palves@redhat.com>
4341 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4342 comment. Use memcpy instead of casting through unsigned long.
4344 2016-08-19 Pedro Alves <palves@redhat.com>
4346 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4347 allocating around 0x80000000.
4349 2016-08-19 Pedro Alves <palves@redhat.com>
4352 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4353 (x32-avx512-linux-ipa.o): New rules.
4354 * configure.ac (x86_64-*-linux*): New x32 check.
4355 * configure.srv (ipa_x32_linux_regobj): New.
4356 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4357 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4359 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4361 * configure: Regenerate.
4363 2016-08-09 Pedro Alves <palves@redhat.com>
4366 * Makefile.in (OBS): Add signals-state-save-restore.o.
4367 (signals-state-save-restore.o): New rule.
4368 * config.in: Regenerate.
4369 * configure: Regenerate.
4370 * linux-low.c: Include "signals-state-save-restore.h".
4371 (linux_create_inferior): Call
4372 restore_original_signals_state.
4373 * server.c: Include "dispositions-save-restore.h".
4374 (captured_main): Call save_original_signals_state.
4376 2016-08-05 Pedro Alves <palves@redhat.com>
4378 * configure: Regenerate.
4380 2016-08-04 Yao Qi <yao.qi@linaro.org>
4382 * linux-low.c (regsets_fetch_inferior_registers): Check
4383 errno is ESRCH or not.
4385 2016-08-02 Yao Qi <yao.qi@linaro.org>
4387 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4388 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4389 (thread_db_load_search): Update.
4390 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4391 td_ta_set_event and td_ta_event_getmsg.
4393 2016-07-26 Pedro Alves <palves@redhat.com>
4396 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4397 of unsigned long for 64-bit registers and use uint32_t instead of
4398 unsigned int for 32-bit registers.
4400 2016-07-26 Pedro Alves <palves@redhat.com>
4402 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4405 2016-07-21 Tom Tromey <tom@tromey.com>
4407 * configure: Rebuild.
4409 2016-07-21 Yao Qi <yao.qi@linaro.org>
4411 * mem-break.c (find_gdb_breakpoint): Cast bp to
4412 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4414 2016-07-21 Yao Qi <yao.qi@linaro.org>
4416 * server.c (handle_v_requests): Support s and S actions
4417 if target_supports_software_single_step return true.
4419 2016-07-21 Yao Qi <yao.qi@linaro.org>
4421 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4422 is resume_step, call maybe_hw_step.
4423 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4425 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4427 (proceed_one_lwp): If resume request is resume_step, install
4428 reinsert breakpoints and call maybe_hw_step.
4430 2016-07-21 Yao Qi <yao.qi@linaro.org>
4432 * linux-low.c (proceed_one_lwp): Declare.
4433 (linux_resume_one_thread): Remove local variable 'step'.
4434 Lift code enqueue signal. Call proceed_one_lwp instead of
4435 linux_resume_one_lwp.
4437 2016-07-21 Yao Qi <yao.qi@linaro.org>
4439 * linux-low.c (linux_resume_one_thread): Call
4440 enqueue_pending_signal.
4442 2016-07-21 Yao Qi <yao.qi@linaro.org>
4444 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4445 * inferiors.c (do_restore_current_thread_cleanup): New function.
4446 (make_cleanup_restore_current_thread): Likewise.
4447 * linux-low.c (install_software_single_step_breakpoints): Call
4448 make_cleanup_restore_current_thread. Switch current_thread to
4451 2016-07-21 Yao Qi <yao.qi@linaro.org>
4453 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4454 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4455 (clone_one_breakpoint): Likewise.
4456 (delete_reinsert_breakpoints): Change parameter to thread.
4458 (has_reinsert_breakpoints): Likewise.
4459 (uninsert_reinsert_breakpoints): Likewise.
4460 (reinsert_reinsert_breakpoints): Likewise.
4461 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4462 (delete_reinsert_breakpoints): Likewise.
4463 (reinsert_reinsert_breakpoints): Likewise.
4464 (uninsert_reinsert_breakpoints): Likewise.
4465 (has_reinsert_breakpoints): Likewise.
4467 2016-07-21 Yao Qi <yao.qi@linaro.org>
4469 * inferiors.c (get_thread_process): Make parameter const.
4470 * inferiors.h (get_thread_process): Update declaration.
4471 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4472 Add new parameters child_thread and parent_thread. Callers
4474 * mem-break.h (clone_all_breakpoints): Update declaration.
4476 2016-07-21 Yao Qi <yao.qi@linaro.org>
4478 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4479 <command_list, handler>: Remove.
4480 (struct gdb_breakpoint): New.
4481 (struct other_breakpoint): New.
4482 (struct reinsert_breakpoint): New.
4483 (is_gdb_breakpoint): New function.
4484 (any_persistent_commands): Update command_list if
4485 is_gdb_breakpoint returns true.
4486 (set_breakpoint): Create breakpoints according to their types.
4487 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4488 (set_gdb_breakpoint_1): Likewise.
4489 (set_gdb_breakpoint): Likewise.
4490 (clear_breakpoint_conditions): Change parameter type to
4491 'struct gdb_breakpoint *'.
4492 (clear_breakpoint_commands): Likewise.
4493 (clear_breakpoint_conditions_and_commands): Likewise.
4494 (add_condition_to_breakpoint): Likewise.
4495 (add_breakpoint_condition): Likewise.
4496 (add_commands_to_breakpoint): Likewise.
4497 (check_breakpoints): Check other_breakpoint.
4498 (clone_one_breakpoint): Clone breakpopint according to its type.
4499 * mem-break.h (struct gdb_breakpoint): Declare.
4500 (set_gdb_breakpoint): Update declaration.
4501 (clear_breakpoint_conditions_and_commands): Likewise.
4502 (add_breakpoint_condition): Likewise.
4503 (add_breakpoint_commands): Likewise.
4504 * server.c (process_point_options): Change parameter type to
4505 'struct gdb_breakpoint *'.
4507 2016-07-21 Yao Qi <yao.qi@linaro.org>
4509 * mem-break.c (set_breakpoint_at): Rename it to ...
4510 (set_breakpoint_type_at): ... it.
4511 (set_breakpoint_at): Call set_breakpoint_type_at.
4512 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4513 * mem-break.h (set_breakpoint_at): Update comments.
4515 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4517 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4519 (nios2_store_gregset): Likewise.
4521 2016-07-01 Pedro Alves <palves@redhat.com>
4522 Antoine Tremblay <antoine.tremblay@ericsson.com>
4524 * linux-low.c: Change interface to take the target lwp_info
4525 pointer directly and return void. Handle detaching from a zombie
4527 (linux_detach_lwp_callback): New function.
4528 (linux_detach): Detach from the leader thread after detaching from
4531 2016-06-28 Yao Qi <yao.qi@linaro.org>
4533 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4534 for variable new_offset.
4535 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4536 (aarch64_ftrace_insn_reloc_cb): Likewise.
4537 (aarch64_ftrace_insn_reloc_tb): Likewise.
4538 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4539 PRIx64 instead of PRIx32.
4541 2016-06-28 Yao Qi <yao.qi@linaro.org>
4543 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4544 (the_low_target): Install arm_get_syscall_trapinfo.
4546 2016-06-28 Yao Qi <yao.qi@linaro.org>
4548 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4550 (the_low_target): Install aarch64_get_syscall_trapinfo.
4552 2016-06-28 Yao Qi <yao.qi@linaro.org>
4554 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4556 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4557 Remove parameter sysno.
4558 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4561 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4563 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4564 (s390_emit_ne_goto): Likewise.
4565 (s390_emit_lt_goto): Likewise.
4566 (s390_emit_le_goto): Likewise.
4567 (s390_emit_gt_goto): Likewise.
4568 (s390_emit_ge_goto): Likewise.
4569 (s390x_emit_eq_goto): Likewise.
4570 (s390x_emit_ne_goto): Likewise.
4571 (s390x_emit_lt_goto): Likewise.
4572 (s390x_emit_le_goto): Likewise.
4573 (s390x_emit_gt_goto): Likewise.
4574 (s390x_emit_ge_goto): Likewise.
4575 (s390_emit_ops_impl): Mark variable static.
4576 (s390x_emit_ops): Likewise.
4578 2016-06-17 Yao Qi <yao.qi@linaro.org>
4580 * linux-low.c (handle_extended_wait): Call
4581 uninsert_reinsert_breakpoints for the parent process. Remove
4582 reinsert breakpoints from the child process. Reinsert them to
4583 the parent process when vfork is done.
4584 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4585 (reinsert_reinsert_breakpoints): New function.
4586 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4587 (reinsert_reinsert_breakpoints): Declare.
4589 2016-06-17 Yao Qi <yao.qi@linaro.org>
4591 * linux-low.c (handle_extended_wait): If the parent is doing
4592 step-over, remove the reinsert breakpoints from the forked child.
4594 2016-06-17 Yao Qi <yao.qi@linaro.org>
4596 * linux-low.c (unsuspend_all_lwps): Declare.
4597 (linux_low_filter_event): If thread exited, call finish_step_over.
4598 If step-over is finished, unsuspend other threads.
4600 2016-06-17 Yao Qi <yao.qi@linaro.org>
4602 * linux-low.c (linux_resume_one_lwp_throw): Assert
4603 has_reinsert_breakpoints returns false.
4604 * mem-break.c (delete_disabled_breakpoints): Assert
4605 bp type isn't reinsert_breakpoint.
4607 2016-06-17 Yao Qi <yao.qi@linaro.org>
4609 * linux-low.c (maybe_hw_step): New function.
4610 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4611 (finish_step_over): Switch current_thread to lwp temporarily,
4612 and assert has_reinsert_breakpoints returns true.
4613 (proceed_one_lwp): Call maybe_hw_step.
4614 * mem-break.c (has_reinsert_breakpoints): New function.
4615 * mem-break.h (has_reinsert_breakpoints): Declare.
4617 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4619 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4621 2016-05-17 Yao Qi <yao.qi@linaro.org>
4623 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4624 instead of find_inferior.
4626 2016-05-05 Yao Qi <yao.qi@linaro.org>
4628 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4629 Initialize res to zero.
4631 2016-05-05 Yao Qi <yao.qi@linaro.org>
4633 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4636 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4638 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4639 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4640 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4642 2016-04-28 Par Olsson <par.olsson@windriver.com>
4643 Simon Marchi <simon.marchi@ericsson.com>
4645 * tracepoint.c (write_inferior_int8): New function.
4646 (cmd_qtenable_disable): Write enable flag using
4647 write_inferior_int8.
4649 2016-04-25 Yao Qi <yao.qi@linaro.org>
4651 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4652 (need_step_over_p): Return zero if the LWP has pending signals
4653 can be delivered on software single step target.
4655 2016-04-25 Yao Qi <yao.qi@linaro.org>
4657 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4658 return instead of error.
4660 2016-04-22 Yao Qi <yao.qi@linaro.org>
4662 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4665 2016-04-22 Yao Qi <yao.qi@linaro.org>
4667 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4668 signal when stepping over breakpoint with software single
4671 2016-04-21 Pedro Alves <palves@redhat.com>
4673 * linux-s390-low.c (s390_collect_ptrace_register)
4674 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4676 (s390_check_regset): Use void * instead of gdb_byte *.
4678 2016-04-20 Pedro Alves <palves@redhat.com>
4680 * configure: Renegerate.
4682 2016-04-20 Yao Qi <yao.qi@linaro.org>
4684 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4685 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4687 (arm_store_gregset): Likewise.
4689 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4691 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4692 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4693 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4694 (amd64-avx-mpx-linux.c): New rules.
4695 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4696 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4697 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4698 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4699 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4700 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4701 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4702 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4703 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4704 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4705 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4706 * linux-x86-low.c (x86_linux_read_description): Add case for
4707 X86_XSTATE_AVX_MPX_MASK.
4708 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4709 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4710 init_registers_i386_avx_mpx_linux.
4711 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4712 (initialize_low_tracepoint): Call
4713 init_registers_i386_avx_mpx_linux.
4714 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4715 (initialize_low_tracepoint): Call
4716 init_registers_amd64_avx_mpx_linux.
4717 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4718 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4719 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4722 2016-04-18 Pedro Alves <palves@redhat.com>
4724 * configure: Regenerate.
4726 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4728 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4729 (aarch64_emit_sub): Likewise.
4731 2016-04-12 Pedro Alves <palves@redhat.com>
4733 * utils.c (prepare_to_throw_exception): Delete.
4735 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4737 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4739 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4741 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4743 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4745 * linux-aarch64-ipa.c: Add <elf.h> include.
4746 * linux-ppc-ipa.c: Add <elf.h> include.
4747 * linux-s390-ipa.c: Add <elf.h> include.
4749 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4751 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4752 (get_raw_reg_ptr): Likewise.
4753 (get_trace_state_variable_value_ptr): Likewise.
4754 (set_trace_state_variable_value_ptr): Likewise.
4755 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4758 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4759 Marcin Kościelnicki <koriakin@0x04.net>
4762 * linux-ppc-low.c (emit_insns): New function.
4763 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4764 (ppc_emit_prologue): New function.
4765 (ppc_emit_epilogue): New function.
4766 (ppc_emit_add): New function.
4767 (ppc_emit_sub): New function.
4768 (ppc_emit_mul): New function.
4769 (ppc_emit_lsh): New function.
4770 (ppc_emit_rsh_signed): New function.
4771 (ppc_emit_rsh_unsigned): New function.
4772 (ppc_emit_ext): New function.
4773 (ppc_emit_zero_ext): New function.
4774 (ppc_emit_log_not): New function.
4775 (ppc_emit_bit_and): New function.
4776 (ppc_emit_bit_or): New function.
4777 (ppc_emit_bit_xor): New function.
4778 (ppc_emit_bit_not): New function.
4779 (ppc_emit_equal): New function.
4780 (ppc_emit_less_signed): New function.
4781 (ppc_emit_less_unsigned): New function.
4782 (ppc_emit_ref): New function.
4783 (ppc_emit_const): New function.
4784 (ppc_emit_reg): New function.
4785 (ppc_emit_pop): New function.
4786 (ppc_emit_stack_flush): New function.
4787 (ppc_emit_swap): New function.
4788 (ppc_emit_stack_adjust): New function.
4789 (ppc_emit_call): New function.
4790 (ppc_emit_int_call_1): New function.
4791 (ppc_emit_void_call_2): New function.
4792 (ppc_emit_if_goto): New function.
4793 (ppc_emit_goto): New function.
4794 (ppc_emit_eq_goto): New function.
4795 (ppc_emit_ne_goto): New function.
4796 (ppc_emit_lt_goto): New function.
4797 (ppc_emit_le_goto): New function.
4798 (ppc_emit_gt_goto): New function.
4799 (ppc_emit_ge_goto): New function.
4800 (ppc_write_goto_address): New function.
4801 (ppc_emit_ops_impl): New static variable.
4802 (ppc64v1_emit_prologue): New function.
4803 (ppc64v2_emit_prologue): New function.
4804 (ppc64_emit_epilogue): New function.
4805 (ppc64_emit_add): New function.
4806 (ppc64_emit_sub): New function.
4807 (ppc64_emit_mul): New function.
4808 (ppc64_emit_lsh): New function.
4809 (ppc64_emit_rsh_signed): New function.
4810 (ppc64_emit_rsh_unsigned): New function.
4811 (ppc64_emit_ext): New function.
4812 (ppc64_emit_zero_ext): New function.
4813 (ppc64_emit_log_not): New function.
4814 (ppc64_emit_bit_and): New function.
4815 (ppc64_emit_bit_or): New function.
4816 (ppc64_emit_bit_xor): New function.
4817 (ppc64_emit_bit_not): New function.
4818 (ppc64_emit_equal): New function.
4819 (ppc64_emit_less_signed): New function.
4820 (ppc64_emit_less_unsigned): New function.
4821 (ppc64_emit_ref): New function.
4822 (ppc64_emit_const): New function.
4823 (ppc64v1_emit_reg): New function.
4824 (ppc64v2_emit_reg): New function.
4825 (ppc64_emit_pop): New function.
4826 (ppc64_emit_stack_flush): New function.
4827 (ppc64_emit_swap): New function.
4828 (ppc64v1_emit_call): New function.
4829 (ppc64v2_emit_call): New function.
4830 (ppc64v1_emit_int_call_1): New function.
4831 (ppc64v2_emit_int_call_1): New function.
4832 (ppc64v1_emit_void_call_2): New function.
4833 (ppc64v2_emit_void_call_2): New function.
4834 (ppc64_emit_if_goto): New function.
4835 (ppc64_emit_eq_goto): New function.
4836 (ppc64_emit_ne_goto): New function.
4837 (ppc64_emit_lt_goto): New function.
4838 (ppc64_emit_le_goto): New function.
4839 (ppc64_emit_gt_goto): New function.
4840 (ppc64_emit_ge_goto): New function.
4841 (ppc64v1_emit_ops_impl): New static variable.
4842 (ppc64v2_emit_ops_impl): New static variable.
4843 (ppc_emit_ops): New function.
4844 (linux_low_target): Wire in ppc_emit_ops.
4846 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4847 Marcin Kościelnicki <koriakin@0x04.net>
4850 * Makefile.in: Add powerpc-*-ipa.o
4851 * configure.srv: Add ipa_obj for powerpc*-linux.
4852 * linux-ppc-ipa.c: New file.
4853 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4855 (PPC_FIELD): New macro.
4856 (PPC_SEXT): New macro.
4857 (PPC_OP6): New macro.
4858 (PPC_BO): New macro.
4859 (PPC_LI): New macro.
4860 (PPC_BD): New macro.
4861 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4862 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4863 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4864 (ppc_get_thread_area): New function.
4865 (is_elfv2_inferior): New function.
4866 (gen_ds_form): New function.
4867 (GEN_STD): New macro.
4868 (GEN_STDU): New macro.
4869 (GEN_LD): New macro.
4870 (GEN_LDU): New macro.
4871 (gen_d_form): New function.
4872 (GEN_ADDI): New macro.
4873 (GEN_ADDIS): New macro.
4874 (GEN_LI): New macro.
4875 (GEN_LIS): New macro.
4876 (GEN_ORI): New macro.
4877 (GEN_ORIS): New macro.
4878 (GEN_LWZ): New macro.
4879 (GEN_STW): New macro.
4880 (GEN_STWU): New macro.
4881 (gen_xfx_form): New function.
4882 (GEN_MFSPR): New macro.
4883 (GEN_MTSPR): New macro.
4884 (GEN_MFCR): New macro.
4885 (GEN_MTCR): New macro.
4886 (GEN_SYNC): New macro.
4887 (GEN_LWSYNC): New macro.
4888 (gen_x_form): New function.
4889 (GEN_OR): New macro.
4890 (GEN_MR): New macro.
4891 (GEN_LWARX): New macro.
4892 (GEN_STWCX): New macro.
4893 (GEN_CMPW): New macro.
4894 (gen_md_form): New function.
4895 (GEN_RLDICL): New macro.
4896 (GEN_RLDICR): New macro.
4897 (gen_i_form): New function.
4899 (GEN_BL): New macro.
4900 (gen_b_form): New function.
4901 (GEN_BNE): New macro.
4902 (GEN_LOAD): New macro.
4903 (GEN_STORE): New macro.
4904 (gen_limm): New function.
4905 (gen_atomic_xchg): New function.
4906 (gen_call): New function.
4907 (ppc_relocate_instruction): New function.
4908 (ppc_install_fast_tracepoint_jump_pad): New function.
4909 (ppc_get_min_fast_tracepoint_insn_len): New function.
4910 (ppc_get_ipa_tdesc_idx): New function.
4911 (the_low_target): Wire in the new functions.
4912 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4914 * linux-ppc-tdesc.h: New file.
4916 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4918 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4919 (alloc_jump_pad_buffer): New function.
4920 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4921 (alloc_jump_pad_buffer): New function.
4922 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4923 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4924 (alloc_jump_pad_buffer): New function.
4925 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4926 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4927 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4928 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4930 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4932 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4933 * linux-amd64-ipa.c: Likewise.
4934 * linux-i386-ipa.c: Likewise.
4935 * linux-s390-ipa.c: Likewise.
4936 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4937 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4938 set_trace_state_variable_value_ptr.
4939 (struct ipa_sym_addresses): Likewise.
4940 (symbol_list): Likewise.
4941 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4942 accessing gdb_collect directly.
4943 (gdb_collect_ptr_type): New typedef.
4944 (get_raw_reg_ptr_type): New typedef.
4945 (get_trace_state_variable_value_ptr_type): New typedef.
4946 (set_trace_state_variable_value_ptr_type): New typedef.
4947 (gdb_collect_ptr): New global.
4948 (get_raw_reg_ptr): New global.
4949 (get_trace_state_variable_value_ptr): New global.
4950 (set_trace_state_variable_value_ptr): New global.
4951 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4952 accessing get_raw_reg directly.
4953 (get_get_tsv_func_addr): Likewise for
4954 get_trace_state_variable_value_ptr.
4955 (get_set_tsv_func_addr): Likewise for
4956 set_trace_state_variable_value_ptr.
4957 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4959 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4961 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4963 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4965 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4967 (relocate_instruction): Remove own_buf.
4968 * server.c (own_buf): Make global.
4969 (handle_v_requests): Make global.
4970 * server.h (own_buf): New declaration.
4971 (handle_v_requests): New prototype.
4973 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4976 * linux-s390-low.c (add_insns): New function.
4977 (s390_emit_prologue): New function.
4978 (s390_emit_epilogue): New function.
4979 (s390_emit_add): New function.
4980 (s390_emit_sub): New function.
4981 (s390_emit_mul): New function.
4982 (s390_emit_lsh): New function.
4983 (s390_emit_rsh_signed): New function.
4984 (s390_emit_rsh_unsigned): New function.
4985 (s390_emit_ext): New function.
4986 (s390_emit_log_not): New function.
4987 (s390_emit_bit_and): New function.
4988 (s390_emit_bit_or): New function.
4989 (s390_emit_bit_xor): New function.
4990 (s390_emit_bit_not): New function.
4991 (s390_emit_equal): New function.
4992 (s390_emit_less_signed): New function.
4993 (s390_emit_less_unsigned): New function.
4994 (s390_emit_ref): New function.
4995 (s390_emit_if_goto): New function.
4996 (s390_emit_goto): New function.
4997 (s390_write_goto_address): New function.
4998 (s390_emit_litpool): New function.
4999 (s390_emit_const): New function.
5000 (s390_emit_call): New function.
5001 (s390_emit_reg): New function.
5002 (s390_emit_pop): New function.
5003 (s390_emit_stack_flush): New function.
5004 (s390_emit_zero_ext): New function.
5005 (s390_emit_swap): New function.
5006 (s390_emit_stack_adjust): New function.
5007 (s390_emit_set_r2): New function.
5008 (s390_emit_int_call_1): New function.
5009 (s390_emit_void_call_2): New function.
5010 (s390_emit_eq_goto): New function.
5011 (s390_emit_ne_goto): New function.
5012 (s390_emit_lt_goto): New function.
5013 (s390_emit_le_goto): New function.
5014 (s390_emit_gt_goto): New function.
5015 (s390_emit_ge_goto): New function.
5016 (s390x_emit_prologue): New function.
5017 (s390x_emit_epilogue): New function.
5018 (s390x_emit_add): New function.
5019 (s390x_emit_sub): New function.
5020 (s390x_emit_mul): New function.
5021 (s390x_emit_lsh): New function.
5022 (s390x_emit_rsh_signed): New function.
5023 (s390x_emit_rsh_unsigned): New function.
5024 (s390x_emit_ext): New function.
5025 (s390x_emit_log_not): New function.
5026 (s390x_emit_bit_and): New function.
5027 (s390x_emit_bit_or): New function.
5028 (s390x_emit_bit_xor): New function.
5029 (s390x_emit_bit_not): New function.
5030 (s390x_emit_equal): New function.
5031 (s390x_emit_less_signed): New function.
5032 (s390x_emit_less_unsigned): New function.
5033 (s390x_emit_ref): New function.
5034 (s390x_emit_if_goto): New function.
5035 (s390x_emit_const): New function.
5036 (s390x_emit_call): New function.
5037 (s390x_emit_reg): New function.
5038 (s390x_emit_pop): New function.
5039 (s390x_emit_stack_flush): New function.
5040 (s390x_emit_zero_ext): New function.
5041 (s390x_emit_swap): New function.
5042 (s390x_emit_stack_adjust): New function.
5043 (s390x_emit_int_call_1): New function.
5044 (s390x_emit_void_call_2): New function.
5045 (s390x_emit_eq_goto): New function.
5046 (s390x_emit_ne_goto): New function.
5047 (s390x_emit_lt_goto): New function.
5048 (s390x_emit_le_goto): New function.
5049 (s390x_emit_gt_goto): New function.
5050 (s390x_emit_ge_goto): New function.
5051 (s390_emit_ops): New function.
5052 (struct linux_target_ops): Fill in emit_ops hook.
5054 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5057 * Makefile.in: Add s390 IPA files.
5058 * configure.srv: Build IPA for s390.
5059 * linux-s390-ipa.c: New file.
5060 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5061 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5062 (tdesc_s390_linux32): Likewise.
5063 (init_registers_s390_linux32v1): Likewise.
5064 (tdesc_s390_linux32v1): Likewise.
5065 (init_registers_s390_linux32v2): Likewise.
5066 (tdesc_s390_linux32v2): Likewise.
5067 (init_registers_s390_linux64): Likewise.
5068 (tdesc_s390_linux64): Likewise.
5069 (init_registers_s390_linux64v1): Likewise.
5070 (tdesc_s390_linux64v1): Likewise.
5071 (init_registers_s390_linux64v2): Likewise.
5072 (tdesc_s390_linux64v2): Likewise.
5073 (init_registers_s390_te_linux64): Likewise.
5074 (tdesc_s390_te_linux64): Likewise.
5075 (init_registers_s390_vx_linux64): Likewise.
5076 (tdesc_s390_vx_linux64): Likewise.
5077 (init_registers_s390_tevx_linux64): Likewise.
5078 (tdesc_s390_tevx_linux64): Likewise.
5079 (init_registers_s390x_linux64): Likewise.
5080 (tdesc_s390x_linux64): Likewise.
5081 (init_registers_s390x_linux64v1): Likewise.
5082 (tdesc_s390x_linux64v1): Likewise.
5083 (init_registers_s390x_linux64v2): Likewise.
5084 (tdesc_s390x_linux64v2): Likewise.
5085 (init_registers_s390x_te_linux64): Likewise.
5086 (tdesc_s390x_te_linux64): Likewise.
5087 (init_registers_s390x_vx_linux64): Likewise.
5088 (tdesc_s390x_vx_linux64): Likewise.
5089 (init_registers_s390x_tevx_linux64): Likewise.
5090 (tdesc_s390x_tevx_linux64): Likewise.
5091 (have_hwcap_s390_vx): New static variable.
5092 (s390_arch_setup): Fill have_hwcap_s390_vx.
5093 (s390_get_thread_area): New function.
5094 (s390_ft_entry_gpr_esa): New const.
5095 (s390_ft_entry_gpr_zarch): New const.
5096 (s390_ft_entry_misc): New const.
5097 (s390_ft_entry_fr): New const.
5098 (s390_ft_entry_vr): New const.
5099 (s390_ft_main_31): New const.
5100 (s390_ft_main_64): New const.
5101 (s390_ft_exit_fr): New const.
5102 (s390_ft_exit_vr): New const.
5103 (s390_ft_exit_misc): New const.
5104 (s390_ft_exit_gpr_esa): New const.
5105 (s390_ft_exit_gpr_zarch): New const.
5106 (append_insns): New function.
5107 (s390_relocate_instruction): New function.
5108 (s390_install_fast_tracepoint_jump_pad): New function.
5109 (s390_get_min_fast_tracepoint_insn_len): New function.
5110 (s390_get_ipa_tdesc_idx): New function.
5111 (struct linux_target_ops): Wire in the above functions.
5112 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5113 * linux-s390-tdesc.h: New file.
5115 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5117 * linux-s390-low.c (s390_supports_tracepoints): New function.
5118 (struct linux_target_ops): Fill supports_tracepoints hook.
5120 2016-03-18 Yao Qi <yao.qi@linaro.org>
5122 * linux-low.c (lwp_signal_can_be_delivered): New function.
5123 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5125 2016-03-18 Yao Qi <yao.qi@linaro.org>
5127 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5128 0 if signal is enqueued. Remove 'signal' from one debugging
5129 message. Move one debugging message to some lines below.
5130 Remove code setting 'signal' to 0.
5132 2016-03-18 Yao Qi <yao.qi@linaro.org>
5134 * linux-low.c (linux_low_filter_event): Remove redundant
5135 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5137 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5139 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5140 (struct linux_target_ops): Wire in the above.
5142 2016-03-03 Yao Qi <yao.qi@linaro.org>
5144 * linux-low.c: Update comments to start_step_over.
5146 2016-03-03 Yao Qi <yao.qi@linaro.org>
5149 * linux-low.c (handle_extended_wait): Set child suspended
5150 if event_lwp->bp_reinsert isn't zero.
5152 2016-03-02 Yao Qi <yao.qi@linaro.org>
5154 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5155 enqueue_pending_signal.
5157 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5159 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5162 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5164 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5165 (s390_regmap_3264) [!__s390x__]: New global.
5166 (s390_collect_ptrace_register): Skip map entries containing -1.
5167 (s390_supply_ptrace_register): Ditto.
5168 (s390_fill_gprs_high): New function.
5169 (s390_store_gprs_high): New function.
5170 (s390_regsets): Add NT_S390_HIGH_GPRS.
5171 (s390_get_hwcap): Enable on 31-bit.
5172 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5173 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5174 Detect NT_S390_HIGH_GPRS.
5175 (s390_usrregs_info_3264): Enable on 31-bit.
5176 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5177 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5179 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5182 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5183 * configure.srv: Ditto.
5184 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5185 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5186 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5187 (init_registers_amd64_linux): Remove prototype.
5188 (tdesc_amd64_linux): Remove declaration.
5189 (get_ipa_tdesc): New function.
5190 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5191 initialize remaining tdescs.
5192 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5193 (init_registers_i386_linux): Remove prototype.
5194 (tdesc_i386_linux): Remove declaration.
5195 (get_ipa_tdesc): New function.
5196 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5197 initialize remaining tdescs.
5198 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5199 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5200 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5201 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5202 (x86_get_ipa_tdesc_idx): New function.
5203 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5204 * linux-x86-tdesc.h: New file.
5205 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5206 (target_get_ipa_tdesc_idx): New macro.
5207 * tracepoint.c (ipa_tdesc_idx): New macro.
5208 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5209 (symbol_list): Add ipa_tdesc_idx.
5210 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5211 (ipa_tdesc): Remove.
5212 (ipa_tdesc_idx): New variable.
5213 (get_context_regcache): Use get_ipa_tdesc.
5214 (gdb_collect): Ditto.
5216 * tracepoint.h (get_ipa_tdesc): New prototype.
5217 (ipa_tdesc): Remove.
5219 2016-02-24 Pedro Alves <palves@redhat.com>
5221 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5222 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5223 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5224 Factor out common code between the USE_SIGTRAP_SIGINFO and
5225 !USE_SIGTRAP_SIGINFO blocks.
5226 (linux_low_filter_event): Call save_stop_reason instead of
5227 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5229 (linux_wait_1): Update comments.
5231 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5233 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5234 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5235 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5236 ppc_insert_point, ppc_remove_point.
5238 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5240 * linux-s390-low.c (s390_supports_z_point_type): New function.
5241 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5243 2016-02-16 Yao Qi <yao.qi@linaro.org>
5245 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5246 PC. Get pc from regcache_read_pc.
5248 2016-02-12 Yao Qi <yao.qi@linaro.org>
5250 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5251 or linux_get_pc_32bit.
5252 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5254 2016-02-12 Yao Qi <yao.qi@linaro.org>
5256 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5257 arm_linux_get_next_pcs_fixup.
5259 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5261 * tracepoint.c (x_tracepoint_action_download): Change
5262 write_inferior_data_ptr to write_inferior_data_pointer.
5263 (cmd_qtstart): Likewise.
5264 (write_inferior_data_ptr): Remove.
5265 (download_agent_expr): Change write_inferior_data_ptr to
5266 write_inferior_data_pointer.
5267 (download_tracepoint_1): Likewise.
5268 (download_tracepoint): Likewise.
5269 (download_trace_state_variables): Likewise.
5271 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5272 Marcin Kościelnicki <koriakin@0x04.net>
5274 * tracepoint.c (struct tracepoint_action_ops): Remove.
5275 (struct tracepoint_action): Remove ops.
5276 (m_tracepoint_action_download, r_tracepoint_action_download)
5277 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5278 size and offset accordingly.
5279 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5280 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5281 (tracepoint_action_send, tracepoint_action_download): New functions.
5282 Helpers for trace action handlers.
5283 (add_tracepoint_action): Remove setup actions ops.
5284 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5286 2016-02-10 Yao Qi <yao.qi@linaro.org>
5288 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5290 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5292 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5294 * configure: Regenerate.
5296 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5298 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5299 void * to gdb_byte *.
5300 * linux-low.c (siginfo_fixup): Likewise.
5301 (linux_xfer_siginfo): Likewise.
5302 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5304 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5306 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5308 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5310 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5312 * linux-x86-low.c [__x86_64__]: Include
5313 "nat/amd64-linux-siginfo.h".
5314 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5315 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5316 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5317 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5318 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5319 (cpt_si_fd, si_timerid, si_overrun): Move from
5320 nat/amd64-linux-siginfo.c.
5321 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5323 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5325 * server.c (skip_to_semicolon): Remove.
5326 (process_point_options): Use strchrnul instead of
5329 2016-01-26 Yao Qi <yao.qi@linaro.org>
5331 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5332 * linux-low.c (install_software_single_step_breakpoints): Don't
5333 call regcache_read_pc.
5334 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5337 2016-01-26 Yao Qi <yao.qi@linaro.org>
5339 * linux-low.c (install_software_single_step_breakpoints): Call
5340 regcache_read_pc instead of get_pc.
5342 2016-01-26 Yao Qi <yao.qi@linaro.org>
5344 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5345 (unblock_async_io): Rename to ...
5346 (block_unblock_async_io): ... it. New function.
5347 (enable_async_io): Don't install SIGIO handler. Unblock it
5349 (disable_async_io): Don't ignore SIGIO. Block it instead.
5350 (initialize_async_io): Install SIGIO handler. Don't call
5353 2016-01-26 Yao Qi <yao.qi@linaro.org>
5355 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5356 first character is '\003', call *the_target->request_interrupt.
5358 2016-01-25 Yao Qi <yao.qi@linaro.org>
5360 * remote-utils.c (new_thread_notify): Remove.
5361 (dead_thread_notify): Likewise.
5362 * remote-utils.h (new_thread_notify): Remove declaration.
5363 (dead_thread_notify): Likewise.
5365 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5367 * gdb.trace/pending.exp: Fix expected message on continue.
5369 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5371 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5372 it works properly on big-endian machines where sizeof (CORE_ADDR)
5375 2016-01-21 Pedro Alves <palves@redhat.com>
5377 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5378 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5379 * configure: Regenerate.
5381 2016-01-21 Yao Qi <yao.qi@linaro.org>
5383 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5384 is_thumb and set it according to CPSR saved on the stack.
5385 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5386 arm_sigreturn_next_pc.
5388 2016-01-18 Yao Qi <yao.qi@linaro.org>
5390 * linux-low.c (linux_set_pc_64bit): New function.
5391 (linux_get_pc_64bit): New function.
5392 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5394 * linux-sparc-low.c (debug_threads): Remove declaration.
5395 (sparc_get_pc): Remove.
5396 (the_low_target): Use linux_get_pc_64bit instead of
5398 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5399 (the_low_target): Use linux_get_pc_64bit and
5402 2016-01-18 Yao Qi <yao.qi@linaro.org>
5404 * linux-arm-low.c (debug_threads): Remove declaration.
5405 (arm_get_pc, arm_set_pc): Remove.
5406 (the_low_target): Use linux_get_pc_32bit and
5408 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5409 (the_low_target): Use linux_get_pc_32bit and
5411 * linux-cris-low.c (debug_threads): Remove declaration.
5412 (cris_get_pc, cris_set_pc,): Remove.
5413 (the_low_target): Use linux_get_pc_32bit and
5415 * linux-crisv32-low.c (debug_threads): Remove declaration.
5416 (cris_get_pc, cris_set_pc): Remove.
5417 (the_low_target): Use linux_get_pc_32bit and
5419 * linux-low.c: Include inttypes.h.
5420 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5421 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5422 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5423 (the_low_target): Use linux_get_pc_32bit and
5425 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5426 (the_low_target): Use linux_get_pc_32bit and
5428 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5429 (the_low_target): Use linux_get_pc_32bit and
5431 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5432 (the_low_target): Use linux_get_pc_32bit and
5434 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5435 (the_low_target): Use linux_get_pc_32bit and
5438 2016-01-18 Gary Benson <gbenson@redhat.com>
5440 * configure.ac (AC_FUNC_FORK): New check.
5441 * config.in: Regenerate.
5442 * configure: Likewise.
5444 2016-01-14 Yao Qi <yao.qi@linaro.org>
5446 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5447 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5448 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5449 arm_get_next_pcs_ctor.
5451 2016-01-12 Josh Stone <jistone@redhat.com>
5452 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5454 * inferiors.h: Include "gdb_vecs.h".
5455 (struct process_info): Add syscalls_to_catch.
5456 * inferiors.c (remove_process): Free syscalls_to_catch.
5457 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5458 syscall_return stops.
5459 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5460 * server.c (handle_general_set): Handle QCatchSyscalls.
5461 (handle_query): Report support for QCatchSyscalls.
5462 * target.h (struct target_ops): Add supports_catch_syscall.
5463 (target_supports_catch_syscall): New macro.
5464 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5465 (struct lwp_info): Add syscall_state.
5466 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5467 Maintain syscall_state and syscalls_to_catch across exec.
5468 (get_syscall_trapinfo): New function, proxy to the_low_target.
5469 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5470 (linux_low_filter_event): Toggle syscall_state entry/return for
5471 syscall traps, and set it ignored for all others.
5472 (gdb_catching_syscalls_p): New function.
5473 (gdb_catch_this_syscall_p): New function.
5474 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5475 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5476 (linux_supports_catch_syscall): New function.
5477 (linux_target_ops): Install it.
5478 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5479 (the_low_target): Install it.
5481 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5483 * acinclude.m4: Include new ../warning.m4 file.
5484 * configure: Regenerated.
5485 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5487 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5489 * ax.c (is_goto_target): Mark static.
5490 * linux-low.c (register_addr): Likewise.
5491 (linux_fetch_registers, linux_store_registers): Likewise.
5492 * mem-break.c (any_persistent_commands): Fix old prototype.
5493 (add_commands_to_breakpoint): Mark static.
5494 * regcache.c (find_register_by_name): Delete unused func.
5495 * remote-utils.c (hex_or_minus_one): Mark static.
5496 * server.c (monitor_show_help): Mark static.
5497 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5498 handle_v_requests): Likewise.
5500 2016-01-12 Pedro Alves <palves@redhat.com>
5502 Remove use of the registered trademark symbol throughout.
5504 2016-01-08 Yao Qi <yao.qi@linaro.org>
5506 * remote-utils.c (getpkt): If c is '\003', call target hook
5509 2016-01-06 Yao Qi <yao.qi@linaro.org>
5511 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5512 linux-aarch32-low.c.
5513 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5514 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5515 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5516 (thumb2_breakpoint): Declare.
5517 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5518 linux-aarch32-low.h.
5519 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5520 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5521 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5523 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5525 * gdbreplay.c (gdbreplay_version): Change copyright year in
5527 * server.c (gdbserver_version): Likewise.
5529 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5531 * server.c (crc32_table): Delete.
5532 (crc32): Use libiberty's xcrc32 function.
5534 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5536 * lynx-low.c (lynx_delete_thread_callback): New function.
5537 (lynx_mourn): Properly delete our process and all of its
5538 threads. Remove call to clear_inferiors.
5540 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5542 * target.c (thread_search_callback): Add check that
5543 the thread_stopped target callback is not NULL before
5546 2015-12-21 Yao Qi <yao.qi@linaro.org>
5548 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5551 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5553 * server.c (handle_query): Call target_supports_software_single_step.
5555 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5557 * linux-low.c (single_step): New function.
5558 (linux_resume_one_lwp_throw): Call single_step.
5559 (start_step_over): Likewise.
5561 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5563 * Makefile.in (SFILES): Append arch/arm-linux.c,
5564 arch/arm-get-next-pcs.c.
5565 (arm-linux.o): New rule.
5566 (arm-get-next-pcs.o): New rule.
5567 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5569 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5570 to linux-aarch32-low.c.
5571 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5572 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5573 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5574 (thumb2_breakpoint_len): Likewise.
5575 (arm_is_thumb_mode): Make non-static.
5576 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5577 from linux-aarch32-low.c.
5578 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5579 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5580 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5581 (thumb2_breakpoint_len): Likewise.
5582 (arm_is_thumb_mode): New declaration.
5583 * linux-arm-low.c: Include arch/arm-linux.h
5584 aarch/arm-get-next-pcs.h, sys/syscall.h.
5585 (get_next_pcs_ops): New struct.
5586 (get_next_pcs_addr_bits_remove): New function.
5587 (get_next_pcs_is_thumb): New function.
5588 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5589 (arm_sigreturn_next_pc): Likewise.
5590 (get_next_pcs_syscall_next_pc): Likewise.
5591 (arm_gdbserver_get_next_pcs): Likewise.
5592 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5594 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5595 * server.h: Include gdb_vecs.h.
5597 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5599 * Makefile.in (SFILES): Append common/common-regcache.c.
5600 (OBS): Append common-regcache.o.
5601 (common-regcache.o): New rule.
5602 * regcache.c (init_register_cache): Initialize cache to
5604 (regcache_raw_read_unsigned): New function.
5605 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5606 register_status enum.
5608 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5610 * linux-aarch64-low.c (the_low_targets): Rename
5611 breakpoint_reinsert_addr to get_next_pcs.
5612 * linux-arm-low.c (the_low_targets): Likewise.
5613 * linux-bfin-low.c (the_low_targets): Likewise.
5614 * linux-cris-low.c (the_low_targets): Likewise.
5615 * linux-crisv32-low.c (the_low_targets): Likewise.
5616 * linux-low.c (can_software_single_step): Likewise.
5617 (install_software_single_step_breakpoints): New function.
5618 (start_step_over): Use install_software_single_step_breakpoints.
5619 * linux-low.h: New CORE_ADDR vector.
5620 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5622 * linux-mips-low.c (the_low_targets): Likewise.
5623 * linux-nios2-low.c (the_low_targets): Likewise.
5624 * linux-sparc-low.c (the_low_targets): Likewise.
5626 2015-12-17 Pedro Alves <palves@redhat.com>
5628 * linux-low.c (linux_kill_one_lwp): Remove references to
5630 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5632 (linux_init_signals): Delete.
5633 (initialize_low): Adjust.
5634 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5636 2015-12-16 Pedro Alves <palves@redhat.com>
5638 * configure.ac (compiler warning flags): When testing a
5639 -Wno-foo option, check whether -Wfoo works instead.
5640 * configure: Regenerate.
5642 2015-12-11 Don Breazeal <donb@codesourcery.com>
5644 * server.c (process_serial_event): Don't exit from gdbserver
5645 in remote mode if there are still active inferiors.
5647 2015-12-11 Yao Qi <yao.qi@linaro.org>
5649 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5650 arm_breakpoint_at if the process is 32-bit.
5652 2015-12-11 Yao Qi <yao.qi@linaro.org>
5654 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5657 2015-12-07 Yao Qi <yao.qi@linaro.org>
5659 * configure.srv: Append arm.o to srv_tgtobj for
5660 aarch64*-*-linux* target.
5661 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5662 from linux-arm-low.c.
5663 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5664 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5665 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5666 (thumb2_breakpoint_len): Likewise.
5667 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5668 (arm_breakpoint_kinds): Likewise.
5669 (arm_breakpoint_kind_from_pc): Likewise.
5670 (arm_sw_breakpoint_from_kind): Likewise.
5671 (arm_breakpoint_kind_from_current_state): Likewise.
5672 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5673 (arm_sw_breakpoint_from_kind): Declare.
5674 (arm_breakpoint_kind_from_current_state): Declare.
5675 (arm_breakpoint_at): Declare.
5676 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5677 arm_sw_breakpoint_from_kind if process is 32-bit.
5678 (aarch64_breakpoint_kind_from_pc): New function.
5679 (aarch64_breakpoint_kind_from_current_state): New function.
5680 (the_low_target): Initialize fields breakpoint_kind_from_pc
5681 and breakpoint_kind_from_current_state.
5682 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5683 linux-aarch32-low.c.
5684 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5685 (arm_breakpoint, arm_breakpoint_len): Likewise.
5686 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5687 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5688 (arm_is_thumb_mode): Likewise.
5689 (arm_breakpoint_at): Likewise.
5690 (arm_breakpoint_kind_from_pc): Likewise.
5691 (arm_sw_breakpoint_from_kind): Likewise.
5692 (arm_breakpoint_kind_from_current_state): Likewise.
5695 2015-08-04 Yao Qi <yao.qi@linaro.org>
5697 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5698 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5699 * server.c (extended_protocol): Remove "static".
5700 * server.h (extended_protocol): Declare it.
5702 2015-12-04 Josh Stone <jistone@redhat.com>
5704 * target.h (struct target_ops) <arch_setup>: Rename to ...
5705 (struct target_ops) <post_create_inferior>: ... this.
5706 (target_arch_setup): Rename to ...
5707 (target_post_create_inferior): ... this, calling post_create_inferior.
5708 * server.c (start_inferior): Update target_arch_setup calls to
5709 target_post_create_inferior.
5710 * linux-low.c (linux_low_ptrace_options): Forward declare.
5711 (linux_arch_setup): Update its comment for general use.
5712 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5713 (struct linux_target_ops): Use linux_post_create_inferior.
5714 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5715 to post_create_inferior.
5716 * nto-low.c (struct nto_target_ops): Likewise.
5717 * spu-low.c (struct spu_target_ops): Likewise.
5718 * win32-low.c (struct win32_target_ops): Likewise.
5720 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5722 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5724 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5726 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5727 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5728 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5729 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5730 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5731 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5732 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5733 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5734 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5735 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5736 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5737 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5739 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5741 * linux-low.c (linux_look_up_symbols): Don't call
5742 linux_supports_traceclone.
5743 * linux-low.h (thread_db_init): Remove use_events argument.
5744 * thread-db.c (thread_db_use_event): Remove global variable.
5745 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5746 (struct thread_db) <td_create_bp>: Remove field.
5747 (thread_db_create_event): Remove function.
5748 (thread_db_enable_reporting): Likewise.
5749 (find_one_thread): Don't check for thread_db_use_events.
5750 (attach_thread): Likewise.
5751 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5752 (try_thread_db_load_1): Don't check for thread_db_use_events.
5753 (thread_db_init): Remove use_events argument and thread events
5755 (remove_thread_event_breakpoints): Remove function.
5756 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5758 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5760 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5762 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5763 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5764 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5765 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5766 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5768 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5770 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5771 * linux-low.c (can_hardware_single_step): Use
5772 supports_hardware_single_step.
5773 (can_software_single_step): New function.
5774 (start_step_over): Call can_software_single_step.
5775 (linux_supports_hardware_single_step): New function.
5776 (struct target_ops) <supports_software_single_step>: Initialize.
5777 * linux-low.h (struct linux_target_ops)
5778 <supports_hardware_single_step>: Initialize.
5779 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5780 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5781 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5782 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5783 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5784 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5785 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5786 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5787 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5788 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5790 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5791 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5793 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5794 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5795 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5797 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5798 * target.h (struct target_ops): <supports_software_single_step>:
5800 (target_supports_software_single_step): New macro.
5802 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5804 * linux-low.c (linux_wait_1): Fix pc advance condition.
5805 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5806 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5808 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5810 * linux-arm-low.c (arm_is_thumb_mode): New function.
5811 (arm_breakpoint_at): Use arm_is_thumb_mode.
5812 (arm_breakpoint_kind_from_current_state): New function.
5813 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5815 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5816 (linux_breakpoint_kind_from_current_state): New function.
5817 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5818 * linux-low.h (struct linux_target_ops)
5819 <breakpoint_kind_from_current_state>: New field.
5820 * target.h (struct target_ops): Likewise.
5821 (target_breakpoint_kind_from_current_state): New macro.
5823 2015-11-30 Pedro Alves <palves@redhat.com>
5825 * linux-low.c (linux_resume): Wake up the event loop before
5828 2015-11-30 Pedro Alves <palves@redhat.com>
5830 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5832 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5834 * target.c (struct thread_search): New structure.
5835 (thread_search_callback): New function.
5836 (prev_general_thread): New global.
5837 (prepare_to_access_memory, done_accessing_memory): New functions.
5838 * target.h (prepare_to_access_memory, done_accessing_memory):
5839 Replace macros with function declarations.
5841 2015-11-30 Pedro Alves <palves@redhat.com>
5844 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5845 report TARGET_WAITKIND_NO_RESUMED.
5846 * remote-utils.c (prepare_resume_reply): Handle
5847 TARGET_WAITKIND_NO_RESUMED.
5848 * server.c (report_no_resumed): New global.
5849 (handle_query) <qSupported>: Handle "no-resumed+". Report
5850 "no-resumed+" support.
5851 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5852 return error if the client doesn't support no-resumed events.
5853 (push_stop_notification): New function.
5854 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5855 events if the client supports them.
5857 2015-11-30 Pedro Alves <palves@redhat.com>
5859 * linux-low.c (thread_still_has_status_pending_p): Don't check
5861 (lwp_resumed): New function.
5862 (status_pending_p_callback): Return early if the LWP is not
5863 supposed to be resumed.
5865 2015-11-30 Pedro Alves <palves@redhat.com>
5867 * linux-low.c (handle_extended_wait): Assert that the LWP's
5868 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5869 thread create events, leave the new child's status pending.
5870 (linux_low_filter_event): If GDB wants to hear about thread exit
5871 events, leave the LWP marked dead and don't delete it.
5872 (linux_wait_for_event_filtered): Don't check for thread exit.
5873 (filter_exit_event): New function.
5874 (linux_wait_1): Use it, when returning an exit event.
5875 (linux_resume_one_lwp_throw): Assert that the LWP's
5876 waitstatus is TARGET_WAITKIND_IGNORE.
5877 * remote-utils.c (prepare_resume_reply): Handle
5878 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5879 * server.c (report_thread_events): New global.
5880 (handle_general_set): Handle QThreadEvents.
5881 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5882 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5883 TARGET_WAITKIND_THREAD_EXITED.
5884 * server.h (report_thread_events): Declare.
5886 2015-11-30 Pedro Alves <palves@redhat.com>
5888 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5889 the thread's last_resume_kind was resume_stop.
5891 2015-11-30 Pedro Alves <palves@redhat.com>
5893 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5896 2015-11-30 Pedro Alves <palves@redhat.com>
5898 * server.c (handle_v_requests): Handle vCtrlC.
5900 2015-11-30 Pedro Alves <palves@redhat.com>
5902 * gdbthread.h (find_any_thread_of_pid): Declare.
5903 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5905 * server.c (handle_query): If current_thread is NULL, look for
5906 another thread of the selected process.
5908 2015-11-26 Daniel Colascione <dancol@dancol.org>
5909 Simon Marchi <simon.marchi@ericsson.com>
5911 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5912 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5914 * target.h (struct target_ops) <thread_name>: New field.
5915 (target_thread_name): New macro.
5917 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5919 * regcache.h (regcache_invalidate_pid): Add declaration.
5920 * regcache.c (regcache_invalidate_pid): New function, extracted
5921 from regcache_invalidate.
5922 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5923 Add trivial documentation comment.
5924 * lynx-low.c: Use regcache_invalidate_pid instead of
5925 regcache_invalidate.
5927 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5929 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5930 and Elf64_auxv_t if the target is Android.
5932 2015-11-22 Doug Evans <xdje42@gmail.com>
5934 * target.h: #include <sys/types.h>.
5936 2015-11-19 Pedro Alves <palves@redhat.com>
5938 * linux-low.c (linux_process_qsupported): Change prototype.
5940 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5942 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5943 and adjust to loop over all features.
5944 * server.c (handle_query) <qSupported>: Adjust to call
5945 target_process_qsupported once, passing it a vector of unprocessed
5947 * target.h (struct target_ops) <process_qsupported>: Change
5949 (target_process_qsupported): Adjust.
5951 2015-11-19 Pedro Alves <palves@redhat.com>
5953 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5955 * configure: Regenerate.
5957 2015-11-19 Pedro Alves <palves@redhat.com>
5959 * configure: Regenerate.
5961 2015-11-19 Yao Qi <yao.qi@linaro.org>
5963 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5966 2015-11-19 Yao Qi <yao.qi@linaro.org>
5968 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5969 (struct aarch64_operand): Move enum out.
5971 2015-11-19 Yao Qi <yao.qi@linaro.org>
5973 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5974 struct user_fpsimd_state *.
5975 (aarch64_store_fpregset): Likewise.
5977 2015-11-19 Yao Qi <yao.qi@linaro.org>
5979 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5980 struct user_pt_regs *.
5981 (aarch64_store_gregset): Likewise.
5983 2015-11-18 Pedro Alves <palves@redhat.com>
5985 * Makefile.in (all_object_files): Add $IPA_OBJS.
5987 2015-11-17 Pedro Alves <palves@redhat.com>
5989 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5990 GDB_SIGNAL_0 and gdb_signal_to_string.
5992 2015-11-17 Pedro Alves <palves@redhat.com>
5994 * win32-low.c (handle_output_debug_string): Remove parameter.
5995 (win32_kill): Remove our_status local and adjust call to
5996 handle_output_debug_string.
5997 (get_child_debug_event): Adjust call to
5998 handle_output_debug_string.
6000 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6002 * linux-mips-low.c (mips_fill_gregset): Add cast.
6003 (mips_store_gregset): Likewise.
6004 (mips_fill_fpregset): Likewise.
6005 (mips_store_fpregset): Likewise.
6007 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6009 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6012 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6014 * linux-mips-low.c (mips_linux_new_thread): Change type of
6015 watch_type to enum target_hw_bp_type.
6017 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6019 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6020 Change return type to arm_hwbp_type.
6022 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6024 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6025 (arm_store_gregset): Likewise.
6026 * linux-arm-low.c (arm_get_hwcap): Likewise.
6027 (arm_read_description): Likewise.
6029 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6031 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6033 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6035 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6036 (ppc_fill_vsxregset): Likewise.
6037 (ppc_store_vsxregset): Likewise.
6038 (ppc_fill_vrregset): Likewise.
6039 (ppc_store_vrregset): Likewise.
6040 (ppc_fill_evrregset): Likewise.
6041 (ppc_store_evrregset): Likewise.
6043 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6045 * linux-ppc-low.c (ppc_usrregs_info): Remove
6046 forward-declaration.
6047 (ppc_arch_setup): Move lower in file.
6049 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6051 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6052 (ps_pdwrite): Likewise.
6054 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6056 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6057 to after assert checks.
6059 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6061 * proc-service.c (ps_pdread): Add/adjust casts.
6062 (ps_pdwrite): Add/adjust casts.
6064 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6066 * server.c (handle_search_memory_1): Cast return value of
6069 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6071 * server.c (write_qxfer_response): Change type of data to
6074 2015-10-29 Pedro Alves <palves@redhat.com>
6076 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6078 2015-10-29 Pedro Alves <palves@redhat.com>
6080 * tracepoint.c (clear_installed_tracepoints): Add casts.
6082 2015-10-29 Pedro Alves <palves@redhat.com>
6084 * server.c (handle_v_cont, process_serial_event): Add enum
6085 gdb_signal casts to signal parsing code.
6087 2015-10-29 Pedro Alves <palves@redhat.com>
6089 * linux-low.h (NULL_REGSET): Define.
6090 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6091 * linux-arm-low.c (arm_regsets): Likewise.
6092 * linux-crisv32-low.c (cris_regsets): Likewise.
6093 * linux-m68k-low.c (m68k_regsets): Likewise.
6094 * linux-mips-low.c (mips_regsets): Likewise.
6095 * linux-nios2-low.c (nios2_regsets): Likewise.
6096 * linux-ppc-low.c (ppc_regsets): Likewise.
6097 * linux-s390-low.c (s390_regsets): Likewise.
6098 * linux-sh-low.c (sh_regsets): Likewise.
6099 * linux-sparc-low.c (sparc_regsets): Likewise.
6100 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6101 * linux-tile-low.c (tile_regsets): Likewise.
6102 * linux-x86-low.c (x86_regsets): Likewise.
6103 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6105 2015-10-29 Pedro Alves <palves@redhat.com>
6107 * linux-low.h (NULL_REGSET): Define.
6108 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6109 * linux-arm-low.c (arm_regsets): Likewise.
6110 * linux-crisv32-low.c (cris_regsets): Likewise.
6111 * linux-m68k-low.c (m68k_regsets): Likewise.
6112 * linux-mips-low.c (mips_regsets): Likewise.
6113 * linux-nios2-low.c (nios2_regsets): Likewise.
6114 * linux-ppc-low.c (ppc_regsets): Likewise.
6115 * linux-s390-low.c (s390_regsets): Likewise.
6116 * linux-sh-low.c (sh_regsets): Likewise.
6117 * linux-sparc-low.c (sparc_regsets): Likewise.
6118 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6119 * linux-tile-low.c (tile_regsets): Likewise.
6120 * linux-x86-low.c (x86_regsets): Likewise.
6121 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6123 2015-10-26 Doug Evans <dje@google.com>
6125 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6127 2015-10-26 Doug Evans <dje@google.com>
6129 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6131 2015-10-26 Doug Evans <dje@google.com>
6133 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6135 (attach_thread, find_new_threads_callback): Ditto.
6137 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6139 * mem-break.h (set_breakpoint_data): Remove.
6141 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6143 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6144 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6145 (initialize_low): Remove set_breakpoint_data call.
6146 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6147 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6148 (initialize_low): Remove set_breakpoint_data call.
6149 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6150 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6151 (initialize_low): Remove set_breakpoint_data call.
6153 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6155 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6156 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6157 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6158 * target.h (target_breakpoint_kind_from_pc): New macro.
6160 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6162 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6163 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6164 the default breakpoint kind.
6166 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6168 * linux-arm-low.c (arm_supports_z_point_type): Add software
6171 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6173 * linux-arm-low.c: Refactor breakpoint definitions.
6174 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6175 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6177 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6179 * Makefile.in: Add arm.c/o.
6180 * configure.srv: Likewise.
6181 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6182 (arm_breakpoint_kind_from_pc): New function.
6183 (arm_sw_breakpoint_from_kind): Return proper kind.
6184 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6186 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6188 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6190 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6191 (struct raw_breakpoint) <size>: Remove.
6192 (struct raw_breakpoint) <kind>: Add.
6193 (bp_size): New function.
6194 (bp_opcode): Likewise.
6195 (find_raw_breakpoint_at): Adjust for kind.
6196 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6197 (remove_memory_breakpoint): Adjust for kind call bp_size.
6198 (set_raw_breakpoint_at): Adjust for kind.
6199 (set_breakpoint): Likewise.
6200 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6201 (delete_raw_breakpoint): Adjust for kind.
6202 (delete_breakpoint): Likewise.
6203 (find_gdb_breakpoint): Likewise.
6204 (set_gdb_breakpoint_1): Likewise.
6205 (set_gdb_breakpoint): Likewise.
6206 (delete_gdb_breakpoint_1): Likewise.
6207 (delete_gdb_breakpoint): Likewise.
6208 (uninsert_raw_breakpoint): Likewise.
6209 (reinsert_raw_breakpoint): Likewise.
6210 (set_breakpoint_data): Remove.
6211 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6212 (check_mem_read): Adjust for kind call bp_size.
6213 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6214 (clone_one_breakpoint): Adjust for kind.
6215 * mem-break.h (set_gdb_breakpoint): Likewise.
6216 (delete_gdb_breakpoint): Likewise.
6217 * server.c (process_serial_event): Likewise.
6219 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6221 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6222 (struct linux_target_ops) <breakpoint>: Remove.
6223 (struct linux_target_ops) <breakpoint_len>: Remove.
6224 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6225 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6226 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6227 (arm_sw_breakpoint_from_kind): New function.
6228 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6229 (struct linux_target_ops) <breakpoint>: Remove.
6230 (struct linux_target_ops) <breakpoint_len>: Remove.
6231 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6232 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6233 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6234 (struct linux_target_ops) <breakpoint>: Remove.
6235 (struct linux_target_ops) <breakpoint_len>: Remove.
6236 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6237 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6238 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6239 (struct linux_target_ops) <breakpoint>: Remove.
6240 (struct linux_target_ops) <breakpoint_len>: Remove.
6241 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6242 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6243 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6244 and sw_breakpoint_from_kind to increment the pc.
6245 (linux_breakpoint_kind_from_pc): New function.
6246 (linux_sw_breakpoint_from_kind): New function.
6247 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6248 (initialize_low): Call breakpoint_kind_from_pc and
6249 sw_breakpoint_from_kind to replace breakpoint_data/len.
6250 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6252 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6253 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6254 (struct linux_target_ops) <breakpoint>: Remove.
6255 (struct linux_target_ops) <breakpoint_len>: Remove.
6256 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6257 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6258 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6259 (struct linux_target_ops) <breakpoint>: Remove.
6260 (struct linux_target_ops) <breakpoint_len>: Remove.
6261 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6262 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6263 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6264 (struct linux_target_ops) <breakpoint>: Remove.
6265 (struct linux_target_ops) <breakpoint_len>: Remove.
6266 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6267 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6268 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6269 (struct linux_target_ops) <breakpoint>: Remove.
6270 (struct linux_target_ops) <breakpoint_len>: Remove.
6271 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6272 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6273 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6274 (struct linux_target_ops) <breakpoint>: Remove.
6275 (struct linux_target_ops) <breakpoint_len>: Remove.
6276 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6277 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6278 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6279 (struct linux_target_ops) <breakpoint>: Remove.
6280 (struct linux_target_ops) <breakpoint_len>: Remove.
6281 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6282 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6283 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6284 (struct linux_target_ops) <breakpoint>: Remove.
6285 (struct linux_target_ops) <breakpoint_len>: Remove.
6286 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6287 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6288 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6289 (struct linux_target_ops) <breakpoint>: Remove.
6290 (struct linux_target_ops) <breakpoint_len>: Remove.
6291 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6292 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6293 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6294 (struct linux_target_ops) <breakpoint>: Remove.
6295 (struct linux_target_ops) <breakpoint_len>: Remove.
6296 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6297 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6298 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6299 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6300 (struct linux_target_ops) <breakpoint>: Remove.
6301 (struct linux_target_ops) <breakpoint_len>: Remove.
6302 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6303 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6304 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6305 (struct linux_target_ops) <breakpoint>: Remove.
6306 (struct linux_target_ops) <breakpoint_len>: Remove.
6307 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6308 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6310 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6312 * linux-cris-low.c (cris_get_pc): Remove void arg.
6314 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6316 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6319 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6321 * inferiors.c (thread_pid_matches_callback): New function.
6322 (find_thread_process): New function.
6323 (remove_thread): Reset current_thread.
6324 (remove_process): Assert threads have been removed first.
6326 2015-10-15 Yao Qi <yao.qi@linaro.org>
6328 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6330 (aarch64_remove_point): Likewise.
6331 * regcache.c (regcache_register_size): New function.
6333 2015-10-12 Yao Qi <yao.qi@linaro.org>
6335 * linux-aarch64-low.c: Update all callers as emit_load_store
6336 is renamed to aarch64_emit_load_store.
6338 2015-10-12 Yao Qi <yao.qi@linaro.org>
6340 * linux-aarch64-low.c: Update all callers of function renaming
6341 from emit_insn to aarch64_emit_insn.
6343 2015-10-12 Yao Qi <yao.qi@linaro.org>
6345 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6346 arch/aarch64-insn.h.
6347 (struct aarch64_memory_operand): Likewise.
6349 (emit_insn): Move to arch/aarch64-insn.c.
6350 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6351 (emit_load_store): Move to arch/aarch64-insn.c.
6352 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6353 (can_encode_int32): Remove.
6355 2015-10-12 Yao Qi <yao.qi@linaro.org>
6357 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6358 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6359 (aarch64_relocate_instruction): Likewise.
6360 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6361 (struct aarch64_insn_visitor): Likewise.
6363 2015-10-12 Yao Qi <yao.qi@linaro.org>
6365 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6366 (struct aarch64_insn_visitor): New.
6367 (struct aarch64_insn_relocation_data): New.
6368 (aarch64_ftrace_insn_reloc_b): New function.
6369 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6370 (aarch64_ftrace_insn_reloc_cb): Likewise.
6371 (aarch64_ftrace_insn_reloc_tb): Likewise.
6372 (aarch64_ftrace_insn_reloc_adr): Likewise.
6373 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6374 (aarch64_ftrace_insn_reloc_others): Likewise.
6376 (aarch64_relocate_instruction): Use visitor.
6378 2015-10-12 Yao Qi <yao.qi@linaro.org>
6380 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6381 int. Add argument buf.
6382 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6383 aarch64_relocate_instruction.
6385 2015-10-12 Yao Qi <yao.qi@linaro.org>
6387 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6388 argument insn. Remove local variable insn. Don't call
6390 (aarch64_install_fast_tracepoint_jump_pad): Call
6393 2015-09-30 Yao Qi <yao.qi@linaro.org>
6395 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6396 (emit_load_store_pair): Likewise.
6398 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6400 * dll.c (match_dll): Add cast(s).
6401 (unloaded_dll): Likewise.
6402 * linux-low.c (second_thread_of_pid_p): Likewise.
6403 (delete_lwp_callback): Likewise.
6404 (count_events_callback): Likewise.
6405 (select_event_lwp_callback): Likewise.
6406 (linux_set_resume_request): Likewise.
6407 * server.c (accumulate_file_name_length): Likewise.
6408 (emit_dll_description): Likewise.
6409 (handle_qxfer_threads_worker): Likewise.
6410 (visit_actioned_threads): Likewise.
6411 * thread-db.c (any_thread_of): Likewise.
6412 * tracepoint.c (same_process_p): Likewise.
6413 (match_blocktype): Likewise.
6414 (build_traceframe_info_xml): Likewise.
6416 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6418 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6420 (gdb_unparse_agent_expr): Likewise.
6421 * hostio.c (require_data): Likewise.
6422 (handle_pread): Likewise.
6423 * linux-low.c (disable_regset): Likewise.
6424 (fetch_register): Likewise.
6425 (store_register): Likewise.
6426 (get_dynamic): Likewise.
6427 (linux_qxfer_libraries_svr4): Likewise.
6428 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6429 (set_fast_tracepoint_jump): Likewise.
6430 (uninsert_fast_tracepoint_jumps_at): Likewise.
6431 (reinsert_fast_tracepoint_jumps_at): Likewise.
6432 (validate_inserted_breakpoint): Likewise.
6433 (clone_agent_expr): Likewise.
6434 * regcache.c (init_register_cache): Likewise.
6435 * remote-utils.c (putpkt_binary_1): Likewise.
6436 (decode_M_packet): Likewise.
6437 (decode_X_packet): Likewise.
6438 (look_up_one_symbol): Likewise.
6439 (relocate_instruction): Likewise.
6440 (monitor_output): Likewise.
6441 * server.c (handle_search_memory): Likewise.
6442 (handle_qxfer_exec_file): Likewise.
6443 (handle_qxfer_libraries): Likewise.
6444 (handle_qxfer): Likewise.
6445 (handle_query): Likewise.
6446 (handle_v_cont): Likewise.
6447 (handle_v_run): Likewise.
6448 (captured_main): Likewise.
6449 * target.c (write_inferior_memory): Likewise.
6450 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6451 * tracepoint.c (init_trace_buffer): Likewise.
6452 (add_tracepoint_action): Likewise.
6453 (add_traceframe): Likewise.
6454 (add_traceframe_block): Likewise.
6455 (cmd_qtdpsrc): Likewise.
6456 (cmd_qtdv): Likewise.
6457 (cmd_qtstatus): Likewise.
6458 (response_source): Likewise.
6459 (response_tsv): Likewise.
6460 (cmd_qtnotes): Likewise.
6461 (gdb_collect): Likewise.
6462 (initialize_tracepoint): Likewise.
6464 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6466 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6467 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6468 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6470 (enum aarch64_condition_codes): New enum.
6471 (w0): New static global.
6474 (struct aarch64_memory_operand) <type>: New
6475 MEMORY_OPERAND_POSTINDEX type.
6476 (postindex_memory_operand): New helper function.
6477 (emit_ret): New function.
6478 (emit_load_store_pair): New function, factored out of emit_stp
6479 with support for MEMORY_OPERAND_POSTINDEX.
6480 (emit_stp): Rewrite using emit_load_store_pair.
6481 (emit_ldp): New function.
6482 (emit_load_store): Likewise.
6483 (emit_ldr): Mention post-index instruction in comment.
6484 (emit_ldrh): New function.
6485 (emit_ldrb): New function.
6486 (emit_ldrsw): Mention post-index instruction in comment.
6487 (emit_str): Likewise.
6488 (emit_subs): New function.
6489 (emit_cmp): Likewise.
6490 (emit_and): Likewise.
6491 (emit_orr): Likewise.
6492 (emit_orn): Likewise.
6493 (emit_eor): Likewise.
6494 (emit_mvn): Likewise.
6495 (emit_lslv): Likewise.
6496 (emit_lsrv): Likewise.
6497 (emit_asrv): Likewise.
6498 (emit_mul): Likewise.
6499 (emit_sbfm): Likewise.
6500 (emit_sbfx): Likewise.
6501 (emit_ubfm): Likewise.
6502 (emit_ubfx): Likewise.
6503 (emit_csinc): Likewise.
6504 (emit_cset): Likewise.
6505 (emit_nop): Likewise.
6506 (emit_ops_insns): New helper function.
6507 (emit_pop): Likewise.
6508 (emit_push): Likewise.
6509 (aarch64_emit_prologue): New function.
6510 (aarch64_emit_epilogue): Likewise.
6511 (aarch64_emit_add): Likewise.
6512 (aarch64_emit_sub): Likewise.
6513 (aarch64_emit_mul): Likewise.
6514 (aarch64_emit_lsh): Likewise.
6515 (aarch64_emit_rsh_signed): Likewise.
6516 (aarch64_emit_rsh_unsigned): Likewise.
6517 (aarch64_emit_ext): Likewise.
6518 (aarch64_emit_log_not): Likewise.
6519 (aarch64_emit_bit_and): Likewise.
6520 (aarch64_emit_bit_or): Likewise.
6521 (aarch64_emit_bit_xor): Likewise.
6522 (aarch64_emit_bit_not): Likewise.
6523 (aarch64_emit_equal): Likewise.
6524 (aarch64_emit_less_signed): Likewise.
6525 (aarch64_emit_less_unsigned): Likewise.
6526 (aarch64_emit_ref): Likewise.
6527 (aarch64_emit_if_goto): Likewise.
6528 (aarch64_emit_goto): Likewise.
6529 (aarch64_write_goto_address): Likewise.
6530 (aarch64_emit_const): Likewise.
6531 (aarch64_emit_call): Likewise.
6532 (aarch64_emit_reg): Likewise.
6533 (aarch64_emit_pop): Likewise.
6534 (aarch64_emit_stack_flush): Likewise.
6535 (aarch64_emit_zero_ext): Likewise.
6536 (aarch64_emit_swap): Likewise.
6537 (aarch64_emit_stack_adjust): Likewise.
6538 (aarch64_emit_int_call_1): Likewise.
6539 (aarch64_emit_void_call_2): Likewise.
6540 (aarch64_emit_eq_goto): Likewise.
6541 (aarch64_emit_ne_goto): Likewise.
6542 (aarch64_emit_lt_goto): Likewise.
6543 (aarch64_emit_le_goto): Likewise.
6544 (aarch64_emit_gt_goto): Likewise.
6545 (aarch64_emit_ge_got): Likewise.
6546 (aarch64_emit_ops_impl): New static global variable.
6547 (aarch64_emit_ops): New target function, return
6548 &aarch64_emit_ops_impl.
6549 (struct linux_target_ops): Install it.
6551 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6553 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6554 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6556 * linux-aarch64-ipa.c: New file.
6557 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6559 (aarch64_get_thread_area): New target method.
6560 (extract_signed_bitfield): New helper function.
6561 (aarch64_decode_ldr_literal): New function.
6562 (enum aarch64_opcodes): New enum.
6563 (struct aarch64_register): New struct.
6564 (struct aarch64_operand): New struct.
6565 (x0): New static global.
6574 (aarch64_register): New helper function.
6575 (register_operand): Likewise.
6576 (immediate_operand): Likewise.
6577 (struct aarch64_memory_operand): New struct.
6578 (offset_memory_operand): New helper function.
6579 (preindex_memory_operand): Likewise.
6580 (enum aarch64_system_control_registers): New enum.
6581 (ENCODE): New macro.
6582 (emit_insn): New helper function.
6583 (emit_b): New function.
6584 (emit_bcond): Likewise.
6585 (emit_cb): Likewise.
6586 (emit_tb): Likewise.
6587 (emit_blr): Likewise.
6588 (emit_stp): Likewise.
6589 (emit_ldp_q_offset): Likewise.
6590 (emit_stp_q_offset): Likewise.
6591 (emit_load_store): Likewise.
6592 (emit_ldr): Likewise.
6593 (emit_ldrsw): Likewise.
6594 (emit_str): Likewise.
6595 (emit_ldaxr): Likewise.
6596 (emit_stxr): Likewise.
6597 (emit_stlr): Likewise.
6598 (emit_data_processing_reg): Likewise.
6599 (emit_data_processing): Likewise.
6600 (emit_add): Likewise.
6601 (emit_sub): Likewise.
6602 (emit_mov): Likewise.
6603 (emit_movk): Likewise.
6604 (emit_mov_addr): Likewise.
6605 (emit_mrs): Likewise.
6606 (emit_msr): Likewise.
6607 (emit_sevl): Likewise.
6608 (emit_wfe): Likewise.
6609 (append_insns): Likewise.
6610 (can_encode_int32_in): New helper function.
6611 (aarch64_relocate_instruction): New function.
6612 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6613 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6614 (struct linux_target_ops): Install aarch64_get_thread_area,
6615 aarch64_install_fast_tracepoint_jump_pad and
6616 aarch64_get_min_fast_tracepoint_insn_len.
6618 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6620 * Makefile.in (aarch64-insn.o): New rule.
6621 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6623 2015-09-21 Yao Qi <yao.qi@linaro.org>
6625 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6627 2015-09-21 Yao Qi <yao.qi@linaro.org>
6629 * tracepoint.c (max_jump_pad_size): Remove.
6631 2015-09-18 Yao Qi <yao.qi@linaro.org>
6633 * linux-aarch64-low.c: Don't include sys/uio.h.
6634 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6636 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6638 * tracepoint.c (eval_result_type): Change prototype.
6639 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6641 2015-09-15 Pedro Alves <palves@redhat.com>
6643 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6644 Check whether to report exec events instead of checking whether
6645 multiprocess is enabled.
6647 2015-09-15 Pedro Alves <palves@redhat.com>
6650 * remote-utils.c (prepare_resume_reply): Merge
6651 TARGET_WAITKIND_VFORK_DONE switch case with the
6652 TARGET_WAITKIND_FORKED case.
6654 2015-09-15 Yao Qi <yao.qi@linaro.org>
6656 * server.c (handle_query): Check string comparison using
6657 "else if" instead of "if".
6659 2015-09-15 Yao Qi <yao.qi@linaro.org>
6661 * server.c (vCont_supported): New global variable.
6662 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6663 matches. Append ";vContSupported+" to own_buf.
6664 (handle_v_requests): Append ";s;S" to own_buf if target supports
6665 hardware single step or vCont_supported is false.
6666 (capture_main): Set vCont_supported to zero.
6668 2015-09-15 Yao Qi <yao.qi@linaro.org>
6670 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6672 (linux_supports_hardware_single_step): ... New function.
6673 (linux_target_ops): Update.
6674 * lynx-low.c (lynx_target_ops): Set field
6675 supports_hardware_single_step to target_can_do_hardware_single_step.
6676 * nto-low.c (nto_target_ops): Likewise.
6677 * spu-low.c (spu_target_ops): Likewise.
6678 * win32-low.c (win32_target_ops): Likewise.
6679 * target.c (target_can_do_hardware_single_step): New function.
6680 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6681 Remove. <supports_hardware_single_step>: New field.
6682 (target_supports_conditional_breakpoints): Remove.
6683 (target_supports_hardware_single_step): New macro.
6684 (target_can_do_hardware_single_step): Declare.
6685 * server.c (handle_query): Use target_supports_hardware_single_step
6686 instead of target_supports_conditional_breakpoints.
6688 2015-09-15 Yao Qi <yao.qi@linaro.org>
6690 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6692 (struct linux_target_ops the_low_target): Install
6693 aarch64_linux_siginfo_fixup.
6695 2015-09-11 Don Breazeal <donb@codesourcery.com>
6696 Luis Machado <lgustavo@codesourcery.com>
6698 * linux-low.c (linux_mourn): Static declaration.
6699 (linux_arch_setup): Move in front of
6700 handle_extended_wait.
6701 (linux_arch_setup_thread): New function.
6702 (handle_extended_wait): Handle exec events. Call
6703 linux_arch_setup_thread. Make event_lwp argument a
6704 pointer-to-a-pointer.
6705 (check_zombie_leaders): Do not check stopped threads.
6706 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6707 (linux_low_filter_event): Add lwp and thread for exec'ing
6708 non-leader thread if leader thread has been deleted.
6709 Refactor code into linux_arch_setup_thread and call it.
6710 Pass child lwp pointer by reference to handle_extended_wait.
6711 (linux_wait_for_event_filtered): Update comment.
6712 (linux_wait_1): Prevent clobbering exec event status.
6713 (linux_supports_exec_events): New function.
6714 (linux_target_ops) <supports_exec_events>: Initialize new member.
6715 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6717 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6718 * server.c (report_exec_events): New global variable.
6719 (handle_query): Handle qSupported query for exec-events feature.
6720 (captured_main): Initialize report_exec_events.
6721 * server.h (report_exec_events): Declare new global variable.
6722 * target.h (struct target_ops) <supports_exec_events>: New
6724 (target_supports_exec_events): New macro.
6725 * win32-low.c (win32_target_ops) <supports_exec_events>:
6726 Initialize new member.
6728 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6730 * linux-low.c (linux_low_enable_btrace): Remove.
6731 (linux_target_ops): Replace linux_low_enable_btrace with
6732 linux_enable_btrace.
6734 2015-09-03 Yao Qi <yao.qi@linaro.org>
6736 * linux-aarch64-low.c (aarch64_insert_point): Call
6737 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6740 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6742 * linux-low.c (check_stopped_by_breakpoint): Use
6743 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6745 2015-08-27 Pedro Alves <palves@redhat.com>
6747 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6749 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6751 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6752 the XNEW-family equivalent.
6753 (compile_bytecodes): Likewise.
6754 * dll.c (loaded_dll): Likewise.
6755 * event-loop.c (append_callback_event): Likewise.
6756 (create_file_handler): Likewise.
6757 (create_file_event): Likewise.
6758 * hostio.c (handle_open): Likewise.
6759 * inferiors.c (add_thread): Likewise.
6760 (add_process): Likewise.
6761 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6762 * linux-arm-low.c (arm_new_process): Likewise.
6763 (arm_new_thread): Likewise.
6764 * linux-low.c (add_to_pid_list): Likewise.
6765 (linux_add_process): Likewise.
6766 (handle_extended_wait): Likewise.
6767 (add_lwp): Likewise.
6768 (enqueue_one_deferred_signal): Likewise.
6769 (enqueue_pending_signal): Likewise.
6770 (linux_resume_one_lwp_throw): Likewise.
6771 (linux_resume_one_thread): Likewise.
6772 (linux_read_memory): Likewise.
6773 (linux_write_memory): Likewise.
6774 * linux-mips-low.c (mips_linux_new_process): Likewise.
6775 (mips_linux_new_thread): Likewise.
6776 (mips_add_watchpoint): Likewise.
6777 * linux-x86-low.c (initialize_low_arch): Likewise.
6778 * lynx-low.c (lynx_add_process): Likewise.
6779 * mem-break.c (set_raw_breakpoint_at): Likewise.
6780 (set_breakpoint): Likewise.
6781 (add_condition_to_breakpoint): Likewise.
6782 (add_commands_to_breakpoint): Likewise.
6783 (clone_agent_expr): Likewise.
6784 (clone_one_breakpoint): Likewise.
6785 * regcache.c (new_register_cache): Likewise.
6786 * remote-utils.c (look_up_one_symbol): Likewise.
6787 * server.c (queue_stop_reply): Likewise.
6788 (start_inferior): Likewise.
6789 (queue_stop_reply_callback): Likewise.
6790 (handle_target_event): Likewise.
6791 * spu-low.c (fetch_ppc_memory): Likewise.
6792 (store_ppc_memory): Likewise.
6793 * target.c (set_target_ops): Likewise.
6794 * thread-db.c (thread_db_load_search): Likewise.
6795 (try_thread_db_load_1): Likewise.
6796 * tracepoint.c (add_tracepoint): Likewise.
6797 (add_tracepoint_action): Likewise.
6798 (create_trace_state_variable): Likewise.
6799 (cmd_qtdpsrc): Likewise.
6800 (cmd_qtro): Likewise.
6801 (add_while_stepping_state): Likewise.
6802 * win32-low.c (child_add_thread): Likewise.
6803 (get_image_name): Likewise.
6805 2015-08-25 Yao Qi <yao.qi@linaro.org>
6807 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6809 2015-08-25 Yao Qi <yao.qi@linaro.org>
6811 * Makefile.in (aarch64-linux.o): New rule.
6812 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6814 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6815 (aarch64_init_debug_reg_state): Make it extern.
6816 (aarch64_linux_prepare_to_resume): Remove.
6818 2015-08-25 Yao Qi <yao.qi@linaro.org>
6820 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6821 lwp_arch_private_info and ptid_of_lwp.
6823 2015-08-25 Yao Qi <yao.qi@linaro.org>
6825 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6826 Find proc_info by find_process_pid. All callers updated.
6828 2015-08-25 Yao Qi <yao.qi@linaro.org>
6830 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6832 (debug_reg_change_callback): Remove.
6833 (aarch64_notify_debug_reg_change): Remove.
6835 2015-08-25 Yao Qi <yao.qi@linaro.org>
6837 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6838 Call current_lwp_ptid.
6840 2015-08-25 Yao Qi <yao.qi@linaro.org>
6842 * linux-aarch64-low.c (debug_reg_change_callback): Use
6845 2015-08-25 Yao Qi <yao.qi@linaro.org>
6847 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6849 2015-08-25 Yao Qi <yao.qi@linaro.org>
6851 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6853 2015-08-25 Yao Qi <yao.qi@linaro.org>
6855 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6858 2015-08-25 Yao Qi <yao.qi@linaro.org>
6860 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6862 (debug_reg_change_callback): Remove argument entry and add argument
6863 lwp. Remove local variable thread. Don't print thread id in the
6864 debugging output. Don't check whether pid of thread equals to pid.
6865 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6866 iterate_over_lwps instead find_inferior.
6868 2015-08-24 Pedro Alves <palves@redhat.com>
6870 * inferiors.c (get_first_process): New function.
6871 * inferiors.h (get_first_process): New declaration.
6872 * remote-utils.c (read_ptid): Default to the first process in the
6873 list, instead of to the current thread's process.
6875 2015-08-24 Pedro Alves <palves@redhat.com>
6877 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6878 * event-loop.c: Likewise.
6879 * remote-utils.c: Likewise.
6880 * tracepoint.c: Likewise.
6882 2015-08-24 Pedro Alves <palves@redhat.com>
6884 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6887 2015-08-21 Pedro Alves <palves@redhat.com>
6889 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6890 instead of literal 1.
6892 2015-08-21 Pedro Alves <palves@redhat.com>
6894 * tdesc.c (default_description): Explicitly zero-initialize.
6896 2015-08-21 Pedro Alves <palves@redhat.com>
6899 * inferiors.c (remove_thread): Discard any pending stop reply for
6901 * server.c (remove_all_on_match_pid): Rename to ...
6902 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6904 (discard_queued_stop_replies): Change parameter to a ptid. Now
6906 (handle_v_kill, kill_inferior_callback, captured_main)
6907 (process_serial_event): Adjust.
6908 * server.h (discard_queued_stop_replies): Declare.
6910 2015-08-21 Pedro Alves <palves@redhat.com>
6912 * linux-low.c (wait_for_sigstop): Always switch to no thread
6913 selected if the previously current thread dies.
6914 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6915 process instead of the current thread's.
6916 * remote-utils.c (input_interrupt): Don't check if there's no
6918 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6919 current thread to the general thread fails, error out.
6920 (handle_qxfer_auxv, handle_qxfer_libraries)
6921 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6922 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6923 (handle_query): Check if there's a thread selected instead of
6924 checking whether there's any thread in the thread list.
6925 (handle_qxfer_threads, handle_qxfer_btrace)
6926 (handle_qxfer_btrace_conf): Don't error out early if there's no
6927 thread in the thread list.
6928 (handle_v_cont, myresume): Don't set the current thread to the
6930 (process_serial_event) <Hg handling>: Also set thread_id if the
6931 previous general thread is still alive.
6932 (process_serial_event) <g/G handling>: If setting the current
6933 thread to the general thread fails, error out.
6934 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6935 thread's lwp instead of the current thread's.
6936 * target.c (set_desired_thread): If the desired thread was not
6937 found, leave the current thread pointing to NULL. Return an int
6938 (boolean) indicating success.
6939 * target.h (set_desired_thread): Change return type to int.
6941 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6943 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6944 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6946 (ps_get_thread_area): New function.
6948 2015-08-19 Gary Benson <gbenson@redhat.com>
6950 * hostio.c (handle_pread): Do not attempt to read more data
6951 than hostio_reply_with_data can fit in a packet.
6953 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6955 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6957 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6959 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6961 2015-08-06 Pedro Alves <palves@redhat.com>
6963 * tracepoint.c (expr_eval_result): Now an int.
6965 2015-08-06 Pedro Alves <palves@redhat.com>
6967 * gdbthread.h (struct regcache): Forward declare.
6968 (struct thread_info) <regcache_data>: Now a struct regcache
6970 * inferiors.c (inferior_regcache_data)
6971 (set_inferior_regcache_data): Now work with struct regcache
6973 * inferiors.h (struct regcache): Forward declare.
6974 (inferior_regcache_data, set_inferior_regcache_data): Now work
6975 with struct regcache pointers.
6976 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6977 (free_register_cache_thread): Remove struct regcache pointer
6980 2015-08-06 Pedro Alves <palves@redhat.com>
6982 * server.c (captured_main): On error, print the exception message
6983 to stderr, and if run_once is set, throw a quit.
6985 2015-08-06 Pedro Alves <palves@redhat.com>
6987 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6990 2015-08-06 Pedro Alves <palves@redhat.com>
6992 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6993 reading beyond the passed in buffer length.
6995 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6997 * tracepoint.c (symbol_list) <required>: Remove.
6999 2015-08-06 Pedro Alves <palves@redhat.com>
7001 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7002 count if stopping and suspending threads.
7003 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7004 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7005 (linux_detach): Complete an ongoing step-over.
7006 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7008 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7009 (linux_wait_1): If passing a signal to the inferior after
7010 finishing a step-over, unsuspend and re-resume all lwps. If we
7011 see a single-step event but the thread should be continuing, don't
7012 pass the trap to gdb.
7013 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7014 internal_error instead of gdb_assert.
7015 (enqueue_pending_signal): New function.
7016 (check_ptrace_stopped_lwp_gone): Add debug output.
7017 (start_step_over): Use internal_error instead of gdb_assert.
7018 (complete_ongoing_step_over): New function.
7019 (linux_resume_one_thread): Don't resume a suspended thread.
7020 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7023 2015-08-06 Pedro Alves <palves@redhat.com>
7025 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7026 (linux_thread_alive): Use lwp_is_marked_dead.
7027 (extended_event_reported): Delete.
7028 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7029 instead of extended_event_reported.
7030 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7032 (lwp_is_marked_dead): New function.
7033 (lwp_running): Use lwp_is_marked_dead.
7034 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7037 2015-08-06 Pedro Alves <palves@redhat.com>
7039 * linux-low.c (linux_wait_1): Move fork event output out of the
7040 !report_to_gdb check. Pass event_child->waitstatus to
7041 target_waitstatus_to_string instead of ourstatus.
7043 2015-08-04 Yao Qi <yao.qi@linaro.org>
7045 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7046 if current_thread is 32 bit.
7048 2015-08-04 Yao Qi <yao.qi@linaro.org>
7050 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7051 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7052 * server.c (extended_protocol): Remove "static".
7053 * server.h (extended_protocol): Declare it.
7055 2015-08-04 Yao Qi <yao.qi@linaro.org>
7057 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7058 both aarch64 and aarch32.
7059 (aarch64_set_pc): Likewise.
7061 2015-08-04 Yao Qi <yao.qi@linaro.org>
7063 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7064 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7065 arm-with-neon.xml to srv_xmlfiles.
7066 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7067 (is_64bit_tdesc): New function.
7068 (aarch64_linux_read_description): New function.
7069 (aarch64_arch_setup): Call aarch64_linux_read_description.
7070 (regs_info): Rename to regs_info_aarch64.
7071 (aarch64_regs_info): Return right regs_info.
7072 (initialize_low_arch): Call initialize_low_arch_aarch32.
7074 2015-08-04 Yao Qi <yao.qi@linaro.org>
7076 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7077 * linux-aarch32-low.c: New file.
7078 * linux-aarch32-low.h: New file.
7079 * linux-arm-low.c (arm_fill_gregset): Move it to
7080 linux-aarch32-low.c.
7081 (arm_store_gregset): Likewise.
7082 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7083 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7084 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7085 (regs_info): Rename to regs_info_arm.
7086 (arm_regs_info): Return regs_info_aarch32 if
7087 have_ptrace_getregset is 1 and target description is
7088 arm_with_neon or arm_with_vfpv3.
7089 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7090 Call initialize_low_arch_aarch32 instead.
7092 2015-08-04 Yao Qi <yao.qi@linaro.org>
7094 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7095 * linux-low.c: ... here.
7096 * linux-low.h (have_ptrace_getregset): Declare it.
7098 2015-08-04 Pedro Alves <palves@redhat.com>
7100 * thread-db.c (struct thread_db): Use new typedefs.
7101 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7103 (disable_thread_event_reporting): Cast result of dlsym to
7104 destination function pointer type.
7105 (thread_db_mourn): Use td_ta_delete_ftype.
7107 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7109 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7111 (CDX_BREAKPOINT): Define for R2.
7112 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7113 (the_low_target): Add comments.
7115 2015-07-30 Yao Qi <yao.qi@linaro.org>
7117 * linux-arm-low.c (arm_hwcap): Remove it.
7118 (arm_read_description): New local variable arm_hwcap. Don't
7119 set arm_hwcap to zero.
7121 2015-07-30 Yao Qi <yao.qi@linaro.org>
7123 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7124 Use regcache->tdesc instead.
7125 (arm_store_wmmxregset): Likewise.
7126 (arm_fill_vfpregset): Likewise.
7127 (arm_store_vfpregset): Likewise.
7129 2015-07-30 Yao Qi <yao.qi@linaro.org>
7131 * linux-arm-low.c: Include arch/arm.h.
7132 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7133 (arm_store_gregset): Likewise.
7135 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7137 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7138 ptrace's 4th parameter.
7140 2015-07-27 Yao Qi <yao.qi@linaro.org>
7142 * configure.srv (case aarch64*-*-linux*): Don't set
7145 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7147 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7149 * linux-arm-low.c: Likewise.
7150 * linux-cris-low.c: Likewise.
7151 * linux-crisv32-low.c: Likewise.
7152 * linux-low.c: Likewise.
7153 * linux-m68k-low.c: Likewise.
7154 * linux-mips-low.c: Likewise.
7155 * linux-nios2-low.c: Likewise.
7156 * linux-s390-low.c: Likewise.
7157 * linux-sparc-low.c: Likewise.
7158 * linux-tic6x-low.c: Likewise.
7159 * linux-tile-low.c: Likewise.
7160 * linux-x86-low.c: Likewise.
7162 2015-07-24 Pedro Alves <palves@redhat.com>
7164 * config.in: Regenerate.
7165 * configure: Regenerate.
7167 2015-07-24 Pedro Alves <palves@redhat.com>
7169 * acinclude.m4: Include ../ptrace.m4.
7170 * configure.ac: Call GDB_AC_PTRACE.
7171 * config.in, configure: Regenerate.
7173 2015-07-24 Yao Qi <yao.qi@linaro.org>
7175 * linux-low.c (linux_create_inferior): Remove setting to
7176 proc->priv->new_inferior.
7177 (linux_attach): Likewise.
7178 (linux_low_filter_event): Likewise.
7179 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7181 2015-07-24 Yao Qi <yao.qi@linaro.org>
7183 * linux-low.c (linux_arch_setup): New function.
7184 (linux_low_filter_event): If proc->tdesc is NULL and
7185 proc->attached is true, call the_low_target.arch_setup.
7186 Otherwise, keep status pending, and return.
7187 (linux_resume_one_lwp_throw): Don't call get_pc if
7188 thread->while_stepping isn't NULL. Don't call
7189 get_thread_regcache if proc->tdesc is NULL.
7190 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7191 (linux_target_ops): Install arch_setup.
7192 * server.c (start_inferior): Call the_target->arch_setup.
7193 * target.h (struct target_ops) <arch_setup>: New field.
7194 (target_arch_setup): New marco.
7195 * lynx-low.c (lynx_target_ops): Update.
7196 * nto-low.c (nto_target_ops): Update.
7197 * spu-low.c (spu_target_ops): Update.
7198 * win32-low.c (win32_target_ops): Update.
7200 2015-07-24 Yao Qi <yao.qi@linaro.org>
7202 * linux-low.c (linux_add_process): Don't set
7203 proc->priv->new_inferior.
7204 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7205 (linux_attach): Likewise.
7207 2015-07-24 Yao Qi <yao.qi@linaro.org>
7209 * server.c (start_inferior): Code refactor.
7211 2015-07-24 Yao Qi <yao.qi@linaro.org>
7213 * server.c (process_serial_event): Set general_thread.
7215 2015-07-21 Yao Qi <yao.qi@linaro.org>
7217 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7218 aarch64_linux_get_debug_reg_capacity.
7220 2015-07-17 Yao Qi <yao.qi@linaro.org>
7222 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7223 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7224 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7225 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7226 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7227 (AARCH64_HWP_ALIGNMENT): Likewise.
7228 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7229 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7230 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7231 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7232 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7233 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7234 (struct aarch64_debug_reg_state): Likewise.
7235 (struct arch_lwp_info): Likewise.
7236 (aarch64_align_watchpoint): Likewise.
7237 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7238 (aarch64_watchpoint_length): Likewise.
7239 (aarch64_point_encode_ctrl_reg): Likewise
7240 (aarch64_point_is_aligned): Likewise.
7241 (aarch64_align_watchpoint): Likewise.
7242 (aarch64_linux_set_debug_regs):
7243 (aarch64_dr_state_insert_one_point): Likewise.
7244 (aarch64_dr_state_remove_one_point): Likewise.
7245 (aarch64_handle_breakpoint): Likewise.
7246 (aarch64_handle_aligned_watchpoint): Likewise.
7247 (aarch64_handle_unaligned_watchpoint): Likewise.
7248 (aarch64_handle_watchpoint): Likewise.
7250 2015-07-17 Yao Qi <yao.qi@linaro.org>
7252 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7253 and don't aarch64_get_debug_reg_state. All callers update.
7254 (aarch64_handle_aligned_watchpoint): Likewise.
7255 (aarch64_handle_unaligned_watchpoint): Likewise.
7256 (aarch64_handle_watchpoint): Likewise.
7257 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7258 (aarch64_remove_point): Likewise.
7260 2015-07-17 Yao Qi <yao.qi@linaro.org>
7262 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7264 (aarch64_handle_unaligned_watchpoint): Likewise.
7266 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7268 Revert the previous 3 commits:
7269 Move gdb_regex* to common/
7270 Move linux_find_memory_regions_full & co.
7271 gdbserver build-id attribute generator
7273 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7274 Jan Kratochvil <jan.kratochvil@redhat.com>
7276 gdbserver build-id attribute generator.
7277 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7278 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7279 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7281 (get_dynamic): Use find_pdhr to traverse program headers.
7282 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7283 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7284 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7285 (get_hex_build_id): New.
7286 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7287 to reply XML document.
7289 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7290 Jan Kratochvil <jan.kratochvil@redhat.com>
7292 * target.c: Include target/target-utils.h and fcntl.h.
7293 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7294 (target_fileio_read_stralloc): New functions.
7296 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7298 * Makefile.in (OBS): Add gdb_regex.o.
7300 * config.in: Rebuilt.
7301 * configure: Rebuilt.
7303 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7304 Jan Kratochvil <jan.kratochvil@redhat.com>
7306 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7307 * Makefile.in (OBS): Add target-utils.o.
7308 (linux-maps.o, target-utils.o): New.
7309 * configure.srv (srv_linux_obj): Add linux-maps.o.
7311 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7313 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7315 (the_low_target): Install it.
7317 2015-07-14 Pedro Alves <palves@redhat.com>
7319 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7320 Instead, ignore ECHILD, and throw an error for other errnos.
7322 2015-07-10 Pedro Alves <palves@redhat.com>
7324 * event-loop.c (struct callback_event) <data>: Change type to
7325 gdb_client_data instance instead of gdb_client_data pointer.
7326 (append_callback_event): Adjust.
7328 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7330 * linux-aarch64-low.c: Add comments for each linux_target_ops
7331 method. Remove comments already covered in target_ops and
7332 linux_target_ops definitions.
7333 (the_low_target): Add comments for each unimplemented method.
7335 2015-07-09 Yao Qi <yao.qi@linaro.org>
7337 * linux-aarch64-low.c (aarch64_regmap): Remove.
7338 (aarch64_usrregs_info): Remove.
7339 (regs_info): Set field usrregs to NULL.
7341 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7343 * linux-low.c: Include "rsp-low.h"
7344 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7345 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7346 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7347 (handle_btrace_enable_pt): New.
7348 (handle_btrace_general_set): Support "pt".
7349 (handle_btrace_conf_general_set): Support "pt:size".
7351 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7353 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7356 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7358 * linux-aarch64-low.c: Remove comment about endianness.
7359 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7360 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7363 2015-06-24 Gary Benson <gbenson@redhat.com>
7365 * linux-i386-ipa.c (stdint.h): Do not include.
7366 * lynx-i386-low.c (stdint.h): Likewise.
7367 * lynx-ppc-low.c (stdint.h): Likewise.
7368 * mem-break.c (stdint.h): Likewise.
7369 * thread-db.c (stdint.h): Likewise.
7370 * tracepoint.c (stdint.h): Likewise.
7371 * win32-low.c (stdint.h): Likewise.
7373 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7375 * server.c (write_qxfer_response): Update call to
7376 remote_escape_output.
7378 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7379 Jan Kratochvil <jan.kratochvil@redhat.com>
7381 Merge multiple hex conversions.
7382 * gdbreplay.c (tohex): Rename to 'fromhex'.
7383 (logchar): Use fromhex.
7385 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7387 * server.c (handle_qxfer_libraries): Set `version' attribute for
7390 2015-06-10 Gary Benson <gbenson@redhat.com>
7392 * target.h (struct target_ops) <multifs_open>: New field.
7393 <multifs_unlink>: Likewise.
7394 <multifs_readlink>: Likewise.
7395 * linux-low.c (nat/linux-namespaces.h): New include.
7396 (linux_target_ops): Initialize the_target->multifs_open,
7397 the_target->multifs_unlink and the_target->multifs_readlink.
7398 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7399 * hostio.c (hostio_fs_pid): New static variable.
7400 (hostio_handle_new_gdb_connection): New function.
7401 (handle_setfs): Likewise.
7402 (handle_open): Use the_target->multifs_open as appropriate.
7403 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7404 (handle_readlink): Use the_target->multifs_readlink as
7406 (handle_vFile): Handle vFile:setfs packets.
7407 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7408 after target_handle_new_gdb_connection.
7410 2015-06-10 Gary Benson <gbenson@redhat.com>
7412 * configure.ac (AC_CHECK_FUNCS): Add setns.
7413 * config.in: Regenerate.
7414 * configure: Likewise.
7415 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7416 (linux-namespaces.o): New rule.
7417 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7419 2015-06-09 Gary Benson <gbenson@redhat.com>
7421 * hostio.c (handle_open): Process mode argument with
7422 fileio_to_host_mode.
7424 2015-06-01 Yao Qi <yao.qi@linaro.org>
7426 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7427 * linux-x86-low.c: Likewise.
7429 2015-05-28 Don Breazeal <donb@codesourcery.com>
7431 * linux-low.c (handle_extended_wait): Initialize
7432 thread_info.last_resume_kind for new fork children.
7434 2015-05-15 Pedro Alves <palves@redhat.com>
7436 * target.h (target_handle_new_gdb_connection): Rewrite using if
7437 wrapped in do/while.
7439 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7441 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7442 * configure, config.in: Regenerate.
7443 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7446 2015-05-12 Don Breazeal <donb@codesourcery.com>
7448 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7449 PTRACE_EVENT_VFORK_DONE.
7450 (linux_low_ptrace_options, extended_event_reported): Add vfork
7452 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7453 and "vforkdone" for RSP 'T' Stop Reply Packet.
7454 * server.h (report_vfork_events): Declare
7457 2015-05-12 Don Breazeal <donb@codesourcery.com>
7459 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7460 (the_low_target) <new_fork>: Initialize new member.
7461 * linux-arm-low.c (arm_new_fork): New function.
7462 (the_low_target) <new_fork>: Initialize new member.
7463 * linux-low.c (handle_extended_wait): Call new target function
7465 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7466 * linux-mips-low.c (mips_add_watchpoint): New function
7467 extracted from mips_insert_point.
7468 (the_low_target) <new_fork>: Initialize new member.
7469 (mips_linux_new_fork): New function.
7470 (mips_insert_point): Call mips_add_watchpoint.
7471 * linux-x86-low.c (x86_linux_new_fork): New function.
7472 (the_low_target) <new_fork>: Initialize new member.
7474 2015-05-12 Don Breazeal <donb@codesourcery.com>
7476 * linux-low.c (handle_extended_wait): Implement return value,
7477 rename argument 'event_child' to 'event_lwp', handle
7478 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7479 (linux_low_ptrace_options): New function.
7480 (linux_low_filter_event): Call linux_low_ptrace_options,
7481 use different argument fo linux_enable_event_reporting,
7482 use return value from handle_extended_wait.
7483 (extended_event_reported): New function.
7484 (linux_wait_1): Call extended_event_reported and set
7485 status to report fork events.
7486 (linux_write_memory): Add pid to debug message.
7487 (reset_lwp_ptrace_options_callback): New function.
7488 (linux_handle_new_gdb_connection): New function.
7489 (linux_target_ops): Initialize new structure member.
7490 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7491 * lynx-low.c: Initialize new structure member.
7492 * remote-utils.c (prepare_resume_reply): Implement stop reason
7493 "fork" for "T" stop message.
7494 * server.c (handle_query): Call handle_new_gdb_connection.
7495 * server.h (report_fork_events): Declare global flag.
7496 * target.h (struct target_ops) <handle_new_gdb_connection>:
7498 (target_handle_new_gdb_connection): New macro.
7499 * win32-low.c: Initialize new structure member.
7501 2015-05-12 Don Breazeal <donb@codesourcery.com>
7503 * mem-break.c (APPEND_TO_LIST): Define macro.
7504 (clone_agent_expr): New function.
7505 (clone_one_breakpoint): New function.
7506 (clone_all_breakpoints): New function.
7507 * mem-break.h: Declare new functions.
7509 2015-05-12 Don Breazeal <donb@codesourcery.com>
7511 * linux-low.c (linux_supports_fork_events): New function.
7512 (linux_supports_vfork_events): New function.
7513 (linux_target_ops): Initialize new structure members.
7514 (initialize_low): Call linux_check_ptrace_features.
7515 * lynx-low.c (lynx_target_ops): Initialize new structure
7517 * server.c (report_fork_events, report_vfork_events):
7519 (handle_query): Add new features to qSupported packet and
7521 (captured_main): Initialize new global variables.
7522 * target.h (struct target_ops) <supports_fork_events>:
7524 <supports_vfork_events>: New member.
7525 (target_supports_fork_events): New macro.
7526 (target_supports_vfork_events): New macro.
7527 * win32-low.c (win32_target_ops): Initialize new structure
7530 2015-05-12 Gary Benson <gbenson@redhat.com>
7532 * server.c (handle_qxfer_exec_file): Use current process
7535 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7537 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7538 Remove HAVE_PTRACE_GETREGS conditionals.
7539 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7540 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7542 2015-05-08 Yao Qi <yao.qi@linaro.org>
7544 * linux-low.c (linux_supports_conditional_breakpoints): New
7546 (linux_target_ops): Install new target method.
7547 * lynx-low.c (lynx_target_ops): Install NULL hook for
7548 supports_conditional_breakpoints.
7549 * nto-low.c (nto_target_ops): Likewise.
7550 * spu-low.c (spu_target_ops): Likewise.
7551 * win32-low.c (win32_target_ops): Likewise.
7552 * server.c (handle_query): Check
7553 target_supports_conditional_breakpoints.
7554 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7556 (target_supports_conditional_breakpoints): New macro.
7558 2015-05-06 Pedro Alves <palves@redhat.com>
7561 * server.c (start_inferior): If the process exits, mourn it.
7563 2015-04-21 Gary Benson <gbenson@redhat.com>
7565 * hostio.c (fileio_open_flags_to_host): Factored out to
7566 fileio_to_host_openflags in common/fileio.c. Single use
7569 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7571 * linux-xtensa-low.c (xtensa_fill_gregset)
7572 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7575 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7577 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7578 (regs_info): Replace usrregs pointer with NULL.
7580 2015-04-17 Gary Benson <gbenson@redhat.com>
7582 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7583 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7584 * server.c (handle_qxfer_exec_file): New function.
7585 (qxfer_packets): Add exec-file entry.
7586 (handle_query): Report qXfer:exec-file:read as supported packet.
7588 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7590 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7592 2015-04-09 Gary Benson <gbenson@redhat.com>
7594 * hostio-errno.c (errno_to_fileio_error): Remove function.
7595 Update caller to use remote_fileio_to_fio_error.
7597 2015-04-09 Yao Qi <yao.qi@linaro.org>
7599 * linux-low.c (linux_insert_point): Call
7600 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7601 (linux_remove_point): Call remove_memory_breakpoint if type is
7603 * linux-x86-low.c (x86_insert_point): Don't call
7604 insert_memory_breakpoint.
7605 (x86_remove_point): Don't call remove_memory_breakpoint.
7607 2015-04-01 Pedro Alves <palves@redhat.com>
7608 Cleber Rosa <crosa@redhat.com>
7610 * server.c (gdbserver_usage): Reorganize and extend the usage
7613 2015-03-24 Pedro Alves <palves@redhat.com>
7615 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7616 output. Also dump TRAP_TRACE.
7617 (linux_low_filter_event): In debug output, distinguish a
7618 resume_stop SIGSTOP from a delayed SIGSTOP.
7620 2015-03-24 Gary Benson <gbenson@redhat.com>
7622 * linux-x86-low.c (x86_linux_new_thread): Moved to
7624 (x86_linux_prepare_to_resume): Likewise.
7626 2015-03-24 Gary Benson <gbenson@redhat.com>
7628 * Makefile.in (x86-linux-dregs.o): New rule.
7629 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7630 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7631 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7632 (x86_linux_dr_get): Likewise.
7633 (x86_linux_dr_set): Likewise.
7634 (update_debug_registers_callback): Likewise.
7635 (x86_linux_dr_set_addr): Likewise.
7636 (x86_linux_dr_get_addr): Likewise.
7637 (x86_linux_dr_set_control): Likewise.
7638 (x86_linux_dr_get_control): Likewise.
7639 (x86_linux_dr_get_status): Likewise.
7640 (x86_linux_update_debug_registers): Likewise.
7642 2015-03-24 Gary Benson <gbenson@redhat.com>
7644 * linux-x86-low.c (x86_linux_update_debug_registers):
7645 New function, factored out from...
7646 (x86_linux_prepare_to_resume): ...this.
7648 2015-03-24 Gary Benson <gbenson@redhat.com>
7650 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7651 (x86_linux_dr_set): Likewise.
7652 (update_debug_registers_callback): Likewise.
7653 (x86_linux_dr_set_addr): Likewise.
7654 (x86_linux_dr_get_addr): Likewise.
7655 (x86_linux_dr_set_control): Likewise.
7656 (x86_linux_dr_get_control): Likewise.
7657 (x86_linux_dr_get_status): Likewise.
7658 (x86_linux_prepare_to_resume): Likewise.
7660 2015-03-24 Gary Benson <gbenson@redhat.com>
7662 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7663 Use perror_with_name. Pass string through gettext.
7664 (x86_linux_dr_set): Likewise.
7666 2015-03-24 Gary Benson <gbenson@redhat.com>
7668 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7669 (x86_linux_dr_set_addr): ...this.
7670 (x86_dr_low_get_addr): Rename to...
7671 (x86_linux_dr_get_addr): ...this.
7672 (x86_dr_low_set_control): Rename to...
7673 (x86_linux_dr_set_control): ...this.
7674 (x86_dr_low_get_control): Rename to...
7675 (x86_linux_dr_get_control): ...this.
7676 (x86_dr_low_get_status): Rename to...
7677 (x86_linux_dr_get_status): ...this.
7678 (x86_dr_low): Update with new function names.
7680 2015-03-24 Gary Benson <gbenson@redhat.com>
7682 * Makefile.in (x86-linux.o): New rule.
7683 * configure.srv: Add x86-linux.o to relevant targets.
7684 * linux-low.c (lwp_set_arch_private_info): New function.
7685 (lwp_arch_private_info): Likewise.
7686 * linux-x86-low.c: Include nat/x86-linux.h.
7687 (arch_lwp_info): Removed structure.
7688 (update_debug_registers_callback):
7689 Use lwp_set_debug_registers_changed.
7690 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7691 and lwp_set_debug_registers_changed.
7692 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7694 2015-03-24 Gary Benson <gbenson@redhat.com>
7696 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7697 * linux-arm-low.c (arm_new_thread): Likewise.
7698 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7699 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7700 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7701 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7703 2015-03-24 Gary Benson <gbenson@redhat.com>
7705 * linux-low.c (ptid_of_lwp): New function.
7706 (lwp_is_stopped): Likewise.
7707 (lwp_stop_reason): Likewise.
7708 * linux-x86-low.c (update_debug_registers_callback):
7710 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7713 2015-03-24 Gary Benson <gbenson@redhat.com>
7715 * linux-low.h (linux_stop_lwp): Remove declaration.
7717 2015-03-24 Gary Benson <gbenson@redhat.com>
7719 * linux-low.h: Include nat/linux-nat.h.
7720 * linux-low.c (iterate_over_lwps_args): New structure.
7721 (iterate_over_lwps_filter): New function.
7722 (iterate_over_lwps): Likewise.
7723 * linux-x86-low.c (update_debug_registers_callback):
7724 Update signature to what iterate_over_lwps expects.
7725 Remove PID check that iterate_over_lwps now performs.
7726 (x86_dr_low_set_addr): Use iterate_over_lwps.
7727 (x86_dr_low_set_control): Likewise.
7729 2015-03-24 Gary Benson <gbenson@redhat.com>
7731 * linux-x86-low.c (x86_debug_reg_state): New function.
7732 (x86_linux_prepare_to_resume): Use the above.
7734 2015-03-24 Gary Benson <gbenson@redhat.com>
7736 * linux-low.c (current_lwp_ptid): New function.
7737 * linux-x86-low.c: Include nat/linux-nat.h.
7738 (x86_dr_low_get_addr): Use current_lwp_ptid.
7739 (x86_dr_low_get_control): Likewise.
7740 (x86_dr_low_get_status): Likewise.
7742 2015-03-20 Pedro Alves <palves@redhat.com>
7744 * tracepoint.c (cmd_qtstatus): Make "str" const.
7746 2015-03-20 Pedro Alves <palves@redhat.com>
7748 * server.c (handle_general_set): Make "req_str" const.
7750 2015-03-19 Pedro Alves <palves@redhat.com>
7752 * linux-low.c (linux_resume_one_lwp): Rename to ...
7753 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7754 instead call perror_with_name.
7755 (check_ptrace_stopped_lwp_gone): New function.
7756 (linux_resume_one_lwp): Reimplement as wrapper around
7757 linux_resume_one_lwp_throw that swallows errors if the LWP is
7760 2015-03-19 Pedro Alves <palves@redhat.com>
7762 * linux-low.c (count_events_callback, select_event_lwp_callback):
7763 No longer check whether the thread has resume_stop as last resume
7766 2015-03-19 Pedro Alves <palves@redhat.com>
7768 * linux-low.c (count_events_callback, select_event_lwp_callback):
7769 Use the lwp's status_pending_p field, not the thread's.
7771 2015-03-19 Pedro Alves <palves@redhat.com>
7773 * linux-low.c (select_event_lwp_callback): Update comments to
7774 no longer mention SIGTRAP.
7776 2015-03-18 Gary Benson <gbenson@redhat.com>
7778 * server.c (handle_query): Do not report vFile:fstat as supported.
7780 2015-03-11 Gary Benson <gbenson@redhat.com>
7782 * hostio.c (sys/types.h): New include.
7783 (sys/stat.h): Likewise.
7784 (common-remote-fileio.h): Likewise.
7785 (handle_fstat): New function.
7786 (handle_vFile): Handle vFile:fstat packets.
7788 2015-03-11 Gary Benson <gbenson@redhat.com>
7790 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7791 struct stat.st_blocks and struct stat.st_blksize.
7792 * configure: Regenerate.
7793 * config.in: Likewise.
7794 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7795 (OBS): Add common-remote-fileio.o.
7796 (common-remote-fileio.o): New rule.
7798 2015-03-09 Pedro Alves <palves@redhat.com>
7800 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7801 'struct sockaddr' pointer in 'accept' call.
7803 2015-03-09 Pedro Alves <palves@redhat.com>
7806 2015-03-07 Pedro Alves <palves@redhat.com>
7807 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7808 or <winsock2.h> here. Instead include "gdb_socket.h".
7809 (remote_open): Use union gdb_sockaddr_u.
7810 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7811 or <winsock2.h> here. Instead include "gdb_socket.h".
7812 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7813 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7815 (init_named_socket, gdb_agent_helper_thread): Use union
7818 2015-03-07 Pedro Alves <palves@redhat.com>
7820 * configure.ac (build_warnings): Move
7821 -Wdeclaration-after-statement to the C-specific set.
7822 * configure: Regenerate.
7824 2015-03-07 Pedro Alves <palves@redhat.com>
7826 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7827 or <winsock2.h> here. Instead include "gdb_socket.h".
7828 (remote_open): Use union gdb_sockaddr_u.
7829 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7830 or <winsock2.h> here. Instead include "gdb_socket.h".
7831 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7832 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7834 (init_named_socket, gdb_agent_helper_thread): Use union
7837 2015-03-07 Pedro Alves <palves@redhat.com>
7839 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7842 2015-03-06 Yao Qi <yao.qi@linaro.org>
7844 * linux-aarch64-low.c (aarch64_insert_point): Use
7845 show_debug_regs as a boolean.
7846 (aarch64_remove_point): Likewise.
7848 2015-03-05 Pedro Alves <palves@redhat.com>
7850 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7851 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7852 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7853 * nto-low.c (nto_target_ops): Likewise.
7854 * spu-low.c (spu_target_ops): Likewise.
7855 * win32-low.c (win32_target_ops): Likewise.
7857 2015-03-04 Pedro Alves <palves@redhat.com>
7859 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7860 Decide whether a breakpoint triggered based on the SIGTRAP's
7862 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7863 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7864 (linux_low_filter_event): Check for breakpoints before checking
7866 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7868 (linux_stopped_by_sw_breakpoint)
7869 (linux_supports_stopped_by_sw_breakpoint)
7870 (linux_stopped_by_hw_breakpoint)
7871 (linux_supports_stopped_by_hw_breakpoint): New functions.
7872 (linux_target_ops): Install new target methods.
7874 2015-03-04 Pedro Alves <palves@redhat.com>
7876 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7877 * server.c (swbreak_feature, hwbreak_feature): New globals.
7878 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7879 (captured_main): Clear swbreak_feature and hwbreak_feature.
7880 * server.h (swbreak_feature, hwbreak_feature): Declare.
7881 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7882 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7883 supports_stopped_by_hw_breakpoint>: New fields.
7884 (target_supports_stopped_by_sw_breakpoint)
7885 (target_stopped_by_sw_breakpoint)
7886 (target_supports_stopped_by_hw_breakpoint)
7887 (target_stopped_by_hw_breakpoint): Declare.
7889 2015-03-04 Pedro Alves <palves@redhat.com>
7891 enum lwp_stop_reason -> enum target_stop_reason
7892 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7893 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7894 (linux_wait_1, stuck_in_jump_pad_callback)
7895 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7896 (linux_stopped_by_watchpoint):
7897 * linux-low.h (enum lwp_stop_reason): Delete.
7898 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7899 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7901 2015-03-04 Yao Qi <yao.qi@linaro.org>
7903 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7905 2015-03-03 Gary Benson <gbenson@redhat.com>
7907 * hostio.c (handle_vFile): Fix prefix lengths.
7909 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7911 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7914 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7916 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7917 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7918 (clean): Add "rm -f" for above C files.
7919 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7920 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7921 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7922 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7923 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7924 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7925 (init_registers_s390x_vx_linux64)
7926 (init_registers_s390x_tevx_linux64)
7927 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7928 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7930 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7931 (s390_store_vxrs_high): New functions.
7932 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7934 (s390_arch_setup): Add logic for selecting one of the new target
7935 descriptions. Activate the new vector regsets if applicable.
7936 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7937 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7938 and init_registers_s390x_tevx_linux64.
7940 2015-03-01 Pedro Alves <palves@redhat.com>
7942 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7945 2015-02-27 Pedro Alves <palves@redhat.com>
7947 * linux-x86-low.c (u_debugreg_offset): New function.
7948 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7950 2015-02-27 Pedro Alves <palves@redhat.com>
7952 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7953 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7954 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7955 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7956 (ps_lsetfpregs, ps_getpid)
7957 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7958 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7959 (ps_lsetxregs, ps_plog): Declare.
7961 2015-02-27 Pedro Alves <palves@redhat.com>
7963 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7964 IP_AGENT_EXPORT_FUNC.
7965 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7966 IP_AGENT_EXPORT_FUNC.
7967 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7968 (IP_AGENT_EXPORT): Delete.
7969 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7970 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7971 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7972 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7973 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7974 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7975 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7976 (traceframe_read_count, traceframe_write_count)
7977 (traceframes_created, trace_state_variables, get_raw_reg)
7978 (get_trace_state_variable_value, set_trace_state_variable_value)
7979 (ust_loaded, helper_thread_id, cmd_buf): Use
7980 IPA_SYM_EXPORTED_NAME.
7981 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7982 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7983 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7984 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7985 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7986 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7987 EXTERN_C_PUSH/EXTERN_C_POP.
7988 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7989 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7990 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7991 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7992 (traceframe_write_count, traceframe_read_count)
7993 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7994 (about_to_request_buffer_space, get_trace_state_variable_value)
7995 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7996 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7997 EXTERN_C_PUSH/EXTERN_C_POP.
7998 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7999 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8000 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8001 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8002 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8003 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8004 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8005 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8007 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8008 (IP_AGENT_EXPORT_VAR_DECL): Define.
8010 (gdb_agent_get_raw_reg): Declare.
8012 2015-02-27 Tom Tromey <tromey@redhat.com>
8013 Pedro Alves <palves@redhat.com>
8015 Rename symbols whose names are reserved C++ keywords throughout.
8017 2015-02-27 Pedro Alves <palves@redhat.com>
8019 * Makefile.in (COMPILER): New, get it from autoconf.
8020 (CXX): Get from autoconf instead.
8021 (COMPILE.pre): Use COMPILER.
8022 (CC-LD): Rename to ...
8023 (CC_LD): ... this. Use COMPILER.
8024 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8025 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8026 * acinclude.m4: Include build-with-cxx.m4.
8027 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8028 Disable -Werror by default if building in C++ mode.
8029 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8030 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8031 the C++ compiler. Save/restore CXXFLAGS too.
8032 * configure: Regenerate.
8034 2015-02-27 Pedro Alves <palves@redhat.com>
8036 * acinclude.m4: Include libiberty.m4.
8037 * configure.ac: Call libiberty_INIT.
8038 * config.in, configure: Regenerate.
8040 2015-02-26 Pedro Alves <palves@redhat.com>
8042 * linux-low.c (linux_wait_1): When incrementing the PC past a
8043 program breakpoint always use the_low_target.breakpoint_len as
8044 increment, rather than the maximum between that and
8045 the_low_target.decr_pc_after_break.
8047 2015-02-23 Pedro Alves <palves@redhat.com>
8049 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8050 thread was doing a step-over; always adjust the PC if
8051 we stepped over a permanent breakpoint.
8052 (linux_wait_1): If we stepped over breakpoint that was on top of a
8053 permanent breakpoint, manually advance the PC past it.
8055 2015-02-23 Pedro Alves <palves@redhat.com>
8057 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8059 (x86_fill_gregset, x86_store_gregset): Use it when handling
8062 2015-02-20 Pedro Alves <palves@redhat.com>
8064 * thread-db.c: Include "nat/linux-procfs.h".
8065 (thread_db_init): Skip listing new threads if the kernel supports
8066 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8068 2015-02-20 Pedro Alves <palves@redhat.com>
8070 * linux-low.c (status_pending_p_callback): Use ptid_match.
8072 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8074 PR breakpoints/16812
8075 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8076 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8077 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8079 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8081 PR breakpoints/15956
8082 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8084 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8086 * linux-low.c (linux_low_btrace_conf): Print size.
8087 * server.c (handle_btrace_conf_general_set): New.
8088 (hanle_general_set): Call handle_btrace_conf_general_set.
8089 (handle_query): Report Qbtrace-conf:bts:size as supported.
8091 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8093 * linux-low.c (linux_low_enable_btrace): Update parameters.
8094 (linux_low_btrace_conf): New.
8095 (linux_target_ops)<to_btrace_conf>: Initialize.
8096 * server.c (current_btrace_conf): New.
8097 (handle_btrace_enable): Rename to ...
8098 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8099 to target_enable_btrace. Update comment. Update users.
8100 (handle_qxfer_btrace_conf): New.
8101 (qxfer_packets): Add btrace-conf entry.
8102 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8103 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8104 (target_ops)<read_btrace_conf>: New.
8105 (target_enable_btrace): Update parameters.
8106 (target_read_btrace_conf): New.
8108 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8110 * server.c (handle_btrace_general_set): Remove call to
8111 target_supports_btrace.
8112 (supported_btrace_packets): New.
8113 (handle_query): Call supported_btrace_packets.
8114 * target.h: include btrace-common.h.
8115 (btrace_target_info): Removed.
8116 (supports_btrace, target_supports_btrace): Update parameters.
8118 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8120 * Makefile.in (SFILES): Add common/btrace-common.c.
8121 (OBS): Add common/btrace-common.o.
8122 (btrace-common.o): Add build rules.
8123 * linux-low: Include btrace-common.h.
8124 (linux_low_read_btrace): Use struct btrace_data. Call
8125 btrace_data_init and btrace_data_fini.
8127 2015-02-06 Pedro Alves <palves@redhat.com>
8129 * thread-db.c (find_new_threads_callback): Add debug output.
8131 2015-02-04 Pedro Alves <palves@redhat.com>
8133 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8134 (resume_stopped_resumed_lwps): New function.
8135 (linux_wait_for_event_filtered): Use it.
8137 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8139 * Makefile.in (SFILES): Add linux-personality.c.
8140 (linux-personality.o): New rule.
8141 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8142 list of objects to be built.
8143 * linux-low.c: Include nat/linux-personality.h.
8144 (linux_create_inferior): Remove code to disable address space
8145 randomization (moved to ../nat/linux-personality.c). Create
8146 cleanup to disable address space randomization.
8148 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8150 * Makefile.in (posix-strerror.o): New rule.
8151 (mingw-strerror.o): Likewise.
8152 * configure: Regenerated.
8153 * configure.ac: Source file ../common/common.host. Initialize new
8154 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8156 2015-01-14 Yao Qi <yao@codesourcery.com>
8158 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8159 (ppc-linux.o): New rule.
8160 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8161 * configure.ac: AC_CHECK_FUNCS(getauxval).
8162 * config.in: Re-generated.
8163 * configure: Re-generated.
8164 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8165 ppc64_64bit_inferior_p
8167 2015-01-14 Yao Qi <yao@codesourcery.com>
8169 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8170 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8171 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8172 (PT_ORIG_R3, PT_TRAP): Likewise.
8173 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8174 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8175 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8177 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8179 * i387-fp.c (i387_cache_to_xsave): In look over
8180 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8181 zmmh_low_space field by use of zmmh_high_space.
8183 2015-01-09 Pedro Alves <palves@redhat.com>
8185 * linux-low.c (step_over_bkpt): Move higher up in the file.
8186 (handle_extended_wait): Don't store the stop_pc here.
8187 (get_stop_pc): Adjust comments and rename to ...
8188 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8189 stopped for a software breakpoint or hardware breakpoint.
8190 (thread_still_has_status_pending_p): New function.
8191 (status_pending_p_callback): Use
8192 thread_still_has_status_pending_p. If the event is no longer
8193 interesting, resume the LWP.
8194 (handle_tracepoints): Add assert.
8195 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8196 (wstatus_maybe_breakpoint): New function.
8197 (cancel_breakpoint): Delete function.
8198 (check_stopped_by_watchpoint): New function, factored out from
8199 linux_low_filter_event.
8200 (lp_status_maybe_breakpoint): Delete function.
8201 (linux_low_filter_event): Remove filter_ptid argument.
8202 Leave thread group exits pending here. Store the LWP's stop PC.
8203 Always leave events pending.
8204 (linux_wait_for_event_filtered): Pull all events out of the
8205 kernel, and leave them all pending.
8206 (count_events_callback, select_event_lwp_callback): Consider all
8208 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8209 (select_event_lwp): Only give preference to the stepping LWP in
8210 all-stop mode. Adjust comments.
8211 (ignore_event): New function.
8212 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8213 references to cancel_breakpoints. Adjust to renames. Also give
8214 equal priority to all LWPs that have had events in non-stop mode.
8215 If reporting a software breakpoint event, unadjust the LWP's PC.
8216 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8217 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8219 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8220 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8221 (linux_stopped_by_watchpoint): Adjust.
8222 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8223 * linux-low.h (enum lwp_stop_reason): New.
8224 (struct lwp_info) <stop_pc>: Adjust comment.
8225 <stopped_by_watchpoint>: Delete field.
8226 <stop_reason>: New field.
8227 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8228 * mem-break.c (software_breakpoint_inserted_here)
8229 (hardware_breakpoint_inserted_here): New function.
8230 * mem-break.h (software_breakpoint_inserted_here)
8231 (hardware_breakpoint_inserted_here): Declare.
8232 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8233 (cancel_breakpoints): Delete.
8234 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8235 (upload_fast_traceframes): Remove references to
8238 2015-01-09 Pedro Alves <palves@redhat.com>
8240 * thread-db.c (find_new_threads_callback): Ignore thread if the
8241 kernel thread ID is -1.
8243 2015-01-09 Pedro Alves <palves@redhat.com>
8245 * linux-low.c (linux_attach_fail_reason_string): Move to
8246 nat/linux-ptrace.c, and rename.
8247 (linux_attach_lwp): Update comment.
8248 (attach_proc_task_lwp_callback): New function.
8249 (linux_attach): Adjust to rename and use
8250 linux_proc_attach_tgid_threads.
8251 (linux_attach_fail_reason_string): Delete declaration.
8253 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8255 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8256 * server.c (gdbserver_version): Likewise.
8258 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8260 * remote-utils.c: Include ctype.h.
8261 (input_interrupt): Explicitly handle the case when the char
8262 received is the NUL byte. Improve the printing of non-ASCII
8265 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8267 * linux-low.c (linux_low_filter_event): Update call to
8268 linux_enable_event_reporting following the addition of
8269 a new parameter to that function.
8271 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8274 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8275 (AARCH64_FPCR_REGNO): Likewise.
8276 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8277 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8278 (aarch64_store_fpregset): Likewise.
8280 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8282 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8283 Remove FIXME comment about assumption about N.
8285 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8287 * configure.ac: If large-file support is disabled in GDBserver,
8288 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8289 * configure: Regenerate.
8291 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8293 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8294 warning upon ENODATA from ptrace.
8295 * linux-s390-low.c (s390_store_tdb): New.
8296 (s390_regsets): Add regset for NT_S390_TDB.
8298 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8300 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8301 without a fill_function.
8302 * linux-s390-low.c (s390_fill_last_break): Remove.
8303 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8304 (s390_arch_setup): Use regset's size instead of fill_function for
8307 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8309 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8310 the regset's store function when ptrace returned an error.
8311 * regcache.c (get_thread_regcache): Invalidate register cache
8312 before fetching inferior's registers.
8314 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8316 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8317 while-loop as for-loop.
8318 (regsets_store_inferior_registers): Likewise.
8320 2014-11-28 Yao Qi <yao@codesourcery.com>
8322 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8323 * config.in, configure: Re-generate.
8324 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8327 2014-11-21 Yao Qi <yao@codesourcery.com>
8329 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8330 (AC_CHECK_HEADERS): Remove malloc.h.
8331 * configure: Re-generated.
8332 * config.in: Re-generated.
8333 * server.h: Don't include alloca.h and malloc.h.
8334 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8335 Don't include malloc.h.
8337 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8339 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8340 corresponding ERRNO check in same block.
8342 2014-11-12 Pedro Alves <palves@redhat.com>
8344 * server.c (cont_thread): Update comment.
8345 (start_inferior, attach_inferior): No longer clear cont_thread.
8346 (handle_v_cont): No longer set cont_thread.
8347 (captured_main): Clear cont_thread each time a GDB connects.
8349 2014-11-12 Pedro Alves <palves@redhat.com>
8351 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8352 thread, and don't resume all threads if the Hc thread has exited.
8354 2014-11-12 Pedro Alves <palves@redhat.com>
8356 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8357 the process group instead of to a specific LWP.
8359 2014-10-15 Pedro Alves <palves@redhat.com>
8362 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8364 (arm_set_thread_context): Delete.
8365 (the_low_target): Adjust.
8366 * win32-i386-low.c (debug_registers_changed)
8367 (debug_registers_used): Delete.
8368 (update_debug_registers_callback): New function.
8369 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8370 needing to update their debug registers.
8371 (win32_get_current_dr): New function.
8372 (x86_dr_low_get_addr, x86_dr_low_get_control)
8373 (x86_dr_low_get_status): Fetch the debug register from the thread
8375 (i386_initial_stuff): Adjust.
8376 (i386_get_thread_context): Remove current_event parameter. Don't
8377 clear debug_registers_changed nor copy DR values to
8379 (i386_set_thread_context): Delete.
8380 (i386_prepare_to_resume): New function.
8381 (i386_thread_added): Mark the thread as needing to update irs
8383 (the_low_target): Remove i386_set_thread_context and install
8384 i386_prepare_to_resume.
8385 * win32-low.c (win32_get_thread_context): Adjust.
8386 (win32_set_thread_context): Use SetThreadContext
8388 (win32_prepare_to_resume): New function.
8389 (win32_require_context): New function, factored out from ...
8390 (thread_rec): ... this.
8391 (continue_one_thread): Call win32_prepare_to_resume on each thread
8392 we're about to continue.
8393 (win32_resume): Call win32_prepare_to_resume on the event thread.
8394 * win32-low.h (struct win32_thread_info)
8395 <debug_registers_changed>: New field.
8396 (struct win32_target_ops): Change prototype of set_thread_context,
8397 delete set_thread_context and add prepare_to_resume.
8398 (win32_require_context): New declaration.
8400 2014-10-08 Gary Benson <gbenson@redhat.com>
8402 * server.h: Do not include common-exceptions.h.
8404 2014-10-08 Gary Benson <gbenson@redhat.com>
8406 * server.h: Do not include cleanups.h.
8408 2014-09-30 James Hogan <james.hogan@imgtec.com>
8410 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8413 2014-09-23 Yao Qi <yao@codesourcery.com>
8415 * linux-low.c (lp_status_maybe_breakpoint): New function.
8416 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8417 (count_events_callback): Likewise.
8418 (select_event_lwp_callback): Likewise.
8419 (cancel_breakpoints_callback): Likewise.
8421 2014-09-19 Don Breazeal <donb@codesourcery.com>
8423 * linux-low.c (handle_extended_wait): Call
8424 linux_ptrace_get_extended_event.
8425 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8426 linux_is_extended_waitstatus.
8428 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8430 * Makefile.in (CPPFLAGS): Define.
8431 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8432 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8434 2014-09-16 Gary Benson <gbenson@redhat.com>
8436 * inferiors.h (current_inferior): Renamed as...
8437 (current_thread): New variable. All uses updated.
8438 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8439 (maybe_move_out_of_jump_pad): Likewise.
8440 (cancel_breakpoint): Likewise.
8441 (linux_low_filter_event): Likewise.
8442 (wait_for_sigstop): Likewise.
8443 (linux_resume_one_lwp): Likewise.
8444 (need_step_over_p): Likewise.
8445 (start_step_over): Likewise.
8446 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8447 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8448 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8449 and save_inferior as saved_thread.
8450 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8452 (regcache_invalidate_thread): Likewise.
8453 * remote-utils.c (prepare_resume_reply): Likewise.
8454 * thread-db.c (thread_db_get_tls_address): Likewise.
8455 (disable_thread_event_reporting): Likewise.
8456 (remove_thread_event_breakpoints): Likewise.
8457 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8459 * target.h (set_desired_inferior): Renamed as...
8460 (set_desired_thread): New declaration. All uses updated.
8461 * server.c (myresume): Updated comment to reference thread instead
8463 (handle_serial_event): Likewise.
8464 (handle_target_event): Likewise.
8466 2014-09-12 Tom Tromey <tromey@redhat.com>
8467 Gary Benson <gbenson@redhat.com>
8469 * regcache.h: Include common-regcache.h.
8470 (regcache_read_pc): Don't declare.
8471 * regcache.c (get_thread_regcache_for_ptid): New function.
8473 2014-09-11 Tom Tromey <tromey@redhat.com>
8474 Gary Benson <gbenson@redhat.com>
8476 * symbol.c: New file.
8477 * Makefile.in (SFILES): Add symbol.c.
8478 (OBS): Add symbol.o.
8480 2014-09-11 Gary Benson <gbenson@redhat.com>
8482 * target.c (target_stop_ptid, target_continue_ptid): New
8485 2014-09-11 Tom Tromey <tromey@redhat.com>
8486 Gary Benson <gbenson@redhat.com>
8488 * target.h: Include target/target.h.
8489 * target.c (target_read_memory, target_read_uint32)
8490 (target_write_memory): New functions.
8492 2014-09-11 Gary Benson <gbenson@redhat.com>
8494 * server.h (debug_hw_points): Don't declare.
8495 * server.c (debug_hw_points): Don't define. Replace all uses
8496 with show_debug_regs.
8497 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8498 all uses with show_debug_regs.
8500 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8502 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8503 endianness into account.
8504 (ppc_supply_ptrace_register): Likewise.
8506 2014-09-03 James Hogan <james.hogan@imgtec.com>
8508 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8509 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8511 2014-09-03 Gary Benson <gbenson@redhat.com>
8513 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8514 ALL_DEBUG_ADDRESS_REGISTERS.
8516 2014-09-02 Gary Benson <gbenson@redhat.com>
8518 * i386-low.h: Renamed as...
8519 * x86-low.h: New file. All type, function and variable name
8520 prefixes changed from "i386_" to "x86_". All references updated.
8521 * i386-low.c: Renamed as...
8522 * x86-low.c: New file. All type, function and variable name
8523 prefixes changed from "i386_" to "x86_". All references updated.
8525 2014-09-02 Gary Benson <gbenson@redhat.com>
8527 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8528 (x86_linux_new_thread): Likewise.
8530 2014-08-29 Gary Benson <gbenson@redhat.com>
8532 * server.h (setjmp.h): Do not include.
8533 (toplevel): Do not declare.
8534 (common-exceptions.h): Include.
8535 (cleanups.h): Likewise.
8536 * server.c (toplevel): Do not define.
8537 (exit_code): New static global.
8538 (detach_or_kill_for_exit_cleanup): New function.
8539 (main): New function. Original main renamed to...
8540 (captured_main): New function.
8541 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8543 2014-08-29 Gary Benson <gbenson@redhat.com>
8545 * Makefile.in (SFILES): Add common/common-exceptions.c.
8546 (OBS): Add common-exceptions.o.
8547 (common-exceptions.o): New rule.
8548 * utils.c (prepare_to_throw_exception): New function.
8550 2014-08-29 Gary Benson <gbenson@redhat.com>
8552 * config.in: Regenerate.
8553 * configure: Likewise.
8555 2014-08-29 Gary Benson <gbenson@redhat.com>
8557 * Makefile.in (SFILES): Add common/cleanups.c.
8559 (cleanups.o): New rule.
8561 2014-08-29 Gary Benson <gbenson@redhat.com>
8563 * utils.c (internal_vwarning): New function.
8565 2014-08-28 Gary Benson <gbenson@redhat.com>
8567 * utils.h (fatal): Remove declaration.
8568 * utils.c (fatal): Remove function.
8570 2014-08-28 Gary Benson <gbenson@redhat.com>
8572 * tracepoint.c (gdb_agent_init): Replace fatal with
8574 (initialize_tracepoint): Likewise.
8576 2014-08-28 Gary Benson <gbenson@redhat.com>
8578 * remote-utils.c (remote_prepare): Replace fatal with error.
8580 2014-08-28 Gary Benson <gbenson@redhat.com>
8582 * linux-low.c (linux_async): Replace fatal with warning.
8584 (linux_start_non_stop): Return -1 if linux_async failed.
8586 2014-08-28 Gary Benson <gbenson@redhat.com>
8588 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8590 (i386_dr_low_get_addr): Remove vague comment.
8591 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8594 2014-08-28 Gary Benson <gbenson@redhat.com>
8596 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8597 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8599 (linux_resume_one_lwp): Likewise.
8600 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8602 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8603 with internal_error.
8604 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8605 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8606 (find_register_by_name): Replace fatal with internal_error.
8607 (find_regno): Likewise.
8608 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8609 * thread-db.c (thread_db_create_event): Likewise.
8610 (thread_db_load_search): Likewise.
8611 (try_thread_db_load_1): Likewise.
8612 * tracepoint.c (get_jump_space_head): Replace fatal with
8614 (claim_trampoline_space): Likewise.
8615 (have_fast_tracepoint_trampoline_buffer): Likewise.
8616 (cmd_qtstart): Likewise.
8617 (stop_tracing): Likewise.
8618 (fast_tracepoint_collecting): Likewise.
8619 (target_malloc): Likewise.
8620 (download_tracepoint): Likewise.
8621 (download_trace_state_variables): Replace check with gdb_assert.
8622 (upload_fast_traceframes): Replace fatal with internal_error.
8624 2014-08-19 Tom Tromey <tromey@redhat.com>
8625 Gary Benson <gbenson@redhat.com>
8627 * Makefile.in (SFILES): Add common/common-debug.c.
8628 (OBS): Add common-debug.o.
8629 (common-debug.o): New rule.
8630 * debug.h (debug_printf): Don't declare.
8631 * debug.c (debug_printf): Renamed and rewritten as...
8632 (debug_vprintf): New function.
8634 2014-08-19 Gary Benson <gbenson@redhat.com>
8636 * utils.h: Do not include print-utils.h.
8638 2014-08-19 Tom Tromey <tromey@redhat.com>
8639 Gary Benson <gbenson@redhat.com>
8641 * server.h: Add static assertion.
8642 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8644 2014-08-19 Tom Tromey <tromey@redhat.com>
8645 Gary Benson <gbenson@redhat.com>
8647 * Makefile.in (SFILES): Add common/errors.c.
8648 (OBS): Add errors.o.
8649 (IPA_OBS): Add errors-ipa.o.
8650 (errors.o): New rule.
8651 (errors-ipa.o): Likewise.
8652 * utils.h (perror_with_name, error, warning): Don't declare.
8653 * utils.c (warning): Renamed and rewritten as...
8654 (vwarning): New function.
8655 (error): Renamed and rewritten as...
8656 (verror): New function.
8657 (internal_error): Renamed and rewritten as...
8658 (internal_verror): New function.
8660 2014-08-07 Gary Benson <gbenson@redhat.com>
8662 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8663 * configure: Regenerate.
8664 * config.in: Likewise.
8665 * server.h: Do not include errno.h.
8666 * event-loop.c: Likewise.
8667 * hostio-errno.c: Likewise.
8668 * linux-low.c: Likewise.
8669 * remote-utils.c: Likewise.
8670 * spu-low.c: Likewise.
8671 * utils.c: Likewise.
8672 * gdbreplay.c: Unconditionally include errno.h.
8674 2014-08-07 Gary Benson <gbenson@redhat.com>
8676 * server.h: Do not include string.h.
8677 * event-loop.c: Likewise.
8678 * linux-low.c: Likewise.
8679 * regcache.c: Likewise.
8680 * remote-utils.c: Likewise.
8681 * spu-low.c: Likewise.
8682 * utils.c: Likewise.
8684 2014-08-07 Gary Benson <gbenson@redhat.com>
8686 * server.h: Do not include gdb_assert.h.
8688 2014-08-07 Gary Benson <gbenson@redhat.com>
8690 * server.h: Do not include common-utils.h.
8692 2014-08-07 Gary Benson <gbenson@redhat.com>
8694 * server.h: Do not include ptid.h.
8695 * notif.h: Likewise.
8697 2014-08-07 Gary Benson <gbenson@redhat.com>
8699 * server.h: Do not include gdb_locale.h.
8701 2014-08-07 Gary Benson <gbenson@redhat.com>
8703 * server.h: Do not include gdb/signals.h.
8704 * win32-low.c: Likewise.
8706 2014-08-07 Gary Benson <gbenson@redhat.com>
8708 * server.h: Do not include pathmax.h.
8710 2014-08-07 Gary Benson <gbenson@redhat.com>
8712 * server.h: Do not include libiberty.h.
8713 * linux-bfin-low.c: Likewise.
8715 2014-08-07 Gary Benson <gbenson@redhat.com>
8717 * server.h: Do not include ansidecl.h.
8719 2014-08-07 Gary Benson <gbenson@redhat.com>
8721 * linux-x86-low.c: Do not include stddef.h.
8722 * lynx-ppc-low.c: Likewise.
8723 * tracepoint.c: Likewise.
8725 2014-08-07 Gary Benson <gbenson@redhat.com>
8727 * server.h: Do not include stdarg.h.
8728 * nto-low.c: Likewise.
8730 2014-08-07 Gary Benson <gbenson@redhat.com>
8732 * server.h: Do not include stdlib.h.
8733 * inferiors.c: Likewise.
8734 * linux-low.c: Likewise.
8735 * regcache.c: Likewise.
8736 * spu-low.c: Likewise.
8737 * tracepoint.c: Likewise.
8738 * utils.c: Likewise.
8740 2014-08-07 Gary Benson <gbenson@redhat.com>
8742 * server.h: Do not include stdio.h.
8743 * linux-low.c: Likewise.
8744 * remote-utils.c: Likewise.
8745 * spu-low.c: Likewise.
8746 * utils.c: Likewise.
8747 * wincecompat.c: Likewise.
8749 2014-08-06 Gary Benson <gbenson@redhat.com>
8751 * regcache.c (init_register_cache): Move conditionals inside if.
8753 2014-08-06 Gary Benson <gbenson@redhat.com>
8755 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8757 2014-07-31 Gary Benson <gbenson@redhat.com>
8759 * ax.h: Do not include server.h.
8760 * gdbthread.h: Likewise.
8761 * lynx-low.h: Likewise.
8762 * notif.h: Likewise.
8764 2014-07-30 Gary Benson <gbenson@redhat.com>
8766 * server.h: Include common-defs.h.
8767 Do not include config.h or build-gnulib-gdbserver/config.h.
8769 2014-07-30 Gary Benson <gbenson@redhat.com>
8771 * hostio-errno.c: Move server.h to top of includes list.
8772 * inferiors.c: Likewise.
8773 * linux-x86-low.c: Likewise.
8774 * notif.c: Include server.h.
8776 2014-07-24 Tom Tromey <tromey@redhat.com>
8777 Gary Benson <gbenson@redhat.com>
8779 * server.h (CORE_ADDR): Now unsigned.
8781 2014-07-16 Pedro Alves <palves@redhat.com>
8783 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8785 2014-07-15 Pedro Alves <palves@redhat.com>
8787 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8790 2014-07-11 Pedro Alves <palves@redhat.com>
8792 * linux-low.c (kill_wait_lwp): New function, based on
8793 kill_one_lwp_callback, but use my_waitpid directly.
8794 (kill_one_lwp_callback, linux_kill): Use it.
8796 2014-06-23 Pedro Alves <palves@redhat.com>
8798 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8799 before setting DR0..DR3.
8801 2014-06-20 Gary Benson <gbenson@redhat.com>
8803 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8804 * configure: Regenerated.
8805 * config.in: Likewise.
8807 2014-06-20 Gary Benson <gbenson@redhat.com>
8809 * Makefile.in (SFILES): Update locations for files moved
8811 (object file files): Reordered.
8813 2014-06-20 Gary Benson <gbenson@redhat.com>
8815 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8816 (i386_dr_low_set_addr): Likewise.
8817 (i386_dr_low_get_addr): Likewise.
8818 (i386_dr_low_can_set_control): Likewise.
8819 (i386_dr_low_set_control): Likewise.
8820 (i386_dr_low_get_control): Likewise.
8821 (i386_dr_low_get_status): Likewise.
8822 (i386_get_debug_register_length): Likewise.
8823 * linux-x86-low.c (i386_dr_low_set_addr):
8824 Changed signature. Made static.
8825 (i386_dr_low_get_addr): Likewise.
8826 (i386_dr_low_set_control): Likewise.
8827 (i386_dr_low_get_control): Likewise.
8828 (i386_dr_low_get_status): Likewise.
8829 (i386_dr_low): New global variable.
8830 * win32-i386-low.c (i386_dr_low_set_addr):
8831 Changed signature. Made static.
8832 (i386_dr_low_get_addr): Likewise.
8833 (i386_dr_low_set_control): Likewise.
8834 (i386_dr_low_get_control): Likewise.
8835 (i386_dr_low_get_status): Likewise.
8836 (i386_dr_low): New global variable.
8838 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8840 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8841 * Makefile.in (AR, AR_FLAGS): Define.
8842 * configure: Regenerate.
8844 2014-06-19 Gary Benson <gbenson@redhat.com>
8846 * Makefile.in (i386-dregs.o): New rule.
8847 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8848 * i386-low.c (target.h): Remove include.
8849 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8850 (DR_CONTROL_SHIFT): Likewise.
8851 (DR_CONTROL_SIZE): Likewise.
8852 (DR_RW_EXECUTE): Likewise.
8853 (DR_RW_WRITE): Likewise.
8854 (DR_RW_READ): Likewise.
8855 (DR_RW_IORW): Likewise.
8856 (DR_LEN_1): Likewise.
8857 (DR_LEN_2): Likewise.
8858 (DR_LEN_4): Likewise.
8859 (DR_LEN_8): Likewise.
8860 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8861 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8862 (DR_ENABLE_SIZE): Likewise.
8863 (DR_LOCAL_SLOWDOWN): Likewise.
8864 (DR_GLOBAL_SLOWDOWN): Likewise.
8865 (DR_CONTROL_RESERVED): Likewise.
8866 (I386_DR_CONTROL_MASK): Likewise.
8867 (I386_DR_VACANT): Likewise.
8868 (I386_DR_LOCAL_ENABLE): Likewise.
8869 (I386_DR_GLOBAL_ENABLE): Likewise.
8870 (I386_DR_DISABLE): Likewise.
8871 (I386_DR_SET_RW_LEN): Likewise.
8872 (I386_DR_GET_RW_LEN): Likewise.
8873 (I386_DR_WATCH_HIT): Likewise.
8874 (i386_wp_op_t): Likewise.
8875 (i386_show_dr): Likewise.
8876 (i386_length_and_rw_bits): Likewise.
8877 (i386_insert_aligned_watchpoint): Likewise.
8878 (i386_remove_aligned_watchpoint): Likewise.
8879 (i386_handle_nonaligned_watchpoint): Likewise.
8880 i386_update_inferior_debug_regs(): Likewise.
8881 (i386_dr_insert_watchpoint): Likewise.
8882 (i386_dr_remove_watchpoint): Likewise.
8883 (i386_dr_region_ok_for_watchpoint): Likewise.
8884 (i386_dr_stopped_data_address): Likewise.
8885 (i386_dr_stopped_by_watchpoint): Likewise.
8887 2014-06-19 Gary Benson <gbenson@redhat.com>
8889 * i386-low.c (i386_dr_show): Renamed to
8890 i386_show_dr and made static. All uses updated.
8891 (i386_dr_length_and_rw_bits): Renamed to
8892 i386_length_and_rw_bits and made static.
8894 (i386_dr_insert_aligned_watchpoint): Renamed to
8895 i386_insert_aligned_watchpoint and made static.
8897 (i386_dr_remove_aligned_watchpoint): Renamed to
8898 i386_remove_aligned_watchpoint and made static.
8900 (i386_dr_update_inferior_debug_regs): Renamed to
8901 i386_update_inferior_debug_regs and made static.
8904 2014-06-18 Gary Benson <gbenson@redhat.com>
8906 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8907 (i386_dr_low_can_set_control): Likewise.
8908 (i386_get_debug_register_length): Likewise.
8909 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8910 (i386_dr_low_can_set_control): Likewise.
8911 (i386_get_debug_register_length): Likewise.
8913 2014-06-17 Gary Benson <gbenson@redhat.com>
8915 * i386-low.h (i386-dregs.h): New include.
8916 (DR_FIRSTADDR): Now in i386-dregs.h.
8917 (DR_LASTADDR): Likewise.
8918 (DR_NADDR): Likewise.
8919 (DR_STATUS): Likewise.
8920 (DR_CONTROL): Likewise.
8921 (i386_debug_reg_state): Likewise.
8922 (i386_dr_insert_watchpoint): Likewise.
8923 (i386_dr_remove_watchpoint): Likewise.
8924 (i386_dr_region_ok_for_watchpoint): Likewise.
8925 (i386_dr_stopped_data_address): Likewise.
8926 (i386_dr_stopped_by_watchpoint): Likewise.
8927 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8929 2014-06-18 Gary Benson <gbenson@redhat.com>
8931 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8932 i386_dr_insert_watchpoint.
8933 (i386_low_remove_watchpoint): Renamed to
8934 i386_dr_remove_watchpoint.
8935 (i386_low_region_ok_for_watchpoint): Renamed to
8936 i386_dr_region_ok_for_watchpoint.
8937 (i386_low_stopped_data_address): Renamed to
8938 i386_dr_stopped_data_address.
8939 (i386_low_stopped_by_watchpoint): Renamed to
8940 i386_dr_stopped_by_watchpoint.
8941 * i386-low.c (i386_show_dr): Renamed to
8942 i386_dr_show and made nonstatic. All uses updated.
8943 (i386_length_and_rw_bits): Renamed to
8944 i386_dr_length_and_rw_bits and made nonstatic.
8946 (i386_insert_aligned_watchpoint): Renamed to
8947 i386_dr_insert_aligned_watchpoint and made nonstatic.
8949 (i386_remove_aligned_watchpoint): Renamed to
8950 i386_dr_remove_aligned_watchpoint and made nonstatic.
8952 (i386_update_inferior_debug_regs): Renamed to
8953 i386_dr_update_inferior_debug_regs and made nonstatic.
8955 (i386_low_insert_watchpoint): Renamed to
8956 i386_dr_insert_watchpoint. All uses updated.
8957 (i386_low_remove_watchpoint): Renamed to
8958 i386_dr_remove_watchpoint. All uses updated.
8959 (i386_low_region_ok_for_watchpoint): Renamed to
8960 i386_dr_region_ok_for_watchpoint. All uses updated.
8961 (i386_low_stopped_data_address): Renamed to
8962 i386_dr_stopped_data_address. All uses updated.
8963 (i386_low_stopped_by_watchpoint): Renamed to
8964 i386_dr_stopped_by_watchpoint. All uses updated.
8966 2014-06-18 Gary Benson <gbenson@redhat.com>
8968 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8969 (i386_dr_low_can_set_control): Likewise.
8970 (i386_insert_aligned_watchpoint): New check.
8972 2014-06-18 Gary Benson <gbenson@redhat.com>
8974 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8977 2014-06-18 Gary Benson <gbenson@redhat.com>
8979 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8980 instead of fatal and error.
8981 (i386_handle_nonaligned_watchpoint): Likewise.
8983 2014-06-18 Gary Benson <gbenson@redhat.com>
8985 * i386-low.c (i386_get_debug_register_length): New macro.
8986 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8987 (i386_show_dr): Use debug_printf instead of fprintf. Use
8988 phex to format values.
8990 2014-06-18 Gary Benson <gbenson@redhat.com>
8992 * i386-low.h: Comment changes.
8993 * i386-low.c: Likewise.
8995 2014-06-18 Gary Benson <gbenson@redhat.com>
8997 * i386-low.c: Whitespace changes.
8999 2014-06-12 Tom Tromey <tromey@redhat.com>
9001 * utils.c (freeargv): Remove.
9003 2014-06-12 Tom Tromey <tromey@redhat.com>
9005 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9006 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9007 (parse_debug_format_options): Likewise.
9008 (gdbserver_usage): Likewise.
9009 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9010 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9011 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9013 ($(LIBGNU)): Depend on libiberty.
9014 (all-lib): Recurse into all subdirs.
9015 (install-only): Invoke "install" target in subdirs.
9016 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9018 * configure: Rebuild.
9019 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9020 for vasprintf, vsnprintf, or gettimeofday.
9021 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9024 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9026 * development.sh: Delete.
9027 * Makefile.in (config.status): Adjust dependency on development.sh.
9028 * configure.ac: Adjust development.sh source call.
9029 * configure: Regenerate.
9031 2014-06-02 Pedro Alves <palves@redhat.com>
9033 * ax.c (gdb_free_agent_expr): New function.
9034 * ax.h (gdb_free_agent_expr): New declaration.
9035 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9037 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9039 (clear_breakpoint_conditions_and_commands): New function.
9040 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9041 (clear_breakpoint_conditions_and_commands): New declaration.
9043 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9045 * linux-aarch64-low.c (asm/ptrace.h): Include.
9047 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9049 Fix TLS access for -static -pthread.
9050 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9051 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9052 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9054 2014-05-20 Pedro Alves <palves@redhat.com>
9056 * linux-aarch64-low.c (aarch64_insert_point)
9057 (aarch64_remove_point): No longer check whether the type is
9058 supported here. Adjust to new interface.
9059 (the_low_target): Install aarch64_supports_z_point_type as
9060 supports_z_point_type method.
9061 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9062 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9063 instead of a Z packet char. Adjust.
9064 (arm_supports_z_point_type): New function.
9065 (arm_insert_point, arm_remove_point): Adjust to new interface.
9066 (the_low_target): Install arm_supports_z_point_type.
9067 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9068 (cris_insert_point, cris_remove_point): Adjust to new interface.
9069 Don't check whether the type is supported here.
9070 (the_low_target): Install cris_supports_z_point_type.
9071 * linux-low.c (linux_supports_z_point_type): New function.
9072 (linux_insert_point, linux_remove_point): Adjust to new interface.
9073 * linux-low.h (struct linux_target_ops) <insert_point,
9074 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9075 raw_breakpoint pointer parameter.
9076 <supports_z_point_type>: New method.
9077 * linux-mips-low.c (mips_supports_z_point_type): New function.
9078 (mips_insert_point, mips_remove_point): Adjust to new interface.
9079 Use mips_supports_z_point_type.
9080 (the_low_target): Install mips_supports_z_point_type.
9081 * linux-ppc-low.c (the_low_target): Install NULL as
9082 supports_z_point_type method.
9083 * linux-s390-low.c (the_low_target): Install NULL as
9084 supports_z_point_type method.
9085 * linux-sparc-low.c (the_low_target): Install NULL as
9086 supports_z_point_type method.
9087 * linux-x86-low.c (x86_supports_z_point_type): New function.
9088 (x86_insert_point): Adjust to new insert_point interface. Use
9089 insert_memory_breakpoint. Adjust to new
9090 i386_low_insert_watchpoint interface.
9091 (x86_remove_point): Adjust to remove_point interface. Use
9092 remove_memory_breakpoint. Adjust to new
9093 i386_low_remove_watchpoint interface.
9094 (the_low_target): Install x86_supports_z_point_type.
9095 * lynx-low.c (lynx_target_ops): Install NULL as
9096 supports_z_point_type callback.
9097 * nto-low.c (nto_supports_z_point_type): New.
9098 (nto_insert_point, nto_remove_point): Adjust to new interface.
9099 (nto_target_ops): Install nto_supports_z_point_type.
9100 * mem-break.c: Adjust intro comment.
9101 (struct raw_breakpoint) <raw_type, size>: New fields.
9102 <inserted>: Update comment.
9103 <shlib_disabled>: Delete field.
9104 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9105 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9106 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9107 (raw_bkpt_type_to_target_hw_bp_type): New function.
9108 (find_enabled_raw_code_breakpoint_at): New function.
9109 (find_raw_breakpoint_at): New type and size parameters. Use them.
9110 (insert_memory_breakpoint): New function, based off
9111 set_raw_breakpoint_at.
9112 (remove_memory_breakpoint): New function.
9113 (set_raw_breakpoint_at): Reimplement.
9114 (set_breakpoint): New, based on set_breakpoint_at.
9115 (set_breakpoint_at): Reimplement.
9116 (delete_raw_breakpoint): Go through the_target->remove_point
9117 instead of assuming memory breakpoints.
9118 (find_gdb_breakpoint_at): Delete.
9119 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9120 (find_gdb_breakpoint): New function.
9121 (set_gdb_breakpoint_at): Delete.
9122 (z_type_supported): New function.
9123 (set_gdb_breakpoint_1): New function, loosely based off
9124 set_gdb_breakpoint_at.
9125 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9126 (delete_gdb_breakpoint_at): Delete.
9127 (delete_gdb_breakpoint_1): New function, loosely based off
9128 delete_gdb_breakpoint_at.
9129 (delete_gdb_breakpoint): New function.
9130 (clear_gdb_breakpoint_conditions): Rename to ...
9131 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9133 (add_condition_to_breakpoint): Make static.
9134 (add_breakpoint_condition): Take a struct breakpoint pointer
9135 instead of an address. Adjust.
9136 (gdb_condition_true_at_breakpoint): Rename to ...
9137 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9139 (gdb_condition_true_at_breakpoint): Reimplement.
9140 (add_breakpoint_commands): Take a struct breakpoint pointer
9141 instead of an address. Adjust.
9142 (gdb_no_commands_at_breakpoint): Rename to ...
9143 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9144 parameter. Return true if no breakpoint was found. Change debug
9146 (gdb_no_commands_at_breakpoint): Reimplement.
9147 (run_breakpoint_commands): Rename to ...
9148 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9149 and change return type to boolean.
9150 (run_breakpoint_commands): New function.
9151 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9152 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9153 breakpoint. Go through the_target->remove_point instead of
9154 assuming memory breakpoint.
9155 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9156 software and hardware breakpoints.
9157 (reinsert_raw_breakpoint): Go through the_target->insert_point
9158 instead of assuming memory breakpoint.
9159 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9160 software and hardware breakpoints.
9161 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9162 Check both software and hardware breakpoints.
9163 (validate_inserted_breakpoint): Assert the breakpoint is a
9164 software breakpoint. Set the inserted flag to -1 instead of
9165 setting shlib_disabled.
9166 (delete_disabled_breakpoints): Adjust.
9167 (validate_breakpoints): Only validate software breakpoints.
9168 Adjust to inserted flag change.
9169 (check_mem_read, check_mem_write): Skip breakpoint types other
9170 than software breakpoints. Adjust to inserted flag change.
9171 * mem-break.h (enum raw_bkpt_type): New enum.
9172 (raw_breakpoint, struct process_info): Forward declare.
9173 (Z_packet_to_target_hw_bp_type): Delete declaration.
9174 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9175 (set_gdb_breakpoint, delete_gdb_breakpoint)
9176 (clear_breakpoint_conditions): New declarations.
9177 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9178 (breakpoint_inserted_here): Update comment.
9179 (add_breakpoint_condition, add_breakpoint_commands): Replace
9180 address parameter with a breakpoint pointer parameter.
9181 (gdb_breakpoint_here): Update comment.
9182 (delete_gdb_breakpoint_at): Delete.
9183 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9184 * server.c (process_point_options): Take a struct breakpoint
9185 pointer instead of an address. Adjust.
9186 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9187 delete_gdb_breakpoint.
9188 * spu-low.c (spu_target_ops): Install NULL as
9189 supports_z_point_type method.
9190 * target.h: Include mem-break.h.
9191 (struct target_ops) <prepare_to_access_memory>: Update comment.
9192 <supports_z_point_type>: New field.
9193 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9194 instead of a char. Also take a raw breakpoint pointer.
9195 * win32-arm-low.c (the_low_target): Install NULL as
9196 supports_z_point_type.
9197 * win32-i386-low.c (i386_supports_z_point_type): New function.
9198 (i386_insert_point, i386_remove_point): Adjust to new interface.
9199 (the_low_target): Install i386_supports_z_point_type.
9200 * win32-low.c (win32_supports_z_point_type): New function.
9201 (win32_insert_point, win32_remove_point): Adjust to new interface.
9202 (win32_target_ops): Install win32_supports_z_point_type.
9203 * win32-low.h (struct win32_target_ops):
9204 <supports_z_point_type>: New method.
9205 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9206 instead of a char. Also take a raw breakpoint pointer.
9208 2014-05-20 Pedro Alves <palves@redhat.com>
9210 * mem-break.h: Include break-common.h.
9211 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9212 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9213 (Z_packet_to_target_hw_bp_type): New declaration.
9214 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9215 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9216 (Z_PACKET_ACCESS_WP): Delete macros.
9217 (Z_packet_to_hw_type): Delete function.
9218 * i386-low.h: Don't include break-common.h here.
9219 (Z_packet_to_hw_type): Delete declaration.
9220 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9221 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9222 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9223 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9224 * linux-aarch64-low.c: Don't include break-common.h here.
9225 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9226 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9227 (Z_packet_to_target_hw_bp_type): Delete function.
9228 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9230 (mips_insert_point, mips_remove_point): Use
9231 Z_packet_to_target_hw_bp_type.
9233 2014-05-20 Pedro Alves <palves@redhat.com>
9235 * linux-aarch64-low.c: Include break-common.h.
9236 (enum target_point_type): Delete.
9237 (Z_packet_to_point_type): Rename to ...
9238 (Z_packet_to_target_hw_bp_type): ... this, and return a
9239 target_hw_bp_type instead.
9240 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9241 instead of an enum target_point_type.
9242 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9244 (aarch64_dr_state_insert_one_point)
9245 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9246 (aarch64_handle_aligned_watchpoint)
9247 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9248 Take an enum target_hw_bp_type instead of an enum
9250 (aarch64_supports_z_point_type): New function.
9251 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9252 use Z_packet_to_target_hw_bp_type.
9254 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9256 * configure.ac: Only use -Werror by default when DEVELOPMENT
9258 * configure: Regenerate.
9260 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9262 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9263 * linux-x86-low.c (X86_64_USER_REGS): New.
9264 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9266 2014-04-28 Yao Qi <yao@codesourcery.com>
9268 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9271 2014-04-25 Pedro Alves <palves@redhat.com>
9274 * linux-low.c (linux_attach_fail_reason_string): New function.
9275 (linux_attach_lwp): Delete.
9276 (linux_attach_lwp_1): Rename to ...
9277 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9278 argument. Remove "initial" parameter. Return int instead of
9279 void. Don't error or warn here.
9280 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9281 failure to attach to the tgid. Call warning when failing to
9283 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9284 argument. Remove "initial" parameter. Return int instead of
9285 void. Don't error or warn here.
9286 (linux_attach_fail_reason_string): New declaration.
9287 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9288 interface change. Use linux_attach_fail_reason_string.
9290 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9291 Walfred Tedeschi <walfred.tedeschi@intel.com>
9293 * Makefile.in: Added rules to handle new files
9294 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9295 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9296 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9297 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9298 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9299 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9301 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9302 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9303 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9304 i386/x32-avx512.xml.
9305 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9306 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9307 i386/x32-avx512-linux.xml.
9308 * i387-fp.c (num_avx512_k_registers): New constant for number
9310 (num_avx512_zmmh_low_registers): New constant for number of
9311 lower ZMM registers (0-15).
9312 (num_avx512_zmmh_high_registers): New constant for number of
9313 higher ZMM registers (16-31).
9314 (num_avx512_ymmh_registers): New contant for number of higher
9315 YMM registers (ymm16-31 added by avx521 on x86_64).
9316 (num_avx512_xmm_registers): New constant for number of higher
9317 XMM registers (xmm16-31 added by AVX512 on x86_64).
9318 (struct i387_xsave): Add space for AVX512 registers.
9319 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9320 Add code to handle AVX512 registers.
9321 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9322 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9323 prototypei from generated file.
9324 (tdesc_amd64_avx512_linux): Likewise.
9325 (init_registers_x32_avx512_linux): Likewise.
9326 (tdesc_x32_avx512_linux): Likewise.
9327 (init_registers_i386_avx512_linux): Likewise.
9328 (tdesc_i386_avx512_linux): Likewise.
9329 (x86_64_regmap): Add AVX512 registers.
9330 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9332 (initialize_low_arch): Add code to initialize AVX512 registers.
9334 2014-04-23 Pedro Alves <palves@redhat.com>
9336 * mem-break.c (find_gdb_breakpoint_at): Make static.
9337 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9339 2014-04-23 Pedro Alves <palves@redhat.com>
9341 * i386-low.c: Don't include break-common.h here.
9342 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9343 prototype to take target_hw_bp_type as argument instead of a Z
9345 * i386-low.h: Include break-common.h here.
9346 (Z_packet_to_hw_type): Declare.
9347 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9349 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9350 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9351 (x86_remove_point): Convert the packet number to a
9352 target_hw_bp_type before calling i386_low_remove_watchpoint.
9353 * win32-i386-low.c (i386_insert_point): Convert the packet number
9354 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9355 (i386_remove_point): Convert the packet number to a
9356 target_hw_bp_type before calling i386_low_remove_watchpoint.
9358 2014-04-23 Pedro Alves <palves@redhat.com>
9360 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9362 2014-04-10 Pedro Alves <palves@redhat.com>
9364 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9365 Check if the condition or command is NULL before checking if the
9366 breakpoint is known. On success, return true.
9367 * mem-break.h (add_breakpoint_condition): Document return.
9368 (add_breakpoint_commands): Add describing comment.
9369 * server.c (skip_to_semicolon): New function.
9370 (process_point_options): Use it.
9372 2014-04-09 Pedro Alves <palves@redhat.com>
9374 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9377 2014-02-27 Pedro Alves <palves@redhat.com>
9380 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9382 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9384 (last_thread_of_process_p): Take a PID argument instead of a
9386 (linux_wait_for_lwp): Delete.
9387 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9389 (linux_low_filter_event): New function, party factored out from
9390 linux_wait_for_event.
9391 (linux_wait_for_event): Rename to ...
9392 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9393 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9394 sigsuspend. Check for zombie leaders.
9395 (linux_wait_for_event): Reimplement as wrapper around
9396 linux_wait_for_event_filtered.
9397 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9398 a normal or signal exit is seen, it's the whole process exiting.
9399 (wait_for_sigstop): No longer a for_each_inferior callback.
9400 Rewrite on top of linux_wait_for_event_filtered.
9401 (stop_all_lwps): Call wait_for_sigstop directly.
9402 * server.c (resume, handle_target_event): Handle
9403 TARGET_WAITKIND_NO_RESUMED.
9405 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9407 * win32-low.c (psapi_get_dll_name,
9408 * win32_CreateToolhelp32Snapshot): Delete.
9409 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9410 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9412 (handle_load_dll): Add function description.
9413 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9415 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9417 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9419 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9420 base address when calling win32_add_one_solib.
9421 (handle_load_dll): Delete local variable load_addr.
9422 Remove 0x1000 offset applied to DLL base address when calling
9423 win32_add_one_solib.
9424 (handle_unload_dll): Add comment.
9426 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9428 * win32-low.c (win32_add_all_dlls): Renames
9429 win32_ensure_ntdll_loaded. Rewrite function documentation.
9430 Adjust implementation to always load all DLLs.
9431 Add 0x1000 offset to DLL base address when calling
9432 win32_add_one_solib.
9433 (child_initialization_done): New static global.
9434 (do_initial_child_stuff): Set child_initialization_done to
9435 zero during child initialization, and 1 after. Replace call
9436 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9438 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9439 (handle_unload_dll): Add function documentation.
9440 (get_child_debug_event): Ignore load and unload DLL events
9441 during child initialization.
9443 2014-02-20 Doug Evans <dje@google.com>
9445 Remove global all_lwps.
9446 * inferiors.h (ptid_of): Move here from linux-low.h.
9447 (pid_of, lwpid_of): Ditto.
9448 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9449 parameter is a struct thread_info * now.
9450 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9451 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9452 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9454 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9455 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9456 * linux-arm-low.c (update_registers_callback): Update, "entry"
9457 parameter is a struct thread_info * now.
9458 Fetch lwpid from current_inferior directly.
9459 (arm_insert_point): Pass &all_threads to find_inferior instead of
9461 (arm_remove_point): Ditto.
9462 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9463 (arm_prepare_to_resume): Fetch pid from thread.
9464 (arm_read_description): Fetch lwpid from current_inferior directly.
9465 * linux-low.c (all_lwps): Delete.
9466 (delete_lwp): Delete call to remove_inferior.
9467 (handle_extended_wait): Fetch lwpid from thread.
9468 (add_lwp): Don't set lwp->entry.id. Remove call to
9469 add_inferior_to_list.
9470 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9471 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9472 (kill_one_lwp_callback): Ditto.
9473 (linux_kill): Don't dereference NULL pointer.
9474 Fetch ptid,lwpid from thread.
9475 (get_detach_signal): Fetch ptid from thread.
9476 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9477 Simplify call to regcache_invalidate_thread.
9478 (delete_lwp_callback): Update, "entry" parameter is a
9479 struct thread_info * now. Fetch pid from thread.
9480 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9481 (status_pending_p_callback): Update, "entry" parameter is a
9482 struct thread_info * now. Fetch ptid from thread.
9483 (find_lwp_pid): Update, "entry" parameter is a
9484 struct thread_info * now.
9485 (linux_wait_for_lwp): Fetch pid from thread.
9486 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9487 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9488 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9489 (dequeue_one_deferred_signal): Ditto.
9490 (cancel_breakpoint): Fetch ptid from current_inferior.
9491 (linux_wait_for_event): Pass &all_threads to find_inferior,
9492 not &all_lwps. Fetch ptid, lwpid from thread.
9493 (count_events_callback): Update, "entry" parameter is a
9494 struct thread_info * now.
9495 (select_singlestep_lwp_callback): Ditto.
9496 (select_event_lwp_callback): Ditto.
9497 (cancel_breakpoints_callback): Ditto.
9498 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9500 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9501 (unsuspend_one_lwp): Update, "entry" parameter is a
9502 struct thread_info * now.
9503 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9505 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9506 Fetch lwpid from thread, not lwp.
9507 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9508 Pass &all_threads to find_inferior, not &all_lwps.
9509 (send_sigstop): Fetch lwpid from thread, not lwp.
9510 (send_sigstop_callback): Update, "entry" parameter is a
9511 struct thread_info * now.
9512 (suspend_and_send_sigstop_callback): Ditto.
9513 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9514 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9515 struct thread_info * now.
9516 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9518 (lwp_running): Update, "entry" parameter is a
9519 struct thread_info * now.
9520 (stop_all_lwps): Fetch ptid from thread.
9521 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9522 (linux_resume_one_lwp): Fetch lwpid from thread.
9523 (linux_set_resume_request): Update, "entry" parameter is a
9524 struct thread_info * now. Fetch pid, lwpid from thread.
9525 (resume_status_pending_p): Update, "entry" parameter is a
9526 struct thread_info * now.
9527 (need_step_over_p): Ditto. Fetch lwpid from thread.
9528 (start_step_over): Fetch lwpid from thread.
9529 (linux_resume_one_thread): Update, "entry" parameter is a
9530 struct thread_info * now. Fetch lwpid from thread.
9531 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9532 (proceed_one_lwp): Update, "entry" parameter is a
9533 struct thread_info * now. Fetch lwpid from thread.
9534 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9535 struct thread_info * now.
9536 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9537 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9538 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9540 (regsets_store_inferior_registers): Ditto.
9541 (fetch_register, store_register): Ditto.
9542 (linux_read_memory, linux_write_memory): Ditto.
9543 (linux_request_interrupt): Ditto.
9544 (linux_read_auxv): Ditto.
9545 (linux_xfer_siginfo): Ditto.
9546 (linux_qxfer_spu): Ditto.
9547 (linux_qxfer_libraries_svr4): Ditto.
9548 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9549 moved to inferiors.h.
9551 (get_thread_lwp): Update.
9552 (struct lwp_info): Delete member "entry". Simplify comment for
9555 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9556 current_inferior directly.
9557 (update_watch_registers_callback): Update, "entry" parameter is a
9558 struct thread_info * now. Fetch pid from thread.
9559 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9560 (mips_insert_point): Fetch lwpid from current_inferior.
9561 Pass &all_threads to find_inferior, not &all_lwps.
9562 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9563 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9565 (mips_stopped_data_address): Ditto.
9566 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9568 * linux-tile-low.c (tile_arch_setup): Ditto.
9569 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9570 (update_debug_registers_callback): Update, "entry" parameter is a
9571 struct thread_info * now. Fetch pid from thread.
9572 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9573 Pass &all_threads to find_inferior, not &all_lwps.
9574 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9575 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9576 Pass &all_threads to find_inferior, not &all_lwps.
9577 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9578 (i386_dr_low_get_status): Ditto.
9579 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9580 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9581 (x86_linux_read_description): Ditto.
9582 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9584 2014-02-20 Doug Evans <dje@google.com>
9586 * inferiors.c (get_first_inferior): Fix buglet.
9588 2014-02-19 Doug Evans <dje@google.com>
9590 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9591 * inferiors.c (add_thread): Change result type to struct thread_info *.
9592 All callers updated.
9593 (add_lwp): Call add_thread here instead of in callers.
9594 All callers updated.
9595 * linux-low.h (get_lwp_thread): Rewrite.
9596 (struct lwp_info): New member "thread".
9598 2014-02-19 Doug Evans <dje@google.com>
9600 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9601 All callers updated.
9603 2014-02-19 Doug Evans <dje@google.com>
9605 * inferiors.c (add_thread): Fix whitespace.
9607 2014-02-19 Doug Evans <dje@google.com>
9609 * dll.c (clear_dlls): Replace accessing list implemention details
9611 * gdbthread.h (get_first_thread): Declare.
9612 * inferiors.c (for_each_inferior_with_data): New function.
9613 (get_first_thread): New function.
9614 (find_thread_ptid): Simplify.
9615 (get_first_inferior): New function.
9616 (clear_list): Delete.
9617 (one_inferior_p): New function.
9618 (clear_inferior_list): New function.
9619 (clear_inferiors): Update.
9620 * inferiors.h (for_each_inferior_with_data): Declare.
9621 (clear_inferior_list): Declare.
9622 (one_inferior_p): Declare.
9623 (get_first_inferior): Declare.
9624 * linux-low.c (linux_wait_for_event): Replace accessing list
9625 implemention details with API function.
9626 * server.c (target_running): Ditto.
9627 (accumulate_file_name_length): New function.
9628 (emit_dll_description): New function.
9629 (handle_qxfer_libraries): Replace accessing list implemention
9630 details with API function.
9631 (handle_qxfer_threads_worker): New function.
9632 (handle_qxfer_threads_proper): Replace accessing list implemention
9633 details with API function.
9634 (handle_query): Ditto.
9635 (visit_actioned_threads_callback_ftype): New typedef.
9636 (visit_actioned_threads_data): New struct.
9637 (visit_actioned_threads): Rewrite to be find_inferior callback.
9638 (resume): Call find_inferior.
9639 (handle_status): Replace accessing list implemention
9640 details with API function.
9641 (process_serial_event): Replace accessing list implemention details
9643 * target.c (set_desired_inferior): Replace accessing list implemention
9644 details with API function.
9645 * tracepoint.c (same_process_p): New function.
9646 (gdb_agent_about_to_close): Replace accessing list implemention
9647 details with API function.
9648 * win32-low.c (child_delete_thread): Replace accessing list
9649 implemention details with API function.
9650 (match_dll_by_basename): New function.
9651 (dll_is_loaded_by_basename): New function.
9652 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9653 details call to dll_is_loaded_by_basename.
9655 2014-02-19 Doug Evans <dje@google.com>
9657 * dll.h (struct dll_info): Add comment.
9658 * gdbthread.h (struct thread_info): Add comment.
9659 (current_ptid): Simplify.
9660 * inferiors.c (add_process): Update.
9661 (remove_process): Update.
9662 * inferiors.h (struct process_info): Rename member "head" to "entry".
9663 * linux-low.c (delete_lwp): Update.
9665 (last_thread_of_process_p): Update.
9666 (kill_one_lwp_callback, linux_kill): Update.
9667 (status_pending_p_callback): Update.
9668 (wait_for_sigstop): Update. Simplify read of ptid.
9669 (start_step_over): Update.
9670 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9671 (get_lwp_thread): Update.
9672 (struct lwp_info): Rename member "head" to "entry".
9673 * regcache.h (inferior_list_entry): Delete.
9674 * server.c (kill_inferior_callback): Update.
9675 (detach_or_kill_inferior_callback): Update.
9676 (print_started_pid): Update.
9677 (print_attached_pid): Update.
9678 (process_serial_event): Simplify read of ptid.
9679 * thread-db.c (thread_db_create_event): Update.
9680 (thread_db_get_tls_address): Update.
9681 * win32-low.c (current_inferior_ptid): Simplify.
9683 2014-02-19 Tom Tromey <tromey@redhat.com>
9685 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9687 (target_supports_btrace): Update.
9689 2014-02-14 Yao Qi <yao@codesourcery.com>
9691 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9692 (rsp-low-ipa.o): New target.
9694 2014-02-12 Tom Tromey <tromey@redhat.com>
9696 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9697 convert_ascii_to_int.
9698 * regcache.c (registers_to_string): Likewise.
9699 * remote-utils.c (decode_M_packet): Likewise.
9700 * server.c (process_serial_event): Likewise.
9702 2014-02-12 Tom Tromey <tromey@redhat.com>
9704 * server.c (handle_query, handle_v_run): Use hex2bin, not
9706 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9708 2014-02-12 Tom Tromey <tromey@redhat.com>
9710 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9711 convert_int_to_ascii.
9712 * regcache.c (registers_to_string, collect_register_as_string):
9714 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9716 * server.c (process_serial_event): Likewise.
9717 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9718 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9720 2014-02-12 Tom Tromey <tromey@redhat.com>
9722 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9723 bin2hex, not hexify.
9724 * tracepoint.c (cmd_qtstatus): Likewise.
9726 2014-02-12 Tom Tromey <tromey@redhat.com>
9728 * remote-utils.c (monitor_output): Pass explicit length to
9731 2014-02-12 Tom Tromey <tromey@redhat.com>
9733 * tracepoint.c: Include rsp-low.h.
9734 * server.c: Include rsp-low.h.
9735 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9736 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9738 * remote-utils.c: Include rsp-low.h.
9739 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9740 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9741 (convert_int_to_ascii, convert_ascii_to_int): Move to
9743 * regcache.c: Include rsp-low.h.
9744 * ax.c: Include rsp-low.h.
9745 * Makefile.in (SFILES): Add common/rsp-low.c.
9746 (OBS): Add rsp-low.o.
9747 (rsp-low.o): New target.
9749 2014-02-12 Tom Tromey <tromey@redhat.com>
9751 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9752 Include print-utils.h.
9753 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9754 (plongest, thirty_two, phex_nz): Remove.
9755 * Makefile.in (SFILES): Add common/print-utils.c.
9756 (OBS): Add print-utils.o.
9757 (print-utils-ipa.o): New target.
9758 (print-utils.o): New target.
9759 (IPA_OBJS): Add print-utils-ipa.o.
9761 2014-02-06 Tom Tromey <tromey@redhat.com>
9763 * Makefile.in (SFILES): Fix indentation.
9765 2014-02-05 Doug Evans <dje@google.com>
9767 * linux-low.c (linux_wait_for_event): Improve comment.
9768 (linux_wait_1): Keep current_inferior in sync with event_child.
9770 2014-01-22 Doug Evans <dje@google.com>
9772 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9774 2014-01-22 Doug Evans <dje@google.com>
9776 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9777 * configure: Regenerate.
9778 * config.in: Regenerate.
9779 * Makefile.in (SFILES): Add debug.c.
9781 * debug.c: New file.
9782 * debug.h: New file.
9783 * linux-aarch64-low.c (*): Update all debugging printfs to use
9784 debug_printf instead of fprintf.
9785 * linux-arm-low.c (*): Ditto.
9786 * linux-cris-low.c (*): Ditto.
9787 * linux-crisv32-low.c (*): Ditto.
9788 * linux-m32r-low.c (*): Ditto.
9789 * linux-sparc-low.c (*): Ditto.
9790 * linux-x86.c (*): Ditto.
9791 * linux-low.c (*): Ditto.
9792 (linux_wait_1): Add calls to debug_enter, debug_exit.
9793 (linux_wait): Remove redundant debugging printf.
9794 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9795 (linux_resume, unstop_all_lwps): Ditto.
9796 * mem-break.c (*): Update all debugging printfs to use
9797 debug_printf instead of fprintf.
9798 * remote-utils.c (*): Ditto.
9799 * thread-db.c (*): Ditto.
9800 * server.c #include <ctype.h>, "gdb_vecs.h".
9801 (debug_threads): Moved to debug.c.
9802 (*): Update all debugging printfs to use debug_printf instead of
9804 (start_inferior): Replace call to fflush with call to debug_flush.
9805 (monitor_show_help): Mention set debug-format.
9806 (parse_debug_format_options): New function.
9807 (handle_monitor_command): Handle "monitor set debug-format".
9808 (gdbserver_usage): Mention --debug-format.
9809 (main): Parse --debug-format.
9810 * server.h (debug_threads): Declaration moved to debug.h.
9812 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9813 trace_debug_1 that uses debug_printf.
9814 (tracepoint_look_up_symbols): Update all debugging printfs to use
9815 debug_printf instead of fprintf.
9817 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9819 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9822 2014-01-17 Pedro Alves <palves@redhat.com>
9825 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9826 defined after including gdb_proc_service.h.
9828 2014-01-16 Doug Evans <dje@google.com>
9830 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9831 (match_dll): Use it.
9833 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9835 * target.h (target_ops) <read_btrace>: Change parameters and
9836 return type to allow error reporting.
9837 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9838 trace reading errors on.
9839 * linux-low.c (linux_low_read_btrace): Pass trace reading
9841 (linux_low_disable_btrace): New.
9843 2014-01-15 Doug Evans <dje@google.com>
9845 * inferiors.c (thread_id_to_gdb_id): Delete.
9846 * inferiors.h (thread_id_to_gdb_id): Delete.
9848 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9850 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9851 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9854 2014-01-08 Pedro Alves <palves@redhat.com>
9856 * server.c (handle_status): Don't discard previous queued stop
9857 replies or thread's pending status here.
9858 (main) <disconnection>: Do it here instead.
9860 2014-01-08 Pedro Alves <palves@redhat.com>
9862 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9863 * server.c (visit_actioned_threads, handle_pending_status): New
9865 (handle_v_cont): Factor out parts to ...
9866 (resume): ... this new function. If in all-stop, and a thread
9867 being resumed has a pending status, report it without actually
9869 (myresume): Adjust to use the new 'resume' function.
9870 (clear_pending_status_callback, set_pending_status_callback)
9871 (find_status_pending_thread_callback): New functions.
9872 (handle_status): Handle the case of multiple threads having
9873 interesting statuses to report. Report threads' real last signal
9874 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9875 with an interesting thread to report the status for, instead of
9876 always reporting the status of the first thread.
9878 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9880 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9881 * gdbreplay.c (gdbreplay_version): Likewise.
9883 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9885 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9886 iov.iov_len with the real length in use.
9888 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9890 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9891 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9892 for all targets that use win32-low.c.
9893 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9894 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9896 2013-12-13 Pedro Alves <palves@redhat.com>
9898 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9899 if equal to TARGET_WAITKIND_LOADED.
9900 * win32-low.c (cached_status): New static global.
9901 (win32_wait): Add declaration.
9902 (do_initial_child_stuff): Flush all initial pending debug events
9903 up to the initial breakpoint.
9904 (win32_wait): If CACHED_STATUS was set, return that instead
9905 of doing a real wait. Remove the code resuming the execution
9906 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9907 during the initial phase. Also remove the code changing
9908 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9909 TARGET_WAITKIND_STOPPED.
9911 2013-12-11 Yao Qi <yao@codesourcery.com>
9913 * notif.c (handle_notif_ack): Return 0 if no notification
9916 2013-11-20 Doug Evans <dje@google.com>
9918 * linux-low.c (linux_set_resume_request): Fix comment.
9920 2013-11-20 Doug Evans <dje@google.com>
9922 * linux-low.c (resume_status_pending_p): Tweak comment.
9924 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9926 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9927 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9928 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9929 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9930 (srv_amd64_regobj): Add amd64-mpx.o.
9931 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9932 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9933 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9934 * i387-fp.c (num_pl_bnd_register) Added constant.
9935 (num_pl_bnd_cfg_registers) Added constant.
9936 (struct i387_xsave) Added reserved area and MPX fields.
9937 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9938 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9940 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9941 (init_registers_amd64_mpx_linux): Declare new function.
9942 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9943 (x86_64_regmap): Add MPX registers.
9944 (x86_linux_read_description): Add MPX case.
9945 (initialize_low_arch): Initialize MPX targets.
9947 2013-11-18 Tom Tromey <tromey@redhat.com>
9949 * configure: Rebuild.
9950 * configure.ac: Don't check for stdlib.h.
9951 * gdbreplay.c: Unconditionally include stdlib.h.
9953 2013-11-18 Tom Tromey <tromey@redhat.com>
9955 * config.in: Rebuild.
9956 * configure: Rebuild.
9957 * configure.ac: Don't use AC_HEADER_DIRENT.
9959 2013-11-18 Tom Tromey <tromey@redhat.com>
9961 * server.h: Don't check HAVE_STRING_H.
9962 * gdbreplay.c: Don't check HAVE_STRING_H.
9963 * configure: Rebuild.
9965 2013-11-18 Tom Tromey <tromey@redhat.com>
9967 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9970 2013-11-08 Tom Tromey <tromey@redhat.com>
9972 * configure, config.in: Rebuild.
9973 * configure.ac: Remove unused configury.
9975 2013-11-08 Tom Tromey <tromey@redhat.com>
9977 * acinclude.m4: Include common.m4, codeset.m4.
9978 * configure, config.in: Rebuild.
9979 * configure.ac: Use GDB_AC_COMMON.
9981 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9983 * linux-s390-low.c (HWCAP_S390_TE): New define.
9984 (s390_arch_setup): Consider the TE field in the HWCAP for
9985 determining 'have_regset_tdb'.
9987 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9990 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9993 2013-10-02 Pedro Alves <palves@redhat.com>
9995 * server.c (process_serial_event): Don't output "GDBserver
9996 exiting" if GDB is connected through stdio.
9997 * target.c (mywait): Likewise, be silent if GDB is connected
10000 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10002 * lynx-low.c (lynx_add_threads_after_attach): New function.
10003 (lynx_attach): Remove call to add_thread. Add call to
10004 lynx_add_threads_after_attach instead.
10006 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10008 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10009 * config.in, configure: Regenerated.
10011 2013-09-18 Yao Qi <yao@codesourcery.com>
10014 * server.c (start_inferior): Clear 'resume_info'.
10016 2013-09-16 Jiong Wang <jiwang@tilera.com>
10018 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10021 2013-09-16 Jiong Wang <jiwang@tilera.com>
10023 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10024 linux-tile-low.o to srv_tgtobj.
10026 2013-09-16 Will Newton <will.newton@linaro.org>
10028 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10031 2013-09-06 Pedro Alves <palves@redhat.com>
10033 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10034 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10035 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10036 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10037 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10038 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10040 2013-09-06 Pedro Alves <palves@redhat.com>
10042 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10043 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10045 2013-09-06 Pedro Alves <palves@redhat.com>
10047 * linux-amd64-ipa.c: Include tracepoint.h.
10048 * linux-i386-ipa.c: Include tracepoint.h.
10050 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10052 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10053 (ps_get_thread_area): New function.
10055 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10057 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10058 (initialize_low_arch): Call init_registers_crisv32 rather than
10059 init_register_crisv32.
10061 2013-09-05 Pedro Alves <palves@redhat.com>
10063 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10065 * hostio.h: ... this new file.
10066 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10067 win32-low.c: Include hostio.h.
10069 2013-09-05 Pedro Alves <palves@redhat.com>
10071 * server.h (gdb_client_data, handler_func, callback_handler_func)
10072 (delete_file_handler, add_file_handler, append_callback_event)
10073 (delete_callback_event, start_event_loop, initialize_event_loop):
10074 Move to event-loop.h and include it.
10075 * event-loop.h: New file.
10077 2013-09-05 Pedro Alves <palves@redhat.com>
10079 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10080 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10081 (loaded_dll, unloaded_dll): Move to ...
10082 * dll.h: ... this new file.
10083 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10085 2013-09-05 Pedro Alves <palves@redhat.com>
10087 * server.h (current_process, get_thread_process, all_processes)
10088 (add_inferior_to_list, for_each_inferior, current_inferior)
10089 (remove_inferior, add_process, remove_process, find_process_pid)
10090 (have_started_inferiors_p, have_attached_inferiors_p)
10091 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10092 (clear_inferiors, find_inferior, find_inferior_id)
10093 (inferior_target_data, set_inferior_target_data)
10094 (inferior_regcache_data, set_inferior_regcache_data): Move to
10095 inferiors.h, and include it.
10096 * inferiors.h: New file.
10098 2013-09-05 Pedro Alves <palves@redhat.com>
10100 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10104 2013-09-05 Pedro Alves <palves@redhat.com>
10106 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10108 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10109 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10110 (handle_tracepoint_general_set, handle_tracepoint_query)
10111 (tracepoint_finished_step, tracepoint_was_hit)
10112 (release_while_stepping_state_list, current_traceframe)
10113 (in_readonly_region, traceframe_read_mem)
10114 (fetch_traceframe_registers, traceframe_read_sdata)
10115 (traceframe_read_info, struct fast_tpoint_collect_status)
10116 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10117 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10118 (supply_fast_tracepoint_registers)
10119 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10120 (ipa_tdesc, claim_trampoline_space)
10121 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10122 (agent_mem_read, agent_get_trace_state_variable_value)
10123 (agent_set_trace_state_variable_value, agent_tsv_read)
10124 (agent_mem_read_string, get_raw_reg_func_addr)
10125 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10126 * tracepoint.h: ... this new file.
10128 2013-09-05 Pedro Alves <palves@redhat.com>
10130 * server.h (perror_with_name, error, fatal, warning, paddress)
10131 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10133 * utils.h: New file.
10135 2013-09-05 Pedro Alves <palves@redhat.com>
10137 * server.h (remote_debug, noack_mode, transport_is_reliable)
10138 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10139 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10140 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10141 (write_enn, initialize_async_io, enable_async_io)
10142 (disable_async_io, check_remote_input_interrupt_request)
10143 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10144 (dead_thread_notify, prepare_resume_reply)
10145 (decode_address_to_semicolon, decode_address, decode_m_packet)
10146 (decode_M_packet, decode_X_packet, decode_xfer_write)
10147 (decode_search_memory_packet, unhexify, hexify)
10148 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10149 (look_up_one_symbol, relocate_instruction)
10150 (monitor_output): Move to remote-utils.h, and include it.
10151 * remote-utils.h: New file.
10153 2013-09-05 Pedro Alves <palves@redhat.com>
10155 * server.h (_): Delete.
10157 2013-09-02 Pedro Alves <palves@redhat.com>
10159 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10160 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10162 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10164 2013-09-02 Pierre Muller <muller@sourceware.org>
10166 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10167 or WriteProcessMemory complete successfully and handle
10168 ERROR_PARTIAL_COPY error.
10170 2013-09-02 Pedro Alves <palves@redhat.com>
10172 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10173 error instead of EIO.
10175 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10178 * linux-low.c: Include filestuff.h.
10179 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10180 * lynx-low.c: Include filestuff.h.
10181 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10182 * server.c: Include filestuff.h.
10183 (main): Call notice_open_fds.
10184 * spu-low.c: Include filestuff.h.
10185 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10187 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10189 * Makefile.in: Explain why ../target and ../nat are not
10190 listed as include file search paths.
10191 (linux-waitpid.o): New object file rule.
10192 * configure.srv (srv_native_linux_obj): New variable.
10193 Replace all occurrences of linux native object files with
10194 $srv_native_linux_obj.
10195 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10196 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10197 (linux_enable_event_reporting): Remove declaration.
10198 (my_waitpid): Moved to common/linux-waitpid.c.
10199 (linux_wait_for_event): Pass ptid when calling
10200 linux_enable_event_reporting.
10201 (linux_supports_tracefork_flag): Remove.
10202 (linux_enable_event_reporting): Likewise.
10203 (linux_tracefork_grandchild): Remove.
10204 (STACK_SIZE): Moved to common/linux-ptrace.c.
10205 (linux_tracefork_child): Remove.
10206 (linux_test_for_tracefork): Remove.
10207 (linux_look_up_symbols): Call linux_supports_traceclone.
10208 (initialize_low): Remove call to linux_test_for_tracefork.
10209 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10210 common/linux-ptrace.h.
10211 (PTRACE_TYPE_ARG4): Likewise.
10212 Include linux-ptrace.h.
10214 2013-08-21 Pedro Alves <palves@redhat.com>
10216 * config.in: Renegerate.
10218 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10220 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10221 (SFILES): Remove $(srcdir)/common/target-common.c and
10222 add $(srcdir)/target/waitstatus.c.
10223 (OBS): Remove target-common.o and add waitstatus.o.
10224 (server_h): Remove $(srcdir)/../common/target-common.h and
10225 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10226 and $(srcdir)/../target/waitstatus.h.
10227 (target-common.o): Remove.
10228 (waitstatus.o): New target object file.
10229 * target.h: Do not include target-common.h and
10230 include target/resume.h, target/wait.h and
10231 target/waitstatus.h.
10233 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10235 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10236 to PTRACE_TYPE_ARG3.
10237 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10238 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10240 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10241 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10243 2013-07-27 Jie Zhang <jie@codesourcery.com>
10244 Daniel Jacobowitz <dan@codesourcery.com>
10245 Yao Qi <yao@codesourcery.com>
10247 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10248 (mips-linux-watch.o): New rule.
10249 (mips_linux_watch_h): New variable.
10250 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10252 * linux-mips-low.c: Include mips-linux-watch.h.
10253 (struct arch_process_info, struct arch_lwp_info): New.
10254 (update_watch_registers_callback): New function.
10255 (mips_linux_new_process, mips_linux_new_thread) New functions.
10256 (mips_linux_prepare_to_resume, mips_insert_point): New
10258 (mips_remove_point, mips_stopped_by_watchpoint): New
10260 (rsp_bp_type_to_target_hw_bp_type): New function.
10261 (mips_stopped_data_address): New function.
10262 (the_low_target): Add watchpoint support functions.
10264 2013-07-27 Yao Qi <yao@codesourcery.com>
10266 * i386-low.c: Include break-common.h.
10267 (enum target_hw_bp_type): Remove.
10269 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10271 * Makefile.in (SFILES): /common/target-common.c.
10272 (OBS): Add target-common.o.
10273 (server_h): Add $(srcdir)/../common/target-common.h.
10274 (target-common.o): New target.
10275 * server.c (queue_stop_reply_callback): Free
10276 status string after use.
10277 * target.c (target_waitstatus_to_string): Remove.
10278 * target.h: Include target-common.h.
10279 (resume_kind): Likewise.
10280 (target_waitkind): Likewise.
10281 (target_waitstatus): Likewise.
10282 (TARGET_WNOHANG): Likewise.
10284 2013-07-04 Yao Qi <yao@codesourcery.com>
10286 * Makefile.in (host_alias): Use @host_noncanonical@.
10287 (target_alias): Use @target_noncanonical@.
10288 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10289 ACX_NONCANONICAL_HOST.
10290 * configure: Regenerated.
10293 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10295 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10296 * configure: Rebuild.
10297 * Makefile.in (version_host, version_target): Get from configure.
10298 (version.c): Use $(version_host) and $(version_target).
10300 2013-07-03 Pedro Alves <palves@redhat.com>
10302 * Makefile.in (config.status): Depend on development.sh.
10303 * acinclude.m4: Include libmcheck.m4.
10304 * configure: Regenerate.
10306 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10308 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10309 attribute inside the parentheses.
10310 (winapi_DebugSetProcessKillOnExit): Ditto.
10311 (winapi_DebugBreakProcess): Ditto.
10312 (winapi_GenerateConsoleCtrlEvent): Ditto.
10314 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10316 * notif.h (notif_event): Add a dummy member to avoid compiler
10319 2013-07-01 Pedro Alves <palves@redhat.com>
10321 * hostio.c (HOSTIO_PATH_MAX): Define.
10322 (require_filename, handle_open, handle_unlink, handle_readlink):
10325 2013-07-01 Pedro Alves <palves@redhat.com>
10327 * server.h: Include "pathmax.h".
10328 * linux-low.c: Don't include sys/param.h.
10329 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10331 * win32-low.c: Don't include sys/param.h.
10332 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10334 2013-07-01 Pedro Alves <palves@redhat.com>
10336 * event-loop.c: Don't check HAVE_UNISTD_H before including
10338 * gdbreplay.c: Likewise.
10339 * remote-utils.c: Likewise.
10340 * server.c: Likewise.
10341 * configure.ac: Don't check for unistd.h.
10342 * configure: Regenerate.
10344 2013-06-28 Tom Tromey <tromey@redhat.com>
10346 * Makefile.in (version.c): Use version.in, not
10349 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10351 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10352 * configure: Rebuild.
10353 * Makefile.in (version_host, version_target): Get from configure.
10354 (version.c): Use $(version_host) and $(version_target).
10356 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10358 Fix trace-status to output user name without trailing colon.
10359 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10361 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10363 Fix trace-status to output proper start-time and stop-time.
10364 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10365 output start time and stop time in hex as gdb expects.
10367 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10369 * tracepoint.c (build_traceframe_info_xml): Output trace state
10370 variables present in the trace buffer.
10372 2013-06-24 Tom Tromey <tromey@redhat.com>
10374 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10376 (version.o): Remove.
10377 * gdbreplay.c: Include version.h.
10378 (version, host_name): Don't declare.
10379 * server.h: Include version.h.
10380 (version, host_name): Don't declare.
10382 2013-06-12 Pedro Alves <palves@redhat.com>
10384 * linux-x86-low.c (linux_is_elf64): Delete global.
10385 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10386 with local linux_pid_exe_is_elf_64_file use.
10388 2013-06-11 Pedro Alves <palves@redhat.com>
10390 * linux-low.c (regset_disabled, disable_regset): New functions.
10391 (regsets_fetch_inferior_registers)
10392 (regsets_store_inferior_registers): Use them.
10393 (initialize_regsets_info); Don't allocate the disabled_regsets
10395 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10398 2013-06-11 Pedro Alves <palves@redhat.com>
10400 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10403 2013-06-11 Pedro Alves <palves@redhat.com>
10405 * linux-x86-low.c (initialize_low_arch): Call
10406 init_registers_x32_avx_linux.
10408 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10410 Fix compatibility with Android Bionic.
10411 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10414 2013-06-07 Pedro Alves <palves@redhat.com>
10417 * Makefile.in (OBS): Add tdesc.o.
10418 (IPA_OBJS): Add tdesc-ipa.o.
10419 (tdesc-ipa.o): New rule.
10420 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10422 * linux-low.c (new_inferior): Delete.
10423 (disabled_regsets, num_regsets): Delete.
10424 (linux_add_process): Adjust to set the new per-process
10426 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10427 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10428 was a stop. When calling arch_setup, switch the current inferior
10429 to the thread that got an event.
10430 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10431 (regsets_fetch_inferior_registers)
10432 (regsets_store_inferior_registers): New regsets_info parameter.
10434 (linux_register_in_regsets): New regs_info parameter. Adjust to
10436 (register_addr, fetch_register, store_register): New usrregs_info
10437 parameter. Adjust to use it.
10438 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10439 parameter regs_info. Adjust to use it.
10440 (linux_fetch_registers): Get the current inferior's regs_info, and
10442 (linux_store_registers): Ditto.
10443 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10444 (initialize_low): Don't initialize the target_regsets here. Call
10445 initialize_low_arch.
10446 * linux-low.h (target_regsets): Delete declaration.
10447 (struct regsets_info): New.
10448 (struct usrregs_info): New.
10449 (struct regs_info): New.
10450 (struct process_info_private) <new_inferior>: New field.
10451 (struct linux_target_ops): Delete the num_regs, regmap, and
10452 regset_bitmap fields. New field regs_info.
10453 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10454 * i387-fp.c (num_xmm_registers): Delete.
10455 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10456 calls to new interface.
10457 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10458 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10459 Infer the number of xmm registers from the regcache's target
10461 * i387-fp.h (num_xmm_registers): Delete.
10462 * inferiors.c (add_thread): Don't install the thread's regcache
10464 * proc-service.c (gregset_info): Fetch the current inferior's
10465 regs_info. Adjust to use it.
10466 * regcache.c: Include tdesc.h.
10467 (register_bytes, reg_defs, num_registers)
10468 (gdbserver_expedite_regs): Delete.
10469 (get_thread_regcache): If the thread doesn't have a regcache yet,
10470 create one, instead of aborting gdbserver.
10471 (regcache_invalidate_one): Rename to ...
10472 (regcache_invalidate_thread): ... this.
10473 (regcache_invalidate_one): New.
10474 (regcache_invalidate): Only invalidate registers of the current
10476 (init_register_cache): Add target_desc parameter, and use it.
10477 (new_register_cache): Ditto. Assert the target description has a
10478 non zero registers_size.
10479 (regcache_cpy): Add assertions. Adjust.
10480 (realloc_register_cache, set_register_cache): Delete.
10481 (registers_to_string, registers_from_string): Adjust.
10482 (find_register_by_name, find_regno, find_register_by_number)
10483 (register_cache_size): Add target_desc parameter, and use it.
10484 (free_register_cache_thread, free_register_cache_thread_one)
10485 (regcache_release, register_cache_size): New.
10486 (register_size): Add target_desc parameter, and use it.
10487 (register_data, supply_register, supply_register_zeroed)
10488 (supply_regblock, supply_register_by_name, collect_register)
10489 (collect_register_as_string, collect_register_by_name): Adjust.
10490 * regcache.h (struct target_desc): Forward declare.
10491 (struct regcache) <tdesc>: New field.
10492 (init_register_cache, new_register_cache): Add target_desc
10494 (regcache_invalidate_thread): Declare.
10495 (regcache_invalidate_one): Delete declaration.
10496 (regcache_release): Declare.
10497 (find_register_by_number, register_cache_size, register_size)
10498 (find_regno): Add target_desc parameter.
10499 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10501 * remote-utils.c: Include tdesc.h.
10502 (outreg, prepare_resume_reply): Adjust.
10503 * server.c: Include tdesc.h.
10504 (gdbserver_xmltarget): Delete declaration.
10505 (get_features_xml, process_serial_event): Adjust.
10506 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10508 (struct process_info) <tdesc>: New field.
10509 (ipa_tdesc): Declare.
10510 * tdesc.c: New file.
10511 * tdesc.h: New file.
10512 * tracepoint.c: Include tdesc.h.
10513 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10514 (get_context_regcache): Adjust to pass ipa_tdesc down.
10515 (do_action_at_tracepoint): Adjust to get the register cache size
10516 from the context regcache's description.
10517 (traceframe_walk_blocks): Adjust to get the register cache size
10518 from the current trace frame's description.
10519 (traceframe_get_pc): Adjust to get current trace frame's
10520 description and pass it down.
10521 (gdb_collect): Adjust to get the register cache size from the
10523 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10524 (gdbserver_xmltarget): Delete.
10525 (initialize_low_tracepoint): Set the ipa's target description.
10526 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10527 (initialize_low_tracepoint): Set the ipa's target description.
10528 * linux-x86-low.c: Include tdesc.h.
10529 [__x86_64__] (is_64bit_tdesc): New.
10530 (ps_get_thread_area, x86_get_thread_area): Use it.
10531 (i386_cannot_store_register): Rename to ...
10532 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10533 (i386_cannot_fetch_register): Rename to ...
10534 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10535 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10537 (target_regsets): Rename to ...
10538 (x86_regsets): ... this.
10539 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10541 (x86_siginfo_fixup): Use is_64bit_tdesc.
10542 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10543 (tdesc_x32_avx_linux, tdesc_x32_linux)
10544 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10546 (x86_linux_update_xmltarget): Delete.
10547 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10548 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10549 (AMD64_LINUX_USER64_CS): New.
10550 (x86_linux_read_description): New, based on
10551 x86_linux_update_xmltarget.
10552 (same_process_callback): New.
10553 (x86_arch_setup_process_callback): New.
10554 (x86_linux_update_xmltarget): New.
10555 (x86_regsets_info): New.
10556 (amd64_linux_regs_info): New.
10557 (i386_linux_usrregs_info): New.
10558 (i386_linux_regs_info): New.
10559 (x86_linux_regs_info): New.
10560 (x86_arch_setup): Reimplement.
10561 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10562 (x86_emit_ops): Ditto.
10563 (the_low_target): Adjust. Install x86_linux_regs_info,
10564 x86_cannot_fetch_register, and x86_cannot_store_register.
10565 (initialize_low_arch): New.
10566 * linux-ia64-low.c (tdesc_ia64): Declare.
10567 (ia64_fetch_register): Adjust.
10568 (ia64_usrregs_info, regs_info): New globals.
10569 (ia64_regs_info): New function.
10570 (the_low_target): Adjust.
10571 (initialize_low_arch): New function.
10572 * linux-sparc-low.c (tdesc_sparc64): Declare.
10573 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10575 (sparc_arch_setup): New function.
10576 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10577 (the_low_target): Adjust.
10578 (initialize_low_arch): New function.
10579 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10580 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10581 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10582 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10583 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10584 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10585 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10586 (tdesc_powerpc_isa205_vsx64l): Declare.
10587 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10588 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10589 (ppc_set_pc, ppc_get_hwcap): Adjust.
10590 (ppc_usrregs_info): Forward declare.
10591 (!__powerpc64__) ppc_regmap_adjusted: New global.
10592 (ppc_arch_setup): Adjust to the current process'es target
10594 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10595 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10596 (ppc_store_evrregset): Adjust.
10597 (target_regsets): Rename to ...
10598 (ppc_regsets): ... this, and make static.
10599 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10600 (ppc_regs_info): New function.
10601 (the_low_target): Adjust.
10602 (initialize_low_arch): New function.
10603 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10604 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10605 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10606 (tdesc_s390x_linux64v2): Declare.
10607 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10608 (s390_fill_gregset, s390_store_last_break): Adjust.
10609 (target_regsets): Rename to ...
10610 (s390_regsets): ... this, and make static.
10611 (s390_get_pc, s390_set_pc): Adjust.
10612 (s390_get_hwcap): New target_desc parameter, and use it.
10613 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10614 (s390_arch_setup): Adjust to set the current process'es target
10615 description. Don't adjust the regmap.
10616 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10617 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10618 (regs_info_3264): New globals.
10619 (s390_regs_info): New function.
10620 (the_low_target): Adjust.
10621 (initialize_low_arch): New function.
10622 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10623 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10624 [__mips64] (init_registers_mips_linux)
10625 (init_registers_mips_dsp_linux): Delete defines.
10626 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10627 (have_dsp): New global.
10628 (mips_read_description): New, based on mips_arch_setup.
10629 (mips_arch_setup): Reimplement.
10630 (get_usrregs_info): New function.
10631 (mips_cannot_fetch_register, mips_cannot_store_register)
10632 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10633 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10634 (target_regsets): Rename to ...
10635 (mips_regsets): ... this, and make static.
10636 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10637 (dsp_regs_info, regs_info): New globals.
10638 (mips_regs_info): New function.
10639 (the_low_target): Adjust.
10640 (initialize_low_arch): New function.
10641 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10642 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10644 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10645 (arm_read_description): New, with bits factored from
10647 (arm_arch_setup): Reimplement.
10648 (target_regsets): Rename to ...
10649 (arm_regsets): ... this, and make static.
10650 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10651 (arm_regs_info): New function.
10652 (the_low_target): Adjust.
10653 (initialize_low_arch): New function.
10654 * linux-m68k-low.c (tdesc_m68k): Declare.
10655 (target_regsets): Rename to ...
10656 (m68k_regsets): ... this, and make static.
10657 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10658 (m68k_regs_info): New function.
10659 (m68k_arch_setup): New function.
10660 (the_low_target): Adjust.
10661 (initialize_low_arch): New function.
10662 * linux-sh-low.c (tdesc_sharch): Declare.
10663 (target_regsets): Rename to ...
10664 (sh_regsets): ... this, and make static.
10665 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10666 (sh_regs_info, sh_arch_setup): New functions.
10667 (the_low_target): Adjust.
10668 (initialize_low_arch): New function.
10669 * linux-bfin-low.c (tdesc_bfin): Declare.
10670 (bfin_arch_setup): New function.
10671 (bfin_usrregs_info, regs_info): New globals.
10672 (bfin_regs_info): New function.
10673 (the_low_target): Adjust.
10674 (initialize_low_arch): New function.
10675 * linux-cris-low.c (tdesc_cris): Declare.
10676 (cris_arch_setup): New function.
10677 (cris_usrregs_info, regs_info): New globals.
10678 (cris_regs_info): New function.
10679 (the_low_target): Adjust.
10680 (initialize_low_arch): New function.
10681 * linux-cris-low.c (tdesc_crisv32): Declare.
10682 (cris_arch_setup): New function.
10683 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10684 (cris_regs_info): New function.
10685 (the_low_target): Adjust.
10686 (initialize_low_arch): New function.
10687 * linux-m32r-low.c (tdesc_m32r): Declare.
10688 (m32r_arch_setup): New function.
10689 (m32r_usrregs_info, regs_info): New globals.
10690 (m32r_regs_info): Adjust.
10691 (initialize_low_arch): New function.
10692 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10693 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10694 (tic6x_usrregs_info): Forward declare.
10695 (tic6x_read_description): New function, based on ...
10696 (tic6x_arch_setup): ... this. Reimplement.
10697 (target_regsets): Rename to ...
10698 (tic6x_regsets): ... this, and make static.
10699 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10700 (tic6x_regs_info): New function.
10701 (the_low_target): Adjust.
10702 (initialize_low_arch): New function.
10703 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10704 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10705 (target_regsets): Rename to ...
10706 (xtensa_regsets): ... this, and make static.
10707 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10709 (xtensa_arch_setup, xtensa_regs_info): New functions.
10710 (the_low_target): Adjust.
10711 (initialize_low_arch): New function.
10712 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10713 (nios2_arch_setup): Set the current process'es tdesc.
10714 (target_regsets): Rename to ...
10715 (nios2_regsets): ... this.
10716 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10717 (nios2_regs_info): New function.
10718 (the_low_target): Adjust.
10719 (initialize_low_arch): New function.
10720 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10721 (aarch64_arch_setup): Set the current process'es tdesc.
10722 (target_regsets): Rename to ...
10723 (aarch64_regsets): ... this.
10724 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10725 (aarch64_regs_info): New function.
10726 (the_low_target): Adjust.
10727 (initialize_low_arch): New function.
10728 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10730 (target_regsets): Rename to ...
10731 (tile_regsets): ... this.
10732 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10733 (tile_regs_info): New function.
10734 (tile_arch_setup): Set the current process'es tdesc.
10735 (the_low_target): Adjust.
10736 (initialize_low_arch): New function.
10737 * spu-low.c (tdesc_spu): Declare.
10738 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10739 * win32-arm-low.c (tdesc_arm): Declare.
10740 (arm_arch_setup): New function.
10741 (the_low_target): Install arm_arch_setup instead of
10742 init_registers_arm.
10743 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10744 (init_windows_x86): Rename to ...
10745 (i386_arch_setup): ... this. Set `win32_tdesc'.
10746 (the_low_target): Adjust.
10747 * win32-low.c (win32_tdesc): New global.
10748 (child_add_thread): Don't create the thread cache here.
10749 (do_initial_child_stuff): Set the new process'es tdesc.
10750 * win32-low.h (struct target_desc): Forward declare.
10751 (win32_tdesc): Declare.
10752 * lynx-i386-low.c (tdesc_i386): Declare global.
10753 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10754 * lynx-low.c (lynx_tdesc): New global.
10755 (lynx_add_process): Set the new process'es tdesc.
10756 * lynx-low.h (struct target_desc): Forward declare.
10757 (lynx_tdesc): Declare global.
10758 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10759 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10760 * nto-low.c (nto_tdesc): New global.
10761 (do_attach): Set the new process'es tdesc.
10762 * nto-low.h (struct target_desc): Forward declare.
10763 (nto_tdesc): Declare.
10764 * nto-x86-low.c (tdesc_i386): Declare.
10765 (nto_x86_arch_setup): Set `nto_tdesc'.
10767 2013-06-04 Gary Benson <gbenson@redhat.com>
10769 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10770 to qSupported response when appropriate.
10771 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10772 with nonzero-length annex.
10773 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10774 arguments supplied in annex.
10776 2013-05-31 Doug Evans <dje@google.com>
10779 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10780 64 bits in 64-cross-32 environment.
10782 2013-05-28 Pedro Alves <palves@redhat.com>
10784 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10785 (aarch64-without-fpu.c): Delete rule.
10786 * configure.srv (aarch64*-*-linux*): Remove references to
10787 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10788 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10791 2013-05-24 Pedro Alves <palves@redhat.com>
10793 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10794 instead of strchr/decode_address. Error if the range isn't split
10795 with a ','. Don't assume there's be a ':' in the action.
10797 2013-05-23 Yao Qi <yao@codesourcery.com>
10798 Pedro Alves <palves@redhat.com>
10800 * linux-low.c (lwp_in_step_range): New function.
10801 (linux_wait_1): If the thread was range stepping and stopped
10802 outside the stepping range, report the stop to GDB. Otherwise,
10803 continue stepping. Add range stepping debug output.
10804 (linux_set_resume_request): Copy the step range from the resume
10805 request to the lwp.
10806 (linux_supports_range_stepping): New.
10807 (linux_target_ops) <supports_range_stepping>: Set to
10808 linux_supports_range_stepping.
10809 * linux-low.h (struct linux_target_ops)
10810 <supports_range_stepping>: New field.
10811 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10812 * linux-x86-low.c (x86_supports_range_stepping): New.
10813 (the_low_target) <supports_range_stepping>: Set to
10814 x86_supports_range_stepping.
10815 * server.c (handle_v_cont): Handle 'r' action.
10816 (handle_v_requests): Append ";r" if the target supports range
10818 * target.h (struct thread_resume) <step_range_start,
10819 step_range_end>: New fields.
10820 (struct target_ops) <supports_range_stepping>:
10822 (target_supports_range_stepping): New macro.
10824 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10826 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10827 confusion in comment.
10829 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10831 * lynx-low.c (struct process_info_private): New type.
10832 (lynx_add_process): New function.
10833 (lynx_create_inferior, lynx_attach): Replace calls to
10834 add_process by calls to lynx_add_process.
10835 (lynx_resume): If PTID is null, then try using
10836 current_process()->private->last_wait_event_ptid.
10838 (lynx_clear_inferiors): Delete. The contents of that function
10839 has been inlined in lynx_mourn;
10840 (lynx_wait_1): Save the ptid in the process's private data.
10841 (lynx_mourn): Free the process' private data. Replace call
10842 to lynx_clear_inferiors by call to clear_inferiors.
10844 2013-05-17 Yao Qi <yao@codesourcery.com>
10846 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10849 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10851 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10852 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10853 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10854 PT_TEXT_END_ADDR guards. Update comments.
10855 (linux_target_op) <read_offsets>: Conditionally define to
10856 linux_read_offsets if the target is UCLIBC and if it defines
10857 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10859 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10860 Andrew Jenner <andrew@codesourcery.com>
10862 * Makefile.in (SFILES): Add linux-nios2-low.c.
10863 (clean): Add action to delete nios2-linux.c.
10864 (nios2-linux.c): New rule.
10865 * configure.srv: Add nios2*-*-linux*.
10866 * linux-nios2-low.c: New.
10868 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10870 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10872 2013-04-25 Hui Zhu <hui@codesourcery.com>
10875 * ax.c (ax_printf): Add fflush.
10877 2013-04-22 Tom Tromey <tromey@redhat.com>
10879 * Makefile.in (SFILES): Add filestuff.c.
10880 (OBS): Add filestuff.o.
10881 (filestuff.o): New target.
10882 * config.in, configure: Rebuild.
10883 * configure.ac: Check for fdwalk, pipe2.
10885 2013-04-17 Pedro Alves <palves@redhat.com>
10887 * configure.ac (USE_THREAD_DB): Delete variable.
10888 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10889 Don't AC_SUBST USE_THREAD_DB.
10890 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10891 * config.in, configure: Regenerate.
10893 2013-04-16 Pedro Alves <palves@redhat.com>
10895 * linux-low.h (struct lwp_info) <thread_known>: Move under
10896 the USE_THREAD_DB #ifdef.
10898 2013-04-16 Pedro Alves <palves@redhat.com>
10900 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10901 (linux-low.o): Delete rule.
10902 * linux-low.h: Always include "gdb_thread_db.h" instead of
10903 conditionally including thread_db.h.
10904 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10907 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10909 * Makefile.in (install-only): Fix make install regression.
10911 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10913 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10914 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10916 * gdbserver.1: Remove.
10918 2013-03-22 Pedro Alves <palves@redhat.com>
10920 * linux-low.c (handle_extended_wait): Don't call
10921 linux_enable_event_reporting.
10923 2013-03-15 Tony Theodore <tonyt@logyst.com>
10926 * Makefile.in (SHELL): Use @SHELL@.
10928 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10930 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10933 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10935 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10936 Remove extraneous NULL element.
10938 2013-03-13 Yao Qi <yao@codesourcery.com>
10940 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10941 'V' block in trace frame.
10943 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10945 * target.h (struct target_ops): Add btrace ops.
10946 (target_supports_btrace): New macro.
10947 (target_enable_btrace): New macro.
10948 (target_disable_btrace): New macro.
10949 (target_read_btrace): New macro.
10950 * gdbthread.h (struct thread_info): Add btrace field.
10951 * server.c: Include btrace-common.h.
10952 (handle_btrace_general_set): New function.
10953 (handle_btrace_enable): New function.
10954 (handle_btrace_disable): New function.
10955 (handle_general_set): Call handle_btrace_general_set.
10956 (handle_qxfer_btrace): New function.
10957 (struct qxfer qxfer_packets[]): Add btrace entry.
10958 * inferiors.c (remove_thread): Disable btrace.
10959 * linux-low: Include linux-btrace.h.
10960 (linux_low_enable_btrace): New function.
10961 (linux_low_read_btrace): New function.
10962 (linux_target_ops): Add btrace ops.
10963 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10964 Add srv_linux_btrace=yes.
10965 (x86_64-*-linux*): Add linux-btrace.o.
10966 Add srv_linux_btrace=yes.
10967 * configure.ac: Define HAVE_LINUX_BTRACE.
10968 * config.in: Regenerated.
10969 * configure: Regenerated.
10971 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10973 * server.c (handle_qxfer): Preserve error message if -3 is
10975 (qxfer): Document the -3 return value.
10977 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10979 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10980 (linux_btrace_h): New variable.
10981 (linux-btrace.o): New rule.
10983 2013-03-08 Stan Shebs <stan@codesourcery.com>
10984 Hafiz Abid Qadeer <abidh@codesourcery.com>
10986 * tracepoint.c (trace_buffer_size): New global.
10987 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10988 (init_trace_buffer): Change to one-argument function. Allocate
10989 trace buffer memory.
10990 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10991 handle QTBuffer:size packet.
10992 (cmd_bigqtbuffer_size): New function.
10993 (initialize_tracepoint): Call init_trace_buffer with
10994 DEFAULT_TRACE_BUFFER_SIZE.
10995 * server.c (handle_query): Add QTBuffer:size in the
10998 2013-03-07 Yao Qi <yao@codesourcery.com>
11000 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11001 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11003 (cmd_qtsp): Adjust condition. Do post increment.
11004 Set cur_action and cur_step_action back to 0.
11006 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11009 * linux-low.c (linux_write_memory): Return early success if LEN is
11012 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11014 * configure.srv: Add x86_64-*-cygwin* as target.
11016 2013-02-28 Tom Tromey <tromey@redhat.com>
11018 * configure.ac: Invoke AC_SYS_LARGEFILE.
11019 * configure, config.in: Rebuild.
11021 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11023 * win32-low.c: Throughout, fix format strings and casts of
11024 printf-like functions to avoid type related warnings on all
11026 (get_child_debug_event): Print dwDebugEventCode as hex since
11027 that's how it's usually documented.
11029 2013-02-28 Yao Qi <yao@codesourcery.com>
11031 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11034 2013-02-27 Jiong Wang <jiwang@tilera.com>
11036 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11037 (reg-tilegx32.c): New rule.
11038 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11039 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11040 different register info initializer according to elf class.
11041 (init_registers_tilgx32): New function. The tilegx32 register info
11043 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11044 (tile_store_gregset): Likewise.
11046 2013-02-27 Yao Qi <yao@codesourcery.com>
11048 * server.c (process_point_options): Print debug message when
11049 debug_threads is true.
11051 2013-02-26 Yao Qi <yao@codesourcery.com>
11053 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11055 2013-02-19 Pedro Alves <palves@redhat.com>
11056 Kai Tietz <ktietz@redhat.com>
11060 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11061 instead of strtoul to extract address from packet.
11062 (process_serial_event) <'z'>: Likewise.
11064 2013-02-18 Yao Qi <yao@codesourcery.com>
11066 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11068 2013-02-14 Pedro Alves <palves@redhat.com>
11072 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11073 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11075 2013-02-14 Pedro Alves <palves@redhat.com>
11077 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11079 2013-02-14 Pedro Alves <palves@redhat.com>
11081 * tracepoint.c (save_string): Delete.
11082 (add_tracepoint_action): Use savestring instead of save_string.
11084 2013-02-12 Pedro Alves <palves@redhat.com>
11086 * linux-xtensa-low.c: Ditto.
11087 * xtensa-xtregs.c: Ditto.
11089 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11091 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11094 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11096 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11097 aarch64_num_wp_regs and aarch64_num_bp_regs to
11098 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11100 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11102 * linux-aarch64-low.c (ps_get_thread_area): Replace
11103 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11105 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11106 Marcus Shawcroft <marcus.shawcroft@arm.com>
11107 Nigel Stephens <nigel.stephens@arm.com>
11108 Yufeng Zhang <yufeng.zhang@arm.com>
11110 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11111 (aarch64.c, aarch64-without-fpu.c): New targets.
11112 * configure.srv (aarch64*-*-linux*): New.
11113 * linux-aarch64-low.c: New file.
11115 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11117 * linux-low.c (handle_extended_wait, linux_create_inferior)
11118 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11119 (dequeue_one_deferred_signal, linux_resume_one_thread)
11120 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11121 (linux_tracefork_grandchild, linux_test_for_tracefork)
11122 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11123 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11124 where the argument is 0.
11126 2013-01-25 Yao Qi <yao@codesourcery.com>
11128 * event-loop.c: Include "queue.h".
11129 (gdb_event_p): New typedef.
11130 (struct gdb_event) <next_event>: Remove.
11131 (event_queue): Change to QUEUE(gdb_event_p).
11132 (async_queue_event): Remove.
11133 (gdb_event_xfree): New.
11134 (initialize_event_loop): New.
11135 (process_event): Use API from QUEUE.
11136 (wait_for_event): Likewise.
11137 * server.c (main): Call initialize_event_loop.
11138 * server.h (initialize_event_loop): Declare.
11140 2013-01-18 Yao Qi <yao@codesourcery.com>
11142 * ax.h (struct eval_agent_expr_context): New.
11143 (gdb_eval_agent_expr): Update declaration.
11144 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11145 TFRAME. Add new argument CTX.
11146 * server.h (struct eval_agent_expr_context): Declare.
11147 (agent_mem_read, agent_tsv_read): Update declaration.
11148 (agent_mem_read_string): Likewise.
11149 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11150 (add_traceframe_block): Add new argument TPOINT.
11151 Increase TPOINT->traceframe_usage.
11152 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11153 eval_tracepoint_agent_expr.
11154 (condition_true_at_tracepoint): Likewise.
11155 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11156 (agent_mem_read_string, agent_tsv_read): Likewise.
11158 2013-01-16 Yao Qi <yao@codesourcery.com>
11160 * linux-low.c (linux_resume_one_lwp): Don't check
11161 'lwp->bp_reinsert != 0'.
11163 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11164 Pedro Alves <palves@redhat.com>
11166 * lynx-low.c (ptrace_request_to_str): Define a temporary
11167 macro and use it to simplify this function's implementation.
11169 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11171 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11174 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11176 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11178 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11180 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11182 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11184 * lynx-low.c (lynx_resume): Use the resume_info parameter
11185 to determine the ptid for the lynx_ptrace call, unless
11186 it is equal to minus_one_ptid, in which case we use the
11187 ptid of the current_inferior.
11188 (lynx_wait_1): After having received a thread create/exit
11189 event, resume the inferior's execution using the signaling
11190 thread's ptid, rather than the old ptid.
11192 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11194 * lynx-low.c (lynx_resume): Delete variable ret.
11196 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11198 * gdbreplay.c (gdbreplay_version): Update copyright year.
11199 * server.c (gdbserver_version): Likewise.
11201 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11203 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11206 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11208 * lynx-low.c (ptrace_request_to_str): Add handling for
11209 PTRACE_GETTRACESIG.
11211 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11213 * lynx-low.c (lynx_attach): Delete variable new_process.
11215 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11217 * lynx-low.c (lynx_create_inferior): Delete variable
11220 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11222 * lynx-low.c (ptrace_request_to_str): Do not handle
11223 PTRACE_GETTHREADLIST if this macro does not exist.
11225 2012-12-15 Yao Qi <yao@codesourcery.com>
11227 * Makefile.in (OBS): Add notif.o.
11228 * notif.c, notif.h: New.
11229 * server.c: Include "notif.h".
11230 (struct vstop_notif) <next>: Remove.
11232 (queue_stop_reply): Update.
11233 (push_event, send_next_stop_reply): Remove.
11234 (discard_queued_stop_replies): Update.
11235 (notif_stop): New variable.
11236 (handle_v_stopped): Remove.
11237 (handle_v_requests): Don't call handle_v_stopped. Call
11238 handle_ack_notif instead.
11239 (queue_stop_reply_callback): Call notif_event_enque instead
11240 of queue_stop_reply.
11241 (handle_status): Don't call send_next_stop_reply, call
11242 notif_write_event instead.
11243 (kill_inferior_callback): Likewise.
11244 (detach_or_kill_inferior_callback): Likewise.
11245 (main): Call initialize_notif.
11246 (process_serial_event): Call QUEUE_is_empty.
11247 (handle_target_event): Call notif_push instead of push event.
11248 * server.h (push_event): Remove declaration.
11250 2012-12-10 Tom Tromey <tromey@redhat.com>
11252 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11253 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11256 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11257 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11258 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11259 (amd64-linux-ipa.o, ax.o): Rewrite.
11260 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11261 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11262 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11263 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11264 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11265 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11266 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11267 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11268 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11269 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11270 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11271 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11272 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11273 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11274 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11275 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11276 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11277 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11278 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11279 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11280 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11281 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11282 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11283 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11284 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11285 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11286 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11287 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11288 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11289 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11290 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11291 (reg-tilegx.o): Remove.
11292 (all_object_files): New macro.
11293 Include .deps files.
11294 * aclocal.m4, configure: Rebuild.
11295 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11296 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11297 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11299 2012-12-05 Tom Tromey <tromey@redhat.com>
11302 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11304 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11306 * configure.ac: Check for linux/perf_event.h.
11307 * config.in: Regenerated.
11308 * configure: Regenerated.
11310 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11312 * hostio.c (handle_readlink): Decrease buffer size
11313 parameter passed to readlink by one byte.
11315 2012-11-26 Yao Qi <yao@codesourcery.com>
11317 * configure.ac (build_warnings): Append '-Wempty-body'.
11318 * configure: Regenerated.
11319 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11322 2012-11-15 Pierre Muller <muller@sourceware.org>
11324 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11325 * config.in: Regenerate.
11326 * configure: Regenerate.
11327 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11328 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11329 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11330 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11332 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11333 instead of <sys/wait.h> header.
11334 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11336 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11338 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11339 (various make rules): Remove -DGDBSERVER
11341 2012-11-09 Yao Qi <yao@codesourcery.com>
11343 * spu-low.c (current_ptid): Move it to ..
11344 * gdbthread.h: ... here. New.
11345 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11346 * server.c (myresume, process_serial_event): Likewise.
11347 * thread-db.c (thread_db_find_new_threads): Likewise.
11348 * tracepoint.c (run_inferior_command): Likewise.
11350 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11352 * server.c (handle_search_memory_1): Include access length in
11355 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11357 * linux-crisv32-low.c: Fix compile errors.
11359 2012-09-04 Yao Qi <yao@codesourcery.com>
11361 * tracepoint.c (cmd_qtsv): Adjust debug message.
11362 Don't check CUR_TPOINT.
11364 2012-08-28 Yao Qi <yao@codesourcery.com>
11366 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11367 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11368 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11369 Remove declarations of xmalloc, xreallloc, xstrdup and
11371 * Makefile.in (libiberty_h): New.
11372 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11373 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11375 2012-08-23 Yao Qi <yao@codesourcery.com>
11377 * server.h: Remove declaration of 'xsnprintf'.
11379 2012-08-22 Keith Seitz <keiths@redhat.com>
11381 * server.h: Include build-gnulib-gbserver/config.h.
11382 * gdbreplay.c: Likewise.
11384 2012-08-08 Doug Evans <dje@google.com>
11386 * Makefile.in (SFILES): Add gdb_vecs.c.
11387 (OBS): Add gdb_vecs.o.
11388 (gdb_vecs_h, host_defs_h): New variables.
11389 (thread-db.o): Add $(gdb_vecs_h) dependency.
11390 (gdb_vecs.o): New rule.
11391 * thread-db.c: #include "gdb_vecs.h".
11392 (thread_db_load_search): Use a vector to iterate over path elements.
11393 Handle text appearing after "$pdir".
11395 * configure.ac: Add check for strstr.
11396 * config.in: Regenerate.
11397 * configure: Regenerate.
11399 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11401 * hostio.c (handle_pread): If pread fails, fall back to attempting
11403 (handle_pwrite): Likewise for pwrite.
11405 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11407 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11408 between unsupported TYPE and unimplementable ADDR/LEN combination.
11409 (arm_insert_point): Act on new return value.
11411 2012-07-31 Pedro Alves <palves@redhat.com>
11413 * server.c (process_point_options): Only skip tokens if we find
11414 one that is unrecognized. Don't treat 'X' specially while
11415 skipping unrecognized tokens.
11417 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11419 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11420 to 4-byte-align HW breakpoint addresses for Thumb.
11422 2012-07-27 Yao Qi <yao@codesourcery.com>
11426 * server.h: Declare gdb_agent_about_to_close.
11427 * target.c (kill_inferior): Include "agent.h".
11428 New. Send command 'kill'.
11429 * target.h (kill_inferior): Removed macro.
11430 * tracepoint.c (gdb_agent_about_to_close): New.
11431 (gdb_agent_helper_thread): Handle command 'close'.
11432 Wait endlessly until the inferior stops.
11433 Install gdb_agent_remove_socket to atexit hook.
11434 (agent_socket_name): New static variable.
11435 (gdb_agent_socket_init): Replace local variable 'name' with
11436 'agent_socket_name'.
11437 (gdb_agent_remove_socket): New.
11439 2012-07-27 Yao Qi <yao@codesourcery.com>
11441 * server.c (process_point_options): Stop at 'X' when parsing.
11443 2012-07-19 Michael Eager <eager@eagercon.com>
11445 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11447 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11448 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11449 hardware breakpoint.
11451 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11453 * gdbserver/linux-low.c (initialize_low): Call
11454 linux_ptrace_init_warnings.
11456 2012-07-02 Doug Evans <dje@google.com>
11458 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11461 2012-07-02 Stan Shebs <stan@codesourcery.com>
11463 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11464 (ax.o): Add it to build rule.
11466 (OBS): Add format.o.
11467 (IPA_OBS): Add format.o.
11468 * server.c (handle_query): Claim support for breakpoint commands.
11469 (process_point_options): Add command case.
11470 (process_serial_event): Leave running if there are printfs in
11472 * mem-break.h (any_persistent_commands): Declare.
11473 (add_breakpoint_commands): Declare.
11474 (gdb_no_commands_at_breakpoint): Declare.
11475 (run_breakpoint_commands): Declare.
11476 * mem-break.c (struct point_command_list): New struct.
11477 (struct breakpoint): New field command_list.
11478 (any_persistent_commands): New function.
11479 (add_commands_to_breakpoint): New function.
11480 (add_breakpoint_commands): New function.
11481 (gdb_no_commands_at_breakpoint): New function.
11482 (run_breakpoint_commands): New function.
11483 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11485 * ax.c: Include format.h.
11486 (ax_printf): New function.
11487 (gdb_eval_agent_expr): Add printf opcode.
11489 2012-06-13 Yao Qi <yao@codesourcery.com>
11491 * server.c (start_inferior): Remove duplicated writes to fields
11492 'last_resume_kind' and 'last_status' of 'current_inferior'.
11494 2012-06-12 Yao Qi <yao@codesourcery.com>
11495 Pedro Alves <palves@redhat.com>
11497 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11499 * server.c (handle_v_cont): Extend comment.
11501 2012-06-11 Yao Qi <yao@codesourcery.com>
11503 * linux-low.c (linux_attach): Add 'static'.
11505 2012-06-06 Yao Qi <yao@codesourcery.com>
11507 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11509 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11511 Fix gcc -flto compilation warning.
11512 * server.c (main): Make variable multi_mode and attach volatile.
11514 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11516 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11517 if the platform doesn't know about it.
11519 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11521 * Makefile.in (SFILES): Add linux-tile-low.c.
11522 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11523 * configure.srv: Handle tilegx-*-linux*.
11524 * linux-tile-low.c: New file.
11526 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11528 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11530 2012-05-24 Pedro Alves <palves@redhat.com>
11534 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11536 2012-05-24 Pedro Alves <palves@redhat.com>
11540 Replace target_signal with gdb_signal throughout.
11542 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11544 * linux-low.c (linux_store_registers): Avoid the copying sequence
11545 when no data has been retrieved by ptrace.
11547 2012-05-22 Will Deacon <will.deacon@arm.com>
11549 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11550 Include asm/ptrace.h.
11551 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11554 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11556 * linux-low.c (linux_store_registers): Don't re-retrieve data
11557 with ptrace that has already been obtained from /proc. Always
11558 copy any data retrieved with ptrace to the buffer supplied.
11560 2012-05-11 Yao Qi <yao@codesourcery.com>
11561 Pedro Alves <palves@redhat.com>
11563 * linux-low.c (enum stopping_threads_kind): New.
11564 (stopping_threads): Change type to `enum stopping_threads_kind'.
11565 (handle_extended_wait): If stopping and suspending threads, leave
11566 the new_lwp suspended too.
11567 (linux_wait_for_event): Adjust.
11568 (stop_all_lwps): Set `stopping_threads' to
11569 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11570 whether we're suspending threads or just stopping them. Assert no
11573 2012-04-29 Yao Qi <yao@codesourcery.com>
11575 * server.h: Move some code to ...
11576 * gdbthread.h: ... here. New.
11577 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11578 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11579 (nto-low.o, win32-low.o): Likewise.
11580 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11581 * regcache.c, remote-utils.c, server.c: Likewise.
11582 * target.c, tracepoint.c, win32-low.c: Likewise.
11584 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11586 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11587 (PTRACE_ARG4_TYPE): Likewise.
11588 (PTRACE_XFER_TYPE): Likewise.
11589 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11590 ptrace to PTRACE_ARG3_TYPE.
11591 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11592 (PTRACE_ARG4_TYPE): Likewise.
11593 (PTRACE_XFER_TYPE): Likewise.
11594 (linux_detach_one_lwp): Cast fourth argument of
11595 ptrace to long then PTRACE_ARG4_TYPE.
11596 (regsets_fetch_inferior_registers): Cast third argument of
11597 ptrace to long then PTRACE_ARG3_TYPE.
11598 (regsets_store_inferior_registers): Likewise.
11600 2012-04-20 Pedro Alves <palves@redhat.com>
11602 * configure: Regenerate.
11604 2012-04-19 Pedro Alves <palves@redhat.com>
11606 * Makefile.in (GNULIB_BUILDDIR): New.
11607 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11608 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11609 (all, install-only, uninstall, clean-info, all-lib, clean): No
11610 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11611 (maintainer-clean realclean distclean): Use subdir_do.
11613 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11614 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11615 * acinclude.m4: Include acx_configure_dir.m4.
11616 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11617 calls. Call AC_PROG_RANLIB. Configure gnulib using
11620 (GNULIB_STDINT_H): Adjust.
11621 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11622 * gdbreplay.c: Include build-gnulib/config.h.
11623 * server.h: Likewise.
11624 * aclocal.m4: Regenerate.
11625 * config.in: Regenerate.
11626 * configure: Regenerate.
11628 2012-04-19 Pedro Alves <palves@redhat.com>
11630 * Makefile.in (LIBGNU, INCGNU): Adjust.
11631 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11632 (all, install-only, uninstall, clean-info, all-lib, clean)
11633 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11634 * configure.ac: Adjust AC_OUTPUT output.
11635 * aclocal.m4: Regenerate.
11636 * configure: Regenerate.
11638 2012-04-19 Pedro Alves <palves@redhat.com>
11640 * Makefile.in (generated_files): New.
11641 (server_h): Remove the explicit dependency on config.h, and depend
11642 on $generated_files.
11644 2012-04-19 Pedro Alves <palves@redhat.com>
11646 * Makefile.in (INCGNU): Add -Ignulib.
11648 2012-04-19 Pedro Alves <palves@redhat.com>
11650 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11651 (INCGNU): ... this, and spell out -I here.
11652 (GNULIB_LIB): Rename to ...
11653 (LIBGNU): ... this.
11654 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11656 2012-04-19 Pedro Alves <palves@redhat.com>
11658 * config.in: Regenerate.
11660 2012-04-19 Pedro Alves <palves@redhat.com>
11662 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11663 * server.h (memmem): Remove declaration.
11664 * config.in: Regenerate.
11665 * configure: Regenerate.
11667 2012-04-19 Yao Qi <yao@codesourcery.com>
11669 * Makefile.in (SFILES): Add common/vec.c.
11673 2012-04-19 Yao Qi <yao@codesourcery.com>
11675 * remote-utils.c (prepare_resume_reply): Replace with macro
11676 target_core_of_thread.
11677 * server.c (handle_qxfer_threads_proper): Likewise.
11678 * target.h (traget_core_of_thread): New macro.
11680 2012-04-18 Pedro Alves <palves@redhat.com>
11682 * aclocal.m4: Regenerate.
11683 * configure: Regenerate.
11685 2012-04-16 Yao Qi <yao@codesourcery.com>
11687 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11688 duplicated on address.
11690 2012-04-16 Yao Qi <yao@codesourcery.com>
11692 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11693 (struct tracepoint_action_ops) <send>: New field.
11694 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11695 (agent_expr_send, x_tracepoint_action_send): New.
11696 (l_tracepoint_action_send): New.
11697 (cmd_qtdp): Download and install tracepoint
11698 according to `use_agent'.
11699 (run_inferior_command): Add one more parameter `len'.
11701 (tracepoint_send_agent): New.
11702 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11704 2012-04-16 Yao Qi <yao@codesourcery.com>
11706 * tracepoint.c (download_tracepoints): Moved to ...
11707 (cmd_qtstart): ... here.
11709 2012-04-14 Yao Qi <yao@codesourcery.com>
11711 * tracepoint.c: Include inttypes.h.
11712 (struct collect_memory_action): Use sized types.
11713 (struct tracepoint): Likewise.
11714 (cmd_qtdp, stop_tracing): Update print specifiers.
11715 (cmd_qtp, response_tracepoint): Likewise.
11716 (collect_data_at_tracepoint): Likewise.
11717 (collect_data_at_step): Likewise.
11719 2012-04-14 Yao Qi <yao@codesourcery.com>
11721 Import gnulib module inttypes.
11722 * aclocal.m4, config.in, configure: Regenerated.
11724 2012-04-14 Yao Qi <yao@codesourcery.com>
11726 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11727 Makefile and config.status at last.
11729 2012-04-13 Yao Qi <yao@codesourcery.com>
11731 * tracepoint.c: Include stdint.h unconditionally.
11733 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11735 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11736 on BFD_HAVE_SYS_PROCFS_TYPE.
11737 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11738 * configure: Regenerate.
11739 * config.in: Likewise.
11741 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11743 * Makefile.in (clean): Also remove x32.c x32-linux.c
11744 x32-avx.c x32-avx-linux.c.
11745 (x32.o): New target.
11747 (x32-linux.o): Likewise.
11748 (x32-linux.c): Likewise.
11749 (x32-avx.o): Likewise.
11750 (x32-avx.c): Likewise.
11751 (x32-avx-linux.o): Likewise.
11752 (x32-avx-linux.c): Likewise.
11754 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11755 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11756 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11757 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11758 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11759 i386/x32-avx-linux.xml.
11761 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11762 (init_registers_x32_avx_linux): Likwise.
11763 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11764 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11766 2012-04-13 Pedro Alves <palves@redhat.com>
11768 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11769 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11770 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11771 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11774 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11776 * linux-x86-low.c (compat_x32_clock_t): New.
11777 (compat_x32_siginfo_t): Likewise.
11778 (compat_x32_siginfo_from_siginfo): Likewise.
11779 (siginfo_from_compat_x32_siginfo): Likewise.
11780 (linux_is_elf64): Likewise.
11781 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11782 and siginfo_from_compat_x32_siginfo for x32.
11783 (x86_arch_setup): Set linux_is_elf64.
11785 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11788 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11790 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11791 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11792 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11793 compatible with process.
11795 2012-04-12 Yao Qi <yao@codesourcery.com>
11797 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11798 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11799 (install-only, install-info, clean): Handle sub dir gnulib.
11800 (all-lib, am--refresh): New targets.
11801 (memmem.o): Remove target.
11802 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11803 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11804 (AC_REPLACE_FUNCS): Remove memmem.
11805 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11806 (AC_OUTPUT): Generate Makefile in gnulib/.
11807 * aclocal.m4, config.in, configure: Regenerated.
11809 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11811 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11813 2012-04-05 Pedro Alves <palves@redhat.com>
11815 -Werror=strict-aliasing
11817 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11820 2012-04-04 Pedro Alves <palves@redhat.com>
11822 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11823 (sparc_store_gregset_from_stack, sparc_store_gregset)
11824 (sparc_breakpoint_at): Fix formatting.
11826 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11828 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11830 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11831 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11832 * config.in: Regenerate.
11833 * configure: Likewise.
11835 2012-03-29 Pedro Alves <palves@redhat.com>
11837 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11838 Correct ptrace arguments.
11840 2012-03-28 Pedro Alves <palves@redhat.com>
11842 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11843 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11844 (IA64_FR1_REGNUM): New defines.
11845 (ia64_fetch_register): New.
11846 (the_low_target): Install it.
11847 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11849 * linux-low.c (linux_fetch_registers): Try the
11850 the_low_target.fetch_register hook first.
11852 * linux-arm-low.c (the_low_target): Adjust.
11853 * linux-bfin-low.c (the_low_target): Adjust.
11854 * linux-cris-low.c (the_low_target): Adjust.
11855 * linux-crisv32-low.c (the_low_target): Adjust.
11856 * linux-m32r-low.c (the_low_target): Adjust.
11857 * linux-m68k-low.c (the_low_target): Adjust.
11858 * linux-mips-low.c (the_low_target): Adjust.
11859 * linux-ppc-low.c (the_low_target): Adjust.
11860 * linux-s390-low.c (the_low_target): Adjust.
11861 * linux-sh-low.c (the_low_target): Adjust.
11862 * linux-sparc-low.c (the_low_target): Adjust.
11863 * linux-tic6x-low.c (the_low_target): Adjust.
11864 * linux-x86-low.c (the_low_target): Adjust.
11865 * linux-xtensa-low.c (the_low_target): Adjust.
11867 2012-03-26 Pedro Alves <palves@redhat.com>
11869 * server.c (handle_qxfer_libraries): Don't bail early if
11870 the_target->qxfer_libraries_svr4 is not NULL.
11872 2012-03-26 Pedro Alves <palves@redhat.com>
11874 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11876 2012-03-23 Pedro Alves <palves@redhat.com>
11878 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11879 "library-list-svr4" element's start tag when the the DSO list is
11882 2012-03-23 Pedro Alves <palves@redhat.com>
11884 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11885 a variable whose type size is the same as the inferior's pointer
11888 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11890 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11892 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11893 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11894 * linux-low.h: Include <signal.h>.
11895 (struct siginfo): Remove forward declaration.
11896 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11899 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11901 * .gitignore: Ignore more files.
11903 2012-03-19 Pedro Alves <palves@redhat.com>
11904 Jan Kratochvil <jan.kratochvil@redhat.com>
11906 * server.c (cont_thread, general_thread): Add describing comments.
11907 (start_inferior): Clear `cont_thread'.
11908 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11911 2012-03-15 Yao Qi <yao@codesourcery.com>
11913 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11915 (cmd_qtdp): ... here.
11917 2012-03-15 Yao Qi <yao@codesourcery.com>
11919 * tracepoint.c (struct tracepoint_action_ops): New.
11920 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11921 (m_tracepoint_action_download): New.
11922 (r_tracepoint_action_download): New.
11923 (x_tracepoint_action_download): New.
11924 (l_tracepoint_action_download): New.
11925 (add_tracepoint_action): Install `action->ops' according type.
11926 (download_tracepoint_1): Move code `download' function pointer
11927 of various tracepoint_action_ops.
11929 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11931 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11932 linux_ptrace_attach_warnings.
11934 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11936 * Makefile.in (linux-ptrace.o): New.
11937 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11938 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11939 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11940 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11941 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11943 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11945 2012-03-08 Yao Qi <yao@codesourcery.com>
11946 Pedro Alves <palves@redhat.com>
11948 Fix PR server/13392.
11949 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11950 offset of JMP insn.
11951 * tracepoint.c (remove_tracepoint): New.
11952 (cmd_qtdp): Call remove_tracepoint when failed to install.
11954 2012-03-07 Pedro Alves <palves@redhat.com>
11956 * linux-low.c (get_detach_signal): New.
11957 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11958 Pass on pending signals to PTRACE_DETACH. Check the result of the
11960 * server.c (program_signals, program_signals_p): New.
11961 (handle_general_set): Handle QProgramSignals.
11962 * server.h (program_signals, program_signals_p): Declare.
11964 2012-03-05 Pedro Alves <palves@redhat.com>
11965 Jan Kratochvil <jan.kratochvil@redhat.com>
11967 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11970 2012-03-03 Yao Qi <yao@codesourcery.com>
11972 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11973 agent_look_up_symbols.
11975 2012-03-03 Yao Qi <yao@codesourcery.com>
11977 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11978 (linux-x86-low.o): Likewise.
11979 * server.h: Remove in_process_agent_loaded.
11980 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11984 2012-03-03 Yao Qi <yao@codesourcery.com>
11986 * tracepoint.c (gdb_agent_capability): New global.
11987 (in_process_agent_loaded_ust): Renamed to
11988 `in_process_agent_supports_ust'.
11990 (in_process_agent_supports_ust): Call agent_capability_check.
11991 (clear_installed_tracepoints): Assert that agent supports
11994 2012-03-03 Yao Qi <yao@codesourcery.com>
11996 * linux-low.c (linux_supports_agent): New.
11997 (linux_target_ops): Initialize field `supports_agent' with
11998 linux_supports_agent.
11999 * target.h (struct target_ops) <supports_agent>: New.
12000 (target_supports_agent): New macro.
12001 * server.c (handle_general_set): Handle packet 'QAgent'.
12002 (handle_query): Send `QAgent+'.
12003 * Makefile.in (server.o): Depends on agent.h.
12005 2012-03-03 Yao Qi <yao@codesourcery.com>
12007 * Makefile.in (OBS): Add agent.o.
12008 Add new rule for agent.o.
12009 Track dependence of tracepoint.c on agent.h.
12010 * tracepoint.c (run_inferior_command_1):
12011 (run_inferior_command): Call agent_run_command.
12012 (gdb_ust_connect_sync_socket): Deleted. Move it to
12014 (resume_thread, stop_thread): Likewise.
12015 (gdb_ust_socket_init): Renamed to ...
12016 (gdb_agent_socket_init): ... New.
12017 (gdb_ust_thread): Renamed to ...
12018 (gdb_agent_helper_thread): ... New.
12019 (gdb_ust_init): Move some code to ...
12020 (gdb_agent_init): ... here. New.
12021 [HAVE_UST]: Call gdb_ust_init.
12022 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12023 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12024 * config.in, configure: Regenerated.
12026 2012-03-02 Pedro Alves <palves@redhat.com>
12028 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12029 * linux-low.c (struct simple_pid_list): New.
12030 (stopped_pids): New a struct simple_pid_list pointer.
12031 (add_to_pid_list, pull_pid_from_list): New.
12032 (handle_extended_wait): Don't assume the first signal new children
12033 report is SIGSTOP. Adjust call to pull_pid_from_list.
12034 (linux_wait_for_lwp): Adjust.
12036 2012-03-02 Yao Qi <yao@codesourcery.com>
12038 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12041 2012-03-02 Yao Qi <yao@codesourcery.com>
12043 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12044 `stop_pc' and `tpoint'. Update caller.
12046 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12048 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12049 * linux-low.c (use_linux_regsets): New macro.
12050 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12051 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12052 (linux_register_in_regsets): New function.
12053 (usr_fetch_inferior_registers): Skip registers covered by
12055 (usr_store_inferior_registers): Likewise.
12056 (usr_fetch_inferior_registers): New macro.
12057 (usr_store_inferior_registers): Likewise.
12058 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12059 (linux_store_registers): Likewise.
12060 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12062 (init_registers_mips64_dsp_linux): Likewise.
12063 (init_registers_mips_linux): New macro.
12064 (init_registers_mips_dsp_linux): Likewise.
12065 (mips_dsp_num_regs): Likewise.
12066 (DSP_BASE, DSP_CONTROL): New fallback macros.
12067 (mips_base_regs): New macro.
12068 (mips_regmap): Use it. Fix the size.
12069 (mips_dsp_regmap): New variable.
12070 (mips_dsp_regset_bitmap): Likewise.
12071 (mips_arch_setup): New function.
12072 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12074 (mips_cannot_store_register): Likewise.
12075 (the_low_target): Update .arch_setup, .num_regs and .regmap
12076 initializers. Add .regset_bitmap initializer.
12077 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12079 * linux-bfin-low.c (the_low_target): Likewise.
12080 * linux-cris-low.c (the_low_target): Likewise.
12081 * linux-crisv32-low.c (the_low_target): Likewise.
12082 * linux-ia64-low.c (the_low_target): Likewise.
12083 * linux-m32r-low.c (the_low_target): Likewise.
12084 * linux-m68k-low.c (the_low_target): Likewise.
12085 * linux-ppc-low.c (the_low_target): Likewise.
12086 * linux-s390-low.c (the_low_target): Likewise.
12087 * linux-sh-low.c (the_low_target): Likewise.
12088 * linux-sparc-low.c (the_low_target): Likewise.
12089 * linux-tic6x-low.c (the_low_target): Likewise.
12090 * linux-x86-low.c (the_low_target): Likewise.
12091 * linux-xtensa-low.c (the_low_target): Likewise.
12092 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12093 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12094 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12096 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12097 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12099 2012-02-29 Yao Qi <yao@codesourcery.com>
12100 Pedro Alves <palves@redhat.com>
12102 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12103 `step_over_finished' is true.
12105 2012-02-27 Pedro Alves <palves@redhat.com>
12107 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12108 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12110 2012-02-27 Pedro Alves <palves@redhat.com>
12113 * linux-low.c (pid_is_stopped): New.
12114 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12116 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12118 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12121 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12123 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12125 2012-02-24 Luis Machado <lgustavo@codesourcery>
12127 * server.c (handle_query): Advertise support for target-side
12128 breakpoint condition evaluation.
12129 (process_point_options): New function.
12130 (process_serial_event): When inserting a breakpoint, check for
12131 a target-side condition that should be evaluated.
12133 * mem-break.c: Include regcache.h and ax.h.
12134 (point_cond_list_t): New data structure.
12135 (breakpoint) <cond_list>: New field.
12136 (find_gdb_breakpoint_at): Make non-static.
12137 (delete_gdb_breakpoint_at): Clear any target-side
12139 (clear_gdb_breakpoint_conditions): New function.
12140 (add_condition_to_breakpoint): Likewise.
12141 (add_breakpoint_condition): Likewise.
12142 (gdb_condition_true_at_breakpoint): Likewise.
12143 (gdb_breakpoint_here): Return result directly instead
12144 of going through a local variable.
12146 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12147 (clear_gdb_breakpoint_conditions): Likewise.
12148 (add_breakpoint_condition): Likewise.
12149 (gdb_condition_true_at_breakpoint): Likewise.
12151 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12152 (need_step_over_p): Take target-side breakpoint condition into
12155 2012-02-24 Luis Machado <lgustavo@codesourcery>
12157 * server.h: Include tracepoint.h.
12158 (agent_mem_read, agent_get_trace_state_variable_value,
12159 agent_set_trace_state_variable_value,
12160 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12161 get_set_tsv_func_addr): New prototypes.
12163 * ax.h: New include file.
12164 * ax.c: New source file.
12166 * tracepoint.c: Include ax.h.
12167 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12168 agent_expr, eval_result_type): Move to ax.h.
12169 (parse_agent_expr): Rename to ...
12170 (gdb_parse_agent_expr): ... this, make it non-static and move
12172 (unparse_agent_expr) Rename to ...
12173 (gdb_unparse_agent_expr): ... this, make it non-static and move
12175 (eval_agent_expr): Rename to ...
12176 (eval_tracepoint_agent_expr): ... this.
12177 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12178 forward declarations.
12179 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12180 (agent_get_trace_state_variable_value): New function.
12181 (agent_set_trace_state_variable_value): New function.
12182 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12183 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12184 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12185 (condition_true_at_tracepoint): Likewise.
12186 (parse_agent_expr): Rename to ...
12187 (gdb_parse_agent_expr): ... this and move to ax.c.
12188 (unparse_agent_expr): Rename to ...
12189 (gdb_unparse_agent_expr): ... this and move to ax.c.
12190 (gdb_agent_op_name): Move to ax.c.
12191 (eval_agent_expr): Rename to ...
12192 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12194 (eval_tracepoint_agent_expr): New function.
12195 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12197 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12199 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12200 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12201 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12202 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12203 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12204 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12205 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12206 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12207 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12208 (compile_bytecodes): Remove forward declaration.
12209 (is_goto_target): Move to ax.c.
12210 (compile_bytecodes): Move to ax.c and call
12211 agent_get_trace_state_variable_value (...) and
12212 agent_set_trace_state_variable_value (...).
12214 * Makefile.in: Update ax.c and IPA dependencies.
12216 2012-02-24 Pedro Alves <palves@redhat.com>
12218 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12219 (cmd_bigqtbuffer_circular): ... this. Only handle
12220 'QTBuffer:circular:'.
12221 (handle_tracepoint_general_set): Adjust.
12223 2012-02-16 Yao Qi <yao@codesourcery.com>
12225 * inferiors.c: Move code to ...
12226 * dll.c: .... here. New.
12227 * server.h: Declare clear_dlls.
12228 * Makefile.in (SFILES): Add dll.c.
12232 2012-02-11 Yao Qi <yao@codesourcery.com>
12234 * server.c: (handle_monitor_command): Add a new parameter
12236 (handle_query): Update caller.
12238 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12240 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12241 * configure, config.in: Regenerate.
12242 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12245 2012-02-02 Pedro Alves <palves@redhat.com>
12247 Try SIGKILL first, then PTRACE_KILL.
12248 * linux-low.c (linux_kill_one_lwp): New.
12249 (linux_kill_one_lwp): Rename to ...
12250 (kill_one_lwp_callback): ... this. Use the new
12251 linux_kill_one_lwp.
12253 2012-02-02 Pedro Alves <palves@redhat.com>
12255 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12258 2012-01-27 Pedro Alves <palves@redhat.com>
12260 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12261 (elf_64_file_p): Make static.
12262 (linux_pid_exe_is_elf_64_file): New.
12263 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12264 Delete declarations.
12265 (linux_pid_exe_is_elf_64_file): Declare.
12266 * linux-x86-low.c (x86_arch_setup): Use
12267 linux_pid_exe_is_elf_64_file.
12269 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12271 * linux-low.c (linux_wait_for_event_1): Rename to ...
12272 (linux_wait_for_event): ... here and merge it with former
12273 linux_wait_for_event - new variable wait_ptid, use it.
12274 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12276 2012-01-23 Pedro Alves <palves@redhat.com>
12278 * server.c (main): Avoid yet another case of infinite loop while
12279 detaching/killing after a longjmp.
12281 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12284 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12286 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12288 * hostio.c (handle_readlink): New function.
12289 (handle_vFile): Call it to handle "vFile:readlink" packets.
12291 2012-01-20 Pedro Alves <palves@redhat.com>
12292 Ulrich Weigand <ulrich.weigand@linaro.org>
12294 * server.c (handle_v_requests): Only support vAttach and vRun to
12295 start multiple processes when in extended protocol mode.
12297 2012-01-17 Pedro Alves <palves@redhat.com>
12299 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12300 memalign plus mprotect to allocate the scratch buffer.
12302 2012-01-13 Pedro Alves <palves@redhat.com>
12304 * server.c (attach_inferior): Clear `cont_thread'.
12306 2012-01-13 Pedro Alves <palves@redhat.com>
12308 * server.c (main): Avoid infinite loop while detaching/killing
12311 2012-01-09 Doug Evans <dje@google.com>
12313 * server.c (start_inferior): Set last_ptid in --wrapper case.
12315 2012-01-06 Yao Qi <yao@codesourcery.com>
12317 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12319 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12321 2012-01-04 Yao Qi <yao@codesourcery.com>
12323 * tracepoint.c (cmd_qtdp): Print debug message
12324 for static tracepoint.
12326 2012-01-04 Yao Qi <yao@codesourcery.com>
12328 * tracepoint.c (trace_vdebug): Differentiate debug message
12329 between gdbserver and IPA.
12331 2012-01-03 Yao Qi <yao@codesourcery.com>
12333 * tracepoint.c (tracepoint_was_hit): Don't collect for
12336 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12338 * terminal.h: Reformat copyright header.
12340 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12342 * server.c (gdbserver_version): Update copyright year.
12343 * gdbreplay.c (gdbreplay_version): Likewise.
12345 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12347 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12350 2011-12-18 Hui Zhu <teawater@gmail.com>
12351 * linux-low.c (linux_create_inferior): Save return value to ret.
12353 2011-12-18 Hui Zhu <teawater@gmail.com>
12355 * linux-low.c (linux_create_inferior): Save return value to ret.
12357 2011-12-16 Doug Evans <dje@google.com>
12359 * linux-low.c (linux_create_inferior): If stdio connection,
12360 redirect stdin from /dev/null, stdout to stderr.
12361 * remote-utils.c (remote_is_stdio): New static global.
12362 (remote_connection_is_stdio): New function.
12363 (remote_prepare): Handle stdio connection.
12364 (remote_open): Ditto.
12365 (remote_close): Don't close stdin for stdio connections.
12366 (read_prim,write_prim): New functions. Replace all calls to
12367 read/write to these.
12368 * server.c (main): Watch for "-" argument. Move call to
12369 remote_prepare before start_inferior.
12370 * server.h (STDIO_CONNECTION_NAME): New macro.
12371 (remote_connection_is_stdio): Declare.
12373 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12374 in debugging output.
12376 2011-12-15 Yao Qi <yao@codesourcery.com>
12378 * tracepoint.c: Include sys/syscall.h.
12379 (gdb_ust_thread): Remove preprocessor conditional.
12381 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12383 * linux-low.c (linux_detach_one_lwp): Call
12384 the_low_target.prepare_to_resume before detaching.
12386 2011-12-14 Yao Qi <yao@codesourcery.com>
12388 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12391 2011-12-14 Yao Qi <yao@codesourcery.com>
12393 * i386-low.c (i386_low_stopped_data_address): Initialize local
12394 variable `control'.
12396 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12400 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12401 DR_CONTROL unless necessary. Extend comments.
12402 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12403 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12405 2011-12-13 Yao Qi <yao@codesourcery.com>
12407 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12409 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12411 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12413 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12414 Print new debug message for such case.
12416 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12418 Fix overlapping memcpy.
12419 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12420 the read_inferior_memory transfer.
12421 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12422 write_inferior_memory transfer.
12423 (set_fast_tracepoint_jump): New variable buf. Use it for the
12424 read_inferior_memory and write_inferior_memory transfers.
12425 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12426 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12427 Use it for the write_inferior_memory transfer.
12428 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12431 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12433 * linux-low.c (fetch_register, store_register): Make code
12434 consistent, fix formatting.
12436 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12438 * linux-low.c (usr_store_inferior_registers): Factor out code
12439 to handle individual registers into...
12440 (store_register): ... this new function.
12442 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12444 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12445 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12446 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12447 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12448 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12449 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12450 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12451 (srv_xmlfiles): Add new XML files.
12453 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12455 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12456 (init_registers_s390_linux32v1): Add prototype.
12457 (init_registers_s390_linux32v2): Likewise.
12458 (init_registers_s390_linux64v1): Likewise.
12459 (init_registers_s390_linux64v2): Likewise.
12460 (init_registers_s390x_linux64v1): Likewise.
12461 (init_registers_s390x_linux64v2): Likewise.
12462 (s390_num_regs): Increment to 52.
12463 (s390_regmap): Add orig_r2 register.
12464 (s390_num_regs_3264): Increment to 68.
12465 (s390_regmap_3264): Add orig_r2 register.
12466 (s390_collect_ptrace_register): Handle orig_r2 register.
12467 (s390_supply_ptrace_register): Likewise.
12468 (s390_fill_last_break): New function.
12469 (s390_store_last_break): Likewise.
12470 (s390_fill_system_call): New function.
12471 (s390_store_system_call): Likewise.
12472 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12474 (s390_check_regset): New function.
12475 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12476 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12477 Update target_regsets for available register sets.
12479 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12480 Jan Kratochvil <jan.kratochvil@redhat.com>
12482 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12483 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12485 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12486 * linux-low.h (struct process_info_private): New member r_debug.
12487 * server.c (handle_qxfer_libraries): Call
12488 the_target->qxfer_libraries_svr4.
12489 (handle_qxfer_libraries_svr4): New function.
12490 (qxfer_packets): New entry "libraries-svr4".
12491 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12492 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12493 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12494 PACKET_qXfer_libraries_svr4.
12496 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12498 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12499 PSW address/mask between 8-byte and 16-byte formats.
12500 (s390_supply_ptrace_register): Likewise.
12501 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12502 basic addressing mode bit.
12504 2011-11-24 Stan Shebs <stan@codesourcery.com>
12506 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12508 2011-11-17 Stan Shebs <stan@codesourcery.com>
12510 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12511 (tracing_start_time): New global.
12512 (tracing_stop_time): New global.
12513 (tracing_user_name): New global.
12514 (tracing_notes): New global.
12515 (tracing_stop_note): New global.
12516 (cmd_qtstart): Set traceframe_usage, start_time.
12517 (stop_tracing): Set stop_time.
12518 (cmd_qtstatus): Report additional status.
12519 (cmd_qtp): New function.
12520 (handle_tracepoint_query): Call it.
12521 (cmd_qtnotes): New function.
12522 (handle_tracepoint_general_set): Call it.
12523 (get_timestamp): Rename from tsv_get_timestamp.
12525 2011-11-14 Stan Shebs <stan@codesourcery.com>
12526 Kwok Cheung Yeung <kcy@codesourcery.com>
12528 * linux-x86-low.c (small_jump_insn): New.
12529 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12530 trampoline and error message, build a trampoline and issue a small
12531 jump instruction to it.
12532 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12533 trampoline and error message.
12534 (x86_get_min_fast_tracepoint_insn_len): New.
12535 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12536 * linux-low.h (struct linux_target_ops): Add arguments to
12537 install_fast_tracepoint_jump_pad operation, add new operation.
12538 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12540 (linux_get_min_fast_tracepoint_insn_len): New function.
12541 (linux_target_op): Add new operation.
12542 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12543 (gdb_trampoline_buffer_end): Ditto.
12544 (gdb_trampoline_buffer_error): Ditto.
12545 (struct ipa_sym_addresses): Add fields for new IPA variables.
12546 (symbol_list): Add entries for new IPA variables.
12547 (struct tracepoint): Add fields to hold the address range of the
12548 trampoline used by the tracepoint.
12549 (trampoline_buffer_head): New static variable.
12550 (trampoline_buffer_tail): Ditto.
12551 (claim_trampoline_space): New function.
12552 (have_fast_tracepoint_trampoline_buffer): New function.
12553 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12555 (install_fast_tracepoint): Ditto, also add error buffer argument.
12556 (cmd_qtminftpilen): New function.
12557 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12558 (fast_tracepoint_from_trampoline_address): New function.
12559 (fast_tracepoint_collecting): Handle trampoline as part of jump
12561 (set_trampoline_buffer_space): New function.
12562 (initialize_tracepoint): Initialize new IPA variables.
12563 * target.h (struct target_ops): Add arguments to
12564 install_fast_tracepoint_jump_pad operation, add new
12565 get_min_fast_tracepoint_insn_len operation.
12566 (target_get_min_fast_tracepoint_insn_len): New.
12567 (install_fast_tracepoint_jump_pad): Add arguments.
12568 * server.h (IPA_BUFSIZ): Define.
12569 * linux-i386-ipa.c: Include extra header files.
12570 (initialize_fast_tracepoint_trampoline_buffer): New function.
12571 (initialize_low_tracepoint): Call it.
12572 * server.h (set_trampoline_buffer_space): Declare.
12573 (claim_trampoline_space): Ditto.
12574 (have_fast_tracepoint_trampoline_buffer): Ditto.
12576 2011-11-14 Yao Qi <yao@codesourcery.com>
12578 * server.c (handle_query): Handle InstallInTrace for qSupported.
12579 * tracepoint.c (add_tracepoint): Sort list.
12580 (install_tracepoint, download_tracepoint): New.
12581 (cmd_qtdp): Call them to install and download tracepoints.
12582 (sort_tracepoints): Removed.
12583 (cmd_qtstart): Update.
12585 2011-11-14 Yao Qi <yao@codesourcery.com>
12587 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12588 * mem-break.h: Declare.
12589 * tracepoint.c (cmd_qtstart): Move some code to ...
12590 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12592 (download_tracepoints): Move some code to ...
12593 (download_tracepoint_1): ... here. New.
12595 2011-11-08 Yao Qi <yao@codesourcery.com>
12597 * remote-utils.c (relocate_instruction): A comment fix.
12599 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12601 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12602 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12603 dr_status_mirror and dr_control_mirror from debug_reg_state.
12604 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12605 (i386_initial_stuff): Remove use of deleted globals.
12606 (i386_get_thread_context, i386_set_thread_context,
12607 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12608 from debug_reg_state.
12610 2011-11-05 Yao Qi <yao@codesourcery.com>
12612 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12613 address as TPOINT's.
12615 2011-11-02 Stan Shebs <stan@codesourcery.com>
12617 * tracepoint.c (agent_mem_read_string): New function.
12618 (eval_agent_expr): Call it for tracenz.
12619 * server.c (handle_query): Report support for tracenz.
12621 2011-11-02 Yao Qi <yao@codesourcery.com>
12623 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12625 2011-11-02 Yao Qi <yao@codesourcery.com>
12627 * target.h: Fix a typo in comment.
12629 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12631 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12632 clobber the breakpoints' shadows with fast tracepoint jumps.
12633 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12634 * target.c (write_inferior_memory): Also pass MYADDR down to
12637 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12639 * configure.ac: Check support for personality routine.
12640 * configure: Regenerate.
12641 * config.in: Likewise.
12642 * linux-low.c: Include <sys/personality.h>.
12643 Define ADDR_NO_RANDOMIZE if necessary.
12644 (linux_create_inferior): Disable address space randomization when
12645 forking inferior, if requested.
12646 (linux_supports_disable_randomization): New function.
12647 (linux_target_ops): Install it.
12648 * server.h (disable_randomization): Declare.
12649 * server.c (disable_randomization): New global variable.
12650 (handle_general_set): Handle QDisableRandomization.
12651 (handle_query): Likewise for qSupported.
12652 (main): Support --disable-randomization and --no-disable-randomization
12653 command line arguments.
12654 * target.h (struct target_ops): Add supports_disable_randomization.
12655 (target_supports_disable_randomization): New macro.
12657 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12659 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12661 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12662 [!PT_GETDSBT] (target_loadmap): New definition.
12663 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12664 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12665 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12666 and PT_GETDSBT to LINUX_LOADMAP.
12667 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12668 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12670 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12672 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12673 (arm_linux_hwbp_cap): New static variable.
12674 (arm_linux_get_hwbp_cap): Replace by ...
12675 (arm_linux_init_hwbp_cap): ... this new function.
12676 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12677 (arm_linux_get_hw_watchpoint_count): Likewise.
12678 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12679 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12680 (arm_prepare_to_resume): Use perror_with_name instead of error.
12682 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12684 * linux-arm-low.c: Include <signal.h>.
12685 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12686 (struct arm_linux_hwbp_cap): New data type.
12687 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12688 (struct arm_linux_hw_breakpoint): New data type.
12689 (MAX_BPTS, MAX_WPTS): Define.
12690 (struct arch_process_info, struct arch_lwp_info): New data types.
12691 (arm_linux_get_hwbp_cap): New function.
12692 (arm_linux_get_hw_breakpoint_count): Likewise.
12693 (arm_linux_get_hw_watchpoint_count): Likewise.
12694 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12695 (arm_hwbp_control_initialize): Likewise.
12696 (arm_hwbp_control_is_enabled): Likewise.
12697 (arm_hwbp_control_is_initialized): Likewise.
12698 (arm_hwbp_control_disable): Likewise.
12699 (arm_linux_hw_breakpoint_equal): Likewise.
12700 (arm_linux_hw_point_initialize): Likewise.
12701 (struct update_registers_data): New data structure.
12702 (update_registers_callback: New function.
12703 (arm_insert_point): Likewise.
12704 (arm_remove_point): Likewise.
12705 (arm_stopped_by_watchpoint): Likewise.
12706 (arm_stopped_data_address): Likewise.
12707 (arm_new_process): Likewise.
12708 (arm_new_thread): Likewise.
12709 (arm_prepare_to_resume): Likewise.
12710 (the_low_target): Register arm_insert_point, arm_remove_point,
12711 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12712 arm_new_thread, and arm_prepare_to_resume.
12714 2011-09-15 Stan Shebs <stan@codesourcery.com>
12716 * server.h (struct emit_ops): Add compare-goto fields.
12717 * tracepoint.c (gdb_agent_op_sizes): New table.
12718 (emit_eq_goto): New function.
12719 (emit_ne_goto): New function.
12720 (emit_lt_goto): New function.
12721 (emit_le_goto): New function.
12722 (emit_gt_goto): New function.
12723 (emit_ge_goto): New function.
12724 (is_goto_target): New function.
12725 (compile_bytecodes): Recognize special cases of compare-goto
12726 combinations and call specialized emitters for them.
12727 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12728 (amd64_emit_ne_goto): New function.
12729 (amd64_emit_lt_goto): New function.
12730 (amd64_emit_le_goto): New function.
12731 (amd64_emit_gt_goto): New function.
12732 (amd64_emit_ge_goto): New function.
12733 (amd64_emit_ops): Add the new functions.
12734 (i386_emit_eq_goto): New function.
12735 (i386_emit_ne_goto): New function.
12736 (i386_emit_lt_goto): New function.
12737 (i386_emit_le_goto): New function.
12738 (i386_emit_gt_goto): New function.
12739 (i386_emit_ge_goto): New function.
12740 (i386_emit_ops): Add the new functions.
12742 2011-09-08 Stan Shebs <stan@codesourcery.com>
12744 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12745 (i386_emit_epilogue): Restore %ebx.
12747 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12749 * server.c (step_thread): Remove definition.
12750 (process_serial_event): Don't handle Hs.
12751 * server.h (step_thread): Remove declaration.
12752 * target.c (set_desired_inferior): Remove use of step_thread.
12754 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12756 * linux-low.c: Include linux-procfs.h.
12757 (linux_attach_lwp_1): Update comments.
12758 (linux_attach): Scan for existing threads when attaching to a
12759 process that is the tgid.
12760 * Makefile.in: Update dependencies.
12762 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12764 * configure.srv: Add linux-procfs.o dependencies.
12766 2011-08-14 Yao Qi <yao@codesourcery.com>
12768 * target.h (struct target_ops): Fix indent.
12769 * win32-low.c (win32_target_ops): Fix comment.
12771 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12772 Yao Qi <yao@codesourcery.com>
12774 * Makefile.in (clean): Remove tic6x-*.c files.
12775 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12776 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12777 (tic6x-c64xp-linux.c): Likewise.
12778 * configure.srv: Add support for tic6x-*-uclinux.
12779 * linux-tic6x-low.c: New.
12780 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12782 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12783 Yao Qi <yao@codesourcery.com>
12785 * target.h (struct target_ops): Add read_loadmap.
12786 * linux-low.c (struct target_loadseg): New type.
12787 (struct target_loadmap): New type.
12788 (linux_read_loadmap): New function.
12789 (linux_target_ops): Add linux_read_loadmap.
12790 * server.c (handle_query): Support qXfer:fdpic:read packet.
12791 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12794 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12796 * win32-low.c: Include <stdint.h>.
12798 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12800 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12801 to the inferior here.
12802 (i386_remove_aligned_watchpoint): Ditto.
12803 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12804 fit part of the watchpoint in the debug registers.
12805 (i386_update_inferior_debug_regs): New.
12806 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12807 registers, and only update the inferior on success.
12808 (i386_low_remove_watchpoint): Ditto.
12810 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12812 * linux-low.c (compare_ints, unique, list_threads, show_process,
12813 linux_core_of_thread): Delete.
12814 (linux_target_ops): Change linux_core_of_thread to
12815 linux_common_core_of_thread.
12816 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12817 * utils.c (malloc_failure): Change type of argument.
12818 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12819 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12820 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12821 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12822 (IPA_OBJS): Add common-utils-ipa.o.
12823 (ptid_h, linux_osdata_h): New macros.
12824 (server_h): Add common/common-utils.h, common/xml-utils.h,
12825 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12827 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12828 ptid.o, buffer.o): New rules.
12829 (linux-low.o): Add common/linux-osdata.h as a dependency.
12830 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12831 * configure.ac: Add AC_HEADER_DIRENT check.
12832 * config.in: Regenerate.
12833 * configure: Regenerate.
12834 * remote-utils.c (xml_escape_text): Delete.
12835 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12836 buffer_xml_printf): Move to common/buffer.c.
12837 * server.c (main): Remove call to initialize_inferiors.
12838 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12839 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12840 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12841 internal_error, gdb_assert, gdb_assert_fail): Delete.
12842 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12843 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12845 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12846 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12847 initialize_inferiors): Delete.
12849 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12851 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12854 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12856 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12858 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12860 2011-05-26 Yao Qi <yao@codesourcery.com>
12862 * Makefile.in (thread-db.o): Track dependence to
12863 common/gdb_thread_db.h.
12864 * thread-db.c: include gdb_thread_db.h from right place.
12866 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12868 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12869 __FILE__ and __LINE__ to internal_error.
12871 2011-05-13 Doug Evans <dje@google.com>
12873 * thread-db.c (try_thread_db_load_from_sdir): New function.
12874 (try_thread_db_load_from_dir): New function.
12875 (thread_db_load_search): Handle $sdir, ignore $pdir.
12876 Remove trying of system directories if search of
12877 libthread-db-search-path fails, that is now done via $sdir.
12879 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12881 * server.c (handle_query): Add EnableDisableTracepoints to the list
12882 of supported features.
12883 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12885 (cmd_qtenable_disable): New.
12886 (cmd_qtstart): Install tracepoints even if disabled.
12887 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12888 receiving a QTEnable or QTDisable packet.
12889 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12890 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12892 (gdb_probe): Skip data collection if static tracepoint is disabled.
12894 2011-05-10 Doug Evans <dje@google.com>
12896 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12898 2011-05-04 Doug Evans <dje@google.com>
12900 * linux-low.c (linux_join): Skip process lookup.
12901 * spu-low.c (spu_join): Ditto.
12902 * server.c (join_inferiors_callback): Delete.
12903 (process_serial_event): For 'D' packet (detach) call join_inferior
12906 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12908 * README: Don't mention xscale*-*-linux*.
12909 * configure.srv (xscale*-*-linux*): Don't handle target.
12911 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12913 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12915 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12916 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12917 (i386_emit_void_call_2): Likewise.
12919 2011-04-26 Yao Qi <yao@codesourcery.com>
12921 * linux-low.c: Move common macros to linux-ptrace.h.
12922 Include linux-ptrace.h.
12923 * Makefile.in (linux_ptrace_h): New.
12924 (linux-low.o): Depends on linux-ptrace.h.
12926 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12928 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12929 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12930 (remote_prepare): New function with most of the TCP code from ...
12931 (remote_open): ... here. Detect PORT here unconditionally. Move also
12932 setting transport_is_reliable.
12933 * server.c (run_once): New variable.
12934 (gdbserver_usage): Document it.
12935 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12936 the first run if RUN_ONCE.
12937 * server.h (run_once, remote_prepare): New declarations.
12939 2011-04-19 Tom Tromey <tromey@redhat.com>
12941 * win32-low.c (handle_load_dll): Remove duplicate "the".
12943 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12945 Remove support for old Cygwin 1.5 versions.
12946 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12947 function to avoid warning.
12948 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12951 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12953 * gdbserver/server.h (Macro _): Define it if not available.
12955 2011-03-14 Michael Snyder <msnyder@vmware.com>
12957 * hostio.c (handle_close): Remove unnecessary null test.
12959 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12961 * Makefile.in (maintainer-clean realclean distclean): Remove
12962 "make ... subdir_do" command.
12964 2011-03-10 Michael Snyder <msnyder@vmware.com>
12966 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12968 * server.c (handle_v_run): Free alloced buffer on early return.
12970 2011-03-09 Yao Qi <yao@codesourcery.com>
12973 2011-03-04 Yao Qi <yao@codesourcery.com>
12975 * Makefile.in: Remove GNU make feature --directory.
12977 2011-03-05 Yao Qi <yao@codesourcery.com>
12979 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12980 (subdir_do): New make target. Copied from gdb/Makefile.
12981 (maintainer-clean, realclean, distclean, clean): Call corresponding
12982 make targets in common/Makefile.
12984 2011-02-11 Yao Qi <yao@codesourcery.com>
12986 * configure.ac: Call AC_PROG_RANLIB.
12987 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12988 * configure: Regenerate.
12990 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12992 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12994 2011-03-06 Yao Qi <yao@codesourcery.com>
12996 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12998 2011-03-05 Yao Qi <yao@codesourcery.com>
13000 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13001 (subdir_do): New make target. Copied from gdb/Makefile.
13002 (maintainer-clean, realclean, distclean, clean): Call corresponding
13003 make targets in common/Makefile.
13005 2011-03-04 Yao Qi <yao@codesourcery.com>
13007 * Makefile.in: Remove GNU make feature --directory.
13009 2011-03-04 Michael Snyder <msnyder@vmware.com>
13011 * server.c (queue_stop_reply): Call xmalloc not malloc.
13013 2011-03-02 Michael Snyder <msnyder@vmware.com>
13015 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13017 2011-02-28 Michael Snyder <msnyder@vmware.com>
13019 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13020 (cmd_qtframe): Ditto.
13021 (cmd_qtbuffer): Ditto.
13022 (cmd_bigqtbuffer): Ditto.
13024 * utils.c (decimal2str): Initialize 'width' to nine, then
13025 don't mess with it.
13027 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13029 * hostio.c (require_data): Free *data, not data.
13031 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13033 * hostio.c (require_data): Use free, not xfree.
13035 2011-02-27 Michael Snyder <msnyder@vmware.com>
13037 * server.c (handle_query): Discard unused value.
13039 * hostio.c (require_data): Free malloc memory before returning
13042 2011-02-26 Michael Snyder <msnyder@vmware.com>
13044 * linux-low.c (list_threads): Call closedir for dirent.
13046 2011-02-27 Michael Snyder <msnyder@vmware.com>
13048 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13049 a case statement falls through.
13051 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13053 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13056 2011-02-26 Michael Snyder <msnyder@vmware.com>
13058 * utils.c (decimal2str): Eliminate dead code and dead param.
13059 (pulongest): Drop dead param from call to decimal2str.
13062 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13064 Revert the following patch (not approved yet):
13065 2011-02-21 Hui Zhu <teawater@gmail.com>
13066 * tracepoint.c (tp_printf): New function.
13067 (eval_agent_expr): Handle gdb_agent_op_printf.
13069 2011-02-21 Hui Zhu <teawater@gmail.com>
13071 * tracepoint.c (tp_printf): New function.
13072 (eval_agent_expr): Handle gdb_agent_op_printf.
13074 2011-02-18 Tom Tromey <tromey@redhat.com>
13076 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13077 (tracepoint.o): Likewise.
13078 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13079 (gdb_agent_op_names): Likewise.
13081 2011-02-18 Tom Tromey <tromey@redhat.com>
13083 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13084 gdb_agent_op_rot>: New constants.
13085 (gdb_agent_op_names): Add pick and roll.
13086 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13089 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13091 * aclocal.m4: Regenerated with aclocal-1.11.1.
13093 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13095 * server.c (handle_qxfer_traceframe_info): New.
13096 (qxfer_packets): Register "traceframe-info".
13097 (handle_query): Report support for qXfer:traceframe-info:read+.
13098 * tracepoint.c (match_blocktype): New.
13099 (traceframe_find_block_type): Rename to ...
13100 (traceframe_walk_blocks): ... this. Add callback filter argument,
13102 (traceframe_find_block_type): New, reimplemented on top of
13103 traceframe_walk_blocks.
13104 (build_traceframe_info_xml): New.
13105 (traceframe_read_info): New.
13106 * server.h (traceframe_read_info): Declare.
13108 2011-02-11 Yao Qi <yao@codesourcery.com>
13110 * configure.ac: Call AC_PROG_RANLIB.
13111 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13112 * configure: Regenerate.
13114 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13116 * server.c (gdb_read_memory): Change return semantics to allow
13118 (handle_search_memory_1): Adjust.
13119 (process_serial_event) <'m' packet>: Handle partial transfers.
13120 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13122 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13124 * regcache.c (init_register_cache): Initialize
13125 regcache->register_status.
13126 (free_register_cache): Release regcache->register_status.
13127 (regcache_cpy): Copy register_status.
13128 (registers_to_string): Print 'x's for unavailable registers.
13129 (supply_register): Mark the register's status valid or
13130 unavailable, depending on whether a buffer was passed in or not.
13131 (supply_register_zeroed): New.
13132 (supply_regblock): Mark the registers' status valid or
13133 unavailable, depending on whether a buffer was passed in or not.
13134 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13135 (struct regcache): New `register_status' field.
13136 (supply_register_zeroed): Declare.
13137 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13138 supply_register_zeroed, rather than passing a NULL buffer to
13140 * tracepoint.c (fetch_traceframe_registers): Update comment.
13142 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13144 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13147 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13149 * server.h (decode_xfer_write): Change prototype.
13150 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13151 and don't extract the annex here.
13152 * server.c (decode_xfer_read): Remove `annex' parameter,
13153 and don't extract the annex here.
13154 (decode_xfer): New.
13155 (struct qxfer): New.
13156 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13157 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13158 (handle_qxfer_statictrace): New functions, abstracted out from
13159 handle_query, and made to use the struct qxfer interface.
13160 (handle_threads_qxfer_proper): Rename to ...
13161 (handle_qxfer_threads_proper): ... this.
13162 (handle_threads_qxfer): Rename to ...
13163 (handle_qxfer_threads): ... this. Adjust.
13164 (qxfer_packets): New array.
13165 (handle_qxfer): New function.
13166 (handle_query): Use handle_qxfer.
13168 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13170 * gdbreplay.c: Shorten lines of >= 80 columns.
13171 * linux-low.c: Ditto.
13172 * linux-ppc-low.c: Ditto.
13173 * linux-s390-low.c: Ditto.
13174 * linux-sparc-low.c: Ditto.
13175 * linux-x86-low.c: Ditto.
13176 * linux-xtensa-low.c: Ditto.
13177 * mem-break.c: Ditto.
13178 * nto-low.c: Ditto.
13179 * regcache.h: Ditto.
13180 * remote-utils.c: Ditto.
13183 * thread-db.c: Ditto.
13184 * tracepoint.c: Ditto.
13186 * win32-low.h: Ditto.
13188 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13190 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13193 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13195 * server.c (gdbserver_version): Update copyright year in version
13197 * gdbreplay.c (gdbreplay_version): Ditto.
13199 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13201 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13202 * linux-bfin-low.c: New file.
13203 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13204 PT_DATA_ADDR for BFIN targets.
13205 * Makefile.in (SFILES): Add linux-bfin-low.c.
13206 (clean): Remove reg-bfin.c.
13207 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13208 * README: Mention supported Blackfin targets.
13210 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13212 * .gitignore: New file.
13214 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13216 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13218 2010-10-22 Jie Zhang <jie@codesourcery.com>
13220 * Makefile.in: Add FLAGS_TO_PASS variable.
13221 (install): Remove dependency of install-only and recursively
13222 invoke make for install-only.
13224 2010-10-04 Doug Evans <dje@google.com>
13226 * Makefile.in (uninstall): Use $(DESTDIR).
13228 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13232 * linux-x86-low.c (compat_siginfo_from_siginfo)
13233 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13234 si_code is < 0. Check for si_code == SI_TIMER before checking for
13237 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13239 * lynx-i386-low.c: New file.
13240 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13242 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13244 * lynx-low.c (ptrace_request_to_str): Remove handling for
13245 request values that have been removed in LynxOS 5.x.
13247 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13249 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13252 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13254 * configure.ac: Add --enable-inprocess-agent option.
13255 * configure: Rebuilt.
13257 2010-09-06 Yao Qi <yao@codesourcery.com>
13259 * linux-low.c (linux_kill): Remove unused variable.
13260 (linux_stabilize_threads): Likewise.
13261 * server.c (start_inferior): Likewise.
13262 (queue_stop_reply_callback): Likewise.
13263 * tracepoint.c (do_action_at_tracepoint): Likewise.
13265 2010-09-06 Yao Qi <yao@codesourcery.com>
13267 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13270 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13272 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13274 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13276 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13279 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13281 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13282 gdbserver/lynx-ppc-low.c: New files.
13283 * Makefile.in (lynx_low_h): New variable.
13284 (lynx-low.o, lynx-ppc-low.o): New rules.
13285 * configure.ac: On LynxOS, link with -lnetinet.
13286 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13287 * configure: regenerate.
13289 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13291 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13292 * configure.ac: Add check for vasprintf and vsnprintf.
13293 * configure, config.in: Regenerate.
13294 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13296 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13298 * gdbreplay.c: Move include of alloca.h up, next to include of
13300 * server.h: Add include of malloc.h.
13301 * mem-break.c: Remove include of malloc.h.
13302 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13304 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13306 * Makefile.in (memmem.o): Build with -Wno-error.
13308 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13310 * utils.c (xsnprintf): Make non-static.
13311 * server.h: Add xsnprintf declaration.
13312 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13313 replace calls to snprintf by calls to xsnprintf throughout.
13315 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13317 * configure.ac: Add configure check for alloca.
13318 * configure, config.in: Regenerate.
13319 * server.h: Include alloca.h if it exists.
13320 * gdbreplay.c: Include alloca.h if it exists.
13322 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13324 * linux-low.c (__SIGRTMIN): Define if not already defined.
13325 (linux_create_inferior): Check for __ANDROID__ rather than
13327 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13328 are already deferred.
13329 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13330 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13331 stopped and already has a pending signal to report.
13332 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13333 a pending signal to report or is moving out of a jump pad.
13334 (linux_init_signals): Check for __ANDROID__ rather than
13337 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13339 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13340 debug_threads check. Avoid a linear search when not doing debug
13343 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13345 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13346 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13347 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13348 (process_event): Change local fd's type to gdb_fildes_t.
13349 (create_file_handler): Adjust prototype.
13350 (delete_file_handler): Adjust prototype.
13351 (handle_file_event): Adjust prototype. Use pfildes.
13352 (create_file_event): Adjsut prototype.
13353 * remote-utils.c (remote_desc, listen_desc): Change type to
13355 * server.h: New gdb_fildes_t typedef.
13356 [USE_WIN32API]: Include winsock2.h.
13357 (delete_file_handler, add_file_handler): Adjust prototypes.
13358 (pfildes): Declare.
13359 * utils.c (pfildes): New.
13361 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13363 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13364 * configure: Regenerate.
13366 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13368 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13369 (linux_done_accessing_memory): ... this.
13370 (linux_target_ops): Adjust.
13371 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13372 * nto-low.c (nto_target_ops): Adjust comment.
13373 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13374 * spu-low.c (spu_target_ops): Adjust comment.
13375 * target.h (target_ops): Rename unprepare_to_access_memory field
13376 to done_accessing_memory.
13377 (unprepare_to_access_memory): Rename to ...
13378 (done_accessing_memory): ... this.
13380 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13382 * linux-low.c (linux_prepare_to_access_memory): New.
13383 (linux_unprepare_to_access_memory): New.
13384 (linux_target_ops): Install them.
13385 * server.c (read_memory): Rename to ...
13386 (gdb_read_memory): ... this. Use
13387 prepare_to_access_memory/prepare_to_access_memory.
13388 (write_memory): Rename to ...
13389 (gdb_write_memory): ... this. Use
13390 prepare_to_access_memory/prepare_to_access_memory.
13391 (handle_search_memory_1): Adjust.
13392 (process_serial_event): Adjust.
13393 * target.h (struct target_ops): New fields
13394 prepare_to_access_memory and unprepare_to_access_memory.
13395 (prepare_to_access_memory, unprepare_to_access_memory): New.
13396 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13397 prepare_to_access_memory/prepare_to_access_memory.
13398 * nto-low.c (nto_target_ops): Adjust.
13399 * spu-low.c (spu_target_ops): Adjust.
13400 * win32-low.c (win32_target_ops): Adjust.
13402 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13404 * Makefile.in (WARN_CFLAGS): Get it from configure.
13405 (WERROR_CFLAGS): New.
13406 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13407 * configure.ac: Introduce --enable-werror, which adds -Werror to
13408 the compiler command line. Enabled by default. Disable with
13409 --disable-werror. Add -Wdeclaration-after-statement
13410 Wpointer-arith and -Wformat-nonliteral to warning flags.
13411 * configure: Regenerate.
13413 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13415 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13417 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13419 * gdbreplay.c (remote_error): New.
13421 (expect): Use gdbchar. Check for error reading from GDB.
13422 Clarify sync error output.
13423 (play): Check for errors writing to GDB.
13424 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13425 * remote-utils.c (getpkt): Check for errors writing to the remote
13428 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13430 * linux-low.c (linux_wait_1): Move non-debugging code out of
13431 `debug_threads' control.
13433 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13435 * linux-low.c (linux_wait_1): Don't set last_status here.
13436 * server.c (push_event, queue_stop_reply_callback): Assert we're
13437 not pushing a TARGET_WAITKIND_IGNORE event.
13438 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13439 (myresume, handle_target_event): Set the thread's last_resume_kind
13440 and last_status from the target returned status.
13442 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13446 * linux-x86-low.c (update_debug_registers_callback): New.
13447 (i386_dr_low_set_addr): Use it.
13448 (i386_dr_low_get_addr): New.
13449 (i386_dr_low_set_control): Use update_debug_registers_callback.
13450 (i386_dr_low_get_control): New.
13451 (i386_dr_low_get_status): Adjust.
13452 * linux-low.c (linux_stop_lwp): New.
13453 * linux-low.h (linux_stop_lwp): Declare.
13455 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13456 argument instead of a i386_debug_reg_state.
13457 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13458 a i386_debug_reg_state.
13459 (i386_insert_aligned_watchpoint): Adjust.
13460 (i386_remove_aligned_watchpoint): Adjust.
13461 (i386_low_stopped_data_address): Read the debug registers from the
13462 inferior instead of from the mirrors.
13463 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13464 (i386_dr_low_get_addr): Declare.
13465 (i386_dr_low_get_control): Declare.
13466 (i386_dr_low_get_status): Change prototype.
13468 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13469 (i386_dr_low_get_addr): New.
13470 (i386_dr_low_get_control): New.
13471 (i386_dr_low_get_status): Adjust prototype. Return
13473 (i386_initial_stuff): Clear dr_status_mirror and
13475 (i386_get_thread_context): Adjust.
13476 (i386_set_thread_context): Adjust.
13477 (i386_thread_added): Adjust.
13479 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13481 * linux-low.h (linux_thread_area): Delete declaration.
13483 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13485 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13486 after its termination.
13488 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13490 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13491 (gdb_wants_all_stopped): Delete.
13492 (linux_wait_1): Don't call them.
13493 * server.c (handle_v_cont): Tag all threads as want-stopped.
13494 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13495 stopped as "client-wants-stopped".
13497 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13499 * Makefile.in (signals_h): New.
13500 (server_h): Depend on it.
13501 (server.o): Don't depend on $(signals_def).
13502 (signals.o): Depend on $(signals_def).
13504 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13506 * Makefile.in (signals_def): New.
13507 (server_h): Append include/gdb/signals.h and signals_def.
13508 (server.o): Append signals_def.
13510 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13512 * server.c (handle_target_event): Use target_signal_to_host for
13513 resume_info.sig initialization.
13514 * target.h (struct thread_resume) <sig>: New comment.
13516 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13518 * server.c (handle_query): strcpy() the returned string from paddress()
13519 instead of sprintf().
13520 * utils.c (paddress): Return phex_nz().
13522 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13524 * server.c (handle_v_cont): Call mourn_inferior if process
13526 (myresume): Likewise.
13528 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13530 Static tracepoints, and integration with UST.
13532 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13533 * mem-break.c (uninsert_all_breakpoints)
13534 (reinsert_all_breakpoints): New.
13535 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13536 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13537 (gdb_agent_ust_loaded, helper_thread_id)
13538 (gdb_agent_helper_thread_id): New macros.
13539 (struct ipa_sym_addresses): Add addr_ust_loaded,
13540 addr_helper_thread_id, addr_cmd_buf.
13541 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13542 (in_process_agent_loaded_ust): New.
13543 (write_e_ust_not_loaded): New.
13544 (maybe_write_ipa_ust_not_loaded): New.
13545 (struct collect_static_trace_data_action): New.
13546 (enum tracepoint_type) <static_tracepoint>: New.
13547 (struct tracepoint) <handle>: Mention static tracepoints.
13548 (struct static_tracepoint_ctx): New.
13549 (CMD_BUF_SIZE): New.
13550 (add_tracepoint_action): Handle static tracepoint actions.
13551 (unprobe_marker_at): New.
13552 (clear_installed_tracepoints): Handle static tracepoints.
13553 (cmd_qtdp): Handle static tracepoints.
13554 (probe_marker_at): New.
13555 (cmd_qtstart): Handle static tracepoints.
13556 (response_tracepoint): Handle static tracepoints.
13557 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13558 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13559 (get_context_regcache): Handle static tracepoints.
13560 (do_action_at_tracepoint): Handle static tracepoint actions.
13561 (traceframe_find_block_type): Handle static trace data blocks.
13562 (traceframe_read_sdata): New.
13563 (download_tracepoints): Download static tracepoint actions.
13564 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13565 (GDB_PROBE_NAME): New.
13567 (GET_UST_SYM): New.
13570 (ust_marker_to_static_tracepoint): New.
13572 (collect_ust_data_at_tracepoint): New.
13573 (gdb_ust_probe): New.
13574 (UNIX_PATH_MAX, SOCK_DIR): New.
13575 (gdb_ust_connect_sync_socket): New.
13576 (resume_thread, stop_thread): New.
13577 (run_inferior_command): New.
13578 (init_named_socket): New.
13579 (gdb_ust_socket_init): New.
13580 (cstr_to_hexstr): New.
13582 (first_marker, next_marker): New.
13583 (response_ust_marker): New.
13584 (cmd_qtfstm, cmd_qtsstm): New.
13585 (unprobe_marker_at, probe_marker_at): New.
13586 (cmd_qtstmat, gdb_ust_thread): New.
13587 (gdb_ust_init): New.
13588 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13589 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13590 (ST_REGENTRY): New.
13591 (x86_64_st_collect_regmap): New.
13592 (X86_64_NUM_ST_COLLECT_GREGS): New.
13593 (AMD64_RIP_REGNUM): New.
13594 (supply_static_tracepoint_registers): New.
13595 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13596 (ST_REGENTRY): New.
13597 (i386_st_collect_regmap): New.
13598 (i386_NUM_ST_COLLECT_GREGS): New.
13599 (supply_static_tracepoint_registers): New.
13600 * server.c (handle_query): Handle qXfer:statictrace:read.
13601 <qSupported>: Report support for StaticTracepoints, and
13602 qXfer:statictrace:read features.
13603 * server.h (traceframe_read_sdata)
13604 (supply_static_tracepoint_registers): Declare.
13605 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13606 (unpack_varlen_hex): Include in IPA build.
13607 * Makefile.in (ustlibs, ustinc): New.
13608 (IPA_OBJS): Add remote-utils-ipa.o.
13609 ($(IPA_LIB)): Link -ldl and -lpthread.
13611 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13612 * config.in, configure: Regenerate.
13614 2010-06-20 Ian Lance Taylor <iant@google.com>
13615 Pedro Alves <pedro@codesourcery.com>
13617 * linux-x86-low.c (always_true): Delete.
13618 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13619 trying to fool the compiler with always_true.
13621 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13623 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13624 conditions in gdbserver.
13626 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13628 * spu-low.c (spu_read_memory): Wrap around local store limit.
13629 (spu_write_memory): Likewise.
13631 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13633 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13634 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13636 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13638 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13639 uses with LONGEST uses.
13641 2010-06-14 Stan Shebs <stan@codesourcery.com>
13642 Pedro Alves <pedro@codesourcery.com>
13646 * linux-x86-low.c: Include limits.h.
13648 (always_true): New.
13651 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13652 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13653 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13654 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13655 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13656 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13657 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13658 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13659 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13660 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13661 (amd64_emit_void_call_2): New.
13662 (amd64_emit_ops): New.
13663 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13664 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13665 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13666 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13667 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13668 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13669 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13670 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13671 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13672 (i386_emit_stack_adjust, i386_emit_int_call_1)
13673 (i386_emit_void_call_2): New.
13674 (i386_emit_ops): New.
13675 (x86_emit_ops): New.
13676 (the_low_target): Install x86_emit_ops.
13677 * server.h (struct emit_ops): New.
13678 (get_raw_reg_func_addr): Declare.
13679 (current_insn_ptr, emit_error): Declare.
13680 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13681 (set_trace_state_variable_value): New defines.
13682 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13683 addr_get_trace_state_variable_value and
13684 addr_set_trace_state_variable_value.
13685 (symbol_list): New fields for get_raw_reg,
13686 get_trace_state_variable_value and set_trace_state_variable_value.
13687 (condfn): New typedef.
13688 (struct tracepoint): New field `compiled_cond'.
13689 (do_action_at_tracepoint): Clear compiled_cond.
13690 (get_trace_state_variable_value, set_trace_state_variable_value):
13692 (condition_true_at_tracepoint): If there's a compiled condition,
13694 (current_insn_ptr, emit_error): New globals.
13695 (struct bytecode_address): New.
13696 (get_raw_reg_func_addr): New.
13697 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13698 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13699 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13700 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13701 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13702 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13703 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13704 (compile_tracepoint_condition, compile_bytecodes): New.
13705 * target.h (emit_ops): Forward declare.
13706 (struct target_ops): New field emit_ops.
13707 (target_emit_ops): New.
13708 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13709 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13710 * linux-low.c (linux_emit_ops): New.
13711 (linux_target_ops): Install it.
13712 * linux-low.h (struct linux_target_ops): New field emit_ops.
13714 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13716 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13717 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13719 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13720 Stan Shebs <stan@codesourcery.com>
13722 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13723 (all): Depend on $(extra_libraries).
13724 (install-only): Install the IPA.
13725 (IPA_OBJS, IPA_LIB): New.
13726 (clean): Remove the IPA lib.
13727 (IPAGENT_CFLAGS): New.
13728 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13729 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13730 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13731 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13732 * configure.ac: Check for atomic builtins support in the compiler.
13733 (IPA_DEPFILES, extra_libraries): Define.
13734 * configure.srv (ipa_obj): Add description.
13735 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13736 (i[34567]86-*-linux*): Set ipa_obj.
13737 (x86_64-*-linux*): Set ipa_obj.
13738 * linux-low.c (stabilizing_threads): New.
13739 (supports_fast_tracepoints): New.
13740 (linux_detach): Stabilize threads before detaching.
13741 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13742 the lwp is either not stabilizing, or is moving out of a jump pad.
13743 (linux_fast_tracepoint_collecting): New.
13744 (maybe_move_out_of_jump_pad): New.
13745 (enqueue_one_deferred_signal): New.
13746 (dequeue_one_deferred_signal): New.
13747 (linux_wait_for_event_1): If moving out of a jump pad, defer
13748 pending signals to later.
13749 (linux_stabilize_threads): New.
13750 (linux_wait_1): Check if threads need moving out of jump pads, and
13752 (stuck_in_jump_pad_callback): New.
13753 (move_out_of_jump_pad_callback): New.
13754 (lwp_running): New.
13755 (linux_resume_one_lwp): Handle moving out of jump pads.
13756 (linux_set_resume_request): Dequeue deferred signals.
13757 (need_step_over_p): Also step over fast tracepoint jumps.
13758 (start_step_over): Also uninsert fast tracepoint jumps.
13759 (finish_step_over): Also reinsert fast tracepoint jumps.
13760 (linux_install_fast_tracepoint_jump): New.
13761 (linux_target_ops): Install linux_stabilize_threads and
13762 linux_install_fast_tracepoint_jump_pad.
13763 * linux-low.h (linux_target_ops) <get_thread_area,
13764 install_fast_tracepoint_jump_pad>: New fields.
13765 (struct lwp_info) <collecting_fast_tracepoint,
13766 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13767 (linux_get_thread_area): Declare.
13768 * linux-x86-low.c (jump_insn): New.
13769 (x86_get_thread_area): New.
13770 (append_insns): New.
13771 (push_opcode): New.
13772 (amd64_install_fast_tracepoint_jump_pad): New.
13773 (i386_install_fast_tracepoint_jump_pad): New.
13774 (x86_install_fast_tracepoint_jump_pad): New.
13775 (the_low_target): Install x86_get_thread_area and
13776 x86_install_fast_tracepoint_jump_pad.
13777 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13778 (struct fast_tracepoint_jump): New.
13779 (fast_tracepoint_jump_insn): New.
13780 (fast_tracepoint_jump_shadow): New.
13781 (find_fast_tracepoint_jump_at): New.
13782 (fast_tracepoint_jump_here): New.
13783 (delete_fast_tracepoint_jump): New.
13784 (set_fast_tracepoint_jump): New.
13785 (uninsert_fast_tracepoint_jumps_at): New.
13786 (reinsert_fast_tracepoint_jumps_at): New.
13787 (set_breakpoint_at): Use write_inferior_memory.
13788 (uninsert_raw_breakpoint): Use write_inferior_memory.
13789 (check_mem_read): Mask out fast tracepoint jumps.
13790 (check_mem_write): Mask out fast tracepoint jumps.
13791 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13792 (set_fast_tracepoint_jump): Declare.
13793 (delete_fast_tracepoint_jump)
13794 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13795 (reinsert_fast_tracepoint_jumps_at): Declare.
13796 * regcache.c: Don't compile many functions when building the
13797 in-process agent library.
13798 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13799 the register buffer in the heap.
13800 (free_register_cache): If the register buffer isn't owned by the
13801 regcache, don't free it.
13802 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13803 pre-existing register caches.
13804 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13806 (convert_ascii_to_int): : Constify `from' parameter type.
13807 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13808 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13809 the needed buffer in-place.
13810 (relocate_instruction): New.
13811 * server.c (handle_query) <qSymbols>: If the target supports
13812 tracepoints, give it a chance of looking up symbols. Report
13813 support for fast tracepoints.
13814 (handle_status): Stabilize threads.
13815 (process_serial_event): Adjust.
13816 * server.h (struct fast_tracepoint_jump): Forward declare.
13817 (struct process_info) <fast_tracepoint_jumps>: New field.
13818 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13819 (decode_X_packet, decode_M_packet): Adjust.
13820 (relocate_instruction): Declare.
13821 (in_process_agent_loaded): Declare.
13822 (tracepoint_look_up_symbols): Declare.
13823 (struct fast_tpoint_collect_status): Declare.
13824 (fast_tracepoint_collecting): Declare.
13825 (force_unlock_trace_buffer): Declare.
13826 (handle_tracepoint_bkpts): Declare.
13827 (initialize_low_tracepoint)
13828 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13829 * target.h (struct target_ops) <stabilize_threads,
13830 install_fast_tracepoint_jump_pad>: New fields.
13831 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13832 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13833 [HAVE_STDINT_H]: Include stdint.h.
13834 (trace_debug_1): Rename to ...
13835 (trace_vdebug): ... this.
13836 (trace_debug): Rename to ...
13837 (trace_debug_1): ... this. Add `level' parameter.
13838 (trace_debug): New.
13839 (ATTR_USED, ATTR_NOINLINE): New.
13840 (IP_AGENT_EXPORT): New.
13841 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13842 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13843 (about_to_request_buffer_space, trace_buffer_is_full)
13844 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13845 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13846 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13847 (traceframe_write_count, traceframes_created)
13848 (trace_state_variables)
13849 New renaming defines.
13850 (struct ipa_sym_addresses): New.
13851 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13852 (symbol_list): New.
13853 (ipa_sym_addrs): New.
13854 (all_tracepoint_symbols_looked_up): New.
13855 (in_process_agent_loaded): New.
13856 (write_e_ipa_not_loaded): New.
13857 (maybe_write_ipa_not_loaded): New.
13858 (tracepoint_look_up_symbols): New.
13859 (debug_threads) [IN_PROCESS_AGENT]: New.
13860 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13861 (UNKNOWN_SIDE_EFFECTS): New.
13862 (stop_tracing): New.
13863 (flush_trace_buffer): New.
13864 (stop_tracing_bkpt): New.
13865 (flush_trace_buffer_bkpt): New.
13866 (read_inferior_integer): New.
13867 (read_inferior_uinteger): New.
13868 (read_inferior_data_pointer): New.
13869 (write_inferior_data_pointer): New.
13870 (write_inferior_integer): New.
13871 (write_inferior_uinteger): New.
13872 (struct collect_static_trace_data_action): Delete.
13873 (enum tracepoint_type): New.
13874 (struct tracepoint) <type>: New field `type'.
13875 <actions_str, step_actions, step_actions_str>: Only include in
13877 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13878 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13879 (tracepoints): Use IP_AGENT_EXPORT.
13880 (last_tracepoint): Don't include in the IPA.
13881 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13882 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13883 (alloced_trace_state_variables): New.
13884 (trace_state_variables): Use IP_AGENT_EXPORT.
13885 (traceframe_t): Delete unused variable.
13886 (circular_trace_buffer): Don't include in the IPA.
13887 (trace_buffer_start): Delete.
13888 (struct trace_buffer_control): New.
13889 (trace_buffer_free): Delete.
13890 (struct ipa_trace_buffer_control): New.
13891 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13892 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13894 (trace_buffer_ctrl): New.
13895 (TRACE_BUFFER_CTRL_CURR): New.
13896 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13897 Reimplement as macros.
13898 (trace_buffer_wrap): Delete.
13899 (traceframe_write_count, traceframe_read_count)
13900 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13901 (struct tracepoint_hit_ctx) <type>: New field.
13902 (struct fast_tracepoint_ctx): New.
13903 (memory_barrier): New.
13905 (record_tracepoint_error): Update atomically in the IPA.
13906 (clear_inferior_trace_buffer): New.
13907 (about_to_request_buffer_space): New.
13908 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13909 updating the same buffer.
13910 (add_tracepoint): Default the tracepoint's type to trap
13911 tracepoint, and orig_size to -1.
13912 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13913 internal variables.
13914 (create_trace_state_variable): New parameter `gdb'. Handle it.
13915 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13916 (cmd_qtdp): Handle fast tracepoints.
13917 (cmd_qtdv): Adjust.
13918 (max_jump_pad_size): New.
13919 (gdb_jump_pad_head): New.
13920 (get_jump_space_head): New.
13921 (claim_jump_space): New.
13922 (sort_tracepoints): New.
13923 (MAX_JUMP_SIZE): New.
13924 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13926 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13927 support. Upload fast traceframes, and delete internal IPA
13929 (stop_tracing_handler): New.
13930 (flush_trace_buffer_handler): New.
13931 (cmd_qtstop): Upload fast tracepoints.
13932 (response_tracepoint): Handle fast tracepoints.
13933 (tracepoint_finished_step): Upload fast traceframes. Set the
13934 tracepoint hit context's tracepoint type.
13935 (handle_tracepoint_bkpts): New.
13936 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13937 type. Add comment about fast tracepoints.
13938 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13939 non-existing action_str field.
13940 (get_context_regcache): Handle fast tracepoints.
13941 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13943 (fast_tracepoint_from_jump_pad_address): New.
13944 (fast_tracepoint_from_ipa_tpoint_address): New.
13945 (collecting_t): New.
13946 (force_unlock_trace_buffer): New.
13947 (fast_tracepoint_collecting): New.
13949 (gdb_collect): New.
13950 (write_inferior_data_ptr): New.
13951 (target_tp_heap): New.
13952 (target_malloc): New.
13953 (download_agent_expr): New.
13955 (download_tracepoints): New.
13956 (download_trace_state_variables): New.
13957 (upload_fast_traceframes): New.
13958 (IPA_FIRST_TRACEFRAME): New.
13959 (IPA_NEXT_TRACEFRAME_1): New.
13960 (IPA_NEXT_TRACEFRAME): New.
13961 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13962 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13963 (gdb_jump_pad_buffer_end): New.
13964 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13965 (initialize_tracepoint): Adjust.
13966 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13967 buffer. Initialize the low module.
13968 * utils.c (PREFIX, TOOLNAME): New.
13969 (malloc_failure): Use PREFIX.
13970 (error): In the IPA, an error causes an exit.
13971 (fatal, warning): Use PREFIX.
13972 (internal_error): Use TOOLNAME.
13973 (NUMCELLS): Increase to 10.
13974 * configure, config.in: Regenerate.
13976 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13978 * server.c (handle_query) <qSupported>: Do two passes over the
13979 qSupported string to avoid nesting strtok.
13981 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13983 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13985 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13986 -Wl,--dynamic-list.
13987 * configure: Regenerate.
13988 * proc-service.list: New.
13990 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13992 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13995 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13997 * gdbreplay.c (remote_open): Check error return from socket() call by
13998 its equality to -1 not by it being negative.
13999 * remote-utils.c (remote_open): Likewise.
14001 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14003 * config.h: Regenerate.
14005 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14007 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14008 doesn't provide PTRACE_GET_THREAD_AREA.
14010 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14012 * linux-m68k-low.c: Include <asm/ptrace.h>
14013 (ps_get_thread_area): Implement.
14015 2010-05-03 Doug Evans <dje@google.com>
14017 * event-loop.c (struct callback_event): New struct.
14018 (callback_list): New global.
14019 (append_callback_event, delete_callback_event): New functions.
14020 (process_callback): New function.
14021 (start_event_loop): Call it.
14022 * remote-utils.c (NOT_SCHEDULED): Define.
14023 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14024 moved out of readchar.
14025 (readchar): Rewrite. Call reschedule before returning.
14026 (reset_readchar): New function.
14027 (remote_close): Call it.
14028 (process_remaining, reschedule): New functions.
14029 * server.h (callback_handler_func): New typedef.
14030 (append_callback_event, delete_callback_event): Declare.
14032 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14034 * proc-service.c (ps_pglobal_lookup): Use
14035 thread_db_look_up_one_symbol.
14036 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14037 parameter. Use it instead of all_symbols_looked_up.
14038 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14040 (all_symbols_looked_up): Don't declare.
14041 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14042 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14044 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14045 Set all_symbols_looked_up here.
14046 (thread_db_look_up_one_symbol): New.
14047 (thread_db_get_tls_address): Adjust.
14048 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14049 thread_db object on the heap, and tentatively set it in the
14051 (thread_db_init): Don't set all_symbols_looked_up here.
14052 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14054 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14056 * linux-low.c (linux_kill, linux_detach): Adjust.
14057 (status_pending_p_callback): Remove redundant statement. Check
14058 for !TARGET_WAITIKIND_IGNORE, instead of
14059 TARGET_WAITKIND_STOPPED.
14060 (handle_tracepoints): Make sure LWP is locked. Adjust.
14061 (linux_wait_for_event_1): Adjust.
14062 (linux_cancel_breakpoints): New.
14063 (unsuspend_one_lwp): New.
14064 (unsuspend_all_lwps): New.
14065 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14066 (send_sigstop_callback): Change return type to int, add new
14067 `except' parameter and handle it.
14068 (suspend_and_send_sigstop_callback): New.
14069 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14070 pass them down. If SUSPEND, also increment the lwp's suspend
14072 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14073 (need_step_over_p): Don't consider suspended LWPs.
14074 (start_step_over): Adjust.
14075 (proceed_one_lwp): Change return type to int, add new `except'
14076 parameter and handle it.
14077 (unsuspend_and_proceed_one_lwp): New.
14078 (proceed_all_lwps): Use find_inferior instead of
14080 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14081 also decrement the suspend count of LWPs. Pass `except' down,
14082 instead of hacking its suspend count.
14083 (linux_pause_all): Add `freeze' parameter. Adjust.
14084 (linux_unpause_all): New.
14085 (linux_target_ops): Install linux_unpause_all.
14086 * server.c (handle_status): Adjust.
14087 * target.h (struct target_ops): New fields `unpause_all' and
14088 `cancel_breakpoints'. Add new parameter to `pause_all'.
14089 (pause_all): Add new `freeze' parameter.
14090 (unpause_all): New.
14091 (cancel_breakpoints): New.
14092 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14093 cancel breakpoints.
14094 (cmd_qtstart): Pause threads.
14095 (stop_tracing): Pause threads, and cancel breakpoints.
14096 * win32-low.c (win32_target_ops): Adjust.
14098 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14100 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14101 the inferior right away from here...
14102 (linux_wait_1): ... to here, and adjust to check the thread's
14103 last_resume_kind instead of the lwp's step or stop_expected flags.
14105 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14107 * README: Use consistent `GDB' and `GDBserver' spellings.
14109 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14111 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14112 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14113 (linux_detach_one_lwp): Assume the lwp is stopped.
14114 (any_thread_of): Delete.
14115 (linux_detach): Stop all lwps here. Don't blindly delete all
14117 (delete_lwp_callback): New.
14118 (linux_mourn): Delete all lwps of the process that is gone.
14119 (linux_wait_1): Don't delete the last lwp of the process here.
14120 * mem-break.h (mark_breakpoints_out): Declare.
14121 * mem-break.c (mark_breakpoints_out): New.
14122 (free_all_breakpoints): Use it.
14123 * server.c (handle_target_event): If the process is gone, mark
14125 * thread-db.c (struct thread_db) <create_bp>: New field.
14126 (thread_db_enable_reporting): Fix prototype. Store a thread event
14127 breakpoint reference in the thread_db struct.
14128 (thread_db_load_search): Clear the thread_db object.
14129 (try_thread_db_load_1): Ditto.
14130 (switch_to_process): New.
14131 (disable_thread_event_reporting): Use it.
14132 (remove_thread_event_breakpoints): New.
14133 (thread_db_detach, thread_db_mourn): Use it.
14135 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14137 * linux-low.c (linux_enable_event_reporting): New.
14138 (linux_wait_for_event_1, handle_extended_wait): Use it.
14140 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14142 * linux-low.c (linux_kill_one_lwp, linux_kill)
14143 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14144 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14145 SIGSTOP even if the LWP is stopped.
14146 (send_sigstop_callback): New.
14147 (stop_all_lwps): Use send_sigstop_callback instead.
14148 (linux_resume_one_thread): Adjust.
14149 (proceed_one_lwp): Still proceed an LWP that the client has
14150 requested to stop, if we haven't reported it as stopped yet. Make
14151 sure that LWPs the client want stopped, have a pending SIGSTOP.
14153 2010-04-26 Doug Evans <dje@google.com>
14155 * server.c (handle_general_set): Make static.
14157 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14158 Print received char after testing for error/eof instead of before.
14159 (input_interrupt): Tweak comment.
14161 2010-04-23 Doug Evans <dje@google.com>
14163 * server.c (start_inferior): Print inferior argv if --debug.
14165 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14167 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14168 * nto-x86-low.c: Include server.h
14170 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14172 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14173 be consistent with other sources of this directory.
14174 (init_registers_amd64): Correct name of source file of this function
14177 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14179 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14180 64-bit executables.
14182 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14184 * win32-i386-low.c: Add 64-bit support.
14185 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14186 (init_registers_amd64): Declare.
14187 (mappings): Add 64-bit version of array.
14188 (init_windows_x86): New function.
14189 (the_low_target): Change init_arch field to init_windows_x86.
14191 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14193 * win32-low.c: Adapt to support also 64-bit architecture.
14194 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14195 (get_image_name): Use SIZE_T type for local variable `done'.
14196 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14197 (toolhelp_get_dll_name): Idem.
14198 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14199 Use uintptr_t typecast to avoid warning.
14200 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14201 (handle_exception): Use phex_nz to avoid warning.
14202 (win32_wait): Remove unused local variable `process'.
14204 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14206 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14209 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14211 * configure.ac: Use `ws2_32' library for srv_mingw.
14212 * configure: Regenerate.
14213 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14214 * remote-utils.c: Likewise.
14216 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14218 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14219 if __x86_64__ is defined.
14221 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14223 * configure: Regenerate.
14225 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14227 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14228 * target.h (target_ops): New get_tib_address field.
14229 * win32-low.h (win32_thread_info): Add thread_local_base field.
14230 * win32-low.c (child_add_thread): Add tlb argument.
14231 Set thread_local_base field to TLB.
14232 (get_child_debug_event): Adapt to child_add_thread change.
14233 (win32_get_tib_address): New function.
14234 (win32_target_ops): Set get_tib_address field to
14235 win32_get_tib_address.
14236 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14238 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14240 * linux-low.c (linux_mourn): Also remove the process.
14241 * server.c (handle_target_event): Don't remove the process here.
14242 * nto-low.c (nto_mourn): New.
14243 (nto_target_ops): Install it.
14244 * spu-low.c (spu_mourn): New.
14245 (spu_target_ops): Install it.
14246 * win32-low.c (win32_mourn): New.
14247 (win32_target_ops): Install it.
14249 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14251 * server.h (buffer_xml_printf): Remove redundant `;'.
14253 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14255 * regcache.c (set_register_cache): Invalidate regcaches before
14256 changing the register cache layout.
14257 (regcache_invalidate_one): Allow a NULL regcache.
14258 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14259 regcaches before changing the register cache layout or the target
14262 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14264 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14265 variable warning on Linux/x86-64.
14267 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14269 GDBserver disconnected tracing support.
14271 * linux-low.c (linux_remove_process): Delete.
14272 (add_lwp): Don't set last_resume_kind here.
14273 (linux_kill): Use `mourn'.
14274 (linux_detach): Use `thread_db_detach', and `mourn'.
14275 (linux_mourn): New.
14276 (linux_attach_lwp_1): Adjust comment.
14277 (linux_attach): last_resume_kind moved the thread_info; adjust.
14278 (status_pending_p_callback): Adjust.
14279 (linux_wait_for_event_1): Adjust.
14280 (count_events_callback, select_singlestep_lwp_callback)
14281 (select_event_lwp_callback, cancel_breakpoints_callback)
14282 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14283 (proceed_one_lwp): Adjust.
14284 (linux_async): Add debug output.
14285 (linux_thread_stopped): New.
14286 (linux_pause_all): New.
14287 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14289 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14290 (thread_db_free): Delete declaration.
14291 (thread_db_detach, thread_db_mourn): Declare.
14292 * thread-db.c (thread_db_init): Use thread_db_mourn.
14293 (thread_db_free): Delete, split in two.
14294 (disable_thread_event_reporting): New.
14295 (thread_db_detach): New.
14296 (thread_db_mourn): New.
14298 * server.h (struct thread_info) <last_resume_kind>: New field.
14299 <attached>: Add comment.
14300 <gdb_detached>: New field.
14301 (handler_func): Change return type to int.
14302 (handle_serial_event, handle_target_event): Ditto.
14303 (gdb_connected): Declare.
14305 (disconnected_tracing): Declare.
14306 (stop_tracing): Declare.
14308 * server.c (handle_query) <qSupported>: Report support for
14309 disconnected tracing.
14310 (queue_stop_reply_callback): Account for running threads.
14311 (gdb_wants_thread_stopped): New.
14312 (gdb_wants_all_threads_stopped): New.
14313 (gdb_reattached_process): New.
14314 (handle_status): Clear the `gdb_detached' flag of all processes.
14315 In all-stop, stop all threads.
14316 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14317 (process_serial_event): If the remote connection breaks, or if an
14318 exit was forced with "monitor exit", force an event loop exit.
14319 Handle disconnected tracing on detach.
14320 (handle_serial_event): Adjust.
14321 (handle_target_event): If GDB isn't connected, forward events back
14322 to the inferior, unless the last process exited, in which case,
14323 exit gdbserver. Adjust interface.
14325 * remote-utils.c (remote_open): Don't block in accept. Instead
14326 register an event loop source on the listen socket file
14327 descriptor. Refactor bits into ...
14328 (listen_desc): ... this new global.
14329 (gdb_connected): ... this new function.
14330 (enable_async_notification): ... this new function.
14331 (handle_accept_event): ... this new function.
14332 (remote_close): Clear remote_desc.
14334 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14336 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14338 (mourn_inferior): Define.
14339 (target_process_qsupported): Avoid the dangling else problem.
14340 (thread_stopped): Define.
14341 (pause_all): Define.
14342 (target_waitstatus_to_string): Declare.
14343 * target.c (target_waitstatus_to_string): New.
14345 * tracepoint.c (tracing): Make extern.
14346 (disconnected_tracing): New.
14347 (stop_tracing): Make extern. Handle tracing stops due to GDB
14349 (cmd_qtdisconnected): New.
14350 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14351 (handle_tracepoint_general_set): Handle QTDisconnected.
14353 * event-loop.c (event_handler_func): Change return type to int.
14354 (process_event): Bail out if the event handler wants the event
14356 (handle_file_event): Ditto.
14357 (start_event_loop): Bail out if the event handler wants the event
14360 * nto-low.c (nto_target_ops): Adjust.
14361 * spu-low.c (spu_wait): Don't remove the process here.
14362 (spu_target_ops): Adjust.
14363 * win32-low.c (win32_wait): Don't remove the process here.
14364 (win32_target_ops): Adjust.
14366 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14368 * regcache.c (realloc_register_cache): Invalidate inferior's
14369 regcache before recreating it.
14371 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14373 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14375 2010-04-09 Stan Shebs <stan@codesourcery.com>
14376 Pedro Alves <pedro@codesourcery.com>
14378 * server.h (LONGEST): New.
14379 (struct thread_info) <while_stepping>: New field.
14380 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14382 (initialize_tracepoint, handle_tracepoint_general_set)
14383 (handle_tracepoint_query, tracepoint_finished_step)
14384 (tracepoint_was_hit, release_while_stepping_state_list):
14385 (current_traceframe): Declare.
14386 * server.c (handle_general_set): Handle tracepoint packets.
14387 (read_memory): New.
14388 (write_memory): New.
14389 (handle_search_memory_1): Use read_memory.
14390 (handle_query): Report support for conditional tracepoints, trace
14391 state variables, and tracepoint sources. Handle tracepoint
14393 (main): Initialize the tracepoints module.
14394 (process_serial_event): Handle traceframe reads/writes.
14396 * linux-low.c (handle_tracepoints): New.
14397 (linux_wait_1): Call it.
14398 (linux_resume_one_lwp): Handle while-stepping.
14399 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14400 (linux_target_ops): Install them.
14401 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14403 * linux-x86-low.c (x86_supports_tracepoints): New.
14404 (the_low_target). Install it.
14406 * mem-break.h (delete_breakpoint): Declare.
14407 * mem-break.c (delete_breakpoint): Make external.
14409 * target.h (struct target_ops): Add `supports_tracepoints',
14410 `read_pc', and `write_pc' fields.
14411 (target_supports_tracepoints): Define.
14412 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14415 * regcache.h (struct regcache) <registers_owned>: New field.
14416 (init_register_cache, regcache_cpy): Declare.
14417 (regcache_read_pc, regcache_write_pc): Declare.
14418 (register_cache_size): Declare.
14419 (supply_regblock): Declare.
14420 * regcache.c (init_register_cache): New.
14421 (new_register_cache): Use it.
14422 (regcache_cpy): New.
14423 (register_cache_size): New.
14424 (supply_regblock): New.
14425 (regcache_read_pc, regcache_write_pc): New.
14427 * tracepoint.c: New.
14429 * Makefile.in (OBS): Add tracepoint.o.
14430 (tracepoint.o): New rule.
14432 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14434 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14436 (i386-mmx.c): Likewise.
14437 (i386-mmx-linux.o): Likewise.
14438 (i386-mmx-linux.c): Likewise.
14440 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14441 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14442 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14443 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14445 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14446 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14447 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14449 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14451 * Makefile.in (clean): Updated.
14453 (i386-avx.c): Likewise.
14454 (i386-avx-linux.o): Likewise.
14455 (i386-avx-linux.c): Likewise.
14456 (amd64-avx.o): Likewise.
14457 (amd64-avx.c): Likewise.
14458 (amd64-avx-linux.o): Likewise.
14459 (amd64-avx-linux.c): Likewise.
14461 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14462 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14463 (srv_amd64_regobj): Add amd64-avx.o.
14464 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14465 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14466 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14467 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14468 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14469 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14470 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14472 * i387-fp.c: Include "i386-xstate.h".
14474 (i387_cache_to_xsave): Likewise.
14475 (i387_xsave_to_cache): Likewise.
14476 (x86_xcr0): Likewise.
14478 * i387-fp.h (i387_cache_to_xsave): Likewise.
14479 (i387_xsave_to_cache): Likewise.
14480 (x86_xcr0): Likewise.
14482 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14483 * linux-crisv32-low.c (target_regsets): Likewise.
14484 * linux-m68k-low.c (target_regsets): Likewise.
14485 * linux-mips-low.c (target_regsets): Likewise.
14486 * linux-ppc-low.c (target_regsets): Likewise.
14487 * linux-s390-low.c (target_regsets): Likewise.
14488 * linux-sh-low.c (target_regsets): Likewise.
14489 * linux-sparc-low.c (target_regsets): Likewise.
14490 * linux-xtensa-low.c (target_regsets): Likewise.
14492 * linux-low.c: Include <sys/uio.h>.
14493 (regsets_fetch_inferior_registers): Support nt_type.
14494 (regsets_store_inferior_registers): Likewise.
14495 (linux_process_qsupported): New.
14496 (linux_target_ops): Add linux_process_qsupported.
14498 * linux-low.h (regset_info): Add nt_type.
14499 (linux_target_ops): Add process_qsupported.
14501 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14503 (init_registers_i386_avx_linux): New.
14504 (init_registers_amd64_avx_linux): Likewise.
14505 (xmltarget_i386_linux_no_xml): Likewise.
14506 (xmltarget_amd64_linux_no_xml): Likewise.
14507 (PTRACE_GETREGSET): Likewise.
14508 (PTRACE_SETREGSET): Likewise.
14509 (x86_fill_xstateregset): Likewise.
14510 (x86_store_xstateregset): Likewise.
14511 (use_xml): Likewise.
14512 (x86_linux_update_xmltarget): Likewise.
14513 (x86_linux_process_qsupported): Likewise.
14514 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14515 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14516 init_registers_i386_linux here. Call
14517 x86_linux_update_xmltarget.
14518 (the_low_target): Add x86_linux_process_qsupported.
14520 * server.c (handle_query): Call target_process_qsupported.
14522 * target.h (target_ops): Add process_qsupported.
14523 (target_process_qsupported): New.
14525 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14527 * inferiors.c (add_thread): Set last_status kind to
14528 TARGET_WAITKIND_IGNORE.
14529 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14530 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14531 (linux_wait_1): Move `thread' local definition to block that uses
14532 it. Don't NULL initialize `event_child'.
14533 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14534 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14535 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14537 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14539 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14540 an extended waitstatus, or by a watchpoint.
14541 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14542 thread was stepping or has been stopped by a watchpoint.
14544 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14546 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14547 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14548 of another, then delete the previous, and validate all
14550 (validate_inserted_breakpoint): New.
14551 (delete_disabled_breakpoints): New.
14552 (validate_breakpoints): New.
14553 (check_mem_read): Validate breakpoints before trusting their
14554 shadow. Delete disabled breakpoints.
14555 (check_mem_write): Validate breakpoints before trusting they
14556 should be inserted. Delete disabled breakpoints.
14557 * mem-break.h (validate_breakpoints):
14558 * server.c (handle_query): Validate breakpoints when we see a
14561 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14563 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14564 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14565 if we could tell there's a GDB breakpoint at stop_pc.
14566 (need_step_over_p): Don't do a step over if we find a GDB
14567 breakpoint at the resume PC.
14569 * mem-break.c (struct raw_breakpoint): New.
14570 (enum bkpt_type): New type `gdb_breakpoint'.
14571 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14572 fields. New field `raw'.
14573 (find_raw_breakpoint_at): New.
14574 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14575 breakpoint instead.
14576 (set_breakpoint_at): Adjust.
14577 (delete_raw_breakpoint): New.
14578 (release_breakpoint): New.
14579 (delete_breakpoint): Rename to...
14580 (delete_breakpoint_1): ... this. Add proc parameter. Use
14581 release_breakpoint. Return ENOENT.
14582 (delete_breakpoint): Reimplement.
14583 (find_breakpoint_at): Delete.
14584 (find_gdb_breakpoint_at): New.
14585 (delete_breakpoint_at): Delete.
14586 (set_gdb_breakpoint_at): New.
14587 (delete_gdb_breakpoint_at): New.
14588 (gdb_breakpoint_here): New.
14589 (set_reinsert_breakpoint): Use release_breakpoint.
14590 (uninsert_breakpoint): Rename to ...
14591 (uninsert_raw_breakpoint): ... this.
14592 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14593 (reinsert_raw_breakpoint): Change parameter type to
14595 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14597 (check_breakpoints): Adjust. Use release_breakpoint.
14598 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14599 (breakpoint_inserted_here): Ditto.
14600 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14601 Don't trust the breakpoint's shadow if it is not inserted.
14602 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14603 (delete_all_breakpoints): Adjust.
14604 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14605 use delete_breakpoint_1.
14607 * mem-break.h (breakpoints_supported): Delete declaration.
14608 (set_gdb_breakpoint_at): Declare.
14609 (gdb_breakpoint_here): Declare.
14610 (delete_breakpoint_at): Delete.
14611 (delete_gdb_breakpoint_at): Declare.
14613 * server.h (struct raw_breakpoint): Forward declare.
14614 (struct process_info): New field `raw_breakpoints'.
14616 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14619 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14621 * linux-low.c (status_pending_p_callback): Fix comment.
14622 (linux_wait_for_event_1): Move most of the internal breakpoint
14623 handling from here...
14624 (linux_wait_1): ... to here.
14625 (count_events_callback): New.
14626 (select_singlestep_lwp_callback): New.
14627 (select_event_lwp_callback): New.
14628 (cancel_breakpoints_callback): New.
14629 (select_event_lwp): New.
14630 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14631 priority to all LWPs that have had events that should be reported
14632 to the client. Cancel breakpoints when about to reporting the
14633 event to the client, not while stopping lwps. No longer cancel
14634 finished single-steps here.
14635 (cancel_finished_single_step): Delete.
14636 (cancel_finished_single_steps): Delete.
14638 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14640 * mem-break.c (enum bkpt_type): New.
14641 (struct breakpoint): New field `type'.
14642 (set_breakpoint_at): Change return type to struct breakpoint
14643 pointer. Set type to `other_breakpoint' by default.
14644 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14645 in the breakpoint list.
14646 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14647 (reinsert_breakpoint): Rename to ...
14648 (reinsert_raw_breakpoint): ... this.
14649 (reinsert_breakpoints_at): Adjust.
14650 * mem-break.h (struct breakpoint): Declare.
14651 (set_breakpoint_at): Change return type to struct breakpoint
14654 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14656 * server.c (handle_query): Assign, not compare.
14658 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14660 Teach linux gdbserver to step-over-breakpoints.
14662 * linux-low.c (can_hardware_single_step): New.
14663 (supports_breakpoints): New.
14664 (handle_extended_wait): If stopping threads, read the stop pc of
14665 the new cloned LWP.
14667 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14668 low target doesn't support retrieving the PC.
14669 (add_lwp): Set last_resume_kind to resume_continue.
14670 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14671 (linux_attach): Don't clear stop_expected. Set the lwp's
14672 last_resume_kind to resume_stop.
14673 (linux_detach_one_lwp): Don't check for removed breakpoints.
14674 (check_removed_breakpoint): Delete.
14675 (status_pending_p): Rename to ...
14676 (status_pending_p_callback): ... this. Don't check for removed
14677 breakpoints. Don't consider threads that are stopped from GDB's
14679 (linux_wait_for_lwp): Always read the stop_pc here.
14680 (cancel_breakpoint): New.
14681 (step_over_bkpt): New global.
14682 (linux_wait_for_event_1): Implement stepping over breakpoints.
14683 (gdb_wants_lwp_stopped): New.
14684 (gdb_wants_all_stopped): New.
14685 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14686 single-step traps here. Store the thread's last reported target
14688 (send_sigstop): Don't clear stop_expected. Always set it,
14690 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14691 (cancel_finished_single_step): New.
14692 (cancel_finished_single_steps): New.
14693 (wait_for_sigstop): Don't cancel finished single-step traps here.
14694 (linux_resume_one_lwp): Don't check for removed breakpoints.
14695 Don't set `step' on non-hardware step archs.
14696 (linux_set_resume_request): Ignore resume_stop requests if already
14697 stopping or stopped. Set the lwp's last_resume_kind.
14698 (resume_status_pending_p): Don't check for removed breakpoints.
14699 (need_step_over_p): New.
14700 (start_step_over): New.
14701 (finish_step_over): New.
14702 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14703 requests. Clear the thread's last reported target waitstatus.
14704 Don't use the `suspended' flag. Don't consider pending breakpoints.
14705 (linux_resume): Start a step-over if necessary.
14706 (proceed_one_lwp): New.
14707 (proceed_all_lwps): New.
14708 (unstop_all_lwps): New.
14709 * linux-low.h (struct lwp_info): Rewrite comment for the
14710 `suspended' flag. Add the `stop_pc' field. Delete the
14711 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14712 Add `'last_resume_kind' and `need_step_over' fields.
14713 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14714 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14715 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14716 (set_raw_breakpoint_at): New.
14717 (set_breakpoint_at): Rewrite to use it.
14718 (reinsert_breakpoint_handler): Delete.
14719 (set_reinsert_breakpoint): New.
14720 (reinsert_breakpoint_by_bp): Delete.
14721 (delete_reinsert_breakpoints): New.
14722 (uninsert_breakpoint): Rewrite.
14723 (uninsert_breakpoints_at): New.
14724 (reinsert_breakpoint): Rewrite.
14725 (reinsert_breakpoints_at): New.
14726 (check_breakpoints): Rewrite.
14727 (breakpoint_here): New.
14728 (breakpoint_inserted_here): New.
14729 (check_mem_read): Adjust.
14730 * mem-break.h (breakpoints_supported, breakpoint_here)
14731 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14732 (reinsert_breakpoint_by_bp): Delete declaration.
14733 (delete_reinsert_breakpoints): Declare.
14734 (reinsert_breakpoint): Delete declaration.
14735 (reinsert_breakpoints_at): Declare.
14736 (uninsert_breakpoint): Delete declaration.
14737 (uninsert_breakpoints_at): Declare.
14738 (check_breakpoints): Adjust prototype.
14739 * server.h: Adjust include order.
14740 (struct thread_info): Declare here. Add a `last_status' field.
14742 2010-03-23 Michael Snyder <msnyder@vmware.com>
14744 * server.c (crc32): New function.
14745 (handle_query): Add handling for 'qCRC:' request.
14747 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14749 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14750 lwp had been stopped by a watchpoint.
14752 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14754 * server.h (internal_error): Declare.
14755 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14756 * utils.c (internal_error): New function.
14758 2010-03-15 Andreas Schwab <schwab@redhat.com>
14760 * configure.srv: Fix typo setting srv_regobj.
14762 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14764 * linux-low.c (fetch_register): Avoid passing a non string literal
14766 (usr_store_inferior_registers): Ditto.
14768 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14770 * linux-low.c (linux_write_memory): Bail out early if peeking
14773 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14775 * linux-low.h (struct lwp_info): New fields
14776 `stopped_by_watchpoint' and `stopped_data_address'.
14777 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14778 here, and cache them in the lwp object.
14779 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14781 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14783 (linux_stopped_by_watchpoint): Rewrite.
14784 (linux_stopped_data_address): Rewrite.
14786 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14788 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14789 switching the current inferior, not before.
14791 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14793 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14794 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14795 i386-linux.c and amd64-linux.c.
14796 (reg-i386.o): Removed.
14797 (reg-i386.c): Likewise.
14798 (reg-i386-linux.o): Likewise.
14799 (reg-i386-linux.c): Likewise.
14800 (reg-x86-64.o): Likewise.
14801 (reg-x86-64.c): Likewise.
14802 (reg-x86-64-linux.o): Likewise.
14803 (reg-x86-64-linux.c): Likewise.
14805 (i386.c): Likewise.
14806 (i386-linux.o): Likewise.
14807 (i386-linux.c): Likewise.
14808 (amd64.o): Likewise.
14809 (amd64.c): Likewise.
14810 (amd64-linux.o): Likewise.
14811 (amd64-linux.c): Likewise.
14813 * configure.srv (srv_i386_regobj): New.
14814 (srv_i386_linux_regobj): Likewise.
14815 (srv_amd64_regobj): Likewise.
14816 (srv_amd64_linux_regobj): Likewise.
14817 (srv_i386_32bit_xmlfiles): Likewise.
14818 (srv_i386_64bit_xmlfiles): Likewise.
14819 (srv_i386_xmlfiles): Likewise.
14820 (srv_amd64_xmlfiles): Likewise.
14821 (srv_i386_linux_xmlfiles): Likewise.
14822 (srv_amd64_linux_xmlfiles): Likewise.
14823 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14824 srv_xmlfiles to $srv_i386_xmlfiles.
14825 (i[34567]86-*-mingw32ce*): Likewise.
14826 (i[34567]86-*-mingw*): Likewise.
14827 (i[34567]86-*-nto*): Likewise.
14828 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14829 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14830 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14831 (x86_64-*-linux*): Likewise.
14833 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14834 (init_registers_amd64_linux): New.
14835 (x86_arch_setup): Replace init_registers_x86_64_linux with
14836 init_registers_amd64_linux.
14838 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14840 * configure.ac: Check for libdl. If it is not available link against
14841 static libthread_db.
14842 * configure: Regenerate.
14844 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14848 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14849 handing a read watchpoint.
14850 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14852 2010-02-12 Doug Evans <dje@google.com>
14854 * linux-low.c (linux_supports_tracefork_flag): Document.
14855 (linux_look_up_symbols): Add comment.
14857 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14859 * regcache.c (supply_register): Clear regcache if buf is NULL.
14861 2010-02-02 Nicolas Roche <roche@sourceware.org>
14862 Joel Brobecker <brobecker@adacore.com>
14864 * inferiors.c (find_inferior): Add function documentation.
14865 (unloaded_dll): Handle the case where the unloaded dll has not
14866 been previously registered in the dll list.
14868 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14870 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14871 (thumb2_breakpoint): New.
14872 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14874 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14876 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14877 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14880 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14882 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14884 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14886 * linux-s390-low.c (s390_collect_ptrace_register)
14887 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14889 2010-01-21 Doug Evans <dje@google.com>
14891 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14892 (PTRACE_ARG4_TYPE): New macro.
14893 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14894 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14895 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14896 (usr_store_inferior_registers): Ditto.
14897 (linux_read_memory, linux_write_memory): Ditto.
14898 (linux_test_for_tracefork): Ditto.
14900 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14901 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14903 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14905 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14908 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14910 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14911 prototype to take a regcache. Adjust.
14913 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14915 * regcache.h (struct thread_info): Forward declare.
14916 (struct regcache): New.
14917 (new_register_cache): Adjust prototype.
14918 (get_thread_regcache): Declare.
14919 (free_register_cache): Adjust prototype.
14920 (registers_to_string, registers_from_string): Ditto.
14921 (supply_register, supply_register_by_name, collect_register)
14922 (collect_register_as_string, collect_register_by_name): Ditto.
14923 * regcache.c (struct inferior_regcache_data): Delete.
14924 (get_regcache): Rename to ...
14925 (get_thread_regcache): ... this. Adjust. Switch inferior before
14926 fetching registers.
14927 (regcache_invalidate_one): Adjust.
14928 (regcache_invalidate): Fix prototype.
14929 (new_register_cache): Return the new register cache.
14930 (free_register_cache): Change prototype.
14931 (realloc_register_cache): Adjust.
14932 (registers_to_string): Change prototype to take a regcache. Adjust.
14933 (registers_from_string): Ditto.
14934 (register_data): Ditto.
14935 (supply_register): Ditto.
14936 (supply_register_by_name): Ditto.
14937 (collect_register): Ditto.
14938 (collect_register_as_string): Ditto.
14939 (collect_register_by_name): Ditto.
14940 * server.c (process_serial_event): Adjust.
14941 * linux-low.h (regset_fill_func, regset_store_func): Change
14943 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14945 * linux-low.c (get_stop_pc): Adjust.
14946 (check_removed_breakpoint): Adjust.
14947 (linux_wait_for_event): Adjust.
14948 (linux_resume_one_lwp): Adjust.
14949 (fetch_register): Add regcache parameter. Adjust.
14950 (usr_store_inferior_registers): Ditto.
14951 (regsets_fetch_inferior_registers): Ditto.
14952 (regsets_store_inferior_registers): Ditto.
14953 (linux_fetch_registers, linux_store_registers): Ditto.
14954 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14956 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14958 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14959 prototype to take a regcache.
14960 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14961 * remote-utils.c (convert_ascii_to_int, outreg)
14962 (prepare_resume_reply): Change prototype to take a regcache.
14964 * target.h (struct target_ops) <fetch_registers, store_registers>:
14965 Change prototype to take a regcache.
14966 (fetch_inferior_registers, store_inferior_registers): Change
14967 prototype to take a regcache. Adjust.
14968 * proc-service.c (ps_lgetregs): Adjust.
14969 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14970 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14971 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14972 take a regcache. Adjust.
14973 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14974 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14975 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14976 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14977 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14978 (cris_cannot_fetch_register):
14979 (cris_breakpoint_at): Change prototype to take a regcache.
14981 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14982 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14983 to take a regcache. Adjust.
14984 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14986 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14987 take a regcache. Adjust.
14988 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14989 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14990 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14991 * linux-mips-low.c (mips_get_pc):
14992 (mips_set_pc): Change prototype to take a regcache. Adjust.
14993 (mips_reinsert_addr): Adjust.
14994 (mips_collect_register): Change prototype to take a regcache.
14996 (mips_supply_register):
14997 (mips_collect_register_32bit, mips_supply_register_32bit)
14998 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14999 (mips_store_fpregset): Ditto.
15000 * linux-ppc-low.c (ppc_supply_ptrace_register)
15001 (ppc_supply_ptrace_register): Ditto.
15002 (parse_spufs_run): Adjust.
15003 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15004 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15005 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15006 take a regcache. Adjust.
15007 * linux-s390-low.c (s390_collect_ptrace_register)
15008 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15009 (s390_set_pc): Change prototype to take a regcache. Adjust.
15010 (s390_arch_setup): Adjust.
15011 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15012 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15013 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15014 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15015 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15017 (sparc_breakpoint_at): Adjust.
15018 * linux-xtensa-low.c (xtensa_fill_gregset):
15019 (xtensa_store_gregset):
15020 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15021 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15022 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15023 prototype to take a regcache. Adjust.
15024 * win32-arm-low.c (arm_fetch_inferior_register)
15025 (arm_store_inferior_register): Change prototype to take a
15027 * win32-i386-low.c (i386_fetch_inferior_register)
15028 (i386_store_inferior_register): Change prototype to take a
15030 * win32-low.c (child_fetch_inferior_registers)
15031 (child_store_inferior_registers): Change prototype to take a
15033 (win32_wait): Adjust.
15034 (win32_fetch_inferior_registers): Change prototype to take a
15036 (win32_store_inferior_registers): Adjust.
15037 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15038 store_inferior_register>: Change prototype to take a regcache.
15040 2010-01-20 Doug Evans <dje@google.com>
15042 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15044 (linux_wait_for_event1, linux_init_signals): Ditto.
15045 (W_STOPCODE): Provide definition if missing.
15047 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15049 * linux-low.c (linux_core_of_thread): New.
15050 (compare_ints, show_process, list_threads): New.
15051 (linux_qxfer_osdata): Report threads and cores.
15052 (linux_target_op): Register linux_core_of_thread.
15053 * remote-utils.c (prepare_resume_reply): Report the core.
15054 (buffer_xml_printf): Support %d specifier.
15055 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15057 (handle_query): Handle qXfer:threads. Announce availability
15059 * target.h (struct target_ops): New field core_of_thread.
15061 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15063 * Makefile.in (clean): Remove new generated files.
15064 (reg-s390.o, reg-s390.c): Remove rules.
15065 (reg-s390x.o, reg-s390x.c): Likewise.
15066 (s390-linux32.o, s390-linux32.c): Add rules.
15067 (s390-linux64.o, s390-linux64.c): Likewise.
15068 (s390x-linux64.o, s390x-linux64.c): Likewise.
15069 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15070 * linux-s390-low.c: Include <elf.h>.
15071 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15072 (init_registers_s390): Remove prototype.
15073 (init_registers_s390x): Likewise.
15074 (init_registers_s390_linux32): Add prototype.
15075 (init_registers_s390_linux64): Likewise.
15076 (init_registers_s390x_linux64): Likewise.
15077 (s390_num_regs_3264): New define.
15078 (s390_regmap_3264): New global variable.
15079 (s390_cannot_fetch_register): Remove obsolete check.
15080 (s390_cannot_store_register): Likewise.
15081 (s390_collect_ptrace_register): Handle upper/lower register halves.
15082 (s390_supply_ptrace_register): Likewise.
15083 (s390_fill_gregset): Update to register number changes.
15084 (s390_get_hwcap): New routine.
15085 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15086 Install appropriate regmap and register set.
15088 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15090 * server.c (gdbserver_version): Update copyright year to 2010.
15091 * gdbreplay.c (gdbreplay_version): Likewise.
15093 2009-12-28 Doug Evans <dje@google.com>
15095 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15096 elf/external.h. Include <elf.h> instead but only if necessary.
15098 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15100 * linux-low.c (linux_remove_process): Remove `detaching'
15101 parameter. Don't release/detach from thread_db here.
15102 (linux_kill): Release/detach from thread_db here, ...
15103 (linux_detach): ... and here, before actually detaching.
15104 (linux_wait_1): ... and here, when a process exits.
15105 * thread-db.c (any_thread_of): New.
15106 (thread_db_free): Switch the current inferior to a thread of the
15109 2009-12-21 Doug Evans <dje@google.com>
15111 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15113 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15114 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15115 warning ifndef __NR_tkill. Move setting of errno there too.
15116 Delete unnecessary resetting of errno after syscall.
15117 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15119 * configure.ac: Check for dladdr.
15120 * config.in: Regenerate.
15121 * configure: Regenerate.
15122 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15123 (try_thread_db_load): Update.
15125 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15127 2009-12-18 Doug Evans <dje@google.com>
15129 * event-loop.c: Include unistd.h if it exists.
15131 * linux-low.c (my_waitpid): Move definition away from being in
15132 between linux_tracefork_child/linux_test_for_tracefork.
15134 * gdb_proc_service.h (psaddr_t): Fix type.
15135 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15136 signature to match glibc.
15138 2009-12-16 Doug Evans <dje@google.com>
15140 * linux-low.c (linux_read_memory): Fix argument to read.
15142 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15144 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15145 events, don't leave current_inferior pointing at null.
15147 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15149 * win32-low.c (LOG): Delete.
15150 (OUTMSG): Output to stderr.
15151 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15152 on compile time LOG macro.
15153 (win32_wait): Fix debug output.
15155 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15157 * win32-low.c (win32_add_one_solib): If the dll name is
15158 "ntdll.dll", prepend the system directory to the dll path.
15160 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15162 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15164 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15165 Vladimir Prus <vladimir@codesourcery.com>
15167 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15168 * configure.ac: Check for __mcoldfire__ and set
15169 gdb_cv_m68k_is_coldfire.
15170 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15171 reg-cf.o and reg-m68k.o.
15172 * configure: Regenerated.
15174 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15176 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15177 Pass it to thread_db_free.
15178 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15179 proper `detaching' argument to linux_remove_process.
15180 * linux-low.h (thread_db_free): Add `detaching' parameter.
15181 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15183 (thread_db_free): Add `detaching' parameter. Only
15184 call td_ta_clear_event if detaching from process.
15186 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15188 * thread-db.c (thread_db_free): Fix typo.
15190 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15193 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15195 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15197 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15198 with an i686 compiler.
15199 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15201 * configure: Rebuilt.
15203 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15207 * server.c (handle_search_memory_1): Correct read_addr initialization
15208 in loop for searching subsequent chunks.
15210 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15212 * configure.ac: New --with-libthread-db option.
15213 * thread-db.c: Allow direct dependence on libthread_db.
15214 (thread_db_free): Adjust.
15215 * config.in: Regenerate.
15216 * configure: Likewise.
15218 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15221 * thread-db.c (attach_thread): New function.
15222 (maybe_attach_thread): Return success/failure.
15223 (find_new_threads_callback): Adjust.
15224 (thread_db_find_new_threads): Loop until no new threads.
15226 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15228 * proc-service.c (ps_lgetregs): Formatting.
15230 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15232 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15233 * configure.ac: Adjust.
15234 * linux-low.h (struct process_info_private): Move members to struct
15236 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15237 * linux-low.c (linux_remove_process): Adjust.
15238 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15239 * server.c (handle_query): Move code ...
15240 (handle_monitor_command): ... here. New function.
15241 * target.h (struct target_ops): New member.
15242 * thread-db.c (struct thread_db): New.
15243 (libthread_db_search_path): New variable.
15244 (thread_db_create_event, thread_db_enable_reporting)
15245 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15246 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15247 (try_thread_db_load_1, dladdr_to_soname): New functions.
15248 (try_thread_db_load, thread_db_load_search): New functions.
15249 (thread_db_init): Search for libthread_db.
15250 (thread_db_free): New function.
15251 (thread_db_handle_monitor_command): Likewise.
15252 * config.in: Regenerate.
15253 * configure: Regenerate.
15255 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15257 * spu-low.c (spu_kill): Wait for inferior to terminate.
15258 Call clear_inferiors.
15259 (spu_detach): Call clear_inferiors.
15261 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15263 * aclocal.m4: Regenerate.
15264 * config.in: Likewise.
15265 * configure: Likewise.
15267 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15269 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15270 (parse_spufs_run): New function.
15271 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15272 (ppc_breakpoint_at): Handle SPU breakpoints.
15274 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15276 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15277 (SPUFS_MAGIC): Define.
15278 (spu_enumerate_spu_ids): New function.
15279 (linux_qxfer_spu): New function.
15280 (linux_target_ops): Install linux_qxfer_spu.
15282 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15284 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15285 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15286 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15287 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15288 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15289 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15290 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15291 (init_registers_powerpc_cell32l): Add prototype.
15292 (init_registers_powerpc_cell64l): Likewise.
15293 (ppc_arch_setup): Detect Cell/B.E. architecture.
15295 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15297 * Makefile.in (datarootdir): New variable.
15299 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15301 * linux-low.c (linux_write_memory): Update debugging output.
15302 * Makefile.in (clean): Add new descriptions.
15303 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15304 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15305 * configure.srv: Add new files for arm*-*-linux*.
15306 * linux-arm-low.c: Add new declarations.
15307 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15308 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15309 (HWCAP_VFPv3D16): New.
15310 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15311 instead of __IWMMXT__.
15312 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15313 (arm_arch_setup): New.
15314 (target_regsets): Remove #ifdef. Add VFP regset.
15315 (the_low_target): Use arm_arch_setup.
15317 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15319 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15320 the main thread again.
15322 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15324 Adding Neutrino gdbserver.
15325 * configure: Regenerated.
15326 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15327 * configure.srv (i[34567]86-*-nto*): New target.
15328 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15329 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15330 (nto_comctrl) [__QNX__]: New function.
15331 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15333 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15335 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15338 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15339 Pedro Alves <pedro@codesourcery.com>
15341 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15342 don't support CONTEXT_EXTENDED_REGISTERS.
15343 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15344 (the_low_target): Install them.
15345 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15346 failing with ERROR_PIPE_NOT_CONNECTED.
15348 2009-06-30 Doug Evans <dje@google.com>
15349 Pierre Muller <muller@ics.u-strasbg.fr>
15351 Add h/w watchpoint support to x86-linux, win32-i386.
15352 * Makefile.in (SFILES): Add i386-low.c
15353 (i386_low_h): Define.
15354 (i386-low.o): Add dependencies.
15355 (linux-x86-low.o): Add i386-low.h dependency.
15356 (win32-i386-low.o): Ditto.
15357 * i386-low.c: New file.
15358 * i386-low.h: New file.
15359 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15360 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15361 * linux-low.c (linux_add_process): Initialize arch_private.
15362 (linux_remove_process): Free arch_private.
15363 (add_lwp): Initialize arch_private.
15364 (delete_lwp): Free arch_private.
15365 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15367 * linux-low.h (process_info_private): New member arch_private.
15368 (lwp_info): New member arch_private.
15369 (linux_target_ops): New members new_process, new_thread,
15371 (ptid_of): New macro.
15372 * linux-x86-low.c: Include stddef.h, i386-low.h.
15373 (arch_process_info): New struct.
15374 (arch_lwp_info): New struct.
15375 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15376 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15377 (i386_dr_low_get_status): New function.
15378 (x86_insert_point, x86_remove_point): New functions.
15379 (x86_stopped_by_watchpoint): New function.
15380 (x86_stopped_data_address): New function.
15381 (x86_linux_new_process, x86_linux_new_thread): New functions.
15382 (x86_linux_prepare_to_resume): New function.
15383 (the_low_target): Add entries for insert_point, remove_point,
15384 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15386 * server.c (debug_hw_points): New global.
15387 (monitor_show_help): Document set debug-hw-points.
15388 (handle_query): Process "set debug-hw-points".
15389 * server.h (debug_hw_points): Declare.
15390 (paddress): Declare.
15391 * utils.c (NUMCELLS, CELLSIZE): New macros.
15392 (get_sell, xsnprintf, paddress): New functions.
15393 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15394 remove_point, stopped_by_watchpoint, stopped_data_address.
15395 * win32-i386-low.c: Include i386-low.h.
15396 (debug_reg_state): Replaces dr.
15397 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15398 (i386_dr_low_get_status): New function.
15399 (i386_insert_point, i386_remove_point): New functions.
15400 (i386_stopped_by_watchpoint): New function.
15401 (i386_stopped_data_address): New function.
15402 (i386_initial_stuff): Update.
15403 (get_thread_context,set_thread_context,i386_thread_added): Update.
15404 (the_low_target): Add entries for insert_point,
15405 remove_point, stopped_by_watchpoint, stopped_data_address.
15406 * win32-low.c (win32_insert_watchpoint): New function.
15407 (win32_remove_watchpoint): New function.
15408 (win32_stopped_by_watchpoint): New function.
15409 (win32_stopped_data_address): New function.
15410 (win32_target_ops): Add entries for insert_watchpoint,
15411 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15412 * win32-low.h (win32_target_ops): New members insert_point,
15413 remove_point, stopped_by_watchpoint, stopped_data_address.
15415 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15417 * server.c (process_serial_event): Re-return unsupported, not
15418 error, if the type isn't recognized. Re-allow supporting only
15419 insert or remove packets. Also call require_running for
15420 breakpoints. Add missing break statement to default case. Tidy.
15421 * target.h (struct target_ops): Rename insert_watchpoint to
15422 insert_point, and remove_watchpoint to remove_point.
15424 * linux-low.h (struct linux_target_ops): Likewise.
15425 * linux-low.c (linux_insert_watchpoint): Rename to ...
15426 (linux_insert_point): ... this. Adjust.
15427 (linux_remove_watchpoint): Rename to ...
15428 (linux_remove_point): ... this. Adjust.
15429 (linux_target_ops): Adjust.
15430 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15431 (cris_insert_point): ... this.
15432 (cris_remove_watchpoint): Rename to ...
15433 (cris_remove_point): ... this.
15434 (the_low_target): Adjust.
15436 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15438 * server.c (handle_v_kill): Pass signal_pid to
15439 kill_inferior if multi_process is zero.
15441 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15443 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15444 * target.h (target_ops): Comment for *_watchpoint to make it clear
15445 the functions can get types '0' and '1'.
15447 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15449 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15450 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15451 * regcache.c (get_regcache): Likewise.
15452 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15453 * win32-low.c (child_fetch_inferior_registers): Remove check for
15456 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15457 Pedro Alves <pedro@codesourcery.com>
15459 * target.h (struct target_ops) <supports_multi_process>: New
15461 (target_supports_multi_process): New.
15462 * server.c (handle_query): Even if GDB reports support, only
15463 enable multi-process if the target also supports it. Report
15464 multi-process support only if the target backend supports it.
15465 * linux-low.c (linux_supports_multi_process): New function.
15466 (linux_target_ops): Install it as target_supports_multi_process
15469 2009-05-24 Doug Evans <dje@google.com>
15471 Global renaming of find_thread_pid to find_thread_ptid.
15472 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15473 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15474 All callers updated.
15476 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15477 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15480 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15481 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15482 (linux_resume_one_lwp): Ditto.
15484 2009-05-23 Doug Evans <dje@google.com>
15486 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15487 from struct inferior_list_entry * to struct lwp_info *.
15488 All callers updated.
15490 2009-05-13 Doug Evans <dje@google.com>
15492 * linux-x86-low.c: Don't include assert.h.
15493 (x86_siginfo_fixup): Use fatal, not assert.
15494 (x86_arch_setup): Fix comment.
15496 2009-05-12 Doug Evans <dje@google.com>
15498 Biarch support for i386/amd64 gdbserver.
15499 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15500 Add linux-x86-low.c.
15501 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15502 (linux-x86-low.o): Add.
15503 * linux-x86-64-low.c: Delete.
15504 * linux-i386-low.c: Delete.
15505 * linux-x86-low.c: New file.
15506 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15508 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15510 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15511 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15512 (linux_child_pid_to_exec_file): New function.
15513 (elf_64_header_p, elf_64_file_p): New functions.
15514 (siginfo_fixup): New function.
15515 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15516 give target a chance to convert layout.
15517 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15518 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15520 2009-05-07 Doug Evans <dje@google.com>
15522 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15523 (regsets_store_inferior_registers): Ditto.
15525 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15529 * linux-low.c (must_set_ptrace_flags): Delete.
15530 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15532 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15533 `lwp->must_set_ptrace_flags' instead.
15534 (linux_wait_for_event_1): Set ptrace options here.
15535 (linux_wait_1): ... not here.
15537 2009-04-30 Doug Evans <dje@google.com>
15539 * inferiors.c (started_inferior_callback): New function.
15540 (attached_inferior_callback): New function.
15541 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15542 * server.c (print_started_pid, print_attached_pid): New functions.
15543 (detach_or_kill_for_exit): New function.
15544 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15545 * server.h (have_started_inferiors_p): Declare.
15546 (have_attached_inferiors_p): Declare.
15548 * inferiors.c (remove_process): Fix memory leak, free process.
15549 * linux-low.c (linux_remove_process): New function.
15550 (linux_kill): Call it instead of remove_process.
15551 (linux_detach, linux_wait_1): Ditto.
15553 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15555 * configure.srv: Add x86 Windows CE target.
15557 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15559 * inferiors.c (get_thread_process): Make global.
15560 * server.h (get_thread_process): Add prototype.
15561 * thread-db.c (find_one_thread): Use get_thread_process
15562 instead of current_process.
15563 (thread_db_get_tls_address): Do not crash if called when
15564 thread layer is not yet initialized.
15566 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15568 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15569 * spu-low.c (current_tid): Rename to ...
15570 (current_ptid): ... this.
15571 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15572 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15573 ptid_get_lwp (current_ptid) instead of current_tid.
15574 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15575 instead of current_tid. Use find_process_pid to verify pid
15576 argument is valid. Pass proper argument to remove_process.
15577 (spu_thread_alive): Compare current_ptid instead of current_tid.
15578 (spu_resume): Likewise.
15580 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15582 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15585 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15587 Implement the multiprocess extensions, and add linux multiprocess
15590 * server.h (ULONGEST): Declare.
15591 (struct ptid, ptid_t): New.
15592 (minus_one_ptid, null_ptid): Declare.
15593 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15594 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15595 (struct inferior_list_entry): Change `id' type from unsigned from
15597 (struct sym_cache, struct breakpoint, struct
15598 process_info_private): Forward declare.
15599 (struct process_info): Declare.
15600 (current_process): Declare.
15601 (all_processes): Declare.
15602 (initialize_inferiors): Declare.
15603 (add_thread): Adjust to use ptid_t.
15604 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15605 (add_process, remove_process, find_thread_pid): Declare.
15606 (find_inferior_id): Adjust to use ptid_t.
15607 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15608 (multi_process): Declare.
15609 (push_event): Adjust to use ptid_t.
15610 (read_ptid, write_ptid): Declare.
15611 (prepare_resume_reply): Adjust to use ptid_t.
15612 (clear_symbol_cache): Declare.
15613 * inferiors.c (all_processes): New.
15614 (null_ptid, minus_one_ptid): New.
15615 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15616 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15617 (add_thread): Change unsigned long to ptid. Remove gdb_id
15619 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15620 (gdb_id_to_thread): Rename to ...
15621 (find_thread_pid): ... this. Change unsigned long to ptid.
15622 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15623 (loaded_dll, pull_pid_from_list): Adjust.
15624 (add_process, remove_process, find_process_pid)
15625 (get_thread_process, current_process, initialize_inferiors): New.
15626 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15627 (struct target_waitstatus) <related_pid>: Ditto.
15628 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15629 return type to int.
15630 (struct target_ops) <join>: Add `pid' argument.
15631 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15632 (struct target_ops) <wait>: Add `ptid' field. Change return type
15634 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15635 (mywait): Add `ptid' argument. Change return type to ptid_t.
15636 (target_pid_to_str): Declare.
15637 * target.c (set_desired_inferior): Adjust to use ptids.
15638 (mywait): Add new `ptid' argument. Adjust.
15639 (target_pid_to_str): New.
15640 * mem-break.h (free_all_breakpoints): Declare.
15641 * mem-break.c (breakpoints): Delelete.
15642 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15643 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15644 to use per-process breakpoint list.
15645 (free_all_breakpoints): New.
15646 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15647 (symbol_cache, all_symbols_looked_up): Delete.
15649 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15651 (prepare_resume_reply): Change ptid argument's type from unsigned
15652 long to ptid_t. Adjust. Implement W;process and X;process.
15653 (free_sym_cache, clear_symbol_cache): New.
15654 (look_up_one_symbol): Adjust to per-process symbol cache. *
15655 * server.c (cont_thread, general_thread, step_thread): Change type
15657 (attached): Delete.
15658 (multi_process): New.
15659 (last_ptid): Change type to ptid_t.
15660 (struct vstop_notif) <ptid>: Change type to ptid_t.
15661 (queue_stop_reply, push_event): Change `ptid' argument's type to
15663 (discard_queued_stop_replies): Add `pid' argument.
15664 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15665 changes. Don't reference the `attached' global.
15666 (attach_inferior): Adjust to mywait interface changes.
15667 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15668 features. Handle and report "multiprocess+". Handle
15670 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15672 (handle_v_kill): New.
15673 (handle_v_stopped): Adjust to use target_pid_to_str.
15674 (handle_v_requests): Allow multiple attaches and runs when
15675 multiprocess extensions are in effect. Handle "vKill".
15676 (myresume): Adjust to use ptids.
15677 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15678 (handle_status): Adjust to discard_queued_stop_replies interface
15680 (first_thread_of, kill_inferior_callback)
15681 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15682 (main): Call initialize_inferiors. Adjust to use ptids, killing
15683 and detaching from all inferiors. Handle multiprocess packet
15685 * linux-low.h: Include gdb_proc_service.h.
15686 (struct process_info_private): New.
15687 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15688 <lwpid_of>: Use ptid_get_lwp.
15689 (get_lwp_thread): Adjust.
15690 (struct lwp_info): Add `dead' member.
15691 (find_lwp_pid): Declare.
15692 * linux-low.c (thread_db_active): Delete.
15693 (new_inferior): Adjust comment.
15694 (inferior_pid): Delete.
15695 (linux_add_process): New.
15696 (handle_extended_wait): Adjust.
15697 (add_lwp): Change unsigned long to ptid.
15698 (linux_create_inferior): Add process to processes table. Adjust
15699 to use ptids. Don't set new_inferior here.
15700 (linux_attach_lwp): Rename to ...
15701 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15702 it. Adjust to use ptids.
15703 (linux_attach_lwp): New.
15704 (linux_attach): Add process to processes table. Don't set
15706 (struct counter): New.
15707 (second_thread_of_pid_p, last_thread_of_process_p): New.
15708 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15709 multiple processes.
15710 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15711 processes. Remove process from process table.
15712 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15713 to multiple processes.
15714 (any_thread_of): New.
15715 (linux_detach): Add `pid' argument, and handle it. Remove process
15716 from processes table.
15717 (linux_join): Add `pid' argument. Handle it.
15718 (linux_thread_alive): Change unsighed long argument to ptid_t.
15719 Consider dead lwps as not being alive.
15720 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15721 threads we're not interested in.
15722 (same_lwp, find_lwp_pid): New.
15723 (linux_wait_for_lwp): Change `pid' argument's type from int to
15725 (linux_wait_for_event): Rename to ...
15726 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15727 from int to ptid_t. Adjust.
15728 (linux_wait_for_event): New.
15729 (linux_wait_1): Add `ptid' argument. Change return type to
15730 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15731 that exit from the process table.
15732 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15734 (mark_lwp_dead): New.
15735 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15736 stopping all threads, mark its main lwp as dead.
15737 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15739 (fetch_register, usr_store_inferior_registers)
15740 (regsets_fetch_inferior_registers)
15741 (regsets_store_inferior_registers, linux_read_memory)
15742 (linux_write_memory): Inline `inferior_pid'.
15743 (linux_look_up_symbols): Adjust to use per-process
15744 `thread_db_active'.
15745 (linux_request_interrupt): Adjust to use ptids.
15746 (linux_read_auxv): Inline `inferior_pid'.
15747 (initialize_low): Don't reference thread_db_active.
15748 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15749 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15750 (ps_getpid): Return the pid of the current inferior.
15751 * thread-db.c (proc_handle, thread_agent): Delete.
15752 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15754 (find_one_thread): Change argument type to ptid_t. Adjust to
15756 (maybe_attach_thread): Adjust to per-process data and ptids.
15757 (thread_db_find_new_threads): Ditto.
15758 (thread_db_init): Ditto.
15759 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15760 processes table. Adjust to use ptids.
15761 (spu_kill, spu_detach): Adjust interface. Remove process from
15763 (spu_join, spu_thread_alive): Adjust interface.
15764 (spu_wait): Adjust interface. Remove process from processes
15765 table. Adjust to use ptids.
15766 * win32-low.c (current_inferior_tid): Delete.
15767 (current_inferior_ptid): New.
15768 (debug_event_ptid): New.
15769 (thread_rec): Take a ptid. Adjust.
15770 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15771 (child_delete_thread): Ditto.
15772 (do_initial_child_stuff): Add `attached' argument. Add process to
15774 (child_fetch_inferior_registers, child_store_inferior_registers):
15776 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15777 (win32_attach): Pass 1 to do_initial_child_stuff.
15778 (win32_kill): Adjust interface. Remove process from processes
15780 (win32_detach): Ditto.
15781 (win32_join): Adjust interface.
15782 (win32_thread_alive): Take a ptid.
15783 (win32_resume): Adjust to use ptids.
15784 (get_child_debug_event): Ditto.
15785 (win32_wait): Adjust interface. Remove exiting process from
15788 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15790 Non-stop mode support.
15792 * server.h (non_stop): Declare.
15793 (gdb_client_data, handler_func): Declare.
15794 (delete_file_handler, add_file_handler, start_event_loop):
15796 (handle_serial_event, handle_target_event, push_event)
15797 (putpkt_notif): Declare.
15798 * target.h (enum resume_kind): New.
15799 (struct thread_resume): Replace `step' field by `kind' field.
15800 (TARGET_WNOHANG): Define.
15801 (struct target_ops) <wait>: Add `options' argument.
15802 <supports_non_stop, async, start_non_stop>: New fields.
15803 (target_supports_non_stop, target_async): New.
15804 (start_non_stop): Declare.
15805 (mywait): Add `options' argument.
15806 * target.c (mywait): Add `options' argument. Print child exit
15807 notifications here.
15808 (start_non_stop): New.
15809 * server.c (non_stop, own_buf, mem_buf): New globals.
15810 (struct vstop_notif): New.
15811 (notif_queue): New global.
15812 (queue_stop_reply, push_event, discard_queued_stop_replies)
15813 (send_next_stop_reply): New.
15814 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15816 (attach_inferior): In non-stop mode, don't wait for the target
15818 (handle_general_set): Handle QNonStop.
15819 (handle_query): When handling qC, return the current general
15820 thread, instead of the first thread of the list.
15821 (handle_query): If the backend supports non-stop mode, include
15822 QNonStop+ in the qSupported query response.
15823 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15825 (handle_v_attach, handle_v_run): Handle non-stop mode.
15826 (handle_v_stopped): New.
15827 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15828 (myresume): Adjust to use resume_kind. Handle non-stop.
15829 (queue_stop_reply_callback): New.
15830 (handle_status): Handle non-stop mode.
15831 (main): Clear non_stop flag on reconnection. Use the event-loop.
15832 Refactor serial protocol handling from here ...
15833 (process_serial_event): ... to this new function. When GDB
15834 selects any thread, select one here. In non-stop mode, wait until
15835 GDB acks all pending events before exiting.
15836 (handle_serial_event, handle_target_event): New.
15837 * remote-utils.c (remote_open): Install remote_desc in the event
15839 (remote_close): Remove remote_desc from the event loop.
15840 (putpkt_binary): Rename to...
15841 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15842 (putpkt_binary): New as wrapper around putpkt_binary_1.
15843 (putpkt_notif): New.
15844 (prepare_resume_reply): In non-stop mode, don't change the
15846 * event-loop.c: New.
15847 * Makefile.in (OBJ): Add event-loop.o.
15848 (event-loop.o): New rule.
15850 * linux-low.h (pid_of): Moved here.
15852 (get_lwp_thread): Use lwpid_of.
15853 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15854 * linux-low.c (pid_of): Delete.
15855 (inferior_pid): Use lwpid_of.
15856 (linux_event_pipe): New.
15857 (target_is_async_p): New.
15859 (handle_extended_wait): Use lwpid_of.
15860 (add_lwp): Don't set lwpid field.
15861 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15862 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15863 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15864 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15865 first. Adjust to linux_wait_for_event interface changes. Use
15867 (linux_detach): Don't delete the main lwp here.
15868 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15869 (status_pending_p): Don't consider explicitly suspended lwps.
15870 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15871 pointer. Add OPTIONS argument. Change return type to int. Use
15872 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15873 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15874 pointer. Add status pointer argument. Return a pid instead of a
15875 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15876 changes. In non-stop mode, don't switch to a random thread.
15877 (linux_wait): Rename to...
15878 (linux_wait_1): ... this. Add target_options argument, and handle
15879 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15880 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15881 clean exit and signal exit code. Don't stop all threads in
15882 non-stop mode. In all-stop mode, only stop all threads when
15883 reporting a stop to GDB. Handle explicit thread stop requests.
15884 (async_file_flush, async_file_mark): New.
15886 (send_sigstop): Use lwpid_of.
15887 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15888 interface changes. In non-stop mode, don't switch to a random
15890 (linux_resume_one_lwp): Use lwpid_of.
15891 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15892 (linux_resume_one_thread): ... this. Handle resume_stop. In
15893 non-stop mode, don't look for pending flag in all threads.
15894 (resume_status_pending_p): Don't consider explicitly suspended
15896 (my_waitpid): Reimplement. Emulate __WALL.
15897 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15899 (sigchld_handler, linux_supports_non_stop, linux_async)
15900 (linux_start_non_stop): New.
15901 (linux_target_ops): Register linux_supports_non_stop, linux_async
15902 and linux_start_non_stop.
15903 (initialize_low): Install SIGCHLD handler.
15904 * thread-db.c (thread_db_create_event, find_one_thread)
15905 (thread_db_get_tls_address): Use lwpid_of.
15906 * win32-low.c (win32_detach): Adjust to use resume_kind.
15907 (win32_wait): Add `options' argument.
15908 * spu-low.c (spu_resume): Adjust to use resume_kind.
15909 (spu_wait): Add `options' argument.
15911 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15913 Decouple target code from remote protocol.
15915 * target.h (enum target_waitkind): New.
15916 (struct target_waitstatus): New.
15917 (struct target_ops) <wait>: Return an unsigned long. Take a
15918 target_waitstatus pointer instead of a char pointer.
15919 (mywait): Likewise.
15920 * target.c (mywait): Change prototype to return an unsigned long.
15921 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15922 * server.h (thread_from_wait, old_thread_from_wait): Delete
15924 (prepare_resume_reply): Change prototype to take a
15926 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15927 (last_status, last_ptid): New.
15928 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15929 pid instead of a signal.
15930 (attach_inferior): Remove "status" and "signal" parameters.
15932 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15934 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15935 (handle_v_requests, myresume): Remove "status" and "signal"
15936 parameters. Adjust.
15937 (handle_status): New.
15938 (main): Delete local `status'. Adjust.
15939 * remote-utils.c: Include target.h.
15940 (prepare_resume_reply): Change prototype to take a
15941 target_waitstatus. Adjust.
15943 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15945 * spu-low.c (spu_wait): Adjust.
15946 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15948 (win32_wait): Adjust.
15950 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15952 * target.h (struct thread_resume): Delete leave_stopped member.
15953 (struct target_ops): Add a `n' argument to the `resume' callback.
15954 * server.c (start_inferior): Adjust.
15955 (handle_v_cont, myresume): Adjust.
15956 * linux-low.c (check_removed_breakpoint): Adjust to resume
15957 interface change, and to removed leave_stopped field.
15958 (resume_ptr): Delete.
15959 (struct thread_resume_array): New.
15960 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15961 resume interface change.
15962 (linux_continue_one_thread, linux_queue_one_thread)
15963 (resume_status_pending_p): Check if the resume field is NULL
15964 instead of checking the leave_stopped member.
15965 (linux_resume): Adjust to the target resume interface change.
15966 * spu-low.c (spu_resume): Adjust to the target resume interface
15968 * win32-low.c (win32_detach, win32_resume): Ditto.
15970 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15972 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15974 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15976 (linux_continue_one_thread): Only preserve the stepping flag if
15977 there's a pending breakpoint.
15979 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15981 * server.c (main): After the inferior having exited, call
15982 remote_close before exiting gdbserver.
15984 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15986 Fix size of FPSCR in Power 7 processors.
15987 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15988 (PPC_FEATURE_HAS_DFP): New #define.
15989 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15992 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15994 * server.c (handle_query) Whitespace and formatting.
15996 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15998 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15999 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16000 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16001 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16002 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16003 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16004 Makefile.in, configure.ac: Fix whitespace throughout.
16005 * configure: Regenerate.
16007 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16009 * inferiors.c (find_inferior): Make it safe for the callback
16010 function to delete the currently iterated inferior.
16012 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16014 * Makefile.in (linuw_low_h): Move higher.
16015 (thread-db.o): Depend on $(linux_low_h).
16017 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16019 Rename "process" to "lwp" throughout.
16021 * linux-low.c (all_processes): Rename to...
16022 (all_lwps): ... this.
16023 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16024 (add_process): Rename to ...
16025 (add_lwp): ... this. Adjust.
16026 (linux_create_inferior): Adjust.
16027 (linux_attach_lwp): Adjust.
16028 (linux_attach): Adjust.
16029 (linux_kill_one_process): Rename to ...
16030 (linux_kill_one_lwp): ... this. Adjust.
16031 (linux_kill): Adjust.
16032 (linux_detach_one_process): Rename to ...
16033 (linux_detach_one_lwp): ... this. Adjust.
16034 (linux_detach): Adjust.
16035 (check_removed_breakpoint): Adjust.
16036 (status_pending_p): Adjust.
16037 (linux_wait_for_process): Rename to ...
16038 (linux_wait_for_lwp): ... this. Adjust.
16039 (linux_wait_for_event): Adjust.
16040 (send_sigstop): Adjust.
16041 (wait_for_sigstop): Adjust.
16042 (stop_all_processes): Rename to ...
16043 (stop_all_lwps): ... this.
16044 (linux_resume_one_process): Rename to ...
16045 (linux_resume_one_lwp): ... this. Adjust.
16046 (linux_set_resume_request, linux_continue_one_thread)
16047 (linux_queue_one_thread, resume_status_pending_p)
16048 (usr_store_inferior_registers, regsets_store_inferior_registers)
16049 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16051 * linux-low.h (get_process): Rename to ...
16052 (get_lwp): ... this. Adjust.
16053 (get_thread_process): Rename to ...
16054 (get_thread_lwp): ... this. Adjust.
16055 (get_process_thread): Rename to ...
16056 (get_lwp_thread): ... this. Adjust.
16057 (struct process_info): Rename to ...
16058 (struct lwp_info): ... this.
16059 (all_processes): Rename to ...
16060 (all_lwps): ... this.
16061 * proc-service.c (ps_lgetregs): Adjust.
16062 * thread-db.c (thread_db_create_event, find_one_thread)
16063 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16065 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16067 * server.c (handle_query): Handle "qAttached".
16069 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16071 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16072 GPLv3, update license URL.
16074 2009-03-01 Doug Evans <dje@google.com>
16076 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16077 (server_h): Add gdb_signals.h.
16078 (signals.o): Update.
16079 * server.h (target_signal_from_host,target_signal_to_host_p)
16080 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16082 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16084 * remote-utils.c (getpkt): Also generate remote-debug
16085 information if noack_mode is set.
16087 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16089 * server.c (handle_query): Report qXfer:siginfo:read and
16090 qXfer:siginfo:write as supported and handle them.
16091 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16092 * linux-low.c (linux_xfer_siginfo): New.
16093 (linux_target_ops): Set it.
16095 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16097 * server.c (gdbserver_usage): Mention --remote-debug.
16098 (main): Accept '--remote-debug' switch.
16100 2009-01-18 Doug Evans <dje@google.com>
16102 * regcache.c (new_register_cache): No need to check result of xcalloc.
16103 * server.c (handle_search_memory): Back out calls to xmalloc,
16104 result is checked and error is returned to user upon failure.
16105 (handle_query): Ditto. Add more checks for result of malloc.
16106 (handle_v_cont): Check result of malloc, report error back to
16108 (handle_v_run): Ditto. Call freeargv.
16109 * server.h (freeargv): Declare.
16110 * utils.c (freeargv): New fn.
16112 2009-01-15 Doug Evans <dje@google.com>
16114 * gdbreplay.c (perror_with_name): Make arg const char *.
16115 * server.h (target_signal_to_name): Make return type const char *.
16116 * thread-db.c (thread_db_err_str): Make return type const char *.
16117 * utils.c (perror_with_name): Make arg const char *.
16119 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16121 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16122 when handling a EXIT_PROCESS_DEBUG_EVENT.
16124 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16126 * gdbreplay.c (gdbreplay_version): Update copyright year.
16127 * server.c (gdbserver_version): Likewise.
16129 2009-01-05 Doug Evans <dje@google.com>
16131 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16132 (handle_extended_wait): Improve comment.
16134 2008-12-13 Doug Evans <dje@google.com>
16136 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16137 * server.h (ATTR_MALLOC): New macro.
16138 (xmalloc,xcalloc,xstrdup): Declare.
16139 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16140 * inferiors.c: Ditto.
16141 * linux-low.c: Ditto.
16142 * mem-break.c: Ditto.
16143 * regcache.c: Ditto.
16144 * remote-utils.c: Ditto.
16147 * win32-low.c: Ditto.
16149 2008-12-12 Doug Evans <dje@google.com>
16151 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16152 in debugging printf.
16154 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16156 2008-12-09 Doug Evans <dje@google.com>
16158 * linux-low.h (struct process_info): Delete member tid, unused.
16159 * thread-db.c (find_one_thread): Update.
16160 (maybe_attach_thread): Update.
16162 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16164 * target.h (struct target_ops): Add qxfer_osdata member.
16165 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16167 (linux_qxfer_osdata): New functions.
16168 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16170 * server.c (handle_query): Handle "qXfer:osdata:read:".
16171 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16172 (buffer_xml_printf): New functions.
16173 * server.h (struct buffer): New.
16174 (buffer_grow_str, buffer_grow_str0): New macros.
16175 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16176 (buffer_xml_printf): Declare.
16178 2008-11-24 Doug Evans <dje@google.com>
16180 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16182 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16184 * server.c (handle_v_run): Always use the supplied argument list.
16186 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16188 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16189 (xtensa_regmap_table): Add entry for scompare1.
16191 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16193 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16194 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16195 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16196 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16197 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16198 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16199 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16200 XML target descriptions.
16201 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16202 when inferior is running on an ISA 2.05 or later processor. Add
16203 special case to return offset for full 64-bit slot of FPSCR when
16206 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16208 * Makefile.in (SFILES, clean): Added sparc64 files.
16209 (reg-sparc64.o, reg-sparc64.c): New.
16210 * configure.srv (sparc*-*-linux*): New configuration.
16211 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16212 syscall arguments for SPARC.
16213 (regsets_store_inferior_registers): Likewise.
16214 * linux-sparc-low.c: New file.
16216 2008-10-21 Doug Evans <dje@google.com>
16218 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16219 (READLINE_DIR,READLINE_DEP): Delete.
16220 (INTERNAL_CFLAGS): Update.
16221 (LINTFLAGS): Update.
16223 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16225 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16226 whole argv from the last run, not just argv[0].
16228 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16230 * regcache.c (new_register_cache): Return NULL if the register
16231 cache size isn't known yet.
16232 (free_register_cache): Avoid dereferencing a NULL regcache.
16234 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16236 * configure.srv: Merge MIPS and MIPS64.
16238 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16240 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16242 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16244 * Makefile.in: Add required vsx dependencies.
16246 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16247 Declare init_registers_powerpc_vsx32l.
16248 Declare init_registers_powerpc_vsx64l.
16249 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16250 (ppc_arch_setup): Check for VSX in hwcap.
16251 (ppc_fill_vsxregset): New function.
16252 (ppc_store_vsxregset): New function.
16253 Add new VSX entry in regset_info target_regsets.
16255 * configure.srv: Add new VSX dependencies.
16257 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16259 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16260 (remote_open): Set or clear transport_is_reliable.
16261 (putpkt_binary): Don't expect acks in noack mode.
16262 (getpkt): Don't send ack/nac in noack mode.
16263 * server.c (handle_general_set): Handle QStartNoAckMode.
16264 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16266 (main): Reset noack_mode on every connection.
16267 * server.h (noack_mode): Declare.
16269 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16271 * Makefile.in (GDBREPLAY_OBS): New variable.
16272 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16274 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16275 Daniel Jacobowitz <dan@codesourcery.com>
16277 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16278 (usr_store_inferior_registers): Likewise.
16279 (regsets_store_inferior_registers): Likewise.
16281 2008-07-31 Rolf Jansen <rj@surtec.com>
16282 Pedro Alves <pedro@codesourcery.com>
16284 * configure.ac: Check for memmem declaration.
16285 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16286 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16287 (disable_packet_qfThreadInfo): Unconditionally compile.
16288 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16289 * configure, config.in: Regenerate.
16291 2008-07-28 Doug Kwan <dougkwan@google.com>
16293 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16294 (linux_write_memory): Remove declaration of errno.
16296 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16298 * linux-low.c (handle_extended_wait): Do not use "status"
16299 variable uninitialized.
16301 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16303 * server.c (handle_v_attach): Inhibit reporting dll changes.
16305 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16307 * remote-utils.c (prepare_resume_reply): If requested, don't
16308 output "thread:TID" in the T stop reply.
16310 * server.c (disable_packet_vCont, disable_packet_Tthread)
16311 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16312 (handle_query): If requested, disable support for qC, qfThreadInfo
16314 (handle_v_requests): If requested, disable support for vCont.
16315 (gdbserver_show_disableable): New.
16316 (main): Handle --disable-packet and --disable-packet=LIST.
16318 * server.h (disable_packet_vCont, disable_packet_Tthread)
16319 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16321 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16323 * server.c (gdbserver_usage): Mention --version.
16325 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16327 * Makefile.in (gdbreplay.o): New rule.
16329 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16331 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16332 message, not gdbserver.
16334 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16335 Nathan Sidwell <nathan@codesourcery.com>
16336 Joseph Myers <joseph@codesourcery.com>
16338 * acinclude.m4: Include ../../config/acx.m4.
16339 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16340 * configure, config.in: Regenerate.
16341 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16342 * server.c (gdbserver_version): Print PKGVERSION.
16343 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16344 (main): Adjust gdbserver_usage calls.
16345 * gdbreplay.c (version, host_name): Add declarations.
16346 (gdbreplay_version, gdbreplay_usage): New.
16347 (main): Accept --version and --help options.
16349 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16351 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16352 (arm_breakpoint_at): Handle Thumb.
16353 (the_low_target): Add comment.
16355 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16357 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16359 2008-05-09 Doug Evans <dje@google.com>
16361 * server.h (decode_search_memory_packet): Declare.
16362 * remote-utils.c (decode_search_memory_packet): New fn.
16363 * server.c (handle_search_memory_1): New fn.
16364 (handle_search_memory): New fn.
16365 (handle_query): Process qSearch:memory packets.
16367 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16369 * regcache.c (registers_length): Remove.
16370 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16371 full register packet.
16372 * regcache.h (registers_length): Remove prototype.
16373 * server.h (PBUFSIZ): Define to 16384.
16375 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16377 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16378 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16379 powerpc-64l.o, and powerpc-altivec64l.o.
16380 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16381 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16382 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16383 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16384 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16387 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16388 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16389 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16390 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16391 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16392 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16393 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16394 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16395 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16396 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16399 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16400 (init_registers_powerpc_32l): ... this new prototype.
16401 (init_registers_powerpc_32): Remove, replace by ...
16402 (init_registers_powerpc_altivec32l): ... this new prototype.
16403 (init_registers_powerpc_e500): Remove, replace by ...
16404 (init_registers_powerpc_e500l): ... this new prototype.
16405 (init_registers_ppc64): Remove, replace by ...
16406 (init_registers_powerpc_64l): ... this new prototype.
16407 (init_registers_powerpc_64): Remove, replace by ...
16408 (init_registers_powerpc_altivec64l): ... this new prototype.
16409 (ppc_num_regs): Set to 73.
16410 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16411 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16412 (ppc_cannot_store_register): Handle orig_r3 and trap.
16413 (ppc_arch_setup): Update init_registers_... calls.
16414 (ppc_fill_gregset): Handle orig_r3 and trap.
16416 * inferiors.c (clear_inferiors): Reset current_inferior.
16418 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16420 * acinclude.m4: Add override.m4.
16421 * configure: Regenerate.
16423 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16425 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16426 initial call to init_register_ppc64.
16428 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16430 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16431 single powerpc*-*-linux* case.
16432 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16434 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16436 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16437 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16439 * linux-ppc-low.c: Include <elf.h>.
16440 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16441 (ppc_hwcap): New global variable.
16442 (ppc_regmap): Remove __SPE__ #ifdef sections.
16443 (ppc_regmap_e500): New global variable.
16444 (ppc_cannot_store_register): Update __SPE__ special case.
16445 (ppc_get_hwcap): New function.
16446 (ppc_arch_setup): Use it to determine whether inferior supports
16447 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16448 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16449 Do not access registers if target does not support AltiVec.
16450 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16451 Do not access registers if target does not support SPE.
16452 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16454 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16456 * linux-low.c (disabled_regsets, num_regsets): New.
16457 (use_regsets_p): Delete.
16458 (linux_wait_for_process): Clear disabled_regsets.
16459 (regsets_fetch_inferior_registers): Check and set it.
16460 (regsets_store_inferior_registers): Likewise.
16461 (linux_fetch_registers, linux_store_registers): Do not use
16463 (initialize_low): Allocate disabled_regsets.
16465 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16467 * Makefile.in (LIBOBJS): New.
16468 (OBS): Use LIBOBJS.
16469 (memmem.o): New rule.
16470 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16471 * configure: Regenerated.
16473 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16475 * server.c (handle_query): Never return "unsupported" for
16476 qXfer:features:read queries.
16478 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16480 * server.c (get_features_xml): Fix inverted condition.
16481 (handle_query): Always support qXfer:feature:read.
16483 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16485 * server.c (wrapper_argv): New.
16486 (start_inferior): Handle wrapper_argv. If set, expect an extra
16488 (gdbserver_usage): Document --wrapper.
16489 (main): Parse --wrapper.
16491 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16493 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16494 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16495 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16496 (ppc_set_pc): Likewise.
16497 (ppc_arch_setup): New function.
16498 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16499 of collect_register.
16500 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16502 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16504 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16505 instead of linux-ppc64-low.o.
16506 * linux-ppc64-low.c: Remove file.
16507 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16508 (linux-ppc64-low.o): Remove rule.
16510 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16511 (init_registers_powerpc_64): Likewise.
16512 (ppc_regmap): Conditionally define depending on __powerpc64__.
16513 (ppc_cannot_store_register): Do not special-case "fpscr" when
16514 compiled on __powerpc64__.
16515 (ppc_collect_ptrace_register): New function.
16516 (ppc_supply_ptrace_register): New function.
16517 (ppc_breakpoint): Change type to "unsigned int".
16518 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16519 (the_low_target): Conditionally provide initializers for the
16520 arch_setup member depending on __powerpc64__. Install
16521 collect_ptrace_register and supply_ptrace_register members.
16523 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16525 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16526 * server.c (gdbserver_xmltarget): Define.
16527 (get_features_xml): Use it to replace "target.xml" and arch_string.
16529 * configure.srv: Remove srv_xmltarget. Add XML files that were
16530 mentioned there to srv_xmlfiles instead. Remove conditional tests
16531 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16532 srv_xmlfiles and srv_regobj to include all possible choices.
16533 * configure.ac (srv_xmltarget): Remove.
16534 (srv_xmlfiles): Do not add "target.xml".
16535 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16536 checks for supplementary target information.
16537 * configure: Regenerate.
16538 * Makefile.in (XML_TARGET): Remove.
16539 (target.xml): Remove rule.
16540 (clean): Do not clean up target.xml.
16541 (.PRECIOUS): Do not mention target.xml.
16543 * target.h (struct target_ops): Remove arch_string member.
16544 * linux-low.c (linux_arch_string): Remove.
16545 (linux_target_ops): Remove arch_string initializer.
16546 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16547 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16548 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16549 * spu-low.c (spu_arch_string): Remove.
16550 (spu_target_ops): Remove arch_string initializer.
16551 * win32-low.c (win32_arch_string): Remove.
16552 (win32_target_ops): Remove arch_string initializer.
16553 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16554 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16555 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16557 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16559 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16560 by collect_ptrace_register and supply_ptrace_register hooks.
16561 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16562 instead of checking for the_low_target.left_pad_xfer.
16563 (usr_store_inferior_registers): Use collect_ptrace_register callback
16564 instead of checking for the_low_target.left_pad_xfer.
16566 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16567 (s390_supply_ptrace_register): Likewise.
16568 (s390_fill_gregset): Call s390_collect_ptrace_register.
16569 (the_low_target): Update.
16571 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16572 (ppc_supply_ptrace_register): Likewise.
16573 (the_low_target): Update.
16575 * linux-i386-low.c (the_low_target): Update.
16576 * linux-x86-64-low.c (the_low_target): Update.
16578 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16580 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16581 reg-s390.o and reg-s390x.o.
16583 * linux-low.c (new_inferior): New global variable.
16584 (linux_create_inferior, linux_attach): Set it.
16585 (linux_wait_for_process): Call the_low_target.arch_setup after the
16586 target has stopped for the first time.
16587 (initialize_low): Do not call the_low_target.arch_setup.
16589 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16590 (s390_set_pc): Likewise.
16591 (s390_arch_setup): New function.
16592 (the_low_target): Use s390_arch_setup as arch_setup routine.
16594 * regcache.c (realloc_register_cache): New function.
16595 (set_register_cache): Call it for each existing regcache.
16597 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16599 * server.h (init_registers): Remove prototype.
16601 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16602 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16603 instead of init_registers ().
16604 * linux-arm-low.c (init_registers_arm): Add prototype.
16605 (init_registers_arm_with_iwmmxt): Likewise.
16606 (the_low_target): Add initializer for arch_setup field.
16607 * linux-cris-low.c (init_registers_cris): Add prototype.
16608 (the_low_target): Add initializer for arch_setup field.
16609 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16610 (the_low_target): Add initializer for arch_setup field.
16611 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16612 (the_low_target): Add initializer for arch_setup field.
16613 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16614 (the_low_target): Add initializer for arch_setup field.
16615 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16616 (the_low_target): Add initializer for arch_setup field.
16617 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16618 (the_low_target): Add initializer for arch_setup field.
16619 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16620 (init_registers_mips64_linux): Likewise.
16621 (the_low_target): Add initializer for arch_setup field.
16622 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16623 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16624 (the_low_target): Add initializer for arch_setup field.
16625 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16626 (init_registers_powerpc_64): Likewise.
16627 (the_low_target): Add initializer for arch_setup field.
16628 * linux-s390-low.c (init_registers_s390): Add prototype.
16629 (init_registers_s390x): Likewise.
16630 (the_low_target): Add initializer for arch_setup field.
16631 * linux-sh-low.c (init_registers_sh): Add prototype.
16632 (the_low_target): Add initializer for arch_setup field.
16633 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16634 (the_low_target): Add initializer for arch_setup field.
16635 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16636 (the_low_target): Add initializer for arch_setup field.
16638 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16639 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16640 instead of init_registers ().
16641 * win32-arm-low.c (init_registers_arm): Add prototype.
16642 (the_low_target): Add initializer for arch_setup field.
16643 * win32-i386-low.c (init_registers_i386): Add prototype.
16644 (the_low_target): Add initializer for arch_setup field.
16646 * spu-low.c (init_registers_spu): Add prototype.
16647 (initialize_low): Call initialie_registers_spu () instead of
16648 initialize_registers ().
16650 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16652 * server.c (handle_v_requests): When handling the vRun and vAttach
16653 packets, if already debugging a process, don't kill it. Return an
16656 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16658 * server.c (handle_query): Correct length check.
16660 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16662 * win32-low.c (do_initial_child_stuff): Add process handle
16663 parameter. Set current_process_handle and current_process_id from the
16664 parameters. Clear globals.
16665 (win32_create_inferior): Don't set current_process_handle and
16666 current_process_id here. Instead pass them on the call to
16667 do_initial_child_stuff.
16668 (win32_attach): Likewise.
16669 (win32_clear_inferiors): New.
16670 (win32_kill): Don't close the current process handle or the
16671 current thread handle here. Instead call win32_clear_inferiors.
16672 (win32_detach): Don't open a new handle to the process. Call
16673 win32_clear_inferiors.
16674 (win32_join): Don't rely on current_process_handle; open a new
16675 handle using the process id.
16676 (win32_wait): Call win32_clear_inferiors when the inferior process
16679 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16681 * server.c (monitor_show_help): Add "exit".
16683 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16685 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16686 (clean): Add reg-xtensa.c.
16687 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16688 * configure.srv (xtensa*-*-linux*) New target.
16689 * linux-xtensa-low.c: New.
16690 * xtensa-xtregs.c: New.
16692 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16694 * hostio.c: Don't include errno.h.
16695 (errno_to_fileio_errno): Move to hostio-errno.
16696 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16697 error number outputting to the target->hostio_last_error callback.
16698 (hostio_packet_error): Use FILEIO_EINVAL directly.
16699 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16700 calls to hostio_error.
16701 * hostio-errno.c: New.
16702 * server.h (hostio_last_error_from_errno): Declare.
16703 * target.h (target_ops): Add hostio_last_error member.
16704 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16705 as hostio_last_error handler.
16706 * spu-low.c (spu_target_ops): Likewise.
16707 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16708 (wince_hostio_last_error): New functions.
16709 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16710 as hostio_last_error handler.
16711 (win32_target_ops) [!_WIN32_WCE]: Register
16712 hostio_last_error_from_errno as hostio_last_error handler.
16713 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16714 (hostio-errno.o): New rule.
16715 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16716 * configure.srv (srv_hostio_err_objs): New variable. Default to
16718 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16719 * configure: Regenerate.
16721 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16723 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16724 (linux_kill, linux_detach): Clean up the process list.
16725 * remote-utils.c (remote_open): Improve port number parsing.
16726 (putpkt_binary, input_interrupt): Only send interrupts if the target
16728 * server.c (extended_protocol): Make static.
16729 (attached): Define earlier.
16730 (exit_requested, response_needed, program_argv): New variables.
16731 (target_running): New.
16732 (start_inferior): Clear attached here.
16733 (attach_inferior): Set attached here.
16734 (require_running): Define.
16735 (handle_query): Use require_running and target_running. Implement
16737 (handle_v_attach, handle_v_run): New.
16738 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16739 (gdbserver_usage): Update.
16740 (main): Redo argument parsing. Handle --debug and --multi. Handle
16741 --attach along with other options or after the port. Save
16742 program_argv. Support no initial program. Resynchronize
16743 communication with GDB after an error. Handle "monitor exit".
16744 Use require_running and target_running. Always allow the extended
16745 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16746 restart in extended mode.
16747 * README: Refer to the GDB manual. Update --attach usage.
16749 2007-12-20 Andreas Schwab <schwab@suse.de>
16751 * linux-low.c (STACK_SIZE): Define.
16752 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16753 (linux_test_for_tracefork): Likewise.
16755 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16757 * linux-low.c (linux_wait_for_event): Update messages. Do not
16758 reinsert auto-delete breakpoints.
16759 * mem-break.c (struct breakpoint): Change return type of handler to
16761 (set_breakpoint_at): Update handler type.
16762 (reinsert_breakpoint_handler): Return 1 instead of calling
16764 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16766 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16767 * mem-break.h (set_breakpoint_at): Update handler type.
16768 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16769 * win32-low.c (auto_delete_breakpoint): New.
16770 (get_child_debug_event): Use it.
16772 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16774 * configure.ac: Check for pread and pwrite.
16775 * hostio.c (handle_pread): Fall back to lseek and read.
16776 (handle_pwrite): Fall back to lseek and write.
16777 * config.in, configure: Regenerated.
16779 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16781 * server.c (myresume): Add own_buf argument.
16782 (main): Update calls.
16784 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16786 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16787 * remote-utils.c (remote_open): Do not call disable_async_io.
16788 (block_async_io): Delete.
16789 (unblock_async_io): Make static.
16790 (initialize_async_io): New.
16791 * server.c (handle_v_cont): Handle async I/O here.
16792 (myresume): Likewise. Move other common resume tasks here...
16793 (main): ... from here. Call initialize_async_io. Disable async
16794 I/O before the main loop.
16795 * server.h (initialize_async_io): Declare.
16796 (block_async_io, unblock_async_io): Delete prototypes.
16797 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16799 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16801 * remote-utils.c (readchar): Allow binary data in received messages.
16803 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16805 * win32-low.c (attaching): New global.
16806 (win32_create_inferior): Clear the `attaching' global.
16807 (win32_attach): Set the `attaching' global.
16808 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16809 attaching. Only set a breakpoint at the entry point if not
16812 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16814 * server.c (main): Don't report dll events on the initial
16815 connection on attaches.
16817 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16819 * server.c (main): Relax numerical bases supported for the pid of
16820 the --attach command line argument.
16822 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16824 * win32-low.c (win32_attach): Call OpenProcess before
16825 DebugActiveProcess, not after. Add last error output to error
16828 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16830 * win32-low.c (win32_get_thread_context)
16831 (win32_set_thread_context): New functions.
16832 (thread_rec): Use win32_get_thread_context.
16833 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16834 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16837 2007-12-03 Leo Zayas
16838 Pedro Alves <pedro_alves@portugalmail.pt>
16840 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16842 (child_add_thread): Minor cleanup.
16843 (child_continue): Resume artificially suspended threads before
16844 calling ContinueDebugEvent.
16845 (suspend_one_thread): New.
16846 (fake_breakpoint_event): New.
16847 (get_child_debug_event): Change return type to int. Check here if
16848 gdb sent an interrupt request. If a soft interrupt was requested,
16849 fake a breakpoint event. Return 0 if there is no event to handle,
16851 (win32_wait): Don't check here if gdb sent an interrupt request.
16852 Ensure there is a valid event to handle.
16853 (win32_request_interrupt): Add soft interruption method as last
16856 2007-12-03 Leo Zayas
16857 Pedro Alves <pedro_alves@portugalmail.pt>
16859 * win32-low.h (win32_thread_info): Add descriptions to the
16860 structure members. Replace `suspend_count' counter by a
16862 * win32-low.c (thread_rec): Update condition of when to get the
16863 context from the inferior. Rely on ContextFlags being set if it
16864 has already been retrieved. Only suspend the inferior thread if
16865 we haven't already. Warn if that fails.
16866 (continue_one_thread): s/suspend_count/suspended/. Only call
16867 ResumeThread once. Warn if that fails.
16869 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16871 * win32-low.c (win32_wait): Don't read from the inferior when it
16872 has already exited.
16874 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16876 * Makefile.in (win32_low_h): New variable.
16877 (win32-low.o): Add dependency on $(win32_low_h).
16878 (win32-arm-low.o, win32-i386-low.o): New rules.
16880 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16882 * hostio.c: Correct copyright year.
16884 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16886 * Makefile.in (OBS): Add hostio.o.
16887 (hostio.o): New rule.
16888 * server.h (handle_vFile): Declare.
16889 * hostio.c: New file.
16890 * server.c (handle_v_requests): Take packet_len and new_packet_len
16891 for binary packets. Call handle_vFile.
16892 (main): Update call to handle_v_requests.
16894 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16896 * linux-low.c: Include <sched.h>.
16898 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16900 * linux-low.c (linux_tracefork_grandchild): New.
16901 (linux_tracefork_child): Use clone.
16902 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16904 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16906 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16908 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16910 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16912 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16914 * inferiors.c (change_inferior_id): Delete.
16915 (add_pid_to_list, pull_pid_from_list): New.
16916 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16917 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16918 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16919 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16920 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16921 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16922 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16923 (using_threads): Always set to 1.
16924 (handle_extended_wait): New.
16925 (add_process): Do not set TID.
16926 (linux_create_inferior): Set must_set_ptrace_flags.
16927 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16928 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16929 (linux_thread_alive): Rename TID argument to LWPID.
16930 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16931 (linux_wait_for_event): Do not use TID or check using_threads. Update
16932 call to dead_thread_notify. Call handle_extended_wait.
16933 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16934 (send_sigstop): Delete sigstop_sent.
16935 (wait_for_sigstop): Avoid TID.
16936 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16937 (linux_test_for_tracefork): New.
16938 (linux_lookup_signals): Use thread_db_active and
16939 linux_supports_tracefork_flag.
16940 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16941 * linux-low.h (get_process_thread): Avoid TID.
16942 (struct process_ifo): Move thread_known and tid to the end. Remove
16944 (linux_attach_lwp, thread_db_init): Update prototypes.
16945 * server.h (change_inferior_id): Delete prototype.
16946 (add_pid_to_list, pull_pid_from_list): New prototypes.
16947 * thread-db.c (thread_db_use_events): New.
16948 (find_first_thread): Rename to...
16949 (find_one_thread): ...this. Update callers and messages. Do not
16950 call fatal. Check thread_db_use_events. Do not call
16951 change_inferior_id or new_thread_notify.
16952 (maybe_attach_thread): Update. Do not call new_thread_notify.
16953 (thread_db_init): Set thread_db_use_events. Check use_events.
16954 * utils.c (fatal, warning): Correct message prefix.
16956 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16958 * Makefile.in (clean): Remove new files.
16959 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16960 (powerpc-64.o, powerpc-64.c): New rules.
16961 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16962 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16964 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16966 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16967 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16968 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16969 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16970 (target_regsets): Add AltiVec and SPE register sets.
16971 * configure.ac: Check for AltiVec and SPE.
16972 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16973 (ppc_fill_vrregset, ppc_store_vrregset): New.
16974 (target_regsets): Add AltiVec register set.
16975 * configure: Regenerated.
16977 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16979 * linux-low.c (O_LARGEFILE): Define.
16980 (linux_read_memory): Use /proc/PID/mem.
16981 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16982 * configure, config.in: Regenerated.
16984 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16986 * linux-low.c (linux_wait_for_event): Do not pass signals while
16989 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16991 * win32-low.c (create_process): New.
16992 (win32_create_inferior): Use create_process instead of
16993 CreateProcess. If create_process failed retry appending an ".exe"
16994 suffix. Store the GetLastError result immediatelly after
16995 create_process calls and use it on the call to error.
16997 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16999 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17001 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17003 * configure.ac: Switch license to GPLv3.
17005 2007-08-01 Michael Snyder <msnyder@access-company.com>
17007 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17009 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17011 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17013 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17014 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17015 CloseToolhelp32Snapshot.
17016 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17017 CloseToolhelp32Snapshot.
17019 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17021 * server.c (main): Check for inferior exit before main loop.
17023 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17025 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17026 instead of on tmp_desc.
17028 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17029 Daniel Jacobowitz <dan@codesourcery.com>
17031 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17032 (add_thread): Minor cleanups.
17033 (clear_inferiors): Move lower in the file. Clear the DLL
17035 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17036 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17037 (xml_escape_text): New.
17038 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17040 (handle_v_cont): Report errors.
17041 (gdbserver_version): Update.
17042 (main): Correct size of own_buf. Do not report initial DLL events.
17043 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17044 (unloaded_dll, xml_escape_text): New.
17045 * win32-low.c (enum target_waitkind): Update comments.
17046 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17047 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17048 (win32_EnumProcessModules, win32_GetModuleInformation)
17049 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17050 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17051 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17052 (win32_Module32First, win32_Module32Next, load_toolhelp)
17053 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17054 (get_child_debug_event): Handle DLL events.
17055 (win32_wait): Likewise.
17057 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17059 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17060 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17062 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17064 * win32-low.c (handle_output_debug_string): Ignore event if not
17067 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17069 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17071 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17073 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17075 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17077 * inferiors.c (change_inferior_id): Add comment.
17078 * linux-low.c (check_removed_breakpoint): Add an early
17079 prototype. Improve debug output.
17080 (linux_attach): Doc update.
17081 (linux_detach_one_process, linux_detach): Clean up before releasing
17083 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17084 * linux-low.h (struct process_info): Doc improvement.
17085 * mem-break.c (delete_all_breakpoints): New.
17086 * mem-break.h (delete_all_breakpoints): New prototype.
17087 * thread-db.c (find_first_thread): New.
17088 (thread_db_create_event): Call it instead of
17089 thread_db_find_new_threads. Clean up unused variables.
17090 (maybe_attach_thread): Remove first thread handling.
17091 (thread_db_find_new_threads): Use find_first_thread.
17092 (thread_db_get_tls_address): Likewise.
17094 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17096 * thread-db.c (thread_db_find_new_threads): Add prototype.
17097 (thread_db_create_event): Check for the main thread before adding
17099 (maybe_attach_thread): Only enable event reporting if TID == 0.
17100 (thread_db_get_tls_address): Check for new threads.
17102 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17104 * linux-low.c (linux_create_inferior): Try execv before execvp.
17105 * spu-low.c (spu_create_inferior): Likewise.
17107 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17109 * linux-low.c (linux_create_inferior): Change execv to execvp.
17110 * spu-low.c (spu_create_inferior): Likewies.
17112 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17114 * Makefile.in (clean): Clean new files instead of deleted ones.
17115 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17116 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17118 * configure.srv: Specify XML files and new regformats for MIPS and
17120 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17121 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17122 an entry for the restart register.
17123 (mips_cannot_fetch_register, mips_cannot_store_register)
17124 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17125 register names to match the XML descriptions.
17126 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17127 restart register instead of $0.
17129 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17130 Markus Deuling <deuling@de.ibm.com>
17132 * remote-utils.c (decode_xfer_write): New function.
17133 * server.h (decode_xfer_write): Add prototype.
17134 * server.c (handle_query): Add PACKET_LEN argument. Support
17135 qXfer:spu:read and qXfer:spu:write packets.
17136 (main): Pass packet_len to handle_query.
17137 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17138 * target.h (target_ops): Add qxfer_spu.
17140 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17142 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17143 accessing non-seekable spufs files.
17145 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17147 * server.c (handle_query): Add reply for qC packet.
17149 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17150 Leo Zayas <lerele@champenstudios@com>
17152 * server.h (check_remote_input_interrupt_request): New function.
17153 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17154 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17155 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17156 (check_remote_input_interrupt_request): New function.
17157 * server.h (check_remote_input_interrupt_request): Declare.
17158 * win32-low.c (winapi_DebugBreakProcess,
17159 winapi_GenerateConsoleCtrlEvent): New typedefs.
17160 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17162 (win32_wait): Check for remote interrupt request
17163 with check_remote_input_interrupt_request.
17164 (win32_request_interrupt): New function.
17165 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17167 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17169 * win32-low.c (debug_registers_changed,
17170 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17171 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17172 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17173 (thread_rec): Get context using the low target.
17174 (child_add_thread): Call thread_added on the low target,
17175 which does the same thing.
17177 (do_initial_child_stuff): Remove debug registers references.
17178 Set context using the low target. Resume threads after
17179 setting the contexts.
17180 (child_continue): Remove dead variable. Remove debug
17181 registers references.
17182 (child_fetch_inferior_registers): Go through the low target.
17183 (do_child_store_inferior_registers): Remove.
17184 (child_store_inferior_registers): Go through the low target.
17185 (win32_resume): Remove debug registers references.
17186 Set context using the low target.
17187 (handle_exception): Change return type to void. Don't record
17188 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17189 first chance exception.
17190 (get_child_debug_event): Change return type to void. Remove
17191 goto loop. Always return after waiting for debug event.
17192 (win32_wait): Convert to switch statement. Handle spurious
17195 * win32-i386-low.c (debug_registers_changed,
17196 debug_registers_used): New.
17197 (initial_stuff): Rename to ...
17198 (i386_initial_stuff): ... this. Clear debug registers
17200 (store_debug_registers): Delete.
17201 (i386_get_thread_context): New.
17202 (load_debug_registers): Delete.
17203 (i386_set_thread_context): New.
17204 (i386_thread_added): New.
17205 (single_step): Rename to ...
17206 (i386_single_step): ... this.
17207 (do_fetch_inferior_registers): Rename to ...
17208 (i386_fetch_inferior_register): ... this.
17209 (i386_store_inferior_register): New.
17210 (the_low_target): Adapt to new interface.
17212 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17213 (arm_get_thread_context): New.
17214 (arm_set_thread_context): New.
17216 (do_fetch_inferior_registers): Rename to ...
17217 (arm_fetch_inferior_register): ... this.
17218 (arm_store_inferior_register): New.
17219 (arm_wince_breakpoint): Reimplement as unsigned long.
17220 (arm_wince_breakpoint_len): Define.
17221 (the_low_target): Adapt to new interface.
17223 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17224 load_debug_registers. Add get_thread_context, set_thread_context,
17225 thread_added and store_inferior_register. Rename
17226 fetch_inferior_registers to fetch_inferior_register.
17227 (regptr): Remove declaration.
17229 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17231 * linux-low.c (linux_detach): Change return type to int. Return 0.
17232 * spu-low.c (spu_detach): Likewise.
17234 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17236 * target.h (target_ops): Change return type of detach to int.
17238 (join_inferior): New.
17239 * server.c (main): Don't skip detach support on mingw32.
17240 If the inferior doesn't support detaching return error.
17241 Call join_inferior instead of using waitpid.
17242 * linux-low.c (linux_join): New.
17243 (linux_target_op): Add linux_join.
17244 * spu-low.c (spu_join): New.
17245 (spu_target_ops): Add spu_join.
17246 * win32-low.c (win32_detach): Adapt to new interface.
17247 Reopen current_process_handle before detaching. Issue a child
17248 resume before detaching.
17250 (win32_target_op): Add win32_join.
17252 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17254 * win32-low.c (win32-attach): Fix return value.
17255 * target.h (target_ops): Describe ATTACH return values.
17257 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17259 * win32-low.c (GETPROCADDRESS): Define.
17260 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17261 (winapi_DebugSetProcessKillOnExit): Likewise.
17262 (win32_create_inferior): Force usage of ansi CreateProcessA.
17263 (win32_attach): Use GETPROCADDRESS.
17264 (win32_detach): Likewise.
17266 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17268 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17270 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17272 * win32-low.c: Commit leftover changes from 2007-03-29.
17274 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17276 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17277 fields short instead of int. Add explicit padding.
17278 (i387_cache_to_fsave): Remove unnecessary casts.
17279 (i387_fsave_to_cache): Doc fix.
17280 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17282 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17284 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17285 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17287 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17289 * configure.srv (arm*-*-mingw32ce*): Move near the other
17292 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17294 * configure.ac: Add errno checking.
17295 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17296 sys/file.h and malloc.h.
17297 (AC_CHECK_DECLS): Add perror.
17298 (srv_mingwce): Handle.
17299 * configure.srv (i[34567]86-*-cygwin*): Add
17300 win32-i386-low.o to srv_tgtobj.
17301 (i[34567]86-*-mingw*): Likewise.
17302 (arm*-*-mingw32ce*): Add case.
17303 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17304 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17305 [__MINGW32CE__] (strerror): New function.
17306 [__MINGW32CE__] (errno): Define to GetLastError.
17307 [__MINGW32CE__] (COUNTOF): New macro.
17308 (remote_open): Remove extra close call.
17309 * mem-break.c (delete_breakpoint_at): New function.
17310 * mem-break.h (delete_breakpoint_at): Declare.
17311 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17312 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17313 [USE_WIN32API] (read, write): Add char* casts.
17314 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17315 * server.h: Include wincecompat.h on Windows CE.
17316 [HAVE_ERRNO_H]: Check.
17317 (perror): Declare if not declared.
17318 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17319 (perror_with_name): Remove errno declaration.
17320 * wincecompat.h: New.
17321 * wincecompat.c: New.
17322 * win32-low.h: New.
17323 * win32-arm-low.c: New.
17324 * win32-i386-low.c: New.
17325 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17326 (OUTMSG2): Make it safe.
17328 (COUNTOF): New macro.
17329 (NUM_REGS): Get it from the low target.
17330 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17331 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17332 (thread_rec): Let low target handle debug registers.
17333 (child_add_thread): Likewise.
17334 (child_init_thread_list): Likewise.
17335 (continue_one_thread): Likewise.
17337 (do_child_fetch_inferior_registers): Move to ...
17338 * win32-i386-low.c: ... here, and rename to ...
17339 (do_fetch_inferior_registers): ... this.
17340 * win32-low.c (child_fetch_inferior_registers):
17341 Go through the low target.
17342 (do_child_store_inferior_registers): Use regptr.
17343 (strwinerror): New function.
17344 (win32_create_inferior): Handle Windows CE.
17345 Use strwinerror instead of strerror on Windows error
17346 codes. Add program to the error output.
17347 Don't close the main thread handle on Windows CE.
17348 (win32_attach): Use coredll.dll on Windows CE.
17349 (win32_kill): Close current process and current
17351 (win32_detach): Use coredll.dll on Windows CE.
17352 (win32_resume): Let low target handle debug registers, and
17354 (handle_exception): Add/Remove initial breakpoint. Avoid
17355 non-existant WSTOPSIG on Windows CE.
17356 (win32_read_inferior_memory): Cast to remove warning.
17357 (win32_arch_string): Go through the low target.
17358 (initialize_low): Call set_breakpoint_data with the low
17359 target's breakpoint.
17360 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17361 FOP_REGNUM, mappings): Move to ...
17362 * win32-i386-low.c: ... here.
17363 * win32-low.c (win32_thread_info): Move to ...
17364 * win32-low.h: ... here.
17365 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17366 win32-arm-low.c and wincecompat.c.
17367 (all:): Add $EXEEXT.
17368 (install-only:): Likewise.
17369 (gdbserver:): Likewise.
17370 (gdbreplay:): Likewise.
17371 * config.in: Regenerate.
17372 * configure: Regenerate.
17374 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17376 * win32-low.c: Rename typedef thread_info to
17377 win32_thread_info throughout.
17379 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17381 * win32-i386-low.c: Rename to ...
17382 * win32-low.c: ... this.
17383 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17384 * Makefile.in: Likewise.
17386 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17388 * remote-utils.c (monitor_output): Constify msg parameter.
17389 * server.h (monitor_output): Likewise.
17390 * win32-i386-low.c (handle_output_debug_string): New.
17391 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17392 handle_output_debug_string.
17393 (get_child_debug_event): Likewise.
17395 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17397 * server.c (main): Correct strtoul check.
17399 2007-03-27 Jon Ringle <jon@ringle.org>
17401 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17403 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17405 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17407 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17409 * terminal.h: Check HAVE_SGTTY_H.
17411 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17413 * remote-utils.c (remote_open): Print out the assigned port number.
17415 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17417 * remote-utils.c (monitor_output): New function.
17418 * server.c (debug_threads): Define here.
17419 (monitor_show_help): New function.
17420 (handle_query): Handle qRcmd.
17421 (main): Do not handle 'd' packet.
17422 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17423 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17426 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17428 * Makefile.in (EXEEXT): New.
17429 (clean): Use $(EXEEXT).
17431 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17433 * target.h (target_ops): Rename send_signal to request_interrupt,
17434 and remove enum target_signal parameter.
17435 * linux-low.c (linux_request_interrupt): Rename from
17436 linux_send_signal, and always send SIGINT.
17437 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17438 and always send SIGINT.
17439 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17441 (input_interrupt): Likewise.
17443 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17445 * server.c (get_features_xml): Check if target implemented
17447 * win32-i386-low.c (win32_arch_string): New.
17448 (win32_target_ops): Add win32_arch_string as arch_string member.
17450 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17452 * spu-low.c (spu_arch_string): New.
17453 (spu_target_ops): Add spu_arch_string.
17455 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17457 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17458 * configure.ac: Do not check for terminal.h.
17459 * configure, config.in: Regenerated.
17461 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17463 * Makefile.in (OBS): Add $(XML_BUILTIN).
17464 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17466 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17467 (arm-with-iwmmxt.c): New.
17468 * config.in, configure: Regenerate.
17469 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17470 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17471 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17472 (arm*-*-linux*): Add iWMMXt and regset support.
17473 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17474 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17475 (arm_store_wmmxregset, target_regsets): New.
17476 * server.c (get_features_xml): Take annex argument. Check builtin
17478 (handle_query): Handle multiple annexes.
17480 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17482 * remote-utils.c [USE_WIN32API] (read, write): Define.
17483 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17486 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17488 * linux-i386-low.c (the_low_target): Set arch_string.
17489 * linux-x86-64-low.c (the_low_target): Likewise.
17490 * linux-low.c (linux_arch_string): New.
17491 (linux_target_ops): Add it.
17492 * linux-low.h (struct linux_target_ops): Add arch_string.
17493 * server.c (write_qxfer_response): Use const void * for DATA.
17494 (get_features_xml): New.
17495 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17496 * target.h (struct target_ops): Add arch_string method.
17498 2007-01-03 Denis Pilat <denis.pilat@st.com>
17499 Daniel Jacobowitz <dan@codesourcery.com>
17501 * linux-low.c (linux_kill): Handle being called with no threads.
17502 * win32-i386-low.c (win32_kill): Likewise.
17503 (get_child_debug_event): Clear current_process_handle.
17505 2006-12-30 Denis PILAT <denis.pilat@st.com>
17506 Daniel Jacobowitz <dan@codesourcery.com>
17508 * remote-utils.c (remote_open): Check the type of specified
17509 serial port devices before opening them.
17510 * server.c (main): Kill the inferior if an error occurs during
17511 the first remote_open.
17513 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17515 * README: Update supported targets.
17517 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17519 * Makefile.in (clean): Remove reg-mips64.c.
17520 (reg-mips64.c, reg-mips64.o): New rules.
17521 * configure.srv: Handle mips64. Include regset support for mips.
17522 * linux-mips-low.c (union mips_register): New.
17523 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17524 (mips_breakpoint, mips_breakpoint_at): Use int.
17525 (mips_collect_register, mips_supply_register)
17526 (mips_collect_register_32bit, mips_supply_register_32bit)
17527 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17528 (mips_store_fpregset, target_regsets): New.
17529 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17531 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17533 * configure.srv: Add target "spu*-*-*".
17534 * Makefile.in (clean): Remove reg-spu.c.
17535 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17536 * spu-low.c: New file.
17538 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17540 * configure.ac: Correct td_thr_tls_get_addr test.
17541 * configure: Regenerated.
17543 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17545 * linux-low.c (linux_wait_for_event): Reformat. Use the
17546 pass_signals array.
17547 * remote-utils.c (decode_address_to_semicolon): New.
17548 * server.c (pass_signals, handle_general_set): New.
17549 (handle_query): Mention QPassSignals for qSupported.
17550 (main): Call handle_general_set.
17551 * server.h (pass_signals, decode_address_to_semicolon): New.
17553 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17555 * server.c (handle_query): Correct error handling for read_auxv.
17557 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17559 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17560 and srv_linux_thread_db to yes.
17561 * linux-s390-low.c (s390_fill_gregset): New function.
17562 (target_regsets): Define data structure.
17564 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17566 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17567 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17568 * config.in, configure: Regenerated.
17569 * inferiors.c (gdb_id_to_thread): New function.
17570 (gdb_id_to_thread_id): Use it.
17571 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17572 * linux-low.h (struct process_info): Add th member.
17573 (thread_db_get_tls_address): New prototype.
17574 * remote-utils.c (decode_address): Make non-static.
17575 * server.c (handle_query): Handle qGetTLSAddr.
17576 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17577 * target.h (struct target_ops): Add get_tls_address.
17578 * thread-db.c (maybe_attach_thread): Save the thread handle.
17579 (thread_db_get_tls_address): New.
17581 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17583 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17584 (linux_resume_one_process): Take a siginfo_t *. Update all
17585 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17586 (struct pending_signals): Add a siginfo_t.
17587 (linux_wait_for_process): Always set last_status.
17588 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17589 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17590 * linux-low.h (struct process_info): Add last_status.
17592 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17594 * remote-utils.c (try_rle): New function.
17595 (putpkt_binary): Use it.
17597 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17599 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17600 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17601 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17602 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17603 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17606 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17608 * server.c (terminal_fd): New variable.
17609 (old_foreground_pgrp): Likewise.
17610 (restore_old_foreground_pgrp): New function.
17611 (start_inferior): Record the terminal file descriptor in terminal_fd
17612 and its original foreground group in old_foreground_pgrp. Register
17613 restore_old_foreground_pgrp with atexit().
17615 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17617 * server.c (handle_query): Correct qPart to qXfer.
17619 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17621 * configure.ac: Check for more headers which are missing on
17622 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17623 * configure.srv: Add Cygwin and mingw32.
17624 * remote-utils.c: Don't include headers unconditionally which
17625 are missing on mingw32. Include <winsock.h> for mingw32.
17626 (remote_open): Adjust for mingw32 support. Flush
17627 standard error after writing to it.
17628 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17629 (unblock_async_io, enable_async_io, disable_async_io)
17630 (readchar, getpkt): Update for Winsock support.
17631 (prepare_resume_reply): Expect a protocol signal number.
17632 * server.c: Disable <sys/wait.h> on mingw32.
17633 (start_inferior): Adjust for mingw32 support. Flush
17634 standard error after writing to it.
17635 (attach_inferior): Likewise. Use protocol signal
17637 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17639 * win32-i386-low.c: New file.
17640 * Makefile.in (XM_CLIBS): Set.
17641 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17642 (win32-i386-low.o): New dependency rule.
17643 * linux-low.c (linux_wait): Use target signal numbers.
17644 * target.h (struct target_ops): Doc fix.
17645 * server.h (target_signal_to_name): New prototype.
17646 * gdbreplay.c: Don't include headers unconditionally which
17647 are missing on mingw32. Include <winsock.h> for mingw32.
17648 (remote_close, remote_open): Adjust for Winsock support.
17649 * configure, config.in: Regenerated.
17651 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17653 * server.c (decode_xfer_read, write_qxfer_response): New.
17654 (handle_query): Take a packet length argument. Handle
17655 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17656 the qSupported response.
17657 (main): Update call to handle_query.
17659 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17661 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17662 (putpkt_binary): Renamed from putpkt and adjusted for binary
17664 (putpkt): New wrapper for putpkt_binary.
17665 (readchar): Don't mask off the high bit.
17666 (decode_X_packet): New function.
17667 * server.c (main): Call putpkt_binary if a handler sets the packet
17668 length. Save the length of the incoming packet. Handle 'X'.
17669 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17671 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17673 * server.c (handle_query): Handle qSupported.
17675 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17677 * remote-utils.c (all_symbols_looked_up): New variable.
17678 (look_up_one_symbol): Check it.
17679 * server.h (look_up_one_symbol): New declaration.
17680 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17682 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17684 * Makefile.in (linux-arm-low.o): Update dependencies.
17685 * linux-arm-low.c: Include "gdb_proc_service.h".
17686 (PTRACE_GET_THREAD_AREA): Define.
17687 (ps_get_thread_area): New function.
17689 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17691 * configure.srv (m68k*-*-uclinux*): New target.
17692 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17693 (linux_resume_one_process): Remove extraneous cast.
17694 (linux_read_offsets): New.
17695 (linux_target_op): Add linux_read_offsets on mmuless systems.
17696 * server.c (handle_query): Add qOffsets logic.
17697 * target.h (struct target_ops): Add read_offsets.
17699 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17701 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17702 (PTRACE_GET_THREAD_AREA): Define.
17703 (ps_get_thread_area): New function.
17704 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17705 (linux-x86-64-low.o): Update.
17707 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17709 * configure.ac: Remove checks for prfpregset_t.
17710 * gdb_proc_service.h: New file.
17711 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17712 new "gdb_proc_service.h".
17713 * proc-service.c: Likewise.
17714 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17715 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17716 * Makefile.in (gdb_proc_service_h): Updated.
17717 * configure, config.in: Regenerated.
17719 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17721 * remote-utils.c (prepare_resume_reply): Move declaration
17722 of gdb_id_from_wait to the top of the block.
17724 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17726 * linux-low.c (regsets_store_inferior_registers): Read the regset
17727 from the target before filling it.
17729 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17731 * server.c (attach_inferior): Return SIGTRAP for a successful
17734 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17736 * Makefile.in (OBS): Add version.o.
17737 (STAGESTUFF): Delete.
17738 (version.o): Add dependencies.
17739 (version.c): Replace rule.
17740 (clean): Remove version.c.
17741 * server.c (gdbserver_version): New.
17742 (gdbserver_usage): Use printf.
17743 (main): Handle --version and --help.
17744 * server.h (version, host_name): Add declarations.
17746 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17758 * linux-x86-64-low.c:
17760 * linux-s390-low.c:
17761 * linux-ppc64-low.c:
17763 * linux-mips-low.c:
17764 * linux-m68k-low.c:
17765 * linux-m32r-low.c:
17768 * linux-ia64-low.c:
17769 * linux-i386-low.c:
17770 * linux-crisv32-low.c:
17782 * gdbserver.1: Add (C) after Copyright. Update the FSF
17785 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17787 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17788 (arm_breakpoint_at): Recognize both breakpoints.
17789 (the_low_target): Use the correct breakpoint instruction.
17791 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17793 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17794 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17795 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17796 (the_low_target): Update.
17798 2005-10-25 Andreas Schwab <schwab@suse.de>
17800 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17802 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17803 (ia64_num_regs): Reduce to 462.
17805 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17807 * acinclude.m4: Correct quoting.
17808 * aclocal.m4: Regenerated.
17810 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17811 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17812 (thread_db_init): Call thread_db_err_str.
17813 * configure.ac: Check for TD_VERSION.
17814 * config.in, configure: Regenerated.
17816 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17818 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17820 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17822 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17823 is not available. Define HAVE_PTRACE_GETREGS if it is.
17824 * config.in, configure: Regenerated.
17825 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17826 * linux-i386-low.c, linux-m68k-low.c: Update to use
17827 HAVE_PTRACE_GETREGS.
17828 * linux-low.c (regsets_fetch_inferior_registers)
17829 (regsets_store_inferior_registers): Only return 0 if we processed
17831 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17832 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17834 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17836 * inferiors.c (struct thread_info): Add gdb_id.
17837 (add_thread): Add gdb_id argument.
17838 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17839 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17840 calls to add_thread.
17841 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17842 * server.c (handle_query): Use thread_to_gdb_id.
17843 (handle_v_cont, main): Use gdb_id_to_thread_id.
17844 * server.h (add_thread): Update prototype.
17845 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17848 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17850 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17851 left-padded registers.
17852 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17853 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17855 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17857 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17858 * configure: Regenerate.
17859 * config.in: Regenerate.
17860 * server.h (NEED_DECLARATION_STRERROR):
17861 Replace with !HAVE_DECL_STRERROR.
17863 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17865 * linux-low.c (linux_wait, linux_send_signal): Don't test
17866 an unsigned long variable for > 0 if it could be MAX_ULONG.
17867 * server.c (myresume): Likewise.
17868 * target.c (set_desired_inferior): Likewise.
17870 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17872 * configure.ac: Simplify and improve check for socklen_t.
17873 * configure, config.in: Regenerate.
17875 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17877 * acconfig.h: Remove.
17878 * configure.ac: Add a test for socklen_t. Use three-argument
17879 AC_DEFINE throughout.
17880 * config.in: Regenerated using autoheader 2.59.
17881 * configure: Regenerated.
17883 * gdbreplay.c (socklen_t): Provide a default.
17884 (remote_open): Use socklen_t.
17885 * remote-utils.c (socklen_t): Provide a default.
17886 (remote_open): Use socklen_t.
17887 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17890 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17892 * linux-low.c (linux_read_memory, linux_write_memory)
17893 (linux_read_auxv): Likewise.
17894 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17895 (check_mem_write): Likewise.
17896 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17898 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17899 (registers_from_string, register_data): Likewise.
17900 * server.c (handle_query, main): Likewise.
17901 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17902 (decode_M_packet): Likewise.
17903 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17904 * target.h (struct target_ops): Update read_memory, write_memory,
17906 (read_inferior_memory, write_inferior_memory): Update.
17907 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17908 to unsigned char *.
17909 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17910 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17911 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17912 linux-s390-low.c, linux-sh-low.c: Update for changes in
17913 read_inferior_memory and the_low_target->breakpoint.
17915 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17917 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17918 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17919 * configure.srv: Add powerpc64-*-linux*.
17920 * linux-ppc64-low.c: New file.
17922 2005-05-23 Orjan Friberg <orjanf@axis.com>
17924 * linux-cris-low.c: New file with support for CRIS.
17925 * linux-crisv32-low.c: Ditto for CRISv32.
17926 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17927 (clean): Add reg-cris.c and reg-crisv32.c.
17928 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17929 reg-crisv32.o, and reg-crisv32.c to make rules.
17930 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17931 recognized targets.
17933 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17935 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17936 of sizeof (PTRACE_XFER_TYPE).
17937 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17939 2005-05-12 Orjan Friberg <orjanf@axis.com>
17941 * target.h (struct target_ops): Add insert_watchpoint,
17942 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17943 pointers for hardware watchpoint support.
17944 * linux-low.h (struct linux_target_ops): Ditto.
17945 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17946 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17947 to linux_target_ops.
17948 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17950 * server.c (main): Recognize 'Z' and 'z' packets.
17952 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17954 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17955 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17956 (the_low_target): Add new members.
17958 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17960 * proc-service.c (ps_lgetregs): Search all_processes instead of
17963 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17965 * server.c (start_inferior): Change return type to int.
17966 (attach_inferior): Change sigptr to int *.
17967 (handle_v_cont, handle_v_requests): Change signal to int *.
17968 (main): Change signal to int.
17970 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17972 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17973 * configure.srv: Add m32r*-*-linux*.
17974 * linux-m32r-low.c: New file.
17976 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17978 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17980 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17982 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17983 Take unsigned long arguments for PIDs.
17984 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17985 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17986 (wait_for_sigstop, linux_resume_one_process)
17987 (regsets_fetch_inferior_registers, linux_send_signal)
17988 (linux_read_auxv): Likewise. Update the types of variables holding
17989 PIDs. Update format string specifiers.
17990 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17991 * remote-utils.c (prepare_resume_reply): Likewise.
17992 * server.c (cont_thread, general_thread, step_thread)
17993 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17995 (handle_query): Update format specifiers.
17996 (handle_v_cont, main): Use strtoul for thread IDs.
17997 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17998 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17999 (general_thread, step_thread, thread_from_wait)
18000 (old_thread_from_wait): Update.
18001 * target.h (struct thread_resume): Use unsigned long for THREAD.
18002 (struct target_ops): Use unsigned long for arguments to attach and
18005 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18007 * acinclude.m4: Include bfd/bfd.m4 directly.
18008 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18009 <agriffis@toolchain.org>.
18010 * aclocal.m4, configure: Regenerated.
18012 2005-01-07 Andrew Cagney <cagney@gnu.org>
18014 * configure.ac: Rename configure.in, require autoconf 2.59.
18015 * configure: Re-generate.
18017 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18019 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18020 LIBS when finished.
18021 * aclocal.m4: Regenerated.
18022 * configure: Regenerated.
18024 2004-11-21 Andreas Schwab <schwab@suse.de>
18026 * linux-m68k-low.c (m68k_num_gregs): Define.
18027 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18028 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18029 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18030 (m68k_breakpoint_at): New. Add to the_low_target.
18032 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18033 srv_linux_thread_db to yes.
18035 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18037 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18038 (ARCH_SET_FS): Likewise.
18039 (ARCH_GET_FS): Likewise.
18040 (ARCH_GET_GS): Likewise.
18042 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18044 * linux-i386-low.c (ps_get_thread_area): New.
18045 * linux-x86-64-low.c (ps_get_thread_area): New.
18046 * linux-low.c: Include <sys/syscall.h>.
18047 (linux_kill_one_process): Don't kill the first thread here.
18048 (linux_kill): Kill the first thread here.
18049 (kill_lwp): New function.
18050 (send_sigstop, linux_send_signal): Use it.
18051 * proc-service.c: Clean up #ifdefs.
18052 (fpregset_info): Delete.
18053 (ps_lgetregs): Update and enable implementation.
18054 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18056 * remote-utils.c (struct sym_cache, symbol_cache): New.
18057 (input_interrupt): Print a clearer message.
18058 (async_io_enabled): New variable.
18059 (enable_async_io, disable_async_io): Use it. Update comments.
18060 (look_up_one_symbol): Use the symbol cache.
18061 * thread-db.c (thread_db_look_up_symbols): New function.
18062 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18064 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18066 * configure.in: Test for -rdynamic.
18067 * configure: Regenerated.
18068 * Makefile (INTERNAL_LDFLAGS): New.
18069 (gdbserver, gdbreplay): Use it.
18071 2004-09-02 Andrew Cagney <cagney@gnu.org>
18073 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18075 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18077 * linux-low.c (linux_wait): Clear all_processes list also.
18079 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18081 * linux-low.c: Include <errno.h>. Remove extern declaration of
18084 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18086 * gdbreplay.c, server.h, utils.c: Update copyright years.
18088 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18090 * server.c (main): Print child status or termination signal from
18091 variable 'signal', not 'sig'.
18093 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18095 * linux-low.c (linux_read_memory): Change return type to
18096 int. Check for and return error from ptrace().
18097 * target.c (read_inferior_memory): Change return type to int. Pass
18098 back return status from the_target->read_memory().
18099 * target.h (struct target_ops): Adapt *read_memory() prototype.
18101 (read_inferior_memory): Adapt prototype.
18102 * server.c (main): Return an error packet if
18103 read_inferior_memory() returns an error.
18105 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18107 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18108 Unify with other clean targets.
18110 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18112 * server.c (handle_v_cont): Call set_desired_inferior.
18114 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18116 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18118 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18120 * linux-low.c (linux_wait): Unblock async I/O.
18121 (linux_resume): Block and enable async I/O.
18122 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18123 * server.h (block_async_io, unblock_async_io): Add prototypes.
18125 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18127 * remote-utils.c (remote_open): Print a status notice after
18128 opening a TCP port.
18129 * server.c (attach_inferior): Print a status notice after
18132 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18134 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18136 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18138 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18140 * server.c, target.h: Update copyright years.
18142 2004-02-25 Roland McGrath <roland@redhat.com>
18144 * target.h (struct target_ops): New member `read_auxv'.
18145 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18146 * linux-low.c (linux_read_auxv): New function.
18147 (linux_target_ops): Initialize `read_auxv' member to that.
18149 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18151 Committed by Jim Blandy <jimb@redhat.com>.
18153 * linux-s390-low.c (s390_num_regs): Update.
18154 (s390_regmap): Remove control registers. Use __s390x__ predefine
18155 instead of GPR_SIZE to distiguish s390 and s390x targets.
18157 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18159 * linux-low.c: Update copyright year.
18160 (check_removed_breakpoint): Clear pending_is_breakpoint.
18161 (linux_set_resume_request, linux_queue_one_thread)
18162 (resume_status_pending_p): New functions.
18163 (linux_continue_one_thread): Use process->resume.
18164 (linux_resume): Only resume threads if there are no pending events.
18165 * linux-low.h (struct process_info): Add resume request
18168 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18170 * regcache.c (new_register_cache): Clear the allocated register
18171 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18173 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18175 * linux-low.c (linux_resume): Take a struct thread_resume *
18177 (linux_wait): Update call.
18178 (resume_ptr): New static variable.
18179 (linux_continue_one_thread): Renamed from
18180 linux_continue_one_process. Use resume_ptr.
18181 (linux_resume): Use linux_continue_one_thread.
18182 * server.c (handle_v_cont, handle_v_requests): New functions.
18183 (myresume): New function.
18184 (main): Handle 'v' case.
18185 * target.h (struct thread_resume): New type.
18186 (struct target_ops): Change argument of "resume" to struct
18188 (myresume): Delete macro.
18190 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18192 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18193 (uninstall): Support DESTDIR.
18195 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18197 * configure.srv: Add xscale*linux copy of arm*linux entry.
18199 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18201 * linux-arm-low.c (arm_reinsert_addr): New function.
18202 (the_low_target): Add arm_reinsert_addr.
18204 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18206 * mem-break.c: Remove whitespace at end of file.
18208 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18210 * configure.in: Check whether we need to prototype strerror.
18211 * server.h: Optionally prototype strerror.
18212 * gdbreplay.c (perror_with_name): Use strerror.
18213 * linux-low.c (linux_attach_lwp): Use strerror.
18214 * utils.c (perror_with_name): Use strerror.
18215 * config.in, configure: Regenerated.
18217 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18219 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18220 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18222 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18224 * Makefile.in (SFILES): Update.
18225 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18226 low-sun3.c: Remove files.
18228 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18230 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18231 (linux_detach_one_process, linux_detach): New functions.
18232 (linux_target_ops): Add linux_detach.
18233 * server.c (main): Handle 'D' packet.
18234 * target.h (struct target_ops): Add "detach" member.
18235 (detach_inferior): Define.
18237 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18239 From Kelley Cook <kelleycook@wideopenwest.com>:
18240 * configure.srv: Accept i[34567]86 variants.
18242 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18244 * linux-low.c (linux_wait_for_event): Correct comment typos.
18245 (linux_resume_one_process): Call check_removed_breakpoint.
18246 (linux_send_signal): New function.
18247 (linux_target_ops): Add linux_send_signal.
18248 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18250 * target.h (struct target_ops): Add send_signal.
18252 2003-05-29 Jim Blandy <jimb@redhat.com>
18254 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18255 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18256 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18257 away part of the register's value.
18259 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18261 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18262 (linux_wait_for_event, linux_init_signals): Likewise.
18264 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18266 * configure.in: Check for stdlib.h.
18267 * configure: Regenerated.
18268 * config.in: Regenerated.
18270 2003-01-04 Andreas Schwab <schwab@suse.de>
18272 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18274 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18276 * Makefile.in: Remove obsolete code.
18278 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18280 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18281 defined(PT_FPR0_HI).
18283 2002-11-17 Stuart Hughes <seh@zee2.com>
18285 * linux-arm-low.c (arm_num_regs): Increase.
18286 (arm_regmap): Include status register.
18288 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18290 * linux-low.c (register_addr): Remove incorrect -1 check.
18292 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18294 * linux-low.c (linux_create_inferior): Call setpgid. Return
18296 (unstopped_p, linux_signal_pid): Remove.
18297 (linux_target_ops): Remove linux_signal_pid.
18298 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18299 global instead of target method.
18300 * target.h (struct target_ops): Remove signal_pid. Update comment
18301 for create_inferior.
18302 * server.c (signal_pid): New variable.
18303 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18304 gdbserver. Set the child to be the foreground process group.
18305 (attach_inferior): Set signal_pid.
18307 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18309 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18311 2002-08-20 Jim Blandy <jimb@redhat.com>
18313 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18316 2002-08-01 Andrew Cagney <cagney@redhat.com>
18318 * Makefile.in: Make chill references obsolete.
18320 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18322 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18323 * configure: Regenerate.
18324 * config.in: Regenerate.
18326 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18328 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18329 (perror_with_name, remote_close, remote_open, expect, play): Static.
18331 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18333 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18334 byte offsets instead of an array of indexes.
18335 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18337 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18339 * regcache.c: Add comment.
18341 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18343 * thread-db.c: New file.
18344 * proc-service.c: New file.
18345 * acinclude.m4: New file.
18346 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18347 proc-service.o, and thread-db.o.
18348 (linux-low.o): Add USE_THREAD_DB.
18349 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18350 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18351 * aclocal.m4: Regenerated.
18352 * config.in: Regenerated.
18353 * configure: Regenerated.
18354 * configure.in: Check for proc_service.h, sys/procfs.h,
18355 thread_db.h, and linux/elf.h headrs.
18356 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18357 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18358 Check for -lthread_db and thread support.
18359 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18360 PowerPC, and SuperH.
18361 * i387-fp.c: Constify arguments.
18362 * i387-fp.h: Likewise.
18363 * inferiors.c: (struct thread_info): Renamed from
18364 `struct inferior_info'. Remove PID member. Use generic inferior
18365 list header. All uses updated.
18366 (inferiors, signal_pid): Removed.
18367 (all_threads): New variable.
18368 (get_thread): Define.
18369 (add_inferior_to_list): New function.
18370 (for_each_inferior): New function.
18371 (change_inferior_id): New function.
18372 (add_inferior): Removed.
18373 (remove_inferior): New function.
18374 (add_thread): New function.
18375 (free_one_thread): New function.
18376 (remove_thread): New function.
18377 (clear_inferiors): Use for_each_inferior and free_one_thread.
18378 (find_inferior): New function.
18379 (find_inferior_id): New function.
18380 (inferior_target_data): Update argument type.
18381 (set_inferior_target_data): Likewise.
18382 (inferior_regcache_data): Likewise.
18383 (set_inferior_regcache_data): Likewise.
18384 * linux-low.c (linux_bp_reinsert): Remove.
18385 (all_processes, stopping_threads, using_thrads)
18386 (struct pending_signals, debug_threads, pid_of): New.
18387 (inferior_pid): Replace with macro.
18388 (struct inferior_linux_data): Remove.
18389 (get_stop_pc, add_process): New functions.
18390 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18391 Use add_process and add_thread.
18392 (linux_attach_lwp): New function, based on old linux_attach. Use
18393 add_process and add_thread. Set stop_expected for new threads.
18394 (linux_attach): New function.
18395 (linux_kill_one_process): New function.
18396 (linux_kill): Kill all LWPs.
18397 (linux_thread_alive): Use find_inferior_id.
18398 (check_removed_breakpoints, status_pending_p): New functions.
18399 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18400 Update. Use WNOHANG. Wait for cloned processes also. Update process
18401 struct for the found process.
18402 (linux_wait_for_event): New function.
18403 (linux_wait): Use it. Support LWPs.
18404 (send_sigstop, wait_for_sigstop, stop_all_processes)
18405 (linux_resume_one_process, linux_continue_one_process): New functions.
18406 (linux_resume): Support LWPs.
18407 (REGISTER_RAW_SIZE): Remove.
18408 (fetch_register): Use register_size instead. Call supply_register.
18409 (usr_store_inferior_registers): Likewise. Call collect_register.
18410 Fix recursive case.
18411 (regsets_fetch_inferior_registers): Improve error message.
18412 (regsets_store_inferior_registers): Add debugging.
18413 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18414 (unstopped_p, linux_signal_pid): New functions.
18415 (linux_target_ops): Add linux_signal_pid.
18416 (linux_init_signals): New function.
18417 (initialize_low): Call it. Initialize using_threads.
18418 * regcache.c (inferior_regcache_data): Add valid
18420 (get_regcache): Fetch registers lazily. Add fetch argument
18421 and update all callers.
18422 (regcache_invalidate_one, regcache_invalidate): New
18424 (new_register_cache): Renamed from create_register_cache.
18425 Return the new regcache.
18426 (free_register_cache): Change argument to a void *.
18427 (registers_to_string, registers_from_string): Call get_regcache
18428 with fetch flag set.
18429 (register_data): Make static. Pass fetch flag to get_regcache.
18430 (supply_register): Call get_regcache with fetch flag clear.
18431 (collect_register): Call get_regcache with fetch flag set.
18432 (collect_register_as_string): New function.
18433 * regcache.h: Update.
18434 * remote-utils.c (putpkt): Flush after debug output and use
18436 Handle input interrupts while waiting for an ACK.
18437 (input_interrupt): Use signal_pid method.
18438 (getpkt): Flush after debug output and use stderr.
18439 (outreg): Use collect_register_as_string.
18440 (new_thread_notify, dead_thread_notify): New functions.
18441 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18442 and general_thread.
18443 (look_up_one_symbol): Flush after debug output.
18444 * server.c (step_thread, server_waiting): New variables.
18445 (start_inferior): Don't use signal_pid. Update call to mywait.
18446 (attach_inferior): Update call to mywait.
18447 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18448 (main): Don't fetch/store registers explicitly. Use
18449 set_desired_inferior. Support proposed ``Hs'' packet. Update
18451 * server.h: Update.
18452 (struct inferior_list, struct_inferior_list_entry): New.
18453 * target.c (set_desired_inferior): New.
18454 (write_inferior_memory): Constify.
18455 (mywait): New function.
18456 * target.h: Update.
18457 (struct target_ops): New signal_pid method.
18458 (mywait): Removed macro, added prototype.
18460 * linux-low.h (regset_func): Removed.
18461 (regset_fill_func, regset_store_func): New.
18462 (enum regset_type): New.
18463 (struct regset_info): Add type field. Use new operation types.
18464 (struct linux_target_ops): stop_pc renamed to get_pc.
18465 Add decr_pc_after_break and breakpoint_at.
18466 (get_process, get_thread_proess, get_process_thread)
18467 (strut process_info, all_processes, linux_attach_lwp)
18468 (thread_db_init): New.
18470 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18471 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18472 (the_low_target): Add new members.
18473 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18474 (i386_store_fpxregset): Constify.
18475 (target_regsets): Add new kind identifier.
18476 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18477 (i386_set_pc): Add debugging.
18478 (i386_breakpoint_at): New function.
18479 (the_low_target): Add new members.
18480 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18481 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18482 (mips_breakpoint_at): New.
18483 (the_low_target): Add new members.
18484 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18485 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18486 (the_low_target): Add new members.
18487 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18488 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18489 (the_low_target): Add new members.
18490 * linux-x86-64-low.c (target_regsets): Add new kind
18493 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18495 From Martin Pool <mbp@samba.org>:
18496 * server.c (gdbserver_usage): New function.
18499 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18501 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18502 stop_at -> stop_pc.
18504 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18506 * Makefile.in: Remove obsolete code.
18508 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18510 * linux-low.c (regsets_fetch_inferior_registers),
18511 (regsets_store_inferior_registers): Removed cast to int from
18513 * regcache.h: Added declaration of struct inferior_info.
18515 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18517 * inferiors.c (struct inferior_info): Add regcache_data.
18518 (add_inferior): Call create_register_cache.
18519 (clear_inferiors): Call free_register_cache.
18520 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18521 * regcache.c (struct inferior_regcache_data): New.
18522 (registers): Remove.
18523 (get_regcache): New function.
18524 (create_register_cache, free_register_cache): New functions.
18525 (set_register_cache): Don't initialize the register cache here.
18526 (registers_to_string, registers_from_string, register_data): Call
18528 * regcache.h: Add prototypes.
18529 * server.h: Likewise.
18531 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18533 * mem-break.c: New file.
18534 * mem-break.h: New file.
18535 * Makefile.in: Add mem-break.o rule; update server.h
18537 * inferiors.c (struct inferior_info): Add target_data
18539 (clear_inferiors): Free target_data member if set.
18540 (inferior_target_data, set_inferior_target_data): New functions.
18541 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18542 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18543 * linux-low.c (linux_bp_reinsert): New variable.
18544 (struct inferior_linux_data): New.
18545 (linux_create_inferior): Use set_inferior_target_data.
18546 (linux_attach): Likewise. Call add_inferior.
18547 (linux_wait_for_one_inferior): New function.
18548 (linux_wait): Call it.
18549 (linux_write_memory): Add const.
18550 (initialize_low): Call set_breakpoint_data.
18551 * linux-low.h (struct linux_target_ops): Add breakpoint
18553 * server.c (attach_inferior): Remove extra add_inferior
18555 * server.h: Include mem-break.h. Update inferior.c
18557 * target.c (read_inferior_memory)
18558 (write_inferior_memory): New functions.
18559 * target.h (read_inferior_memory)
18560 (write_inferior_memory): Change macros to prototypes.
18561 (struct target_ops): Update comments. Add const to write_memory
18564 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18566 * linux-low.c (usr_store_inferior_registers): Support
18567 registers which are allowed to fail to store.
18568 * linux-low.h (linux_target_ops): Likewise.
18569 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18570 (ppc_cannot_store_register): FPSCR may not be storable.
18572 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18574 * server.h: Include <string.h> if HAVE_STRING_H.
18575 * ChangeLog: Correct paths in last ChangeLog entry.
18577 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18579 * linux-low.h: Remove obsolete prototypes.
18580 (struct linux_target_ops): New.
18581 (extern the_low_target): New.
18582 * linux-low.c (num_regs, regmap): Remove declarations.
18583 (register_addr): Use the_low_target explicitly.
18584 (fetch_register): Likewise.
18585 (usr_fetch_inferior_registers): Likewise.
18586 (usr_store_inferior_registers): Likewise.
18587 * linux-arm-low.c (num_regs): Remove.
18588 (arm_num_regs): Define.
18589 (arm_regmap): Renamed from regmap, made static.
18590 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18592 (arm_cannot_store_register): Renamed from cannot_store_register,
18594 (the_low_target): New.
18595 * linux-i386-low.c (num_regs): Remove.
18596 (i386_num_regs): Define.
18597 (i386_regmap): Renamed from regmap, made static.
18598 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18600 (i386_cannot_store_register): Renamed from cannot_store_register,
18602 (the_low_target): New.
18603 * linux-ia64-low.c (num_regs): Remove.
18604 (ia64_num_regs): Define.
18605 (ia64_regmap): Renamed from regmap, made static.
18606 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18608 (ia64_cannot_store_register): Renamed from cannot_store_register,
18610 (the_low_target): New.
18611 * linux-m68k-low.c (num_regs): Remove.
18612 (m68k_num_regs): Define.
18613 (m68k_regmap): Renamed from regmap, made static.
18614 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18616 (m68k_cannot_store_register): Renamed from cannot_store_register,
18618 (the_low_target): New.
18619 * linux-mips-low.c (num_regs): Remove.
18620 (mips_num_regs): Define.
18621 (mips_regmap): Renamed from regmap, made static.
18622 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18624 (mips_cannot_store_register): Renamed from cannot_store_register,
18626 (the_low_target): New.
18627 * linux-ppc-low.c (num_regs): Remove.
18628 (ppc_num_regs): Define.
18629 (ppc_regmap): Renamed from regmap, made static.
18630 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18632 (ppc_cannot_store_register): Renamed from cannot_store_register,
18634 (the_low_target): New.
18635 * linux-s390-low.c (num_regs): Remove.
18636 (s390_num_regs): Define.
18637 (s390_regmap): Renamed from regmap, made static.
18638 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18640 (s390_cannot_store_register): Renamed from cannot_store_register,
18642 (the_low_target): New.
18643 * linux-sh-low.c (num_regs): Remove.
18644 (sh_num_regs): Define.
18645 (sh_regmap): Renamed from regmap, made static.
18646 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18648 (sh_cannot_store_register): Renamed from cannot_store_register,
18650 (the_low_target): New.
18651 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18652 (the_low_target): New.
18654 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18656 * Makefile.in: Add stamp-h target.
18657 * configure.in: Create stamp-h.
18658 * configure: Regenerated.
18660 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18662 * inferiors.c: New file.
18663 * target.c: New file.
18664 * target.h: New file.
18665 * Makefile.in: Add target.o and inferiors.o. Update
18667 * linux-low.c (inferior_pid): New static variable,
18668 moved from server.c.
18669 (linux_create_inferior): Renamed from create_inferior.
18670 Call add_inferior. Return 0 on success instead of a PID.
18671 (linux_attach): Renamed from myattach.
18672 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18673 (linux_thread_alive): Renamed from mythread_alive.
18674 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18676 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18677 (regsets_store_inferior_registers): Correct error message.
18678 Add missing ``return 0''.
18679 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18680 (linux_store_registers): Renamed from store_inferior_registers.
18681 (linux_read_memory): Renamed from read_inferior_memory.
18682 (linux_write_memory): Renamed from write_inferior_memory.
18683 (linux_target_ops): New structure.
18684 (initialize_low): Call set_target_ops ().
18685 * remote-utils.c (unhexify): New function.
18686 (hexify): New function.
18687 (input_interrupt): Send signals to ``signal_pid''.
18688 * server.c (inferior_pid): Remove.
18689 (start_inferior): Update create_inferior call.
18690 (attach_inferior): Call add_inferior.
18691 (handle_query): New function.
18692 (main): Call handle_query for `q' packets.
18693 * server.h: Include "target.h". Remove obsolete prototypes.
18694 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18696 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18698 * Makefile.in: Add WARN_CFLAGS. Update configury
18700 * configure.in: Check for <string.h>
18701 * configure: Regenerate.
18702 * config.in: Regenerate.
18703 * gdbreplay.c: Include needed system headers.
18704 (remote_open): Remove strchr prototype.
18705 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18706 * regcache.c (supply_register): Change buf argument to const void *.
18707 (supply_register_by_name): Likewise.
18708 (collect_register): Change buf argument to void *.
18709 (collect_register_by_name): Likewise.
18710 * regcache.h: Add missing prototypes.
18711 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18712 * server.c (handle_query): New function.
18713 (attached): New static variable, moved out of main.
18714 (main): Quiet longjmp clobber warnings.
18715 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18716 * utils.c (error): Remove NORETURN.