1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's stopped_by_watchpoint and
4 stopped_data_address ops into methods of process_target.
6 * target.h (struct process_stratum_target): Remove the target ops.
7 (class process_target): Add the target ops.
8 * target.cc (process_target::stopped_by_watchpoint): Define.
9 (process_target::stopped_data_address): Define.
11 Update the derived classes and callers below.
13 * remote-utils.cc (prepare_resume_reply): Update.
14 * linux-low.cc (linux_target_ops): Update.
15 (linux_stopped_by_watchpoint): Turn into ...
16 (linux_process_target::stopped_by_watchpoint): ... this.
17 (linux_stopped_data_address): Turn into ...
18 (linux_process_target::stopped_data_address): ... this.
19 * linux-low.h (class linux_process_target): Update.
20 * lynx-low.cc (lynx_target_ops): Update.
21 * nto-low.cc (nto_target_ops): Update.
22 (nto_stopped_by_watchpoint): Turn into ...
23 (nto_process_target::stopped_by_watchpoint): ... this.
24 (nto_stopped_data_address): Turn into ...
25 (nto_process_target::stopped_data_address): ... this.
26 * nto-low.h (class nto_process_target): Update.
27 * win32-low.cc (win32_target_ops): Update.
28 (win32_stopped_by_watchpoint): Turn into ...
29 (win32_process_target::stopped_by_watchpoint): ... this.
30 (win32_stopped_data_address): Turn into ...
31 (win32_process_target::stopped_data_address): ... this.
32 * win32-low.h (class win32_process_target): Update.
34 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
36 Turn process_stratum_target's supports_hardware_single_step op into
37 a method of process_target.
39 * target.h (struct process_stratum_target): Remove the target op.
40 (class process_target): Add the target op.
41 (target_supports_hardware_single_step): Update the macro.
42 (target_can_do_hardware_single_step): Remove declaration.
43 * target.cc (process_target::supports_hardware_single_step): Define.
44 (target_can_do_hardware_single_step): Remove.
46 Update the derived classes and callers below.
48 * linux-low.h (class linux_process_target): Update.
49 * linux-low.cc (linux_target_ops): Update.
50 (linux_supports_hardware_single_step): Turn into ...
51 (linux_process_target::supports_hardware_single_step): ... this.
52 * lynx-low.h (class lynx_process_target): Update.
53 * lynx-low.cc (lynx_target_ops): Update.
54 (lynx_process_target::supports_hardware_single_step): Define.
55 * nto-low.h (class nto_process_target): Update.
56 * nto-low.cc (nto_target_ops): Update.
57 (nto_process_target::supports_hardware_single_step): Define.
58 * win32-low.h (class win32_process_target): Update.
59 * win32-low.cc (win32_target_ops): Update.
60 (win32_process_target::supports_hardware_single_step): Define.
62 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
64 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
65 ops into methods of process_target.
67 * target.h (struct process_stratum_target): Remove the target ops.
68 (class process_target): Add the target ops.
69 (target_stopped_by_hw_breakpoint): Update the macro.
70 (target_supports_stopped_by_hw_breakpoint): Update the macro.
71 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
72 (process_target::supports_stopped_by_hw_breakpoint): Define.
74 Update the derived classes and callers below.
76 * linux-low.cc (linux_target_ops): Update.
77 (linux_stopped_by_hw_breakpoint): Turn into ...
78 (linux_process_target::stopped_by_hw_breakpoint): ... this.
79 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
80 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
81 * linux-low.h (class linux_process_target): Update.
82 * lynx-low.cc (lynx_target_ops): Update.
83 * nto-low.cc (nto_target_ops): Update.
84 * win32-low.cc (win32_target_ops): Update.
86 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
88 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
89 ops into methods of process_target.
91 * target.h (struct process_stratum_target): Remove the target ops.
92 (class process_target): Add the target ops.
93 (target_stopped_by_sw_breakpoint): Update the macro.
94 (target_supports_stopped_by_sw_breakpoint): Update the macro.
95 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
96 (process_target::supports_stopped_by_sw_breakpoint): Define.
98 Update the derived classes and callers below.
100 * linux-low.cc (linux_target_ops): Update.
101 (linux_stopped_by_sw_breakpoint): Turn into ...
102 (linux_process_target::stopped_by_sw_breakpoint): ... this.
103 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
104 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
105 * linux-low.h (class linux_process_target): Update.
106 * lynx-low.cc (lynx_target_ops): Update.
107 * nto-low.cc (nto_target_ops): Update.
108 * win32-low.cc (win32_target_ops): Update.
110 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
112 Turn process_stratum_target's insert_point and remove_point ops
113 into methods of process_target.
115 * target.h (struct process_stratum_target): Remove the target ops.
116 (class process_target): Add the target ops.
117 * target.cc (process_target::insert_point): Define.
118 (process_target::remove_point): Define.
120 Update the derived classes and callers below.
122 * mem-break.cc (set_raw_breakpoint_at): Update.
123 (delete_raw_breakpoint): Update.
124 (uninsert_raw_breakpoint): Update.
125 (reinsert_raw_breakpoint): Update.
126 * linux-low.cc (linux_target_ops): Update.
127 (linux_insert_point): Turn into ...
128 (linux_process_target::insert_point): ... this.
129 (linux_remove_point): Turn into ...
130 (linux_process_target::remove_point): ... this.
131 * linux-low.h (class linux_process_target): Update.
132 * lynx-low.cc (lynx_target_ops): Update.
133 * nto-low.cc (nto_target_ops): Update.
134 (nto_insert_point): Turn into ...
135 (nto_process_target::insert_point): ... this.
136 (nto_remove_point): Turn into ...
137 (nto_process_target::remove_point): ... this.
138 * nto-low.h (class nto_process_target): Update.
139 * win32-low.cc (win32_target_ops): Update.
140 (win32_insert_point): Turn into ...
141 (win32_process_target::insert_point): ... this.
142 (win32_remove_point): Turn into ...
143 (win32_process_target::remove_point): ... this.
144 * win32-low.h (class win32_process_target): Update.
146 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
148 Turn process_stratum_target's supports_z_point_type op into a
149 method of process_target.
151 * target.h (struct process_stratum_target): Remove the target op.
152 (class process_target): Add the target op.
153 * target.cc (process_target::supports_z_point_type): Define.
155 Update the derived classes and callers below.
157 * mem-break.cc (z_type_supported): Update.
158 * linux-low.cc (linux_target_ops): Update.
159 (linux_supports_z_point_type): Turn into ...
160 (linux_process_target::supports_z_point_type): ... this.
161 * linux-low.h (class linux_process_target): Update.
162 * lynx-low.cc (lynx_target_ops): Update.
163 * nto-low.cc (nto_target_ops): Update.
164 (nto_supports_z_point_type): Turn into ...
165 (nto_process_target::supports_z_point_type): ... this.
166 * nto-low.h (class nto_process_target): Update.
167 * win32-low.cc (win32_target_ops): Update.
168 (win32_supports_z_point_type): Turn into ...
169 (win32_process_target::supports_z_point_type): ... this.
170 * win32-low.h (class win32_process_target): Update.
172 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
174 Turn process_stratum_target's read_auxv op into a method of
177 * target.h (class process_stratum_target): Remove the target op.
178 (struct process_target): Add the target op. Also add
179 'supports_read_auxv'.
180 * target.cc (process_target::read_auxv): Define.
181 (process_target::supports_read_auxv): Define.
183 Update the derived classes and callers below.
185 * server.cc (handle_qxfer_auxv): Update.
186 (handle_query): Update.
187 * linux-low.cc (linux_target_ops): Update.
188 (linux_process_target::supports_read_auxv): Define.
189 (linux_read_auxv): Turn into ...
190 (linux_process_target::read_auxv): ... this.
191 * linux-low.h (class linux_process_target): Update.
192 * lynx-low.cc (lynx_target_ops): Update.
193 * nto-low.cc (nto_target_ops): Update.
194 (nto_process_target::supports_read_auxv): Define.
195 (nto_read_auxv): Turn into ...
196 (nto_process_target::read_auxv): ... this.
197 * nto-low.h (class nto_process_target): Update.
198 * win32-low.cc (win32_target_ops): Update.
200 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
202 Turn process_stratum_target's request_interrupt op into a method of
205 * target.h (struct process_stratum_target): Remove the target op.
206 (class process_target): Add the target op.
208 Update the derived classes and callers below.
210 * remote-utils.cc (putpkt_binary_1): Update.
211 (input_interrupt): Update.
213 * server.cc (handle_v_requests): Update.
214 * linux-low.cc (linux_target_ops): Update.
215 (linux_request_interrupt): Turn into ...
216 (linux_process_target::request_interrupt): ... this.
217 * linux-low.h (class linux_process_target): Update.
218 * lynx-low.cc (lynx_target_ops): Update.
219 (lynx_request_interrupt): Turn into ...
220 (lynx_process_target::request_interrupt): ... this.
221 * lynx-low.h (class lynx_process_target): Update.
222 * nto-low.cc (nto_target_ops): Update.
223 (nto_request_interrupt): Turn into ...
224 (nto_process_target::request_interrupt): ... this.
225 * nto-low.h (class nto_process_target): Update.
226 * win32-low.cc (win32_target_ops): Update.
227 (win32_request_interrupt): Turn into ...
228 (win32_process_target::request_interrupt): ... this.
229 * win32-low.h (class win32_process_target): Update.
231 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
233 Turn process_stratum_target's look_up_symbols op into a method of
236 * target.h (struct process_stratum_target): Remove the target op.
237 (class process_target): Add the target op.
238 * target.cc (process_target::look_up_symbols): Define.
240 Update the derived classes and callers below.
242 * server.cc (handle_query): Update.
243 * linux-low.cc (linux_target_ops): Update.
244 (linux_look_up_symbols): Turn into ...
245 (linux_process_target::look_up_symbols): ... this.
246 * linux-low.h (class linux_process_target): Update.
247 * lynx-low.cc (lynx_target_ops): Update.
248 * nto-low.cc (nto_target_ops): Update.
249 * win32-low.cc (win32_target_ops): Update.
251 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
253 Turn process_stratum_target's read_memory and write_memory
254 ops into methods of process_target.
256 * target.h (struct process_stratum_target): Remove the target ops.
257 (class process_target): Add the target ops.
259 Update the derived classes and callers below.
261 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
262 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
263 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
264 (arm_get_syscall_trapinfo): Update.
265 * linux-cris-low.cc (cris_breakpoint_at): Update.
266 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
267 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
268 * linux-mips-low.cc (mips_breakpoint_at): Update.
269 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
270 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
271 * linux-sh-low.cc (sh_breakpoint_at): Update.
272 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
273 (sparc_store_gregset_from_stack): Update.
274 (sparc_breakpoint_at): Update.
275 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
276 * linux-tile-low.cc (tile_breakpoint_at): Update.
277 * linux-x86-low.cc (x86_breakpoint_at): Update.
278 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
279 * mem-brea.cc (insert_memory_breakpoint): Update.
280 (validate_inserted_breakpoint): Update.
281 * target.cc (read_inferior_memory): Update.
282 (target_write_memory): Update.
283 * linux-low.cc (linux_target_ops): Update.
284 (linux_read_memory): Make a wrapper around the read_memory target
286 (linux_process_target::read_memory): Rename from linux_read_memory.
287 (linux_write_memory): Turn into ...
288 (linux_process_target::write_memory): ... this.
289 * linux-low.h (class linux_process_target): Update.
290 * lynx-low.cc (lynx_target_ops): Update.
291 (lynx_read_memory): Turn into ...
292 (lynx_process_target::read_memory): ... this.
293 (lynx_write_memory): Turn into ...
294 (lynx_process_target::write_memory): ... this.
295 * lynx-low.h (class lynx_process_target): Update.
296 * nto-low.cc (nto_target_ops): Update.
297 (nto_read_memory): Turn into ...
298 (nto_process_target::read_memory): ... this.
299 (nto_write_memory): Turn into ...
300 (nto_process_target::write_memory): ... this.
301 * nto-low.h (class nto_process_target): Update.
302 * win32-low.cc (win32_target_ops): Update.
303 (win32_read_inferior_memory): Turn into ...
304 (win32_process_target::read_memory): ... this.
305 (win32_write_inferior_memory): Turn into ...
306 (win32_process_target::write_memory): ... this.
307 * win32-low.h (class win32_process_target): Update.
309 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
311 Turn process_stratum_target's prepare_to_access_memory and
312 done_accessing_memory ops into methods of process_target.
314 * target.h (struct process_stratum_target): Remove the target ops.
315 (class process_target): Add the target ops.
316 * target.cc (process_target::prepare_to_access_memory): Define.
317 (process_target::done_accessing_memory): Define.
318 (prepare_to_access_memory): Update.
319 (done_accessing_memory): Update.
321 Update the derived classes and callers below.
323 * linux-low.cc (linux_target_ops): Update.
324 (linux_prepare_to_access_memory): Turn into ...
325 (linux_process_target::prepare_to_access_memory): ... this.
326 (linux_done_accessing_memory): Turn into ...
327 (linux_process_target::done_accessing_memory): ... this.
328 * linux-low.h (class linux_process_target): Update.
329 * lynx-low.cc (lynx_target_ops): Update.
330 * nto-low.cc (nto_target_ops): Update.
331 * win32-low.cc (win32_target_ops): Update.
333 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
335 Turn process_stratum_target's fetch_registers and store_registers
336 ops into methods of process_target.
338 * target.h (struct process_stratum_target): Remove the target ops.
339 (class process_target): Add the target ops.
340 (fetch_inferior_registers): Update the macro.
341 (store_inferior_registers): Update the macro.
343 Update the derived classes and callers below.
345 * linux-low.cc (linux_target_ops): Update.
346 (linux_fetch_registers): Turn into ...
347 (linux_process_target::fetch_registers): ... this.
348 (linux_store_registers): Turn into ...
349 (linux_process_target::store_registers): ... this.
350 * linux-low.h (class linux_process_target): Update.
351 * lynx-low.cc (lynx_target_ops): Update.
352 (lynx_fetch_registers): Turn into ...
353 (lynx_process_target::fetch_registers): ... this.
354 (lynx_store_registers): Turn into ...
355 (lynx_process_target::store_registers): ... this.
356 * lynx-low.h (class lynx_process_target): Update.
357 * nto-low.cc (nto_target_ops): Update.
358 (nto_fetch_registers): Turn into ...
359 (nto_process_target::fetch_registers): ... this.
360 (nto_store_registers): Turn into ...
361 (nto_process_target::store_registers): ... this.
362 * nto-low.h (class nto_process_target): Update.
363 * win32-low.cc (win32_target_ops): Update.
364 (win32_fetch_inferior_registers): Turn into ...
365 (win32_process_target::fetch_registers): ... this.
366 (win32_store_inferior_registers): Turn into ...
367 (win32_process_target::store_registers): ... this.
368 * win32-low.h (class win32_process_target): Update.
370 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
372 Turn process_stratum_target's wait op into a method of
375 * target.h (struct process_stratum_target): Remove the target op.
376 (class process_target): Add the target op.
378 Update the derived classes and callers below.
380 * target.cc (target_wait): Update.
381 * linux-low.cc (linux_target_ops): Update.
382 (linux_wait): Turn into ...
383 (linux_process_target::wait): ... this.
384 * linux-low.h (class linux_process_target): Update.
385 * lynx-low.cc (lynx_target_ops): Update.
386 (lynx_wait): Turn into ...
387 (lynx_process_target::wait): ... this.
388 * lynx-low.h (class lynx_process_target): Update.
389 * nto-low.cc (nto_target_ops): Update.
390 (nto_wait): Turn into ...
391 (nto_process_target::wait): ... this.
392 * nto-low.h (class nto_process_target): Update.
393 * win32-low.cc (win32_target_ops): Update.
394 (win32_wait): Turn into ...
395 (win32_process_target::wait): ... this.
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 resume op into a method of
404 * target.h (struct process_stratum_target): Remove the target op.
405 (class process_target): Add the target op.
407 Update the derived classes and callers below.
409 * server.cc (resume): Update.
410 * target.cc (target_stop_and_wait): Update.
411 (target_continue_no_signal): Update.
412 (target_continue): Update.
413 * linux-low.cc (linux_target_ops): Update.
414 (linux_resume): Turn into ...
415 (linux_process_target::resume): ... this.
416 * linux-low.h (class linux_process_target): Update.
417 * lynx-low.cc (lynx_target_ops): Update.
418 (lynx_resume): Turn into ...
419 (lynx_process_target::resume): ... this.
420 * lynx-low.h (class lynx_process_target): Update.
421 * nto-low.cc (nto_target_ops): Update.
422 (nto_resume): Turn into ...
423 (nto_process_target::resume): ... this.
424 * nto-low.h (class nto_process_target): Update.
425 * win32-low.cc (win32_target_ops): Update.
426 (win32_resume): Turn into ...
427 (win32_process_target::resume): ... this.
428 (win32_process_target::detach): Update.
429 (do_initial_child_stuff): Update.
430 * win32-low.h (class win32_process_target): Update.
432 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
434 Turn process_stratum_target's thread_alive op into a method of
437 * target.h (struct process_stratum_target): Remove the target op.
438 (class process_target): Add the target op.
439 (mythread_alive): Update the macro.
441 Update the derived classes and callers below.
443 * linux-low.cc (linux_target_ops): Update.
444 (linux_thread_alive): Turn into ...
445 (linux_process_target::thread_alive): ... this.
446 (wait_for_sigstop): Update.
447 * linux-low.h (class linux_process_target): Update.
448 * lynx-low.cc (lynx_target_ops): Update.
449 (lynx_thread_alive): Turn into ...
450 (lynx_process_target::thread_alive): ... this.
451 * lynx-low.h (class lynx_process_target): Update.
452 * nto-low.cc (nto_target_ops): Update.
453 (nto_thread_alive): Turn into ...
454 (nto_process_target::thread_alive): ... this.
455 * nto-low.h (class nto_process_target): Update.
456 * win32-low.cc (win32_target_ops): Update.
457 (win32_thread_alive): Turn into ...
458 (win32_process_target::thread_alive): ... this.
459 * win32-low.h (class win32_process_target): Update.
461 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
463 Turn process_stratum_target's join op into a method of
466 * target.h (struct process_stratum_target): Remove the target op.
467 (class process_target): Add the target op.
468 (join_inferior): Update the macro.
470 Update the derived classes and callers below.
472 * linux-low.cc (linux_target_ops): Update.
473 (linux_join): Turn into ...
474 (linux_process_target::join): ... this.
475 * linux-low.h (class linux_process_target): Update.
476 * lynx-low.cc (lynx_target_ops): Update.
477 (lynx_join): Turn into ...
478 (lynx_process_target::join): ... this.
479 * lynx-low.h (class lynx_process_target): Update.
480 * nto-low.cc (nto_target_ops): Update.
481 (nto_process_target::join): Define.
482 * nto-low.h (class nto_process_target): Update.
483 * win32-low.cc (win32_target_ops): Update.
484 (win32_join): Turn into ...
485 (win32_process_target::join): ... this.
486 * win32-low.h (class win32_process_target): Update.
488 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
490 Turn process_stratum_target's mourn op into a method of
493 * target.h (struct process_stratum_target): Remove the target op.
494 (class process_target): Add the target op.
496 Update the derived classes and callers below.
498 * target.cc (target_mourn_inferior): Update.
499 * linux-low.cc (linux_target_ops): Update.
500 (linux_mourn): Turn into ...
501 (linux_process_target::mourn): ... this.
502 (handle_extended_wait): Update.
503 (linux_process_target::kill): Update.
504 (linux_process_target::detach): Update.
505 * linux-low.h (class linux_process_target): Update.
506 * lynx-low.cc (lynx_target_ops): Update.
507 (lynx_mourn): Turn into ...
508 (lynx_process_target::mourn): ... this.
509 * lynx-low.h (class lynx_process_target): Update.
510 * nto-low.cc (nto_target_ops): Update.
511 (nto_mourn): Turn into ...
512 (nto_process_target::mourn): ... this.
513 * nto-low.h (class nto_process_target): Update.
514 * win32-low.cc (win32_target_ops): Update.
515 (win32_mourn): Turn into ...
516 (win32_process_target::mourn): ... this.
517 * win32-low.h (class win32_process_target): Update.
519 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
521 Turn process_stratum_target's detach op into a method of
524 * target.h (struct process_stratum_target): Remove the target op.
525 (class process_target): Add the target op.
526 (detach_inferior): Update the macro.
528 Update the derived classes and callers below.
530 * linux-low.cc (linux_target_ops): Update.
531 (linux_detach): Turn into ...
532 (linux_process_target::detach): ... this.
533 * linux-low.h (class linux_process_target): Update.
534 * lynx-low.cc (lynx_target_ops): Update.
535 (lynx_detach): Turn into ...
536 (lynx_process_target::detach): ... this.
537 * lynx-low.h (class lynx_process_target): Update.
538 * nto-low.cc (nto_target_ops): Update.
539 (nto_detach): Turn into ...
540 (nto_process_target::detach): ... this.
541 * nto-low.h (class nto_process_target): Update.
542 * win32-low.cc (win32_target_ops): Update.
543 (win32_detach): Turn into ...
544 (win32_process_target::detach): ... this.
545 * win32-low.h (class win32_process_target): Update.
547 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
549 Turn process_stratum_target's kill op into a method of
552 * target.h (struct process_stratum_target): Remove the target op.
553 (class process_target): Add the target op.
555 Update the derived classes and callers below.
557 * target.cc (kill_inferior): Update.
558 * linux-low.cc (linux_target_ops): Update.
559 (linux_kill): Turn into ...
560 (linux_process_target::kill): ... this.
561 * linux-low.h (class linux_process_target): Update.
562 * lynx-low.cc (lynx_target_ops): Update.
563 (lynx_kill): Turn into ...
564 (lynx_process_target::kill): ... this.
565 * lynx-low.h (class lynx_process_target): Update.
566 * nto-low.cc (nto_target_ops): Update.
567 (nto_kill): Turn into ...
568 (nto_process_target::kill): ... this.
569 * nto-low.h (class nto_process_target): Update.
570 * win32-low.cc (win32_target_ops): Update.
571 (win32_kill): Turn into ...
572 (win32_process_target::kill): ... this.
573 * win32-low.h (class win32_process_target): Update.
575 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
577 Turn process_stratum_target's attach op into a method of
580 * target.h (struct process_stratum_target): Remove the target op.
581 (class process_target): Add the target op.
582 (myattach): Update the macro.
584 Update the derived classes and callers below.
586 * linux-low.cc (linux_target_ops): Update.
587 (linux_attach): Turn into ...
588 (linux_process_target::attach): ... this.
589 * linux-low.h (class linux_process_target): Update.
590 * lynx-low.cc (lynx_target_ops): Update.
591 (lynx_attach): Turn into ...
592 (lynx_process_target::attach): ... this.
593 * lynx-low.h (class lynx_process_target): Update.
594 * nto-low.cc (nto_target_ops): Update.
595 (nto_attach): Turn into ...
596 (nto_process_target::attach): ... this.
597 * nto-low.h (class nto_process_target): Update.
598 * win32-low.cc (win32_target_ops): Update.
599 (win32_attach): Turn into ...
600 (win32_process_target::attach): ... this.
601 * win32-low.h (class win32_process_target): Update.
603 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
605 Turn process_stratum_target's post_create_inferior op into a method
608 * target.h (struct process_stratum_target): Remove the target op.
609 (class process_target): Add the target op.
610 (target_post_create_inferior): Update the macro.
611 * target.cc (process_target::post_create_inferior): Define.
613 Update the derived classes and callers below.
615 * linux-low.cc (linux_target_ops): Update.
616 (linux_post_create_inferior): Turn into ...
617 (linux_process_target::post_create_inferior): ... this.
618 * linux-low.h (class linux_process_target): Update.
619 * lynx-low.cc (lynx_target_ops): Update.
620 * nto-low.cc (nto_target_ops): Update.
621 * win32-low.cc (win32_target_ops): Update.
623 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
625 Turn process_stratum_target's create_inferior op into a method of
628 * target.h (struct process_stratum_target): Remove the target op.
629 (class process_target): Add the target op.
630 (create_inferior): Rename the macro to ...
631 (target_create_inferior): ... this.
633 Update the derived classes and callers below.
635 * server.cc (handle_v_run): Update.
636 (captured_main): Update.
637 (process_serial_event): Update.
638 * linux-low.cc (linux_target_ops): Update.
639 (linux_create_inferior): Turn into ...
640 (linux_process_target::create_inferior): ... this.
641 * linux-low.h (class linux_process_target): Update.
642 * lynx-low.cc (lynx_target_ops): Update.
643 (lynx_create_inferior): Turn into ...
644 (lynx_process_target::create_inferior): ... this.
645 * lynx-low.h (class lynx_process_target): Update.
646 * nto-low.cc (nto_target_ops): Update.
647 (nto_create_inferior): Turn into ...
648 (nto_process_target::create_inferior): ... this.
649 * nto-low.h (class nto_process_target): Update.
650 * win32-low.cc (win32_target_ops): Update.
651 (win32_create_inferior): Turn into ...
652 (win32_process_target::create_inferior): ... this.
653 * win32-low.h (class win32_process_target): Update.
655 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
657 * target.h (class process_target): New class definition.
658 (struct process_stratum_target) <pt>: New field with type
660 * linux-low.h (class linux_process_target): Define as a derived
661 class of 'process_target'.
662 * linux-low.cc (linux_target_ops): Add a linux_process_target*
664 * lynx-low.h (class lynx_process_target): Define as a derived
665 class of 'process_target'.
666 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
668 * nto-low.h (class nto_process_target): Define as a derived
669 class of 'process_target'.
670 * nto-low.cc (nto_target_ops): Add an nto_process_target*
672 * win32-low.h (class win32_process_target): Define as a derived
673 class of 'process_target'.
674 * win32-low.cc (win32_target_ops): Add a win32_process_target*
677 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
679 * configure: Regenerate.
681 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
682 Andrew Burgess <andrew.burgess@embecosm.com>
684 * linux-riscv-low.cc: New file.
685 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
686 and nat/riscv-linux-tdesc.c.
687 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
688 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
691 2020-02-14 Tom Tromey <tom@tromey.com>
693 * acinclude.m4: Don't include acx_configure_dir.m4.
694 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
695 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
696 (all, install-only, uninstall, clean-info, clean)
697 (maintainer-clean): Don't recurse.
698 (subdir_do, all-lib): Remove.
699 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
701 (generated_files): Update.
702 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
703 * configure: Rebuild.
704 * configure.ac: Don't configure gnulib or libiberty.
707 2020-02-14 Eli Zaretskii <eliz@gnu.org>
709 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
710 preparing the command line for CreateProcess.
711 (win32_create_inferior): Reflect the program name in debugging
712 output that shows the process and its command line.
714 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
716 * Makefile.in: Rename source files from .c to .cc.
717 * %.c: Rename to %.cc.
718 * configure.ac: Rename server.c to server.cc.
719 * configure: Re-generate.
721 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
723 * Makefile.in: Rename gdbsupport source files from .c to .cc.
725 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
727 * win32-low.c (win32_create_inferior): Set signal_pid.
729 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
730 Pedro Alves <palves@redhat.com>
732 Skip building gdbserver in a cross-configuration.
733 * configure.srv: Set $gdbserver_host depending on whether $target
734 is $host. Use $gdbserver_host instead of $host.
736 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
738 * configure: Re-generate.
740 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
742 * configure: Re-generate.
744 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
746 * acinclude.m4: Update warning.m4 path.
748 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
750 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
751 (handle_exception): Set siginfo_er.
752 (win32_xfer_siginfo): New function.
754 2020-02-07 Tom Tromey <tom@tromey.com>
755 Pedro Alves <palves@redhat.com>
757 * README: Update build documentation.
758 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
760 * configure.ac: Update paths.
761 * configure: Rebuild.
762 * acinclude.m4: Update paths.
763 * Makefile.in: Update include paths.
764 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
765 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
766 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
767 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
768 (%-generated.c): Update paths.
769 * Move entire directory from ../gdb/gdbserver.
771 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
773 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
775 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
777 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
778 assignment instead of srv_linux_obj.
780 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
782 * server.c (handle_qxfer_libraries): Write segment-address with
785 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
787 * Makefile.in (install-strip): New target.
788 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
789 * aclocal.m4: Regenerate.
790 * configure: Regenerate.
791 * configure.ac: Add AM_PROG_INSTALL_STRIP.
793 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
795 * Makefile.in (SFILES): Adjust paths to point to real files.
796 (OBS): Move waitstatus.o to target/waitstatus.o.
797 (TAGS): Transform paths appropriately.
799 (nat/%.o): ... this pattern rule.
801 (target/%.o): ... this pattern rule.
802 * configure.srv: Adjust paths throughout to include nat/ prefix
803 with the revant files.
804 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
805 * configure: Regenerate.
807 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
809 * Makefile.in (TAGS): Remove config files from the recipe.
811 2020-01-14 Tom Tromey <tom@tromey.com>
813 * configure: Rebuild.
814 * configure.ac: Remove any checks that were added to common.m4.
815 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
818 2020-01-14 Tom Tromey <tom@tromey.com>
820 * server.h: Include config.h.
821 * gdbreplay.c: Include config.h.
822 * configure: Rebuild.
823 * configure.ac: Don't source common.host.
824 * acinclude.m4: Update path.
825 * Makefile.in (INCSUPPORT): New variable.
826 (INCLUDE_CFLAGS): Add INCSUPPORT.
827 (SFILES): Update paths.
828 (version-generated.c): Update path to create-version.sh.
829 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
831 2020-01-14 Tom Tromey <tom@tromey.com>
833 * configure.ac (LIBS): Use WIN32APILIBS.
834 (USE_WIN32API): Don't define.
835 * configure: Rebuild.
837 2020-01-14 Tom Tromey <tom@tromey.com>
839 * configure: Rebuild.
841 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
843 * Makefile.in (%-generated.c): Remove rule for files from
846 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
848 * configure: Re-generate.
850 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
852 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
854 * tracepoint.c (stop_tracing, flush_trace_buffer,
855 about_to_request_buffer_space, get_trace_state_variable_value,
856 set_trace_state_variable_value, gdb_collect): Add declaration.
858 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
860 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
861 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
862 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
863 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
864 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
867 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
869 * inferiors.c: Include gdbsupport/common-inferior.h.
871 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
873 * hostio-errno.c: Include hostio.h.
875 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
877 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
880 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
882 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
883 * linux-arm-tdesc.h: Include arch/arm.h.
885 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
887 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
889 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
891 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
892 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
894 2020-01-10 Pedro Alves <palves@redhat.com>
896 * fork-child.c (post_fork_inferior): Pass target down to
898 * inferiors.c (switch_to_thread): Add process_stratum_target
900 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
901 * nto-low.c (nto_target_ops): Now a process_stratum_target.
902 * linux-low.c (linux_target_ops): Now a process_stratum_target.
903 * remote-utils.c (prepare_resume_reply): Pass the target to
905 * target.c (the_target): Now a process_stratum_target.
906 (done_accessing_memory): Pass the target to switch_to_thread.
907 (set_target_ops): Ajust to use process_stratum_target.
908 * target.h (struct target_ops): Rename to ...
909 (struct process_stratum_target): ... this.
910 (the_target, set_target_ops): Adjust.
911 (prepare_to_access_memory): Adjust comment.
912 * win32-low.c (child_xfer_memory): Adjust to use
913 process_stratum_target.
914 (win32_target_ops): Now a process_stratum_target.
916 2020-01-06 Eli Zaretskii <eliz@gnu.org>
917 Pedro Alves <palves@redhat.com>
919 * win32-low.c (get_child_debug_event): Extract the fatal exception
920 from the exit status and convert to the equivalent Posix signal
922 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
923 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
925 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
927 * Makefile.in: Use INSTALL_PROGRAM_ENV.
929 2020-01-01 Joel Brobecker <brobecker@adacore.com>
931 * server.c (gdbserver_version): Change copyright year to 2020.
932 * gdbreplay.c (gdbreplay_version): Likewise.
934 2019-12-19 Christian Biesinger <cbiesinger@google.com>
936 * configure: Regenerate.
937 * configure.ac: Quote variable arguments of test.
939 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
941 * Makefile.in: Fix build with GNU Make 3.81
943 2019-12-16 Tom Tromey <tromey@adacore.com>
945 * server.c (get_exec_file): Constify result.
947 2019-12-10 Christian Biesinger <cbiesinger@google.com>
949 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
950 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
951 * config.in: Regenerate.
952 * configure: Regenerate.
953 * configure.ac: Don't check for strerror.
954 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
955 Call safe_strerror instead of strerror.
956 * server.h (strerror): Remove this now-unnecessary declaration.
957 * tracepoint.c (init_named_socket): Call safe_strerror instead of
959 (gdb_agent_helper_thread): Likewise.
960 * utils.c (perror_with_name): Likewise.
962 2019-11-26 Tom Tromey <tom@tromey.com>
964 * configure, config.in: Rebuild.
966 2019-11-26 Tom Tromey <tom@tromey.com>
968 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
969 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
971 * configure, config.in: Rebuild.
973 2019-11-26 Tom Tromey <tom@tromey.com>
975 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
976 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
977 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
978 * acinclude.m4: Include ax_pthread.m4.
979 * config.in, configure: Rebuild.
981 2019-11-26 Christian Biesinger <cbiesinger@google.com>
983 * debug.c (debug_set_output): Call safe_strerror instead of
985 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
986 (linux_kill_one_lwp): Likewise.
987 (linux_detach_one_lwp): Likewise.
988 (linux_wait_for_event_filtered): Likewise.
989 (store_register): Likewise.
990 * lynx-low.c (lynx_attach): Likewise.
991 * mem-break.c (insert_memory_breakpoint): Likewise.
992 (remove_memory_breakpoint): Likewise.
993 (delete_fast_tracepoint_jump): Likewise.
994 (set_fast_tracepoint_jump): Likewise.
995 (uninsert_fast_tracepoint_jumps_at): Likewise.
996 (reinsert_fast_tracepoint_jumps_at): Likewise.
997 * nto-low.c (nto_xfer_memory): Likewise.
998 (nto_resume): Likewise.
1000 2019-11-20 Luis Machado <luis.machado@linaro.org>
1002 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1003 instead of register count.
1004 * tdesc.c (tdesc_contains_feature): New function.
1005 * tdesc.h (tdesc_contains_feature): New prototype.
1007 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1009 * Makefile.in: Add safe-strerror.c.
1010 * configure: Regenerate.
1011 * configure.ac: Don't source common.host.
1013 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1015 * config.in: Regenerate.
1016 * configure: Regenerate.
1018 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1020 * ax.c (ax_printf): Handle size_t_arg.
1022 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1024 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1025 * mi/mi-main.c (output_cores): Likewise.
1026 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1027 (linux_xfer_osdata_modules): Likewise.
1028 * remote.c (register_remote_support_xml): Likewise.
1029 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1030 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1032 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1034 * configure: Regenerate.
1035 * configure.ac: Remove check for strerror_r.
1037 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1039 * config.in: Regenerate.
1040 * configure: Regenerate.
1041 * configure.ac: Also check for strerror_r.
1043 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1045 * ax.h (debug_agent): Remove duplicate declaration.
1047 2019-10-26 Tom de Vries <tdevries@suse.de>
1049 * linux-aarch64-low.c: Fix typos in comments.
1050 * linux-arm-low.c: Same.
1051 * linux-low.c: Same.
1052 * linux-ppc-low.c: Same.
1053 * proc-service.c: Same.
1056 * tracepoint.c: Same.
1057 * win32-low.c: Same.
1059 2019-10-25 Tom Tromey <tromey@adacore.com>
1061 * utils.c (xstrdup): Remove.
1063 2019-10-23 Tom Tromey <tom@tromey.com>
1065 * configure, config.in: Rebuild.
1067 2019-10-23 Tom Tromey <tom@tromey.com>
1069 * configure: Rebuild.
1070 * acinclude.m4: Use m4_include, not sinclude.
1072 2019-10-17 Tom Tromey <tromey@adacore.com>
1074 * configure: Rebuild.
1075 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1076 in AC_CONFIG_FILES invocation.
1077 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1080 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1082 * server.c: Include xml-builtin.h.
1083 (get_xml_features): Don't declare xml_builtins here.
1085 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1087 * Makefile.in: Remove references to vec-ipa.o.
1089 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1091 * Makefile.in: Remove references to vec.c.
1093 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1095 * server.c (server_waiting): Change to bool.
1096 (extended_protocol): Likewise.
1097 (response_needed): Likewise.
1098 (exit_requested): Likewise.
1099 (run_once): Likewise.
1100 (report_no_resumed): Likewise.
1101 (non_stop): Likewise.
1102 (disable_packet_vCont): Likewise.
1103 (disable_packet_Tthread): Likewise.
1104 (disable_packet_qC): Likewise.
1105 (disable_packet_qfThreadInfo): Likewise.
1106 (handle_general_set): Update.
1107 (handle_detach): Update.
1108 (handle_monitor_command): Update.
1109 (handle_query): Update.
1110 (captured_main): Update.
1111 (process_serial_event): Update.
1112 * server.h (server_waiting): Change to bool.
1113 (disable_packet_vCont): Likewise.
1114 (disable_packet_Tthread): Likewise.
1115 (disable_packet_qC): Likewise.
1116 (disable_packet_qfThreadInfo): Likewise.
1117 (run_once): Likewise.
1118 (non_stop): Likewise.
1119 * target.c (target_stop_and_wait): Update.
1121 2019-10-02 Tom Tromey <tromey@adacore.com>
1123 * Makefile.in (SFILES): Add common-inferior.c.
1124 (OBS): Add common-inferior.o.
1125 * server.c (startup_with_shell): Don't define.
1127 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1129 * linux-low.c (linux_low_read_btrace): Update for change to
1132 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1134 * debug.c (debug_threads): Remove comment in favor of the header.
1135 * debug.h (using_threads): Add declaration.
1136 (debug_threads): Add comment.
1137 * linux-aarch64-low.c: Include debug.h and remove declaration of
1139 * nto-low.c: Likewise.
1140 * remote-utils.c: Likewise.
1141 * thread-db.c: Likewise.
1143 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1145 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1146 and powerpc-cell64l-ipa.o.
1147 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1148 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1149 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1152 * spu-low.c: Remove file.
1154 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1155 (parse_spufs_run): Remove.
1156 (ppc_get_pc): Remove Cell/B.E. support.
1157 (ppc_set_pc): Likewise.
1158 (ppc_breakpoint_at): Likewise.
1159 (ppc_arch_setup): Likewise.
1160 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1161 tdesc_powerpc_cell32l.
1162 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1163 or init_registers_powerpc_cell32l.
1164 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1165 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1166 or init_registers_powerpc_cell32l.
1167 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1168 (init_registers_powerpc_cell32l): Remove prototype.
1169 (init_registers_powerpc_cell64l): Likewise.
1171 * target.h (struct target_ops): Remove qxfer_spu member.
1172 * server.c (handle_qxfer_spu): Remove.
1173 (qxfer_packets): Remove entry for "spu".
1174 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1175 * linux-low.c (SPUFS_MAGIC): Remove.
1176 (spu_enumerate_spu_ids): Remove.
1177 (linux_qxfer_spu): Remove.
1178 (linux_target_ops): Remove qxfer_spu member.
1179 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1180 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1181 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1183 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1185 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1186 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1187 * config.in: Regenerate.
1188 * configure: Regenerate.
1190 2019-08-15 Tom Tromey <tromey@adacore.com>
1192 * target.c (target_write_memory): Use gdb::byte_vector.
1194 2019-08-15 Tom Tromey <tromey@adacore.com>
1196 * tracepoint.c (write_inferior_data_pointer)
1197 (write_inferior_integer, write_inferior_int8)
1198 (write_inferior_uinteger, m_tracepoint_action_download)
1199 (r_tracepoint_action_download, x_tracepoint_action_download)
1200 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1201 (download_agent_expr, download_tracepoint_1)
1202 (download_trace_state_variables, upload_fast_traceframes): Update.
1203 * server.c (gdb_write_memory): Update.
1204 * remote-utils.c (relocate_instruction): Update.
1205 * proc-service.c (ps_pdwrite): Update.
1206 * mem-break.c (remove_memory_breakpoint)
1207 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1208 (uninsert_fast_tracepoint_jumps_at)
1209 (reinsert_fast_tracepoint_jumps_at): Update.
1210 * linux-x86-low.c (append_insns)
1211 (i386_install_fast_tracepoint_jump_pad)
1212 (amd64_write_goto_address, i386_write_goto_address): Update.
1213 * linux-s390-low.c (append_insns, s390_write_goto_address):
1215 * linux-ppc-low.c (ppc_relocate_instruction)
1216 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1217 (ppc_write_goto_address): Update.
1218 * linux-aarch64-low.c (append_insns): Update.
1219 * target.h (struct target_ops): Update.
1220 (write_inferior_memory): Don't declare.
1221 * target.c (target_write_memory): Rename from
1222 write_inferior_memory. Remove old target_write_memory.
1224 2019-08-15 Tom Tromey <tromey@adacore.com>
1226 * target.c (write_inferior_memory): Use std::vector.
1228 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1231 * configure.ac: Drop enable-libmcheck support.
1232 * configure, config.in: Rebuild.
1233 * acinclude.m4: Don't include it.
1235 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1237 * configure.srv: Remove Arm xml files.
1239 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1241 * configure.srv: Add new files. Remove xml generated files.
1242 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1244 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1245 * linux-aarch32-tdesc.c: New file.
1246 * linux-aarch32-tdesc.h: New file.
1247 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1248 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1249 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1250 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1251 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1252 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1253 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1254 (arm_read_description): Call arm_linux_read_description.
1255 (initialize_low_arch): Don't init registers.
1256 * linux-arm-tdesc.c: New file.
1257 * linux-arm-tdesc.h: New file.
1259 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1261 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1262 Move counter inside for.
1263 (arm_read_description): Check ptrace earlier.
1264 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1266 2019-07-09 Tom Tromey <tom@tromey.com>
1268 * configure: Rebuild.
1269 * configure.ac: Change common to gdbsupport.
1270 * acinclude.m4: Change common to gdbsupport.
1271 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1272 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1273 common to gdbsupport.
1274 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1275 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1276 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1277 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1278 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1279 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1280 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1281 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1282 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1283 common to gdbsupport.
1285 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1287 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1289 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1291 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1293 * configure.srv: Remove legacy xml.
1294 * linux-aarch64-low.c (initialize_low_arch): Remove
1295 initialize_low_tdesc call.
1296 * linux-aarch64-tdesc-selftest.c: Remove file.
1297 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1298 * linux-x86-low.c (initialize_low_arch): Remove
1299 initialize_low_tdesc call.
1300 * linux-x86-tdesc-selftest.c: Remove file.
1301 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1303 2019-06-20 Tom de Vries <tdevries@suse.de>
1305 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1306 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1308 2019-06-19 Tom de Vries <tdevries@suse.de>
1310 * debug.h (debug_write): Change return type to ssize_t.
1311 * debug.c (debug_write): Same.
1313 2019-06-14 Tom Tromey <tom@tromey.com>
1315 * configure.ac: Use new path to gnulib.
1316 * configure: Rebuild.
1317 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1320 2019-06-11 Tom Tromey <tom@tromey.com>
1322 * Makefile.in (SFILES): Add alloc.c.
1324 (IPA_OBJS): Add alloc-ipa.o.
1325 (alloc-ipa.o): New target.
1326 (%.o: ../%.c): New pattern rule.
1328 2019-06-10 Tom Tromey <tromey@adacore.com>
1330 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1331 end warning with a newline.
1332 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1334 * thread-db.c (attach_thread): Don't end warning with a newline.
1335 (thread_db_notice_clone): Likewise.
1336 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1338 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1339 end warning with a newline.
1341 2019-06-04 Pedro Alves <palves@redhat.com>
1343 * server.c (captured_main): Use make_unique_xstrdup.
1345 2019-06-02 Tom Tromey <tom@tromey.com>
1347 * gdbreplay.c (fromhex): Remove.
1348 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1350 2019-05-29 Tom Tromey <tromey@adacore.com>
1352 * configure: Rebuild.
1354 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1356 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1357 sign extension code on 32-bit builds.
1359 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1362 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1364 2019-04-19 Tom Tromey <tom@tromey.com>
1366 * server.c (struct vstop_notif): Derive from notif_event.
1368 (queue_stop_reply): Update.
1369 (remove_all_on_match_ptid): Change type. Rewrite.
1370 (discard_queued_stop_replies): Rewrite.
1371 (in_queued_stop_replies_ptid): Change type.
1372 (in_queued_stop_replies): Rewrite.
1373 (notif_stop): Update.
1374 (queue_stop_reply_callback): Update.
1375 (captured_main): Don't call initialize_notif.
1376 (push_stop_notification): Update.
1377 * notif.c (notif_write_event, handle_notif_ack)
1378 (notif_event_enque, notif_push): Update.
1379 (notif_event_xfree, initialize_notif): Remove.
1380 * notif.h (struct notif_event): Include <list>, not
1382 (struct notif_server) <queue>: Now a std::list.
1383 (notif_event_p): Remove typedef.
1384 (initialize_notif): Don't declare.
1385 (struct notif_event): Add virtual destructor.
1387 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1389 * ax.c (ax_vdebug): Call debug_printf.
1390 * debug.c (debug_write): New function.
1391 * debug.h (debug_write): New declaration.
1392 * linux-low.c (sigchld_handler): Call debug_write.
1394 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1396 * debug.c (debug_set_output): New function.
1397 (debug_vprintf): Send output to debug_file.
1398 (debug_flush): Likewise.
1399 * debug.h (debug_set_output): New declaration.
1400 * server.c (handle_monitor_command): Add debug-file option.
1401 (captured_main): Likewise.
1403 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1405 * debug.c (remote_debug): Add definition.
1406 * debug.h (remote_debug): Add declaration.
1407 * hostio.c (remote_debug): Remove declaration.
1408 * remote-utils.c (struct ui_file): Likewise.
1409 (remote_debug): Likewise.
1410 * remote-utils.h (remote_debug): Likewise,
1411 * server.c (remote_debug): Remove definition.
1413 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1415 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1416 when using a 64-bit gdbserver.
1418 2019-04-09 Tom Tromey <tromey@adacore.com>
1420 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1422 2019-04-08 Tom Tromey <tom@tromey.com>
1424 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1426 (linux_resume_one_lwp): Likewise.
1428 2019-04-08 Tom Tromey <tom@tromey.com>
1430 * gdbreplay.c: Update.
1431 * linux-low.c: Update.
1434 2019-04-08 Tom Tromey <tom@tromey.com>
1436 * server.c: Use C++ exception handling.
1437 * linux-low.c: Use C++ exception handling.
1438 * gdbreplay.c: Use C++ exception handling.
1440 2019-04-08 Tom Tromey <tom@tromey.com>
1442 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1443 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1444 (captured_main, main): Update.
1445 * gdbreplay.c (main): Update.
1447 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1449 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1450 value in argument pointer, return 1 if the entry is found and 0
1451 otherwise. Move comment.
1452 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1453 * linux-low.h (linux_get_auxv): Declare.
1454 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1456 2019-04-05 Tom Tromey <tromey@adacore.com>
1458 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1461 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1463 * linux-low.c (AT_HWCAP2): Add define if not already included.
1465 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1467 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1468 (aarch64_arch_setup): Call linux_get_hwcap.
1469 * linux-arm-low.c (arm_get_hwcap): Remove function.
1470 (arm_read_description): Call linux_get_hwcap.
1471 * linux-low.c (linux_get_auxv): New function.
1472 (linux_get_hwcap): Likewise.
1473 (linux_get_hwcap2): Likewise.
1474 * linux-low.h (linux_get_hwcap): New declaration.
1475 (linux_get_hwcap2): Likewise.
1476 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1477 (ppc_arch_setup): Call linux_get_hwcap.
1478 * linux-s390-low.c (s390_get_hwcap): Remove function.
1479 (s390_arch_setup): Call linux_get_hwcap.
1481 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1482 Jiong Wang <jiong.wang@arm.com>
1484 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1485 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1487 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1489 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1490 Jiong Wang <jiong.wang@arm.com>
1492 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1493 (aarch64_get_hwcap): New function.
1494 (aarch64_arch_setup): Read APIA hwcap.
1496 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1497 Jiong Wang <jiong.wang@arm.com>
1499 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1500 (initialize_low_tracepoint): Likewise.
1501 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1502 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1503 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1504 (aarch64_linux_read_description): Likewise.
1505 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1507 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1509 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1510 i386_create_target_description for 'segments' parameter.
1511 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1512 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1513 * win32-i386-low.c (i386_arch_setup): Likewise.
1515 2019-03-12 Tom Tromey <tromey@adacore.com>
1517 * linux-low.c (iterate_over_lwps): Update.
1519 2019-03-06 Tom Tromey <tom@tromey.com>
1521 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1522 (captured_main): Use SCOPE_EXIT.
1524 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1526 * configure.srv: Use '$enable_unittest' instead of '$development'
1527 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1530 2019-02-27 Tom Tromey <tromey@adacore.com>
1532 * gdbreplay.c (logchar): Handle \r\n.
1534 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1536 * linux-low.c (linux_attach): Add process before lwp.
1537 * server.c (attach_inferior): Check if already attached.
1539 2019-02-07 Tom Tromey <tom@tromey.com>
1541 * x86-tdesc.h: Rename include guard.
1542 * x86-low.h: Add include guard.
1543 * wincecompat.h: Rename include guard.
1544 * win32-low.h: Add include guard.
1545 * utils.h: Rename include guard.
1546 * tracepoint.h: Rename include guard.
1547 * tdesc.h: Rename include guard.
1548 * target.h: Rename include guard.
1549 * server.h: Rename include guard.
1550 * remote-utils.h: Rename include guard.
1551 * regcache.h: Rename include guard.
1552 * nto-low.h: Rename include guard.
1553 * notif.h: Add include guard.
1554 * mem-break.h: Rename include guard.
1555 * lynx-low.h: Add include guard.
1556 * linux-x86-tdesc.h: Add include guard.
1557 * linux-s390-tdesc.h: Add include guard.
1558 * linux-ppc-tdesc-init.h: Add include guard.
1559 * linux-low.h: Add include guard.
1560 * linux-aarch64-tdesc.h: Add include guard.
1561 * linux-aarch32-low.h: Add include guard.
1562 * inferiors.h: Rename include guard.
1563 * i387-fp.h: Rename include guard.
1564 * hostio.h: Rename include guard.
1565 * gdbthread.h: Rename include guard.
1566 * gdb_proc_service.h: Rename include guard.
1567 * event-loop.h: Rename include guard.
1568 * dll.h: Rename include guard.
1569 * debug.h: Rename include guard.
1570 * ax.h: Rename include guard.
1572 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1575 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1576 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1578 2019-01-25 Tom Tromey <tom@tromey.com>
1580 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1582 2019-01-25 Tom Tromey <tom@tromey.com>
1584 * win32-low.c: Fix common/ includes.
1585 * win32-i386-low.c: Fix common/ includes.
1586 * tracepoint.c: Fix common/ includes.
1587 * thread-db.c: Fix common/ includes.
1588 * target.h: Fix common/ includes.
1589 * symbol.c: Fix common/ includes.
1590 * spu-low.c: Fix common/ includes.
1591 * server.h: Fix common/ includes.
1592 * server.c: Fix common/ includes.
1593 * remote-utils.c: Fix common/ includes.
1594 * regcache.h: Fix common/ includes.
1595 * regcache.c: Fix common/ includes.
1596 * nto-x86-low.c: Fix common/ includes.
1597 * notif.h: Fix common/ includes.
1598 * mem-break.h: Fix common/ includes.
1599 * lynx-low.c: Fix common/ includes.
1600 * lynx-i386-low.c: Fix common/ includes.
1601 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1602 * linux-x86-low.c: Fix common/ includes.
1603 * linux-low.c: Fix common/ includes.
1604 * inferiors.h: Fix common/ includes.
1605 * i387-fp.c: Fix common/ includes.
1606 * hostio.c: Fix common/ includes.
1607 * hostio-errno.c: Fix common/ includes.
1608 * gdbthread.h: Fix common/ includes.
1609 * gdbreplay.c: Fix common/ includes.
1610 * fork-child.c: Fix common/ includes.
1611 * event-loop.c: Fix common/ includes.
1613 (enum gdb_agent_op): Fix common/ includes.
1615 2019-01-21 Tom Tromey <tom@tromey.com>
1617 * tracepoint.c: Fix includes.
1618 * remote-utils.c: Fix includes.
1619 * linux-x86-low.c: Fix includes.
1621 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1623 * gdbreplay.c (gdbreplay_version): Update copyright year in
1625 * server.c (gdbserver_version): Likewise.
1627 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1629 * linux-low.c (add_lwp): Switch ordering.
1631 2018-11-29 Tom Tromey <tom@tromey.com>
1633 * win32-low.c (win32_join): Take pid, not process.
1634 * target.h (struct target_ops) <join>: Change argument type.
1635 (join_inferior): Change argument name.
1636 * spu-low.c (spu_join): Take pid, not process.
1637 * server.c (handle_detach): Preserve pid before destroying
1639 * lynx-low.c (lynx_join): Take pid, not process.
1640 * linux-low.c (linux_join): Take pid, not process.
1642 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1644 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1645 (aarch64_cannot_fetch_register): Likewise.
1646 (struct linux_target_ops): Update references.
1648 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1650 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1652 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1654 * configure.srv (ipa_ppc_linux_regobj): Add
1655 powerpc-isa207-htm-vsx32l-ipa.o and
1656 powerpc-isa207-htm-vsx64l-ipa.o.
1657 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1658 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1659 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1660 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1661 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1662 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1663 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1664 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1665 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1666 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1667 (init_registers_powerpc_isa207_htm_vsx32l)
1668 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1669 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1670 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1671 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1672 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1673 (ppc_store_tm_ctarregset): New functions.
1674 (ppc_regsets): Add entries for HTM regsets.
1675 (ppc_arch_setup): Set htm in features struct when needed. Set
1676 sizes for the HTM regsets.
1677 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1678 (initialize_low_arch): Call
1679 init_registers_powerpc_isa207_htm_vsx32l and
1680 init_registers_powerpc_isa207_htm_vsx64l.
1681 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1682 PPC_TDESC_ISA207_HTM_VSX.
1683 (initialize_low_tracepoint): Call
1684 init_registers_powerpc_isa207_htm_vsx32l and
1685 init_registers_powerpc_isa207_htm_vsx64l.
1687 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1689 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1690 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1691 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1692 (ppc_store_pmuregset): New functions.
1693 (ppc_regsets): Add entries for ebb and pmu regsets.
1694 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1695 pmu regsets are available. Set sizes for these regsets.
1697 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1699 * configure.srv (ipa_ppc_linux_regobj): Add
1700 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1701 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1702 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1703 rs6000/powerpc-isa207-vsx32l.xml, and
1704 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1705 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1706 <PPC_TDESC_ISA207_VSX>: New enum value.
1707 (init_registers_powerpc_isa207_vsx32l): Declare.
1708 (init_registers_powerpc_isa207_vsx64l): Declare.
1709 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1710 (ppc_store_tarregset): New function.
1711 (ppc_regsets): Add entry for the TAR regset.
1712 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1713 size for the TAR regsets.
1714 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1715 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1716 and init_registers_powerpc_isa207_vsx64l.
1717 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1718 (initialize_low_tracepoint): Call
1719 init_registers_powerpc_isa207_vsx32l and
1720 init_registers_powerpc_isa207_vsx64l.
1722 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1723 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1725 * configure.srv (ipa_ppc_linux_regobj): Add
1726 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1727 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1728 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1729 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1730 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1731 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1732 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1733 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1734 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1735 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1736 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1737 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1738 (ppc_hwcap): Add comment.
1739 (ppc_hwcap2): New global.
1740 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1741 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1742 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1743 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1744 when needed. Set sizes for the the DSCR and PPR regsets.
1745 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1746 (initialize_low_arch): Call
1747 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1748 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1749 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1750 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1751 (initialize_low_tracepoint): Call
1752 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1753 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1755 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1757 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1759 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1760 Simon Marchi <simark@simark.ca>
1762 * acinclude.m4: Include "../selftest.m4".
1763 * configure: Regenerate.
1764 * configure.ac: Use "GDB_AC_SELFTEST".
1765 * configure.srv: Use "$enable_unittests" instead of
1766 "$development" when checking whether unit tests have been
1768 * server.c (captured_main): Update message informing that
1769 selftests have been disabled.
1771 2018-10-04 Tom Tromey <tom@tromey.com>
1773 * configure: Rebuild.
1775 2018-10-04 Tom Tromey <tom@tromey.com>
1777 * server.c (handle_status): Rename inner "thread".
1778 (process_serial_event): Declare "res" in 'm' case.
1779 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1780 (iterate_over_lwps): Rename inner "thread".
1781 (linux_qxfer_libraries_svr4): Rename inner "len".
1782 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1784 2018-10-01 Gary Benson <gbenson@redhat.com>
1786 * gdb_proc_service.h: Moved common code to
1787 common/gdb_proc_service.h.
1789 2018-10-01 Gary Benson <gbenson@redhat.com>
1791 * gdb_proc_service.h: Synchronize comments and whitespace with
1792 GDB's version of this file.
1794 2018-09-25 Tom Tromey <tom@tromey.com>
1796 * configure: Rebuild.
1797 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1799 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1801 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1802 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1803 ($(IPA_LIB)): Sort IPA_OBJS.
1805 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1807 * Makefile.in: Remove references to $(ADD_DEPS).
1809 2018-09-16 Tom Tromey <tom@tromey.com>
1811 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1813 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1816 2018-09-05 Tom Tromey <tom@tromey.com>
1818 * configure: Rebuild.
1820 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1823 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1825 2018-08-27 Tom Tromey <tom@tromey.com>
1828 * configure: Rebuild.
1830 2018-08-27 Tom Tromey <tom@tromey.com>
1832 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1833 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1834 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1835 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1836 (s390x_emit_stack_adjust): Add casts to unsigned char.
1838 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1842 * server.h (struct client_state) <disable_randomization>:
1845 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1847 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1849 (mips_supply_ptrace_register): Likewise.
1851 2018-07-22 Tom Tromey <tom@tromey.com>
1853 * configure: Rebuild.
1855 2018-07-22 Tom Tromey <tom@tromey.com>
1857 * win32-low.c (win32_create_inferior): Remove unused variables.
1858 * gdbreplay.c (remote_open): Remove unused variable.
1859 * remote-utils.c (remote_prepare): Remove unused variable.
1860 * x86-tdesc.h (X86_TDESC_H): Define.
1861 (amd64_expedite_regs): Define conditionally.
1862 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1863 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1864 * remote-utils.c (readchar): Remove unused variable.
1866 2018-07-13 Pedro Alves <palves@redhat.com>
1868 * linux-low.c (linux_kill): Change parameter to process_info
1869 pointer instead of pid. Adjust.
1870 * lynx-low.c (lynx_kill): Likewise.
1871 * nto-low.c (nto_kill): Likewise.
1872 * spu-low.c (spu_kill): Likewise.
1873 * win32-low.c (win32_kill): Likewise.
1874 * server.c (handle_v_kill, kill_inferior_callback)
1875 (detach_or_kill_for_exit): Adjust.
1876 * target.c (kill_inferior): Change parameter to process_info
1877 pointer instead of pid. Adjust.
1878 * target.h (struct target_ops) <kill>: Change parameter to
1879 process_info pointer instead of pid. Adjust all implementations
1881 (kill_inferior): Likewise.
1883 2018-07-13 Pedro Alves <palves@redhat.com>
1885 * linux-low.c (linux_detach, linux_join): Change parameter to
1886 process_info pointer instead of pid. Adjust.
1887 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1888 * nto-low.c (nto_detach): Likewise.
1889 * spu-low.c (spu_detach, spu_join): Likewise.
1890 * win32-low.c (win32_detach, win32_join): Likewise.
1891 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1892 * target.h (struct target_ops) <detach, join>: Change parameter to
1893 process_info pointer instead of pid. Adjust all implementations
1895 (detach_inferior, join_inferior): Rename 'pid' parameter to
1898 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1899 Jan Kratochvil <jan.kratochvil@redhat.com>
1900 Paul Fertser <fercerpav@gmail.com>
1901 Tsutomu Seki <sekiriki@gmail.com>
1903 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1904 (OBS): Add 'common/netstuff.o'.
1905 (GDBREPLAY_OBS): Likewise.
1906 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1907 (remote_open): Implement support for IPv6
1909 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1911 (handle_accept_event): Accept connections from IPv6 sources.
1912 (remote_prepare): Handle IPv6-style hostnames; implement
1913 support for IPv6 connections.
1914 (remote_open): Implement support for printing connections from
1917 2018-07-11 Pedro Alves <palves@redhat.com>
1920 * mem-break.c (any_persistent_commands): Add process_info
1921 parameter and use it instead of relying on the current process.
1922 Change return type to bool.
1923 * mem-break.h (any_persistent_commands): Add process_info
1924 parameter and change return type to bool.
1925 * server.c (handle_detach): Remove require_running_or_return call.
1926 Look up the process_info for the process we're about to detach.
1927 If not found, return back error to GDB. Adjust
1928 any_persistent_commands call to pass down a process pointer.
1930 2018-07-11 Pedro Alves <palves@redhat.com>
1932 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1933 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1934 instead of collect_register_by_name.
1935 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1936 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1938 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1939 Pedro Alves <palves@redhat.com>
1941 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1943 2018-07-03 Tom Tromey <tom@tromey.com>
1945 * linux-low.c: Update.
1946 * lynx-low.c: Update.
1947 * mem-break.c: Update.
1948 * nto-low.c: Update.
1949 * remote-utils.c: Update.
1951 * spu-low.c: Update.
1953 * win32-low.c: Update.
1955 2018-07-03 Tom Tromey <tom@tromey.com>
1959 2018-07-03 Tom Tromey <tom@tromey.com>
1961 * linux-low.c: Update.
1963 2018-07-03 Tom Tromey <tom@tromey.com>
1967 2018-07-03 Tom Tromey <tom@tromey.com>
1969 * linux-low.c: Update.
1970 * linux-mips-low.c: Update.
1971 * lynx-low.c: Update.
1972 * nto-low.c: Update.
1973 * remote-utils.c: Update.
1975 * spu-low.c: Update.
1977 * thread-db.c: Update.
1979 2018-07-03 Tom Tromey <tom@tromey.com>
1981 * linux-low.c: Update.
1982 * linux-mips-low.c: Update.
1983 * lynx-low.c: Update.
1984 * mem-break.c: Update.
1985 * nto-low.c: Update.
1986 * remote-utils.c: Update.
1988 * spu-low.c: Update.
1990 * tracepoint.c: Update.
1992 2018-07-03 Tom Tromey <tom@tromey.com>
1994 * linux-low.c: Update.
1995 * linux-ppc-low.c: Update.
1996 * linux-x86-low.c: Update.
1997 * proc-service.c: Update.
1999 * spu-low.c: Update.
2000 * thread-db.c: Update.
2001 * win32-low.c: Update.
2003 2018-07-03 Tom Tromey <tom@tromey.com>
2005 * linux-low.c: Update.
2006 * lynx-low.c: Update.
2007 * nto-low.c: Update.
2008 * remote-utils.c: Update.
2009 * spu-low.c: Update.
2010 * thread-db.c: Update.
2011 * win32-low.c: Update.
2013 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2015 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2016 parameter in call to 'amd64_create_target_description'.
2018 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2020 * x86-tdesc.h: Remove executable permission flag.
2022 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2024 * configure.ac: Remove AC_PREREQ, add missing quoting.
2025 * configure: Re-generate.
2026 * config.in: Re-generate.
2027 * aclocal.m4: Re-generate.
2029 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2031 * tracepoint.h (current_traceframe): Remove declaration.
2033 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2035 * linux-aarch64-low.c (is_sve_tdesc): New function.
2036 (aarch64_sve_regs_copy_to_regcache): Likewise.
2037 (aarch64_sve_regs_copy_from_regcache): Likewise.
2038 (aarch64_regs_info): Add SVE checks.
2039 (initialize_low_arch): Initialize SVE.
2041 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2043 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2045 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2047 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2048 (initialize_low_tracepoint): Likewise
2049 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2050 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2052 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2054 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2056 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2058 * server.h (PBUFSIZ): Increase size
2060 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2062 * regcache.c (regcache::raw_compare): New function.
2063 * regcache.h (regcache::raw_compare): New declaration.
2065 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2067 * regcache.c (new_register_cache): Use new.
2068 (free_register_cache): Use delete.
2069 (register_data): Use const.
2070 (supply_register): Move body inside regcache.
2071 (regcache::raw_supply): New override function.
2072 (collect_register): Move body inside regcache.
2073 (regcache::raw_collect): New override function.
2074 (regcache::get_register_status): New override function.
2075 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2077 2018-06-09 Tom Tromey <tom@tromey.com>
2079 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2081 (event_queue): Use std::queue.
2082 (gdb_event_xfree): Remove.
2083 (initialize_event_loop, process_event, wait_for_event): Update.
2085 2018-06-08 Stan Cox <scox@redhat.com>
2087 * win32-low.c (win32_create_inferior): last_ptid and last_status
2088 moved to client_state.
2090 2018-06-08 Pedro Alves <palves@redhat.com>
2092 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2093 common/common-exceptions.o, common/common-utils.o,
2094 common/errors.o, common/print-utils.o and utils.o.
2095 * gdbreplay.c: Include "common-defs.h" instead of the two
2096 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2097 string.h or alloca.h.
2098 (perror_with_name): Delete.
2099 (remote_open): Use xstrdup instead of strdup.
2100 (main): Rename to ...
2101 (captured_main): ... this.
2104 2018-06-08 Tom Tromey <tom@tromey.com>
2106 * linux-low.c (linux_low_read_btrace): Update.
2108 2018-06-04 Stan Cox <scox@redhat.com>
2110 * server.h (struct client_state): New.
2111 * server.c (cont_thread, general_thread, multi_process)
2112 (report_fork_events, report_vfork_events, report_exec_events)
2113 (report_thread_events, swbreak_feature, hwbreak_feature)
2114 (vCont_supported, disable_randomization, pass_signals)
2115 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2116 Moved to client_state.
2117 * remote-utils.c (remote_debug, noack_mode)
2118 (transport_is_reliable): Moved to client_state.
2119 * tracepoint.c (current_traceframe): Moved to client_state.
2122 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2123 linux-low.c, remote-utils.h, target.c: Use client_state.
2125 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2127 * configure.srv: Add new c/h file.
2129 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2131 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2134 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2136 * gdb.arch/mips-fpregset-core.exp: New test.
2137 * gdb.arch/mips-fpregset-core.c: New test source.
2139 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2142 * hostio.c (require_int): Do not report overflow for integers
2143 between 0xfffffff and 0x7fffffff.
2145 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2147 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2148 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2149 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2151 (the_low_target): Wire them.
2153 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2155 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2156 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2157 mode. Call collect_register_by_name with vscr using
2158 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2159 (ppc_store_vrregset): Add and set vscr_offset variable as in
2160 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2163 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2165 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2166 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2167 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2169 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2171 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2172 (ppc_store_vsxregset): Likewise.
2173 (ppc_fill_vrregset): Likewise.
2174 (ppc_store_vrregset): Likewise.
2175 (ppc_fill_evrregset): Likewise.
2176 (ppc_store_evrregset): Likewise.
2177 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2178 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2181 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2183 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2184 wordsize of the inferior. Call ppc_linux_target_wordsize.
2186 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2188 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2189 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2190 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2191 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2192 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2193 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2194 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2195 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2196 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2197 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2198 (tdesc_powerpc_e500l): Remove.
2199 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2200 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2201 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2202 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2204 (ppc_arch_setup): Remove target description matching code. Fill a
2205 ppc_linux_features struct and call ppc_linux_match_description
2208 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2210 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2211 width of the requested register exceeds the width of the
2213 (mips_cannot_store_register): Likewise.
2215 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2217 * linux-mips-low.c (mips_fetch_register): New function. Update
2219 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2220 (the_low_target): Wire `mips_fetch_register'.
2222 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2224 * lynx-i386-low.c (LYNXOS_178): New macro.
2225 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2226 the layout on LynxOS-178.
2227 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2228 handle floating point registers that are not supported by
2231 2018-05-10 Tom Tromey <tom@tromey.com>
2233 * configure: Rebuild.
2235 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2238 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2239 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2240 Use it to set the expedite_regs field in the given tdesc.
2241 * x86-tdesc.h: New file.
2242 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2243 Adjust following the addition of the new expedite_regs parameter
2244 to init_target_desc.
2245 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2246 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2247 (i386_linux_read_description, amd64_linux_read_description):
2248 Adjust following the addition of the new expedite_regs parameter
2249 to init_target_desc.
2250 * lynx-i386-low.c: #include "x86-tdesc.h".
2251 (lynx_i386_arch_setup): Adjust following the addition of the new
2252 expedite_regs parameter to init_target_desc.
2253 * nto-x86-low.c: #include "x86-tdesc.h".
2254 (nto_x86_arch_setup): Adjust following the addition of the new
2255 expedite_regs parameter to init_target_desc.
2256 * win32-i386-low.c: #include "x86-tdesc.h".
2257 (i386_arch_setup): Adjust following the addition of the new
2258 expedite_regs parameter to init_target_desc.
2260 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2263 * win32-low.c (win32_create_inferior): Add call to my_wait
2264 setting last_status global.
2266 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2269 * win32-low.c (create_process): Only call gdb_tilde_expand if
2270 inferior_cwd is not NULL.
2272 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2274 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2275 registers to the cache if their values have changed.
2276 (i387_xsave_to_cache): Provide default values for x87 control
2277 registers when these features are available, but disabled.
2278 * regcache.c (supply_register_by_name_zeroed): New function.
2279 * regcache.h (supply_register_by_name_zeroed): Declare new
2282 2018-05-07 Tom Tromey <tom@tromey.com>
2284 * configure: Rebuild.
2286 2018-05-04 Tom Tromey <tom@tromey.com>
2288 * configure: Rebuild.
2290 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2291 Pedro Alves <palves@redhat.com>
2293 * linux-aarch64-low.c (aarch64_stopped_data_address):
2296 2018-04-27 Tom Tromey <tom@tromey.com>
2298 * configure: Rebuild.
2300 2018-04-23 Tom Tromey <tom@tromey.com>
2302 * configure: Rebuild.
2304 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2306 * Makefile.in (depcomp): Add "..".
2307 (all_deps_files): New and use it.
2309 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2311 * configure.srv (aarch64*-*-linux*): Don't include xml.
2312 (i[34567]86-*-cygwin*): Likewise.
2313 (i[34567]86-*-linux*): Likewise.
2314 (i[34567]86-*-lynxos*): Likewise.
2315 (i[34567]86-*-mingw32ce*): Likewise.
2316 (i[34567]86-*-mingw*): Likewise.
2317 (i[34567]86-*-nto*): Likewise.
2318 (tic6x-*-uclinux): Likewise.
2319 (x86_64-*-linux*): Likewise.
2320 (x86_64-*-mingw*): Likewise.
2321 (x86_64-*-cygwin*): Likewise.
2323 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2325 * tdesc.c: Remove xml parameter.
2327 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2329 * server.c (get_features_xml): Remove cast.
2330 * tdesc.c (void target_desc::accept): Fill in function.
2331 (tdesc_get_features_xml): Remove old xml creation.
2332 (print_xml_feature::visit_pre): Add xml vistor.
2333 * tdesc.h (struct target_desc): Make xmltarget mutable.
2334 (tdesc_get_features_xml): Remove declaration.
2336 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2338 * tdesc.c (tdesc_architecture_name): Add new function.
2339 (tdesc_osabi_name): Likewise.
2340 (tdesc_get_features_xml): Use new functions.
2342 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2344 * tdesc.c (tdesc_create_flags): Remove.
2345 (tdesc_add_flag): Likewise.
2346 (tdesc_named_type): Likewise.
2347 (tdesc_create_union): Likewise.
2348 (tdesc_create_struct): Likewise.
2349 (tdesc_create_vector): Likewise.
2350 (tdesc_add_bitfield): Likewise.
2351 (tdesc_add_field): Likewise.
2352 (tdesc_set_struct_size): Likewise.
2354 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2356 * tdesc.c (~target_desc): Remove implictly deleted items.
2357 (init_target_desc): Iterate all features.
2358 (tdesc_get_features_xml): Use vector.
2359 (tdesc_create_feature): Create feature.
2360 * tdesc.h (tdesc_feature) Remove
2361 (target_desc): Add features.
2363 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2365 * Makefile.in: Add common/tdesc.c
2366 * tdesc.c (init_target_desc): init all reg_defs from register
2368 (tdesc_create_reg): Create tdesc_reg.
2369 * tdesc.h (tdesc_feature): Add register vector.
2371 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2373 * tdesc.h (struct target_desc) <features>: Change type to
2374 std::vector<std::string>.
2375 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2377 (tdesc_get_features_xml): Likewise.
2378 (tdesc_create_feature): Likewise.
2380 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2382 * regcache.c (find_register_by_number): Return a ref.
2383 (find_regno): Use references.
2384 (register_size): Likewise.
2385 (register_data): Likewise.
2386 * tdesc.c (target_desc::~target_desc): Remove free calls.
2387 (target_desc::operator==): Use std::vector compare.
2388 (init_target_desc): Use reference.
2389 (tdesc_create_reg): Use reg constructors.
2390 * tdesc.h (struct target_desc): Replace pointer with object.
2392 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2394 * regcache.c (find_register_by_number): Make static.
2395 (find_regno): Use find_register_by_number
2396 * regcache.h (struct reg): Remove declaration.
2398 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2400 * tdesc.c (target_desc::~target_desc): Move to here.
2401 (target_desc::operator==): Likewise.
2402 * tdesc.h (target_desc::~target_desc): Move from here.
2403 (target_desc::operator==): Likewise.
2405 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2407 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2409 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2411 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2413 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2414 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2415 and init_registers_s390_gs_linux64.
2417 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2419 * linux-s390-low.c (s390_fill_gs): Remove function.
2420 (s390_fill_gsbc): Remove function.
2421 (s390_regsets): Set fill functions for the guarded storage regsets
2424 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2426 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2427 the word size. Add comment.
2428 (s390_get_wordsize): New function.
2429 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2430 pswm with it. Instead, use s390_get_wordsize to determine the
2431 word size first and derive the correct tdesc from that directly.
2433 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2435 * Makefile.in: Include silent-rules.mk.
2436 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2437 (COMPILE): Add ECHO_CXX.
2438 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2439 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2440 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2441 (version-generated.c): Add ECHO_GEN.
2442 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2443 (IPAGENT_COMPILE): Add ECHO_CXX.
2444 (%-generated.c): Add ECHO_REGDAT.
2446 2018-03-14 Tom Tromey <tom@tromey.com>
2449 * ax.c (ax_printf): Special case for NULL.
2451 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2453 * linux-low.c (linux_qxfer_libraries_svr4): Use
2454 xml_escape_text_append.
2456 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2458 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2460 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2462 * server.c (handle_general_set): Remove unnecessary xstrdup.
2464 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2466 * server.c (parse_debug_format_options): Adjust to
2467 delim_string_to_char_ptr_vec changes.
2468 * thread-db.c (thread_db_load_search): Adjust to
2469 dirnames_to_char_ptr_vec changes.
2471 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2473 * target.h (target_enable_btrace, target_disable_btrace)
2474 (target_read_btrace, target_read_btrace_conf): Turn macro into
2475 inline function. Throw error if target method is not defined.
2476 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2477 check for btrace target method. Be prepared to handle exceptions
2478 from btrace target methods.
2480 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2482 * server.c (captured_main): Change order of error message printed
2483 when the current working directory cannot be found.
2485 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2487 * server.c: Include "filenames.h" and "pathstuff.h".
2488 (program_name): Delete variable.
2489 (program_path): New anonymous class.
2490 (get_exec_wrapper): Use "program_path" instead of
2492 (handle_v_run): Likewise.
2493 (captured_main): Likewise.
2494 (process_serial_event): Likewise.
2496 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2498 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2499 (OBJS): Add "pathstuff.o".
2500 * server.c (current_directory): New global variable.
2501 (captured_main): Initialize "current_directory".
2503 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2505 * tdesc.c: Use common/tdesc.h.
2506 * tdesc.h: Likewise.
2508 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2509 Simon Marchi <simon.marchi@ericsson.com>
2511 * Makefile.in: Switch order of make rules.
2513 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2515 * Makefile.in: Add common directory in build.
2516 * configure.ac: Add common reference.
2517 * configure: Regenerate.
2519 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2521 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2522 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2523 * spu-low.c (spu_target_ops): Likewise.
2524 * win32-low.c (win32_target_ops): Likewise.
2525 * server.c (supported_btrace_packets): Report packets unconditionally.
2526 * target.h (target_ops) <supports_btrace>: Remove.
2527 (target_supports_btrace): Remove.
2529 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2531 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2532 (handle_btrace_disable): Change return type to void. Use exceptions
2534 (handle_btrace_general_set): Catch exception and copy message to
2537 2018-02-08 Tom Tromey <tom@tromey.com>
2539 * linux-low.c (install_software_single_step_breakpoints): Use
2540 make_scoped_restore.
2541 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2542 (do_restore_current_thread_cleanup): Remove.
2543 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2546 2018-02-08 Tom Tromey <tom@tromey.com>
2548 * mem-break.c (set_raw_breakpoint_at): Use
2549 gdb::unique_xmalloc_ptr.
2551 2018-01-30 Pedro Alves <palves@redhat.com>
2554 * target.c (target_terminal::terminal_state): Rename to ...
2555 (target_terminal::m_terminal_state): ... this.
2557 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2559 * linux-low.c (handle_extended_wait): Surround call to
2560 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2562 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2564 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2565 linux_ptrace_attach_fail_reason_string now returning an
2567 (linux_attach): Likewise.
2568 * thread-db.c (attach_thread): Likewise.
2570 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2573 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2574 checking for fs_base/gs_base fields in struct user_regs_struct.
2575 * configure: Regenerate.
2577 2018-01-16 Yao Qi <yao.qi@linaro.org>
2580 * linux-low.c (fetch_register): Call supply_register instead of
2583 2018-01-08 Yao Qi <yao.qi@linaro.org>
2584 Simon Marchi <simon.marchi@ericsson.com>
2586 * Makefile.in (OBS): Remove selftest.o.
2587 * configure.ac: Set srv_selftest_objs if $development is true.
2588 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2589 * configure: Re-generated.
2590 * server.c (captured_main): Wrap variable selftest_filter with
2593 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2595 * server.c (parse_debug_format_options): Return std::string.
2596 (handle_monitor_command, captured_main): Adjust.
2598 2018-01-05 Pedro Alves <palves@redhat.com>
2601 * server.c (captured_main): Pass quiet=false to
2602 save_original_signals_state.
2604 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2606 * gdbreplay.c (gdbreplay_version): Update copyright year in
2608 * server.c (gdbserver_version): Likewise.
2610 2017-12-08 Tom Tromey <tom@tromey.com>
2612 * ax.c (ax_printf): Update.
2614 2017-12-07 Yao Qi <yao.qi@linaro.org>
2616 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2617 aarch64_linux_read_description.
2618 * linux-amd64-ipa.c (idx2mask): New array.
2619 (get_ipa_tdesc): Move idx2mask out.
2620 (initialize_low_tracepoint): Initialize target descriptions.
2621 * linux-i386-ipa.c (idx2mask): New array.
2622 (get_ipa_tdesc): Move idx2mask out.
2623 (initialize_low_tracepoint): Initialize target descriptions.
2625 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2627 * tdesc.c (struct tdesc_type): Change return type.
2628 (tdesc_add_flag): Change parameter type.
2629 (tdesc_add_bitfield): Likewise.
2630 (tdesc_add_field): Likewise.
2631 (tdesc_set_struct_size): Likewise.
2633 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2635 * regcache.c (registers_to_string): Remove unused variable.
2637 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2639 * inferiors.c (for_each_inferior_with_data): Remove.
2640 * inferiors.h (for_each_inferior_with_data): Remove.
2641 * server.c (handle_qxfer_threads_worker): Change parameter type.
2642 (handle_qxfer_threads_proper): Use for_each_thread.
2644 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2646 * inferiors.c (for_each_inferior): Remove.
2647 (clear_inferiors): Use for_each_thread.
2648 * inferiors.h (for_each_inferior): Remove.
2649 * linux-low.c (linux_wait_for_event_filtered): Use
2651 (linux_stabilize_threads): Likewise.
2652 * regcache.c (regcache_release): Likewise.
2653 * server.c (gdb_wants_all_threads_stopped): Likewise.
2654 (clear_pending_status_callback): Remove.
2655 (handle_status): Use for_each_thread.
2656 (captured_main): Likewise.
2657 * win32-low.c (child_init_thread_list): Likewise.
2658 (win32_clear_inferiors): Likewise.
2659 (fake_breakpoint_event): Likewise.
2661 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2663 * inferiors.h (find_inferior): Remove.
2664 * inferiors.c (find_inferior): Remove.
2666 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2668 * linux-low.c (resume_status_pending_p): Update comment.
2669 (need_step_over_p): Update comment.
2671 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2673 * linux-low.c (proceed_one_lwp): Return void, change parameter
2675 (unsuspend_and_proceed_one_lwp): Likewise.
2676 (proceed_all_lwps): Use for_each_thread.
2677 (unstop_all_lwps): Likewise.
2679 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2681 * linux-low.c (linux_resume_one_thread): Return void, take
2683 (linux_resume): Use for_each_thread.
2685 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2687 * linux-low.c (send_sigstop_callback): Return void, change
2688 parameter type. Rename to...
2689 (send_sigstop): ... this.
2690 (suspend_and_send_sigstop_callback): Return void, change parameter
2692 (suspend_and_send_sigstop): ... this.
2693 (stop_all_lwps): Use for_each_thread.
2695 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2697 * linux-low.c (lwp_running): Return bool, remove unused
2699 (linux_stabilize_threads): Use find_thread.
2701 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2703 * linux-low.c (select_singlestep_lwp_callback): Remove.
2704 (count_events_callback): Remove.
2705 (select_event_lwp_callback): Remove.
2706 (select_event_lwp): Use find_thread/for_each_thread.
2708 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2710 * linux-low.c (not_stopped_callback): Return bool, take filter
2712 (linux_wait_for_event_filtered): Use find_thread.
2713 (linux_wait_1): Likewise.
2715 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2717 * linux-low.c (same_lwp): Remove.
2718 (find_lwp_pid): Use find_thread.
2720 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2722 * linux-low.c (delete_lwp_callback): Remove.
2723 (linux_mourn): Use for_each_thread.
2725 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2727 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2728 args parameter, don't check for pid.
2729 (linux_detach): Use for_each_thread.
2731 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2733 * linux-low.c (struct counter): Remove.
2734 (second_thread_of_pid_p): Remove.
2735 (last_thread_of_process_p): Use find_thread.
2737 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2739 * inferiors.c (find_inferior_in_random): Remove.
2740 * inferiors.h (find_inferior_in_random): Remove.
2741 * linux-low.c (status_pending_p_callback): Return bool, accept
2742 parameter ptid directly.
2743 (linux_wait_for_event_filtered): Use find_thread_in_random.
2744 (linux_wait_1): Likewise.
2746 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2748 * inferiors.c (find_inferior_id): Remove.
2749 (find_thread_ptid): Move implemention from find_inferior_id to
2751 * inferiors.h (find_inferior_id): Remove.
2752 * server.c (handle_status): Use find_thread_ptid.
2753 (process_serial_event): Likewise.
2754 * thread-db.c (find_one_thread): Likewise.
2755 (thread_db_thread_handle): Likewise.
2756 * win32-low.c (thread_rec): Likewise.
2757 (child_delete_thread): Likewise.
2758 (win32_thread_alive): Likewise.
2759 (get_child_debug_event): Likewise.
2761 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2763 * linux-mips-low.c (update_watch_registers_callback): Return
2764 void, remove pid_p parameter, don't check for pid.
2765 (mips_insert_point, mips_remove_point): Use for_each_thread.
2767 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2769 * lynx.low (lynx_delete_thread_callback): Remove.
2770 (lynx_mourn): Use for_each_thread.
2772 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2774 * regcache.c (regcache_invalidate_one): Remove.
2775 (regcache_invalidate_pid): use for_each_thread.
2777 2017-11-26 Tom Tromey <tom@tromey.com>
2779 * linux-low.c (linux_create_inferior): Update.
2781 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2783 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2785 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2787 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2788 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2789 * linux-aarch64-tdesc-selftest.c: New file.
2790 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2792 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2794 * configure.srv: Add new file.
2795 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2796 * linux-aarch64-tdesc-selftest.c: New file.
2797 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2799 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2801 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2802 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2803 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2805 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2807 * configure.srv: Add new files.
2808 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2809 aarch64_linux_read_description.
2810 * linux-aarch64-low.c (aarch64_linux_read_description):
2811 Merge with aarch64_arch_setup.
2812 (aarch64_arch_setup): Call aarch64_linux_read_description.
2813 * linux-aarch64-tdesc.c: New file.
2814 * linux-aarch64-tdesc.h: New file.
2816 2017-11-24 Yao Qi <yao.qi@linaro.org>
2818 * configure.srv: Set $srv_regobj for tic6x-linux.
2819 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2820 (tic6x_read_description): Move some code to tic6x_arch_setup.
2821 (tic6x_tdesc_test): New function.
2822 (initialize_low_arch): Call selftests::register_test.
2824 2017-11-22 Yao Qi <yao.qi@linaro.org>
2826 * remote-utils.c (prepare_resume_reply): Use memcpy.
2828 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2830 * linux-low.c (kill_one_lwp_callback): Return void, take
2831 argument directly, don't filter on pid.
2832 (linux_kill): Use for_each_thread.
2834 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2836 * linux-low.c (need_step_over_p): Return bool, remove dummy
2838 (linux_resume, proceed_all_lwps): Use find_thread.
2840 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2842 * linux-low.c (resume_status_pending_p): Return bool, remove
2844 (linux_resume): Use find_thread.
2846 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2848 * linux-low.c (struct thread_resume_array): Remove.
2849 (linux_set_resume_request): Return void, take arguments
2851 (linux_resume): Use for_each_thread.
2853 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2855 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2856 return bool, remove data argument.
2857 (linux_stabilize_threads): Use find_thread.
2859 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2861 * linux-low.c (unsuspend_one_lwp): Remove.
2862 (unsuspend_all_lwps): Use for_each_thread, inline code from
2865 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2867 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2868 * linux-low.c (struct iterate_over_lwps_args): Remove.
2869 (iterate_over_lwps_filter): Remove.
2870 (iterate_over_lwps): Use find_thread.
2872 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2874 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2875 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2876 code from reset_lwp_ptrace_options_callback.
2878 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2880 * linux-arm-low.c (struct update_registers_data): Remove.
2881 (update_registers_callback): Return void, take arguments
2882 directly, don't check thread's pid.
2883 (arm_insert_point, arm_remove_point): Use for_each_thread.
2885 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2887 * win32-low.c (continue_one_thread): Return void, take argument
2889 (child_continue): Use for_each_thread.
2891 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2893 * win32-i386-low.c (update_debug_registers_callback): Rename
2895 (update_debug_registers): ... this, return void, remove pid_p arg.
2896 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2898 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2900 * inferiors.h (struct process_info): Add constructor, initialize
2902 <syscalls_to_catch>: Change type to std::vector<int>.
2903 * inferiors.c (add_process): Allocate process_info with new.
2904 (remove_process): Free process_info with delete.
2905 * linux-low.c (handle_extended_wait): Adjust.
2906 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2907 * server.c (handle_general_set): Adjust.
2909 2017-11-16 Pedro Alves <palves@redhat.com>
2911 * remote-utils.c (remote_close): Block SIGIO signals instead of
2912 uninstalling the SIGIO handler.
2914 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2916 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2918 2017-11-16 Yao Qi <yao.qi@linaro.org>
2920 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2921 (tic6x_store_gregset): Likewise.
2922 (tic6x_usrregs_info): Move it up.
2924 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2926 * Makefile.in: Update arch rules.
2927 * configure.srv: Explicitly mark arch/ files.
2929 2017-11-13 Andreas Schwab <schwab@suse.de>
2931 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2933 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2935 2017-11-06 Pedro Alves <palves@redhat.com>
2937 * config.in, configure: Regenerate.
2939 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2941 * target.c (struct thread_search): Remove.
2942 (thread_search_callback): Remove.
2943 (prepare_to_access_memory): Use for_each_thread instead of
2944 find_inferior. Inline code from thread_search_callback.
2946 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2948 * server.c (struct visit_actioned_threads_data): Remove.
2949 (visit_actioned_threads): Change prototype to take arguments
2951 (resume): Use find_thread instead of find_inferior.
2953 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2955 * server.c (queue_stop_reply_callback): Change prototype, return
2957 (find_status_pending_thread_callback): Remove.
2958 (handle_status): Replace find_inferior with find_thread and
2961 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2963 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2965 (aarch64_store_gregset): Likewise.
2966 (aarch64_fill_fpregset): Likewise.
2967 (aarch64_store_fpregset): Likewise.
2969 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2971 * gdbthread.h (find_thread, for_each_thread): New functions.
2972 * inferiors.c (thread_of_pid): Remove.
2973 (find_any_thread_of_pid): Use find_thread.
2974 * linux-low.c (num_lwps): Use for_each_thread.
2976 2017-10-17 Yao Qi <yao.qi@linaro.org>
2978 * Makefile.in: Remove one rule.
2979 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2981 2017-10-17 Yao Qi <yao.qi@linaro.org>
2983 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2984 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2986 2017-10-17 Yao Qi <yao.qi@linaro.org>
2988 * configure.srv: Rename arm.o with arch/arm.o.
2990 2017-10-17 Yao Qi <yao.qi@linaro.org>
2992 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2993 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2994 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2995 (arch-i386.o, arch-amd64.o): Remove rules.
2996 (arch/%.o): New rule.
2997 Update POSTCOMPILE and COMPILE.pre.
2998 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2999 * configure: Re-generated.
3000 * configure.srv: Replace arch-i386.o with arch/i386.o.
3001 Replace arch-amd64.o with arch/amd64.o.
3003 2017-10-16 Yao Qi <yao.qi@linaro.org>
3005 * configure: Regenerated.
3007 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3009 * inferiors.h: (struct inferior_list): Remove.
3010 (struct inferior_list_entry); Remove.
3011 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3012 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3013 get_first_inferior): Remove.
3014 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3015 find_inferior_id, find_inferior_in_random): Change signature.
3016 * inferiors.c (all_threads): Change type to
3017 std::list<thread_info *>.
3018 (get_thread): Remove macro.
3019 (find_inferior, find_inferior_id): Change signature, implement
3021 (find_inferior_in_random): Change signature, implement using
3022 find_thread_in_random.
3023 (for_each_inferior, for_each_inferior_with_data): Change
3024 signature, implement using for_each_thread.
3025 (add_inferior_to_list, remove_inferior): Remove.
3026 (add_thread, get_first_thread, thread_of_pid,
3027 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3028 (get_first_inferior, one_inferior_p, clear_inferior_list):
3030 (clear_inferiors, get_thread_process): Update.
3031 * gdbthread.h: Include <list>.
3032 (struct thread_info) <entry>: Remove field.
3034 (all_threads): Change type to std::list<thread_info *>.
3035 (get_first_inferior): Add doc.
3036 (find_thread, for_each_thread, find_thread_in_random): New
3038 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3039 * linux-arm-low.c (update_registers_callback): Update.
3040 * linux-low.c (second_thread_of_pid_p): Update.
3041 (kill_one_lwp_callback, linux_detach_lwp_callback,
3042 delete_lwp_callback, status_pending_p_callback, same_lwp,
3043 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3044 iterate_over_lwps, not_stopped_callback,
3045 resume_stopped_resumed_lwps, count_events_callback,
3046 select_singlestep_lwp_callback, select_event_lwp_callback,
3047 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3048 suspend_and_send_sigstop_callback, wait_for_sigstop,
3049 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3050 lwp_running, linux_set_resume_request, resume_status_pending_p,
3051 need_step_over_p, start_step_over, linux_resume_one_thread,
3052 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3053 reset_lwp_ptrace_options_callback): Update.
3054 * linux-mips-low.c (update_watch_registers_callback): Update.
3055 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3057 (free_register_cache_thread_one): Remove.
3058 (regcache_release): Update.
3059 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3060 handle_qxfer_threads_worker): Update.
3061 (handle_query): Update, use list iterator.
3062 (visit_actioned_threads, handle_pending_status,
3063 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3064 clear_pending_status_callback, set_pending_status_callback,
3065 find_status_pending_thread_callback, handle_status,
3066 process_serial_event): Update.
3067 * target.c (thread_search_callback): Update.
3068 * thread-db.c (thread_db_get_tls_address): Update.
3069 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3071 * win32-i386-low.c (update_debug_registers_callback): Update.
3072 * win32-low.c (delete_thread_info, child_delete_thread,
3073 continue_one_thread, suspend_one_thread,
3074 get_child_debug_event): Adjust.
3076 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3078 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3079 * inferiors.h: Include <list>.
3080 (struct process_info) <entry>: Remove field.
3082 (pid_of): Change macro to function.
3083 (ptid_of, lwpid_of): Remove macro.
3084 (all_processes): Change type to std::list<process_info *>.
3085 (ALL_PROCESSES): Remove macro.
3086 (for_each_process, find_process): New function.
3087 * inferiors.c (all_processes): Change type to
3088 std::list<process_info *>.
3089 (find_thread_process): Adjust.
3090 (add_process): Likewise.
3091 (remove_process): Likewise.
3092 (find_process_pid): Likewise.
3093 (get_first_process): Likewise.
3094 (started_inferior_callback): Remove.
3095 (have_started_inferiors_p): Adjust.
3096 (attached_inferior_callback): Remove.
3097 (have_attached_inferiors_p): Adjust.
3098 * linux-low.c (check_zombie_leaders): Likewise.
3099 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3100 (x86_linux_update_xmltarget): Adjust.
3101 * server.c (handle_query): Likewise.
3102 (gdb_reattached_process): Remove.
3103 (handle_status): Adjust.
3104 (kill_inferior_callback): Likewise.
3105 (detach_or_kill_inferior): Remove.
3106 (print_started_pid): Likewise.
3107 (print_attached_pid): Likewise.
3108 (detach_or_kill_for_exit): Update.
3109 (process_serial_event): Likewise.
3110 * linux-arm-low.c (arm_new_fork): Likewise.
3112 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3114 * dll.h: Include <list>.
3115 (struct dll_info): Add constructor.
3116 <entry>: Remove field.
3117 (all_dlls): Change type to std::list<dll_info>.
3118 * dll.c: Include <algorithm>.
3119 (get_dll): Remove macro.
3120 (all_dlls): Change type to std::list<dll_info *>.
3121 (free_one_dll): Remove.
3122 (match_dll): Likewise.
3123 (loaded_dll): Adjust.
3124 (unloaded_dll): Adjust to all_dlls type change, use
3125 std::find_if. Inline code from match_dll.
3126 (clear_dlls): Adjust to all_dlls type change.
3127 * server.c (emit_dll_description): Remove.
3128 (handle_qxfer_libraries): Adjust to all_dlls type change,
3129 integrate emit_dll_description's functionality.
3131 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3133 * linux-low.h (struct linux_target_ops) <delete_process>: New
3135 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3136 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3137 (struct linux_target_ops): Add delete_process callback.
3138 * linux-arm-low.c (arm_delete_process): New.
3139 (struct linux_target_ops): Add delete_process callback.
3140 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3141 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3142 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3143 * linux-mips-low.c (mips_linux_delete_process): New.
3144 (struct linux_target_ops): Add delete_process callback.
3145 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3146 * linux-s390-low.c (struct linux_target_ops): Likewise.
3147 * linux-sh-low.c (struct linux_target_ops): Likewise.
3148 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3149 * linux-tile-low.c (struct linux_target_ops): Likewise.
3150 * linux-x86-low.c (x86_linux_delete_process): New.
3151 (struct linux_target_ops): Add delete_process callback.
3152 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3154 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3156 * linux-aarch64-low.c (the_low_target): Add thread delete
3158 * linux-arm-low.c (arm_delete_thread): New function.
3159 (the_low_target): Add thread delete callback.
3160 * linux-bfin-low.c (the_low_target): Likewise.
3161 * linux-crisv32-low.c (the_low_target): Likewise.
3162 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3164 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3166 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3167 * linux-mips-low.c (mips_linux_delete_thread): New function.
3168 (the_low_target): Add thread delete callback.
3169 * linux-ppc-low.c (the_low_target): Likewise.
3170 * linux-s390-low.c (the_low_target): Likewise.
3171 * linux-sh-low.c (the_low_target): Likewise.
3172 * linux-tic6x-low.c (the_low_target): Likewise.
3173 * linux-tile-low.c (the_low_target): Likewise.
3174 * linux-x86-low.c (the_low_target): Likewise.
3175 * linux-xtensa-low.c (the_low_target): Likewise.
3177 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3179 * win32-low.c: Include "common-inferior.h".
3181 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3183 * inferiors.c (set_inferior_cwd): New function.
3184 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3185 (handle_query): Inform that QSetWorkingDir is supported.
3186 * win32-low.c (create_process): Pass the inferior's cwd to
3189 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3191 * inferiors.c (current_inferior_cwd): New global variable.
3192 (get_inferior_cwd): New function.
3193 * inferiors.h (struct process_info) <cwd>: New field.
3195 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3197 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3198 (OBS): Add gdb_tilde_expand.o.
3200 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3202 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3203 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3205 2017-09-29 Pedro Alves <palves@redhat.com>
3207 * ax.c (gdb_parse_agent_expr): Constify.
3208 * ax.h (gdb_parse_agent_expr): Constify.
3209 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3211 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3212 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3213 * remote-utils.h (read_ptid): Constify.
3214 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3215 (process_point_options, process_serial_event): Constify.
3216 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3217 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3218 (cmd_qtbuffer): Constify.
3220 2017-09-29 Pedro Alves <palves@redhat.com>
3222 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3225 2017-09-29 Pedro Alves <palves@redhat.com>
3227 * linux-low.c (handle_extended_wait): Pass parent thread instead
3228 of process to thread_db_notice_clone.
3229 * linux-low.h (thread_db_notice_clone): Replace parent process
3230 parameter with parent thread parameter.
3231 * thread-db.c (find_one_thread): Add comment.
3232 (thread_db_notice_clone): Replace parent process parameter with
3233 parent thread parameter. Temporarily switch to the parent thread.
3235 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3237 * gdbthread.h: Include "common-gdbthread.h".
3238 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3239 "if" when validating the ptid.
3240 * remote-utils.c: Include "gdbthread.h".
3241 (prepare_resume_reply): Use "switch_to_thread".
3242 * target.c (done_accessing_memory): Likewise.
3244 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3246 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3247 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3248 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3249 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3250 s390x-gs-linux64-ipa.o to ipa_obj.
3251 * linux-s390-low.c (HWCAP_S390_GS): New define.
3252 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3254 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3255 (s390_arch_setup): Check for guarded-storage support and choose
3257 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3258 init_registers_s390x_gs_linux64.
3259 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3261 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3262 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3264 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3266 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3268 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3270 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3271 (thread_db_thread_handle): Declare.
3272 * linux-low.c (linux_target_ops): Initialize thread_handle.
3273 * server.c (handle_qxfer_threads_worker): Add support for
3275 * target.h (struct target_ops): Add new function pointer,
3277 (target_thread_handle): Define.
3278 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3280 (thread_db_thread_handle): New function.
3282 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3284 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3285 * linux-low.h (thread_db_notice_clone): Declare.
3286 * thread-db.c (thread_db_notice_clone): New function.
3288 2017-09-21 Pedro Alves <palves@redhat.com>
3290 * server.c (gdb_read_memory, handle_status, process_serial_event)
3291 (handle_serial_event, handle_target_event): Adjust to
3292 set_desired_thread prototype change.
3293 * target.c (set_desired_thread): Remove 'use_general' parameter
3295 * target.h (set_desired_thread): Remove 'use_general' parameter.
3297 2017-09-20 Tom Tromey <tom@tromey.com>
3299 * target.c (target_terminal::terminal_state): Define.
3300 (target_terminal::init): Rename from target_terminal_init.
3301 (target_terminal::inferior): Rename from
3302 target_terminal_inferior.
3303 (target_terminal::ours): Rename from target_terminal_ours.
3304 (target_terminal::ours_for_output, target_terminal::info): New.
3306 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3308 * server.c (accumulate_file_name_length): Remove.
3309 (emit_dll_description): Adjust to std::string change.
3310 (handle_qxfer_libraries): Use std::string to hold document.
3312 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3314 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3315 return type of xml_escape_text.
3316 * server.c (emit_dll_description): Likewise.
3318 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3320 * server.c (captured_main): Accept argument for --selftest.
3321 Update run_tests call.
3322 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3323 when registering selftests.
3325 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3327 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3328 instead of "VEC" for "target_desc.reg_defs".
3329 (regcache_cpy): Likewise.
3330 (registers_to_string): Likewise.
3331 (registers_from_string): Likewise.
3332 (find_regno): Likewise.
3333 (supply_regblock): Likewise.
3334 (regcache_raw_read_unsigned): Likewise.
3335 * tdesc.c (init_target_desc): Likewise.
3336 (tdesc_create_reg): Likewise.
3337 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3338 (struct target_desc) <reg_defs>: Convert to "std::vector".
3339 (target_desc): Do not initialize "reg_defs".
3340 (~target_desc): Update code to use "std::vector" instead of "VEC"
3341 for "target_desc.reg_defs".
3342 (operator==): Likewise.
3344 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3346 * inferiors.h (thread_to_gdb_id): Remove.
3347 * inferiors.c (thread_to_gdb_id): Remove.
3348 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3349 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3350 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3352 * nto-low.c (nto_fetch_registers, nto_store_registers,
3353 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3355 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3357 * inferiors.h (gdb_id_to_thread_id): Remove.
3358 * inferiors.c (gdb_id_to_thread_id): Remove.
3359 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3360 removal. Move pid declaration closer to where it's used.
3362 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3364 * server.c (handle_detach): New function.
3365 (process_serial_event): Move code out, call handle_detach.
3367 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3369 * server.c (require_running): Rename to ...
3370 (require_running_or_return): ... this ...
3371 (require_running_or_break): ... and this.
3372 (handle_query, process_serial_event): Adjust.
3374 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3376 * linux-low.c (linux_set_resume_request): Remove unused
3379 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3381 * server.c (first_thread_of): Remove.
3382 (process_serial_event): Replace usage of first_thread_of with
3383 find_any_thread_of_pid.
3384 * tracepoint.c (same_process_p): Remove.
3385 (gdb_agent_about_to_close): Replace usage of same_process_p with
3386 find_any_thread_of_pid.
3387 * linux-x86-low.c (same_process_callback): Remove.
3388 (x86_arch_setup_process_callback): Replace usage of
3389 same_process_callback with find_any_thread_of_pid.
3390 * thread-db.c (any_thread_of): Remove.
3391 (switch_to_process): Replace usage of any_thread_of with
3392 find_any_thread_of_pid.
3393 * inferiors.c (thread_pid_matches_callback): Remove.
3394 (find_thread_process): Adjust to use find_any_thread_of_pid.
3396 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3398 * regcache.c (get_thread_regcache): Guard calls to "memset"
3401 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3403 * linux-low.c (handle_extended_wait): Use
3404 "allocate_target_description" instead of "XNEW".
3405 * linux-x86-low.c (initialize_low_arch): Likewise.
3407 2017-09-05 Yao Qi <yao.qi@linaro.org>
3409 * configure.srv (srv_i386_regobj): Remove.
3410 (srv_amd64_regobj): Remove.
3411 (srv_regobj): Set it to "" for x86 non-linux targets.
3412 * linux-x86-tdesc.c (i386_linux_read_description):
3413 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3414 (init_registers_i386): Remove the declaration.
3415 (tdesc_i386): Remove the declaration.
3416 (lynx_i386_arch_setup): Call i386_create_target_description.
3417 * nto-x86-low.c: Likewise.
3418 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3419 [!__x86_64__]: include arch/i386.h.
3420 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3422 2017-09-05 Yao Qi <yao.qi@linaro.org>
3424 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3425 i386/amd64-XXX-linux from it.
3427 2017-09-05 Yao Qi <yao.qi@linaro.org>
3429 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3431 (ipa_amd64_linux_regobj): Remove.
3432 (ipa_x32_linux_regobj): Remove.
3434 2017-09-05 Yao Qi <yao.qi@linaro.org>
3436 * Makefile.in (arch-amd64.o): New rule.
3437 * configure.srv: Append arch-amd64.o.
3438 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3439 (get_ipa_tdesc): Call amd64_linux_read_description.
3440 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3441 and init_registers_amd64_XXX.
3442 * linux-x86-low.c (x86_linux_read_description): Call
3443 amd64_linux_read_description.
3444 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3445 (initialize_low_arch): Don't call init_registers_x32_XXX and
3446 init_registers_amd64_XXX.
3447 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3448 and tdesc_amd64_XXX.
3449 [__x86_64__] (amd64_tdesc_test): New function.
3450 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3451 and init_registers_amd64_XXX.
3452 * linux-x86-tdesc.c: Include arch/amd64.h.
3453 (xcr0_to_tdesc_idx): New function.
3454 (i386_linux_read_description): New function.
3455 (amd64_get_ipa_tdesc_idx): New function.
3456 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3457 (amd64_get_ipa_tdesc): Declare.
3459 2017-09-05 Yao Qi <yao.qi@linaro.org>
3461 * configure.srv (srv_i386_linux_xmlfiles): Remove
3462 i386/i386-XXX-linux.xml from it.
3464 2017-09-05 Yao Qi <yao.qi@linaro.org>
3466 * configure.srv: Set srv_i386_linux_regobj empty if $development
3468 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3469 initialize_low_tdesc.
3470 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3471 with #if initialize_low_tdesc.
3472 * linux-x86-tdesc-selftest.c: New file.
3473 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3475 2017-09-05 Yao Qi <yao.qi@linaro.org>
3477 * Makefile.in (arch-i386.o): New rule.
3478 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3479 (x86_64-*-linux*): Likewise.
3480 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3481 include arch/i386.h.
3482 (i386_linux_read_description): Remove code and call
3483 i386_create_target_description.
3484 * tdesc.c (allocate_target_description): New function.
3485 * tdesc.h (set_tdesc_architecture): Remove declaration.
3486 (set_tdesc_osabi): Likewise.
3488 2017-09-05 Yao Qi <yao.qi@linaro.org>
3490 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3491 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3492 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3494 * server.c (get_features_xml): Call tdesc_get_features_xml.
3495 * tdesc.c (set_tdesc_architecture): New function.
3496 (set_tdesc_osabi): New function.
3497 (tdesc_get_features_xml): New function.
3498 (tdesc_create_feature): Add an argument.
3499 * tdesc.h (struct target_desc) <features>: New field.
3500 <arch, osabi>: New field.
3501 (~target_desc): xfree features, arch, and osabi.
3502 (target_desc::oerator==): Don't compare .xmltarget.
3503 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3504 (set_tdesc_osabi): Likewise.
3505 (tdesc_get_features_xml): Likewise.
3507 2017-09-05 Yao Qi <yao.qi@linaro.org>
3509 * linux-x86-tdesc.c: Include selftest.h.
3510 (i386_tdesc_test): New function.
3511 (initialize_low_tdesc): Call selftests::register_test.
3512 * tdesc.h: Include regdef.h.
3513 (target_desc): Override operator == and !=.
3515 2017-09-05 Yao Qi <yao.qi@linaro.org>
3517 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3518 (ipa_obj): Likewise.
3519 * linux-i386-ipa.c: Include common/x86-xstate.h
3520 (get_ipa_tdesc): Call i386_linux_read_description.
3521 (initialize_low_tracepoint): Don't call init_registers_XXX
3522 functions, call initialize_low_tdesc instead.
3523 * linux-x86-low.c (x86_linux_read_description): Call
3524 i386_linux_read_description.
3525 (initialize_low_arch): Don't call init_registers_i386_XXX
3526 functions, call initialize_low_tdesc.
3527 * linux-x86-tdesc.c: New file.
3528 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3529 (i386_get_ipa_tdesc_idx): Declare.
3530 (i386_get_ipa_tdesc): Declare.
3531 (initialize_low_tdesc): Declare.
3533 2017-09-05 Yao Qi <yao.qi@linaro.org>
3535 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3538 2017-09-05 Yao Qi <yao.qi@linaro.org>
3540 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3541 * regcache.c (get_thread_regcache): Use VEC_length.
3542 (init_register_cache): Likewise.
3543 (regcache_cpy): Likewise.
3544 (registers_to_string): Iterate reg_defs via VEC_iterate.
3545 (find_regno): Likewise.
3546 (find_register_by_number): Use VEC_index.
3547 (register_size): Call find_register_by_number.
3548 (register_data): Call find_register_by_number.
3549 (supply_regblock): Use VEC_length.
3550 (regcache_raw_read_unsigned): Likewise.
3551 * tdesc.c (init_target_desc): Iterate reg_defs via
3553 (default_description): Update initializer.
3554 (copy_target_description): Don't update field num_registers.
3555 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3556 <num_registers>: Remove.
3558 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3560 * Makefile.in (.SECONDARY): Define target.
3562 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3564 * linux-low.c (linux_wait_1): Adjust.
3565 * server.c (queue_stop_reply_callback): Adjust.
3567 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3569 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3570 QEnvironmentUnset and QEnvironmentReset packets.
3571 (handle_query): Inform remote that QEnvironmentHexEncoded,
3572 QEnvironmentUnset and QEnvironmentReset are supported.
3574 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3576 * inferiors.h (inferior_target_data): Rename to ...
3577 (thread_target_data): ... this.
3578 (inferior_regcache_data): Rename to ...
3579 (thread_regcache_data): ... this.
3580 (set_inferior_regcache_data): Rename to ...
3581 (set_thread_regcache_data): ... this.
3582 * inferiors.c (inferior_target_data): Rename to ...
3583 (thread_target_data): ... this.
3584 (inferior_regcache_data): Rename to ...
3585 (thread_regcache_data): ... this.
3586 (set_inferior_regcache_data): Rename to ...
3587 (set_thread_regcache_data): ... this.
3588 (free_one_thread): Update.
3589 * linux-low.h (get_thread_lwp): Update.
3590 * regcache.c (get_thread_regcache): Update.
3591 (regcache_invalidate_thread): Update.
3592 (free_register_cache_thread): Update.
3593 * win32-i386-low.c (update_debug_registers_callback): Update.
3594 (win32_get_current_dr): Update.
3595 * win32-low.c (thread_rec): Update.
3596 (delete_thread_info): Update.
3597 (continue_one_thread): Update.
3598 (suspend_one_thread): Update.
3600 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3602 * inferiors.c (set_inferior_target_data): Remove.
3603 * inferiors.h (set_inferior_target_data): Remove.
3605 2017-08-18 Yao Qi <yao.qi@linaro.org>
3607 * Makefile.in (OBS): Add selftest.o.
3608 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3609 * configure, config.in: Re-generated.
3610 * server.c: Include common/sefltest.h.
3611 (captured_main): Handle option --selftest.
3613 2017-08-09 Yao Qi <yao.qi@linaro.org>
3615 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3616 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3617 i386-avx-mpx.o and i386-mmx.o.
3618 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3619 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3620 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3621 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3622 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3623 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3624 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3625 i386/amd64-avx-mpx.xml.
3627 2017-08-09 Yao Qi <yao.qi@linaro.org>
3629 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3630 and x32-avx-avx512.o.
3631 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3632 i386/x32-avx-avx512.xml.
3634 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3636 * tracepoint.h (enum class fast_tpoint_collect_result): New
3638 (fast_tracepoint_collecting): Change return type to
3639 fast_tpoint_collect_result.
3640 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3641 * linux-low.h: Include tracepoint.h.
3642 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3643 fast_tpoint_collect_result.
3644 * linux-low.c (handle_tracepoints): Adjust.
3645 (linux_fast_tracepoint_collecting): Change return type to
3646 fast_tpoint_collect_result.
3647 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3648 linux_wait_1, stuck_in_jump_pad_callback,
3649 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3650 proceed_one_lwp): Adjust to type change.
3652 2017-07-10 Yao Qi <yao.qi@linaro.org>
3654 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3656 2017-06-29 Yao Qi <yao.qi@linaro.org>
3658 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3660 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3662 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3664 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3666 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3668 * linux-low.c (linux_create_inferior): Adjust code to access the
3669 environment information via 'gdb_environ' class.
3670 * lynx-low.c (lynx_create_inferior): Likewise.
3671 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3672 (get_environ): Return a pointer to 'our_environ'.
3673 (captured_main): Initialize 'our_environ'.
3674 * server.h (get_environ): Adjust prototype.
3675 * spu-low.c (spu_create_inferior): Adjust code to access the
3676 environment information via 'gdb_environ' class.
3678 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3680 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3681 usage of "register" keyword.
3683 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3685 * configure: Re-generate.
3687 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3689 * configure: Re-generate.
3691 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3693 * Makefile.in (COMPILE.pre): Add "-x c++".
3695 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3697 * fork-child.c: Conditionally include <signal.h>.
3699 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3701 * server.c (handle_general_set): Handle new packet
3702 "QStartupWithShell".
3703 (handle_query): Add "QStartupWithShell" to the list of supported
3705 (gdbserver_usage): Add help text explaining the
3706 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3708 (captured_main): Recognize and act upon the presence of the new
3711 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3712 Pedro Alves <palves@redhat.com>
3714 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3715 * configure: Regenerate.
3716 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3718 (i[34567]86-*-lynxos*): Likewise.
3719 (spu*-*-*): Likewise.
3720 * fork-child.c: New file.
3721 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3723 (linux_ptrace_fun): New function.
3724 (linux_create_inferior): Adjust function prototype to reflect
3725 change on "target.h". Adjust function code to use
3727 (linux_request_interrupt): Delete "signal_pid".
3728 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3729 (lynx_ptrace_fun): New function.
3730 (lynx_create_inferior): Adjust function prototype to reflect
3731 change on "target.h". Adjust function code to use
3733 * nto-low.c (nto_create_inferior): Adjust function prototype and
3734 code to reflect change on "target.h". Update comments.
3735 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3736 "common-terminal.h" and "environ.h".
3737 (terminal_fd): Moved to fork-child.c.
3738 (old_foreground_pgrp): Likewise.
3739 (restore_old_foreground_pgrp): Likewise.
3740 (last_status): Make it global.
3741 (last_ptid): Likewise.
3742 (our_environ): New variable.
3743 (startup_with_shell): Likewise.
3744 (program_name): Likewise.
3745 (program_argv): Rename to...
3746 (program_args): ...this.
3747 (wrapper_argv): New variable.
3748 (start_inferior): Delete function.
3749 (get_exec_wrapper): New function.
3750 (get_exec_file): Likewise.
3751 (get_environ): Likewise.
3752 (prefork_hook): Likewise.
3753 (post_fork_inferior): Likewise.
3754 (postfork_hook): Likewise.
3755 (postfork_child_hook): Likewise.
3756 (handle_v_run): Update code to deal with arguments coming from the
3757 remote host. Update calls from "start_inferior" to
3759 (captured_main): Likewise. Initialize environment variable. Call
3761 * server.h (post_fork_inferior): New prototype.
3762 (get_environ): Likewise.
3763 (last_status): Declare.
3764 (last_ptid): Likewise.
3765 (signal_pid): Likewise.
3766 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3767 (spu_ptrace_fun): New function.
3768 (spu_create_inferior): Adjust function prototype to reflect change
3769 on "target.h". Adjust function code to use "fork_inferior".
3770 * target.c (target_terminal_init): New function.
3771 (target_terminal_inferior): Likewise.
3772 (target_terminal_ours): Likewise.
3773 * target.h: Include <vector>.
3774 (struct target_ops) <create_inferior>: Update prototype.
3775 (create_inferior): Update macro.
3776 * utils.c (gdb_flush_out_err): New function.
3777 * win32-low.c (win32_create_inferior): Adjust function prototype
3778 and code to reflect change on "target.h".
3780 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3782 * inferiors.c (switch_to_thread): New function.
3784 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3786 * Makefile.in (SFILE): Add "common/job-control.c".
3787 (OBS): Add "job-control.o".
3789 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3791 * Makefile: Remove "@host_makefile_frag@".
3793 2017-05-05 Pedro Alves <palves@redhat.com>
3795 * configure: Regenerate.
3797 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3799 * configure: Regenerate.
3801 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3803 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3804 software_single_step change of return type to
3805 std::vector<CORE_ADDR>.
3806 * linux-low.c (install_software_single_step_breakpoints):
3808 * linux-low.h (install_software_single_step_breakpoints):
3811 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3813 * remote-utils.c: Include "gdb_termios.h" instead of
3815 * terminal.h: Delete file.
3817 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3819 * server.c: Include <vector>.
3820 <program_argv, wrapper_argv>: Convert to std::vector.
3821 (start_inferior): Rewrite function to use C++.
3822 (handle_v_run): Likewise. Update code that calculates the argv
3823 based on the vRun packet; use C++.
3824 (captured_main): Likewise.
3826 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3828 * server.c (handle_v_cont): Initialize thread_resume::thread
3831 2017-04-05 Pedro Alves <palves@redhat.com>
3833 * configure: Regenerate.
3835 2017-04-05 Pedro Alves <palves@redhat.com>
3837 * gdbreplay.c (sync_error): Constify.
3838 * linux-x86-low.c (push_opcode): Constify.
3840 2017-04-05 Pedro Alves <palves@redhat.com>
3842 * win32-low.c (get_child_debug_event)
3843 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3844 Report TARGET_WAITKIND_SPURIOUS instead.
3846 2017-04-05 Pedro Alves <palves@redhat.com>
3848 * remote-utils.c (remote_prepare, remote_open): Constify.
3849 * remote-utils.h (remote_prepare, remote_open): Constify.
3850 * server.c (captured_main): Constify 'port' handling.
3852 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3854 * Makefile.in (clean): Clear .deps.
3856 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3858 * .gitignore: Remove generated files, replace with wildcard.
3859 * (clean): Replace removal of generated files with wildcard.
3860 (version.c): Replace with...
3861 (version-generated.c): ...this.
3862 (xml-builtin.c): Replace with...
3863 (xml-builtin-generated.c): ...this.
3864 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3865 (%.c: *regformats*): Replace with...
3866 (%-generated.c: *regformats*): ...this.
3868 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3870 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3871 (xtensa_fill_gregset): Call collect_register_by_name for
3873 (xtensa_store_gregset): Call supply_register_by_name for
3876 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3878 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3879 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3880 (xtensa_store_gregset): Call supply_register for all registers in
3881 a0_regnum..a0_regnum + C0_NREGS range.
3883 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3885 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3886 (ax-ipa.o: ax.c): Remove.
3887 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3888 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3889 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3890 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3891 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3893 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3895 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3896 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3897 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3898 (errors-ipa.o: ../common/errors.c): Remove.
3899 (format-ipa.o: ../common/format.c): Remove.
3900 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3902 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3904 * Makefile.in (%-ipa.o: %.c): New rule.
3905 (tracepoint-ipa.o: tracepoint.c): Remove.
3906 (utils-ipa.o: utils.c): Remove.
3907 (remote-utils-ipa.o: remote-utils.c): Remove.
3908 (regcache-ipa.o: regcache.c): Remove.
3909 (i386-linux-ipa.o: i386-linux.c): Remove.
3910 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3911 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3912 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3913 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3914 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3915 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3916 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3917 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3918 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3919 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3920 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3921 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3922 (aarch64-ipa.o: aarch64.c): Remove.
3923 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3924 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3925 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3926 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3927 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3928 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3929 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3930 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3931 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3932 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3933 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3934 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3935 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3936 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3937 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3938 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3939 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3940 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3941 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3942 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3943 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3944 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3945 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3946 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3947 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3948 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3949 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3950 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3951 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3952 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3953 (tdesc-ipa.o: tdesc.c): Remove.
3954 (x32-linux-ipa.o: x32-linux.c): Remove.
3955 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3956 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3958 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3960 * Makefile.in (%.o: ../arch/%.c): New rule.
3961 (arm.o: ../arch/arm.c): Remove.
3962 (arm-linux.o: ../arch/arm-linux.c): Remove.
3963 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3964 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3966 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3968 * Makefile.in (%.o: ../nat/%.c): New rule.
3969 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3970 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3971 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3972 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3973 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3974 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3975 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3976 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3977 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3978 (linux-personality.o: ../nat/linux-personality.c): Remove.
3979 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3980 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3981 (x86-linux.o: ../nat/x86-linux.c): Remove.
3982 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3983 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3985 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3987 * Makefile.in (%.o: ../common/%.c): New rule.
3988 (signals.o: ../common/signals.c): Remove.
3989 (print-utils.o: ../common/print-utils.c): Remove.
3990 (rsp-low.o: ../common/rsp-low.c): Remove.
3991 (common-utils.o: ../common/common-utils.c): Remove.
3992 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3993 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3994 (vec.o: ../common/vec.c): Remove.
3995 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3996 (xml-utils.o: ../common/xml-utils.c): Remove.
3997 (ptid.o: ../common/ptid.c): Remove.
3998 (buffer.o: ../common/buffer.c): Remove.
3999 (format.o: ../common/format.c): Remove.
4000 (filestuff.o: ../common/filestuff.c): Remove.
4001 (agent.o: ../common/agent.c): Remove.
4002 (errors.o: ../common/errors.c): Remove.
4003 (environ.o: ../common/environ.c): Remove.
4004 (common-debug.o: ../common/common-debug.c): Remove.
4005 (cleanups.o: ../common/cleanups.c): Remove.
4006 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4007 (fileio.o: ../common/fileio.c): Remove.
4008 (common-regcache.o: ../common/common-regcache.c): Remove.
4009 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4010 (new-op.o: ../common/new-op.c): Remove.
4011 (btrace-common.o: ../common/btrace-common.c): Remove.
4013 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4015 * Makefile.in (%.o: ../target/%.c): New rule.
4016 (waitstatus.o: ../target/waitstatus.c): Remove.
4018 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4021 (%.c: ../regformats/%.dat,
4022 (%.c: ../regformats/arm/%.dat,
4023 (%.c: ../regformats/i386/%.dat,
4024 (%.c: ../regformats/rs6000/%.dat): New rules.
4025 (aarch64.c): Remove.
4026 (reg-arm.c): Remove.
4027 (arm-with-iwmmxt.c): Remove.
4028 (arm-with-vfpv2.c): Remove.
4029 (arm-with-vfpv3.c): Remove.
4030 (arm-with-neon.c): Remove.
4031 (reg-bfin.c): Remove.
4032 (reg-cris.c): Remove.
4033 (reg-crisv32.c): Remove.
4035 (i386-linux.c): Remove.
4036 (i386-avx.c): Remove.
4037 (i386-avx-linux.c): Remove.
4038 (i386-avx-avx512.c): Remove.
4039 (i386-avx-avx512-linux.c): Remove.
4040 (i386-mpx.c): Remove.
4041 (i386-mpx-linux.c): Remove.
4042 (i386-avx-mpx-avx512-pku.c): Remove.
4043 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4044 (i386-avx-mpx.c): Remove.
4045 (i386-avx-mpx-linux.c): Remove.
4046 (i386-mmx.c): Remove.
4047 (i386-mmx-linux.c): Remove.
4048 (reg-ia64.c): Remove.
4049 (reg-m32r.c): Remove.
4050 (reg-m68k.c): Remove.
4052 (mips-linux.c): Remove.
4053 (mips-dsp-linux.c): Remove.
4054 (mips64-linux.c): Remove.
4055 (mips64-dsp-linux.c): Remove.
4056 (nios2-linux.c): Remove.
4057 (powerpc-32.c): Remove.
4058 (powerpc-32l.c): Remove.
4059 (powerpc-altivec32l.c): Remove.
4060 (powerpc-cell32l.c): Remove.
4061 (powerpc-vsx32l.c): Remove.
4062 (powerpc-isa205-32l.c): Remove.
4063 (powerpc-isa205-altivec32l.c): Remove.
4064 (powerpc-isa205-vsx32l.c): Remove.
4065 (powerpc-e500l.c): Remove.
4066 (powerpc-64l.c): Remove.
4067 (powerpc-altivec64l.c): Remove.
4068 (powerpc-cell64l.c): Remove.
4069 (powerpc-vsx64l.c): Remove.
4070 (powerpc-isa205-64l.c): Remove.
4071 (powerpc-isa205-altivec64l.c): Remove.
4072 (powerpc-isa205-vsx64l.c): Remove.
4073 (s390-linux32.c): Remove.
4074 (s390-linux32v1.c): Remove.
4075 (s390-linux32v2.c): Remove.
4076 (s390-linux64.c): Remove.
4077 (s390-linux64v1.c): Remove.
4078 (s390-linux64v2.c): Remove.
4079 (s390-te-linux64.c): Remove.
4080 (s390-vx-linux64.c): Remove.
4081 (s390-tevx-linux64.c): Remove.
4082 (s390x-linux64.c): Remove.
4083 (s390x-linux64v1.c): Remove.
4084 (s390x-linux64v2.c): Remove.
4085 (s390x-te-linux64.c): Remove.
4086 (s390x-vx-linux64.c): Remove.
4087 (s390x-tevx-linux64.c): Remove.
4088 (tic6x-c64xp-linux.c): Remove.
4089 (tic6x-c64x-linux.c): Remove.
4090 (tic6x-c62x-linux.c): Remove.
4092 (reg-sparc64.c): Remove.
4093 (reg-spu.c): Remove.
4095 (amd64-linux.c): Remove.
4096 (amd64-avx.c): Remove.
4097 (amd64-avx-linux.c): Remove.
4098 (amd64-avx-avx512.c): Remove.
4099 (amd64-avx-avx512-linux.c): Remove.
4100 (amd64-mpx.c): Remove.
4101 (amd64-mpx-linux.c): Remove.
4102 (amd64-avx-mpx-avx512-pku.c): Remove.
4103 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4104 (amd64-avx-mpx.c): Remove.
4105 (amd64-avx-mpx-linux.c): Remove.
4107 (x32-linux.c): Remove.
4108 (x32-avx.c): Remove.
4109 (x32-avx-linux.c): Remove.
4110 (x32-avx-avx512.c): Remove.
4111 (x32-avx-avx512-linux.c): Remove.
4112 (reg-xtensa.c): Remove.
4113 (reg-tilegx.c): Remove.
4114 (reg-tilegx32.c): Remove.
4116 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4118 * Makefile.in (SFILES): Add "common/environ.c".
4119 (OBJS): Add "common/environ.h".
4121 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4123 * configure.ac: Check if the fs_base and gs_base members of
4124 `struct user_regs_struct' exist.
4125 * config.in: Regenerated.
4126 * configure: Likewise.
4128 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4130 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4132 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4133 (get_next_pcs_syscall_next_pc): Likewise.
4135 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4137 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4138 * nto-x86-low.c: Likewise.
4140 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4142 * Makefile.in: Include disable-implicit-rules.mk.
4144 2016-11-23 Pedro Alves <palves@redhat.com>
4146 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4147 (debug_vprintf): Use std::chrono::steady_clock instead of
4148 gettimeofday. Use '.' instead of ':'.
4149 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4150 (get_timestamp): Use std::chrono::steady_clock instead of
4153 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4155 * Makefile.in: Fix whitespace formatting.
4157 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4159 * Makefile.in (SFILES, OBS): Flatten list and order
4162 2016-11-23 Pedro Alves <palves@redhat.com>
4164 * event-loop.c (handle_file_event): Use warning.
4165 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4166 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4169 2016-11-23 Pedro Alves <palves@redhat.com>
4171 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4173 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4174 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4175 debug_printf and debug_flush for debug output.
4176 * server.c (handle_general_set): Likewise.
4177 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4180 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4182 * Makefile.in (.c.o): Replace rule with ...
4183 (%.o: %.c): ... this one.
4185 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4187 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4188 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4190 * configure.ac: Remove checks for the make program.
4191 * configure: Re-generate.
4193 2016-10-28 Pedro Alves <palves@redhat.com>
4195 * Makefile.in (CXX_DIALECT): Get from configure.
4196 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4197 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4198 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4199 * config.in: Regenerate.
4200 * configure: Regenerate.
4202 2016-10-27 Yao Qi <yao.qi@linaro.org>
4204 * linux-low.c (linux_supports_range_stepping): Return true if
4205 can_software_single_step return true.
4207 2016-10-27 Yao Qi <yao.qi@linaro.org>
4209 * inferiors.c (find_inferior_in_random): New function.
4210 * inferiors.h (find_inferior_in_random): Declare.
4211 * linux-low.c (linux_wait_for_event_filtered): Call
4212 find_inferior_in_random instead of find_inferior.
4214 2016-10-27 Yao Qi <yao.qi@linaro.org>
4216 * linux-low.c (linux_wait_1): If single-step breakpoints are
4217 inserted, remove them.
4219 2016-10-26 Pedro Alves <palves@redhat.com>
4221 * linux-low.c (handle_extended_wait): Link parent/child fork
4223 (linux_wait_1): Unlink them.
4224 (linux_set_resume_request): Ignore resume requests for
4225 already-resumed and unhandled fork child threads.
4226 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4227 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4229 (handle_v_requests) <vCont>: Don't call require_running.
4230 * server.h (in_queued_stop_replies): New declaration.
4232 2016-10-24 Yao Qi <yao.qi@linaro.org>
4235 * linux-aarch64-low.c (append_insns): Cast the return value to
4238 2016-10-10 Yao Qi <yao.qi@linaro.org>
4240 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4242 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4244 * target.c (target_supports_multi_process): New function, moved
4246 * target.h (target_supports_multi_process): ... here. Remove
4249 2016-10-05 Tom Tromey <tom@tromey.com>
4252 * tracepoint.c (handle_tracepoint_bkpts): Check
4253 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4255 2016-10-05 Yao Qi <yao.qi@linaro.org>
4257 * configure.srv: Update the path of arm-*.xml files.
4259 2016-10-05 Terry Guo <terry.guo@arm.com>
4260 Yao Qi <yao.qi@linaro.org>
4262 * Makefile.in: Adjust the path of rules.
4263 * configure.srv: Update the path of xml files.
4264 * regformats/arm-with-iwmmxt.dat: Regenerated.
4265 * regformats/arm-with-neon.dat: Likewise.
4266 * regformats/arm-with-vfpv2.dat: Likewise.
4267 * regformats/arm-with-vfpv3.dat Likewise.
4269 2016-09-30 Yao Qi <yao.qi@linaro.org>
4272 * target.c (target_stop_and_wait): Don't call
4273 target_continue_no_signal, use resume_stop instead.
4275 2016-09-26 Yao Qi <yao.qi@linaro.org>
4277 * linux-low.c (linux_wait_1): Call debug_exit.
4279 2016-09-23 Pedro Alves <palves@redhat.com>
4281 * Makefile.in (SFILES): Add common/new-op.c.
4282 (OBS): Add common/new-op.o.
4283 (new-op.o): New rule.
4285 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4287 * .gitinore: Ignore more files.
4289 2016-09-21 Yao Qi <yao.qi@linaro.org>
4291 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4294 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4296 * server.c (start_inferior): Call target_mourn_inferior instead of
4297 mourn_inferior; pass ptid_t argument to it.
4299 (handle_target_event): Likewise.
4300 * target.c (target_mourn_inferior): New function.
4301 * target.h (mourn_inferior): Delete macro.
4303 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4305 * linux-low.c (lwp_is_stepping): New function.
4307 2016-09-06 Carl Love <cel@us.ibm.com>
4309 * server.c (start_inferior): Fixed comment, requested comment change
4310 didn't get updated correctly. Removed reference to ptrace () call as
4311 it is only true on Linux systems.
4313 2016-09-06 Carl Love <cel@us.ibm.com>
4315 * server.c (start_inferior): Do not call
4316 function target_post_create_inferior () if the
4317 inferior process has already exited.
4319 2016-09-05 Pedro Alves <palves@redhat.com>
4321 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4322 (COMPILE.pre, CC_LD): Use CXX directly.
4323 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4324 * acinclude.m4: Don't include build-with-cxx.m4.
4325 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4326 * configure: Regenerate.
4328 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4331 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4332 call writing data to own_buf.
4334 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4336 * target.c (mywait): Call target_wait instead of
4338 (target_wait): New function.
4340 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4342 * server.c (start_inferior): New variable 'ptid'. Replace calls
4343 to the_target->resume by target_continue{,_no_signal}, depending
4345 * target.c (target_stop_and_wait): Call target_continue_no_signal
4346 instead of the_target->resume.
4347 (target_continue): New function.
4349 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4351 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4353 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4356 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4358 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4359 * linux-arm-low.c (ps_get_thread_area): Likewise.
4360 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4361 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4362 * linux-mips-low.c (ps_get_thread_area): Likewise.
4363 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4364 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4365 * linux-x86-low.c (ps_get_thread_area): Likewise.
4366 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4368 2016-08-19 Pedro Alves <palves@redhat.com>
4370 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4372 2016-08-19 Pedro Alves <palves@redhat.com>
4374 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4375 comment. Use memcpy instead of casting through unsigned long.
4377 2016-08-19 Pedro Alves <palves@redhat.com>
4379 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4380 allocating around 0x80000000.
4382 2016-08-19 Pedro Alves <palves@redhat.com>
4385 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4386 (x32-avx512-linux-ipa.o): New rules.
4387 * configure.ac (x86_64-*-linux*): New x32 check.
4388 * configure.srv (ipa_x32_linux_regobj): New.
4389 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4390 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4392 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4394 * configure: Regenerate.
4396 2016-08-09 Pedro Alves <palves@redhat.com>
4399 * Makefile.in (OBS): Add signals-state-save-restore.o.
4400 (signals-state-save-restore.o): New rule.
4401 * config.in: Regenerate.
4402 * configure: Regenerate.
4403 * linux-low.c: Include "signals-state-save-restore.h".
4404 (linux_create_inferior): Call
4405 restore_original_signals_state.
4406 * server.c: Include "dispositions-save-restore.h".
4407 (captured_main): Call save_original_signals_state.
4409 2016-08-05 Pedro Alves <palves@redhat.com>
4411 * configure: Regenerate.
4413 2016-08-04 Yao Qi <yao.qi@linaro.org>
4415 * linux-low.c (regsets_fetch_inferior_registers): Check
4416 errno is ESRCH or not.
4418 2016-08-02 Yao Qi <yao.qi@linaro.org>
4420 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4421 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4422 (thread_db_load_search): Update.
4423 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4424 td_ta_set_event and td_ta_event_getmsg.
4426 2016-07-26 Pedro Alves <palves@redhat.com>
4429 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4430 of unsigned long for 64-bit registers and use uint32_t instead of
4431 unsigned int for 32-bit registers.
4433 2016-07-26 Pedro Alves <palves@redhat.com>
4435 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4438 2016-07-21 Tom Tromey <tom@tromey.com>
4440 * configure: Rebuild.
4442 2016-07-21 Yao Qi <yao.qi@linaro.org>
4444 * mem-break.c (find_gdb_breakpoint): Cast bp to
4445 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4447 2016-07-21 Yao Qi <yao.qi@linaro.org>
4449 * server.c (handle_v_requests): Support s and S actions
4450 if target_supports_software_single_step return true.
4452 2016-07-21 Yao Qi <yao.qi@linaro.org>
4454 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4455 is resume_step, call maybe_hw_step.
4456 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4458 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4460 (proceed_one_lwp): If resume request is resume_step, install
4461 reinsert breakpoints and call maybe_hw_step.
4463 2016-07-21 Yao Qi <yao.qi@linaro.org>
4465 * linux-low.c (proceed_one_lwp): Declare.
4466 (linux_resume_one_thread): Remove local variable 'step'.
4467 Lift code enqueue signal. Call proceed_one_lwp instead of
4468 linux_resume_one_lwp.
4470 2016-07-21 Yao Qi <yao.qi@linaro.org>
4472 * linux-low.c (linux_resume_one_thread): Call
4473 enqueue_pending_signal.
4475 2016-07-21 Yao Qi <yao.qi@linaro.org>
4477 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4478 * inferiors.c (do_restore_current_thread_cleanup): New function.
4479 (make_cleanup_restore_current_thread): Likewise.
4480 * linux-low.c (install_software_single_step_breakpoints): Call
4481 make_cleanup_restore_current_thread. Switch current_thread to
4484 2016-07-21 Yao Qi <yao.qi@linaro.org>
4486 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4487 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4488 (clone_one_breakpoint): Likewise.
4489 (delete_reinsert_breakpoints): Change parameter to thread.
4491 (has_reinsert_breakpoints): Likewise.
4492 (uninsert_reinsert_breakpoints): Likewise.
4493 (reinsert_reinsert_breakpoints): Likewise.
4494 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4495 (delete_reinsert_breakpoints): Likewise.
4496 (reinsert_reinsert_breakpoints): Likewise.
4497 (uninsert_reinsert_breakpoints): Likewise.
4498 (has_reinsert_breakpoints): Likewise.
4500 2016-07-21 Yao Qi <yao.qi@linaro.org>
4502 * inferiors.c (get_thread_process): Make parameter const.
4503 * inferiors.h (get_thread_process): Update declaration.
4504 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4505 Add new parameters child_thread and parent_thread. Callers
4507 * mem-break.h (clone_all_breakpoints): Update declaration.
4509 2016-07-21 Yao Qi <yao.qi@linaro.org>
4511 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4512 <command_list, handler>: Remove.
4513 (struct gdb_breakpoint): New.
4514 (struct other_breakpoint): New.
4515 (struct reinsert_breakpoint): New.
4516 (is_gdb_breakpoint): New function.
4517 (any_persistent_commands): Update command_list if
4518 is_gdb_breakpoint returns true.
4519 (set_breakpoint): Create breakpoints according to their types.
4520 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4521 (set_gdb_breakpoint_1): Likewise.
4522 (set_gdb_breakpoint): Likewise.
4523 (clear_breakpoint_conditions): Change parameter type to
4524 'struct gdb_breakpoint *'.
4525 (clear_breakpoint_commands): Likewise.
4526 (clear_breakpoint_conditions_and_commands): Likewise.
4527 (add_condition_to_breakpoint): Likewise.
4528 (add_breakpoint_condition): Likewise.
4529 (add_commands_to_breakpoint): Likewise.
4530 (check_breakpoints): Check other_breakpoint.
4531 (clone_one_breakpoint): Clone breakpopint according to its type.
4532 * mem-break.h (struct gdb_breakpoint): Declare.
4533 (set_gdb_breakpoint): Update declaration.
4534 (clear_breakpoint_conditions_and_commands): Likewise.
4535 (add_breakpoint_condition): Likewise.
4536 (add_breakpoint_commands): Likewise.
4537 * server.c (process_point_options): Change parameter type to
4538 'struct gdb_breakpoint *'.
4540 2016-07-21 Yao Qi <yao.qi@linaro.org>
4542 * mem-break.c (set_breakpoint_at): Rename it to ...
4543 (set_breakpoint_type_at): ... it.
4544 (set_breakpoint_at): Call set_breakpoint_type_at.
4545 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4546 * mem-break.h (set_breakpoint_at): Update comments.
4548 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4550 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4552 (nios2_store_gregset): Likewise.
4554 2016-07-01 Pedro Alves <palves@redhat.com>
4555 Antoine Tremblay <antoine.tremblay@ericsson.com>
4557 * linux-low.c: Change interface to take the target lwp_info
4558 pointer directly and return void. Handle detaching from a zombie
4560 (linux_detach_lwp_callback): New function.
4561 (linux_detach): Detach from the leader thread after detaching from
4564 2016-06-28 Yao Qi <yao.qi@linaro.org>
4566 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4567 for variable new_offset.
4568 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4569 (aarch64_ftrace_insn_reloc_cb): Likewise.
4570 (aarch64_ftrace_insn_reloc_tb): Likewise.
4571 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4572 PRIx64 instead of PRIx32.
4574 2016-06-28 Yao Qi <yao.qi@linaro.org>
4576 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4577 (the_low_target): Install arm_get_syscall_trapinfo.
4579 2016-06-28 Yao Qi <yao.qi@linaro.org>
4581 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4583 (the_low_target): Install aarch64_get_syscall_trapinfo.
4585 2016-06-28 Yao Qi <yao.qi@linaro.org>
4587 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4589 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4590 Remove parameter sysno.
4591 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4594 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4596 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4597 (s390_emit_ne_goto): Likewise.
4598 (s390_emit_lt_goto): Likewise.
4599 (s390_emit_le_goto): Likewise.
4600 (s390_emit_gt_goto): Likewise.
4601 (s390_emit_ge_goto): Likewise.
4602 (s390x_emit_eq_goto): Likewise.
4603 (s390x_emit_ne_goto): Likewise.
4604 (s390x_emit_lt_goto): Likewise.
4605 (s390x_emit_le_goto): Likewise.
4606 (s390x_emit_gt_goto): Likewise.
4607 (s390x_emit_ge_goto): Likewise.
4608 (s390_emit_ops_impl): Mark variable static.
4609 (s390x_emit_ops): Likewise.
4611 2016-06-17 Yao Qi <yao.qi@linaro.org>
4613 * linux-low.c (handle_extended_wait): Call
4614 uninsert_reinsert_breakpoints for the parent process. Remove
4615 reinsert breakpoints from the child process. Reinsert them to
4616 the parent process when vfork is done.
4617 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4618 (reinsert_reinsert_breakpoints): New function.
4619 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4620 (reinsert_reinsert_breakpoints): Declare.
4622 2016-06-17 Yao Qi <yao.qi@linaro.org>
4624 * linux-low.c (handle_extended_wait): If the parent is doing
4625 step-over, remove the reinsert breakpoints from the forked child.
4627 2016-06-17 Yao Qi <yao.qi@linaro.org>
4629 * linux-low.c (unsuspend_all_lwps): Declare.
4630 (linux_low_filter_event): If thread exited, call finish_step_over.
4631 If step-over is finished, unsuspend other threads.
4633 2016-06-17 Yao Qi <yao.qi@linaro.org>
4635 * linux-low.c (linux_resume_one_lwp_throw): Assert
4636 has_reinsert_breakpoints returns false.
4637 * mem-break.c (delete_disabled_breakpoints): Assert
4638 bp type isn't reinsert_breakpoint.
4640 2016-06-17 Yao Qi <yao.qi@linaro.org>
4642 * linux-low.c (maybe_hw_step): New function.
4643 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4644 (finish_step_over): Switch current_thread to lwp temporarily,
4645 and assert has_reinsert_breakpoints returns true.
4646 (proceed_one_lwp): Call maybe_hw_step.
4647 * mem-break.c (has_reinsert_breakpoints): New function.
4648 * mem-break.h (has_reinsert_breakpoints): Declare.
4650 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4652 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4654 2016-05-17 Yao Qi <yao.qi@linaro.org>
4656 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4657 instead of find_inferior.
4659 2016-05-05 Yao Qi <yao.qi@linaro.org>
4661 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4662 Initialize res to zero.
4664 2016-05-05 Yao Qi <yao.qi@linaro.org>
4666 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4669 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4671 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4672 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4673 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4675 2016-04-28 Par Olsson <par.olsson@windriver.com>
4676 Simon Marchi <simon.marchi@ericsson.com>
4678 * tracepoint.c (write_inferior_int8): New function.
4679 (cmd_qtenable_disable): Write enable flag using
4680 write_inferior_int8.
4682 2016-04-25 Yao Qi <yao.qi@linaro.org>
4684 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4685 (need_step_over_p): Return zero if the LWP has pending signals
4686 can be delivered on software single step target.
4688 2016-04-25 Yao Qi <yao.qi@linaro.org>
4690 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4691 return instead of error.
4693 2016-04-22 Yao Qi <yao.qi@linaro.org>
4695 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4698 2016-04-22 Yao Qi <yao.qi@linaro.org>
4700 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4701 signal when stepping over breakpoint with software single
4704 2016-04-21 Pedro Alves <palves@redhat.com>
4706 * linux-s390-low.c (s390_collect_ptrace_register)
4707 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4709 (s390_check_regset): Use void * instead of gdb_byte *.
4711 2016-04-20 Pedro Alves <palves@redhat.com>
4713 * configure: Renegerate.
4715 2016-04-20 Yao Qi <yao.qi@linaro.org>
4717 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4718 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4720 (arm_store_gregset): Likewise.
4722 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4724 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4725 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4726 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4727 (amd64-avx-mpx-linux.c): New rules.
4728 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4729 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4730 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4731 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4732 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4733 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4734 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4735 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4736 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4737 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4738 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4739 * linux-x86-low.c (x86_linux_read_description): Add case for
4740 X86_XSTATE_AVX_MPX_MASK.
4741 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4742 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4743 init_registers_i386_avx_mpx_linux.
4744 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4745 (initialize_low_tracepoint): Call
4746 init_registers_i386_avx_mpx_linux.
4747 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4748 (initialize_low_tracepoint): Call
4749 init_registers_amd64_avx_mpx_linux.
4750 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4751 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4752 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4755 2016-04-18 Pedro Alves <palves@redhat.com>
4757 * configure: Regenerate.
4759 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4761 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4762 (aarch64_emit_sub): Likewise.
4764 2016-04-12 Pedro Alves <palves@redhat.com>
4766 * utils.c (prepare_to_throw_exception): Delete.
4768 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4770 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4772 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4774 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4776 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4778 * linux-aarch64-ipa.c: Add <elf.h> include.
4779 * linux-ppc-ipa.c: Add <elf.h> include.
4780 * linux-s390-ipa.c: Add <elf.h> include.
4782 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4784 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4785 (get_raw_reg_ptr): Likewise.
4786 (get_trace_state_variable_value_ptr): Likewise.
4787 (set_trace_state_variable_value_ptr): Likewise.
4788 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4791 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4792 Marcin Kościelnicki <koriakin@0x04.net>
4795 * linux-ppc-low.c (emit_insns): New function.
4796 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4797 (ppc_emit_prologue): New function.
4798 (ppc_emit_epilogue): New function.
4799 (ppc_emit_add): New function.
4800 (ppc_emit_sub): New function.
4801 (ppc_emit_mul): New function.
4802 (ppc_emit_lsh): New function.
4803 (ppc_emit_rsh_signed): New function.
4804 (ppc_emit_rsh_unsigned): New function.
4805 (ppc_emit_ext): New function.
4806 (ppc_emit_zero_ext): New function.
4807 (ppc_emit_log_not): New function.
4808 (ppc_emit_bit_and): New function.
4809 (ppc_emit_bit_or): New function.
4810 (ppc_emit_bit_xor): New function.
4811 (ppc_emit_bit_not): New function.
4812 (ppc_emit_equal): New function.
4813 (ppc_emit_less_signed): New function.
4814 (ppc_emit_less_unsigned): New function.
4815 (ppc_emit_ref): New function.
4816 (ppc_emit_const): New function.
4817 (ppc_emit_reg): New function.
4818 (ppc_emit_pop): New function.
4819 (ppc_emit_stack_flush): New function.
4820 (ppc_emit_swap): New function.
4821 (ppc_emit_stack_adjust): New function.
4822 (ppc_emit_call): New function.
4823 (ppc_emit_int_call_1): New function.
4824 (ppc_emit_void_call_2): New function.
4825 (ppc_emit_if_goto): New function.
4826 (ppc_emit_goto): New function.
4827 (ppc_emit_eq_goto): New function.
4828 (ppc_emit_ne_goto): New function.
4829 (ppc_emit_lt_goto): New function.
4830 (ppc_emit_le_goto): New function.
4831 (ppc_emit_gt_goto): New function.
4832 (ppc_emit_ge_goto): New function.
4833 (ppc_write_goto_address): New function.
4834 (ppc_emit_ops_impl): New static variable.
4835 (ppc64v1_emit_prologue): New function.
4836 (ppc64v2_emit_prologue): New function.
4837 (ppc64_emit_epilogue): New function.
4838 (ppc64_emit_add): New function.
4839 (ppc64_emit_sub): New function.
4840 (ppc64_emit_mul): New function.
4841 (ppc64_emit_lsh): New function.
4842 (ppc64_emit_rsh_signed): New function.
4843 (ppc64_emit_rsh_unsigned): New function.
4844 (ppc64_emit_ext): New function.
4845 (ppc64_emit_zero_ext): New function.
4846 (ppc64_emit_log_not): New function.
4847 (ppc64_emit_bit_and): New function.
4848 (ppc64_emit_bit_or): New function.
4849 (ppc64_emit_bit_xor): New function.
4850 (ppc64_emit_bit_not): New function.
4851 (ppc64_emit_equal): New function.
4852 (ppc64_emit_less_signed): New function.
4853 (ppc64_emit_less_unsigned): New function.
4854 (ppc64_emit_ref): New function.
4855 (ppc64_emit_const): New function.
4856 (ppc64v1_emit_reg): New function.
4857 (ppc64v2_emit_reg): New function.
4858 (ppc64_emit_pop): New function.
4859 (ppc64_emit_stack_flush): New function.
4860 (ppc64_emit_swap): New function.
4861 (ppc64v1_emit_call): New function.
4862 (ppc64v2_emit_call): New function.
4863 (ppc64v1_emit_int_call_1): New function.
4864 (ppc64v2_emit_int_call_1): New function.
4865 (ppc64v1_emit_void_call_2): New function.
4866 (ppc64v2_emit_void_call_2): New function.
4867 (ppc64_emit_if_goto): New function.
4868 (ppc64_emit_eq_goto): New function.
4869 (ppc64_emit_ne_goto): New function.
4870 (ppc64_emit_lt_goto): New function.
4871 (ppc64_emit_le_goto): New function.
4872 (ppc64_emit_gt_goto): New function.
4873 (ppc64_emit_ge_goto): New function.
4874 (ppc64v1_emit_ops_impl): New static variable.
4875 (ppc64v2_emit_ops_impl): New static variable.
4876 (ppc_emit_ops): New function.
4877 (linux_low_target): Wire in ppc_emit_ops.
4879 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4880 Marcin Kościelnicki <koriakin@0x04.net>
4883 * Makefile.in: Add powerpc-*-ipa.o
4884 * configure.srv: Add ipa_obj for powerpc*-linux.
4885 * linux-ppc-ipa.c: New file.
4886 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4888 (PPC_FIELD): New macro.
4889 (PPC_SEXT): New macro.
4890 (PPC_OP6): New macro.
4891 (PPC_BO): New macro.
4892 (PPC_LI): New macro.
4893 (PPC_BD): New macro.
4894 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4895 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4896 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4897 (ppc_get_thread_area): New function.
4898 (is_elfv2_inferior): New function.
4899 (gen_ds_form): New function.
4900 (GEN_STD): New macro.
4901 (GEN_STDU): New macro.
4902 (GEN_LD): New macro.
4903 (GEN_LDU): New macro.
4904 (gen_d_form): New function.
4905 (GEN_ADDI): New macro.
4906 (GEN_ADDIS): New macro.
4907 (GEN_LI): New macro.
4908 (GEN_LIS): New macro.
4909 (GEN_ORI): New macro.
4910 (GEN_ORIS): New macro.
4911 (GEN_LWZ): New macro.
4912 (GEN_STW): New macro.
4913 (GEN_STWU): New macro.
4914 (gen_xfx_form): New function.
4915 (GEN_MFSPR): New macro.
4916 (GEN_MTSPR): New macro.
4917 (GEN_MFCR): New macro.
4918 (GEN_MTCR): New macro.
4919 (GEN_SYNC): New macro.
4920 (GEN_LWSYNC): New macro.
4921 (gen_x_form): New function.
4922 (GEN_OR): New macro.
4923 (GEN_MR): New macro.
4924 (GEN_LWARX): New macro.
4925 (GEN_STWCX): New macro.
4926 (GEN_CMPW): New macro.
4927 (gen_md_form): New function.
4928 (GEN_RLDICL): New macro.
4929 (GEN_RLDICR): New macro.
4930 (gen_i_form): New function.
4932 (GEN_BL): New macro.
4933 (gen_b_form): New function.
4934 (GEN_BNE): New macro.
4935 (GEN_LOAD): New macro.
4936 (GEN_STORE): New macro.
4937 (gen_limm): New function.
4938 (gen_atomic_xchg): New function.
4939 (gen_call): New function.
4940 (ppc_relocate_instruction): New function.
4941 (ppc_install_fast_tracepoint_jump_pad): New function.
4942 (ppc_get_min_fast_tracepoint_insn_len): New function.
4943 (ppc_get_ipa_tdesc_idx): New function.
4944 (the_low_target): Wire in the new functions.
4945 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4947 * linux-ppc-tdesc.h: New file.
4949 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4951 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4952 (alloc_jump_pad_buffer): New function.
4953 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4954 (alloc_jump_pad_buffer): New function.
4955 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4956 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4957 (alloc_jump_pad_buffer): New function.
4958 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4959 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4960 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4961 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4963 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4965 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4966 * linux-amd64-ipa.c: Likewise.
4967 * linux-i386-ipa.c: Likewise.
4968 * linux-s390-ipa.c: Likewise.
4969 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4970 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4971 set_trace_state_variable_value_ptr.
4972 (struct ipa_sym_addresses): Likewise.
4973 (symbol_list): Likewise.
4974 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4975 accessing gdb_collect directly.
4976 (gdb_collect_ptr_type): New typedef.
4977 (get_raw_reg_ptr_type): New typedef.
4978 (get_trace_state_variable_value_ptr_type): New typedef.
4979 (set_trace_state_variable_value_ptr_type): New typedef.
4980 (gdb_collect_ptr): New global.
4981 (get_raw_reg_ptr): New global.
4982 (get_trace_state_variable_value_ptr): New global.
4983 (set_trace_state_variable_value_ptr): New global.
4984 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4985 accessing get_raw_reg directly.
4986 (get_get_tsv_func_addr): Likewise for
4987 get_trace_state_variable_value_ptr.
4988 (get_set_tsv_func_addr): Likewise for
4989 set_trace_state_variable_value_ptr.
4990 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4992 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4994 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4996 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4998 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5000 (relocate_instruction): Remove own_buf.
5001 * server.c (own_buf): Make global.
5002 (handle_v_requests): Make global.
5003 * server.h (own_buf): New declaration.
5004 (handle_v_requests): New prototype.
5006 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5009 * linux-s390-low.c (add_insns): New function.
5010 (s390_emit_prologue): New function.
5011 (s390_emit_epilogue): New function.
5012 (s390_emit_add): New function.
5013 (s390_emit_sub): New function.
5014 (s390_emit_mul): New function.
5015 (s390_emit_lsh): New function.
5016 (s390_emit_rsh_signed): New function.
5017 (s390_emit_rsh_unsigned): New function.
5018 (s390_emit_ext): New function.
5019 (s390_emit_log_not): New function.
5020 (s390_emit_bit_and): New function.
5021 (s390_emit_bit_or): New function.
5022 (s390_emit_bit_xor): New function.
5023 (s390_emit_bit_not): New function.
5024 (s390_emit_equal): New function.
5025 (s390_emit_less_signed): New function.
5026 (s390_emit_less_unsigned): New function.
5027 (s390_emit_ref): New function.
5028 (s390_emit_if_goto): New function.
5029 (s390_emit_goto): New function.
5030 (s390_write_goto_address): New function.
5031 (s390_emit_litpool): New function.
5032 (s390_emit_const): New function.
5033 (s390_emit_call): New function.
5034 (s390_emit_reg): New function.
5035 (s390_emit_pop): New function.
5036 (s390_emit_stack_flush): New function.
5037 (s390_emit_zero_ext): New function.
5038 (s390_emit_swap): New function.
5039 (s390_emit_stack_adjust): New function.
5040 (s390_emit_set_r2): New function.
5041 (s390_emit_int_call_1): New function.
5042 (s390_emit_void_call_2): New function.
5043 (s390_emit_eq_goto): New function.
5044 (s390_emit_ne_goto): New function.
5045 (s390_emit_lt_goto): New function.
5046 (s390_emit_le_goto): New function.
5047 (s390_emit_gt_goto): New function.
5048 (s390_emit_ge_goto): New function.
5049 (s390x_emit_prologue): New function.
5050 (s390x_emit_epilogue): New function.
5051 (s390x_emit_add): New function.
5052 (s390x_emit_sub): New function.
5053 (s390x_emit_mul): New function.
5054 (s390x_emit_lsh): New function.
5055 (s390x_emit_rsh_signed): New function.
5056 (s390x_emit_rsh_unsigned): New function.
5057 (s390x_emit_ext): New function.
5058 (s390x_emit_log_not): New function.
5059 (s390x_emit_bit_and): New function.
5060 (s390x_emit_bit_or): New function.
5061 (s390x_emit_bit_xor): New function.
5062 (s390x_emit_bit_not): New function.
5063 (s390x_emit_equal): New function.
5064 (s390x_emit_less_signed): New function.
5065 (s390x_emit_less_unsigned): New function.
5066 (s390x_emit_ref): New function.
5067 (s390x_emit_if_goto): New function.
5068 (s390x_emit_const): New function.
5069 (s390x_emit_call): New function.
5070 (s390x_emit_reg): New function.
5071 (s390x_emit_pop): New function.
5072 (s390x_emit_stack_flush): New function.
5073 (s390x_emit_zero_ext): New function.
5074 (s390x_emit_swap): New function.
5075 (s390x_emit_stack_adjust): New function.
5076 (s390x_emit_int_call_1): New function.
5077 (s390x_emit_void_call_2): New function.
5078 (s390x_emit_eq_goto): New function.
5079 (s390x_emit_ne_goto): New function.
5080 (s390x_emit_lt_goto): New function.
5081 (s390x_emit_le_goto): New function.
5082 (s390x_emit_gt_goto): New function.
5083 (s390x_emit_ge_goto): New function.
5084 (s390_emit_ops): New function.
5085 (struct linux_target_ops): Fill in emit_ops hook.
5087 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5090 * Makefile.in: Add s390 IPA files.
5091 * configure.srv: Build IPA for s390.
5092 * linux-s390-ipa.c: New file.
5093 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5094 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5095 (tdesc_s390_linux32): Likewise.
5096 (init_registers_s390_linux32v1): Likewise.
5097 (tdesc_s390_linux32v1): Likewise.
5098 (init_registers_s390_linux32v2): Likewise.
5099 (tdesc_s390_linux32v2): Likewise.
5100 (init_registers_s390_linux64): Likewise.
5101 (tdesc_s390_linux64): Likewise.
5102 (init_registers_s390_linux64v1): Likewise.
5103 (tdesc_s390_linux64v1): Likewise.
5104 (init_registers_s390_linux64v2): Likewise.
5105 (tdesc_s390_linux64v2): Likewise.
5106 (init_registers_s390_te_linux64): Likewise.
5107 (tdesc_s390_te_linux64): Likewise.
5108 (init_registers_s390_vx_linux64): Likewise.
5109 (tdesc_s390_vx_linux64): Likewise.
5110 (init_registers_s390_tevx_linux64): Likewise.
5111 (tdesc_s390_tevx_linux64): Likewise.
5112 (init_registers_s390x_linux64): Likewise.
5113 (tdesc_s390x_linux64): Likewise.
5114 (init_registers_s390x_linux64v1): Likewise.
5115 (tdesc_s390x_linux64v1): Likewise.
5116 (init_registers_s390x_linux64v2): Likewise.
5117 (tdesc_s390x_linux64v2): Likewise.
5118 (init_registers_s390x_te_linux64): Likewise.
5119 (tdesc_s390x_te_linux64): Likewise.
5120 (init_registers_s390x_vx_linux64): Likewise.
5121 (tdesc_s390x_vx_linux64): Likewise.
5122 (init_registers_s390x_tevx_linux64): Likewise.
5123 (tdesc_s390x_tevx_linux64): Likewise.
5124 (have_hwcap_s390_vx): New static variable.
5125 (s390_arch_setup): Fill have_hwcap_s390_vx.
5126 (s390_get_thread_area): New function.
5127 (s390_ft_entry_gpr_esa): New const.
5128 (s390_ft_entry_gpr_zarch): New const.
5129 (s390_ft_entry_misc): New const.
5130 (s390_ft_entry_fr): New const.
5131 (s390_ft_entry_vr): New const.
5132 (s390_ft_main_31): New const.
5133 (s390_ft_main_64): New const.
5134 (s390_ft_exit_fr): New const.
5135 (s390_ft_exit_vr): New const.
5136 (s390_ft_exit_misc): New const.
5137 (s390_ft_exit_gpr_esa): New const.
5138 (s390_ft_exit_gpr_zarch): New const.
5139 (append_insns): New function.
5140 (s390_relocate_instruction): New function.
5141 (s390_install_fast_tracepoint_jump_pad): New function.
5142 (s390_get_min_fast_tracepoint_insn_len): New function.
5143 (s390_get_ipa_tdesc_idx): New function.
5144 (struct linux_target_ops): Wire in the above functions.
5145 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5146 * linux-s390-tdesc.h: New file.
5148 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5150 * linux-s390-low.c (s390_supports_tracepoints): New function.
5151 (struct linux_target_ops): Fill supports_tracepoints hook.
5153 2016-03-18 Yao Qi <yao.qi@linaro.org>
5155 * linux-low.c (lwp_signal_can_be_delivered): New function.
5156 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5158 2016-03-18 Yao Qi <yao.qi@linaro.org>
5160 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5161 0 if signal is enqueued. Remove 'signal' from one debugging
5162 message. Move one debugging message to some lines below.
5163 Remove code setting 'signal' to 0.
5165 2016-03-18 Yao Qi <yao.qi@linaro.org>
5167 * linux-low.c (linux_low_filter_event): Remove redundant
5168 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5170 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5172 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5173 (struct linux_target_ops): Wire in the above.
5175 2016-03-03 Yao Qi <yao.qi@linaro.org>
5177 * linux-low.c: Update comments to start_step_over.
5179 2016-03-03 Yao Qi <yao.qi@linaro.org>
5182 * linux-low.c (handle_extended_wait): Set child suspended
5183 if event_lwp->bp_reinsert isn't zero.
5185 2016-03-02 Yao Qi <yao.qi@linaro.org>
5187 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5188 enqueue_pending_signal.
5190 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5192 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5195 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5197 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5198 (s390_regmap_3264) [!__s390x__]: New global.
5199 (s390_collect_ptrace_register): Skip map entries containing -1.
5200 (s390_supply_ptrace_register): Ditto.
5201 (s390_fill_gprs_high): New function.
5202 (s390_store_gprs_high): New function.
5203 (s390_regsets): Add NT_S390_HIGH_GPRS.
5204 (s390_get_hwcap): Enable on 31-bit.
5205 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5206 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5207 Detect NT_S390_HIGH_GPRS.
5208 (s390_usrregs_info_3264): Enable on 31-bit.
5209 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5210 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5212 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5215 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5216 * configure.srv: Ditto.
5217 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5218 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5219 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5220 (init_registers_amd64_linux): Remove prototype.
5221 (tdesc_amd64_linux): Remove declaration.
5222 (get_ipa_tdesc): New function.
5223 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5224 initialize remaining tdescs.
5225 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5226 (init_registers_i386_linux): Remove prototype.
5227 (tdesc_i386_linux): Remove declaration.
5228 (get_ipa_tdesc): New function.
5229 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5230 initialize remaining tdescs.
5231 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5232 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5233 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5234 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5235 (x86_get_ipa_tdesc_idx): New function.
5236 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5237 * linux-x86-tdesc.h: New file.
5238 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5239 (target_get_ipa_tdesc_idx): New macro.
5240 * tracepoint.c (ipa_tdesc_idx): New macro.
5241 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5242 (symbol_list): Add ipa_tdesc_idx.
5243 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5244 (ipa_tdesc): Remove.
5245 (ipa_tdesc_idx): New variable.
5246 (get_context_regcache): Use get_ipa_tdesc.
5247 (gdb_collect): Ditto.
5249 * tracepoint.h (get_ipa_tdesc): New prototype.
5250 (ipa_tdesc): Remove.
5252 2016-02-24 Pedro Alves <palves@redhat.com>
5254 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5255 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5256 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5257 Factor out common code between the USE_SIGTRAP_SIGINFO and
5258 !USE_SIGTRAP_SIGINFO blocks.
5259 (linux_low_filter_event): Call save_stop_reason instead of
5260 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5262 (linux_wait_1): Update comments.
5264 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5266 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5267 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5268 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5269 ppc_insert_point, ppc_remove_point.
5271 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5273 * linux-s390-low.c (s390_supports_z_point_type): New function.
5274 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5276 2016-02-16 Yao Qi <yao.qi@linaro.org>
5278 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5279 PC. Get pc from regcache_read_pc.
5281 2016-02-12 Yao Qi <yao.qi@linaro.org>
5283 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5284 or linux_get_pc_32bit.
5285 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5287 2016-02-12 Yao Qi <yao.qi@linaro.org>
5289 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5290 arm_linux_get_next_pcs_fixup.
5292 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5294 * tracepoint.c (x_tracepoint_action_download): Change
5295 write_inferior_data_ptr to write_inferior_data_pointer.
5296 (cmd_qtstart): Likewise.
5297 (write_inferior_data_ptr): Remove.
5298 (download_agent_expr): Change write_inferior_data_ptr to
5299 write_inferior_data_pointer.
5300 (download_tracepoint_1): Likewise.
5301 (download_tracepoint): Likewise.
5302 (download_trace_state_variables): Likewise.
5304 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5305 Marcin Kościelnicki <koriakin@0x04.net>
5307 * tracepoint.c (struct tracepoint_action_ops): Remove.
5308 (struct tracepoint_action): Remove ops.
5309 (m_tracepoint_action_download, r_tracepoint_action_download)
5310 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5311 size and offset accordingly.
5312 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5313 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5314 (tracepoint_action_send, tracepoint_action_download): New functions.
5315 Helpers for trace action handlers.
5316 (add_tracepoint_action): Remove setup actions ops.
5317 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5319 2016-02-10 Yao Qi <yao.qi@linaro.org>
5321 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5323 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5325 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5327 * configure: Regenerate.
5329 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5331 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5332 void * to gdb_byte *.
5333 * linux-low.c (siginfo_fixup): Likewise.
5334 (linux_xfer_siginfo): Likewise.
5335 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5337 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5339 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5341 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5343 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5345 * linux-x86-low.c [__x86_64__]: Include
5346 "nat/amd64-linux-siginfo.h".
5347 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5348 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5349 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5350 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5351 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5352 (cpt_si_fd, si_timerid, si_overrun): Move from
5353 nat/amd64-linux-siginfo.c.
5354 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5356 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5358 * server.c (skip_to_semicolon): Remove.
5359 (process_point_options): Use strchrnul instead of
5362 2016-01-26 Yao Qi <yao.qi@linaro.org>
5364 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5365 * linux-low.c (install_software_single_step_breakpoints): Don't
5366 call regcache_read_pc.
5367 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5370 2016-01-26 Yao Qi <yao.qi@linaro.org>
5372 * linux-low.c (install_software_single_step_breakpoints): Call
5373 regcache_read_pc instead of get_pc.
5375 2016-01-26 Yao Qi <yao.qi@linaro.org>
5377 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5378 (unblock_async_io): Rename to ...
5379 (block_unblock_async_io): ... it. New function.
5380 (enable_async_io): Don't install SIGIO handler. Unblock it
5382 (disable_async_io): Don't ignore SIGIO. Block it instead.
5383 (initialize_async_io): Install SIGIO handler. Don't call
5386 2016-01-26 Yao Qi <yao.qi@linaro.org>
5388 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5389 first character is '\003', call *the_target->request_interrupt.
5391 2016-01-25 Yao Qi <yao.qi@linaro.org>
5393 * remote-utils.c (new_thread_notify): Remove.
5394 (dead_thread_notify): Likewise.
5395 * remote-utils.h (new_thread_notify): Remove declaration.
5396 (dead_thread_notify): Likewise.
5398 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5400 * gdb.trace/pending.exp: Fix expected message on continue.
5402 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5404 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5405 it works properly on big-endian machines where sizeof (CORE_ADDR)
5408 2016-01-21 Pedro Alves <palves@redhat.com>
5410 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5411 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5412 * configure: Regenerate.
5414 2016-01-21 Yao Qi <yao.qi@linaro.org>
5416 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5417 is_thumb and set it according to CPSR saved on the stack.
5418 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5419 arm_sigreturn_next_pc.
5421 2016-01-18 Yao Qi <yao.qi@linaro.org>
5423 * linux-low.c (linux_set_pc_64bit): New function.
5424 (linux_get_pc_64bit): New function.
5425 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5427 * linux-sparc-low.c (debug_threads): Remove declaration.
5428 (sparc_get_pc): Remove.
5429 (the_low_target): Use linux_get_pc_64bit instead of
5431 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5432 (the_low_target): Use linux_get_pc_64bit and
5435 2016-01-18 Yao Qi <yao.qi@linaro.org>
5437 * linux-arm-low.c (debug_threads): Remove declaration.
5438 (arm_get_pc, arm_set_pc): Remove.
5439 (the_low_target): Use linux_get_pc_32bit and
5441 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5442 (the_low_target): Use linux_get_pc_32bit and
5444 * linux-cris-low.c (debug_threads): Remove declaration.
5445 (cris_get_pc, cris_set_pc,): Remove.
5446 (the_low_target): Use linux_get_pc_32bit and
5448 * linux-crisv32-low.c (debug_threads): Remove declaration.
5449 (cris_get_pc, cris_set_pc): Remove.
5450 (the_low_target): Use linux_get_pc_32bit and
5452 * linux-low.c: Include inttypes.h.
5453 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5454 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5455 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5456 (the_low_target): Use linux_get_pc_32bit and
5458 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5459 (the_low_target): Use linux_get_pc_32bit and
5461 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5462 (the_low_target): Use linux_get_pc_32bit and
5464 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5465 (the_low_target): Use linux_get_pc_32bit and
5467 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5468 (the_low_target): Use linux_get_pc_32bit and
5471 2016-01-18 Gary Benson <gbenson@redhat.com>
5473 * configure.ac (AC_FUNC_FORK): New check.
5474 * config.in: Regenerate.
5475 * configure: Likewise.
5477 2016-01-14 Yao Qi <yao.qi@linaro.org>
5479 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5480 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5481 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5482 arm_get_next_pcs_ctor.
5484 2016-01-12 Josh Stone <jistone@redhat.com>
5485 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5487 * inferiors.h: Include "gdb_vecs.h".
5488 (struct process_info): Add syscalls_to_catch.
5489 * inferiors.c (remove_process): Free syscalls_to_catch.
5490 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5491 syscall_return stops.
5492 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5493 * server.c (handle_general_set): Handle QCatchSyscalls.
5494 (handle_query): Report support for QCatchSyscalls.
5495 * target.h (struct target_ops): Add supports_catch_syscall.
5496 (target_supports_catch_syscall): New macro.
5497 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5498 (struct lwp_info): Add syscall_state.
5499 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5500 Maintain syscall_state and syscalls_to_catch across exec.
5501 (get_syscall_trapinfo): New function, proxy to the_low_target.
5502 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5503 (linux_low_filter_event): Toggle syscall_state entry/return for
5504 syscall traps, and set it ignored for all others.
5505 (gdb_catching_syscalls_p): New function.
5506 (gdb_catch_this_syscall_p): New function.
5507 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5508 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5509 (linux_supports_catch_syscall): New function.
5510 (linux_target_ops): Install it.
5511 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5512 (the_low_target): Install it.
5514 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5516 * acinclude.m4: Include new ../warning.m4 file.
5517 * configure: Regenerated.
5518 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5520 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5522 * ax.c (is_goto_target): Mark static.
5523 * linux-low.c (register_addr): Likewise.
5524 (linux_fetch_registers, linux_store_registers): Likewise.
5525 * mem-break.c (any_persistent_commands): Fix old prototype.
5526 (add_commands_to_breakpoint): Mark static.
5527 * regcache.c (find_register_by_name): Delete unused func.
5528 * remote-utils.c (hex_or_minus_one): Mark static.
5529 * server.c (monitor_show_help): Mark static.
5530 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5531 handle_v_requests): Likewise.
5533 2016-01-12 Pedro Alves <palves@redhat.com>
5535 Remove use of the registered trademark symbol throughout.
5537 2016-01-08 Yao Qi <yao.qi@linaro.org>
5539 * remote-utils.c (getpkt): If c is '\003', call target hook
5542 2016-01-06 Yao Qi <yao.qi@linaro.org>
5544 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5545 linux-aarch32-low.c.
5546 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5547 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5548 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5549 (thumb2_breakpoint): Declare.
5550 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5551 linux-aarch32-low.h.
5552 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5553 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5554 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5556 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5558 * gdbreplay.c (gdbreplay_version): Change copyright year in
5560 * server.c (gdbserver_version): Likewise.
5562 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5564 * server.c (crc32_table): Delete.
5565 (crc32): Use libiberty's xcrc32 function.
5567 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5569 * lynx-low.c (lynx_delete_thread_callback): New function.
5570 (lynx_mourn): Properly delete our process and all of its
5571 threads. Remove call to clear_inferiors.
5573 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5575 * target.c (thread_search_callback): Add check that
5576 the thread_stopped target callback is not NULL before
5579 2015-12-21 Yao Qi <yao.qi@linaro.org>
5581 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5584 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5586 * server.c (handle_query): Call target_supports_software_single_step.
5588 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5590 * linux-low.c (single_step): New function.
5591 (linux_resume_one_lwp_throw): Call single_step.
5592 (start_step_over): Likewise.
5594 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5596 * Makefile.in (SFILES): Append arch/arm-linux.c,
5597 arch/arm-get-next-pcs.c.
5598 (arm-linux.o): New rule.
5599 (arm-get-next-pcs.o): New rule.
5600 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5602 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5603 to linux-aarch32-low.c.
5604 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5605 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5606 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5607 (thumb2_breakpoint_len): Likewise.
5608 (arm_is_thumb_mode): Make non-static.
5609 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5610 from linux-aarch32-low.c.
5611 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5612 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5613 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5614 (thumb2_breakpoint_len): Likewise.
5615 (arm_is_thumb_mode): New declaration.
5616 * linux-arm-low.c: Include arch/arm-linux.h
5617 aarch/arm-get-next-pcs.h, sys/syscall.h.
5618 (get_next_pcs_ops): New struct.
5619 (get_next_pcs_addr_bits_remove): New function.
5620 (get_next_pcs_is_thumb): New function.
5621 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5622 (arm_sigreturn_next_pc): Likewise.
5623 (get_next_pcs_syscall_next_pc): Likewise.
5624 (arm_gdbserver_get_next_pcs): Likewise.
5625 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5627 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5628 * server.h: Include gdb_vecs.h.
5630 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5632 * Makefile.in (SFILES): Append common/common-regcache.c.
5633 (OBS): Append common-regcache.o.
5634 (common-regcache.o): New rule.
5635 * regcache.c (init_register_cache): Initialize cache to
5637 (regcache_raw_read_unsigned): New function.
5638 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5639 register_status enum.
5641 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5643 * linux-aarch64-low.c (the_low_targets): Rename
5644 breakpoint_reinsert_addr to get_next_pcs.
5645 * linux-arm-low.c (the_low_targets): Likewise.
5646 * linux-bfin-low.c (the_low_targets): Likewise.
5647 * linux-cris-low.c (the_low_targets): Likewise.
5648 * linux-crisv32-low.c (the_low_targets): Likewise.
5649 * linux-low.c (can_software_single_step): Likewise.
5650 (install_software_single_step_breakpoints): New function.
5651 (start_step_over): Use install_software_single_step_breakpoints.
5652 * linux-low.h: New CORE_ADDR vector.
5653 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5655 * linux-mips-low.c (the_low_targets): Likewise.
5656 * linux-nios2-low.c (the_low_targets): Likewise.
5657 * linux-sparc-low.c (the_low_targets): Likewise.
5659 2015-12-17 Pedro Alves <palves@redhat.com>
5661 * linux-low.c (linux_kill_one_lwp): Remove references to
5663 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5665 (linux_init_signals): Delete.
5666 (initialize_low): Adjust.
5667 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5669 2015-12-16 Pedro Alves <palves@redhat.com>
5671 * configure.ac (compiler warning flags): When testing a
5672 -Wno-foo option, check whether -Wfoo works instead.
5673 * configure: Regenerate.
5675 2015-12-11 Don Breazeal <donb@codesourcery.com>
5677 * server.c (process_serial_event): Don't exit from gdbserver
5678 in remote mode if there are still active inferiors.
5680 2015-12-11 Yao Qi <yao.qi@linaro.org>
5682 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5683 arm_breakpoint_at if the process is 32-bit.
5685 2015-12-11 Yao Qi <yao.qi@linaro.org>
5687 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5690 2015-12-07 Yao Qi <yao.qi@linaro.org>
5692 * configure.srv: Append arm.o to srv_tgtobj for
5693 aarch64*-*-linux* target.
5694 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5695 from linux-arm-low.c.
5696 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5697 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5698 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5699 (thumb2_breakpoint_len): Likewise.
5700 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5701 (arm_breakpoint_kinds): Likewise.
5702 (arm_breakpoint_kind_from_pc): Likewise.
5703 (arm_sw_breakpoint_from_kind): Likewise.
5704 (arm_breakpoint_kind_from_current_state): Likewise.
5705 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5706 (arm_sw_breakpoint_from_kind): Declare.
5707 (arm_breakpoint_kind_from_current_state): Declare.
5708 (arm_breakpoint_at): Declare.
5709 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5710 arm_sw_breakpoint_from_kind if process is 32-bit.
5711 (aarch64_breakpoint_kind_from_pc): New function.
5712 (aarch64_breakpoint_kind_from_current_state): New function.
5713 (the_low_target): Initialize fields breakpoint_kind_from_pc
5714 and breakpoint_kind_from_current_state.
5715 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5716 linux-aarch32-low.c.
5717 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5718 (arm_breakpoint, arm_breakpoint_len): Likewise.
5719 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5720 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5721 (arm_is_thumb_mode): Likewise.
5722 (arm_breakpoint_at): Likewise.
5723 (arm_breakpoint_kind_from_pc): Likewise.
5724 (arm_sw_breakpoint_from_kind): Likewise.
5725 (arm_breakpoint_kind_from_current_state): Likewise.
5728 2015-08-04 Yao Qi <yao.qi@linaro.org>
5730 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5731 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5732 * server.c (extended_protocol): Remove "static".
5733 * server.h (extended_protocol): Declare it.
5735 2015-12-04 Josh Stone <jistone@redhat.com>
5737 * target.h (struct target_ops) <arch_setup>: Rename to ...
5738 (struct target_ops) <post_create_inferior>: ... this.
5739 (target_arch_setup): Rename to ...
5740 (target_post_create_inferior): ... this, calling post_create_inferior.
5741 * server.c (start_inferior): Update target_arch_setup calls to
5742 target_post_create_inferior.
5743 * linux-low.c (linux_low_ptrace_options): Forward declare.
5744 (linux_arch_setup): Update its comment for general use.
5745 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5746 (struct linux_target_ops): Use linux_post_create_inferior.
5747 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5748 to post_create_inferior.
5749 * nto-low.c (struct nto_target_ops): Likewise.
5750 * spu-low.c (struct spu_target_ops): Likewise.
5751 * win32-low.c (struct win32_target_ops): Likewise.
5753 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5755 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5757 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5759 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5760 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5761 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5762 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5763 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5764 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5765 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5766 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5767 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5768 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5769 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5770 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5772 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5774 * linux-low.c (linux_look_up_symbols): Don't call
5775 linux_supports_traceclone.
5776 * linux-low.h (thread_db_init): Remove use_events argument.
5777 * thread-db.c (thread_db_use_event): Remove global variable.
5778 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5779 (struct thread_db) <td_create_bp>: Remove field.
5780 (thread_db_create_event): Remove function.
5781 (thread_db_enable_reporting): Likewise.
5782 (find_one_thread): Don't check for thread_db_use_events.
5783 (attach_thread): Likewise.
5784 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5785 (try_thread_db_load_1): Don't check for thread_db_use_events.
5786 (thread_db_init): Remove use_events argument and thread events
5788 (remove_thread_event_breakpoints): Remove function.
5789 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5791 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5793 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5795 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5796 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5797 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5798 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5799 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5801 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5803 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5804 * linux-low.c (can_hardware_single_step): Use
5805 supports_hardware_single_step.
5806 (can_software_single_step): New function.
5807 (start_step_over): Call can_software_single_step.
5808 (linux_supports_hardware_single_step): New function.
5809 (struct target_ops) <supports_software_single_step>: Initialize.
5810 * linux-low.h (struct linux_target_ops)
5811 <supports_hardware_single_step>: Initialize.
5812 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5813 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5814 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5815 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5816 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5817 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5818 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5819 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5820 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5821 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5823 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5824 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5826 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5827 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5828 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5830 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5831 * target.h (struct target_ops): <supports_software_single_step>:
5833 (target_supports_software_single_step): New macro.
5835 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5837 * linux-low.c (linux_wait_1): Fix pc advance condition.
5838 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5839 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5841 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5843 * linux-arm-low.c (arm_is_thumb_mode): New function.
5844 (arm_breakpoint_at): Use arm_is_thumb_mode.
5845 (arm_breakpoint_kind_from_current_state): New function.
5846 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5848 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5849 (linux_breakpoint_kind_from_current_state): New function.
5850 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5851 * linux-low.h (struct linux_target_ops)
5852 <breakpoint_kind_from_current_state>: New field.
5853 * target.h (struct target_ops): Likewise.
5854 (target_breakpoint_kind_from_current_state): New macro.
5856 2015-11-30 Pedro Alves <palves@redhat.com>
5858 * linux-low.c (linux_resume): Wake up the event loop before
5861 2015-11-30 Pedro Alves <palves@redhat.com>
5863 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5865 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5867 * target.c (struct thread_search): New structure.
5868 (thread_search_callback): New function.
5869 (prev_general_thread): New global.
5870 (prepare_to_access_memory, done_accessing_memory): New functions.
5871 * target.h (prepare_to_access_memory, done_accessing_memory):
5872 Replace macros with function declarations.
5874 2015-11-30 Pedro Alves <palves@redhat.com>
5877 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5878 report TARGET_WAITKIND_NO_RESUMED.
5879 * remote-utils.c (prepare_resume_reply): Handle
5880 TARGET_WAITKIND_NO_RESUMED.
5881 * server.c (report_no_resumed): New global.
5882 (handle_query) <qSupported>: Handle "no-resumed+". Report
5883 "no-resumed+" support.
5884 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5885 return error if the client doesn't support no-resumed events.
5886 (push_stop_notification): New function.
5887 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5888 events if the client supports them.
5890 2015-11-30 Pedro Alves <palves@redhat.com>
5892 * linux-low.c (thread_still_has_status_pending_p): Don't check
5894 (lwp_resumed): New function.
5895 (status_pending_p_callback): Return early if the LWP is not
5896 supposed to be resumed.
5898 2015-11-30 Pedro Alves <palves@redhat.com>
5900 * linux-low.c (handle_extended_wait): Assert that the LWP's
5901 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5902 thread create events, leave the new child's status pending.
5903 (linux_low_filter_event): If GDB wants to hear about thread exit
5904 events, leave the LWP marked dead and don't delete it.
5905 (linux_wait_for_event_filtered): Don't check for thread exit.
5906 (filter_exit_event): New function.
5907 (linux_wait_1): Use it, when returning an exit event.
5908 (linux_resume_one_lwp_throw): Assert that the LWP's
5909 waitstatus is TARGET_WAITKIND_IGNORE.
5910 * remote-utils.c (prepare_resume_reply): Handle
5911 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5912 * server.c (report_thread_events): New global.
5913 (handle_general_set): Handle QThreadEvents.
5914 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5915 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5916 TARGET_WAITKIND_THREAD_EXITED.
5917 * server.h (report_thread_events): Declare.
5919 2015-11-30 Pedro Alves <palves@redhat.com>
5921 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5922 the thread's last_resume_kind was resume_stop.
5924 2015-11-30 Pedro Alves <palves@redhat.com>
5926 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5929 2015-11-30 Pedro Alves <palves@redhat.com>
5931 * server.c (handle_v_requests): Handle vCtrlC.
5933 2015-11-30 Pedro Alves <palves@redhat.com>
5935 * gdbthread.h (find_any_thread_of_pid): Declare.
5936 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5938 * server.c (handle_query): If current_thread is NULL, look for
5939 another thread of the selected process.
5941 2015-11-26 Daniel Colascione <dancol@dancol.org>
5942 Simon Marchi <simon.marchi@ericsson.com>
5944 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5945 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5947 * target.h (struct target_ops) <thread_name>: New field.
5948 (target_thread_name): New macro.
5950 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5952 * regcache.h (regcache_invalidate_pid): Add declaration.
5953 * regcache.c (regcache_invalidate_pid): New function, extracted
5954 from regcache_invalidate.
5955 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5956 Add trivial documentation comment.
5957 * lynx-low.c: Use regcache_invalidate_pid instead of
5958 regcache_invalidate.
5960 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5962 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5963 and Elf64_auxv_t if the target is Android.
5965 2015-11-22 Doug Evans <xdje42@gmail.com>
5967 * target.h: #include <sys/types.h>.
5969 2015-11-19 Pedro Alves <palves@redhat.com>
5971 * linux-low.c (linux_process_qsupported): Change prototype.
5973 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5975 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5976 and adjust to loop over all features.
5977 * server.c (handle_query) <qSupported>: Adjust to call
5978 target_process_qsupported once, passing it a vector of unprocessed
5980 * target.h (struct target_ops) <process_qsupported>: Change
5982 (target_process_qsupported): Adjust.
5984 2015-11-19 Pedro Alves <palves@redhat.com>
5986 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5988 * configure: Regenerate.
5990 2015-11-19 Pedro Alves <palves@redhat.com>
5992 * configure: Regenerate.
5994 2015-11-19 Yao Qi <yao.qi@linaro.org>
5996 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5999 2015-11-19 Yao Qi <yao.qi@linaro.org>
6001 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6002 (struct aarch64_operand): Move enum out.
6004 2015-11-19 Yao Qi <yao.qi@linaro.org>
6006 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6007 struct user_fpsimd_state *.
6008 (aarch64_store_fpregset): Likewise.
6010 2015-11-19 Yao Qi <yao.qi@linaro.org>
6012 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6013 struct user_pt_regs *.
6014 (aarch64_store_gregset): Likewise.
6016 2015-11-18 Pedro Alves <palves@redhat.com>
6018 * Makefile.in (all_object_files): Add $IPA_OBJS.
6020 2015-11-17 Pedro Alves <palves@redhat.com>
6022 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6023 GDB_SIGNAL_0 and gdb_signal_to_string.
6025 2015-11-17 Pedro Alves <palves@redhat.com>
6027 * win32-low.c (handle_output_debug_string): Remove parameter.
6028 (win32_kill): Remove our_status local and adjust call to
6029 handle_output_debug_string.
6030 (get_child_debug_event): Adjust call to
6031 handle_output_debug_string.
6033 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6035 * linux-mips-low.c (mips_fill_gregset): Add cast.
6036 (mips_store_gregset): Likewise.
6037 (mips_fill_fpregset): Likewise.
6038 (mips_store_fpregset): Likewise.
6040 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6042 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6045 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6047 * linux-mips-low.c (mips_linux_new_thread): Change type of
6048 watch_type to enum target_hw_bp_type.
6050 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6052 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6053 Change return type to arm_hwbp_type.
6055 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6057 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6058 (arm_store_gregset): Likewise.
6059 * linux-arm-low.c (arm_get_hwcap): Likewise.
6060 (arm_read_description): Likewise.
6062 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6064 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6066 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6068 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6069 (ppc_fill_vsxregset): Likewise.
6070 (ppc_store_vsxregset): Likewise.
6071 (ppc_fill_vrregset): Likewise.
6072 (ppc_store_vrregset): Likewise.
6073 (ppc_fill_evrregset): Likewise.
6074 (ppc_store_evrregset): Likewise.
6076 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6078 * linux-ppc-low.c (ppc_usrregs_info): Remove
6079 forward-declaration.
6080 (ppc_arch_setup): Move lower in file.
6082 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6084 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6085 (ps_pdwrite): Likewise.
6087 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6089 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6090 to after assert checks.
6092 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6094 * proc-service.c (ps_pdread): Add/adjust casts.
6095 (ps_pdwrite): Add/adjust casts.
6097 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6099 * server.c (handle_search_memory_1): Cast return value of
6102 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6104 * server.c (write_qxfer_response): Change type of data to
6107 2015-10-29 Pedro Alves <palves@redhat.com>
6109 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6111 2015-10-29 Pedro Alves <palves@redhat.com>
6113 * tracepoint.c (clear_installed_tracepoints): Add casts.
6115 2015-10-29 Pedro Alves <palves@redhat.com>
6117 * server.c (handle_v_cont, process_serial_event): Add enum
6118 gdb_signal casts to signal parsing code.
6120 2015-10-29 Pedro Alves <palves@redhat.com>
6122 * linux-low.h (NULL_REGSET): Define.
6123 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6124 * linux-arm-low.c (arm_regsets): Likewise.
6125 * linux-crisv32-low.c (cris_regsets): Likewise.
6126 * linux-m68k-low.c (m68k_regsets): Likewise.
6127 * linux-mips-low.c (mips_regsets): Likewise.
6128 * linux-nios2-low.c (nios2_regsets): Likewise.
6129 * linux-ppc-low.c (ppc_regsets): Likewise.
6130 * linux-s390-low.c (s390_regsets): Likewise.
6131 * linux-sh-low.c (sh_regsets): Likewise.
6132 * linux-sparc-low.c (sparc_regsets): Likewise.
6133 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6134 * linux-tile-low.c (tile_regsets): Likewise.
6135 * linux-x86-low.c (x86_regsets): Likewise.
6136 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6138 2015-10-29 Pedro Alves <palves@redhat.com>
6140 * linux-low.h (NULL_REGSET): Define.
6141 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6142 * linux-arm-low.c (arm_regsets): Likewise.
6143 * linux-crisv32-low.c (cris_regsets): Likewise.
6144 * linux-m68k-low.c (m68k_regsets): Likewise.
6145 * linux-mips-low.c (mips_regsets): Likewise.
6146 * linux-nios2-low.c (nios2_regsets): Likewise.
6147 * linux-ppc-low.c (ppc_regsets): Likewise.
6148 * linux-s390-low.c (s390_regsets): Likewise.
6149 * linux-sh-low.c (sh_regsets): Likewise.
6150 * linux-sparc-low.c (sparc_regsets): Likewise.
6151 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6152 * linux-tile-low.c (tile_regsets): Likewise.
6153 * linux-x86-low.c (x86_regsets): Likewise.
6154 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6156 2015-10-26 Doug Evans <dje@google.com>
6158 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6160 2015-10-26 Doug Evans <dje@google.com>
6162 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6164 2015-10-26 Doug Evans <dje@google.com>
6166 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6168 (attach_thread, find_new_threads_callback): Ditto.
6170 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6172 * mem-break.h (set_breakpoint_data): Remove.
6174 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6176 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6177 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6178 (initialize_low): Remove set_breakpoint_data call.
6179 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6180 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6181 (initialize_low): Remove set_breakpoint_data call.
6182 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6183 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6184 (initialize_low): Remove set_breakpoint_data call.
6186 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6188 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6189 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6190 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6191 * target.h (target_breakpoint_kind_from_pc): New macro.
6193 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6195 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6196 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6197 the default breakpoint kind.
6199 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6201 * linux-arm-low.c (arm_supports_z_point_type): Add software
6204 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6206 * linux-arm-low.c: Refactor breakpoint definitions.
6207 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6208 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6210 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6212 * Makefile.in: Add arm.c/o.
6213 * configure.srv: Likewise.
6214 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6215 (arm_breakpoint_kind_from_pc): New function.
6216 (arm_sw_breakpoint_from_kind): Return proper kind.
6217 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6219 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6221 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6223 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6224 (struct raw_breakpoint) <size>: Remove.
6225 (struct raw_breakpoint) <kind>: Add.
6226 (bp_size): New function.
6227 (bp_opcode): Likewise.
6228 (find_raw_breakpoint_at): Adjust for kind.
6229 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6230 (remove_memory_breakpoint): Adjust for kind call bp_size.
6231 (set_raw_breakpoint_at): Adjust for kind.
6232 (set_breakpoint): Likewise.
6233 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6234 (delete_raw_breakpoint): Adjust for kind.
6235 (delete_breakpoint): Likewise.
6236 (find_gdb_breakpoint): Likewise.
6237 (set_gdb_breakpoint_1): Likewise.
6238 (set_gdb_breakpoint): Likewise.
6239 (delete_gdb_breakpoint_1): Likewise.
6240 (delete_gdb_breakpoint): Likewise.
6241 (uninsert_raw_breakpoint): Likewise.
6242 (reinsert_raw_breakpoint): Likewise.
6243 (set_breakpoint_data): Remove.
6244 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6245 (check_mem_read): Adjust for kind call bp_size.
6246 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6247 (clone_one_breakpoint): Adjust for kind.
6248 * mem-break.h (set_gdb_breakpoint): Likewise.
6249 (delete_gdb_breakpoint): Likewise.
6250 * server.c (process_serial_event): Likewise.
6252 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6254 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6255 (struct linux_target_ops) <breakpoint>: Remove.
6256 (struct linux_target_ops) <breakpoint_len>: Remove.
6257 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6258 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6259 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6260 (arm_sw_breakpoint_from_kind): New function.
6261 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6262 (struct linux_target_ops) <breakpoint>: Remove.
6263 (struct linux_target_ops) <breakpoint_len>: Remove.
6264 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6265 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6266 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6267 (struct linux_target_ops) <breakpoint>: Remove.
6268 (struct linux_target_ops) <breakpoint_len>: Remove.
6269 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6270 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6271 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6272 (struct linux_target_ops) <breakpoint>: Remove.
6273 (struct linux_target_ops) <breakpoint_len>: Remove.
6274 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6275 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6276 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6277 and sw_breakpoint_from_kind to increment the pc.
6278 (linux_breakpoint_kind_from_pc): New function.
6279 (linux_sw_breakpoint_from_kind): New function.
6280 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6281 (initialize_low): Call breakpoint_kind_from_pc and
6282 sw_breakpoint_from_kind to replace breakpoint_data/len.
6283 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6285 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6286 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6287 (struct linux_target_ops) <breakpoint>: Remove.
6288 (struct linux_target_ops) <breakpoint_len>: Remove.
6289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6290 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6291 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6292 (struct linux_target_ops) <breakpoint>: Remove.
6293 (struct linux_target_ops) <breakpoint_len>: Remove.
6294 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6295 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6296 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6297 (struct linux_target_ops) <breakpoint>: Remove.
6298 (struct linux_target_ops) <breakpoint_len>: Remove.
6299 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6300 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6301 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6302 (struct linux_target_ops) <breakpoint>: Remove.
6303 (struct linux_target_ops) <breakpoint_len>: Remove.
6304 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6305 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6306 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6307 (struct linux_target_ops) <breakpoint>: Remove.
6308 (struct linux_target_ops) <breakpoint_len>: Remove.
6309 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6310 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6311 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6312 (struct linux_target_ops) <breakpoint>: Remove.
6313 (struct linux_target_ops) <breakpoint_len>: Remove.
6314 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6315 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6316 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6317 (struct linux_target_ops) <breakpoint>: Remove.
6318 (struct linux_target_ops) <breakpoint_len>: Remove.
6319 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6320 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6321 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6322 (struct linux_target_ops) <breakpoint>: Remove.
6323 (struct linux_target_ops) <breakpoint_len>: Remove.
6324 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6325 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6326 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6327 (struct linux_target_ops) <breakpoint>: Remove.
6328 (struct linux_target_ops) <breakpoint_len>: Remove.
6329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6331 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6332 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6333 (struct linux_target_ops) <breakpoint>: Remove.
6334 (struct linux_target_ops) <breakpoint_len>: Remove.
6335 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6336 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6337 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6338 (struct linux_target_ops) <breakpoint>: Remove.
6339 (struct linux_target_ops) <breakpoint_len>: Remove.
6340 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6341 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6343 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6345 * linux-cris-low.c (cris_get_pc): Remove void arg.
6347 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6349 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6352 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6354 * inferiors.c (thread_pid_matches_callback): New function.
6355 (find_thread_process): New function.
6356 (remove_thread): Reset current_thread.
6357 (remove_process): Assert threads have been removed first.
6359 2015-10-15 Yao Qi <yao.qi@linaro.org>
6361 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6363 (aarch64_remove_point): Likewise.
6364 * regcache.c (regcache_register_size): New function.
6366 2015-10-12 Yao Qi <yao.qi@linaro.org>
6368 * linux-aarch64-low.c: Update all callers as emit_load_store
6369 is renamed to aarch64_emit_load_store.
6371 2015-10-12 Yao Qi <yao.qi@linaro.org>
6373 * linux-aarch64-low.c: Update all callers of function renaming
6374 from emit_insn to aarch64_emit_insn.
6376 2015-10-12 Yao Qi <yao.qi@linaro.org>
6378 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6379 arch/aarch64-insn.h.
6380 (struct aarch64_memory_operand): Likewise.
6382 (emit_insn): Move to arch/aarch64-insn.c.
6383 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6384 (emit_load_store): Move to arch/aarch64-insn.c.
6385 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6386 (can_encode_int32): Remove.
6388 2015-10-12 Yao Qi <yao.qi@linaro.org>
6390 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6391 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6392 (aarch64_relocate_instruction): Likewise.
6393 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6394 (struct aarch64_insn_visitor): Likewise.
6396 2015-10-12 Yao Qi <yao.qi@linaro.org>
6398 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6399 (struct aarch64_insn_visitor): New.
6400 (struct aarch64_insn_relocation_data): New.
6401 (aarch64_ftrace_insn_reloc_b): New function.
6402 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6403 (aarch64_ftrace_insn_reloc_cb): Likewise.
6404 (aarch64_ftrace_insn_reloc_tb): Likewise.
6405 (aarch64_ftrace_insn_reloc_adr): Likewise.
6406 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6407 (aarch64_ftrace_insn_reloc_others): Likewise.
6409 (aarch64_relocate_instruction): Use visitor.
6411 2015-10-12 Yao Qi <yao.qi@linaro.org>
6413 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6414 int. Add argument buf.
6415 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6416 aarch64_relocate_instruction.
6418 2015-10-12 Yao Qi <yao.qi@linaro.org>
6420 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6421 argument insn. Remove local variable insn. Don't call
6423 (aarch64_install_fast_tracepoint_jump_pad): Call
6426 2015-09-30 Yao Qi <yao.qi@linaro.org>
6428 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6429 (emit_load_store_pair): Likewise.
6431 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6433 * dll.c (match_dll): Add cast(s).
6434 (unloaded_dll): Likewise.
6435 * linux-low.c (second_thread_of_pid_p): Likewise.
6436 (delete_lwp_callback): Likewise.
6437 (count_events_callback): Likewise.
6438 (select_event_lwp_callback): Likewise.
6439 (linux_set_resume_request): Likewise.
6440 * server.c (accumulate_file_name_length): Likewise.
6441 (emit_dll_description): Likewise.
6442 (handle_qxfer_threads_worker): Likewise.
6443 (visit_actioned_threads): Likewise.
6444 * thread-db.c (any_thread_of): Likewise.
6445 * tracepoint.c (same_process_p): Likewise.
6446 (match_blocktype): Likewise.
6447 (build_traceframe_info_xml): Likewise.
6449 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6451 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6453 (gdb_unparse_agent_expr): Likewise.
6454 * hostio.c (require_data): Likewise.
6455 (handle_pread): Likewise.
6456 * linux-low.c (disable_regset): Likewise.
6457 (fetch_register): Likewise.
6458 (store_register): Likewise.
6459 (get_dynamic): Likewise.
6460 (linux_qxfer_libraries_svr4): Likewise.
6461 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6462 (set_fast_tracepoint_jump): Likewise.
6463 (uninsert_fast_tracepoint_jumps_at): Likewise.
6464 (reinsert_fast_tracepoint_jumps_at): Likewise.
6465 (validate_inserted_breakpoint): Likewise.
6466 (clone_agent_expr): Likewise.
6467 * regcache.c (init_register_cache): Likewise.
6468 * remote-utils.c (putpkt_binary_1): Likewise.
6469 (decode_M_packet): Likewise.
6470 (decode_X_packet): Likewise.
6471 (look_up_one_symbol): Likewise.
6472 (relocate_instruction): Likewise.
6473 (monitor_output): Likewise.
6474 * server.c (handle_search_memory): Likewise.
6475 (handle_qxfer_exec_file): Likewise.
6476 (handle_qxfer_libraries): Likewise.
6477 (handle_qxfer): Likewise.
6478 (handle_query): Likewise.
6479 (handle_v_cont): Likewise.
6480 (handle_v_run): Likewise.
6481 (captured_main): Likewise.
6482 * target.c (write_inferior_memory): Likewise.
6483 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6484 * tracepoint.c (init_trace_buffer): Likewise.
6485 (add_tracepoint_action): Likewise.
6486 (add_traceframe): Likewise.
6487 (add_traceframe_block): Likewise.
6488 (cmd_qtdpsrc): Likewise.
6489 (cmd_qtdv): Likewise.
6490 (cmd_qtstatus): Likewise.
6491 (response_source): Likewise.
6492 (response_tsv): Likewise.
6493 (cmd_qtnotes): Likewise.
6494 (gdb_collect): Likewise.
6495 (initialize_tracepoint): Likewise.
6497 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6499 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6500 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6501 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6503 (enum aarch64_condition_codes): New enum.
6504 (w0): New static global.
6507 (struct aarch64_memory_operand) <type>: New
6508 MEMORY_OPERAND_POSTINDEX type.
6509 (postindex_memory_operand): New helper function.
6510 (emit_ret): New function.
6511 (emit_load_store_pair): New function, factored out of emit_stp
6512 with support for MEMORY_OPERAND_POSTINDEX.
6513 (emit_stp): Rewrite using emit_load_store_pair.
6514 (emit_ldp): New function.
6515 (emit_load_store): Likewise.
6516 (emit_ldr): Mention post-index instruction in comment.
6517 (emit_ldrh): New function.
6518 (emit_ldrb): New function.
6519 (emit_ldrsw): Mention post-index instruction in comment.
6520 (emit_str): Likewise.
6521 (emit_subs): New function.
6522 (emit_cmp): Likewise.
6523 (emit_and): Likewise.
6524 (emit_orr): Likewise.
6525 (emit_orn): Likewise.
6526 (emit_eor): Likewise.
6527 (emit_mvn): Likewise.
6528 (emit_lslv): Likewise.
6529 (emit_lsrv): Likewise.
6530 (emit_asrv): Likewise.
6531 (emit_mul): Likewise.
6532 (emit_sbfm): Likewise.
6533 (emit_sbfx): Likewise.
6534 (emit_ubfm): Likewise.
6535 (emit_ubfx): Likewise.
6536 (emit_csinc): Likewise.
6537 (emit_cset): Likewise.
6538 (emit_nop): Likewise.
6539 (emit_ops_insns): New helper function.
6540 (emit_pop): Likewise.
6541 (emit_push): Likewise.
6542 (aarch64_emit_prologue): New function.
6543 (aarch64_emit_epilogue): Likewise.
6544 (aarch64_emit_add): Likewise.
6545 (aarch64_emit_sub): Likewise.
6546 (aarch64_emit_mul): Likewise.
6547 (aarch64_emit_lsh): Likewise.
6548 (aarch64_emit_rsh_signed): Likewise.
6549 (aarch64_emit_rsh_unsigned): Likewise.
6550 (aarch64_emit_ext): Likewise.
6551 (aarch64_emit_log_not): Likewise.
6552 (aarch64_emit_bit_and): Likewise.
6553 (aarch64_emit_bit_or): Likewise.
6554 (aarch64_emit_bit_xor): Likewise.
6555 (aarch64_emit_bit_not): Likewise.
6556 (aarch64_emit_equal): Likewise.
6557 (aarch64_emit_less_signed): Likewise.
6558 (aarch64_emit_less_unsigned): Likewise.
6559 (aarch64_emit_ref): Likewise.
6560 (aarch64_emit_if_goto): Likewise.
6561 (aarch64_emit_goto): Likewise.
6562 (aarch64_write_goto_address): Likewise.
6563 (aarch64_emit_const): Likewise.
6564 (aarch64_emit_call): Likewise.
6565 (aarch64_emit_reg): Likewise.
6566 (aarch64_emit_pop): Likewise.
6567 (aarch64_emit_stack_flush): Likewise.
6568 (aarch64_emit_zero_ext): Likewise.
6569 (aarch64_emit_swap): Likewise.
6570 (aarch64_emit_stack_adjust): Likewise.
6571 (aarch64_emit_int_call_1): Likewise.
6572 (aarch64_emit_void_call_2): Likewise.
6573 (aarch64_emit_eq_goto): Likewise.
6574 (aarch64_emit_ne_goto): Likewise.
6575 (aarch64_emit_lt_goto): Likewise.
6576 (aarch64_emit_le_goto): Likewise.
6577 (aarch64_emit_gt_goto): Likewise.
6578 (aarch64_emit_ge_got): Likewise.
6579 (aarch64_emit_ops_impl): New static global variable.
6580 (aarch64_emit_ops): New target function, return
6581 &aarch64_emit_ops_impl.
6582 (struct linux_target_ops): Install it.
6584 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6586 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6587 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6589 * linux-aarch64-ipa.c: New file.
6590 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6592 (aarch64_get_thread_area): New target method.
6593 (extract_signed_bitfield): New helper function.
6594 (aarch64_decode_ldr_literal): New function.
6595 (enum aarch64_opcodes): New enum.
6596 (struct aarch64_register): New struct.
6597 (struct aarch64_operand): New struct.
6598 (x0): New static global.
6607 (aarch64_register): New helper function.
6608 (register_operand): Likewise.
6609 (immediate_operand): Likewise.
6610 (struct aarch64_memory_operand): New struct.
6611 (offset_memory_operand): New helper function.
6612 (preindex_memory_operand): Likewise.
6613 (enum aarch64_system_control_registers): New enum.
6614 (ENCODE): New macro.
6615 (emit_insn): New helper function.
6616 (emit_b): New function.
6617 (emit_bcond): Likewise.
6618 (emit_cb): Likewise.
6619 (emit_tb): Likewise.
6620 (emit_blr): Likewise.
6621 (emit_stp): Likewise.
6622 (emit_ldp_q_offset): Likewise.
6623 (emit_stp_q_offset): Likewise.
6624 (emit_load_store): Likewise.
6625 (emit_ldr): Likewise.
6626 (emit_ldrsw): Likewise.
6627 (emit_str): Likewise.
6628 (emit_ldaxr): Likewise.
6629 (emit_stxr): Likewise.
6630 (emit_stlr): Likewise.
6631 (emit_data_processing_reg): Likewise.
6632 (emit_data_processing): Likewise.
6633 (emit_add): Likewise.
6634 (emit_sub): Likewise.
6635 (emit_mov): Likewise.
6636 (emit_movk): Likewise.
6637 (emit_mov_addr): Likewise.
6638 (emit_mrs): Likewise.
6639 (emit_msr): Likewise.
6640 (emit_sevl): Likewise.
6641 (emit_wfe): Likewise.
6642 (append_insns): Likewise.
6643 (can_encode_int32_in): New helper function.
6644 (aarch64_relocate_instruction): New function.
6645 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6646 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6647 (struct linux_target_ops): Install aarch64_get_thread_area,
6648 aarch64_install_fast_tracepoint_jump_pad and
6649 aarch64_get_min_fast_tracepoint_insn_len.
6651 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6653 * Makefile.in (aarch64-insn.o): New rule.
6654 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6656 2015-09-21 Yao Qi <yao.qi@linaro.org>
6658 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6660 2015-09-21 Yao Qi <yao.qi@linaro.org>
6662 * tracepoint.c (max_jump_pad_size): Remove.
6664 2015-09-18 Yao Qi <yao.qi@linaro.org>
6666 * linux-aarch64-low.c: Don't include sys/uio.h.
6667 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6669 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6671 * tracepoint.c (eval_result_type): Change prototype.
6672 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6674 2015-09-15 Pedro Alves <palves@redhat.com>
6676 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6677 Check whether to report exec events instead of checking whether
6678 multiprocess is enabled.
6680 2015-09-15 Pedro Alves <palves@redhat.com>
6683 * remote-utils.c (prepare_resume_reply): Merge
6684 TARGET_WAITKIND_VFORK_DONE switch case with the
6685 TARGET_WAITKIND_FORKED case.
6687 2015-09-15 Yao Qi <yao.qi@linaro.org>
6689 * server.c (handle_query): Check string comparison using
6690 "else if" instead of "if".
6692 2015-09-15 Yao Qi <yao.qi@linaro.org>
6694 * server.c (vCont_supported): New global variable.
6695 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6696 matches. Append ";vContSupported+" to own_buf.
6697 (handle_v_requests): Append ";s;S" to own_buf if target supports
6698 hardware single step or vCont_supported is false.
6699 (capture_main): Set vCont_supported to zero.
6701 2015-09-15 Yao Qi <yao.qi@linaro.org>
6703 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6705 (linux_supports_hardware_single_step): ... New function.
6706 (linux_target_ops): Update.
6707 * lynx-low.c (lynx_target_ops): Set field
6708 supports_hardware_single_step to target_can_do_hardware_single_step.
6709 * nto-low.c (nto_target_ops): Likewise.
6710 * spu-low.c (spu_target_ops): Likewise.
6711 * win32-low.c (win32_target_ops): Likewise.
6712 * target.c (target_can_do_hardware_single_step): New function.
6713 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6714 Remove. <supports_hardware_single_step>: New field.
6715 (target_supports_conditional_breakpoints): Remove.
6716 (target_supports_hardware_single_step): New macro.
6717 (target_can_do_hardware_single_step): Declare.
6718 * server.c (handle_query): Use target_supports_hardware_single_step
6719 instead of target_supports_conditional_breakpoints.
6721 2015-09-15 Yao Qi <yao.qi@linaro.org>
6723 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6725 (struct linux_target_ops the_low_target): Install
6726 aarch64_linux_siginfo_fixup.
6728 2015-09-11 Don Breazeal <donb@codesourcery.com>
6729 Luis Machado <lgustavo@codesourcery.com>
6731 * linux-low.c (linux_mourn): Static declaration.
6732 (linux_arch_setup): Move in front of
6733 handle_extended_wait.
6734 (linux_arch_setup_thread): New function.
6735 (handle_extended_wait): Handle exec events. Call
6736 linux_arch_setup_thread. Make event_lwp argument a
6737 pointer-to-a-pointer.
6738 (check_zombie_leaders): Do not check stopped threads.
6739 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6740 (linux_low_filter_event): Add lwp and thread for exec'ing
6741 non-leader thread if leader thread has been deleted.
6742 Refactor code into linux_arch_setup_thread and call it.
6743 Pass child lwp pointer by reference to handle_extended_wait.
6744 (linux_wait_for_event_filtered): Update comment.
6745 (linux_wait_1): Prevent clobbering exec event status.
6746 (linux_supports_exec_events): New function.
6747 (linux_target_ops) <supports_exec_events>: Initialize new member.
6748 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6750 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6751 * server.c (report_exec_events): New global variable.
6752 (handle_query): Handle qSupported query for exec-events feature.
6753 (captured_main): Initialize report_exec_events.
6754 * server.h (report_exec_events): Declare new global variable.
6755 * target.h (struct target_ops) <supports_exec_events>: New
6757 (target_supports_exec_events): New macro.
6758 * win32-low.c (win32_target_ops) <supports_exec_events>:
6759 Initialize new member.
6761 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6763 * linux-low.c (linux_low_enable_btrace): Remove.
6764 (linux_target_ops): Replace linux_low_enable_btrace with
6765 linux_enable_btrace.
6767 2015-09-03 Yao Qi <yao.qi@linaro.org>
6769 * linux-aarch64-low.c (aarch64_insert_point): Call
6770 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6773 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6775 * linux-low.c (check_stopped_by_breakpoint): Use
6776 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6778 2015-08-27 Pedro Alves <palves@redhat.com>
6780 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6782 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6784 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6785 the XNEW-family equivalent.
6786 (compile_bytecodes): Likewise.
6787 * dll.c (loaded_dll): Likewise.
6788 * event-loop.c (append_callback_event): Likewise.
6789 (create_file_handler): Likewise.
6790 (create_file_event): Likewise.
6791 * hostio.c (handle_open): Likewise.
6792 * inferiors.c (add_thread): Likewise.
6793 (add_process): Likewise.
6794 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6795 * linux-arm-low.c (arm_new_process): Likewise.
6796 (arm_new_thread): Likewise.
6797 * linux-low.c (add_to_pid_list): Likewise.
6798 (linux_add_process): Likewise.
6799 (handle_extended_wait): Likewise.
6800 (add_lwp): Likewise.
6801 (enqueue_one_deferred_signal): Likewise.
6802 (enqueue_pending_signal): Likewise.
6803 (linux_resume_one_lwp_throw): Likewise.
6804 (linux_resume_one_thread): Likewise.
6805 (linux_read_memory): Likewise.
6806 (linux_write_memory): Likewise.
6807 * linux-mips-low.c (mips_linux_new_process): Likewise.
6808 (mips_linux_new_thread): Likewise.
6809 (mips_add_watchpoint): Likewise.
6810 * linux-x86-low.c (initialize_low_arch): Likewise.
6811 * lynx-low.c (lynx_add_process): Likewise.
6812 * mem-break.c (set_raw_breakpoint_at): Likewise.
6813 (set_breakpoint): Likewise.
6814 (add_condition_to_breakpoint): Likewise.
6815 (add_commands_to_breakpoint): Likewise.
6816 (clone_agent_expr): Likewise.
6817 (clone_one_breakpoint): Likewise.
6818 * regcache.c (new_register_cache): Likewise.
6819 * remote-utils.c (look_up_one_symbol): Likewise.
6820 * server.c (queue_stop_reply): Likewise.
6821 (start_inferior): Likewise.
6822 (queue_stop_reply_callback): Likewise.
6823 (handle_target_event): Likewise.
6824 * spu-low.c (fetch_ppc_memory): Likewise.
6825 (store_ppc_memory): Likewise.
6826 * target.c (set_target_ops): Likewise.
6827 * thread-db.c (thread_db_load_search): Likewise.
6828 (try_thread_db_load_1): Likewise.
6829 * tracepoint.c (add_tracepoint): Likewise.
6830 (add_tracepoint_action): Likewise.
6831 (create_trace_state_variable): Likewise.
6832 (cmd_qtdpsrc): Likewise.
6833 (cmd_qtro): Likewise.
6834 (add_while_stepping_state): Likewise.
6835 * win32-low.c (child_add_thread): Likewise.
6836 (get_image_name): Likewise.
6838 2015-08-25 Yao Qi <yao.qi@linaro.org>
6840 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6842 2015-08-25 Yao Qi <yao.qi@linaro.org>
6844 * Makefile.in (aarch64-linux.o): New rule.
6845 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6847 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6848 (aarch64_init_debug_reg_state): Make it extern.
6849 (aarch64_linux_prepare_to_resume): Remove.
6851 2015-08-25 Yao Qi <yao.qi@linaro.org>
6853 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6854 lwp_arch_private_info and ptid_of_lwp.
6856 2015-08-25 Yao Qi <yao.qi@linaro.org>
6858 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6859 Find proc_info by find_process_pid. All callers updated.
6861 2015-08-25 Yao Qi <yao.qi@linaro.org>
6863 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6865 (debug_reg_change_callback): Remove.
6866 (aarch64_notify_debug_reg_change): Remove.
6868 2015-08-25 Yao Qi <yao.qi@linaro.org>
6870 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6871 Call current_lwp_ptid.
6873 2015-08-25 Yao Qi <yao.qi@linaro.org>
6875 * linux-aarch64-low.c (debug_reg_change_callback): Use
6878 2015-08-25 Yao Qi <yao.qi@linaro.org>
6880 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6882 2015-08-25 Yao Qi <yao.qi@linaro.org>
6884 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6886 2015-08-25 Yao Qi <yao.qi@linaro.org>
6888 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6891 2015-08-25 Yao Qi <yao.qi@linaro.org>
6893 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6895 (debug_reg_change_callback): Remove argument entry and add argument
6896 lwp. Remove local variable thread. Don't print thread id in the
6897 debugging output. Don't check whether pid of thread equals to pid.
6898 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6899 iterate_over_lwps instead find_inferior.
6901 2015-08-24 Pedro Alves <palves@redhat.com>
6903 * inferiors.c (get_first_process): New function.
6904 * inferiors.h (get_first_process): New declaration.
6905 * remote-utils.c (read_ptid): Default to the first process in the
6906 list, instead of to the current thread's process.
6908 2015-08-24 Pedro Alves <palves@redhat.com>
6910 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6911 * event-loop.c: Likewise.
6912 * remote-utils.c: Likewise.
6913 * tracepoint.c: Likewise.
6915 2015-08-24 Pedro Alves <palves@redhat.com>
6917 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6920 2015-08-21 Pedro Alves <palves@redhat.com>
6922 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6923 instead of literal 1.
6925 2015-08-21 Pedro Alves <palves@redhat.com>
6927 * tdesc.c (default_description): Explicitly zero-initialize.
6929 2015-08-21 Pedro Alves <palves@redhat.com>
6932 * inferiors.c (remove_thread): Discard any pending stop reply for
6934 * server.c (remove_all_on_match_pid): Rename to ...
6935 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6937 (discard_queued_stop_replies): Change parameter to a ptid. Now
6939 (handle_v_kill, kill_inferior_callback, captured_main)
6940 (process_serial_event): Adjust.
6941 * server.h (discard_queued_stop_replies): Declare.
6943 2015-08-21 Pedro Alves <palves@redhat.com>
6945 * linux-low.c (wait_for_sigstop): Always switch to no thread
6946 selected if the previously current thread dies.
6947 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6948 process instead of the current thread's.
6949 * remote-utils.c (input_interrupt): Don't check if there's no
6951 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6952 current thread to the general thread fails, error out.
6953 (handle_qxfer_auxv, handle_qxfer_libraries)
6954 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6955 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6956 (handle_query): Check if there's a thread selected instead of
6957 checking whether there's any thread in the thread list.
6958 (handle_qxfer_threads, handle_qxfer_btrace)
6959 (handle_qxfer_btrace_conf): Don't error out early if there's no
6960 thread in the thread list.
6961 (handle_v_cont, myresume): Don't set the current thread to the
6963 (process_serial_event) <Hg handling>: Also set thread_id if the
6964 previous general thread is still alive.
6965 (process_serial_event) <g/G handling>: If setting the current
6966 thread to the general thread fails, error out.
6967 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6968 thread's lwp instead of the current thread's.
6969 * target.c (set_desired_thread): If the desired thread was not
6970 found, leave the current thread pointing to NULL. Return an int
6971 (boolean) indicating success.
6972 * target.h (set_desired_thread): Change return type to int.
6974 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6976 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6977 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6979 (ps_get_thread_area): New function.
6981 2015-08-19 Gary Benson <gbenson@redhat.com>
6983 * hostio.c (handle_pread): Do not attempt to read more data
6984 than hostio_reply_with_data can fit in a packet.
6986 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6988 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6990 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6992 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6994 2015-08-06 Pedro Alves <palves@redhat.com>
6996 * tracepoint.c (expr_eval_result): Now an int.
6998 2015-08-06 Pedro Alves <palves@redhat.com>
7000 * gdbthread.h (struct regcache): Forward declare.
7001 (struct thread_info) <regcache_data>: Now a struct regcache
7003 * inferiors.c (inferior_regcache_data)
7004 (set_inferior_regcache_data): Now work with struct regcache
7006 * inferiors.h (struct regcache): Forward declare.
7007 (inferior_regcache_data, set_inferior_regcache_data): Now work
7008 with struct regcache pointers.
7009 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7010 (free_register_cache_thread): Remove struct regcache pointer
7013 2015-08-06 Pedro Alves <palves@redhat.com>
7015 * server.c (captured_main): On error, print the exception message
7016 to stderr, and if run_once is set, throw a quit.
7018 2015-08-06 Pedro Alves <palves@redhat.com>
7020 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7023 2015-08-06 Pedro Alves <palves@redhat.com>
7025 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7026 reading beyond the passed in buffer length.
7028 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7030 * tracepoint.c (symbol_list) <required>: Remove.
7032 2015-08-06 Pedro Alves <palves@redhat.com>
7034 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7035 count if stopping and suspending threads.
7036 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7037 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7038 (linux_detach): Complete an ongoing step-over.
7039 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7041 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7042 (linux_wait_1): If passing a signal to the inferior after
7043 finishing a step-over, unsuspend and re-resume all lwps. If we
7044 see a single-step event but the thread should be continuing, don't
7045 pass the trap to gdb.
7046 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7047 internal_error instead of gdb_assert.
7048 (enqueue_pending_signal): New function.
7049 (check_ptrace_stopped_lwp_gone): Add debug output.
7050 (start_step_over): Use internal_error instead of gdb_assert.
7051 (complete_ongoing_step_over): New function.
7052 (linux_resume_one_thread): Don't resume a suspended thread.
7053 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7056 2015-08-06 Pedro Alves <palves@redhat.com>
7058 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7059 (linux_thread_alive): Use lwp_is_marked_dead.
7060 (extended_event_reported): Delete.
7061 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7062 instead of extended_event_reported.
7063 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7065 (lwp_is_marked_dead): New function.
7066 (lwp_running): Use lwp_is_marked_dead.
7067 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7070 2015-08-06 Pedro Alves <palves@redhat.com>
7072 * linux-low.c (linux_wait_1): Move fork event output out of the
7073 !report_to_gdb check. Pass event_child->waitstatus to
7074 target_waitstatus_to_string instead of ourstatus.
7076 2015-08-04 Yao Qi <yao.qi@linaro.org>
7078 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7079 if current_thread is 32 bit.
7081 2015-08-04 Yao Qi <yao.qi@linaro.org>
7083 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7084 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7085 * server.c (extended_protocol): Remove "static".
7086 * server.h (extended_protocol): Declare it.
7088 2015-08-04 Yao Qi <yao.qi@linaro.org>
7090 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7091 both aarch64 and aarch32.
7092 (aarch64_set_pc): Likewise.
7094 2015-08-04 Yao Qi <yao.qi@linaro.org>
7096 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7097 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7098 arm-with-neon.xml to srv_xmlfiles.
7099 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7100 (is_64bit_tdesc): New function.
7101 (aarch64_linux_read_description): New function.
7102 (aarch64_arch_setup): Call aarch64_linux_read_description.
7103 (regs_info): Rename to regs_info_aarch64.
7104 (aarch64_regs_info): Return right regs_info.
7105 (initialize_low_arch): Call initialize_low_arch_aarch32.
7107 2015-08-04 Yao Qi <yao.qi@linaro.org>
7109 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7110 * linux-aarch32-low.c: New file.
7111 * linux-aarch32-low.h: New file.
7112 * linux-arm-low.c (arm_fill_gregset): Move it to
7113 linux-aarch32-low.c.
7114 (arm_store_gregset): Likewise.
7115 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7116 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7117 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7118 (regs_info): Rename to regs_info_arm.
7119 (arm_regs_info): Return regs_info_aarch32 if
7120 have_ptrace_getregset is 1 and target description is
7121 arm_with_neon or arm_with_vfpv3.
7122 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7123 Call initialize_low_arch_aarch32 instead.
7125 2015-08-04 Yao Qi <yao.qi@linaro.org>
7127 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7128 * linux-low.c: ... here.
7129 * linux-low.h (have_ptrace_getregset): Declare it.
7131 2015-08-04 Pedro Alves <palves@redhat.com>
7133 * thread-db.c (struct thread_db): Use new typedefs.
7134 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7136 (disable_thread_event_reporting): Cast result of dlsym to
7137 destination function pointer type.
7138 (thread_db_mourn): Use td_ta_delete_ftype.
7140 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7142 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7144 (CDX_BREAKPOINT): Define for R2.
7145 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7146 (the_low_target): Add comments.
7148 2015-07-30 Yao Qi <yao.qi@linaro.org>
7150 * linux-arm-low.c (arm_hwcap): Remove it.
7151 (arm_read_description): New local variable arm_hwcap. Don't
7152 set arm_hwcap to zero.
7154 2015-07-30 Yao Qi <yao.qi@linaro.org>
7156 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7157 Use regcache->tdesc instead.
7158 (arm_store_wmmxregset): Likewise.
7159 (arm_fill_vfpregset): Likewise.
7160 (arm_store_vfpregset): Likewise.
7162 2015-07-30 Yao Qi <yao.qi@linaro.org>
7164 * linux-arm-low.c: Include arch/arm.h.
7165 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7166 (arm_store_gregset): Likewise.
7168 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7170 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7171 ptrace's 4th parameter.
7173 2015-07-27 Yao Qi <yao.qi@linaro.org>
7175 * configure.srv (case aarch64*-*-linux*): Don't set
7178 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7180 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7182 * linux-arm-low.c: Likewise.
7183 * linux-cris-low.c: Likewise.
7184 * linux-crisv32-low.c: Likewise.
7185 * linux-low.c: Likewise.
7186 * linux-m68k-low.c: Likewise.
7187 * linux-mips-low.c: Likewise.
7188 * linux-nios2-low.c: Likewise.
7189 * linux-s390-low.c: Likewise.
7190 * linux-sparc-low.c: Likewise.
7191 * linux-tic6x-low.c: Likewise.
7192 * linux-tile-low.c: Likewise.
7193 * linux-x86-low.c: Likewise.
7195 2015-07-24 Pedro Alves <palves@redhat.com>
7197 * config.in: Regenerate.
7198 * configure: Regenerate.
7200 2015-07-24 Pedro Alves <palves@redhat.com>
7202 * acinclude.m4: Include ../ptrace.m4.
7203 * configure.ac: Call GDB_AC_PTRACE.
7204 * config.in, configure: Regenerate.
7206 2015-07-24 Yao Qi <yao.qi@linaro.org>
7208 * linux-low.c (linux_create_inferior): Remove setting to
7209 proc->priv->new_inferior.
7210 (linux_attach): Likewise.
7211 (linux_low_filter_event): Likewise.
7212 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7214 2015-07-24 Yao Qi <yao.qi@linaro.org>
7216 * linux-low.c (linux_arch_setup): New function.
7217 (linux_low_filter_event): If proc->tdesc is NULL and
7218 proc->attached is true, call the_low_target.arch_setup.
7219 Otherwise, keep status pending, and return.
7220 (linux_resume_one_lwp_throw): Don't call get_pc if
7221 thread->while_stepping isn't NULL. Don't call
7222 get_thread_regcache if proc->tdesc is NULL.
7223 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7224 (linux_target_ops): Install arch_setup.
7225 * server.c (start_inferior): Call the_target->arch_setup.
7226 * target.h (struct target_ops) <arch_setup>: New field.
7227 (target_arch_setup): New marco.
7228 * lynx-low.c (lynx_target_ops): Update.
7229 * nto-low.c (nto_target_ops): Update.
7230 * spu-low.c (spu_target_ops): Update.
7231 * win32-low.c (win32_target_ops): Update.
7233 2015-07-24 Yao Qi <yao.qi@linaro.org>
7235 * linux-low.c (linux_add_process): Don't set
7236 proc->priv->new_inferior.
7237 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7238 (linux_attach): Likewise.
7240 2015-07-24 Yao Qi <yao.qi@linaro.org>
7242 * server.c (start_inferior): Code refactor.
7244 2015-07-24 Yao Qi <yao.qi@linaro.org>
7246 * server.c (process_serial_event): Set general_thread.
7248 2015-07-21 Yao Qi <yao.qi@linaro.org>
7250 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7251 aarch64_linux_get_debug_reg_capacity.
7253 2015-07-17 Yao Qi <yao.qi@linaro.org>
7255 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7256 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7257 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7258 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7259 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7260 (AARCH64_HWP_ALIGNMENT): Likewise.
7261 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7262 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7263 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7264 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7265 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7266 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7267 (struct aarch64_debug_reg_state): Likewise.
7268 (struct arch_lwp_info): Likewise.
7269 (aarch64_align_watchpoint): Likewise.
7270 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7271 (aarch64_watchpoint_length): Likewise.
7272 (aarch64_point_encode_ctrl_reg): Likewise
7273 (aarch64_point_is_aligned): Likewise.
7274 (aarch64_align_watchpoint): Likewise.
7275 (aarch64_linux_set_debug_regs):
7276 (aarch64_dr_state_insert_one_point): Likewise.
7277 (aarch64_dr_state_remove_one_point): Likewise.
7278 (aarch64_handle_breakpoint): Likewise.
7279 (aarch64_handle_aligned_watchpoint): Likewise.
7280 (aarch64_handle_unaligned_watchpoint): Likewise.
7281 (aarch64_handle_watchpoint): Likewise.
7283 2015-07-17 Yao Qi <yao.qi@linaro.org>
7285 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7286 and don't aarch64_get_debug_reg_state. All callers update.
7287 (aarch64_handle_aligned_watchpoint): Likewise.
7288 (aarch64_handle_unaligned_watchpoint): Likewise.
7289 (aarch64_handle_watchpoint): Likewise.
7290 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7291 (aarch64_remove_point): Likewise.
7293 2015-07-17 Yao Qi <yao.qi@linaro.org>
7295 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7297 (aarch64_handle_unaligned_watchpoint): Likewise.
7299 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7301 Revert the previous 3 commits:
7302 Move gdb_regex* to common/
7303 Move linux_find_memory_regions_full & co.
7304 gdbserver build-id attribute generator
7306 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7307 Jan Kratochvil <jan.kratochvil@redhat.com>
7309 gdbserver build-id attribute generator.
7310 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7311 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7312 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7314 (get_dynamic): Use find_pdhr to traverse program headers.
7315 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7316 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7317 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7318 (get_hex_build_id): New.
7319 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7320 to reply XML document.
7322 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7323 Jan Kratochvil <jan.kratochvil@redhat.com>
7325 * target.c: Include target/target-utils.h and fcntl.h.
7326 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7327 (target_fileio_read_stralloc): New functions.
7329 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7331 * Makefile.in (OBS): Add gdb_regex.o.
7333 * config.in: Rebuilt.
7334 * configure: Rebuilt.
7336 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7337 Jan Kratochvil <jan.kratochvil@redhat.com>
7339 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7340 * Makefile.in (OBS): Add target-utils.o.
7341 (linux-maps.o, target-utils.o): New.
7342 * configure.srv (srv_linux_obj): Add linux-maps.o.
7344 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7346 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7348 (the_low_target): Install it.
7350 2015-07-14 Pedro Alves <palves@redhat.com>
7352 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7353 Instead, ignore ECHILD, and throw an error for other errnos.
7355 2015-07-10 Pedro Alves <palves@redhat.com>
7357 * event-loop.c (struct callback_event) <data>: Change type to
7358 gdb_client_data instance instead of gdb_client_data pointer.
7359 (append_callback_event): Adjust.
7361 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7363 * linux-aarch64-low.c: Add comments for each linux_target_ops
7364 method. Remove comments already covered in target_ops and
7365 linux_target_ops definitions.
7366 (the_low_target): Add comments for each unimplemented method.
7368 2015-07-09 Yao Qi <yao.qi@linaro.org>
7370 * linux-aarch64-low.c (aarch64_regmap): Remove.
7371 (aarch64_usrregs_info): Remove.
7372 (regs_info): Set field usrregs to NULL.
7374 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7376 * linux-low.c: Include "rsp-low.h"
7377 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7378 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7379 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7380 (handle_btrace_enable_pt): New.
7381 (handle_btrace_general_set): Support "pt".
7382 (handle_btrace_conf_general_set): Support "pt:size".
7384 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7386 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7389 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7391 * linux-aarch64-low.c: Remove comment about endianness.
7392 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7393 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7396 2015-06-24 Gary Benson <gbenson@redhat.com>
7398 * linux-i386-ipa.c (stdint.h): Do not include.
7399 * lynx-i386-low.c (stdint.h): Likewise.
7400 * lynx-ppc-low.c (stdint.h): Likewise.
7401 * mem-break.c (stdint.h): Likewise.
7402 * thread-db.c (stdint.h): Likewise.
7403 * tracepoint.c (stdint.h): Likewise.
7404 * win32-low.c (stdint.h): Likewise.
7406 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7408 * server.c (write_qxfer_response): Update call to
7409 remote_escape_output.
7411 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7412 Jan Kratochvil <jan.kratochvil@redhat.com>
7414 Merge multiple hex conversions.
7415 * gdbreplay.c (tohex): Rename to 'fromhex'.
7416 (logchar): Use fromhex.
7418 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7420 * server.c (handle_qxfer_libraries): Set `version' attribute for
7423 2015-06-10 Gary Benson <gbenson@redhat.com>
7425 * target.h (struct target_ops) <multifs_open>: New field.
7426 <multifs_unlink>: Likewise.
7427 <multifs_readlink>: Likewise.
7428 * linux-low.c (nat/linux-namespaces.h): New include.
7429 (linux_target_ops): Initialize the_target->multifs_open,
7430 the_target->multifs_unlink and the_target->multifs_readlink.
7431 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7432 * hostio.c (hostio_fs_pid): New static variable.
7433 (hostio_handle_new_gdb_connection): New function.
7434 (handle_setfs): Likewise.
7435 (handle_open): Use the_target->multifs_open as appropriate.
7436 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7437 (handle_readlink): Use the_target->multifs_readlink as
7439 (handle_vFile): Handle vFile:setfs packets.
7440 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7441 after target_handle_new_gdb_connection.
7443 2015-06-10 Gary Benson <gbenson@redhat.com>
7445 * configure.ac (AC_CHECK_FUNCS): Add setns.
7446 * config.in: Regenerate.
7447 * configure: Likewise.
7448 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7449 (linux-namespaces.o): New rule.
7450 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7452 2015-06-09 Gary Benson <gbenson@redhat.com>
7454 * hostio.c (handle_open): Process mode argument with
7455 fileio_to_host_mode.
7457 2015-06-01 Yao Qi <yao.qi@linaro.org>
7459 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7460 * linux-x86-low.c: Likewise.
7462 2015-05-28 Don Breazeal <donb@codesourcery.com>
7464 * linux-low.c (handle_extended_wait): Initialize
7465 thread_info.last_resume_kind for new fork children.
7467 2015-05-15 Pedro Alves <palves@redhat.com>
7469 * target.h (target_handle_new_gdb_connection): Rewrite using if
7470 wrapped in do/while.
7472 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7474 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7475 * configure, config.in: Regenerate.
7476 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7479 2015-05-12 Don Breazeal <donb@codesourcery.com>
7481 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7482 PTRACE_EVENT_VFORK_DONE.
7483 (linux_low_ptrace_options, extended_event_reported): Add vfork
7485 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7486 and "vforkdone" for RSP 'T' Stop Reply Packet.
7487 * server.h (report_vfork_events): Declare
7490 2015-05-12 Don Breazeal <donb@codesourcery.com>
7492 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7493 (the_low_target) <new_fork>: Initialize new member.
7494 * linux-arm-low.c (arm_new_fork): New function.
7495 (the_low_target) <new_fork>: Initialize new member.
7496 * linux-low.c (handle_extended_wait): Call new target function
7498 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7499 * linux-mips-low.c (mips_add_watchpoint): New function
7500 extracted from mips_insert_point.
7501 (the_low_target) <new_fork>: Initialize new member.
7502 (mips_linux_new_fork): New function.
7503 (mips_insert_point): Call mips_add_watchpoint.
7504 * linux-x86-low.c (x86_linux_new_fork): New function.
7505 (the_low_target) <new_fork>: Initialize new member.
7507 2015-05-12 Don Breazeal <donb@codesourcery.com>
7509 * linux-low.c (handle_extended_wait): Implement return value,
7510 rename argument 'event_child' to 'event_lwp', handle
7511 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7512 (linux_low_ptrace_options): New function.
7513 (linux_low_filter_event): Call linux_low_ptrace_options,
7514 use different argument fo linux_enable_event_reporting,
7515 use return value from handle_extended_wait.
7516 (extended_event_reported): New function.
7517 (linux_wait_1): Call extended_event_reported and set
7518 status to report fork events.
7519 (linux_write_memory): Add pid to debug message.
7520 (reset_lwp_ptrace_options_callback): New function.
7521 (linux_handle_new_gdb_connection): New function.
7522 (linux_target_ops): Initialize new structure member.
7523 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7524 * lynx-low.c: Initialize new structure member.
7525 * remote-utils.c (prepare_resume_reply): Implement stop reason
7526 "fork" for "T" stop message.
7527 * server.c (handle_query): Call handle_new_gdb_connection.
7528 * server.h (report_fork_events): Declare global flag.
7529 * target.h (struct target_ops) <handle_new_gdb_connection>:
7531 (target_handle_new_gdb_connection): New macro.
7532 * win32-low.c: Initialize new structure member.
7534 2015-05-12 Don Breazeal <donb@codesourcery.com>
7536 * mem-break.c (APPEND_TO_LIST): Define macro.
7537 (clone_agent_expr): New function.
7538 (clone_one_breakpoint): New function.
7539 (clone_all_breakpoints): New function.
7540 * mem-break.h: Declare new functions.
7542 2015-05-12 Don Breazeal <donb@codesourcery.com>
7544 * linux-low.c (linux_supports_fork_events): New function.
7545 (linux_supports_vfork_events): New function.
7546 (linux_target_ops): Initialize new structure members.
7547 (initialize_low): Call linux_check_ptrace_features.
7548 * lynx-low.c (lynx_target_ops): Initialize new structure
7550 * server.c (report_fork_events, report_vfork_events):
7552 (handle_query): Add new features to qSupported packet and
7554 (captured_main): Initialize new global variables.
7555 * target.h (struct target_ops) <supports_fork_events>:
7557 <supports_vfork_events>: New member.
7558 (target_supports_fork_events): New macro.
7559 (target_supports_vfork_events): New macro.
7560 * win32-low.c (win32_target_ops): Initialize new structure
7563 2015-05-12 Gary Benson <gbenson@redhat.com>
7565 * server.c (handle_qxfer_exec_file): Use current process
7568 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7570 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7571 Remove HAVE_PTRACE_GETREGS conditionals.
7572 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7573 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7575 2015-05-08 Yao Qi <yao.qi@linaro.org>
7577 * linux-low.c (linux_supports_conditional_breakpoints): New
7579 (linux_target_ops): Install new target method.
7580 * lynx-low.c (lynx_target_ops): Install NULL hook for
7581 supports_conditional_breakpoints.
7582 * nto-low.c (nto_target_ops): Likewise.
7583 * spu-low.c (spu_target_ops): Likewise.
7584 * win32-low.c (win32_target_ops): Likewise.
7585 * server.c (handle_query): Check
7586 target_supports_conditional_breakpoints.
7587 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7589 (target_supports_conditional_breakpoints): New macro.
7591 2015-05-06 Pedro Alves <palves@redhat.com>
7594 * server.c (start_inferior): If the process exits, mourn it.
7596 2015-04-21 Gary Benson <gbenson@redhat.com>
7598 * hostio.c (fileio_open_flags_to_host): Factored out to
7599 fileio_to_host_openflags in common/fileio.c. Single use
7602 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7604 * linux-xtensa-low.c (xtensa_fill_gregset)
7605 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7608 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7610 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7611 (regs_info): Replace usrregs pointer with NULL.
7613 2015-04-17 Gary Benson <gbenson@redhat.com>
7615 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7616 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7617 * server.c (handle_qxfer_exec_file): New function.
7618 (qxfer_packets): Add exec-file entry.
7619 (handle_query): Report qXfer:exec-file:read as supported packet.
7621 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7623 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7625 2015-04-09 Gary Benson <gbenson@redhat.com>
7627 * hostio-errno.c (errno_to_fileio_error): Remove function.
7628 Update caller to use remote_fileio_to_fio_error.
7630 2015-04-09 Yao Qi <yao.qi@linaro.org>
7632 * linux-low.c (linux_insert_point): Call
7633 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7634 (linux_remove_point): Call remove_memory_breakpoint if type is
7636 * linux-x86-low.c (x86_insert_point): Don't call
7637 insert_memory_breakpoint.
7638 (x86_remove_point): Don't call remove_memory_breakpoint.
7640 2015-04-01 Pedro Alves <palves@redhat.com>
7641 Cleber Rosa <crosa@redhat.com>
7643 * server.c (gdbserver_usage): Reorganize and extend the usage
7646 2015-03-24 Pedro Alves <palves@redhat.com>
7648 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7649 output. Also dump TRAP_TRACE.
7650 (linux_low_filter_event): In debug output, distinguish a
7651 resume_stop SIGSTOP from a delayed SIGSTOP.
7653 2015-03-24 Gary Benson <gbenson@redhat.com>
7655 * linux-x86-low.c (x86_linux_new_thread): Moved to
7657 (x86_linux_prepare_to_resume): Likewise.
7659 2015-03-24 Gary Benson <gbenson@redhat.com>
7661 * Makefile.in (x86-linux-dregs.o): New rule.
7662 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7663 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7664 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7665 (x86_linux_dr_get): Likewise.
7666 (x86_linux_dr_set): Likewise.
7667 (update_debug_registers_callback): Likewise.
7668 (x86_linux_dr_set_addr): Likewise.
7669 (x86_linux_dr_get_addr): Likewise.
7670 (x86_linux_dr_set_control): Likewise.
7671 (x86_linux_dr_get_control): Likewise.
7672 (x86_linux_dr_get_status): Likewise.
7673 (x86_linux_update_debug_registers): Likewise.
7675 2015-03-24 Gary Benson <gbenson@redhat.com>
7677 * linux-x86-low.c (x86_linux_update_debug_registers):
7678 New function, factored out from...
7679 (x86_linux_prepare_to_resume): ...this.
7681 2015-03-24 Gary Benson <gbenson@redhat.com>
7683 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7684 (x86_linux_dr_set): Likewise.
7685 (update_debug_registers_callback): Likewise.
7686 (x86_linux_dr_set_addr): Likewise.
7687 (x86_linux_dr_get_addr): Likewise.
7688 (x86_linux_dr_set_control): Likewise.
7689 (x86_linux_dr_get_control): Likewise.
7690 (x86_linux_dr_get_status): Likewise.
7691 (x86_linux_prepare_to_resume): Likewise.
7693 2015-03-24 Gary Benson <gbenson@redhat.com>
7695 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7696 Use perror_with_name. Pass string through gettext.
7697 (x86_linux_dr_set): Likewise.
7699 2015-03-24 Gary Benson <gbenson@redhat.com>
7701 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7702 (x86_linux_dr_set_addr): ...this.
7703 (x86_dr_low_get_addr): Rename to...
7704 (x86_linux_dr_get_addr): ...this.
7705 (x86_dr_low_set_control): Rename to...
7706 (x86_linux_dr_set_control): ...this.
7707 (x86_dr_low_get_control): Rename to...
7708 (x86_linux_dr_get_control): ...this.
7709 (x86_dr_low_get_status): Rename to...
7710 (x86_linux_dr_get_status): ...this.
7711 (x86_dr_low): Update with new function names.
7713 2015-03-24 Gary Benson <gbenson@redhat.com>
7715 * Makefile.in (x86-linux.o): New rule.
7716 * configure.srv: Add x86-linux.o to relevant targets.
7717 * linux-low.c (lwp_set_arch_private_info): New function.
7718 (lwp_arch_private_info): Likewise.
7719 * linux-x86-low.c: Include nat/x86-linux.h.
7720 (arch_lwp_info): Removed structure.
7721 (update_debug_registers_callback):
7722 Use lwp_set_debug_registers_changed.
7723 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7724 and lwp_set_debug_registers_changed.
7725 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7727 2015-03-24 Gary Benson <gbenson@redhat.com>
7729 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7730 * linux-arm-low.c (arm_new_thread): Likewise.
7731 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7732 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7733 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7734 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7736 2015-03-24 Gary Benson <gbenson@redhat.com>
7738 * linux-low.c (ptid_of_lwp): New function.
7739 (lwp_is_stopped): Likewise.
7740 (lwp_stop_reason): Likewise.
7741 * linux-x86-low.c (update_debug_registers_callback):
7743 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7746 2015-03-24 Gary Benson <gbenson@redhat.com>
7748 * linux-low.h (linux_stop_lwp): Remove declaration.
7750 2015-03-24 Gary Benson <gbenson@redhat.com>
7752 * linux-low.h: Include nat/linux-nat.h.
7753 * linux-low.c (iterate_over_lwps_args): New structure.
7754 (iterate_over_lwps_filter): New function.
7755 (iterate_over_lwps): Likewise.
7756 * linux-x86-low.c (update_debug_registers_callback):
7757 Update signature to what iterate_over_lwps expects.
7758 Remove PID check that iterate_over_lwps now performs.
7759 (x86_dr_low_set_addr): Use iterate_over_lwps.
7760 (x86_dr_low_set_control): Likewise.
7762 2015-03-24 Gary Benson <gbenson@redhat.com>
7764 * linux-x86-low.c (x86_debug_reg_state): New function.
7765 (x86_linux_prepare_to_resume): Use the above.
7767 2015-03-24 Gary Benson <gbenson@redhat.com>
7769 * linux-low.c (current_lwp_ptid): New function.
7770 * linux-x86-low.c: Include nat/linux-nat.h.
7771 (x86_dr_low_get_addr): Use current_lwp_ptid.
7772 (x86_dr_low_get_control): Likewise.
7773 (x86_dr_low_get_status): Likewise.
7775 2015-03-20 Pedro Alves <palves@redhat.com>
7777 * tracepoint.c (cmd_qtstatus): Make "str" const.
7779 2015-03-20 Pedro Alves <palves@redhat.com>
7781 * server.c (handle_general_set): Make "req_str" const.
7783 2015-03-19 Pedro Alves <palves@redhat.com>
7785 * linux-low.c (linux_resume_one_lwp): Rename to ...
7786 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7787 instead call perror_with_name.
7788 (check_ptrace_stopped_lwp_gone): New function.
7789 (linux_resume_one_lwp): Reimplement as wrapper around
7790 linux_resume_one_lwp_throw that swallows errors if the LWP is
7793 2015-03-19 Pedro Alves <palves@redhat.com>
7795 * linux-low.c (count_events_callback, select_event_lwp_callback):
7796 No longer check whether the thread has resume_stop as last resume
7799 2015-03-19 Pedro Alves <palves@redhat.com>
7801 * linux-low.c (count_events_callback, select_event_lwp_callback):
7802 Use the lwp's status_pending_p field, not the thread's.
7804 2015-03-19 Pedro Alves <palves@redhat.com>
7806 * linux-low.c (select_event_lwp_callback): Update comments to
7807 no longer mention SIGTRAP.
7809 2015-03-18 Gary Benson <gbenson@redhat.com>
7811 * server.c (handle_query): Do not report vFile:fstat as supported.
7813 2015-03-11 Gary Benson <gbenson@redhat.com>
7815 * hostio.c (sys/types.h): New include.
7816 (sys/stat.h): Likewise.
7817 (common-remote-fileio.h): Likewise.
7818 (handle_fstat): New function.
7819 (handle_vFile): Handle vFile:fstat packets.
7821 2015-03-11 Gary Benson <gbenson@redhat.com>
7823 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7824 struct stat.st_blocks and struct stat.st_blksize.
7825 * configure: Regenerate.
7826 * config.in: Likewise.
7827 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7828 (OBS): Add common-remote-fileio.o.
7829 (common-remote-fileio.o): New rule.
7831 2015-03-09 Pedro Alves <palves@redhat.com>
7833 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7834 'struct sockaddr' pointer in 'accept' call.
7836 2015-03-09 Pedro Alves <palves@redhat.com>
7839 2015-03-07 Pedro Alves <palves@redhat.com>
7840 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7841 or <winsock2.h> here. Instead include "gdb_socket.h".
7842 (remote_open): Use union gdb_sockaddr_u.
7843 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7844 or <winsock2.h> here. Instead include "gdb_socket.h".
7845 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7846 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7848 (init_named_socket, gdb_agent_helper_thread): Use union
7851 2015-03-07 Pedro Alves <palves@redhat.com>
7853 * configure.ac (build_warnings): Move
7854 -Wdeclaration-after-statement to the C-specific set.
7855 * configure: Regenerate.
7857 2015-03-07 Pedro Alves <palves@redhat.com>
7859 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7860 or <winsock2.h> here. Instead include "gdb_socket.h".
7861 (remote_open): Use union gdb_sockaddr_u.
7862 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7863 or <winsock2.h> here. Instead include "gdb_socket.h".
7864 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7865 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7867 (init_named_socket, gdb_agent_helper_thread): Use union
7870 2015-03-07 Pedro Alves <palves@redhat.com>
7872 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7875 2015-03-06 Yao Qi <yao.qi@linaro.org>
7877 * linux-aarch64-low.c (aarch64_insert_point): Use
7878 show_debug_regs as a boolean.
7879 (aarch64_remove_point): Likewise.
7881 2015-03-05 Pedro Alves <palves@redhat.com>
7883 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7884 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7885 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7886 * nto-low.c (nto_target_ops): Likewise.
7887 * spu-low.c (spu_target_ops): Likewise.
7888 * win32-low.c (win32_target_ops): Likewise.
7890 2015-03-04 Pedro Alves <palves@redhat.com>
7892 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7893 Decide whether a breakpoint triggered based on the SIGTRAP's
7895 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7896 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7897 (linux_low_filter_event): Check for breakpoints before checking
7899 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7901 (linux_stopped_by_sw_breakpoint)
7902 (linux_supports_stopped_by_sw_breakpoint)
7903 (linux_stopped_by_hw_breakpoint)
7904 (linux_supports_stopped_by_hw_breakpoint): New functions.
7905 (linux_target_ops): Install new target methods.
7907 2015-03-04 Pedro Alves <palves@redhat.com>
7909 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7910 * server.c (swbreak_feature, hwbreak_feature): New globals.
7911 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7912 (captured_main): Clear swbreak_feature and hwbreak_feature.
7913 * server.h (swbreak_feature, hwbreak_feature): Declare.
7914 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7915 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7916 supports_stopped_by_hw_breakpoint>: New fields.
7917 (target_supports_stopped_by_sw_breakpoint)
7918 (target_stopped_by_sw_breakpoint)
7919 (target_supports_stopped_by_hw_breakpoint)
7920 (target_stopped_by_hw_breakpoint): Declare.
7922 2015-03-04 Pedro Alves <palves@redhat.com>
7924 enum lwp_stop_reason -> enum target_stop_reason
7925 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7926 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7927 (linux_wait_1, stuck_in_jump_pad_callback)
7928 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7929 (linux_stopped_by_watchpoint):
7930 * linux-low.h (enum lwp_stop_reason): Delete.
7931 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7932 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7934 2015-03-04 Yao Qi <yao.qi@linaro.org>
7936 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7938 2015-03-03 Gary Benson <gbenson@redhat.com>
7940 * hostio.c (handle_vFile): Fix prefix lengths.
7942 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7944 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7947 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7949 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7950 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7951 (clean): Add "rm -f" for above C files.
7952 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7953 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7954 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7955 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7956 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7957 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7958 (init_registers_s390x_vx_linux64)
7959 (init_registers_s390x_tevx_linux64)
7960 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7961 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7963 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7964 (s390_store_vxrs_high): New functions.
7965 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7967 (s390_arch_setup): Add logic for selecting one of the new target
7968 descriptions. Activate the new vector regsets if applicable.
7969 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7970 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7971 and init_registers_s390x_tevx_linux64.
7973 2015-03-01 Pedro Alves <palves@redhat.com>
7975 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7978 2015-02-27 Pedro Alves <palves@redhat.com>
7980 * linux-x86-low.c (u_debugreg_offset): New function.
7981 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7983 2015-02-27 Pedro Alves <palves@redhat.com>
7985 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7986 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7987 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7988 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7989 (ps_lsetfpregs, ps_getpid)
7990 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7991 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7992 (ps_lsetxregs, ps_plog): Declare.
7994 2015-02-27 Pedro Alves <palves@redhat.com>
7996 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7997 IP_AGENT_EXPORT_FUNC.
7998 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7999 IP_AGENT_EXPORT_FUNC.
8000 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8001 (IP_AGENT_EXPORT): Delete.
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, collecting, gdb_collect)
8005 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8006 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8007 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8008 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8009 (traceframe_read_count, traceframe_write_count)
8010 (traceframes_created, trace_state_variables, get_raw_reg)
8011 (get_trace_state_variable_value, set_trace_state_variable_value)
8012 (ust_loaded, helper_thread_id, cmd_buf): Use
8013 IPA_SYM_EXPORTED_NAME.
8014 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8015 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8016 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8017 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8018 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8019 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8020 EXTERN_C_PUSH/EXTERN_C_POP.
8021 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8022 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8023 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8024 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8025 (traceframe_write_count, traceframe_read_count)
8026 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8027 (about_to_request_buffer_space, get_trace_state_variable_value)
8028 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8029 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8030 EXTERN_C_PUSH/EXTERN_C_POP.
8031 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8032 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8033 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8034 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8035 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8036 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8037 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8038 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8040 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8041 (IP_AGENT_EXPORT_VAR_DECL): Define.
8043 (gdb_agent_get_raw_reg): Declare.
8045 2015-02-27 Tom Tromey <tromey@redhat.com>
8046 Pedro Alves <palves@redhat.com>
8048 Rename symbols whose names are reserved C++ keywords throughout.
8050 2015-02-27 Pedro Alves <palves@redhat.com>
8052 * Makefile.in (COMPILER): New, get it from autoconf.
8053 (CXX): Get from autoconf instead.
8054 (COMPILE.pre): Use COMPILER.
8055 (CC-LD): Rename to ...
8056 (CC_LD): ... this. Use COMPILER.
8057 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8058 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8059 * acinclude.m4: Include build-with-cxx.m4.
8060 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8061 Disable -Werror by default if building in C++ mode.
8062 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8063 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8064 the C++ compiler. Save/restore CXXFLAGS too.
8065 * configure: Regenerate.
8067 2015-02-27 Pedro Alves <palves@redhat.com>
8069 * acinclude.m4: Include libiberty.m4.
8070 * configure.ac: Call libiberty_INIT.
8071 * config.in, configure: Regenerate.
8073 2015-02-26 Pedro Alves <palves@redhat.com>
8075 * linux-low.c (linux_wait_1): When incrementing the PC past a
8076 program breakpoint always use the_low_target.breakpoint_len as
8077 increment, rather than the maximum between that and
8078 the_low_target.decr_pc_after_break.
8080 2015-02-23 Pedro Alves <palves@redhat.com>
8082 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8083 thread was doing a step-over; always adjust the PC if
8084 we stepped over a permanent breakpoint.
8085 (linux_wait_1): If we stepped over breakpoint that was on top of a
8086 permanent breakpoint, manually advance the PC past it.
8088 2015-02-23 Pedro Alves <palves@redhat.com>
8090 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8092 (x86_fill_gregset, x86_store_gregset): Use it when handling
8095 2015-02-20 Pedro Alves <palves@redhat.com>
8097 * thread-db.c: Include "nat/linux-procfs.h".
8098 (thread_db_init): Skip listing new threads if the kernel supports
8099 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8101 2015-02-20 Pedro Alves <palves@redhat.com>
8103 * linux-low.c (status_pending_p_callback): Use ptid_match.
8105 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8107 PR breakpoints/16812
8108 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8109 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8110 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8112 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8114 PR breakpoints/15956
8115 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8117 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8119 * linux-low.c (linux_low_btrace_conf): Print size.
8120 * server.c (handle_btrace_conf_general_set): New.
8121 (hanle_general_set): Call handle_btrace_conf_general_set.
8122 (handle_query): Report Qbtrace-conf:bts:size as supported.
8124 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8126 * linux-low.c (linux_low_enable_btrace): Update parameters.
8127 (linux_low_btrace_conf): New.
8128 (linux_target_ops)<to_btrace_conf>: Initialize.
8129 * server.c (current_btrace_conf): New.
8130 (handle_btrace_enable): Rename to ...
8131 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8132 to target_enable_btrace. Update comment. Update users.
8133 (handle_qxfer_btrace_conf): New.
8134 (qxfer_packets): Add btrace-conf entry.
8135 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8136 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8137 (target_ops)<read_btrace_conf>: New.
8138 (target_enable_btrace): Update parameters.
8139 (target_read_btrace_conf): New.
8141 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8143 * server.c (handle_btrace_general_set): Remove call to
8144 target_supports_btrace.
8145 (supported_btrace_packets): New.
8146 (handle_query): Call supported_btrace_packets.
8147 * target.h: include btrace-common.h.
8148 (btrace_target_info): Removed.
8149 (supports_btrace, target_supports_btrace): Update parameters.
8151 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8153 * Makefile.in (SFILES): Add common/btrace-common.c.
8154 (OBS): Add common/btrace-common.o.
8155 (btrace-common.o): Add build rules.
8156 * linux-low: Include btrace-common.h.
8157 (linux_low_read_btrace): Use struct btrace_data. Call
8158 btrace_data_init and btrace_data_fini.
8160 2015-02-06 Pedro Alves <palves@redhat.com>
8162 * thread-db.c (find_new_threads_callback): Add debug output.
8164 2015-02-04 Pedro Alves <palves@redhat.com>
8166 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8167 (resume_stopped_resumed_lwps): New function.
8168 (linux_wait_for_event_filtered): Use it.
8170 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8172 * Makefile.in (SFILES): Add linux-personality.c.
8173 (linux-personality.o): New rule.
8174 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8175 list of objects to be built.
8176 * linux-low.c: Include nat/linux-personality.h.
8177 (linux_create_inferior): Remove code to disable address space
8178 randomization (moved to ../nat/linux-personality.c). Create
8179 cleanup to disable address space randomization.
8181 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8183 * Makefile.in (posix-strerror.o): New rule.
8184 (mingw-strerror.o): Likewise.
8185 * configure: Regenerated.
8186 * configure.ac: Source file ../common/common.host. Initialize new
8187 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8189 2015-01-14 Yao Qi <yao@codesourcery.com>
8191 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8192 (ppc-linux.o): New rule.
8193 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8194 * configure.ac: AC_CHECK_FUNCS(getauxval).
8195 * config.in: Re-generated.
8196 * configure: Re-generated.
8197 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8198 ppc64_64bit_inferior_p
8200 2015-01-14 Yao Qi <yao@codesourcery.com>
8202 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8203 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8204 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8205 (PT_ORIG_R3, PT_TRAP): Likewise.
8206 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8207 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8208 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8210 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8212 * i387-fp.c (i387_cache_to_xsave): In look over
8213 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8214 zmmh_low_space field by use of zmmh_high_space.
8216 2015-01-09 Pedro Alves <palves@redhat.com>
8218 * linux-low.c (step_over_bkpt): Move higher up in the file.
8219 (handle_extended_wait): Don't store the stop_pc here.
8220 (get_stop_pc): Adjust comments and rename to ...
8221 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8222 stopped for a software breakpoint or hardware breakpoint.
8223 (thread_still_has_status_pending_p): New function.
8224 (status_pending_p_callback): Use
8225 thread_still_has_status_pending_p. If the event is no longer
8226 interesting, resume the LWP.
8227 (handle_tracepoints): Add assert.
8228 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8229 (wstatus_maybe_breakpoint): New function.
8230 (cancel_breakpoint): Delete function.
8231 (check_stopped_by_watchpoint): New function, factored out from
8232 linux_low_filter_event.
8233 (lp_status_maybe_breakpoint): Delete function.
8234 (linux_low_filter_event): Remove filter_ptid argument.
8235 Leave thread group exits pending here. Store the LWP's stop PC.
8236 Always leave events pending.
8237 (linux_wait_for_event_filtered): Pull all events out of the
8238 kernel, and leave them all pending.
8239 (count_events_callback, select_event_lwp_callback): Consider all
8241 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8242 (select_event_lwp): Only give preference to the stepping LWP in
8243 all-stop mode. Adjust comments.
8244 (ignore_event): New function.
8245 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8246 references to cancel_breakpoints. Adjust to renames. Also give
8247 equal priority to all LWPs that have had events in non-stop mode.
8248 If reporting a software breakpoint event, unadjust the LWP's PC.
8249 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8250 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8252 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8253 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8254 (linux_stopped_by_watchpoint): Adjust.
8255 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8256 * linux-low.h (enum lwp_stop_reason): New.
8257 (struct lwp_info) <stop_pc>: Adjust comment.
8258 <stopped_by_watchpoint>: Delete field.
8259 <stop_reason>: New field.
8260 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8261 * mem-break.c (software_breakpoint_inserted_here)
8262 (hardware_breakpoint_inserted_here): New function.
8263 * mem-break.h (software_breakpoint_inserted_here)
8264 (hardware_breakpoint_inserted_here): Declare.
8265 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8266 (cancel_breakpoints): Delete.
8267 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8268 (upload_fast_traceframes): Remove references to
8271 2015-01-09 Pedro Alves <palves@redhat.com>
8273 * thread-db.c (find_new_threads_callback): Ignore thread if the
8274 kernel thread ID is -1.
8276 2015-01-09 Pedro Alves <palves@redhat.com>
8278 * linux-low.c (linux_attach_fail_reason_string): Move to
8279 nat/linux-ptrace.c, and rename.
8280 (linux_attach_lwp): Update comment.
8281 (attach_proc_task_lwp_callback): New function.
8282 (linux_attach): Adjust to rename and use
8283 linux_proc_attach_tgid_threads.
8284 (linux_attach_fail_reason_string): Delete declaration.
8286 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8288 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8289 * server.c (gdbserver_version): Likewise.
8291 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8293 * remote-utils.c: Include ctype.h.
8294 (input_interrupt): Explicitly handle the case when the char
8295 received is the NUL byte. Improve the printing of non-ASCII
8298 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8300 * linux-low.c (linux_low_filter_event): Update call to
8301 linux_enable_event_reporting following the addition of
8302 a new parameter to that function.
8304 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8307 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8308 (AARCH64_FPCR_REGNO): Likewise.
8309 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8310 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8311 (aarch64_store_fpregset): Likewise.
8313 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8315 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8316 Remove FIXME comment about assumption about N.
8318 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8320 * configure.ac: If large-file support is disabled in GDBserver,
8321 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8322 * configure: Regenerate.
8324 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8326 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8327 warning upon ENODATA from ptrace.
8328 * linux-s390-low.c (s390_store_tdb): New.
8329 (s390_regsets): Add regset for NT_S390_TDB.
8331 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8333 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8334 without a fill_function.
8335 * linux-s390-low.c (s390_fill_last_break): Remove.
8336 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8337 (s390_arch_setup): Use regset's size instead of fill_function for
8340 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8342 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8343 the regset's store function when ptrace returned an error.
8344 * regcache.c (get_thread_regcache): Invalidate register cache
8345 before fetching inferior's registers.
8347 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8349 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8350 while-loop as for-loop.
8351 (regsets_store_inferior_registers): Likewise.
8353 2014-11-28 Yao Qi <yao@codesourcery.com>
8355 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8356 * config.in, configure: Re-generate.
8357 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8360 2014-11-21 Yao Qi <yao@codesourcery.com>
8362 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8363 (AC_CHECK_HEADERS): Remove malloc.h.
8364 * configure: Re-generated.
8365 * config.in: Re-generated.
8366 * server.h: Don't include alloca.h and malloc.h.
8367 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8368 Don't include malloc.h.
8370 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8372 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8373 corresponding ERRNO check in same block.
8375 2014-11-12 Pedro Alves <palves@redhat.com>
8377 * server.c (cont_thread): Update comment.
8378 (start_inferior, attach_inferior): No longer clear cont_thread.
8379 (handle_v_cont): No longer set cont_thread.
8380 (captured_main): Clear cont_thread each time a GDB connects.
8382 2014-11-12 Pedro Alves <palves@redhat.com>
8384 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8385 thread, and don't resume all threads if the Hc thread has exited.
8387 2014-11-12 Pedro Alves <palves@redhat.com>
8389 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8390 the process group instead of to a specific LWP.
8392 2014-10-15 Pedro Alves <palves@redhat.com>
8395 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8397 (arm_set_thread_context): Delete.
8398 (the_low_target): Adjust.
8399 * win32-i386-low.c (debug_registers_changed)
8400 (debug_registers_used): Delete.
8401 (update_debug_registers_callback): New function.
8402 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8403 needing to update their debug registers.
8404 (win32_get_current_dr): New function.
8405 (x86_dr_low_get_addr, x86_dr_low_get_control)
8406 (x86_dr_low_get_status): Fetch the debug register from the thread
8408 (i386_initial_stuff): Adjust.
8409 (i386_get_thread_context): Remove current_event parameter. Don't
8410 clear debug_registers_changed nor copy DR values to
8412 (i386_set_thread_context): Delete.
8413 (i386_prepare_to_resume): New function.
8414 (i386_thread_added): Mark the thread as needing to update irs
8416 (the_low_target): Remove i386_set_thread_context and install
8417 i386_prepare_to_resume.
8418 * win32-low.c (win32_get_thread_context): Adjust.
8419 (win32_set_thread_context): Use SetThreadContext
8421 (win32_prepare_to_resume): New function.
8422 (win32_require_context): New function, factored out from ...
8423 (thread_rec): ... this.
8424 (continue_one_thread): Call win32_prepare_to_resume on each thread
8425 we're about to continue.
8426 (win32_resume): Call win32_prepare_to_resume on the event thread.
8427 * win32-low.h (struct win32_thread_info)
8428 <debug_registers_changed>: New field.
8429 (struct win32_target_ops): Change prototype of set_thread_context,
8430 delete set_thread_context and add prepare_to_resume.
8431 (win32_require_context): New declaration.
8433 2014-10-08 Gary Benson <gbenson@redhat.com>
8435 * server.h: Do not include common-exceptions.h.
8437 2014-10-08 Gary Benson <gbenson@redhat.com>
8439 * server.h: Do not include cleanups.h.
8441 2014-09-30 James Hogan <james.hogan@imgtec.com>
8443 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8446 2014-09-23 Yao Qi <yao@codesourcery.com>
8448 * linux-low.c (lp_status_maybe_breakpoint): New function.
8449 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8450 (count_events_callback): Likewise.
8451 (select_event_lwp_callback): Likewise.
8452 (cancel_breakpoints_callback): Likewise.
8454 2014-09-19 Don Breazeal <donb@codesourcery.com>
8456 * linux-low.c (handle_extended_wait): Call
8457 linux_ptrace_get_extended_event.
8458 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8459 linux_is_extended_waitstatus.
8461 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8463 * Makefile.in (CPPFLAGS): Define.
8464 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8465 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8467 2014-09-16 Gary Benson <gbenson@redhat.com>
8469 * inferiors.h (current_inferior): Renamed as...
8470 (current_thread): New variable. All uses updated.
8471 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8472 (maybe_move_out_of_jump_pad): Likewise.
8473 (cancel_breakpoint): Likewise.
8474 (linux_low_filter_event): Likewise.
8475 (wait_for_sigstop): Likewise.
8476 (linux_resume_one_lwp): Likewise.
8477 (need_step_over_p): Likewise.
8478 (start_step_over): Likewise.
8479 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8480 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8481 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8482 and save_inferior as saved_thread.
8483 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8485 (regcache_invalidate_thread): Likewise.
8486 * remote-utils.c (prepare_resume_reply): Likewise.
8487 * thread-db.c (thread_db_get_tls_address): Likewise.
8488 (disable_thread_event_reporting): Likewise.
8489 (remove_thread_event_breakpoints): Likewise.
8490 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8492 * target.h (set_desired_inferior): Renamed as...
8493 (set_desired_thread): New declaration. All uses updated.
8494 * server.c (myresume): Updated comment to reference thread instead
8496 (handle_serial_event): Likewise.
8497 (handle_target_event): Likewise.
8499 2014-09-12 Tom Tromey <tromey@redhat.com>
8500 Gary Benson <gbenson@redhat.com>
8502 * regcache.h: Include common-regcache.h.
8503 (regcache_read_pc): Don't declare.
8504 * regcache.c (get_thread_regcache_for_ptid): New function.
8506 2014-09-11 Tom Tromey <tromey@redhat.com>
8507 Gary Benson <gbenson@redhat.com>
8509 * symbol.c: New file.
8510 * Makefile.in (SFILES): Add symbol.c.
8511 (OBS): Add symbol.o.
8513 2014-09-11 Gary Benson <gbenson@redhat.com>
8515 * target.c (target_stop_ptid, target_continue_ptid): New
8518 2014-09-11 Tom Tromey <tromey@redhat.com>
8519 Gary Benson <gbenson@redhat.com>
8521 * target.h: Include target/target.h.
8522 * target.c (target_read_memory, target_read_uint32)
8523 (target_write_memory): New functions.
8525 2014-09-11 Gary Benson <gbenson@redhat.com>
8527 * server.h (debug_hw_points): Don't declare.
8528 * server.c (debug_hw_points): Don't define. Replace all uses
8529 with show_debug_regs.
8530 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8531 all uses with show_debug_regs.
8533 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8535 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8536 endianness into account.
8537 (ppc_supply_ptrace_register): Likewise.
8539 2014-09-03 James Hogan <james.hogan@imgtec.com>
8541 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8542 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8544 2014-09-03 Gary Benson <gbenson@redhat.com>
8546 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8547 ALL_DEBUG_ADDRESS_REGISTERS.
8549 2014-09-02 Gary Benson <gbenson@redhat.com>
8551 * i386-low.h: Renamed as...
8552 * x86-low.h: New file. All type, function and variable name
8553 prefixes changed from "i386_" to "x86_". All references updated.
8554 * i386-low.c: Renamed as...
8555 * x86-low.c: New file. All type, function and variable name
8556 prefixes changed from "i386_" to "x86_". All references updated.
8558 2014-09-02 Gary Benson <gbenson@redhat.com>
8560 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8561 (x86_linux_new_thread): Likewise.
8563 2014-08-29 Gary Benson <gbenson@redhat.com>
8565 * server.h (setjmp.h): Do not include.
8566 (toplevel): Do not declare.
8567 (common-exceptions.h): Include.
8568 (cleanups.h): Likewise.
8569 * server.c (toplevel): Do not define.
8570 (exit_code): New static global.
8571 (detach_or_kill_for_exit_cleanup): New function.
8572 (main): New function. Original main renamed to...
8573 (captured_main): New function.
8574 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8576 2014-08-29 Gary Benson <gbenson@redhat.com>
8578 * Makefile.in (SFILES): Add common/common-exceptions.c.
8579 (OBS): Add common-exceptions.o.
8580 (common-exceptions.o): New rule.
8581 * utils.c (prepare_to_throw_exception): New function.
8583 2014-08-29 Gary Benson <gbenson@redhat.com>
8585 * config.in: Regenerate.
8586 * configure: Likewise.
8588 2014-08-29 Gary Benson <gbenson@redhat.com>
8590 * Makefile.in (SFILES): Add common/cleanups.c.
8592 (cleanups.o): New rule.
8594 2014-08-29 Gary Benson <gbenson@redhat.com>
8596 * utils.c (internal_vwarning): New function.
8598 2014-08-28 Gary Benson <gbenson@redhat.com>
8600 * utils.h (fatal): Remove declaration.
8601 * utils.c (fatal): Remove function.
8603 2014-08-28 Gary Benson <gbenson@redhat.com>
8605 * tracepoint.c (gdb_agent_init): Replace fatal with
8607 (initialize_tracepoint): Likewise.
8609 2014-08-28 Gary Benson <gbenson@redhat.com>
8611 * remote-utils.c (remote_prepare): Replace fatal with error.
8613 2014-08-28 Gary Benson <gbenson@redhat.com>
8615 * linux-low.c (linux_async): Replace fatal with warning.
8617 (linux_start_non_stop): Return -1 if linux_async failed.
8619 2014-08-28 Gary Benson <gbenson@redhat.com>
8621 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8623 (i386_dr_low_get_addr): Remove vague comment.
8624 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8627 2014-08-28 Gary Benson <gbenson@redhat.com>
8629 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8630 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8632 (linux_resume_one_lwp): Likewise.
8633 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8635 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8636 with internal_error.
8637 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8638 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8639 (find_register_by_name): Replace fatal with internal_error.
8640 (find_regno): Likewise.
8641 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8642 * thread-db.c (thread_db_create_event): Likewise.
8643 (thread_db_load_search): Likewise.
8644 (try_thread_db_load_1): Likewise.
8645 * tracepoint.c (get_jump_space_head): Replace fatal with
8647 (claim_trampoline_space): Likewise.
8648 (have_fast_tracepoint_trampoline_buffer): Likewise.
8649 (cmd_qtstart): Likewise.
8650 (stop_tracing): Likewise.
8651 (fast_tracepoint_collecting): Likewise.
8652 (target_malloc): Likewise.
8653 (download_tracepoint): Likewise.
8654 (download_trace_state_variables): Replace check with gdb_assert.
8655 (upload_fast_traceframes): Replace fatal with internal_error.
8657 2014-08-19 Tom Tromey <tromey@redhat.com>
8658 Gary Benson <gbenson@redhat.com>
8660 * Makefile.in (SFILES): Add common/common-debug.c.
8661 (OBS): Add common-debug.o.
8662 (common-debug.o): New rule.
8663 * debug.h (debug_printf): Don't declare.
8664 * debug.c (debug_printf): Renamed and rewritten as...
8665 (debug_vprintf): New function.
8667 2014-08-19 Gary Benson <gbenson@redhat.com>
8669 * utils.h: Do not include print-utils.h.
8671 2014-08-19 Tom Tromey <tromey@redhat.com>
8672 Gary Benson <gbenson@redhat.com>
8674 * server.h: Add static assertion.
8675 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8677 2014-08-19 Tom Tromey <tromey@redhat.com>
8678 Gary Benson <gbenson@redhat.com>
8680 * Makefile.in (SFILES): Add common/errors.c.
8681 (OBS): Add errors.o.
8682 (IPA_OBS): Add errors-ipa.o.
8683 (errors.o): New rule.
8684 (errors-ipa.o): Likewise.
8685 * utils.h (perror_with_name, error, warning): Don't declare.
8686 * utils.c (warning): Renamed and rewritten as...
8687 (vwarning): New function.
8688 (error): Renamed and rewritten as...
8689 (verror): New function.
8690 (internal_error): Renamed and rewritten as...
8691 (internal_verror): New function.
8693 2014-08-07 Gary Benson <gbenson@redhat.com>
8695 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8696 * configure: Regenerate.
8697 * config.in: Likewise.
8698 * server.h: Do not include errno.h.
8699 * event-loop.c: Likewise.
8700 * hostio-errno.c: Likewise.
8701 * linux-low.c: Likewise.
8702 * remote-utils.c: Likewise.
8703 * spu-low.c: Likewise.
8704 * utils.c: Likewise.
8705 * gdbreplay.c: Unconditionally include errno.h.
8707 2014-08-07 Gary Benson <gbenson@redhat.com>
8709 * server.h: Do not include string.h.
8710 * event-loop.c: Likewise.
8711 * linux-low.c: Likewise.
8712 * regcache.c: Likewise.
8713 * remote-utils.c: Likewise.
8714 * spu-low.c: Likewise.
8715 * utils.c: Likewise.
8717 2014-08-07 Gary Benson <gbenson@redhat.com>
8719 * server.h: Do not include gdb_assert.h.
8721 2014-08-07 Gary Benson <gbenson@redhat.com>
8723 * server.h: Do not include common-utils.h.
8725 2014-08-07 Gary Benson <gbenson@redhat.com>
8727 * server.h: Do not include ptid.h.
8728 * notif.h: Likewise.
8730 2014-08-07 Gary Benson <gbenson@redhat.com>
8732 * server.h: Do not include gdb_locale.h.
8734 2014-08-07 Gary Benson <gbenson@redhat.com>
8736 * server.h: Do not include gdb/signals.h.
8737 * win32-low.c: Likewise.
8739 2014-08-07 Gary Benson <gbenson@redhat.com>
8741 * server.h: Do not include pathmax.h.
8743 2014-08-07 Gary Benson <gbenson@redhat.com>
8745 * server.h: Do not include libiberty.h.
8746 * linux-bfin-low.c: Likewise.
8748 2014-08-07 Gary Benson <gbenson@redhat.com>
8750 * server.h: Do not include ansidecl.h.
8752 2014-08-07 Gary Benson <gbenson@redhat.com>
8754 * linux-x86-low.c: Do not include stddef.h.
8755 * lynx-ppc-low.c: Likewise.
8756 * tracepoint.c: Likewise.
8758 2014-08-07 Gary Benson <gbenson@redhat.com>
8760 * server.h: Do not include stdarg.h.
8761 * nto-low.c: Likewise.
8763 2014-08-07 Gary Benson <gbenson@redhat.com>
8765 * server.h: Do not include stdlib.h.
8766 * inferiors.c: Likewise.
8767 * linux-low.c: Likewise.
8768 * regcache.c: Likewise.
8769 * spu-low.c: Likewise.
8770 * tracepoint.c: Likewise.
8771 * utils.c: Likewise.
8773 2014-08-07 Gary Benson <gbenson@redhat.com>
8775 * server.h: Do not include stdio.h.
8776 * linux-low.c: Likewise.
8777 * remote-utils.c: Likewise.
8778 * spu-low.c: Likewise.
8779 * utils.c: Likewise.
8780 * wincecompat.c: Likewise.
8782 2014-08-06 Gary Benson <gbenson@redhat.com>
8784 * regcache.c (init_register_cache): Move conditionals inside if.
8786 2014-08-06 Gary Benson <gbenson@redhat.com>
8788 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8790 2014-07-31 Gary Benson <gbenson@redhat.com>
8792 * ax.h: Do not include server.h.
8793 * gdbthread.h: Likewise.
8794 * lynx-low.h: Likewise.
8795 * notif.h: Likewise.
8797 2014-07-30 Gary Benson <gbenson@redhat.com>
8799 * server.h: Include common-defs.h.
8800 Do not include config.h or build-gnulib-gdbserver/config.h.
8802 2014-07-30 Gary Benson <gbenson@redhat.com>
8804 * hostio-errno.c: Move server.h to top of includes list.
8805 * inferiors.c: Likewise.
8806 * linux-x86-low.c: Likewise.
8807 * notif.c: Include server.h.
8809 2014-07-24 Tom Tromey <tromey@redhat.com>
8810 Gary Benson <gbenson@redhat.com>
8812 * server.h (CORE_ADDR): Now unsigned.
8814 2014-07-16 Pedro Alves <palves@redhat.com>
8816 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8818 2014-07-15 Pedro Alves <palves@redhat.com>
8820 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8823 2014-07-11 Pedro Alves <palves@redhat.com>
8825 * linux-low.c (kill_wait_lwp): New function, based on
8826 kill_one_lwp_callback, but use my_waitpid directly.
8827 (kill_one_lwp_callback, linux_kill): Use it.
8829 2014-06-23 Pedro Alves <palves@redhat.com>
8831 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8832 before setting DR0..DR3.
8834 2014-06-20 Gary Benson <gbenson@redhat.com>
8836 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8837 * configure: Regenerated.
8838 * config.in: Likewise.
8840 2014-06-20 Gary Benson <gbenson@redhat.com>
8842 * Makefile.in (SFILES): Update locations for files moved
8844 (object file files): Reordered.
8846 2014-06-20 Gary Benson <gbenson@redhat.com>
8848 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8849 (i386_dr_low_set_addr): Likewise.
8850 (i386_dr_low_get_addr): Likewise.
8851 (i386_dr_low_can_set_control): Likewise.
8852 (i386_dr_low_set_control): Likewise.
8853 (i386_dr_low_get_control): Likewise.
8854 (i386_dr_low_get_status): Likewise.
8855 (i386_get_debug_register_length): Likewise.
8856 * linux-x86-low.c (i386_dr_low_set_addr):
8857 Changed signature. Made static.
8858 (i386_dr_low_get_addr): Likewise.
8859 (i386_dr_low_set_control): Likewise.
8860 (i386_dr_low_get_control): Likewise.
8861 (i386_dr_low_get_status): Likewise.
8862 (i386_dr_low): New global variable.
8863 * win32-i386-low.c (i386_dr_low_set_addr):
8864 Changed signature. Made static.
8865 (i386_dr_low_get_addr): Likewise.
8866 (i386_dr_low_set_control): Likewise.
8867 (i386_dr_low_get_control): Likewise.
8868 (i386_dr_low_get_status): Likewise.
8869 (i386_dr_low): New global variable.
8871 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8873 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8874 * Makefile.in (AR, AR_FLAGS): Define.
8875 * configure: Regenerate.
8877 2014-06-19 Gary Benson <gbenson@redhat.com>
8879 * Makefile.in (i386-dregs.o): New rule.
8880 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8881 * i386-low.c (target.h): Remove include.
8882 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8883 (DR_CONTROL_SHIFT): Likewise.
8884 (DR_CONTROL_SIZE): Likewise.
8885 (DR_RW_EXECUTE): Likewise.
8886 (DR_RW_WRITE): Likewise.
8887 (DR_RW_READ): Likewise.
8888 (DR_RW_IORW): Likewise.
8889 (DR_LEN_1): Likewise.
8890 (DR_LEN_2): Likewise.
8891 (DR_LEN_4): Likewise.
8892 (DR_LEN_8): Likewise.
8893 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8894 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8895 (DR_ENABLE_SIZE): Likewise.
8896 (DR_LOCAL_SLOWDOWN): Likewise.
8897 (DR_GLOBAL_SLOWDOWN): Likewise.
8898 (DR_CONTROL_RESERVED): Likewise.
8899 (I386_DR_CONTROL_MASK): Likewise.
8900 (I386_DR_VACANT): Likewise.
8901 (I386_DR_LOCAL_ENABLE): Likewise.
8902 (I386_DR_GLOBAL_ENABLE): Likewise.
8903 (I386_DR_DISABLE): Likewise.
8904 (I386_DR_SET_RW_LEN): Likewise.
8905 (I386_DR_GET_RW_LEN): Likewise.
8906 (I386_DR_WATCH_HIT): Likewise.
8907 (i386_wp_op_t): Likewise.
8908 (i386_show_dr): Likewise.
8909 (i386_length_and_rw_bits): Likewise.
8910 (i386_insert_aligned_watchpoint): Likewise.
8911 (i386_remove_aligned_watchpoint): Likewise.
8912 (i386_handle_nonaligned_watchpoint): Likewise.
8913 i386_update_inferior_debug_regs(): Likewise.
8914 (i386_dr_insert_watchpoint): Likewise.
8915 (i386_dr_remove_watchpoint): Likewise.
8916 (i386_dr_region_ok_for_watchpoint): Likewise.
8917 (i386_dr_stopped_data_address): Likewise.
8918 (i386_dr_stopped_by_watchpoint): Likewise.
8920 2014-06-19 Gary Benson <gbenson@redhat.com>
8922 * i386-low.c (i386_dr_show): Renamed to
8923 i386_show_dr and made static. All uses updated.
8924 (i386_dr_length_and_rw_bits): Renamed to
8925 i386_length_and_rw_bits and made static.
8927 (i386_dr_insert_aligned_watchpoint): Renamed to
8928 i386_insert_aligned_watchpoint and made static.
8930 (i386_dr_remove_aligned_watchpoint): Renamed to
8931 i386_remove_aligned_watchpoint and made static.
8933 (i386_dr_update_inferior_debug_regs): Renamed to
8934 i386_update_inferior_debug_regs and made static.
8937 2014-06-18 Gary Benson <gbenson@redhat.com>
8939 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8940 (i386_dr_low_can_set_control): Likewise.
8941 (i386_get_debug_register_length): Likewise.
8942 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8943 (i386_dr_low_can_set_control): Likewise.
8944 (i386_get_debug_register_length): Likewise.
8946 2014-06-17 Gary Benson <gbenson@redhat.com>
8948 * i386-low.h (i386-dregs.h): New include.
8949 (DR_FIRSTADDR): Now in i386-dregs.h.
8950 (DR_LASTADDR): Likewise.
8951 (DR_NADDR): Likewise.
8952 (DR_STATUS): Likewise.
8953 (DR_CONTROL): Likewise.
8954 (i386_debug_reg_state): Likewise.
8955 (i386_dr_insert_watchpoint): Likewise.
8956 (i386_dr_remove_watchpoint): Likewise.
8957 (i386_dr_region_ok_for_watchpoint): Likewise.
8958 (i386_dr_stopped_data_address): Likewise.
8959 (i386_dr_stopped_by_watchpoint): Likewise.
8960 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8962 2014-06-18 Gary Benson <gbenson@redhat.com>
8964 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8965 i386_dr_insert_watchpoint.
8966 (i386_low_remove_watchpoint): Renamed to
8967 i386_dr_remove_watchpoint.
8968 (i386_low_region_ok_for_watchpoint): Renamed to
8969 i386_dr_region_ok_for_watchpoint.
8970 (i386_low_stopped_data_address): Renamed to
8971 i386_dr_stopped_data_address.
8972 (i386_low_stopped_by_watchpoint): Renamed to
8973 i386_dr_stopped_by_watchpoint.
8974 * i386-low.c (i386_show_dr): Renamed to
8975 i386_dr_show and made nonstatic. All uses updated.
8976 (i386_length_and_rw_bits): Renamed to
8977 i386_dr_length_and_rw_bits and made nonstatic.
8979 (i386_insert_aligned_watchpoint): Renamed to
8980 i386_dr_insert_aligned_watchpoint and made nonstatic.
8982 (i386_remove_aligned_watchpoint): Renamed to
8983 i386_dr_remove_aligned_watchpoint and made nonstatic.
8985 (i386_update_inferior_debug_regs): Renamed to
8986 i386_dr_update_inferior_debug_regs and made nonstatic.
8988 (i386_low_insert_watchpoint): Renamed to
8989 i386_dr_insert_watchpoint. All uses updated.
8990 (i386_low_remove_watchpoint): Renamed to
8991 i386_dr_remove_watchpoint. All uses updated.
8992 (i386_low_region_ok_for_watchpoint): Renamed to
8993 i386_dr_region_ok_for_watchpoint. All uses updated.
8994 (i386_low_stopped_data_address): Renamed to
8995 i386_dr_stopped_data_address. All uses updated.
8996 (i386_low_stopped_by_watchpoint): Renamed to
8997 i386_dr_stopped_by_watchpoint. All uses updated.
8999 2014-06-18 Gary Benson <gbenson@redhat.com>
9001 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9002 (i386_dr_low_can_set_control): Likewise.
9003 (i386_insert_aligned_watchpoint): New check.
9005 2014-06-18 Gary Benson <gbenson@redhat.com>
9007 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9010 2014-06-18 Gary Benson <gbenson@redhat.com>
9012 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9013 instead of fatal and error.
9014 (i386_handle_nonaligned_watchpoint): Likewise.
9016 2014-06-18 Gary Benson <gbenson@redhat.com>
9018 * i386-low.c (i386_get_debug_register_length): New macro.
9019 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9020 (i386_show_dr): Use debug_printf instead of fprintf. Use
9021 phex to format values.
9023 2014-06-18 Gary Benson <gbenson@redhat.com>
9025 * i386-low.h: Comment changes.
9026 * i386-low.c: Likewise.
9028 2014-06-18 Gary Benson <gbenson@redhat.com>
9030 * i386-low.c: Whitespace changes.
9032 2014-06-12 Tom Tromey <tromey@redhat.com>
9034 * utils.c (freeargv): Remove.
9036 2014-06-12 Tom Tromey <tromey@redhat.com>
9038 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9039 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9040 (parse_debug_format_options): Likewise.
9041 (gdbserver_usage): Likewise.
9042 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9043 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9044 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9046 ($(LIBGNU)): Depend on libiberty.
9047 (all-lib): Recurse into all subdirs.
9048 (install-only): Invoke "install" target in subdirs.
9049 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9051 * configure: Rebuild.
9052 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9053 for vasprintf, vsnprintf, or gettimeofday.
9054 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9057 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9059 * development.sh: Delete.
9060 * Makefile.in (config.status): Adjust dependency on development.sh.
9061 * configure.ac: Adjust development.sh source call.
9062 * configure: Regenerate.
9064 2014-06-02 Pedro Alves <palves@redhat.com>
9066 * ax.c (gdb_free_agent_expr): New function.
9067 * ax.h (gdb_free_agent_expr): New declaration.
9068 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9070 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9072 (clear_breakpoint_conditions_and_commands): New function.
9073 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9074 (clear_breakpoint_conditions_and_commands): New declaration.
9076 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9078 * linux-aarch64-low.c (asm/ptrace.h): Include.
9080 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9082 Fix TLS access for -static -pthread.
9083 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9084 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9085 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9087 2014-05-20 Pedro Alves <palves@redhat.com>
9089 * linux-aarch64-low.c (aarch64_insert_point)
9090 (aarch64_remove_point): No longer check whether the type is
9091 supported here. Adjust to new interface.
9092 (the_low_target): Install aarch64_supports_z_point_type as
9093 supports_z_point_type method.
9094 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9095 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9096 instead of a Z packet char. Adjust.
9097 (arm_supports_z_point_type): New function.
9098 (arm_insert_point, arm_remove_point): Adjust to new interface.
9099 (the_low_target): Install arm_supports_z_point_type.
9100 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9101 (cris_insert_point, cris_remove_point): Adjust to new interface.
9102 Don't check whether the type is supported here.
9103 (the_low_target): Install cris_supports_z_point_type.
9104 * linux-low.c (linux_supports_z_point_type): New function.
9105 (linux_insert_point, linux_remove_point): Adjust to new interface.
9106 * linux-low.h (struct linux_target_ops) <insert_point,
9107 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9108 raw_breakpoint pointer parameter.
9109 <supports_z_point_type>: New method.
9110 * linux-mips-low.c (mips_supports_z_point_type): New function.
9111 (mips_insert_point, mips_remove_point): Adjust to new interface.
9112 Use mips_supports_z_point_type.
9113 (the_low_target): Install mips_supports_z_point_type.
9114 * linux-ppc-low.c (the_low_target): Install NULL as
9115 supports_z_point_type method.
9116 * linux-s390-low.c (the_low_target): Install NULL as
9117 supports_z_point_type method.
9118 * linux-sparc-low.c (the_low_target): Install NULL as
9119 supports_z_point_type method.
9120 * linux-x86-low.c (x86_supports_z_point_type): New function.
9121 (x86_insert_point): Adjust to new insert_point interface. Use
9122 insert_memory_breakpoint. Adjust to new
9123 i386_low_insert_watchpoint interface.
9124 (x86_remove_point): Adjust to remove_point interface. Use
9125 remove_memory_breakpoint. Adjust to new
9126 i386_low_remove_watchpoint interface.
9127 (the_low_target): Install x86_supports_z_point_type.
9128 * lynx-low.c (lynx_target_ops): Install NULL as
9129 supports_z_point_type callback.
9130 * nto-low.c (nto_supports_z_point_type): New.
9131 (nto_insert_point, nto_remove_point): Adjust to new interface.
9132 (nto_target_ops): Install nto_supports_z_point_type.
9133 * mem-break.c: Adjust intro comment.
9134 (struct raw_breakpoint) <raw_type, size>: New fields.
9135 <inserted>: Update comment.
9136 <shlib_disabled>: Delete field.
9137 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9138 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9139 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9140 (raw_bkpt_type_to_target_hw_bp_type): New function.
9141 (find_enabled_raw_code_breakpoint_at): New function.
9142 (find_raw_breakpoint_at): New type and size parameters. Use them.
9143 (insert_memory_breakpoint): New function, based off
9144 set_raw_breakpoint_at.
9145 (remove_memory_breakpoint): New function.
9146 (set_raw_breakpoint_at): Reimplement.
9147 (set_breakpoint): New, based on set_breakpoint_at.
9148 (set_breakpoint_at): Reimplement.
9149 (delete_raw_breakpoint): Go through the_target->remove_point
9150 instead of assuming memory breakpoints.
9151 (find_gdb_breakpoint_at): Delete.
9152 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9153 (find_gdb_breakpoint): New function.
9154 (set_gdb_breakpoint_at): Delete.
9155 (z_type_supported): New function.
9156 (set_gdb_breakpoint_1): New function, loosely based off
9157 set_gdb_breakpoint_at.
9158 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9159 (delete_gdb_breakpoint_at): Delete.
9160 (delete_gdb_breakpoint_1): New function, loosely based off
9161 delete_gdb_breakpoint_at.
9162 (delete_gdb_breakpoint): New function.
9163 (clear_gdb_breakpoint_conditions): Rename to ...
9164 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9166 (add_condition_to_breakpoint): Make static.
9167 (add_breakpoint_condition): Take a struct breakpoint pointer
9168 instead of an address. Adjust.
9169 (gdb_condition_true_at_breakpoint): Rename to ...
9170 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9172 (gdb_condition_true_at_breakpoint): Reimplement.
9173 (add_breakpoint_commands): Take a struct breakpoint pointer
9174 instead of an address. Adjust.
9175 (gdb_no_commands_at_breakpoint): Rename to ...
9176 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9177 parameter. Return true if no breakpoint was found. Change debug
9179 (gdb_no_commands_at_breakpoint): Reimplement.
9180 (run_breakpoint_commands): Rename to ...
9181 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9182 and change return type to boolean.
9183 (run_breakpoint_commands): New function.
9184 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9185 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9186 breakpoint. Go through the_target->remove_point instead of
9187 assuming memory breakpoint.
9188 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9189 software and hardware breakpoints.
9190 (reinsert_raw_breakpoint): Go through the_target->insert_point
9191 instead of assuming memory breakpoint.
9192 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9193 software and hardware breakpoints.
9194 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9195 Check both software and hardware breakpoints.
9196 (validate_inserted_breakpoint): Assert the breakpoint is a
9197 software breakpoint. Set the inserted flag to -1 instead of
9198 setting shlib_disabled.
9199 (delete_disabled_breakpoints): Adjust.
9200 (validate_breakpoints): Only validate software breakpoints.
9201 Adjust to inserted flag change.
9202 (check_mem_read, check_mem_write): Skip breakpoint types other
9203 than software breakpoints. Adjust to inserted flag change.
9204 * mem-break.h (enum raw_bkpt_type): New enum.
9205 (raw_breakpoint, struct process_info): Forward declare.
9206 (Z_packet_to_target_hw_bp_type): Delete declaration.
9207 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9208 (set_gdb_breakpoint, delete_gdb_breakpoint)
9209 (clear_breakpoint_conditions): New declarations.
9210 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9211 (breakpoint_inserted_here): Update comment.
9212 (add_breakpoint_condition, add_breakpoint_commands): Replace
9213 address parameter with a breakpoint pointer parameter.
9214 (gdb_breakpoint_here): Update comment.
9215 (delete_gdb_breakpoint_at): Delete.
9216 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9217 * server.c (process_point_options): Take a struct breakpoint
9218 pointer instead of an address. Adjust.
9219 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9220 delete_gdb_breakpoint.
9221 * spu-low.c (spu_target_ops): Install NULL as
9222 supports_z_point_type method.
9223 * target.h: Include mem-break.h.
9224 (struct target_ops) <prepare_to_access_memory>: Update comment.
9225 <supports_z_point_type>: New field.
9226 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9227 instead of a char. Also take a raw breakpoint pointer.
9228 * win32-arm-low.c (the_low_target): Install NULL as
9229 supports_z_point_type.
9230 * win32-i386-low.c (i386_supports_z_point_type): New function.
9231 (i386_insert_point, i386_remove_point): Adjust to new interface.
9232 (the_low_target): Install i386_supports_z_point_type.
9233 * win32-low.c (win32_supports_z_point_type): New function.
9234 (win32_insert_point, win32_remove_point): Adjust to new interface.
9235 (win32_target_ops): Install win32_supports_z_point_type.
9236 * win32-low.h (struct win32_target_ops):
9237 <supports_z_point_type>: New method.
9238 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9239 instead of a char. Also take a raw breakpoint pointer.
9241 2014-05-20 Pedro Alves <palves@redhat.com>
9243 * mem-break.h: Include break-common.h.
9244 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9245 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9246 (Z_packet_to_target_hw_bp_type): New declaration.
9247 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9248 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9249 (Z_PACKET_ACCESS_WP): Delete macros.
9250 (Z_packet_to_hw_type): Delete function.
9251 * i386-low.h: Don't include break-common.h here.
9252 (Z_packet_to_hw_type): Delete declaration.
9253 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9254 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9255 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9256 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9257 * linux-aarch64-low.c: Don't include break-common.h here.
9258 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9259 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9260 (Z_packet_to_target_hw_bp_type): Delete function.
9261 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9263 (mips_insert_point, mips_remove_point): Use
9264 Z_packet_to_target_hw_bp_type.
9266 2014-05-20 Pedro Alves <palves@redhat.com>
9268 * linux-aarch64-low.c: Include break-common.h.
9269 (enum target_point_type): Delete.
9270 (Z_packet_to_point_type): Rename to ...
9271 (Z_packet_to_target_hw_bp_type): ... this, and return a
9272 target_hw_bp_type instead.
9273 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9274 instead of an enum target_point_type.
9275 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9277 (aarch64_dr_state_insert_one_point)
9278 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9279 (aarch64_handle_aligned_watchpoint)
9280 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9281 Take an enum target_hw_bp_type instead of an enum
9283 (aarch64_supports_z_point_type): New function.
9284 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9285 use Z_packet_to_target_hw_bp_type.
9287 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9289 * configure.ac: Only use -Werror by default when DEVELOPMENT
9291 * configure: Regenerate.
9293 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9295 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9296 * linux-x86-low.c (X86_64_USER_REGS): New.
9297 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9299 2014-04-28 Yao Qi <yao@codesourcery.com>
9301 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9304 2014-04-25 Pedro Alves <palves@redhat.com>
9307 * linux-low.c (linux_attach_fail_reason_string): New function.
9308 (linux_attach_lwp): Delete.
9309 (linux_attach_lwp_1): Rename to ...
9310 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9311 argument. Remove "initial" parameter. Return int instead of
9312 void. Don't error or warn here.
9313 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9314 failure to attach to the tgid. Call warning when failing to
9316 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9317 argument. Remove "initial" parameter. Return int instead of
9318 void. Don't error or warn here.
9319 (linux_attach_fail_reason_string): New declaration.
9320 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9321 interface change. Use linux_attach_fail_reason_string.
9323 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9324 Walfred Tedeschi <walfred.tedeschi@intel.com>
9326 * Makefile.in: Added rules to handle new files
9327 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9328 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9329 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9330 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9331 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9332 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9334 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9335 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9336 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9337 i386/x32-avx512.xml.
9338 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9339 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9340 i386/x32-avx512-linux.xml.
9341 * i387-fp.c (num_avx512_k_registers): New constant for number
9343 (num_avx512_zmmh_low_registers): New constant for number of
9344 lower ZMM registers (0-15).
9345 (num_avx512_zmmh_high_registers): New constant for number of
9346 higher ZMM registers (16-31).
9347 (num_avx512_ymmh_registers): New contant for number of higher
9348 YMM registers (ymm16-31 added by avx521 on x86_64).
9349 (num_avx512_xmm_registers): New constant for number of higher
9350 XMM registers (xmm16-31 added by AVX512 on x86_64).
9351 (struct i387_xsave): Add space for AVX512 registers.
9352 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9353 Add code to handle AVX512 registers.
9354 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9355 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9356 prototypei from generated file.
9357 (tdesc_amd64_avx512_linux): Likewise.
9358 (init_registers_x32_avx512_linux): Likewise.
9359 (tdesc_x32_avx512_linux): Likewise.
9360 (init_registers_i386_avx512_linux): Likewise.
9361 (tdesc_i386_avx512_linux): Likewise.
9362 (x86_64_regmap): Add AVX512 registers.
9363 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9365 (initialize_low_arch): Add code to initialize AVX512 registers.
9367 2014-04-23 Pedro Alves <palves@redhat.com>
9369 * mem-break.c (find_gdb_breakpoint_at): Make static.
9370 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9372 2014-04-23 Pedro Alves <palves@redhat.com>
9374 * i386-low.c: Don't include break-common.h here.
9375 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9376 prototype to take target_hw_bp_type as argument instead of a Z
9378 * i386-low.h: Include break-common.h here.
9379 (Z_packet_to_hw_type): Declare.
9380 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9382 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9383 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9384 (x86_remove_point): Convert the packet number to a
9385 target_hw_bp_type before calling i386_low_remove_watchpoint.
9386 * win32-i386-low.c (i386_insert_point): Convert the packet number
9387 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9388 (i386_remove_point): Convert the packet number to a
9389 target_hw_bp_type before calling i386_low_remove_watchpoint.
9391 2014-04-23 Pedro Alves <palves@redhat.com>
9393 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9395 2014-04-10 Pedro Alves <palves@redhat.com>
9397 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9398 Check if the condition or command is NULL before checking if the
9399 breakpoint is known. On success, return true.
9400 * mem-break.h (add_breakpoint_condition): Document return.
9401 (add_breakpoint_commands): Add describing comment.
9402 * server.c (skip_to_semicolon): New function.
9403 (process_point_options): Use it.
9405 2014-04-09 Pedro Alves <palves@redhat.com>
9407 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9410 2014-02-27 Pedro Alves <palves@redhat.com>
9413 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9415 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9417 (last_thread_of_process_p): Take a PID argument instead of a
9419 (linux_wait_for_lwp): Delete.
9420 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9422 (linux_low_filter_event): New function, party factored out from
9423 linux_wait_for_event.
9424 (linux_wait_for_event): Rename to ...
9425 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9426 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9427 sigsuspend. Check for zombie leaders.
9428 (linux_wait_for_event): Reimplement as wrapper around
9429 linux_wait_for_event_filtered.
9430 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9431 a normal or signal exit is seen, it's the whole process exiting.
9432 (wait_for_sigstop): No longer a for_each_inferior callback.
9433 Rewrite on top of linux_wait_for_event_filtered.
9434 (stop_all_lwps): Call wait_for_sigstop directly.
9435 * server.c (resume, handle_target_event): Handle
9436 TARGET_WAITKIND_NO_RESUMED.
9438 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9440 * win32-low.c (psapi_get_dll_name,
9441 * win32_CreateToolhelp32Snapshot): Delete.
9442 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9443 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9445 (handle_load_dll): Add function description.
9446 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9448 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9450 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9452 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9453 base address when calling win32_add_one_solib.
9454 (handle_load_dll): Delete local variable load_addr.
9455 Remove 0x1000 offset applied to DLL base address when calling
9456 win32_add_one_solib.
9457 (handle_unload_dll): Add comment.
9459 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9461 * win32-low.c (win32_add_all_dlls): Renames
9462 win32_ensure_ntdll_loaded. Rewrite function documentation.
9463 Adjust implementation to always load all DLLs.
9464 Add 0x1000 offset to DLL base address when calling
9465 win32_add_one_solib.
9466 (child_initialization_done): New static global.
9467 (do_initial_child_stuff): Set child_initialization_done to
9468 zero during child initialization, and 1 after. Replace call
9469 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9471 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9472 (handle_unload_dll): Add function documentation.
9473 (get_child_debug_event): Ignore load and unload DLL events
9474 during child initialization.
9476 2014-02-20 Doug Evans <dje@google.com>
9478 Remove global all_lwps.
9479 * inferiors.h (ptid_of): Move here from linux-low.h.
9480 (pid_of, lwpid_of): Ditto.
9481 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9482 parameter is a struct thread_info * now.
9483 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9484 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9485 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9487 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9488 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9489 * linux-arm-low.c (update_registers_callback): Update, "entry"
9490 parameter is a struct thread_info * now.
9491 Fetch lwpid from current_inferior directly.
9492 (arm_insert_point): Pass &all_threads to find_inferior instead of
9494 (arm_remove_point): Ditto.
9495 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9496 (arm_prepare_to_resume): Fetch pid from thread.
9497 (arm_read_description): Fetch lwpid from current_inferior directly.
9498 * linux-low.c (all_lwps): Delete.
9499 (delete_lwp): Delete call to remove_inferior.
9500 (handle_extended_wait): Fetch lwpid from thread.
9501 (add_lwp): Don't set lwp->entry.id. Remove call to
9502 add_inferior_to_list.
9503 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9504 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9505 (kill_one_lwp_callback): Ditto.
9506 (linux_kill): Don't dereference NULL pointer.
9507 Fetch ptid,lwpid from thread.
9508 (get_detach_signal): Fetch ptid from thread.
9509 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9510 Simplify call to regcache_invalidate_thread.
9511 (delete_lwp_callback): Update, "entry" parameter is a
9512 struct thread_info * now. Fetch pid from thread.
9513 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9514 (status_pending_p_callback): Update, "entry" parameter is a
9515 struct thread_info * now. Fetch ptid from thread.
9516 (find_lwp_pid): Update, "entry" parameter is a
9517 struct thread_info * now.
9518 (linux_wait_for_lwp): Fetch pid from thread.
9519 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9520 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9521 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9522 (dequeue_one_deferred_signal): Ditto.
9523 (cancel_breakpoint): Fetch ptid from current_inferior.
9524 (linux_wait_for_event): Pass &all_threads to find_inferior,
9525 not &all_lwps. Fetch ptid, lwpid from thread.
9526 (count_events_callback): Update, "entry" parameter is a
9527 struct thread_info * now.
9528 (select_singlestep_lwp_callback): Ditto.
9529 (select_event_lwp_callback): Ditto.
9530 (cancel_breakpoints_callback): Ditto.
9531 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9533 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9534 (unsuspend_one_lwp): Update, "entry" parameter is a
9535 struct thread_info * now.
9536 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9538 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9539 Fetch lwpid from thread, not lwp.
9540 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9541 Pass &all_threads to find_inferior, not &all_lwps.
9542 (send_sigstop): Fetch lwpid from thread, not lwp.
9543 (send_sigstop_callback): Update, "entry" parameter is a
9544 struct thread_info * now.
9545 (suspend_and_send_sigstop_callback): Ditto.
9546 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9547 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9548 struct thread_info * now.
9549 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9551 (lwp_running): Update, "entry" parameter is a
9552 struct thread_info * now.
9553 (stop_all_lwps): Fetch ptid from thread.
9554 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9555 (linux_resume_one_lwp): Fetch lwpid from thread.
9556 (linux_set_resume_request): Update, "entry" parameter is a
9557 struct thread_info * now. Fetch pid, lwpid from thread.
9558 (resume_status_pending_p): Update, "entry" parameter is a
9559 struct thread_info * now.
9560 (need_step_over_p): Ditto. Fetch lwpid from thread.
9561 (start_step_over): Fetch lwpid from thread.
9562 (linux_resume_one_thread): Update, "entry" parameter is a
9563 struct thread_info * now. Fetch lwpid from thread.
9564 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9565 (proceed_one_lwp): Update, "entry" parameter is a
9566 struct thread_info * now. Fetch lwpid from thread.
9567 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9568 struct thread_info * now.
9569 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9570 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9571 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9573 (regsets_store_inferior_registers): Ditto.
9574 (fetch_register, store_register): Ditto.
9575 (linux_read_memory, linux_write_memory): Ditto.
9576 (linux_request_interrupt): Ditto.
9577 (linux_read_auxv): Ditto.
9578 (linux_xfer_siginfo): Ditto.
9579 (linux_qxfer_spu): Ditto.
9580 (linux_qxfer_libraries_svr4): Ditto.
9581 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9582 moved to inferiors.h.
9584 (get_thread_lwp): Update.
9585 (struct lwp_info): Delete member "entry". Simplify comment for
9588 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9589 current_inferior directly.
9590 (update_watch_registers_callback): Update, "entry" parameter is a
9591 struct thread_info * now. Fetch pid from thread.
9592 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9593 (mips_insert_point): Fetch lwpid from current_inferior.
9594 Pass &all_threads to find_inferior, not &all_lwps.
9595 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9596 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9598 (mips_stopped_data_address): Ditto.
9599 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9601 * linux-tile-low.c (tile_arch_setup): Ditto.
9602 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9603 (update_debug_registers_callback): Update, "entry" parameter is a
9604 struct thread_info * now. Fetch pid from thread.
9605 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9606 Pass &all_threads to find_inferior, not &all_lwps.
9607 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9608 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9609 Pass &all_threads to find_inferior, not &all_lwps.
9610 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9611 (i386_dr_low_get_status): Ditto.
9612 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9613 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9614 (x86_linux_read_description): Ditto.
9615 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9617 2014-02-20 Doug Evans <dje@google.com>
9619 * inferiors.c (get_first_inferior): Fix buglet.
9621 2014-02-19 Doug Evans <dje@google.com>
9623 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9624 * inferiors.c (add_thread): Change result type to struct thread_info *.
9625 All callers updated.
9626 (add_lwp): Call add_thread here instead of in callers.
9627 All callers updated.
9628 * linux-low.h (get_lwp_thread): Rewrite.
9629 (struct lwp_info): New member "thread".
9631 2014-02-19 Doug Evans <dje@google.com>
9633 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9634 All callers updated.
9636 2014-02-19 Doug Evans <dje@google.com>
9638 * inferiors.c (add_thread): Fix whitespace.
9640 2014-02-19 Doug Evans <dje@google.com>
9642 * dll.c (clear_dlls): Replace accessing list implemention details
9644 * gdbthread.h (get_first_thread): Declare.
9645 * inferiors.c (for_each_inferior_with_data): New function.
9646 (get_first_thread): New function.
9647 (find_thread_ptid): Simplify.
9648 (get_first_inferior): New function.
9649 (clear_list): Delete.
9650 (one_inferior_p): New function.
9651 (clear_inferior_list): New function.
9652 (clear_inferiors): Update.
9653 * inferiors.h (for_each_inferior_with_data): Declare.
9654 (clear_inferior_list): Declare.
9655 (one_inferior_p): Declare.
9656 (get_first_inferior): Declare.
9657 * linux-low.c (linux_wait_for_event): Replace accessing list
9658 implemention details with API function.
9659 * server.c (target_running): Ditto.
9660 (accumulate_file_name_length): New function.
9661 (emit_dll_description): New function.
9662 (handle_qxfer_libraries): Replace accessing list implemention
9663 details with API function.
9664 (handle_qxfer_threads_worker): New function.
9665 (handle_qxfer_threads_proper): Replace accessing list implemention
9666 details with API function.
9667 (handle_query): Ditto.
9668 (visit_actioned_threads_callback_ftype): New typedef.
9669 (visit_actioned_threads_data): New struct.
9670 (visit_actioned_threads): Rewrite to be find_inferior callback.
9671 (resume): Call find_inferior.
9672 (handle_status): Replace accessing list implemention
9673 details with API function.
9674 (process_serial_event): Replace accessing list implemention details
9676 * target.c (set_desired_inferior): Replace accessing list implemention
9677 details with API function.
9678 * tracepoint.c (same_process_p): New function.
9679 (gdb_agent_about_to_close): Replace accessing list implemention
9680 details with API function.
9681 * win32-low.c (child_delete_thread): Replace accessing list
9682 implemention details with API function.
9683 (match_dll_by_basename): New function.
9684 (dll_is_loaded_by_basename): New function.
9685 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9686 details call to dll_is_loaded_by_basename.
9688 2014-02-19 Doug Evans <dje@google.com>
9690 * dll.h (struct dll_info): Add comment.
9691 * gdbthread.h (struct thread_info): Add comment.
9692 (current_ptid): Simplify.
9693 * inferiors.c (add_process): Update.
9694 (remove_process): Update.
9695 * inferiors.h (struct process_info): Rename member "head" to "entry".
9696 * linux-low.c (delete_lwp): Update.
9698 (last_thread_of_process_p): Update.
9699 (kill_one_lwp_callback, linux_kill): Update.
9700 (status_pending_p_callback): Update.
9701 (wait_for_sigstop): Update. Simplify read of ptid.
9702 (start_step_over): Update.
9703 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9704 (get_lwp_thread): Update.
9705 (struct lwp_info): Rename member "head" to "entry".
9706 * regcache.h (inferior_list_entry): Delete.
9707 * server.c (kill_inferior_callback): Update.
9708 (detach_or_kill_inferior_callback): Update.
9709 (print_started_pid): Update.
9710 (print_attached_pid): Update.
9711 (process_serial_event): Simplify read of ptid.
9712 * thread-db.c (thread_db_create_event): Update.
9713 (thread_db_get_tls_address): Update.
9714 * win32-low.c (current_inferior_ptid): Simplify.
9716 2014-02-19 Tom Tromey <tromey@redhat.com>
9718 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9720 (target_supports_btrace): Update.
9722 2014-02-14 Yao Qi <yao@codesourcery.com>
9724 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9725 (rsp-low-ipa.o): New target.
9727 2014-02-12 Tom Tromey <tromey@redhat.com>
9729 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9730 convert_ascii_to_int.
9731 * regcache.c (registers_to_string): Likewise.
9732 * remote-utils.c (decode_M_packet): Likewise.
9733 * server.c (process_serial_event): Likewise.
9735 2014-02-12 Tom Tromey <tromey@redhat.com>
9737 * server.c (handle_query, handle_v_run): Use hex2bin, not
9739 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9741 2014-02-12 Tom Tromey <tromey@redhat.com>
9743 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9744 convert_int_to_ascii.
9745 * regcache.c (registers_to_string, collect_register_as_string):
9747 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9749 * server.c (process_serial_event): Likewise.
9750 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9751 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9753 2014-02-12 Tom Tromey <tromey@redhat.com>
9755 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9756 bin2hex, not hexify.
9757 * tracepoint.c (cmd_qtstatus): Likewise.
9759 2014-02-12 Tom Tromey <tromey@redhat.com>
9761 * remote-utils.c (monitor_output): Pass explicit length to
9764 2014-02-12 Tom Tromey <tromey@redhat.com>
9766 * tracepoint.c: Include rsp-low.h.
9767 * server.c: Include rsp-low.h.
9768 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9769 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9771 * remote-utils.c: Include rsp-low.h.
9772 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9773 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9774 (convert_int_to_ascii, convert_ascii_to_int): Move to
9776 * regcache.c: Include rsp-low.h.
9777 * ax.c: Include rsp-low.h.
9778 * Makefile.in (SFILES): Add common/rsp-low.c.
9779 (OBS): Add rsp-low.o.
9780 (rsp-low.o): New target.
9782 2014-02-12 Tom Tromey <tromey@redhat.com>
9784 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9785 Include print-utils.h.
9786 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9787 (plongest, thirty_two, phex_nz): Remove.
9788 * Makefile.in (SFILES): Add common/print-utils.c.
9789 (OBS): Add print-utils.o.
9790 (print-utils-ipa.o): New target.
9791 (print-utils.o): New target.
9792 (IPA_OBJS): Add print-utils-ipa.o.
9794 2014-02-06 Tom Tromey <tromey@redhat.com>
9796 * Makefile.in (SFILES): Fix indentation.
9798 2014-02-05 Doug Evans <dje@google.com>
9800 * linux-low.c (linux_wait_for_event): Improve comment.
9801 (linux_wait_1): Keep current_inferior in sync with event_child.
9803 2014-01-22 Doug Evans <dje@google.com>
9805 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9807 2014-01-22 Doug Evans <dje@google.com>
9809 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9810 * configure: Regenerate.
9811 * config.in: Regenerate.
9812 * Makefile.in (SFILES): Add debug.c.
9814 * debug.c: New file.
9815 * debug.h: New file.
9816 * linux-aarch64-low.c (*): Update all debugging printfs to use
9817 debug_printf instead of fprintf.
9818 * linux-arm-low.c (*): Ditto.
9819 * linux-cris-low.c (*): Ditto.
9820 * linux-crisv32-low.c (*): Ditto.
9821 * linux-m32r-low.c (*): Ditto.
9822 * linux-sparc-low.c (*): Ditto.
9823 * linux-x86.c (*): Ditto.
9824 * linux-low.c (*): Ditto.
9825 (linux_wait_1): Add calls to debug_enter, debug_exit.
9826 (linux_wait): Remove redundant debugging printf.
9827 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9828 (linux_resume, unstop_all_lwps): Ditto.
9829 * mem-break.c (*): Update all debugging printfs to use
9830 debug_printf instead of fprintf.
9831 * remote-utils.c (*): Ditto.
9832 * thread-db.c (*): Ditto.
9833 * server.c #include <ctype.h>, "gdb_vecs.h".
9834 (debug_threads): Moved to debug.c.
9835 (*): Update all debugging printfs to use debug_printf instead of
9837 (start_inferior): Replace call to fflush with call to debug_flush.
9838 (monitor_show_help): Mention set debug-format.
9839 (parse_debug_format_options): New function.
9840 (handle_monitor_command): Handle "monitor set debug-format".
9841 (gdbserver_usage): Mention --debug-format.
9842 (main): Parse --debug-format.
9843 * server.h (debug_threads): Declaration moved to debug.h.
9845 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9846 trace_debug_1 that uses debug_printf.
9847 (tracepoint_look_up_symbols): Update all debugging printfs to use
9848 debug_printf instead of fprintf.
9850 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9852 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9855 2014-01-17 Pedro Alves <palves@redhat.com>
9858 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9859 defined after including gdb_proc_service.h.
9861 2014-01-16 Doug Evans <dje@google.com>
9863 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9864 (match_dll): Use it.
9866 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9868 * target.h (target_ops) <read_btrace>: Change parameters and
9869 return type to allow error reporting.
9870 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9871 trace reading errors on.
9872 * linux-low.c (linux_low_read_btrace): Pass trace reading
9874 (linux_low_disable_btrace): New.
9876 2014-01-15 Doug Evans <dje@google.com>
9878 * inferiors.c (thread_id_to_gdb_id): Delete.
9879 * inferiors.h (thread_id_to_gdb_id): Delete.
9881 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9883 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9884 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9887 2014-01-08 Pedro Alves <palves@redhat.com>
9889 * server.c (handle_status): Don't discard previous queued stop
9890 replies or thread's pending status here.
9891 (main) <disconnection>: Do it here instead.
9893 2014-01-08 Pedro Alves <palves@redhat.com>
9895 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9896 * server.c (visit_actioned_threads, handle_pending_status): New
9898 (handle_v_cont): Factor out parts to ...
9899 (resume): ... this new function. If in all-stop, and a thread
9900 being resumed has a pending status, report it without actually
9902 (myresume): Adjust to use the new 'resume' function.
9903 (clear_pending_status_callback, set_pending_status_callback)
9904 (find_status_pending_thread_callback): New functions.
9905 (handle_status): Handle the case of multiple threads having
9906 interesting statuses to report. Report threads' real last signal
9907 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9908 with an interesting thread to report the status for, instead of
9909 always reporting the status of the first thread.
9911 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9913 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9914 * gdbreplay.c (gdbreplay_version): Likewise.
9916 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9918 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9919 iov.iov_len with the real length in use.
9921 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9923 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9924 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9925 for all targets that use win32-low.c.
9926 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9927 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9929 2013-12-13 Pedro Alves <palves@redhat.com>
9931 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9932 if equal to TARGET_WAITKIND_LOADED.
9933 * win32-low.c (cached_status): New static global.
9934 (win32_wait): Add declaration.
9935 (do_initial_child_stuff): Flush all initial pending debug events
9936 up to the initial breakpoint.
9937 (win32_wait): If CACHED_STATUS was set, return that instead
9938 of doing a real wait. Remove the code resuming the execution
9939 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9940 during the initial phase. Also remove the code changing
9941 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9942 TARGET_WAITKIND_STOPPED.
9944 2013-12-11 Yao Qi <yao@codesourcery.com>
9946 * notif.c (handle_notif_ack): Return 0 if no notification
9949 2013-11-20 Doug Evans <dje@google.com>
9951 * linux-low.c (linux_set_resume_request): Fix comment.
9953 2013-11-20 Doug Evans <dje@google.com>
9955 * linux-low.c (resume_status_pending_p): Tweak comment.
9957 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9959 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9960 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9961 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9962 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9963 (srv_amd64_regobj): Add amd64-mpx.o.
9964 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9965 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9966 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9967 * i387-fp.c (num_pl_bnd_register) Added constant.
9968 (num_pl_bnd_cfg_registers) Added constant.
9969 (struct i387_xsave) Added reserved area and MPX fields.
9970 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9971 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9973 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9974 (init_registers_amd64_mpx_linux): Declare new function.
9975 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9976 (x86_64_regmap): Add MPX registers.
9977 (x86_linux_read_description): Add MPX case.
9978 (initialize_low_arch): Initialize MPX targets.
9980 2013-11-18 Tom Tromey <tromey@redhat.com>
9982 * configure: Rebuild.
9983 * configure.ac: Don't check for stdlib.h.
9984 * gdbreplay.c: Unconditionally include stdlib.h.
9986 2013-11-18 Tom Tromey <tromey@redhat.com>
9988 * config.in: Rebuild.
9989 * configure: Rebuild.
9990 * configure.ac: Don't use AC_HEADER_DIRENT.
9992 2013-11-18 Tom Tromey <tromey@redhat.com>
9994 * server.h: Don't check HAVE_STRING_H.
9995 * gdbreplay.c: Don't check HAVE_STRING_H.
9996 * configure: Rebuild.
9998 2013-11-18 Tom Tromey <tromey@redhat.com>
10000 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10003 2013-11-08 Tom Tromey <tromey@redhat.com>
10005 * configure, config.in: Rebuild.
10006 * configure.ac: Remove unused configury.
10008 2013-11-08 Tom Tromey <tromey@redhat.com>
10010 * acinclude.m4: Include common.m4, codeset.m4.
10011 * configure, config.in: Rebuild.
10012 * configure.ac: Use GDB_AC_COMMON.
10014 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10016 * linux-s390-low.c (HWCAP_S390_TE): New define.
10017 (s390_arch_setup): Consider the TE field in the HWCAP for
10018 determining 'have_regset_tdb'.
10020 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10023 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10026 2013-10-02 Pedro Alves <palves@redhat.com>
10028 * server.c (process_serial_event): Don't output "GDBserver
10029 exiting" if GDB is connected through stdio.
10030 * target.c (mywait): Likewise, be silent if GDB is connected
10033 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10035 * lynx-low.c (lynx_add_threads_after_attach): New function.
10036 (lynx_attach): Remove call to add_thread. Add call to
10037 lynx_add_threads_after_attach instead.
10039 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10041 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10042 * config.in, configure: Regenerated.
10044 2013-09-18 Yao Qi <yao@codesourcery.com>
10047 * server.c (start_inferior): Clear 'resume_info'.
10049 2013-09-16 Jiong Wang <jiwang@tilera.com>
10051 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10054 2013-09-16 Jiong Wang <jiwang@tilera.com>
10056 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10057 linux-tile-low.o to srv_tgtobj.
10059 2013-09-16 Will Newton <will.newton@linaro.org>
10061 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10064 2013-09-06 Pedro Alves <palves@redhat.com>
10066 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10067 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10068 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10069 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10070 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10071 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10073 2013-09-06 Pedro Alves <palves@redhat.com>
10075 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10076 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10078 2013-09-06 Pedro Alves <palves@redhat.com>
10080 * linux-amd64-ipa.c: Include tracepoint.h.
10081 * linux-i386-ipa.c: Include tracepoint.h.
10083 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10085 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10086 (ps_get_thread_area): New function.
10088 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10090 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10091 (initialize_low_arch): Call init_registers_crisv32 rather than
10092 init_register_crisv32.
10094 2013-09-05 Pedro Alves <palves@redhat.com>
10096 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10098 * hostio.h: ... this new file.
10099 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10100 win32-low.c: Include hostio.h.
10102 2013-09-05 Pedro Alves <palves@redhat.com>
10104 * server.h (gdb_client_data, handler_func, callback_handler_func)
10105 (delete_file_handler, add_file_handler, append_callback_event)
10106 (delete_callback_event, start_event_loop, initialize_event_loop):
10107 Move to event-loop.h and include it.
10108 * event-loop.h: New file.
10110 2013-09-05 Pedro Alves <palves@redhat.com>
10112 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10113 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10114 (loaded_dll, unloaded_dll): Move to ...
10115 * dll.h: ... this new file.
10116 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10118 2013-09-05 Pedro Alves <palves@redhat.com>
10120 * server.h (current_process, get_thread_process, all_processes)
10121 (add_inferior_to_list, for_each_inferior, current_inferior)
10122 (remove_inferior, add_process, remove_process, find_process_pid)
10123 (have_started_inferiors_p, have_attached_inferiors_p)
10124 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10125 (clear_inferiors, find_inferior, find_inferior_id)
10126 (inferior_target_data, set_inferior_target_data)
10127 (inferior_regcache_data, set_inferior_regcache_data): Move to
10128 inferiors.h, and include it.
10129 * inferiors.h: New file.
10131 2013-09-05 Pedro Alves <palves@redhat.com>
10133 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10137 2013-09-05 Pedro Alves <palves@redhat.com>
10139 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10141 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10142 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10143 (handle_tracepoint_general_set, handle_tracepoint_query)
10144 (tracepoint_finished_step, tracepoint_was_hit)
10145 (release_while_stepping_state_list, current_traceframe)
10146 (in_readonly_region, traceframe_read_mem)
10147 (fetch_traceframe_registers, traceframe_read_sdata)
10148 (traceframe_read_info, struct fast_tpoint_collect_status)
10149 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10150 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10151 (supply_fast_tracepoint_registers)
10152 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10153 (ipa_tdesc, claim_trampoline_space)
10154 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10155 (agent_mem_read, agent_get_trace_state_variable_value)
10156 (agent_set_trace_state_variable_value, agent_tsv_read)
10157 (agent_mem_read_string, get_raw_reg_func_addr)
10158 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10159 * tracepoint.h: ... this new file.
10161 2013-09-05 Pedro Alves <palves@redhat.com>
10163 * server.h (perror_with_name, error, fatal, warning, paddress)
10164 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10166 * utils.h: New file.
10168 2013-09-05 Pedro Alves <palves@redhat.com>
10170 * server.h (remote_debug, noack_mode, transport_is_reliable)
10171 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10172 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10173 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10174 (write_enn, initialize_async_io, enable_async_io)
10175 (disable_async_io, check_remote_input_interrupt_request)
10176 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10177 (dead_thread_notify, prepare_resume_reply)
10178 (decode_address_to_semicolon, decode_address, decode_m_packet)
10179 (decode_M_packet, decode_X_packet, decode_xfer_write)
10180 (decode_search_memory_packet, unhexify, hexify)
10181 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10182 (look_up_one_symbol, relocate_instruction)
10183 (monitor_output): Move to remote-utils.h, and include it.
10184 * remote-utils.h: New file.
10186 2013-09-05 Pedro Alves <palves@redhat.com>
10188 * server.h (_): Delete.
10190 2013-09-02 Pedro Alves <palves@redhat.com>
10192 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10193 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10195 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10197 2013-09-02 Pierre Muller <muller@sourceware.org>
10199 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10200 or WriteProcessMemory complete successfully and handle
10201 ERROR_PARTIAL_COPY error.
10203 2013-09-02 Pedro Alves <palves@redhat.com>
10205 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10206 error instead of EIO.
10208 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10211 * linux-low.c: Include filestuff.h.
10212 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10213 * lynx-low.c: Include filestuff.h.
10214 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10215 * server.c: Include filestuff.h.
10216 (main): Call notice_open_fds.
10217 * spu-low.c: Include filestuff.h.
10218 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10220 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10222 * Makefile.in: Explain why ../target and ../nat are not
10223 listed as include file search paths.
10224 (linux-waitpid.o): New object file rule.
10225 * configure.srv (srv_native_linux_obj): New variable.
10226 Replace all occurrences of linux native object files with
10227 $srv_native_linux_obj.
10228 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10229 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10230 (linux_enable_event_reporting): Remove declaration.
10231 (my_waitpid): Moved to common/linux-waitpid.c.
10232 (linux_wait_for_event): Pass ptid when calling
10233 linux_enable_event_reporting.
10234 (linux_supports_tracefork_flag): Remove.
10235 (linux_enable_event_reporting): Likewise.
10236 (linux_tracefork_grandchild): Remove.
10237 (STACK_SIZE): Moved to common/linux-ptrace.c.
10238 (linux_tracefork_child): Remove.
10239 (linux_test_for_tracefork): Remove.
10240 (linux_look_up_symbols): Call linux_supports_traceclone.
10241 (initialize_low): Remove call to linux_test_for_tracefork.
10242 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10243 common/linux-ptrace.h.
10244 (PTRACE_TYPE_ARG4): Likewise.
10245 Include linux-ptrace.h.
10247 2013-08-21 Pedro Alves <palves@redhat.com>
10249 * config.in: Renegerate.
10251 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10253 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10254 (SFILES): Remove $(srcdir)/common/target-common.c and
10255 add $(srcdir)/target/waitstatus.c.
10256 (OBS): Remove target-common.o and add waitstatus.o.
10257 (server_h): Remove $(srcdir)/../common/target-common.h and
10258 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10259 and $(srcdir)/../target/waitstatus.h.
10260 (target-common.o): Remove.
10261 (waitstatus.o): New target object file.
10262 * target.h: Do not include target-common.h and
10263 include target/resume.h, target/wait.h and
10264 target/waitstatus.h.
10266 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10268 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10269 to PTRACE_TYPE_ARG3.
10270 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10271 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10273 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10274 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10276 2013-07-27 Jie Zhang <jie@codesourcery.com>
10277 Daniel Jacobowitz <dan@codesourcery.com>
10278 Yao Qi <yao@codesourcery.com>
10280 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10281 (mips-linux-watch.o): New rule.
10282 (mips_linux_watch_h): New variable.
10283 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10285 * linux-mips-low.c: Include mips-linux-watch.h.
10286 (struct arch_process_info, struct arch_lwp_info): New.
10287 (update_watch_registers_callback): New function.
10288 (mips_linux_new_process, mips_linux_new_thread) New functions.
10289 (mips_linux_prepare_to_resume, mips_insert_point): New
10291 (mips_remove_point, mips_stopped_by_watchpoint): New
10293 (rsp_bp_type_to_target_hw_bp_type): New function.
10294 (mips_stopped_data_address): New function.
10295 (the_low_target): Add watchpoint support functions.
10297 2013-07-27 Yao Qi <yao@codesourcery.com>
10299 * i386-low.c: Include break-common.h.
10300 (enum target_hw_bp_type): Remove.
10302 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10304 * Makefile.in (SFILES): /common/target-common.c.
10305 (OBS): Add target-common.o.
10306 (server_h): Add $(srcdir)/../common/target-common.h.
10307 (target-common.o): New target.
10308 * server.c (queue_stop_reply_callback): Free
10309 status string after use.
10310 * target.c (target_waitstatus_to_string): Remove.
10311 * target.h: Include target-common.h.
10312 (resume_kind): Likewise.
10313 (target_waitkind): Likewise.
10314 (target_waitstatus): Likewise.
10315 (TARGET_WNOHANG): Likewise.
10317 2013-07-04 Yao Qi <yao@codesourcery.com>
10319 * Makefile.in (host_alias): Use @host_noncanonical@.
10320 (target_alias): Use @target_noncanonical@.
10321 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10322 ACX_NONCANONICAL_HOST.
10323 * configure: Regenerated.
10326 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10328 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10329 * configure: Rebuild.
10330 * Makefile.in (version_host, version_target): Get from configure.
10331 (version.c): Use $(version_host) and $(version_target).
10333 2013-07-03 Pedro Alves <palves@redhat.com>
10335 * Makefile.in (config.status): Depend on development.sh.
10336 * acinclude.m4: Include libmcheck.m4.
10337 * configure: Regenerate.
10339 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10341 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10342 attribute inside the parentheses.
10343 (winapi_DebugSetProcessKillOnExit): Ditto.
10344 (winapi_DebugBreakProcess): Ditto.
10345 (winapi_GenerateConsoleCtrlEvent): Ditto.
10347 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10349 * notif.h (notif_event): Add a dummy member to avoid compiler
10352 2013-07-01 Pedro Alves <palves@redhat.com>
10354 * hostio.c (HOSTIO_PATH_MAX): Define.
10355 (require_filename, handle_open, handle_unlink, handle_readlink):
10358 2013-07-01 Pedro Alves <palves@redhat.com>
10360 * server.h: Include "pathmax.h".
10361 * linux-low.c: Don't include sys/param.h.
10362 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10364 * win32-low.c: Don't include sys/param.h.
10365 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10367 2013-07-01 Pedro Alves <palves@redhat.com>
10369 * event-loop.c: Don't check HAVE_UNISTD_H before including
10371 * gdbreplay.c: Likewise.
10372 * remote-utils.c: Likewise.
10373 * server.c: Likewise.
10374 * configure.ac: Don't check for unistd.h.
10375 * configure: Regenerate.
10377 2013-06-28 Tom Tromey <tromey@redhat.com>
10379 * Makefile.in (version.c): Use version.in, not
10382 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10384 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10385 * configure: Rebuild.
10386 * Makefile.in (version_host, version_target): Get from configure.
10387 (version.c): Use $(version_host) and $(version_target).
10389 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10391 Fix trace-status to output user name without trailing colon.
10392 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10394 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10396 Fix trace-status to output proper start-time and stop-time.
10397 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10398 output start time and stop time in hex as gdb expects.
10400 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10402 * tracepoint.c (build_traceframe_info_xml): Output trace state
10403 variables present in the trace buffer.
10405 2013-06-24 Tom Tromey <tromey@redhat.com>
10407 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10409 (version.o): Remove.
10410 * gdbreplay.c: Include version.h.
10411 (version, host_name): Don't declare.
10412 * server.h: Include version.h.
10413 (version, host_name): Don't declare.
10415 2013-06-12 Pedro Alves <palves@redhat.com>
10417 * linux-x86-low.c (linux_is_elf64): Delete global.
10418 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10419 with local linux_pid_exe_is_elf_64_file use.
10421 2013-06-11 Pedro Alves <palves@redhat.com>
10423 * linux-low.c (regset_disabled, disable_regset): New functions.
10424 (regsets_fetch_inferior_registers)
10425 (regsets_store_inferior_registers): Use them.
10426 (initialize_regsets_info); Don't allocate the disabled_regsets
10428 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10431 2013-06-11 Pedro Alves <palves@redhat.com>
10433 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10436 2013-06-11 Pedro Alves <palves@redhat.com>
10438 * linux-x86-low.c (initialize_low_arch): Call
10439 init_registers_x32_avx_linux.
10441 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10443 Fix compatibility with Android Bionic.
10444 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10447 2013-06-07 Pedro Alves <palves@redhat.com>
10450 * Makefile.in (OBS): Add tdesc.o.
10451 (IPA_OBJS): Add tdesc-ipa.o.
10452 (tdesc-ipa.o): New rule.
10453 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10455 * linux-low.c (new_inferior): Delete.
10456 (disabled_regsets, num_regsets): Delete.
10457 (linux_add_process): Adjust to set the new per-process
10459 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10460 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10461 was a stop. When calling arch_setup, switch the current inferior
10462 to the thread that got an event.
10463 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10464 (regsets_fetch_inferior_registers)
10465 (regsets_store_inferior_registers): New regsets_info parameter.
10467 (linux_register_in_regsets): New regs_info parameter. Adjust to
10469 (register_addr, fetch_register, store_register): New usrregs_info
10470 parameter. Adjust to use it.
10471 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10472 parameter regs_info. Adjust to use it.
10473 (linux_fetch_registers): Get the current inferior's regs_info, and
10475 (linux_store_registers): Ditto.
10476 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10477 (initialize_low): Don't initialize the target_regsets here. Call
10478 initialize_low_arch.
10479 * linux-low.h (target_regsets): Delete declaration.
10480 (struct regsets_info): New.
10481 (struct usrregs_info): New.
10482 (struct regs_info): New.
10483 (struct process_info_private) <new_inferior>: New field.
10484 (struct linux_target_ops): Delete the num_regs, regmap, and
10485 regset_bitmap fields. New field regs_info.
10486 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10487 * i387-fp.c (num_xmm_registers): Delete.
10488 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10489 calls to new interface.
10490 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10491 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10492 Infer the number of xmm registers from the regcache's target
10494 * i387-fp.h (num_xmm_registers): Delete.
10495 * inferiors.c (add_thread): Don't install the thread's regcache
10497 * proc-service.c (gregset_info): Fetch the current inferior's
10498 regs_info. Adjust to use it.
10499 * regcache.c: Include tdesc.h.
10500 (register_bytes, reg_defs, num_registers)
10501 (gdbserver_expedite_regs): Delete.
10502 (get_thread_regcache): If the thread doesn't have a regcache yet,
10503 create one, instead of aborting gdbserver.
10504 (regcache_invalidate_one): Rename to ...
10505 (regcache_invalidate_thread): ... this.
10506 (regcache_invalidate_one): New.
10507 (regcache_invalidate): Only invalidate registers of the current
10509 (init_register_cache): Add target_desc parameter, and use it.
10510 (new_register_cache): Ditto. Assert the target description has a
10511 non zero registers_size.
10512 (regcache_cpy): Add assertions. Adjust.
10513 (realloc_register_cache, set_register_cache): Delete.
10514 (registers_to_string, registers_from_string): Adjust.
10515 (find_register_by_name, find_regno, find_register_by_number)
10516 (register_cache_size): Add target_desc parameter, and use it.
10517 (free_register_cache_thread, free_register_cache_thread_one)
10518 (regcache_release, register_cache_size): New.
10519 (register_size): Add target_desc parameter, and use it.
10520 (register_data, supply_register, supply_register_zeroed)
10521 (supply_regblock, supply_register_by_name, collect_register)
10522 (collect_register_as_string, collect_register_by_name): Adjust.
10523 * regcache.h (struct target_desc): Forward declare.
10524 (struct regcache) <tdesc>: New field.
10525 (init_register_cache, new_register_cache): Add target_desc
10527 (regcache_invalidate_thread): Declare.
10528 (regcache_invalidate_one): Delete declaration.
10529 (regcache_release): Declare.
10530 (find_register_by_number, register_cache_size, register_size)
10531 (find_regno): Add target_desc parameter.
10532 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10534 * remote-utils.c: Include tdesc.h.
10535 (outreg, prepare_resume_reply): Adjust.
10536 * server.c: Include tdesc.h.
10537 (gdbserver_xmltarget): Delete declaration.
10538 (get_features_xml, process_serial_event): Adjust.
10539 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10541 (struct process_info) <tdesc>: New field.
10542 (ipa_tdesc): Declare.
10543 * tdesc.c: New file.
10544 * tdesc.h: New file.
10545 * tracepoint.c: Include tdesc.h.
10546 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10547 (get_context_regcache): Adjust to pass ipa_tdesc down.
10548 (do_action_at_tracepoint): Adjust to get the register cache size
10549 from the context regcache's description.
10550 (traceframe_walk_blocks): Adjust to get the register cache size
10551 from the current trace frame's description.
10552 (traceframe_get_pc): Adjust to get current trace frame's
10553 description and pass it down.
10554 (gdb_collect): Adjust to get the register cache size from the
10556 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10557 (gdbserver_xmltarget): Delete.
10558 (initialize_low_tracepoint): Set the ipa's target description.
10559 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10560 (initialize_low_tracepoint): Set the ipa's target description.
10561 * linux-x86-low.c: Include tdesc.h.
10562 [__x86_64__] (is_64bit_tdesc): New.
10563 (ps_get_thread_area, x86_get_thread_area): Use it.
10564 (i386_cannot_store_register): Rename to ...
10565 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10566 (i386_cannot_fetch_register): Rename to ...
10567 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10568 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10570 (target_regsets): Rename to ...
10571 (x86_regsets): ... this.
10572 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10574 (x86_siginfo_fixup): Use is_64bit_tdesc.
10575 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10576 (tdesc_x32_avx_linux, tdesc_x32_linux)
10577 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10579 (x86_linux_update_xmltarget): Delete.
10580 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10581 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10582 (AMD64_LINUX_USER64_CS): New.
10583 (x86_linux_read_description): New, based on
10584 x86_linux_update_xmltarget.
10585 (same_process_callback): New.
10586 (x86_arch_setup_process_callback): New.
10587 (x86_linux_update_xmltarget): New.
10588 (x86_regsets_info): New.
10589 (amd64_linux_regs_info): New.
10590 (i386_linux_usrregs_info): New.
10591 (i386_linux_regs_info): New.
10592 (x86_linux_regs_info): New.
10593 (x86_arch_setup): Reimplement.
10594 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10595 (x86_emit_ops): Ditto.
10596 (the_low_target): Adjust. Install x86_linux_regs_info,
10597 x86_cannot_fetch_register, and x86_cannot_store_register.
10598 (initialize_low_arch): New.
10599 * linux-ia64-low.c (tdesc_ia64): Declare.
10600 (ia64_fetch_register): Adjust.
10601 (ia64_usrregs_info, regs_info): New globals.
10602 (ia64_regs_info): New function.
10603 (the_low_target): Adjust.
10604 (initialize_low_arch): New function.
10605 * linux-sparc-low.c (tdesc_sparc64): Declare.
10606 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10608 (sparc_arch_setup): New function.
10609 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10610 (the_low_target): Adjust.
10611 (initialize_low_arch): New function.
10612 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10613 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10614 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10615 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10616 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10617 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10618 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10619 (tdesc_powerpc_isa205_vsx64l): Declare.
10620 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10621 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10622 (ppc_set_pc, ppc_get_hwcap): Adjust.
10623 (ppc_usrregs_info): Forward declare.
10624 (!__powerpc64__) ppc_regmap_adjusted: New global.
10625 (ppc_arch_setup): Adjust to the current process'es target
10627 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10628 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10629 (ppc_store_evrregset): Adjust.
10630 (target_regsets): Rename to ...
10631 (ppc_regsets): ... this, and make static.
10632 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10633 (ppc_regs_info): New function.
10634 (the_low_target): Adjust.
10635 (initialize_low_arch): New function.
10636 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10637 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10638 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10639 (tdesc_s390x_linux64v2): Declare.
10640 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10641 (s390_fill_gregset, s390_store_last_break): Adjust.
10642 (target_regsets): Rename to ...
10643 (s390_regsets): ... this, and make static.
10644 (s390_get_pc, s390_set_pc): Adjust.
10645 (s390_get_hwcap): New target_desc parameter, and use it.
10646 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10647 (s390_arch_setup): Adjust to set the current process'es target
10648 description. Don't adjust the regmap.
10649 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10650 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10651 (regs_info_3264): New globals.
10652 (s390_regs_info): New function.
10653 (the_low_target): Adjust.
10654 (initialize_low_arch): New function.
10655 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10656 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10657 [__mips64] (init_registers_mips_linux)
10658 (init_registers_mips_dsp_linux): Delete defines.
10659 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10660 (have_dsp): New global.
10661 (mips_read_description): New, based on mips_arch_setup.
10662 (mips_arch_setup): Reimplement.
10663 (get_usrregs_info): New function.
10664 (mips_cannot_fetch_register, mips_cannot_store_register)
10665 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10666 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10667 (target_regsets): Rename to ...
10668 (mips_regsets): ... this, and make static.
10669 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10670 (dsp_regs_info, regs_info): New globals.
10671 (mips_regs_info): New function.
10672 (the_low_target): Adjust.
10673 (initialize_low_arch): New function.
10674 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10675 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10677 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10678 (arm_read_description): New, with bits factored from
10680 (arm_arch_setup): Reimplement.
10681 (target_regsets): Rename to ...
10682 (arm_regsets): ... this, and make static.
10683 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10684 (arm_regs_info): New function.
10685 (the_low_target): Adjust.
10686 (initialize_low_arch): New function.
10687 * linux-m68k-low.c (tdesc_m68k): Declare.
10688 (target_regsets): Rename to ...
10689 (m68k_regsets): ... this, and make static.
10690 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10691 (m68k_regs_info): New function.
10692 (m68k_arch_setup): New function.
10693 (the_low_target): Adjust.
10694 (initialize_low_arch): New function.
10695 * linux-sh-low.c (tdesc_sharch): Declare.
10696 (target_regsets): Rename to ...
10697 (sh_regsets): ... this, and make static.
10698 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10699 (sh_regs_info, sh_arch_setup): New functions.
10700 (the_low_target): Adjust.
10701 (initialize_low_arch): New function.
10702 * linux-bfin-low.c (tdesc_bfin): Declare.
10703 (bfin_arch_setup): New function.
10704 (bfin_usrregs_info, regs_info): New globals.
10705 (bfin_regs_info): New function.
10706 (the_low_target): Adjust.
10707 (initialize_low_arch): New function.
10708 * linux-cris-low.c (tdesc_cris): Declare.
10709 (cris_arch_setup): New function.
10710 (cris_usrregs_info, regs_info): New globals.
10711 (cris_regs_info): New function.
10712 (the_low_target): Adjust.
10713 (initialize_low_arch): New function.
10714 * linux-cris-low.c (tdesc_crisv32): Declare.
10715 (cris_arch_setup): New function.
10716 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10717 (cris_regs_info): New function.
10718 (the_low_target): Adjust.
10719 (initialize_low_arch): New function.
10720 * linux-m32r-low.c (tdesc_m32r): Declare.
10721 (m32r_arch_setup): New function.
10722 (m32r_usrregs_info, regs_info): New globals.
10723 (m32r_regs_info): Adjust.
10724 (initialize_low_arch): New function.
10725 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10726 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10727 (tic6x_usrregs_info): Forward declare.
10728 (tic6x_read_description): New function, based on ...
10729 (tic6x_arch_setup): ... this. Reimplement.
10730 (target_regsets): Rename to ...
10731 (tic6x_regsets): ... this, and make static.
10732 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10733 (tic6x_regs_info): New function.
10734 (the_low_target): Adjust.
10735 (initialize_low_arch): New function.
10736 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10737 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10738 (target_regsets): Rename to ...
10739 (xtensa_regsets): ... this, and make static.
10740 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10742 (xtensa_arch_setup, xtensa_regs_info): New functions.
10743 (the_low_target): Adjust.
10744 (initialize_low_arch): New function.
10745 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10746 (nios2_arch_setup): Set the current process'es tdesc.
10747 (target_regsets): Rename to ...
10748 (nios2_regsets): ... this.
10749 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10750 (nios2_regs_info): New function.
10751 (the_low_target): Adjust.
10752 (initialize_low_arch): New function.
10753 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10754 (aarch64_arch_setup): Set the current process'es tdesc.
10755 (target_regsets): Rename to ...
10756 (aarch64_regsets): ... this.
10757 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10758 (aarch64_regs_info): New function.
10759 (the_low_target): Adjust.
10760 (initialize_low_arch): New function.
10761 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10763 (target_regsets): Rename to ...
10764 (tile_regsets): ... this.
10765 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10766 (tile_regs_info): New function.
10767 (tile_arch_setup): Set the current process'es tdesc.
10768 (the_low_target): Adjust.
10769 (initialize_low_arch): New function.
10770 * spu-low.c (tdesc_spu): Declare.
10771 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10772 * win32-arm-low.c (tdesc_arm): Declare.
10773 (arm_arch_setup): New function.
10774 (the_low_target): Install arm_arch_setup instead of
10775 init_registers_arm.
10776 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10777 (init_windows_x86): Rename to ...
10778 (i386_arch_setup): ... this. Set `win32_tdesc'.
10779 (the_low_target): Adjust.
10780 * win32-low.c (win32_tdesc): New global.
10781 (child_add_thread): Don't create the thread cache here.
10782 (do_initial_child_stuff): Set the new process'es tdesc.
10783 * win32-low.h (struct target_desc): Forward declare.
10784 (win32_tdesc): Declare.
10785 * lynx-i386-low.c (tdesc_i386): Declare global.
10786 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10787 * lynx-low.c (lynx_tdesc): New global.
10788 (lynx_add_process): Set the new process'es tdesc.
10789 * lynx-low.h (struct target_desc): Forward declare.
10790 (lynx_tdesc): Declare global.
10791 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10792 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10793 * nto-low.c (nto_tdesc): New global.
10794 (do_attach): Set the new process'es tdesc.
10795 * nto-low.h (struct target_desc): Forward declare.
10796 (nto_tdesc): Declare.
10797 * nto-x86-low.c (tdesc_i386): Declare.
10798 (nto_x86_arch_setup): Set `nto_tdesc'.
10800 2013-06-04 Gary Benson <gbenson@redhat.com>
10802 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10803 to qSupported response when appropriate.
10804 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10805 with nonzero-length annex.
10806 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10807 arguments supplied in annex.
10809 2013-05-31 Doug Evans <dje@google.com>
10812 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10813 64 bits in 64-cross-32 environment.
10815 2013-05-28 Pedro Alves <palves@redhat.com>
10817 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10818 (aarch64-without-fpu.c): Delete rule.
10819 * configure.srv (aarch64*-*-linux*): Remove references to
10820 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10821 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10824 2013-05-24 Pedro Alves <palves@redhat.com>
10826 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10827 instead of strchr/decode_address. Error if the range isn't split
10828 with a ','. Don't assume there's be a ':' in the action.
10830 2013-05-23 Yao Qi <yao@codesourcery.com>
10831 Pedro Alves <palves@redhat.com>
10833 * linux-low.c (lwp_in_step_range): New function.
10834 (linux_wait_1): If the thread was range stepping and stopped
10835 outside the stepping range, report the stop to GDB. Otherwise,
10836 continue stepping. Add range stepping debug output.
10837 (linux_set_resume_request): Copy the step range from the resume
10838 request to the lwp.
10839 (linux_supports_range_stepping): New.
10840 (linux_target_ops) <supports_range_stepping>: Set to
10841 linux_supports_range_stepping.
10842 * linux-low.h (struct linux_target_ops)
10843 <supports_range_stepping>: New field.
10844 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10845 * linux-x86-low.c (x86_supports_range_stepping): New.
10846 (the_low_target) <supports_range_stepping>: Set to
10847 x86_supports_range_stepping.
10848 * server.c (handle_v_cont): Handle 'r' action.
10849 (handle_v_requests): Append ";r" if the target supports range
10851 * target.h (struct thread_resume) <step_range_start,
10852 step_range_end>: New fields.
10853 (struct target_ops) <supports_range_stepping>:
10855 (target_supports_range_stepping): New macro.
10857 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10859 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10860 confusion in comment.
10862 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10864 * lynx-low.c (struct process_info_private): New type.
10865 (lynx_add_process): New function.
10866 (lynx_create_inferior, lynx_attach): Replace calls to
10867 add_process by calls to lynx_add_process.
10868 (lynx_resume): If PTID is null, then try using
10869 current_process()->private->last_wait_event_ptid.
10871 (lynx_clear_inferiors): Delete. The contents of that function
10872 has been inlined in lynx_mourn;
10873 (lynx_wait_1): Save the ptid in the process's private data.
10874 (lynx_mourn): Free the process' private data. Replace call
10875 to lynx_clear_inferiors by call to clear_inferiors.
10877 2013-05-17 Yao Qi <yao@codesourcery.com>
10879 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10882 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10884 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10885 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10886 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10887 PT_TEXT_END_ADDR guards. Update comments.
10888 (linux_target_op) <read_offsets>: Conditionally define to
10889 linux_read_offsets if the target is UCLIBC and if it defines
10890 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10892 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10893 Andrew Jenner <andrew@codesourcery.com>
10895 * Makefile.in (SFILES): Add linux-nios2-low.c.
10896 (clean): Add action to delete nios2-linux.c.
10897 (nios2-linux.c): New rule.
10898 * configure.srv: Add nios2*-*-linux*.
10899 * linux-nios2-low.c: New.
10901 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10903 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10905 2013-04-25 Hui Zhu <hui@codesourcery.com>
10908 * ax.c (ax_printf): Add fflush.
10910 2013-04-22 Tom Tromey <tromey@redhat.com>
10912 * Makefile.in (SFILES): Add filestuff.c.
10913 (OBS): Add filestuff.o.
10914 (filestuff.o): New target.
10915 * config.in, configure: Rebuild.
10916 * configure.ac: Check for fdwalk, pipe2.
10918 2013-04-17 Pedro Alves <palves@redhat.com>
10920 * configure.ac (USE_THREAD_DB): Delete variable.
10921 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10922 Don't AC_SUBST USE_THREAD_DB.
10923 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10924 * config.in, configure: Regenerate.
10926 2013-04-16 Pedro Alves <palves@redhat.com>
10928 * linux-low.h (struct lwp_info) <thread_known>: Move under
10929 the USE_THREAD_DB #ifdef.
10931 2013-04-16 Pedro Alves <palves@redhat.com>
10933 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10934 (linux-low.o): Delete rule.
10935 * linux-low.h: Always include "gdb_thread_db.h" instead of
10936 conditionally including thread_db.h.
10937 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10940 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10942 * Makefile.in (install-only): Fix make install regression.
10944 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10946 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10947 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10949 * gdbserver.1: Remove.
10951 2013-03-22 Pedro Alves <palves@redhat.com>
10953 * linux-low.c (handle_extended_wait): Don't call
10954 linux_enable_event_reporting.
10956 2013-03-15 Tony Theodore <tonyt@logyst.com>
10959 * Makefile.in (SHELL): Use @SHELL@.
10961 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10963 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10966 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10968 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10969 Remove extraneous NULL element.
10971 2013-03-13 Yao Qi <yao@codesourcery.com>
10973 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10974 'V' block in trace frame.
10976 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10978 * target.h (struct target_ops): Add btrace ops.
10979 (target_supports_btrace): New macro.
10980 (target_enable_btrace): New macro.
10981 (target_disable_btrace): New macro.
10982 (target_read_btrace): New macro.
10983 * gdbthread.h (struct thread_info): Add btrace field.
10984 * server.c: Include btrace-common.h.
10985 (handle_btrace_general_set): New function.
10986 (handle_btrace_enable): New function.
10987 (handle_btrace_disable): New function.
10988 (handle_general_set): Call handle_btrace_general_set.
10989 (handle_qxfer_btrace): New function.
10990 (struct qxfer qxfer_packets[]): Add btrace entry.
10991 * inferiors.c (remove_thread): Disable btrace.
10992 * linux-low: Include linux-btrace.h.
10993 (linux_low_enable_btrace): New function.
10994 (linux_low_read_btrace): New function.
10995 (linux_target_ops): Add btrace ops.
10996 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10997 Add srv_linux_btrace=yes.
10998 (x86_64-*-linux*): Add linux-btrace.o.
10999 Add srv_linux_btrace=yes.
11000 * configure.ac: Define HAVE_LINUX_BTRACE.
11001 * config.in: Regenerated.
11002 * configure: Regenerated.
11004 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11006 * server.c (handle_qxfer): Preserve error message if -3 is
11008 (qxfer): Document the -3 return value.
11010 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11012 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11013 (linux_btrace_h): New variable.
11014 (linux-btrace.o): New rule.
11016 2013-03-08 Stan Shebs <stan@codesourcery.com>
11017 Hafiz Abid Qadeer <abidh@codesourcery.com>
11019 * tracepoint.c (trace_buffer_size): New global.
11020 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11021 (init_trace_buffer): Change to one-argument function. Allocate
11022 trace buffer memory.
11023 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11024 handle QTBuffer:size packet.
11025 (cmd_bigqtbuffer_size): New function.
11026 (initialize_tracepoint): Call init_trace_buffer with
11027 DEFAULT_TRACE_BUFFER_SIZE.
11028 * server.c (handle_query): Add QTBuffer:size in the
11031 2013-03-07 Yao Qi <yao@codesourcery.com>
11033 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11034 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11036 (cmd_qtsp): Adjust condition. Do post increment.
11037 Set cur_action and cur_step_action back to 0.
11039 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11042 * linux-low.c (linux_write_memory): Return early success if LEN is
11045 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11047 * configure.srv: Add x86_64-*-cygwin* as target.
11049 2013-02-28 Tom Tromey <tromey@redhat.com>
11051 * configure.ac: Invoke AC_SYS_LARGEFILE.
11052 * configure, config.in: Rebuild.
11054 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11056 * win32-low.c: Throughout, fix format strings and casts of
11057 printf-like functions to avoid type related warnings on all
11059 (get_child_debug_event): Print dwDebugEventCode as hex since
11060 that's how it's usually documented.
11062 2013-02-28 Yao Qi <yao@codesourcery.com>
11064 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11067 2013-02-27 Jiong Wang <jiwang@tilera.com>
11069 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11070 (reg-tilegx32.c): New rule.
11071 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11072 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11073 different register info initializer according to elf class.
11074 (init_registers_tilgx32): New function. The tilegx32 register info
11076 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11077 (tile_store_gregset): Likewise.
11079 2013-02-27 Yao Qi <yao@codesourcery.com>
11081 * server.c (process_point_options): Print debug message when
11082 debug_threads is true.
11084 2013-02-26 Yao Qi <yao@codesourcery.com>
11086 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11088 2013-02-19 Pedro Alves <palves@redhat.com>
11089 Kai Tietz <ktietz@redhat.com>
11093 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11094 instead of strtoul to extract address from packet.
11095 (process_serial_event) <'z'>: Likewise.
11097 2013-02-18 Yao Qi <yao@codesourcery.com>
11099 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11101 2013-02-14 Pedro Alves <palves@redhat.com>
11105 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11106 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11108 2013-02-14 Pedro Alves <palves@redhat.com>
11110 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11112 2013-02-14 Pedro Alves <palves@redhat.com>
11114 * tracepoint.c (save_string): Delete.
11115 (add_tracepoint_action): Use savestring instead of save_string.
11117 2013-02-12 Pedro Alves <palves@redhat.com>
11119 * linux-xtensa-low.c: Ditto.
11120 * xtensa-xtregs.c: Ditto.
11122 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11124 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11127 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11129 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11130 aarch64_num_wp_regs and aarch64_num_bp_regs to
11131 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11133 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11135 * linux-aarch64-low.c (ps_get_thread_area): Replace
11136 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11138 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11139 Marcus Shawcroft <marcus.shawcroft@arm.com>
11140 Nigel Stephens <nigel.stephens@arm.com>
11141 Yufeng Zhang <yufeng.zhang@arm.com>
11143 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11144 (aarch64.c, aarch64-without-fpu.c): New targets.
11145 * configure.srv (aarch64*-*-linux*): New.
11146 * linux-aarch64-low.c: New file.
11148 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11150 * linux-low.c (handle_extended_wait, linux_create_inferior)
11151 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11152 (dequeue_one_deferred_signal, linux_resume_one_thread)
11153 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11154 (linux_tracefork_grandchild, linux_test_for_tracefork)
11155 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11156 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11157 where the argument is 0.
11159 2013-01-25 Yao Qi <yao@codesourcery.com>
11161 * event-loop.c: Include "queue.h".
11162 (gdb_event_p): New typedef.
11163 (struct gdb_event) <next_event>: Remove.
11164 (event_queue): Change to QUEUE(gdb_event_p).
11165 (async_queue_event): Remove.
11166 (gdb_event_xfree): New.
11167 (initialize_event_loop): New.
11168 (process_event): Use API from QUEUE.
11169 (wait_for_event): Likewise.
11170 * server.c (main): Call initialize_event_loop.
11171 * server.h (initialize_event_loop): Declare.
11173 2013-01-18 Yao Qi <yao@codesourcery.com>
11175 * ax.h (struct eval_agent_expr_context): New.
11176 (gdb_eval_agent_expr): Update declaration.
11177 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11178 TFRAME. Add new argument CTX.
11179 * server.h (struct eval_agent_expr_context): Declare.
11180 (agent_mem_read, agent_tsv_read): Update declaration.
11181 (agent_mem_read_string): Likewise.
11182 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11183 (add_traceframe_block): Add new argument TPOINT.
11184 Increase TPOINT->traceframe_usage.
11185 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11186 eval_tracepoint_agent_expr.
11187 (condition_true_at_tracepoint): Likewise.
11188 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11189 (agent_mem_read_string, agent_tsv_read): Likewise.
11191 2013-01-16 Yao Qi <yao@codesourcery.com>
11193 * linux-low.c (linux_resume_one_lwp): Don't check
11194 'lwp->bp_reinsert != 0'.
11196 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11197 Pedro Alves <palves@redhat.com>
11199 * lynx-low.c (ptrace_request_to_str): Define a temporary
11200 macro and use it to simplify this function's implementation.
11202 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11204 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11207 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11209 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11211 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11213 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11215 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11217 * lynx-low.c (lynx_resume): Use the resume_info parameter
11218 to determine the ptid for the lynx_ptrace call, unless
11219 it is equal to minus_one_ptid, in which case we use the
11220 ptid of the current_inferior.
11221 (lynx_wait_1): After having received a thread create/exit
11222 event, resume the inferior's execution using the signaling
11223 thread's ptid, rather than the old ptid.
11225 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11227 * lynx-low.c (lynx_resume): Delete variable ret.
11229 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11231 * gdbreplay.c (gdbreplay_version): Update copyright year.
11232 * server.c (gdbserver_version): Likewise.
11234 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11236 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11239 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11241 * lynx-low.c (ptrace_request_to_str): Add handling for
11242 PTRACE_GETTRACESIG.
11244 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11246 * lynx-low.c (lynx_attach): Delete variable new_process.
11248 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11250 * lynx-low.c (lynx_create_inferior): Delete variable
11253 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11255 * lynx-low.c (ptrace_request_to_str): Do not handle
11256 PTRACE_GETTHREADLIST if this macro does not exist.
11258 2012-12-15 Yao Qi <yao@codesourcery.com>
11260 * Makefile.in (OBS): Add notif.o.
11261 * notif.c, notif.h: New.
11262 * server.c: Include "notif.h".
11263 (struct vstop_notif) <next>: Remove.
11265 (queue_stop_reply): Update.
11266 (push_event, send_next_stop_reply): Remove.
11267 (discard_queued_stop_replies): Update.
11268 (notif_stop): New variable.
11269 (handle_v_stopped): Remove.
11270 (handle_v_requests): Don't call handle_v_stopped. Call
11271 handle_ack_notif instead.
11272 (queue_stop_reply_callback): Call notif_event_enque instead
11273 of queue_stop_reply.
11274 (handle_status): Don't call send_next_stop_reply, call
11275 notif_write_event instead.
11276 (kill_inferior_callback): Likewise.
11277 (detach_or_kill_inferior_callback): Likewise.
11278 (main): Call initialize_notif.
11279 (process_serial_event): Call QUEUE_is_empty.
11280 (handle_target_event): Call notif_push instead of push event.
11281 * server.h (push_event): Remove declaration.
11283 2012-12-10 Tom Tromey <tromey@redhat.com>
11285 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11286 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11289 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11290 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11291 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11292 (amd64-linux-ipa.o, ax.o): Rewrite.
11293 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11294 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11295 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11296 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11297 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11298 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11299 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11300 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11301 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11302 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11303 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11304 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11305 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11306 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11307 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11308 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11309 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11310 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11311 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11312 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11313 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11314 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11315 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11316 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11317 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11318 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11319 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11320 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11321 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11322 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11323 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11324 (reg-tilegx.o): Remove.
11325 (all_object_files): New macro.
11326 Include .deps files.
11327 * aclocal.m4, configure: Rebuild.
11328 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11329 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11330 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11332 2012-12-05 Tom Tromey <tromey@redhat.com>
11335 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11337 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11339 * configure.ac: Check for linux/perf_event.h.
11340 * config.in: Regenerated.
11341 * configure: Regenerated.
11343 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11345 * hostio.c (handle_readlink): Decrease buffer size
11346 parameter passed to readlink by one byte.
11348 2012-11-26 Yao Qi <yao@codesourcery.com>
11350 * configure.ac (build_warnings): Append '-Wempty-body'.
11351 * configure: Regenerated.
11352 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11355 2012-11-15 Pierre Muller <muller@sourceware.org>
11357 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11358 * config.in: Regenerate.
11359 * configure: Regenerate.
11360 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11361 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11362 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11363 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11365 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11366 instead of <sys/wait.h> header.
11367 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11369 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11371 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11372 (various make rules): Remove -DGDBSERVER
11374 2012-11-09 Yao Qi <yao@codesourcery.com>
11376 * spu-low.c (current_ptid): Move it to ..
11377 * gdbthread.h: ... here. New.
11378 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11379 * server.c (myresume, process_serial_event): Likewise.
11380 * thread-db.c (thread_db_find_new_threads): Likewise.
11381 * tracepoint.c (run_inferior_command): Likewise.
11383 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11385 * server.c (handle_search_memory_1): Include access length in
11388 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11390 * linux-crisv32-low.c: Fix compile errors.
11392 2012-09-04 Yao Qi <yao@codesourcery.com>
11394 * tracepoint.c (cmd_qtsv): Adjust debug message.
11395 Don't check CUR_TPOINT.
11397 2012-08-28 Yao Qi <yao@codesourcery.com>
11399 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11400 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11401 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11402 Remove declarations of xmalloc, xreallloc, xstrdup and
11404 * Makefile.in (libiberty_h): New.
11405 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11406 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11408 2012-08-23 Yao Qi <yao@codesourcery.com>
11410 * server.h: Remove declaration of 'xsnprintf'.
11412 2012-08-22 Keith Seitz <keiths@redhat.com>
11414 * server.h: Include build-gnulib-gbserver/config.h.
11415 * gdbreplay.c: Likewise.
11417 2012-08-08 Doug Evans <dje@google.com>
11419 * Makefile.in (SFILES): Add gdb_vecs.c.
11420 (OBS): Add gdb_vecs.o.
11421 (gdb_vecs_h, host_defs_h): New variables.
11422 (thread-db.o): Add $(gdb_vecs_h) dependency.
11423 (gdb_vecs.o): New rule.
11424 * thread-db.c: #include "gdb_vecs.h".
11425 (thread_db_load_search): Use a vector to iterate over path elements.
11426 Handle text appearing after "$pdir".
11428 * configure.ac: Add check for strstr.
11429 * config.in: Regenerate.
11430 * configure: Regenerate.
11432 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11434 * hostio.c (handle_pread): If pread fails, fall back to attempting
11436 (handle_pwrite): Likewise for pwrite.
11438 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11440 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11441 between unsupported TYPE and unimplementable ADDR/LEN combination.
11442 (arm_insert_point): Act on new return value.
11444 2012-07-31 Pedro Alves <palves@redhat.com>
11446 * server.c (process_point_options): Only skip tokens if we find
11447 one that is unrecognized. Don't treat 'X' specially while
11448 skipping unrecognized tokens.
11450 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11452 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11453 to 4-byte-align HW breakpoint addresses for Thumb.
11455 2012-07-27 Yao Qi <yao@codesourcery.com>
11459 * server.h: Declare gdb_agent_about_to_close.
11460 * target.c (kill_inferior): Include "agent.h".
11461 New. Send command 'kill'.
11462 * target.h (kill_inferior): Removed macro.
11463 * tracepoint.c (gdb_agent_about_to_close): New.
11464 (gdb_agent_helper_thread): Handle command 'close'.
11465 Wait endlessly until the inferior stops.
11466 Install gdb_agent_remove_socket to atexit hook.
11467 (agent_socket_name): New static variable.
11468 (gdb_agent_socket_init): Replace local variable 'name' with
11469 'agent_socket_name'.
11470 (gdb_agent_remove_socket): New.
11472 2012-07-27 Yao Qi <yao@codesourcery.com>
11474 * server.c (process_point_options): Stop at 'X' when parsing.
11476 2012-07-19 Michael Eager <eager@eagercon.com>
11478 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11480 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11481 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11482 hardware breakpoint.
11484 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11486 * gdbserver/linux-low.c (initialize_low): Call
11487 linux_ptrace_init_warnings.
11489 2012-07-02 Doug Evans <dje@google.com>
11491 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11494 2012-07-02 Stan Shebs <stan@codesourcery.com>
11496 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11497 (ax.o): Add it to build rule.
11499 (OBS): Add format.o.
11500 (IPA_OBS): Add format.o.
11501 * server.c (handle_query): Claim support for breakpoint commands.
11502 (process_point_options): Add command case.
11503 (process_serial_event): Leave running if there are printfs in
11505 * mem-break.h (any_persistent_commands): Declare.
11506 (add_breakpoint_commands): Declare.
11507 (gdb_no_commands_at_breakpoint): Declare.
11508 (run_breakpoint_commands): Declare.
11509 * mem-break.c (struct point_command_list): New struct.
11510 (struct breakpoint): New field command_list.
11511 (any_persistent_commands): New function.
11512 (add_commands_to_breakpoint): New function.
11513 (add_breakpoint_commands): New function.
11514 (gdb_no_commands_at_breakpoint): New function.
11515 (run_breakpoint_commands): New function.
11516 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11518 * ax.c: Include format.h.
11519 (ax_printf): New function.
11520 (gdb_eval_agent_expr): Add printf opcode.
11522 2012-06-13 Yao Qi <yao@codesourcery.com>
11524 * server.c (start_inferior): Remove duplicated writes to fields
11525 'last_resume_kind' and 'last_status' of 'current_inferior'.
11527 2012-06-12 Yao Qi <yao@codesourcery.com>
11528 Pedro Alves <palves@redhat.com>
11530 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11532 * server.c (handle_v_cont): Extend comment.
11534 2012-06-11 Yao Qi <yao@codesourcery.com>
11536 * linux-low.c (linux_attach): Add 'static'.
11538 2012-06-06 Yao Qi <yao@codesourcery.com>
11540 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11542 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11544 Fix gcc -flto compilation warning.
11545 * server.c (main): Make variable multi_mode and attach volatile.
11547 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11549 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11550 if the platform doesn't know about it.
11552 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11554 * Makefile.in (SFILES): Add linux-tile-low.c.
11555 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11556 * configure.srv: Handle tilegx-*-linux*.
11557 * linux-tile-low.c: New file.
11559 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11561 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11563 2012-05-24 Pedro Alves <palves@redhat.com>
11567 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11569 2012-05-24 Pedro Alves <palves@redhat.com>
11573 Replace target_signal with gdb_signal throughout.
11575 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11577 * linux-low.c (linux_store_registers): Avoid the copying sequence
11578 when no data has been retrieved by ptrace.
11580 2012-05-22 Will Deacon <will.deacon@arm.com>
11582 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11583 Include asm/ptrace.h.
11584 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11587 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11589 * linux-low.c (linux_store_registers): Don't re-retrieve data
11590 with ptrace that has already been obtained from /proc. Always
11591 copy any data retrieved with ptrace to the buffer supplied.
11593 2012-05-11 Yao Qi <yao@codesourcery.com>
11594 Pedro Alves <palves@redhat.com>
11596 * linux-low.c (enum stopping_threads_kind): New.
11597 (stopping_threads): Change type to `enum stopping_threads_kind'.
11598 (handle_extended_wait): If stopping and suspending threads, leave
11599 the new_lwp suspended too.
11600 (linux_wait_for_event): Adjust.
11601 (stop_all_lwps): Set `stopping_threads' to
11602 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11603 whether we're suspending threads or just stopping them. Assert no
11606 2012-04-29 Yao Qi <yao@codesourcery.com>
11608 * server.h: Move some code to ...
11609 * gdbthread.h: ... here. New.
11610 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11611 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11612 (nto-low.o, win32-low.o): Likewise.
11613 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11614 * regcache.c, remote-utils.c, server.c: Likewise.
11615 * target.c, tracepoint.c, win32-low.c: Likewise.
11617 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11619 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11620 (PTRACE_ARG4_TYPE): Likewise.
11621 (PTRACE_XFER_TYPE): Likewise.
11622 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11623 ptrace to PTRACE_ARG3_TYPE.
11624 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11625 (PTRACE_ARG4_TYPE): Likewise.
11626 (PTRACE_XFER_TYPE): Likewise.
11627 (linux_detach_one_lwp): Cast fourth argument of
11628 ptrace to long then PTRACE_ARG4_TYPE.
11629 (regsets_fetch_inferior_registers): Cast third argument of
11630 ptrace to long then PTRACE_ARG3_TYPE.
11631 (regsets_store_inferior_registers): Likewise.
11633 2012-04-20 Pedro Alves <palves@redhat.com>
11635 * configure: Regenerate.
11637 2012-04-19 Pedro Alves <palves@redhat.com>
11639 * Makefile.in (GNULIB_BUILDDIR): New.
11640 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11641 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11642 (all, install-only, uninstall, clean-info, all-lib, clean): No
11643 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11644 (maintainer-clean realclean distclean): Use subdir_do.
11646 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11647 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11648 * acinclude.m4: Include acx_configure_dir.m4.
11649 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11650 calls. Call AC_PROG_RANLIB. Configure gnulib using
11653 (GNULIB_STDINT_H): Adjust.
11654 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11655 * gdbreplay.c: Include build-gnulib/config.h.
11656 * server.h: Likewise.
11657 * aclocal.m4: Regenerate.
11658 * config.in: Regenerate.
11659 * configure: Regenerate.
11661 2012-04-19 Pedro Alves <palves@redhat.com>
11663 * Makefile.in (LIBGNU, INCGNU): Adjust.
11664 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11665 (all, install-only, uninstall, clean-info, all-lib, clean)
11666 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11667 * configure.ac: Adjust AC_OUTPUT output.
11668 * aclocal.m4: Regenerate.
11669 * configure: Regenerate.
11671 2012-04-19 Pedro Alves <palves@redhat.com>
11673 * Makefile.in (generated_files): New.
11674 (server_h): Remove the explicit dependency on config.h, and depend
11675 on $generated_files.
11677 2012-04-19 Pedro Alves <palves@redhat.com>
11679 * Makefile.in (INCGNU): Add -Ignulib.
11681 2012-04-19 Pedro Alves <palves@redhat.com>
11683 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11684 (INCGNU): ... this, and spell out -I here.
11685 (GNULIB_LIB): Rename to ...
11686 (LIBGNU): ... this.
11687 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11689 2012-04-19 Pedro Alves <palves@redhat.com>
11691 * config.in: Regenerate.
11693 2012-04-19 Pedro Alves <palves@redhat.com>
11695 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11696 * server.h (memmem): Remove declaration.
11697 * config.in: Regenerate.
11698 * configure: Regenerate.
11700 2012-04-19 Yao Qi <yao@codesourcery.com>
11702 * Makefile.in (SFILES): Add common/vec.c.
11706 2012-04-19 Yao Qi <yao@codesourcery.com>
11708 * remote-utils.c (prepare_resume_reply): Replace with macro
11709 target_core_of_thread.
11710 * server.c (handle_qxfer_threads_proper): Likewise.
11711 * target.h (traget_core_of_thread): New macro.
11713 2012-04-18 Pedro Alves <palves@redhat.com>
11715 * aclocal.m4: Regenerate.
11716 * configure: Regenerate.
11718 2012-04-16 Yao Qi <yao@codesourcery.com>
11720 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11721 duplicated on address.
11723 2012-04-16 Yao Qi <yao@codesourcery.com>
11725 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11726 (struct tracepoint_action_ops) <send>: New field.
11727 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11728 (agent_expr_send, x_tracepoint_action_send): New.
11729 (l_tracepoint_action_send): New.
11730 (cmd_qtdp): Download and install tracepoint
11731 according to `use_agent'.
11732 (run_inferior_command): Add one more parameter `len'.
11734 (tracepoint_send_agent): New.
11735 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11737 2012-04-16 Yao Qi <yao@codesourcery.com>
11739 * tracepoint.c (download_tracepoints): Moved to ...
11740 (cmd_qtstart): ... here.
11742 2012-04-14 Yao Qi <yao@codesourcery.com>
11744 * tracepoint.c: Include inttypes.h.
11745 (struct collect_memory_action): Use sized types.
11746 (struct tracepoint): Likewise.
11747 (cmd_qtdp, stop_tracing): Update print specifiers.
11748 (cmd_qtp, response_tracepoint): Likewise.
11749 (collect_data_at_tracepoint): Likewise.
11750 (collect_data_at_step): Likewise.
11752 2012-04-14 Yao Qi <yao@codesourcery.com>
11754 Import gnulib module inttypes.
11755 * aclocal.m4, config.in, configure: Regenerated.
11757 2012-04-14 Yao Qi <yao@codesourcery.com>
11759 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11760 Makefile and config.status at last.
11762 2012-04-13 Yao Qi <yao@codesourcery.com>
11764 * tracepoint.c: Include stdint.h unconditionally.
11766 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11768 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11769 on BFD_HAVE_SYS_PROCFS_TYPE.
11770 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11771 * configure: Regenerate.
11772 * config.in: Likewise.
11774 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11776 * Makefile.in (clean): Also remove x32.c x32-linux.c
11777 x32-avx.c x32-avx-linux.c.
11778 (x32.o): New target.
11780 (x32-linux.o): Likewise.
11781 (x32-linux.c): Likewise.
11782 (x32-avx.o): Likewise.
11783 (x32-avx.c): Likewise.
11784 (x32-avx-linux.o): Likewise.
11785 (x32-avx-linux.c): Likewise.
11787 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11788 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11789 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11790 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11791 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11792 i386/x32-avx-linux.xml.
11794 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11795 (init_registers_x32_avx_linux): Likwise.
11796 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11797 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11799 2012-04-13 Pedro Alves <palves@redhat.com>
11801 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11802 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11803 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11804 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11807 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11809 * linux-x86-low.c (compat_x32_clock_t): New.
11810 (compat_x32_siginfo_t): Likewise.
11811 (compat_x32_siginfo_from_siginfo): Likewise.
11812 (siginfo_from_compat_x32_siginfo): Likewise.
11813 (linux_is_elf64): Likewise.
11814 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11815 and siginfo_from_compat_x32_siginfo for x32.
11816 (x86_arch_setup): Set linux_is_elf64.
11818 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11821 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11823 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11824 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11825 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11826 compatible with process.
11828 2012-04-12 Yao Qi <yao@codesourcery.com>
11830 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11831 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11832 (install-only, install-info, clean): Handle sub dir gnulib.
11833 (all-lib, am--refresh): New targets.
11834 (memmem.o): Remove target.
11835 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11836 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11837 (AC_REPLACE_FUNCS): Remove memmem.
11838 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11839 (AC_OUTPUT): Generate Makefile in gnulib/.
11840 * aclocal.m4, config.in, configure: Regenerated.
11842 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11844 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11846 2012-04-05 Pedro Alves <palves@redhat.com>
11848 -Werror=strict-aliasing
11850 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11853 2012-04-04 Pedro Alves <palves@redhat.com>
11855 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11856 (sparc_store_gregset_from_stack, sparc_store_gregset)
11857 (sparc_breakpoint_at): Fix formatting.
11859 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11861 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11863 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11864 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11865 * config.in: Regenerate.
11866 * configure: Likewise.
11868 2012-03-29 Pedro Alves <palves@redhat.com>
11870 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11871 Correct ptrace arguments.
11873 2012-03-28 Pedro Alves <palves@redhat.com>
11875 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11876 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11877 (IA64_FR1_REGNUM): New defines.
11878 (ia64_fetch_register): New.
11879 (the_low_target): Install it.
11880 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11882 * linux-low.c (linux_fetch_registers): Try the
11883 the_low_target.fetch_register hook first.
11885 * linux-arm-low.c (the_low_target): Adjust.
11886 * linux-bfin-low.c (the_low_target): Adjust.
11887 * linux-cris-low.c (the_low_target): Adjust.
11888 * linux-crisv32-low.c (the_low_target): Adjust.
11889 * linux-m32r-low.c (the_low_target): Adjust.
11890 * linux-m68k-low.c (the_low_target): Adjust.
11891 * linux-mips-low.c (the_low_target): Adjust.
11892 * linux-ppc-low.c (the_low_target): Adjust.
11893 * linux-s390-low.c (the_low_target): Adjust.
11894 * linux-sh-low.c (the_low_target): Adjust.
11895 * linux-sparc-low.c (the_low_target): Adjust.
11896 * linux-tic6x-low.c (the_low_target): Adjust.
11897 * linux-x86-low.c (the_low_target): Adjust.
11898 * linux-xtensa-low.c (the_low_target): Adjust.
11900 2012-03-26 Pedro Alves <palves@redhat.com>
11902 * server.c (handle_qxfer_libraries): Don't bail early if
11903 the_target->qxfer_libraries_svr4 is not NULL.
11905 2012-03-26 Pedro Alves <palves@redhat.com>
11907 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11909 2012-03-23 Pedro Alves <palves@redhat.com>
11911 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11912 "library-list-svr4" element's start tag when the the DSO list is
11915 2012-03-23 Pedro Alves <palves@redhat.com>
11917 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11918 a variable whose type size is the same as the inferior's pointer
11921 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11923 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11925 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11926 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11927 * linux-low.h: Include <signal.h>.
11928 (struct siginfo): Remove forward declaration.
11929 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11932 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11934 * .gitignore: Ignore more files.
11936 2012-03-19 Pedro Alves <palves@redhat.com>
11937 Jan Kratochvil <jan.kratochvil@redhat.com>
11939 * server.c (cont_thread, general_thread): Add describing comments.
11940 (start_inferior): Clear `cont_thread'.
11941 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11944 2012-03-15 Yao Qi <yao@codesourcery.com>
11946 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11948 (cmd_qtdp): ... here.
11950 2012-03-15 Yao Qi <yao@codesourcery.com>
11952 * tracepoint.c (struct tracepoint_action_ops): New.
11953 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11954 (m_tracepoint_action_download): New.
11955 (r_tracepoint_action_download): New.
11956 (x_tracepoint_action_download): New.
11957 (l_tracepoint_action_download): New.
11958 (add_tracepoint_action): Install `action->ops' according type.
11959 (download_tracepoint_1): Move code `download' function pointer
11960 of various tracepoint_action_ops.
11962 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11964 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11965 linux_ptrace_attach_warnings.
11967 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11969 * Makefile.in (linux-ptrace.o): New.
11970 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11971 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11972 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11973 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11974 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11976 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11978 2012-03-08 Yao Qi <yao@codesourcery.com>
11979 Pedro Alves <palves@redhat.com>
11981 Fix PR server/13392.
11982 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11983 offset of JMP insn.
11984 * tracepoint.c (remove_tracepoint): New.
11985 (cmd_qtdp): Call remove_tracepoint when failed to install.
11987 2012-03-07 Pedro Alves <palves@redhat.com>
11989 * linux-low.c (get_detach_signal): New.
11990 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11991 Pass on pending signals to PTRACE_DETACH. Check the result of the
11993 * server.c (program_signals, program_signals_p): New.
11994 (handle_general_set): Handle QProgramSignals.
11995 * server.h (program_signals, program_signals_p): Declare.
11997 2012-03-05 Pedro Alves <palves@redhat.com>
11998 Jan Kratochvil <jan.kratochvil@redhat.com>
12000 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12003 2012-03-03 Yao Qi <yao@codesourcery.com>
12005 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12006 agent_look_up_symbols.
12008 2012-03-03 Yao Qi <yao@codesourcery.com>
12010 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12011 (linux-x86-low.o): Likewise.
12012 * server.h: Remove in_process_agent_loaded.
12013 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12017 2012-03-03 Yao Qi <yao@codesourcery.com>
12019 * tracepoint.c (gdb_agent_capability): New global.
12020 (in_process_agent_loaded_ust): Renamed to
12021 `in_process_agent_supports_ust'.
12023 (in_process_agent_supports_ust): Call agent_capability_check.
12024 (clear_installed_tracepoints): Assert that agent supports
12027 2012-03-03 Yao Qi <yao@codesourcery.com>
12029 * linux-low.c (linux_supports_agent): New.
12030 (linux_target_ops): Initialize field `supports_agent' with
12031 linux_supports_agent.
12032 * target.h (struct target_ops) <supports_agent>: New.
12033 (target_supports_agent): New macro.
12034 * server.c (handle_general_set): Handle packet 'QAgent'.
12035 (handle_query): Send `QAgent+'.
12036 * Makefile.in (server.o): Depends on agent.h.
12038 2012-03-03 Yao Qi <yao@codesourcery.com>
12040 * Makefile.in (OBS): Add agent.o.
12041 Add new rule for agent.o.
12042 Track dependence of tracepoint.c on agent.h.
12043 * tracepoint.c (run_inferior_command_1):
12044 (run_inferior_command): Call agent_run_command.
12045 (gdb_ust_connect_sync_socket): Deleted. Move it to
12047 (resume_thread, stop_thread): Likewise.
12048 (gdb_ust_socket_init): Renamed to ...
12049 (gdb_agent_socket_init): ... New.
12050 (gdb_ust_thread): Renamed to ...
12051 (gdb_agent_helper_thread): ... New.
12052 (gdb_ust_init): Move some code to ...
12053 (gdb_agent_init): ... here. New.
12054 [HAVE_UST]: Call gdb_ust_init.
12055 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12056 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12057 * config.in, configure: Regenerated.
12059 2012-03-02 Pedro Alves <palves@redhat.com>
12061 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12062 * linux-low.c (struct simple_pid_list): New.
12063 (stopped_pids): New a struct simple_pid_list pointer.
12064 (add_to_pid_list, pull_pid_from_list): New.
12065 (handle_extended_wait): Don't assume the first signal new children
12066 report is SIGSTOP. Adjust call to pull_pid_from_list.
12067 (linux_wait_for_lwp): Adjust.
12069 2012-03-02 Yao Qi <yao@codesourcery.com>
12071 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12074 2012-03-02 Yao Qi <yao@codesourcery.com>
12076 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12077 `stop_pc' and `tpoint'. Update caller.
12079 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12081 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12082 * linux-low.c (use_linux_regsets): New macro.
12083 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12084 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12085 (linux_register_in_regsets): New function.
12086 (usr_fetch_inferior_registers): Skip registers covered by
12088 (usr_store_inferior_registers): Likewise.
12089 (usr_fetch_inferior_registers): New macro.
12090 (usr_store_inferior_registers): Likewise.
12091 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12092 (linux_store_registers): Likewise.
12093 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12095 (init_registers_mips64_dsp_linux): Likewise.
12096 (init_registers_mips_linux): New macro.
12097 (init_registers_mips_dsp_linux): Likewise.
12098 (mips_dsp_num_regs): Likewise.
12099 (DSP_BASE, DSP_CONTROL): New fallback macros.
12100 (mips_base_regs): New macro.
12101 (mips_regmap): Use it. Fix the size.
12102 (mips_dsp_regmap): New variable.
12103 (mips_dsp_regset_bitmap): Likewise.
12104 (mips_arch_setup): New function.
12105 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12107 (mips_cannot_store_register): Likewise.
12108 (the_low_target): Update .arch_setup, .num_regs and .regmap
12109 initializers. Add .regset_bitmap initializer.
12110 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12112 * linux-bfin-low.c (the_low_target): Likewise.
12113 * linux-cris-low.c (the_low_target): Likewise.
12114 * linux-crisv32-low.c (the_low_target): Likewise.
12115 * linux-ia64-low.c (the_low_target): Likewise.
12116 * linux-m32r-low.c (the_low_target): Likewise.
12117 * linux-m68k-low.c (the_low_target): Likewise.
12118 * linux-ppc-low.c (the_low_target): Likewise.
12119 * linux-s390-low.c (the_low_target): Likewise.
12120 * linux-sh-low.c (the_low_target): Likewise.
12121 * linux-sparc-low.c (the_low_target): Likewise.
12122 * linux-tic6x-low.c (the_low_target): Likewise.
12123 * linux-x86-low.c (the_low_target): Likewise.
12124 * linux-xtensa-low.c (the_low_target): Likewise.
12125 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12126 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12127 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12129 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12130 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12132 2012-02-29 Yao Qi <yao@codesourcery.com>
12133 Pedro Alves <palves@redhat.com>
12135 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12136 `step_over_finished' is true.
12138 2012-02-27 Pedro Alves <palves@redhat.com>
12140 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12141 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12143 2012-02-27 Pedro Alves <palves@redhat.com>
12146 * linux-low.c (pid_is_stopped): New.
12147 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12149 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12151 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12154 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12156 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12158 2012-02-24 Luis Machado <lgustavo@codesourcery>
12160 * server.c (handle_query): Advertise support for target-side
12161 breakpoint condition evaluation.
12162 (process_point_options): New function.
12163 (process_serial_event): When inserting a breakpoint, check for
12164 a target-side condition that should be evaluated.
12166 * mem-break.c: Include regcache.h and ax.h.
12167 (point_cond_list_t): New data structure.
12168 (breakpoint) <cond_list>: New field.
12169 (find_gdb_breakpoint_at): Make non-static.
12170 (delete_gdb_breakpoint_at): Clear any target-side
12172 (clear_gdb_breakpoint_conditions): New function.
12173 (add_condition_to_breakpoint): Likewise.
12174 (add_breakpoint_condition): Likewise.
12175 (gdb_condition_true_at_breakpoint): Likewise.
12176 (gdb_breakpoint_here): Return result directly instead
12177 of going through a local variable.
12179 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12180 (clear_gdb_breakpoint_conditions): Likewise.
12181 (add_breakpoint_condition): Likewise.
12182 (gdb_condition_true_at_breakpoint): Likewise.
12184 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12185 (need_step_over_p): Take target-side breakpoint condition into
12188 2012-02-24 Luis Machado <lgustavo@codesourcery>
12190 * server.h: Include tracepoint.h.
12191 (agent_mem_read, agent_get_trace_state_variable_value,
12192 agent_set_trace_state_variable_value,
12193 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12194 get_set_tsv_func_addr): New prototypes.
12196 * ax.h: New include file.
12197 * ax.c: New source file.
12199 * tracepoint.c: Include ax.h.
12200 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12201 agent_expr, eval_result_type): Move to ax.h.
12202 (parse_agent_expr): Rename to ...
12203 (gdb_parse_agent_expr): ... this, make it non-static and move
12205 (unparse_agent_expr) Rename to ...
12206 (gdb_unparse_agent_expr): ... this, make it non-static and move
12208 (eval_agent_expr): Rename to ...
12209 (eval_tracepoint_agent_expr): ... this.
12210 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12211 forward declarations.
12212 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12213 (agent_get_trace_state_variable_value): New function.
12214 (agent_set_trace_state_variable_value): New function.
12215 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12216 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12217 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12218 (condition_true_at_tracepoint): Likewise.
12219 (parse_agent_expr): Rename to ...
12220 (gdb_parse_agent_expr): ... this and move to ax.c.
12221 (unparse_agent_expr): Rename to ...
12222 (gdb_unparse_agent_expr): ... this and move to ax.c.
12223 (gdb_agent_op_name): Move to ax.c.
12224 (eval_agent_expr): Rename to ...
12225 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12227 (eval_tracepoint_agent_expr): New function.
12228 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12230 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12232 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12233 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12234 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12235 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12236 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12237 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12238 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12239 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12240 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12241 (compile_bytecodes): Remove forward declaration.
12242 (is_goto_target): Move to ax.c.
12243 (compile_bytecodes): Move to ax.c and call
12244 agent_get_trace_state_variable_value (...) and
12245 agent_set_trace_state_variable_value (...).
12247 * Makefile.in: Update ax.c and IPA dependencies.
12249 2012-02-24 Pedro Alves <palves@redhat.com>
12251 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12252 (cmd_bigqtbuffer_circular): ... this. Only handle
12253 'QTBuffer:circular:'.
12254 (handle_tracepoint_general_set): Adjust.
12256 2012-02-16 Yao Qi <yao@codesourcery.com>
12258 * inferiors.c: Move code to ...
12259 * dll.c: .... here. New.
12260 * server.h: Declare clear_dlls.
12261 * Makefile.in (SFILES): Add dll.c.
12265 2012-02-11 Yao Qi <yao@codesourcery.com>
12267 * server.c: (handle_monitor_command): Add a new parameter
12269 (handle_query): Update caller.
12271 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12273 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12274 * configure, config.in: Regenerate.
12275 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12278 2012-02-02 Pedro Alves <palves@redhat.com>
12280 Try SIGKILL first, then PTRACE_KILL.
12281 * linux-low.c (linux_kill_one_lwp): New.
12282 (linux_kill_one_lwp): Rename to ...
12283 (kill_one_lwp_callback): ... this. Use the new
12284 linux_kill_one_lwp.
12286 2012-02-02 Pedro Alves <palves@redhat.com>
12288 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12291 2012-01-27 Pedro Alves <palves@redhat.com>
12293 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12294 (elf_64_file_p): Make static.
12295 (linux_pid_exe_is_elf_64_file): New.
12296 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12297 Delete declarations.
12298 (linux_pid_exe_is_elf_64_file): Declare.
12299 * linux-x86-low.c (x86_arch_setup): Use
12300 linux_pid_exe_is_elf_64_file.
12302 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12304 * linux-low.c (linux_wait_for_event_1): Rename to ...
12305 (linux_wait_for_event): ... here and merge it with former
12306 linux_wait_for_event - new variable wait_ptid, use it.
12307 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12309 2012-01-23 Pedro Alves <palves@redhat.com>
12311 * server.c (main): Avoid yet another case of infinite loop while
12312 detaching/killing after a longjmp.
12314 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12317 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12319 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12321 * hostio.c (handle_readlink): New function.
12322 (handle_vFile): Call it to handle "vFile:readlink" packets.
12324 2012-01-20 Pedro Alves <palves@redhat.com>
12325 Ulrich Weigand <ulrich.weigand@linaro.org>
12327 * server.c (handle_v_requests): Only support vAttach and vRun to
12328 start multiple processes when in extended protocol mode.
12330 2012-01-17 Pedro Alves <palves@redhat.com>
12332 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12333 memalign plus mprotect to allocate the scratch buffer.
12335 2012-01-13 Pedro Alves <palves@redhat.com>
12337 * server.c (attach_inferior): Clear `cont_thread'.
12339 2012-01-13 Pedro Alves <palves@redhat.com>
12341 * server.c (main): Avoid infinite loop while detaching/killing
12344 2012-01-09 Doug Evans <dje@google.com>
12346 * server.c (start_inferior): Set last_ptid in --wrapper case.
12348 2012-01-06 Yao Qi <yao@codesourcery.com>
12350 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12352 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12354 2012-01-04 Yao Qi <yao@codesourcery.com>
12356 * tracepoint.c (cmd_qtdp): Print debug message
12357 for static tracepoint.
12359 2012-01-04 Yao Qi <yao@codesourcery.com>
12361 * tracepoint.c (trace_vdebug): Differentiate debug message
12362 between gdbserver and IPA.
12364 2012-01-03 Yao Qi <yao@codesourcery.com>
12366 * tracepoint.c (tracepoint_was_hit): Don't collect for
12369 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12371 * terminal.h: Reformat copyright header.
12373 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12375 * server.c (gdbserver_version): Update copyright year.
12376 * gdbreplay.c (gdbreplay_version): Likewise.
12378 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12380 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12383 2011-12-18 Hui Zhu <teawater@gmail.com>
12384 * linux-low.c (linux_create_inferior): Save return value to ret.
12386 2011-12-18 Hui Zhu <teawater@gmail.com>
12388 * linux-low.c (linux_create_inferior): Save return value to ret.
12390 2011-12-16 Doug Evans <dje@google.com>
12392 * linux-low.c (linux_create_inferior): If stdio connection,
12393 redirect stdin from /dev/null, stdout to stderr.
12394 * remote-utils.c (remote_is_stdio): New static global.
12395 (remote_connection_is_stdio): New function.
12396 (remote_prepare): Handle stdio connection.
12397 (remote_open): Ditto.
12398 (remote_close): Don't close stdin for stdio connections.
12399 (read_prim,write_prim): New functions. Replace all calls to
12400 read/write to these.
12401 * server.c (main): Watch for "-" argument. Move call to
12402 remote_prepare before start_inferior.
12403 * server.h (STDIO_CONNECTION_NAME): New macro.
12404 (remote_connection_is_stdio): Declare.
12406 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12407 in debugging output.
12409 2011-12-15 Yao Qi <yao@codesourcery.com>
12411 * tracepoint.c: Include sys/syscall.h.
12412 (gdb_ust_thread): Remove preprocessor conditional.
12414 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12416 * linux-low.c (linux_detach_one_lwp): Call
12417 the_low_target.prepare_to_resume before detaching.
12419 2011-12-14 Yao Qi <yao@codesourcery.com>
12421 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12424 2011-12-14 Yao Qi <yao@codesourcery.com>
12426 * i386-low.c (i386_low_stopped_data_address): Initialize local
12427 variable `control'.
12429 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12433 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12434 DR_CONTROL unless necessary. Extend comments.
12435 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12436 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12438 2011-12-13 Yao Qi <yao@codesourcery.com>
12440 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12442 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12444 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12446 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12447 Print new debug message for such case.
12449 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12451 Fix overlapping memcpy.
12452 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12453 the read_inferior_memory transfer.
12454 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12455 write_inferior_memory transfer.
12456 (set_fast_tracepoint_jump): New variable buf. Use it for the
12457 read_inferior_memory and write_inferior_memory transfers.
12458 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12459 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12460 Use it for the write_inferior_memory transfer.
12461 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12464 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12466 * linux-low.c (fetch_register, store_register): Make code
12467 consistent, fix formatting.
12469 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12471 * linux-low.c (usr_store_inferior_registers): Factor out code
12472 to handle individual registers into...
12473 (store_register): ... this new function.
12475 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12477 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12478 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12479 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12480 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12481 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12482 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12483 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12484 (srv_xmlfiles): Add new XML files.
12486 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12488 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12489 (init_registers_s390_linux32v1): Add prototype.
12490 (init_registers_s390_linux32v2): Likewise.
12491 (init_registers_s390_linux64v1): Likewise.
12492 (init_registers_s390_linux64v2): Likewise.
12493 (init_registers_s390x_linux64v1): Likewise.
12494 (init_registers_s390x_linux64v2): Likewise.
12495 (s390_num_regs): Increment to 52.
12496 (s390_regmap): Add orig_r2 register.
12497 (s390_num_regs_3264): Increment to 68.
12498 (s390_regmap_3264): Add orig_r2 register.
12499 (s390_collect_ptrace_register): Handle orig_r2 register.
12500 (s390_supply_ptrace_register): Likewise.
12501 (s390_fill_last_break): New function.
12502 (s390_store_last_break): Likewise.
12503 (s390_fill_system_call): New function.
12504 (s390_store_system_call): Likewise.
12505 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12507 (s390_check_regset): New function.
12508 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12509 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12510 Update target_regsets for available register sets.
12512 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12513 Jan Kratochvil <jan.kratochvil@redhat.com>
12515 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12516 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12518 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12519 * linux-low.h (struct process_info_private): New member r_debug.
12520 * server.c (handle_qxfer_libraries): Call
12521 the_target->qxfer_libraries_svr4.
12522 (handle_qxfer_libraries_svr4): New function.
12523 (qxfer_packets): New entry "libraries-svr4".
12524 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12525 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12526 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12527 PACKET_qXfer_libraries_svr4.
12529 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12531 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12532 PSW address/mask between 8-byte and 16-byte formats.
12533 (s390_supply_ptrace_register): Likewise.
12534 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12535 basic addressing mode bit.
12537 2011-11-24 Stan Shebs <stan@codesourcery.com>
12539 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12541 2011-11-17 Stan Shebs <stan@codesourcery.com>
12543 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12544 (tracing_start_time): New global.
12545 (tracing_stop_time): New global.
12546 (tracing_user_name): New global.
12547 (tracing_notes): New global.
12548 (tracing_stop_note): New global.
12549 (cmd_qtstart): Set traceframe_usage, start_time.
12550 (stop_tracing): Set stop_time.
12551 (cmd_qtstatus): Report additional status.
12552 (cmd_qtp): New function.
12553 (handle_tracepoint_query): Call it.
12554 (cmd_qtnotes): New function.
12555 (handle_tracepoint_general_set): Call it.
12556 (get_timestamp): Rename from tsv_get_timestamp.
12558 2011-11-14 Stan Shebs <stan@codesourcery.com>
12559 Kwok Cheung Yeung <kcy@codesourcery.com>
12561 * linux-x86-low.c (small_jump_insn): New.
12562 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12563 trampoline and error message, build a trampoline and issue a small
12564 jump instruction to it.
12565 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12566 trampoline and error message.
12567 (x86_get_min_fast_tracepoint_insn_len): New.
12568 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12569 * linux-low.h (struct linux_target_ops): Add arguments to
12570 install_fast_tracepoint_jump_pad operation, add new operation.
12571 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12573 (linux_get_min_fast_tracepoint_insn_len): New function.
12574 (linux_target_op): Add new operation.
12575 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12576 (gdb_trampoline_buffer_end): Ditto.
12577 (gdb_trampoline_buffer_error): Ditto.
12578 (struct ipa_sym_addresses): Add fields for new IPA variables.
12579 (symbol_list): Add entries for new IPA variables.
12580 (struct tracepoint): Add fields to hold the address range of the
12581 trampoline used by the tracepoint.
12582 (trampoline_buffer_head): New static variable.
12583 (trampoline_buffer_tail): Ditto.
12584 (claim_trampoline_space): New function.
12585 (have_fast_tracepoint_trampoline_buffer): New function.
12586 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12588 (install_fast_tracepoint): Ditto, also add error buffer argument.
12589 (cmd_qtminftpilen): New function.
12590 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12591 (fast_tracepoint_from_trampoline_address): New function.
12592 (fast_tracepoint_collecting): Handle trampoline as part of jump
12594 (set_trampoline_buffer_space): New function.
12595 (initialize_tracepoint): Initialize new IPA variables.
12596 * target.h (struct target_ops): Add arguments to
12597 install_fast_tracepoint_jump_pad operation, add new
12598 get_min_fast_tracepoint_insn_len operation.
12599 (target_get_min_fast_tracepoint_insn_len): New.
12600 (install_fast_tracepoint_jump_pad): Add arguments.
12601 * server.h (IPA_BUFSIZ): Define.
12602 * linux-i386-ipa.c: Include extra header files.
12603 (initialize_fast_tracepoint_trampoline_buffer): New function.
12604 (initialize_low_tracepoint): Call it.
12605 * server.h (set_trampoline_buffer_space): Declare.
12606 (claim_trampoline_space): Ditto.
12607 (have_fast_tracepoint_trampoline_buffer): Ditto.
12609 2011-11-14 Yao Qi <yao@codesourcery.com>
12611 * server.c (handle_query): Handle InstallInTrace for qSupported.
12612 * tracepoint.c (add_tracepoint): Sort list.
12613 (install_tracepoint, download_tracepoint): New.
12614 (cmd_qtdp): Call them to install and download tracepoints.
12615 (sort_tracepoints): Removed.
12616 (cmd_qtstart): Update.
12618 2011-11-14 Yao Qi <yao@codesourcery.com>
12620 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12621 * mem-break.h: Declare.
12622 * tracepoint.c (cmd_qtstart): Move some code to ...
12623 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12625 (download_tracepoints): Move some code to ...
12626 (download_tracepoint_1): ... here. New.
12628 2011-11-08 Yao Qi <yao@codesourcery.com>
12630 * remote-utils.c (relocate_instruction): A comment fix.
12632 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12634 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12635 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12636 dr_status_mirror and dr_control_mirror from debug_reg_state.
12637 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12638 (i386_initial_stuff): Remove use of deleted globals.
12639 (i386_get_thread_context, i386_set_thread_context,
12640 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12641 from debug_reg_state.
12643 2011-11-05 Yao Qi <yao@codesourcery.com>
12645 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12646 address as TPOINT's.
12648 2011-11-02 Stan Shebs <stan@codesourcery.com>
12650 * tracepoint.c (agent_mem_read_string): New function.
12651 (eval_agent_expr): Call it for tracenz.
12652 * server.c (handle_query): Report support for tracenz.
12654 2011-11-02 Yao Qi <yao@codesourcery.com>
12656 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12658 2011-11-02 Yao Qi <yao@codesourcery.com>
12660 * target.h: Fix a typo in comment.
12662 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12664 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12665 clobber the breakpoints' shadows with fast tracepoint jumps.
12666 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12667 * target.c (write_inferior_memory): Also pass MYADDR down to
12670 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12672 * configure.ac: Check support for personality routine.
12673 * configure: Regenerate.
12674 * config.in: Likewise.
12675 * linux-low.c: Include <sys/personality.h>.
12676 Define ADDR_NO_RANDOMIZE if necessary.
12677 (linux_create_inferior): Disable address space randomization when
12678 forking inferior, if requested.
12679 (linux_supports_disable_randomization): New function.
12680 (linux_target_ops): Install it.
12681 * server.h (disable_randomization): Declare.
12682 * server.c (disable_randomization): New global variable.
12683 (handle_general_set): Handle QDisableRandomization.
12684 (handle_query): Likewise for qSupported.
12685 (main): Support --disable-randomization and --no-disable-randomization
12686 command line arguments.
12687 * target.h (struct target_ops): Add supports_disable_randomization.
12688 (target_supports_disable_randomization): New macro.
12690 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12692 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12694 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12695 [!PT_GETDSBT] (target_loadmap): New definition.
12696 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12697 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12698 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12699 and PT_GETDSBT to LINUX_LOADMAP.
12700 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12701 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12703 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12705 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12706 (arm_linux_hwbp_cap): New static variable.
12707 (arm_linux_get_hwbp_cap): Replace by ...
12708 (arm_linux_init_hwbp_cap): ... this new function.
12709 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12710 (arm_linux_get_hw_watchpoint_count): Likewise.
12711 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12712 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12713 (arm_prepare_to_resume): Use perror_with_name instead of error.
12715 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12717 * linux-arm-low.c: Include <signal.h>.
12718 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12719 (struct arm_linux_hwbp_cap): New data type.
12720 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12721 (struct arm_linux_hw_breakpoint): New data type.
12722 (MAX_BPTS, MAX_WPTS): Define.
12723 (struct arch_process_info, struct arch_lwp_info): New data types.
12724 (arm_linux_get_hwbp_cap): New function.
12725 (arm_linux_get_hw_breakpoint_count): Likewise.
12726 (arm_linux_get_hw_watchpoint_count): Likewise.
12727 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12728 (arm_hwbp_control_initialize): Likewise.
12729 (arm_hwbp_control_is_enabled): Likewise.
12730 (arm_hwbp_control_is_initialized): Likewise.
12731 (arm_hwbp_control_disable): Likewise.
12732 (arm_linux_hw_breakpoint_equal): Likewise.
12733 (arm_linux_hw_point_initialize): Likewise.
12734 (struct update_registers_data): New data structure.
12735 (update_registers_callback: New function.
12736 (arm_insert_point): Likewise.
12737 (arm_remove_point): Likewise.
12738 (arm_stopped_by_watchpoint): Likewise.
12739 (arm_stopped_data_address): Likewise.
12740 (arm_new_process): Likewise.
12741 (arm_new_thread): Likewise.
12742 (arm_prepare_to_resume): Likewise.
12743 (the_low_target): Register arm_insert_point, arm_remove_point,
12744 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12745 arm_new_thread, and arm_prepare_to_resume.
12747 2011-09-15 Stan Shebs <stan@codesourcery.com>
12749 * server.h (struct emit_ops): Add compare-goto fields.
12750 * tracepoint.c (gdb_agent_op_sizes): New table.
12751 (emit_eq_goto): New function.
12752 (emit_ne_goto): New function.
12753 (emit_lt_goto): New function.
12754 (emit_le_goto): New function.
12755 (emit_gt_goto): New function.
12756 (emit_ge_goto): New function.
12757 (is_goto_target): New function.
12758 (compile_bytecodes): Recognize special cases of compare-goto
12759 combinations and call specialized emitters for them.
12760 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12761 (amd64_emit_ne_goto): New function.
12762 (amd64_emit_lt_goto): New function.
12763 (amd64_emit_le_goto): New function.
12764 (amd64_emit_gt_goto): New function.
12765 (amd64_emit_ge_goto): New function.
12766 (amd64_emit_ops): Add the new functions.
12767 (i386_emit_eq_goto): New function.
12768 (i386_emit_ne_goto): New function.
12769 (i386_emit_lt_goto): New function.
12770 (i386_emit_le_goto): New function.
12771 (i386_emit_gt_goto): New function.
12772 (i386_emit_ge_goto): New function.
12773 (i386_emit_ops): Add the new functions.
12775 2011-09-08 Stan Shebs <stan@codesourcery.com>
12777 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12778 (i386_emit_epilogue): Restore %ebx.
12780 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12782 * server.c (step_thread): Remove definition.
12783 (process_serial_event): Don't handle Hs.
12784 * server.h (step_thread): Remove declaration.
12785 * target.c (set_desired_inferior): Remove use of step_thread.
12787 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12789 * linux-low.c: Include linux-procfs.h.
12790 (linux_attach_lwp_1): Update comments.
12791 (linux_attach): Scan for existing threads when attaching to a
12792 process that is the tgid.
12793 * Makefile.in: Update dependencies.
12795 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12797 * configure.srv: Add linux-procfs.o dependencies.
12799 2011-08-14 Yao Qi <yao@codesourcery.com>
12801 * target.h (struct target_ops): Fix indent.
12802 * win32-low.c (win32_target_ops): Fix comment.
12804 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12805 Yao Qi <yao@codesourcery.com>
12807 * Makefile.in (clean): Remove tic6x-*.c files.
12808 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12809 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12810 (tic6x-c64xp-linux.c): Likewise.
12811 * configure.srv: Add support for tic6x-*-uclinux.
12812 * linux-tic6x-low.c: New.
12813 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12815 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12816 Yao Qi <yao@codesourcery.com>
12818 * target.h (struct target_ops): Add read_loadmap.
12819 * linux-low.c (struct target_loadseg): New type.
12820 (struct target_loadmap): New type.
12821 (linux_read_loadmap): New function.
12822 (linux_target_ops): Add linux_read_loadmap.
12823 * server.c (handle_query): Support qXfer:fdpic:read packet.
12824 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12827 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12829 * win32-low.c: Include <stdint.h>.
12831 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12833 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12834 to the inferior here.
12835 (i386_remove_aligned_watchpoint): Ditto.
12836 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12837 fit part of the watchpoint in the debug registers.
12838 (i386_update_inferior_debug_regs): New.
12839 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12840 registers, and only update the inferior on success.
12841 (i386_low_remove_watchpoint): Ditto.
12843 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12845 * linux-low.c (compare_ints, unique, list_threads, show_process,
12846 linux_core_of_thread): Delete.
12847 (linux_target_ops): Change linux_core_of_thread to
12848 linux_common_core_of_thread.
12849 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12850 * utils.c (malloc_failure): Change type of argument.
12851 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12852 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12853 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12854 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12855 (IPA_OBJS): Add common-utils-ipa.o.
12856 (ptid_h, linux_osdata_h): New macros.
12857 (server_h): Add common/common-utils.h, common/xml-utils.h,
12858 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12860 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12861 ptid.o, buffer.o): New rules.
12862 (linux-low.o): Add common/linux-osdata.h as a dependency.
12863 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12864 * configure.ac: Add AC_HEADER_DIRENT check.
12865 * config.in: Regenerate.
12866 * configure: Regenerate.
12867 * remote-utils.c (xml_escape_text): Delete.
12868 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12869 buffer_xml_printf): Move to common/buffer.c.
12870 * server.c (main): Remove call to initialize_inferiors.
12871 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12872 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12873 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12874 internal_error, gdb_assert, gdb_assert_fail): Delete.
12875 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12876 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12878 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12879 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12880 initialize_inferiors): Delete.
12882 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12884 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12887 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12889 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12891 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12893 2011-05-26 Yao Qi <yao@codesourcery.com>
12895 * Makefile.in (thread-db.o): Track dependence to
12896 common/gdb_thread_db.h.
12897 * thread-db.c: include gdb_thread_db.h from right place.
12899 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12901 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12902 __FILE__ and __LINE__ to internal_error.
12904 2011-05-13 Doug Evans <dje@google.com>
12906 * thread-db.c (try_thread_db_load_from_sdir): New function.
12907 (try_thread_db_load_from_dir): New function.
12908 (thread_db_load_search): Handle $sdir, ignore $pdir.
12909 Remove trying of system directories if search of
12910 libthread-db-search-path fails, that is now done via $sdir.
12912 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12914 * server.c (handle_query): Add EnableDisableTracepoints to the list
12915 of supported features.
12916 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12918 (cmd_qtenable_disable): New.
12919 (cmd_qtstart): Install tracepoints even if disabled.
12920 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12921 receiving a QTEnable or QTDisable packet.
12922 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12923 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12925 (gdb_probe): Skip data collection if static tracepoint is disabled.
12927 2011-05-10 Doug Evans <dje@google.com>
12929 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12931 2011-05-04 Doug Evans <dje@google.com>
12933 * linux-low.c (linux_join): Skip process lookup.
12934 * spu-low.c (spu_join): Ditto.
12935 * server.c (join_inferiors_callback): Delete.
12936 (process_serial_event): For 'D' packet (detach) call join_inferior
12939 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12941 * README: Don't mention xscale*-*-linux*.
12942 * configure.srv (xscale*-*-linux*): Don't handle target.
12944 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12946 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12948 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12949 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12950 (i386_emit_void_call_2): Likewise.
12952 2011-04-26 Yao Qi <yao@codesourcery.com>
12954 * linux-low.c: Move common macros to linux-ptrace.h.
12955 Include linux-ptrace.h.
12956 * Makefile.in (linux_ptrace_h): New.
12957 (linux-low.o): Depends on linux-ptrace.h.
12959 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12961 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12962 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12963 (remote_prepare): New function with most of the TCP code from ...
12964 (remote_open): ... here. Detect PORT here unconditionally. Move also
12965 setting transport_is_reliable.
12966 * server.c (run_once): New variable.
12967 (gdbserver_usage): Document it.
12968 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12969 the first run if RUN_ONCE.
12970 * server.h (run_once, remote_prepare): New declarations.
12972 2011-04-19 Tom Tromey <tromey@redhat.com>
12974 * win32-low.c (handle_load_dll): Remove duplicate "the".
12976 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12978 Remove support for old Cygwin 1.5 versions.
12979 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12980 function to avoid warning.
12981 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12984 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12986 * gdbserver/server.h (Macro _): Define it if not available.
12988 2011-03-14 Michael Snyder <msnyder@vmware.com>
12990 * hostio.c (handle_close): Remove unnecessary null test.
12992 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12994 * Makefile.in (maintainer-clean realclean distclean): Remove
12995 "make ... subdir_do" command.
12997 2011-03-10 Michael Snyder <msnyder@vmware.com>
12999 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13001 * server.c (handle_v_run): Free alloced buffer on early return.
13003 2011-03-09 Yao Qi <yao@codesourcery.com>
13006 2011-03-04 Yao Qi <yao@codesourcery.com>
13008 * Makefile.in: Remove GNU make feature --directory.
13010 2011-03-05 Yao Qi <yao@codesourcery.com>
13012 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13013 (subdir_do): New make target. Copied from gdb/Makefile.
13014 (maintainer-clean, realclean, distclean, clean): Call corresponding
13015 make targets in common/Makefile.
13017 2011-02-11 Yao Qi <yao@codesourcery.com>
13019 * configure.ac: Call AC_PROG_RANLIB.
13020 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13021 * configure: Regenerate.
13023 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13025 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13027 2011-03-06 Yao Qi <yao@codesourcery.com>
13029 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13031 2011-03-05 Yao Qi <yao@codesourcery.com>
13033 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13034 (subdir_do): New make target. Copied from gdb/Makefile.
13035 (maintainer-clean, realclean, distclean, clean): Call corresponding
13036 make targets in common/Makefile.
13038 2011-03-04 Yao Qi <yao@codesourcery.com>
13040 * Makefile.in: Remove GNU make feature --directory.
13042 2011-03-04 Michael Snyder <msnyder@vmware.com>
13044 * server.c (queue_stop_reply): Call xmalloc not malloc.
13046 2011-03-02 Michael Snyder <msnyder@vmware.com>
13048 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13050 2011-02-28 Michael Snyder <msnyder@vmware.com>
13052 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13053 (cmd_qtframe): Ditto.
13054 (cmd_qtbuffer): Ditto.
13055 (cmd_bigqtbuffer): Ditto.
13057 * utils.c (decimal2str): Initialize 'width' to nine, then
13058 don't mess with it.
13060 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13062 * hostio.c (require_data): Free *data, not data.
13064 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13066 * hostio.c (require_data): Use free, not xfree.
13068 2011-02-27 Michael Snyder <msnyder@vmware.com>
13070 * server.c (handle_query): Discard unused value.
13072 * hostio.c (require_data): Free malloc memory before returning
13075 2011-02-26 Michael Snyder <msnyder@vmware.com>
13077 * linux-low.c (list_threads): Call closedir for dirent.
13079 2011-02-27 Michael Snyder <msnyder@vmware.com>
13081 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13082 a case statement falls through.
13084 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13086 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13089 2011-02-26 Michael Snyder <msnyder@vmware.com>
13091 * utils.c (decimal2str): Eliminate dead code and dead param.
13092 (pulongest): Drop dead param from call to decimal2str.
13095 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13097 Revert the following patch (not approved yet):
13098 2011-02-21 Hui Zhu <teawater@gmail.com>
13099 * tracepoint.c (tp_printf): New function.
13100 (eval_agent_expr): Handle gdb_agent_op_printf.
13102 2011-02-21 Hui Zhu <teawater@gmail.com>
13104 * tracepoint.c (tp_printf): New function.
13105 (eval_agent_expr): Handle gdb_agent_op_printf.
13107 2011-02-18 Tom Tromey <tromey@redhat.com>
13109 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13110 (tracepoint.o): Likewise.
13111 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13112 (gdb_agent_op_names): Likewise.
13114 2011-02-18 Tom Tromey <tromey@redhat.com>
13116 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13117 gdb_agent_op_rot>: New constants.
13118 (gdb_agent_op_names): Add pick and roll.
13119 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13122 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13124 * aclocal.m4: Regenerated with aclocal-1.11.1.
13126 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13128 * server.c (handle_qxfer_traceframe_info): New.
13129 (qxfer_packets): Register "traceframe-info".
13130 (handle_query): Report support for qXfer:traceframe-info:read+.
13131 * tracepoint.c (match_blocktype): New.
13132 (traceframe_find_block_type): Rename to ...
13133 (traceframe_walk_blocks): ... this. Add callback filter argument,
13135 (traceframe_find_block_type): New, reimplemented on top of
13136 traceframe_walk_blocks.
13137 (build_traceframe_info_xml): New.
13138 (traceframe_read_info): New.
13139 * server.h (traceframe_read_info): Declare.
13141 2011-02-11 Yao Qi <yao@codesourcery.com>
13143 * configure.ac: Call AC_PROG_RANLIB.
13144 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13145 * configure: Regenerate.
13147 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13149 * server.c (gdb_read_memory): Change return semantics to allow
13151 (handle_search_memory_1): Adjust.
13152 (process_serial_event) <'m' packet>: Handle partial transfers.
13153 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13155 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13157 * regcache.c (init_register_cache): Initialize
13158 regcache->register_status.
13159 (free_register_cache): Release regcache->register_status.
13160 (regcache_cpy): Copy register_status.
13161 (registers_to_string): Print 'x's for unavailable registers.
13162 (supply_register): Mark the register's status valid or
13163 unavailable, depending on whether a buffer was passed in or not.
13164 (supply_register_zeroed): New.
13165 (supply_regblock): Mark the registers' status valid or
13166 unavailable, depending on whether a buffer was passed in or not.
13167 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13168 (struct regcache): New `register_status' field.
13169 (supply_register_zeroed): Declare.
13170 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13171 supply_register_zeroed, rather than passing a NULL buffer to
13173 * tracepoint.c (fetch_traceframe_registers): Update comment.
13175 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13177 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13180 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13182 * server.h (decode_xfer_write): Change prototype.
13183 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13184 and don't extract the annex here.
13185 * server.c (decode_xfer_read): Remove `annex' parameter,
13186 and don't extract the annex here.
13187 (decode_xfer): New.
13188 (struct qxfer): New.
13189 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13190 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13191 (handle_qxfer_statictrace): New functions, abstracted out from
13192 handle_query, and made to use the struct qxfer interface.
13193 (handle_threads_qxfer_proper): Rename to ...
13194 (handle_qxfer_threads_proper): ... this.
13195 (handle_threads_qxfer): Rename to ...
13196 (handle_qxfer_threads): ... this. Adjust.
13197 (qxfer_packets): New array.
13198 (handle_qxfer): New function.
13199 (handle_query): Use handle_qxfer.
13201 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13203 * gdbreplay.c: Shorten lines of >= 80 columns.
13204 * linux-low.c: Ditto.
13205 * linux-ppc-low.c: Ditto.
13206 * linux-s390-low.c: Ditto.
13207 * linux-sparc-low.c: Ditto.
13208 * linux-x86-low.c: Ditto.
13209 * linux-xtensa-low.c: Ditto.
13210 * mem-break.c: Ditto.
13211 * nto-low.c: Ditto.
13212 * regcache.h: Ditto.
13213 * remote-utils.c: Ditto.
13216 * thread-db.c: Ditto.
13217 * tracepoint.c: Ditto.
13219 * win32-low.h: Ditto.
13221 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13223 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13226 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13228 * server.c (gdbserver_version): Update copyright year in version
13230 * gdbreplay.c (gdbreplay_version): Ditto.
13232 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13234 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13235 * linux-bfin-low.c: New file.
13236 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13237 PT_DATA_ADDR for BFIN targets.
13238 * Makefile.in (SFILES): Add linux-bfin-low.c.
13239 (clean): Remove reg-bfin.c.
13240 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13241 * README: Mention supported Blackfin targets.
13243 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13245 * .gitignore: New file.
13247 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13249 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13251 2010-10-22 Jie Zhang <jie@codesourcery.com>
13253 * Makefile.in: Add FLAGS_TO_PASS variable.
13254 (install): Remove dependency of install-only and recursively
13255 invoke make for install-only.
13257 2010-10-04 Doug Evans <dje@google.com>
13259 * Makefile.in (uninstall): Use $(DESTDIR).
13261 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13265 * linux-x86-low.c (compat_siginfo_from_siginfo)
13266 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13267 si_code is < 0. Check for si_code == SI_TIMER before checking for
13270 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13272 * lynx-i386-low.c: New file.
13273 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13275 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13277 * lynx-low.c (ptrace_request_to_str): Remove handling for
13278 request values that have been removed in LynxOS 5.x.
13280 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13282 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13285 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13287 * configure.ac: Add --enable-inprocess-agent option.
13288 * configure: Rebuilt.
13290 2010-09-06 Yao Qi <yao@codesourcery.com>
13292 * linux-low.c (linux_kill): Remove unused variable.
13293 (linux_stabilize_threads): Likewise.
13294 * server.c (start_inferior): Likewise.
13295 (queue_stop_reply_callback): Likewise.
13296 * tracepoint.c (do_action_at_tracepoint): Likewise.
13298 2010-09-06 Yao Qi <yao@codesourcery.com>
13300 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13303 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13305 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13307 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13309 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13312 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13314 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13315 gdbserver/lynx-ppc-low.c: New files.
13316 * Makefile.in (lynx_low_h): New variable.
13317 (lynx-low.o, lynx-ppc-low.o): New rules.
13318 * configure.ac: On LynxOS, link with -lnetinet.
13319 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13320 * configure: regenerate.
13322 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13324 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13325 * configure.ac: Add check for vasprintf and vsnprintf.
13326 * configure, config.in: Regenerate.
13327 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13329 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13331 * gdbreplay.c: Move include of alloca.h up, next to include of
13333 * server.h: Add include of malloc.h.
13334 * mem-break.c: Remove include of malloc.h.
13335 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13337 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13339 * Makefile.in (memmem.o): Build with -Wno-error.
13341 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13343 * utils.c (xsnprintf): Make non-static.
13344 * server.h: Add xsnprintf declaration.
13345 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13346 replace calls to snprintf by calls to xsnprintf throughout.
13348 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13350 * configure.ac: Add configure check for alloca.
13351 * configure, config.in: Regenerate.
13352 * server.h: Include alloca.h if it exists.
13353 * gdbreplay.c: Include alloca.h if it exists.
13355 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13357 * linux-low.c (__SIGRTMIN): Define if not already defined.
13358 (linux_create_inferior): Check for __ANDROID__ rather than
13360 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13361 are already deferred.
13362 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13363 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13364 stopped and already has a pending signal to report.
13365 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13366 a pending signal to report or is moving out of a jump pad.
13367 (linux_init_signals): Check for __ANDROID__ rather than
13370 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13372 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13373 debug_threads check. Avoid a linear search when not doing debug
13376 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13378 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13379 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13380 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13381 (process_event): Change local fd's type to gdb_fildes_t.
13382 (create_file_handler): Adjust prototype.
13383 (delete_file_handler): Adjust prototype.
13384 (handle_file_event): Adjust prototype. Use pfildes.
13385 (create_file_event): Adjsut prototype.
13386 * remote-utils.c (remote_desc, listen_desc): Change type to
13388 * server.h: New gdb_fildes_t typedef.
13389 [USE_WIN32API]: Include winsock2.h.
13390 (delete_file_handler, add_file_handler): Adjust prototypes.
13391 (pfildes): Declare.
13392 * utils.c (pfildes): New.
13394 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13396 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13397 * configure: Regenerate.
13399 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13401 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13402 (linux_done_accessing_memory): ... this.
13403 (linux_target_ops): Adjust.
13404 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13405 * nto-low.c (nto_target_ops): Adjust comment.
13406 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13407 * spu-low.c (spu_target_ops): Adjust comment.
13408 * target.h (target_ops): Rename unprepare_to_access_memory field
13409 to done_accessing_memory.
13410 (unprepare_to_access_memory): Rename to ...
13411 (done_accessing_memory): ... this.
13413 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13415 * linux-low.c (linux_prepare_to_access_memory): New.
13416 (linux_unprepare_to_access_memory): New.
13417 (linux_target_ops): Install them.
13418 * server.c (read_memory): Rename to ...
13419 (gdb_read_memory): ... this. Use
13420 prepare_to_access_memory/prepare_to_access_memory.
13421 (write_memory): Rename to ...
13422 (gdb_write_memory): ... this. Use
13423 prepare_to_access_memory/prepare_to_access_memory.
13424 (handle_search_memory_1): Adjust.
13425 (process_serial_event): Adjust.
13426 * target.h (struct target_ops): New fields
13427 prepare_to_access_memory and unprepare_to_access_memory.
13428 (prepare_to_access_memory, unprepare_to_access_memory): New.
13429 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13430 prepare_to_access_memory/prepare_to_access_memory.
13431 * nto-low.c (nto_target_ops): Adjust.
13432 * spu-low.c (spu_target_ops): Adjust.
13433 * win32-low.c (win32_target_ops): Adjust.
13435 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13437 * Makefile.in (WARN_CFLAGS): Get it from configure.
13438 (WERROR_CFLAGS): New.
13439 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13440 * configure.ac: Introduce --enable-werror, which adds -Werror to
13441 the compiler command line. Enabled by default. Disable with
13442 --disable-werror. Add -Wdeclaration-after-statement
13443 Wpointer-arith and -Wformat-nonliteral to warning flags.
13444 * configure: Regenerate.
13446 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13448 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13450 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13452 * gdbreplay.c (remote_error): New.
13454 (expect): Use gdbchar. Check for error reading from GDB.
13455 Clarify sync error output.
13456 (play): Check for errors writing to GDB.
13457 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13458 * remote-utils.c (getpkt): Check for errors writing to the remote
13461 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13463 * linux-low.c (linux_wait_1): Move non-debugging code out of
13464 `debug_threads' control.
13466 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13468 * linux-low.c (linux_wait_1): Don't set last_status here.
13469 * server.c (push_event, queue_stop_reply_callback): Assert we're
13470 not pushing a TARGET_WAITKIND_IGNORE event.
13471 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13472 (myresume, handle_target_event): Set the thread's last_resume_kind
13473 and last_status from the target returned status.
13475 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13479 * linux-x86-low.c (update_debug_registers_callback): New.
13480 (i386_dr_low_set_addr): Use it.
13481 (i386_dr_low_get_addr): New.
13482 (i386_dr_low_set_control): Use update_debug_registers_callback.
13483 (i386_dr_low_get_control): New.
13484 (i386_dr_low_get_status): Adjust.
13485 * linux-low.c (linux_stop_lwp): New.
13486 * linux-low.h (linux_stop_lwp): Declare.
13488 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13489 argument instead of a i386_debug_reg_state.
13490 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13491 a i386_debug_reg_state.
13492 (i386_insert_aligned_watchpoint): Adjust.
13493 (i386_remove_aligned_watchpoint): Adjust.
13494 (i386_low_stopped_data_address): Read the debug registers from the
13495 inferior instead of from the mirrors.
13496 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13497 (i386_dr_low_get_addr): Declare.
13498 (i386_dr_low_get_control): Declare.
13499 (i386_dr_low_get_status): Change prototype.
13501 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13502 (i386_dr_low_get_addr): New.
13503 (i386_dr_low_get_control): New.
13504 (i386_dr_low_get_status): Adjust prototype. Return
13506 (i386_initial_stuff): Clear dr_status_mirror and
13508 (i386_get_thread_context): Adjust.
13509 (i386_set_thread_context): Adjust.
13510 (i386_thread_added): Adjust.
13512 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13514 * linux-low.h (linux_thread_area): Delete declaration.
13516 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13518 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13519 after its termination.
13521 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13523 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13524 (gdb_wants_all_stopped): Delete.
13525 (linux_wait_1): Don't call them.
13526 * server.c (handle_v_cont): Tag all threads as want-stopped.
13527 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13528 stopped as "client-wants-stopped".
13530 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13532 * Makefile.in (signals_h): New.
13533 (server_h): Depend on it.
13534 (server.o): Don't depend on $(signals_def).
13535 (signals.o): Depend on $(signals_def).
13537 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13539 * Makefile.in (signals_def): New.
13540 (server_h): Append include/gdb/signals.h and signals_def.
13541 (server.o): Append signals_def.
13543 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13545 * server.c (handle_target_event): Use target_signal_to_host for
13546 resume_info.sig initialization.
13547 * target.h (struct thread_resume) <sig>: New comment.
13549 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13551 * server.c (handle_query): strcpy() the returned string from paddress()
13552 instead of sprintf().
13553 * utils.c (paddress): Return phex_nz().
13555 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13557 * server.c (handle_v_cont): Call mourn_inferior if process
13559 (myresume): Likewise.
13561 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13563 Static tracepoints, and integration with UST.
13565 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13566 * mem-break.c (uninsert_all_breakpoints)
13567 (reinsert_all_breakpoints): New.
13568 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13569 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13570 (gdb_agent_ust_loaded, helper_thread_id)
13571 (gdb_agent_helper_thread_id): New macros.
13572 (struct ipa_sym_addresses): Add addr_ust_loaded,
13573 addr_helper_thread_id, addr_cmd_buf.
13574 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13575 (in_process_agent_loaded_ust): New.
13576 (write_e_ust_not_loaded): New.
13577 (maybe_write_ipa_ust_not_loaded): New.
13578 (struct collect_static_trace_data_action): New.
13579 (enum tracepoint_type) <static_tracepoint>: New.
13580 (struct tracepoint) <handle>: Mention static tracepoints.
13581 (struct static_tracepoint_ctx): New.
13582 (CMD_BUF_SIZE): New.
13583 (add_tracepoint_action): Handle static tracepoint actions.
13584 (unprobe_marker_at): New.
13585 (clear_installed_tracepoints): Handle static tracepoints.
13586 (cmd_qtdp): Handle static tracepoints.
13587 (probe_marker_at): New.
13588 (cmd_qtstart): Handle static tracepoints.
13589 (response_tracepoint): Handle static tracepoints.
13590 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13591 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13592 (get_context_regcache): Handle static tracepoints.
13593 (do_action_at_tracepoint): Handle static tracepoint actions.
13594 (traceframe_find_block_type): Handle static trace data blocks.
13595 (traceframe_read_sdata): New.
13596 (download_tracepoints): Download static tracepoint actions.
13597 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13598 (GDB_PROBE_NAME): New.
13600 (GET_UST_SYM): New.
13603 (ust_marker_to_static_tracepoint): New.
13605 (collect_ust_data_at_tracepoint): New.
13606 (gdb_ust_probe): New.
13607 (UNIX_PATH_MAX, SOCK_DIR): New.
13608 (gdb_ust_connect_sync_socket): New.
13609 (resume_thread, stop_thread): New.
13610 (run_inferior_command): New.
13611 (init_named_socket): New.
13612 (gdb_ust_socket_init): New.
13613 (cstr_to_hexstr): New.
13615 (first_marker, next_marker): New.
13616 (response_ust_marker): New.
13617 (cmd_qtfstm, cmd_qtsstm): New.
13618 (unprobe_marker_at, probe_marker_at): New.
13619 (cmd_qtstmat, gdb_ust_thread): New.
13620 (gdb_ust_init): New.
13621 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13622 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13623 (ST_REGENTRY): New.
13624 (x86_64_st_collect_regmap): New.
13625 (X86_64_NUM_ST_COLLECT_GREGS): New.
13626 (AMD64_RIP_REGNUM): New.
13627 (supply_static_tracepoint_registers): New.
13628 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13629 (ST_REGENTRY): New.
13630 (i386_st_collect_regmap): New.
13631 (i386_NUM_ST_COLLECT_GREGS): New.
13632 (supply_static_tracepoint_registers): New.
13633 * server.c (handle_query): Handle qXfer:statictrace:read.
13634 <qSupported>: Report support for StaticTracepoints, and
13635 qXfer:statictrace:read features.
13636 * server.h (traceframe_read_sdata)
13637 (supply_static_tracepoint_registers): Declare.
13638 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13639 (unpack_varlen_hex): Include in IPA build.
13640 * Makefile.in (ustlibs, ustinc): New.
13641 (IPA_OBJS): Add remote-utils-ipa.o.
13642 ($(IPA_LIB)): Link -ldl and -lpthread.
13644 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13645 * config.in, configure: Regenerate.
13647 2010-06-20 Ian Lance Taylor <iant@google.com>
13648 Pedro Alves <pedro@codesourcery.com>
13650 * linux-x86-low.c (always_true): Delete.
13651 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13652 trying to fool the compiler with always_true.
13654 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13656 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13657 conditions in gdbserver.
13659 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13661 * spu-low.c (spu_read_memory): Wrap around local store limit.
13662 (spu_write_memory): Likewise.
13664 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13666 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13667 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13669 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13671 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13672 uses with LONGEST uses.
13674 2010-06-14 Stan Shebs <stan@codesourcery.com>
13675 Pedro Alves <pedro@codesourcery.com>
13679 * linux-x86-low.c: Include limits.h.
13681 (always_true): New.
13684 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13685 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13686 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13687 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13688 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13689 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13690 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13691 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13692 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13693 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13694 (amd64_emit_void_call_2): New.
13695 (amd64_emit_ops): New.
13696 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13697 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13698 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13699 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13700 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13701 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13702 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13703 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13704 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13705 (i386_emit_stack_adjust, i386_emit_int_call_1)
13706 (i386_emit_void_call_2): New.
13707 (i386_emit_ops): New.
13708 (x86_emit_ops): New.
13709 (the_low_target): Install x86_emit_ops.
13710 * server.h (struct emit_ops): New.
13711 (get_raw_reg_func_addr): Declare.
13712 (current_insn_ptr, emit_error): Declare.
13713 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13714 (set_trace_state_variable_value): New defines.
13715 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13716 addr_get_trace_state_variable_value and
13717 addr_set_trace_state_variable_value.
13718 (symbol_list): New fields for get_raw_reg,
13719 get_trace_state_variable_value and set_trace_state_variable_value.
13720 (condfn): New typedef.
13721 (struct tracepoint): New field `compiled_cond'.
13722 (do_action_at_tracepoint): Clear compiled_cond.
13723 (get_trace_state_variable_value, set_trace_state_variable_value):
13725 (condition_true_at_tracepoint): If there's a compiled condition,
13727 (current_insn_ptr, emit_error): New globals.
13728 (struct bytecode_address): New.
13729 (get_raw_reg_func_addr): New.
13730 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13731 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13732 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13733 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13734 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13735 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13736 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13737 (compile_tracepoint_condition, compile_bytecodes): New.
13738 * target.h (emit_ops): Forward declare.
13739 (struct target_ops): New field emit_ops.
13740 (target_emit_ops): New.
13741 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13742 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13743 * linux-low.c (linux_emit_ops): New.
13744 (linux_target_ops): Install it.
13745 * linux-low.h (struct linux_target_ops): New field emit_ops.
13747 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13749 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13750 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13752 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13753 Stan Shebs <stan@codesourcery.com>
13755 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13756 (all): Depend on $(extra_libraries).
13757 (install-only): Install the IPA.
13758 (IPA_OBJS, IPA_LIB): New.
13759 (clean): Remove the IPA lib.
13760 (IPAGENT_CFLAGS): New.
13761 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13762 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13763 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13764 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13765 * configure.ac: Check for atomic builtins support in the compiler.
13766 (IPA_DEPFILES, extra_libraries): Define.
13767 * configure.srv (ipa_obj): Add description.
13768 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13769 (i[34567]86-*-linux*): Set ipa_obj.
13770 (x86_64-*-linux*): Set ipa_obj.
13771 * linux-low.c (stabilizing_threads): New.
13772 (supports_fast_tracepoints): New.
13773 (linux_detach): Stabilize threads before detaching.
13774 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13775 the lwp is either not stabilizing, or is moving out of a jump pad.
13776 (linux_fast_tracepoint_collecting): New.
13777 (maybe_move_out_of_jump_pad): New.
13778 (enqueue_one_deferred_signal): New.
13779 (dequeue_one_deferred_signal): New.
13780 (linux_wait_for_event_1): If moving out of a jump pad, defer
13781 pending signals to later.
13782 (linux_stabilize_threads): New.
13783 (linux_wait_1): Check if threads need moving out of jump pads, and
13785 (stuck_in_jump_pad_callback): New.
13786 (move_out_of_jump_pad_callback): New.
13787 (lwp_running): New.
13788 (linux_resume_one_lwp): Handle moving out of jump pads.
13789 (linux_set_resume_request): Dequeue deferred signals.
13790 (need_step_over_p): Also step over fast tracepoint jumps.
13791 (start_step_over): Also uninsert fast tracepoint jumps.
13792 (finish_step_over): Also reinsert fast tracepoint jumps.
13793 (linux_install_fast_tracepoint_jump): New.
13794 (linux_target_ops): Install linux_stabilize_threads and
13795 linux_install_fast_tracepoint_jump_pad.
13796 * linux-low.h (linux_target_ops) <get_thread_area,
13797 install_fast_tracepoint_jump_pad>: New fields.
13798 (struct lwp_info) <collecting_fast_tracepoint,
13799 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13800 (linux_get_thread_area): Declare.
13801 * linux-x86-low.c (jump_insn): New.
13802 (x86_get_thread_area): New.
13803 (append_insns): New.
13804 (push_opcode): New.
13805 (amd64_install_fast_tracepoint_jump_pad): New.
13806 (i386_install_fast_tracepoint_jump_pad): New.
13807 (x86_install_fast_tracepoint_jump_pad): New.
13808 (the_low_target): Install x86_get_thread_area and
13809 x86_install_fast_tracepoint_jump_pad.
13810 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13811 (struct fast_tracepoint_jump): New.
13812 (fast_tracepoint_jump_insn): New.
13813 (fast_tracepoint_jump_shadow): New.
13814 (find_fast_tracepoint_jump_at): New.
13815 (fast_tracepoint_jump_here): New.
13816 (delete_fast_tracepoint_jump): New.
13817 (set_fast_tracepoint_jump): New.
13818 (uninsert_fast_tracepoint_jumps_at): New.
13819 (reinsert_fast_tracepoint_jumps_at): New.
13820 (set_breakpoint_at): Use write_inferior_memory.
13821 (uninsert_raw_breakpoint): Use write_inferior_memory.
13822 (check_mem_read): Mask out fast tracepoint jumps.
13823 (check_mem_write): Mask out fast tracepoint jumps.
13824 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13825 (set_fast_tracepoint_jump): Declare.
13826 (delete_fast_tracepoint_jump)
13827 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13828 (reinsert_fast_tracepoint_jumps_at): Declare.
13829 * regcache.c: Don't compile many functions when building the
13830 in-process agent library.
13831 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13832 the register buffer in the heap.
13833 (free_register_cache): If the register buffer isn't owned by the
13834 regcache, don't free it.
13835 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13836 pre-existing register caches.
13837 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13839 (convert_ascii_to_int): : Constify `from' parameter type.
13840 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13841 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13842 the needed buffer in-place.
13843 (relocate_instruction): New.
13844 * server.c (handle_query) <qSymbols>: If the target supports
13845 tracepoints, give it a chance of looking up symbols. Report
13846 support for fast tracepoints.
13847 (handle_status): Stabilize threads.
13848 (process_serial_event): Adjust.
13849 * server.h (struct fast_tracepoint_jump): Forward declare.
13850 (struct process_info) <fast_tracepoint_jumps>: New field.
13851 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13852 (decode_X_packet, decode_M_packet): Adjust.
13853 (relocate_instruction): Declare.
13854 (in_process_agent_loaded): Declare.
13855 (tracepoint_look_up_symbols): Declare.
13856 (struct fast_tpoint_collect_status): Declare.
13857 (fast_tracepoint_collecting): Declare.
13858 (force_unlock_trace_buffer): Declare.
13859 (handle_tracepoint_bkpts): Declare.
13860 (initialize_low_tracepoint)
13861 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13862 * target.h (struct target_ops) <stabilize_threads,
13863 install_fast_tracepoint_jump_pad>: New fields.
13864 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13865 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13866 [HAVE_STDINT_H]: Include stdint.h.
13867 (trace_debug_1): Rename to ...
13868 (trace_vdebug): ... this.
13869 (trace_debug): Rename to ...
13870 (trace_debug_1): ... this. Add `level' parameter.
13871 (trace_debug): New.
13872 (ATTR_USED, ATTR_NOINLINE): New.
13873 (IP_AGENT_EXPORT): New.
13874 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13875 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13876 (about_to_request_buffer_space, trace_buffer_is_full)
13877 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13878 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13879 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13880 (traceframe_write_count, traceframes_created)
13881 (trace_state_variables)
13882 New renaming defines.
13883 (struct ipa_sym_addresses): New.
13884 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13885 (symbol_list): New.
13886 (ipa_sym_addrs): New.
13887 (all_tracepoint_symbols_looked_up): New.
13888 (in_process_agent_loaded): New.
13889 (write_e_ipa_not_loaded): New.
13890 (maybe_write_ipa_not_loaded): New.
13891 (tracepoint_look_up_symbols): New.
13892 (debug_threads) [IN_PROCESS_AGENT]: New.
13893 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13894 (UNKNOWN_SIDE_EFFECTS): New.
13895 (stop_tracing): New.
13896 (flush_trace_buffer): New.
13897 (stop_tracing_bkpt): New.
13898 (flush_trace_buffer_bkpt): New.
13899 (read_inferior_integer): New.
13900 (read_inferior_uinteger): New.
13901 (read_inferior_data_pointer): New.
13902 (write_inferior_data_pointer): New.
13903 (write_inferior_integer): New.
13904 (write_inferior_uinteger): New.
13905 (struct collect_static_trace_data_action): Delete.
13906 (enum tracepoint_type): New.
13907 (struct tracepoint) <type>: New field `type'.
13908 <actions_str, step_actions, step_actions_str>: Only include in
13910 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13911 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13912 (tracepoints): Use IP_AGENT_EXPORT.
13913 (last_tracepoint): Don't include in the IPA.
13914 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13915 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13916 (alloced_trace_state_variables): New.
13917 (trace_state_variables): Use IP_AGENT_EXPORT.
13918 (traceframe_t): Delete unused variable.
13919 (circular_trace_buffer): Don't include in the IPA.
13920 (trace_buffer_start): Delete.
13921 (struct trace_buffer_control): New.
13922 (trace_buffer_free): Delete.
13923 (struct ipa_trace_buffer_control): New.
13924 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13925 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13927 (trace_buffer_ctrl): New.
13928 (TRACE_BUFFER_CTRL_CURR): New.
13929 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13930 Reimplement as macros.
13931 (trace_buffer_wrap): Delete.
13932 (traceframe_write_count, traceframe_read_count)
13933 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13934 (struct tracepoint_hit_ctx) <type>: New field.
13935 (struct fast_tracepoint_ctx): New.
13936 (memory_barrier): New.
13938 (record_tracepoint_error): Update atomically in the IPA.
13939 (clear_inferior_trace_buffer): New.
13940 (about_to_request_buffer_space): New.
13941 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13942 updating the same buffer.
13943 (add_tracepoint): Default the tracepoint's type to trap
13944 tracepoint, and orig_size to -1.
13945 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13946 internal variables.
13947 (create_trace_state_variable): New parameter `gdb'. Handle it.
13948 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13949 (cmd_qtdp): Handle fast tracepoints.
13950 (cmd_qtdv): Adjust.
13951 (max_jump_pad_size): New.
13952 (gdb_jump_pad_head): New.
13953 (get_jump_space_head): New.
13954 (claim_jump_space): New.
13955 (sort_tracepoints): New.
13956 (MAX_JUMP_SIZE): New.
13957 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13959 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13960 support. Upload fast traceframes, and delete internal IPA
13962 (stop_tracing_handler): New.
13963 (flush_trace_buffer_handler): New.
13964 (cmd_qtstop): Upload fast tracepoints.
13965 (response_tracepoint): Handle fast tracepoints.
13966 (tracepoint_finished_step): Upload fast traceframes. Set the
13967 tracepoint hit context's tracepoint type.
13968 (handle_tracepoint_bkpts): New.
13969 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13970 type. Add comment about fast tracepoints.
13971 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13972 non-existing action_str field.
13973 (get_context_regcache): Handle fast tracepoints.
13974 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13976 (fast_tracepoint_from_jump_pad_address): New.
13977 (fast_tracepoint_from_ipa_tpoint_address): New.
13978 (collecting_t): New.
13979 (force_unlock_trace_buffer): New.
13980 (fast_tracepoint_collecting): New.
13982 (gdb_collect): New.
13983 (write_inferior_data_ptr): New.
13984 (target_tp_heap): New.
13985 (target_malloc): New.
13986 (download_agent_expr): New.
13988 (download_tracepoints): New.
13989 (download_trace_state_variables): New.
13990 (upload_fast_traceframes): New.
13991 (IPA_FIRST_TRACEFRAME): New.
13992 (IPA_NEXT_TRACEFRAME_1): New.
13993 (IPA_NEXT_TRACEFRAME): New.
13994 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13995 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13996 (gdb_jump_pad_buffer_end): New.
13997 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13998 (initialize_tracepoint): Adjust.
13999 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14000 buffer. Initialize the low module.
14001 * utils.c (PREFIX, TOOLNAME): New.
14002 (malloc_failure): Use PREFIX.
14003 (error): In the IPA, an error causes an exit.
14004 (fatal, warning): Use PREFIX.
14005 (internal_error): Use TOOLNAME.
14006 (NUMCELLS): Increase to 10.
14007 * configure, config.in: Regenerate.
14009 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14011 * server.c (handle_query) <qSupported>: Do two passes over the
14012 qSupported string to avoid nesting strtok.
14014 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14016 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14018 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14019 -Wl,--dynamic-list.
14020 * configure: Regenerate.
14021 * proc-service.list: New.
14023 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14025 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14028 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14030 * gdbreplay.c (remote_open): Check error return from socket() call by
14031 its equality to -1 not by it being negative.
14032 * remote-utils.c (remote_open): Likewise.
14034 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14036 * config.h: Regenerate.
14038 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14040 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14041 doesn't provide PTRACE_GET_THREAD_AREA.
14043 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14045 * linux-m68k-low.c: Include <asm/ptrace.h>
14046 (ps_get_thread_area): Implement.
14048 2010-05-03 Doug Evans <dje@google.com>
14050 * event-loop.c (struct callback_event): New struct.
14051 (callback_list): New global.
14052 (append_callback_event, delete_callback_event): New functions.
14053 (process_callback): New function.
14054 (start_event_loop): Call it.
14055 * remote-utils.c (NOT_SCHEDULED): Define.
14056 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14057 moved out of readchar.
14058 (readchar): Rewrite. Call reschedule before returning.
14059 (reset_readchar): New function.
14060 (remote_close): Call it.
14061 (process_remaining, reschedule): New functions.
14062 * server.h (callback_handler_func): New typedef.
14063 (append_callback_event, delete_callback_event): Declare.
14065 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14067 * proc-service.c (ps_pglobal_lookup): Use
14068 thread_db_look_up_one_symbol.
14069 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14070 parameter. Use it instead of all_symbols_looked_up.
14071 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14073 (all_symbols_looked_up): Don't declare.
14074 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14075 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14077 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14078 Set all_symbols_looked_up here.
14079 (thread_db_look_up_one_symbol): New.
14080 (thread_db_get_tls_address): Adjust.
14081 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14082 thread_db object on the heap, and tentatively set it in the
14084 (thread_db_init): Don't set all_symbols_looked_up here.
14085 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14087 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14089 * linux-low.c (linux_kill, linux_detach): Adjust.
14090 (status_pending_p_callback): Remove redundant statement. Check
14091 for !TARGET_WAITIKIND_IGNORE, instead of
14092 TARGET_WAITKIND_STOPPED.
14093 (handle_tracepoints): Make sure LWP is locked. Adjust.
14094 (linux_wait_for_event_1): Adjust.
14095 (linux_cancel_breakpoints): New.
14096 (unsuspend_one_lwp): New.
14097 (unsuspend_all_lwps): New.
14098 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14099 (send_sigstop_callback): Change return type to int, add new
14100 `except' parameter and handle it.
14101 (suspend_and_send_sigstop_callback): New.
14102 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14103 pass them down. If SUSPEND, also increment the lwp's suspend
14105 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14106 (need_step_over_p): Don't consider suspended LWPs.
14107 (start_step_over): Adjust.
14108 (proceed_one_lwp): Change return type to int, add new `except'
14109 parameter and handle it.
14110 (unsuspend_and_proceed_one_lwp): New.
14111 (proceed_all_lwps): Use find_inferior instead of
14113 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14114 also decrement the suspend count of LWPs. Pass `except' down,
14115 instead of hacking its suspend count.
14116 (linux_pause_all): Add `freeze' parameter. Adjust.
14117 (linux_unpause_all): New.
14118 (linux_target_ops): Install linux_unpause_all.
14119 * server.c (handle_status): Adjust.
14120 * target.h (struct target_ops): New fields `unpause_all' and
14121 `cancel_breakpoints'. Add new parameter to `pause_all'.
14122 (pause_all): Add new `freeze' parameter.
14123 (unpause_all): New.
14124 (cancel_breakpoints): New.
14125 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14126 cancel breakpoints.
14127 (cmd_qtstart): Pause threads.
14128 (stop_tracing): Pause threads, and cancel breakpoints.
14129 * win32-low.c (win32_target_ops): Adjust.
14131 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14133 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14134 the inferior right away from here...
14135 (linux_wait_1): ... to here, and adjust to check the thread's
14136 last_resume_kind instead of the lwp's step or stop_expected flags.
14138 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14140 * README: Use consistent `GDB' and `GDBserver' spellings.
14142 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14144 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14145 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14146 (linux_detach_one_lwp): Assume the lwp is stopped.
14147 (any_thread_of): Delete.
14148 (linux_detach): Stop all lwps here. Don't blindly delete all
14150 (delete_lwp_callback): New.
14151 (linux_mourn): Delete all lwps of the process that is gone.
14152 (linux_wait_1): Don't delete the last lwp of the process here.
14153 * mem-break.h (mark_breakpoints_out): Declare.
14154 * mem-break.c (mark_breakpoints_out): New.
14155 (free_all_breakpoints): Use it.
14156 * server.c (handle_target_event): If the process is gone, mark
14158 * thread-db.c (struct thread_db) <create_bp>: New field.
14159 (thread_db_enable_reporting): Fix prototype. Store a thread event
14160 breakpoint reference in the thread_db struct.
14161 (thread_db_load_search): Clear the thread_db object.
14162 (try_thread_db_load_1): Ditto.
14163 (switch_to_process): New.
14164 (disable_thread_event_reporting): Use it.
14165 (remove_thread_event_breakpoints): New.
14166 (thread_db_detach, thread_db_mourn): Use it.
14168 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14170 * linux-low.c (linux_enable_event_reporting): New.
14171 (linux_wait_for_event_1, handle_extended_wait): Use it.
14173 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14175 * linux-low.c (linux_kill_one_lwp, linux_kill)
14176 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14177 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14178 SIGSTOP even if the LWP is stopped.
14179 (send_sigstop_callback): New.
14180 (stop_all_lwps): Use send_sigstop_callback instead.
14181 (linux_resume_one_thread): Adjust.
14182 (proceed_one_lwp): Still proceed an LWP that the client has
14183 requested to stop, if we haven't reported it as stopped yet. Make
14184 sure that LWPs the client want stopped, have a pending SIGSTOP.
14186 2010-04-26 Doug Evans <dje@google.com>
14188 * server.c (handle_general_set): Make static.
14190 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14191 Print received char after testing for error/eof instead of before.
14192 (input_interrupt): Tweak comment.
14194 2010-04-23 Doug Evans <dje@google.com>
14196 * server.c (start_inferior): Print inferior argv if --debug.
14198 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14200 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14201 * nto-x86-low.c: Include server.h
14203 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14205 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14206 be consistent with other sources of this directory.
14207 (init_registers_amd64): Correct name of source file of this function
14210 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14212 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14213 64-bit executables.
14215 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14217 * win32-i386-low.c: Add 64-bit support.
14218 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14219 (init_registers_amd64): Declare.
14220 (mappings): Add 64-bit version of array.
14221 (init_windows_x86): New function.
14222 (the_low_target): Change init_arch field to init_windows_x86.
14224 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14226 * win32-low.c: Adapt to support also 64-bit architecture.
14227 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14228 (get_image_name): Use SIZE_T type for local variable `done'.
14229 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14230 (toolhelp_get_dll_name): Idem.
14231 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14232 Use uintptr_t typecast to avoid warning.
14233 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14234 (handle_exception): Use phex_nz to avoid warning.
14235 (win32_wait): Remove unused local variable `process'.
14237 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14239 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14242 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14244 * configure.ac: Use `ws2_32' library for srv_mingw.
14245 * configure: Regenerate.
14246 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14247 * remote-utils.c: Likewise.
14249 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14251 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14252 if __x86_64__ is defined.
14254 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14256 * configure: Regenerate.
14258 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14260 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14261 * target.h (target_ops): New get_tib_address field.
14262 * win32-low.h (win32_thread_info): Add thread_local_base field.
14263 * win32-low.c (child_add_thread): Add tlb argument.
14264 Set thread_local_base field to TLB.
14265 (get_child_debug_event): Adapt to child_add_thread change.
14266 (win32_get_tib_address): New function.
14267 (win32_target_ops): Set get_tib_address field to
14268 win32_get_tib_address.
14269 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14271 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14273 * linux-low.c (linux_mourn): Also remove the process.
14274 * server.c (handle_target_event): Don't remove the process here.
14275 * nto-low.c (nto_mourn): New.
14276 (nto_target_ops): Install it.
14277 * spu-low.c (spu_mourn): New.
14278 (spu_target_ops): Install it.
14279 * win32-low.c (win32_mourn): New.
14280 (win32_target_ops): Install it.
14282 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14284 * server.h (buffer_xml_printf): Remove redundant `;'.
14286 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14288 * regcache.c (set_register_cache): Invalidate regcaches before
14289 changing the register cache layout.
14290 (regcache_invalidate_one): Allow a NULL regcache.
14291 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14292 regcaches before changing the register cache layout or the target
14295 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14297 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14298 variable warning on Linux/x86-64.
14300 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14302 GDBserver disconnected tracing support.
14304 * linux-low.c (linux_remove_process): Delete.
14305 (add_lwp): Don't set last_resume_kind here.
14306 (linux_kill): Use `mourn'.
14307 (linux_detach): Use `thread_db_detach', and `mourn'.
14308 (linux_mourn): New.
14309 (linux_attach_lwp_1): Adjust comment.
14310 (linux_attach): last_resume_kind moved the thread_info; adjust.
14311 (status_pending_p_callback): Adjust.
14312 (linux_wait_for_event_1): Adjust.
14313 (count_events_callback, select_singlestep_lwp_callback)
14314 (select_event_lwp_callback, cancel_breakpoints_callback)
14315 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14316 (proceed_one_lwp): Adjust.
14317 (linux_async): Add debug output.
14318 (linux_thread_stopped): New.
14319 (linux_pause_all): New.
14320 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14322 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14323 (thread_db_free): Delete declaration.
14324 (thread_db_detach, thread_db_mourn): Declare.
14325 * thread-db.c (thread_db_init): Use thread_db_mourn.
14326 (thread_db_free): Delete, split in two.
14327 (disable_thread_event_reporting): New.
14328 (thread_db_detach): New.
14329 (thread_db_mourn): New.
14331 * server.h (struct thread_info) <last_resume_kind>: New field.
14332 <attached>: Add comment.
14333 <gdb_detached>: New field.
14334 (handler_func): Change return type to int.
14335 (handle_serial_event, handle_target_event): Ditto.
14336 (gdb_connected): Declare.
14338 (disconnected_tracing): Declare.
14339 (stop_tracing): Declare.
14341 * server.c (handle_query) <qSupported>: Report support for
14342 disconnected tracing.
14343 (queue_stop_reply_callback): Account for running threads.
14344 (gdb_wants_thread_stopped): New.
14345 (gdb_wants_all_threads_stopped): New.
14346 (gdb_reattached_process): New.
14347 (handle_status): Clear the `gdb_detached' flag of all processes.
14348 In all-stop, stop all threads.
14349 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14350 (process_serial_event): If the remote connection breaks, or if an
14351 exit was forced with "monitor exit", force an event loop exit.
14352 Handle disconnected tracing on detach.
14353 (handle_serial_event): Adjust.
14354 (handle_target_event): If GDB isn't connected, forward events back
14355 to the inferior, unless the last process exited, in which case,
14356 exit gdbserver. Adjust interface.
14358 * remote-utils.c (remote_open): Don't block in accept. Instead
14359 register an event loop source on the listen socket file
14360 descriptor. Refactor bits into ...
14361 (listen_desc): ... this new global.
14362 (gdb_connected): ... this new function.
14363 (enable_async_notification): ... this new function.
14364 (handle_accept_event): ... this new function.
14365 (remote_close): Clear remote_desc.
14367 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14369 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14371 (mourn_inferior): Define.
14372 (target_process_qsupported): Avoid the dangling else problem.
14373 (thread_stopped): Define.
14374 (pause_all): Define.
14375 (target_waitstatus_to_string): Declare.
14376 * target.c (target_waitstatus_to_string): New.
14378 * tracepoint.c (tracing): Make extern.
14379 (disconnected_tracing): New.
14380 (stop_tracing): Make extern. Handle tracing stops due to GDB
14382 (cmd_qtdisconnected): New.
14383 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14384 (handle_tracepoint_general_set): Handle QTDisconnected.
14386 * event-loop.c (event_handler_func): Change return type to int.
14387 (process_event): Bail out if the event handler wants the event
14389 (handle_file_event): Ditto.
14390 (start_event_loop): Bail out if the event handler wants the event
14393 * nto-low.c (nto_target_ops): Adjust.
14394 * spu-low.c (spu_wait): Don't remove the process here.
14395 (spu_target_ops): Adjust.
14396 * win32-low.c (win32_wait): Don't remove the process here.
14397 (win32_target_ops): Adjust.
14399 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14401 * regcache.c (realloc_register_cache): Invalidate inferior's
14402 regcache before recreating it.
14404 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14406 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14408 2010-04-09 Stan Shebs <stan@codesourcery.com>
14409 Pedro Alves <pedro@codesourcery.com>
14411 * server.h (LONGEST): New.
14412 (struct thread_info) <while_stepping>: New field.
14413 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14415 (initialize_tracepoint, handle_tracepoint_general_set)
14416 (handle_tracepoint_query, tracepoint_finished_step)
14417 (tracepoint_was_hit, release_while_stepping_state_list):
14418 (current_traceframe): Declare.
14419 * server.c (handle_general_set): Handle tracepoint packets.
14420 (read_memory): New.
14421 (write_memory): New.
14422 (handle_search_memory_1): Use read_memory.
14423 (handle_query): Report support for conditional tracepoints, trace
14424 state variables, and tracepoint sources. Handle tracepoint
14426 (main): Initialize the tracepoints module.
14427 (process_serial_event): Handle traceframe reads/writes.
14429 * linux-low.c (handle_tracepoints): New.
14430 (linux_wait_1): Call it.
14431 (linux_resume_one_lwp): Handle while-stepping.
14432 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14433 (linux_target_ops): Install them.
14434 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14436 * linux-x86-low.c (x86_supports_tracepoints): New.
14437 (the_low_target). Install it.
14439 * mem-break.h (delete_breakpoint): Declare.
14440 * mem-break.c (delete_breakpoint): Make external.
14442 * target.h (struct target_ops): Add `supports_tracepoints',
14443 `read_pc', and `write_pc' fields.
14444 (target_supports_tracepoints): Define.
14445 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14448 * regcache.h (struct regcache) <registers_owned>: New field.
14449 (init_register_cache, regcache_cpy): Declare.
14450 (regcache_read_pc, regcache_write_pc): Declare.
14451 (register_cache_size): Declare.
14452 (supply_regblock): Declare.
14453 * regcache.c (init_register_cache): New.
14454 (new_register_cache): Use it.
14455 (regcache_cpy): New.
14456 (register_cache_size): New.
14457 (supply_regblock): New.
14458 (regcache_read_pc, regcache_write_pc): New.
14460 * tracepoint.c: New.
14462 * Makefile.in (OBS): Add tracepoint.o.
14463 (tracepoint.o): New rule.
14465 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14467 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14469 (i386-mmx.c): Likewise.
14470 (i386-mmx-linux.o): Likewise.
14471 (i386-mmx-linux.c): Likewise.
14473 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14474 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14475 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14476 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14478 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14479 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14480 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14482 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14484 * Makefile.in (clean): Updated.
14486 (i386-avx.c): Likewise.
14487 (i386-avx-linux.o): Likewise.
14488 (i386-avx-linux.c): Likewise.
14489 (amd64-avx.o): Likewise.
14490 (amd64-avx.c): Likewise.
14491 (amd64-avx-linux.o): Likewise.
14492 (amd64-avx-linux.c): Likewise.
14494 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14495 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14496 (srv_amd64_regobj): Add amd64-avx.o.
14497 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14498 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14499 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14500 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14501 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14502 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14503 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14505 * i387-fp.c: Include "i386-xstate.h".
14507 (i387_cache_to_xsave): Likewise.
14508 (i387_xsave_to_cache): Likewise.
14509 (x86_xcr0): Likewise.
14511 * i387-fp.h (i387_cache_to_xsave): Likewise.
14512 (i387_xsave_to_cache): Likewise.
14513 (x86_xcr0): Likewise.
14515 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14516 * linux-crisv32-low.c (target_regsets): Likewise.
14517 * linux-m68k-low.c (target_regsets): Likewise.
14518 * linux-mips-low.c (target_regsets): Likewise.
14519 * linux-ppc-low.c (target_regsets): Likewise.
14520 * linux-s390-low.c (target_regsets): Likewise.
14521 * linux-sh-low.c (target_regsets): Likewise.
14522 * linux-sparc-low.c (target_regsets): Likewise.
14523 * linux-xtensa-low.c (target_regsets): Likewise.
14525 * linux-low.c: Include <sys/uio.h>.
14526 (regsets_fetch_inferior_registers): Support nt_type.
14527 (regsets_store_inferior_registers): Likewise.
14528 (linux_process_qsupported): New.
14529 (linux_target_ops): Add linux_process_qsupported.
14531 * linux-low.h (regset_info): Add nt_type.
14532 (linux_target_ops): Add process_qsupported.
14534 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14536 (init_registers_i386_avx_linux): New.
14537 (init_registers_amd64_avx_linux): Likewise.
14538 (xmltarget_i386_linux_no_xml): Likewise.
14539 (xmltarget_amd64_linux_no_xml): Likewise.
14540 (PTRACE_GETREGSET): Likewise.
14541 (PTRACE_SETREGSET): Likewise.
14542 (x86_fill_xstateregset): Likewise.
14543 (x86_store_xstateregset): Likewise.
14544 (use_xml): Likewise.
14545 (x86_linux_update_xmltarget): Likewise.
14546 (x86_linux_process_qsupported): Likewise.
14547 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14548 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14549 init_registers_i386_linux here. Call
14550 x86_linux_update_xmltarget.
14551 (the_low_target): Add x86_linux_process_qsupported.
14553 * server.c (handle_query): Call target_process_qsupported.
14555 * target.h (target_ops): Add process_qsupported.
14556 (target_process_qsupported): New.
14558 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14560 * inferiors.c (add_thread): Set last_status kind to
14561 TARGET_WAITKIND_IGNORE.
14562 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14563 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14564 (linux_wait_1): Move `thread' local definition to block that uses
14565 it. Don't NULL initialize `event_child'.
14566 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14567 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14568 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14570 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14572 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14573 an extended waitstatus, or by a watchpoint.
14574 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14575 thread was stepping or has been stopped by a watchpoint.
14577 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14579 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14580 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14581 of another, then delete the previous, and validate all
14583 (validate_inserted_breakpoint): New.
14584 (delete_disabled_breakpoints): New.
14585 (validate_breakpoints): New.
14586 (check_mem_read): Validate breakpoints before trusting their
14587 shadow. Delete disabled breakpoints.
14588 (check_mem_write): Validate breakpoints before trusting they
14589 should be inserted. Delete disabled breakpoints.
14590 * mem-break.h (validate_breakpoints):
14591 * server.c (handle_query): Validate breakpoints when we see a
14594 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14596 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14597 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14598 if we could tell there's a GDB breakpoint at stop_pc.
14599 (need_step_over_p): Don't do a step over if we find a GDB
14600 breakpoint at the resume PC.
14602 * mem-break.c (struct raw_breakpoint): New.
14603 (enum bkpt_type): New type `gdb_breakpoint'.
14604 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14605 fields. New field `raw'.
14606 (find_raw_breakpoint_at): New.
14607 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14608 breakpoint instead.
14609 (set_breakpoint_at): Adjust.
14610 (delete_raw_breakpoint): New.
14611 (release_breakpoint): New.
14612 (delete_breakpoint): Rename to...
14613 (delete_breakpoint_1): ... this. Add proc parameter. Use
14614 release_breakpoint. Return ENOENT.
14615 (delete_breakpoint): Reimplement.
14616 (find_breakpoint_at): Delete.
14617 (find_gdb_breakpoint_at): New.
14618 (delete_breakpoint_at): Delete.
14619 (set_gdb_breakpoint_at): New.
14620 (delete_gdb_breakpoint_at): New.
14621 (gdb_breakpoint_here): New.
14622 (set_reinsert_breakpoint): Use release_breakpoint.
14623 (uninsert_breakpoint): Rename to ...
14624 (uninsert_raw_breakpoint): ... this.
14625 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14626 (reinsert_raw_breakpoint): Change parameter type to
14628 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14630 (check_breakpoints): Adjust. Use release_breakpoint.
14631 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14632 (breakpoint_inserted_here): Ditto.
14633 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14634 Don't trust the breakpoint's shadow if it is not inserted.
14635 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14636 (delete_all_breakpoints): Adjust.
14637 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14638 use delete_breakpoint_1.
14640 * mem-break.h (breakpoints_supported): Delete declaration.
14641 (set_gdb_breakpoint_at): Declare.
14642 (gdb_breakpoint_here): Declare.
14643 (delete_breakpoint_at): Delete.
14644 (delete_gdb_breakpoint_at): Declare.
14646 * server.h (struct raw_breakpoint): Forward declare.
14647 (struct process_info): New field `raw_breakpoints'.
14649 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14652 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14654 * linux-low.c (status_pending_p_callback): Fix comment.
14655 (linux_wait_for_event_1): Move most of the internal breakpoint
14656 handling from here...
14657 (linux_wait_1): ... to here.
14658 (count_events_callback): New.
14659 (select_singlestep_lwp_callback): New.
14660 (select_event_lwp_callback): New.
14661 (cancel_breakpoints_callback): New.
14662 (select_event_lwp): New.
14663 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14664 priority to all LWPs that have had events that should be reported
14665 to the client. Cancel breakpoints when about to reporting the
14666 event to the client, not while stopping lwps. No longer cancel
14667 finished single-steps here.
14668 (cancel_finished_single_step): Delete.
14669 (cancel_finished_single_steps): Delete.
14671 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14673 * mem-break.c (enum bkpt_type): New.
14674 (struct breakpoint): New field `type'.
14675 (set_breakpoint_at): Change return type to struct breakpoint
14676 pointer. Set type to `other_breakpoint' by default.
14677 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14678 in the breakpoint list.
14679 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14680 (reinsert_breakpoint): Rename to ...
14681 (reinsert_raw_breakpoint): ... this.
14682 (reinsert_breakpoints_at): Adjust.
14683 * mem-break.h (struct breakpoint): Declare.
14684 (set_breakpoint_at): Change return type to struct breakpoint
14687 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14689 * server.c (handle_query): Assign, not compare.
14691 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14693 Teach linux gdbserver to step-over-breakpoints.
14695 * linux-low.c (can_hardware_single_step): New.
14696 (supports_breakpoints): New.
14697 (handle_extended_wait): If stopping threads, read the stop pc of
14698 the new cloned LWP.
14700 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14701 low target doesn't support retrieving the PC.
14702 (add_lwp): Set last_resume_kind to resume_continue.
14703 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14704 (linux_attach): Don't clear stop_expected. Set the lwp's
14705 last_resume_kind to resume_stop.
14706 (linux_detach_one_lwp): Don't check for removed breakpoints.
14707 (check_removed_breakpoint): Delete.
14708 (status_pending_p): Rename to ...
14709 (status_pending_p_callback): ... this. Don't check for removed
14710 breakpoints. Don't consider threads that are stopped from GDB's
14712 (linux_wait_for_lwp): Always read the stop_pc here.
14713 (cancel_breakpoint): New.
14714 (step_over_bkpt): New global.
14715 (linux_wait_for_event_1): Implement stepping over breakpoints.
14716 (gdb_wants_lwp_stopped): New.
14717 (gdb_wants_all_stopped): New.
14718 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14719 single-step traps here. Store the thread's last reported target
14721 (send_sigstop): Don't clear stop_expected. Always set it,
14723 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14724 (cancel_finished_single_step): New.
14725 (cancel_finished_single_steps): New.
14726 (wait_for_sigstop): Don't cancel finished single-step traps here.
14727 (linux_resume_one_lwp): Don't check for removed breakpoints.
14728 Don't set `step' on non-hardware step archs.
14729 (linux_set_resume_request): Ignore resume_stop requests if already
14730 stopping or stopped. Set the lwp's last_resume_kind.
14731 (resume_status_pending_p): Don't check for removed breakpoints.
14732 (need_step_over_p): New.
14733 (start_step_over): New.
14734 (finish_step_over): New.
14735 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14736 requests. Clear the thread's last reported target waitstatus.
14737 Don't use the `suspended' flag. Don't consider pending breakpoints.
14738 (linux_resume): Start a step-over if necessary.
14739 (proceed_one_lwp): New.
14740 (proceed_all_lwps): New.
14741 (unstop_all_lwps): New.
14742 * linux-low.h (struct lwp_info): Rewrite comment for the
14743 `suspended' flag. Add the `stop_pc' field. Delete the
14744 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14745 Add `'last_resume_kind' and `need_step_over' fields.
14746 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14747 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14748 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14749 (set_raw_breakpoint_at): New.
14750 (set_breakpoint_at): Rewrite to use it.
14751 (reinsert_breakpoint_handler): Delete.
14752 (set_reinsert_breakpoint): New.
14753 (reinsert_breakpoint_by_bp): Delete.
14754 (delete_reinsert_breakpoints): New.
14755 (uninsert_breakpoint): Rewrite.
14756 (uninsert_breakpoints_at): New.
14757 (reinsert_breakpoint): Rewrite.
14758 (reinsert_breakpoints_at): New.
14759 (check_breakpoints): Rewrite.
14760 (breakpoint_here): New.
14761 (breakpoint_inserted_here): New.
14762 (check_mem_read): Adjust.
14763 * mem-break.h (breakpoints_supported, breakpoint_here)
14764 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14765 (reinsert_breakpoint_by_bp): Delete declaration.
14766 (delete_reinsert_breakpoints): Declare.
14767 (reinsert_breakpoint): Delete declaration.
14768 (reinsert_breakpoints_at): Declare.
14769 (uninsert_breakpoint): Delete declaration.
14770 (uninsert_breakpoints_at): Declare.
14771 (check_breakpoints): Adjust prototype.
14772 * server.h: Adjust include order.
14773 (struct thread_info): Declare here. Add a `last_status' field.
14775 2010-03-23 Michael Snyder <msnyder@vmware.com>
14777 * server.c (crc32): New function.
14778 (handle_query): Add handling for 'qCRC:' request.
14780 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14782 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14783 lwp had been stopped by a watchpoint.
14785 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14787 * server.h (internal_error): Declare.
14788 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14789 * utils.c (internal_error): New function.
14791 2010-03-15 Andreas Schwab <schwab@redhat.com>
14793 * configure.srv: Fix typo setting srv_regobj.
14795 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14797 * linux-low.c (fetch_register): Avoid passing a non string literal
14799 (usr_store_inferior_registers): Ditto.
14801 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14803 * linux-low.c (linux_write_memory): Bail out early if peeking
14806 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14808 * linux-low.h (struct lwp_info): New fields
14809 `stopped_by_watchpoint' and `stopped_data_address'.
14810 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14811 here, and cache them in the lwp object.
14812 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14814 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14816 (linux_stopped_by_watchpoint): Rewrite.
14817 (linux_stopped_data_address): Rewrite.
14819 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14821 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14822 switching the current inferior, not before.
14824 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14826 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14827 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14828 i386-linux.c and amd64-linux.c.
14829 (reg-i386.o): Removed.
14830 (reg-i386.c): Likewise.
14831 (reg-i386-linux.o): Likewise.
14832 (reg-i386-linux.c): Likewise.
14833 (reg-x86-64.o): Likewise.
14834 (reg-x86-64.c): Likewise.
14835 (reg-x86-64-linux.o): Likewise.
14836 (reg-x86-64-linux.c): Likewise.
14838 (i386.c): Likewise.
14839 (i386-linux.o): Likewise.
14840 (i386-linux.c): Likewise.
14841 (amd64.o): Likewise.
14842 (amd64.c): Likewise.
14843 (amd64-linux.o): Likewise.
14844 (amd64-linux.c): Likewise.
14846 * configure.srv (srv_i386_regobj): New.
14847 (srv_i386_linux_regobj): Likewise.
14848 (srv_amd64_regobj): Likewise.
14849 (srv_amd64_linux_regobj): Likewise.
14850 (srv_i386_32bit_xmlfiles): Likewise.
14851 (srv_i386_64bit_xmlfiles): Likewise.
14852 (srv_i386_xmlfiles): Likewise.
14853 (srv_amd64_xmlfiles): Likewise.
14854 (srv_i386_linux_xmlfiles): Likewise.
14855 (srv_amd64_linux_xmlfiles): Likewise.
14856 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14857 srv_xmlfiles to $srv_i386_xmlfiles.
14858 (i[34567]86-*-mingw32ce*): Likewise.
14859 (i[34567]86-*-mingw*): Likewise.
14860 (i[34567]86-*-nto*): Likewise.
14861 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14862 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14863 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14864 (x86_64-*-linux*): Likewise.
14866 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14867 (init_registers_amd64_linux): New.
14868 (x86_arch_setup): Replace init_registers_x86_64_linux with
14869 init_registers_amd64_linux.
14871 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14873 * configure.ac: Check for libdl. If it is not available link against
14874 static libthread_db.
14875 * configure: Regenerate.
14877 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14881 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14882 handing a read watchpoint.
14883 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14885 2010-02-12 Doug Evans <dje@google.com>
14887 * linux-low.c (linux_supports_tracefork_flag): Document.
14888 (linux_look_up_symbols): Add comment.
14890 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14892 * regcache.c (supply_register): Clear regcache if buf is NULL.
14894 2010-02-02 Nicolas Roche <roche@sourceware.org>
14895 Joel Brobecker <brobecker@adacore.com>
14897 * inferiors.c (find_inferior): Add function documentation.
14898 (unloaded_dll): Handle the case where the unloaded dll has not
14899 been previously registered in the dll list.
14901 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14903 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14904 (thumb2_breakpoint): New.
14905 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14907 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14909 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14910 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14913 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14915 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14917 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14919 * linux-s390-low.c (s390_collect_ptrace_register)
14920 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14922 2010-01-21 Doug Evans <dje@google.com>
14924 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14925 (PTRACE_ARG4_TYPE): New macro.
14926 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14927 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14928 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14929 (usr_store_inferior_registers): Ditto.
14930 (linux_read_memory, linux_write_memory): Ditto.
14931 (linux_test_for_tracefork): Ditto.
14933 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14934 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14936 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14938 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14941 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14943 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14944 prototype to take a regcache. Adjust.
14946 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14948 * regcache.h (struct thread_info): Forward declare.
14949 (struct regcache): New.
14950 (new_register_cache): Adjust prototype.
14951 (get_thread_regcache): Declare.
14952 (free_register_cache): Adjust prototype.
14953 (registers_to_string, registers_from_string): Ditto.
14954 (supply_register, supply_register_by_name, collect_register)
14955 (collect_register_as_string, collect_register_by_name): Ditto.
14956 * regcache.c (struct inferior_regcache_data): Delete.
14957 (get_regcache): Rename to ...
14958 (get_thread_regcache): ... this. Adjust. Switch inferior before
14959 fetching registers.
14960 (regcache_invalidate_one): Adjust.
14961 (regcache_invalidate): Fix prototype.
14962 (new_register_cache): Return the new register cache.
14963 (free_register_cache): Change prototype.
14964 (realloc_register_cache): Adjust.
14965 (registers_to_string): Change prototype to take a regcache. Adjust.
14966 (registers_from_string): Ditto.
14967 (register_data): Ditto.
14968 (supply_register): Ditto.
14969 (supply_register_by_name): Ditto.
14970 (collect_register): Ditto.
14971 (collect_register_as_string): Ditto.
14972 (collect_register_by_name): Ditto.
14973 * server.c (process_serial_event): Adjust.
14974 * linux-low.h (regset_fill_func, regset_store_func): Change
14976 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14978 * linux-low.c (get_stop_pc): Adjust.
14979 (check_removed_breakpoint): Adjust.
14980 (linux_wait_for_event): Adjust.
14981 (linux_resume_one_lwp): Adjust.
14982 (fetch_register): Add regcache parameter. Adjust.
14983 (usr_store_inferior_registers): Ditto.
14984 (regsets_fetch_inferior_registers): Ditto.
14985 (regsets_store_inferior_registers): Ditto.
14986 (linux_fetch_registers, linux_store_registers): Ditto.
14987 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14989 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14991 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14992 prototype to take a regcache.
14993 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14994 * remote-utils.c (convert_ascii_to_int, outreg)
14995 (prepare_resume_reply): Change prototype to take a regcache.
14997 * target.h (struct target_ops) <fetch_registers, store_registers>:
14998 Change prototype to take a regcache.
14999 (fetch_inferior_registers, store_inferior_registers): Change
15000 prototype to take a regcache. Adjust.
15001 * proc-service.c (ps_lgetregs): Adjust.
15002 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15003 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15004 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15005 take a regcache. Adjust.
15006 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15007 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15008 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15009 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15010 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15011 (cris_cannot_fetch_register):
15012 (cris_breakpoint_at): Change prototype to take a regcache.
15014 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15015 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15016 to take a regcache. Adjust.
15017 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15019 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15020 take a regcache. Adjust.
15021 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15022 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15023 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15024 * linux-mips-low.c (mips_get_pc):
15025 (mips_set_pc): Change prototype to take a regcache. Adjust.
15026 (mips_reinsert_addr): Adjust.
15027 (mips_collect_register): Change prototype to take a regcache.
15029 (mips_supply_register):
15030 (mips_collect_register_32bit, mips_supply_register_32bit)
15031 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15032 (mips_store_fpregset): Ditto.
15033 * linux-ppc-low.c (ppc_supply_ptrace_register)
15034 (ppc_supply_ptrace_register): Ditto.
15035 (parse_spufs_run): Adjust.
15036 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15037 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15038 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15039 take a regcache. Adjust.
15040 * linux-s390-low.c (s390_collect_ptrace_register)
15041 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15042 (s390_set_pc): Change prototype to take a regcache. Adjust.
15043 (s390_arch_setup): Adjust.
15044 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15045 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15046 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15047 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15048 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15050 (sparc_breakpoint_at): Adjust.
15051 * linux-xtensa-low.c (xtensa_fill_gregset):
15052 (xtensa_store_gregset):
15053 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15054 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15055 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15056 prototype to take a regcache. Adjust.
15057 * win32-arm-low.c (arm_fetch_inferior_register)
15058 (arm_store_inferior_register): Change prototype to take a
15060 * win32-i386-low.c (i386_fetch_inferior_register)
15061 (i386_store_inferior_register): Change prototype to take a
15063 * win32-low.c (child_fetch_inferior_registers)
15064 (child_store_inferior_registers): Change prototype to take a
15066 (win32_wait): Adjust.
15067 (win32_fetch_inferior_registers): Change prototype to take a
15069 (win32_store_inferior_registers): Adjust.
15070 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15071 store_inferior_register>: Change prototype to take a regcache.
15073 2010-01-20 Doug Evans <dje@google.com>
15075 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15077 (linux_wait_for_event1, linux_init_signals): Ditto.
15078 (W_STOPCODE): Provide definition if missing.
15080 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15082 * linux-low.c (linux_core_of_thread): New.
15083 (compare_ints, show_process, list_threads): New.
15084 (linux_qxfer_osdata): Report threads and cores.
15085 (linux_target_op): Register linux_core_of_thread.
15086 * remote-utils.c (prepare_resume_reply): Report the core.
15087 (buffer_xml_printf): Support %d specifier.
15088 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15090 (handle_query): Handle qXfer:threads. Announce availability
15092 * target.h (struct target_ops): New field core_of_thread.
15094 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15096 * Makefile.in (clean): Remove new generated files.
15097 (reg-s390.o, reg-s390.c): Remove rules.
15098 (reg-s390x.o, reg-s390x.c): Likewise.
15099 (s390-linux32.o, s390-linux32.c): Add rules.
15100 (s390-linux64.o, s390-linux64.c): Likewise.
15101 (s390x-linux64.o, s390x-linux64.c): Likewise.
15102 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15103 * linux-s390-low.c: Include <elf.h>.
15104 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15105 (init_registers_s390): Remove prototype.
15106 (init_registers_s390x): Likewise.
15107 (init_registers_s390_linux32): Add prototype.
15108 (init_registers_s390_linux64): Likewise.
15109 (init_registers_s390x_linux64): Likewise.
15110 (s390_num_regs_3264): New define.
15111 (s390_regmap_3264): New global variable.
15112 (s390_cannot_fetch_register): Remove obsolete check.
15113 (s390_cannot_store_register): Likewise.
15114 (s390_collect_ptrace_register): Handle upper/lower register halves.
15115 (s390_supply_ptrace_register): Likewise.
15116 (s390_fill_gregset): Update to register number changes.
15117 (s390_get_hwcap): New routine.
15118 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15119 Install appropriate regmap and register set.
15121 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15123 * server.c (gdbserver_version): Update copyright year to 2010.
15124 * gdbreplay.c (gdbreplay_version): Likewise.
15126 2009-12-28 Doug Evans <dje@google.com>
15128 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15129 elf/external.h. Include <elf.h> instead but only if necessary.
15131 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15133 * linux-low.c (linux_remove_process): Remove `detaching'
15134 parameter. Don't release/detach from thread_db here.
15135 (linux_kill): Release/detach from thread_db here, ...
15136 (linux_detach): ... and here, before actually detaching.
15137 (linux_wait_1): ... and here, when a process exits.
15138 * thread-db.c (any_thread_of): New.
15139 (thread_db_free): Switch the current inferior to a thread of the
15142 2009-12-21 Doug Evans <dje@google.com>
15144 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15146 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15147 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15148 warning ifndef __NR_tkill. Move setting of errno there too.
15149 Delete unnecessary resetting of errno after syscall.
15150 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15152 * configure.ac: Check for dladdr.
15153 * config.in: Regenerate.
15154 * configure: Regenerate.
15155 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15156 (try_thread_db_load): Update.
15158 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15160 2009-12-18 Doug Evans <dje@google.com>
15162 * event-loop.c: Include unistd.h if it exists.
15164 * linux-low.c (my_waitpid): Move definition away from being in
15165 between linux_tracefork_child/linux_test_for_tracefork.
15167 * gdb_proc_service.h (psaddr_t): Fix type.
15168 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15169 signature to match glibc.
15171 2009-12-16 Doug Evans <dje@google.com>
15173 * linux-low.c (linux_read_memory): Fix argument to read.
15175 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15177 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15178 events, don't leave current_inferior pointing at null.
15180 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15182 * win32-low.c (LOG): Delete.
15183 (OUTMSG): Output to stderr.
15184 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15185 on compile time LOG macro.
15186 (win32_wait): Fix debug output.
15188 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15190 * win32-low.c (win32_add_one_solib): If the dll name is
15191 "ntdll.dll", prepend the system directory to the dll path.
15193 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15195 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15197 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15198 Vladimir Prus <vladimir@codesourcery.com>
15200 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15201 * configure.ac: Check for __mcoldfire__ and set
15202 gdb_cv_m68k_is_coldfire.
15203 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15204 reg-cf.o and reg-m68k.o.
15205 * configure: Regenerated.
15207 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15209 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15210 Pass it to thread_db_free.
15211 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15212 proper `detaching' argument to linux_remove_process.
15213 * linux-low.h (thread_db_free): Add `detaching' parameter.
15214 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15216 (thread_db_free): Add `detaching' parameter. Only
15217 call td_ta_clear_event if detaching from process.
15219 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15221 * thread-db.c (thread_db_free): Fix typo.
15223 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15226 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15228 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15230 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15231 with an i686 compiler.
15232 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15234 * configure: Rebuilt.
15236 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15240 * server.c (handle_search_memory_1): Correct read_addr initialization
15241 in loop for searching subsequent chunks.
15243 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15245 * configure.ac: New --with-libthread-db option.
15246 * thread-db.c: Allow direct dependence on libthread_db.
15247 (thread_db_free): Adjust.
15248 * config.in: Regenerate.
15249 * configure: Likewise.
15251 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15254 * thread-db.c (attach_thread): New function.
15255 (maybe_attach_thread): Return success/failure.
15256 (find_new_threads_callback): Adjust.
15257 (thread_db_find_new_threads): Loop until no new threads.
15259 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15261 * proc-service.c (ps_lgetregs): Formatting.
15263 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15265 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15266 * configure.ac: Adjust.
15267 * linux-low.h (struct process_info_private): Move members to struct
15269 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15270 * linux-low.c (linux_remove_process): Adjust.
15271 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15272 * server.c (handle_query): Move code ...
15273 (handle_monitor_command): ... here. New function.
15274 * target.h (struct target_ops): New member.
15275 * thread-db.c (struct thread_db): New.
15276 (libthread_db_search_path): New variable.
15277 (thread_db_create_event, thread_db_enable_reporting)
15278 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15279 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15280 (try_thread_db_load_1, dladdr_to_soname): New functions.
15281 (try_thread_db_load, thread_db_load_search): New functions.
15282 (thread_db_init): Search for libthread_db.
15283 (thread_db_free): New function.
15284 (thread_db_handle_monitor_command): Likewise.
15285 * config.in: Regenerate.
15286 * configure: Regenerate.
15288 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15290 * spu-low.c (spu_kill): Wait for inferior to terminate.
15291 Call clear_inferiors.
15292 (spu_detach): Call clear_inferiors.
15294 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15296 * aclocal.m4: Regenerate.
15297 * config.in: Likewise.
15298 * configure: Likewise.
15300 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15302 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15303 (parse_spufs_run): New function.
15304 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15305 (ppc_breakpoint_at): Handle SPU breakpoints.
15307 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15309 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15310 (SPUFS_MAGIC): Define.
15311 (spu_enumerate_spu_ids): New function.
15312 (linux_qxfer_spu): New function.
15313 (linux_target_ops): Install linux_qxfer_spu.
15315 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15317 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15318 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15319 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15320 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15321 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15322 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15323 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15324 (init_registers_powerpc_cell32l): Add prototype.
15325 (init_registers_powerpc_cell64l): Likewise.
15326 (ppc_arch_setup): Detect Cell/B.E. architecture.
15328 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15330 * Makefile.in (datarootdir): New variable.
15332 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15334 * linux-low.c (linux_write_memory): Update debugging output.
15335 * Makefile.in (clean): Add new descriptions.
15336 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15337 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15338 * configure.srv: Add new files for arm*-*-linux*.
15339 * linux-arm-low.c: Add new declarations.
15340 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15341 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15342 (HWCAP_VFPv3D16): New.
15343 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15344 instead of __IWMMXT__.
15345 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15346 (arm_arch_setup): New.
15347 (target_regsets): Remove #ifdef. Add VFP regset.
15348 (the_low_target): Use arm_arch_setup.
15350 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15352 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15353 the main thread again.
15355 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15357 Adding Neutrino gdbserver.
15358 * configure: Regenerated.
15359 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15360 * configure.srv (i[34567]86-*-nto*): New target.
15361 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15362 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15363 (nto_comctrl) [__QNX__]: New function.
15364 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15366 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15368 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15371 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15372 Pedro Alves <pedro@codesourcery.com>
15374 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15375 don't support CONTEXT_EXTENDED_REGISTERS.
15376 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15377 (the_low_target): Install them.
15378 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15379 failing with ERROR_PIPE_NOT_CONNECTED.
15381 2009-06-30 Doug Evans <dje@google.com>
15382 Pierre Muller <muller@ics.u-strasbg.fr>
15384 Add h/w watchpoint support to x86-linux, win32-i386.
15385 * Makefile.in (SFILES): Add i386-low.c
15386 (i386_low_h): Define.
15387 (i386-low.o): Add dependencies.
15388 (linux-x86-low.o): Add i386-low.h dependency.
15389 (win32-i386-low.o): Ditto.
15390 * i386-low.c: New file.
15391 * i386-low.h: New file.
15392 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15393 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15394 * linux-low.c (linux_add_process): Initialize arch_private.
15395 (linux_remove_process): Free arch_private.
15396 (add_lwp): Initialize arch_private.
15397 (delete_lwp): Free arch_private.
15398 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15400 * linux-low.h (process_info_private): New member arch_private.
15401 (lwp_info): New member arch_private.
15402 (linux_target_ops): New members new_process, new_thread,
15404 (ptid_of): New macro.
15405 * linux-x86-low.c: Include stddef.h, i386-low.h.
15406 (arch_process_info): New struct.
15407 (arch_lwp_info): New struct.
15408 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15409 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15410 (i386_dr_low_get_status): New function.
15411 (x86_insert_point, x86_remove_point): New functions.
15412 (x86_stopped_by_watchpoint): New function.
15413 (x86_stopped_data_address): New function.
15414 (x86_linux_new_process, x86_linux_new_thread): New functions.
15415 (x86_linux_prepare_to_resume): New function.
15416 (the_low_target): Add entries for insert_point, remove_point,
15417 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15419 * server.c (debug_hw_points): New global.
15420 (monitor_show_help): Document set debug-hw-points.
15421 (handle_query): Process "set debug-hw-points".
15422 * server.h (debug_hw_points): Declare.
15423 (paddress): Declare.
15424 * utils.c (NUMCELLS, CELLSIZE): New macros.
15425 (get_sell, xsnprintf, paddress): New functions.
15426 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15427 remove_point, stopped_by_watchpoint, stopped_data_address.
15428 * win32-i386-low.c: Include i386-low.h.
15429 (debug_reg_state): Replaces dr.
15430 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15431 (i386_dr_low_get_status): New function.
15432 (i386_insert_point, i386_remove_point): New functions.
15433 (i386_stopped_by_watchpoint): New function.
15434 (i386_stopped_data_address): New function.
15435 (i386_initial_stuff): Update.
15436 (get_thread_context,set_thread_context,i386_thread_added): Update.
15437 (the_low_target): Add entries for insert_point,
15438 remove_point, stopped_by_watchpoint, stopped_data_address.
15439 * win32-low.c (win32_insert_watchpoint): New function.
15440 (win32_remove_watchpoint): New function.
15441 (win32_stopped_by_watchpoint): New function.
15442 (win32_stopped_data_address): New function.
15443 (win32_target_ops): Add entries for insert_watchpoint,
15444 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15445 * win32-low.h (win32_target_ops): New members insert_point,
15446 remove_point, stopped_by_watchpoint, stopped_data_address.
15448 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15450 * server.c (process_serial_event): Re-return unsupported, not
15451 error, if the type isn't recognized. Re-allow supporting only
15452 insert or remove packets. Also call require_running for
15453 breakpoints. Add missing break statement to default case. Tidy.
15454 * target.h (struct target_ops): Rename insert_watchpoint to
15455 insert_point, and remove_watchpoint to remove_point.
15457 * linux-low.h (struct linux_target_ops): Likewise.
15458 * linux-low.c (linux_insert_watchpoint): Rename to ...
15459 (linux_insert_point): ... this. Adjust.
15460 (linux_remove_watchpoint): Rename to ...
15461 (linux_remove_point): ... this. Adjust.
15462 (linux_target_ops): Adjust.
15463 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15464 (cris_insert_point): ... this.
15465 (cris_remove_watchpoint): Rename to ...
15466 (cris_remove_point): ... this.
15467 (the_low_target): Adjust.
15469 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15471 * server.c (handle_v_kill): Pass signal_pid to
15472 kill_inferior if multi_process is zero.
15474 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15476 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15477 * target.h (target_ops): Comment for *_watchpoint to make it clear
15478 the functions can get types '0' and '1'.
15480 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15482 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15483 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15484 * regcache.c (get_regcache): Likewise.
15485 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15486 * win32-low.c (child_fetch_inferior_registers): Remove check for
15489 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15490 Pedro Alves <pedro@codesourcery.com>
15492 * target.h (struct target_ops) <supports_multi_process>: New
15494 (target_supports_multi_process): New.
15495 * server.c (handle_query): Even if GDB reports support, only
15496 enable multi-process if the target also supports it. Report
15497 multi-process support only if the target backend supports it.
15498 * linux-low.c (linux_supports_multi_process): New function.
15499 (linux_target_ops): Install it as target_supports_multi_process
15502 2009-05-24 Doug Evans <dje@google.com>
15504 Global renaming of find_thread_pid to find_thread_ptid.
15505 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15506 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15507 All callers updated.
15509 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15510 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15513 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15514 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15515 (linux_resume_one_lwp): Ditto.
15517 2009-05-23 Doug Evans <dje@google.com>
15519 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15520 from struct inferior_list_entry * to struct lwp_info *.
15521 All callers updated.
15523 2009-05-13 Doug Evans <dje@google.com>
15525 * linux-x86-low.c: Don't include assert.h.
15526 (x86_siginfo_fixup): Use fatal, not assert.
15527 (x86_arch_setup): Fix comment.
15529 2009-05-12 Doug Evans <dje@google.com>
15531 Biarch support for i386/amd64 gdbserver.
15532 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15533 Add linux-x86-low.c.
15534 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15535 (linux-x86-low.o): Add.
15536 * linux-x86-64-low.c: Delete.
15537 * linux-i386-low.c: Delete.
15538 * linux-x86-low.c: New file.
15539 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15541 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15543 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15544 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15545 (linux_child_pid_to_exec_file): New function.
15546 (elf_64_header_p, elf_64_file_p): New functions.
15547 (siginfo_fixup): New function.
15548 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15549 give target a chance to convert layout.
15550 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15551 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15553 2009-05-07 Doug Evans <dje@google.com>
15555 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15556 (regsets_store_inferior_registers): Ditto.
15558 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15562 * linux-low.c (must_set_ptrace_flags): Delete.
15563 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15565 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15566 `lwp->must_set_ptrace_flags' instead.
15567 (linux_wait_for_event_1): Set ptrace options here.
15568 (linux_wait_1): ... not here.
15570 2009-04-30 Doug Evans <dje@google.com>
15572 * inferiors.c (started_inferior_callback): New function.
15573 (attached_inferior_callback): New function.
15574 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15575 * server.c (print_started_pid, print_attached_pid): New functions.
15576 (detach_or_kill_for_exit): New function.
15577 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15578 * server.h (have_started_inferiors_p): Declare.
15579 (have_attached_inferiors_p): Declare.
15581 * inferiors.c (remove_process): Fix memory leak, free process.
15582 * linux-low.c (linux_remove_process): New function.
15583 (linux_kill): Call it instead of remove_process.
15584 (linux_detach, linux_wait_1): Ditto.
15586 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15588 * configure.srv: Add x86 Windows CE target.
15590 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15592 * inferiors.c (get_thread_process): Make global.
15593 * server.h (get_thread_process): Add prototype.
15594 * thread-db.c (find_one_thread): Use get_thread_process
15595 instead of current_process.
15596 (thread_db_get_tls_address): Do not crash if called when
15597 thread layer is not yet initialized.
15599 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15601 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15602 * spu-low.c (current_tid): Rename to ...
15603 (current_ptid): ... this.
15604 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15605 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15606 ptid_get_lwp (current_ptid) instead of current_tid.
15607 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15608 instead of current_tid. Use find_process_pid to verify pid
15609 argument is valid. Pass proper argument to remove_process.
15610 (spu_thread_alive): Compare current_ptid instead of current_tid.
15611 (spu_resume): Likewise.
15613 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15615 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15618 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15620 Implement the multiprocess extensions, and add linux multiprocess
15623 * server.h (ULONGEST): Declare.
15624 (struct ptid, ptid_t): New.
15625 (minus_one_ptid, null_ptid): Declare.
15626 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15627 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15628 (struct inferior_list_entry): Change `id' type from unsigned from
15630 (struct sym_cache, struct breakpoint, struct
15631 process_info_private): Forward declare.
15632 (struct process_info): Declare.
15633 (current_process): Declare.
15634 (all_processes): Declare.
15635 (initialize_inferiors): Declare.
15636 (add_thread): Adjust to use ptid_t.
15637 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15638 (add_process, remove_process, find_thread_pid): Declare.
15639 (find_inferior_id): Adjust to use ptid_t.
15640 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15641 (multi_process): Declare.
15642 (push_event): Adjust to use ptid_t.
15643 (read_ptid, write_ptid): Declare.
15644 (prepare_resume_reply): Adjust to use ptid_t.
15645 (clear_symbol_cache): Declare.
15646 * inferiors.c (all_processes): New.
15647 (null_ptid, minus_one_ptid): New.
15648 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15649 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15650 (add_thread): Change unsigned long to ptid. Remove gdb_id
15652 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15653 (gdb_id_to_thread): Rename to ...
15654 (find_thread_pid): ... this. Change unsigned long to ptid.
15655 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15656 (loaded_dll, pull_pid_from_list): Adjust.
15657 (add_process, remove_process, find_process_pid)
15658 (get_thread_process, current_process, initialize_inferiors): New.
15659 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15660 (struct target_waitstatus) <related_pid>: Ditto.
15661 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15662 return type to int.
15663 (struct target_ops) <join>: Add `pid' argument.
15664 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15665 (struct target_ops) <wait>: Add `ptid' field. Change return type
15667 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15668 (mywait): Add `ptid' argument. Change return type to ptid_t.
15669 (target_pid_to_str): Declare.
15670 * target.c (set_desired_inferior): Adjust to use ptids.
15671 (mywait): Add new `ptid' argument. Adjust.
15672 (target_pid_to_str): New.
15673 * mem-break.h (free_all_breakpoints): Declare.
15674 * mem-break.c (breakpoints): Delelete.
15675 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15676 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15677 to use per-process breakpoint list.
15678 (free_all_breakpoints): New.
15679 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15680 (symbol_cache, all_symbols_looked_up): Delete.
15682 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15684 (prepare_resume_reply): Change ptid argument's type from unsigned
15685 long to ptid_t. Adjust. Implement W;process and X;process.
15686 (free_sym_cache, clear_symbol_cache): New.
15687 (look_up_one_symbol): Adjust to per-process symbol cache. *
15688 * server.c (cont_thread, general_thread, step_thread): Change type
15690 (attached): Delete.
15691 (multi_process): New.
15692 (last_ptid): Change type to ptid_t.
15693 (struct vstop_notif) <ptid>: Change type to ptid_t.
15694 (queue_stop_reply, push_event): Change `ptid' argument's type to
15696 (discard_queued_stop_replies): Add `pid' argument.
15697 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15698 changes. Don't reference the `attached' global.
15699 (attach_inferior): Adjust to mywait interface changes.
15700 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15701 features. Handle and report "multiprocess+". Handle
15703 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15705 (handle_v_kill): New.
15706 (handle_v_stopped): Adjust to use target_pid_to_str.
15707 (handle_v_requests): Allow multiple attaches and runs when
15708 multiprocess extensions are in effect. Handle "vKill".
15709 (myresume): Adjust to use ptids.
15710 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15711 (handle_status): Adjust to discard_queued_stop_replies interface
15713 (first_thread_of, kill_inferior_callback)
15714 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15715 (main): Call initialize_inferiors. Adjust to use ptids, killing
15716 and detaching from all inferiors. Handle multiprocess packet
15718 * linux-low.h: Include gdb_proc_service.h.
15719 (struct process_info_private): New.
15720 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15721 <lwpid_of>: Use ptid_get_lwp.
15722 (get_lwp_thread): Adjust.
15723 (struct lwp_info): Add `dead' member.
15724 (find_lwp_pid): Declare.
15725 * linux-low.c (thread_db_active): Delete.
15726 (new_inferior): Adjust comment.
15727 (inferior_pid): Delete.
15728 (linux_add_process): New.
15729 (handle_extended_wait): Adjust.
15730 (add_lwp): Change unsigned long to ptid.
15731 (linux_create_inferior): Add process to processes table. Adjust
15732 to use ptids. Don't set new_inferior here.
15733 (linux_attach_lwp): Rename to ...
15734 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15735 it. Adjust to use ptids.
15736 (linux_attach_lwp): New.
15737 (linux_attach): Add process to processes table. Don't set
15739 (struct counter): New.
15740 (second_thread_of_pid_p, last_thread_of_process_p): New.
15741 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15742 multiple processes.
15743 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15744 processes. Remove process from process table.
15745 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15746 to multiple processes.
15747 (any_thread_of): New.
15748 (linux_detach): Add `pid' argument, and handle it. Remove process
15749 from processes table.
15750 (linux_join): Add `pid' argument. Handle it.
15751 (linux_thread_alive): Change unsighed long argument to ptid_t.
15752 Consider dead lwps as not being alive.
15753 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15754 threads we're not interested in.
15755 (same_lwp, find_lwp_pid): New.
15756 (linux_wait_for_lwp): Change `pid' argument's type from int to
15758 (linux_wait_for_event): Rename to ...
15759 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15760 from int to ptid_t. Adjust.
15761 (linux_wait_for_event): New.
15762 (linux_wait_1): Add `ptid' argument. Change return type to
15763 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15764 that exit from the process table.
15765 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15767 (mark_lwp_dead): New.
15768 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15769 stopping all threads, mark its main lwp as dead.
15770 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15772 (fetch_register, usr_store_inferior_registers)
15773 (regsets_fetch_inferior_registers)
15774 (regsets_store_inferior_registers, linux_read_memory)
15775 (linux_write_memory): Inline `inferior_pid'.
15776 (linux_look_up_symbols): Adjust to use per-process
15777 `thread_db_active'.
15778 (linux_request_interrupt): Adjust to use ptids.
15779 (linux_read_auxv): Inline `inferior_pid'.
15780 (initialize_low): Don't reference thread_db_active.
15781 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15782 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15783 (ps_getpid): Return the pid of the current inferior.
15784 * thread-db.c (proc_handle, thread_agent): Delete.
15785 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15787 (find_one_thread): Change argument type to ptid_t. Adjust to
15789 (maybe_attach_thread): Adjust to per-process data and ptids.
15790 (thread_db_find_new_threads): Ditto.
15791 (thread_db_init): Ditto.
15792 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15793 processes table. Adjust to use ptids.
15794 (spu_kill, spu_detach): Adjust interface. Remove process from
15796 (spu_join, spu_thread_alive): Adjust interface.
15797 (spu_wait): Adjust interface. Remove process from processes
15798 table. Adjust to use ptids.
15799 * win32-low.c (current_inferior_tid): Delete.
15800 (current_inferior_ptid): New.
15801 (debug_event_ptid): New.
15802 (thread_rec): Take a ptid. Adjust.
15803 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15804 (child_delete_thread): Ditto.
15805 (do_initial_child_stuff): Add `attached' argument. Add process to
15807 (child_fetch_inferior_registers, child_store_inferior_registers):
15809 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15810 (win32_attach): Pass 1 to do_initial_child_stuff.
15811 (win32_kill): Adjust interface. Remove process from processes
15813 (win32_detach): Ditto.
15814 (win32_join): Adjust interface.
15815 (win32_thread_alive): Take a ptid.
15816 (win32_resume): Adjust to use ptids.
15817 (get_child_debug_event): Ditto.
15818 (win32_wait): Adjust interface. Remove exiting process from
15821 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15823 Non-stop mode support.
15825 * server.h (non_stop): Declare.
15826 (gdb_client_data, handler_func): Declare.
15827 (delete_file_handler, add_file_handler, start_event_loop):
15829 (handle_serial_event, handle_target_event, push_event)
15830 (putpkt_notif): Declare.
15831 * target.h (enum resume_kind): New.
15832 (struct thread_resume): Replace `step' field by `kind' field.
15833 (TARGET_WNOHANG): Define.
15834 (struct target_ops) <wait>: Add `options' argument.
15835 <supports_non_stop, async, start_non_stop>: New fields.
15836 (target_supports_non_stop, target_async): New.
15837 (start_non_stop): Declare.
15838 (mywait): Add `options' argument.
15839 * target.c (mywait): Add `options' argument. Print child exit
15840 notifications here.
15841 (start_non_stop): New.
15842 * server.c (non_stop, own_buf, mem_buf): New globals.
15843 (struct vstop_notif): New.
15844 (notif_queue): New global.
15845 (queue_stop_reply, push_event, discard_queued_stop_replies)
15846 (send_next_stop_reply): New.
15847 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15849 (attach_inferior): In non-stop mode, don't wait for the target
15851 (handle_general_set): Handle QNonStop.
15852 (handle_query): When handling qC, return the current general
15853 thread, instead of the first thread of the list.
15854 (handle_query): If the backend supports non-stop mode, include
15855 QNonStop+ in the qSupported query response.
15856 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15858 (handle_v_attach, handle_v_run): Handle non-stop mode.
15859 (handle_v_stopped): New.
15860 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15861 (myresume): Adjust to use resume_kind. Handle non-stop.
15862 (queue_stop_reply_callback): New.
15863 (handle_status): Handle non-stop mode.
15864 (main): Clear non_stop flag on reconnection. Use the event-loop.
15865 Refactor serial protocol handling from here ...
15866 (process_serial_event): ... to this new function. When GDB
15867 selects any thread, select one here. In non-stop mode, wait until
15868 GDB acks all pending events before exiting.
15869 (handle_serial_event, handle_target_event): New.
15870 * remote-utils.c (remote_open): Install remote_desc in the event
15872 (remote_close): Remove remote_desc from the event loop.
15873 (putpkt_binary): Rename to...
15874 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15875 (putpkt_binary): New as wrapper around putpkt_binary_1.
15876 (putpkt_notif): New.
15877 (prepare_resume_reply): In non-stop mode, don't change the
15879 * event-loop.c: New.
15880 * Makefile.in (OBJ): Add event-loop.o.
15881 (event-loop.o): New rule.
15883 * linux-low.h (pid_of): Moved here.
15885 (get_lwp_thread): Use lwpid_of.
15886 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15887 * linux-low.c (pid_of): Delete.
15888 (inferior_pid): Use lwpid_of.
15889 (linux_event_pipe): New.
15890 (target_is_async_p): New.
15892 (handle_extended_wait): Use lwpid_of.
15893 (add_lwp): Don't set lwpid field.
15894 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15895 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15896 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15897 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15898 first. Adjust to linux_wait_for_event interface changes. Use
15900 (linux_detach): Don't delete the main lwp here.
15901 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15902 (status_pending_p): Don't consider explicitly suspended lwps.
15903 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15904 pointer. Add OPTIONS argument. Change return type to int. Use
15905 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15906 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15907 pointer. Add status pointer argument. Return a pid instead of a
15908 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15909 changes. In non-stop mode, don't switch to a random thread.
15910 (linux_wait): Rename to...
15911 (linux_wait_1): ... this. Add target_options argument, and handle
15912 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15913 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15914 clean exit and signal exit code. Don't stop all threads in
15915 non-stop mode. In all-stop mode, only stop all threads when
15916 reporting a stop to GDB. Handle explicit thread stop requests.
15917 (async_file_flush, async_file_mark): New.
15919 (send_sigstop): Use lwpid_of.
15920 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15921 interface changes. In non-stop mode, don't switch to a random
15923 (linux_resume_one_lwp): Use lwpid_of.
15924 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15925 (linux_resume_one_thread): ... this. Handle resume_stop. In
15926 non-stop mode, don't look for pending flag in all threads.
15927 (resume_status_pending_p): Don't consider explicitly suspended
15929 (my_waitpid): Reimplement. Emulate __WALL.
15930 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15932 (sigchld_handler, linux_supports_non_stop, linux_async)
15933 (linux_start_non_stop): New.
15934 (linux_target_ops): Register linux_supports_non_stop, linux_async
15935 and linux_start_non_stop.
15936 (initialize_low): Install SIGCHLD handler.
15937 * thread-db.c (thread_db_create_event, find_one_thread)
15938 (thread_db_get_tls_address): Use lwpid_of.
15939 * win32-low.c (win32_detach): Adjust to use resume_kind.
15940 (win32_wait): Add `options' argument.
15941 * spu-low.c (spu_resume): Adjust to use resume_kind.
15942 (spu_wait): Add `options' argument.
15944 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15946 Decouple target code from remote protocol.
15948 * target.h (enum target_waitkind): New.
15949 (struct target_waitstatus): New.
15950 (struct target_ops) <wait>: Return an unsigned long. Take a
15951 target_waitstatus pointer instead of a char pointer.
15952 (mywait): Likewise.
15953 * target.c (mywait): Change prototype to return an unsigned long.
15954 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15955 * server.h (thread_from_wait, old_thread_from_wait): Delete
15957 (prepare_resume_reply): Change prototype to take a
15959 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15960 (last_status, last_ptid): New.
15961 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15962 pid instead of a signal.
15963 (attach_inferior): Remove "status" and "signal" parameters.
15965 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15967 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15968 (handle_v_requests, myresume): Remove "status" and "signal"
15969 parameters. Adjust.
15970 (handle_status): New.
15971 (main): Delete local `status'. Adjust.
15972 * remote-utils.c: Include target.h.
15973 (prepare_resume_reply): Change prototype to take a
15974 target_waitstatus. Adjust.
15976 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15978 * spu-low.c (spu_wait): Adjust.
15979 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15981 (win32_wait): Adjust.
15983 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15985 * target.h (struct thread_resume): Delete leave_stopped member.
15986 (struct target_ops): Add a `n' argument to the `resume' callback.
15987 * server.c (start_inferior): Adjust.
15988 (handle_v_cont, myresume): Adjust.
15989 * linux-low.c (check_removed_breakpoint): Adjust to resume
15990 interface change, and to removed leave_stopped field.
15991 (resume_ptr): Delete.
15992 (struct thread_resume_array): New.
15993 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15994 resume interface change.
15995 (linux_continue_one_thread, linux_queue_one_thread)
15996 (resume_status_pending_p): Check if the resume field is NULL
15997 instead of checking the leave_stopped member.
15998 (linux_resume): Adjust to the target resume interface change.
15999 * spu-low.c (spu_resume): Adjust to the target resume interface
16001 * win32-low.c (win32_detach, win32_resume): Ditto.
16003 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16005 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16007 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16009 (linux_continue_one_thread): Only preserve the stepping flag if
16010 there's a pending breakpoint.
16012 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16014 * server.c (main): After the inferior having exited, call
16015 remote_close before exiting gdbserver.
16017 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16019 Fix size of FPSCR in Power 7 processors.
16020 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16021 (PPC_FEATURE_HAS_DFP): New #define.
16022 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16025 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16027 * server.c (handle_query) Whitespace and formatting.
16029 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16031 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16032 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16033 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16034 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16035 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16036 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16037 Makefile.in, configure.ac: Fix whitespace throughout.
16038 * configure: Regenerate.
16040 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16042 * inferiors.c (find_inferior): Make it safe for the callback
16043 function to delete the currently iterated inferior.
16045 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16047 * Makefile.in (linuw_low_h): Move higher.
16048 (thread-db.o): Depend on $(linux_low_h).
16050 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16052 Rename "process" to "lwp" throughout.
16054 * linux-low.c (all_processes): Rename to...
16055 (all_lwps): ... this.
16056 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16057 (add_process): Rename to ...
16058 (add_lwp): ... this. Adjust.
16059 (linux_create_inferior): Adjust.
16060 (linux_attach_lwp): Adjust.
16061 (linux_attach): Adjust.
16062 (linux_kill_one_process): Rename to ...
16063 (linux_kill_one_lwp): ... this. Adjust.
16064 (linux_kill): Adjust.
16065 (linux_detach_one_process): Rename to ...
16066 (linux_detach_one_lwp): ... this. Adjust.
16067 (linux_detach): Adjust.
16068 (check_removed_breakpoint): Adjust.
16069 (status_pending_p): Adjust.
16070 (linux_wait_for_process): Rename to ...
16071 (linux_wait_for_lwp): ... this. Adjust.
16072 (linux_wait_for_event): Adjust.
16073 (send_sigstop): Adjust.
16074 (wait_for_sigstop): Adjust.
16075 (stop_all_processes): Rename to ...
16076 (stop_all_lwps): ... this.
16077 (linux_resume_one_process): Rename to ...
16078 (linux_resume_one_lwp): ... this. Adjust.
16079 (linux_set_resume_request, linux_continue_one_thread)
16080 (linux_queue_one_thread, resume_status_pending_p)
16081 (usr_store_inferior_registers, regsets_store_inferior_registers)
16082 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16084 * linux-low.h (get_process): Rename to ...
16085 (get_lwp): ... this. Adjust.
16086 (get_thread_process): Rename to ...
16087 (get_thread_lwp): ... this. Adjust.
16088 (get_process_thread): Rename to ...
16089 (get_lwp_thread): ... this. Adjust.
16090 (struct process_info): Rename to ...
16091 (struct lwp_info): ... this.
16092 (all_processes): Rename to ...
16093 (all_lwps): ... this.
16094 * proc-service.c (ps_lgetregs): Adjust.
16095 * thread-db.c (thread_db_create_event, find_one_thread)
16096 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16098 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16100 * server.c (handle_query): Handle "qAttached".
16102 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16104 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16105 GPLv3, update license URL.
16107 2009-03-01 Doug Evans <dje@google.com>
16109 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16110 (server_h): Add gdb_signals.h.
16111 (signals.o): Update.
16112 * server.h (target_signal_from_host,target_signal_to_host_p)
16113 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16115 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16117 * remote-utils.c (getpkt): Also generate remote-debug
16118 information if noack_mode is set.
16120 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16122 * server.c (handle_query): Report qXfer:siginfo:read and
16123 qXfer:siginfo:write as supported and handle them.
16124 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16125 * linux-low.c (linux_xfer_siginfo): New.
16126 (linux_target_ops): Set it.
16128 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16130 * server.c (gdbserver_usage): Mention --remote-debug.
16131 (main): Accept '--remote-debug' switch.
16133 2009-01-18 Doug Evans <dje@google.com>
16135 * regcache.c (new_register_cache): No need to check result of xcalloc.
16136 * server.c (handle_search_memory): Back out calls to xmalloc,
16137 result is checked and error is returned to user upon failure.
16138 (handle_query): Ditto. Add more checks for result of malloc.
16139 (handle_v_cont): Check result of malloc, report error back to
16141 (handle_v_run): Ditto. Call freeargv.
16142 * server.h (freeargv): Declare.
16143 * utils.c (freeargv): New fn.
16145 2009-01-15 Doug Evans <dje@google.com>
16147 * gdbreplay.c (perror_with_name): Make arg const char *.
16148 * server.h (target_signal_to_name): Make return type const char *.
16149 * thread-db.c (thread_db_err_str): Make return type const char *.
16150 * utils.c (perror_with_name): Make arg const char *.
16152 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16154 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16155 when handling a EXIT_PROCESS_DEBUG_EVENT.
16157 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16159 * gdbreplay.c (gdbreplay_version): Update copyright year.
16160 * server.c (gdbserver_version): Likewise.
16162 2009-01-05 Doug Evans <dje@google.com>
16164 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16165 (handle_extended_wait): Improve comment.
16167 2008-12-13 Doug Evans <dje@google.com>
16169 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16170 * server.h (ATTR_MALLOC): New macro.
16171 (xmalloc,xcalloc,xstrdup): Declare.
16172 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16173 * inferiors.c: Ditto.
16174 * linux-low.c: Ditto.
16175 * mem-break.c: Ditto.
16176 * regcache.c: Ditto.
16177 * remote-utils.c: Ditto.
16180 * win32-low.c: Ditto.
16182 2008-12-12 Doug Evans <dje@google.com>
16184 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16185 in debugging printf.
16187 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16189 2008-12-09 Doug Evans <dje@google.com>
16191 * linux-low.h (struct process_info): Delete member tid, unused.
16192 * thread-db.c (find_one_thread): Update.
16193 (maybe_attach_thread): Update.
16195 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16197 * target.h (struct target_ops): Add qxfer_osdata member.
16198 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16200 (linux_qxfer_osdata): New functions.
16201 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16203 * server.c (handle_query): Handle "qXfer:osdata:read:".
16204 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16205 (buffer_xml_printf): New functions.
16206 * server.h (struct buffer): New.
16207 (buffer_grow_str, buffer_grow_str0): New macros.
16208 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16209 (buffer_xml_printf): Declare.
16211 2008-11-24 Doug Evans <dje@google.com>
16213 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16215 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16217 * server.c (handle_v_run): Always use the supplied argument list.
16219 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16221 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16222 (xtensa_regmap_table): Add entry for scompare1.
16224 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16226 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16227 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16228 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16229 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16230 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16231 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16232 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16233 XML target descriptions.
16234 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16235 when inferior is running on an ISA 2.05 or later processor. Add
16236 special case to return offset for full 64-bit slot of FPSCR when
16239 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16241 * Makefile.in (SFILES, clean): Added sparc64 files.
16242 (reg-sparc64.o, reg-sparc64.c): New.
16243 * configure.srv (sparc*-*-linux*): New configuration.
16244 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16245 syscall arguments for SPARC.
16246 (regsets_store_inferior_registers): Likewise.
16247 * linux-sparc-low.c: New file.
16249 2008-10-21 Doug Evans <dje@google.com>
16251 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16252 (READLINE_DIR,READLINE_DEP): Delete.
16253 (INTERNAL_CFLAGS): Update.
16254 (LINTFLAGS): Update.
16256 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16258 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16259 whole argv from the last run, not just argv[0].
16261 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16263 * regcache.c (new_register_cache): Return NULL if the register
16264 cache size isn't known yet.
16265 (free_register_cache): Avoid dereferencing a NULL regcache.
16267 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16269 * configure.srv: Merge MIPS and MIPS64.
16271 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16273 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16275 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16277 * Makefile.in: Add required vsx dependencies.
16279 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16280 Declare init_registers_powerpc_vsx32l.
16281 Declare init_registers_powerpc_vsx64l.
16282 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16283 (ppc_arch_setup): Check for VSX in hwcap.
16284 (ppc_fill_vsxregset): New function.
16285 (ppc_store_vsxregset): New function.
16286 Add new VSX entry in regset_info target_regsets.
16288 * configure.srv: Add new VSX dependencies.
16290 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16292 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16293 (remote_open): Set or clear transport_is_reliable.
16294 (putpkt_binary): Don't expect acks in noack mode.
16295 (getpkt): Don't send ack/nac in noack mode.
16296 * server.c (handle_general_set): Handle QStartNoAckMode.
16297 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16299 (main): Reset noack_mode on every connection.
16300 * server.h (noack_mode): Declare.
16302 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16304 * Makefile.in (GDBREPLAY_OBS): New variable.
16305 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16307 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16308 Daniel Jacobowitz <dan@codesourcery.com>
16310 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16311 (usr_store_inferior_registers): Likewise.
16312 (regsets_store_inferior_registers): Likewise.
16314 2008-07-31 Rolf Jansen <rj@surtec.com>
16315 Pedro Alves <pedro@codesourcery.com>
16317 * configure.ac: Check for memmem declaration.
16318 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16319 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16320 (disable_packet_qfThreadInfo): Unconditionally compile.
16321 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16322 * configure, config.in: Regenerate.
16324 2008-07-28 Doug Kwan <dougkwan@google.com>
16326 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16327 (linux_write_memory): Remove declaration of errno.
16329 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16331 * linux-low.c (handle_extended_wait): Do not use "status"
16332 variable uninitialized.
16334 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16336 * server.c (handle_v_attach): Inhibit reporting dll changes.
16338 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16340 * remote-utils.c (prepare_resume_reply): If requested, don't
16341 output "thread:TID" in the T stop reply.
16343 * server.c (disable_packet_vCont, disable_packet_Tthread)
16344 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16345 (handle_query): If requested, disable support for qC, qfThreadInfo
16347 (handle_v_requests): If requested, disable support for vCont.
16348 (gdbserver_show_disableable): New.
16349 (main): Handle --disable-packet and --disable-packet=LIST.
16351 * server.h (disable_packet_vCont, disable_packet_Tthread)
16352 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16354 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16356 * server.c (gdbserver_usage): Mention --version.
16358 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16360 * Makefile.in (gdbreplay.o): New rule.
16362 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16364 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16365 message, not gdbserver.
16367 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16368 Nathan Sidwell <nathan@codesourcery.com>
16369 Joseph Myers <joseph@codesourcery.com>
16371 * acinclude.m4: Include ../../config/acx.m4.
16372 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16373 * configure, config.in: Regenerate.
16374 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16375 * server.c (gdbserver_version): Print PKGVERSION.
16376 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16377 (main): Adjust gdbserver_usage calls.
16378 * gdbreplay.c (version, host_name): Add declarations.
16379 (gdbreplay_version, gdbreplay_usage): New.
16380 (main): Accept --version and --help options.
16382 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16384 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16385 (arm_breakpoint_at): Handle Thumb.
16386 (the_low_target): Add comment.
16388 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16390 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16392 2008-05-09 Doug Evans <dje@google.com>
16394 * server.h (decode_search_memory_packet): Declare.
16395 * remote-utils.c (decode_search_memory_packet): New fn.
16396 * server.c (handle_search_memory_1): New fn.
16397 (handle_search_memory): New fn.
16398 (handle_query): Process qSearch:memory packets.
16400 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16402 * regcache.c (registers_length): Remove.
16403 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16404 full register packet.
16405 * regcache.h (registers_length): Remove prototype.
16406 * server.h (PBUFSIZ): Define to 16384.
16408 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16410 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16411 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16412 powerpc-64l.o, and powerpc-altivec64l.o.
16413 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16414 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16415 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16416 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16417 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16420 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16421 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16422 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16423 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16424 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16425 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16426 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16427 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16428 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16429 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16432 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16433 (init_registers_powerpc_32l): ... this new prototype.
16434 (init_registers_powerpc_32): Remove, replace by ...
16435 (init_registers_powerpc_altivec32l): ... this new prototype.
16436 (init_registers_powerpc_e500): Remove, replace by ...
16437 (init_registers_powerpc_e500l): ... this new prototype.
16438 (init_registers_ppc64): Remove, replace by ...
16439 (init_registers_powerpc_64l): ... this new prototype.
16440 (init_registers_powerpc_64): Remove, replace by ...
16441 (init_registers_powerpc_altivec64l): ... this new prototype.
16442 (ppc_num_regs): Set to 73.
16443 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16444 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16445 (ppc_cannot_store_register): Handle orig_r3 and trap.
16446 (ppc_arch_setup): Update init_registers_... calls.
16447 (ppc_fill_gregset): Handle orig_r3 and trap.
16449 * inferiors.c (clear_inferiors): Reset current_inferior.
16451 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16453 * acinclude.m4: Add override.m4.
16454 * configure: Regenerate.
16456 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16458 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16459 initial call to init_register_ppc64.
16461 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16463 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16464 single powerpc*-*-linux* case.
16465 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16467 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16469 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16470 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16472 * linux-ppc-low.c: Include <elf.h>.
16473 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16474 (ppc_hwcap): New global variable.
16475 (ppc_regmap): Remove __SPE__ #ifdef sections.
16476 (ppc_regmap_e500): New global variable.
16477 (ppc_cannot_store_register): Update __SPE__ special case.
16478 (ppc_get_hwcap): New function.
16479 (ppc_arch_setup): Use it to determine whether inferior supports
16480 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16481 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16482 Do not access registers if target does not support AltiVec.
16483 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16484 Do not access registers if target does not support SPE.
16485 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16487 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16489 * linux-low.c (disabled_regsets, num_regsets): New.
16490 (use_regsets_p): Delete.
16491 (linux_wait_for_process): Clear disabled_regsets.
16492 (regsets_fetch_inferior_registers): Check and set it.
16493 (regsets_store_inferior_registers): Likewise.
16494 (linux_fetch_registers, linux_store_registers): Do not use
16496 (initialize_low): Allocate disabled_regsets.
16498 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16500 * Makefile.in (LIBOBJS): New.
16501 (OBS): Use LIBOBJS.
16502 (memmem.o): New rule.
16503 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16504 * configure: Regenerated.
16506 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16508 * server.c (handle_query): Never return "unsupported" for
16509 qXfer:features:read queries.
16511 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16513 * server.c (get_features_xml): Fix inverted condition.
16514 (handle_query): Always support qXfer:feature:read.
16516 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16518 * server.c (wrapper_argv): New.
16519 (start_inferior): Handle wrapper_argv. If set, expect an extra
16521 (gdbserver_usage): Document --wrapper.
16522 (main): Parse --wrapper.
16524 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16526 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16527 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16528 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16529 (ppc_set_pc): Likewise.
16530 (ppc_arch_setup): New function.
16531 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16532 of collect_register.
16533 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16535 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16537 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16538 instead of linux-ppc64-low.o.
16539 * linux-ppc64-low.c: Remove file.
16540 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16541 (linux-ppc64-low.o): Remove rule.
16543 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16544 (init_registers_powerpc_64): Likewise.
16545 (ppc_regmap): Conditionally define depending on __powerpc64__.
16546 (ppc_cannot_store_register): Do not special-case "fpscr" when
16547 compiled on __powerpc64__.
16548 (ppc_collect_ptrace_register): New function.
16549 (ppc_supply_ptrace_register): New function.
16550 (ppc_breakpoint): Change type to "unsigned int".
16551 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16552 (the_low_target): Conditionally provide initializers for the
16553 arch_setup member depending on __powerpc64__. Install
16554 collect_ptrace_register and supply_ptrace_register members.
16556 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16558 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16559 * server.c (gdbserver_xmltarget): Define.
16560 (get_features_xml): Use it to replace "target.xml" and arch_string.
16562 * configure.srv: Remove srv_xmltarget. Add XML files that were
16563 mentioned there to srv_xmlfiles instead. Remove conditional tests
16564 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16565 srv_xmlfiles and srv_regobj to include all possible choices.
16566 * configure.ac (srv_xmltarget): Remove.
16567 (srv_xmlfiles): Do not add "target.xml".
16568 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16569 checks for supplementary target information.
16570 * configure: Regenerate.
16571 * Makefile.in (XML_TARGET): Remove.
16572 (target.xml): Remove rule.
16573 (clean): Do not clean up target.xml.
16574 (.PRECIOUS): Do not mention target.xml.
16576 * target.h (struct target_ops): Remove arch_string member.
16577 * linux-low.c (linux_arch_string): Remove.
16578 (linux_target_ops): Remove arch_string initializer.
16579 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16580 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16581 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16582 * spu-low.c (spu_arch_string): Remove.
16583 (spu_target_ops): Remove arch_string initializer.
16584 * win32-low.c (win32_arch_string): Remove.
16585 (win32_target_ops): Remove arch_string initializer.
16586 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16587 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16588 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16590 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16592 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16593 by collect_ptrace_register and supply_ptrace_register hooks.
16594 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16595 instead of checking for the_low_target.left_pad_xfer.
16596 (usr_store_inferior_registers): Use collect_ptrace_register callback
16597 instead of checking for the_low_target.left_pad_xfer.
16599 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16600 (s390_supply_ptrace_register): Likewise.
16601 (s390_fill_gregset): Call s390_collect_ptrace_register.
16602 (the_low_target): Update.
16604 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16605 (ppc_supply_ptrace_register): Likewise.
16606 (the_low_target): Update.
16608 * linux-i386-low.c (the_low_target): Update.
16609 * linux-x86-64-low.c (the_low_target): Update.
16611 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16613 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16614 reg-s390.o and reg-s390x.o.
16616 * linux-low.c (new_inferior): New global variable.
16617 (linux_create_inferior, linux_attach): Set it.
16618 (linux_wait_for_process): Call the_low_target.arch_setup after the
16619 target has stopped for the first time.
16620 (initialize_low): Do not call the_low_target.arch_setup.
16622 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16623 (s390_set_pc): Likewise.
16624 (s390_arch_setup): New function.
16625 (the_low_target): Use s390_arch_setup as arch_setup routine.
16627 * regcache.c (realloc_register_cache): New function.
16628 (set_register_cache): Call it for each existing regcache.
16630 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16632 * server.h (init_registers): Remove prototype.
16634 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16635 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16636 instead of init_registers ().
16637 * linux-arm-low.c (init_registers_arm): Add prototype.
16638 (init_registers_arm_with_iwmmxt): Likewise.
16639 (the_low_target): Add initializer for arch_setup field.
16640 * linux-cris-low.c (init_registers_cris): Add prototype.
16641 (the_low_target): Add initializer for arch_setup field.
16642 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16643 (the_low_target): Add initializer for arch_setup field.
16644 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16645 (the_low_target): Add initializer for arch_setup field.
16646 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16647 (the_low_target): Add initializer for arch_setup field.
16648 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16649 (the_low_target): Add initializer for arch_setup field.
16650 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16651 (the_low_target): Add initializer for arch_setup field.
16652 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16653 (init_registers_mips64_linux): Likewise.
16654 (the_low_target): Add initializer for arch_setup field.
16655 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16656 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16657 (the_low_target): Add initializer for arch_setup field.
16658 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16659 (init_registers_powerpc_64): Likewise.
16660 (the_low_target): Add initializer for arch_setup field.
16661 * linux-s390-low.c (init_registers_s390): Add prototype.
16662 (init_registers_s390x): Likewise.
16663 (the_low_target): Add initializer for arch_setup field.
16664 * linux-sh-low.c (init_registers_sh): Add prototype.
16665 (the_low_target): Add initializer for arch_setup field.
16666 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16667 (the_low_target): Add initializer for arch_setup field.
16668 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16669 (the_low_target): Add initializer for arch_setup field.
16671 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16672 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16673 instead of init_registers ().
16674 * win32-arm-low.c (init_registers_arm): Add prototype.
16675 (the_low_target): Add initializer for arch_setup field.
16676 * win32-i386-low.c (init_registers_i386): Add prototype.
16677 (the_low_target): Add initializer for arch_setup field.
16679 * spu-low.c (init_registers_spu): Add prototype.
16680 (initialize_low): Call initialie_registers_spu () instead of
16681 initialize_registers ().
16683 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16685 * server.c (handle_v_requests): When handling the vRun and vAttach
16686 packets, if already debugging a process, don't kill it. Return an
16689 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16691 * server.c (handle_query): Correct length check.
16693 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16695 * win32-low.c (do_initial_child_stuff): Add process handle
16696 parameter. Set current_process_handle and current_process_id from the
16697 parameters. Clear globals.
16698 (win32_create_inferior): Don't set current_process_handle and
16699 current_process_id here. Instead pass them on the call to
16700 do_initial_child_stuff.
16701 (win32_attach): Likewise.
16702 (win32_clear_inferiors): New.
16703 (win32_kill): Don't close the current process handle or the
16704 current thread handle here. Instead call win32_clear_inferiors.
16705 (win32_detach): Don't open a new handle to the process. Call
16706 win32_clear_inferiors.
16707 (win32_join): Don't rely on current_process_handle; open a new
16708 handle using the process id.
16709 (win32_wait): Call win32_clear_inferiors when the inferior process
16712 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16714 * server.c (monitor_show_help): Add "exit".
16716 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16718 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16719 (clean): Add reg-xtensa.c.
16720 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16721 * configure.srv (xtensa*-*-linux*) New target.
16722 * linux-xtensa-low.c: New.
16723 * xtensa-xtregs.c: New.
16725 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16727 * hostio.c: Don't include errno.h.
16728 (errno_to_fileio_errno): Move to hostio-errno.
16729 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16730 error number outputting to the target->hostio_last_error callback.
16731 (hostio_packet_error): Use FILEIO_EINVAL directly.
16732 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16733 calls to hostio_error.
16734 * hostio-errno.c: New.
16735 * server.h (hostio_last_error_from_errno): Declare.
16736 * target.h (target_ops): Add hostio_last_error member.
16737 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16738 as hostio_last_error handler.
16739 * spu-low.c (spu_target_ops): Likewise.
16740 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16741 (wince_hostio_last_error): New functions.
16742 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16743 as hostio_last_error handler.
16744 (win32_target_ops) [!_WIN32_WCE]: Register
16745 hostio_last_error_from_errno as hostio_last_error handler.
16746 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16747 (hostio-errno.o): New rule.
16748 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16749 * configure.srv (srv_hostio_err_objs): New variable. Default to
16751 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16752 * configure: Regenerate.
16754 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16756 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16757 (linux_kill, linux_detach): Clean up the process list.
16758 * remote-utils.c (remote_open): Improve port number parsing.
16759 (putpkt_binary, input_interrupt): Only send interrupts if the target
16761 * server.c (extended_protocol): Make static.
16762 (attached): Define earlier.
16763 (exit_requested, response_needed, program_argv): New variables.
16764 (target_running): New.
16765 (start_inferior): Clear attached here.
16766 (attach_inferior): Set attached here.
16767 (require_running): Define.
16768 (handle_query): Use require_running and target_running. Implement
16770 (handle_v_attach, handle_v_run): New.
16771 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16772 (gdbserver_usage): Update.
16773 (main): Redo argument parsing. Handle --debug and --multi. Handle
16774 --attach along with other options or after the port. Save
16775 program_argv. Support no initial program. Resynchronize
16776 communication with GDB after an error. Handle "monitor exit".
16777 Use require_running and target_running. Always allow the extended
16778 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16779 restart in extended mode.
16780 * README: Refer to the GDB manual. Update --attach usage.
16782 2007-12-20 Andreas Schwab <schwab@suse.de>
16784 * linux-low.c (STACK_SIZE): Define.
16785 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16786 (linux_test_for_tracefork): Likewise.
16788 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16790 * linux-low.c (linux_wait_for_event): Update messages. Do not
16791 reinsert auto-delete breakpoints.
16792 * mem-break.c (struct breakpoint): Change return type of handler to
16794 (set_breakpoint_at): Update handler type.
16795 (reinsert_breakpoint_handler): Return 1 instead of calling
16797 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16799 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16800 * mem-break.h (set_breakpoint_at): Update handler type.
16801 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16802 * win32-low.c (auto_delete_breakpoint): New.
16803 (get_child_debug_event): Use it.
16805 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16807 * configure.ac: Check for pread and pwrite.
16808 * hostio.c (handle_pread): Fall back to lseek and read.
16809 (handle_pwrite): Fall back to lseek and write.
16810 * config.in, configure: Regenerated.
16812 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16814 * server.c (myresume): Add own_buf argument.
16815 (main): Update calls.
16817 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16819 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16820 * remote-utils.c (remote_open): Do not call disable_async_io.
16821 (block_async_io): Delete.
16822 (unblock_async_io): Make static.
16823 (initialize_async_io): New.
16824 * server.c (handle_v_cont): Handle async I/O here.
16825 (myresume): Likewise. Move other common resume tasks here...
16826 (main): ... from here. Call initialize_async_io. Disable async
16827 I/O before the main loop.
16828 * server.h (initialize_async_io): Declare.
16829 (block_async_io, unblock_async_io): Delete prototypes.
16830 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16832 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16834 * remote-utils.c (readchar): Allow binary data in received messages.
16836 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16838 * win32-low.c (attaching): New global.
16839 (win32_create_inferior): Clear the `attaching' global.
16840 (win32_attach): Set the `attaching' global.
16841 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16842 attaching. Only set a breakpoint at the entry point if not
16845 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16847 * server.c (main): Don't report dll events on the initial
16848 connection on attaches.
16850 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16852 * server.c (main): Relax numerical bases supported for the pid of
16853 the --attach command line argument.
16855 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16857 * win32-low.c (win32_attach): Call OpenProcess before
16858 DebugActiveProcess, not after. Add last error output to error
16861 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16863 * win32-low.c (win32_get_thread_context)
16864 (win32_set_thread_context): New functions.
16865 (thread_rec): Use win32_get_thread_context.
16866 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16867 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16870 2007-12-03 Leo Zayas
16871 Pedro Alves <pedro_alves@portugalmail.pt>
16873 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16875 (child_add_thread): Minor cleanup.
16876 (child_continue): Resume artificially suspended threads before
16877 calling ContinueDebugEvent.
16878 (suspend_one_thread): New.
16879 (fake_breakpoint_event): New.
16880 (get_child_debug_event): Change return type to int. Check here if
16881 gdb sent an interrupt request. If a soft interrupt was requested,
16882 fake a breakpoint event. Return 0 if there is no event to handle,
16884 (win32_wait): Don't check here if gdb sent an interrupt request.
16885 Ensure there is a valid event to handle.
16886 (win32_request_interrupt): Add soft interruption method as last
16889 2007-12-03 Leo Zayas
16890 Pedro Alves <pedro_alves@portugalmail.pt>
16892 * win32-low.h (win32_thread_info): Add descriptions to the
16893 structure members. Replace `suspend_count' counter by a
16895 * win32-low.c (thread_rec): Update condition of when to get the
16896 context from the inferior. Rely on ContextFlags being set if it
16897 has already been retrieved. Only suspend the inferior thread if
16898 we haven't already. Warn if that fails.
16899 (continue_one_thread): s/suspend_count/suspended/. Only call
16900 ResumeThread once. Warn if that fails.
16902 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16904 * win32-low.c (win32_wait): Don't read from the inferior when it
16905 has already exited.
16907 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16909 * Makefile.in (win32_low_h): New variable.
16910 (win32-low.o): Add dependency on $(win32_low_h).
16911 (win32-arm-low.o, win32-i386-low.o): New rules.
16913 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16915 * hostio.c: Correct copyright year.
16917 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16919 * Makefile.in (OBS): Add hostio.o.
16920 (hostio.o): New rule.
16921 * server.h (handle_vFile): Declare.
16922 * hostio.c: New file.
16923 * server.c (handle_v_requests): Take packet_len and new_packet_len
16924 for binary packets. Call handle_vFile.
16925 (main): Update call to handle_v_requests.
16927 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16929 * linux-low.c: Include <sched.h>.
16931 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16933 * linux-low.c (linux_tracefork_grandchild): New.
16934 (linux_tracefork_child): Use clone.
16935 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16937 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16939 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16941 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16943 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16945 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16947 * inferiors.c (change_inferior_id): Delete.
16948 (add_pid_to_list, pull_pid_from_list): New.
16949 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16950 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16951 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16952 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16953 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16954 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16955 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16956 (using_threads): Always set to 1.
16957 (handle_extended_wait): New.
16958 (add_process): Do not set TID.
16959 (linux_create_inferior): Set must_set_ptrace_flags.
16960 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16961 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16962 (linux_thread_alive): Rename TID argument to LWPID.
16963 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16964 (linux_wait_for_event): Do not use TID or check using_threads. Update
16965 call to dead_thread_notify. Call handle_extended_wait.
16966 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16967 (send_sigstop): Delete sigstop_sent.
16968 (wait_for_sigstop): Avoid TID.
16969 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16970 (linux_test_for_tracefork): New.
16971 (linux_lookup_signals): Use thread_db_active and
16972 linux_supports_tracefork_flag.
16973 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16974 * linux-low.h (get_process_thread): Avoid TID.
16975 (struct process_ifo): Move thread_known and tid to the end. Remove
16977 (linux_attach_lwp, thread_db_init): Update prototypes.
16978 * server.h (change_inferior_id): Delete prototype.
16979 (add_pid_to_list, pull_pid_from_list): New prototypes.
16980 * thread-db.c (thread_db_use_events): New.
16981 (find_first_thread): Rename to...
16982 (find_one_thread): ...this. Update callers and messages. Do not
16983 call fatal. Check thread_db_use_events. Do not call
16984 change_inferior_id or new_thread_notify.
16985 (maybe_attach_thread): Update. Do not call new_thread_notify.
16986 (thread_db_init): Set thread_db_use_events. Check use_events.
16987 * utils.c (fatal, warning): Correct message prefix.
16989 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16991 * Makefile.in (clean): Remove new files.
16992 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16993 (powerpc-64.o, powerpc-64.c): New rules.
16994 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16995 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16997 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16999 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17000 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17001 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17002 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17003 (target_regsets): Add AltiVec and SPE register sets.
17004 * configure.ac: Check for AltiVec and SPE.
17005 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17006 (ppc_fill_vrregset, ppc_store_vrregset): New.
17007 (target_regsets): Add AltiVec register set.
17008 * configure: Regenerated.
17010 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17012 * linux-low.c (O_LARGEFILE): Define.
17013 (linux_read_memory): Use /proc/PID/mem.
17014 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17015 * configure, config.in: Regenerated.
17017 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17019 * linux-low.c (linux_wait_for_event): Do not pass signals while
17022 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17024 * win32-low.c (create_process): New.
17025 (win32_create_inferior): Use create_process instead of
17026 CreateProcess. If create_process failed retry appending an ".exe"
17027 suffix. Store the GetLastError result immediatelly after
17028 create_process calls and use it on the call to error.
17030 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17032 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17034 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17036 * configure.ac: Switch license to GPLv3.
17038 2007-08-01 Michael Snyder <msnyder@access-company.com>
17040 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17042 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17044 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17046 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17047 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17048 CloseToolhelp32Snapshot.
17049 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17050 CloseToolhelp32Snapshot.
17052 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17054 * server.c (main): Check for inferior exit before main loop.
17056 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17058 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17059 instead of on tmp_desc.
17061 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17062 Daniel Jacobowitz <dan@codesourcery.com>
17064 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17065 (add_thread): Minor cleanups.
17066 (clear_inferiors): Move lower in the file. Clear the DLL
17068 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17069 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17070 (xml_escape_text): New.
17071 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17073 (handle_v_cont): Report errors.
17074 (gdbserver_version): Update.
17075 (main): Correct size of own_buf. Do not report initial DLL events.
17076 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17077 (unloaded_dll, xml_escape_text): New.
17078 * win32-low.c (enum target_waitkind): Update comments.
17079 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17080 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17081 (win32_EnumProcessModules, win32_GetModuleInformation)
17082 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17083 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17084 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17085 (win32_Module32First, win32_Module32Next, load_toolhelp)
17086 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17087 (get_child_debug_event): Handle DLL events.
17088 (win32_wait): Likewise.
17090 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17092 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17093 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17095 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17097 * win32-low.c (handle_output_debug_string): Ignore event if not
17100 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17102 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17104 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17106 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17108 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17110 * inferiors.c (change_inferior_id): Add comment.
17111 * linux-low.c (check_removed_breakpoint): Add an early
17112 prototype. Improve debug output.
17113 (linux_attach): Doc update.
17114 (linux_detach_one_process, linux_detach): Clean up before releasing
17116 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17117 * linux-low.h (struct process_info): Doc improvement.
17118 * mem-break.c (delete_all_breakpoints): New.
17119 * mem-break.h (delete_all_breakpoints): New prototype.
17120 * thread-db.c (find_first_thread): New.
17121 (thread_db_create_event): Call it instead of
17122 thread_db_find_new_threads. Clean up unused variables.
17123 (maybe_attach_thread): Remove first thread handling.
17124 (thread_db_find_new_threads): Use find_first_thread.
17125 (thread_db_get_tls_address): Likewise.
17127 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17129 * thread-db.c (thread_db_find_new_threads): Add prototype.
17130 (thread_db_create_event): Check for the main thread before adding
17132 (maybe_attach_thread): Only enable event reporting if TID == 0.
17133 (thread_db_get_tls_address): Check for new threads.
17135 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17137 * linux-low.c (linux_create_inferior): Try execv before execvp.
17138 * spu-low.c (spu_create_inferior): Likewise.
17140 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17142 * linux-low.c (linux_create_inferior): Change execv to execvp.
17143 * spu-low.c (spu_create_inferior): Likewies.
17145 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17147 * Makefile.in (clean): Clean new files instead of deleted ones.
17148 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17149 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17151 * configure.srv: Specify XML files and new regformats for MIPS and
17153 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17154 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17155 an entry for the restart register.
17156 (mips_cannot_fetch_register, mips_cannot_store_register)
17157 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17158 register names to match the XML descriptions.
17159 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17160 restart register instead of $0.
17162 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17163 Markus Deuling <deuling@de.ibm.com>
17165 * remote-utils.c (decode_xfer_write): New function.
17166 * server.h (decode_xfer_write): Add prototype.
17167 * server.c (handle_query): Add PACKET_LEN argument. Support
17168 qXfer:spu:read and qXfer:spu:write packets.
17169 (main): Pass packet_len to handle_query.
17170 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17171 * target.h (target_ops): Add qxfer_spu.
17173 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17175 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17176 accessing non-seekable spufs files.
17178 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17180 * server.c (handle_query): Add reply for qC packet.
17182 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17183 Leo Zayas <lerele@champenstudios@com>
17185 * server.h (check_remote_input_interrupt_request): New function.
17186 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17187 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17188 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17189 (check_remote_input_interrupt_request): New function.
17190 * server.h (check_remote_input_interrupt_request): Declare.
17191 * win32-low.c (winapi_DebugBreakProcess,
17192 winapi_GenerateConsoleCtrlEvent): New typedefs.
17193 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17195 (win32_wait): Check for remote interrupt request
17196 with check_remote_input_interrupt_request.
17197 (win32_request_interrupt): New function.
17198 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17200 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17202 * win32-low.c (debug_registers_changed,
17203 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17204 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17205 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17206 (thread_rec): Get context using the low target.
17207 (child_add_thread): Call thread_added on the low target,
17208 which does the same thing.
17210 (do_initial_child_stuff): Remove debug registers references.
17211 Set context using the low target. Resume threads after
17212 setting the contexts.
17213 (child_continue): Remove dead variable. Remove debug
17214 registers references.
17215 (child_fetch_inferior_registers): Go through the low target.
17216 (do_child_store_inferior_registers): Remove.
17217 (child_store_inferior_registers): Go through the low target.
17218 (win32_resume): Remove debug registers references.
17219 Set context using the low target.
17220 (handle_exception): Change return type to void. Don't record
17221 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17222 first chance exception.
17223 (get_child_debug_event): Change return type to void. Remove
17224 goto loop. Always return after waiting for debug event.
17225 (win32_wait): Convert to switch statement. Handle spurious
17228 * win32-i386-low.c (debug_registers_changed,
17229 debug_registers_used): New.
17230 (initial_stuff): Rename to ...
17231 (i386_initial_stuff): ... this. Clear debug registers
17233 (store_debug_registers): Delete.
17234 (i386_get_thread_context): New.
17235 (load_debug_registers): Delete.
17236 (i386_set_thread_context): New.
17237 (i386_thread_added): New.
17238 (single_step): Rename to ...
17239 (i386_single_step): ... this.
17240 (do_fetch_inferior_registers): Rename to ...
17241 (i386_fetch_inferior_register): ... this.
17242 (i386_store_inferior_register): New.
17243 (the_low_target): Adapt to new interface.
17245 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17246 (arm_get_thread_context): New.
17247 (arm_set_thread_context): New.
17249 (do_fetch_inferior_registers): Rename to ...
17250 (arm_fetch_inferior_register): ... this.
17251 (arm_store_inferior_register): New.
17252 (arm_wince_breakpoint): Reimplement as unsigned long.
17253 (arm_wince_breakpoint_len): Define.
17254 (the_low_target): Adapt to new interface.
17256 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17257 load_debug_registers. Add get_thread_context, set_thread_context,
17258 thread_added and store_inferior_register. Rename
17259 fetch_inferior_registers to fetch_inferior_register.
17260 (regptr): Remove declaration.
17262 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17264 * linux-low.c (linux_detach): Change return type to int. Return 0.
17265 * spu-low.c (spu_detach): Likewise.
17267 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17269 * target.h (target_ops): Change return type of detach to int.
17271 (join_inferior): New.
17272 * server.c (main): Don't skip detach support on mingw32.
17273 If the inferior doesn't support detaching return error.
17274 Call join_inferior instead of using waitpid.
17275 * linux-low.c (linux_join): New.
17276 (linux_target_op): Add linux_join.
17277 * spu-low.c (spu_join): New.
17278 (spu_target_ops): Add spu_join.
17279 * win32-low.c (win32_detach): Adapt to new interface.
17280 Reopen current_process_handle before detaching. Issue a child
17281 resume before detaching.
17283 (win32_target_op): Add win32_join.
17285 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17287 * win32-low.c (win32-attach): Fix return value.
17288 * target.h (target_ops): Describe ATTACH return values.
17290 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17292 * win32-low.c (GETPROCADDRESS): Define.
17293 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17294 (winapi_DebugSetProcessKillOnExit): Likewise.
17295 (win32_create_inferior): Force usage of ansi CreateProcessA.
17296 (win32_attach): Use GETPROCADDRESS.
17297 (win32_detach): Likewise.
17299 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17301 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17303 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17305 * win32-low.c: Commit leftover changes from 2007-03-29.
17307 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17309 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17310 fields short instead of int. Add explicit padding.
17311 (i387_cache_to_fsave): Remove unnecessary casts.
17312 (i387_fsave_to_cache): Doc fix.
17313 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17315 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17317 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17318 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17320 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17322 * configure.srv (arm*-*-mingw32ce*): Move near the other
17325 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17327 * configure.ac: Add errno checking.
17328 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17329 sys/file.h and malloc.h.
17330 (AC_CHECK_DECLS): Add perror.
17331 (srv_mingwce): Handle.
17332 * configure.srv (i[34567]86-*-cygwin*): Add
17333 win32-i386-low.o to srv_tgtobj.
17334 (i[34567]86-*-mingw*): Likewise.
17335 (arm*-*-mingw32ce*): Add case.
17336 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17337 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17338 [__MINGW32CE__] (strerror): New function.
17339 [__MINGW32CE__] (errno): Define to GetLastError.
17340 [__MINGW32CE__] (COUNTOF): New macro.
17341 (remote_open): Remove extra close call.
17342 * mem-break.c (delete_breakpoint_at): New function.
17343 * mem-break.h (delete_breakpoint_at): Declare.
17344 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17345 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17346 [USE_WIN32API] (read, write): Add char* casts.
17347 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17348 * server.h: Include wincecompat.h on Windows CE.
17349 [HAVE_ERRNO_H]: Check.
17350 (perror): Declare if not declared.
17351 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17352 (perror_with_name): Remove errno declaration.
17353 * wincecompat.h: New.
17354 * wincecompat.c: New.
17355 * win32-low.h: New.
17356 * win32-arm-low.c: New.
17357 * win32-i386-low.c: New.
17358 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17359 (OUTMSG2): Make it safe.
17361 (COUNTOF): New macro.
17362 (NUM_REGS): Get it from the low target.
17363 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17364 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17365 (thread_rec): Let low target handle debug registers.
17366 (child_add_thread): Likewise.
17367 (child_init_thread_list): Likewise.
17368 (continue_one_thread): Likewise.
17370 (do_child_fetch_inferior_registers): Move to ...
17371 * win32-i386-low.c: ... here, and rename to ...
17372 (do_fetch_inferior_registers): ... this.
17373 * win32-low.c (child_fetch_inferior_registers):
17374 Go through the low target.
17375 (do_child_store_inferior_registers): Use regptr.
17376 (strwinerror): New function.
17377 (win32_create_inferior): Handle Windows CE.
17378 Use strwinerror instead of strerror on Windows error
17379 codes. Add program to the error output.
17380 Don't close the main thread handle on Windows CE.
17381 (win32_attach): Use coredll.dll on Windows CE.
17382 (win32_kill): Close current process and current
17384 (win32_detach): Use coredll.dll on Windows CE.
17385 (win32_resume): Let low target handle debug registers, and
17387 (handle_exception): Add/Remove initial breakpoint. Avoid
17388 non-existant WSTOPSIG on Windows CE.
17389 (win32_read_inferior_memory): Cast to remove warning.
17390 (win32_arch_string): Go through the low target.
17391 (initialize_low): Call set_breakpoint_data with the low
17392 target's breakpoint.
17393 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17394 FOP_REGNUM, mappings): Move to ...
17395 * win32-i386-low.c: ... here.
17396 * win32-low.c (win32_thread_info): Move to ...
17397 * win32-low.h: ... here.
17398 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17399 win32-arm-low.c and wincecompat.c.
17400 (all:): Add $EXEEXT.
17401 (install-only:): Likewise.
17402 (gdbserver:): Likewise.
17403 (gdbreplay:): Likewise.
17404 * config.in: Regenerate.
17405 * configure: Regenerate.
17407 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17409 * win32-low.c: Rename typedef thread_info to
17410 win32_thread_info throughout.
17412 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17414 * win32-i386-low.c: Rename to ...
17415 * win32-low.c: ... this.
17416 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17417 * Makefile.in: Likewise.
17419 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17421 * remote-utils.c (monitor_output): Constify msg parameter.
17422 * server.h (monitor_output): Likewise.
17423 * win32-i386-low.c (handle_output_debug_string): New.
17424 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17425 handle_output_debug_string.
17426 (get_child_debug_event): Likewise.
17428 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17430 * server.c (main): Correct strtoul check.
17432 2007-03-27 Jon Ringle <jon@ringle.org>
17434 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17436 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17438 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17440 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17442 * terminal.h: Check HAVE_SGTTY_H.
17444 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17446 * remote-utils.c (remote_open): Print out the assigned port number.
17448 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17450 * remote-utils.c (monitor_output): New function.
17451 * server.c (debug_threads): Define here.
17452 (monitor_show_help): New function.
17453 (handle_query): Handle qRcmd.
17454 (main): Do not handle 'd' packet.
17455 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17456 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17459 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17461 * Makefile.in (EXEEXT): New.
17462 (clean): Use $(EXEEXT).
17464 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17466 * target.h (target_ops): Rename send_signal to request_interrupt,
17467 and remove enum target_signal parameter.
17468 * linux-low.c (linux_request_interrupt): Rename from
17469 linux_send_signal, and always send SIGINT.
17470 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17471 and always send SIGINT.
17472 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17474 (input_interrupt): Likewise.
17476 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17478 * server.c (get_features_xml): Check if target implemented
17480 * win32-i386-low.c (win32_arch_string): New.
17481 (win32_target_ops): Add win32_arch_string as arch_string member.
17483 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17485 * spu-low.c (spu_arch_string): New.
17486 (spu_target_ops): Add spu_arch_string.
17488 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17490 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17491 * configure.ac: Do not check for terminal.h.
17492 * configure, config.in: Regenerated.
17494 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17496 * Makefile.in (OBS): Add $(XML_BUILTIN).
17497 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17499 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17500 (arm-with-iwmmxt.c): New.
17501 * config.in, configure: Regenerate.
17502 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17503 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17504 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17505 (arm*-*-linux*): Add iWMMXt and regset support.
17506 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17507 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17508 (arm_store_wmmxregset, target_regsets): New.
17509 * server.c (get_features_xml): Take annex argument. Check builtin
17511 (handle_query): Handle multiple annexes.
17513 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17515 * remote-utils.c [USE_WIN32API] (read, write): Define.
17516 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17519 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17521 * linux-i386-low.c (the_low_target): Set arch_string.
17522 * linux-x86-64-low.c (the_low_target): Likewise.
17523 * linux-low.c (linux_arch_string): New.
17524 (linux_target_ops): Add it.
17525 * linux-low.h (struct linux_target_ops): Add arch_string.
17526 * server.c (write_qxfer_response): Use const void * for DATA.
17527 (get_features_xml): New.
17528 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17529 * target.h (struct target_ops): Add arch_string method.
17531 2007-01-03 Denis Pilat <denis.pilat@st.com>
17532 Daniel Jacobowitz <dan@codesourcery.com>
17534 * linux-low.c (linux_kill): Handle being called with no threads.
17535 * win32-i386-low.c (win32_kill): Likewise.
17536 (get_child_debug_event): Clear current_process_handle.
17538 2006-12-30 Denis PILAT <denis.pilat@st.com>
17539 Daniel Jacobowitz <dan@codesourcery.com>
17541 * remote-utils.c (remote_open): Check the type of specified
17542 serial port devices before opening them.
17543 * server.c (main): Kill the inferior if an error occurs during
17544 the first remote_open.
17546 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17548 * README: Update supported targets.
17550 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17552 * Makefile.in (clean): Remove reg-mips64.c.
17553 (reg-mips64.c, reg-mips64.o): New rules.
17554 * configure.srv: Handle mips64. Include regset support for mips.
17555 * linux-mips-low.c (union mips_register): New.
17556 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17557 (mips_breakpoint, mips_breakpoint_at): Use int.
17558 (mips_collect_register, mips_supply_register)
17559 (mips_collect_register_32bit, mips_supply_register_32bit)
17560 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17561 (mips_store_fpregset, target_regsets): New.
17562 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17564 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17566 * configure.srv: Add target "spu*-*-*".
17567 * Makefile.in (clean): Remove reg-spu.c.
17568 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17569 * spu-low.c: New file.
17571 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17573 * configure.ac: Correct td_thr_tls_get_addr test.
17574 * configure: Regenerated.
17576 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17578 * linux-low.c (linux_wait_for_event): Reformat. Use the
17579 pass_signals array.
17580 * remote-utils.c (decode_address_to_semicolon): New.
17581 * server.c (pass_signals, handle_general_set): New.
17582 (handle_query): Mention QPassSignals for qSupported.
17583 (main): Call handle_general_set.
17584 * server.h (pass_signals, decode_address_to_semicolon): New.
17586 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17588 * server.c (handle_query): Correct error handling for read_auxv.
17590 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17592 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17593 and srv_linux_thread_db to yes.
17594 * linux-s390-low.c (s390_fill_gregset): New function.
17595 (target_regsets): Define data structure.
17597 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17599 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17600 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17601 * config.in, configure: Regenerated.
17602 * inferiors.c (gdb_id_to_thread): New function.
17603 (gdb_id_to_thread_id): Use it.
17604 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17605 * linux-low.h (struct process_info): Add th member.
17606 (thread_db_get_tls_address): New prototype.
17607 * remote-utils.c (decode_address): Make non-static.
17608 * server.c (handle_query): Handle qGetTLSAddr.
17609 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17610 * target.h (struct target_ops): Add get_tls_address.
17611 * thread-db.c (maybe_attach_thread): Save the thread handle.
17612 (thread_db_get_tls_address): New.
17614 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17616 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17617 (linux_resume_one_process): Take a siginfo_t *. Update all
17618 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17619 (struct pending_signals): Add a siginfo_t.
17620 (linux_wait_for_process): Always set last_status.
17621 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17622 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17623 * linux-low.h (struct process_info): Add last_status.
17625 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17627 * remote-utils.c (try_rle): New function.
17628 (putpkt_binary): Use it.
17630 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17632 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17633 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17634 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17635 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17636 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17639 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17641 * server.c (terminal_fd): New variable.
17642 (old_foreground_pgrp): Likewise.
17643 (restore_old_foreground_pgrp): New function.
17644 (start_inferior): Record the terminal file descriptor in terminal_fd
17645 and its original foreground group in old_foreground_pgrp. Register
17646 restore_old_foreground_pgrp with atexit().
17648 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17650 * server.c (handle_query): Correct qPart to qXfer.
17652 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17654 * configure.ac: Check for more headers which are missing on
17655 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17656 * configure.srv: Add Cygwin and mingw32.
17657 * remote-utils.c: Don't include headers unconditionally which
17658 are missing on mingw32. Include <winsock.h> for mingw32.
17659 (remote_open): Adjust for mingw32 support. Flush
17660 standard error after writing to it.
17661 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17662 (unblock_async_io, enable_async_io, disable_async_io)
17663 (readchar, getpkt): Update for Winsock support.
17664 (prepare_resume_reply): Expect a protocol signal number.
17665 * server.c: Disable <sys/wait.h> on mingw32.
17666 (start_inferior): Adjust for mingw32 support. Flush
17667 standard error after writing to it.
17668 (attach_inferior): Likewise. Use protocol signal
17670 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17672 * win32-i386-low.c: New file.
17673 * Makefile.in (XM_CLIBS): Set.
17674 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17675 (win32-i386-low.o): New dependency rule.
17676 * linux-low.c (linux_wait): Use target signal numbers.
17677 * target.h (struct target_ops): Doc fix.
17678 * server.h (target_signal_to_name): New prototype.
17679 * gdbreplay.c: Don't include headers unconditionally which
17680 are missing on mingw32. Include <winsock.h> for mingw32.
17681 (remote_close, remote_open): Adjust for Winsock support.
17682 * configure, config.in: Regenerated.
17684 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17686 * server.c (decode_xfer_read, write_qxfer_response): New.
17687 (handle_query): Take a packet length argument. Handle
17688 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17689 the qSupported response.
17690 (main): Update call to handle_query.
17692 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17694 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17695 (putpkt_binary): Renamed from putpkt and adjusted for binary
17697 (putpkt): New wrapper for putpkt_binary.
17698 (readchar): Don't mask off the high bit.
17699 (decode_X_packet): New function.
17700 * server.c (main): Call putpkt_binary if a handler sets the packet
17701 length. Save the length of the incoming packet. Handle 'X'.
17702 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17704 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17706 * server.c (handle_query): Handle qSupported.
17708 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17710 * remote-utils.c (all_symbols_looked_up): New variable.
17711 (look_up_one_symbol): Check it.
17712 * server.h (look_up_one_symbol): New declaration.
17713 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17715 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17717 * Makefile.in (linux-arm-low.o): Update dependencies.
17718 * linux-arm-low.c: Include "gdb_proc_service.h".
17719 (PTRACE_GET_THREAD_AREA): Define.
17720 (ps_get_thread_area): New function.
17722 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17724 * configure.srv (m68k*-*-uclinux*): New target.
17725 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17726 (linux_resume_one_process): Remove extraneous cast.
17727 (linux_read_offsets): New.
17728 (linux_target_op): Add linux_read_offsets on mmuless systems.
17729 * server.c (handle_query): Add qOffsets logic.
17730 * target.h (struct target_ops): Add read_offsets.
17732 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17734 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17735 (PTRACE_GET_THREAD_AREA): Define.
17736 (ps_get_thread_area): New function.
17737 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17738 (linux-x86-64-low.o): Update.
17740 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17742 * configure.ac: Remove checks for prfpregset_t.
17743 * gdb_proc_service.h: New file.
17744 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17745 new "gdb_proc_service.h".
17746 * proc-service.c: Likewise.
17747 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17748 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17749 * Makefile.in (gdb_proc_service_h): Updated.
17750 * configure, config.in: Regenerated.
17752 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17754 * remote-utils.c (prepare_resume_reply): Move declaration
17755 of gdb_id_from_wait to the top of the block.
17757 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17759 * linux-low.c (regsets_store_inferior_registers): Read the regset
17760 from the target before filling it.
17762 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17764 * server.c (attach_inferior): Return SIGTRAP for a successful
17767 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17769 * Makefile.in (OBS): Add version.o.
17770 (STAGESTUFF): Delete.
17771 (version.o): Add dependencies.
17772 (version.c): Replace rule.
17773 (clean): Remove version.c.
17774 * server.c (gdbserver_version): New.
17775 (gdbserver_usage): Use printf.
17776 (main): Handle --version and --help.
17777 * server.h (version, host_name): Add declarations.
17779 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17791 * linux-x86-64-low.c:
17793 * linux-s390-low.c:
17794 * linux-ppc64-low.c:
17796 * linux-mips-low.c:
17797 * linux-m68k-low.c:
17798 * linux-m32r-low.c:
17801 * linux-ia64-low.c:
17802 * linux-i386-low.c:
17803 * linux-crisv32-low.c:
17815 * gdbserver.1: Add (C) after Copyright. Update the FSF
17818 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17820 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17821 (arm_breakpoint_at): Recognize both breakpoints.
17822 (the_low_target): Use the correct breakpoint instruction.
17824 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17826 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17827 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17828 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17829 (the_low_target): Update.
17831 2005-10-25 Andreas Schwab <schwab@suse.de>
17833 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17835 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17836 (ia64_num_regs): Reduce to 462.
17838 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17840 * acinclude.m4: Correct quoting.
17841 * aclocal.m4: Regenerated.
17843 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17844 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17845 (thread_db_init): Call thread_db_err_str.
17846 * configure.ac: Check for TD_VERSION.
17847 * config.in, configure: Regenerated.
17849 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17851 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17853 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17855 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17856 is not available. Define HAVE_PTRACE_GETREGS if it is.
17857 * config.in, configure: Regenerated.
17858 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17859 * linux-i386-low.c, linux-m68k-low.c: Update to use
17860 HAVE_PTRACE_GETREGS.
17861 * linux-low.c (regsets_fetch_inferior_registers)
17862 (regsets_store_inferior_registers): Only return 0 if we processed
17864 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17865 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17867 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17869 * inferiors.c (struct thread_info): Add gdb_id.
17870 (add_thread): Add gdb_id argument.
17871 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17872 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17873 calls to add_thread.
17874 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17875 * server.c (handle_query): Use thread_to_gdb_id.
17876 (handle_v_cont, main): Use gdb_id_to_thread_id.
17877 * server.h (add_thread): Update prototype.
17878 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17881 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17883 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17884 left-padded registers.
17885 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17886 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17888 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17890 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17891 * configure: Regenerate.
17892 * config.in: Regenerate.
17893 * server.h (NEED_DECLARATION_STRERROR):
17894 Replace with !HAVE_DECL_STRERROR.
17896 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17898 * linux-low.c (linux_wait, linux_send_signal): Don't test
17899 an unsigned long variable for > 0 if it could be MAX_ULONG.
17900 * server.c (myresume): Likewise.
17901 * target.c (set_desired_inferior): Likewise.
17903 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17905 * configure.ac: Simplify and improve check for socklen_t.
17906 * configure, config.in: Regenerate.
17908 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17910 * acconfig.h: Remove.
17911 * configure.ac: Add a test for socklen_t. Use three-argument
17912 AC_DEFINE throughout.
17913 * config.in: Regenerated using autoheader 2.59.
17914 * configure: Regenerated.
17916 * gdbreplay.c (socklen_t): Provide a default.
17917 (remote_open): Use socklen_t.
17918 * remote-utils.c (socklen_t): Provide a default.
17919 (remote_open): Use socklen_t.
17920 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17923 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17925 * linux-low.c (linux_read_memory, linux_write_memory)
17926 (linux_read_auxv): Likewise.
17927 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17928 (check_mem_write): Likewise.
17929 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17931 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17932 (registers_from_string, register_data): Likewise.
17933 * server.c (handle_query, main): Likewise.
17934 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17935 (decode_M_packet): Likewise.
17936 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17937 * target.h (struct target_ops): Update read_memory, write_memory,
17939 (read_inferior_memory, write_inferior_memory): Update.
17940 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17941 to unsigned char *.
17942 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17943 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17944 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17945 linux-s390-low.c, linux-sh-low.c: Update for changes in
17946 read_inferior_memory and the_low_target->breakpoint.
17948 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17950 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17951 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17952 * configure.srv: Add powerpc64-*-linux*.
17953 * linux-ppc64-low.c: New file.
17955 2005-05-23 Orjan Friberg <orjanf@axis.com>
17957 * linux-cris-low.c: New file with support for CRIS.
17958 * linux-crisv32-low.c: Ditto for CRISv32.
17959 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17960 (clean): Add reg-cris.c and reg-crisv32.c.
17961 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17962 reg-crisv32.o, and reg-crisv32.c to make rules.
17963 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17964 recognized targets.
17966 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17968 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17969 of sizeof (PTRACE_XFER_TYPE).
17970 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17972 2005-05-12 Orjan Friberg <orjanf@axis.com>
17974 * target.h (struct target_ops): Add insert_watchpoint,
17975 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17976 pointers for hardware watchpoint support.
17977 * linux-low.h (struct linux_target_ops): Ditto.
17978 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17979 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17980 to linux_target_ops.
17981 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17983 * server.c (main): Recognize 'Z' and 'z' packets.
17985 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17987 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17988 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17989 (the_low_target): Add new members.
17991 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17993 * proc-service.c (ps_lgetregs): Search all_processes instead of
17996 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17998 * server.c (start_inferior): Change return type to int.
17999 (attach_inferior): Change sigptr to int *.
18000 (handle_v_cont, handle_v_requests): Change signal to int *.
18001 (main): Change signal to int.
18003 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18005 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18006 * configure.srv: Add m32r*-*-linux*.
18007 * linux-m32r-low.c: New file.
18009 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18011 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18013 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18015 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18016 Take unsigned long arguments for PIDs.
18017 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18018 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18019 (wait_for_sigstop, linux_resume_one_process)
18020 (regsets_fetch_inferior_registers, linux_send_signal)
18021 (linux_read_auxv): Likewise. Update the types of variables holding
18022 PIDs. Update format string specifiers.
18023 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18024 * remote-utils.c (prepare_resume_reply): Likewise.
18025 * server.c (cont_thread, general_thread, step_thread)
18026 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18028 (handle_query): Update format specifiers.
18029 (handle_v_cont, main): Use strtoul for thread IDs.
18030 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18031 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18032 (general_thread, step_thread, thread_from_wait)
18033 (old_thread_from_wait): Update.
18034 * target.h (struct thread_resume): Use unsigned long for THREAD.
18035 (struct target_ops): Use unsigned long for arguments to attach and
18038 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18040 * acinclude.m4: Include bfd/bfd.m4 directly.
18041 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18042 <agriffis@toolchain.org>.
18043 * aclocal.m4, configure: Regenerated.
18045 2005-01-07 Andrew Cagney <cagney@gnu.org>
18047 * configure.ac: Rename configure.in, require autoconf 2.59.
18048 * configure: Re-generate.
18050 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18052 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18053 LIBS when finished.
18054 * aclocal.m4: Regenerated.
18055 * configure: Regenerated.
18057 2004-11-21 Andreas Schwab <schwab@suse.de>
18059 * linux-m68k-low.c (m68k_num_gregs): Define.
18060 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18061 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18062 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18063 (m68k_breakpoint_at): New. Add to the_low_target.
18065 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18066 srv_linux_thread_db to yes.
18068 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18070 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18071 (ARCH_SET_FS): Likewise.
18072 (ARCH_GET_FS): Likewise.
18073 (ARCH_GET_GS): Likewise.
18075 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18077 * linux-i386-low.c (ps_get_thread_area): New.
18078 * linux-x86-64-low.c (ps_get_thread_area): New.
18079 * linux-low.c: Include <sys/syscall.h>.
18080 (linux_kill_one_process): Don't kill the first thread here.
18081 (linux_kill): Kill the first thread here.
18082 (kill_lwp): New function.
18083 (send_sigstop, linux_send_signal): Use it.
18084 * proc-service.c: Clean up #ifdefs.
18085 (fpregset_info): Delete.
18086 (ps_lgetregs): Update and enable implementation.
18087 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18089 * remote-utils.c (struct sym_cache, symbol_cache): New.
18090 (input_interrupt): Print a clearer message.
18091 (async_io_enabled): New variable.
18092 (enable_async_io, disable_async_io): Use it. Update comments.
18093 (look_up_one_symbol): Use the symbol cache.
18094 * thread-db.c (thread_db_look_up_symbols): New function.
18095 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18097 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18099 * configure.in: Test for -rdynamic.
18100 * configure: Regenerated.
18101 * Makefile (INTERNAL_LDFLAGS): New.
18102 (gdbserver, gdbreplay): Use it.
18104 2004-09-02 Andrew Cagney <cagney@gnu.org>
18106 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18108 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18110 * linux-low.c (linux_wait): Clear all_processes list also.
18112 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18114 * linux-low.c: Include <errno.h>. Remove extern declaration of
18117 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18119 * gdbreplay.c, server.h, utils.c: Update copyright years.
18121 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18123 * server.c (main): Print child status or termination signal from
18124 variable 'signal', not 'sig'.
18126 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18128 * linux-low.c (linux_read_memory): Change return type to
18129 int. Check for and return error from ptrace().
18130 * target.c (read_inferior_memory): Change return type to int. Pass
18131 back return status from the_target->read_memory().
18132 * target.h (struct target_ops): Adapt *read_memory() prototype.
18134 (read_inferior_memory): Adapt prototype.
18135 * server.c (main): Return an error packet if
18136 read_inferior_memory() returns an error.
18138 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18140 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18141 Unify with other clean targets.
18143 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18145 * server.c (handle_v_cont): Call set_desired_inferior.
18147 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18149 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18151 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18153 * linux-low.c (linux_wait): Unblock async I/O.
18154 (linux_resume): Block and enable async I/O.
18155 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18156 * server.h (block_async_io, unblock_async_io): Add prototypes.
18158 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18160 * remote-utils.c (remote_open): Print a status notice after
18161 opening a TCP port.
18162 * server.c (attach_inferior): Print a status notice after
18165 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18167 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18169 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18171 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18173 * server.c, target.h: Update copyright years.
18175 2004-02-25 Roland McGrath <roland@redhat.com>
18177 * target.h (struct target_ops): New member `read_auxv'.
18178 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18179 * linux-low.c (linux_read_auxv): New function.
18180 (linux_target_ops): Initialize `read_auxv' member to that.
18182 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18184 Committed by Jim Blandy <jimb@redhat.com>.
18186 * linux-s390-low.c (s390_num_regs): Update.
18187 (s390_regmap): Remove control registers. Use __s390x__ predefine
18188 instead of GPR_SIZE to distiguish s390 and s390x targets.
18190 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18192 * linux-low.c: Update copyright year.
18193 (check_removed_breakpoint): Clear pending_is_breakpoint.
18194 (linux_set_resume_request, linux_queue_one_thread)
18195 (resume_status_pending_p): New functions.
18196 (linux_continue_one_thread): Use process->resume.
18197 (linux_resume): Only resume threads if there are no pending events.
18198 * linux-low.h (struct process_info): Add resume request
18201 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18203 * regcache.c (new_register_cache): Clear the allocated register
18204 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18206 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18208 * linux-low.c (linux_resume): Take a struct thread_resume *
18210 (linux_wait): Update call.
18211 (resume_ptr): New static variable.
18212 (linux_continue_one_thread): Renamed from
18213 linux_continue_one_process. Use resume_ptr.
18214 (linux_resume): Use linux_continue_one_thread.
18215 * server.c (handle_v_cont, handle_v_requests): New functions.
18216 (myresume): New function.
18217 (main): Handle 'v' case.
18218 * target.h (struct thread_resume): New type.
18219 (struct target_ops): Change argument of "resume" to struct
18221 (myresume): Delete macro.
18223 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18225 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18226 (uninstall): Support DESTDIR.
18228 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18230 * configure.srv: Add xscale*linux copy of arm*linux entry.
18232 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18234 * linux-arm-low.c (arm_reinsert_addr): New function.
18235 (the_low_target): Add arm_reinsert_addr.
18237 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18239 * mem-break.c: Remove whitespace at end of file.
18241 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18243 * configure.in: Check whether we need to prototype strerror.
18244 * server.h: Optionally prototype strerror.
18245 * gdbreplay.c (perror_with_name): Use strerror.
18246 * linux-low.c (linux_attach_lwp): Use strerror.
18247 * utils.c (perror_with_name): Use strerror.
18248 * config.in, configure: Regenerated.
18250 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18252 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18253 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18255 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18257 * Makefile.in (SFILES): Update.
18258 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18259 low-sun3.c: Remove files.
18261 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18263 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18264 (linux_detach_one_process, linux_detach): New functions.
18265 (linux_target_ops): Add linux_detach.
18266 * server.c (main): Handle 'D' packet.
18267 * target.h (struct target_ops): Add "detach" member.
18268 (detach_inferior): Define.
18270 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18272 From Kelley Cook <kelleycook@wideopenwest.com>:
18273 * configure.srv: Accept i[34567]86 variants.
18275 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18277 * linux-low.c (linux_wait_for_event): Correct comment typos.
18278 (linux_resume_one_process): Call check_removed_breakpoint.
18279 (linux_send_signal): New function.
18280 (linux_target_ops): Add linux_send_signal.
18281 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18283 * target.h (struct target_ops): Add send_signal.
18285 2003-05-29 Jim Blandy <jimb@redhat.com>
18287 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18288 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18289 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18290 away part of the register's value.
18292 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18294 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18295 (linux_wait_for_event, linux_init_signals): Likewise.
18297 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18299 * configure.in: Check for stdlib.h.
18300 * configure: Regenerated.
18301 * config.in: Regenerated.
18303 2003-01-04 Andreas Schwab <schwab@suse.de>
18305 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18307 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18309 * Makefile.in: Remove obsolete code.
18311 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18313 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18314 defined(PT_FPR0_HI).
18316 2002-11-17 Stuart Hughes <seh@zee2.com>
18318 * linux-arm-low.c (arm_num_regs): Increase.
18319 (arm_regmap): Include status register.
18321 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18323 * linux-low.c (register_addr): Remove incorrect -1 check.
18325 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18327 * linux-low.c (linux_create_inferior): Call setpgid. Return
18329 (unstopped_p, linux_signal_pid): Remove.
18330 (linux_target_ops): Remove linux_signal_pid.
18331 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18332 global instead of target method.
18333 * target.h (struct target_ops): Remove signal_pid. Update comment
18334 for create_inferior.
18335 * server.c (signal_pid): New variable.
18336 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18337 gdbserver. Set the child to be the foreground process group.
18338 (attach_inferior): Set signal_pid.
18340 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18342 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18344 2002-08-20 Jim Blandy <jimb@redhat.com>
18346 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18349 2002-08-01 Andrew Cagney <cagney@redhat.com>
18351 * Makefile.in: Make chill references obsolete.
18353 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18355 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18356 * configure: Regenerate.
18357 * config.in: Regenerate.
18359 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18361 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18362 (perror_with_name, remote_close, remote_open, expect, play): Static.
18364 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18366 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18367 byte offsets instead of an array of indexes.
18368 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18370 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18372 * regcache.c: Add comment.
18374 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18376 * thread-db.c: New file.
18377 * proc-service.c: New file.
18378 * acinclude.m4: New file.
18379 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18380 proc-service.o, and thread-db.o.
18381 (linux-low.o): Add USE_THREAD_DB.
18382 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18383 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18384 * aclocal.m4: Regenerated.
18385 * config.in: Regenerated.
18386 * configure: Regenerated.
18387 * configure.in: Check for proc_service.h, sys/procfs.h,
18388 thread_db.h, and linux/elf.h headrs.
18389 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18390 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18391 Check for -lthread_db and thread support.
18392 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18393 PowerPC, and SuperH.
18394 * i387-fp.c: Constify arguments.
18395 * i387-fp.h: Likewise.
18396 * inferiors.c: (struct thread_info): Renamed from
18397 `struct inferior_info'. Remove PID member. Use generic inferior
18398 list header. All uses updated.
18399 (inferiors, signal_pid): Removed.
18400 (all_threads): New variable.
18401 (get_thread): Define.
18402 (add_inferior_to_list): New function.
18403 (for_each_inferior): New function.
18404 (change_inferior_id): New function.
18405 (add_inferior): Removed.
18406 (remove_inferior): New function.
18407 (add_thread): New function.
18408 (free_one_thread): New function.
18409 (remove_thread): New function.
18410 (clear_inferiors): Use for_each_inferior and free_one_thread.
18411 (find_inferior): New function.
18412 (find_inferior_id): New function.
18413 (inferior_target_data): Update argument type.
18414 (set_inferior_target_data): Likewise.
18415 (inferior_regcache_data): Likewise.
18416 (set_inferior_regcache_data): Likewise.
18417 * linux-low.c (linux_bp_reinsert): Remove.
18418 (all_processes, stopping_threads, using_thrads)
18419 (struct pending_signals, debug_threads, pid_of): New.
18420 (inferior_pid): Replace with macro.
18421 (struct inferior_linux_data): Remove.
18422 (get_stop_pc, add_process): New functions.
18423 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18424 Use add_process and add_thread.
18425 (linux_attach_lwp): New function, based on old linux_attach. Use
18426 add_process and add_thread. Set stop_expected for new threads.
18427 (linux_attach): New function.
18428 (linux_kill_one_process): New function.
18429 (linux_kill): Kill all LWPs.
18430 (linux_thread_alive): Use find_inferior_id.
18431 (check_removed_breakpoints, status_pending_p): New functions.
18432 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18433 Update. Use WNOHANG. Wait for cloned processes also. Update process
18434 struct for the found process.
18435 (linux_wait_for_event): New function.
18436 (linux_wait): Use it. Support LWPs.
18437 (send_sigstop, wait_for_sigstop, stop_all_processes)
18438 (linux_resume_one_process, linux_continue_one_process): New functions.
18439 (linux_resume): Support LWPs.
18440 (REGISTER_RAW_SIZE): Remove.
18441 (fetch_register): Use register_size instead. Call supply_register.
18442 (usr_store_inferior_registers): Likewise. Call collect_register.
18443 Fix recursive case.
18444 (regsets_fetch_inferior_registers): Improve error message.
18445 (regsets_store_inferior_registers): Add debugging.
18446 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18447 (unstopped_p, linux_signal_pid): New functions.
18448 (linux_target_ops): Add linux_signal_pid.
18449 (linux_init_signals): New function.
18450 (initialize_low): Call it. Initialize using_threads.
18451 * regcache.c (inferior_regcache_data): Add valid
18453 (get_regcache): Fetch registers lazily. Add fetch argument
18454 and update all callers.
18455 (regcache_invalidate_one, regcache_invalidate): New
18457 (new_register_cache): Renamed from create_register_cache.
18458 Return the new regcache.
18459 (free_register_cache): Change argument to a void *.
18460 (registers_to_string, registers_from_string): Call get_regcache
18461 with fetch flag set.
18462 (register_data): Make static. Pass fetch flag to get_regcache.
18463 (supply_register): Call get_regcache with fetch flag clear.
18464 (collect_register): Call get_regcache with fetch flag set.
18465 (collect_register_as_string): New function.
18466 * regcache.h: Update.
18467 * remote-utils.c (putpkt): Flush after debug output and use
18469 Handle input interrupts while waiting for an ACK.
18470 (input_interrupt): Use signal_pid method.
18471 (getpkt): Flush after debug output and use stderr.
18472 (outreg): Use collect_register_as_string.
18473 (new_thread_notify, dead_thread_notify): New functions.
18474 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18475 and general_thread.
18476 (look_up_one_symbol): Flush after debug output.
18477 * server.c (step_thread, server_waiting): New variables.
18478 (start_inferior): Don't use signal_pid. Update call to mywait.
18479 (attach_inferior): Update call to mywait.
18480 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18481 (main): Don't fetch/store registers explicitly. Use
18482 set_desired_inferior. Support proposed ``Hs'' packet. Update
18484 * server.h: Update.
18485 (struct inferior_list, struct_inferior_list_entry): New.
18486 * target.c (set_desired_inferior): New.
18487 (write_inferior_memory): Constify.
18488 (mywait): New function.
18489 * target.h: Update.
18490 (struct target_ops): New signal_pid method.
18491 (mywait): Removed macro, added prototype.
18493 * linux-low.h (regset_func): Removed.
18494 (regset_fill_func, regset_store_func): New.
18495 (enum regset_type): New.
18496 (struct regset_info): Add type field. Use new operation types.
18497 (struct linux_target_ops): stop_pc renamed to get_pc.
18498 Add decr_pc_after_break and breakpoint_at.
18499 (get_process, get_thread_proess, get_process_thread)
18500 (strut process_info, all_processes, linux_attach_lwp)
18501 (thread_db_init): New.
18503 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18504 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18505 (the_low_target): Add new members.
18506 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18507 (i386_store_fpxregset): Constify.
18508 (target_regsets): Add new kind identifier.
18509 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18510 (i386_set_pc): Add debugging.
18511 (i386_breakpoint_at): New function.
18512 (the_low_target): Add new members.
18513 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18514 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18515 (mips_breakpoint_at): New.
18516 (the_low_target): Add new members.
18517 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18518 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18519 (the_low_target): Add new members.
18520 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18521 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18522 (the_low_target): Add new members.
18523 * linux-x86-64-low.c (target_regsets): Add new kind
18526 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18528 From Martin Pool <mbp@samba.org>:
18529 * server.c (gdbserver_usage): New function.
18532 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18534 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18535 stop_at -> stop_pc.
18537 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18539 * Makefile.in: Remove obsolete code.
18541 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18543 * linux-low.c (regsets_fetch_inferior_registers),
18544 (regsets_store_inferior_registers): Removed cast to int from
18546 * regcache.h: Added declaration of struct inferior_info.
18548 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18550 * inferiors.c (struct inferior_info): Add regcache_data.
18551 (add_inferior): Call create_register_cache.
18552 (clear_inferiors): Call free_register_cache.
18553 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18554 * regcache.c (struct inferior_regcache_data): New.
18555 (registers): Remove.
18556 (get_regcache): New function.
18557 (create_register_cache, free_register_cache): New functions.
18558 (set_register_cache): Don't initialize the register cache here.
18559 (registers_to_string, registers_from_string, register_data): Call
18561 * regcache.h: Add prototypes.
18562 * server.h: Likewise.
18564 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18566 * mem-break.c: New file.
18567 * mem-break.h: New file.
18568 * Makefile.in: Add mem-break.o rule; update server.h
18570 * inferiors.c (struct inferior_info): Add target_data
18572 (clear_inferiors): Free target_data member if set.
18573 (inferior_target_data, set_inferior_target_data): New functions.
18574 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18575 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18576 * linux-low.c (linux_bp_reinsert): New variable.
18577 (struct inferior_linux_data): New.
18578 (linux_create_inferior): Use set_inferior_target_data.
18579 (linux_attach): Likewise. Call add_inferior.
18580 (linux_wait_for_one_inferior): New function.
18581 (linux_wait): Call it.
18582 (linux_write_memory): Add const.
18583 (initialize_low): Call set_breakpoint_data.
18584 * linux-low.h (struct linux_target_ops): Add breakpoint
18586 * server.c (attach_inferior): Remove extra add_inferior
18588 * server.h: Include mem-break.h. Update inferior.c
18590 * target.c (read_inferior_memory)
18591 (write_inferior_memory): New functions.
18592 * target.h (read_inferior_memory)
18593 (write_inferior_memory): Change macros to prototypes.
18594 (struct target_ops): Update comments. Add const to write_memory
18597 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18599 * linux-low.c (usr_store_inferior_registers): Support
18600 registers which are allowed to fail to store.
18601 * linux-low.h (linux_target_ops): Likewise.
18602 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18603 (ppc_cannot_store_register): FPSCR may not be storable.
18605 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18607 * server.h: Include <string.h> if HAVE_STRING_H.
18608 * ChangeLog: Correct paths in last ChangeLog entry.
18610 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18612 * linux-low.h: Remove obsolete prototypes.
18613 (struct linux_target_ops): New.
18614 (extern the_low_target): New.
18615 * linux-low.c (num_regs, regmap): Remove declarations.
18616 (register_addr): Use the_low_target explicitly.
18617 (fetch_register): Likewise.
18618 (usr_fetch_inferior_registers): Likewise.
18619 (usr_store_inferior_registers): Likewise.
18620 * linux-arm-low.c (num_regs): Remove.
18621 (arm_num_regs): Define.
18622 (arm_regmap): Renamed from regmap, made static.
18623 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18625 (arm_cannot_store_register): Renamed from cannot_store_register,
18627 (the_low_target): New.
18628 * linux-i386-low.c (num_regs): Remove.
18629 (i386_num_regs): Define.
18630 (i386_regmap): Renamed from regmap, made static.
18631 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18633 (i386_cannot_store_register): Renamed from cannot_store_register,
18635 (the_low_target): New.
18636 * linux-ia64-low.c (num_regs): Remove.
18637 (ia64_num_regs): Define.
18638 (ia64_regmap): Renamed from regmap, made static.
18639 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18641 (ia64_cannot_store_register): Renamed from cannot_store_register,
18643 (the_low_target): New.
18644 * linux-m68k-low.c (num_regs): Remove.
18645 (m68k_num_regs): Define.
18646 (m68k_regmap): Renamed from regmap, made static.
18647 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18649 (m68k_cannot_store_register): Renamed from cannot_store_register,
18651 (the_low_target): New.
18652 * linux-mips-low.c (num_regs): Remove.
18653 (mips_num_regs): Define.
18654 (mips_regmap): Renamed from regmap, made static.
18655 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18657 (mips_cannot_store_register): Renamed from cannot_store_register,
18659 (the_low_target): New.
18660 * linux-ppc-low.c (num_regs): Remove.
18661 (ppc_num_regs): Define.
18662 (ppc_regmap): Renamed from regmap, made static.
18663 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18665 (ppc_cannot_store_register): Renamed from cannot_store_register,
18667 (the_low_target): New.
18668 * linux-s390-low.c (num_regs): Remove.
18669 (s390_num_regs): Define.
18670 (s390_regmap): Renamed from regmap, made static.
18671 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18673 (s390_cannot_store_register): Renamed from cannot_store_register,
18675 (the_low_target): New.
18676 * linux-sh-low.c (num_regs): Remove.
18677 (sh_num_regs): Define.
18678 (sh_regmap): Renamed from regmap, made static.
18679 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18681 (sh_cannot_store_register): Renamed from cannot_store_register,
18683 (the_low_target): New.
18684 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18685 (the_low_target): New.
18687 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18689 * Makefile.in: Add stamp-h target.
18690 * configure.in: Create stamp-h.
18691 * configure: Regenerated.
18693 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18695 * inferiors.c: New file.
18696 * target.c: New file.
18697 * target.h: New file.
18698 * Makefile.in: Add target.o and inferiors.o. Update
18700 * linux-low.c (inferior_pid): New static variable,
18701 moved from server.c.
18702 (linux_create_inferior): Renamed from create_inferior.
18703 Call add_inferior. Return 0 on success instead of a PID.
18704 (linux_attach): Renamed from myattach.
18705 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18706 (linux_thread_alive): Renamed from mythread_alive.
18707 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18709 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18710 (regsets_store_inferior_registers): Correct error message.
18711 Add missing ``return 0''.
18712 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18713 (linux_store_registers): Renamed from store_inferior_registers.
18714 (linux_read_memory): Renamed from read_inferior_memory.
18715 (linux_write_memory): Renamed from write_inferior_memory.
18716 (linux_target_ops): New structure.
18717 (initialize_low): Call set_target_ops ().
18718 * remote-utils.c (unhexify): New function.
18719 (hexify): New function.
18720 (input_interrupt): Send signals to ``signal_pid''.
18721 * server.c (inferior_pid): Remove.
18722 (start_inferior): Update create_inferior call.
18723 (attach_inferior): Call add_inferior.
18724 (handle_query): New function.
18725 (main): Call handle_query for `q' packets.
18726 * server.h: Include "target.h". Remove obsolete prototypes.
18727 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18729 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18731 * Makefile.in: Add WARN_CFLAGS. Update configury
18733 * configure.in: Check for <string.h>
18734 * configure: Regenerate.
18735 * config.in: Regenerate.
18736 * gdbreplay.c: Include needed system headers.
18737 (remote_open): Remove strchr prototype.
18738 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18739 * regcache.c (supply_register): Change buf argument to const void *.
18740 (supply_register_by_name): Likewise.
18741 (collect_register): Change buf argument to void *.
18742 (collect_register_by_name): Likewise.
18743 * regcache.h: Add missing prototypes.
18744 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18745 * server.c (handle_query): New function.
18746 (attached): New static variable, moved out of main.
18747 (main): Quiet longjmp clobber warnings.
18748 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18749 * utils.c (error): Remove NORETURN.