1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3 Turn process_stratum_target's read_offsets op into a method of
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op. Also add
8 'supports_read_offsets'.
9 * target.cc (process_target::read_offsets): Define.
10 (process_target::supports_read_offsets): Define.
12 Update the derived classes and callers below.
14 * server.cc (handle_query): Update.
15 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
16 (linux_target_ops): Update.
17 (linux_process_target::supports_read_offsets): Define.
18 (linux_read_offsets): Turn into ...
19 (linux_process_target::read_offsets): ... this.
20 * linux-low.h (class linux_process_target): Update.
21 * lynx-low.cc (lynx_target_ops): Update.
22 * nto-low.cc (nto_target_ops): Update.
23 * win32-low.cc (win32_target_ops): Update.
25 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
27 Turn process_stratum_target's stopped_by_watchpoint and
28 stopped_data_address ops into methods of process_target.
30 * target.h (struct process_stratum_target): Remove the target ops.
31 (class process_target): Add the target ops.
32 * target.cc (process_target::stopped_by_watchpoint): Define.
33 (process_target::stopped_data_address): Define.
35 Update the derived classes and callers below.
37 * remote-utils.cc (prepare_resume_reply): Update.
38 * linux-low.cc (linux_target_ops): Update.
39 (linux_stopped_by_watchpoint): Turn into ...
40 (linux_process_target::stopped_by_watchpoint): ... this.
41 (linux_stopped_data_address): Turn into ...
42 (linux_process_target::stopped_data_address): ... this.
43 * linux-low.h (class linux_process_target): Update.
44 * lynx-low.cc (lynx_target_ops): Update.
45 * nto-low.cc (nto_target_ops): Update.
46 (nto_stopped_by_watchpoint): Turn into ...
47 (nto_process_target::stopped_by_watchpoint): ... this.
48 (nto_stopped_data_address): Turn into ...
49 (nto_process_target::stopped_data_address): ... this.
50 * nto-low.h (class nto_process_target): Update.
51 * win32-low.cc (win32_target_ops): Update.
52 (win32_stopped_by_watchpoint): Turn into ...
53 (win32_process_target::stopped_by_watchpoint): ... this.
54 (win32_stopped_data_address): Turn into ...
55 (win32_process_target::stopped_data_address): ... this.
56 * win32-low.h (class win32_process_target): Update.
58 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
60 Turn process_stratum_target's supports_hardware_single_step op into
61 a method of process_target.
63 * target.h (struct process_stratum_target): Remove the target op.
64 (class process_target): Add the target op.
65 (target_supports_hardware_single_step): Update the macro.
66 (target_can_do_hardware_single_step): Remove declaration.
67 * target.cc (process_target::supports_hardware_single_step): Define.
68 (target_can_do_hardware_single_step): Remove.
70 Update the derived classes and callers below.
72 * linux-low.h (class linux_process_target): Update.
73 * linux-low.cc (linux_target_ops): Update.
74 (linux_supports_hardware_single_step): Turn into ...
75 (linux_process_target::supports_hardware_single_step): ... this.
76 * lynx-low.h (class lynx_process_target): Update.
77 * lynx-low.cc (lynx_target_ops): Update.
78 (lynx_process_target::supports_hardware_single_step): Define.
79 * nto-low.h (class nto_process_target): Update.
80 * nto-low.cc (nto_target_ops): Update.
81 (nto_process_target::supports_hardware_single_step): Define.
82 * win32-low.h (class win32_process_target): Update.
83 * win32-low.cc (win32_target_ops): Update.
84 (win32_process_target::supports_hardware_single_step): Define.
86 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
88 Turn process_stratum_target's {supports_}stopped_by_hw_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_hw_breakpoint): Update the macro.
94 (target_supports_stopped_by_hw_breakpoint): Update the macro.
95 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
96 (process_target::supports_stopped_by_hw_breakpoint): Define.
98 Update the derived classes and callers below.
100 * linux-low.cc (linux_target_ops): Update.
101 (linux_stopped_by_hw_breakpoint): Turn into ...
102 (linux_process_target::stopped_by_hw_breakpoint): ... this.
103 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
104 (linux_process_target::supports_stopped_by_hw_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 {supports_}stopped_by_sw_breakpoint
113 ops 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_stopped_by_sw_breakpoint): Update the macro.
118 (target_supports_stopped_by_sw_breakpoint): Update the macro.
119 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
120 (process_target::supports_stopped_by_sw_breakpoint): Define.
122 Update the derived classes and callers below.
124 * linux-low.cc (linux_target_ops): Update.
125 (linux_stopped_by_sw_breakpoint): Turn into ...
126 (linux_process_target::stopped_by_sw_breakpoint): ... this.
127 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
128 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
129 * linux-low.h (class linux_process_target): Update.
130 * lynx-low.cc (lynx_target_ops): Update.
131 * nto-low.cc (nto_target_ops): Update.
132 * win32-low.cc (win32_target_ops): Update.
134 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
136 Turn process_stratum_target's insert_point and remove_point ops
137 into methods of process_target.
139 * target.h (struct process_stratum_target): Remove the target ops.
140 (class process_target): Add the target ops.
141 * target.cc (process_target::insert_point): Define.
142 (process_target::remove_point): Define.
144 Update the derived classes and callers below.
146 * mem-break.cc (set_raw_breakpoint_at): Update.
147 (delete_raw_breakpoint): Update.
148 (uninsert_raw_breakpoint): Update.
149 (reinsert_raw_breakpoint): Update.
150 * linux-low.cc (linux_target_ops): Update.
151 (linux_insert_point): Turn into ...
152 (linux_process_target::insert_point): ... this.
153 (linux_remove_point): Turn into ...
154 (linux_process_target::remove_point): ... this.
155 * linux-low.h (class linux_process_target): Update.
156 * lynx-low.cc (lynx_target_ops): Update.
157 * nto-low.cc (nto_target_ops): Update.
158 (nto_insert_point): Turn into ...
159 (nto_process_target::insert_point): ... this.
160 (nto_remove_point): Turn into ...
161 (nto_process_target::remove_point): ... this.
162 * nto-low.h (class nto_process_target): Update.
163 * win32-low.cc (win32_target_ops): Update.
164 (win32_insert_point): Turn into ...
165 (win32_process_target::insert_point): ... this.
166 (win32_remove_point): Turn into ...
167 (win32_process_target::remove_point): ... this.
168 * win32-low.h (class win32_process_target): Update.
170 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
172 Turn process_stratum_target's supports_z_point_type op into a
173 method of process_target.
175 * target.h (struct process_stratum_target): Remove the target op.
176 (class process_target): Add the target op.
177 * target.cc (process_target::supports_z_point_type): Define.
179 Update the derived classes and callers below.
181 * mem-break.cc (z_type_supported): Update.
182 * linux-low.cc (linux_target_ops): Update.
183 (linux_supports_z_point_type): Turn into ...
184 (linux_process_target::supports_z_point_type): ... this.
185 * linux-low.h (class linux_process_target): Update.
186 * lynx-low.cc (lynx_target_ops): Update.
187 * nto-low.cc (nto_target_ops): Update.
188 (nto_supports_z_point_type): Turn into ...
189 (nto_process_target::supports_z_point_type): ... this.
190 * nto-low.h (class nto_process_target): Update.
191 * win32-low.cc (win32_target_ops): Update.
192 (win32_supports_z_point_type): Turn into ...
193 (win32_process_target::supports_z_point_type): ... this.
194 * win32-low.h (class win32_process_target): Update.
196 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
198 Turn process_stratum_target's read_auxv op into a method of
201 * target.h (class process_stratum_target): Remove the target op.
202 (struct process_target): Add the target op. Also add
203 'supports_read_auxv'.
204 * target.cc (process_target::read_auxv): Define.
205 (process_target::supports_read_auxv): Define.
207 Update the derived classes and callers below.
209 * server.cc (handle_qxfer_auxv): Update.
210 (handle_query): Update.
211 * linux-low.cc (linux_target_ops): Update.
212 (linux_process_target::supports_read_auxv): Define.
213 (linux_read_auxv): Turn into ...
214 (linux_process_target::read_auxv): ... this.
215 * linux-low.h (class linux_process_target): Update.
216 * lynx-low.cc (lynx_target_ops): Update.
217 * nto-low.cc (nto_target_ops): Update.
218 (nto_process_target::supports_read_auxv): Define.
219 (nto_read_auxv): Turn into ...
220 (nto_process_target::read_auxv): ... this.
221 * nto-low.h (class nto_process_target): Update.
222 * win32-low.cc (win32_target_ops): Update.
224 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
226 Turn process_stratum_target's request_interrupt op into a method of
229 * target.h (struct process_stratum_target): Remove the target op.
230 (class process_target): Add the target op.
232 Update the derived classes and callers below.
234 * remote-utils.cc (putpkt_binary_1): Update.
235 (input_interrupt): Update.
237 * server.cc (handle_v_requests): Update.
238 * linux-low.cc (linux_target_ops): Update.
239 (linux_request_interrupt): Turn into ...
240 (linux_process_target::request_interrupt): ... this.
241 * linux-low.h (class linux_process_target): Update.
242 * lynx-low.cc (lynx_target_ops): Update.
243 (lynx_request_interrupt): Turn into ...
244 (lynx_process_target::request_interrupt): ... this.
245 * lynx-low.h (class lynx_process_target): Update.
246 * nto-low.cc (nto_target_ops): Update.
247 (nto_request_interrupt): Turn into ...
248 (nto_process_target::request_interrupt): ... this.
249 * nto-low.h (class nto_process_target): Update.
250 * win32-low.cc (win32_target_ops): Update.
251 (win32_request_interrupt): Turn into ...
252 (win32_process_target::request_interrupt): ... this.
253 * win32-low.h (class win32_process_target): Update.
255 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
257 Turn process_stratum_target's look_up_symbols op into a method of
260 * target.h (struct process_stratum_target): Remove the target op.
261 (class process_target): Add the target op.
262 * target.cc (process_target::look_up_symbols): Define.
264 Update the derived classes and callers below.
266 * server.cc (handle_query): Update.
267 * linux-low.cc (linux_target_ops): Update.
268 (linux_look_up_symbols): Turn into ...
269 (linux_process_target::look_up_symbols): ... this.
270 * linux-low.h (class linux_process_target): Update.
271 * lynx-low.cc (lynx_target_ops): Update.
272 * nto-low.cc (nto_target_ops): Update.
273 * win32-low.cc (win32_target_ops): Update.
275 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
277 Turn process_stratum_target's read_memory and write_memory
278 ops into methods of process_target.
280 * target.h (struct process_stratum_target): Remove the target ops.
281 (class process_target): Add the target ops.
283 Update the derived classes and callers below.
285 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
286 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
287 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
288 (arm_get_syscall_trapinfo): Update.
289 * linux-cris-low.cc (cris_breakpoint_at): Update.
290 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
291 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
292 * linux-mips-low.cc (mips_breakpoint_at): Update.
293 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
294 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
295 * linux-sh-low.cc (sh_breakpoint_at): Update.
296 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
297 (sparc_store_gregset_from_stack): Update.
298 (sparc_breakpoint_at): Update.
299 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
300 * linux-tile-low.cc (tile_breakpoint_at): Update.
301 * linux-x86-low.cc (x86_breakpoint_at): Update.
302 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
303 * mem-brea.cc (insert_memory_breakpoint): Update.
304 (validate_inserted_breakpoint): Update.
305 * target.cc (read_inferior_memory): Update.
306 (target_write_memory): Update.
307 * linux-low.cc (linux_target_ops): Update.
308 (linux_read_memory): Make a wrapper around the read_memory target
310 (linux_process_target::read_memory): Rename from linux_read_memory.
311 (linux_write_memory): Turn into ...
312 (linux_process_target::write_memory): ... this.
313 * linux-low.h (class linux_process_target): Update.
314 * lynx-low.cc (lynx_target_ops): Update.
315 (lynx_read_memory): Turn into ...
316 (lynx_process_target::read_memory): ... this.
317 (lynx_write_memory): Turn into ...
318 (lynx_process_target::write_memory): ... this.
319 * lynx-low.h (class lynx_process_target): Update.
320 * nto-low.cc (nto_target_ops): Update.
321 (nto_read_memory): Turn into ...
322 (nto_process_target::read_memory): ... this.
323 (nto_write_memory): Turn into ...
324 (nto_process_target::write_memory): ... this.
325 * nto-low.h (class nto_process_target): Update.
326 * win32-low.cc (win32_target_ops): Update.
327 (win32_read_inferior_memory): Turn into ...
328 (win32_process_target::read_memory): ... this.
329 (win32_write_inferior_memory): Turn into ...
330 (win32_process_target::write_memory): ... this.
331 * win32-low.h (class win32_process_target): Update.
333 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
335 Turn process_stratum_target's prepare_to_access_memory and
336 done_accessing_memory 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 * target.cc (process_target::prepare_to_access_memory): Define.
341 (process_target::done_accessing_memory): Define.
342 (prepare_to_access_memory): Update.
343 (done_accessing_memory): Update.
345 Update the derived classes and callers below.
347 * linux-low.cc (linux_target_ops): Update.
348 (linux_prepare_to_access_memory): Turn into ...
349 (linux_process_target::prepare_to_access_memory): ... this.
350 (linux_done_accessing_memory): Turn into ...
351 (linux_process_target::done_accessing_memory): ... this.
352 * linux-low.h (class linux_process_target): Update.
353 * lynx-low.cc (lynx_target_ops): Update.
354 * nto-low.cc (nto_target_ops): Update.
355 * win32-low.cc (win32_target_ops): Update.
357 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
359 Turn process_stratum_target's fetch_registers and store_registers
360 ops into methods of process_target.
362 * target.h (struct process_stratum_target): Remove the target ops.
363 (class process_target): Add the target ops.
364 (fetch_inferior_registers): Update the macro.
365 (store_inferior_registers): Update the macro.
367 Update the derived classes and callers below.
369 * linux-low.cc (linux_target_ops): Update.
370 (linux_fetch_registers): Turn into ...
371 (linux_process_target::fetch_registers): ... this.
372 (linux_store_registers): Turn into ...
373 (linux_process_target::store_registers): ... this.
374 * linux-low.h (class linux_process_target): Update.
375 * lynx-low.cc (lynx_target_ops): Update.
376 (lynx_fetch_registers): Turn into ...
377 (lynx_process_target::fetch_registers): ... this.
378 (lynx_store_registers): Turn into ...
379 (lynx_process_target::store_registers): ... this.
380 * lynx-low.h (class lynx_process_target): Update.
381 * nto-low.cc (nto_target_ops): Update.
382 (nto_fetch_registers): Turn into ...
383 (nto_process_target::fetch_registers): ... this.
384 (nto_store_registers): Turn into ...
385 (nto_process_target::store_registers): ... this.
386 * nto-low.h (class nto_process_target): Update.
387 * win32-low.cc (win32_target_ops): Update.
388 (win32_fetch_inferior_registers): Turn into ...
389 (win32_process_target::fetch_registers): ... this.
390 (win32_store_inferior_registers): Turn into ...
391 (win32_process_target::store_registers): ... this.
392 * win32-low.h (class win32_process_target): Update.
394 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
396 Turn process_stratum_target's wait op into a method of
399 * target.h (struct process_stratum_target): Remove the target op.
400 (class process_target): Add the target op.
402 Update the derived classes and callers below.
404 * target.cc (target_wait): Update.
405 * linux-low.cc (linux_target_ops): Update.
406 (linux_wait): Turn into ...
407 (linux_process_target::wait): ... this.
408 * linux-low.h (class linux_process_target): Update.
409 * lynx-low.cc (lynx_target_ops): Update.
410 (lynx_wait): Turn into ...
411 (lynx_process_target::wait): ... this.
412 * lynx-low.h (class lynx_process_target): Update.
413 * nto-low.cc (nto_target_ops): Update.
414 (nto_wait): Turn into ...
415 (nto_process_target::wait): ... this.
416 * nto-low.h (class nto_process_target): Update.
417 * win32-low.cc (win32_target_ops): Update.
418 (win32_wait): Turn into ...
419 (win32_process_target::wait): ... this.
420 (do_initial_child_stuff): Update.
421 * win32-low.h (class win32_process_target): Update.
423 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
425 Turn process_stratum_target's resume op into a method of
428 * target.h (struct process_stratum_target): Remove the target op.
429 (class process_target): Add the target op.
431 Update the derived classes and callers below.
433 * server.cc (resume): Update.
434 * target.cc (target_stop_and_wait): Update.
435 (target_continue_no_signal): Update.
436 (target_continue): Update.
437 * linux-low.cc (linux_target_ops): Update.
438 (linux_resume): Turn into ...
439 (linux_process_target::resume): ... this.
440 * linux-low.h (class linux_process_target): Update.
441 * lynx-low.cc (lynx_target_ops): Update.
442 (lynx_resume): Turn into ...
443 (lynx_process_target::resume): ... this.
444 * lynx-low.h (class lynx_process_target): Update.
445 * nto-low.cc (nto_target_ops): Update.
446 (nto_resume): Turn into ...
447 (nto_process_target::resume): ... this.
448 * nto-low.h (class nto_process_target): Update.
449 * win32-low.cc (win32_target_ops): Update.
450 (win32_resume): Turn into ...
451 (win32_process_target::resume): ... this.
452 (win32_process_target::detach): Update.
453 (do_initial_child_stuff): Update.
454 * win32-low.h (class win32_process_target): Update.
456 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
458 Turn process_stratum_target's thread_alive op into a method of
461 * target.h (struct process_stratum_target): Remove the target op.
462 (class process_target): Add the target op.
463 (mythread_alive): Update the macro.
465 Update the derived classes and callers below.
467 * linux-low.cc (linux_target_ops): Update.
468 (linux_thread_alive): Turn into ...
469 (linux_process_target::thread_alive): ... this.
470 (wait_for_sigstop): Update.
471 * linux-low.h (class linux_process_target): Update.
472 * lynx-low.cc (lynx_target_ops): Update.
473 (lynx_thread_alive): Turn into ...
474 (lynx_process_target::thread_alive): ... this.
475 * lynx-low.h (class lynx_process_target): Update.
476 * nto-low.cc (nto_target_ops): Update.
477 (nto_thread_alive): Turn into ...
478 (nto_process_target::thread_alive): ... this.
479 * nto-low.h (class nto_process_target): Update.
480 * win32-low.cc (win32_target_ops): Update.
481 (win32_thread_alive): Turn into ...
482 (win32_process_target::thread_alive): ... this.
483 * win32-low.h (class win32_process_target): Update.
485 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
487 Turn process_stratum_target's join op into a method of
490 * target.h (struct process_stratum_target): Remove the target op.
491 (class process_target): Add the target op.
492 (join_inferior): Update the macro.
494 Update the derived classes and callers below.
496 * linux-low.cc (linux_target_ops): Update.
497 (linux_join): Turn into ...
498 (linux_process_target::join): ... this.
499 * linux-low.h (class linux_process_target): Update.
500 * lynx-low.cc (lynx_target_ops): Update.
501 (lynx_join): Turn into ...
502 (lynx_process_target::join): ... this.
503 * lynx-low.h (class lynx_process_target): Update.
504 * nto-low.cc (nto_target_ops): Update.
505 (nto_process_target::join): Define.
506 * nto-low.h (class nto_process_target): Update.
507 * win32-low.cc (win32_target_ops): Update.
508 (win32_join): Turn into ...
509 (win32_process_target::join): ... this.
510 * win32-low.h (class win32_process_target): Update.
512 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
514 Turn process_stratum_target's mourn op into a method of
517 * target.h (struct process_stratum_target): Remove the target op.
518 (class process_target): Add the target op.
520 Update the derived classes and callers below.
522 * target.cc (target_mourn_inferior): Update.
523 * linux-low.cc (linux_target_ops): Update.
524 (linux_mourn): Turn into ...
525 (linux_process_target::mourn): ... this.
526 (handle_extended_wait): Update.
527 (linux_process_target::kill): Update.
528 (linux_process_target::detach): Update.
529 * linux-low.h (class linux_process_target): Update.
530 * lynx-low.cc (lynx_target_ops): Update.
531 (lynx_mourn): Turn into ...
532 (lynx_process_target::mourn): ... this.
533 * lynx-low.h (class lynx_process_target): Update.
534 * nto-low.cc (nto_target_ops): Update.
535 (nto_mourn): Turn into ...
536 (nto_process_target::mourn): ... this.
537 * nto-low.h (class nto_process_target): Update.
538 * win32-low.cc (win32_target_ops): Update.
539 (win32_mourn): Turn into ...
540 (win32_process_target::mourn): ... this.
541 * win32-low.h (class win32_process_target): Update.
543 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
545 Turn process_stratum_target's detach op into a method of
548 * target.h (struct process_stratum_target): Remove the target op.
549 (class process_target): Add the target op.
550 (detach_inferior): Update the macro.
552 Update the derived classes and callers below.
554 * linux-low.cc (linux_target_ops): Update.
555 (linux_detach): Turn into ...
556 (linux_process_target::detach): ... this.
557 * linux-low.h (class linux_process_target): Update.
558 * lynx-low.cc (lynx_target_ops): Update.
559 (lynx_detach): Turn into ...
560 (lynx_process_target::detach): ... this.
561 * lynx-low.h (class lynx_process_target): Update.
562 * nto-low.cc (nto_target_ops): Update.
563 (nto_detach): Turn into ...
564 (nto_process_target::detach): ... this.
565 * nto-low.h (class nto_process_target): Update.
566 * win32-low.cc (win32_target_ops): Update.
567 (win32_detach): Turn into ...
568 (win32_process_target::detach): ... this.
569 * win32-low.h (class win32_process_target): Update.
571 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
573 Turn process_stratum_target's kill op into a method of
576 * target.h (struct process_stratum_target): Remove the target op.
577 (class process_target): Add the target op.
579 Update the derived classes and callers below.
581 * target.cc (kill_inferior): Update.
582 * linux-low.cc (linux_target_ops): Update.
583 (linux_kill): Turn into ...
584 (linux_process_target::kill): ... this.
585 * linux-low.h (class linux_process_target): Update.
586 * lynx-low.cc (lynx_target_ops): Update.
587 (lynx_kill): Turn into ...
588 (lynx_process_target::kill): ... this.
589 * lynx-low.h (class lynx_process_target): Update.
590 * nto-low.cc (nto_target_ops): Update.
591 (nto_kill): Turn into ...
592 (nto_process_target::kill): ... this.
593 * nto-low.h (class nto_process_target): Update.
594 * win32-low.cc (win32_target_ops): Update.
595 (win32_kill): Turn into ...
596 (win32_process_target::kill): ... this.
597 * win32-low.h (class win32_process_target): Update.
599 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
601 Turn process_stratum_target's attach op into a method of
604 * target.h (struct process_stratum_target): Remove the target op.
605 (class process_target): Add the target op.
606 (myattach): Update the macro.
608 Update the derived classes and callers below.
610 * linux-low.cc (linux_target_ops): Update.
611 (linux_attach): Turn into ...
612 (linux_process_target::attach): ... this.
613 * linux-low.h (class linux_process_target): Update.
614 * lynx-low.cc (lynx_target_ops): Update.
615 (lynx_attach): Turn into ...
616 (lynx_process_target::attach): ... this.
617 * lynx-low.h (class lynx_process_target): Update.
618 * nto-low.cc (nto_target_ops): Update.
619 (nto_attach): Turn into ...
620 (nto_process_target::attach): ... this.
621 * nto-low.h (class nto_process_target): Update.
622 * win32-low.cc (win32_target_ops): Update.
623 (win32_attach): Turn into ...
624 (win32_process_target::attach): ... this.
625 * win32-low.h (class win32_process_target): Update.
627 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
629 Turn process_stratum_target's post_create_inferior op into a method
632 * target.h (struct process_stratum_target): Remove the target op.
633 (class process_target): Add the target op.
634 (target_post_create_inferior): Update the macro.
635 * target.cc (process_target::post_create_inferior): Define.
637 Update the derived classes and callers below.
639 * linux-low.cc (linux_target_ops): Update.
640 (linux_post_create_inferior): Turn into ...
641 (linux_process_target::post_create_inferior): ... this.
642 * linux-low.h (class linux_process_target): Update.
643 * lynx-low.cc (lynx_target_ops): Update.
644 * nto-low.cc (nto_target_ops): Update.
645 * win32-low.cc (win32_target_ops): Update.
647 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
649 Turn process_stratum_target's create_inferior op into a method of
652 * target.h (struct process_stratum_target): Remove the target op.
653 (class process_target): Add the target op.
654 (create_inferior): Rename the macro to ...
655 (target_create_inferior): ... this.
657 Update the derived classes and callers below.
659 * server.cc (handle_v_run): Update.
660 (captured_main): Update.
661 (process_serial_event): Update.
662 * linux-low.cc (linux_target_ops): Update.
663 (linux_create_inferior): Turn into ...
664 (linux_process_target::create_inferior): ... this.
665 * linux-low.h (class linux_process_target): Update.
666 * lynx-low.cc (lynx_target_ops): Update.
667 (lynx_create_inferior): Turn into ...
668 (lynx_process_target::create_inferior): ... this.
669 * lynx-low.h (class lynx_process_target): Update.
670 * nto-low.cc (nto_target_ops): Update.
671 (nto_create_inferior): Turn into ...
672 (nto_process_target::create_inferior): ... this.
673 * nto-low.h (class nto_process_target): Update.
674 * win32-low.cc (win32_target_ops): Update.
675 (win32_create_inferior): Turn into ...
676 (win32_process_target::create_inferior): ... this.
677 * win32-low.h (class win32_process_target): Update.
679 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
681 * target.h (class process_target): New class definition.
682 (struct process_stratum_target) <pt>: New field with type
684 * linux-low.h (class linux_process_target): Define as a derived
685 class of 'process_target'.
686 * linux-low.cc (linux_target_ops): Add a linux_process_target*
688 * lynx-low.h (class lynx_process_target): Define as a derived
689 class of 'process_target'.
690 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
692 * nto-low.h (class nto_process_target): Define as a derived
693 class of 'process_target'.
694 * nto-low.cc (nto_target_ops): Add an nto_process_target*
696 * win32-low.h (class win32_process_target): Define as a derived
697 class of 'process_target'.
698 * win32-low.cc (win32_target_ops): Add a win32_process_target*
701 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
703 * configure: Regenerate.
705 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
706 Andrew Burgess <andrew.burgess@embecosm.com>
708 * linux-riscv-low.cc: New file.
709 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
710 and nat/riscv-linux-tdesc.c.
711 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
712 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
715 2020-02-14 Tom Tromey <tom@tromey.com>
717 * acinclude.m4: Don't include acx_configure_dir.m4.
718 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
719 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
720 (all, install-only, uninstall, clean-info, clean)
721 (maintainer-clean): Don't recurse.
722 (subdir_do, all-lib): Remove.
723 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
725 (generated_files): Update.
726 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
727 * configure: Rebuild.
728 * configure.ac: Don't configure gnulib or libiberty.
731 2020-02-14 Eli Zaretskii <eliz@gnu.org>
733 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
734 preparing the command line for CreateProcess.
735 (win32_create_inferior): Reflect the program name in debugging
736 output that shows the process and its command line.
738 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
740 * Makefile.in: Rename source files from .c to .cc.
741 * %.c: Rename to %.cc.
742 * configure.ac: Rename server.c to server.cc.
743 * configure: Re-generate.
745 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
747 * Makefile.in: Rename gdbsupport source files from .c to .cc.
749 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
751 * win32-low.c (win32_create_inferior): Set signal_pid.
753 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
754 Pedro Alves <palves@redhat.com>
756 Skip building gdbserver in a cross-configuration.
757 * configure.srv: Set $gdbserver_host depending on whether $target
758 is $host. Use $gdbserver_host instead of $host.
760 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
762 * configure: Re-generate.
764 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
766 * configure: Re-generate.
768 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
770 * acinclude.m4: Update warning.m4 path.
772 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
774 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
775 (handle_exception): Set siginfo_er.
776 (win32_xfer_siginfo): New function.
778 2020-02-07 Tom Tromey <tom@tromey.com>
779 Pedro Alves <palves@redhat.com>
781 * README: Update build documentation.
782 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
784 * configure.ac: Update paths.
785 * configure: Rebuild.
786 * acinclude.m4: Update paths.
787 * Makefile.in: Update include paths.
788 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
789 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
790 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
791 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
792 (%-generated.c): Update paths.
793 * Move entire directory from ../gdb/gdbserver.
795 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
797 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
799 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
801 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
802 assignment instead of srv_linux_obj.
804 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
806 * server.c (handle_qxfer_libraries): Write segment-address with
809 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
811 * Makefile.in (install-strip): New target.
812 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
813 * aclocal.m4: Regenerate.
814 * configure: Regenerate.
815 * configure.ac: Add AM_PROG_INSTALL_STRIP.
817 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
819 * Makefile.in (SFILES): Adjust paths to point to real files.
820 (OBS): Move waitstatus.o to target/waitstatus.o.
821 (TAGS): Transform paths appropriately.
823 (nat/%.o): ... this pattern rule.
825 (target/%.o): ... this pattern rule.
826 * configure.srv: Adjust paths throughout to include nat/ prefix
827 with the revant files.
828 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
829 * configure: Regenerate.
831 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
833 * Makefile.in (TAGS): Remove config files from the recipe.
835 2020-01-14 Tom Tromey <tom@tromey.com>
837 * configure: Rebuild.
838 * configure.ac: Remove any checks that were added to common.m4.
839 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
842 2020-01-14 Tom Tromey <tom@tromey.com>
844 * server.h: Include config.h.
845 * gdbreplay.c: Include config.h.
846 * configure: Rebuild.
847 * configure.ac: Don't source common.host.
848 * acinclude.m4: Update path.
849 * Makefile.in (INCSUPPORT): New variable.
850 (INCLUDE_CFLAGS): Add INCSUPPORT.
851 (SFILES): Update paths.
852 (version-generated.c): Update path to create-version.sh.
853 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
855 2020-01-14 Tom Tromey <tom@tromey.com>
857 * configure.ac (LIBS): Use WIN32APILIBS.
858 (USE_WIN32API): Don't define.
859 * configure: Rebuild.
861 2020-01-14 Tom Tromey <tom@tromey.com>
863 * configure: Rebuild.
865 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
867 * Makefile.in (%-generated.c): Remove rule for files from
870 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
872 * configure: Re-generate.
874 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
876 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
878 * tracepoint.c (stop_tracing, flush_trace_buffer,
879 about_to_request_buffer_space, get_trace_state_variable_value,
880 set_trace_state_variable_value, gdb_collect): Add declaration.
882 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
884 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
885 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
886 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
887 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
888 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
891 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
893 * inferiors.c: Include gdbsupport/common-inferior.h.
895 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
897 * hostio-errno.c: Include hostio.h.
899 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
901 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
904 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
906 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
907 * linux-arm-tdesc.h: Include arch/arm.h.
909 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
911 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
913 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
915 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
916 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
918 2020-01-10 Pedro Alves <palves@redhat.com>
920 * fork-child.c (post_fork_inferior): Pass target down to
922 * inferiors.c (switch_to_thread): Add process_stratum_target
924 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
925 * nto-low.c (nto_target_ops): Now a process_stratum_target.
926 * linux-low.c (linux_target_ops): Now a process_stratum_target.
927 * remote-utils.c (prepare_resume_reply): Pass the target to
929 * target.c (the_target): Now a process_stratum_target.
930 (done_accessing_memory): Pass the target to switch_to_thread.
931 (set_target_ops): Ajust to use process_stratum_target.
932 * target.h (struct target_ops): Rename to ...
933 (struct process_stratum_target): ... this.
934 (the_target, set_target_ops): Adjust.
935 (prepare_to_access_memory): Adjust comment.
936 * win32-low.c (child_xfer_memory): Adjust to use
937 process_stratum_target.
938 (win32_target_ops): Now a process_stratum_target.
940 2020-01-06 Eli Zaretskii <eliz@gnu.org>
941 Pedro Alves <palves@redhat.com>
943 * win32-low.c (get_child_debug_event): Extract the fatal exception
944 from the exit status and convert to the equivalent Posix signal
946 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
947 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
949 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
951 * Makefile.in: Use INSTALL_PROGRAM_ENV.
953 2020-01-01 Joel Brobecker <brobecker@adacore.com>
955 * server.c (gdbserver_version): Change copyright year to 2020.
956 * gdbreplay.c (gdbreplay_version): Likewise.
958 2019-12-19 Christian Biesinger <cbiesinger@google.com>
960 * configure: Regenerate.
961 * configure.ac: Quote variable arguments of test.
963 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
965 * Makefile.in: Fix build with GNU Make 3.81
967 2019-12-16 Tom Tromey <tromey@adacore.com>
969 * server.c (get_exec_file): Constify result.
971 2019-12-10 Christian Biesinger <cbiesinger@google.com>
973 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
974 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
975 * config.in: Regenerate.
976 * configure: Regenerate.
977 * configure.ac: Don't check for strerror.
978 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
979 Call safe_strerror instead of strerror.
980 * server.h (strerror): Remove this now-unnecessary declaration.
981 * tracepoint.c (init_named_socket): Call safe_strerror instead of
983 (gdb_agent_helper_thread): Likewise.
984 * utils.c (perror_with_name): Likewise.
986 2019-11-26 Tom Tromey <tom@tromey.com>
988 * configure, config.in: Rebuild.
990 2019-11-26 Tom Tromey <tom@tromey.com>
992 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
993 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
995 * configure, config.in: Rebuild.
997 2019-11-26 Tom Tromey <tom@tromey.com>
999 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1000 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1001 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1002 * acinclude.m4: Include ax_pthread.m4.
1003 * config.in, configure: Rebuild.
1005 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1007 * debug.c (debug_set_output): Call safe_strerror instead of
1009 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1010 (linux_kill_one_lwp): Likewise.
1011 (linux_detach_one_lwp): Likewise.
1012 (linux_wait_for_event_filtered): Likewise.
1013 (store_register): Likewise.
1014 * lynx-low.c (lynx_attach): Likewise.
1015 * mem-break.c (insert_memory_breakpoint): Likewise.
1016 (remove_memory_breakpoint): Likewise.
1017 (delete_fast_tracepoint_jump): Likewise.
1018 (set_fast_tracepoint_jump): Likewise.
1019 (uninsert_fast_tracepoint_jumps_at): Likewise.
1020 (reinsert_fast_tracepoint_jumps_at): Likewise.
1021 * nto-low.c (nto_xfer_memory): Likewise.
1022 (nto_resume): Likewise.
1024 2019-11-20 Luis Machado <luis.machado@linaro.org>
1026 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1027 instead of register count.
1028 * tdesc.c (tdesc_contains_feature): New function.
1029 * tdesc.h (tdesc_contains_feature): New prototype.
1031 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1033 * Makefile.in: Add safe-strerror.c.
1034 * configure: Regenerate.
1035 * configure.ac: Don't source common.host.
1037 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1039 * config.in: Regenerate.
1040 * configure: Regenerate.
1042 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1044 * ax.c (ax_printf): Handle size_t_arg.
1046 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1048 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1049 * mi/mi-main.c (output_cores): Likewise.
1050 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1051 (linux_xfer_osdata_modules): Likewise.
1052 * remote.c (register_remote_support_xml): Likewise.
1053 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1054 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1056 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1058 * configure: Regenerate.
1059 * configure.ac: Remove check for strerror_r.
1061 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1063 * config.in: Regenerate.
1064 * configure: Regenerate.
1065 * configure.ac: Also check for strerror_r.
1067 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1069 * ax.h (debug_agent): Remove duplicate declaration.
1071 2019-10-26 Tom de Vries <tdevries@suse.de>
1073 * linux-aarch64-low.c: Fix typos in comments.
1074 * linux-arm-low.c: Same.
1075 * linux-low.c: Same.
1076 * linux-ppc-low.c: Same.
1077 * proc-service.c: Same.
1080 * tracepoint.c: Same.
1081 * win32-low.c: Same.
1083 2019-10-25 Tom Tromey <tromey@adacore.com>
1085 * utils.c (xstrdup): Remove.
1087 2019-10-23 Tom Tromey <tom@tromey.com>
1089 * configure, config.in: Rebuild.
1091 2019-10-23 Tom Tromey <tom@tromey.com>
1093 * configure: Rebuild.
1094 * acinclude.m4: Use m4_include, not sinclude.
1096 2019-10-17 Tom Tromey <tromey@adacore.com>
1098 * configure: Rebuild.
1099 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1100 in AC_CONFIG_FILES invocation.
1101 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1104 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1106 * server.c: Include xml-builtin.h.
1107 (get_xml_features): Don't declare xml_builtins here.
1109 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1111 * Makefile.in: Remove references to vec-ipa.o.
1113 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1115 * Makefile.in: Remove references to vec.c.
1117 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1119 * server.c (server_waiting): Change to bool.
1120 (extended_protocol): Likewise.
1121 (response_needed): Likewise.
1122 (exit_requested): Likewise.
1123 (run_once): Likewise.
1124 (report_no_resumed): Likewise.
1125 (non_stop): Likewise.
1126 (disable_packet_vCont): Likewise.
1127 (disable_packet_Tthread): Likewise.
1128 (disable_packet_qC): Likewise.
1129 (disable_packet_qfThreadInfo): Likewise.
1130 (handle_general_set): Update.
1131 (handle_detach): Update.
1132 (handle_monitor_command): Update.
1133 (handle_query): Update.
1134 (captured_main): Update.
1135 (process_serial_event): Update.
1136 * server.h (server_waiting): Change to bool.
1137 (disable_packet_vCont): Likewise.
1138 (disable_packet_Tthread): Likewise.
1139 (disable_packet_qC): Likewise.
1140 (disable_packet_qfThreadInfo): Likewise.
1141 (run_once): Likewise.
1142 (non_stop): Likewise.
1143 * target.c (target_stop_and_wait): Update.
1145 2019-10-02 Tom Tromey <tromey@adacore.com>
1147 * Makefile.in (SFILES): Add common-inferior.c.
1148 (OBS): Add common-inferior.o.
1149 * server.c (startup_with_shell): Don't define.
1151 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1153 * linux-low.c (linux_low_read_btrace): Update for change to
1156 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1158 * debug.c (debug_threads): Remove comment in favor of the header.
1159 * debug.h (using_threads): Add declaration.
1160 (debug_threads): Add comment.
1161 * linux-aarch64-low.c: Include debug.h and remove declaration of
1163 * nto-low.c: Likewise.
1164 * remote-utils.c: Likewise.
1165 * thread-db.c: Likewise.
1167 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1169 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1170 and powerpc-cell64l-ipa.o.
1171 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1172 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1173 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1176 * spu-low.c: Remove file.
1178 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1179 (parse_spufs_run): Remove.
1180 (ppc_get_pc): Remove Cell/B.E. support.
1181 (ppc_set_pc): Likewise.
1182 (ppc_breakpoint_at): Likewise.
1183 (ppc_arch_setup): Likewise.
1184 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1185 tdesc_powerpc_cell32l.
1186 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1187 or init_registers_powerpc_cell32l.
1188 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1189 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1190 or init_registers_powerpc_cell32l.
1191 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1192 (init_registers_powerpc_cell32l): Remove prototype.
1193 (init_registers_powerpc_cell64l): Likewise.
1195 * target.h (struct target_ops): Remove qxfer_spu member.
1196 * server.c (handle_qxfer_spu): Remove.
1197 (qxfer_packets): Remove entry for "spu".
1198 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1199 * linux-low.c (SPUFS_MAGIC): Remove.
1200 (spu_enumerate_spu_ids): Remove.
1201 (linux_qxfer_spu): Remove.
1202 (linux_target_ops): Remove qxfer_spu member.
1203 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1204 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1205 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1207 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1209 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1210 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1211 * config.in: Regenerate.
1212 * configure: Regenerate.
1214 2019-08-15 Tom Tromey <tromey@adacore.com>
1216 * target.c (target_write_memory): Use gdb::byte_vector.
1218 2019-08-15 Tom Tromey <tromey@adacore.com>
1220 * tracepoint.c (write_inferior_data_pointer)
1221 (write_inferior_integer, write_inferior_int8)
1222 (write_inferior_uinteger, m_tracepoint_action_download)
1223 (r_tracepoint_action_download, x_tracepoint_action_download)
1224 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1225 (download_agent_expr, download_tracepoint_1)
1226 (download_trace_state_variables, upload_fast_traceframes): Update.
1227 * server.c (gdb_write_memory): Update.
1228 * remote-utils.c (relocate_instruction): Update.
1229 * proc-service.c (ps_pdwrite): Update.
1230 * mem-break.c (remove_memory_breakpoint)
1231 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1232 (uninsert_fast_tracepoint_jumps_at)
1233 (reinsert_fast_tracepoint_jumps_at): Update.
1234 * linux-x86-low.c (append_insns)
1235 (i386_install_fast_tracepoint_jump_pad)
1236 (amd64_write_goto_address, i386_write_goto_address): Update.
1237 * linux-s390-low.c (append_insns, s390_write_goto_address):
1239 * linux-ppc-low.c (ppc_relocate_instruction)
1240 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1241 (ppc_write_goto_address): Update.
1242 * linux-aarch64-low.c (append_insns): Update.
1243 * target.h (struct target_ops): Update.
1244 (write_inferior_memory): Don't declare.
1245 * target.c (target_write_memory): Rename from
1246 write_inferior_memory. Remove old target_write_memory.
1248 2019-08-15 Tom Tromey <tromey@adacore.com>
1250 * target.c (write_inferior_memory): Use std::vector.
1252 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1255 * configure.ac: Drop enable-libmcheck support.
1256 * configure, config.in: Rebuild.
1257 * acinclude.m4: Don't include it.
1259 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1261 * configure.srv: Remove Arm xml files.
1263 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1265 * configure.srv: Add new files. Remove xml generated files.
1266 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1268 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1269 * linux-aarch32-tdesc.c: New file.
1270 * linux-aarch32-tdesc.h: New file.
1271 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1272 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1273 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1274 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1275 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1276 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1277 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1278 (arm_read_description): Call arm_linux_read_description.
1279 (initialize_low_arch): Don't init registers.
1280 * linux-arm-tdesc.c: New file.
1281 * linux-arm-tdesc.h: New file.
1283 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1285 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1286 Move counter inside for.
1287 (arm_read_description): Check ptrace earlier.
1288 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1290 2019-07-09 Tom Tromey <tom@tromey.com>
1292 * configure: Rebuild.
1293 * configure.ac: Change common to gdbsupport.
1294 * acinclude.m4: Change common to gdbsupport.
1295 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1296 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1297 common to gdbsupport.
1298 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1299 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1300 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1301 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1302 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1303 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1304 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1305 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1306 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1307 common to gdbsupport.
1309 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1311 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1313 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1315 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1317 * configure.srv: Remove legacy xml.
1318 * linux-aarch64-low.c (initialize_low_arch): Remove
1319 initialize_low_tdesc call.
1320 * linux-aarch64-tdesc-selftest.c: Remove file.
1321 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1322 * linux-x86-low.c (initialize_low_arch): Remove
1323 initialize_low_tdesc call.
1324 * linux-x86-tdesc-selftest.c: Remove file.
1325 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1327 2019-06-20 Tom de Vries <tdevries@suse.de>
1329 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1330 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1332 2019-06-19 Tom de Vries <tdevries@suse.de>
1334 * debug.h (debug_write): Change return type to ssize_t.
1335 * debug.c (debug_write): Same.
1337 2019-06-14 Tom Tromey <tom@tromey.com>
1339 * configure.ac: Use new path to gnulib.
1340 * configure: Rebuild.
1341 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1344 2019-06-11 Tom Tromey <tom@tromey.com>
1346 * Makefile.in (SFILES): Add alloc.c.
1348 (IPA_OBJS): Add alloc-ipa.o.
1349 (alloc-ipa.o): New target.
1350 (%.o: ../%.c): New pattern rule.
1352 2019-06-10 Tom Tromey <tromey@adacore.com>
1354 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1355 end warning with a newline.
1356 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1358 * thread-db.c (attach_thread): Don't end warning with a newline.
1359 (thread_db_notice_clone): Likewise.
1360 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1362 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1363 end warning with a newline.
1365 2019-06-04 Pedro Alves <palves@redhat.com>
1367 * server.c (captured_main): Use make_unique_xstrdup.
1369 2019-06-02 Tom Tromey <tom@tromey.com>
1371 * gdbreplay.c (fromhex): Remove.
1372 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1374 2019-05-29 Tom Tromey <tromey@adacore.com>
1376 * configure: Rebuild.
1378 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1380 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1381 sign extension code on 32-bit builds.
1383 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1386 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1388 2019-04-19 Tom Tromey <tom@tromey.com>
1390 * server.c (struct vstop_notif): Derive from notif_event.
1392 (queue_stop_reply): Update.
1393 (remove_all_on_match_ptid): Change type. Rewrite.
1394 (discard_queued_stop_replies): Rewrite.
1395 (in_queued_stop_replies_ptid): Change type.
1396 (in_queued_stop_replies): Rewrite.
1397 (notif_stop): Update.
1398 (queue_stop_reply_callback): Update.
1399 (captured_main): Don't call initialize_notif.
1400 (push_stop_notification): Update.
1401 * notif.c (notif_write_event, handle_notif_ack)
1402 (notif_event_enque, notif_push): Update.
1403 (notif_event_xfree, initialize_notif): Remove.
1404 * notif.h (struct notif_event): Include <list>, not
1406 (struct notif_server) <queue>: Now a std::list.
1407 (notif_event_p): Remove typedef.
1408 (initialize_notif): Don't declare.
1409 (struct notif_event): Add virtual destructor.
1411 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1413 * ax.c (ax_vdebug): Call debug_printf.
1414 * debug.c (debug_write): New function.
1415 * debug.h (debug_write): New declaration.
1416 * linux-low.c (sigchld_handler): Call debug_write.
1418 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1420 * debug.c (debug_set_output): New function.
1421 (debug_vprintf): Send output to debug_file.
1422 (debug_flush): Likewise.
1423 * debug.h (debug_set_output): New declaration.
1424 * server.c (handle_monitor_command): Add debug-file option.
1425 (captured_main): Likewise.
1427 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1429 * debug.c (remote_debug): Add definition.
1430 * debug.h (remote_debug): Add declaration.
1431 * hostio.c (remote_debug): Remove declaration.
1432 * remote-utils.c (struct ui_file): Likewise.
1433 (remote_debug): Likewise.
1434 * remote-utils.h (remote_debug): Likewise,
1435 * server.c (remote_debug): Remove definition.
1437 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1439 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1440 when using a 64-bit gdbserver.
1442 2019-04-09 Tom Tromey <tromey@adacore.com>
1444 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1446 2019-04-08 Tom Tromey <tom@tromey.com>
1448 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1450 (linux_resume_one_lwp): Likewise.
1452 2019-04-08 Tom Tromey <tom@tromey.com>
1454 * gdbreplay.c: Update.
1455 * linux-low.c: Update.
1458 2019-04-08 Tom Tromey <tom@tromey.com>
1460 * server.c: Use C++ exception handling.
1461 * linux-low.c: Use C++ exception handling.
1462 * gdbreplay.c: Use C++ exception handling.
1464 2019-04-08 Tom Tromey <tom@tromey.com>
1466 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1467 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1468 (captured_main, main): Update.
1469 * gdbreplay.c (main): Update.
1471 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1473 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1474 value in argument pointer, return 1 if the entry is found and 0
1475 otherwise. Move comment.
1476 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1477 * linux-low.h (linux_get_auxv): Declare.
1478 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1480 2019-04-05 Tom Tromey <tromey@adacore.com>
1482 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1485 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1487 * linux-low.c (AT_HWCAP2): Add define if not already included.
1489 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1491 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1492 (aarch64_arch_setup): Call linux_get_hwcap.
1493 * linux-arm-low.c (arm_get_hwcap): Remove function.
1494 (arm_read_description): Call linux_get_hwcap.
1495 * linux-low.c (linux_get_auxv): New function.
1496 (linux_get_hwcap): Likewise.
1497 (linux_get_hwcap2): Likewise.
1498 * linux-low.h (linux_get_hwcap): New declaration.
1499 (linux_get_hwcap2): Likewise.
1500 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1501 (ppc_arch_setup): Call linux_get_hwcap.
1502 * linux-s390-low.c (s390_get_hwcap): Remove function.
1503 (s390_arch_setup): Call linux_get_hwcap.
1505 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1506 Jiong Wang <jiong.wang@arm.com>
1508 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1509 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1511 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1513 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1514 Jiong Wang <jiong.wang@arm.com>
1516 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1517 (aarch64_get_hwcap): New function.
1518 (aarch64_arch_setup): Read APIA hwcap.
1520 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1521 Jiong Wang <jiong.wang@arm.com>
1523 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1524 (initialize_low_tracepoint): Likewise.
1525 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1526 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1527 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1528 (aarch64_linux_read_description): Likewise.
1529 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1531 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1533 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1534 i386_create_target_description for 'segments' parameter.
1535 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1536 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1537 * win32-i386-low.c (i386_arch_setup): Likewise.
1539 2019-03-12 Tom Tromey <tromey@adacore.com>
1541 * linux-low.c (iterate_over_lwps): Update.
1543 2019-03-06 Tom Tromey <tom@tromey.com>
1545 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
1546 (captured_main): Use SCOPE_EXIT.
1548 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
1550 * configure.srv: Use '$enable_unittest' instead of '$development'
1551 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
1554 2019-02-27 Tom Tromey <tromey@adacore.com>
1556 * gdbreplay.c (logchar): Handle \r\n.
1558 2019-02-07 Alan Hayward <alan.hayward@arm.com>
1560 * linux-low.c (linux_attach): Add process before lwp.
1561 * server.c (attach_inferior): Check if already attached.
1563 2019-02-07 Tom Tromey <tom@tromey.com>
1565 * x86-tdesc.h: Rename include guard.
1566 * x86-low.h: Add include guard.
1567 * wincecompat.h: Rename include guard.
1568 * win32-low.h: Add include guard.
1569 * utils.h: Rename include guard.
1570 * tracepoint.h: Rename include guard.
1571 * tdesc.h: Rename include guard.
1572 * target.h: Rename include guard.
1573 * server.h: Rename include guard.
1574 * remote-utils.h: Rename include guard.
1575 * regcache.h: Rename include guard.
1576 * nto-low.h: Rename include guard.
1577 * notif.h: Add include guard.
1578 * mem-break.h: Rename include guard.
1579 * lynx-low.h: Add include guard.
1580 * linux-x86-tdesc.h: Add include guard.
1581 * linux-s390-tdesc.h: Add include guard.
1582 * linux-ppc-tdesc-init.h: Add include guard.
1583 * linux-low.h: Add include guard.
1584 * linux-aarch64-tdesc.h: Add include guard.
1585 * linux-aarch32-low.h: Add include guard.
1586 * inferiors.h: Rename include guard.
1587 * i387-fp.h: Rename include guard.
1588 * hostio.h: Rename include guard.
1589 * gdbthread.h: Rename include guard.
1590 * gdb_proc_service.h: Rename include guard.
1591 * event-loop.h: Rename include guard.
1592 * dll.h: Rename include guard.
1593 * debug.h: Rename include guard.
1594 * ax.h: Rename include guard.
1596 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
1599 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
1600 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
1602 2019-01-25 Tom Tromey <tom@tromey.com>
1604 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
1606 2019-01-25 Tom Tromey <tom@tromey.com>
1608 * win32-low.c: Fix common/ includes.
1609 * win32-i386-low.c: Fix common/ includes.
1610 * tracepoint.c: Fix common/ includes.
1611 * thread-db.c: Fix common/ includes.
1612 * target.h: Fix common/ includes.
1613 * symbol.c: Fix common/ includes.
1614 * spu-low.c: Fix common/ includes.
1615 * server.h: Fix common/ includes.
1616 * server.c: Fix common/ includes.
1617 * remote-utils.c: Fix common/ includes.
1618 * regcache.h: Fix common/ includes.
1619 * regcache.c: Fix common/ includes.
1620 * nto-x86-low.c: Fix common/ includes.
1621 * notif.h: Fix common/ includes.
1622 * mem-break.h: Fix common/ includes.
1623 * lynx-low.c: Fix common/ includes.
1624 * lynx-i386-low.c: Fix common/ includes.
1625 * linux-x86-tdesc-selftest.c: Fix common/ includes.
1626 * linux-x86-low.c: Fix common/ includes.
1627 * linux-low.c: Fix common/ includes.
1628 * inferiors.h: Fix common/ includes.
1629 * i387-fp.c: Fix common/ includes.
1630 * hostio.c: Fix common/ includes.
1631 * hostio-errno.c: Fix common/ includes.
1632 * gdbthread.h: Fix common/ includes.
1633 * gdbreplay.c: Fix common/ includes.
1634 * fork-child.c: Fix common/ includes.
1635 * event-loop.c: Fix common/ includes.
1637 (enum gdb_agent_op): Fix common/ includes.
1639 2019-01-21 Tom Tromey <tom@tromey.com>
1641 * tracepoint.c: Fix includes.
1642 * remote-utils.c: Fix includes.
1643 * linux-x86-low.c: Fix includes.
1645 2019-01-01 Joel Brobecker <brobecker@adacore.com>
1647 * gdbreplay.c (gdbreplay_version): Update copyright year in
1649 * server.c (gdbserver_version): Likewise.
1651 2018-12-05 Alan Hayward <alan.hayward@arm.com>
1653 * linux-low.c (add_lwp): Switch ordering.
1655 2018-11-29 Tom Tromey <tom@tromey.com>
1657 * win32-low.c (win32_join): Take pid, not process.
1658 * target.h (struct target_ops) <join>: Change argument type.
1659 (join_inferior): Change argument name.
1660 * spu-low.c (spu_join): Take pid, not process.
1661 * server.c (handle_detach): Preserve pid before destroying
1663 * lynx-low.c (lynx_join): Take pid, not process.
1664 * linux-low.c (linux_join): Take pid, not process.
1666 2018-11-23 Alan Hayward <alan.hayward@arm.com>
1668 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
1669 (aarch64_cannot_fetch_register): Likewise.
1670 (struct linux_target_ops): Update references.
1672 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1674 * linux-ppc-low.c: Include nat/linux-ptrace.h.
1676 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1678 * configure.srv (ipa_ppc_linux_regobj): Add
1679 powerpc-isa207-htm-vsx32l-ipa.o and
1680 powerpc-isa207-htm-vsx64l-ipa.o.
1681 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
1682 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
1683 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
1684 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
1685 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
1686 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
1687 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
1688 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
1689 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1690 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
1691 (init_registers_powerpc_isa207_htm_vsx32l)
1692 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
1693 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
1694 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
1695 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
1696 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
1697 (ppc_store_tm_ctarregset): New functions.
1698 (ppc_regsets): Add entries for HTM regsets.
1699 (ppc_arch_setup): Set htm in features struct when needed. Set
1700 sizes for the HTM regsets.
1701 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
1702 (initialize_low_arch): Call
1703 init_registers_powerpc_isa207_htm_vsx32l and
1704 init_registers_powerpc_isa207_htm_vsx64l.
1705 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1706 PPC_TDESC_ISA207_HTM_VSX.
1707 (initialize_low_tracepoint): Call
1708 init_registers_powerpc_isa207_htm_vsx32l and
1709 init_registers_powerpc_isa207_htm_vsx64l.
1711 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1713 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
1714 rs6000/power-linux-pmu.xml to srv_xmlfiles.
1715 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
1716 (ppc_store_pmuregset): New functions.
1717 (ppc_regsets): Add entries for ebb and pmu regsets.
1718 (ppc_arch_setup): Set isa207 in features struct if the ebb and
1719 pmu regsets are available. Set sizes for these regsets.
1721 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1723 * configure.srv (ipa_ppc_linux_regobj): Add
1724 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
1725 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
1726 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
1727 rs6000/powerpc-isa207-vsx32l.xml, and
1728 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
1729 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1730 <PPC_TDESC_ISA207_VSX>: New enum value.
1731 (init_registers_powerpc_isa207_vsx32l): Declare.
1732 (init_registers_powerpc_isa207_vsx64l): Declare.
1733 * linux-ppc-low.c (ppc_fill_tarregset): New function.
1734 (ppc_store_tarregset): New function.
1735 (ppc_regsets): Add entry for the TAR regset.
1736 (ppc_arch_setup): Set isa207 in features struct when needed. Set
1737 size for the TAR regsets.
1738 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
1739 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
1740 and init_registers_powerpc_isa207_vsx64l.
1741 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
1742 (initialize_low_tracepoint): Call
1743 init_registers_powerpc_isa207_vsx32l and
1744 init_registers_powerpc_isa207_vsx64l.
1746 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
1747 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1749 * configure.srv (ipa_ppc_linux_regobj): Add
1750 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1751 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1752 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1753 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1754 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1755 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1756 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1757 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1758 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1759 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1760 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1761 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1762 (ppc_hwcap): Add comment.
1763 (ppc_hwcap2): New global.
1764 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1765 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1766 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1767 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1768 when needed. Set sizes for the the DSCR and PPR regsets.
1769 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1770 (initialize_low_arch): Call
1771 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1772 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1773 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1774 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1775 (initialize_low_tracepoint): Call
1776 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1777 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1779 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1781 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1783 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1784 Simon Marchi <simark@simark.ca>
1786 * acinclude.m4: Include "../selftest.m4".
1787 * configure: Regenerate.
1788 * configure.ac: Use "GDB_AC_SELFTEST".
1789 * configure.srv: Use "$enable_unittests" instead of
1790 "$development" when checking whether unit tests have been
1792 * server.c (captured_main): Update message informing that
1793 selftests have been disabled.
1795 2018-10-04 Tom Tromey <tom@tromey.com>
1797 * configure: Rebuild.
1799 2018-10-04 Tom Tromey <tom@tromey.com>
1801 * server.c (handle_status): Rename inner "thread".
1802 (process_serial_event): Declare "res" in 'm' case.
1803 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1804 (iterate_over_lwps): Rename inner "thread".
1805 (linux_qxfer_libraries_svr4): Rename inner "len".
1806 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1808 2018-10-01 Gary Benson <gbenson@redhat.com>
1810 * gdb_proc_service.h: Moved common code to
1811 common/gdb_proc_service.h.
1813 2018-10-01 Gary Benson <gbenson@redhat.com>
1815 * gdb_proc_service.h: Synchronize comments and whitespace with
1816 GDB's version of this file.
1818 2018-09-25 Tom Tromey <tom@tromey.com>
1820 * configure: Rebuild.
1821 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1823 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1825 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1826 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1827 ($(IPA_LIB)): Sort IPA_OBJS.
1829 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1831 * Makefile.in: Remove references to $(ADD_DEPS).
1833 2018-09-16 Tom Tromey <tom@tromey.com>
1835 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1837 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1840 2018-09-05 Tom Tromey <tom@tromey.com>
1842 * configure: Rebuild.
1844 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1847 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1849 2018-08-27 Tom Tromey <tom@tromey.com>
1852 * configure: Rebuild.
1854 2018-08-27 Tom Tromey <tom@tromey.com>
1856 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1857 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1858 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1859 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1860 (s390x_emit_stack_adjust): Add casts to unsigned char.
1862 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1866 * server.h (struct client_state) <disable_randomization>:
1869 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1871 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1873 (mips_supply_ptrace_register): Likewise.
1875 2018-07-22 Tom Tromey <tom@tromey.com>
1877 * configure: Rebuild.
1879 2018-07-22 Tom Tromey <tom@tromey.com>
1881 * win32-low.c (win32_create_inferior): Remove unused variables.
1882 * gdbreplay.c (remote_open): Remove unused variable.
1883 * remote-utils.c (remote_prepare): Remove unused variable.
1884 * x86-tdesc.h (X86_TDESC_H): Define.
1885 (amd64_expedite_regs): Define conditionally.
1886 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1887 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1888 * remote-utils.c (readchar): Remove unused variable.
1890 2018-07-13 Pedro Alves <palves@redhat.com>
1892 * linux-low.c (linux_kill): Change parameter to process_info
1893 pointer instead of pid. Adjust.
1894 * lynx-low.c (lynx_kill): Likewise.
1895 * nto-low.c (nto_kill): Likewise.
1896 * spu-low.c (spu_kill): Likewise.
1897 * win32-low.c (win32_kill): Likewise.
1898 * server.c (handle_v_kill, kill_inferior_callback)
1899 (detach_or_kill_for_exit): Adjust.
1900 * target.c (kill_inferior): Change parameter to process_info
1901 pointer instead of pid. Adjust.
1902 * target.h (struct target_ops) <kill>: Change parameter to
1903 process_info pointer instead of pid. Adjust all implementations
1905 (kill_inferior): Likewise.
1907 2018-07-13 Pedro Alves <palves@redhat.com>
1909 * linux-low.c (linux_detach, linux_join): Change parameter to
1910 process_info pointer instead of pid. Adjust.
1911 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1912 * nto-low.c (nto_detach): Likewise.
1913 * spu-low.c (spu_detach, spu_join): Likewise.
1914 * win32-low.c (win32_detach, win32_join): Likewise.
1915 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1916 * target.h (struct target_ops) <detach, join>: Change parameter to
1917 process_info pointer instead of pid. Adjust all implementations
1919 (detach_inferior, join_inferior): Rename 'pid' parameter to
1922 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1923 Jan Kratochvil <jan.kratochvil@redhat.com>
1924 Paul Fertser <fercerpav@gmail.com>
1925 Tsutomu Seki <sekiriki@gmail.com>
1927 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1928 (OBS): Add 'common/netstuff.o'.
1929 (GDBREPLAY_OBS): Likewise.
1930 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1931 (remote_open): Implement support for IPv6
1933 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1935 (handle_accept_event): Accept connections from IPv6 sources.
1936 (remote_prepare): Handle IPv6-style hostnames; implement
1937 support for IPv6 connections.
1938 (remote_open): Implement support for printing connections from
1941 2018-07-11 Pedro Alves <palves@redhat.com>
1944 * mem-break.c (any_persistent_commands): Add process_info
1945 parameter and use it instead of relying on the current process.
1946 Change return type to bool.
1947 * mem-break.h (any_persistent_commands): Add process_info
1948 parameter and change return type to bool.
1949 * server.c (handle_detach): Remove require_running_or_return call.
1950 Look up the process_info for the process we're about to detach.
1951 If not found, return back error to GDB. Adjust
1952 any_persistent_commands call to pass down a process pointer.
1954 2018-07-11 Pedro Alves <palves@redhat.com>
1956 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1957 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1958 instead of collect_register_by_name.
1959 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1960 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1962 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1963 Pedro Alves <palves@redhat.com>
1965 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1967 2018-07-03 Tom Tromey <tom@tromey.com>
1969 * linux-low.c: Update.
1970 * lynx-low.c: Update.
1971 * mem-break.c: Update.
1972 * nto-low.c: Update.
1973 * remote-utils.c: Update.
1975 * spu-low.c: Update.
1977 * win32-low.c: Update.
1979 2018-07-03 Tom Tromey <tom@tromey.com>
1983 2018-07-03 Tom Tromey <tom@tromey.com>
1985 * linux-low.c: Update.
1987 2018-07-03 Tom Tromey <tom@tromey.com>
1991 2018-07-03 Tom Tromey <tom@tromey.com>
1993 * linux-low.c: Update.
1994 * linux-mips-low.c: Update.
1995 * lynx-low.c: Update.
1996 * nto-low.c: Update.
1997 * remote-utils.c: Update.
1999 * spu-low.c: Update.
2001 * thread-db.c: Update.
2003 2018-07-03 Tom Tromey <tom@tromey.com>
2005 * linux-low.c: Update.
2006 * linux-mips-low.c: Update.
2007 * lynx-low.c: Update.
2008 * mem-break.c: Update.
2009 * nto-low.c: Update.
2010 * remote-utils.c: Update.
2012 * spu-low.c: Update.
2014 * tracepoint.c: Update.
2016 2018-07-03 Tom Tromey <tom@tromey.com>
2018 * linux-low.c: Update.
2019 * linux-ppc-low.c: Update.
2020 * linux-x86-low.c: Update.
2021 * proc-service.c: Update.
2023 * spu-low.c: Update.
2024 * thread-db.c: Update.
2025 * win32-low.c: Update.
2027 2018-07-03 Tom Tromey <tom@tromey.com>
2029 * linux-low.c: Update.
2030 * lynx-low.c: Update.
2031 * nto-low.c: Update.
2032 * remote-utils.c: Update.
2033 * spu-low.c: Update.
2034 * thread-db.c: Update.
2035 * win32-low.c: Update.
2037 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2039 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2040 parameter in call to 'amd64_create_target_description'.
2042 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2044 * x86-tdesc.h: Remove executable permission flag.
2046 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2048 * configure.ac: Remove AC_PREREQ, add missing quoting.
2049 * configure: Re-generate.
2050 * config.in: Re-generate.
2051 * aclocal.m4: Re-generate.
2053 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2055 * tracepoint.h (current_traceframe): Remove declaration.
2057 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2059 * linux-aarch64-low.c (is_sve_tdesc): New function.
2060 (aarch64_sve_regs_copy_to_regcache): Likewise.
2061 (aarch64_sve_regs_copy_from_regcache): Likewise.
2062 (aarch64_regs_info): Add SVE checks.
2063 (initialize_low_arch): Initialize SVE.
2065 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2067 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2069 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2071 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2072 (initialize_low_tracepoint): Likewise
2073 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2074 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2076 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2078 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2080 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2082 * server.h (PBUFSIZ): Increase size
2084 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2086 * regcache.c (regcache::raw_compare): New function.
2087 * regcache.h (regcache::raw_compare): New declaration.
2089 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2091 * regcache.c (new_register_cache): Use new.
2092 (free_register_cache): Use delete.
2093 (register_data): Use const.
2094 (supply_register): Move body inside regcache.
2095 (regcache::raw_supply): New override function.
2096 (collect_register): Move body inside regcache.
2097 (regcache::raw_collect): New override function.
2098 (regcache::get_register_status): New override function.
2099 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2101 2018-06-09 Tom Tromey <tom@tromey.com>
2103 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2105 (event_queue): Use std::queue.
2106 (gdb_event_xfree): Remove.
2107 (initialize_event_loop, process_event, wait_for_event): Update.
2109 2018-06-08 Stan Cox <scox@redhat.com>
2111 * win32-low.c (win32_create_inferior): last_ptid and last_status
2112 moved to client_state.
2114 2018-06-08 Pedro Alves <palves@redhat.com>
2116 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2117 common/common-exceptions.o, common/common-utils.o,
2118 common/errors.o, common/print-utils.o and utils.o.
2119 * gdbreplay.c: Include "common-defs.h" instead of the two
2120 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2121 string.h or alloca.h.
2122 (perror_with_name): Delete.
2123 (remote_open): Use xstrdup instead of strdup.
2124 (main): Rename to ...
2125 (captured_main): ... this.
2128 2018-06-08 Tom Tromey <tom@tromey.com>
2130 * linux-low.c (linux_low_read_btrace): Update.
2132 2018-06-04 Stan Cox <scox@redhat.com>
2134 * server.h (struct client_state): New.
2135 * server.c (cont_thread, general_thread, multi_process)
2136 (report_fork_events, report_vfork_events, report_exec_events)
2137 (report_thread_events, swbreak_feature, hwbreak_feature)
2138 (vCont_supported, disable_randomization, pass_signals)
2139 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2140 Moved to client_state.
2141 * remote-utils.c (remote_debug, noack_mode)
2142 (transport_is_reliable): Moved to client_state.
2143 * tracepoint.c (current_traceframe): Moved to client_state.
2146 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2147 linux-low.c, remote-utils.h, target.c: Use client_state.
2149 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2151 * configure.srv: Add new c/h file.
2153 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2155 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2158 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2160 * gdb.arch/mips-fpregset-core.exp: New test.
2161 * gdb.arch/mips-fpregset-core.c: New test source.
2163 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2166 * hostio.c (require_int): Do not report overflow for integers
2167 between 0xfffffff and 0x7fffffff.
2169 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2171 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2172 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2173 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2175 (the_low_target): Wire them.
2177 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2179 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2180 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2181 mode. Call collect_register_by_name with vscr using
2182 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2183 (ppc_store_vrregset): Add and set vscr_offset variable as in
2184 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2187 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2189 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2190 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2191 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2193 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2195 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2196 (ppc_store_vsxregset): Likewise.
2197 (ppc_fill_vrregset): Likewise.
2198 (ppc_store_vrregset): Likewise.
2199 (ppc_fill_evrregset): Likewise.
2200 (ppc_store_evrregset): Likewise.
2201 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2202 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2205 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2207 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2208 wordsize of the inferior. Call ppc_linux_target_wordsize.
2210 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2212 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2213 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2214 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2215 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2216 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2217 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2218 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2219 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2220 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2221 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2222 (tdesc_powerpc_e500l): Remove.
2223 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2224 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2225 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2226 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2228 (ppc_arch_setup): Remove target description matching code. Fill a
2229 ppc_linux_features struct and call ppc_linux_match_description
2232 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2234 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2235 width of the requested register exceeds the width of the
2237 (mips_cannot_store_register): Likewise.
2239 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2241 * linux-mips-low.c (mips_fetch_register): New function. Update
2243 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2244 (the_low_target): Wire `mips_fetch_register'.
2246 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2248 * lynx-i386-low.c (LYNXOS_178): New macro.
2249 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2250 the layout on LynxOS-178.
2251 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2252 handle floating point registers that are not supported by
2255 2018-05-10 Tom Tromey <tom@tromey.com>
2257 * configure: Rebuild.
2259 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2262 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2263 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2264 Use it to set the expedite_regs field in the given tdesc.
2265 * x86-tdesc.h: New file.
2266 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2267 Adjust following the addition of the new expedite_regs parameter
2268 to init_target_desc.
2269 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2270 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2271 (i386_linux_read_description, amd64_linux_read_description):
2272 Adjust following the addition of the new expedite_regs parameter
2273 to init_target_desc.
2274 * lynx-i386-low.c: #include "x86-tdesc.h".
2275 (lynx_i386_arch_setup): Adjust following the addition of the new
2276 expedite_regs parameter to init_target_desc.
2277 * nto-x86-low.c: #include "x86-tdesc.h".
2278 (nto_x86_arch_setup): Adjust following the addition of the new
2279 expedite_regs parameter to init_target_desc.
2280 * win32-i386-low.c: #include "x86-tdesc.h".
2281 (i386_arch_setup): Adjust following the addition of the new
2282 expedite_regs parameter to init_target_desc.
2284 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2287 * win32-low.c (win32_create_inferior): Add call to my_wait
2288 setting last_status global.
2290 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2293 * win32-low.c (create_process): Only call gdb_tilde_expand if
2294 inferior_cwd is not NULL.
2296 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2298 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2299 registers to the cache if their values have changed.
2300 (i387_xsave_to_cache): Provide default values for x87 control
2301 registers when these features are available, but disabled.
2302 * regcache.c (supply_register_by_name_zeroed): New function.
2303 * regcache.h (supply_register_by_name_zeroed): Declare new
2306 2018-05-07 Tom Tromey <tom@tromey.com>
2308 * configure: Rebuild.
2310 2018-05-04 Tom Tromey <tom@tromey.com>
2312 * configure: Rebuild.
2314 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2315 Pedro Alves <palves@redhat.com>
2317 * linux-aarch64-low.c (aarch64_stopped_data_address):
2320 2018-04-27 Tom Tromey <tom@tromey.com>
2322 * configure: Rebuild.
2324 2018-04-23 Tom Tromey <tom@tromey.com>
2326 * configure: Rebuild.
2328 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2330 * Makefile.in (depcomp): Add "..".
2331 (all_deps_files): New and use it.
2333 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2335 * configure.srv (aarch64*-*-linux*): Don't include xml.
2336 (i[34567]86-*-cygwin*): Likewise.
2337 (i[34567]86-*-linux*): Likewise.
2338 (i[34567]86-*-lynxos*): Likewise.
2339 (i[34567]86-*-mingw32ce*): Likewise.
2340 (i[34567]86-*-mingw*): Likewise.
2341 (i[34567]86-*-nto*): Likewise.
2342 (tic6x-*-uclinux): Likewise.
2343 (x86_64-*-linux*): Likewise.
2344 (x86_64-*-mingw*): Likewise.
2345 (x86_64-*-cygwin*): Likewise.
2347 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2349 * tdesc.c: Remove xml parameter.
2351 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2353 * server.c (get_features_xml): Remove cast.
2354 * tdesc.c (void target_desc::accept): Fill in function.
2355 (tdesc_get_features_xml): Remove old xml creation.
2356 (print_xml_feature::visit_pre): Add xml vistor.
2357 * tdesc.h (struct target_desc): Make xmltarget mutable.
2358 (tdesc_get_features_xml): Remove declaration.
2360 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2362 * tdesc.c (tdesc_architecture_name): Add new function.
2363 (tdesc_osabi_name): Likewise.
2364 (tdesc_get_features_xml): Use new functions.
2366 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2368 * tdesc.c (tdesc_create_flags): Remove.
2369 (tdesc_add_flag): Likewise.
2370 (tdesc_named_type): Likewise.
2371 (tdesc_create_union): Likewise.
2372 (tdesc_create_struct): Likewise.
2373 (tdesc_create_vector): Likewise.
2374 (tdesc_add_bitfield): Likewise.
2375 (tdesc_add_field): Likewise.
2376 (tdesc_set_struct_size): Likewise.
2378 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2380 * tdesc.c (~target_desc): Remove implictly deleted items.
2381 (init_target_desc): Iterate all features.
2382 (tdesc_get_features_xml): Use vector.
2383 (tdesc_create_feature): Create feature.
2384 * tdesc.h (tdesc_feature) Remove
2385 (target_desc): Add features.
2387 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2389 * Makefile.in: Add common/tdesc.c
2390 * tdesc.c (init_target_desc): init all reg_defs from register
2392 (tdesc_create_reg): Create tdesc_reg.
2393 * tdesc.h (tdesc_feature): Add register vector.
2395 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2397 * tdesc.h (struct target_desc) <features>: Change type to
2398 std::vector<std::string>.
2399 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2401 (tdesc_get_features_xml): Likewise.
2402 (tdesc_create_feature): Likewise.
2404 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2406 * regcache.c (find_register_by_number): Return a ref.
2407 (find_regno): Use references.
2408 (register_size): Likewise.
2409 (register_data): Likewise.
2410 * tdesc.c (target_desc::~target_desc): Remove free calls.
2411 (target_desc::operator==): Use std::vector compare.
2412 (init_target_desc): Use reference.
2413 (tdesc_create_reg): Use reg constructors.
2414 * tdesc.h (struct target_desc): Replace pointer with object.
2416 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2418 * regcache.c (find_register_by_number): Make static.
2419 (find_regno): Use find_register_by_number
2420 * regcache.h (struct reg): Remove declaration.
2422 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2424 * tdesc.c (target_desc::~target_desc): Move to here.
2425 (target_desc::operator==): Likewise.
2426 * tdesc.h (target_desc::~target_desc): Move from here.
2427 (target_desc::operator==): Likewise.
2429 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2431 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2433 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2435 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2437 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2438 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2439 and init_registers_s390_gs_linux64.
2441 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2443 * linux-s390-low.c (s390_fill_gs): Remove function.
2444 (s390_fill_gsbc): Remove function.
2445 (s390_regsets): Set fill functions for the guarded storage regsets
2448 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2450 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2451 the word size. Add comment.
2452 (s390_get_wordsize): New function.
2453 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2454 pswm with it. Instead, use s390_get_wordsize to determine the
2455 word size first and derive the correct tdesc from that directly.
2457 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2459 * Makefile.in: Include silent-rules.mk.
2460 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2461 (COMPILE): Add ECHO_CXX.
2462 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2463 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2464 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2465 (version-generated.c): Add ECHO_GEN.
2466 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2467 (IPAGENT_COMPILE): Add ECHO_CXX.
2468 (%-generated.c): Add ECHO_REGDAT.
2470 2018-03-14 Tom Tromey <tom@tromey.com>
2473 * ax.c (ax_printf): Special case for NULL.
2475 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2477 * linux-low.c (linux_qxfer_libraries_svr4): Use
2478 xml_escape_text_append.
2480 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2482 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2484 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2486 * server.c (handle_general_set): Remove unnecessary xstrdup.
2488 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2490 * server.c (parse_debug_format_options): Adjust to
2491 delim_string_to_char_ptr_vec changes.
2492 * thread-db.c (thread_db_load_search): Adjust to
2493 dirnames_to_char_ptr_vec changes.
2495 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2497 * target.h (target_enable_btrace, target_disable_btrace)
2498 (target_read_btrace, target_read_btrace_conf): Turn macro into
2499 inline function. Throw error if target method is not defined.
2500 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2501 check for btrace target method. Be prepared to handle exceptions
2502 from btrace target methods.
2504 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2506 * server.c (captured_main): Change order of error message printed
2507 when the current working directory cannot be found.
2509 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2511 * server.c: Include "filenames.h" and "pathstuff.h".
2512 (program_name): Delete variable.
2513 (program_path): New anonymous class.
2514 (get_exec_wrapper): Use "program_path" instead of
2516 (handle_v_run): Likewise.
2517 (captured_main): Likewise.
2518 (process_serial_event): Likewise.
2520 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2522 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2523 (OBJS): Add "pathstuff.o".
2524 * server.c (current_directory): New global variable.
2525 (captured_main): Initialize "current_directory".
2527 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2529 * tdesc.c: Use common/tdesc.h.
2530 * tdesc.h: Likewise.
2532 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2533 Simon Marchi <simon.marchi@ericsson.com>
2535 * Makefile.in: Switch order of make rules.
2537 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2539 * Makefile.in: Add common directory in build.
2540 * configure.ac: Add common reference.
2541 * configure: Regenerate.
2543 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2545 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
2546 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
2547 * spu-low.c (spu_target_ops): Likewise.
2548 * win32-low.c (win32_target_ops): Likewise.
2549 * server.c (supported_btrace_packets): Report packets unconditionally.
2550 * target.h (target_ops) <supports_btrace>: Remove.
2551 (target_supports_btrace): Remove.
2553 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
2555 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
2556 (handle_btrace_disable): Change return type to void. Use exceptions
2558 (handle_btrace_general_set): Catch exception and copy message to
2561 2018-02-08 Tom Tromey <tom@tromey.com>
2563 * linux-low.c (install_software_single_step_breakpoints): Use
2564 make_scoped_restore.
2565 * inferiors.c (make_cleanup_restore_current_thread): Remove.
2566 (do_restore_current_thread_cleanup): Remove.
2567 * gdbthread.h (make_cleanup_restore_current_thread): Don't
2570 2018-02-08 Tom Tromey <tom@tromey.com>
2572 * mem-break.c (set_raw_breakpoint_at): Use
2573 gdb::unique_xmalloc_ptr.
2575 2018-01-30 Pedro Alves <palves@redhat.com>
2578 * target.c (target_terminal::terminal_state): Rename to ...
2579 (target_terminal::m_terminal_state): ... this.
2581 2018-01-19 James Clarke <jrtc27@jrtc27.com>
2583 * linux-low.c (handle_extended_wait): Surround call to
2584 thread_db_notice_clone with #ifdef USE_THREAD_DB.
2586 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2588 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
2589 linux_ptrace_attach_fail_reason_string now returning an
2591 (linux_attach): Likewise.
2592 * thread-db.c (attach_thread): Likewise.
2594 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2597 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2598 checking for fs_base/gs_base fields in struct user_regs_struct.
2599 * configure: Regenerate.
2601 2018-01-16 Yao Qi <yao.qi@linaro.org>
2604 * linux-low.c (fetch_register): Call supply_register instead of
2607 2018-01-08 Yao Qi <yao.qi@linaro.org>
2608 Simon Marchi <simon.marchi@ericsson.com>
2610 * Makefile.in (OBS): Remove selftest.o.
2611 * configure.ac: Set srv_selftest_objs if $development is true.
2612 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
2613 * configure: Re-generated.
2614 * server.c (captured_main): Wrap variable selftest_filter with
2617 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2619 * server.c (parse_debug_format_options): Return std::string.
2620 (handle_monitor_command, captured_main): Adjust.
2622 2018-01-05 Pedro Alves <palves@redhat.com>
2625 * server.c (captured_main): Pass quiet=false to
2626 save_original_signals_state.
2628 2018-01-01 Joel Brobecker <brobecker@adacore.com>
2630 * gdbreplay.c (gdbreplay_version): Update copyright year in
2632 * server.c (gdbserver_version): Likewise.
2634 2017-12-08 Tom Tromey <tom@tromey.com>
2636 * ax.c (ax_printf): Update.
2638 2017-12-07 Yao Qi <yao.qi@linaro.org>
2640 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
2641 aarch64_linux_read_description.
2642 * linux-amd64-ipa.c (idx2mask): New array.
2643 (get_ipa_tdesc): Move idx2mask out.
2644 (initialize_low_tracepoint): Initialize target descriptions.
2645 * linux-i386-ipa.c (idx2mask): New array.
2646 (get_ipa_tdesc): Move idx2mask out.
2647 (initialize_low_tracepoint): Initialize target descriptions.
2649 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2651 * tdesc.c (struct tdesc_type): Change return type.
2652 (tdesc_add_flag): Change parameter type.
2653 (tdesc_add_bitfield): Likewise.
2654 (tdesc_add_field): Likewise.
2655 (tdesc_set_struct_size): Likewise.
2657 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
2659 * regcache.c (registers_to_string): Remove unused variable.
2661 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2663 * inferiors.c (for_each_inferior_with_data): Remove.
2664 * inferiors.h (for_each_inferior_with_data): Remove.
2665 * server.c (handle_qxfer_threads_worker): Change parameter type.
2666 (handle_qxfer_threads_proper): Use for_each_thread.
2668 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2670 * inferiors.c (for_each_inferior): Remove.
2671 (clear_inferiors): Use for_each_thread.
2672 * inferiors.h (for_each_inferior): Remove.
2673 * linux-low.c (linux_wait_for_event_filtered): Use
2675 (linux_stabilize_threads): Likewise.
2676 * regcache.c (regcache_release): Likewise.
2677 * server.c (gdb_wants_all_threads_stopped): Likewise.
2678 (clear_pending_status_callback): Remove.
2679 (handle_status): Use for_each_thread.
2680 (captured_main): Likewise.
2681 * win32-low.c (child_init_thread_list): Likewise.
2682 (win32_clear_inferiors): Likewise.
2683 (fake_breakpoint_event): Likewise.
2685 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2687 * inferiors.h (find_inferior): Remove.
2688 * inferiors.c (find_inferior): Remove.
2690 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2692 * linux-low.c (resume_status_pending_p): Update comment.
2693 (need_step_over_p): Update comment.
2695 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2697 * linux-low.c (proceed_one_lwp): Return void, change parameter
2699 (unsuspend_and_proceed_one_lwp): Likewise.
2700 (proceed_all_lwps): Use for_each_thread.
2701 (unstop_all_lwps): Likewise.
2703 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2705 * linux-low.c (linux_resume_one_thread): Return void, take
2707 (linux_resume): Use for_each_thread.
2709 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2711 * linux-low.c (send_sigstop_callback): Return void, change
2712 parameter type. Rename to...
2713 (send_sigstop): ... this.
2714 (suspend_and_send_sigstop_callback): Return void, change parameter
2716 (suspend_and_send_sigstop): ... this.
2717 (stop_all_lwps): Use for_each_thread.
2719 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2721 * linux-low.c (lwp_running): Return bool, remove unused
2723 (linux_stabilize_threads): Use find_thread.
2725 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2727 * linux-low.c (select_singlestep_lwp_callback): Remove.
2728 (count_events_callback): Remove.
2729 (select_event_lwp_callback): Remove.
2730 (select_event_lwp): Use find_thread/for_each_thread.
2732 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2734 * linux-low.c (not_stopped_callback): Return bool, take filter
2736 (linux_wait_for_event_filtered): Use find_thread.
2737 (linux_wait_1): Likewise.
2739 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2741 * linux-low.c (same_lwp): Remove.
2742 (find_lwp_pid): Use find_thread.
2744 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2746 * linux-low.c (delete_lwp_callback): Remove.
2747 (linux_mourn): Use for_each_thread.
2749 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2751 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2752 args parameter, don't check for pid.
2753 (linux_detach): Use for_each_thread.
2755 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2757 * linux-low.c (struct counter): Remove.
2758 (second_thread_of_pid_p): Remove.
2759 (last_thread_of_process_p): Use find_thread.
2761 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2763 * inferiors.c (find_inferior_in_random): Remove.
2764 * inferiors.h (find_inferior_in_random): Remove.
2765 * linux-low.c (status_pending_p_callback): Return bool, accept
2766 parameter ptid directly.
2767 (linux_wait_for_event_filtered): Use find_thread_in_random.
2768 (linux_wait_1): Likewise.
2770 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2772 * inferiors.c (find_inferior_id): Remove.
2773 (find_thread_ptid): Move implemention from find_inferior_id to
2775 * inferiors.h (find_inferior_id): Remove.
2776 * server.c (handle_status): Use find_thread_ptid.
2777 (process_serial_event): Likewise.
2778 * thread-db.c (find_one_thread): Likewise.
2779 (thread_db_thread_handle): Likewise.
2780 * win32-low.c (thread_rec): Likewise.
2781 (child_delete_thread): Likewise.
2782 (win32_thread_alive): Likewise.
2783 (get_child_debug_event): Likewise.
2785 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2787 * linux-mips-low.c (update_watch_registers_callback): Return
2788 void, remove pid_p parameter, don't check for pid.
2789 (mips_insert_point, mips_remove_point): Use for_each_thread.
2791 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2793 * lynx.low (lynx_delete_thread_callback): Remove.
2794 (lynx_mourn): Use for_each_thread.
2796 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2798 * regcache.c (regcache_invalidate_one): Remove.
2799 (regcache_invalidate_pid): use for_each_thread.
2801 2017-11-26 Tom Tromey <tom@tromey.com>
2803 * linux-low.c (linux_create_inferior): Update.
2805 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2807 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2809 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2811 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2812 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2813 * linux-aarch64-tdesc-selftest.c: New file.
2814 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2816 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2818 * configure.srv: Add new file.
2819 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2820 * linux-aarch64-tdesc-selftest.c: New file.
2821 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2823 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2825 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2826 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2827 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2829 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2831 * configure.srv: Add new files.
2832 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2833 aarch64_linux_read_description.
2834 * linux-aarch64-low.c (aarch64_linux_read_description):
2835 Merge with aarch64_arch_setup.
2836 (aarch64_arch_setup): Call aarch64_linux_read_description.
2837 * linux-aarch64-tdesc.c: New file.
2838 * linux-aarch64-tdesc.h: New file.
2840 2017-11-24 Yao Qi <yao.qi@linaro.org>
2842 * configure.srv: Set $srv_regobj for tic6x-linux.
2843 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2844 (tic6x_read_description): Move some code to tic6x_arch_setup.
2845 (tic6x_tdesc_test): New function.
2846 (initialize_low_arch): Call selftests::register_test.
2848 2017-11-22 Yao Qi <yao.qi@linaro.org>
2850 * remote-utils.c (prepare_resume_reply): Use memcpy.
2852 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2854 * linux-low.c (kill_one_lwp_callback): Return void, take
2855 argument directly, don't filter on pid.
2856 (linux_kill): Use for_each_thread.
2858 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2860 * linux-low.c (need_step_over_p): Return bool, remove dummy
2862 (linux_resume, proceed_all_lwps): Use find_thread.
2864 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2866 * linux-low.c (resume_status_pending_p): Return bool, remove
2868 (linux_resume): Use find_thread.
2870 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2872 * linux-low.c (struct thread_resume_array): Remove.
2873 (linux_set_resume_request): Return void, take arguments
2875 (linux_resume): Use for_each_thread.
2877 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2879 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2880 return bool, remove data argument.
2881 (linux_stabilize_threads): Use find_thread.
2883 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2885 * linux-low.c (unsuspend_one_lwp): Remove.
2886 (unsuspend_all_lwps): Use for_each_thread, inline code from
2889 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2891 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2892 * linux-low.c (struct iterate_over_lwps_args): Remove.
2893 (iterate_over_lwps_filter): Remove.
2894 (iterate_over_lwps): Use find_thread.
2896 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2898 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2899 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2900 code from reset_lwp_ptrace_options_callback.
2902 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2904 * linux-arm-low.c (struct update_registers_data): Remove.
2905 (update_registers_callback): Return void, take arguments
2906 directly, don't check thread's pid.
2907 (arm_insert_point, arm_remove_point): Use for_each_thread.
2909 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2911 * win32-low.c (continue_one_thread): Return void, take argument
2913 (child_continue): Use for_each_thread.
2915 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2917 * win32-i386-low.c (update_debug_registers_callback): Rename
2919 (update_debug_registers): ... this, return void, remove pid_p arg.
2920 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2922 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2924 * inferiors.h (struct process_info): Add constructor, initialize
2926 <syscalls_to_catch>: Change type to std::vector<int>.
2927 * inferiors.c (add_process): Allocate process_info with new.
2928 (remove_process): Free process_info with delete.
2929 * linux-low.c (handle_extended_wait): Adjust.
2930 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2931 * server.c (handle_general_set): Adjust.
2933 2017-11-16 Pedro Alves <palves@redhat.com>
2935 * remote-utils.c (remote_close): Block SIGIO signals instead of
2936 uninstalling the SIGIO handler.
2938 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2940 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2942 2017-11-16 Yao Qi <yao.qi@linaro.org>
2944 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2945 (tic6x_store_gregset): Likewise.
2946 (tic6x_usrregs_info): Move it up.
2948 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2950 * Makefile.in: Update arch rules.
2951 * configure.srv: Explicitly mark arch/ files.
2953 2017-11-13 Andreas Schwab <schwab@suse.de>
2955 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2957 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2959 2017-11-06 Pedro Alves <palves@redhat.com>
2961 * config.in, configure: Regenerate.
2963 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2965 * target.c (struct thread_search): Remove.
2966 (thread_search_callback): Remove.
2967 (prepare_to_access_memory): Use for_each_thread instead of
2968 find_inferior. Inline code from thread_search_callback.
2970 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2972 * server.c (struct visit_actioned_threads_data): Remove.
2973 (visit_actioned_threads): Change prototype to take arguments
2975 (resume): Use find_thread instead of find_inferior.
2977 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2979 * server.c (queue_stop_reply_callback): Change prototype, return
2981 (find_status_pending_thread_callback): Remove.
2982 (handle_status): Replace find_inferior with find_thread and
2985 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2987 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2989 (aarch64_store_gregset): Likewise.
2990 (aarch64_fill_fpregset): Likewise.
2991 (aarch64_store_fpregset): Likewise.
2993 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2995 * gdbthread.h (find_thread, for_each_thread): New functions.
2996 * inferiors.c (thread_of_pid): Remove.
2997 (find_any_thread_of_pid): Use find_thread.
2998 * linux-low.c (num_lwps): Use for_each_thread.
3000 2017-10-17 Yao Qi <yao.qi@linaro.org>
3002 * Makefile.in: Remove one rule.
3003 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3005 2017-10-17 Yao Qi <yao.qi@linaro.org>
3007 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3008 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3010 2017-10-17 Yao Qi <yao.qi@linaro.org>
3012 * configure.srv: Rename arm.o with arch/arm.o.
3014 2017-10-17 Yao Qi <yao.qi@linaro.org>
3016 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3017 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3018 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3019 (arch-i386.o, arch-amd64.o): Remove rules.
3020 (arch/%.o): New rule.
3021 Update POSTCOMPILE and COMPILE.pre.
3022 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3023 * configure: Re-generated.
3024 * configure.srv: Replace arch-i386.o with arch/i386.o.
3025 Replace arch-amd64.o with arch/amd64.o.
3027 2017-10-16 Yao Qi <yao.qi@linaro.org>
3029 * configure: Regenerated.
3031 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3033 * inferiors.h: (struct inferior_list): Remove.
3034 (struct inferior_list_entry); Remove.
3035 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3036 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3037 get_first_inferior): Remove.
3038 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3039 find_inferior_id, find_inferior_in_random): Change signature.
3040 * inferiors.c (all_threads): Change type to
3041 std::list<thread_info *>.
3042 (get_thread): Remove macro.
3043 (find_inferior, find_inferior_id): Change signature, implement
3045 (find_inferior_in_random): Change signature, implement using
3046 find_thread_in_random.
3047 (for_each_inferior, for_each_inferior_with_data): Change
3048 signature, implement using for_each_thread.
3049 (add_inferior_to_list, remove_inferior): Remove.
3050 (add_thread, get_first_thread, thread_of_pid,
3051 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3052 (get_first_inferior, one_inferior_p, clear_inferior_list):
3054 (clear_inferiors, get_thread_process): Update.
3055 * gdbthread.h: Include <list>.
3056 (struct thread_info) <entry>: Remove field.
3058 (all_threads): Change type to std::list<thread_info *>.
3059 (get_first_inferior): Add doc.
3060 (find_thread, for_each_thread, find_thread_in_random): New
3062 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3063 * linux-arm-low.c (update_registers_callback): Update.
3064 * linux-low.c (second_thread_of_pid_p): Update.
3065 (kill_one_lwp_callback, linux_detach_lwp_callback,
3066 delete_lwp_callback, status_pending_p_callback, same_lwp,
3067 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3068 iterate_over_lwps, not_stopped_callback,
3069 resume_stopped_resumed_lwps, count_events_callback,
3070 select_singlestep_lwp_callback, select_event_lwp_callback,
3071 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3072 suspend_and_send_sigstop_callback, wait_for_sigstop,
3073 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3074 lwp_running, linux_set_resume_request, resume_status_pending_p,
3075 need_step_over_p, start_step_over, linux_resume_one_thread,
3076 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3077 reset_lwp_ptrace_options_callback): Update.
3078 * linux-mips-low.c (update_watch_registers_callback): Update.
3079 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3081 (free_register_cache_thread_one): Remove.
3082 (regcache_release): Update.
3083 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3084 handle_qxfer_threads_worker): Update.
3085 (handle_query): Update, use list iterator.
3086 (visit_actioned_threads, handle_pending_status,
3087 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3088 clear_pending_status_callback, set_pending_status_callback,
3089 find_status_pending_thread_callback, handle_status,
3090 process_serial_event): Update.
3091 * target.c (thread_search_callback): Update.
3092 * thread-db.c (thread_db_get_tls_address): Update.
3093 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3095 * win32-i386-low.c (update_debug_registers_callback): Update.
3096 * win32-low.c (delete_thread_info, child_delete_thread,
3097 continue_one_thread, suspend_one_thread,
3098 get_child_debug_event): Adjust.
3100 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3102 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3103 * inferiors.h: Include <list>.
3104 (struct process_info) <entry>: Remove field.
3106 (pid_of): Change macro to function.
3107 (ptid_of, lwpid_of): Remove macro.
3108 (all_processes): Change type to std::list<process_info *>.
3109 (ALL_PROCESSES): Remove macro.
3110 (for_each_process, find_process): New function.
3111 * inferiors.c (all_processes): Change type to
3112 std::list<process_info *>.
3113 (find_thread_process): Adjust.
3114 (add_process): Likewise.
3115 (remove_process): Likewise.
3116 (find_process_pid): Likewise.
3117 (get_first_process): Likewise.
3118 (started_inferior_callback): Remove.
3119 (have_started_inferiors_p): Adjust.
3120 (attached_inferior_callback): Remove.
3121 (have_attached_inferiors_p): Adjust.
3122 * linux-low.c (check_zombie_leaders): Likewise.
3123 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3124 (x86_linux_update_xmltarget): Adjust.
3125 * server.c (handle_query): Likewise.
3126 (gdb_reattached_process): Remove.
3127 (handle_status): Adjust.
3128 (kill_inferior_callback): Likewise.
3129 (detach_or_kill_inferior): Remove.
3130 (print_started_pid): Likewise.
3131 (print_attached_pid): Likewise.
3132 (detach_or_kill_for_exit): Update.
3133 (process_serial_event): Likewise.
3134 * linux-arm-low.c (arm_new_fork): Likewise.
3136 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3138 * dll.h: Include <list>.
3139 (struct dll_info): Add constructor.
3140 <entry>: Remove field.
3141 (all_dlls): Change type to std::list<dll_info>.
3142 * dll.c: Include <algorithm>.
3143 (get_dll): Remove macro.
3144 (all_dlls): Change type to std::list<dll_info *>.
3145 (free_one_dll): Remove.
3146 (match_dll): Likewise.
3147 (loaded_dll): Adjust.
3148 (unloaded_dll): Adjust to all_dlls type change, use
3149 std::find_if. Inline code from match_dll.
3150 (clear_dlls): Adjust to all_dlls type change.
3151 * server.c (emit_dll_description): Remove.
3152 (handle_qxfer_libraries): Adjust to all_dlls type change,
3153 integrate emit_dll_description's functionality.
3155 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3157 * linux-low.h (struct linux_target_ops) <delete_process>: New
3159 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3160 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3161 (struct linux_target_ops): Add delete_process callback.
3162 * linux-arm-low.c (arm_delete_process): New.
3163 (struct linux_target_ops): Add delete_process callback.
3164 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3165 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3166 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3167 * linux-mips-low.c (mips_linux_delete_process): New.
3168 (struct linux_target_ops): Add delete_process callback.
3169 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3170 * linux-s390-low.c (struct linux_target_ops): Likewise.
3171 * linux-sh-low.c (struct linux_target_ops): Likewise.
3172 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3173 * linux-tile-low.c (struct linux_target_ops): Likewise.
3174 * linux-x86-low.c (x86_linux_delete_process): New.
3175 (struct linux_target_ops): Add delete_process callback.
3176 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3178 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3180 * linux-aarch64-low.c (the_low_target): Add thread delete
3182 * linux-arm-low.c (arm_delete_thread): New function.
3183 (the_low_target): Add thread delete callback.
3184 * linux-bfin-low.c (the_low_target): Likewise.
3185 * linux-crisv32-low.c (the_low_target): Likewise.
3186 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3188 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3190 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3191 * linux-mips-low.c (mips_linux_delete_thread): New function.
3192 (the_low_target): Add thread delete callback.
3193 * linux-ppc-low.c (the_low_target): Likewise.
3194 * linux-s390-low.c (the_low_target): Likewise.
3195 * linux-sh-low.c (the_low_target): Likewise.
3196 * linux-tic6x-low.c (the_low_target): Likewise.
3197 * linux-tile-low.c (the_low_target): Likewise.
3198 * linux-x86-low.c (the_low_target): Likewise.
3199 * linux-xtensa-low.c (the_low_target): Likewise.
3201 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3203 * win32-low.c: Include "common-inferior.h".
3205 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3207 * inferiors.c (set_inferior_cwd): New function.
3208 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3209 (handle_query): Inform that QSetWorkingDir is supported.
3210 * win32-low.c (create_process): Pass the inferior's cwd to
3213 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3215 * inferiors.c (current_inferior_cwd): New global variable.
3216 (get_inferior_cwd): New function.
3217 * inferiors.h (struct process_info) <cwd>: New field.
3219 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3221 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3222 (OBS): Add gdb_tilde_expand.o.
3224 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3226 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3227 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3229 2017-09-29 Pedro Alves <palves@redhat.com>
3231 * ax.c (gdb_parse_agent_expr): Constify.
3232 * ax.h (gdb_parse_agent_expr): Constify.
3233 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3235 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3236 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3237 * remote-utils.h (read_ptid): Constify.
3238 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3239 (process_point_options, process_serial_event): Constify.
3240 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3241 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3242 (cmd_qtbuffer): Constify.
3244 2017-09-29 Pedro Alves <palves@redhat.com>
3246 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3249 2017-09-29 Pedro Alves <palves@redhat.com>
3251 * linux-low.c (handle_extended_wait): Pass parent thread instead
3252 of process to thread_db_notice_clone.
3253 * linux-low.h (thread_db_notice_clone): Replace parent process
3254 parameter with parent thread parameter.
3255 * thread-db.c (find_one_thread): Add comment.
3256 (thread_db_notice_clone): Replace parent process parameter with
3257 parent thread parameter. Temporarily switch to the parent thread.
3259 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3261 * gdbthread.h: Include "common-gdbthread.h".
3262 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3263 "if" when validating the ptid.
3264 * remote-utils.c: Include "gdbthread.h".
3265 (prepare_resume_reply): Use "switch_to_thread".
3266 * target.c (done_accessing_memory): Likewise.
3268 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3270 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3271 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3272 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3273 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3274 s390x-gs-linux64-ipa.o to ipa_obj.
3275 * linux-s390-low.c (HWCAP_S390_GS): New define.
3276 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3278 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3279 (s390_arch_setup): Check for guarded-storage support and choose
3281 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3282 init_registers_s390x_gs_linux64.
3283 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3285 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3286 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3288 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3290 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3292 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3294 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3295 (thread_db_thread_handle): Declare.
3296 * linux-low.c (linux_target_ops): Initialize thread_handle.
3297 * server.c (handle_qxfer_threads_worker): Add support for
3299 * target.h (struct target_ops): Add new function pointer,
3301 (target_thread_handle): Define.
3302 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3304 (thread_db_thread_handle): New function.
3306 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3308 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3309 * linux-low.h (thread_db_notice_clone): Declare.
3310 * thread-db.c (thread_db_notice_clone): New function.
3312 2017-09-21 Pedro Alves <palves@redhat.com>
3314 * server.c (gdb_read_memory, handle_status, process_serial_event)
3315 (handle_serial_event, handle_target_event): Adjust to
3316 set_desired_thread prototype change.
3317 * target.c (set_desired_thread): Remove 'use_general' parameter
3319 * target.h (set_desired_thread): Remove 'use_general' parameter.
3321 2017-09-20 Tom Tromey <tom@tromey.com>
3323 * target.c (target_terminal::terminal_state): Define.
3324 (target_terminal::init): Rename from target_terminal_init.
3325 (target_terminal::inferior): Rename from
3326 target_terminal_inferior.
3327 (target_terminal::ours): Rename from target_terminal_ours.
3328 (target_terminal::ours_for_output, target_terminal::info): New.
3330 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3332 * server.c (accumulate_file_name_length): Remove.
3333 (emit_dll_description): Adjust to std::string change.
3334 (handle_qxfer_libraries): Use std::string to hold document.
3336 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3338 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3339 return type of xml_escape_text.
3340 * server.c (emit_dll_description): Likewise.
3342 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3344 * server.c (captured_main): Accept argument for --selftest.
3345 Update run_tests call.
3346 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3347 when registering selftests.
3349 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3351 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3352 instead of "VEC" for "target_desc.reg_defs".
3353 (regcache_cpy): Likewise.
3354 (registers_to_string): Likewise.
3355 (registers_from_string): Likewise.
3356 (find_regno): Likewise.
3357 (supply_regblock): Likewise.
3358 (regcache_raw_read_unsigned): Likewise.
3359 * tdesc.c (init_target_desc): Likewise.
3360 (tdesc_create_reg): Likewise.
3361 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3362 (struct target_desc) <reg_defs>: Convert to "std::vector".
3363 (target_desc): Do not initialize "reg_defs".
3364 (~target_desc): Update code to use "std::vector" instead of "VEC"
3365 for "target_desc.reg_defs".
3366 (operator==): Likewise.
3368 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3370 * inferiors.h (thread_to_gdb_id): Remove.
3371 * inferiors.c (thread_to_gdb_id): Remove.
3372 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3373 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3374 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3376 * nto-low.c (nto_fetch_registers, nto_store_registers,
3377 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3379 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3381 * inferiors.h (gdb_id_to_thread_id): Remove.
3382 * inferiors.c (gdb_id_to_thread_id): Remove.
3383 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3384 removal. Move pid declaration closer to where it's used.
3386 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3388 * server.c (handle_detach): New function.
3389 (process_serial_event): Move code out, call handle_detach.
3391 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3393 * server.c (require_running): Rename to ...
3394 (require_running_or_return): ... this ...
3395 (require_running_or_break): ... and this.
3396 (handle_query, process_serial_event): Adjust.
3398 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3400 * linux-low.c (linux_set_resume_request): Remove unused
3403 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3405 * server.c (first_thread_of): Remove.
3406 (process_serial_event): Replace usage of first_thread_of with
3407 find_any_thread_of_pid.
3408 * tracepoint.c (same_process_p): Remove.
3409 (gdb_agent_about_to_close): Replace usage of same_process_p with
3410 find_any_thread_of_pid.
3411 * linux-x86-low.c (same_process_callback): Remove.
3412 (x86_arch_setup_process_callback): Replace usage of
3413 same_process_callback with find_any_thread_of_pid.
3414 * thread-db.c (any_thread_of): Remove.
3415 (switch_to_process): Replace usage of any_thread_of with
3416 find_any_thread_of_pid.
3417 * inferiors.c (thread_pid_matches_callback): Remove.
3418 (find_thread_process): Adjust to use find_any_thread_of_pid.
3420 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3422 * regcache.c (get_thread_regcache): Guard calls to "memset"
3425 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3427 * linux-low.c (handle_extended_wait): Use
3428 "allocate_target_description" instead of "XNEW".
3429 * linux-x86-low.c (initialize_low_arch): Likewise.
3431 2017-09-05 Yao Qi <yao.qi@linaro.org>
3433 * configure.srv (srv_i386_regobj): Remove.
3434 (srv_amd64_regobj): Remove.
3435 (srv_regobj): Set it to "" for x86 non-linux targets.
3436 * linux-x86-tdesc.c (i386_linux_read_description):
3437 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3438 (init_registers_i386): Remove the declaration.
3439 (tdesc_i386): Remove the declaration.
3440 (lynx_i386_arch_setup): Call i386_create_target_description.
3441 * nto-x86-low.c: Likewise.
3442 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3443 [!__x86_64__]: include arch/i386.h.
3444 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3446 2017-09-05 Yao Qi <yao.qi@linaro.org>
3448 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3449 i386/amd64-XXX-linux from it.
3451 2017-09-05 Yao Qi <yao.qi@linaro.org>
3453 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3455 (ipa_amd64_linux_regobj): Remove.
3456 (ipa_x32_linux_regobj): Remove.
3458 2017-09-05 Yao Qi <yao.qi@linaro.org>
3460 * Makefile.in (arch-amd64.o): New rule.
3461 * configure.srv: Append arch-amd64.o.
3462 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3463 (get_ipa_tdesc): Call amd64_linux_read_description.
3464 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3465 and init_registers_amd64_XXX.
3466 * linux-x86-low.c (x86_linux_read_description): Call
3467 amd64_linux_read_description.
3468 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3469 (initialize_low_arch): Don't call init_registers_x32_XXX and
3470 init_registers_amd64_XXX.
3471 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3472 and tdesc_amd64_XXX.
3473 [__x86_64__] (amd64_tdesc_test): New function.
3474 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3475 and init_registers_amd64_XXX.
3476 * linux-x86-tdesc.c: Include arch/amd64.h.
3477 (xcr0_to_tdesc_idx): New function.
3478 (i386_linux_read_description): New function.
3479 (amd64_get_ipa_tdesc_idx): New function.
3480 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3481 (amd64_get_ipa_tdesc): Declare.
3483 2017-09-05 Yao Qi <yao.qi@linaro.org>
3485 * configure.srv (srv_i386_linux_xmlfiles): Remove
3486 i386/i386-XXX-linux.xml from it.
3488 2017-09-05 Yao Qi <yao.qi@linaro.org>
3490 * configure.srv: Set srv_i386_linux_regobj empty if $development
3492 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3493 initialize_low_tdesc.
3494 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3495 with #if initialize_low_tdesc.
3496 * linux-x86-tdesc-selftest.c: New file.
3497 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3499 2017-09-05 Yao Qi <yao.qi@linaro.org>
3501 * Makefile.in (arch-i386.o): New rule.
3502 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3503 (x86_64-*-linux*): Likewise.
3504 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3505 include arch/i386.h.
3506 (i386_linux_read_description): Remove code and call
3507 i386_create_target_description.
3508 * tdesc.c (allocate_target_description): New function.
3509 * tdesc.h (set_tdesc_architecture): Remove declaration.
3510 (set_tdesc_osabi): Likewise.
3512 2017-09-05 Yao Qi <yao.qi@linaro.org>
3514 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3515 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3516 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3518 * server.c (get_features_xml): Call tdesc_get_features_xml.
3519 * tdesc.c (set_tdesc_architecture): New function.
3520 (set_tdesc_osabi): New function.
3521 (tdesc_get_features_xml): New function.
3522 (tdesc_create_feature): Add an argument.
3523 * tdesc.h (struct target_desc) <features>: New field.
3524 <arch, osabi>: New field.
3525 (~target_desc): xfree features, arch, and osabi.
3526 (target_desc::oerator==): Don't compare .xmltarget.
3527 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3528 (set_tdesc_osabi): Likewise.
3529 (tdesc_get_features_xml): Likewise.
3531 2017-09-05 Yao Qi <yao.qi@linaro.org>
3533 * linux-x86-tdesc.c: Include selftest.h.
3534 (i386_tdesc_test): New function.
3535 (initialize_low_tdesc): Call selftests::register_test.
3536 * tdesc.h: Include regdef.h.
3537 (target_desc): Override operator == and !=.
3539 2017-09-05 Yao Qi <yao.qi@linaro.org>
3541 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
3542 (ipa_obj): Likewise.
3543 * linux-i386-ipa.c: Include common/x86-xstate.h
3544 (get_ipa_tdesc): Call i386_linux_read_description.
3545 (initialize_low_tracepoint): Don't call init_registers_XXX
3546 functions, call initialize_low_tdesc instead.
3547 * linux-x86-low.c (x86_linux_read_description): Call
3548 i386_linux_read_description.
3549 (initialize_low_arch): Don't call init_registers_i386_XXX
3550 functions, call initialize_low_tdesc.
3551 * linux-x86-tdesc.c: New file.
3552 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
3553 (i386_get_ipa_tdesc_idx): Declare.
3554 (i386_get_ipa_tdesc): Declare.
3555 (initialize_low_tdesc): Declare.
3557 2017-09-05 Yao Qi <yao.qi@linaro.org>
3559 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
3562 2017-09-05 Yao Qi <yao.qi@linaro.org>
3564 * Makefile.in (IPA_OBJS): Add vec-ipa.o
3565 * regcache.c (get_thread_regcache): Use VEC_length.
3566 (init_register_cache): Likewise.
3567 (regcache_cpy): Likewise.
3568 (registers_to_string): Iterate reg_defs via VEC_iterate.
3569 (find_regno): Likewise.
3570 (find_register_by_number): Use VEC_index.
3571 (register_size): Call find_register_by_number.
3572 (register_data): Call find_register_by_number.
3573 (supply_regblock): Use VEC_length.
3574 (regcache_raw_read_unsigned): Likewise.
3575 * tdesc.c (init_target_desc): Iterate reg_defs via
3577 (default_description): Update initializer.
3578 (copy_target_description): Don't update field num_registers.
3579 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
3580 <num_registers>: Remove.
3582 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
3584 * Makefile.in (.SECONDARY): Define target.
3586 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
3588 * linux-low.c (linux_wait_1): Adjust.
3589 * server.c (queue_stop_reply_callback): Adjust.
3591 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
3593 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
3594 QEnvironmentUnset and QEnvironmentReset packets.
3595 (handle_query): Inform remote that QEnvironmentHexEncoded,
3596 QEnvironmentUnset and QEnvironmentReset are supported.
3598 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
3600 * inferiors.h (inferior_target_data): Rename to ...
3601 (thread_target_data): ... this.
3602 (inferior_regcache_data): Rename to ...
3603 (thread_regcache_data): ... this.
3604 (set_inferior_regcache_data): Rename to ...
3605 (set_thread_regcache_data): ... this.
3606 * inferiors.c (inferior_target_data): Rename to ...
3607 (thread_target_data): ... this.
3608 (inferior_regcache_data): Rename to ...
3609 (thread_regcache_data): ... this.
3610 (set_inferior_regcache_data): Rename to ...
3611 (set_thread_regcache_data): ... this.
3612 (free_one_thread): Update.
3613 * linux-low.h (get_thread_lwp): Update.
3614 * regcache.c (get_thread_regcache): Update.
3615 (regcache_invalidate_thread): Update.
3616 (free_register_cache_thread): Update.
3617 * win32-i386-low.c (update_debug_registers_callback): Update.
3618 (win32_get_current_dr): Update.
3619 * win32-low.c (thread_rec): Update.
3620 (delete_thread_info): Update.
3621 (continue_one_thread): Update.
3622 (suspend_one_thread): Update.
3624 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
3626 * inferiors.c (set_inferior_target_data): Remove.
3627 * inferiors.h (set_inferior_target_data): Remove.
3629 2017-08-18 Yao Qi <yao.qi@linaro.org>
3631 * Makefile.in (OBS): Add selftest.o.
3632 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
3633 * configure, config.in: Re-generated.
3634 * server.c: Include common/sefltest.h.
3635 (captured_main): Handle option --selftest.
3637 2017-08-09 Yao Qi <yao.qi@linaro.org>
3639 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
3640 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
3641 i386-avx-mpx.o and i386-mmx.o.
3642 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
3643 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
3644 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
3645 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
3646 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
3647 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
3648 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
3649 i386/amd64-avx-mpx.xml.
3651 2017-08-09 Yao Qi <yao.qi@linaro.org>
3653 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
3654 and x32-avx-avx512.o.
3655 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
3656 i386/x32-avx-avx512.xml.
3658 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
3660 * tracepoint.h (enum class fast_tpoint_collect_result): New
3662 (fast_tracepoint_collecting): Change return type to
3663 fast_tpoint_collect_result.
3664 * tracepoint.c (fast_tracepoint_collecting): Likewise.
3665 * linux-low.h: Include tracepoint.h.
3666 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
3667 fast_tpoint_collect_result.
3668 * linux-low.c (handle_tracepoints): Adjust.
3669 (linux_fast_tracepoint_collecting): Change return type to
3670 fast_tpoint_collect_result.
3671 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
3672 linux_wait_1, stuck_in_jump_pad_callback,
3673 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
3674 proceed_one_lwp): Adjust to type change.
3676 2017-07-10 Yao Qi <yao.qi@linaro.org>
3678 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
3680 2017-06-29 Yao Qi <yao.qi@linaro.org>
3682 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
3684 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
3686 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
3688 * Makefile.in (IPA_OBJS): Sort and format one item per line.
3690 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
3692 * linux-low.c (linux_create_inferior): Adjust code to access the
3693 environment information via 'gdb_environ' class.
3694 * lynx-low.c (lynx_create_inferior): Likewise.
3695 * server.c (our_environ): Make it an instance of 'gdb_environ'.
3696 (get_environ): Return a pointer to 'our_environ'.
3697 (captured_main): Initialize 'our_environ'.
3698 * server.h (get_environ): Adjust prototype.
3699 * spu-low.c (spu_create_inferior): Adjust code to access the
3700 environment information via 'gdb_environ' class.
3702 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3704 * linux-low.c (linux_read_memory, linux_write_memory): Remove
3705 usage of "register" keyword.
3707 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3709 * configure: Re-generate.
3711 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3713 * configure: Re-generate.
3715 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
3717 * Makefile.in (COMPILE.pre): Add "-x c++".
3719 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
3721 * fork-child.c: Conditionally include <signal.h>.
3723 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3725 * server.c (handle_general_set): Handle new packet
3726 "QStartupWithShell".
3727 (handle_query): Add "QStartupWithShell" to the list of supported
3729 (gdbserver_usage): Add help text explaining the
3730 new "--startup-with-shell" and "--no-startup-with-shell" CLI
3732 (captured_main): Recognize and act upon the presence of the new
3735 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3736 Pedro Alves <palves@redhat.com>
3738 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
3739 * configure: Regenerate.
3740 * configure.srv (srv_linux_obj): Add "fork-child.o" and
3742 (i[34567]86-*-lynxos*): Likewise.
3743 (spu*-*-*): Likewise.
3744 * fork-child.c: New file.
3745 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
3747 (linux_ptrace_fun): New function.
3748 (linux_create_inferior): Adjust function prototype to reflect
3749 change on "target.h". Adjust function code to use
3751 (linux_request_interrupt): Delete "signal_pid".
3752 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3753 (lynx_ptrace_fun): New function.
3754 (lynx_create_inferior): Adjust function prototype to reflect
3755 change on "target.h". Adjust function code to use
3757 * nto-low.c (nto_create_inferior): Adjust function prototype and
3758 code to reflect change on "target.h". Update comments.
3759 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3760 "common-terminal.h" and "environ.h".
3761 (terminal_fd): Moved to fork-child.c.
3762 (old_foreground_pgrp): Likewise.
3763 (restore_old_foreground_pgrp): Likewise.
3764 (last_status): Make it global.
3765 (last_ptid): Likewise.
3766 (our_environ): New variable.
3767 (startup_with_shell): Likewise.
3768 (program_name): Likewise.
3769 (program_argv): Rename to...
3770 (program_args): ...this.
3771 (wrapper_argv): New variable.
3772 (start_inferior): Delete function.
3773 (get_exec_wrapper): New function.
3774 (get_exec_file): Likewise.
3775 (get_environ): Likewise.
3776 (prefork_hook): Likewise.
3777 (post_fork_inferior): Likewise.
3778 (postfork_hook): Likewise.
3779 (postfork_child_hook): Likewise.
3780 (handle_v_run): Update code to deal with arguments coming from the
3781 remote host. Update calls from "start_inferior" to
3783 (captured_main): Likewise. Initialize environment variable. Call
3785 * server.h (post_fork_inferior): New prototype.
3786 (get_environ): Likewise.
3787 (last_status): Declare.
3788 (last_ptid): Likewise.
3789 (signal_pid): Likewise.
3790 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3791 (spu_ptrace_fun): New function.
3792 (spu_create_inferior): Adjust function prototype to reflect change
3793 on "target.h". Adjust function code to use "fork_inferior".
3794 * target.c (target_terminal_init): New function.
3795 (target_terminal_inferior): Likewise.
3796 (target_terminal_ours): Likewise.
3797 * target.h: Include <vector>.
3798 (struct target_ops) <create_inferior>: Update prototype.
3799 (create_inferior): Update macro.
3800 * utils.c (gdb_flush_out_err): New function.
3801 * win32-low.c (win32_create_inferior): Adjust function prototype
3802 and code to reflect change on "target.h".
3804 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3806 * inferiors.c (switch_to_thread): New function.
3808 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3810 * Makefile.in (SFILE): Add "common/job-control.c".
3811 (OBS): Add "job-control.o".
3813 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3815 * Makefile: Remove "@host_makefile_frag@".
3817 2017-05-05 Pedro Alves <palves@redhat.com>
3819 * configure: Regenerate.
3821 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3823 * configure: Regenerate.
3825 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3827 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3828 software_single_step change of return type to
3829 std::vector<CORE_ADDR>.
3830 * linux-low.c (install_software_single_step_breakpoints):
3832 * linux-low.h (install_software_single_step_breakpoints):
3835 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3837 * remote-utils.c: Include "gdb_termios.h" instead of
3839 * terminal.h: Delete file.
3841 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3843 * server.c: Include <vector>.
3844 <program_argv, wrapper_argv>: Convert to std::vector.
3845 (start_inferior): Rewrite function to use C++.
3846 (handle_v_run): Likewise. Update code that calculates the argv
3847 based on the vRun packet; use C++.
3848 (captured_main): Likewise.
3850 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3852 * server.c (handle_v_cont): Initialize thread_resume::thread
3855 2017-04-05 Pedro Alves <palves@redhat.com>
3857 * configure: Regenerate.
3859 2017-04-05 Pedro Alves <palves@redhat.com>
3861 * gdbreplay.c (sync_error): Constify.
3862 * linux-x86-low.c (push_opcode): Constify.
3864 2017-04-05 Pedro Alves <palves@redhat.com>
3866 * win32-low.c (get_child_debug_event)
3867 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3868 Report TARGET_WAITKIND_SPURIOUS instead.
3870 2017-04-05 Pedro Alves <palves@redhat.com>
3872 * remote-utils.c (remote_prepare, remote_open): Constify.
3873 * remote-utils.h (remote_prepare, remote_open): Constify.
3874 * server.c (captured_main): Constify 'port' handling.
3876 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3878 * Makefile.in (clean): Clear .deps.
3880 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3882 * .gitignore: Remove generated files, replace with wildcard.
3883 * (clean): Replace removal of generated files with wildcard.
3884 (version.c): Replace with...
3885 (version-generated.c): ...this.
3886 (xml-builtin.c): Replace with...
3887 (xml-builtin-generated.c): ...this.
3888 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3889 (%.c: *regformats*): Replace with...
3890 (%-generated.c: *regformats*): ...this.
3892 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3894 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3895 (xtensa_fill_gregset): Call collect_register_by_name for
3897 (xtensa_store_gregset): Call supply_register_by_name for
3900 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3902 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3903 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3904 (xtensa_store_gregset): Call supply_register for all registers in
3905 a0_regnum..a0_regnum + C0_NREGS range.
3907 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3909 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3910 (ax-ipa.o: ax.c): Remove.
3911 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3912 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3913 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3914 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3915 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3917 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3919 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3920 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3921 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3922 (errors-ipa.o: ../common/errors.c): Remove.
3923 (format-ipa.o: ../common/format.c): Remove.
3924 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3926 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3928 * Makefile.in (%-ipa.o: %.c): New rule.
3929 (tracepoint-ipa.o: tracepoint.c): Remove.
3930 (utils-ipa.o: utils.c): Remove.
3931 (remote-utils-ipa.o: remote-utils.c): Remove.
3932 (regcache-ipa.o: regcache.c): Remove.
3933 (i386-linux-ipa.o: i386-linux.c): Remove.
3934 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3935 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3936 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3937 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3938 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3939 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3940 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3941 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3942 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3943 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3944 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3945 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3946 (aarch64-ipa.o: aarch64.c): Remove.
3947 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3948 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3949 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3950 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3951 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3952 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3953 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3954 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3955 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3956 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3957 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3958 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3959 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3960 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3961 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3962 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3963 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3964 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3965 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3966 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3967 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3968 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3969 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3970 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3971 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3972 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3973 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3974 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3975 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3976 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3977 (tdesc-ipa.o: tdesc.c): Remove.
3978 (x32-linux-ipa.o: x32-linux.c): Remove.
3979 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3980 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3982 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3984 * Makefile.in (%.o: ../arch/%.c): New rule.
3985 (arm.o: ../arch/arm.c): Remove.
3986 (arm-linux.o: ../arch/arm-linux.c): Remove.
3987 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3988 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3990 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3992 * Makefile.in (%.o: ../nat/%.c): New rule.
3993 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3994 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3995 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3996 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3997 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3998 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3999 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4000 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4001 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4002 (linux-personality.o: ../nat/linux-personality.c): Remove.
4003 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4004 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4005 (x86-linux.o: ../nat/x86-linux.c): Remove.
4006 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4007 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4009 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4011 * Makefile.in (%.o: ../common/%.c): New rule.
4012 (signals.o: ../common/signals.c): Remove.
4013 (print-utils.o: ../common/print-utils.c): Remove.
4014 (rsp-low.o: ../common/rsp-low.c): Remove.
4015 (common-utils.o: ../common/common-utils.c): Remove.
4016 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4017 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4018 (vec.o: ../common/vec.c): Remove.
4019 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4020 (xml-utils.o: ../common/xml-utils.c): Remove.
4021 (ptid.o: ../common/ptid.c): Remove.
4022 (buffer.o: ../common/buffer.c): Remove.
4023 (format.o: ../common/format.c): Remove.
4024 (filestuff.o: ../common/filestuff.c): Remove.
4025 (agent.o: ../common/agent.c): Remove.
4026 (errors.o: ../common/errors.c): Remove.
4027 (environ.o: ../common/environ.c): Remove.
4028 (common-debug.o: ../common/common-debug.c): Remove.
4029 (cleanups.o: ../common/cleanups.c): Remove.
4030 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4031 (fileio.o: ../common/fileio.c): Remove.
4032 (common-regcache.o: ../common/common-regcache.c): Remove.
4033 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4034 (new-op.o: ../common/new-op.c): Remove.
4035 (btrace-common.o: ../common/btrace-common.c): Remove.
4037 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4039 * Makefile.in (%.o: ../target/%.c): New rule.
4040 (waitstatus.o: ../target/waitstatus.c): Remove.
4042 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4045 (%.c: ../regformats/%.dat,
4046 (%.c: ../regformats/arm/%.dat,
4047 (%.c: ../regformats/i386/%.dat,
4048 (%.c: ../regformats/rs6000/%.dat): New rules.
4049 (aarch64.c): Remove.
4050 (reg-arm.c): Remove.
4051 (arm-with-iwmmxt.c): Remove.
4052 (arm-with-vfpv2.c): Remove.
4053 (arm-with-vfpv3.c): Remove.
4054 (arm-with-neon.c): Remove.
4055 (reg-bfin.c): Remove.
4056 (reg-cris.c): Remove.
4057 (reg-crisv32.c): Remove.
4059 (i386-linux.c): Remove.
4060 (i386-avx.c): Remove.
4061 (i386-avx-linux.c): Remove.
4062 (i386-avx-avx512.c): Remove.
4063 (i386-avx-avx512-linux.c): Remove.
4064 (i386-mpx.c): Remove.
4065 (i386-mpx-linux.c): Remove.
4066 (i386-avx-mpx-avx512-pku.c): Remove.
4067 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4068 (i386-avx-mpx.c): Remove.
4069 (i386-avx-mpx-linux.c): Remove.
4070 (i386-mmx.c): Remove.
4071 (i386-mmx-linux.c): Remove.
4072 (reg-ia64.c): Remove.
4073 (reg-m32r.c): Remove.
4074 (reg-m68k.c): Remove.
4076 (mips-linux.c): Remove.
4077 (mips-dsp-linux.c): Remove.
4078 (mips64-linux.c): Remove.
4079 (mips64-dsp-linux.c): Remove.
4080 (nios2-linux.c): Remove.
4081 (powerpc-32.c): Remove.
4082 (powerpc-32l.c): Remove.
4083 (powerpc-altivec32l.c): Remove.
4084 (powerpc-cell32l.c): Remove.
4085 (powerpc-vsx32l.c): Remove.
4086 (powerpc-isa205-32l.c): Remove.
4087 (powerpc-isa205-altivec32l.c): Remove.
4088 (powerpc-isa205-vsx32l.c): Remove.
4089 (powerpc-e500l.c): Remove.
4090 (powerpc-64l.c): Remove.
4091 (powerpc-altivec64l.c): Remove.
4092 (powerpc-cell64l.c): Remove.
4093 (powerpc-vsx64l.c): Remove.
4094 (powerpc-isa205-64l.c): Remove.
4095 (powerpc-isa205-altivec64l.c): Remove.
4096 (powerpc-isa205-vsx64l.c): Remove.
4097 (s390-linux32.c): Remove.
4098 (s390-linux32v1.c): Remove.
4099 (s390-linux32v2.c): Remove.
4100 (s390-linux64.c): Remove.
4101 (s390-linux64v1.c): Remove.
4102 (s390-linux64v2.c): Remove.
4103 (s390-te-linux64.c): Remove.
4104 (s390-vx-linux64.c): Remove.
4105 (s390-tevx-linux64.c): Remove.
4106 (s390x-linux64.c): Remove.
4107 (s390x-linux64v1.c): Remove.
4108 (s390x-linux64v2.c): Remove.
4109 (s390x-te-linux64.c): Remove.
4110 (s390x-vx-linux64.c): Remove.
4111 (s390x-tevx-linux64.c): Remove.
4112 (tic6x-c64xp-linux.c): Remove.
4113 (tic6x-c64x-linux.c): Remove.
4114 (tic6x-c62x-linux.c): Remove.
4116 (reg-sparc64.c): Remove.
4117 (reg-spu.c): Remove.
4119 (amd64-linux.c): Remove.
4120 (amd64-avx.c): Remove.
4121 (amd64-avx-linux.c): Remove.
4122 (amd64-avx-avx512.c): Remove.
4123 (amd64-avx-avx512-linux.c): Remove.
4124 (amd64-mpx.c): Remove.
4125 (amd64-mpx-linux.c): Remove.
4126 (amd64-avx-mpx-avx512-pku.c): Remove.
4127 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4128 (amd64-avx-mpx.c): Remove.
4129 (amd64-avx-mpx-linux.c): Remove.
4131 (x32-linux.c): Remove.
4132 (x32-avx.c): Remove.
4133 (x32-avx-linux.c): Remove.
4134 (x32-avx-avx512.c): Remove.
4135 (x32-avx-avx512-linux.c): Remove.
4136 (reg-xtensa.c): Remove.
4137 (reg-tilegx.c): Remove.
4138 (reg-tilegx32.c): Remove.
4140 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4142 * Makefile.in (SFILES): Add "common/environ.c".
4143 (OBJS): Add "common/environ.h".
4145 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4147 * configure.ac: Check if the fs_base and gs_base members of
4148 `struct user_regs_struct' exist.
4149 * config.in: Regenerated.
4150 * configure: Likewise.
4152 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4154 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4156 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4157 (get_next_pcs_syscall_next_pc): Likewise.
4159 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4161 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4162 * nto-x86-low.c: Likewise.
4164 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4166 * Makefile.in: Include disable-implicit-rules.mk.
4168 2016-11-23 Pedro Alves <palves@redhat.com>
4170 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4171 (debug_vprintf): Use std::chrono::steady_clock instead of
4172 gettimeofday. Use '.' instead of ':'.
4173 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4174 (get_timestamp): Use std::chrono::steady_clock instead of
4177 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4179 * Makefile.in: Fix whitespace formatting.
4181 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4183 * Makefile.in (SFILES, OBS): Flatten list and order
4186 2016-11-23 Pedro Alves <palves@redhat.com>
4188 * event-loop.c (handle_file_event): Use warning.
4189 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4190 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4193 2016-11-23 Pedro Alves <palves@redhat.com>
4195 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4197 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4198 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4199 debug_printf and debug_flush for debug output.
4200 * server.c (handle_general_set): Likewise.
4201 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4204 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4206 * Makefile.in (.c.o): Replace rule with ...
4207 (%.o: %.c): ... this one.
4209 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4211 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4212 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4214 * configure.ac: Remove checks for the make program.
4215 * configure: Re-generate.
4217 2016-10-28 Pedro Alves <palves@redhat.com>
4219 * Makefile.in (CXX_DIALECT): Get from configure.
4220 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4221 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4222 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4223 * config.in: Regenerate.
4224 * configure: Regenerate.
4226 2016-10-27 Yao Qi <yao.qi@linaro.org>
4228 * linux-low.c (linux_supports_range_stepping): Return true if
4229 can_software_single_step return true.
4231 2016-10-27 Yao Qi <yao.qi@linaro.org>
4233 * inferiors.c (find_inferior_in_random): New function.
4234 * inferiors.h (find_inferior_in_random): Declare.
4235 * linux-low.c (linux_wait_for_event_filtered): Call
4236 find_inferior_in_random instead of find_inferior.
4238 2016-10-27 Yao Qi <yao.qi@linaro.org>
4240 * linux-low.c (linux_wait_1): If single-step breakpoints are
4241 inserted, remove them.
4243 2016-10-26 Pedro Alves <palves@redhat.com>
4245 * linux-low.c (handle_extended_wait): Link parent/child fork
4247 (linux_wait_1): Unlink them.
4248 (linux_set_resume_request): Ignore resume requests for
4249 already-resumed and unhandled fork child threads.
4250 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4251 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4253 (handle_v_requests) <vCont>: Don't call require_running.
4254 * server.h (in_queued_stop_replies): New declaration.
4256 2016-10-24 Yao Qi <yao.qi@linaro.org>
4259 * linux-aarch64-low.c (append_insns): Cast the return value to
4262 2016-10-10 Yao Qi <yao.qi@linaro.org>
4264 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4266 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4268 * target.c (target_supports_multi_process): New function, moved
4270 * target.h (target_supports_multi_process): ... here. Remove
4273 2016-10-05 Tom Tromey <tom@tromey.com>
4276 * tracepoint.c (handle_tracepoint_bkpts): Check
4277 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4279 2016-10-05 Yao Qi <yao.qi@linaro.org>
4281 * configure.srv: Update the path of arm-*.xml files.
4283 2016-10-05 Terry Guo <terry.guo@arm.com>
4284 Yao Qi <yao.qi@linaro.org>
4286 * Makefile.in: Adjust the path of rules.
4287 * configure.srv: Update the path of xml files.
4288 * regformats/arm-with-iwmmxt.dat: Regenerated.
4289 * regformats/arm-with-neon.dat: Likewise.
4290 * regformats/arm-with-vfpv2.dat: Likewise.
4291 * regformats/arm-with-vfpv3.dat Likewise.
4293 2016-09-30 Yao Qi <yao.qi@linaro.org>
4296 * target.c (target_stop_and_wait): Don't call
4297 target_continue_no_signal, use resume_stop instead.
4299 2016-09-26 Yao Qi <yao.qi@linaro.org>
4301 * linux-low.c (linux_wait_1): Call debug_exit.
4303 2016-09-23 Pedro Alves <palves@redhat.com>
4305 * Makefile.in (SFILES): Add common/new-op.c.
4306 (OBS): Add common/new-op.o.
4307 (new-op.o): New rule.
4309 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4311 * .gitinore: Ignore more files.
4313 2016-09-21 Yao Qi <yao.qi@linaro.org>
4315 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4318 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4320 * server.c (start_inferior): Call target_mourn_inferior instead of
4321 mourn_inferior; pass ptid_t argument to it.
4323 (handle_target_event): Likewise.
4324 * target.c (target_mourn_inferior): New function.
4325 * target.h (mourn_inferior): Delete macro.
4327 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4329 * linux-low.c (lwp_is_stepping): New function.
4331 2016-09-06 Carl Love <cel@us.ibm.com>
4333 * server.c (start_inferior): Fixed comment, requested comment change
4334 didn't get updated correctly. Removed reference to ptrace () call as
4335 it is only true on Linux systems.
4337 2016-09-06 Carl Love <cel@us.ibm.com>
4339 * server.c (start_inferior): Do not call
4340 function target_post_create_inferior () if the
4341 inferior process has already exited.
4343 2016-09-05 Pedro Alves <palves@redhat.com>
4345 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4346 (COMPILE.pre, CC_LD): Use CXX directly.
4347 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4348 * acinclude.m4: Don't include build-with-cxx.m4.
4349 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4350 * configure: Regenerate.
4352 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4355 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4356 call writing data to own_buf.
4358 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4360 * target.c (mywait): Call target_wait instead of
4362 (target_wait): New function.
4364 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4366 * server.c (start_inferior): New variable 'ptid'. Replace calls
4367 to the_target->resume by target_continue{,_no_signal}, depending
4369 * target.c (target_stop_and_wait): Call target_continue_no_signal
4370 instead of the_target->resume.
4371 (target_continue): New function.
4373 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4375 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4377 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4380 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4382 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4383 * linux-arm-low.c (ps_get_thread_area): Likewise.
4384 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4385 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4386 * linux-mips-low.c (ps_get_thread_area): Likewise.
4387 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4388 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4389 * linux-x86-low.c (ps_get_thread_area): Likewise.
4390 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4392 2016-08-19 Pedro Alves <palves@redhat.com>
4394 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4396 2016-08-19 Pedro Alves <palves@redhat.com>
4398 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4399 comment. Use memcpy instead of casting through unsigned long.
4401 2016-08-19 Pedro Alves <palves@redhat.com>
4403 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4404 allocating around 0x80000000.
4406 2016-08-19 Pedro Alves <palves@redhat.com>
4409 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4410 (x32-avx512-linux-ipa.o): New rules.
4411 * configure.ac (x86_64-*-linux*): New x32 check.
4412 * configure.srv (ipa_x32_linux_regobj): New.
4413 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4414 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4416 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4418 * configure: Regenerate.
4420 2016-08-09 Pedro Alves <palves@redhat.com>
4423 * Makefile.in (OBS): Add signals-state-save-restore.o.
4424 (signals-state-save-restore.o): New rule.
4425 * config.in: Regenerate.
4426 * configure: Regenerate.
4427 * linux-low.c: Include "signals-state-save-restore.h".
4428 (linux_create_inferior): Call
4429 restore_original_signals_state.
4430 * server.c: Include "dispositions-save-restore.h".
4431 (captured_main): Call save_original_signals_state.
4433 2016-08-05 Pedro Alves <palves@redhat.com>
4435 * configure: Regenerate.
4437 2016-08-04 Yao Qi <yao.qi@linaro.org>
4439 * linux-low.c (regsets_fetch_inferior_registers): Check
4440 errno is ESRCH or not.
4442 2016-08-02 Yao Qi <yao.qi@linaro.org>
4444 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4445 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4446 (thread_db_load_search): Update.
4447 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4448 td_ta_set_event and td_ta_event_getmsg.
4450 2016-07-26 Pedro Alves <palves@redhat.com>
4453 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4454 of unsigned long for 64-bit registers and use uint32_t instead of
4455 unsigned int for 32-bit registers.
4457 2016-07-26 Pedro Alves <palves@redhat.com>
4459 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4462 2016-07-21 Tom Tromey <tom@tromey.com>
4464 * configure: Rebuild.
4466 2016-07-21 Yao Qi <yao.qi@linaro.org>
4468 * mem-break.c (find_gdb_breakpoint): Cast bp to
4469 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4471 2016-07-21 Yao Qi <yao.qi@linaro.org>
4473 * server.c (handle_v_requests): Support s and S actions
4474 if target_supports_software_single_step return true.
4476 2016-07-21 Yao Qi <yao.qi@linaro.org>
4478 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4479 is resume_step, call maybe_hw_step.
4480 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4482 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4484 (proceed_one_lwp): If resume request is resume_step, install
4485 reinsert breakpoints and call maybe_hw_step.
4487 2016-07-21 Yao Qi <yao.qi@linaro.org>
4489 * linux-low.c (proceed_one_lwp): Declare.
4490 (linux_resume_one_thread): Remove local variable 'step'.
4491 Lift code enqueue signal. Call proceed_one_lwp instead of
4492 linux_resume_one_lwp.
4494 2016-07-21 Yao Qi <yao.qi@linaro.org>
4496 * linux-low.c (linux_resume_one_thread): Call
4497 enqueue_pending_signal.
4499 2016-07-21 Yao Qi <yao.qi@linaro.org>
4501 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4502 * inferiors.c (do_restore_current_thread_cleanup): New function.
4503 (make_cleanup_restore_current_thread): Likewise.
4504 * linux-low.c (install_software_single_step_breakpoints): Call
4505 make_cleanup_restore_current_thread. Switch current_thread to
4508 2016-07-21 Yao Qi <yao.qi@linaro.org>
4510 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4511 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4512 (clone_one_breakpoint): Likewise.
4513 (delete_reinsert_breakpoints): Change parameter to thread.
4515 (has_reinsert_breakpoints): Likewise.
4516 (uninsert_reinsert_breakpoints): Likewise.
4517 (reinsert_reinsert_breakpoints): Likewise.
4518 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4519 (delete_reinsert_breakpoints): Likewise.
4520 (reinsert_reinsert_breakpoints): Likewise.
4521 (uninsert_reinsert_breakpoints): Likewise.
4522 (has_reinsert_breakpoints): Likewise.
4524 2016-07-21 Yao Qi <yao.qi@linaro.org>
4526 * inferiors.c (get_thread_process): Make parameter const.
4527 * inferiors.h (get_thread_process): Update declaration.
4528 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4529 Add new parameters child_thread and parent_thread. Callers
4531 * mem-break.h (clone_all_breakpoints): Update declaration.
4533 2016-07-21 Yao Qi <yao.qi@linaro.org>
4535 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4536 <command_list, handler>: Remove.
4537 (struct gdb_breakpoint): New.
4538 (struct other_breakpoint): New.
4539 (struct reinsert_breakpoint): New.
4540 (is_gdb_breakpoint): New function.
4541 (any_persistent_commands): Update command_list if
4542 is_gdb_breakpoint returns true.
4543 (set_breakpoint): Create breakpoints according to their types.
4544 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
4545 (set_gdb_breakpoint_1): Likewise.
4546 (set_gdb_breakpoint): Likewise.
4547 (clear_breakpoint_conditions): Change parameter type to
4548 'struct gdb_breakpoint *'.
4549 (clear_breakpoint_commands): Likewise.
4550 (clear_breakpoint_conditions_and_commands): Likewise.
4551 (add_condition_to_breakpoint): Likewise.
4552 (add_breakpoint_condition): Likewise.
4553 (add_commands_to_breakpoint): Likewise.
4554 (check_breakpoints): Check other_breakpoint.
4555 (clone_one_breakpoint): Clone breakpopint according to its type.
4556 * mem-break.h (struct gdb_breakpoint): Declare.
4557 (set_gdb_breakpoint): Update declaration.
4558 (clear_breakpoint_conditions_and_commands): Likewise.
4559 (add_breakpoint_condition): Likewise.
4560 (add_breakpoint_commands): Likewise.
4561 * server.c (process_point_options): Change parameter type to
4562 'struct gdb_breakpoint *'.
4564 2016-07-21 Yao Qi <yao.qi@linaro.org>
4566 * mem-break.c (set_breakpoint_at): Rename it to ...
4567 (set_breakpoint_type_at): ... it.
4568 (set_breakpoint_at): Call set_breakpoint_type_at.
4569 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
4570 * mem-break.h (set_breakpoint_at): Update comments.
4572 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
4574 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
4576 (nios2_store_gregset): Likewise.
4578 2016-07-01 Pedro Alves <palves@redhat.com>
4579 Antoine Tremblay <antoine.tremblay@ericsson.com>
4581 * linux-low.c: Change interface to take the target lwp_info
4582 pointer directly and return void. Handle detaching from a zombie
4584 (linux_detach_lwp_callback): New function.
4585 (linux_detach): Detach from the leader thread after detaching from
4588 2016-06-28 Yao Qi <yao.qi@linaro.org>
4590 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
4591 for variable new_offset.
4592 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4593 (aarch64_ftrace_insn_reloc_cb): Likewise.
4594 (aarch64_ftrace_insn_reloc_tb): Likewise.
4595 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
4596 PRIx64 instead of PRIx32.
4598 2016-06-28 Yao Qi <yao.qi@linaro.org>
4600 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
4601 (the_low_target): Install arm_get_syscall_trapinfo.
4603 2016-06-28 Yao Qi <yao.qi@linaro.org>
4605 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
4607 (the_low_target): Install aarch64_get_syscall_trapinfo.
4609 2016-06-28 Yao Qi <yao.qi@linaro.org>
4611 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
4613 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
4614 Remove parameter sysno.
4615 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
4618 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
4620 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
4621 (s390_emit_ne_goto): Likewise.
4622 (s390_emit_lt_goto): Likewise.
4623 (s390_emit_le_goto): Likewise.
4624 (s390_emit_gt_goto): Likewise.
4625 (s390_emit_ge_goto): Likewise.
4626 (s390x_emit_eq_goto): Likewise.
4627 (s390x_emit_ne_goto): Likewise.
4628 (s390x_emit_lt_goto): Likewise.
4629 (s390x_emit_le_goto): Likewise.
4630 (s390x_emit_gt_goto): Likewise.
4631 (s390x_emit_ge_goto): Likewise.
4632 (s390_emit_ops_impl): Mark variable static.
4633 (s390x_emit_ops): Likewise.
4635 2016-06-17 Yao Qi <yao.qi@linaro.org>
4637 * linux-low.c (handle_extended_wait): Call
4638 uninsert_reinsert_breakpoints for the parent process. Remove
4639 reinsert breakpoints from the child process. Reinsert them to
4640 the parent process when vfork is done.
4641 * mem-break.c (uninsert_reinsert_breakpoints): New function.
4642 (reinsert_reinsert_breakpoints): New function.
4643 * mem-break.h (uninsert_reinsert_breakpoints): Declare
4644 (reinsert_reinsert_breakpoints): Declare.
4646 2016-06-17 Yao Qi <yao.qi@linaro.org>
4648 * linux-low.c (handle_extended_wait): If the parent is doing
4649 step-over, remove the reinsert breakpoints from the forked child.
4651 2016-06-17 Yao Qi <yao.qi@linaro.org>
4653 * linux-low.c (unsuspend_all_lwps): Declare.
4654 (linux_low_filter_event): If thread exited, call finish_step_over.
4655 If step-over is finished, unsuspend other threads.
4657 2016-06-17 Yao Qi <yao.qi@linaro.org>
4659 * linux-low.c (linux_resume_one_lwp_throw): Assert
4660 has_reinsert_breakpoints returns false.
4661 * mem-break.c (delete_disabled_breakpoints): Assert
4662 bp type isn't reinsert_breakpoint.
4664 2016-06-17 Yao Qi <yao.qi@linaro.org>
4666 * linux-low.c (maybe_hw_step): New function.
4667 (linux_resume_one_lwp_throw): Call maybe_hw_step.
4668 (finish_step_over): Switch current_thread to lwp temporarily,
4669 and assert has_reinsert_breakpoints returns true.
4670 (proceed_one_lwp): Call maybe_hw_step.
4671 * mem-break.c (has_reinsert_breakpoints): New function.
4672 * mem-break.h (has_reinsert_breakpoints): Declare.
4674 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
4676 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
4678 2016-05-17 Yao Qi <yao.qi@linaro.org>
4680 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
4681 instead of find_inferior.
4683 2016-05-05 Yao Qi <yao.qi@linaro.org>
4685 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
4686 Initialize res to zero.
4688 2016-05-05 Yao Qi <yao.qi@linaro.org>
4690 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
4693 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4695 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
4696 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
4697 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
4699 2016-04-28 Par Olsson <par.olsson@windriver.com>
4700 Simon Marchi <simon.marchi@ericsson.com>
4702 * tracepoint.c (write_inferior_int8): New function.
4703 (cmd_qtenable_disable): Write enable flag using
4704 write_inferior_int8.
4706 2016-04-25 Yao Qi <yao.qi@linaro.org>
4708 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
4709 (need_step_over_p): Return zero if the LWP has pending signals
4710 can be delivered on software single step target.
4712 2016-04-25 Yao Qi <yao.qi@linaro.org>
4714 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4715 return instead of error.
4717 2016-04-22 Yao Qi <yao.qi@linaro.org>
4719 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
4722 2016-04-22 Yao Qi <yao.qi@linaro.org>
4724 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
4725 signal when stepping over breakpoint with software single
4728 2016-04-21 Pedro Alves <palves@redhat.com>
4730 * linux-s390-low.c (s390_collect_ptrace_register)
4731 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
4733 (s390_check_regset): Use void * instead of gdb_byte *.
4735 2016-04-20 Pedro Alves <palves@redhat.com>
4737 * configure: Renegerate.
4739 2016-04-20 Yao Qi <yao.qi@linaro.org>
4741 * linux-aarch32-low.c: Include "arch/arm-linux.h".
4742 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
4744 (arm_store_gregset): Likewise.
4746 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4748 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4749 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4750 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4751 (amd64-avx-mpx-linux.c): New rules.
4752 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4753 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4754 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4755 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4756 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4757 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4758 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4759 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4760 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4761 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4762 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4763 * linux-x86-low.c (x86_linux_read_description): Add case for
4764 X86_XSTATE_AVX_MPX_MASK.
4765 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4766 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4767 init_registers_i386_avx_mpx_linux.
4768 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4769 (initialize_low_tracepoint): Call
4770 init_registers_i386_avx_mpx_linux.
4771 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4772 (initialize_low_tracepoint): Call
4773 init_registers_amd64_avx_mpx_linux.
4774 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4775 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4776 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4779 2016-04-18 Pedro Alves <palves@redhat.com>
4781 * configure: Regenerate.
4783 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4785 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4786 (aarch64_emit_sub): Likewise.
4788 2016-04-12 Pedro Alves <palves@redhat.com>
4790 * utils.c (prepare_to_throw_exception): Delete.
4792 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4794 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4796 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4798 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4800 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4802 * linux-aarch64-ipa.c: Add <elf.h> include.
4803 * linux-ppc-ipa.c: Add <elf.h> include.
4804 * linux-s390-ipa.c: Add <elf.h> include.
4806 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4808 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4809 (get_raw_reg_ptr): Likewise.
4810 (get_trace_state_variable_value_ptr): Likewise.
4811 (set_trace_state_variable_value_ptr): Likewise.
4812 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4815 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4816 Marcin Kościelnicki <koriakin@0x04.net>
4819 * linux-ppc-low.c (emit_insns): New function.
4820 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4821 (ppc_emit_prologue): New function.
4822 (ppc_emit_epilogue): New function.
4823 (ppc_emit_add): New function.
4824 (ppc_emit_sub): New function.
4825 (ppc_emit_mul): New function.
4826 (ppc_emit_lsh): New function.
4827 (ppc_emit_rsh_signed): New function.
4828 (ppc_emit_rsh_unsigned): New function.
4829 (ppc_emit_ext): New function.
4830 (ppc_emit_zero_ext): New function.
4831 (ppc_emit_log_not): New function.
4832 (ppc_emit_bit_and): New function.
4833 (ppc_emit_bit_or): New function.
4834 (ppc_emit_bit_xor): New function.
4835 (ppc_emit_bit_not): New function.
4836 (ppc_emit_equal): New function.
4837 (ppc_emit_less_signed): New function.
4838 (ppc_emit_less_unsigned): New function.
4839 (ppc_emit_ref): New function.
4840 (ppc_emit_const): New function.
4841 (ppc_emit_reg): New function.
4842 (ppc_emit_pop): New function.
4843 (ppc_emit_stack_flush): New function.
4844 (ppc_emit_swap): New function.
4845 (ppc_emit_stack_adjust): New function.
4846 (ppc_emit_call): New function.
4847 (ppc_emit_int_call_1): New function.
4848 (ppc_emit_void_call_2): New function.
4849 (ppc_emit_if_goto): New function.
4850 (ppc_emit_goto): New function.
4851 (ppc_emit_eq_goto): New function.
4852 (ppc_emit_ne_goto): New function.
4853 (ppc_emit_lt_goto): New function.
4854 (ppc_emit_le_goto): New function.
4855 (ppc_emit_gt_goto): New function.
4856 (ppc_emit_ge_goto): New function.
4857 (ppc_write_goto_address): New function.
4858 (ppc_emit_ops_impl): New static variable.
4859 (ppc64v1_emit_prologue): New function.
4860 (ppc64v2_emit_prologue): New function.
4861 (ppc64_emit_epilogue): New function.
4862 (ppc64_emit_add): New function.
4863 (ppc64_emit_sub): New function.
4864 (ppc64_emit_mul): New function.
4865 (ppc64_emit_lsh): New function.
4866 (ppc64_emit_rsh_signed): New function.
4867 (ppc64_emit_rsh_unsigned): New function.
4868 (ppc64_emit_ext): New function.
4869 (ppc64_emit_zero_ext): New function.
4870 (ppc64_emit_log_not): New function.
4871 (ppc64_emit_bit_and): New function.
4872 (ppc64_emit_bit_or): New function.
4873 (ppc64_emit_bit_xor): New function.
4874 (ppc64_emit_bit_not): New function.
4875 (ppc64_emit_equal): New function.
4876 (ppc64_emit_less_signed): New function.
4877 (ppc64_emit_less_unsigned): New function.
4878 (ppc64_emit_ref): New function.
4879 (ppc64_emit_const): New function.
4880 (ppc64v1_emit_reg): New function.
4881 (ppc64v2_emit_reg): New function.
4882 (ppc64_emit_pop): New function.
4883 (ppc64_emit_stack_flush): New function.
4884 (ppc64_emit_swap): New function.
4885 (ppc64v1_emit_call): New function.
4886 (ppc64v2_emit_call): New function.
4887 (ppc64v1_emit_int_call_1): New function.
4888 (ppc64v2_emit_int_call_1): New function.
4889 (ppc64v1_emit_void_call_2): New function.
4890 (ppc64v2_emit_void_call_2): New function.
4891 (ppc64_emit_if_goto): New function.
4892 (ppc64_emit_eq_goto): New function.
4893 (ppc64_emit_ne_goto): New function.
4894 (ppc64_emit_lt_goto): New function.
4895 (ppc64_emit_le_goto): New function.
4896 (ppc64_emit_gt_goto): New function.
4897 (ppc64_emit_ge_goto): New function.
4898 (ppc64v1_emit_ops_impl): New static variable.
4899 (ppc64v2_emit_ops_impl): New static variable.
4900 (ppc_emit_ops): New function.
4901 (linux_low_target): Wire in ppc_emit_ops.
4903 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4904 Marcin Kościelnicki <koriakin@0x04.net>
4907 * Makefile.in: Add powerpc-*-ipa.o
4908 * configure.srv: Add ipa_obj for powerpc*-linux.
4909 * linux-ppc-ipa.c: New file.
4910 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4912 (PPC_FIELD): New macro.
4913 (PPC_SEXT): New macro.
4914 (PPC_OP6): New macro.
4915 (PPC_BO): New macro.
4916 (PPC_LI): New macro.
4917 (PPC_BD): New macro.
4918 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4919 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4920 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4921 (ppc_get_thread_area): New function.
4922 (is_elfv2_inferior): New function.
4923 (gen_ds_form): New function.
4924 (GEN_STD): New macro.
4925 (GEN_STDU): New macro.
4926 (GEN_LD): New macro.
4927 (GEN_LDU): New macro.
4928 (gen_d_form): New function.
4929 (GEN_ADDI): New macro.
4930 (GEN_ADDIS): New macro.
4931 (GEN_LI): New macro.
4932 (GEN_LIS): New macro.
4933 (GEN_ORI): New macro.
4934 (GEN_ORIS): New macro.
4935 (GEN_LWZ): New macro.
4936 (GEN_STW): New macro.
4937 (GEN_STWU): New macro.
4938 (gen_xfx_form): New function.
4939 (GEN_MFSPR): New macro.
4940 (GEN_MTSPR): New macro.
4941 (GEN_MFCR): New macro.
4942 (GEN_MTCR): New macro.
4943 (GEN_SYNC): New macro.
4944 (GEN_LWSYNC): New macro.
4945 (gen_x_form): New function.
4946 (GEN_OR): New macro.
4947 (GEN_MR): New macro.
4948 (GEN_LWARX): New macro.
4949 (GEN_STWCX): New macro.
4950 (GEN_CMPW): New macro.
4951 (gen_md_form): New function.
4952 (GEN_RLDICL): New macro.
4953 (GEN_RLDICR): New macro.
4954 (gen_i_form): New function.
4956 (GEN_BL): New macro.
4957 (gen_b_form): New function.
4958 (GEN_BNE): New macro.
4959 (GEN_LOAD): New macro.
4960 (GEN_STORE): New macro.
4961 (gen_limm): New function.
4962 (gen_atomic_xchg): New function.
4963 (gen_call): New function.
4964 (ppc_relocate_instruction): New function.
4965 (ppc_install_fast_tracepoint_jump_pad): New function.
4966 (ppc_get_min_fast_tracepoint_insn_len): New function.
4967 (ppc_get_ipa_tdesc_idx): New function.
4968 (the_low_target): Wire in the new functions.
4969 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4971 * linux-ppc-tdesc.h: New file.
4973 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4975 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4976 (alloc_jump_pad_buffer): New function.
4977 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4978 (alloc_jump_pad_buffer): New function.
4979 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4980 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4981 (alloc_jump_pad_buffer): New function.
4982 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4983 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4984 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4985 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4987 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4989 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4990 * linux-amd64-ipa.c: Likewise.
4991 * linux-i386-ipa.c: Likewise.
4992 * linux-s390-ipa.c: Likewise.
4993 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4994 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4995 set_trace_state_variable_value_ptr.
4996 (struct ipa_sym_addresses): Likewise.
4997 (symbol_list): Likewise.
4998 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4999 accessing gdb_collect directly.
5000 (gdb_collect_ptr_type): New typedef.
5001 (get_raw_reg_ptr_type): New typedef.
5002 (get_trace_state_variable_value_ptr_type): New typedef.
5003 (set_trace_state_variable_value_ptr_type): New typedef.
5004 (gdb_collect_ptr): New global.
5005 (get_raw_reg_ptr): New global.
5006 (get_trace_state_variable_value_ptr): New global.
5007 (set_trace_state_variable_value_ptr): New global.
5008 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5009 accessing get_raw_reg directly.
5010 (get_get_tsv_func_addr): Likewise for
5011 get_trace_state_variable_value_ptr.
5012 (get_set_tsv_func_addr): Likewise for
5013 set_trace_state_variable_value_ptr.
5014 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5016 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5018 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5020 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5022 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5024 (relocate_instruction): Remove own_buf.
5025 * server.c (own_buf): Make global.
5026 (handle_v_requests): Make global.
5027 * server.h (own_buf): New declaration.
5028 (handle_v_requests): New prototype.
5030 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5033 * linux-s390-low.c (add_insns): New function.
5034 (s390_emit_prologue): New function.
5035 (s390_emit_epilogue): New function.
5036 (s390_emit_add): New function.
5037 (s390_emit_sub): New function.
5038 (s390_emit_mul): New function.
5039 (s390_emit_lsh): New function.
5040 (s390_emit_rsh_signed): New function.
5041 (s390_emit_rsh_unsigned): New function.
5042 (s390_emit_ext): New function.
5043 (s390_emit_log_not): New function.
5044 (s390_emit_bit_and): New function.
5045 (s390_emit_bit_or): New function.
5046 (s390_emit_bit_xor): New function.
5047 (s390_emit_bit_not): New function.
5048 (s390_emit_equal): New function.
5049 (s390_emit_less_signed): New function.
5050 (s390_emit_less_unsigned): New function.
5051 (s390_emit_ref): New function.
5052 (s390_emit_if_goto): New function.
5053 (s390_emit_goto): New function.
5054 (s390_write_goto_address): New function.
5055 (s390_emit_litpool): New function.
5056 (s390_emit_const): New function.
5057 (s390_emit_call): New function.
5058 (s390_emit_reg): New function.
5059 (s390_emit_pop): New function.
5060 (s390_emit_stack_flush): New function.
5061 (s390_emit_zero_ext): New function.
5062 (s390_emit_swap): New function.
5063 (s390_emit_stack_adjust): New function.
5064 (s390_emit_set_r2): New function.
5065 (s390_emit_int_call_1): New function.
5066 (s390_emit_void_call_2): New function.
5067 (s390_emit_eq_goto): New function.
5068 (s390_emit_ne_goto): New function.
5069 (s390_emit_lt_goto): New function.
5070 (s390_emit_le_goto): New function.
5071 (s390_emit_gt_goto): New function.
5072 (s390_emit_ge_goto): New function.
5073 (s390x_emit_prologue): New function.
5074 (s390x_emit_epilogue): New function.
5075 (s390x_emit_add): New function.
5076 (s390x_emit_sub): New function.
5077 (s390x_emit_mul): New function.
5078 (s390x_emit_lsh): New function.
5079 (s390x_emit_rsh_signed): New function.
5080 (s390x_emit_rsh_unsigned): New function.
5081 (s390x_emit_ext): New function.
5082 (s390x_emit_log_not): New function.
5083 (s390x_emit_bit_and): New function.
5084 (s390x_emit_bit_or): New function.
5085 (s390x_emit_bit_xor): New function.
5086 (s390x_emit_bit_not): New function.
5087 (s390x_emit_equal): New function.
5088 (s390x_emit_less_signed): New function.
5089 (s390x_emit_less_unsigned): New function.
5090 (s390x_emit_ref): New function.
5091 (s390x_emit_if_goto): New function.
5092 (s390x_emit_const): New function.
5093 (s390x_emit_call): New function.
5094 (s390x_emit_reg): New function.
5095 (s390x_emit_pop): New function.
5096 (s390x_emit_stack_flush): New function.
5097 (s390x_emit_zero_ext): New function.
5098 (s390x_emit_swap): New function.
5099 (s390x_emit_stack_adjust): New function.
5100 (s390x_emit_int_call_1): New function.
5101 (s390x_emit_void_call_2): New function.
5102 (s390x_emit_eq_goto): New function.
5103 (s390x_emit_ne_goto): New function.
5104 (s390x_emit_lt_goto): New function.
5105 (s390x_emit_le_goto): New function.
5106 (s390x_emit_gt_goto): New function.
5107 (s390x_emit_ge_goto): New function.
5108 (s390_emit_ops): New function.
5109 (struct linux_target_ops): Fill in emit_ops hook.
5111 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5114 * Makefile.in: Add s390 IPA files.
5115 * configure.srv: Build IPA for s390.
5116 * linux-s390-ipa.c: New file.
5117 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5118 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5119 (tdesc_s390_linux32): Likewise.
5120 (init_registers_s390_linux32v1): Likewise.
5121 (tdesc_s390_linux32v1): Likewise.
5122 (init_registers_s390_linux32v2): Likewise.
5123 (tdesc_s390_linux32v2): Likewise.
5124 (init_registers_s390_linux64): Likewise.
5125 (tdesc_s390_linux64): Likewise.
5126 (init_registers_s390_linux64v1): Likewise.
5127 (tdesc_s390_linux64v1): Likewise.
5128 (init_registers_s390_linux64v2): Likewise.
5129 (tdesc_s390_linux64v2): Likewise.
5130 (init_registers_s390_te_linux64): Likewise.
5131 (tdesc_s390_te_linux64): Likewise.
5132 (init_registers_s390_vx_linux64): Likewise.
5133 (tdesc_s390_vx_linux64): Likewise.
5134 (init_registers_s390_tevx_linux64): Likewise.
5135 (tdesc_s390_tevx_linux64): Likewise.
5136 (init_registers_s390x_linux64): Likewise.
5137 (tdesc_s390x_linux64): Likewise.
5138 (init_registers_s390x_linux64v1): Likewise.
5139 (tdesc_s390x_linux64v1): Likewise.
5140 (init_registers_s390x_linux64v2): Likewise.
5141 (tdesc_s390x_linux64v2): Likewise.
5142 (init_registers_s390x_te_linux64): Likewise.
5143 (tdesc_s390x_te_linux64): Likewise.
5144 (init_registers_s390x_vx_linux64): Likewise.
5145 (tdesc_s390x_vx_linux64): Likewise.
5146 (init_registers_s390x_tevx_linux64): Likewise.
5147 (tdesc_s390x_tevx_linux64): Likewise.
5148 (have_hwcap_s390_vx): New static variable.
5149 (s390_arch_setup): Fill have_hwcap_s390_vx.
5150 (s390_get_thread_area): New function.
5151 (s390_ft_entry_gpr_esa): New const.
5152 (s390_ft_entry_gpr_zarch): New const.
5153 (s390_ft_entry_misc): New const.
5154 (s390_ft_entry_fr): New const.
5155 (s390_ft_entry_vr): New const.
5156 (s390_ft_main_31): New const.
5157 (s390_ft_main_64): New const.
5158 (s390_ft_exit_fr): New const.
5159 (s390_ft_exit_vr): New const.
5160 (s390_ft_exit_misc): New const.
5161 (s390_ft_exit_gpr_esa): New const.
5162 (s390_ft_exit_gpr_zarch): New const.
5163 (append_insns): New function.
5164 (s390_relocate_instruction): New function.
5165 (s390_install_fast_tracepoint_jump_pad): New function.
5166 (s390_get_min_fast_tracepoint_insn_len): New function.
5167 (s390_get_ipa_tdesc_idx): New function.
5168 (struct linux_target_ops): Wire in the above functions.
5169 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5170 * linux-s390-tdesc.h: New file.
5172 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5174 * linux-s390-low.c (s390_supports_tracepoints): New function.
5175 (struct linux_target_ops): Fill supports_tracepoints hook.
5177 2016-03-18 Yao Qi <yao.qi@linaro.org>
5179 * linux-low.c (lwp_signal_can_be_delivered): New function.
5180 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5182 2016-03-18 Yao Qi <yao.qi@linaro.org>
5184 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5185 0 if signal is enqueued. Remove 'signal' from one debugging
5186 message. Move one debugging message to some lines below.
5187 Remove code setting 'signal' to 0.
5189 2016-03-18 Yao Qi <yao.qi@linaro.org>
5191 * linux-low.c (linux_low_filter_event): Remove redundant
5192 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5194 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5196 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5197 (struct linux_target_ops): Wire in the above.
5199 2016-03-03 Yao Qi <yao.qi@linaro.org>
5201 * linux-low.c: Update comments to start_step_over.
5203 2016-03-03 Yao Qi <yao.qi@linaro.org>
5206 * linux-low.c (handle_extended_wait): Set child suspended
5207 if event_lwp->bp_reinsert isn't zero.
5209 2016-03-02 Yao Qi <yao.qi@linaro.org>
5211 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5212 enqueue_pending_signal.
5214 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5216 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5219 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5221 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5222 (s390_regmap_3264) [!__s390x__]: New global.
5223 (s390_collect_ptrace_register): Skip map entries containing -1.
5224 (s390_supply_ptrace_register): Ditto.
5225 (s390_fill_gprs_high): New function.
5226 (s390_store_gprs_high): New function.
5227 (s390_regsets): Add NT_S390_HIGH_GPRS.
5228 (s390_get_hwcap): Enable on 31-bit.
5229 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5230 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5231 Detect NT_S390_HIGH_GPRS.
5232 (s390_usrregs_info_3264): Enable on 31-bit.
5233 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5234 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5236 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5239 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5240 * configure.srv: Ditto.
5241 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5242 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5243 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5244 (init_registers_amd64_linux): Remove prototype.
5245 (tdesc_amd64_linux): Remove declaration.
5246 (get_ipa_tdesc): New function.
5247 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5248 initialize remaining tdescs.
5249 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5250 (init_registers_i386_linux): Remove prototype.
5251 (tdesc_i386_linux): Remove declaration.
5252 (get_ipa_tdesc): New function.
5253 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5254 initialize remaining tdescs.
5255 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5256 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5257 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5258 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5259 (x86_get_ipa_tdesc_idx): New function.
5260 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5261 * linux-x86-tdesc.h: New file.
5262 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5263 (target_get_ipa_tdesc_idx): New macro.
5264 * tracepoint.c (ipa_tdesc_idx): New macro.
5265 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5266 (symbol_list): Add ipa_tdesc_idx.
5267 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5268 (ipa_tdesc): Remove.
5269 (ipa_tdesc_idx): New variable.
5270 (get_context_regcache): Use get_ipa_tdesc.
5271 (gdb_collect): Ditto.
5273 * tracepoint.h (get_ipa_tdesc): New prototype.
5274 (ipa_tdesc): Remove.
5276 2016-02-24 Pedro Alves <palves@redhat.com>
5278 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5279 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5280 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5281 Factor out common code between the USE_SIGTRAP_SIGINFO and
5282 !USE_SIGTRAP_SIGINFO blocks.
5283 (linux_low_filter_event): Call save_stop_reason instead of
5284 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5286 (linux_wait_1): Update comments.
5288 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5290 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5291 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5292 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5293 ppc_insert_point, ppc_remove_point.
5295 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5297 * linux-s390-low.c (s390_supports_z_point_type): New function.
5298 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5300 2016-02-16 Yao Qi <yao.qi@linaro.org>
5302 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5303 PC. Get pc from regcache_read_pc.
5305 2016-02-12 Yao Qi <yao.qi@linaro.org>
5307 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5308 or linux_get_pc_32bit.
5309 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5311 2016-02-12 Yao Qi <yao.qi@linaro.org>
5313 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5314 arm_linux_get_next_pcs_fixup.
5316 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5318 * tracepoint.c (x_tracepoint_action_download): Change
5319 write_inferior_data_ptr to write_inferior_data_pointer.
5320 (cmd_qtstart): Likewise.
5321 (write_inferior_data_ptr): Remove.
5322 (download_agent_expr): Change write_inferior_data_ptr to
5323 write_inferior_data_pointer.
5324 (download_tracepoint_1): Likewise.
5325 (download_tracepoint): Likewise.
5326 (download_trace_state_variables): Likewise.
5328 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5329 Marcin Kościelnicki <koriakin@0x04.net>
5331 * tracepoint.c (struct tracepoint_action_ops): Remove.
5332 (struct tracepoint_action): Remove ops.
5333 (m_tracepoint_action_download, r_tracepoint_action_download)
5334 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5335 size and offset accordingly.
5336 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5337 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5338 (tracepoint_action_send, tracepoint_action_download): New functions.
5339 Helpers for trace action handlers.
5340 (add_tracepoint_action): Remove setup actions ops.
5341 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5343 2016-02-10 Yao Qi <yao.qi@linaro.org>
5345 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5347 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5349 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5351 * configure: Regenerate.
5353 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5355 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5356 void * to gdb_byte *.
5357 * linux-low.c (siginfo_fixup): Likewise.
5358 (linux_xfer_siginfo): Likewise.
5359 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5361 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5363 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5365 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5367 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5369 * linux-x86-low.c [__x86_64__]: Include
5370 "nat/amd64-linux-siginfo.h".
5371 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5372 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5373 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5374 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5375 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5376 (cpt_si_fd, si_timerid, si_overrun): Move from
5377 nat/amd64-linux-siginfo.c.
5378 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5380 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5382 * server.c (skip_to_semicolon): Remove.
5383 (process_point_options): Use strchrnul instead of
5386 2016-01-26 Yao Qi <yao.qi@linaro.org>
5388 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5389 * linux-low.c (install_software_single_step_breakpoints): Don't
5390 call regcache_read_pc.
5391 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5394 2016-01-26 Yao Qi <yao.qi@linaro.org>
5396 * linux-low.c (install_software_single_step_breakpoints): Call
5397 regcache_read_pc instead of get_pc.
5399 2016-01-26 Yao Qi <yao.qi@linaro.org>
5401 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5402 (unblock_async_io): Rename to ...
5403 (block_unblock_async_io): ... it. New function.
5404 (enable_async_io): Don't install SIGIO handler. Unblock it
5406 (disable_async_io): Don't ignore SIGIO. Block it instead.
5407 (initialize_async_io): Install SIGIO handler. Don't call
5410 2016-01-26 Yao Qi <yao.qi@linaro.org>
5412 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5413 first character is '\003', call *the_target->request_interrupt.
5415 2016-01-25 Yao Qi <yao.qi@linaro.org>
5417 * remote-utils.c (new_thread_notify): Remove.
5418 (dead_thread_notify): Likewise.
5419 * remote-utils.h (new_thread_notify): Remove declaration.
5420 (dead_thread_notify): Likewise.
5422 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5424 * gdb.trace/pending.exp: Fix expected message on continue.
5426 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5428 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5429 it works properly on big-endian machines where sizeof (CORE_ADDR)
5432 2016-01-21 Pedro Alves <palves@redhat.com>
5434 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5435 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5436 * configure: Regenerate.
5438 2016-01-21 Yao Qi <yao.qi@linaro.org>
5440 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5441 is_thumb and set it according to CPSR saved on the stack.
5442 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5443 arm_sigreturn_next_pc.
5445 2016-01-18 Yao Qi <yao.qi@linaro.org>
5447 * linux-low.c (linux_set_pc_64bit): New function.
5448 (linux_get_pc_64bit): New function.
5449 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5451 * linux-sparc-low.c (debug_threads): Remove declaration.
5452 (sparc_get_pc): Remove.
5453 (the_low_target): Use linux_get_pc_64bit instead of
5455 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5456 (the_low_target): Use linux_get_pc_64bit and
5459 2016-01-18 Yao Qi <yao.qi@linaro.org>
5461 * linux-arm-low.c (debug_threads): Remove declaration.
5462 (arm_get_pc, arm_set_pc): Remove.
5463 (the_low_target): Use linux_get_pc_32bit and
5465 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5466 (the_low_target): Use linux_get_pc_32bit and
5468 * linux-cris-low.c (debug_threads): Remove declaration.
5469 (cris_get_pc, cris_set_pc,): Remove.
5470 (the_low_target): Use linux_get_pc_32bit and
5472 * linux-crisv32-low.c (debug_threads): Remove declaration.
5473 (cris_get_pc, cris_set_pc): Remove.
5474 (the_low_target): Use linux_get_pc_32bit and
5476 * linux-low.c: Include inttypes.h.
5477 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5478 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5479 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5480 (the_low_target): Use linux_get_pc_32bit and
5482 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5483 (the_low_target): Use linux_get_pc_32bit and
5485 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5486 (the_low_target): Use linux_get_pc_32bit and
5488 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5489 (the_low_target): Use linux_get_pc_32bit and
5491 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5492 (the_low_target): Use linux_get_pc_32bit and
5495 2016-01-18 Gary Benson <gbenson@redhat.com>
5497 * configure.ac (AC_FUNC_FORK): New check.
5498 * config.in: Regenerate.
5499 * configure: Likewise.
5501 2016-01-14 Yao Qi <yao.qi@linaro.org>
5503 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5504 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5505 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5506 arm_get_next_pcs_ctor.
5508 2016-01-12 Josh Stone <jistone@redhat.com>
5509 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5511 * inferiors.h: Include "gdb_vecs.h".
5512 (struct process_info): Add syscalls_to_catch.
5513 * inferiors.c (remove_process): Free syscalls_to_catch.
5514 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5515 syscall_return stops.
5516 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5517 * server.c (handle_general_set): Handle QCatchSyscalls.
5518 (handle_query): Report support for QCatchSyscalls.
5519 * target.h (struct target_ops): Add supports_catch_syscall.
5520 (target_supports_catch_syscall): New macro.
5521 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5522 (struct lwp_info): Add syscall_state.
5523 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5524 Maintain syscall_state and syscalls_to_catch across exec.
5525 (get_syscall_trapinfo): New function, proxy to the_low_target.
5526 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5527 (linux_low_filter_event): Toggle syscall_state entry/return for
5528 syscall traps, and set it ignored for all others.
5529 (gdb_catching_syscalls_p): New function.
5530 (gdb_catch_this_syscall_p): New function.
5531 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5532 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5533 (linux_supports_catch_syscall): New function.
5534 (linux_target_ops): Install it.
5535 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5536 (the_low_target): Install it.
5538 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5540 * acinclude.m4: Include new ../warning.m4 file.
5541 * configure: Regenerated.
5542 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
5544 2016-01-12 Mike Frysinger <vapier@gentoo.org>
5546 * ax.c (is_goto_target): Mark static.
5547 * linux-low.c (register_addr): Likewise.
5548 (linux_fetch_registers, linux_store_registers): Likewise.
5549 * mem-break.c (any_persistent_commands): Fix old prototype.
5550 (add_commands_to_breakpoint): Mark static.
5551 * regcache.c (find_register_by_name): Delete unused func.
5552 * remote-utils.c (hex_or_minus_one): Mark static.
5553 * server.c (monitor_show_help): Mark static.
5554 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
5555 handle_v_requests): Likewise.
5557 2016-01-12 Pedro Alves <palves@redhat.com>
5559 Remove use of the registered trademark symbol throughout.
5561 2016-01-08 Yao Qi <yao.qi@linaro.org>
5563 * remote-utils.c (getpkt): If c is '\003', call target hook
5566 2016-01-06 Yao Qi <yao.qi@linaro.org>
5568 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
5569 linux-aarch32-low.c.
5570 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5571 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5572 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5573 (thumb2_breakpoint): Declare.
5574 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
5575 linux-aarch32-low.h.
5576 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5577 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
5578 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5580 2016-01-01 Joel Brobecker <brobecker@adacore.com>
5582 * gdbreplay.c (gdbreplay_version): Change copyright year in
5584 * server.c (gdbserver_version): Likewise.
5586 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
5588 * server.c (crc32_table): Delete.
5589 (crc32): Use libiberty's xcrc32 function.
5591 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5593 * lynx-low.c (lynx_delete_thread_callback): New function.
5594 (lynx_mourn): Properly delete our process and all of its
5595 threads. Remove call to clear_inferiors.
5597 2015-12-22 Joel Brobecker <brobecker@adacore.com>
5599 * target.c (thread_search_callback): Add check that
5600 the thread_stopped target callback is not NULL before
5603 2015-12-21 Yao Qi <yao.qi@linaro.org>
5605 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
5608 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5610 * server.c (handle_query): Call target_supports_software_single_step.
5612 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5614 * linux-low.c (single_step): New function.
5615 (linux_resume_one_lwp_throw): Call single_step.
5616 (start_step_over): Likewise.
5618 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5620 * Makefile.in (SFILES): Append arch/arm-linux.c,
5621 arch/arm-get-next-pcs.c.
5622 (arm-linux.o): New rule.
5623 (arm-get-next-pcs.o): New rule.
5624 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
5626 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
5627 to linux-aarch32-low.c.
5628 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5629 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5630 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5631 (thumb2_breakpoint_len): Likewise.
5632 (arm_is_thumb_mode): Make non-static.
5633 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
5634 from linux-aarch32-low.c.
5635 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5636 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5637 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5638 (thumb2_breakpoint_len): Likewise.
5639 (arm_is_thumb_mode): New declaration.
5640 * linux-arm-low.c: Include arch/arm-linux.h
5641 aarch/arm-get-next-pcs.h, sys/syscall.h.
5642 (get_next_pcs_ops): New struct.
5643 (get_next_pcs_addr_bits_remove): New function.
5644 (get_next_pcs_is_thumb): New function.
5645 (get_next_pcs_read_memory_unsigned_integer): Likewise.
5646 (arm_sigreturn_next_pc): Likewise.
5647 (get_next_pcs_syscall_next_pc): Likewise.
5648 (arm_gdbserver_get_next_pcs): Likewise.
5649 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
5651 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
5652 * server.h: Include gdb_vecs.h.
5654 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5656 * Makefile.in (SFILES): Append common/common-regcache.c.
5657 (OBS): Append common-regcache.o.
5658 (common-regcache.o): New rule.
5659 * regcache.c (init_register_cache): Initialize cache to
5661 (regcache_raw_read_unsigned): New function.
5662 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
5663 register_status enum.
5665 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
5667 * linux-aarch64-low.c (the_low_targets): Rename
5668 breakpoint_reinsert_addr to get_next_pcs.
5669 * linux-arm-low.c (the_low_targets): Likewise.
5670 * linux-bfin-low.c (the_low_targets): Likewise.
5671 * linux-cris-low.c (the_low_targets): Likewise.
5672 * linux-crisv32-low.c (the_low_targets): Likewise.
5673 * linux-low.c (can_software_single_step): Likewise.
5674 (install_software_single_step_breakpoints): New function.
5675 (start_step_over): Use install_software_single_step_breakpoints.
5676 * linux-low.h: New CORE_ADDR vector.
5677 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
5679 * linux-mips-low.c (the_low_targets): Likewise.
5680 * linux-nios2-low.c (the_low_targets): Likewise.
5681 * linux-sparc-low.c (the_low_targets): Likewise.
5683 2015-12-17 Pedro Alves <palves@redhat.com>
5685 * linux-low.c (linux_kill_one_lwp): Remove references to
5687 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
5689 (linux_init_signals): Delete.
5690 (initialize_low): Adjust.
5691 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
5693 2015-12-16 Pedro Alves <palves@redhat.com>
5695 * configure.ac (compiler warning flags): When testing a
5696 -Wno-foo option, check whether -Wfoo works instead.
5697 * configure: Regenerate.
5699 2015-12-11 Don Breazeal <donb@codesourcery.com>
5701 * server.c (process_serial_event): Don't exit from gdbserver
5702 in remote mode if there are still active inferiors.
5704 2015-12-11 Yao Qi <yao.qi@linaro.org>
5706 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
5707 arm_breakpoint_at if the process is 32-bit.
5709 2015-12-11 Yao Qi <yao.qi@linaro.org>
5711 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
5714 2015-12-07 Yao Qi <yao.qi@linaro.org>
5716 * configure.srv: Append arm.o to srv_tgtobj for
5717 aarch64*-*-linux* target.
5718 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
5719 from linux-arm-low.c.
5720 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
5721 (arm_breakpoint_len, thumb_breakpoint): Likewise.
5722 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
5723 (thumb2_breakpoint_len): Likewise.
5724 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
5725 (arm_breakpoint_kinds): Likewise.
5726 (arm_breakpoint_kind_from_pc): Likewise.
5727 (arm_sw_breakpoint_from_kind): Likewise.
5728 (arm_breakpoint_kind_from_current_state): Likewise.
5729 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
5730 (arm_sw_breakpoint_from_kind): Declare.
5731 (arm_breakpoint_kind_from_current_state): Declare.
5732 (arm_breakpoint_at): Declare.
5733 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
5734 arm_sw_breakpoint_from_kind if process is 32-bit.
5735 (aarch64_breakpoint_kind_from_pc): New function.
5736 (aarch64_breakpoint_kind_from_current_state): New function.
5737 (the_low_target): Initialize fields breakpoint_kind_from_pc
5738 and breakpoint_kind_from_current_state.
5739 * linux-arm-low.c (arm_breakpoint_kinds): Move to
5740 linux-aarch32-low.c.
5741 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
5742 (arm_breakpoint, arm_breakpoint_len): Likewise.
5743 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
5744 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
5745 (arm_is_thumb_mode): Likewise.
5746 (arm_breakpoint_at): Likewise.
5747 (arm_breakpoint_kind_from_pc): Likewise.
5748 (arm_sw_breakpoint_from_kind): Likewise.
5749 (arm_breakpoint_kind_from_current_state): Likewise.
5752 2015-08-04 Yao Qi <yao.qi@linaro.org>
5754 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5755 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5756 * server.c (extended_protocol): Remove "static".
5757 * server.h (extended_protocol): Declare it.
5759 2015-12-04 Josh Stone <jistone@redhat.com>
5761 * target.h (struct target_ops) <arch_setup>: Rename to ...
5762 (struct target_ops) <post_create_inferior>: ... this.
5763 (target_arch_setup): Rename to ...
5764 (target_post_create_inferior): ... this, calling post_create_inferior.
5765 * server.c (start_inferior): Update target_arch_setup calls to
5766 target_post_create_inferior.
5767 * linux-low.c (linux_low_ptrace_options): Forward declare.
5768 (linux_arch_setup): Update its comment for general use.
5769 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5770 (struct linux_target_ops): Use linux_post_create_inferior.
5771 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5772 to post_create_inferior.
5773 * nto-low.c (struct nto_target_ops): Likewise.
5774 * spu-low.c (struct spu_target_ops): Likewise.
5775 * win32-low.c (struct win32_target_ops): Likewise.
5777 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5779 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5781 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5783 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5784 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5785 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5786 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5787 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5788 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5789 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5790 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5791 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5792 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5793 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5794 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5796 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5798 * linux-low.c (linux_look_up_symbols): Don't call
5799 linux_supports_traceclone.
5800 * linux-low.h (thread_db_init): Remove use_events argument.
5801 * thread-db.c (thread_db_use_event): Remove global variable.
5802 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5803 (struct thread_db) <td_create_bp>: Remove field.
5804 (thread_db_create_event): Remove function.
5805 (thread_db_enable_reporting): Likewise.
5806 (find_one_thread): Don't check for thread_db_use_events.
5807 (attach_thread): Likewise.
5808 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5809 (try_thread_db_load_1): Don't check for thread_db_use_events.
5810 (thread_db_init): Remove use_events argument and thread events
5812 (remove_thread_event_breakpoints): Remove function.
5813 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5815 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5817 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5819 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5820 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5821 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5822 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5823 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5825 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5827 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5828 * linux-low.c (can_hardware_single_step): Use
5829 supports_hardware_single_step.
5830 (can_software_single_step): New function.
5831 (start_step_over): Call can_software_single_step.
5832 (linux_supports_hardware_single_step): New function.
5833 (struct target_ops) <supports_software_single_step>: Initialize.
5834 * linux-low.h (struct linux_target_ops)
5835 <supports_hardware_single_step>: Initialize.
5836 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5837 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5838 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5839 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5840 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5841 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5842 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5843 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5844 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5845 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5847 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5848 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5850 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5851 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5852 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5854 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5855 * target.h (struct target_ops): <supports_software_single_step>:
5857 (target_supports_software_single_step): New macro.
5859 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5861 * linux-low.c (linux_wait_1): Fix pc advance condition.
5862 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5863 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5865 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5867 * linux-arm-low.c (arm_is_thumb_mode): New function.
5868 (arm_breakpoint_at): Use arm_is_thumb_mode.
5869 (arm_breakpoint_kind_from_current_state): New function.
5870 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5872 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5873 (linux_breakpoint_kind_from_current_state): New function.
5874 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5875 * linux-low.h (struct linux_target_ops)
5876 <breakpoint_kind_from_current_state>: New field.
5877 * target.h (struct target_ops): Likewise.
5878 (target_breakpoint_kind_from_current_state): New macro.
5880 2015-11-30 Pedro Alves <palves@redhat.com>
5882 * linux-low.c (linux_resume): Wake up the event loop before
5885 2015-11-30 Pedro Alves <palves@redhat.com>
5887 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5889 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5891 * target.c (struct thread_search): New structure.
5892 (thread_search_callback): New function.
5893 (prev_general_thread): New global.
5894 (prepare_to_access_memory, done_accessing_memory): New functions.
5895 * target.h (prepare_to_access_memory, done_accessing_memory):
5896 Replace macros with function declarations.
5898 2015-11-30 Pedro Alves <palves@redhat.com>
5901 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5902 report TARGET_WAITKIND_NO_RESUMED.
5903 * remote-utils.c (prepare_resume_reply): Handle
5904 TARGET_WAITKIND_NO_RESUMED.
5905 * server.c (report_no_resumed): New global.
5906 (handle_query) <qSupported>: Handle "no-resumed+". Report
5907 "no-resumed+" support.
5908 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5909 return error if the client doesn't support no-resumed events.
5910 (push_stop_notification): New function.
5911 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5912 events if the client supports them.
5914 2015-11-30 Pedro Alves <palves@redhat.com>
5916 * linux-low.c (thread_still_has_status_pending_p): Don't check
5918 (lwp_resumed): New function.
5919 (status_pending_p_callback): Return early if the LWP is not
5920 supposed to be resumed.
5922 2015-11-30 Pedro Alves <palves@redhat.com>
5924 * linux-low.c (handle_extended_wait): Assert that the LWP's
5925 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5926 thread create events, leave the new child's status pending.
5927 (linux_low_filter_event): If GDB wants to hear about thread exit
5928 events, leave the LWP marked dead and don't delete it.
5929 (linux_wait_for_event_filtered): Don't check for thread exit.
5930 (filter_exit_event): New function.
5931 (linux_wait_1): Use it, when returning an exit event.
5932 (linux_resume_one_lwp_throw): Assert that the LWP's
5933 waitstatus is TARGET_WAITKIND_IGNORE.
5934 * remote-utils.c (prepare_resume_reply): Handle
5935 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5936 * server.c (report_thread_events): New global.
5937 (handle_general_set): Handle QThreadEvents.
5938 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5939 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5940 TARGET_WAITKIND_THREAD_EXITED.
5941 * server.h (report_thread_events): Declare.
5943 2015-11-30 Pedro Alves <palves@redhat.com>
5945 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5946 the thread's last_resume_kind was resume_stop.
5948 2015-11-30 Pedro Alves <palves@redhat.com>
5950 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5953 2015-11-30 Pedro Alves <palves@redhat.com>
5955 * server.c (handle_v_requests): Handle vCtrlC.
5957 2015-11-30 Pedro Alves <palves@redhat.com>
5959 * gdbthread.h (find_any_thread_of_pid): Declare.
5960 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5962 * server.c (handle_query): If current_thread is NULL, look for
5963 another thread of the selected process.
5965 2015-11-26 Daniel Colascione <dancol@dancol.org>
5966 Simon Marchi <simon.marchi@ericsson.com>
5968 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5969 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5971 * target.h (struct target_ops) <thread_name>: New field.
5972 (target_thread_name): New macro.
5974 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5976 * regcache.h (regcache_invalidate_pid): Add declaration.
5977 * regcache.c (regcache_invalidate_pid): New function, extracted
5978 from regcache_invalidate.
5979 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5980 Add trivial documentation comment.
5981 * lynx-low.c: Use regcache_invalidate_pid instead of
5982 regcache_invalidate.
5984 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5986 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5987 and Elf64_auxv_t if the target is Android.
5989 2015-11-22 Doug Evans <xdje42@gmail.com>
5991 * target.h: #include <sys/types.h>.
5993 2015-11-19 Pedro Alves <palves@redhat.com>
5995 * linux-low.c (linux_process_qsupported): Change prototype.
5997 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5999 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6000 and adjust to loop over all features.
6001 * server.c (handle_query) <qSupported>: Adjust to call
6002 target_process_qsupported once, passing it a vector of unprocessed
6004 * target.h (struct target_ops) <process_qsupported>: Change
6006 (target_process_qsupported): Adjust.
6008 2015-11-19 Pedro Alves <palves@redhat.com>
6010 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6012 * configure: Regenerate.
6014 2015-11-19 Pedro Alves <palves@redhat.com>
6016 * configure: Regenerate.
6018 2015-11-19 Yao Qi <yao.qi@linaro.org>
6020 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6023 2015-11-19 Yao Qi <yao.qi@linaro.org>
6025 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6026 (struct aarch64_operand): Move enum out.
6028 2015-11-19 Yao Qi <yao.qi@linaro.org>
6030 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6031 struct user_fpsimd_state *.
6032 (aarch64_store_fpregset): Likewise.
6034 2015-11-19 Yao Qi <yao.qi@linaro.org>
6036 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6037 struct user_pt_regs *.
6038 (aarch64_store_gregset): Likewise.
6040 2015-11-18 Pedro Alves <palves@redhat.com>
6042 * Makefile.in (all_object_files): Add $IPA_OBJS.
6044 2015-11-17 Pedro Alves <palves@redhat.com>
6046 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6047 GDB_SIGNAL_0 and gdb_signal_to_string.
6049 2015-11-17 Pedro Alves <palves@redhat.com>
6051 * win32-low.c (handle_output_debug_string): Remove parameter.
6052 (win32_kill): Remove our_status local and adjust call to
6053 handle_output_debug_string.
6054 (get_child_debug_event): Adjust call to
6055 handle_output_debug_string.
6057 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6059 * linux-mips-low.c (mips_fill_gregset): Add cast.
6060 (mips_store_gregset): Likewise.
6061 (mips_fill_fpregset): Likewise.
6062 (mips_store_fpregset): Likewise.
6064 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6066 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6069 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6071 * linux-mips-low.c (mips_linux_new_thread): Change type of
6072 watch_type to enum target_hw_bp_type.
6074 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6076 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6077 Change return type to arm_hwbp_type.
6079 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6081 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6082 (arm_store_gregset): Likewise.
6083 * linux-arm-low.c (arm_get_hwcap): Likewise.
6084 (arm_read_description): Likewise.
6086 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6088 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6090 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6092 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6093 (ppc_fill_vsxregset): Likewise.
6094 (ppc_store_vsxregset): Likewise.
6095 (ppc_fill_vrregset): Likewise.
6096 (ppc_store_vrregset): Likewise.
6097 (ppc_fill_evrregset): Likewise.
6098 (ppc_store_evrregset): Likewise.
6100 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6102 * linux-ppc-low.c (ppc_usrregs_info): Remove
6103 forward-declaration.
6104 (ppc_arch_setup): Move lower in file.
6106 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6108 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6109 (ps_pdwrite): Likewise.
6111 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6113 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6114 to after assert checks.
6116 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6118 * proc-service.c (ps_pdread): Add/adjust casts.
6119 (ps_pdwrite): Add/adjust casts.
6121 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6123 * server.c (handle_search_memory_1): Cast return value of
6126 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6128 * server.c (write_qxfer_response): Change type of data to
6131 2015-10-29 Pedro Alves <palves@redhat.com>
6133 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6135 2015-10-29 Pedro Alves <palves@redhat.com>
6137 * tracepoint.c (clear_installed_tracepoints): Add casts.
6139 2015-10-29 Pedro Alves <palves@redhat.com>
6141 * server.c (handle_v_cont, process_serial_event): Add enum
6142 gdb_signal casts to signal parsing code.
6144 2015-10-29 Pedro Alves <palves@redhat.com>
6146 * linux-low.h (NULL_REGSET): Define.
6147 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6148 * linux-arm-low.c (arm_regsets): Likewise.
6149 * linux-crisv32-low.c (cris_regsets): Likewise.
6150 * linux-m68k-low.c (m68k_regsets): Likewise.
6151 * linux-mips-low.c (mips_regsets): Likewise.
6152 * linux-nios2-low.c (nios2_regsets): Likewise.
6153 * linux-ppc-low.c (ppc_regsets): Likewise.
6154 * linux-s390-low.c (s390_regsets): Likewise.
6155 * linux-sh-low.c (sh_regsets): Likewise.
6156 * linux-sparc-low.c (sparc_regsets): Likewise.
6157 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6158 * linux-tile-low.c (tile_regsets): Likewise.
6159 * linux-x86-low.c (x86_regsets): Likewise.
6160 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6162 2015-10-29 Pedro Alves <palves@redhat.com>
6164 * linux-low.h (NULL_REGSET): Define.
6165 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6166 * linux-arm-low.c (arm_regsets): Likewise.
6167 * linux-crisv32-low.c (cris_regsets): Likewise.
6168 * linux-m68k-low.c (m68k_regsets): Likewise.
6169 * linux-mips-low.c (mips_regsets): Likewise.
6170 * linux-nios2-low.c (nios2_regsets): Likewise.
6171 * linux-ppc-low.c (ppc_regsets): Likewise.
6172 * linux-s390-low.c (s390_regsets): Likewise.
6173 * linux-sh-low.c (sh_regsets): Likewise.
6174 * linux-sparc-low.c (sparc_regsets): Likewise.
6175 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6176 * linux-tile-low.c (tile_regsets): Likewise.
6177 * linux-x86-low.c (x86_regsets): Likewise.
6178 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6180 2015-10-26 Doug Evans <dje@google.com>
6182 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6184 2015-10-26 Doug Evans <dje@google.com>
6186 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6188 2015-10-26 Doug Evans <dje@google.com>
6190 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6192 (attach_thread, find_new_threads_callback): Ditto.
6194 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6196 * mem-break.h (set_breakpoint_data): Remove.
6198 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6200 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6201 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6202 (initialize_low): Remove set_breakpoint_data call.
6203 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6204 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6205 (initialize_low): Remove set_breakpoint_data call.
6206 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6207 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6208 (initialize_low): Remove set_breakpoint_data call.
6210 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6212 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6213 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6214 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6215 * target.h (target_breakpoint_kind_from_pc): New macro.
6217 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6219 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6220 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6221 the default breakpoint kind.
6223 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6225 * linux-arm-low.c (arm_supports_z_point_type): Add software
6228 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6230 * linux-arm-low.c: Refactor breakpoint definitions.
6231 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6232 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6234 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6236 * Makefile.in: Add arm.c/o.
6237 * configure.srv: Likewise.
6238 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6239 (arm_breakpoint_kind_from_pc): New function.
6240 (arm_sw_breakpoint_from_kind): Return proper kind.
6241 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6243 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6245 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6247 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6248 (struct raw_breakpoint) <size>: Remove.
6249 (struct raw_breakpoint) <kind>: Add.
6250 (bp_size): New function.
6251 (bp_opcode): Likewise.
6252 (find_raw_breakpoint_at): Adjust for kind.
6253 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6254 (remove_memory_breakpoint): Adjust for kind call bp_size.
6255 (set_raw_breakpoint_at): Adjust for kind.
6256 (set_breakpoint): Likewise.
6257 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6258 (delete_raw_breakpoint): Adjust for kind.
6259 (delete_breakpoint): Likewise.
6260 (find_gdb_breakpoint): Likewise.
6261 (set_gdb_breakpoint_1): Likewise.
6262 (set_gdb_breakpoint): Likewise.
6263 (delete_gdb_breakpoint_1): Likewise.
6264 (delete_gdb_breakpoint): Likewise.
6265 (uninsert_raw_breakpoint): Likewise.
6266 (reinsert_raw_breakpoint): Likewise.
6267 (set_breakpoint_data): Remove.
6268 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6269 (check_mem_read): Adjust for kind call bp_size.
6270 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6271 (clone_one_breakpoint): Adjust for kind.
6272 * mem-break.h (set_gdb_breakpoint): Likewise.
6273 (delete_gdb_breakpoint): Likewise.
6274 * server.c (process_serial_event): Likewise.
6276 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6278 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6279 (struct linux_target_ops) <breakpoint>: Remove.
6280 (struct linux_target_ops) <breakpoint_len>: Remove.
6281 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6282 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6283 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6284 (arm_sw_breakpoint_from_kind): New function.
6285 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6286 (struct linux_target_ops) <breakpoint>: Remove.
6287 (struct linux_target_ops) <breakpoint_len>: Remove.
6288 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6289 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6290 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6291 (struct linux_target_ops) <breakpoint>: Remove.
6292 (struct linux_target_ops) <breakpoint_len>: Remove.
6293 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6294 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6295 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6296 (struct linux_target_ops) <breakpoint>: Remove.
6297 (struct linux_target_ops) <breakpoint_len>: Remove.
6298 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6299 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6300 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6301 and sw_breakpoint_from_kind to increment the pc.
6302 (linux_breakpoint_kind_from_pc): New function.
6303 (linux_sw_breakpoint_from_kind): New function.
6304 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6305 (initialize_low): Call breakpoint_kind_from_pc and
6306 sw_breakpoint_from_kind to replace breakpoint_data/len.
6307 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6309 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6310 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6311 (struct linux_target_ops) <breakpoint>: Remove.
6312 (struct linux_target_ops) <breakpoint_len>: Remove.
6313 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6314 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6315 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6316 (struct linux_target_ops) <breakpoint>: Remove.
6317 (struct linux_target_ops) <breakpoint_len>: Remove.
6318 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6319 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6320 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6321 (struct linux_target_ops) <breakpoint>: Remove.
6322 (struct linux_target_ops) <breakpoint_len>: Remove.
6323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6325 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6326 (struct linux_target_ops) <breakpoint>: Remove.
6327 (struct linux_target_ops) <breakpoint_len>: Remove.
6328 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6329 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6330 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6331 (struct linux_target_ops) <breakpoint>: Remove.
6332 (struct linux_target_ops) <breakpoint_len>: Remove.
6333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6335 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6336 (struct linux_target_ops) <breakpoint>: Remove.
6337 (struct linux_target_ops) <breakpoint_len>: Remove.
6338 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6339 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6340 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6341 (struct linux_target_ops) <breakpoint>: Remove.
6342 (struct linux_target_ops) <breakpoint_len>: Remove.
6343 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6344 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6345 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6346 (struct linux_target_ops) <breakpoint>: Remove.
6347 (struct linux_target_ops) <breakpoint_len>: Remove.
6348 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6349 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6350 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6351 (struct linux_target_ops) <breakpoint>: Remove.
6352 (struct linux_target_ops) <breakpoint_len>: Remove.
6353 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6354 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6355 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6356 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6357 (struct linux_target_ops) <breakpoint>: Remove.
6358 (struct linux_target_ops) <breakpoint_len>: Remove.
6359 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6360 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6361 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6362 (struct linux_target_ops) <breakpoint>: Remove.
6363 (struct linux_target_ops) <breakpoint_len>: Remove.
6364 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6365 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6367 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6369 * linux-cris-low.c (cris_get_pc): Remove void arg.
6371 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6373 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6376 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6378 * inferiors.c (thread_pid_matches_callback): New function.
6379 (find_thread_process): New function.
6380 (remove_thread): Reset current_thread.
6381 (remove_process): Assert threads have been removed first.
6383 2015-10-15 Yao Qi <yao.qi@linaro.org>
6385 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6387 (aarch64_remove_point): Likewise.
6388 * regcache.c (regcache_register_size): New function.
6390 2015-10-12 Yao Qi <yao.qi@linaro.org>
6392 * linux-aarch64-low.c: Update all callers as emit_load_store
6393 is renamed to aarch64_emit_load_store.
6395 2015-10-12 Yao Qi <yao.qi@linaro.org>
6397 * linux-aarch64-low.c: Update all callers of function renaming
6398 from emit_insn to aarch64_emit_insn.
6400 2015-10-12 Yao Qi <yao.qi@linaro.org>
6402 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6403 arch/aarch64-insn.h.
6404 (struct aarch64_memory_operand): Likewise.
6406 (emit_insn): Move to arch/aarch64-insn.c.
6407 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6408 (emit_load_store): Move to arch/aarch64-insn.c.
6409 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6410 (can_encode_int32): Remove.
6412 2015-10-12 Yao Qi <yao.qi@linaro.org>
6414 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6415 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6416 (aarch64_relocate_instruction): Likewise.
6417 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6418 (struct aarch64_insn_visitor): Likewise.
6420 2015-10-12 Yao Qi <yao.qi@linaro.org>
6422 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6423 (struct aarch64_insn_visitor): New.
6424 (struct aarch64_insn_relocation_data): New.
6425 (aarch64_ftrace_insn_reloc_b): New function.
6426 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6427 (aarch64_ftrace_insn_reloc_cb): Likewise.
6428 (aarch64_ftrace_insn_reloc_tb): Likewise.
6429 (aarch64_ftrace_insn_reloc_adr): Likewise.
6430 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6431 (aarch64_ftrace_insn_reloc_others): Likewise.
6433 (aarch64_relocate_instruction): Use visitor.
6435 2015-10-12 Yao Qi <yao.qi@linaro.org>
6437 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6438 int. Add argument buf.
6439 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6440 aarch64_relocate_instruction.
6442 2015-10-12 Yao Qi <yao.qi@linaro.org>
6444 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6445 argument insn. Remove local variable insn. Don't call
6447 (aarch64_install_fast_tracepoint_jump_pad): Call
6450 2015-09-30 Yao Qi <yao.qi@linaro.org>
6452 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6453 (emit_load_store_pair): Likewise.
6455 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6457 * dll.c (match_dll): Add cast(s).
6458 (unloaded_dll): Likewise.
6459 * linux-low.c (second_thread_of_pid_p): Likewise.
6460 (delete_lwp_callback): Likewise.
6461 (count_events_callback): Likewise.
6462 (select_event_lwp_callback): Likewise.
6463 (linux_set_resume_request): Likewise.
6464 * server.c (accumulate_file_name_length): Likewise.
6465 (emit_dll_description): Likewise.
6466 (handle_qxfer_threads_worker): Likewise.
6467 (visit_actioned_threads): Likewise.
6468 * thread-db.c (any_thread_of): Likewise.
6469 * tracepoint.c (same_process_p): Likewise.
6470 (match_blocktype): Likewise.
6471 (build_traceframe_info_xml): Likewise.
6473 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6475 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6477 (gdb_unparse_agent_expr): Likewise.
6478 * hostio.c (require_data): Likewise.
6479 (handle_pread): Likewise.
6480 * linux-low.c (disable_regset): Likewise.
6481 (fetch_register): Likewise.
6482 (store_register): Likewise.
6483 (get_dynamic): Likewise.
6484 (linux_qxfer_libraries_svr4): Likewise.
6485 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6486 (set_fast_tracepoint_jump): Likewise.
6487 (uninsert_fast_tracepoint_jumps_at): Likewise.
6488 (reinsert_fast_tracepoint_jumps_at): Likewise.
6489 (validate_inserted_breakpoint): Likewise.
6490 (clone_agent_expr): Likewise.
6491 * regcache.c (init_register_cache): Likewise.
6492 * remote-utils.c (putpkt_binary_1): Likewise.
6493 (decode_M_packet): Likewise.
6494 (decode_X_packet): Likewise.
6495 (look_up_one_symbol): Likewise.
6496 (relocate_instruction): Likewise.
6497 (monitor_output): Likewise.
6498 * server.c (handle_search_memory): Likewise.
6499 (handle_qxfer_exec_file): Likewise.
6500 (handle_qxfer_libraries): Likewise.
6501 (handle_qxfer): Likewise.
6502 (handle_query): Likewise.
6503 (handle_v_cont): Likewise.
6504 (handle_v_run): Likewise.
6505 (captured_main): Likewise.
6506 * target.c (write_inferior_memory): Likewise.
6507 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6508 * tracepoint.c (init_trace_buffer): Likewise.
6509 (add_tracepoint_action): Likewise.
6510 (add_traceframe): Likewise.
6511 (add_traceframe_block): Likewise.
6512 (cmd_qtdpsrc): Likewise.
6513 (cmd_qtdv): Likewise.
6514 (cmd_qtstatus): Likewise.
6515 (response_source): Likewise.
6516 (response_tsv): Likewise.
6517 (cmd_qtnotes): Likewise.
6518 (gdb_collect): Likewise.
6519 (initialize_tracepoint): Likewise.
6521 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6523 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6524 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6525 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6527 (enum aarch64_condition_codes): New enum.
6528 (w0): New static global.
6531 (struct aarch64_memory_operand) <type>: New
6532 MEMORY_OPERAND_POSTINDEX type.
6533 (postindex_memory_operand): New helper function.
6534 (emit_ret): New function.
6535 (emit_load_store_pair): New function, factored out of emit_stp
6536 with support for MEMORY_OPERAND_POSTINDEX.
6537 (emit_stp): Rewrite using emit_load_store_pair.
6538 (emit_ldp): New function.
6539 (emit_load_store): Likewise.
6540 (emit_ldr): Mention post-index instruction in comment.
6541 (emit_ldrh): New function.
6542 (emit_ldrb): New function.
6543 (emit_ldrsw): Mention post-index instruction in comment.
6544 (emit_str): Likewise.
6545 (emit_subs): New function.
6546 (emit_cmp): Likewise.
6547 (emit_and): Likewise.
6548 (emit_orr): Likewise.
6549 (emit_orn): Likewise.
6550 (emit_eor): Likewise.
6551 (emit_mvn): Likewise.
6552 (emit_lslv): Likewise.
6553 (emit_lsrv): Likewise.
6554 (emit_asrv): Likewise.
6555 (emit_mul): Likewise.
6556 (emit_sbfm): Likewise.
6557 (emit_sbfx): Likewise.
6558 (emit_ubfm): Likewise.
6559 (emit_ubfx): Likewise.
6560 (emit_csinc): Likewise.
6561 (emit_cset): Likewise.
6562 (emit_nop): Likewise.
6563 (emit_ops_insns): New helper function.
6564 (emit_pop): Likewise.
6565 (emit_push): Likewise.
6566 (aarch64_emit_prologue): New function.
6567 (aarch64_emit_epilogue): Likewise.
6568 (aarch64_emit_add): Likewise.
6569 (aarch64_emit_sub): Likewise.
6570 (aarch64_emit_mul): Likewise.
6571 (aarch64_emit_lsh): Likewise.
6572 (aarch64_emit_rsh_signed): Likewise.
6573 (aarch64_emit_rsh_unsigned): Likewise.
6574 (aarch64_emit_ext): Likewise.
6575 (aarch64_emit_log_not): Likewise.
6576 (aarch64_emit_bit_and): Likewise.
6577 (aarch64_emit_bit_or): Likewise.
6578 (aarch64_emit_bit_xor): Likewise.
6579 (aarch64_emit_bit_not): Likewise.
6580 (aarch64_emit_equal): Likewise.
6581 (aarch64_emit_less_signed): Likewise.
6582 (aarch64_emit_less_unsigned): Likewise.
6583 (aarch64_emit_ref): Likewise.
6584 (aarch64_emit_if_goto): Likewise.
6585 (aarch64_emit_goto): Likewise.
6586 (aarch64_write_goto_address): Likewise.
6587 (aarch64_emit_const): Likewise.
6588 (aarch64_emit_call): Likewise.
6589 (aarch64_emit_reg): Likewise.
6590 (aarch64_emit_pop): Likewise.
6591 (aarch64_emit_stack_flush): Likewise.
6592 (aarch64_emit_zero_ext): Likewise.
6593 (aarch64_emit_swap): Likewise.
6594 (aarch64_emit_stack_adjust): Likewise.
6595 (aarch64_emit_int_call_1): Likewise.
6596 (aarch64_emit_void_call_2): Likewise.
6597 (aarch64_emit_eq_goto): Likewise.
6598 (aarch64_emit_ne_goto): Likewise.
6599 (aarch64_emit_lt_goto): Likewise.
6600 (aarch64_emit_le_goto): Likewise.
6601 (aarch64_emit_gt_goto): Likewise.
6602 (aarch64_emit_ge_got): Likewise.
6603 (aarch64_emit_ops_impl): New static global variable.
6604 (aarch64_emit_ops): New target function, return
6605 &aarch64_emit_ops_impl.
6606 (struct linux_target_ops): Install it.
6608 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6610 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
6611 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
6613 * linux-aarch64-ipa.c: New file.
6614 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
6616 (aarch64_get_thread_area): New target method.
6617 (extract_signed_bitfield): New helper function.
6618 (aarch64_decode_ldr_literal): New function.
6619 (enum aarch64_opcodes): New enum.
6620 (struct aarch64_register): New struct.
6621 (struct aarch64_operand): New struct.
6622 (x0): New static global.
6631 (aarch64_register): New helper function.
6632 (register_operand): Likewise.
6633 (immediate_operand): Likewise.
6634 (struct aarch64_memory_operand): New struct.
6635 (offset_memory_operand): New helper function.
6636 (preindex_memory_operand): Likewise.
6637 (enum aarch64_system_control_registers): New enum.
6638 (ENCODE): New macro.
6639 (emit_insn): New helper function.
6640 (emit_b): New function.
6641 (emit_bcond): Likewise.
6642 (emit_cb): Likewise.
6643 (emit_tb): Likewise.
6644 (emit_blr): Likewise.
6645 (emit_stp): Likewise.
6646 (emit_ldp_q_offset): Likewise.
6647 (emit_stp_q_offset): Likewise.
6648 (emit_load_store): Likewise.
6649 (emit_ldr): Likewise.
6650 (emit_ldrsw): Likewise.
6651 (emit_str): Likewise.
6652 (emit_ldaxr): Likewise.
6653 (emit_stxr): Likewise.
6654 (emit_stlr): Likewise.
6655 (emit_data_processing_reg): Likewise.
6656 (emit_data_processing): Likewise.
6657 (emit_add): Likewise.
6658 (emit_sub): Likewise.
6659 (emit_mov): Likewise.
6660 (emit_movk): Likewise.
6661 (emit_mov_addr): Likewise.
6662 (emit_mrs): Likewise.
6663 (emit_msr): Likewise.
6664 (emit_sevl): Likewise.
6665 (emit_wfe): Likewise.
6666 (append_insns): Likewise.
6667 (can_encode_int32_in): New helper function.
6668 (aarch64_relocate_instruction): New function.
6669 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
6670 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
6671 (struct linux_target_ops): Install aarch64_get_thread_area,
6672 aarch64_install_fast_tracepoint_jump_pad and
6673 aarch64_get_min_fast_tracepoint_insn_len.
6675 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6677 * Makefile.in (aarch64-insn.o): New rule.
6678 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
6680 2015-09-21 Yao Qi <yao.qi@linaro.org>
6682 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
6684 2015-09-21 Yao Qi <yao.qi@linaro.org>
6686 * tracepoint.c (max_jump_pad_size): Remove.
6688 2015-09-18 Yao Qi <yao.qi@linaro.org>
6690 * linux-aarch64-low.c: Don't include sys/uio.h.
6691 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
6693 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
6695 * tracepoint.c (eval_result_type): Change prototype.
6696 (condition_true_at_tracepoint): Fix argument to compiled_cond.
6698 2015-09-15 Pedro Alves <palves@redhat.com>
6700 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
6701 Check whether to report exec events instead of checking whether
6702 multiprocess is enabled.
6704 2015-09-15 Pedro Alves <palves@redhat.com>
6707 * remote-utils.c (prepare_resume_reply): Merge
6708 TARGET_WAITKIND_VFORK_DONE switch case with the
6709 TARGET_WAITKIND_FORKED case.
6711 2015-09-15 Yao Qi <yao.qi@linaro.org>
6713 * server.c (handle_query): Check string comparison using
6714 "else if" instead of "if".
6716 2015-09-15 Yao Qi <yao.qi@linaro.org>
6718 * server.c (vCont_supported): New global variable.
6719 (handle_query): Set vCont_supported to 1 if "vContSupported+"
6720 matches. Append ";vContSupported+" to own_buf.
6721 (handle_v_requests): Append ";s;S" to own_buf if target supports
6722 hardware single step or vCont_supported is false.
6723 (capture_main): Set vCont_supported to zero.
6725 2015-09-15 Yao Qi <yao.qi@linaro.org>
6727 * linux-low.c (linux_supports_conditional_breakpoints): Rename
6729 (linux_supports_hardware_single_step): ... New function.
6730 (linux_target_ops): Update.
6731 * lynx-low.c (lynx_target_ops): Set field
6732 supports_hardware_single_step to target_can_do_hardware_single_step.
6733 * nto-low.c (nto_target_ops): Likewise.
6734 * spu-low.c (spu_target_ops): Likewise.
6735 * win32-low.c (win32_target_ops): Likewise.
6736 * target.c (target_can_do_hardware_single_step): New function.
6737 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6738 Remove. <supports_hardware_single_step>: New field.
6739 (target_supports_conditional_breakpoints): Remove.
6740 (target_supports_hardware_single_step): New macro.
6741 (target_can_do_hardware_single_step): Declare.
6742 * server.c (handle_query): Use target_supports_hardware_single_step
6743 instead of target_supports_conditional_breakpoints.
6745 2015-09-15 Yao Qi <yao.qi@linaro.org>
6747 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6749 (struct linux_target_ops the_low_target): Install
6750 aarch64_linux_siginfo_fixup.
6752 2015-09-11 Don Breazeal <donb@codesourcery.com>
6753 Luis Machado <lgustavo@codesourcery.com>
6755 * linux-low.c (linux_mourn): Static declaration.
6756 (linux_arch_setup): Move in front of
6757 handle_extended_wait.
6758 (linux_arch_setup_thread): New function.
6759 (handle_extended_wait): Handle exec events. Call
6760 linux_arch_setup_thread. Make event_lwp argument a
6761 pointer-to-a-pointer.
6762 (check_zombie_leaders): Do not check stopped threads.
6763 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6764 (linux_low_filter_event): Add lwp and thread for exec'ing
6765 non-leader thread if leader thread has been deleted.
6766 Refactor code into linux_arch_setup_thread and call it.
6767 Pass child lwp pointer by reference to handle_extended_wait.
6768 (linux_wait_for_event_filtered): Update comment.
6769 (linux_wait_1): Prevent clobbering exec event status.
6770 (linux_supports_exec_events): New function.
6771 (linux_target_ops) <supports_exec_events>: Initialize new member.
6772 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6774 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6775 * server.c (report_exec_events): New global variable.
6776 (handle_query): Handle qSupported query for exec-events feature.
6777 (captured_main): Initialize report_exec_events.
6778 * server.h (report_exec_events): Declare new global variable.
6779 * target.h (struct target_ops) <supports_exec_events>: New
6781 (target_supports_exec_events): New macro.
6782 * win32-low.c (win32_target_ops) <supports_exec_events>:
6783 Initialize new member.
6785 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6787 * linux-low.c (linux_low_enable_btrace): Remove.
6788 (linux_target_ops): Replace linux_low_enable_btrace with
6789 linux_enable_btrace.
6791 2015-09-03 Yao Qi <yao.qi@linaro.org>
6793 * linux-aarch64-low.c (aarch64_insert_point): Call
6794 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6797 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6799 * linux-low.c (check_stopped_by_breakpoint): Use
6800 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6802 2015-08-27 Pedro Alves <palves@redhat.com>
6804 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6806 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6808 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6809 the XNEW-family equivalent.
6810 (compile_bytecodes): Likewise.
6811 * dll.c (loaded_dll): Likewise.
6812 * event-loop.c (append_callback_event): Likewise.
6813 (create_file_handler): Likewise.
6814 (create_file_event): Likewise.
6815 * hostio.c (handle_open): Likewise.
6816 * inferiors.c (add_thread): Likewise.
6817 (add_process): Likewise.
6818 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6819 * linux-arm-low.c (arm_new_process): Likewise.
6820 (arm_new_thread): Likewise.
6821 * linux-low.c (add_to_pid_list): Likewise.
6822 (linux_add_process): Likewise.
6823 (handle_extended_wait): Likewise.
6824 (add_lwp): Likewise.
6825 (enqueue_one_deferred_signal): Likewise.
6826 (enqueue_pending_signal): Likewise.
6827 (linux_resume_one_lwp_throw): Likewise.
6828 (linux_resume_one_thread): Likewise.
6829 (linux_read_memory): Likewise.
6830 (linux_write_memory): Likewise.
6831 * linux-mips-low.c (mips_linux_new_process): Likewise.
6832 (mips_linux_new_thread): Likewise.
6833 (mips_add_watchpoint): Likewise.
6834 * linux-x86-low.c (initialize_low_arch): Likewise.
6835 * lynx-low.c (lynx_add_process): Likewise.
6836 * mem-break.c (set_raw_breakpoint_at): Likewise.
6837 (set_breakpoint): Likewise.
6838 (add_condition_to_breakpoint): Likewise.
6839 (add_commands_to_breakpoint): Likewise.
6840 (clone_agent_expr): Likewise.
6841 (clone_one_breakpoint): Likewise.
6842 * regcache.c (new_register_cache): Likewise.
6843 * remote-utils.c (look_up_one_symbol): Likewise.
6844 * server.c (queue_stop_reply): Likewise.
6845 (start_inferior): Likewise.
6846 (queue_stop_reply_callback): Likewise.
6847 (handle_target_event): Likewise.
6848 * spu-low.c (fetch_ppc_memory): Likewise.
6849 (store_ppc_memory): Likewise.
6850 * target.c (set_target_ops): Likewise.
6851 * thread-db.c (thread_db_load_search): Likewise.
6852 (try_thread_db_load_1): Likewise.
6853 * tracepoint.c (add_tracepoint): Likewise.
6854 (add_tracepoint_action): Likewise.
6855 (create_trace_state_variable): Likewise.
6856 (cmd_qtdpsrc): Likewise.
6857 (cmd_qtro): Likewise.
6858 (add_while_stepping_state): Likewise.
6859 * win32-low.c (child_add_thread): Likewise.
6860 (get_image_name): Likewise.
6862 2015-08-25 Yao Qi <yao.qi@linaro.org>
6864 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6866 2015-08-25 Yao Qi <yao.qi@linaro.org>
6868 * Makefile.in (aarch64-linux.o): New rule.
6869 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6871 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6872 (aarch64_init_debug_reg_state): Make it extern.
6873 (aarch64_linux_prepare_to_resume): Remove.
6875 2015-08-25 Yao Qi <yao.qi@linaro.org>
6877 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6878 lwp_arch_private_info and ptid_of_lwp.
6880 2015-08-25 Yao Qi <yao.qi@linaro.org>
6882 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6883 Find proc_info by find_process_pid. All callers updated.
6885 2015-08-25 Yao Qi <yao.qi@linaro.org>
6887 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6889 (debug_reg_change_callback): Remove.
6890 (aarch64_notify_debug_reg_change): Remove.
6892 2015-08-25 Yao Qi <yao.qi@linaro.org>
6894 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6895 Call current_lwp_ptid.
6897 2015-08-25 Yao Qi <yao.qi@linaro.org>
6899 * linux-aarch64-low.c (debug_reg_change_callback): Use
6902 2015-08-25 Yao Qi <yao.qi@linaro.org>
6904 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6906 2015-08-25 Yao Qi <yao.qi@linaro.org>
6908 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6910 2015-08-25 Yao Qi <yao.qi@linaro.org>
6912 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6915 2015-08-25 Yao Qi <yao.qi@linaro.org>
6917 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6919 (debug_reg_change_callback): Remove argument entry and add argument
6920 lwp. Remove local variable thread. Don't print thread id in the
6921 debugging output. Don't check whether pid of thread equals to pid.
6922 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6923 iterate_over_lwps instead find_inferior.
6925 2015-08-24 Pedro Alves <palves@redhat.com>
6927 * inferiors.c (get_first_process): New function.
6928 * inferiors.h (get_first_process): New declaration.
6929 * remote-utils.c (read_ptid): Default to the first process in the
6930 list, instead of to the current thread's process.
6932 2015-08-24 Pedro Alves <palves@redhat.com>
6934 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6935 * event-loop.c: Likewise.
6936 * remote-utils.c: Likewise.
6937 * tracepoint.c: Likewise.
6939 2015-08-24 Pedro Alves <palves@redhat.com>
6941 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6944 2015-08-21 Pedro Alves <palves@redhat.com>
6946 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6947 instead of literal 1.
6949 2015-08-21 Pedro Alves <palves@redhat.com>
6951 * tdesc.c (default_description): Explicitly zero-initialize.
6953 2015-08-21 Pedro Alves <palves@redhat.com>
6956 * inferiors.c (remove_thread): Discard any pending stop reply for
6958 * server.c (remove_all_on_match_pid): Rename to ...
6959 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6961 (discard_queued_stop_replies): Change parameter to a ptid. Now
6963 (handle_v_kill, kill_inferior_callback, captured_main)
6964 (process_serial_event): Adjust.
6965 * server.h (discard_queued_stop_replies): Declare.
6967 2015-08-21 Pedro Alves <palves@redhat.com>
6969 * linux-low.c (wait_for_sigstop): Always switch to no thread
6970 selected if the previously current thread dies.
6971 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6972 process instead of the current thread's.
6973 * remote-utils.c (input_interrupt): Don't check if there's no
6975 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6976 current thread to the general thread fails, error out.
6977 (handle_qxfer_auxv, handle_qxfer_libraries)
6978 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6979 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6980 (handle_query): Check if there's a thread selected instead of
6981 checking whether there's any thread in the thread list.
6982 (handle_qxfer_threads, handle_qxfer_btrace)
6983 (handle_qxfer_btrace_conf): Don't error out early if there's no
6984 thread in the thread list.
6985 (handle_v_cont, myresume): Don't set the current thread to the
6987 (process_serial_event) <Hg handling>: Also set thread_id if the
6988 previous general thread is still alive.
6989 (process_serial_event) <g/G handling>: If setting the current
6990 thread to the general thread fails, error out.
6991 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6992 thread's lwp instead of the current thread's.
6993 * target.c (set_desired_thread): If the desired thread was not
6994 found, leave the current thread pointing to NULL. Return an int
6995 (boolean) indicating success.
6996 * target.h (set_desired_thread): Change return type to int.
6998 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7000 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7001 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7003 (ps_get_thread_area): New function.
7005 2015-08-19 Gary Benson <gbenson@redhat.com>
7007 * hostio.c (handle_pread): Do not attempt to read more data
7008 than hostio_reply_with_data can fit in a packet.
7010 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7012 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7014 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7016 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7018 2015-08-06 Pedro Alves <palves@redhat.com>
7020 * tracepoint.c (expr_eval_result): Now an int.
7022 2015-08-06 Pedro Alves <palves@redhat.com>
7024 * gdbthread.h (struct regcache): Forward declare.
7025 (struct thread_info) <regcache_data>: Now a struct regcache
7027 * inferiors.c (inferior_regcache_data)
7028 (set_inferior_regcache_data): Now work with struct regcache
7030 * inferiors.h (struct regcache): Forward declare.
7031 (inferior_regcache_data, set_inferior_regcache_data): Now work
7032 with struct regcache pointers.
7033 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7034 (free_register_cache_thread): Remove struct regcache pointer
7037 2015-08-06 Pedro Alves <palves@redhat.com>
7039 * server.c (captured_main): On error, print the exception message
7040 to stderr, and if run_once is set, throw a quit.
7042 2015-08-06 Pedro Alves <palves@redhat.com>
7044 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7047 2015-08-06 Pedro Alves <palves@redhat.com>
7049 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7050 reading beyond the passed in buffer length.
7052 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7054 * tracepoint.c (symbol_list) <required>: Remove.
7056 2015-08-06 Pedro Alves <palves@redhat.com>
7058 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7059 count if stopping and suspending threads.
7060 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7061 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7062 (linux_detach): Complete an ongoing step-over.
7063 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7065 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7066 (linux_wait_1): If passing a signal to the inferior after
7067 finishing a step-over, unsuspend and re-resume all lwps. If we
7068 see a single-step event but the thread should be continuing, don't
7069 pass the trap to gdb.
7070 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7071 internal_error instead of gdb_assert.
7072 (enqueue_pending_signal): New function.
7073 (check_ptrace_stopped_lwp_gone): Add debug output.
7074 (start_step_over): Use internal_error instead of gdb_assert.
7075 (complete_ongoing_step_over): New function.
7076 (linux_resume_one_thread): Don't resume a suspended thread.
7077 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7080 2015-08-06 Pedro Alves <palves@redhat.com>
7082 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7083 (linux_thread_alive): Use lwp_is_marked_dead.
7084 (extended_event_reported): Delete.
7085 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7086 instead of extended_event_reported.
7087 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7089 (lwp_is_marked_dead): New function.
7090 (lwp_running): Use lwp_is_marked_dead.
7091 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7094 2015-08-06 Pedro Alves <palves@redhat.com>
7096 * linux-low.c (linux_wait_1): Move fork event output out of the
7097 !report_to_gdb check. Pass event_child->waitstatus to
7098 target_waitstatus_to_string instead of ourstatus.
7100 2015-08-04 Yao Qi <yao.qi@linaro.org>
7102 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7103 if current_thread is 32 bit.
7105 2015-08-04 Yao Qi <yao.qi@linaro.org>
7107 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7108 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7109 * server.c (extended_protocol): Remove "static".
7110 * server.h (extended_protocol): Declare it.
7112 2015-08-04 Yao Qi <yao.qi@linaro.org>
7114 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7115 both aarch64 and aarch32.
7116 (aarch64_set_pc): Likewise.
7118 2015-08-04 Yao Qi <yao.qi@linaro.org>
7120 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7121 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7122 arm-with-neon.xml to srv_xmlfiles.
7123 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7124 (is_64bit_tdesc): New function.
7125 (aarch64_linux_read_description): New function.
7126 (aarch64_arch_setup): Call aarch64_linux_read_description.
7127 (regs_info): Rename to regs_info_aarch64.
7128 (aarch64_regs_info): Return right regs_info.
7129 (initialize_low_arch): Call initialize_low_arch_aarch32.
7131 2015-08-04 Yao Qi <yao.qi@linaro.org>
7133 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7134 * linux-aarch32-low.c: New file.
7135 * linux-aarch32-low.h: New file.
7136 * linux-arm-low.c (arm_fill_gregset): Move it to
7137 linux-aarch32-low.c.
7138 (arm_store_gregset): Likewise.
7139 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7140 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7141 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7142 (regs_info): Rename to regs_info_arm.
7143 (arm_regs_info): Return regs_info_aarch32 if
7144 have_ptrace_getregset is 1 and target description is
7145 arm_with_neon or arm_with_vfpv3.
7146 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7147 Call initialize_low_arch_aarch32 instead.
7149 2015-08-04 Yao Qi <yao.qi@linaro.org>
7151 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7152 * linux-low.c: ... here.
7153 * linux-low.h (have_ptrace_getregset): Declare it.
7155 2015-08-04 Pedro Alves <palves@redhat.com>
7157 * thread-db.c (struct thread_db): Use new typedefs.
7158 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7160 (disable_thread_event_reporting): Cast result of dlsym to
7161 destination function pointer type.
7162 (thread_db_mourn): Use td_ta_delete_ftype.
7164 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7166 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7168 (CDX_BREAKPOINT): Define for R2.
7169 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7170 (the_low_target): Add comments.
7172 2015-07-30 Yao Qi <yao.qi@linaro.org>
7174 * linux-arm-low.c (arm_hwcap): Remove it.
7175 (arm_read_description): New local variable arm_hwcap. Don't
7176 set arm_hwcap to zero.
7178 2015-07-30 Yao Qi <yao.qi@linaro.org>
7180 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7181 Use regcache->tdesc instead.
7182 (arm_store_wmmxregset): Likewise.
7183 (arm_fill_vfpregset): Likewise.
7184 (arm_store_vfpregset): Likewise.
7186 2015-07-30 Yao Qi <yao.qi@linaro.org>
7188 * linux-arm-low.c: Include arch/arm.h.
7189 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7190 (arm_store_gregset): Likewise.
7192 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7194 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7195 ptrace's 4th parameter.
7197 2015-07-27 Yao Qi <yao.qi@linaro.org>
7199 * configure.srv (case aarch64*-*-linux*): Don't set
7202 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7204 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7206 * linux-arm-low.c: Likewise.
7207 * linux-cris-low.c: Likewise.
7208 * linux-crisv32-low.c: Likewise.
7209 * linux-low.c: Likewise.
7210 * linux-m68k-low.c: Likewise.
7211 * linux-mips-low.c: Likewise.
7212 * linux-nios2-low.c: Likewise.
7213 * linux-s390-low.c: Likewise.
7214 * linux-sparc-low.c: Likewise.
7215 * linux-tic6x-low.c: Likewise.
7216 * linux-tile-low.c: Likewise.
7217 * linux-x86-low.c: Likewise.
7219 2015-07-24 Pedro Alves <palves@redhat.com>
7221 * config.in: Regenerate.
7222 * configure: Regenerate.
7224 2015-07-24 Pedro Alves <palves@redhat.com>
7226 * acinclude.m4: Include ../ptrace.m4.
7227 * configure.ac: Call GDB_AC_PTRACE.
7228 * config.in, configure: Regenerate.
7230 2015-07-24 Yao Qi <yao.qi@linaro.org>
7232 * linux-low.c (linux_create_inferior): Remove setting to
7233 proc->priv->new_inferior.
7234 (linux_attach): Likewise.
7235 (linux_low_filter_event): Likewise.
7236 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7238 2015-07-24 Yao Qi <yao.qi@linaro.org>
7240 * linux-low.c (linux_arch_setup): New function.
7241 (linux_low_filter_event): If proc->tdesc is NULL and
7242 proc->attached is true, call the_low_target.arch_setup.
7243 Otherwise, keep status pending, and return.
7244 (linux_resume_one_lwp_throw): Don't call get_pc if
7245 thread->while_stepping isn't NULL. Don't call
7246 get_thread_regcache if proc->tdesc is NULL.
7247 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7248 (linux_target_ops): Install arch_setup.
7249 * server.c (start_inferior): Call the_target->arch_setup.
7250 * target.h (struct target_ops) <arch_setup>: New field.
7251 (target_arch_setup): New marco.
7252 * lynx-low.c (lynx_target_ops): Update.
7253 * nto-low.c (nto_target_ops): Update.
7254 * spu-low.c (spu_target_ops): Update.
7255 * win32-low.c (win32_target_ops): Update.
7257 2015-07-24 Yao Qi <yao.qi@linaro.org>
7259 * linux-low.c (linux_add_process): Don't set
7260 proc->priv->new_inferior.
7261 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7262 (linux_attach): Likewise.
7264 2015-07-24 Yao Qi <yao.qi@linaro.org>
7266 * server.c (start_inferior): Code refactor.
7268 2015-07-24 Yao Qi <yao.qi@linaro.org>
7270 * server.c (process_serial_event): Set general_thread.
7272 2015-07-21 Yao Qi <yao.qi@linaro.org>
7274 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7275 aarch64_linux_get_debug_reg_capacity.
7277 2015-07-17 Yao Qi <yao.qi@linaro.org>
7279 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7280 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7281 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7282 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7283 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7284 (AARCH64_HWP_ALIGNMENT): Likewise.
7285 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7286 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7287 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7288 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7289 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7290 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7291 (struct aarch64_debug_reg_state): Likewise.
7292 (struct arch_lwp_info): Likewise.
7293 (aarch64_align_watchpoint): Likewise.
7294 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7295 (aarch64_watchpoint_length): Likewise.
7296 (aarch64_point_encode_ctrl_reg): Likewise
7297 (aarch64_point_is_aligned): Likewise.
7298 (aarch64_align_watchpoint): Likewise.
7299 (aarch64_linux_set_debug_regs):
7300 (aarch64_dr_state_insert_one_point): Likewise.
7301 (aarch64_dr_state_remove_one_point): Likewise.
7302 (aarch64_handle_breakpoint): Likewise.
7303 (aarch64_handle_aligned_watchpoint): Likewise.
7304 (aarch64_handle_unaligned_watchpoint): Likewise.
7305 (aarch64_handle_watchpoint): Likewise.
7307 2015-07-17 Yao Qi <yao.qi@linaro.org>
7309 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7310 and don't aarch64_get_debug_reg_state. All callers update.
7311 (aarch64_handle_aligned_watchpoint): Likewise.
7312 (aarch64_handle_unaligned_watchpoint): Likewise.
7313 (aarch64_handle_watchpoint): Likewise.
7314 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7315 (aarch64_remove_point): Likewise.
7317 2015-07-17 Yao Qi <yao.qi@linaro.org>
7319 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7321 (aarch64_handle_unaligned_watchpoint): Likewise.
7323 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7325 Revert the previous 3 commits:
7326 Move gdb_regex* to common/
7327 Move linux_find_memory_regions_full & co.
7328 gdbserver build-id attribute generator
7330 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7331 Jan Kratochvil <jan.kratochvil@redhat.com>
7333 gdbserver build-id attribute generator.
7334 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7335 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7336 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7338 (get_dynamic): Use find_pdhr to traverse program headers.
7339 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7340 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7341 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7342 (get_hex_build_id): New.
7343 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7344 to reply XML document.
7346 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7347 Jan Kratochvil <jan.kratochvil@redhat.com>
7349 * target.c: Include target/target-utils.h and fcntl.h.
7350 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7351 (target_fileio_read_stralloc): New functions.
7353 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7355 * Makefile.in (OBS): Add gdb_regex.o.
7357 * config.in: Rebuilt.
7358 * configure: Rebuilt.
7360 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7361 Jan Kratochvil <jan.kratochvil@redhat.com>
7363 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7364 * Makefile.in (OBS): Add target-utils.o.
7365 (linux-maps.o, target-utils.o): New.
7366 * configure.srv (srv_linux_obj): Add linux-maps.o.
7368 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7370 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7372 (the_low_target): Install it.
7374 2015-07-14 Pedro Alves <palves@redhat.com>
7376 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7377 Instead, ignore ECHILD, and throw an error for other errnos.
7379 2015-07-10 Pedro Alves <palves@redhat.com>
7381 * event-loop.c (struct callback_event) <data>: Change type to
7382 gdb_client_data instance instead of gdb_client_data pointer.
7383 (append_callback_event): Adjust.
7385 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7387 * linux-aarch64-low.c: Add comments for each linux_target_ops
7388 method. Remove comments already covered in target_ops and
7389 linux_target_ops definitions.
7390 (the_low_target): Add comments for each unimplemented method.
7392 2015-07-09 Yao Qi <yao.qi@linaro.org>
7394 * linux-aarch64-low.c (aarch64_regmap): Remove.
7395 (aarch64_usrregs_info): Remove.
7396 (regs_info): Set field usrregs to NULL.
7398 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7400 * linux-low.c: Include "rsp-low.h"
7401 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7402 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7403 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7404 (handle_btrace_enable_pt): New.
7405 (handle_btrace_general_set): Support "pt".
7406 (handle_btrace_conf_general_set): Support "pt:size".
7408 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7410 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7413 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7415 * linux-aarch64-low.c: Remove comment about endianness.
7416 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7417 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7420 2015-06-24 Gary Benson <gbenson@redhat.com>
7422 * linux-i386-ipa.c (stdint.h): Do not include.
7423 * lynx-i386-low.c (stdint.h): Likewise.
7424 * lynx-ppc-low.c (stdint.h): Likewise.
7425 * mem-break.c (stdint.h): Likewise.
7426 * thread-db.c (stdint.h): Likewise.
7427 * tracepoint.c (stdint.h): Likewise.
7428 * win32-low.c (stdint.h): Likewise.
7430 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7432 * server.c (write_qxfer_response): Update call to
7433 remote_escape_output.
7435 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7436 Jan Kratochvil <jan.kratochvil@redhat.com>
7438 Merge multiple hex conversions.
7439 * gdbreplay.c (tohex): Rename to 'fromhex'.
7440 (logchar): Use fromhex.
7442 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7444 * server.c (handle_qxfer_libraries): Set `version' attribute for
7447 2015-06-10 Gary Benson <gbenson@redhat.com>
7449 * target.h (struct target_ops) <multifs_open>: New field.
7450 <multifs_unlink>: Likewise.
7451 <multifs_readlink>: Likewise.
7452 * linux-low.c (nat/linux-namespaces.h): New include.
7453 (linux_target_ops): Initialize the_target->multifs_open,
7454 the_target->multifs_unlink and the_target->multifs_readlink.
7455 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7456 * hostio.c (hostio_fs_pid): New static variable.
7457 (hostio_handle_new_gdb_connection): New function.
7458 (handle_setfs): Likewise.
7459 (handle_open): Use the_target->multifs_open as appropriate.
7460 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7461 (handle_readlink): Use the_target->multifs_readlink as
7463 (handle_vFile): Handle vFile:setfs packets.
7464 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7465 after target_handle_new_gdb_connection.
7467 2015-06-10 Gary Benson <gbenson@redhat.com>
7469 * configure.ac (AC_CHECK_FUNCS): Add setns.
7470 * config.in: Regenerate.
7471 * configure: Likewise.
7472 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7473 (linux-namespaces.o): New rule.
7474 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7476 2015-06-09 Gary Benson <gbenson@redhat.com>
7478 * hostio.c (handle_open): Process mode argument with
7479 fileio_to_host_mode.
7481 2015-06-01 Yao Qi <yao.qi@linaro.org>
7483 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7484 * linux-x86-low.c: Likewise.
7486 2015-05-28 Don Breazeal <donb@codesourcery.com>
7488 * linux-low.c (handle_extended_wait): Initialize
7489 thread_info.last_resume_kind for new fork children.
7491 2015-05-15 Pedro Alves <palves@redhat.com>
7493 * target.h (target_handle_new_gdb_connection): Rewrite using if
7494 wrapped in do/while.
7496 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7498 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7499 * configure, config.in: Regenerate.
7500 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7503 2015-05-12 Don Breazeal <donb@codesourcery.com>
7505 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7506 PTRACE_EVENT_VFORK_DONE.
7507 (linux_low_ptrace_options, extended_event_reported): Add vfork
7509 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7510 and "vforkdone" for RSP 'T' Stop Reply Packet.
7511 * server.h (report_vfork_events): Declare
7514 2015-05-12 Don Breazeal <donb@codesourcery.com>
7516 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7517 (the_low_target) <new_fork>: Initialize new member.
7518 * linux-arm-low.c (arm_new_fork): New function.
7519 (the_low_target) <new_fork>: Initialize new member.
7520 * linux-low.c (handle_extended_wait): Call new target function
7522 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7523 * linux-mips-low.c (mips_add_watchpoint): New function
7524 extracted from mips_insert_point.
7525 (the_low_target) <new_fork>: Initialize new member.
7526 (mips_linux_new_fork): New function.
7527 (mips_insert_point): Call mips_add_watchpoint.
7528 * linux-x86-low.c (x86_linux_new_fork): New function.
7529 (the_low_target) <new_fork>: Initialize new member.
7531 2015-05-12 Don Breazeal <donb@codesourcery.com>
7533 * linux-low.c (handle_extended_wait): Implement return value,
7534 rename argument 'event_child' to 'event_lwp', handle
7535 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7536 (linux_low_ptrace_options): New function.
7537 (linux_low_filter_event): Call linux_low_ptrace_options,
7538 use different argument fo linux_enable_event_reporting,
7539 use return value from handle_extended_wait.
7540 (extended_event_reported): New function.
7541 (linux_wait_1): Call extended_event_reported and set
7542 status to report fork events.
7543 (linux_write_memory): Add pid to debug message.
7544 (reset_lwp_ptrace_options_callback): New function.
7545 (linux_handle_new_gdb_connection): New function.
7546 (linux_target_ops): Initialize new structure member.
7547 * linux-low.h (struct lwp_info) <waitstatus>: New member.
7548 * lynx-low.c: Initialize new structure member.
7549 * remote-utils.c (prepare_resume_reply): Implement stop reason
7550 "fork" for "T" stop message.
7551 * server.c (handle_query): Call handle_new_gdb_connection.
7552 * server.h (report_fork_events): Declare global flag.
7553 * target.h (struct target_ops) <handle_new_gdb_connection>:
7555 (target_handle_new_gdb_connection): New macro.
7556 * win32-low.c: Initialize new structure member.
7558 2015-05-12 Don Breazeal <donb@codesourcery.com>
7560 * mem-break.c (APPEND_TO_LIST): Define macro.
7561 (clone_agent_expr): New function.
7562 (clone_one_breakpoint): New function.
7563 (clone_all_breakpoints): New function.
7564 * mem-break.h: Declare new functions.
7566 2015-05-12 Don Breazeal <donb@codesourcery.com>
7568 * linux-low.c (linux_supports_fork_events): New function.
7569 (linux_supports_vfork_events): New function.
7570 (linux_target_ops): Initialize new structure members.
7571 (initialize_low): Call linux_check_ptrace_features.
7572 * lynx-low.c (lynx_target_ops): Initialize new structure
7574 * server.c (report_fork_events, report_vfork_events):
7576 (handle_query): Add new features to qSupported packet and
7578 (captured_main): Initialize new global variables.
7579 * target.h (struct target_ops) <supports_fork_events>:
7581 <supports_vfork_events>: New member.
7582 (target_supports_fork_events): New macro.
7583 (target_supports_vfork_events): New macro.
7584 * win32-low.c (win32_target_ops): Initialize new structure
7587 2015-05-12 Gary Benson <gbenson@redhat.com>
7589 * server.c (handle_qxfer_exec_file): Use current process
7592 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
7594 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
7595 Remove HAVE_PTRACE_GETREGS conditionals.
7596 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
7597 instead of PTRACE_GETREGS and PTRACE_SETREGS.
7599 2015-05-08 Yao Qi <yao.qi@linaro.org>
7601 * linux-low.c (linux_supports_conditional_breakpoints): New
7603 (linux_target_ops): Install new target method.
7604 * lynx-low.c (lynx_target_ops): Install NULL hook for
7605 supports_conditional_breakpoints.
7606 * nto-low.c (nto_target_ops): Likewise.
7607 * spu-low.c (spu_target_ops): Likewise.
7608 * win32-low.c (win32_target_ops): Likewise.
7609 * server.c (handle_query): Check
7610 target_supports_conditional_breakpoints.
7611 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7613 (target_supports_conditional_breakpoints): New macro.
7615 2015-05-06 Pedro Alves <palves@redhat.com>
7618 * server.c (start_inferior): If the process exits, mourn it.
7620 2015-04-21 Gary Benson <gbenson@redhat.com>
7622 * hostio.c (fileio_open_flags_to_host): Factored out to
7623 fileio_to_host_openflags in common/fileio.c. Single use
7626 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7628 * linux-xtensa-low.c (xtensa_fill_gregset)
7629 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
7632 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
7634 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
7635 (regs_info): Replace usrregs pointer with NULL.
7637 2015-04-17 Gary Benson <gbenson@redhat.com>
7639 * target.h (struct target_ops) <pid_to_exec_file>: New field.
7640 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
7641 * server.c (handle_qxfer_exec_file): New function.
7642 (qxfer_packets): Add exec-file entry.
7643 (handle_query): Report qXfer:exec-file:read as supported packet.
7645 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
7647 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
7649 2015-04-09 Gary Benson <gbenson@redhat.com>
7651 * hostio-errno.c (errno_to_fileio_error): Remove function.
7652 Update caller to use remote_fileio_to_fio_error.
7654 2015-04-09 Yao Qi <yao.qi@linaro.org>
7656 * linux-low.c (linux_insert_point): Call
7657 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
7658 (linux_remove_point): Call remove_memory_breakpoint if type is
7660 * linux-x86-low.c (x86_insert_point): Don't call
7661 insert_memory_breakpoint.
7662 (x86_remove_point): Don't call remove_memory_breakpoint.
7664 2015-04-01 Pedro Alves <palves@redhat.com>
7665 Cleber Rosa <crosa@redhat.com>
7667 * server.c (gdbserver_usage): Reorganize and extend the usage
7670 2015-03-24 Pedro Alves <palves@redhat.com>
7672 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
7673 output. Also dump TRAP_TRACE.
7674 (linux_low_filter_event): In debug output, distinguish a
7675 resume_stop SIGSTOP from a delayed SIGSTOP.
7677 2015-03-24 Gary Benson <gbenson@redhat.com>
7679 * linux-x86-low.c (x86_linux_new_thread): Moved to
7681 (x86_linux_prepare_to_resume): Likewise.
7683 2015-03-24 Gary Benson <gbenson@redhat.com>
7685 * Makefile.in (x86-linux-dregs.o): New rule.
7686 * configure.srv: Add x86-linux-dregs.o to relevant targets.
7687 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
7688 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
7689 (x86_linux_dr_get): Likewise.
7690 (x86_linux_dr_set): Likewise.
7691 (update_debug_registers_callback): Likewise.
7692 (x86_linux_dr_set_addr): Likewise.
7693 (x86_linux_dr_get_addr): Likewise.
7694 (x86_linux_dr_set_control): Likewise.
7695 (x86_linux_dr_get_control): Likewise.
7696 (x86_linux_dr_get_status): Likewise.
7697 (x86_linux_update_debug_registers): Likewise.
7699 2015-03-24 Gary Benson <gbenson@redhat.com>
7701 * linux-x86-low.c (x86_linux_update_debug_registers):
7702 New function, factored out from...
7703 (x86_linux_prepare_to_resume): ...this.
7705 2015-03-24 Gary Benson <gbenson@redhat.com>
7707 * linux-x86-low.c (x86_linux_dr_get): Update comments.
7708 (x86_linux_dr_set): Likewise.
7709 (update_debug_registers_callback): Likewise.
7710 (x86_linux_dr_set_addr): Likewise.
7711 (x86_linux_dr_get_addr): Likewise.
7712 (x86_linux_dr_set_control): Likewise.
7713 (x86_linux_dr_get_control): Likewise.
7714 (x86_linux_dr_get_status): Likewise.
7715 (x86_linux_prepare_to_resume): Likewise.
7717 2015-03-24 Gary Benson <gbenson@redhat.com>
7719 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
7720 Use perror_with_name. Pass string through gettext.
7721 (x86_linux_dr_set): Likewise.
7723 2015-03-24 Gary Benson <gbenson@redhat.com>
7725 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
7726 (x86_linux_dr_set_addr): ...this.
7727 (x86_dr_low_get_addr): Rename to...
7728 (x86_linux_dr_get_addr): ...this.
7729 (x86_dr_low_set_control): Rename to...
7730 (x86_linux_dr_set_control): ...this.
7731 (x86_dr_low_get_control): Rename to...
7732 (x86_linux_dr_get_control): ...this.
7733 (x86_dr_low_get_status): Rename to...
7734 (x86_linux_dr_get_status): ...this.
7735 (x86_dr_low): Update with new function names.
7737 2015-03-24 Gary Benson <gbenson@redhat.com>
7739 * Makefile.in (x86-linux.o): New rule.
7740 * configure.srv: Add x86-linux.o to relevant targets.
7741 * linux-low.c (lwp_set_arch_private_info): New function.
7742 (lwp_arch_private_info): Likewise.
7743 * linux-x86-low.c: Include nat/x86-linux.h.
7744 (arch_lwp_info): Removed structure.
7745 (update_debug_registers_callback):
7746 Use lwp_set_debug_registers_changed.
7747 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7748 and lwp_set_debug_registers_changed.
7749 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7751 2015-03-24 Gary Benson <gbenson@redhat.com>
7753 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7754 * linux-arm-low.c (arm_new_thread): Likewise.
7755 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7756 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7757 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7758 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7760 2015-03-24 Gary Benson <gbenson@redhat.com>
7762 * linux-low.c (ptid_of_lwp): New function.
7763 (lwp_is_stopped): Likewise.
7764 (lwp_stop_reason): Likewise.
7765 * linux-x86-low.c (update_debug_registers_callback):
7767 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7770 2015-03-24 Gary Benson <gbenson@redhat.com>
7772 * linux-low.h (linux_stop_lwp): Remove declaration.
7774 2015-03-24 Gary Benson <gbenson@redhat.com>
7776 * linux-low.h: Include nat/linux-nat.h.
7777 * linux-low.c (iterate_over_lwps_args): New structure.
7778 (iterate_over_lwps_filter): New function.
7779 (iterate_over_lwps): Likewise.
7780 * linux-x86-low.c (update_debug_registers_callback):
7781 Update signature to what iterate_over_lwps expects.
7782 Remove PID check that iterate_over_lwps now performs.
7783 (x86_dr_low_set_addr): Use iterate_over_lwps.
7784 (x86_dr_low_set_control): Likewise.
7786 2015-03-24 Gary Benson <gbenson@redhat.com>
7788 * linux-x86-low.c (x86_debug_reg_state): New function.
7789 (x86_linux_prepare_to_resume): Use the above.
7791 2015-03-24 Gary Benson <gbenson@redhat.com>
7793 * linux-low.c (current_lwp_ptid): New function.
7794 * linux-x86-low.c: Include nat/linux-nat.h.
7795 (x86_dr_low_get_addr): Use current_lwp_ptid.
7796 (x86_dr_low_get_control): Likewise.
7797 (x86_dr_low_get_status): Likewise.
7799 2015-03-20 Pedro Alves <palves@redhat.com>
7801 * tracepoint.c (cmd_qtstatus): Make "str" const.
7803 2015-03-20 Pedro Alves <palves@redhat.com>
7805 * server.c (handle_general_set): Make "req_str" const.
7807 2015-03-19 Pedro Alves <palves@redhat.com>
7809 * linux-low.c (linux_resume_one_lwp): Rename to ...
7810 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7811 instead call perror_with_name.
7812 (check_ptrace_stopped_lwp_gone): New function.
7813 (linux_resume_one_lwp): Reimplement as wrapper around
7814 linux_resume_one_lwp_throw that swallows errors if the LWP is
7817 2015-03-19 Pedro Alves <palves@redhat.com>
7819 * linux-low.c (count_events_callback, select_event_lwp_callback):
7820 No longer check whether the thread has resume_stop as last resume
7823 2015-03-19 Pedro Alves <palves@redhat.com>
7825 * linux-low.c (count_events_callback, select_event_lwp_callback):
7826 Use the lwp's status_pending_p field, not the thread's.
7828 2015-03-19 Pedro Alves <palves@redhat.com>
7830 * linux-low.c (select_event_lwp_callback): Update comments to
7831 no longer mention SIGTRAP.
7833 2015-03-18 Gary Benson <gbenson@redhat.com>
7835 * server.c (handle_query): Do not report vFile:fstat as supported.
7837 2015-03-11 Gary Benson <gbenson@redhat.com>
7839 * hostio.c (sys/types.h): New include.
7840 (sys/stat.h): Likewise.
7841 (common-remote-fileio.h): Likewise.
7842 (handle_fstat): New function.
7843 (handle_vFile): Handle vFile:fstat packets.
7845 2015-03-11 Gary Benson <gbenson@redhat.com>
7847 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7848 struct stat.st_blocks and struct stat.st_blksize.
7849 * configure: Regenerate.
7850 * config.in: Likewise.
7851 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7852 (OBS): Add common-remote-fileio.o.
7853 (common-remote-fileio.o): New rule.
7855 2015-03-09 Pedro Alves <palves@redhat.com>
7857 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7858 'struct sockaddr' pointer in 'accept' call.
7860 2015-03-09 Pedro Alves <palves@redhat.com>
7863 2015-03-07 Pedro Alves <palves@redhat.com>
7864 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7865 or <winsock2.h> here. Instead include "gdb_socket.h".
7866 (remote_open): Use union gdb_sockaddr_u.
7867 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7868 or <winsock2.h> here. Instead include "gdb_socket.h".
7869 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7870 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7872 (init_named_socket, gdb_agent_helper_thread): Use union
7875 2015-03-07 Pedro Alves <palves@redhat.com>
7877 * configure.ac (build_warnings): Move
7878 -Wdeclaration-after-statement to the C-specific set.
7879 * configure: Regenerate.
7881 2015-03-07 Pedro Alves <palves@redhat.com>
7883 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7884 or <winsock2.h> here. Instead include "gdb_socket.h".
7885 (remote_open): Use union gdb_sockaddr_u.
7886 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7887 or <winsock2.h> here. Instead include "gdb_socket.h".
7888 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7889 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7891 (init_named_socket, gdb_agent_helper_thread): Use union
7894 2015-03-07 Pedro Alves <palves@redhat.com>
7896 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7899 2015-03-06 Yao Qi <yao.qi@linaro.org>
7901 * linux-aarch64-low.c (aarch64_insert_point): Use
7902 show_debug_regs as a boolean.
7903 (aarch64_remove_point): Likewise.
7905 2015-03-05 Pedro Alves <palves@redhat.com>
7907 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7908 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7909 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7910 * nto-low.c (nto_target_ops): Likewise.
7911 * spu-low.c (spu_target_ops): Likewise.
7912 * win32-low.c (win32_target_ops): Likewise.
7914 2015-03-04 Pedro Alves <palves@redhat.com>
7916 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7917 Decide whether a breakpoint triggered based on the SIGTRAP's
7919 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7920 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7921 (linux_low_filter_event): Check for breakpoints before checking
7923 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7925 (linux_stopped_by_sw_breakpoint)
7926 (linux_supports_stopped_by_sw_breakpoint)
7927 (linux_stopped_by_hw_breakpoint)
7928 (linux_supports_stopped_by_hw_breakpoint): New functions.
7929 (linux_target_ops): Install new target methods.
7931 2015-03-04 Pedro Alves <palves@redhat.com>
7933 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7934 * server.c (swbreak_feature, hwbreak_feature): New globals.
7935 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7936 (captured_main): Clear swbreak_feature and hwbreak_feature.
7937 * server.h (swbreak_feature, hwbreak_feature): Declare.
7938 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7939 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7940 supports_stopped_by_hw_breakpoint>: New fields.
7941 (target_supports_stopped_by_sw_breakpoint)
7942 (target_stopped_by_sw_breakpoint)
7943 (target_supports_stopped_by_hw_breakpoint)
7944 (target_stopped_by_hw_breakpoint): Declare.
7946 2015-03-04 Pedro Alves <palves@redhat.com>
7948 enum lwp_stop_reason -> enum target_stop_reason
7949 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7950 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7951 (linux_wait_1, stuck_in_jump_pad_callback)
7952 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7953 (linux_stopped_by_watchpoint):
7954 * linux-low.h (enum lwp_stop_reason): Delete.
7955 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7956 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7958 2015-03-04 Yao Qi <yao.qi@linaro.org>
7960 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7962 2015-03-03 Gary Benson <gbenson@redhat.com>
7964 * hostio.c (handle_vFile): Fix prefix lengths.
7966 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7968 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7971 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7973 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7974 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7975 (clean): Add "rm -f" for above C files.
7976 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7977 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7978 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7979 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7980 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7981 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7982 (init_registers_s390x_vx_linux64)
7983 (init_registers_s390x_tevx_linux64)
7984 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7985 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7987 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7988 (s390_store_vxrs_high): New functions.
7989 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7991 (s390_arch_setup): Add logic for selecting one of the new target
7992 descriptions. Activate the new vector regsets if applicable.
7993 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7994 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7995 and init_registers_s390x_tevx_linux64.
7997 2015-03-01 Pedro Alves <palves@redhat.com>
7999 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8002 2015-02-27 Pedro Alves <palves@redhat.com>
8004 * linux-x86-low.c (u_debugreg_offset): New function.
8005 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8007 2015-02-27 Pedro Alves <palves@redhat.com>
8009 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8010 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8011 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8012 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8013 (ps_lsetfpregs, ps_getpid)
8014 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8015 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8016 (ps_lsetxregs, ps_plog): Declare.
8018 2015-02-27 Pedro Alves <palves@redhat.com>
8020 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8021 IP_AGENT_EXPORT_FUNC.
8022 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8023 IP_AGENT_EXPORT_FUNC.
8024 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8025 (IP_AGENT_EXPORT): Delete.
8026 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8027 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8028 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8029 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8030 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8031 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8032 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8033 (traceframe_read_count, traceframe_write_count)
8034 (traceframes_created, trace_state_variables, get_raw_reg)
8035 (get_trace_state_variable_value, set_trace_state_variable_value)
8036 (ust_loaded, helper_thread_id, cmd_buf): Use
8037 IPA_SYM_EXPORTED_NAME.
8038 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8039 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8040 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8041 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8042 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8043 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8044 EXTERN_C_PUSH/EXTERN_C_POP.
8045 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8046 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8047 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8048 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8049 (traceframe_write_count, traceframe_read_count)
8050 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8051 (about_to_request_buffer_space, get_trace_state_variable_value)
8052 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8053 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8054 EXTERN_C_PUSH/EXTERN_C_POP.
8055 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8056 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8057 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8058 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8059 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8060 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8061 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8062 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8064 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8065 (IP_AGENT_EXPORT_VAR_DECL): Define.
8067 (gdb_agent_get_raw_reg): Declare.
8069 2015-02-27 Tom Tromey <tromey@redhat.com>
8070 Pedro Alves <palves@redhat.com>
8072 Rename symbols whose names are reserved C++ keywords throughout.
8074 2015-02-27 Pedro Alves <palves@redhat.com>
8076 * Makefile.in (COMPILER): New, get it from autoconf.
8077 (CXX): Get from autoconf instead.
8078 (COMPILE.pre): Use COMPILER.
8079 (CC-LD): Rename to ...
8080 (CC_LD): ... this. Use COMPILER.
8081 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8082 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8083 * acinclude.m4: Include build-with-cxx.m4.
8084 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8085 Disable -Werror by default if building in C++ mode.
8086 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8087 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8088 the C++ compiler. Save/restore CXXFLAGS too.
8089 * configure: Regenerate.
8091 2015-02-27 Pedro Alves <palves@redhat.com>
8093 * acinclude.m4: Include libiberty.m4.
8094 * configure.ac: Call libiberty_INIT.
8095 * config.in, configure: Regenerate.
8097 2015-02-26 Pedro Alves <palves@redhat.com>
8099 * linux-low.c (linux_wait_1): When incrementing the PC past a
8100 program breakpoint always use the_low_target.breakpoint_len as
8101 increment, rather than the maximum between that and
8102 the_low_target.decr_pc_after_break.
8104 2015-02-23 Pedro Alves <palves@redhat.com>
8106 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8107 thread was doing a step-over; always adjust the PC if
8108 we stepped over a permanent breakpoint.
8109 (linux_wait_1): If we stepped over breakpoint that was on top of a
8110 permanent breakpoint, manually advance the PC past it.
8112 2015-02-23 Pedro Alves <palves@redhat.com>
8114 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8116 (x86_fill_gregset, x86_store_gregset): Use it when handling
8119 2015-02-20 Pedro Alves <palves@redhat.com>
8121 * thread-db.c: Include "nat/linux-procfs.h".
8122 (thread_db_init): Skip listing new threads if the kernel supports
8123 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8125 2015-02-20 Pedro Alves <palves@redhat.com>
8127 * linux-low.c (status_pending_p_callback): Use ptid_match.
8129 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8131 PR breakpoints/16812
8132 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8133 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8134 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8136 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8138 PR breakpoints/15956
8139 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8141 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8143 * linux-low.c (linux_low_btrace_conf): Print size.
8144 * server.c (handle_btrace_conf_general_set): New.
8145 (hanle_general_set): Call handle_btrace_conf_general_set.
8146 (handle_query): Report Qbtrace-conf:bts:size as supported.
8148 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8150 * linux-low.c (linux_low_enable_btrace): Update parameters.
8151 (linux_low_btrace_conf): New.
8152 (linux_target_ops)<to_btrace_conf>: Initialize.
8153 * server.c (current_btrace_conf): New.
8154 (handle_btrace_enable): Rename to ...
8155 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
8156 to target_enable_btrace. Update comment. Update users.
8157 (handle_qxfer_btrace_conf): New.
8158 (qxfer_packets): Add btrace-conf entry.
8159 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8160 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8161 (target_ops)<read_btrace_conf>: New.
8162 (target_enable_btrace): Update parameters.
8163 (target_read_btrace_conf): New.
8165 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8167 * server.c (handle_btrace_general_set): Remove call to
8168 target_supports_btrace.
8169 (supported_btrace_packets): New.
8170 (handle_query): Call supported_btrace_packets.
8171 * target.h: include btrace-common.h.
8172 (btrace_target_info): Removed.
8173 (supports_btrace, target_supports_btrace): Update parameters.
8175 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8177 * Makefile.in (SFILES): Add common/btrace-common.c.
8178 (OBS): Add common/btrace-common.o.
8179 (btrace-common.o): Add build rules.
8180 * linux-low: Include btrace-common.h.
8181 (linux_low_read_btrace): Use struct btrace_data. Call
8182 btrace_data_init and btrace_data_fini.
8184 2015-02-06 Pedro Alves <palves@redhat.com>
8186 * thread-db.c (find_new_threads_callback): Add debug output.
8188 2015-02-04 Pedro Alves <palves@redhat.com>
8190 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8191 (resume_stopped_resumed_lwps): New function.
8192 (linux_wait_for_event_filtered): Use it.
8194 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8196 * Makefile.in (SFILES): Add linux-personality.c.
8197 (linux-personality.o): New rule.
8198 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8199 list of objects to be built.
8200 * linux-low.c: Include nat/linux-personality.h.
8201 (linux_create_inferior): Remove code to disable address space
8202 randomization (moved to ../nat/linux-personality.c). Create
8203 cleanup to disable address space randomization.
8205 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8207 * Makefile.in (posix-strerror.o): New rule.
8208 (mingw-strerror.o): Likewise.
8209 * configure: Regenerated.
8210 * configure.ac: Source file ../common/common.host. Initialize new
8211 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8213 2015-01-14 Yao Qi <yao@codesourcery.com>
8215 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8216 (ppc-linux.o): New rule.
8217 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8218 * configure.ac: AC_CHECK_FUNCS(getauxval).
8219 * config.in: Re-generated.
8220 * configure: Re-generated.
8221 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8222 ppc64_64bit_inferior_p
8224 2015-01-14 Yao Qi <yao@codesourcery.com>
8226 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8227 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8228 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8229 (PT_ORIG_R3, PT_TRAP): Likewise.
8230 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8231 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8232 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8234 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8236 * i387-fp.c (i387_cache_to_xsave): In look over
8237 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8238 zmmh_low_space field by use of zmmh_high_space.
8240 2015-01-09 Pedro Alves <palves@redhat.com>
8242 * linux-low.c (step_over_bkpt): Move higher up in the file.
8243 (handle_extended_wait): Don't store the stop_pc here.
8244 (get_stop_pc): Adjust comments and rename to ...
8245 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8246 stopped for a software breakpoint or hardware breakpoint.
8247 (thread_still_has_status_pending_p): New function.
8248 (status_pending_p_callback): Use
8249 thread_still_has_status_pending_p. If the event is no longer
8250 interesting, resume the LWP.
8251 (handle_tracepoints): Add assert.
8252 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8253 (wstatus_maybe_breakpoint): New function.
8254 (cancel_breakpoint): Delete function.
8255 (check_stopped_by_watchpoint): New function, factored out from
8256 linux_low_filter_event.
8257 (lp_status_maybe_breakpoint): Delete function.
8258 (linux_low_filter_event): Remove filter_ptid argument.
8259 Leave thread group exits pending here. Store the LWP's stop PC.
8260 Always leave events pending.
8261 (linux_wait_for_event_filtered): Pull all events out of the
8262 kernel, and leave them all pending.
8263 (count_events_callback, select_event_lwp_callback): Consider all
8265 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8266 (select_event_lwp): Only give preference to the stepping LWP in
8267 all-stop mode. Adjust comments.
8268 (ignore_event): New function.
8269 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8270 references to cancel_breakpoints. Adjust to renames. Also give
8271 equal priority to all LWPs that have had events in non-stop mode.
8272 If reporting a software breakpoint event, unadjust the LWP's PC.
8273 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8274 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8276 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8277 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8278 (linux_stopped_by_watchpoint): Adjust.
8279 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8280 * linux-low.h (enum lwp_stop_reason): New.
8281 (struct lwp_info) <stop_pc>: Adjust comment.
8282 <stopped_by_watchpoint>: Delete field.
8283 <stop_reason>: New field.
8284 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8285 * mem-break.c (software_breakpoint_inserted_here)
8286 (hardware_breakpoint_inserted_here): New function.
8287 * mem-break.h (software_breakpoint_inserted_here)
8288 (hardware_breakpoint_inserted_here): Declare.
8289 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8290 (cancel_breakpoints): Delete.
8291 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8292 (upload_fast_traceframes): Remove references to
8295 2015-01-09 Pedro Alves <palves@redhat.com>
8297 * thread-db.c (find_new_threads_callback): Ignore thread if the
8298 kernel thread ID is -1.
8300 2015-01-09 Pedro Alves <palves@redhat.com>
8302 * linux-low.c (linux_attach_fail_reason_string): Move to
8303 nat/linux-ptrace.c, and rename.
8304 (linux_attach_lwp): Update comment.
8305 (attach_proc_task_lwp_callback): New function.
8306 (linux_attach): Adjust to rename and use
8307 linux_proc_attach_tgid_threads.
8308 (linux_attach_fail_reason_string): Delete declaration.
8310 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8312 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8313 * server.c (gdbserver_version): Likewise.
8315 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8317 * remote-utils.c: Include ctype.h.
8318 (input_interrupt): Explicitly handle the case when the char
8319 received is the NUL byte. Improve the printing of non-ASCII
8322 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8324 * linux-low.c (linux_low_filter_event): Update call to
8325 linux_enable_event_reporting following the addition of
8326 a new parameter to that function.
8328 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8331 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8332 (AARCH64_FPCR_REGNO): Likewise.
8333 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8334 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8335 (aarch64_store_fpregset): Likewise.
8337 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8339 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8340 Remove FIXME comment about assumption about N.
8342 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8344 * configure.ac: If large-file support is disabled in GDBserver,
8345 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8346 * configure: Regenerate.
8348 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8350 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8351 warning upon ENODATA from ptrace.
8352 * linux-s390-low.c (s390_store_tdb): New.
8353 (s390_regsets): Add regset for NT_S390_TDB.
8355 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8357 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8358 without a fill_function.
8359 * linux-s390-low.c (s390_fill_last_break): Remove.
8360 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8361 (s390_arch_setup): Use regset's size instead of fill_function for
8364 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8366 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8367 the regset's store function when ptrace returned an error.
8368 * regcache.c (get_thread_regcache): Invalidate register cache
8369 before fetching inferior's registers.
8371 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8373 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8374 while-loop as for-loop.
8375 (regsets_store_inferior_registers): Likewise.
8377 2014-11-28 Yao Qi <yao@codesourcery.com>
8379 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8380 * config.in, configure: Re-generate.
8381 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8384 2014-11-21 Yao Qi <yao@codesourcery.com>
8386 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8387 (AC_CHECK_HEADERS): Remove malloc.h.
8388 * configure: Re-generated.
8389 * config.in: Re-generated.
8390 * server.h: Don't include alloca.h and malloc.h.
8391 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8392 Don't include malloc.h.
8394 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8396 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8397 corresponding ERRNO check in same block.
8399 2014-11-12 Pedro Alves <palves@redhat.com>
8401 * server.c (cont_thread): Update comment.
8402 (start_inferior, attach_inferior): No longer clear cont_thread.
8403 (handle_v_cont): No longer set cont_thread.
8404 (captured_main): Clear cont_thread each time a GDB connects.
8406 2014-11-12 Pedro Alves <palves@redhat.com>
8408 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8409 thread, and don't resume all threads if the Hc thread has exited.
8411 2014-11-12 Pedro Alves <palves@redhat.com>
8413 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8414 the process group instead of to a specific LWP.
8416 2014-10-15 Pedro Alves <palves@redhat.com>
8419 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8421 (arm_set_thread_context): Delete.
8422 (the_low_target): Adjust.
8423 * win32-i386-low.c (debug_registers_changed)
8424 (debug_registers_used): Delete.
8425 (update_debug_registers_callback): New function.
8426 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8427 needing to update their debug registers.
8428 (win32_get_current_dr): New function.
8429 (x86_dr_low_get_addr, x86_dr_low_get_control)
8430 (x86_dr_low_get_status): Fetch the debug register from the thread
8432 (i386_initial_stuff): Adjust.
8433 (i386_get_thread_context): Remove current_event parameter. Don't
8434 clear debug_registers_changed nor copy DR values to
8436 (i386_set_thread_context): Delete.
8437 (i386_prepare_to_resume): New function.
8438 (i386_thread_added): Mark the thread as needing to update irs
8440 (the_low_target): Remove i386_set_thread_context and install
8441 i386_prepare_to_resume.
8442 * win32-low.c (win32_get_thread_context): Adjust.
8443 (win32_set_thread_context): Use SetThreadContext
8445 (win32_prepare_to_resume): New function.
8446 (win32_require_context): New function, factored out from ...
8447 (thread_rec): ... this.
8448 (continue_one_thread): Call win32_prepare_to_resume on each thread
8449 we're about to continue.
8450 (win32_resume): Call win32_prepare_to_resume on the event thread.
8451 * win32-low.h (struct win32_thread_info)
8452 <debug_registers_changed>: New field.
8453 (struct win32_target_ops): Change prototype of set_thread_context,
8454 delete set_thread_context and add prepare_to_resume.
8455 (win32_require_context): New declaration.
8457 2014-10-08 Gary Benson <gbenson@redhat.com>
8459 * server.h: Do not include common-exceptions.h.
8461 2014-10-08 Gary Benson <gbenson@redhat.com>
8463 * server.h: Do not include cleanups.h.
8465 2014-09-30 James Hogan <james.hogan@imgtec.com>
8467 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8470 2014-09-23 Yao Qi <yao@codesourcery.com>
8472 * linux-low.c (lp_status_maybe_breakpoint): New function.
8473 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8474 (count_events_callback): Likewise.
8475 (select_event_lwp_callback): Likewise.
8476 (cancel_breakpoints_callback): Likewise.
8478 2014-09-19 Don Breazeal <donb@codesourcery.com>
8480 * linux-low.c (handle_extended_wait): Call
8481 linux_ptrace_get_extended_event.
8482 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8483 linux_is_extended_waitstatus.
8485 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8487 * Makefile.in (CPPFLAGS): Define.
8488 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8489 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8491 2014-09-16 Gary Benson <gbenson@redhat.com>
8493 * inferiors.h (current_inferior): Renamed as...
8494 (current_thread): New variable. All uses updated.
8495 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8496 (maybe_move_out_of_jump_pad): Likewise.
8497 (cancel_breakpoint): Likewise.
8498 (linux_low_filter_event): Likewise.
8499 (wait_for_sigstop): Likewise.
8500 (linux_resume_one_lwp): Likewise.
8501 (need_step_over_p): Likewise.
8502 (start_step_over): Likewise.
8503 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8504 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8505 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8506 and save_inferior as saved_thread.
8507 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8509 (regcache_invalidate_thread): Likewise.
8510 * remote-utils.c (prepare_resume_reply): Likewise.
8511 * thread-db.c (thread_db_get_tls_address): Likewise.
8512 (disable_thread_event_reporting): Likewise.
8513 (remove_thread_event_breakpoints): Likewise.
8514 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8516 * target.h (set_desired_inferior): Renamed as...
8517 (set_desired_thread): New declaration. All uses updated.
8518 * server.c (myresume): Updated comment to reference thread instead
8520 (handle_serial_event): Likewise.
8521 (handle_target_event): Likewise.
8523 2014-09-12 Tom Tromey <tromey@redhat.com>
8524 Gary Benson <gbenson@redhat.com>
8526 * regcache.h: Include common-regcache.h.
8527 (regcache_read_pc): Don't declare.
8528 * regcache.c (get_thread_regcache_for_ptid): New function.
8530 2014-09-11 Tom Tromey <tromey@redhat.com>
8531 Gary Benson <gbenson@redhat.com>
8533 * symbol.c: New file.
8534 * Makefile.in (SFILES): Add symbol.c.
8535 (OBS): Add symbol.o.
8537 2014-09-11 Gary Benson <gbenson@redhat.com>
8539 * target.c (target_stop_ptid, target_continue_ptid): New
8542 2014-09-11 Tom Tromey <tromey@redhat.com>
8543 Gary Benson <gbenson@redhat.com>
8545 * target.h: Include target/target.h.
8546 * target.c (target_read_memory, target_read_uint32)
8547 (target_write_memory): New functions.
8549 2014-09-11 Gary Benson <gbenson@redhat.com>
8551 * server.h (debug_hw_points): Don't declare.
8552 * server.c (debug_hw_points): Don't define. Replace all uses
8553 with show_debug_regs.
8554 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
8555 all uses with show_debug_regs.
8557 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
8559 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
8560 endianness into account.
8561 (ppc_supply_ptrace_register): Likewise.
8563 2014-09-03 James Hogan <james.hogan@imgtec.com>
8565 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
8566 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
8568 2014-09-03 Gary Benson <gbenson@redhat.com>
8570 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
8571 ALL_DEBUG_ADDRESS_REGISTERS.
8573 2014-09-02 Gary Benson <gbenson@redhat.com>
8575 * i386-low.h: Renamed as...
8576 * x86-low.h: New file. All type, function and variable name
8577 prefixes changed from "i386_" to "x86_". All references updated.
8578 * i386-low.c: Renamed as...
8579 * x86-low.c: New file. All type, function and variable name
8580 prefixes changed from "i386_" to "x86_". All references updated.
8582 2014-09-02 Gary Benson <gbenson@redhat.com>
8584 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
8585 (x86_linux_new_thread): Likewise.
8587 2014-08-29 Gary Benson <gbenson@redhat.com>
8589 * server.h (setjmp.h): Do not include.
8590 (toplevel): Do not declare.
8591 (common-exceptions.h): Include.
8592 (cleanups.h): Likewise.
8593 * server.c (toplevel): Do not define.
8594 (exit_code): New static global.
8595 (detach_or_kill_for_exit_cleanup): New function.
8596 (main): New function. Original main renamed to...
8597 (captured_main): New function.
8598 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
8600 2014-08-29 Gary Benson <gbenson@redhat.com>
8602 * Makefile.in (SFILES): Add common/common-exceptions.c.
8603 (OBS): Add common-exceptions.o.
8604 (common-exceptions.o): New rule.
8605 * utils.c (prepare_to_throw_exception): New function.
8607 2014-08-29 Gary Benson <gbenson@redhat.com>
8609 * config.in: Regenerate.
8610 * configure: Likewise.
8612 2014-08-29 Gary Benson <gbenson@redhat.com>
8614 * Makefile.in (SFILES): Add common/cleanups.c.
8616 (cleanups.o): New rule.
8618 2014-08-29 Gary Benson <gbenson@redhat.com>
8620 * utils.c (internal_vwarning): New function.
8622 2014-08-28 Gary Benson <gbenson@redhat.com>
8624 * utils.h (fatal): Remove declaration.
8625 * utils.c (fatal): Remove function.
8627 2014-08-28 Gary Benson <gbenson@redhat.com>
8629 * tracepoint.c (gdb_agent_init): Replace fatal with
8631 (initialize_tracepoint): Likewise.
8633 2014-08-28 Gary Benson <gbenson@redhat.com>
8635 * remote-utils.c (remote_prepare): Replace fatal with error.
8637 2014-08-28 Gary Benson <gbenson@redhat.com>
8639 * linux-low.c (linux_async): Replace fatal with warning.
8641 (linux_start_non_stop): Return -1 if linux_async failed.
8643 2014-08-28 Gary Benson <gbenson@redhat.com>
8645 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
8647 (i386_dr_low_get_addr): Remove vague comment.
8648 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
8651 2014-08-28 Gary Benson <gbenson@redhat.com>
8653 * inferiors.c (get_thread_process): Replace check with gdb_assert.
8654 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
8656 (linux_resume_one_lwp): Likewise.
8657 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
8659 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
8660 with internal_error.
8661 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
8662 (init_register_cache): Replace fatal with gdb_assert_not_reached.
8663 (find_register_by_name): Replace fatal with internal_error.
8664 (find_regno): Likewise.
8665 * tdesc.c (init_target_desc): Replace check with gdb_assert.
8666 * thread-db.c (thread_db_create_event): Likewise.
8667 (thread_db_load_search): Likewise.
8668 (try_thread_db_load_1): Likewise.
8669 * tracepoint.c (get_jump_space_head): Replace fatal with
8671 (claim_trampoline_space): Likewise.
8672 (have_fast_tracepoint_trampoline_buffer): Likewise.
8673 (cmd_qtstart): Likewise.
8674 (stop_tracing): Likewise.
8675 (fast_tracepoint_collecting): Likewise.
8676 (target_malloc): Likewise.
8677 (download_tracepoint): Likewise.
8678 (download_trace_state_variables): Replace check with gdb_assert.
8679 (upload_fast_traceframes): Replace fatal with internal_error.
8681 2014-08-19 Tom Tromey <tromey@redhat.com>
8682 Gary Benson <gbenson@redhat.com>
8684 * Makefile.in (SFILES): Add common/common-debug.c.
8685 (OBS): Add common-debug.o.
8686 (common-debug.o): New rule.
8687 * debug.h (debug_printf): Don't declare.
8688 * debug.c (debug_printf): Renamed and rewritten as...
8689 (debug_vprintf): New function.
8691 2014-08-19 Gary Benson <gbenson@redhat.com>
8693 * utils.h: Do not include print-utils.h.
8695 2014-08-19 Tom Tromey <tromey@redhat.com>
8696 Gary Benson <gbenson@redhat.com>
8698 * server.h: Add static assertion.
8699 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
8701 2014-08-19 Tom Tromey <tromey@redhat.com>
8702 Gary Benson <gbenson@redhat.com>
8704 * Makefile.in (SFILES): Add common/errors.c.
8705 (OBS): Add errors.o.
8706 (IPA_OBS): Add errors-ipa.o.
8707 (errors.o): New rule.
8708 (errors-ipa.o): Likewise.
8709 * utils.h (perror_with_name, error, warning): Don't declare.
8710 * utils.c (warning): Renamed and rewritten as...
8711 (vwarning): New function.
8712 (error): Renamed and rewritten as...
8713 (verror): New function.
8714 (internal_error): Renamed and rewritten as...
8715 (internal_verror): New function.
8717 2014-08-07 Gary Benson <gbenson@redhat.com>
8719 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
8720 * configure: Regenerate.
8721 * config.in: Likewise.
8722 * server.h: Do not include errno.h.
8723 * event-loop.c: Likewise.
8724 * hostio-errno.c: Likewise.
8725 * linux-low.c: Likewise.
8726 * remote-utils.c: Likewise.
8727 * spu-low.c: Likewise.
8728 * utils.c: Likewise.
8729 * gdbreplay.c: Unconditionally include errno.h.
8731 2014-08-07 Gary Benson <gbenson@redhat.com>
8733 * server.h: Do not include string.h.
8734 * event-loop.c: Likewise.
8735 * linux-low.c: Likewise.
8736 * regcache.c: Likewise.
8737 * remote-utils.c: Likewise.
8738 * spu-low.c: Likewise.
8739 * utils.c: Likewise.
8741 2014-08-07 Gary Benson <gbenson@redhat.com>
8743 * server.h: Do not include gdb_assert.h.
8745 2014-08-07 Gary Benson <gbenson@redhat.com>
8747 * server.h: Do not include common-utils.h.
8749 2014-08-07 Gary Benson <gbenson@redhat.com>
8751 * server.h: Do not include ptid.h.
8752 * notif.h: Likewise.
8754 2014-08-07 Gary Benson <gbenson@redhat.com>
8756 * server.h: Do not include gdb_locale.h.
8758 2014-08-07 Gary Benson <gbenson@redhat.com>
8760 * server.h: Do not include gdb/signals.h.
8761 * win32-low.c: Likewise.
8763 2014-08-07 Gary Benson <gbenson@redhat.com>
8765 * server.h: Do not include pathmax.h.
8767 2014-08-07 Gary Benson <gbenson@redhat.com>
8769 * server.h: Do not include libiberty.h.
8770 * linux-bfin-low.c: Likewise.
8772 2014-08-07 Gary Benson <gbenson@redhat.com>
8774 * server.h: Do not include ansidecl.h.
8776 2014-08-07 Gary Benson <gbenson@redhat.com>
8778 * linux-x86-low.c: Do not include stddef.h.
8779 * lynx-ppc-low.c: Likewise.
8780 * tracepoint.c: Likewise.
8782 2014-08-07 Gary Benson <gbenson@redhat.com>
8784 * server.h: Do not include stdarg.h.
8785 * nto-low.c: Likewise.
8787 2014-08-07 Gary Benson <gbenson@redhat.com>
8789 * server.h: Do not include stdlib.h.
8790 * inferiors.c: Likewise.
8791 * linux-low.c: Likewise.
8792 * regcache.c: Likewise.
8793 * spu-low.c: Likewise.
8794 * tracepoint.c: Likewise.
8795 * utils.c: Likewise.
8797 2014-08-07 Gary Benson <gbenson@redhat.com>
8799 * server.h: Do not include stdio.h.
8800 * linux-low.c: Likewise.
8801 * remote-utils.c: Likewise.
8802 * spu-low.c: Likewise.
8803 * utils.c: Likewise.
8804 * wincecompat.c: Likewise.
8806 2014-08-06 Gary Benson <gbenson@redhat.com>
8808 * regcache.c (init_register_cache): Move conditionals inside if.
8810 2014-08-06 Gary Benson <gbenson@redhat.com>
8812 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8814 2014-07-31 Gary Benson <gbenson@redhat.com>
8816 * ax.h: Do not include server.h.
8817 * gdbthread.h: Likewise.
8818 * lynx-low.h: Likewise.
8819 * notif.h: Likewise.
8821 2014-07-30 Gary Benson <gbenson@redhat.com>
8823 * server.h: Include common-defs.h.
8824 Do not include config.h or build-gnulib-gdbserver/config.h.
8826 2014-07-30 Gary Benson <gbenson@redhat.com>
8828 * hostio-errno.c: Move server.h to top of includes list.
8829 * inferiors.c: Likewise.
8830 * linux-x86-low.c: Likewise.
8831 * notif.c: Include server.h.
8833 2014-07-24 Tom Tromey <tromey@redhat.com>
8834 Gary Benson <gbenson@redhat.com>
8836 * server.h (CORE_ADDR): Now unsigned.
8838 2014-07-16 Pedro Alves <palves@redhat.com>
8840 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8842 2014-07-15 Pedro Alves <palves@redhat.com>
8844 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8847 2014-07-11 Pedro Alves <palves@redhat.com>
8849 * linux-low.c (kill_wait_lwp): New function, based on
8850 kill_one_lwp_callback, but use my_waitpid directly.
8851 (kill_one_lwp_callback, linux_kill): Use it.
8853 2014-06-23 Pedro Alves <palves@redhat.com>
8855 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8856 before setting DR0..DR3.
8858 2014-06-20 Gary Benson <gbenson@redhat.com>
8860 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8861 * configure: Regenerated.
8862 * config.in: Likewise.
8864 2014-06-20 Gary Benson <gbenson@redhat.com>
8866 * Makefile.in (SFILES): Update locations for files moved
8868 (object file files): Reordered.
8870 2014-06-20 Gary Benson <gbenson@redhat.com>
8872 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8873 (i386_dr_low_set_addr): Likewise.
8874 (i386_dr_low_get_addr): Likewise.
8875 (i386_dr_low_can_set_control): Likewise.
8876 (i386_dr_low_set_control): Likewise.
8877 (i386_dr_low_get_control): Likewise.
8878 (i386_dr_low_get_status): Likewise.
8879 (i386_get_debug_register_length): Likewise.
8880 * linux-x86-low.c (i386_dr_low_set_addr):
8881 Changed signature. Made static.
8882 (i386_dr_low_get_addr): Likewise.
8883 (i386_dr_low_set_control): Likewise.
8884 (i386_dr_low_get_control): Likewise.
8885 (i386_dr_low_get_status): Likewise.
8886 (i386_dr_low): New global variable.
8887 * win32-i386-low.c (i386_dr_low_set_addr):
8888 Changed signature. Made static.
8889 (i386_dr_low_get_addr): Likewise.
8890 (i386_dr_low_set_control): Likewise.
8891 (i386_dr_low_get_control): Likewise.
8892 (i386_dr_low_get_status): Likewise.
8893 (i386_dr_low): New global variable.
8895 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8897 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8898 * Makefile.in (AR, AR_FLAGS): Define.
8899 * configure: Regenerate.
8901 2014-06-19 Gary Benson <gbenson@redhat.com>
8903 * Makefile.in (i386-dregs.o): New rule.
8904 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8905 * i386-low.c (target.h): Remove include.
8906 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8907 (DR_CONTROL_SHIFT): Likewise.
8908 (DR_CONTROL_SIZE): Likewise.
8909 (DR_RW_EXECUTE): Likewise.
8910 (DR_RW_WRITE): Likewise.
8911 (DR_RW_READ): Likewise.
8912 (DR_RW_IORW): Likewise.
8913 (DR_LEN_1): Likewise.
8914 (DR_LEN_2): Likewise.
8915 (DR_LEN_4): Likewise.
8916 (DR_LEN_8): Likewise.
8917 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8918 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8919 (DR_ENABLE_SIZE): Likewise.
8920 (DR_LOCAL_SLOWDOWN): Likewise.
8921 (DR_GLOBAL_SLOWDOWN): Likewise.
8922 (DR_CONTROL_RESERVED): Likewise.
8923 (I386_DR_CONTROL_MASK): Likewise.
8924 (I386_DR_VACANT): Likewise.
8925 (I386_DR_LOCAL_ENABLE): Likewise.
8926 (I386_DR_GLOBAL_ENABLE): Likewise.
8927 (I386_DR_DISABLE): Likewise.
8928 (I386_DR_SET_RW_LEN): Likewise.
8929 (I386_DR_GET_RW_LEN): Likewise.
8930 (I386_DR_WATCH_HIT): Likewise.
8931 (i386_wp_op_t): Likewise.
8932 (i386_show_dr): Likewise.
8933 (i386_length_and_rw_bits): Likewise.
8934 (i386_insert_aligned_watchpoint): Likewise.
8935 (i386_remove_aligned_watchpoint): Likewise.
8936 (i386_handle_nonaligned_watchpoint): Likewise.
8937 i386_update_inferior_debug_regs(): Likewise.
8938 (i386_dr_insert_watchpoint): Likewise.
8939 (i386_dr_remove_watchpoint): Likewise.
8940 (i386_dr_region_ok_for_watchpoint): Likewise.
8941 (i386_dr_stopped_data_address): Likewise.
8942 (i386_dr_stopped_by_watchpoint): Likewise.
8944 2014-06-19 Gary Benson <gbenson@redhat.com>
8946 * i386-low.c (i386_dr_show): Renamed to
8947 i386_show_dr and made static. All uses updated.
8948 (i386_dr_length_and_rw_bits): Renamed to
8949 i386_length_and_rw_bits and made static.
8951 (i386_dr_insert_aligned_watchpoint): Renamed to
8952 i386_insert_aligned_watchpoint and made static.
8954 (i386_dr_remove_aligned_watchpoint): Renamed to
8955 i386_remove_aligned_watchpoint and made static.
8957 (i386_dr_update_inferior_debug_regs): Renamed to
8958 i386_update_inferior_debug_regs and made static.
8961 2014-06-18 Gary Benson <gbenson@redhat.com>
8963 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8964 (i386_dr_low_can_set_control): Likewise.
8965 (i386_get_debug_register_length): Likewise.
8966 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8967 (i386_dr_low_can_set_control): Likewise.
8968 (i386_get_debug_register_length): Likewise.
8970 2014-06-17 Gary Benson <gbenson@redhat.com>
8972 * i386-low.h (i386-dregs.h): New include.
8973 (DR_FIRSTADDR): Now in i386-dregs.h.
8974 (DR_LASTADDR): Likewise.
8975 (DR_NADDR): Likewise.
8976 (DR_STATUS): Likewise.
8977 (DR_CONTROL): Likewise.
8978 (i386_debug_reg_state): Likewise.
8979 (i386_dr_insert_watchpoint): Likewise.
8980 (i386_dr_remove_watchpoint): Likewise.
8981 (i386_dr_region_ok_for_watchpoint): Likewise.
8982 (i386_dr_stopped_data_address): Likewise.
8983 (i386_dr_stopped_by_watchpoint): Likewise.
8984 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8986 2014-06-18 Gary Benson <gbenson@redhat.com>
8988 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8989 i386_dr_insert_watchpoint.
8990 (i386_low_remove_watchpoint): Renamed to
8991 i386_dr_remove_watchpoint.
8992 (i386_low_region_ok_for_watchpoint): Renamed to
8993 i386_dr_region_ok_for_watchpoint.
8994 (i386_low_stopped_data_address): Renamed to
8995 i386_dr_stopped_data_address.
8996 (i386_low_stopped_by_watchpoint): Renamed to
8997 i386_dr_stopped_by_watchpoint.
8998 * i386-low.c (i386_show_dr): Renamed to
8999 i386_dr_show and made nonstatic. All uses updated.
9000 (i386_length_and_rw_bits): Renamed to
9001 i386_dr_length_and_rw_bits and made nonstatic.
9003 (i386_insert_aligned_watchpoint): Renamed to
9004 i386_dr_insert_aligned_watchpoint and made nonstatic.
9006 (i386_remove_aligned_watchpoint): Renamed to
9007 i386_dr_remove_aligned_watchpoint and made nonstatic.
9009 (i386_update_inferior_debug_regs): Renamed to
9010 i386_dr_update_inferior_debug_regs and made nonstatic.
9012 (i386_low_insert_watchpoint): Renamed to
9013 i386_dr_insert_watchpoint. All uses updated.
9014 (i386_low_remove_watchpoint): Renamed to
9015 i386_dr_remove_watchpoint. All uses updated.
9016 (i386_low_region_ok_for_watchpoint): Renamed to
9017 i386_dr_region_ok_for_watchpoint. All uses updated.
9018 (i386_low_stopped_data_address): Renamed to
9019 i386_dr_stopped_data_address. All uses updated.
9020 (i386_low_stopped_by_watchpoint): Renamed to
9021 i386_dr_stopped_by_watchpoint. All uses updated.
9023 2014-06-18 Gary Benson <gbenson@redhat.com>
9025 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9026 (i386_dr_low_can_set_control): Likewise.
9027 (i386_insert_aligned_watchpoint): New check.
9029 2014-06-18 Gary Benson <gbenson@redhat.com>
9031 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9034 2014-06-18 Gary Benson <gbenson@redhat.com>
9036 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9037 instead of fatal and error.
9038 (i386_handle_nonaligned_watchpoint): Likewise.
9040 2014-06-18 Gary Benson <gbenson@redhat.com>
9042 * i386-low.c (i386_get_debug_register_length): New macro.
9043 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9044 (i386_show_dr): Use debug_printf instead of fprintf. Use
9045 phex to format values.
9047 2014-06-18 Gary Benson <gbenson@redhat.com>
9049 * i386-low.h: Comment changes.
9050 * i386-low.c: Likewise.
9052 2014-06-18 Gary Benson <gbenson@redhat.com>
9054 * i386-low.c: Whitespace changes.
9056 2014-06-12 Tom Tromey <tromey@redhat.com>
9058 * utils.c (freeargv): Remove.
9060 2014-06-12 Tom Tromey <tromey@redhat.com>
9062 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9063 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9064 (parse_debug_format_options): Likewise.
9065 (gdbserver_usage): Likewise.
9066 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9067 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9068 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9070 ($(LIBGNU)): Depend on libiberty.
9071 (all-lib): Recurse into all subdirs.
9072 (install-only): Invoke "install" target in subdirs.
9073 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9075 * configure: Rebuild.
9076 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9077 for vasprintf, vsnprintf, or gettimeofday.
9078 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9081 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9083 * development.sh: Delete.
9084 * Makefile.in (config.status): Adjust dependency on development.sh.
9085 * configure.ac: Adjust development.sh source call.
9086 * configure: Regenerate.
9088 2014-06-02 Pedro Alves <palves@redhat.com>
9090 * ax.c (gdb_free_agent_expr): New function.
9091 * ax.h (gdb_free_agent_expr): New declaration.
9092 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9094 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9096 (clear_breakpoint_conditions_and_commands): New function.
9097 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9098 (clear_breakpoint_conditions_and_commands): New declaration.
9100 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9102 * linux-aarch64-low.c (asm/ptrace.h): Include.
9104 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9106 Fix TLS access for -static -pthread.
9107 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9108 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9109 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9111 2014-05-20 Pedro Alves <palves@redhat.com>
9113 * linux-aarch64-low.c (aarch64_insert_point)
9114 (aarch64_remove_point): No longer check whether the type is
9115 supported here. Adjust to new interface.
9116 (the_low_target): Install aarch64_supports_z_point_type as
9117 supports_z_point_type method.
9118 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9119 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9120 instead of a Z packet char. Adjust.
9121 (arm_supports_z_point_type): New function.
9122 (arm_insert_point, arm_remove_point): Adjust to new interface.
9123 (the_low_target): Install arm_supports_z_point_type.
9124 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9125 (cris_insert_point, cris_remove_point): Adjust to new interface.
9126 Don't check whether the type is supported here.
9127 (the_low_target): Install cris_supports_z_point_type.
9128 * linux-low.c (linux_supports_z_point_type): New function.
9129 (linux_insert_point, linux_remove_point): Adjust to new interface.
9130 * linux-low.h (struct linux_target_ops) <insert_point,
9131 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9132 raw_breakpoint pointer parameter.
9133 <supports_z_point_type>: New method.
9134 * linux-mips-low.c (mips_supports_z_point_type): New function.
9135 (mips_insert_point, mips_remove_point): Adjust to new interface.
9136 Use mips_supports_z_point_type.
9137 (the_low_target): Install mips_supports_z_point_type.
9138 * linux-ppc-low.c (the_low_target): Install NULL as
9139 supports_z_point_type method.
9140 * linux-s390-low.c (the_low_target): Install NULL as
9141 supports_z_point_type method.
9142 * linux-sparc-low.c (the_low_target): Install NULL as
9143 supports_z_point_type method.
9144 * linux-x86-low.c (x86_supports_z_point_type): New function.
9145 (x86_insert_point): Adjust to new insert_point interface. Use
9146 insert_memory_breakpoint. Adjust to new
9147 i386_low_insert_watchpoint interface.
9148 (x86_remove_point): Adjust to remove_point interface. Use
9149 remove_memory_breakpoint. Adjust to new
9150 i386_low_remove_watchpoint interface.
9151 (the_low_target): Install x86_supports_z_point_type.
9152 * lynx-low.c (lynx_target_ops): Install NULL as
9153 supports_z_point_type callback.
9154 * nto-low.c (nto_supports_z_point_type): New.
9155 (nto_insert_point, nto_remove_point): Adjust to new interface.
9156 (nto_target_ops): Install nto_supports_z_point_type.
9157 * mem-break.c: Adjust intro comment.
9158 (struct raw_breakpoint) <raw_type, size>: New fields.
9159 <inserted>: Update comment.
9160 <shlib_disabled>: Delete field.
9161 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9162 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9163 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9164 (raw_bkpt_type_to_target_hw_bp_type): New function.
9165 (find_enabled_raw_code_breakpoint_at): New function.
9166 (find_raw_breakpoint_at): New type and size parameters. Use them.
9167 (insert_memory_breakpoint): New function, based off
9168 set_raw_breakpoint_at.
9169 (remove_memory_breakpoint): New function.
9170 (set_raw_breakpoint_at): Reimplement.
9171 (set_breakpoint): New, based on set_breakpoint_at.
9172 (set_breakpoint_at): Reimplement.
9173 (delete_raw_breakpoint): Go through the_target->remove_point
9174 instead of assuming memory breakpoints.
9175 (find_gdb_breakpoint_at): Delete.
9176 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9177 (find_gdb_breakpoint): New function.
9178 (set_gdb_breakpoint_at): Delete.
9179 (z_type_supported): New function.
9180 (set_gdb_breakpoint_1): New function, loosely based off
9181 set_gdb_breakpoint_at.
9182 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9183 (delete_gdb_breakpoint_at): Delete.
9184 (delete_gdb_breakpoint_1): New function, loosely based off
9185 delete_gdb_breakpoint_at.
9186 (delete_gdb_breakpoint): New function.
9187 (clear_gdb_breakpoint_conditions): Rename to ...
9188 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9190 (add_condition_to_breakpoint): Make static.
9191 (add_breakpoint_condition): Take a struct breakpoint pointer
9192 instead of an address. Adjust.
9193 (gdb_condition_true_at_breakpoint): Rename to ...
9194 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9196 (gdb_condition_true_at_breakpoint): Reimplement.
9197 (add_breakpoint_commands): Take a struct breakpoint pointer
9198 instead of an address. Adjust.
9199 (gdb_no_commands_at_breakpoint): Rename to ...
9200 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9201 parameter. Return true if no breakpoint was found. Change debug
9203 (gdb_no_commands_at_breakpoint): Reimplement.
9204 (run_breakpoint_commands): Rename to ...
9205 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9206 and change return type to boolean.
9207 (run_breakpoint_commands): New function.
9208 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9209 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9210 breakpoint. Go through the_target->remove_point instead of
9211 assuming memory breakpoint.
9212 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9213 software and hardware breakpoints.
9214 (reinsert_raw_breakpoint): Go through the_target->insert_point
9215 instead of assuming memory breakpoint.
9216 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9217 software and hardware breakpoints.
9218 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9219 Check both software and hardware breakpoints.
9220 (validate_inserted_breakpoint): Assert the breakpoint is a
9221 software breakpoint. Set the inserted flag to -1 instead of
9222 setting shlib_disabled.
9223 (delete_disabled_breakpoints): Adjust.
9224 (validate_breakpoints): Only validate software breakpoints.
9225 Adjust to inserted flag change.
9226 (check_mem_read, check_mem_write): Skip breakpoint types other
9227 than software breakpoints. Adjust to inserted flag change.
9228 * mem-break.h (enum raw_bkpt_type): New enum.
9229 (raw_breakpoint, struct process_info): Forward declare.
9230 (Z_packet_to_target_hw_bp_type): Delete declaration.
9231 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9232 (set_gdb_breakpoint, delete_gdb_breakpoint)
9233 (clear_breakpoint_conditions): New declarations.
9234 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9235 (breakpoint_inserted_here): Update comment.
9236 (add_breakpoint_condition, add_breakpoint_commands): Replace
9237 address parameter with a breakpoint pointer parameter.
9238 (gdb_breakpoint_here): Update comment.
9239 (delete_gdb_breakpoint_at): Delete.
9240 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9241 * server.c (process_point_options): Take a struct breakpoint
9242 pointer instead of an address. Adjust.
9243 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9244 delete_gdb_breakpoint.
9245 * spu-low.c (spu_target_ops): Install NULL as
9246 supports_z_point_type method.
9247 * target.h: Include mem-break.h.
9248 (struct target_ops) <prepare_to_access_memory>: Update comment.
9249 <supports_z_point_type>: New field.
9250 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9251 instead of a char. Also take a raw breakpoint pointer.
9252 * win32-arm-low.c (the_low_target): Install NULL as
9253 supports_z_point_type.
9254 * win32-i386-low.c (i386_supports_z_point_type): New function.
9255 (i386_insert_point, i386_remove_point): Adjust to new interface.
9256 (the_low_target): Install i386_supports_z_point_type.
9257 * win32-low.c (win32_supports_z_point_type): New function.
9258 (win32_insert_point, win32_remove_point): Adjust to new interface.
9259 (win32_target_ops): Install win32_supports_z_point_type.
9260 * win32-low.h (struct win32_target_ops):
9261 <supports_z_point_type>: New method.
9262 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9263 instead of a char. Also take a raw breakpoint pointer.
9265 2014-05-20 Pedro Alves <palves@redhat.com>
9267 * mem-break.h: Include break-common.h.
9268 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9269 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9270 (Z_packet_to_target_hw_bp_type): New declaration.
9271 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9272 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9273 (Z_PACKET_ACCESS_WP): Delete macros.
9274 (Z_packet_to_hw_type): Delete function.
9275 * i386-low.h: Don't include break-common.h here.
9276 (Z_packet_to_hw_type): Delete declaration.
9277 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9278 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9279 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9280 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9281 * linux-aarch64-low.c: Don't include break-common.h here.
9282 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9283 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9284 (Z_packet_to_target_hw_bp_type): Delete function.
9285 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9287 (mips_insert_point, mips_remove_point): Use
9288 Z_packet_to_target_hw_bp_type.
9290 2014-05-20 Pedro Alves <palves@redhat.com>
9292 * linux-aarch64-low.c: Include break-common.h.
9293 (enum target_point_type): Delete.
9294 (Z_packet_to_point_type): Rename to ...
9295 (Z_packet_to_target_hw_bp_type): ... this, and return a
9296 target_hw_bp_type instead.
9297 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9298 instead of an enum target_point_type.
9299 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9301 (aarch64_dr_state_insert_one_point)
9302 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9303 (aarch64_handle_aligned_watchpoint)
9304 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9305 Take an enum target_hw_bp_type instead of an enum
9307 (aarch64_supports_z_point_type): New function.
9308 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9309 use Z_packet_to_target_hw_bp_type.
9311 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9313 * configure.ac: Only use -Werror by default when DEVELOPMENT
9315 * configure: Regenerate.
9317 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9319 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9320 * linux-x86-low.c (X86_64_USER_REGS): New.
9321 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9323 2014-04-28 Yao Qi <yao@codesourcery.com>
9325 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9328 2014-04-25 Pedro Alves <palves@redhat.com>
9331 * linux-low.c (linux_attach_fail_reason_string): New function.
9332 (linux_attach_lwp): Delete.
9333 (linux_attach_lwp_1): Rename to ...
9334 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9335 argument. Remove "initial" parameter. Return int instead of
9336 void. Don't error or warn here.
9337 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9338 failure to attach to the tgid. Call warning when failing to
9340 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9341 argument. Remove "initial" parameter. Return int instead of
9342 void. Don't error or warn here.
9343 (linux_attach_fail_reason_string): New declaration.
9344 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9345 interface change. Use linux_attach_fail_reason_string.
9347 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9348 Walfred Tedeschi <walfred.tedeschi@intel.com>
9350 * Makefile.in: Added rules to handle new files
9351 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9352 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9353 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9354 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9355 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9356 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9358 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9359 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9360 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9361 i386/x32-avx512.xml.
9362 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9363 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9364 i386/x32-avx512-linux.xml.
9365 * i387-fp.c (num_avx512_k_registers): New constant for number
9367 (num_avx512_zmmh_low_registers): New constant for number of
9368 lower ZMM registers (0-15).
9369 (num_avx512_zmmh_high_registers): New constant for number of
9370 higher ZMM registers (16-31).
9371 (num_avx512_ymmh_registers): New contant for number of higher
9372 YMM registers (ymm16-31 added by avx521 on x86_64).
9373 (num_avx512_xmm_registers): New constant for number of higher
9374 XMM registers (xmm16-31 added by AVX512 on x86_64).
9375 (struct i387_xsave): Add space for AVX512 registers.
9376 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9377 Add code to handle AVX512 registers.
9378 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9379 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9380 prototypei from generated file.
9381 (tdesc_amd64_avx512_linux): Likewise.
9382 (init_registers_x32_avx512_linux): Likewise.
9383 (tdesc_x32_avx512_linux): Likewise.
9384 (init_registers_i386_avx512_linux): Likewise.
9385 (tdesc_i386_avx512_linux): Likewise.
9386 (x86_64_regmap): Add AVX512 registers.
9387 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9389 (initialize_low_arch): Add code to initialize AVX512 registers.
9391 2014-04-23 Pedro Alves <palves@redhat.com>
9393 * mem-break.c (find_gdb_breakpoint_at): Make static.
9394 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9396 2014-04-23 Pedro Alves <palves@redhat.com>
9398 * i386-low.c: Don't include break-common.h here.
9399 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9400 prototype to take target_hw_bp_type as argument instead of a Z
9402 * i386-low.h: Include break-common.h here.
9403 (Z_packet_to_hw_type): Declare.
9404 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9406 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9407 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9408 (x86_remove_point): Convert the packet number to a
9409 target_hw_bp_type before calling i386_low_remove_watchpoint.
9410 * win32-i386-low.c (i386_insert_point): Convert the packet number
9411 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9412 (i386_remove_point): Convert the packet number to a
9413 target_hw_bp_type before calling i386_low_remove_watchpoint.
9415 2014-04-23 Pedro Alves <palves@redhat.com>
9417 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9419 2014-04-10 Pedro Alves <palves@redhat.com>
9421 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9422 Check if the condition or command is NULL before checking if the
9423 breakpoint is known. On success, return true.
9424 * mem-break.h (add_breakpoint_condition): Document return.
9425 (add_breakpoint_commands): Add describing comment.
9426 * server.c (skip_to_semicolon): New function.
9427 (process_point_options): Use it.
9429 2014-04-09 Pedro Alves <palves@redhat.com>
9431 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9434 2014-02-27 Pedro Alves <palves@redhat.com>
9437 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9439 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9441 (last_thread_of_process_p): Take a PID argument instead of a
9443 (linux_wait_for_lwp): Delete.
9444 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9446 (linux_low_filter_event): New function, party factored out from
9447 linux_wait_for_event.
9448 (linux_wait_for_event): Rename to ...
9449 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9450 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9451 sigsuspend. Check for zombie leaders.
9452 (linux_wait_for_event): Reimplement as wrapper around
9453 linux_wait_for_event_filtered.
9454 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9455 a normal or signal exit is seen, it's the whole process exiting.
9456 (wait_for_sigstop): No longer a for_each_inferior callback.
9457 Rewrite on top of linux_wait_for_event_filtered.
9458 (stop_all_lwps): Call wait_for_sigstop directly.
9459 * server.c (resume, handle_target_event): Handle
9460 TARGET_WAITKIND_NO_RESUMED.
9462 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9464 * win32-low.c (psapi_get_dll_name,
9465 * win32_CreateToolhelp32Snapshot): Delete.
9466 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9467 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9469 (handle_load_dll): Add function description.
9470 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9472 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9474 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9476 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9477 base address when calling win32_add_one_solib.
9478 (handle_load_dll): Delete local variable load_addr.
9479 Remove 0x1000 offset applied to DLL base address when calling
9480 win32_add_one_solib.
9481 (handle_unload_dll): Add comment.
9483 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9485 * win32-low.c (win32_add_all_dlls): Renames
9486 win32_ensure_ntdll_loaded. Rewrite function documentation.
9487 Adjust implementation to always load all DLLs.
9488 Add 0x1000 offset to DLL base address when calling
9489 win32_add_one_solib.
9490 (child_initialization_done): New static global.
9491 (do_initial_child_stuff): Set child_initialization_done to
9492 zero during child initialization, and 1 after. Replace call
9493 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9495 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9496 (handle_unload_dll): Add function documentation.
9497 (get_child_debug_event): Ignore load and unload DLL events
9498 during child initialization.
9500 2014-02-20 Doug Evans <dje@google.com>
9502 Remove global all_lwps.
9503 * inferiors.h (ptid_of): Move here from linux-low.h.
9504 (pid_of, lwpid_of): Ditto.
9505 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9506 parameter is a struct thread_info * now.
9507 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9508 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9509 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9511 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9512 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9513 * linux-arm-low.c (update_registers_callback): Update, "entry"
9514 parameter is a struct thread_info * now.
9515 Fetch lwpid from current_inferior directly.
9516 (arm_insert_point): Pass &all_threads to find_inferior instead of
9518 (arm_remove_point): Ditto.
9519 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9520 (arm_prepare_to_resume): Fetch pid from thread.
9521 (arm_read_description): Fetch lwpid from current_inferior directly.
9522 * linux-low.c (all_lwps): Delete.
9523 (delete_lwp): Delete call to remove_inferior.
9524 (handle_extended_wait): Fetch lwpid from thread.
9525 (add_lwp): Don't set lwp->entry.id. Remove call to
9526 add_inferior_to_list.
9527 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9528 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9529 (kill_one_lwp_callback): Ditto.
9530 (linux_kill): Don't dereference NULL pointer.
9531 Fetch ptid,lwpid from thread.
9532 (get_detach_signal): Fetch ptid from thread.
9533 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9534 Simplify call to regcache_invalidate_thread.
9535 (delete_lwp_callback): Update, "entry" parameter is a
9536 struct thread_info * now. Fetch pid from thread.
9537 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9538 (status_pending_p_callback): Update, "entry" parameter is a
9539 struct thread_info * now. Fetch ptid from thread.
9540 (find_lwp_pid): Update, "entry" parameter is a
9541 struct thread_info * now.
9542 (linux_wait_for_lwp): Fetch pid from thread.
9543 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
9544 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
9545 (enqueue_one_deferred_signal): Fetch lwpid from thread.
9546 (dequeue_one_deferred_signal): Ditto.
9547 (cancel_breakpoint): Fetch ptid from current_inferior.
9548 (linux_wait_for_event): Pass &all_threads to find_inferior,
9549 not &all_lwps. Fetch ptid, lwpid from thread.
9550 (count_events_callback): Update, "entry" parameter is a
9551 struct thread_info * now.
9552 (select_singlestep_lwp_callback): Ditto.
9553 (select_event_lwp_callback): Ditto.
9554 (cancel_breakpoints_callback): Ditto.
9555 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
9557 (select_event_lwp): Ditto. Fetch ptid from event_thread.
9558 (unsuspend_one_lwp): Update, "entry" parameter is a
9559 struct thread_info * now.
9560 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
9562 (linux_stabilize_threads): Ditto. And for for_each_inferior.
9563 Fetch lwpid from thread, not lwp.
9564 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
9565 Pass &all_threads to find_inferior, not &all_lwps.
9566 (send_sigstop): Fetch lwpid from thread, not lwp.
9567 (send_sigstop_callback): Update, "entry" parameter is a
9568 struct thread_info * now.
9569 (suspend_and_send_sigstop_callback): Ditto.
9570 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
9571 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
9572 struct thread_info * now.
9573 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
9575 (lwp_running): Update, "entry" parameter is a
9576 struct thread_info * now.
9577 (stop_all_lwps): Fetch ptid from thread.
9578 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
9579 (linux_resume_one_lwp): Fetch lwpid from thread.
9580 (linux_set_resume_request): Update, "entry" parameter is a
9581 struct thread_info * now. Fetch pid, lwpid from thread.
9582 (resume_status_pending_p): Update, "entry" parameter is a
9583 struct thread_info * now.
9584 (need_step_over_p): Ditto. Fetch lwpid from thread.
9585 (start_step_over): Fetch lwpid from thread.
9586 (linux_resume_one_thread): Update, "entry" parameter is a
9587 struct thread_info * now. Fetch lwpid from thread.
9588 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
9589 (proceed_one_lwp): Update, "entry" parameter is a
9590 struct thread_info * now. Fetch lwpid from thread.
9591 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
9592 struct thread_info * now.
9593 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
9594 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
9595 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
9597 (regsets_store_inferior_registers): Ditto.
9598 (fetch_register, store_register): Ditto.
9599 (linux_read_memory, linux_write_memory): Ditto.
9600 (linux_request_interrupt): Ditto.
9601 (linux_read_auxv): Ditto.
9602 (linux_xfer_siginfo): Ditto.
9603 (linux_qxfer_spu): Ditto.
9604 (linux_qxfer_libraries_svr4): Ditto.
9605 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
9606 moved to inferiors.h.
9608 (get_thread_lwp): Update.
9609 (struct lwp_info): Delete member "entry". Simplify comment for
9612 * linux-mips-low.c (mips_read_description): Fetch lwpid from
9613 current_inferior directly.
9614 (update_watch_registers_callback): Update, "entry" parameter is a
9615 struct thread_info * now. Fetch pid from thread.
9616 (mips_linux_prepare_to_resume): Fetch ptid from thread.
9617 (mips_insert_point): Fetch lwpid from current_inferior.
9618 Pass &all_threads to find_inferior, not &all_lwps.
9619 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
9620 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
9622 (mips_stopped_data_address): Ditto.
9623 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
9625 * linux-tile-low.c (tile_arch_setup): Ditto.
9626 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
9627 (update_debug_registers_callback): Update, "entry" parameter is a
9628 struct thread_info * now. Fetch pid from thread.
9629 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
9630 Pass &all_threads to find_inferior, not &all_lwps.
9631 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
9632 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
9633 Pass &all_threads to find_inferior, not &all_lwps.
9634 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
9635 (i386_dr_low_get_status): Ditto.
9636 (x86_linux_prepare_to_resume): Fetch ptid from thread.
9637 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
9638 (x86_linux_read_description): Ditto.
9639 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
9641 2014-02-20 Doug Evans <dje@google.com>
9643 * inferiors.c (get_first_inferior): Fix buglet.
9645 2014-02-19 Doug Evans <dje@google.com>
9647 * gdbthread.h (add_thread): Change result type to struct thread_info *.
9648 * inferiors.c (add_thread): Change result type to struct thread_info *.
9649 All callers updated.
9650 (add_lwp): Call add_thread here instead of in callers.
9651 All callers updated.
9652 * linux-low.h (get_lwp_thread): Rewrite.
9653 (struct lwp_info): New member "thread".
9655 2014-02-19 Doug Evans <dje@google.com>
9657 * linux-low.c (add_lwp): Change result to struct lwp_info *.
9658 All callers updated.
9660 2014-02-19 Doug Evans <dje@google.com>
9662 * inferiors.c (add_thread): Fix whitespace.
9664 2014-02-19 Doug Evans <dje@google.com>
9666 * dll.c (clear_dlls): Replace accessing list implemention details
9668 * gdbthread.h (get_first_thread): Declare.
9669 * inferiors.c (for_each_inferior_with_data): New function.
9670 (get_first_thread): New function.
9671 (find_thread_ptid): Simplify.
9672 (get_first_inferior): New function.
9673 (clear_list): Delete.
9674 (one_inferior_p): New function.
9675 (clear_inferior_list): New function.
9676 (clear_inferiors): Update.
9677 * inferiors.h (for_each_inferior_with_data): Declare.
9678 (clear_inferior_list): Declare.
9679 (one_inferior_p): Declare.
9680 (get_first_inferior): Declare.
9681 * linux-low.c (linux_wait_for_event): Replace accessing list
9682 implemention details with API function.
9683 * server.c (target_running): Ditto.
9684 (accumulate_file_name_length): New function.
9685 (emit_dll_description): New function.
9686 (handle_qxfer_libraries): Replace accessing list implemention
9687 details with API function.
9688 (handle_qxfer_threads_worker): New function.
9689 (handle_qxfer_threads_proper): Replace accessing list implemention
9690 details with API function.
9691 (handle_query): Ditto.
9692 (visit_actioned_threads_callback_ftype): New typedef.
9693 (visit_actioned_threads_data): New struct.
9694 (visit_actioned_threads): Rewrite to be find_inferior callback.
9695 (resume): Call find_inferior.
9696 (handle_status): Replace accessing list implemention
9697 details with API function.
9698 (process_serial_event): Replace accessing list implemention details
9700 * target.c (set_desired_inferior): Replace accessing list implemention
9701 details with API function.
9702 * tracepoint.c (same_process_p): New function.
9703 (gdb_agent_about_to_close): Replace accessing list implemention
9704 details with API function.
9705 * win32-low.c (child_delete_thread): Replace accessing list
9706 implemention details with API function.
9707 (match_dll_by_basename): New function.
9708 (dll_is_loaded_by_basename): New function.
9709 (win32_ensure_ntdll_loaded): Replace accessing list implemention
9710 details call to dll_is_loaded_by_basename.
9712 2014-02-19 Doug Evans <dje@google.com>
9714 * dll.h (struct dll_info): Add comment.
9715 * gdbthread.h (struct thread_info): Add comment.
9716 (current_ptid): Simplify.
9717 * inferiors.c (add_process): Update.
9718 (remove_process): Update.
9719 * inferiors.h (struct process_info): Rename member "head" to "entry".
9720 * linux-low.c (delete_lwp): Update.
9722 (last_thread_of_process_p): Update.
9723 (kill_one_lwp_callback, linux_kill): Update.
9724 (status_pending_p_callback): Update.
9725 (wait_for_sigstop): Update. Simplify read of ptid.
9726 (start_step_over): Update.
9727 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
9728 (get_lwp_thread): Update.
9729 (struct lwp_info): Rename member "head" to "entry".
9730 * regcache.h (inferior_list_entry): Delete.
9731 * server.c (kill_inferior_callback): Update.
9732 (detach_or_kill_inferior_callback): Update.
9733 (print_started_pid): Update.
9734 (print_attached_pid): Update.
9735 (process_serial_event): Simplify read of ptid.
9736 * thread-db.c (thread_db_create_event): Update.
9737 (thread_db_get_tls_address): Update.
9738 * win32-low.c (current_inferior_ptid): Simplify.
9740 2014-02-19 Tom Tromey <tromey@redhat.com>
9742 * target.h (struct target_ops) <supports_btrace>: Add target_ops
9744 (target_supports_btrace): Update.
9746 2014-02-14 Yao Qi <yao@codesourcery.com>
9748 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9749 (rsp-low-ipa.o): New target.
9751 2014-02-12 Tom Tromey <tromey@redhat.com>
9753 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9754 convert_ascii_to_int.
9755 * regcache.c (registers_to_string): Likewise.
9756 * remote-utils.c (decode_M_packet): Likewise.
9757 * server.c (process_serial_event): Likewise.
9759 2014-02-12 Tom Tromey <tromey@redhat.com>
9761 * server.c (handle_query, handle_v_run): Use hex2bin, not
9763 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9765 2014-02-12 Tom Tromey <tromey@redhat.com>
9767 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9768 convert_int_to_ascii.
9769 * regcache.c (registers_to_string, collect_register_as_string):
9771 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9773 * server.c (process_serial_event): Likewise.
9774 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9775 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9777 2014-02-12 Tom Tromey <tromey@redhat.com>
9779 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9780 bin2hex, not hexify.
9781 * tracepoint.c (cmd_qtstatus): Likewise.
9783 2014-02-12 Tom Tromey <tromey@redhat.com>
9785 * remote-utils.c (monitor_output): Pass explicit length to
9788 2014-02-12 Tom Tromey <tromey@redhat.com>
9790 * tracepoint.c: Include rsp-low.h.
9791 * server.c: Include rsp-low.h.
9792 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9793 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9795 * remote-utils.c: Include rsp-low.h.
9796 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9797 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9798 (convert_int_to_ascii, convert_ascii_to_int): Move to
9800 * regcache.c: Include rsp-low.h.
9801 * ax.c: Include rsp-low.h.
9802 * Makefile.in (SFILES): Add common/rsp-low.c.
9803 (OBS): Add rsp-low.o.
9804 (rsp-low.o): New target.
9806 2014-02-12 Tom Tromey <tromey@redhat.com>
9808 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9809 Include print-utils.h.
9810 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9811 (plongest, thirty_two, phex_nz): Remove.
9812 * Makefile.in (SFILES): Add common/print-utils.c.
9813 (OBS): Add print-utils.o.
9814 (print-utils-ipa.o): New target.
9815 (print-utils.o): New target.
9816 (IPA_OBJS): Add print-utils-ipa.o.
9818 2014-02-06 Tom Tromey <tromey@redhat.com>
9820 * Makefile.in (SFILES): Fix indentation.
9822 2014-02-05 Doug Evans <dje@google.com>
9824 * linux-low.c (linux_wait_for_event): Improve comment.
9825 (linux_wait_1): Keep current_inferior in sync with event_child.
9827 2014-01-22 Doug Evans <dje@google.com>
9829 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9831 2014-01-22 Doug Evans <dje@google.com>
9833 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9834 * configure: Regenerate.
9835 * config.in: Regenerate.
9836 * Makefile.in (SFILES): Add debug.c.
9838 * debug.c: New file.
9839 * debug.h: New file.
9840 * linux-aarch64-low.c (*): Update all debugging printfs to use
9841 debug_printf instead of fprintf.
9842 * linux-arm-low.c (*): Ditto.
9843 * linux-cris-low.c (*): Ditto.
9844 * linux-crisv32-low.c (*): Ditto.
9845 * linux-m32r-low.c (*): Ditto.
9846 * linux-sparc-low.c (*): Ditto.
9847 * linux-x86.c (*): Ditto.
9848 * linux-low.c (*): Ditto.
9849 (linux_wait_1): Add calls to debug_enter, debug_exit.
9850 (linux_wait): Remove redundant debugging printf.
9851 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9852 (linux_resume, unstop_all_lwps): Ditto.
9853 * mem-break.c (*): Update all debugging printfs to use
9854 debug_printf instead of fprintf.
9855 * remote-utils.c (*): Ditto.
9856 * thread-db.c (*): Ditto.
9857 * server.c #include <ctype.h>, "gdb_vecs.h".
9858 (debug_threads): Moved to debug.c.
9859 (*): Update all debugging printfs to use debug_printf instead of
9861 (start_inferior): Replace call to fflush with call to debug_flush.
9862 (monitor_show_help): Mention set debug-format.
9863 (parse_debug_format_options): New function.
9864 (handle_monitor_command): Handle "monitor set debug-format".
9865 (gdbserver_usage): Mention --debug-format.
9866 (main): Parse --debug-format.
9867 * server.h (debug_threads): Declaration moved to debug.h.
9869 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9870 trace_debug_1 that uses debug_printf.
9871 (tracepoint_look_up_symbols): Update all debugging printfs to use
9872 debug_printf instead of fprintf.
9874 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9876 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9879 2014-01-17 Pedro Alves <palves@redhat.com>
9882 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9883 defined after including gdb_proc_service.h.
9885 2014-01-16 Doug Evans <dje@google.com>
9887 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9888 (match_dll): Use it.
9890 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9892 * target.h (target_ops) <read_btrace>: Change parameters and
9893 return type to allow error reporting.
9894 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9895 trace reading errors on.
9896 * linux-low.c (linux_low_read_btrace): Pass trace reading
9898 (linux_low_disable_btrace): New.
9900 2014-01-15 Doug Evans <dje@google.com>
9902 * inferiors.c (thread_id_to_gdb_id): Delete.
9903 * inferiors.h (thread_id_to_gdb_id): Delete.
9905 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9907 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9908 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9911 2014-01-08 Pedro Alves <palves@redhat.com>
9913 * server.c (handle_status): Don't discard previous queued stop
9914 replies or thread's pending status here.
9915 (main) <disconnection>: Do it here instead.
9917 2014-01-08 Pedro Alves <palves@redhat.com>
9919 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9920 * server.c (visit_actioned_threads, handle_pending_status): New
9922 (handle_v_cont): Factor out parts to ...
9923 (resume): ... this new function. If in all-stop, and a thread
9924 being resumed has a pending status, report it without actually
9926 (myresume): Adjust to use the new 'resume' function.
9927 (clear_pending_status_callback, set_pending_status_callback)
9928 (find_status_pending_thread_callback): New functions.
9929 (handle_status): Handle the case of multiple threads having
9930 interesting statuses to report. Report threads' real last signal
9931 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9932 with an interesting thread to report the status for, instead of
9933 always reporting the status of the first thread.
9935 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9937 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9938 * gdbreplay.c (gdbreplay_version): Likewise.
9940 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9942 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9943 iov.iov_len with the real length in use.
9945 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9947 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9948 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9949 for all targets that use win32-low.c.
9950 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9951 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9953 2013-12-13 Pedro Alves <palves@redhat.com>
9955 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9956 if equal to TARGET_WAITKIND_LOADED.
9957 * win32-low.c (cached_status): New static global.
9958 (win32_wait): Add declaration.
9959 (do_initial_child_stuff): Flush all initial pending debug events
9960 up to the initial breakpoint.
9961 (win32_wait): If CACHED_STATUS was set, return that instead
9962 of doing a real wait. Remove the code resuming the execution
9963 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9964 during the initial phase. Also remove the code changing
9965 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9966 TARGET_WAITKIND_STOPPED.
9968 2013-12-11 Yao Qi <yao@codesourcery.com>
9970 * notif.c (handle_notif_ack): Return 0 if no notification
9973 2013-11-20 Doug Evans <dje@google.com>
9975 * linux-low.c (linux_set_resume_request): Fix comment.
9977 2013-11-20 Doug Evans <dje@google.com>
9979 * linux-low.c (resume_status_pending_p): Tweak comment.
9981 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9983 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9984 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9985 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9986 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9987 (srv_amd64_regobj): Add amd64-mpx.o.
9988 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9989 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9990 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9991 * i387-fp.c (num_pl_bnd_register) Added constant.
9992 (num_pl_bnd_cfg_registers) Added constant.
9993 (struct i387_xsave) Added reserved area and MPX fields.
9994 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9995 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9997 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9998 (init_registers_amd64_mpx_linux): Declare new function.
9999 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10000 (x86_64_regmap): Add MPX registers.
10001 (x86_linux_read_description): Add MPX case.
10002 (initialize_low_arch): Initialize MPX targets.
10004 2013-11-18 Tom Tromey <tromey@redhat.com>
10006 * configure: Rebuild.
10007 * configure.ac: Don't check for stdlib.h.
10008 * gdbreplay.c: Unconditionally include stdlib.h.
10010 2013-11-18 Tom Tromey <tromey@redhat.com>
10012 * config.in: Rebuild.
10013 * configure: Rebuild.
10014 * configure.ac: Don't use AC_HEADER_DIRENT.
10016 2013-11-18 Tom Tromey <tromey@redhat.com>
10018 * server.h: Don't check HAVE_STRING_H.
10019 * gdbreplay.c: Don't check HAVE_STRING_H.
10020 * configure: Rebuild.
10022 2013-11-18 Tom Tromey <tromey@redhat.com>
10024 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10027 2013-11-08 Tom Tromey <tromey@redhat.com>
10029 * configure, config.in: Rebuild.
10030 * configure.ac: Remove unused configury.
10032 2013-11-08 Tom Tromey <tromey@redhat.com>
10034 * acinclude.m4: Include common.m4, codeset.m4.
10035 * configure, config.in: Rebuild.
10036 * configure.ac: Use GDB_AC_COMMON.
10038 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10040 * linux-s390-low.c (HWCAP_S390_TE): New define.
10041 (s390_arch_setup): Consider the TE field in the HWCAP for
10042 determining 'have_regset_tdb'.
10044 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10047 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10050 2013-10-02 Pedro Alves <palves@redhat.com>
10052 * server.c (process_serial_event): Don't output "GDBserver
10053 exiting" if GDB is connected through stdio.
10054 * target.c (mywait): Likewise, be silent if GDB is connected
10057 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10059 * lynx-low.c (lynx_add_threads_after_attach): New function.
10060 (lynx_attach): Remove call to add_thread. Add call to
10061 lynx_add_threads_after_attach instead.
10063 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10065 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10066 * config.in, configure: Regenerated.
10068 2013-09-18 Yao Qi <yao@codesourcery.com>
10071 * server.c (start_inferior): Clear 'resume_info'.
10073 2013-09-16 Jiong Wang <jiwang@tilera.com>
10075 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10078 2013-09-16 Jiong Wang <jiwang@tilera.com>
10080 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10081 linux-tile-low.o to srv_tgtobj.
10083 2013-09-16 Will Newton <will.newton@linaro.org>
10085 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10088 2013-09-06 Pedro Alves <palves@redhat.com>
10090 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10091 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10092 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10093 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10094 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10095 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10097 2013-09-06 Pedro Alves <palves@redhat.com>
10099 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10100 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10102 2013-09-06 Pedro Alves <palves@redhat.com>
10104 * linux-amd64-ipa.c: Include tracepoint.h.
10105 * linux-i386-ipa.c: Include tracepoint.h.
10107 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10109 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10110 (ps_get_thread_area): New function.
10112 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10114 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10115 (initialize_low_arch): Call init_registers_crisv32 rather than
10116 init_register_crisv32.
10118 2013-09-05 Pedro Alves <palves@redhat.com>
10120 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10122 * hostio.h: ... this new file.
10123 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10124 win32-low.c: Include hostio.h.
10126 2013-09-05 Pedro Alves <palves@redhat.com>
10128 * server.h (gdb_client_data, handler_func, callback_handler_func)
10129 (delete_file_handler, add_file_handler, append_callback_event)
10130 (delete_callback_event, start_event_loop, initialize_event_loop):
10131 Move to event-loop.h and include it.
10132 * event-loop.h: New file.
10134 2013-09-05 Pedro Alves <palves@redhat.com>
10136 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10137 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10138 (loaded_dll, unloaded_dll): Move to ...
10139 * dll.h: ... this new file.
10140 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10142 2013-09-05 Pedro Alves <palves@redhat.com>
10144 * server.h (current_process, get_thread_process, all_processes)
10145 (add_inferior_to_list, for_each_inferior, current_inferior)
10146 (remove_inferior, add_process, remove_process, find_process_pid)
10147 (have_started_inferiors_p, have_attached_inferiors_p)
10148 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10149 (clear_inferiors, find_inferior, find_inferior_id)
10150 (inferior_target_data, set_inferior_target_data)
10151 (inferior_regcache_data, set_inferior_regcache_data): Move to
10152 inferiors.h, and include it.
10153 * inferiors.h: New file.
10155 2013-09-05 Pedro Alves <palves@redhat.com>
10157 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10161 2013-09-05 Pedro Alves <palves@redhat.com>
10163 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10165 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10166 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10167 (handle_tracepoint_general_set, handle_tracepoint_query)
10168 (tracepoint_finished_step, tracepoint_was_hit)
10169 (release_while_stepping_state_list, current_traceframe)
10170 (in_readonly_region, traceframe_read_mem)
10171 (fetch_traceframe_registers, traceframe_read_sdata)
10172 (traceframe_read_info, struct fast_tpoint_collect_status)
10173 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10174 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10175 (supply_fast_tracepoint_registers)
10176 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10177 (ipa_tdesc, claim_trampoline_space)
10178 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10179 (agent_mem_read, agent_get_trace_state_variable_value)
10180 (agent_set_trace_state_variable_value, agent_tsv_read)
10181 (agent_mem_read_string, get_raw_reg_func_addr)
10182 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10183 * tracepoint.h: ... this new file.
10185 2013-09-05 Pedro Alves <palves@redhat.com>
10187 * server.h (perror_with_name, error, fatal, warning, paddress)
10188 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10190 * utils.h: New file.
10192 2013-09-05 Pedro Alves <palves@redhat.com>
10194 * server.h (remote_debug, noack_mode, transport_is_reliable)
10195 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10196 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10197 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10198 (write_enn, initialize_async_io, enable_async_io)
10199 (disable_async_io, check_remote_input_interrupt_request)
10200 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10201 (dead_thread_notify, prepare_resume_reply)
10202 (decode_address_to_semicolon, decode_address, decode_m_packet)
10203 (decode_M_packet, decode_X_packet, decode_xfer_write)
10204 (decode_search_memory_packet, unhexify, hexify)
10205 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10206 (look_up_one_symbol, relocate_instruction)
10207 (monitor_output): Move to remote-utils.h, and include it.
10208 * remote-utils.h: New file.
10210 2013-09-05 Pedro Alves <palves@redhat.com>
10212 * server.h (_): Delete.
10214 2013-09-02 Pedro Alves <palves@redhat.com>
10216 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10217 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10219 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10221 2013-09-02 Pierre Muller <muller@sourceware.org>
10223 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10224 or WriteProcessMemory complete successfully and handle
10225 ERROR_PARTIAL_COPY error.
10227 2013-09-02 Pedro Alves <palves@redhat.com>
10229 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10230 error instead of EIO.
10232 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10235 * linux-low.c: Include filestuff.h.
10236 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10237 * lynx-low.c: Include filestuff.h.
10238 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10239 * server.c: Include filestuff.h.
10240 (main): Call notice_open_fds.
10241 * spu-low.c: Include filestuff.h.
10242 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10244 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10246 * Makefile.in: Explain why ../target and ../nat are not
10247 listed as include file search paths.
10248 (linux-waitpid.o): New object file rule.
10249 * configure.srv (srv_native_linux_obj): New variable.
10250 Replace all occurrences of linux native object files with
10251 $srv_native_linux_obj.
10252 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10253 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10254 (linux_enable_event_reporting): Remove declaration.
10255 (my_waitpid): Moved to common/linux-waitpid.c.
10256 (linux_wait_for_event): Pass ptid when calling
10257 linux_enable_event_reporting.
10258 (linux_supports_tracefork_flag): Remove.
10259 (linux_enable_event_reporting): Likewise.
10260 (linux_tracefork_grandchild): Remove.
10261 (STACK_SIZE): Moved to common/linux-ptrace.c.
10262 (linux_tracefork_child): Remove.
10263 (linux_test_for_tracefork): Remove.
10264 (linux_look_up_symbols): Call linux_supports_traceclone.
10265 (initialize_low): Remove call to linux_test_for_tracefork.
10266 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10267 common/linux-ptrace.h.
10268 (PTRACE_TYPE_ARG4): Likewise.
10269 Include linux-ptrace.h.
10271 2013-08-21 Pedro Alves <palves@redhat.com>
10273 * config.in: Renegerate.
10275 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10277 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10278 (SFILES): Remove $(srcdir)/common/target-common.c and
10279 add $(srcdir)/target/waitstatus.c.
10280 (OBS): Remove target-common.o and add waitstatus.o.
10281 (server_h): Remove $(srcdir)/../common/target-common.h and
10282 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10283 and $(srcdir)/../target/waitstatus.h.
10284 (target-common.o): Remove.
10285 (waitstatus.o): New target object file.
10286 * target.h: Do not include target-common.h and
10287 include target/resume.h, target/wait.h and
10288 target/waitstatus.h.
10290 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10292 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10293 to PTRACE_TYPE_ARG3.
10294 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10295 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10297 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10298 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10300 2013-07-27 Jie Zhang <jie@codesourcery.com>
10301 Daniel Jacobowitz <dan@codesourcery.com>
10302 Yao Qi <yao@codesourcery.com>
10304 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10305 (mips-linux-watch.o): New rule.
10306 (mips_linux_watch_h): New variable.
10307 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10309 * linux-mips-low.c: Include mips-linux-watch.h.
10310 (struct arch_process_info, struct arch_lwp_info): New.
10311 (update_watch_registers_callback): New function.
10312 (mips_linux_new_process, mips_linux_new_thread) New functions.
10313 (mips_linux_prepare_to_resume, mips_insert_point): New
10315 (mips_remove_point, mips_stopped_by_watchpoint): New
10317 (rsp_bp_type_to_target_hw_bp_type): New function.
10318 (mips_stopped_data_address): New function.
10319 (the_low_target): Add watchpoint support functions.
10321 2013-07-27 Yao Qi <yao@codesourcery.com>
10323 * i386-low.c: Include break-common.h.
10324 (enum target_hw_bp_type): Remove.
10326 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10328 * Makefile.in (SFILES): /common/target-common.c.
10329 (OBS): Add target-common.o.
10330 (server_h): Add $(srcdir)/../common/target-common.h.
10331 (target-common.o): New target.
10332 * server.c (queue_stop_reply_callback): Free
10333 status string after use.
10334 * target.c (target_waitstatus_to_string): Remove.
10335 * target.h: Include target-common.h.
10336 (resume_kind): Likewise.
10337 (target_waitkind): Likewise.
10338 (target_waitstatus): Likewise.
10339 (TARGET_WNOHANG): Likewise.
10341 2013-07-04 Yao Qi <yao@codesourcery.com>
10343 * Makefile.in (host_alias): Use @host_noncanonical@.
10344 (target_alias): Use @target_noncanonical@.
10345 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10346 ACX_NONCANONICAL_HOST.
10347 * configure: Regenerated.
10350 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10352 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10353 * configure: Rebuild.
10354 * Makefile.in (version_host, version_target): Get from configure.
10355 (version.c): Use $(version_host) and $(version_target).
10357 2013-07-03 Pedro Alves <palves@redhat.com>
10359 * Makefile.in (config.status): Depend on development.sh.
10360 * acinclude.m4: Include libmcheck.m4.
10361 * configure: Regenerate.
10363 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10365 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10366 attribute inside the parentheses.
10367 (winapi_DebugSetProcessKillOnExit): Ditto.
10368 (winapi_DebugBreakProcess): Ditto.
10369 (winapi_GenerateConsoleCtrlEvent): Ditto.
10371 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10373 * notif.h (notif_event): Add a dummy member to avoid compiler
10376 2013-07-01 Pedro Alves <palves@redhat.com>
10378 * hostio.c (HOSTIO_PATH_MAX): Define.
10379 (require_filename, handle_open, handle_unlink, handle_readlink):
10382 2013-07-01 Pedro Alves <palves@redhat.com>
10384 * server.h: Include "pathmax.h".
10385 * linux-low.c: Don't include sys/param.h.
10386 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10388 * win32-low.c: Don't include sys/param.h.
10389 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10391 2013-07-01 Pedro Alves <palves@redhat.com>
10393 * event-loop.c: Don't check HAVE_UNISTD_H before including
10395 * gdbreplay.c: Likewise.
10396 * remote-utils.c: Likewise.
10397 * server.c: Likewise.
10398 * configure.ac: Don't check for unistd.h.
10399 * configure: Regenerate.
10401 2013-06-28 Tom Tromey <tromey@redhat.com>
10403 * Makefile.in (version.c): Use version.in, not
10406 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10408 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10409 * configure: Rebuild.
10410 * Makefile.in (version_host, version_target): Get from configure.
10411 (version.c): Use $(version_host) and $(version_target).
10413 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10415 Fix trace-status to output user name without trailing colon.
10416 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10418 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10420 Fix trace-status to output proper start-time and stop-time.
10421 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10422 output start time and stop time in hex as gdb expects.
10424 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10426 * tracepoint.c (build_traceframe_info_xml): Output trace state
10427 variables present in the trace buffer.
10429 2013-06-24 Tom Tromey <tromey@redhat.com>
10431 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10433 (version.o): Remove.
10434 * gdbreplay.c: Include version.h.
10435 (version, host_name): Don't declare.
10436 * server.h: Include version.h.
10437 (version, host_name): Don't declare.
10439 2013-06-12 Pedro Alves <palves@redhat.com>
10441 * linux-x86-low.c (linux_is_elf64): Delete global.
10442 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10443 with local linux_pid_exe_is_elf_64_file use.
10445 2013-06-11 Pedro Alves <palves@redhat.com>
10447 * linux-low.c (regset_disabled, disable_regset): New functions.
10448 (regsets_fetch_inferior_registers)
10449 (regsets_store_inferior_registers): Use them.
10450 (initialize_regsets_info); Don't allocate the disabled_regsets
10452 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10455 2013-06-11 Pedro Alves <palves@redhat.com>
10457 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10460 2013-06-11 Pedro Alves <palves@redhat.com>
10462 * linux-x86-low.c (initialize_low_arch): Call
10463 init_registers_x32_avx_linux.
10465 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10467 Fix compatibility with Android Bionic.
10468 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10471 2013-06-07 Pedro Alves <palves@redhat.com>
10474 * Makefile.in (OBS): Add tdesc.o.
10475 (IPA_OBJS): Add tdesc-ipa.o.
10476 (tdesc-ipa.o): New rule.
10477 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10479 * linux-low.c (new_inferior): Delete.
10480 (disabled_regsets, num_regsets): Delete.
10481 (linux_add_process): Adjust to set the new per-process
10483 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10484 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10485 was a stop. When calling arch_setup, switch the current inferior
10486 to the thread that got an event.
10487 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10488 (regsets_fetch_inferior_registers)
10489 (regsets_store_inferior_registers): New regsets_info parameter.
10491 (linux_register_in_regsets): New regs_info parameter. Adjust to
10493 (register_addr, fetch_register, store_register): New usrregs_info
10494 parameter. Adjust to use it.
10495 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10496 parameter regs_info. Adjust to use it.
10497 (linux_fetch_registers): Get the current inferior's regs_info, and
10499 (linux_store_registers): Ditto.
10500 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10501 (initialize_low): Don't initialize the target_regsets here. Call
10502 initialize_low_arch.
10503 * linux-low.h (target_regsets): Delete declaration.
10504 (struct regsets_info): New.
10505 (struct usrregs_info): New.
10506 (struct regs_info): New.
10507 (struct process_info_private) <new_inferior>: New field.
10508 (struct linux_target_ops): Delete the num_regs, regmap, and
10509 regset_bitmap fields. New field regs_info.
10510 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10511 * i387-fp.c (num_xmm_registers): Delete.
10512 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10513 calls to new interface.
10514 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10515 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10516 Infer the number of xmm registers from the regcache's target
10518 * i387-fp.h (num_xmm_registers): Delete.
10519 * inferiors.c (add_thread): Don't install the thread's regcache
10521 * proc-service.c (gregset_info): Fetch the current inferior's
10522 regs_info. Adjust to use it.
10523 * regcache.c: Include tdesc.h.
10524 (register_bytes, reg_defs, num_registers)
10525 (gdbserver_expedite_regs): Delete.
10526 (get_thread_regcache): If the thread doesn't have a regcache yet,
10527 create one, instead of aborting gdbserver.
10528 (regcache_invalidate_one): Rename to ...
10529 (regcache_invalidate_thread): ... this.
10530 (regcache_invalidate_one): New.
10531 (regcache_invalidate): Only invalidate registers of the current
10533 (init_register_cache): Add target_desc parameter, and use it.
10534 (new_register_cache): Ditto. Assert the target description has a
10535 non zero registers_size.
10536 (regcache_cpy): Add assertions. Adjust.
10537 (realloc_register_cache, set_register_cache): Delete.
10538 (registers_to_string, registers_from_string): Adjust.
10539 (find_register_by_name, find_regno, find_register_by_number)
10540 (register_cache_size): Add target_desc parameter, and use it.
10541 (free_register_cache_thread, free_register_cache_thread_one)
10542 (regcache_release, register_cache_size): New.
10543 (register_size): Add target_desc parameter, and use it.
10544 (register_data, supply_register, supply_register_zeroed)
10545 (supply_regblock, supply_register_by_name, collect_register)
10546 (collect_register_as_string, collect_register_by_name): Adjust.
10547 * regcache.h (struct target_desc): Forward declare.
10548 (struct regcache) <tdesc>: New field.
10549 (init_register_cache, new_register_cache): Add target_desc
10551 (regcache_invalidate_thread): Declare.
10552 (regcache_invalidate_one): Delete declaration.
10553 (regcache_release): Declare.
10554 (find_register_by_number, register_cache_size, register_size)
10555 (find_regno): Add target_desc parameter.
10556 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
10558 * remote-utils.c: Include tdesc.h.
10559 (outreg, prepare_resume_reply): Adjust.
10560 * server.c: Include tdesc.h.
10561 (gdbserver_xmltarget): Delete declaration.
10562 (get_features_xml, process_serial_event): Adjust.
10563 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
10565 (struct process_info) <tdesc>: New field.
10566 (ipa_tdesc): Declare.
10567 * tdesc.c: New file.
10568 * tdesc.h: New file.
10569 * tracepoint.c: Include tdesc.h.
10570 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
10571 (get_context_regcache): Adjust to pass ipa_tdesc down.
10572 (do_action_at_tracepoint): Adjust to get the register cache size
10573 from the context regcache's description.
10574 (traceframe_walk_blocks): Adjust to get the register cache size
10575 from the current trace frame's description.
10576 (traceframe_get_pc): Adjust to get current trace frame's
10577 description and pass it down.
10578 (gdb_collect): Adjust to get the register cache size from the
10580 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
10581 (gdbserver_xmltarget): Delete.
10582 (initialize_low_tracepoint): Set the ipa's target description.
10583 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
10584 (initialize_low_tracepoint): Set the ipa's target description.
10585 * linux-x86-low.c: Include tdesc.h.
10586 [__x86_64__] (is_64bit_tdesc): New.
10587 (ps_get_thread_area, x86_get_thread_area): Use it.
10588 (i386_cannot_store_register): Rename to ...
10589 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
10590 (i386_cannot_fetch_register): Rename to ...
10591 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
10592 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
10594 (target_regsets): Rename to ...
10595 (x86_regsets): ... this.
10596 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
10598 (x86_siginfo_fixup): Use is_64bit_tdesc.
10599 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
10600 (tdesc_x32_avx_linux, tdesc_x32_linux)
10601 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
10603 (x86_linux_update_xmltarget): Delete.
10604 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
10605 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
10606 (AMD64_LINUX_USER64_CS): New.
10607 (x86_linux_read_description): New, based on
10608 x86_linux_update_xmltarget.
10609 (same_process_callback): New.
10610 (x86_arch_setup_process_callback): New.
10611 (x86_linux_update_xmltarget): New.
10612 (x86_regsets_info): New.
10613 (amd64_linux_regs_info): New.
10614 (i386_linux_usrregs_info): New.
10615 (i386_linux_regs_info): New.
10616 (x86_linux_regs_info): New.
10617 (x86_arch_setup): Reimplement.
10618 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
10619 (x86_emit_ops): Ditto.
10620 (the_low_target): Adjust. Install x86_linux_regs_info,
10621 x86_cannot_fetch_register, and x86_cannot_store_register.
10622 (initialize_low_arch): New.
10623 * linux-ia64-low.c (tdesc_ia64): Declare.
10624 (ia64_fetch_register): Adjust.
10625 (ia64_usrregs_info, regs_info): New globals.
10626 (ia64_regs_info): New function.
10627 (the_low_target): Adjust.
10628 (initialize_low_arch): New function.
10629 * linux-sparc-low.c (tdesc_sparc64): Declare.
10630 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
10632 (sparc_arch_setup): New function.
10633 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
10634 (the_low_target): Adjust.
10635 (initialize_low_arch): New function.
10636 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
10637 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
10638 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
10639 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
10640 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
10641 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
10642 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
10643 (tdesc_powerpc_isa205_vsx64l): Declare.
10644 (ppc_cannot_store_register, ppc_collect_ptrace_register)
10645 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
10646 (ppc_set_pc, ppc_get_hwcap): Adjust.
10647 (ppc_usrregs_info): Forward declare.
10648 (!__powerpc64__) ppc_regmap_adjusted: New global.
10649 (ppc_arch_setup): Adjust to the current process'es target
10651 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
10652 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
10653 (ppc_store_evrregset): Adjust.
10654 (target_regsets): Rename to ...
10655 (ppc_regsets): ... this, and make static.
10656 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
10657 (ppc_regs_info): New function.
10658 (the_low_target): Adjust.
10659 (initialize_low_arch): New function.
10660 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
10661 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
10662 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
10663 (tdesc_s390x_linux64v2): Declare.
10664 (s390_collect_ptrace_register, s390_supply_ptrace_register)
10665 (s390_fill_gregset, s390_store_last_break): Adjust.
10666 (target_regsets): Rename to ...
10667 (s390_regsets): ... this, and make static.
10668 (s390_get_pc, s390_set_pc): Adjust.
10669 (s390_get_hwcap): New target_desc parameter, and use it.
10670 [__s390x__] (have_hwcap_s390_high_gprs): New global.
10671 (s390_arch_setup): Adjust to set the current process'es target
10672 description. Don't adjust the regmap.
10673 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
10674 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
10675 (regs_info_3264): New globals.
10676 (s390_regs_info): New function.
10677 (the_low_target): Adjust.
10678 (initialize_low_arch): New function.
10679 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
10680 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
10681 [__mips64] (init_registers_mips_linux)
10682 (init_registers_mips_dsp_linux): Delete defines.
10683 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
10684 (have_dsp): New global.
10685 (mips_read_description): New, based on mips_arch_setup.
10686 (mips_arch_setup): Reimplement.
10687 (get_usrregs_info): New function.
10688 (mips_cannot_fetch_register, mips_cannot_store_register)
10689 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
10690 (mips_fill_fpregset, mips_store_fpregset): Adjust.
10691 (target_regsets): Rename to ...
10692 (mips_regsets): ... this, and make static.
10693 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
10694 (dsp_regs_info, regs_info): New globals.
10695 (mips_regs_info): New function.
10696 (the_low_target): Adjust.
10697 (initialize_low_arch): New function.
10698 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
10699 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
10701 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
10702 (arm_read_description): New, with bits factored from
10704 (arm_arch_setup): Reimplement.
10705 (target_regsets): Rename to ...
10706 (arm_regsets): ... this, and make static.
10707 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
10708 (arm_regs_info): New function.
10709 (the_low_target): Adjust.
10710 (initialize_low_arch): New function.
10711 * linux-m68k-low.c (tdesc_m68k): Declare.
10712 (target_regsets): Rename to ...
10713 (m68k_regsets): ... this, and make static.
10714 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
10715 (m68k_regs_info): New function.
10716 (m68k_arch_setup): New function.
10717 (the_low_target): Adjust.
10718 (initialize_low_arch): New function.
10719 * linux-sh-low.c (tdesc_sharch): Declare.
10720 (target_regsets): Rename to ...
10721 (sh_regsets): ... this, and make static.
10722 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
10723 (sh_regs_info, sh_arch_setup): New functions.
10724 (the_low_target): Adjust.
10725 (initialize_low_arch): New function.
10726 * linux-bfin-low.c (tdesc_bfin): Declare.
10727 (bfin_arch_setup): New function.
10728 (bfin_usrregs_info, regs_info): New globals.
10729 (bfin_regs_info): New function.
10730 (the_low_target): Adjust.
10731 (initialize_low_arch): New function.
10732 * linux-cris-low.c (tdesc_cris): Declare.
10733 (cris_arch_setup): New function.
10734 (cris_usrregs_info, regs_info): New globals.
10735 (cris_regs_info): New function.
10736 (the_low_target): Adjust.
10737 (initialize_low_arch): New function.
10738 * linux-cris-low.c (tdesc_crisv32): Declare.
10739 (cris_arch_setup): New function.
10740 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
10741 (cris_regs_info): New function.
10742 (the_low_target): Adjust.
10743 (initialize_low_arch): New function.
10744 * linux-m32r-low.c (tdesc_m32r): Declare.
10745 (m32r_arch_setup): New function.
10746 (m32r_usrregs_info, regs_info): New globals.
10747 (m32r_regs_info): Adjust.
10748 (initialize_low_arch): New function.
10749 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10750 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10751 (tic6x_usrregs_info): Forward declare.
10752 (tic6x_read_description): New function, based on ...
10753 (tic6x_arch_setup): ... this. Reimplement.
10754 (target_regsets): Rename to ...
10755 (tic6x_regsets): ... this, and make static.
10756 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10757 (tic6x_regs_info): New function.
10758 (the_low_target): Adjust.
10759 (initialize_low_arch): New function.
10760 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10761 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10762 (target_regsets): Rename to ...
10763 (xtensa_regsets): ... this, and make static.
10764 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10766 (xtensa_arch_setup, xtensa_regs_info): New functions.
10767 (the_low_target): Adjust.
10768 (initialize_low_arch): New function.
10769 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10770 (nios2_arch_setup): Set the current process'es tdesc.
10771 (target_regsets): Rename to ...
10772 (nios2_regsets): ... this.
10773 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10774 (nios2_regs_info): New function.
10775 (the_low_target): Adjust.
10776 (initialize_low_arch): New function.
10777 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10778 (aarch64_arch_setup): Set the current process'es tdesc.
10779 (target_regsets): Rename to ...
10780 (aarch64_regsets): ... this.
10781 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10782 (aarch64_regs_info): New function.
10783 (the_low_target): Adjust.
10784 (initialize_low_arch): New function.
10785 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10787 (target_regsets): Rename to ...
10788 (tile_regsets): ... this.
10789 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10790 (tile_regs_info): New function.
10791 (tile_arch_setup): Set the current process'es tdesc.
10792 (the_low_target): Adjust.
10793 (initialize_low_arch): New function.
10794 * spu-low.c (tdesc_spu): Declare.
10795 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10796 * win32-arm-low.c (tdesc_arm): Declare.
10797 (arm_arch_setup): New function.
10798 (the_low_target): Install arm_arch_setup instead of
10799 init_registers_arm.
10800 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10801 (init_windows_x86): Rename to ...
10802 (i386_arch_setup): ... this. Set `win32_tdesc'.
10803 (the_low_target): Adjust.
10804 * win32-low.c (win32_tdesc): New global.
10805 (child_add_thread): Don't create the thread cache here.
10806 (do_initial_child_stuff): Set the new process'es tdesc.
10807 * win32-low.h (struct target_desc): Forward declare.
10808 (win32_tdesc): Declare.
10809 * lynx-i386-low.c (tdesc_i386): Declare global.
10810 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10811 * lynx-low.c (lynx_tdesc): New global.
10812 (lynx_add_process): Set the new process'es tdesc.
10813 * lynx-low.h (struct target_desc): Forward declare.
10814 (lynx_tdesc): Declare global.
10815 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10816 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10817 * nto-low.c (nto_tdesc): New global.
10818 (do_attach): Set the new process'es tdesc.
10819 * nto-low.h (struct target_desc): Forward declare.
10820 (nto_tdesc): Declare.
10821 * nto-x86-low.c (tdesc_i386): Declare.
10822 (nto_x86_arch_setup): Set `nto_tdesc'.
10824 2013-06-04 Gary Benson <gbenson@redhat.com>
10826 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10827 to qSupported response when appropriate.
10828 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10829 with nonzero-length annex.
10830 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10831 arguments supplied in annex.
10833 2013-05-31 Doug Evans <dje@google.com>
10836 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10837 64 bits in 64-cross-32 environment.
10839 2013-05-28 Pedro Alves <palves@redhat.com>
10841 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10842 (aarch64-without-fpu.c): Delete rule.
10843 * configure.srv (aarch64*-*-linux*): Remove references to
10844 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10845 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10848 2013-05-24 Pedro Alves <palves@redhat.com>
10850 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10851 instead of strchr/decode_address. Error if the range isn't split
10852 with a ','. Don't assume there's be a ':' in the action.
10854 2013-05-23 Yao Qi <yao@codesourcery.com>
10855 Pedro Alves <palves@redhat.com>
10857 * linux-low.c (lwp_in_step_range): New function.
10858 (linux_wait_1): If the thread was range stepping and stopped
10859 outside the stepping range, report the stop to GDB. Otherwise,
10860 continue stepping. Add range stepping debug output.
10861 (linux_set_resume_request): Copy the step range from the resume
10862 request to the lwp.
10863 (linux_supports_range_stepping): New.
10864 (linux_target_ops) <supports_range_stepping>: Set to
10865 linux_supports_range_stepping.
10866 * linux-low.h (struct linux_target_ops)
10867 <supports_range_stepping>: New field.
10868 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10869 * linux-x86-low.c (x86_supports_range_stepping): New.
10870 (the_low_target) <supports_range_stepping>: Set to
10871 x86_supports_range_stepping.
10872 * server.c (handle_v_cont): Handle 'r' action.
10873 (handle_v_requests): Append ";r" if the target supports range
10875 * target.h (struct thread_resume) <step_range_start,
10876 step_range_end>: New fields.
10877 (struct target_ops) <supports_range_stepping>:
10879 (target_supports_range_stepping): New macro.
10881 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10883 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10884 confusion in comment.
10886 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10888 * lynx-low.c (struct process_info_private): New type.
10889 (lynx_add_process): New function.
10890 (lynx_create_inferior, lynx_attach): Replace calls to
10891 add_process by calls to lynx_add_process.
10892 (lynx_resume): If PTID is null, then try using
10893 current_process()->private->last_wait_event_ptid.
10895 (lynx_clear_inferiors): Delete. The contents of that function
10896 has been inlined in lynx_mourn;
10897 (lynx_wait_1): Save the ptid in the process's private data.
10898 (lynx_mourn): Free the process' private data. Replace call
10899 to lynx_clear_inferiors by call to clear_inferiors.
10901 2013-05-17 Yao Qi <yao@codesourcery.com>
10903 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10906 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10908 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10909 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10910 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10911 PT_TEXT_END_ADDR guards. Update comments.
10912 (linux_target_op) <read_offsets>: Conditionally define to
10913 linux_read_offsets if the target is UCLIBC and if it defines
10914 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10916 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10917 Andrew Jenner <andrew@codesourcery.com>
10919 * Makefile.in (SFILES): Add linux-nios2-low.c.
10920 (clean): Add action to delete nios2-linux.c.
10921 (nios2-linux.c): New rule.
10922 * configure.srv: Add nios2*-*-linux*.
10923 * linux-nios2-low.c: New.
10925 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10927 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10929 2013-04-25 Hui Zhu <hui@codesourcery.com>
10932 * ax.c (ax_printf): Add fflush.
10934 2013-04-22 Tom Tromey <tromey@redhat.com>
10936 * Makefile.in (SFILES): Add filestuff.c.
10937 (OBS): Add filestuff.o.
10938 (filestuff.o): New target.
10939 * config.in, configure: Rebuild.
10940 * configure.ac: Check for fdwalk, pipe2.
10942 2013-04-17 Pedro Alves <palves@redhat.com>
10944 * configure.ac (USE_THREAD_DB): Delete variable.
10945 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10946 Don't AC_SUBST USE_THREAD_DB.
10947 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10948 * config.in, configure: Regenerate.
10950 2013-04-16 Pedro Alves <palves@redhat.com>
10952 * linux-low.h (struct lwp_info) <thread_known>: Move under
10953 the USE_THREAD_DB #ifdef.
10955 2013-04-16 Pedro Alves <palves@redhat.com>
10957 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10958 (linux-low.o): Delete rule.
10959 * linux-low.h: Always include "gdb_thread_db.h" instead of
10960 conditionally including thread_db.h.
10961 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10964 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10966 * Makefile.in (install-only): Fix make install regression.
10968 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10970 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10971 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10973 * gdbserver.1: Remove.
10975 2013-03-22 Pedro Alves <palves@redhat.com>
10977 * linux-low.c (handle_extended_wait): Don't call
10978 linux_enable_event_reporting.
10980 2013-03-15 Tony Theodore <tonyt@logyst.com>
10983 * Makefile.in (SHELL): Use @SHELL@.
10985 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10987 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10990 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10992 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10993 Remove extraneous NULL element.
10995 2013-03-13 Yao Qi <yao@codesourcery.com>
10997 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10998 'V' block in trace frame.
11000 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11002 * target.h (struct target_ops): Add btrace ops.
11003 (target_supports_btrace): New macro.
11004 (target_enable_btrace): New macro.
11005 (target_disable_btrace): New macro.
11006 (target_read_btrace): New macro.
11007 * gdbthread.h (struct thread_info): Add btrace field.
11008 * server.c: Include btrace-common.h.
11009 (handle_btrace_general_set): New function.
11010 (handle_btrace_enable): New function.
11011 (handle_btrace_disable): New function.
11012 (handle_general_set): Call handle_btrace_general_set.
11013 (handle_qxfer_btrace): New function.
11014 (struct qxfer qxfer_packets[]): Add btrace entry.
11015 * inferiors.c (remove_thread): Disable btrace.
11016 * linux-low: Include linux-btrace.h.
11017 (linux_low_enable_btrace): New function.
11018 (linux_low_read_btrace): New function.
11019 (linux_target_ops): Add btrace ops.
11020 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11021 Add srv_linux_btrace=yes.
11022 (x86_64-*-linux*): Add linux-btrace.o.
11023 Add srv_linux_btrace=yes.
11024 * configure.ac: Define HAVE_LINUX_BTRACE.
11025 * config.in: Regenerated.
11026 * configure: Regenerated.
11028 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11030 * server.c (handle_qxfer): Preserve error message if -3 is
11032 (qxfer): Document the -3 return value.
11034 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11036 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11037 (linux_btrace_h): New variable.
11038 (linux-btrace.o): New rule.
11040 2013-03-08 Stan Shebs <stan@codesourcery.com>
11041 Hafiz Abid Qadeer <abidh@codesourcery.com>
11043 * tracepoint.c (trace_buffer_size): New global.
11044 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11045 (init_trace_buffer): Change to one-argument function. Allocate
11046 trace buffer memory.
11047 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11048 handle QTBuffer:size packet.
11049 (cmd_bigqtbuffer_size): New function.
11050 (initialize_tracepoint): Call init_trace_buffer with
11051 DEFAULT_TRACE_BUFFER_SIZE.
11052 * server.c (handle_query): Add QTBuffer:size in the
11055 2013-03-07 Yao Qi <yao@codesourcery.com>
11057 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11058 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11060 (cmd_qtsp): Adjust condition. Do post increment.
11061 Set cur_action and cur_step_action back to 0.
11063 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11066 * linux-low.c (linux_write_memory): Return early success if LEN is
11069 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11071 * configure.srv: Add x86_64-*-cygwin* as target.
11073 2013-02-28 Tom Tromey <tromey@redhat.com>
11075 * configure.ac: Invoke AC_SYS_LARGEFILE.
11076 * configure, config.in: Rebuild.
11078 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11080 * win32-low.c: Throughout, fix format strings and casts of
11081 printf-like functions to avoid type related warnings on all
11083 (get_child_debug_event): Print dwDebugEventCode as hex since
11084 that's how it's usually documented.
11086 2013-02-28 Yao Qi <yao@codesourcery.com>
11088 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11091 2013-02-27 Jiong Wang <jiwang@tilera.com>
11093 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11094 (reg-tilegx32.c): New rule.
11095 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11096 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11097 different register info initializer according to elf class.
11098 (init_registers_tilgx32): New function. The tilegx32 register info
11100 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11101 (tile_store_gregset): Likewise.
11103 2013-02-27 Yao Qi <yao@codesourcery.com>
11105 * server.c (process_point_options): Print debug message when
11106 debug_threads is true.
11108 2013-02-26 Yao Qi <yao@codesourcery.com>
11110 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11112 2013-02-19 Pedro Alves <palves@redhat.com>
11113 Kai Tietz <ktietz@redhat.com>
11117 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11118 instead of strtoul to extract address from packet.
11119 (process_serial_event) <'z'>: Likewise.
11121 2013-02-18 Yao Qi <yao@codesourcery.com>
11123 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11125 2013-02-14 Pedro Alves <palves@redhat.com>
11129 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11130 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11132 2013-02-14 Pedro Alves <palves@redhat.com>
11134 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11136 2013-02-14 Pedro Alves <palves@redhat.com>
11138 * tracepoint.c (save_string): Delete.
11139 (add_tracepoint_action): Use savestring instead of save_string.
11141 2013-02-12 Pedro Alves <palves@redhat.com>
11143 * linux-xtensa-low.c: Ditto.
11144 * xtensa-xtregs.c: Ditto.
11146 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11148 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11151 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11153 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11154 aarch64_num_wp_regs and aarch64_num_bp_regs to
11155 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11157 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11159 * linux-aarch64-low.c (ps_get_thread_area): Replace
11160 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11162 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11163 Marcus Shawcroft <marcus.shawcroft@arm.com>
11164 Nigel Stephens <nigel.stephens@arm.com>
11165 Yufeng Zhang <yufeng.zhang@arm.com>
11167 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11168 (aarch64.c, aarch64-without-fpu.c): New targets.
11169 * configure.srv (aarch64*-*-linux*): New.
11170 * linux-aarch64-low.c: New file.
11172 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11174 * linux-low.c (handle_extended_wait, linux_create_inferior)
11175 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11176 (dequeue_one_deferred_signal, linux_resume_one_thread)
11177 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11178 (linux_tracefork_grandchild, linux_test_for_tracefork)
11179 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11180 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11181 where the argument is 0.
11183 2013-01-25 Yao Qi <yao@codesourcery.com>
11185 * event-loop.c: Include "queue.h".
11186 (gdb_event_p): New typedef.
11187 (struct gdb_event) <next_event>: Remove.
11188 (event_queue): Change to QUEUE(gdb_event_p).
11189 (async_queue_event): Remove.
11190 (gdb_event_xfree): New.
11191 (initialize_event_loop): New.
11192 (process_event): Use API from QUEUE.
11193 (wait_for_event): Likewise.
11194 * server.c (main): Call initialize_event_loop.
11195 * server.h (initialize_event_loop): Declare.
11197 2013-01-18 Yao Qi <yao@codesourcery.com>
11199 * ax.h (struct eval_agent_expr_context): New.
11200 (gdb_eval_agent_expr): Update declaration.
11201 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11202 TFRAME. Add new argument CTX.
11203 * server.h (struct eval_agent_expr_context): Declare.
11204 (agent_mem_read, agent_tsv_read): Update declaration.
11205 (agent_mem_read_string): Likewise.
11206 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11207 (add_traceframe_block): Add new argument TPOINT.
11208 Increase TPOINT->traceframe_usage.
11209 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11210 eval_tracepoint_agent_expr.
11211 (condition_true_at_tracepoint): Likewise.
11212 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11213 (agent_mem_read_string, agent_tsv_read): Likewise.
11215 2013-01-16 Yao Qi <yao@codesourcery.com>
11217 * linux-low.c (linux_resume_one_lwp): Don't check
11218 'lwp->bp_reinsert != 0'.
11220 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11221 Pedro Alves <palves@redhat.com>
11223 * lynx-low.c (ptrace_request_to_str): Define a temporary
11224 macro and use it to simplify this function's implementation.
11226 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11228 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11231 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11233 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11235 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11237 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11239 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11241 * lynx-low.c (lynx_resume): Use the resume_info parameter
11242 to determine the ptid for the lynx_ptrace call, unless
11243 it is equal to minus_one_ptid, in which case we use the
11244 ptid of the current_inferior.
11245 (lynx_wait_1): After having received a thread create/exit
11246 event, resume the inferior's execution using the signaling
11247 thread's ptid, rather than the old ptid.
11249 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11251 * lynx-low.c (lynx_resume): Delete variable ret.
11253 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11255 * gdbreplay.c (gdbreplay_version): Update copyright year.
11256 * server.c (gdbserver_version): Likewise.
11258 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11260 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11263 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11265 * lynx-low.c (ptrace_request_to_str): Add handling for
11266 PTRACE_GETTRACESIG.
11268 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11270 * lynx-low.c (lynx_attach): Delete variable new_process.
11272 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11274 * lynx-low.c (lynx_create_inferior): Delete variable
11277 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11279 * lynx-low.c (ptrace_request_to_str): Do not handle
11280 PTRACE_GETTHREADLIST if this macro does not exist.
11282 2012-12-15 Yao Qi <yao@codesourcery.com>
11284 * Makefile.in (OBS): Add notif.o.
11285 * notif.c, notif.h: New.
11286 * server.c: Include "notif.h".
11287 (struct vstop_notif) <next>: Remove.
11289 (queue_stop_reply): Update.
11290 (push_event, send_next_stop_reply): Remove.
11291 (discard_queued_stop_replies): Update.
11292 (notif_stop): New variable.
11293 (handle_v_stopped): Remove.
11294 (handle_v_requests): Don't call handle_v_stopped. Call
11295 handle_ack_notif instead.
11296 (queue_stop_reply_callback): Call notif_event_enque instead
11297 of queue_stop_reply.
11298 (handle_status): Don't call send_next_stop_reply, call
11299 notif_write_event instead.
11300 (kill_inferior_callback): Likewise.
11301 (detach_or_kill_inferior_callback): Likewise.
11302 (main): Call initialize_notif.
11303 (process_serial_event): Call QUEUE_is_empty.
11304 (handle_target_event): Call notif_push instead of push event.
11305 * server.h (push_event): Remove declaration.
11307 2012-12-10 Tom Tromey <tromey@redhat.com>
11309 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11310 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11313 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11314 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11315 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11316 (amd64-linux-ipa.o, ax.o): Rewrite.
11317 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11318 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11319 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11320 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11321 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11322 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11323 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11324 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11325 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11326 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11327 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11328 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11329 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11330 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11331 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11332 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11333 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11334 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11335 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11336 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11337 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11338 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11339 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11340 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11341 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11342 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11343 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11344 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11345 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11346 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11347 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11348 (reg-tilegx.o): Remove.
11349 (all_object_files): New macro.
11350 Include .deps files.
11351 * aclocal.m4, configure: Rebuild.
11352 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11353 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11354 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11356 2012-12-05 Tom Tromey <tromey@redhat.com>
11359 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11361 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11363 * configure.ac: Check for linux/perf_event.h.
11364 * config.in: Regenerated.
11365 * configure: Regenerated.
11367 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11369 * hostio.c (handle_readlink): Decrease buffer size
11370 parameter passed to readlink by one byte.
11372 2012-11-26 Yao Qi <yao@codesourcery.com>
11374 * configure.ac (build_warnings): Append '-Wempty-body'.
11375 * configure: Regenerated.
11376 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11379 2012-11-15 Pierre Muller <muller@sourceware.org>
11381 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11382 * config.in: Regenerate.
11383 * configure: Regenerate.
11384 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11385 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11386 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11387 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11389 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11390 instead of <sys/wait.h> header.
11391 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11393 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11395 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11396 (various make rules): Remove -DGDBSERVER
11398 2012-11-09 Yao Qi <yao@codesourcery.com>
11400 * spu-low.c (current_ptid): Move it to ..
11401 * gdbthread.h: ... here. New.
11402 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11403 * server.c (myresume, process_serial_event): Likewise.
11404 * thread-db.c (thread_db_find_new_threads): Likewise.
11405 * tracepoint.c (run_inferior_command): Likewise.
11407 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11409 * server.c (handle_search_memory_1): Include access length in
11412 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11414 * linux-crisv32-low.c: Fix compile errors.
11416 2012-09-04 Yao Qi <yao@codesourcery.com>
11418 * tracepoint.c (cmd_qtsv): Adjust debug message.
11419 Don't check CUR_TPOINT.
11421 2012-08-28 Yao Qi <yao@codesourcery.com>
11423 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11424 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11425 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11426 Remove declarations of xmalloc, xreallloc, xstrdup and
11428 * Makefile.in (libiberty_h): New.
11429 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11430 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11432 2012-08-23 Yao Qi <yao@codesourcery.com>
11434 * server.h: Remove declaration of 'xsnprintf'.
11436 2012-08-22 Keith Seitz <keiths@redhat.com>
11438 * server.h: Include build-gnulib-gbserver/config.h.
11439 * gdbreplay.c: Likewise.
11441 2012-08-08 Doug Evans <dje@google.com>
11443 * Makefile.in (SFILES): Add gdb_vecs.c.
11444 (OBS): Add gdb_vecs.o.
11445 (gdb_vecs_h, host_defs_h): New variables.
11446 (thread-db.o): Add $(gdb_vecs_h) dependency.
11447 (gdb_vecs.o): New rule.
11448 * thread-db.c: #include "gdb_vecs.h".
11449 (thread_db_load_search): Use a vector to iterate over path elements.
11450 Handle text appearing after "$pdir".
11452 * configure.ac: Add check for strstr.
11453 * config.in: Regenerate.
11454 * configure: Regenerate.
11456 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11458 * hostio.c (handle_pread): If pread fails, fall back to attempting
11460 (handle_pwrite): Likewise for pwrite.
11462 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11464 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11465 between unsupported TYPE and unimplementable ADDR/LEN combination.
11466 (arm_insert_point): Act on new return value.
11468 2012-07-31 Pedro Alves <palves@redhat.com>
11470 * server.c (process_point_options): Only skip tokens if we find
11471 one that is unrecognized. Don't treat 'X' specially while
11472 skipping unrecognized tokens.
11474 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11476 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11477 to 4-byte-align HW breakpoint addresses for Thumb.
11479 2012-07-27 Yao Qi <yao@codesourcery.com>
11483 * server.h: Declare gdb_agent_about_to_close.
11484 * target.c (kill_inferior): Include "agent.h".
11485 New. Send command 'kill'.
11486 * target.h (kill_inferior): Removed macro.
11487 * tracepoint.c (gdb_agent_about_to_close): New.
11488 (gdb_agent_helper_thread): Handle command 'close'.
11489 Wait endlessly until the inferior stops.
11490 Install gdb_agent_remove_socket to atexit hook.
11491 (agent_socket_name): New static variable.
11492 (gdb_agent_socket_init): Replace local variable 'name' with
11493 'agent_socket_name'.
11494 (gdb_agent_remove_socket): New.
11496 2012-07-27 Yao Qi <yao@codesourcery.com>
11498 * server.c (process_point_options): Stop at 'X' when parsing.
11500 2012-07-19 Michael Eager <eager@eagercon.com>
11502 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11504 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11505 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11506 hardware breakpoint.
11508 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11510 * gdbserver/linux-low.c (initialize_low): Call
11511 linux_ptrace_init_warnings.
11513 2012-07-02 Doug Evans <dje@google.com>
11515 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11518 2012-07-02 Stan Shebs <stan@codesourcery.com>
11520 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11521 (ax.o): Add it to build rule.
11523 (OBS): Add format.o.
11524 (IPA_OBS): Add format.o.
11525 * server.c (handle_query): Claim support for breakpoint commands.
11526 (process_point_options): Add command case.
11527 (process_serial_event): Leave running if there are printfs in
11529 * mem-break.h (any_persistent_commands): Declare.
11530 (add_breakpoint_commands): Declare.
11531 (gdb_no_commands_at_breakpoint): Declare.
11532 (run_breakpoint_commands): Declare.
11533 * mem-break.c (struct point_command_list): New struct.
11534 (struct breakpoint): New field command_list.
11535 (any_persistent_commands): New function.
11536 (add_commands_to_breakpoint): New function.
11537 (add_breakpoint_commands): New function.
11538 (gdb_no_commands_at_breakpoint): New function.
11539 (run_breakpoint_commands): New function.
11540 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
11542 * ax.c: Include format.h.
11543 (ax_printf): New function.
11544 (gdb_eval_agent_expr): Add printf opcode.
11546 2012-06-13 Yao Qi <yao@codesourcery.com>
11548 * server.c (start_inferior): Remove duplicated writes to fields
11549 'last_resume_kind' and 'last_status' of 'current_inferior'.
11551 2012-06-12 Yao Qi <yao@codesourcery.com>
11552 Pedro Alves <palves@redhat.com>
11554 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
11556 * server.c (handle_v_cont): Extend comment.
11558 2012-06-11 Yao Qi <yao@codesourcery.com>
11560 * linux-low.c (linux_attach): Add 'static'.
11562 2012-06-06 Yao Qi <yao@codesourcery.com>
11564 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
11566 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
11568 Fix gcc -flto compilation warning.
11569 * server.c (main): Make variable multi_mode and attach volatile.
11571 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11573 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
11574 if the platform doesn't know about it.
11576 2012-05-30 Jeff Kenton <jkenton@tilera.com>
11578 * Makefile.in (SFILES): Add linux-tile-low.c.
11579 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
11580 * configure.srv: Handle tilegx-*-linux*.
11581 * linux-tile-low.c: New file.
11583 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11585 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
11587 2012-05-24 Pedro Alves <palves@redhat.com>
11591 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
11593 2012-05-24 Pedro Alves <palves@redhat.com>
11597 Replace target_signal with gdb_signal throughout.
11599 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
11601 * linux-low.c (linux_store_registers): Avoid the copying sequence
11602 when no data has been retrieved by ptrace.
11604 2012-05-22 Will Deacon <will.deacon@arm.com>
11606 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
11607 Include asm/ptrace.h.
11608 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
11611 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
11613 * linux-low.c (linux_store_registers): Don't re-retrieve data
11614 with ptrace that has already been obtained from /proc. Always
11615 copy any data retrieved with ptrace to the buffer supplied.
11617 2012-05-11 Yao Qi <yao@codesourcery.com>
11618 Pedro Alves <palves@redhat.com>
11620 * linux-low.c (enum stopping_threads_kind): New.
11621 (stopping_threads): Change type to `enum stopping_threads_kind'.
11622 (handle_extended_wait): If stopping and suspending threads, leave
11623 the new_lwp suspended too.
11624 (linux_wait_for_event): Adjust.
11625 (stop_all_lwps): Set `stopping_threads' to
11626 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
11627 whether we're suspending threads or just stopping them. Assert no
11630 2012-04-29 Yao Qi <yao@codesourcery.com>
11632 * server.h: Move some code to ...
11633 * gdbthread.h: ... here. New.
11634 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
11635 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
11636 (nto-low.o, win32-low.o): Likewise.
11637 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
11638 * regcache.c, remote-utils.c, server.c: Likewise.
11639 * target.c, tracepoint.c, win32-low.c: Likewise.
11641 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11643 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
11644 (PTRACE_ARG4_TYPE): Likewise.
11645 (PTRACE_XFER_TYPE): Likewise.
11646 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
11647 ptrace to PTRACE_ARG3_TYPE.
11648 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
11649 (PTRACE_ARG4_TYPE): Likewise.
11650 (PTRACE_XFER_TYPE): Likewise.
11651 (linux_detach_one_lwp): Cast fourth argument of
11652 ptrace to long then PTRACE_ARG4_TYPE.
11653 (regsets_fetch_inferior_registers): Cast third argument of
11654 ptrace to long then PTRACE_ARG3_TYPE.
11655 (regsets_store_inferior_registers): Likewise.
11657 2012-04-20 Pedro Alves <palves@redhat.com>
11659 * configure: Regenerate.
11661 2012-04-19 Pedro Alves <palves@redhat.com>
11663 * Makefile.in (GNULIB_BUILDDIR): New.
11664 (LIBGNU, INCGNU, GNULIB_H): Adjust.
11665 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
11666 (all, install-only, uninstall, clean-info, all-lib, clean): No
11667 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
11668 (maintainer-clean realclean distclean): Use subdir_do.
11670 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
11671 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
11672 * acinclude.m4: Include acx_configure_dir.m4.
11673 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
11674 calls. Call AC_PROG_RANLIB. Configure gnulib using
11677 (GNULIB_STDINT_H): Adjust.
11678 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
11679 * gdbreplay.c: Include build-gnulib/config.h.
11680 * server.h: Likewise.
11681 * aclocal.m4: Regenerate.
11682 * config.in: Regenerate.
11683 * configure: Regenerate.
11685 2012-04-19 Pedro Alves <palves@redhat.com>
11687 * Makefile.in (LIBGNU, INCGNU): Adjust.
11688 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
11689 (all, install-only, uninstall, clean-info, all-lib, clean)
11690 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
11691 * configure.ac: Adjust AC_OUTPUT output.
11692 * aclocal.m4: Regenerate.
11693 * configure: Regenerate.
11695 2012-04-19 Pedro Alves <palves@redhat.com>
11697 * Makefile.in (generated_files): New.
11698 (server_h): Remove the explicit dependency on config.h, and depend
11699 on $generated_files.
11701 2012-04-19 Pedro Alves <palves@redhat.com>
11703 * Makefile.in (INCGNU): Add -Ignulib.
11705 2012-04-19 Pedro Alves <palves@redhat.com>
11707 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
11708 (INCGNU): ... this, and spell out -I here.
11709 (GNULIB_LIB): Rename to ...
11710 (LIBGNU): ... this.
11711 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
11713 2012-04-19 Pedro Alves <palves@redhat.com>
11715 * config.in: Regenerate.
11717 2012-04-19 Pedro Alves <palves@redhat.com>
11719 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
11720 * server.h (memmem): Remove declaration.
11721 * config.in: Regenerate.
11722 * configure: Regenerate.
11724 2012-04-19 Yao Qi <yao@codesourcery.com>
11726 * Makefile.in (SFILES): Add common/vec.c.
11730 2012-04-19 Yao Qi <yao@codesourcery.com>
11732 * remote-utils.c (prepare_resume_reply): Replace with macro
11733 target_core_of_thread.
11734 * server.c (handle_qxfer_threads_proper): Likewise.
11735 * target.h (traget_core_of_thread): New macro.
11737 2012-04-18 Pedro Alves <palves@redhat.com>
11739 * aclocal.m4: Regenerate.
11740 * configure: Regenerate.
11742 2012-04-16 Yao Qi <yao@codesourcery.com>
11744 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
11745 duplicated on address.
11747 2012-04-16 Yao Qi <yao@codesourcery.com>
11749 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11750 (struct tracepoint_action_ops) <send>: New field.
11751 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11752 (agent_expr_send, x_tracepoint_action_send): New.
11753 (l_tracepoint_action_send): New.
11754 (cmd_qtdp): Download and install tracepoint
11755 according to `use_agent'.
11756 (run_inferior_command): Add one more parameter `len'.
11758 (tracepoint_send_agent): New.
11759 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11761 2012-04-16 Yao Qi <yao@codesourcery.com>
11763 * tracepoint.c (download_tracepoints): Moved to ...
11764 (cmd_qtstart): ... here.
11766 2012-04-14 Yao Qi <yao@codesourcery.com>
11768 * tracepoint.c: Include inttypes.h.
11769 (struct collect_memory_action): Use sized types.
11770 (struct tracepoint): Likewise.
11771 (cmd_qtdp, stop_tracing): Update print specifiers.
11772 (cmd_qtp, response_tracepoint): Likewise.
11773 (collect_data_at_tracepoint): Likewise.
11774 (collect_data_at_step): Likewise.
11776 2012-04-14 Yao Qi <yao@codesourcery.com>
11778 Import gnulib module inttypes.
11779 * aclocal.m4, config.in, configure: Regenerated.
11781 2012-04-14 Yao Qi <yao@codesourcery.com>
11783 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11784 Makefile and config.status at last.
11786 2012-04-13 Yao Qi <yao@codesourcery.com>
11788 * tracepoint.c: Include stdint.h unconditionally.
11790 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11792 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11793 on BFD_HAVE_SYS_PROCFS_TYPE.
11794 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11795 * configure: Regenerate.
11796 * config.in: Likewise.
11798 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11800 * Makefile.in (clean): Also remove x32.c x32-linux.c
11801 x32-avx.c x32-avx-linux.c.
11802 (x32.o): New target.
11804 (x32-linux.o): Likewise.
11805 (x32-linux.c): Likewise.
11806 (x32-avx.o): Likewise.
11807 (x32-avx.c): Likewise.
11808 (x32-avx-linux.o): Likewise.
11809 (x32-avx-linux.c): Likewise.
11811 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11812 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11813 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11814 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11815 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11816 i386/x32-avx-linux.xml.
11818 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11819 (init_registers_x32_avx_linux): Likwise.
11820 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11821 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11823 2012-04-13 Pedro Alves <palves@redhat.com>
11825 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11826 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11827 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11828 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11831 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11833 * linux-x86-low.c (compat_x32_clock_t): New.
11834 (compat_x32_siginfo_t): Likewise.
11835 (compat_x32_siginfo_from_siginfo): Likewise.
11836 (siginfo_from_compat_x32_siginfo): Likewise.
11837 (linux_is_elf64): Likewise.
11838 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11839 and siginfo_from_compat_x32_siginfo for x32.
11840 (x86_arch_setup): Set linux_is_elf64.
11842 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11845 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11847 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11848 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11849 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11850 compatible with process.
11852 2012-04-12 Yao Qi <yao@codesourcery.com>
11854 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11855 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11856 (install-only, install-info, clean): Handle sub dir gnulib.
11857 (all-lib, am--refresh): New targets.
11858 (memmem.o): Remove target.
11859 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11860 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11861 (AC_REPLACE_FUNCS): Remove memmem.
11862 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11863 (AC_OUTPUT): Generate Makefile in gnulib/.
11864 * aclocal.m4, config.in, configure: Regenerated.
11866 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11868 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11870 2012-04-05 Pedro Alves <palves@redhat.com>
11872 -Werror=strict-aliasing
11874 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11877 2012-04-04 Pedro Alves <palves@redhat.com>
11879 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11880 (sparc_store_gregset_from_stack, sparc_store_gregset)
11881 (sparc_breakpoint_at): Fix formatting.
11883 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11885 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11887 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11888 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11889 * config.in: Regenerate.
11890 * configure: Likewise.
11892 2012-03-29 Pedro Alves <palves@redhat.com>
11894 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11895 Correct ptrace arguments.
11897 2012-03-28 Pedro Alves <palves@redhat.com>
11899 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11900 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11901 (IA64_FR1_REGNUM): New defines.
11902 (ia64_fetch_register): New.
11903 (the_low_target): Install it.
11904 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11906 * linux-low.c (linux_fetch_registers): Try the
11907 the_low_target.fetch_register hook first.
11909 * linux-arm-low.c (the_low_target): Adjust.
11910 * linux-bfin-low.c (the_low_target): Adjust.
11911 * linux-cris-low.c (the_low_target): Adjust.
11912 * linux-crisv32-low.c (the_low_target): Adjust.
11913 * linux-m32r-low.c (the_low_target): Adjust.
11914 * linux-m68k-low.c (the_low_target): Adjust.
11915 * linux-mips-low.c (the_low_target): Adjust.
11916 * linux-ppc-low.c (the_low_target): Adjust.
11917 * linux-s390-low.c (the_low_target): Adjust.
11918 * linux-sh-low.c (the_low_target): Adjust.
11919 * linux-sparc-low.c (the_low_target): Adjust.
11920 * linux-tic6x-low.c (the_low_target): Adjust.
11921 * linux-x86-low.c (the_low_target): Adjust.
11922 * linux-xtensa-low.c (the_low_target): Adjust.
11924 2012-03-26 Pedro Alves <palves@redhat.com>
11926 * server.c (handle_qxfer_libraries): Don't bail early if
11927 the_target->qxfer_libraries_svr4 is not NULL.
11929 2012-03-26 Pedro Alves <palves@redhat.com>
11931 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11933 2012-03-23 Pedro Alves <palves@redhat.com>
11935 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11936 "library-list-svr4" element's start tag when the the DSO list is
11939 2012-03-23 Pedro Alves <palves@redhat.com>
11941 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11942 a variable whose type size is the same as the inferior's pointer
11945 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11947 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11949 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11950 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11951 * linux-low.h: Include <signal.h>.
11952 (struct siginfo): Remove forward declaration.
11953 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11956 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11958 * .gitignore: Ignore more files.
11960 2012-03-19 Pedro Alves <palves@redhat.com>
11961 Jan Kratochvil <jan.kratochvil@redhat.com>
11963 * server.c (cont_thread, general_thread): Add describing comments.
11964 (start_inferior): Clear `cont_thread'.
11965 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11968 2012-03-15 Yao Qi <yao@codesourcery.com>
11970 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11972 (cmd_qtdp): ... here.
11974 2012-03-15 Yao Qi <yao@codesourcery.com>
11976 * tracepoint.c (struct tracepoint_action_ops): New.
11977 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11978 (m_tracepoint_action_download): New.
11979 (r_tracepoint_action_download): New.
11980 (x_tracepoint_action_download): New.
11981 (l_tracepoint_action_download): New.
11982 (add_tracepoint_action): Install `action->ops' according type.
11983 (download_tracepoint_1): Move code `download' function pointer
11984 of various tracepoint_action_ops.
11986 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11988 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11989 linux_ptrace_attach_warnings.
11991 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11993 * Makefile.in (linux-ptrace.o): New.
11994 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11995 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11996 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11997 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11998 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12000 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12002 2012-03-08 Yao Qi <yao@codesourcery.com>
12003 Pedro Alves <palves@redhat.com>
12005 Fix PR server/13392.
12006 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12007 offset of JMP insn.
12008 * tracepoint.c (remove_tracepoint): New.
12009 (cmd_qtdp): Call remove_tracepoint when failed to install.
12011 2012-03-07 Pedro Alves <palves@redhat.com>
12013 * linux-low.c (get_detach_signal): New.
12014 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12015 Pass on pending signals to PTRACE_DETACH. Check the result of the
12017 * server.c (program_signals, program_signals_p): New.
12018 (handle_general_set): Handle QProgramSignals.
12019 * server.h (program_signals, program_signals_p): Declare.
12021 2012-03-05 Pedro Alves <palves@redhat.com>
12022 Jan Kratochvil <jan.kratochvil@redhat.com>
12024 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12027 2012-03-03 Yao Qi <yao@codesourcery.com>
12029 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12030 agent_look_up_symbols.
12032 2012-03-03 Yao Qi <yao@codesourcery.com>
12034 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12035 (linux-x86-low.o): Likewise.
12036 * server.h: Remove in_process_agent_loaded.
12037 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12041 2012-03-03 Yao Qi <yao@codesourcery.com>
12043 * tracepoint.c (gdb_agent_capability): New global.
12044 (in_process_agent_loaded_ust): Renamed to
12045 `in_process_agent_supports_ust'.
12047 (in_process_agent_supports_ust): Call agent_capability_check.
12048 (clear_installed_tracepoints): Assert that agent supports
12051 2012-03-03 Yao Qi <yao@codesourcery.com>
12053 * linux-low.c (linux_supports_agent): New.
12054 (linux_target_ops): Initialize field `supports_agent' with
12055 linux_supports_agent.
12056 * target.h (struct target_ops) <supports_agent>: New.
12057 (target_supports_agent): New macro.
12058 * server.c (handle_general_set): Handle packet 'QAgent'.
12059 (handle_query): Send `QAgent+'.
12060 * Makefile.in (server.o): Depends on agent.h.
12062 2012-03-03 Yao Qi <yao@codesourcery.com>
12064 * Makefile.in (OBS): Add agent.o.
12065 Add new rule for agent.o.
12066 Track dependence of tracepoint.c on agent.h.
12067 * tracepoint.c (run_inferior_command_1):
12068 (run_inferior_command): Call agent_run_command.
12069 (gdb_ust_connect_sync_socket): Deleted. Move it to
12071 (resume_thread, stop_thread): Likewise.
12072 (gdb_ust_socket_init): Renamed to ...
12073 (gdb_agent_socket_init): ... New.
12074 (gdb_ust_thread): Renamed to ...
12075 (gdb_agent_helper_thread): ... New.
12076 (gdb_ust_init): Move some code to ...
12077 (gdb_agent_init): ... here. New.
12078 [HAVE_UST]: Call gdb_ust_init.
12079 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12080 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12081 * config.in, configure: Regenerated.
12083 2012-03-02 Pedro Alves <palves@redhat.com>
12085 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12086 * linux-low.c (struct simple_pid_list): New.
12087 (stopped_pids): New a struct simple_pid_list pointer.
12088 (add_to_pid_list, pull_pid_from_list): New.
12089 (handle_extended_wait): Don't assume the first signal new children
12090 report is SIGSTOP. Adjust call to pull_pid_from_list.
12091 (linux_wait_for_lwp): Adjust.
12093 2012-03-02 Yao Qi <yao@codesourcery.com>
12095 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12098 2012-03-02 Yao Qi <yao@codesourcery.com>
12100 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12101 `stop_pc' and `tpoint'. Update caller.
12103 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12105 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12106 * linux-low.c (use_linux_regsets): New macro.
12107 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12108 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12109 (linux_register_in_regsets): New function.
12110 (usr_fetch_inferior_registers): Skip registers covered by
12112 (usr_store_inferior_registers): Likewise.
12113 (usr_fetch_inferior_registers): New macro.
12114 (usr_store_inferior_registers): Likewise.
12115 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12116 (linux_store_registers): Likewise.
12117 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12119 (init_registers_mips64_dsp_linux): Likewise.
12120 (init_registers_mips_linux): New macro.
12121 (init_registers_mips_dsp_linux): Likewise.
12122 (mips_dsp_num_regs): Likewise.
12123 (DSP_BASE, DSP_CONTROL): New fallback macros.
12124 (mips_base_regs): New macro.
12125 (mips_regmap): Use it. Fix the size.
12126 (mips_dsp_regmap): New variable.
12127 (mips_dsp_regset_bitmap): Likewise.
12128 (mips_arch_setup): New function.
12129 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12131 (mips_cannot_store_register): Likewise.
12132 (the_low_target): Update .arch_setup, .num_regs and .regmap
12133 initializers. Add .regset_bitmap initializer.
12134 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12136 * linux-bfin-low.c (the_low_target): Likewise.
12137 * linux-cris-low.c (the_low_target): Likewise.
12138 * linux-crisv32-low.c (the_low_target): Likewise.
12139 * linux-ia64-low.c (the_low_target): Likewise.
12140 * linux-m32r-low.c (the_low_target): Likewise.
12141 * linux-m68k-low.c (the_low_target): Likewise.
12142 * linux-ppc-low.c (the_low_target): Likewise.
12143 * linux-s390-low.c (the_low_target): Likewise.
12144 * linux-sh-low.c (the_low_target): Likewise.
12145 * linux-sparc-low.c (the_low_target): Likewise.
12146 * linux-tic6x-low.c (the_low_target): Likewise.
12147 * linux-x86-low.c (the_low_target): Likewise.
12148 * linux-xtensa-low.c (the_low_target): Likewise.
12149 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12150 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12151 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12153 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12154 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12156 2012-02-29 Yao Qi <yao@codesourcery.com>
12157 Pedro Alves <palves@redhat.com>
12159 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12160 `step_over_finished' is true.
12162 2012-02-27 Pedro Alves <palves@redhat.com>
12164 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12165 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12167 2012-02-27 Pedro Alves <palves@redhat.com>
12170 * linux-low.c (pid_is_stopped): New.
12171 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12173 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12175 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12178 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12180 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12182 2012-02-24 Luis Machado <lgustavo@codesourcery>
12184 * server.c (handle_query): Advertise support for target-side
12185 breakpoint condition evaluation.
12186 (process_point_options): New function.
12187 (process_serial_event): When inserting a breakpoint, check for
12188 a target-side condition that should be evaluated.
12190 * mem-break.c: Include regcache.h and ax.h.
12191 (point_cond_list_t): New data structure.
12192 (breakpoint) <cond_list>: New field.
12193 (find_gdb_breakpoint_at): Make non-static.
12194 (delete_gdb_breakpoint_at): Clear any target-side
12196 (clear_gdb_breakpoint_conditions): New function.
12197 (add_condition_to_breakpoint): Likewise.
12198 (add_breakpoint_condition): Likewise.
12199 (gdb_condition_true_at_breakpoint): Likewise.
12200 (gdb_breakpoint_here): Return result directly instead
12201 of going through a local variable.
12203 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12204 (clear_gdb_breakpoint_conditions): Likewise.
12205 (add_breakpoint_condition): Likewise.
12206 (gdb_condition_true_at_breakpoint): Likewise.
12208 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12209 (need_step_over_p): Take target-side breakpoint condition into
12212 2012-02-24 Luis Machado <lgustavo@codesourcery>
12214 * server.h: Include tracepoint.h.
12215 (agent_mem_read, agent_get_trace_state_variable_value,
12216 agent_set_trace_state_variable_value,
12217 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12218 get_set_tsv_func_addr): New prototypes.
12220 * ax.h: New include file.
12221 * ax.c: New source file.
12223 * tracepoint.c: Include ax.h.
12224 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12225 agent_expr, eval_result_type): Move to ax.h.
12226 (parse_agent_expr): Rename to ...
12227 (gdb_parse_agent_expr): ... this, make it non-static and move
12229 (unparse_agent_expr) Rename to ...
12230 (gdb_unparse_agent_expr): ... this, make it non-static and move
12232 (eval_agent_expr): Rename to ...
12233 (eval_tracepoint_agent_expr): ... this.
12234 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12235 forward declarations.
12236 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12237 (agent_get_trace_state_variable_value): New function.
12238 (agent_set_trace_state_variable_value): New function.
12239 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12240 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12241 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12242 (condition_true_at_tracepoint): Likewise.
12243 (parse_agent_expr): Rename to ...
12244 (gdb_parse_agent_expr): ... this and move to ax.c.
12245 (unparse_agent_expr): Rename to ...
12246 (gdb_unparse_agent_expr): ... this and move to ax.c.
12247 (gdb_agent_op_name): Move to ax.c.
12248 (eval_agent_expr): Rename to ...
12249 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12251 (eval_tracepoint_agent_expr): New function.
12252 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12254 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12256 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12257 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12258 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12259 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12260 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12261 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12262 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12263 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12264 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12265 (compile_bytecodes): Remove forward declaration.
12266 (is_goto_target): Move to ax.c.
12267 (compile_bytecodes): Move to ax.c and call
12268 agent_get_trace_state_variable_value (...) and
12269 agent_set_trace_state_variable_value (...).
12271 * Makefile.in: Update ax.c and IPA dependencies.
12273 2012-02-24 Pedro Alves <palves@redhat.com>
12275 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12276 (cmd_bigqtbuffer_circular): ... this. Only handle
12277 'QTBuffer:circular:'.
12278 (handle_tracepoint_general_set): Adjust.
12280 2012-02-16 Yao Qi <yao@codesourcery.com>
12282 * inferiors.c: Move code to ...
12283 * dll.c: .... here. New.
12284 * server.h: Declare clear_dlls.
12285 * Makefile.in (SFILES): Add dll.c.
12289 2012-02-11 Yao Qi <yao@codesourcery.com>
12291 * server.c: (handle_monitor_command): Add a new parameter
12293 (handle_query): Update caller.
12295 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12297 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12298 * configure, config.in: Regenerate.
12299 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12302 2012-02-02 Pedro Alves <palves@redhat.com>
12304 Try SIGKILL first, then PTRACE_KILL.
12305 * linux-low.c (linux_kill_one_lwp): New.
12306 (linux_kill_one_lwp): Rename to ...
12307 (kill_one_lwp_callback): ... this. Use the new
12308 linux_kill_one_lwp.
12310 2012-02-02 Pedro Alves <palves@redhat.com>
12312 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12315 2012-01-27 Pedro Alves <palves@redhat.com>
12317 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12318 (elf_64_file_p): Make static.
12319 (linux_pid_exe_is_elf_64_file): New.
12320 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12321 Delete declarations.
12322 (linux_pid_exe_is_elf_64_file): Declare.
12323 * linux-x86-low.c (x86_arch_setup): Use
12324 linux_pid_exe_is_elf_64_file.
12326 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12328 * linux-low.c (linux_wait_for_event_1): Rename to ...
12329 (linux_wait_for_event): ... here and merge it with former
12330 linux_wait_for_event - new variable wait_ptid, use it.
12331 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12333 2012-01-23 Pedro Alves <palves@redhat.com>
12335 * server.c (main): Avoid yet another case of infinite loop while
12336 detaching/killing after a longjmp.
12338 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12341 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12343 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12345 * hostio.c (handle_readlink): New function.
12346 (handle_vFile): Call it to handle "vFile:readlink" packets.
12348 2012-01-20 Pedro Alves <palves@redhat.com>
12349 Ulrich Weigand <ulrich.weigand@linaro.org>
12351 * server.c (handle_v_requests): Only support vAttach and vRun to
12352 start multiple processes when in extended protocol mode.
12354 2012-01-17 Pedro Alves <palves@redhat.com>
12356 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12357 memalign plus mprotect to allocate the scratch buffer.
12359 2012-01-13 Pedro Alves <palves@redhat.com>
12361 * server.c (attach_inferior): Clear `cont_thread'.
12363 2012-01-13 Pedro Alves <palves@redhat.com>
12365 * server.c (main): Avoid infinite loop while detaching/killing
12368 2012-01-09 Doug Evans <dje@google.com>
12370 * server.c (start_inferior): Set last_ptid in --wrapper case.
12372 2012-01-06 Yao Qi <yao@codesourcery.com>
12374 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12376 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12378 2012-01-04 Yao Qi <yao@codesourcery.com>
12380 * tracepoint.c (cmd_qtdp): Print debug message
12381 for static tracepoint.
12383 2012-01-04 Yao Qi <yao@codesourcery.com>
12385 * tracepoint.c (trace_vdebug): Differentiate debug message
12386 between gdbserver and IPA.
12388 2012-01-03 Yao Qi <yao@codesourcery.com>
12390 * tracepoint.c (tracepoint_was_hit): Don't collect for
12393 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12395 * terminal.h: Reformat copyright header.
12397 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12399 * server.c (gdbserver_version): Update copyright year.
12400 * gdbreplay.c (gdbreplay_version): Likewise.
12402 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12404 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12407 2011-12-18 Hui Zhu <teawater@gmail.com>
12408 * linux-low.c (linux_create_inferior): Save return value to ret.
12410 2011-12-18 Hui Zhu <teawater@gmail.com>
12412 * linux-low.c (linux_create_inferior): Save return value to ret.
12414 2011-12-16 Doug Evans <dje@google.com>
12416 * linux-low.c (linux_create_inferior): If stdio connection,
12417 redirect stdin from /dev/null, stdout to stderr.
12418 * remote-utils.c (remote_is_stdio): New static global.
12419 (remote_connection_is_stdio): New function.
12420 (remote_prepare): Handle stdio connection.
12421 (remote_open): Ditto.
12422 (remote_close): Don't close stdin for stdio connections.
12423 (read_prim,write_prim): New functions. Replace all calls to
12424 read/write to these.
12425 * server.c (main): Watch for "-" argument. Move call to
12426 remote_prepare before start_inferior.
12427 * server.h (STDIO_CONNECTION_NAME): New macro.
12428 (remote_connection_is_stdio): Declare.
12430 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12431 in debugging output.
12433 2011-12-15 Yao Qi <yao@codesourcery.com>
12435 * tracepoint.c: Include sys/syscall.h.
12436 (gdb_ust_thread): Remove preprocessor conditional.
12438 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12440 * linux-low.c (linux_detach_one_lwp): Call
12441 the_low_target.prepare_to_resume before detaching.
12443 2011-12-14 Yao Qi <yao@codesourcery.com>
12445 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12448 2011-12-14 Yao Qi <yao@codesourcery.com>
12450 * i386-low.c (i386_low_stopped_data_address): Initialize local
12451 variable `control'.
12453 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12457 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12458 DR_CONTROL unless necessary. Extend comments.
12459 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12460 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12462 2011-12-13 Yao Qi <yao@codesourcery.com>
12464 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12466 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12468 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12470 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12471 Print new debug message for such case.
12473 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12475 Fix overlapping memcpy.
12476 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12477 the read_inferior_memory transfer.
12478 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12479 write_inferior_memory transfer.
12480 (set_fast_tracepoint_jump): New variable buf. Use it for the
12481 read_inferior_memory and write_inferior_memory transfers.
12482 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12483 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12484 Use it for the write_inferior_memory transfer.
12485 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12488 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12490 * linux-low.c (fetch_register, store_register): Make code
12491 consistent, fix formatting.
12493 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12495 * linux-low.c (usr_store_inferior_registers): Factor out code
12496 to handle individual registers into...
12497 (store_register): ... this new function.
12499 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12501 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12502 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12503 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12504 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12505 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12506 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12507 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12508 (srv_xmlfiles): Add new XML files.
12510 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12512 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12513 (init_registers_s390_linux32v1): Add prototype.
12514 (init_registers_s390_linux32v2): Likewise.
12515 (init_registers_s390_linux64v1): Likewise.
12516 (init_registers_s390_linux64v2): Likewise.
12517 (init_registers_s390x_linux64v1): Likewise.
12518 (init_registers_s390x_linux64v2): Likewise.
12519 (s390_num_regs): Increment to 52.
12520 (s390_regmap): Add orig_r2 register.
12521 (s390_num_regs_3264): Increment to 68.
12522 (s390_regmap_3264): Add orig_r2 register.
12523 (s390_collect_ptrace_register): Handle orig_r2 register.
12524 (s390_supply_ptrace_register): Likewise.
12525 (s390_fill_last_break): New function.
12526 (s390_store_last_break): Likewise.
12527 (s390_fill_system_call): New function.
12528 (s390_store_system_call): Likewise.
12529 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12531 (s390_check_regset): New function.
12532 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12533 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12534 Update target_regsets for available register sets.
12536 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12537 Jan Kratochvil <jan.kratochvil@redhat.com>
12539 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
12540 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
12542 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
12543 * linux-low.h (struct process_info_private): New member r_debug.
12544 * server.c (handle_qxfer_libraries): Call
12545 the_target->qxfer_libraries_svr4.
12546 (handle_qxfer_libraries_svr4): New function.
12547 (qxfer_packets): New entry "libraries-svr4".
12548 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
12549 * target.h (struct target_ops): New member qxfer_libraries_svr4.
12550 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
12551 PACKET_qXfer_libraries_svr4.
12553 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
12555 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
12556 PSW address/mask between 8-byte and 16-byte formats.
12557 (s390_supply_ptrace_register): Likewise.
12558 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
12559 basic addressing mode bit.
12561 2011-11-24 Stan Shebs <stan@codesourcery.com>
12563 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
12565 2011-11-17 Stan Shebs <stan@codesourcery.com>
12567 * tracepoint.c (struct tracepoint): New field traceframe_usage.
12568 (tracing_start_time): New global.
12569 (tracing_stop_time): New global.
12570 (tracing_user_name): New global.
12571 (tracing_notes): New global.
12572 (tracing_stop_note): New global.
12573 (cmd_qtstart): Set traceframe_usage, start_time.
12574 (stop_tracing): Set stop_time.
12575 (cmd_qtstatus): Report additional status.
12576 (cmd_qtp): New function.
12577 (handle_tracepoint_query): Call it.
12578 (cmd_qtnotes): New function.
12579 (handle_tracepoint_general_set): Call it.
12580 (get_timestamp): Rename from tsv_get_timestamp.
12582 2011-11-14 Stan Shebs <stan@codesourcery.com>
12583 Kwok Cheung Yeung <kcy@codesourcery.com>
12585 * linux-x86-low.c (small_jump_insn): New.
12586 (i386_install_fast_tracepoint_jump_pad): Add arguments for
12587 trampoline and error message, build a trampoline and issue a small
12588 jump instruction to it.
12589 (x86_install_fast_tracepoint_jump_pad): Add arguments for
12590 trampoline and error message.
12591 (x86_get_min_fast_tracepoint_insn_len): New.
12592 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
12593 * linux-low.h (struct linux_target_ops): Add arguments to
12594 install_fast_tracepoint_jump_pad operation, add new operation.
12595 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
12597 (linux_get_min_fast_tracepoint_insn_len): New function.
12598 (linux_target_op): Add new operation.
12599 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
12600 (gdb_trampoline_buffer_end): Ditto.
12601 (gdb_trampoline_buffer_error): Ditto.
12602 (struct ipa_sym_addresses): Add fields for new IPA variables.
12603 (symbol_list): Add entries for new IPA variables.
12604 (struct tracepoint): Add fields to hold the address range of the
12605 trampoline used by the tracepoint.
12606 (trampoline_buffer_head): New static variable.
12607 (trampoline_buffer_tail): Ditto.
12608 (claim_trampoline_space): New function.
12609 (have_fast_tracepoint_trampoline_buffer): New function.
12610 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
12612 (install_fast_tracepoint): Ditto, also add error buffer argument.
12613 (cmd_qtminftpilen): New function.
12614 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
12615 (fast_tracepoint_from_trampoline_address): New function.
12616 (fast_tracepoint_collecting): Handle trampoline as part of jump
12618 (set_trampoline_buffer_space): New function.
12619 (initialize_tracepoint): Initialize new IPA variables.
12620 * target.h (struct target_ops): Add arguments to
12621 install_fast_tracepoint_jump_pad operation, add new
12622 get_min_fast_tracepoint_insn_len operation.
12623 (target_get_min_fast_tracepoint_insn_len): New.
12624 (install_fast_tracepoint_jump_pad): Add arguments.
12625 * server.h (IPA_BUFSIZ): Define.
12626 * linux-i386-ipa.c: Include extra header files.
12627 (initialize_fast_tracepoint_trampoline_buffer): New function.
12628 (initialize_low_tracepoint): Call it.
12629 * server.h (set_trampoline_buffer_space): Declare.
12630 (claim_trampoline_space): Ditto.
12631 (have_fast_tracepoint_trampoline_buffer): Ditto.
12633 2011-11-14 Yao Qi <yao@codesourcery.com>
12635 * server.c (handle_query): Handle InstallInTrace for qSupported.
12636 * tracepoint.c (add_tracepoint): Sort list.
12637 (install_tracepoint, download_tracepoint): New.
12638 (cmd_qtdp): Call them to install and download tracepoints.
12639 (sort_tracepoints): Removed.
12640 (cmd_qtstart): Update.
12642 2011-11-14 Yao Qi <yao@codesourcery.com>
12644 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
12645 * mem-break.h: Declare.
12646 * tracepoint.c (cmd_qtstart): Move some code to ...
12647 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
12649 (download_tracepoints): Move some code to ...
12650 (download_tracepoint_1): ... here. New.
12652 2011-11-08 Yao Qi <yao@codesourcery.com>
12654 * remote-utils.c (relocate_instruction): A comment fix.
12656 2011-11-07 Joel Brobecker <brobecker@adacore.com>
12658 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
12659 (i386_dr_low_get_control, i386_dr_low_get_status): Use
12660 dr_status_mirror and dr_control_mirror from debug_reg_state.
12661 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
12662 (i386_initial_stuff): Remove use of deleted globals.
12663 (i386_get_thread_context, i386_set_thread_context,
12664 i386_thread_added): Use dr_status_mirror and dr_control_mirror
12665 from debug_reg_state.
12667 2011-11-05 Yao Qi <yao@codesourcery.com>
12669 * tracepoint.c (gdb_collect): Loop over tracepoints of same
12670 address as TPOINT's.
12672 2011-11-02 Stan Shebs <stan@codesourcery.com>
12674 * tracepoint.c (agent_mem_read_string): New function.
12675 (eval_agent_expr): Call it for tracenz.
12676 * server.c (handle_query): Report support for tracenz.
12678 2011-11-02 Yao Qi <yao@codesourcery.com>
12680 * tracepoint.c (cmd_qtstart): Remove unused local variables.
12682 2011-11-02 Yao Qi <yao@codesourcery.com>
12684 * target.h: Fix a typo in comment.
12686 2011-10-31 Pedro Alves <pedro@codesourcery.com>
12688 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
12689 clobber the breakpoints' shadows with fast tracepoint jumps.
12690 * mem-break.h (check_mem_write): Add `myaddr' parameter.
12691 * target.c (write_inferior_memory): Also pass MYADDR down to
12694 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
12696 * configure.ac: Check support for personality routine.
12697 * configure: Regenerate.
12698 * config.in: Likewise.
12699 * linux-low.c: Include <sys/personality.h>.
12700 Define ADDR_NO_RANDOMIZE if necessary.
12701 (linux_create_inferior): Disable address space randomization when
12702 forking inferior, if requested.
12703 (linux_supports_disable_randomization): New function.
12704 (linux_target_ops): Install it.
12705 * server.h (disable_randomization): Declare.
12706 * server.c (disable_randomization): New global variable.
12707 (handle_general_set): Handle QDisableRandomization.
12708 (handle_query): Likewise for qSupported.
12709 (main): Support --disable-randomization and --no-disable-randomization
12710 command line arguments.
12711 * target.h (struct target_ops): Add supports_disable_randomization.
12712 (target_supports_disable_randomization): New macro.
12714 2011-09-29 Mike Frysinger <vapier@gentoo.org>
12716 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
12718 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
12719 [!PT_GETDSBT] (target_loadmap): New definition.
12720 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
12721 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
12722 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
12723 and PT_GETDSBT to LINUX_LOADMAP.
12724 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
12725 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
12727 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12729 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
12730 (arm_linux_hwbp_cap): New static variable.
12731 (arm_linux_get_hwbp_cap): Replace by ...
12732 (arm_linux_init_hwbp_cap): ... this new function.
12733 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
12734 (arm_linux_get_hw_watchpoint_count): Likewise.
12735 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12736 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
12737 (arm_prepare_to_resume): Use perror_with_name instead of error.
12739 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
12741 * linux-arm-low.c: Include <signal.h>.
12742 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
12743 (struct arm_linux_hwbp_cap): New data type.
12744 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
12745 (struct arm_linux_hw_breakpoint): New data type.
12746 (MAX_BPTS, MAX_WPTS): Define.
12747 (struct arch_process_info, struct arch_lwp_info): New data types.
12748 (arm_linux_get_hwbp_cap): New function.
12749 (arm_linux_get_hw_breakpoint_count): Likewise.
12750 (arm_linux_get_hw_watchpoint_count): Likewise.
12751 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12752 (arm_hwbp_control_initialize): Likewise.
12753 (arm_hwbp_control_is_enabled): Likewise.
12754 (arm_hwbp_control_is_initialized): Likewise.
12755 (arm_hwbp_control_disable): Likewise.
12756 (arm_linux_hw_breakpoint_equal): Likewise.
12757 (arm_linux_hw_point_initialize): Likewise.
12758 (struct update_registers_data): New data structure.
12759 (update_registers_callback: New function.
12760 (arm_insert_point): Likewise.
12761 (arm_remove_point): Likewise.
12762 (arm_stopped_by_watchpoint): Likewise.
12763 (arm_stopped_data_address): Likewise.
12764 (arm_new_process): Likewise.
12765 (arm_new_thread): Likewise.
12766 (arm_prepare_to_resume): Likewise.
12767 (the_low_target): Register arm_insert_point, arm_remove_point,
12768 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12769 arm_new_thread, and arm_prepare_to_resume.
12771 2011-09-15 Stan Shebs <stan@codesourcery.com>
12773 * server.h (struct emit_ops): Add compare-goto fields.
12774 * tracepoint.c (gdb_agent_op_sizes): New table.
12775 (emit_eq_goto): New function.
12776 (emit_ne_goto): New function.
12777 (emit_lt_goto): New function.
12778 (emit_le_goto): New function.
12779 (emit_gt_goto): New function.
12780 (emit_ge_goto): New function.
12781 (is_goto_target): New function.
12782 (compile_bytecodes): Recognize special cases of compare-goto
12783 combinations and call specialized emitters for them.
12784 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12785 (amd64_emit_ne_goto): New function.
12786 (amd64_emit_lt_goto): New function.
12787 (amd64_emit_le_goto): New function.
12788 (amd64_emit_gt_goto): New function.
12789 (amd64_emit_ge_goto): New function.
12790 (amd64_emit_ops): Add the new functions.
12791 (i386_emit_eq_goto): New function.
12792 (i386_emit_ne_goto): New function.
12793 (i386_emit_lt_goto): New function.
12794 (i386_emit_le_goto): New function.
12795 (i386_emit_gt_goto): New function.
12796 (i386_emit_ge_goto): New function.
12797 (i386_emit_ops): Add the new functions.
12799 2011-09-08 Stan Shebs <stan@codesourcery.com>
12801 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12802 (i386_emit_epilogue): Restore %ebx.
12804 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12806 * server.c (step_thread): Remove definition.
12807 (process_serial_event): Don't handle Hs.
12808 * server.h (step_thread): Remove declaration.
12809 * target.c (set_desired_inferior): Remove use of step_thread.
12811 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12813 * linux-low.c: Include linux-procfs.h.
12814 (linux_attach_lwp_1): Update comments.
12815 (linux_attach): Scan for existing threads when attaching to a
12816 process that is the tgid.
12817 * Makefile.in: Update dependencies.
12819 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12821 * configure.srv: Add linux-procfs.o dependencies.
12823 2011-08-14 Yao Qi <yao@codesourcery.com>
12825 * target.h (struct target_ops): Fix indent.
12826 * win32-low.c (win32_target_ops): Fix comment.
12828 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12829 Yao Qi <yao@codesourcery.com>
12831 * Makefile.in (clean): Remove tic6x-*.c files.
12832 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12833 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12834 (tic6x-c64xp-linux.c): Likewise.
12835 * configure.srv: Add support for tic6x-*-uclinux.
12836 * linux-tic6x-low.c: New.
12837 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12839 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12840 Yao Qi <yao@codesourcery.com>
12842 * target.h (struct target_ops): Add read_loadmap.
12843 * linux-low.c (struct target_loadseg): New type.
12844 (struct target_loadmap): New type.
12845 (linux_read_loadmap): New function.
12846 (linux_target_ops): Add linux_read_loadmap.
12847 * server.c (handle_query): Support qXfer:fdpic:read packet.
12848 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12851 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12853 * win32-low.c: Include <stdint.h>.
12855 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12857 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12858 to the inferior here.
12859 (i386_remove_aligned_watchpoint): Ditto.
12860 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12861 fit part of the watchpoint in the debug registers.
12862 (i386_update_inferior_debug_regs): New.
12863 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12864 registers, and only update the inferior on success.
12865 (i386_low_remove_watchpoint): Ditto.
12867 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12869 * linux-low.c (compare_ints, unique, list_threads, show_process,
12870 linux_core_of_thread): Delete.
12871 (linux_target_ops): Change linux_core_of_thread to
12872 linux_common_core_of_thread.
12873 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12874 * utils.c (malloc_failure): Change type of argument.
12875 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12876 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12877 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12878 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12879 (IPA_OBJS): Add common-utils-ipa.o.
12880 (ptid_h, linux_osdata_h): New macros.
12881 (server_h): Add common/common-utils.h, common/xml-utils.h,
12882 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12884 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12885 ptid.o, buffer.o): New rules.
12886 (linux-low.o): Add common/linux-osdata.h as a dependency.
12887 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12888 * configure.ac: Add AC_HEADER_DIRENT check.
12889 * config.in: Regenerate.
12890 * configure: Regenerate.
12891 * remote-utils.c (xml_escape_text): Delete.
12892 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12893 buffer_xml_printf): Move to common/buffer.c.
12894 * server.c (main): Remove call to initialize_inferiors.
12895 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12896 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12897 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12898 internal_error, gdb_assert, gdb_assert_fail): Delete.
12899 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12900 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12902 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12903 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12904 initialize_inferiors): Delete.
12906 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12908 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12911 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12913 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12915 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12917 2011-05-26 Yao Qi <yao@codesourcery.com>
12919 * Makefile.in (thread-db.o): Track dependence to
12920 common/gdb_thread_db.h.
12921 * thread-db.c: include gdb_thread_db.h from right place.
12923 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12925 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12926 __FILE__ and __LINE__ to internal_error.
12928 2011-05-13 Doug Evans <dje@google.com>
12930 * thread-db.c (try_thread_db_load_from_sdir): New function.
12931 (try_thread_db_load_from_dir): New function.
12932 (thread_db_load_search): Handle $sdir, ignore $pdir.
12933 Remove trying of system directories if search of
12934 libthread-db-search-path fails, that is now done via $sdir.
12936 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12938 * server.c (handle_query): Add EnableDisableTracepoints to the list
12939 of supported features.
12940 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12942 (cmd_qtenable_disable): New.
12943 (cmd_qtstart): Install tracepoints even if disabled.
12944 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12945 receiving a QTEnable or QTDisable packet.
12946 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12947 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12949 (gdb_probe): Skip data collection if static tracepoint is disabled.
12951 2011-05-10 Doug Evans <dje@google.com>
12953 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12955 2011-05-04 Doug Evans <dje@google.com>
12957 * linux-low.c (linux_join): Skip process lookup.
12958 * spu-low.c (spu_join): Ditto.
12959 * server.c (join_inferiors_callback): Delete.
12960 (process_serial_event): For 'D' packet (detach) call join_inferior
12963 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12965 * README: Don't mention xscale*-*-linux*.
12966 * configure.srv (xscale*-*-linux*): Don't handle target.
12968 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12970 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12972 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12973 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12974 (i386_emit_void_call_2): Likewise.
12976 2011-04-26 Yao Qi <yao@codesourcery.com>
12978 * linux-low.c: Move common macros to linux-ptrace.h.
12979 Include linux-ptrace.h.
12980 * Makefile.in (linux_ptrace_h): New.
12981 (linux-low.o): Depends on linux-ptrace.h.
12983 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12985 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12986 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12987 (remote_prepare): New function with most of the TCP code from ...
12988 (remote_open): ... here. Detect PORT here unconditionally. Move also
12989 setting transport_is_reliable.
12990 * server.c (run_once): New variable.
12991 (gdbserver_usage): Document it.
12992 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12993 the first run if RUN_ONCE.
12994 * server.h (run_once, remote_prepare): New declarations.
12996 2011-04-19 Tom Tromey <tromey@redhat.com>
12998 * win32-low.c (handle_load_dll): Remove duplicate "the".
13000 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13002 Remove support for old Cygwin 1.5 versions.
13003 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13004 function to avoid warning.
13005 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13008 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13010 * gdbserver/server.h (Macro _): Define it if not available.
13012 2011-03-14 Michael Snyder <msnyder@vmware.com>
13014 * hostio.c (handle_close): Remove unnecessary null test.
13016 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13018 * Makefile.in (maintainer-clean realclean distclean): Remove
13019 "make ... subdir_do" command.
13021 2011-03-10 Michael Snyder <msnyder@vmware.com>
13023 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13025 * server.c (handle_v_run): Free alloced buffer on early return.
13027 2011-03-09 Yao Qi <yao@codesourcery.com>
13030 2011-03-04 Yao Qi <yao@codesourcery.com>
13032 * Makefile.in: Remove GNU make feature --directory.
13034 2011-03-05 Yao Qi <yao@codesourcery.com>
13036 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13037 (subdir_do): New make target. Copied from gdb/Makefile.
13038 (maintainer-clean, realclean, distclean, clean): Call corresponding
13039 make targets in common/Makefile.
13041 2011-02-11 Yao Qi <yao@codesourcery.com>
13043 * configure.ac: Call AC_PROG_RANLIB.
13044 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13045 * configure: Regenerate.
13047 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13049 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13051 2011-03-06 Yao Qi <yao@codesourcery.com>
13053 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13055 2011-03-05 Yao Qi <yao@codesourcery.com>
13057 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13058 (subdir_do): New make target. Copied from gdb/Makefile.
13059 (maintainer-clean, realclean, distclean, clean): Call corresponding
13060 make targets in common/Makefile.
13062 2011-03-04 Yao Qi <yao@codesourcery.com>
13064 * Makefile.in: Remove GNU make feature --directory.
13066 2011-03-04 Michael Snyder <msnyder@vmware.com>
13068 * server.c (queue_stop_reply): Call xmalloc not malloc.
13070 2011-03-02 Michael Snyder <msnyder@vmware.com>
13072 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13074 2011-02-28 Michael Snyder <msnyder@vmware.com>
13076 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13077 (cmd_qtframe): Ditto.
13078 (cmd_qtbuffer): Ditto.
13079 (cmd_bigqtbuffer): Ditto.
13081 * utils.c (decimal2str): Initialize 'width' to nine, then
13082 don't mess with it.
13084 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13086 * hostio.c (require_data): Free *data, not data.
13088 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13090 * hostio.c (require_data): Use free, not xfree.
13092 2011-02-27 Michael Snyder <msnyder@vmware.com>
13094 * server.c (handle_query): Discard unused value.
13096 * hostio.c (require_data): Free malloc memory before returning
13099 2011-02-26 Michael Snyder <msnyder@vmware.com>
13101 * linux-low.c (list_threads): Call closedir for dirent.
13103 2011-02-27 Michael Snyder <msnyder@vmware.com>
13105 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13106 a case statement falls through.
13108 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13110 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13113 2011-02-26 Michael Snyder <msnyder@vmware.com>
13115 * utils.c (decimal2str): Eliminate dead code and dead param.
13116 (pulongest): Drop dead param from call to decimal2str.
13119 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13121 Revert the following patch (not approved yet):
13122 2011-02-21 Hui Zhu <teawater@gmail.com>
13123 * tracepoint.c (tp_printf): New function.
13124 (eval_agent_expr): Handle gdb_agent_op_printf.
13126 2011-02-21 Hui Zhu <teawater@gmail.com>
13128 * tracepoint.c (tp_printf): New function.
13129 (eval_agent_expr): Handle gdb_agent_op_printf.
13131 2011-02-18 Tom Tromey <tromey@redhat.com>
13133 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13134 (tracepoint.o): Likewise.
13135 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13136 (gdb_agent_op_names): Likewise.
13138 2011-02-18 Tom Tromey <tromey@redhat.com>
13140 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13141 gdb_agent_op_rot>: New constants.
13142 (gdb_agent_op_names): Add pick and roll.
13143 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13146 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13148 * aclocal.m4: Regenerated with aclocal-1.11.1.
13150 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13152 * server.c (handle_qxfer_traceframe_info): New.
13153 (qxfer_packets): Register "traceframe-info".
13154 (handle_query): Report support for qXfer:traceframe-info:read+.
13155 * tracepoint.c (match_blocktype): New.
13156 (traceframe_find_block_type): Rename to ...
13157 (traceframe_walk_blocks): ... this. Add callback filter argument,
13159 (traceframe_find_block_type): New, reimplemented on top of
13160 traceframe_walk_blocks.
13161 (build_traceframe_info_xml): New.
13162 (traceframe_read_info): New.
13163 * server.h (traceframe_read_info): Declare.
13165 2011-02-11 Yao Qi <yao@codesourcery.com>
13167 * configure.ac: Call AC_PROG_RANLIB.
13168 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13169 * configure: Regenerate.
13171 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13173 * server.c (gdb_read_memory): Change return semantics to allow
13175 (handle_search_memory_1): Adjust.
13176 (process_serial_event) <'m' packet>: Handle partial transfers.
13177 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13179 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13181 * regcache.c (init_register_cache): Initialize
13182 regcache->register_status.
13183 (free_register_cache): Release regcache->register_status.
13184 (regcache_cpy): Copy register_status.
13185 (registers_to_string): Print 'x's for unavailable registers.
13186 (supply_register): Mark the register's status valid or
13187 unavailable, depending on whether a buffer was passed in or not.
13188 (supply_register_zeroed): New.
13189 (supply_regblock): Mark the registers' status valid or
13190 unavailable, depending on whether a buffer was passed in or not.
13191 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13192 (struct regcache): New `register_status' field.
13193 (supply_register_zeroed): Declare.
13194 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13195 supply_register_zeroed, rather than passing a NULL buffer to
13197 * tracepoint.c (fetch_traceframe_registers): Update comment.
13199 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13201 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13204 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13206 * server.h (decode_xfer_write): Change prototype.
13207 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13208 and don't extract the annex here.
13209 * server.c (decode_xfer_read): Remove `annex' parameter,
13210 and don't extract the annex here.
13211 (decode_xfer): New.
13212 (struct qxfer): New.
13213 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13214 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13215 (handle_qxfer_statictrace): New functions, abstracted out from
13216 handle_query, and made to use the struct qxfer interface.
13217 (handle_threads_qxfer_proper): Rename to ...
13218 (handle_qxfer_threads_proper): ... this.
13219 (handle_threads_qxfer): Rename to ...
13220 (handle_qxfer_threads): ... this. Adjust.
13221 (qxfer_packets): New array.
13222 (handle_qxfer): New function.
13223 (handle_query): Use handle_qxfer.
13225 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13227 * gdbreplay.c: Shorten lines of >= 80 columns.
13228 * linux-low.c: Ditto.
13229 * linux-ppc-low.c: Ditto.
13230 * linux-s390-low.c: Ditto.
13231 * linux-sparc-low.c: Ditto.
13232 * linux-x86-low.c: Ditto.
13233 * linux-xtensa-low.c: Ditto.
13234 * mem-break.c: Ditto.
13235 * nto-low.c: Ditto.
13236 * regcache.h: Ditto.
13237 * remote-utils.c: Ditto.
13240 * thread-db.c: Ditto.
13241 * tracepoint.c: Ditto.
13243 * win32-low.h: Ditto.
13245 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13247 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13250 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13252 * server.c (gdbserver_version): Update copyright year in version
13254 * gdbreplay.c (gdbreplay_version): Ditto.
13256 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13258 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13259 * linux-bfin-low.c: New file.
13260 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13261 PT_DATA_ADDR for BFIN targets.
13262 * Makefile.in (SFILES): Add linux-bfin-low.c.
13263 (clean): Remove reg-bfin.c.
13264 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13265 * README: Mention supported Blackfin targets.
13267 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13269 * .gitignore: New file.
13271 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13273 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13275 2010-10-22 Jie Zhang <jie@codesourcery.com>
13277 * Makefile.in: Add FLAGS_TO_PASS variable.
13278 (install): Remove dependency of install-only and recursively
13279 invoke make for install-only.
13281 2010-10-04 Doug Evans <dje@google.com>
13283 * Makefile.in (uninstall): Use $(DESTDIR).
13285 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13289 * linux-x86-low.c (compat_siginfo_from_siginfo)
13290 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13291 si_code is < 0. Check for si_code == SI_TIMER before checking for
13294 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13296 * lynx-i386-low.c: New file.
13297 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13299 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13301 * lynx-low.c (ptrace_request_to_str): Remove handling for
13302 request values that have been removed in LynxOS 5.x.
13304 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13306 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13309 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13311 * configure.ac: Add --enable-inprocess-agent option.
13312 * configure: Rebuilt.
13314 2010-09-06 Yao Qi <yao@codesourcery.com>
13316 * linux-low.c (linux_kill): Remove unused variable.
13317 (linux_stabilize_threads): Likewise.
13318 * server.c (start_inferior): Likewise.
13319 (queue_stop_reply_callback): Likewise.
13320 * tracepoint.c (do_action_at_tracepoint): Likewise.
13322 2010-09-06 Yao Qi <yao@codesourcery.com>
13324 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13327 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13329 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13331 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13333 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13336 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13338 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13339 gdbserver/lynx-ppc-low.c: New files.
13340 * Makefile.in (lynx_low_h): New variable.
13341 (lynx-low.o, lynx-ppc-low.o): New rules.
13342 * configure.ac: On LynxOS, link with -lnetinet.
13343 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13344 * configure: regenerate.
13346 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13348 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13349 * configure.ac: Add check for vasprintf and vsnprintf.
13350 * configure, config.in: Regenerate.
13351 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13353 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13355 * gdbreplay.c: Move include of alloca.h up, next to include of
13357 * server.h: Add include of malloc.h.
13358 * mem-break.c: Remove include of malloc.h.
13359 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13361 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13363 * Makefile.in (memmem.o): Build with -Wno-error.
13365 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13367 * utils.c (xsnprintf): Make non-static.
13368 * server.h: Add xsnprintf declaration.
13369 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13370 replace calls to snprintf by calls to xsnprintf throughout.
13372 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13374 * configure.ac: Add configure check for alloca.
13375 * configure, config.in: Regenerate.
13376 * server.h: Include alloca.h if it exists.
13377 * gdbreplay.c: Include alloca.h if it exists.
13379 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13381 * linux-low.c (__SIGRTMIN): Define if not already defined.
13382 (linux_create_inferior): Check for __ANDROID__ rather than
13384 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13385 are already deferred.
13386 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13387 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13388 stopped and already has a pending signal to report.
13389 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13390 a pending signal to report or is moving out of a jump pad.
13391 (linux_init_signals): Check for __ANDROID__ rather than
13394 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13396 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13397 debug_threads check. Avoid a linear search when not doing debug
13400 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13402 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13403 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13404 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13405 (process_event): Change local fd's type to gdb_fildes_t.
13406 (create_file_handler): Adjust prototype.
13407 (delete_file_handler): Adjust prototype.
13408 (handle_file_event): Adjust prototype. Use pfildes.
13409 (create_file_event): Adjsut prototype.
13410 * remote-utils.c (remote_desc, listen_desc): Change type to
13412 * server.h: New gdb_fildes_t typedef.
13413 [USE_WIN32API]: Include winsock2.h.
13414 (delete_file_handler, add_file_handler): Adjust prototypes.
13415 (pfildes): Declare.
13416 * utils.c (pfildes): New.
13418 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13420 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13421 * configure: Regenerate.
13423 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13425 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13426 (linux_done_accessing_memory): ... this.
13427 (linux_target_ops): Adjust.
13428 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13429 * nto-low.c (nto_target_ops): Adjust comment.
13430 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13431 * spu-low.c (spu_target_ops): Adjust comment.
13432 * target.h (target_ops): Rename unprepare_to_access_memory field
13433 to done_accessing_memory.
13434 (unprepare_to_access_memory): Rename to ...
13435 (done_accessing_memory): ... this.
13437 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13439 * linux-low.c (linux_prepare_to_access_memory): New.
13440 (linux_unprepare_to_access_memory): New.
13441 (linux_target_ops): Install them.
13442 * server.c (read_memory): Rename to ...
13443 (gdb_read_memory): ... this. Use
13444 prepare_to_access_memory/prepare_to_access_memory.
13445 (write_memory): Rename to ...
13446 (gdb_write_memory): ... this. Use
13447 prepare_to_access_memory/prepare_to_access_memory.
13448 (handle_search_memory_1): Adjust.
13449 (process_serial_event): Adjust.
13450 * target.h (struct target_ops): New fields
13451 prepare_to_access_memory and unprepare_to_access_memory.
13452 (prepare_to_access_memory, unprepare_to_access_memory): New.
13453 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13454 prepare_to_access_memory/prepare_to_access_memory.
13455 * nto-low.c (nto_target_ops): Adjust.
13456 * spu-low.c (spu_target_ops): Adjust.
13457 * win32-low.c (win32_target_ops): Adjust.
13459 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13461 * Makefile.in (WARN_CFLAGS): Get it from configure.
13462 (WERROR_CFLAGS): New.
13463 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13464 * configure.ac: Introduce --enable-werror, which adds -Werror to
13465 the compiler command line. Enabled by default. Disable with
13466 --disable-werror. Add -Wdeclaration-after-statement
13467 Wpointer-arith and -Wformat-nonliteral to warning flags.
13468 * configure: Regenerate.
13470 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13472 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13474 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13476 * gdbreplay.c (remote_error): New.
13478 (expect): Use gdbchar. Check for error reading from GDB.
13479 Clarify sync error output.
13480 (play): Check for errors writing to GDB.
13481 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13482 * remote-utils.c (getpkt): Check for errors writing to the remote
13485 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13487 * linux-low.c (linux_wait_1): Move non-debugging code out of
13488 `debug_threads' control.
13490 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13492 * linux-low.c (linux_wait_1): Don't set last_status here.
13493 * server.c (push_event, queue_stop_reply_callback): Assert we're
13494 not pushing a TARGET_WAITKIND_IGNORE event.
13495 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13496 (myresume, handle_target_event): Set the thread's last_resume_kind
13497 and last_status from the target returned status.
13499 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13503 * linux-x86-low.c (update_debug_registers_callback): New.
13504 (i386_dr_low_set_addr): Use it.
13505 (i386_dr_low_get_addr): New.
13506 (i386_dr_low_set_control): Use update_debug_registers_callback.
13507 (i386_dr_low_get_control): New.
13508 (i386_dr_low_get_status): Adjust.
13509 * linux-low.c (linux_stop_lwp): New.
13510 * linux-low.h (linux_stop_lwp): Declare.
13512 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13513 argument instead of a i386_debug_reg_state.
13514 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13515 a i386_debug_reg_state.
13516 (i386_insert_aligned_watchpoint): Adjust.
13517 (i386_remove_aligned_watchpoint): Adjust.
13518 (i386_low_stopped_data_address): Read the debug registers from the
13519 inferior instead of from the mirrors.
13520 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13521 (i386_dr_low_get_addr): Declare.
13522 (i386_dr_low_get_control): Declare.
13523 (i386_dr_low_get_status): Change prototype.
13525 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13526 (i386_dr_low_get_addr): New.
13527 (i386_dr_low_get_control): New.
13528 (i386_dr_low_get_status): Adjust prototype. Return
13530 (i386_initial_stuff): Clear dr_status_mirror and
13532 (i386_get_thread_context): Adjust.
13533 (i386_set_thread_context): Adjust.
13534 (i386_thread_added): Adjust.
13536 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13538 * linux-low.h (linux_thread_area): Delete declaration.
13540 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
13542 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
13543 after its termination.
13545 2010-08-09 Pedro Alves <pedro@codesourcery.com>
13547 * linux-low.c (gdb_wants_lwp_stopped): Delete.
13548 (gdb_wants_all_stopped): Delete.
13549 (linux_wait_1): Don't call them.
13550 * server.c (handle_v_cont): Tag all threads as want-stopped.
13551 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
13552 stopped as "client-wants-stopped".
13554 2010-07-31 Pedro Alves <pedro@codesourcery.com>
13556 * Makefile.in (signals_h): New.
13557 (server_h): Depend on it.
13558 (server.o): Don't depend on $(signals_def).
13559 (signals.o): Depend on $(signals_def).
13561 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
13563 * Makefile.in (signals_def): New.
13564 (server_h): Append include/gdb/signals.h and signals_def.
13565 (server.o): Append signals_def.
13567 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13569 * server.c (handle_target_event): Use target_signal_to_host for
13570 resume_info.sig initialization.
13571 * target.h (struct thread_resume) <sig>: New comment.
13573 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
13575 * server.c (handle_query): strcpy() the returned string from paddress()
13576 instead of sprintf().
13577 * utils.c (paddress): Return phex_nz().
13579 2010-07-07 Joel Brobecker <brobecker@adacore.com>
13581 * server.c (handle_v_cont): Call mourn_inferior if process
13583 (myresume): Likewise.
13585 2010-07-01 Pedro Alves <pedro@codesourcery.com>
13587 Static tracepoints, and integration with UST.
13589 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
13590 * mem-break.c (uninsert_all_breakpoints)
13591 (reinsert_all_breakpoints): New.
13592 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
13593 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
13594 (gdb_agent_ust_loaded, helper_thread_id)
13595 (gdb_agent_helper_thread_id): New macros.
13596 (struct ipa_sym_addresses): Add addr_ust_loaded,
13597 addr_helper_thread_id, addr_cmd_buf.
13598 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
13599 (in_process_agent_loaded_ust): New.
13600 (write_e_ust_not_loaded): New.
13601 (maybe_write_ipa_ust_not_loaded): New.
13602 (struct collect_static_trace_data_action): New.
13603 (enum tracepoint_type) <static_tracepoint>: New.
13604 (struct tracepoint) <handle>: Mention static tracepoints.
13605 (struct static_tracepoint_ctx): New.
13606 (CMD_BUF_SIZE): New.
13607 (add_tracepoint_action): Handle static tracepoint actions.
13608 (unprobe_marker_at): New.
13609 (clear_installed_tracepoints): Handle static tracepoints.
13610 (cmd_qtdp): Handle static tracepoints.
13611 (probe_marker_at): New.
13612 (cmd_qtstart): Handle static tracepoints.
13613 (response_tracepoint): Handle static tracepoints.
13614 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
13615 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
13616 (get_context_regcache): Handle static tracepoints.
13617 (do_action_at_tracepoint): Handle static tracepoint actions.
13618 (traceframe_find_block_type): Handle static trace data blocks.
13619 (traceframe_read_sdata): New.
13620 (download_tracepoints): Download static tracepoint actions.
13621 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
13622 (GDB_PROBE_NAME): New.
13624 (GET_UST_SYM): New.
13627 (ust_marker_to_static_tracepoint): New.
13629 (collect_ust_data_at_tracepoint): New.
13630 (gdb_ust_probe): New.
13631 (UNIX_PATH_MAX, SOCK_DIR): New.
13632 (gdb_ust_connect_sync_socket): New.
13633 (resume_thread, stop_thread): New.
13634 (run_inferior_command): New.
13635 (init_named_socket): New.
13636 (gdb_ust_socket_init): New.
13637 (cstr_to_hexstr): New.
13639 (first_marker, next_marker): New.
13640 (response_ust_marker): New.
13641 (cmd_qtfstm, cmd_qtsstm): New.
13642 (unprobe_marker_at, probe_marker_at): New.
13643 (cmd_qtstmat, gdb_ust_thread): New.
13644 (gdb_ust_init): New.
13645 (initialize_tracepoint_ftlib): Call gdb_ust_init.
13646 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
13647 (ST_REGENTRY): New.
13648 (x86_64_st_collect_regmap): New.
13649 (X86_64_NUM_ST_COLLECT_GREGS): New.
13650 (AMD64_RIP_REGNUM): New.
13651 (supply_static_tracepoint_registers): New.
13652 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
13653 (ST_REGENTRY): New.
13654 (i386_st_collect_regmap): New.
13655 (i386_NUM_ST_COLLECT_GREGS): New.
13656 (supply_static_tracepoint_registers): New.
13657 * server.c (handle_query): Handle qXfer:statictrace:read.
13658 <qSupported>: Report support for StaticTracepoints, and
13659 qXfer:statictrace:read features.
13660 * server.h (traceframe_read_sdata)
13661 (supply_static_tracepoint_registers): Declare.
13662 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
13663 (unpack_varlen_hex): Include in IPA build.
13664 * Makefile.in (ustlibs, ustinc): New.
13665 (IPA_OBJS): Add remote-utils-ipa.o.
13666 ($(IPA_LIB)): Link -ldl and -lpthread.
13668 (IPAGENT_CFLAGS): Add UST_CFLAGS.
13669 * config.in, configure: Regenerate.
13671 2010-06-20 Ian Lance Taylor <iant@google.com>
13672 Pedro Alves <pedro@codesourcery.com>
13674 * linux-x86-low.c (always_true): Delete.
13675 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
13676 trying to fool the compiler with always_true.
13678 2010-06-20 Pedro Alves <pedro@codesourcery.com>
13680 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
13681 conditions in gdbserver.
13683 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
13685 * spu-low.c (spu_read_memory): Wrap around local store limit.
13686 (spu_write_memory): Likewise.
13688 2010-06-15 Pedro Alves <pedro@codesourcery.com>
13690 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
13691 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
13693 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
13695 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
13696 uses with LONGEST uses.
13698 2010-06-14 Stan Shebs <stan@codesourcery.com>
13699 Pedro Alves <pedro@codesourcery.com>
13703 * linux-x86-low.c: Include limits.h.
13705 (always_true): New.
13708 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
13709 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
13710 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
13711 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
13712 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
13713 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
13714 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
13715 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
13716 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
13717 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
13718 (amd64_emit_void_call_2): New.
13719 (amd64_emit_ops): New.
13720 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
13721 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
13722 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
13723 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
13724 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
13725 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
13726 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
13727 (i386_emit_call, i386_emit_reg, i386_emit_pop)
13728 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
13729 (i386_emit_stack_adjust, i386_emit_int_call_1)
13730 (i386_emit_void_call_2): New.
13731 (i386_emit_ops): New.
13732 (x86_emit_ops): New.
13733 (the_low_target): Install x86_emit_ops.
13734 * server.h (struct emit_ops): New.
13735 (get_raw_reg_func_addr): Declare.
13736 (current_insn_ptr, emit_error): Declare.
13737 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
13738 (set_trace_state_variable_value): New defines.
13739 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
13740 addr_get_trace_state_variable_value and
13741 addr_set_trace_state_variable_value.
13742 (symbol_list): New fields for get_raw_reg,
13743 get_trace_state_variable_value and set_trace_state_variable_value.
13744 (condfn): New typedef.
13745 (struct tracepoint): New field `compiled_cond'.
13746 (do_action_at_tracepoint): Clear compiled_cond.
13747 (get_trace_state_variable_value, set_trace_state_variable_value):
13749 (condition_true_at_tracepoint): If there's a compiled condition,
13751 (current_insn_ptr, emit_error): New globals.
13752 (struct bytecode_address): New.
13753 (get_raw_reg_func_addr): New.
13754 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13755 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13756 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13757 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13758 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13759 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13760 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13761 (compile_tracepoint_condition, compile_bytecodes): New.
13762 * target.h (emit_ops): Forward declare.
13763 (struct target_ops): New field emit_ops.
13764 (target_emit_ops): New.
13765 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13766 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13767 * linux-low.c (linux_emit_ops): New.
13768 (linux_target_ops): Install it.
13769 * linux-low.h (struct linux_target_ops): New field emit_ops.
13771 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13773 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13774 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13776 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13777 Stan Shebs <stan@codesourcery.com>
13779 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13780 (all): Depend on $(extra_libraries).
13781 (install-only): Install the IPA.
13782 (IPA_OBJS, IPA_LIB): New.
13783 (clean): Remove the IPA lib.
13784 (IPAGENT_CFLAGS): New.
13785 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13786 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13787 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13788 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13789 * configure.ac: Check for atomic builtins support in the compiler.
13790 (IPA_DEPFILES, extra_libraries): Define.
13791 * configure.srv (ipa_obj): Add description.
13792 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13793 (i[34567]86-*-linux*): Set ipa_obj.
13794 (x86_64-*-linux*): Set ipa_obj.
13795 * linux-low.c (stabilizing_threads): New.
13796 (supports_fast_tracepoints): New.
13797 (linux_detach): Stabilize threads before detaching.
13798 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13799 the lwp is either not stabilizing, or is moving out of a jump pad.
13800 (linux_fast_tracepoint_collecting): New.
13801 (maybe_move_out_of_jump_pad): New.
13802 (enqueue_one_deferred_signal): New.
13803 (dequeue_one_deferred_signal): New.
13804 (linux_wait_for_event_1): If moving out of a jump pad, defer
13805 pending signals to later.
13806 (linux_stabilize_threads): New.
13807 (linux_wait_1): Check if threads need moving out of jump pads, and
13809 (stuck_in_jump_pad_callback): New.
13810 (move_out_of_jump_pad_callback): New.
13811 (lwp_running): New.
13812 (linux_resume_one_lwp): Handle moving out of jump pads.
13813 (linux_set_resume_request): Dequeue deferred signals.
13814 (need_step_over_p): Also step over fast tracepoint jumps.
13815 (start_step_over): Also uninsert fast tracepoint jumps.
13816 (finish_step_over): Also reinsert fast tracepoint jumps.
13817 (linux_install_fast_tracepoint_jump): New.
13818 (linux_target_ops): Install linux_stabilize_threads and
13819 linux_install_fast_tracepoint_jump_pad.
13820 * linux-low.h (linux_target_ops) <get_thread_area,
13821 install_fast_tracepoint_jump_pad>: New fields.
13822 (struct lwp_info) <collecting_fast_tracepoint,
13823 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13824 (linux_get_thread_area): Declare.
13825 * linux-x86-low.c (jump_insn): New.
13826 (x86_get_thread_area): New.
13827 (append_insns): New.
13828 (push_opcode): New.
13829 (amd64_install_fast_tracepoint_jump_pad): New.
13830 (i386_install_fast_tracepoint_jump_pad): New.
13831 (x86_install_fast_tracepoint_jump_pad): New.
13832 (the_low_target): Install x86_get_thread_area and
13833 x86_install_fast_tracepoint_jump_pad.
13834 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13835 (struct fast_tracepoint_jump): New.
13836 (fast_tracepoint_jump_insn): New.
13837 (fast_tracepoint_jump_shadow): New.
13838 (find_fast_tracepoint_jump_at): New.
13839 (fast_tracepoint_jump_here): New.
13840 (delete_fast_tracepoint_jump): New.
13841 (set_fast_tracepoint_jump): New.
13842 (uninsert_fast_tracepoint_jumps_at): New.
13843 (reinsert_fast_tracepoint_jumps_at): New.
13844 (set_breakpoint_at): Use write_inferior_memory.
13845 (uninsert_raw_breakpoint): Use write_inferior_memory.
13846 (check_mem_read): Mask out fast tracepoint jumps.
13847 (check_mem_write): Mask out fast tracepoint jumps.
13848 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13849 (set_fast_tracepoint_jump): Declare.
13850 (delete_fast_tracepoint_jump)
13851 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13852 (reinsert_fast_tracepoint_jumps_at): Declare.
13853 * regcache.c: Don't compile many functions when building the
13854 in-process agent library.
13855 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13856 the register buffer in the heap.
13857 (free_register_cache): If the register buffer isn't owned by the
13858 regcache, don't free it.
13859 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13860 pre-existing register caches.
13861 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13863 (convert_ascii_to_int): : Constify `from' parameter type.
13864 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13865 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13866 the needed buffer in-place.
13867 (relocate_instruction): New.
13868 * server.c (handle_query) <qSymbols>: If the target supports
13869 tracepoints, give it a chance of looking up symbols. Report
13870 support for fast tracepoints.
13871 (handle_status): Stabilize threads.
13872 (process_serial_event): Adjust.
13873 * server.h (struct fast_tracepoint_jump): Forward declare.
13874 (struct process_info) <fast_tracepoint_jumps>: New field.
13875 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13876 (decode_X_packet, decode_M_packet): Adjust.
13877 (relocate_instruction): Declare.
13878 (in_process_agent_loaded): Declare.
13879 (tracepoint_look_up_symbols): Declare.
13880 (struct fast_tpoint_collect_status): Declare.
13881 (fast_tracepoint_collecting): Declare.
13882 (force_unlock_trace_buffer): Declare.
13883 (handle_tracepoint_bkpts): Declare.
13884 (initialize_low_tracepoint)
13885 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13886 * target.h (struct target_ops) <stabilize_threads,
13887 install_fast_tracepoint_jump_pad>: New fields.
13888 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13889 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13890 [HAVE_STDINT_H]: Include stdint.h.
13891 (trace_debug_1): Rename to ...
13892 (trace_vdebug): ... this.
13893 (trace_debug): Rename to ...
13894 (trace_debug_1): ... this. Add `level' parameter.
13895 (trace_debug): New.
13896 (ATTR_USED, ATTR_NOINLINE): New.
13897 (IP_AGENT_EXPORT): New.
13898 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13899 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13900 (about_to_request_buffer_space, trace_buffer_is_full)
13901 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13902 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13903 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13904 (traceframe_write_count, traceframes_created)
13905 (trace_state_variables)
13906 New renaming defines.
13907 (struct ipa_sym_addresses): New.
13908 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13909 (symbol_list): New.
13910 (ipa_sym_addrs): New.
13911 (all_tracepoint_symbols_looked_up): New.
13912 (in_process_agent_loaded): New.
13913 (write_e_ipa_not_loaded): New.
13914 (maybe_write_ipa_not_loaded): New.
13915 (tracepoint_look_up_symbols): New.
13916 (debug_threads) [IN_PROCESS_AGENT]: New.
13917 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13918 (UNKNOWN_SIDE_EFFECTS): New.
13919 (stop_tracing): New.
13920 (flush_trace_buffer): New.
13921 (stop_tracing_bkpt): New.
13922 (flush_trace_buffer_bkpt): New.
13923 (read_inferior_integer): New.
13924 (read_inferior_uinteger): New.
13925 (read_inferior_data_pointer): New.
13926 (write_inferior_data_pointer): New.
13927 (write_inferior_integer): New.
13928 (write_inferior_uinteger): New.
13929 (struct collect_static_trace_data_action): Delete.
13930 (enum tracepoint_type): New.
13931 (struct tracepoint) <type>: New field `type'.
13932 <actions_str, step_actions, step_actions_str>: Only include in
13934 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13935 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13936 (tracepoints): Use IP_AGENT_EXPORT.
13937 (last_tracepoint): Don't include in the IPA.
13938 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13939 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13940 (alloced_trace_state_variables): New.
13941 (trace_state_variables): Use IP_AGENT_EXPORT.
13942 (traceframe_t): Delete unused variable.
13943 (circular_trace_buffer): Don't include in the IPA.
13944 (trace_buffer_start): Delete.
13945 (struct trace_buffer_control): New.
13946 (trace_buffer_free): Delete.
13947 (struct ipa_trace_buffer_control): New.
13948 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13949 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13951 (trace_buffer_ctrl): New.
13952 (TRACE_BUFFER_CTRL_CURR): New.
13953 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13954 Reimplement as macros.
13955 (trace_buffer_wrap): Delete.
13956 (traceframe_write_count, traceframe_read_count)
13957 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13958 (struct tracepoint_hit_ctx) <type>: New field.
13959 (struct fast_tracepoint_ctx): New.
13960 (memory_barrier): New.
13962 (record_tracepoint_error): Update atomically in the IPA.
13963 (clear_inferior_trace_buffer): New.
13964 (about_to_request_buffer_space): New.
13965 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13966 updating the same buffer.
13967 (add_tracepoint): Default the tracepoint's type to trap
13968 tracepoint, and orig_size to -1.
13969 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13970 internal variables.
13971 (create_trace_state_variable): New parameter `gdb'. Handle it.
13972 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13973 (cmd_qtdp): Handle fast tracepoints.
13974 (cmd_qtdv): Adjust.
13975 (max_jump_pad_size): New.
13976 (gdb_jump_pad_head): New.
13977 (get_jump_space_head): New.
13978 (claim_jump_space): New.
13979 (sort_tracepoints): New.
13980 (MAX_JUMP_SIZE): New.
13981 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13983 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13984 support. Upload fast traceframes, and delete internal IPA
13986 (stop_tracing_handler): New.
13987 (flush_trace_buffer_handler): New.
13988 (cmd_qtstop): Upload fast tracepoints.
13989 (response_tracepoint): Handle fast tracepoints.
13990 (tracepoint_finished_step): Upload fast traceframes. Set the
13991 tracepoint hit context's tracepoint type.
13992 (handle_tracepoint_bkpts): New.
13993 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13994 type. Add comment about fast tracepoints.
13995 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13996 non-existing action_str field.
13997 (get_context_regcache): Handle fast tracepoints.
13998 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14000 (fast_tracepoint_from_jump_pad_address): New.
14001 (fast_tracepoint_from_ipa_tpoint_address): New.
14002 (collecting_t): New.
14003 (force_unlock_trace_buffer): New.
14004 (fast_tracepoint_collecting): New.
14006 (gdb_collect): New.
14007 (write_inferior_data_ptr): New.
14008 (target_tp_heap): New.
14009 (target_malloc): New.
14010 (download_agent_expr): New.
14012 (download_tracepoints): New.
14013 (download_trace_state_variables): New.
14014 (upload_fast_traceframes): New.
14015 (IPA_FIRST_TRACEFRAME): New.
14016 (IPA_NEXT_TRACEFRAME_1): New.
14017 (IPA_NEXT_TRACEFRAME): New.
14018 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14019 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14020 (gdb_jump_pad_buffer_end): New.
14021 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14022 (initialize_tracepoint): Adjust.
14023 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14024 buffer. Initialize the low module.
14025 * utils.c (PREFIX, TOOLNAME): New.
14026 (malloc_failure): Use PREFIX.
14027 (error): In the IPA, an error causes an exit.
14028 (fatal, warning): Use PREFIX.
14029 (internal_error): Use TOOLNAME.
14030 (NUMCELLS): Increase to 10.
14031 * configure, config.in: Regenerate.
14033 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14035 * server.c (handle_query) <qSupported>: Do two passes over the
14036 qSupported string to avoid nesting strtok.
14038 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14040 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14042 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14043 -Wl,--dynamic-list.
14044 * configure: Regenerate.
14045 * proc-service.list: New.
14047 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14049 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14052 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14054 * gdbreplay.c (remote_open): Check error return from socket() call by
14055 its equality to -1 not by it being negative.
14056 * remote-utils.c (remote_open): Likewise.
14058 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14060 * config.h: Regenerate.
14062 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14064 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14065 doesn't provide PTRACE_GET_THREAD_AREA.
14067 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14069 * linux-m68k-low.c: Include <asm/ptrace.h>
14070 (ps_get_thread_area): Implement.
14072 2010-05-03 Doug Evans <dje@google.com>
14074 * event-loop.c (struct callback_event): New struct.
14075 (callback_list): New global.
14076 (append_callback_event, delete_callback_event): New functions.
14077 (process_callback): New function.
14078 (start_event_loop): Call it.
14079 * remote-utils.c (NOT_SCHEDULED): Define.
14080 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14081 moved out of readchar.
14082 (readchar): Rewrite. Call reschedule before returning.
14083 (reset_readchar): New function.
14084 (remote_close): Call it.
14085 (process_remaining, reschedule): New functions.
14086 * server.h (callback_handler_func): New typedef.
14087 (append_callback_event, delete_callback_event): Declare.
14089 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14091 * proc-service.c (ps_pglobal_lookup): Use
14092 thread_db_look_up_one_symbol.
14093 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14094 parameter. Use it instead of all_symbols_looked_up.
14095 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14097 (all_symbols_looked_up): Don't declare.
14098 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14099 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14101 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14102 Set all_symbols_looked_up here.
14103 (thread_db_look_up_one_symbol): New.
14104 (thread_db_get_tls_address): Adjust.
14105 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14106 thread_db object on the heap, and tentatively set it in the
14108 (thread_db_init): Don't set all_symbols_looked_up here.
14109 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14111 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14113 * linux-low.c (linux_kill, linux_detach): Adjust.
14114 (status_pending_p_callback): Remove redundant statement. Check
14115 for !TARGET_WAITIKIND_IGNORE, instead of
14116 TARGET_WAITKIND_STOPPED.
14117 (handle_tracepoints): Make sure LWP is locked. Adjust.
14118 (linux_wait_for_event_1): Adjust.
14119 (linux_cancel_breakpoints): New.
14120 (unsuspend_one_lwp): New.
14121 (unsuspend_all_lwps): New.
14122 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14123 (send_sigstop_callback): Change return type to int, add new
14124 `except' parameter and handle it.
14125 (suspend_and_send_sigstop_callback): New.
14126 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14127 pass them down. If SUSPEND, also increment the lwp's suspend
14129 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14130 (need_step_over_p): Don't consider suspended LWPs.
14131 (start_step_over): Adjust.
14132 (proceed_one_lwp): Change return type to int, add new `except'
14133 parameter and handle it.
14134 (unsuspend_and_proceed_one_lwp): New.
14135 (proceed_all_lwps): Use find_inferior instead of
14137 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14138 also decrement the suspend count of LWPs. Pass `except' down,
14139 instead of hacking its suspend count.
14140 (linux_pause_all): Add `freeze' parameter. Adjust.
14141 (linux_unpause_all): New.
14142 (linux_target_ops): Install linux_unpause_all.
14143 * server.c (handle_status): Adjust.
14144 * target.h (struct target_ops): New fields `unpause_all' and
14145 `cancel_breakpoints'. Add new parameter to `pause_all'.
14146 (pause_all): Add new `freeze' parameter.
14147 (unpause_all): New.
14148 (cancel_breakpoints): New.
14149 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14150 cancel breakpoints.
14151 (cmd_qtstart): Pause threads.
14152 (stop_tracing): Pause threads, and cancel breakpoints.
14153 * win32-low.c (win32_target_ops): Adjust.
14155 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14157 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14158 the inferior right away from here...
14159 (linux_wait_1): ... to here, and adjust to check the thread's
14160 last_resume_kind instead of the lwp's step or stop_expected flags.
14162 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14164 * README: Use consistent `GDB' and `GDBserver' spellings.
14166 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14168 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14169 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14170 (linux_detach_one_lwp): Assume the lwp is stopped.
14171 (any_thread_of): Delete.
14172 (linux_detach): Stop all lwps here. Don't blindly delete all
14174 (delete_lwp_callback): New.
14175 (linux_mourn): Delete all lwps of the process that is gone.
14176 (linux_wait_1): Don't delete the last lwp of the process here.
14177 * mem-break.h (mark_breakpoints_out): Declare.
14178 * mem-break.c (mark_breakpoints_out): New.
14179 (free_all_breakpoints): Use it.
14180 * server.c (handle_target_event): If the process is gone, mark
14182 * thread-db.c (struct thread_db) <create_bp>: New field.
14183 (thread_db_enable_reporting): Fix prototype. Store a thread event
14184 breakpoint reference in the thread_db struct.
14185 (thread_db_load_search): Clear the thread_db object.
14186 (try_thread_db_load_1): Ditto.
14187 (switch_to_process): New.
14188 (disable_thread_event_reporting): Use it.
14189 (remove_thread_event_breakpoints): New.
14190 (thread_db_detach, thread_db_mourn): Use it.
14192 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14194 * linux-low.c (linux_enable_event_reporting): New.
14195 (linux_wait_for_event_1, handle_extended_wait): Use it.
14197 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14199 * linux-low.c (linux_kill_one_lwp, linux_kill)
14200 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14201 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14202 SIGSTOP even if the LWP is stopped.
14203 (send_sigstop_callback): New.
14204 (stop_all_lwps): Use send_sigstop_callback instead.
14205 (linux_resume_one_thread): Adjust.
14206 (proceed_one_lwp): Still proceed an LWP that the client has
14207 requested to stop, if we haven't reported it as stopped yet. Make
14208 sure that LWPs the client want stopped, have a pending SIGSTOP.
14210 2010-04-26 Doug Evans <dje@google.com>
14212 * server.c (handle_general_set): Make static.
14214 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14215 Print received char after testing for error/eof instead of before.
14216 (input_interrupt): Tweak comment.
14218 2010-04-23 Doug Evans <dje@google.com>
14220 * server.c (start_inferior): Print inferior argv if --debug.
14222 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14224 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14225 * nto-x86-low.c: Include server.h
14227 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14229 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14230 be consistent with other sources of this directory.
14231 (init_registers_amd64): Correct name of source file of this function
14234 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14236 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14237 64-bit executables.
14239 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14241 * win32-i386-low.c: Add 64-bit support.
14242 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14243 (init_registers_amd64): Declare.
14244 (mappings): Add 64-bit version of array.
14245 (init_windows_x86): New function.
14246 (the_low_target): Change init_arch field to init_windows_x86.
14248 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14250 * win32-low.c: Adapt to support also 64-bit architecture.
14251 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14252 (get_image_name): Use SIZE_T type for local variable `done'.
14253 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14254 (toolhelp_get_dll_name): Idem.
14255 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14256 Use uintptr_t typecast to avoid warning.
14257 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14258 (handle_exception): Use phex_nz to avoid warning.
14259 (win32_wait): Remove unused local variable `process'.
14261 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14263 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14266 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14268 * configure.ac: Use `ws2_32' library for srv_mingw.
14269 * configure: Regenerate.
14270 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14271 * remote-utils.c: Likewise.
14273 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14275 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14276 if __x86_64__ is defined.
14278 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14280 * configure: Regenerate.
14282 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14284 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14285 * target.h (target_ops): New get_tib_address field.
14286 * win32-low.h (win32_thread_info): Add thread_local_base field.
14287 * win32-low.c (child_add_thread): Add tlb argument.
14288 Set thread_local_base field to TLB.
14289 (get_child_debug_event): Adapt to child_add_thread change.
14290 (win32_get_tib_address): New function.
14291 (win32_target_ops): Set get_tib_address field to
14292 win32_get_tib_address.
14293 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14295 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14297 * linux-low.c (linux_mourn): Also remove the process.
14298 * server.c (handle_target_event): Don't remove the process here.
14299 * nto-low.c (nto_mourn): New.
14300 (nto_target_ops): Install it.
14301 * spu-low.c (spu_mourn): New.
14302 (spu_target_ops): Install it.
14303 * win32-low.c (win32_mourn): New.
14304 (win32_target_ops): Install it.
14306 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14308 * server.h (buffer_xml_printf): Remove redundant `;'.
14310 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14312 * regcache.c (set_register_cache): Invalidate regcaches before
14313 changing the register cache layout.
14314 (regcache_invalidate_one): Allow a NULL regcache.
14315 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14316 regcaches before changing the register cache layout or the target
14319 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14321 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14322 variable warning on Linux/x86-64.
14324 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14326 GDBserver disconnected tracing support.
14328 * linux-low.c (linux_remove_process): Delete.
14329 (add_lwp): Don't set last_resume_kind here.
14330 (linux_kill): Use `mourn'.
14331 (linux_detach): Use `thread_db_detach', and `mourn'.
14332 (linux_mourn): New.
14333 (linux_attach_lwp_1): Adjust comment.
14334 (linux_attach): last_resume_kind moved the thread_info; adjust.
14335 (status_pending_p_callback): Adjust.
14336 (linux_wait_for_event_1): Adjust.
14337 (count_events_callback, select_singlestep_lwp_callback)
14338 (select_event_lwp_callback, cancel_breakpoints_callback)
14339 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14340 (proceed_one_lwp): Adjust.
14341 (linux_async): Add debug output.
14342 (linux_thread_stopped): New.
14343 (linux_pause_all): New.
14344 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14346 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14347 (thread_db_free): Delete declaration.
14348 (thread_db_detach, thread_db_mourn): Declare.
14349 * thread-db.c (thread_db_init): Use thread_db_mourn.
14350 (thread_db_free): Delete, split in two.
14351 (disable_thread_event_reporting): New.
14352 (thread_db_detach): New.
14353 (thread_db_mourn): New.
14355 * server.h (struct thread_info) <last_resume_kind>: New field.
14356 <attached>: Add comment.
14357 <gdb_detached>: New field.
14358 (handler_func): Change return type to int.
14359 (handle_serial_event, handle_target_event): Ditto.
14360 (gdb_connected): Declare.
14362 (disconnected_tracing): Declare.
14363 (stop_tracing): Declare.
14365 * server.c (handle_query) <qSupported>: Report support for
14366 disconnected tracing.
14367 (queue_stop_reply_callback): Account for running threads.
14368 (gdb_wants_thread_stopped): New.
14369 (gdb_wants_all_threads_stopped): New.
14370 (gdb_reattached_process): New.
14371 (handle_status): Clear the `gdb_detached' flag of all processes.
14372 In all-stop, stop all threads.
14373 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14374 (process_serial_event): If the remote connection breaks, or if an
14375 exit was forced with "monitor exit", force an event loop exit.
14376 Handle disconnected tracing on detach.
14377 (handle_serial_event): Adjust.
14378 (handle_target_event): If GDB isn't connected, forward events back
14379 to the inferior, unless the last process exited, in which case,
14380 exit gdbserver. Adjust interface.
14382 * remote-utils.c (remote_open): Don't block in accept. Instead
14383 register an event loop source on the listen socket file
14384 descriptor. Refactor bits into ...
14385 (listen_desc): ... this new global.
14386 (gdb_connected): ... this new function.
14387 (enable_async_notification): ... this new function.
14388 (handle_accept_event): ... this new function.
14389 (remote_close): Clear remote_desc.
14391 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14393 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14395 (mourn_inferior): Define.
14396 (target_process_qsupported): Avoid the dangling else problem.
14397 (thread_stopped): Define.
14398 (pause_all): Define.
14399 (target_waitstatus_to_string): Declare.
14400 * target.c (target_waitstatus_to_string): New.
14402 * tracepoint.c (tracing): Make extern.
14403 (disconnected_tracing): New.
14404 (stop_tracing): Make extern. Handle tracing stops due to GDB
14406 (cmd_qtdisconnected): New.
14407 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14408 (handle_tracepoint_general_set): Handle QTDisconnected.
14410 * event-loop.c (event_handler_func): Change return type to int.
14411 (process_event): Bail out if the event handler wants the event
14413 (handle_file_event): Ditto.
14414 (start_event_loop): Bail out if the event handler wants the event
14417 * nto-low.c (nto_target_ops): Adjust.
14418 * spu-low.c (spu_wait): Don't remove the process here.
14419 (spu_target_ops): Adjust.
14420 * win32-low.c (win32_wait): Don't remove the process here.
14421 (win32_target_ops): Adjust.
14423 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14425 * regcache.c (realloc_register_cache): Invalidate inferior's
14426 regcache before recreating it.
14428 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14430 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14432 2010-04-09 Stan Shebs <stan@codesourcery.com>
14433 Pedro Alves <pedro@codesourcery.com>
14435 * server.h (LONGEST): New.
14436 (struct thread_info) <while_stepping>: New field.
14437 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14439 (initialize_tracepoint, handle_tracepoint_general_set)
14440 (handle_tracepoint_query, tracepoint_finished_step)
14441 (tracepoint_was_hit, release_while_stepping_state_list):
14442 (current_traceframe): Declare.
14443 * server.c (handle_general_set): Handle tracepoint packets.
14444 (read_memory): New.
14445 (write_memory): New.
14446 (handle_search_memory_1): Use read_memory.
14447 (handle_query): Report support for conditional tracepoints, trace
14448 state variables, and tracepoint sources. Handle tracepoint
14450 (main): Initialize the tracepoints module.
14451 (process_serial_event): Handle traceframe reads/writes.
14453 * linux-low.c (handle_tracepoints): New.
14454 (linux_wait_1): Call it.
14455 (linux_resume_one_lwp): Handle while-stepping.
14456 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14457 (linux_target_ops): Install them.
14458 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14460 * linux-x86-low.c (x86_supports_tracepoints): New.
14461 (the_low_target). Install it.
14463 * mem-break.h (delete_breakpoint): Declare.
14464 * mem-break.c (delete_breakpoint): Make external.
14466 * target.h (struct target_ops): Add `supports_tracepoints',
14467 `read_pc', and `write_pc' fields.
14468 (target_supports_tracepoints): Define.
14469 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14472 * regcache.h (struct regcache) <registers_owned>: New field.
14473 (init_register_cache, regcache_cpy): Declare.
14474 (regcache_read_pc, regcache_write_pc): Declare.
14475 (register_cache_size): Declare.
14476 (supply_regblock): Declare.
14477 * regcache.c (init_register_cache): New.
14478 (new_register_cache): Use it.
14479 (regcache_cpy): New.
14480 (register_cache_size): New.
14481 (supply_regblock): New.
14482 (regcache_read_pc, regcache_write_pc): New.
14484 * tracepoint.c: New.
14486 * Makefile.in (OBS): Add tracepoint.o.
14487 (tracepoint.o): New rule.
14489 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14491 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14493 (i386-mmx.c): Likewise.
14494 (i386-mmx-linux.o): Likewise.
14495 (i386-mmx-linux.c): Likewise.
14497 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14498 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14499 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14500 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14502 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14503 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14504 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14506 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14508 * Makefile.in (clean): Updated.
14510 (i386-avx.c): Likewise.
14511 (i386-avx-linux.o): Likewise.
14512 (i386-avx-linux.c): Likewise.
14513 (amd64-avx.o): Likewise.
14514 (amd64-avx.c): Likewise.
14515 (amd64-avx-linux.o): Likewise.
14516 (amd64-avx-linux.c): Likewise.
14518 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14519 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14520 (srv_amd64_regobj): Add amd64-avx.o.
14521 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14522 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14523 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14524 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14525 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14526 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14527 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14529 * i387-fp.c: Include "i386-xstate.h".
14531 (i387_cache_to_xsave): Likewise.
14532 (i387_xsave_to_cache): Likewise.
14533 (x86_xcr0): Likewise.
14535 * i387-fp.h (i387_cache_to_xsave): Likewise.
14536 (i387_xsave_to_cache): Likewise.
14537 (x86_xcr0): Likewise.
14539 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
14540 * linux-crisv32-low.c (target_regsets): Likewise.
14541 * linux-m68k-low.c (target_regsets): Likewise.
14542 * linux-mips-low.c (target_regsets): Likewise.
14543 * linux-ppc-low.c (target_regsets): Likewise.
14544 * linux-s390-low.c (target_regsets): Likewise.
14545 * linux-sh-low.c (target_regsets): Likewise.
14546 * linux-sparc-low.c (target_regsets): Likewise.
14547 * linux-xtensa-low.c (target_regsets): Likewise.
14549 * linux-low.c: Include <sys/uio.h>.
14550 (regsets_fetch_inferior_registers): Support nt_type.
14551 (regsets_store_inferior_registers): Likewise.
14552 (linux_process_qsupported): New.
14553 (linux_target_ops): Add linux_process_qsupported.
14555 * linux-low.h (regset_info): Add nt_type.
14556 (linux_target_ops): Add process_qsupported.
14558 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
14560 (init_registers_i386_avx_linux): New.
14561 (init_registers_amd64_avx_linux): Likewise.
14562 (xmltarget_i386_linux_no_xml): Likewise.
14563 (xmltarget_amd64_linux_no_xml): Likewise.
14564 (PTRACE_GETREGSET): Likewise.
14565 (PTRACE_SETREGSET): Likewise.
14566 (x86_fill_xstateregset): Likewise.
14567 (x86_store_xstateregset): Likewise.
14568 (use_xml): Likewise.
14569 (x86_linux_update_xmltarget): Likewise.
14570 (x86_linux_process_qsupported): Likewise.
14571 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
14572 (x86_arch_setup): Don't call init_registers_amd64_linux nor
14573 init_registers_i386_linux here. Call
14574 x86_linux_update_xmltarget.
14575 (the_low_target): Add x86_linux_process_qsupported.
14577 * server.c (handle_query): Call target_process_qsupported.
14579 * target.h (target_ops): Add process_qsupported.
14580 (target_process_qsupported): New.
14582 2010-04-03 Pedro Alves <pedro@codesourcery.com>
14584 * inferiors.c (add_thread): Set last_status kind to
14585 TARGET_WAITKIND_IGNORE.
14586 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
14587 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
14588 (linux_wait_1): Move `thread' local definition to block that uses
14589 it. Don't NULL initialize `event_child'.
14590 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
14591 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
14592 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
14594 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14596 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
14597 an extended waitstatus, or by a watchpoint.
14598 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
14599 thread was stepping or has been stopped by a watchpoint.
14601 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14603 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
14604 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
14605 of another, then delete the previous, and validate all
14607 (validate_inserted_breakpoint): New.
14608 (delete_disabled_breakpoints): New.
14609 (validate_breakpoints): New.
14610 (check_mem_read): Validate breakpoints before trusting their
14611 shadow. Delete disabled breakpoints.
14612 (check_mem_write): Validate breakpoints before trusting they
14613 should be inserted. Delete disabled breakpoints.
14614 * mem-break.h (validate_breakpoints):
14615 * server.c (handle_query): Validate breakpoints when we see a
14618 2010-04-01 Pedro Alves <pedro@codesourcery.com>
14620 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
14621 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
14622 if we could tell there's a GDB breakpoint at stop_pc.
14623 (need_step_over_p): Don't do a step over if we find a GDB
14624 breakpoint at the resume PC.
14626 * mem-break.c (struct raw_breakpoint): New.
14627 (enum bkpt_type): New type `gdb_breakpoint'.
14628 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
14629 fields. New field `raw'.
14630 (find_raw_breakpoint_at): New.
14631 (set_raw_breakpoint_at): Handle refcounting. Create a raw
14632 breakpoint instead.
14633 (set_breakpoint_at): Adjust.
14634 (delete_raw_breakpoint): New.
14635 (release_breakpoint): New.
14636 (delete_breakpoint): Rename to...
14637 (delete_breakpoint_1): ... this. Add proc parameter. Use
14638 release_breakpoint. Return ENOENT.
14639 (delete_breakpoint): Reimplement.
14640 (find_breakpoint_at): Delete.
14641 (find_gdb_breakpoint_at): New.
14642 (delete_breakpoint_at): Delete.
14643 (set_gdb_breakpoint_at): New.
14644 (delete_gdb_breakpoint_at): New.
14645 (gdb_breakpoint_here): New.
14646 (set_reinsert_breakpoint): Use release_breakpoint.
14647 (uninsert_breakpoint): Rename to ...
14648 (uninsert_raw_breakpoint): ... this.
14649 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
14650 (reinsert_raw_breakpoint): Change parameter type to
14652 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
14654 (check_breakpoints): Adjust. Use release_breakpoint.
14655 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
14656 (breakpoint_inserted_here): Ditto.
14657 (check_mem_read): Adjust to iterate over raw breakpoints instead.
14658 Don't trust the breakpoint's shadow if it is not inserted.
14659 (check_mem_write): Adjust to iterate over raw breakpoints instead.
14660 (delete_all_breakpoints): Adjust.
14661 (free_all_breakpoints): Mark all breakpoints as uninserted, and
14662 use delete_breakpoint_1.
14664 * mem-break.h (breakpoints_supported): Delete declaration.
14665 (set_gdb_breakpoint_at): Declare.
14666 (gdb_breakpoint_here): Declare.
14667 (delete_breakpoint_at): Delete.
14668 (delete_gdb_breakpoint_at): Declare.
14670 * server.h (struct raw_breakpoint): Forward declare.
14671 (struct process_info): New field `raw_breakpoints'.
14673 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
14676 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14678 * linux-low.c (status_pending_p_callback): Fix comment.
14679 (linux_wait_for_event_1): Move most of the internal breakpoint
14680 handling from here...
14681 (linux_wait_1): ... to here.
14682 (count_events_callback): New.
14683 (select_singlestep_lwp_callback): New.
14684 (select_event_lwp_callback): New.
14685 (cancel_breakpoints_callback): New.
14686 (select_event_lwp): New.
14687 (linux_wait_1): Simplify internal breakpoint handling. Give equal
14688 priority to all LWPs that have had events that should be reported
14689 to the client. Cancel breakpoints when about to reporting the
14690 event to the client, not while stopping lwps. No longer cancel
14691 finished single-steps here.
14692 (cancel_finished_single_step): Delete.
14693 (cancel_finished_single_steps): Delete.
14695 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14697 * mem-break.c (enum bkpt_type): New.
14698 (struct breakpoint): New field `type'.
14699 (set_breakpoint_at): Change return type to struct breakpoint
14700 pointer. Set type to `other_breakpoint' by default.
14701 (delete_breakpoint): Rewrite, supporting more than one breakpoint
14702 in the breakpoint list.
14703 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
14704 (reinsert_breakpoint): Rename to ...
14705 (reinsert_raw_breakpoint): ... this.
14706 (reinsert_breakpoints_at): Adjust.
14707 * mem-break.h (struct breakpoint): Declare.
14708 (set_breakpoint_at): Change return type to struct breakpoint
14711 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14713 * server.c (handle_query): Assign, not compare.
14715 2010-03-24 Pedro Alves <pedro@codesourcery.com>
14717 Teach linux gdbserver to step-over-breakpoints.
14719 * linux-low.c (can_hardware_single_step): New.
14720 (supports_breakpoints): New.
14721 (handle_extended_wait): If stopping threads, read the stop pc of
14722 the new cloned LWP.
14724 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
14725 low target doesn't support retrieving the PC.
14726 (add_lwp): Set last_resume_kind to resume_continue.
14727 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
14728 (linux_attach): Don't clear stop_expected. Set the lwp's
14729 last_resume_kind to resume_stop.
14730 (linux_detach_one_lwp): Don't check for removed breakpoints.
14731 (check_removed_breakpoint): Delete.
14732 (status_pending_p): Rename to ...
14733 (status_pending_p_callback): ... this. Don't check for removed
14734 breakpoints. Don't consider threads that are stopped from GDB's
14736 (linux_wait_for_lwp): Always read the stop_pc here.
14737 (cancel_breakpoint): New.
14738 (step_over_bkpt): New global.
14739 (linux_wait_for_event_1): Implement stepping over breakpoints.
14740 (gdb_wants_lwp_stopped): New.
14741 (gdb_wants_all_stopped): New.
14742 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
14743 single-step traps here. Store the thread's last reported target
14745 (send_sigstop): Don't clear stop_expected. Always set it,
14747 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14748 (cancel_finished_single_step): New.
14749 (cancel_finished_single_steps): New.
14750 (wait_for_sigstop): Don't cancel finished single-step traps here.
14751 (linux_resume_one_lwp): Don't check for removed breakpoints.
14752 Don't set `step' on non-hardware step archs.
14753 (linux_set_resume_request): Ignore resume_stop requests if already
14754 stopping or stopped. Set the lwp's last_resume_kind.
14755 (resume_status_pending_p): Don't check for removed breakpoints.
14756 (need_step_over_p): New.
14757 (start_step_over): New.
14758 (finish_step_over): New.
14759 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14760 requests. Clear the thread's last reported target waitstatus.
14761 Don't use the `suspended' flag. Don't consider pending breakpoints.
14762 (linux_resume): Start a step-over if necessary.
14763 (proceed_one_lwp): New.
14764 (proceed_all_lwps): New.
14765 (unstop_all_lwps): New.
14766 * linux-low.h (struct lwp_info): Rewrite comment for the
14767 `suspended' flag. Add the `stop_pc' field. Delete the
14768 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14769 Add `'last_resume_kind' and `need_step_over' fields.
14770 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14771 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14772 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14773 (set_raw_breakpoint_at): New.
14774 (set_breakpoint_at): Rewrite to use it.
14775 (reinsert_breakpoint_handler): Delete.
14776 (set_reinsert_breakpoint): New.
14777 (reinsert_breakpoint_by_bp): Delete.
14778 (delete_reinsert_breakpoints): New.
14779 (uninsert_breakpoint): Rewrite.
14780 (uninsert_breakpoints_at): New.
14781 (reinsert_breakpoint): Rewrite.
14782 (reinsert_breakpoints_at): New.
14783 (check_breakpoints): Rewrite.
14784 (breakpoint_here): New.
14785 (breakpoint_inserted_here): New.
14786 (check_mem_read): Adjust.
14787 * mem-break.h (breakpoints_supported, breakpoint_here)
14788 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14789 (reinsert_breakpoint_by_bp): Delete declaration.
14790 (delete_reinsert_breakpoints): Declare.
14791 (reinsert_breakpoint): Delete declaration.
14792 (reinsert_breakpoints_at): Declare.
14793 (uninsert_breakpoint): Delete declaration.
14794 (uninsert_breakpoints_at): Declare.
14795 (check_breakpoints): Adjust prototype.
14796 * server.h: Adjust include order.
14797 (struct thread_info): Declare here. Add a `last_status' field.
14799 2010-03-23 Michael Snyder <msnyder@vmware.com>
14801 * server.c (crc32): New function.
14802 (handle_query): Add handling for 'qCRC:' request.
14804 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14806 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14807 lwp had been stopped by a watchpoint.
14809 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14811 * server.h (internal_error): Declare.
14812 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14813 * utils.c (internal_error): New function.
14815 2010-03-15 Andreas Schwab <schwab@redhat.com>
14817 * configure.srv: Fix typo setting srv_regobj.
14819 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14821 * linux-low.c (fetch_register): Avoid passing a non string literal
14823 (usr_store_inferior_registers): Ditto.
14825 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14827 * linux-low.c (linux_write_memory): Bail out early if peeking
14830 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14832 * linux-low.h (struct lwp_info): New fields
14833 `stopped_by_watchpoint' and `stopped_data_address'.
14834 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14835 here, and cache them in the lwp object.
14836 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14838 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14840 (linux_stopped_by_watchpoint): Rewrite.
14841 (linux_stopped_data_address): Rewrite.
14843 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14845 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14846 switching the current inferior, not before.
14848 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14850 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14851 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14852 i386-linux.c and amd64-linux.c.
14853 (reg-i386.o): Removed.
14854 (reg-i386.c): Likewise.
14855 (reg-i386-linux.o): Likewise.
14856 (reg-i386-linux.c): Likewise.
14857 (reg-x86-64.o): Likewise.
14858 (reg-x86-64.c): Likewise.
14859 (reg-x86-64-linux.o): Likewise.
14860 (reg-x86-64-linux.c): Likewise.
14862 (i386.c): Likewise.
14863 (i386-linux.o): Likewise.
14864 (i386-linux.c): Likewise.
14865 (amd64.o): Likewise.
14866 (amd64.c): Likewise.
14867 (amd64-linux.o): Likewise.
14868 (amd64-linux.c): Likewise.
14870 * configure.srv (srv_i386_regobj): New.
14871 (srv_i386_linux_regobj): Likewise.
14872 (srv_amd64_regobj): Likewise.
14873 (srv_amd64_linux_regobj): Likewise.
14874 (srv_i386_32bit_xmlfiles): Likewise.
14875 (srv_i386_64bit_xmlfiles): Likewise.
14876 (srv_i386_xmlfiles): Likewise.
14877 (srv_amd64_xmlfiles): Likewise.
14878 (srv_i386_linux_xmlfiles): Likewise.
14879 (srv_amd64_linux_xmlfiles): Likewise.
14880 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14881 srv_xmlfiles to $srv_i386_xmlfiles.
14882 (i[34567]86-*-mingw32ce*): Likewise.
14883 (i[34567]86-*-mingw*): Likewise.
14884 (i[34567]86-*-nto*): Likewise.
14885 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14886 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14887 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14888 (x86_64-*-linux*): Likewise.
14890 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14891 (init_registers_amd64_linux): New.
14892 (x86_arch_setup): Replace init_registers_x86_64_linux with
14893 init_registers_amd64_linux.
14895 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14897 * configure.ac: Check for libdl. If it is not available link against
14898 static libthread_db.
14899 * configure: Regenerate.
14901 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14905 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14906 handing a read watchpoint.
14907 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14909 2010-02-12 Doug Evans <dje@google.com>
14911 * linux-low.c (linux_supports_tracefork_flag): Document.
14912 (linux_look_up_symbols): Add comment.
14914 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14916 * regcache.c (supply_register): Clear regcache if buf is NULL.
14918 2010-02-02 Nicolas Roche <roche@sourceware.org>
14919 Joel Brobecker <brobecker@adacore.com>
14921 * inferiors.c (find_inferior): Add function documentation.
14922 (unloaded_dll): Handle the case where the unloaded dll has not
14923 been previously registered in the dll list.
14925 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14927 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14928 (thumb2_breakpoint): New.
14929 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14931 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14933 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14934 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14937 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14939 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14941 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14943 * linux-s390-low.c (s390_collect_ptrace_register)
14944 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14946 2010-01-21 Doug Evans <dje@google.com>
14948 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14949 (PTRACE_ARG4_TYPE): New macro.
14950 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14951 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14952 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14953 (usr_store_inferior_registers): Ditto.
14954 (linux_read_memory, linux_write_memory): Ditto.
14955 (linux_test_for_tracefork): Ditto.
14957 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14958 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14960 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14962 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14965 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14967 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14968 prototype to take a regcache. Adjust.
14970 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14972 * regcache.h (struct thread_info): Forward declare.
14973 (struct regcache): New.
14974 (new_register_cache): Adjust prototype.
14975 (get_thread_regcache): Declare.
14976 (free_register_cache): Adjust prototype.
14977 (registers_to_string, registers_from_string): Ditto.
14978 (supply_register, supply_register_by_name, collect_register)
14979 (collect_register_as_string, collect_register_by_name): Ditto.
14980 * regcache.c (struct inferior_regcache_data): Delete.
14981 (get_regcache): Rename to ...
14982 (get_thread_regcache): ... this. Adjust. Switch inferior before
14983 fetching registers.
14984 (regcache_invalidate_one): Adjust.
14985 (regcache_invalidate): Fix prototype.
14986 (new_register_cache): Return the new register cache.
14987 (free_register_cache): Change prototype.
14988 (realloc_register_cache): Adjust.
14989 (registers_to_string): Change prototype to take a regcache. Adjust.
14990 (registers_from_string): Ditto.
14991 (register_data): Ditto.
14992 (supply_register): Ditto.
14993 (supply_register_by_name): Ditto.
14994 (collect_register): Ditto.
14995 (collect_register_as_string): Ditto.
14996 (collect_register_by_name): Ditto.
14997 * server.c (process_serial_event): Adjust.
14998 * linux-low.h (regset_fill_func, regset_store_func): Change
15000 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15002 * linux-low.c (get_stop_pc): Adjust.
15003 (check_removed_breakpoint): Adjust.
15004 (linux_wait_for_event): Adjust.
15005 (linux_resume_one_lwp): Adjust.
15006 (fetch_register): Add regcache parameter. Adjust.
15007 (usr_store_inferior_registers): Ditto.
15008 (regsets_fetch_inferior_registers): Ditto.
15009 (regsets_store_inferior_registers): Ditto.
15010 (linux_fetch_registers, linux_store_registers): Ditto.
15011 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15013 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15015 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15016 prototype to take a regcache.
15017 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15018 * remote-utils.c (convert_ascii_to_int, outreg)
15019 (prepare_resume_reply): Change prototype to take a regcache.
15021 * target.h (struct target_ops) <fetch_registers, store_registers>:
15022 Change prototype to take a regcache.
15023 (fetch_inferior_registers, store_inferior_registers): Change
15024 prototype to take a regcache. Adjust.
15025 * proc-service.c (ps_lgetregs): Adjust.
15026 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15027 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15028 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15029 take a regcache. Adjust.
15030 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15031 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15032 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15033 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15034 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15035 (cris_cannot_fetch_register):
15036 (cris_breakpoint_at): Change prototype to take a regcache.
15038 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15039 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15040 to take a regcache. Adjust.
15041 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15043 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15044 take a regcache. Adjust.
15045 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15046 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15047 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15048 * linux-mips-low.c (mips_get_pc):
15049 (mips_set_pc): Change prototype to take a regcache. Adjust.
15050 (mips_reinsert_addr): Adjust.
15051 (mips_collect_register): Change prototype to take a regcache.
15053 (mips_supply_register):
15054 (mips_collect_register_32bit, mips_supply_register_32bit)
15055 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15056 (mips_store_fpregset): Ditto.
15057 * linux-ppc-low.c (ppc_supply_ptrace_register)
15058 (ppc_supply_ptrace_register): Ditto.
15059 (parse_spufs_run): Adjust.
15060 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15061 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15062 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15063 take a regcache. Adjust.
15064 * linux-s390-low.c (s390_collect_ptrace_register)
15065 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15066 (s390_set_pc): Change prototype to take a regcache. Adjust.
15067 (s390_arch_setup): Adjust.
15068 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15069 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15070 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15071 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15072 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15074 (sparc_breakpoint_at): Adjust.
15075 * linux-xtensa-low.c (xtensa_fill_gregset):
15076 (xtensa_store_gregset):
15077 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15078 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15079 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15080 prototype to take a regcache. Adjust.
15081 * win32-arm-low.c (arm_fetch_inferior_register)
15082 (arm_store_inferior_register): Change prototype to take a
15084 * win32-i386-low.c (i386_fetch_inferior_register)
15085 (i386_store_inferior_register): Change prototype to take a
15087 * win32-low.c (child_fetch_inferior_registers)
15088 (child_store_inferior_registers): Change prototype to take a
15090 (win32_wait): Adjust.
15091 (win32_fetch_inferior_registers): Change prototype to take a
15093 (win32_store_inferior_registers): Adjust.
15094 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15095 store_inferior_register>: Change prototype to take a regcache.
15097 2010-01-20 Doug Evans <dje@google.com>
15099 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15101 (linux_wait_for_event1, linux_init_signals): Ditto.
15102 (W_STOPCODE): Provide definition if missing.
15104 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15106 * linux-low.c (linux_core_of_thread): New.
15107 (compare_ints, show_process, list_threads): New.
15108 (linux_qxfer_osdata): Report threads and cores.
15109 (linux_target_op): Register linux_core_of_thread.
15110 * remote-utils.c (prepare_resume_reply): Report the core.
15111 (buffer_xml_printf): Support %d specifier.
15112 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15114 (handle_query): Handle qXfer:threads. Announce availability
15116 * target.h (struct target_ops): New field core_of_thread.
15118 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15120 * Makefile.in (clean): Remove new generated files.
15121 (reg-s390.o, reg-s390.c): Remove rules.
15122 (reg-s390x.o, reg-s390x.c): Likewise.
15123 (s390-linux32.o, s390-linux32.c): Add rules.
15124 (s390-linux64.o, s390-linux64.c): Likewise.
15125 (s390x-linux64.o, s390x-linux64.c): Likewise.
15126 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15127 * linux-s390-low.c: Include <elf.h>.
15128 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15129 (init_registers_s390): Remove prototype.
15130 (init_registers_s390x): Likewise.
15131 (init_registers_s390_linux32): Add prototype.
15132 (init_registers_s390_linux64): Likewise.
15133 (init_registers_s390x_linux64): Likewise.
15134 (s390_num_regs_3264): New define.
15135 (s390_regmap_3264): New global variable.
15136 (s390_cannot_fetch_register): Remove obsolete check.
15137 (s390_cannot_store_register): Likewise.
15138 (s390_collect_ptrace_register): Handle upper/lower register halves.
15139 (s390_supply_ptrace_register): Likewise.
15140 (s390_fill_gregset): Update to register number changes.
15141 (s390_get_hwcap): New routine.
15142 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15143 Install appropriate regmap and register set.
15145 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15147 * server.c (gdbserver_version): Update copyright year to 2010.
15148 * gdbreplay.c (gdbreplay_version): Likewise.
15150 2009-12-28 Doug Evans <dje@google.com>
15152 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15153 elf/external.h. Include <elf.h> instead but only if necessary.
15155 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15157 * linux-low.c (linux_remove_process): Remove `detaching'
15158 parameter. Don't release/detach from thread_db here.
15159 (linux_kill): Release/detach from thread_db here, ...
15160 (linux_detach): ... and here, before actually detaching.
15161 (linux_wait_1): ... and here, when a process exits.
15162 * thread-db.c (any_thread_of): New.
15163 (thread_db_free): Switch the current inferior to a thread of the
15166 2009-12-21 Doug Evans <dje@google.com>
15168 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15170 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15171 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15172 warning ifndef __NR_tkill. Move setting of errno there too.
15173 Delete unnecessary resetting of errno after syscall.
15174 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15176 * configure.ac: Check for dladdr.
15177 * config.in: Regenerate.
15178 * configure: Regenerate.
15179 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15180 (try_thread_db_load): Update.
15182 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15184 2009-12-18 Doug Evans <dje@google.com>
15186 * event-loop.c: Include unistd.h if it exists.
15188 * linux-low.c (my_waitpid): Move definition away from being in
15189 between linux_tracefork_child/linux_test_for_tracefork.
15191 * gdb_proc_service.h (psaddr_t): Fix type.
15192 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15193 signature to match glibc.
15195 2009-12-16 Doug Evans <dje@google.com>
15197 * linux-low.c (linux_read_memory): Fix argument to read.
15199 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15201 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15202 events, don't leave current_inferior pointing at null.
15204 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15206 * win32-low.c (LOG): Delete.
15207 (OUTMSG): Output to stderr.
15208 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15209 on compile time LOG macro.
15210 (win32_wait): Fix debug output.
15212 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15214 * win32-low.c (win32_add_one_solib): If the dll name is
15215 "ntdll.dll", prepend the system directory to the dll path.
15217 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15219 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15221 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15222 Vladimir Prus <vladimir@codesourcery.com>
15224 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15225 * configure.ac: Check for __mcoldfire__ and set
15226 gdb_cv_m68k_is_coldfire.
15227 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15228 reg-cf.o and reg-m68k.o.
15229 * configure: Regenerated.
15231 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15233 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15234 Pass it to thread_db_free.
15235 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15236 proper `detaching' argument to linux_remove_process.
15237 * linux-low.h (thread_db_free): Add `detaching' parameter.
15238 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15240 (thread_db_free): Add `detaching' parameter. Only
15241 call td_ta_clear_event if detaching from process.
15243 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15245 * thread-db.c (thread_db_free): Fix typo.
15247 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15250 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15252 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15254 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15255 with an i686 compiler.
15256 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15258 * configure: Rebuilt.
15260 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15264 * server.c (handle_search_memory_1): Correct read_addr initialization
15265 in loop for searching subsequent chunks.
15267 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15269 * configure.ac: New --with-libthread-db option.
15270 * thread-db.c: Allow direct dependence on libthread_db.
15271 (thread_db_free): Adjust.
15272 * config.in: Regenerate.
15273 * configure: Likewise.
15275 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15278 * thread-db.c (attach_thread): New function.
15279 (maybe_attach_thread): Return success/failure.
15280 (find_new_threads_callback): Adjust.
15281 (thread_db_find_new_threads): Loop until no new threads.
15283 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15285 * proc-service.c (ps_lgetregs): Formatting.
15287 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15289 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15290 * configure.ac: Adjust.
15291 * linux-low.h (struct process_info_private): Move members to struct
15293 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15294 * linux-low.c (linux_remove_process): Adjust.
15295 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15296 * server.c (handle_query): Move code ...
15297 (handle_monitor_command): ... here. New function.
15298 * target.h (struct target_ops): New member.
15299 * thread-db.c (struct thread_db): New.
15300 (libthread_db_search_path): New variable.
15301 (thread_db_create_event, thread_db_enable_reporting)
15302 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15303 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15304 (try_thread_db_load_1, dladdr_to_soname): New functions.
15305 (try_thread_db_load, thread_db_load_search): New functions.
15306 (thread_db_init): Search for libthread_db.
15307 (thread_db_free): New function.
15308 (thread_db_handle_monitor_command): Likewise.
15309 * config.in: Regenerate.
15310 * configure: Regenerate.
15312 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15314 * spu-low.c (spu_kill): Wait for inferior to terminate.
15315 Call clear_inferiors.
15316 (spu_detach): Call clear_inferiors.
15318 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15320 * aclocal.m4: Regenerate.
15321 * config.in: Likewise.
15322 * configure: Likewise.
15324 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15326 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15327 (parse_spufs_run): New function.
15328 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15329 (ppc_breakpoint_at): Handle SPU breakpoints.
15331 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15333 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15334 (SPUFS_MAGIC): Define.
15335 (spu_enumerate_spu_ids): New function.
15336 (linux_qxfer_spu): New function.
15337 (linux_target_ops): Install linux_qxfer_spu.
15339 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15341 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15342 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15343 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15344 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15345 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15346 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15347 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15348 (init_registers_powerpc_cell32l): Add prototype.
15349 (init_registers_powerpc_cell64l): Likewise.
15350 (ppc_arch_setup): Detect Cell/B.E. architecture.
15352 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15354 * Makefile.in (datarootdir): New variable.
15356 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15358 * linux-low.c (linux_write_memory): Update debugging output.
15359 * Makefile.in (clean): Add new descriptions.
15360 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15361 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15362 * configure.srv: Add new files for arm*-*-linux*.
15363 * linux-arm-low.c: Add new declarations.
15364 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15365 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15366 (HWCAP_VFPv3D16): New.
15367 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15368 instead of __IWMMXT__.
15369 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15370 (arm_arch_setup): New.
15371 (target_regsets): Remove #ifdef. Add VFP regset.
15372 (the_low_target): Use arm_arch_setup.
15374 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15376 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15377 the main thread again.
15379 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15381 Adding Neutrino gdbserver.
15382 * configure: Regenerated.
15383 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15384 * configure.srv (i[34567]86-*-nto*): New target.
15385 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15386 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15387 (nto_comctrl) [__QNX__]: New function.
15388 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15390 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15392 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15395 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15396 Pedro Alves <pedro@codesourcery.com>
15398 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15399 don't support CONTEXT_EXTENDED_REGISTERS.
15400 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15401 (the_low_target): Install them.
15402 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15403 failing with ERROR_PIPE_NOT_CONNECTED.
15405 2009-06-30 Doug Evans <dje@google.com>
15406 Pierre Muller <muller@ics.u-strasbg.fr>
15408 Add h/w watchpoint support to x86-linux, win32-i386.
15409 * Makefile.in (SFILES): Add i386-low.c
15410 (i386_low_h): Define.
15411 (i386-low.o): Add dependencies.
15412 (linux-x86-low.o): Add i386-low.h dependency.
15413 (win32-i386-low.o): Ditto.
15414 * i386-low.c: New file.
15415 * i386-low.h: New file.
15416 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15417 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15418 * linux-low.c (linux_add_process): Initialize arch_private.
15419 (linux_remove_process): Free arch_private.
15420 (add_lwp): Initialize arch_private.
15421 (delete_lwp): Free arch_private.
15422 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15424 * linux-low.h (process_info_private): New member arch_private.
15425 (lwp_info): New member arch_private.
15426 (linux_target_ops): New members new_process, new_thread,
15428 (ptid_of): New macro.
15429 * linux-x86-low.c: Include stddef.h, i386-low.h.
15430 (arch_process_info): New struct.
15431 (arch_lwp_info): New struct.
15432 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15433 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15434 (i386_dr_low_get_status): New function.
15435 (x86_insert_point, x86_remove_point): New functions.
15436 (x86_stopped_by_watchpoint): New function.
15437 (x86_stopped_data_address): New function.
15438 (x86_linux_new_process, x86_linux_new_thread): New functions.
15439 (x86_linux_prepare_to_resume): New function.
15440 (the_low_target): Add entries for insert_point, remove_point,
15441 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15443 * server.c (debug_hw_points): New global.
15444 (monitor_show_help): Document set debug-hw-points.
15445 (handle_query): Process "set debug-hw-points".
15446 * server.h (debug_hw_points): Declare.
15447 (paddress): Declare.
15448 * utils.c (NUMCELLS, CELLSIZE): New macros.
15449 (get_sell, xsnprintf, paddress): New functions.
15450 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15451 remove_point, stopped_by_watchpoint, stopped_data_address.
15452 * win32-i386-low.c: Include i386-low.h.
15453 (debug_reg_state): Replaces dr.
15454 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15455 (i386_dr_low_get_status): New function.
15456 (i386_insert_point, i386_remove_point): New functions.
15457 (i386_stopped_by_watchpoint): New function.
15458 (i386_stopped_data_address): New function.
15459 (i386_initial_stuff): Update.
15460 (get_thread_context,set_thread_context,i386_thread_added): Update.
15461 (the_low_target): Add entries for insert_point,
15462 remove_point, stopped_by_watchpoint, stopped_data_address.
15463 * win32-low.c (win32_insert_watchpoint): New function.
15464 (win32_remove_watchpoint): New function.
15465 (win32_stopped_by_watchpoint): New function.
15466 (win32_stopped_data_address): New function.
15467 (win32_target_ops): Add entries for insert_watchpoint,
15468 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15469 * win32-low.h (win32_target_ops): New members insert_point,
15470 remove_point, stopped_by_watchpoint, stopped_data_address.
15472 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15474 * server.c (process_serial_event): Re-return unsupported, not
15475 error, if the type isn't recognized. Re-allow supporting only
15476 insert or remove packets. Also call require_running for
15477 breakpoints. Add missing break statement to default case. Tidy.
15478 * target.h (struct target_ops): Rename insert_watchpoint to
15479 insert_point, and remove_watchpoint to remove_point.
15481 * linux-low.h (struct linux_target_ops): Likewise.
15482 * linux-low.c (linux_insert_watchpoint): Rename to ...
15483 (linux_insert_point): ... this. Adjust.
15484 (linux_remove_watchpoint): Rename to ...
15485 (linux_remove_point): ... this. Adjust.
15486 (linux_target_ops): Adjust.
15487 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15488 (cris_insert_point): ... this.
15489 (cris_remove_watchpoint): Rename to ...
15490 (cris_remove_point): ... this.
15491 (the_low_target): Adjust.
15493 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15495 * server.c (handle_v_kill): Pass signal_pid to
15496 kill_inferior if multi_process is zero.
15498 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15500 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15501 * target.h (target_ops): Comment for *_watchpoint to make it clear
15502 the functions can get types '0' and '1'.
15504 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15506 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15507 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15508 * regcache.c (get_regcache): Likewise.
15509 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15510 * win32-low.c (child_fetch_inferior_registers): Remove check for
15513 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15514 Pedro Alves <pedro@codesourcery.com>
15516 * target.h (struct target_ops) <supports_multi_process>: New
15518 (target_supports_multi_process): New.
15519 * server.c (handle_query): Even if GDB reports support, only
15520 enable multi-process if the target also supports it. Report
15521 multi-process support only if the target backend supports it.
15522 * linux-low.c (linux_supports_multi_process): New function.
15523 (linux_target_ops): Install it as target_supports_multi_process
15526 2009-05-24 Doug Evans <dje@google.com>
15528 Global renaming of find_thread_pid to find_thread_ptid.
15529 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15530 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15531 All callers updated.
15533 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15534 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15537 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15538 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
15539 (linux_resume_one_lwp): Ditto.
15541 2009-05-23 Doug Evans <dje@google.com>
15543 * linux-low.c (linux_resume_one_lwp): Change type of first arg
15544 from struct inferior_list_entry * to struct lwp_info *.
15545 All callers updated.
15547 2009-05-13 Doug Evans <dje@google.com>
15549 * linux-x86-low.c: Don't include assert.h.
15550 (x86_siginfo_fixup): Use fatal, not assert.
15551 (x86_arch_setup): Fix comment.
15553 2009-05-12 Doug Evans <dje@google.com>
15555 Biarch support for i386/amd64 gdbserver.
15556 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
15557 Add linux-x86-low.c.
15558 (linux-i386-low.o, linux-x86-64-low.o): Delete.
15559 (linux-x86-low.o): Add.
15560 * linux-x86-64-low.c: Delete.
15561 * linux-i386-low.c: Delete.
15562 * linux-x86-low.c: New file.
15563 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
15565 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
15567 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
15568 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
15569 (linux_child_pid_to_exec_file): New function.
15570 (elf_64_header_p, elf_64_file_p): New functions.
15571 (siginfo_fixup): New function.
15572 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
15573 give target a chance to convert layout.
15574 * linux-low.h (linux_target_ops): New member siginfo_fixup.
15575 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
15577 2009-05-07 Doug Evans <dje@google.com>
15579 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
15580 (regsets_store_inferior_registers): Ditto.
15582 2009-05-06 Pedro Alves <pedro@codesourcery.com>
15586 * linux-low.c (must_set_ptrace_flags): Delete.
15587 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
15589 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
15590 `lwp->must_set_ptrace_flags' instead.
15591 (linux_wait_for_event_1): Set ptrace options here.
15592 (linux_wait_1): ... not here.
15594 2009-04-30 Doug Evans <dje@google.com>
15596 * inferiors.c (started_inferior_callback): New function.
15597 (attached_inferior_callback): New function.
15598 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
15599 * server.c (print_started_pid, print_attached_pid): New functions.
15600 (detach_or_kill_for_exit): New function.
15601 (main): Call it instead of for_each_inferior (kill_inferior_callback).
15602 * server.h (have_started_inferiors_p): Declare.
15603 (have_attached_inferiors_p): Declare.
15605 * inferiors.c (remove_process): Fix memory leak, free process.
15606 * linux-low.c (linux_remove_process): New function.
15607 (linux_kill): Call it instead of remove_process.
15608 (linux_detach, linux_wait_1): Ditto.
15610 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
15612 * configure.srv: Add x86 Windows CE target.
15614 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15616 * inferiors.c (get_thread_process): Make global.
15617 * server.h (get_thread_process): Add prototype.
15618 * thread-db.c (find_one_thread): Use get_thread_process
15619 instead of current_process.
15620 (thread_db_get_tls_address): Do not crash if called when
15621 thread layer is not yet initialized.
15623 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
15625 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
15626 * spu-low.c (current_tid): Rename to ...
15627 (current_ptid): ... this.
15628 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
15629 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
15630 ptid_get_lwp (current_ptid) instead of current_tid.
15631 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
15632 instead of current_tid. Use find_process_pid to verify pid
15633 argument is valid. Pass proper argument to remove_process.
15634 (spu_thread_alive): Compare current_ptid instead of current_tid.
15635 (spu_resume): Likewise.
15637 2009-04-02 Pedro Alves <pedro@codesourcery.com>
15639 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
15642 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15644 Implement the multiprocess extensions, and add linux multiprocess
15647 * server.h (ULONGEST): Declare.
15648 (struct ptid, ptid_t): New.
15649 (minus_one_ptid, null_ptid): Declare.
15650 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15651 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
15652 (struct inferior_list_entry): Change `id' type from unsigned from
15654 (struct sym_cache, struct breakpoint, struct
15655 process_info_private): Forward declare.
15656 (struct process_info): Declare.
15657 (current_process): Declare.
15658 (all_processes): Declare.
15659 (initialize_inferiors): Declare.
15660 (add_thread): Adjust to use ptid_t.
15661 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
15662 (add_process, remove_process, find_thread_pid): Declare.
15663 (find_inferior_id): Adjust to use ptid_t.
15664 (cont_thread, general_thread, step_thread): Change type to ptid_t.
15665 (multi_process): Declare.
15666 (push_event): Adjust to use ptid_t.
15667 (read_ptid, write_ptid): Declare.
15668 (prepare_resume_reply): Adjust to use ptid_t.
15669 (clear_symbol_cache): Declare.
15670 * inferiors.c (all_processes): New.
15671 (null_ptid, minus_one_ptid): New.
15672 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
15673 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
15674 (add_thread): Change unsigned long to ptid. Remove gdb_id
15676 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
15677 (gdb_id_to_thread): Rename to ...
15678 (find_thread_pid): ... this. Change unsigned long to ptid.
15679 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
15680 (loaded_dll, pull_pid_from_list): Adjust.
15681 (add_process, remove_process, find_process_pid)
15682 (get_thread_process, current_process, initialize_inferiors): New.
15683 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
15684 (struct target_waitstatus) <related_pid>: Ditto.
15685 (struct target_ops) <kill, detach>: Add `pid' argument. Change
15686 return type to int.
15687 (struct target_ops) <join>: Add `pid' argument.
15688 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
15689 (struct target_ops) <wait>: Add `ptid' field. Change return type
15691 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
15692 (mywait): Add `ptid' argument. Change return type to ptid_t.
15693 (target_pid_to_str): Declare.
15694 * target.c (set_desired_inferior): Adjust to use ptids.
15695 (mywait): Add new `ptid' argument. Adjust.
15696 (target_pid_to_str): New.
15697 * mem-break.h (free_all_breakpoints): Declare.
15698 * mem-break.c (breakpoints): Delelete.
15699 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
15700 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
15701 to use per-process breakpoint list.
15702 (free_all_breakpoints): New.
15703 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
15704 (symbol_cache, all_symbols_looked_up): Delete.
15706 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
15708 (prepare_resume_reply): Change ptid argument's type from unsigned
15709 long to ptid_t. Adjust. Implement W;process and X;process.
15710 (free_sym_cache, clear_symbol_cache): New.
15711 (look_up_one_symbol): Adjust to per-process symbol cache. *
15712 * server.c (cont_thread, general_thread, step_thread): Change type
15714 (attached): Delete.
15715 (multi_process): New.
15716 (last_ptid): Change type to ptid_t.
15717 (struct vstop_notif) <ptid>: Change type to ptid_t.
15718 (queue_stop_reply, push_event): Change `ptid' argument's type to
15720 (discard_queued_stop_replies): Add `pid' argument.
15721 (start_inferior): Adjust to use ptids. Adjust to mywait interface
15722 changes. Don't reference the `attached' global.
15723 (attach_inferior): Adjust to mywait interface changes.
15724 (handle_query): Adjust to use ptids. Parse GDB's qSupported
15725 features. Handle and report "multiprocess+". Handle
15727 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
15729 (handle_v_kill): New.
15730 (handle_v_stopped): Adjust to use target_pid_to_str.
15731 (handle_v_requests): Allow multiple attaches and runs when
15732 multiprocess extensions are in effect. Handle "vKill".
15733 (myresume): Adjust to use ptids.
15734 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
15735 (handle_status): Adjust to discard_queued_stop_replies interface
15737 (first_thread_of, kill_inferior_callback)
15738 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
15739 (main): Call initialize_inferiors. Adjust to use ptids, killing
15740 and detaching from all inferiors. Handle multiprocess packet
15742 * linux-low.h: Include gdb_proc_service.h.
15743 (struct process_info_private): New.
15744 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
15745 <lwpid_of>: Use ptid_get_lwp.
15746 (get_lwp_thread): Adjust.
15747 (struct lwp_info): Add `dead' member.
15748 (find_lwp_pid): Declare.
15749 * linux-low.c (thread_db_active): Delete.
15750 (new_inferior): Adjust comment.
15751 (inferior_pid): Delete.
15752 (linux_add_process): New.
15753 (handle_extended_wait): Adjust.
15754 (add_lwp): Change unsigned long to ptid.
15755 (linux_create_inferior): Add process to processes table. Adjust
15756 to use ptids. Don't set new_inferior here.
15757 (linux_attach_lwp): Rename to ...
15758 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15759 it. Adjust to use ptids.
15760 (linux_attach_lwp): New.
15761 (linux_attach): Add process to processes table. Don't set
15763 (struct counter): New.
15764 (second_thread_of_pid_p, last_thread_of_process_p): New.
15765 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15766 multiple processes.
15767 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15768 processes. Remove process from process table.
15769 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15770 to multiple processes.
15771 (any_thread_of): New.
15772 (linux_detach): Add `pid' argument, and handle it. Remove process
15773 from processes table.
15774 (linux_join): Add `pid' argument. Handle it.
15775 (linux_thread_alive): Change unsighed long argument to ptid_t.
15776 Consider dead lwps as not being alive.
15777 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15778 threads we're not interested in.
15779 (same_lwp, find_lwp_pid): New.
15780 (linux_wait_for_lwp): Change `pid' argument's type from int to
15782 (linux_wait_for_event): Rename to ...
15783 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15784 from int to ptid_t. Adjust.
15785 (linux_wait_for_event): New.
15786 (linux_wait_1): Add `ptid' argument. Change return type to
15787 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15788 that exit from the process table.
15789 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15791 (mark_lwp_dead): New.
15792 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15793 stopping all threads, mark its main lwp as dead.
15794 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15796 (fetch_register, usr_store_inferior_registers)
15797 (regsets_fetch_inferior_registers)
15798 (regsets_store_inferior_registers, linux_read_memory)
15799 (linux_write_memory): Inline `inferior_pid'.
15800 (linux_look_up_symbols): Adjust to use per-process
15801 `thread_db_active'.
15802 (linux_request_interrupt): Adjust to use ptids.
15803 (linux_read_auxv): Inline `inferior_pid'.
15804 (initialize_low): Don't reference thread_db_active.
15805 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15806 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15807 (ps_getpid): Return the pid of the current inferior.
15808 * thread-db.c (proc_handle, thread_agent): Delete.
15809 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15811 (find_one_thread): Change argument type to ptid_t. Adjust to
15813 (maybe_attach_thread): Adjust to per-process data and ptids.
15814 (thread_db_find_new_threads): Ditto.
15815 (thread_db_init): Ditto.
15816 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15817 processes table. Adjust to use ptids.
15818 (spu_kill, spu_detach): Adjust interface. Remove process from
15820 (spu_join, spu_thread_alive): Adjust interface.
15821 (spu_wait): Adjust interface. Remove process from processes
15822 table. Adjust to use ptids.
15823 * win32-low.c (current_inferior_tid): Delete.
15824 (current_inferior_ptid): New.
15825 (debug_event_ptid): New.
15826 (thread_rec): Take a ptid. Adjust.
15827 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15828 (child_delete_thread): Ditto.
15829 (do_initial_child_stuff): Add `attached' argument. Add process to
15831 (child_fetch_inferior_registers, child_store_inferior_registers):
15833 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15834 (win32_attach): Pass 1 to do_initial_child_stuff.
15835 (win32_kill): Adjust interface. Remove process from processes
15837 (win32_detach): Ditto.
15838 (win32_join): Adjust interface.
15839 (win32_thread_alive): Take a ptid.
15840 (win32_resume): Adjust to use ptids.
15841 (get_child_debug_event): Ditto.
15842 (win32_wait): Adjust interface. Remove exiting process from
15845 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15847 Non-stop mode support.
15849 * server.h (non_stop): Declare.
15850 (gdb_client_data, handler_func): Declare.
15851 (delete_file_handler, add_file_handler, start_event_loop):
15853 (handle_serial_event, handle_target_event, push_event)
15854 (putpkt_notif): Declare.
15855 * target.h (enum resume_kind): New.
15856 (struct thread_resume): Replace `step' field by `kind' field.
15857 (TARGET_WNOHANG): Define.
15858 (struct target_ops) <wait>: Add `options' argument.
15859 <supports_non_stop, async, start_non_stop>: New fields.
15860 (target_supports_non_stop, target_async): New.
15861 (start_non_stop): Declare.
15862 (mywait): Add `options' argument.
15863 * target.c (mywait): Add `options' argument. Print child exit
15864 notifications here.
15865 (start_non_stop): New.
15866 * server.c (non_stop, own_buf, mem_buf): New globals.
15867 (struct vstop_notif): New.
15868 (notif_queue): New global.
15869 (queue_stop_reply, push_event, discard_queued_stop_replies)
15870 (send_next_stop_reply): New.
15871 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15873 (attach_inferior): In non-stop mode, don't wait for the target
15875 (handle_general_set): Handle QNonStop.
15876 (handle_query): When handling qC, return the current general
15877 thread, instead of the first thread of the list.
15878 (handle_query): If the backend supports non-stop mode, include
15879 QNonStop+ in the qSupported query response.
15880 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15882 (handle_v_attach, handle_v_run): Handle non-stop mode.
15883 (handle_v_stopped): New.
15884 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15885 (myresume): Adjust to use resume_kind. Handle non-stop.
15886 (queue_stop_reply_callback): New.
15887 (handle_status): Handle non-stop mode.
15888 (main): Clear non_stop flag on reconnection. Use the event-loop.
15889 Refactor serial protocol handling from here ...
15890 (process_serial_event): ... to this new function. When GDB
15891 selects any thread, select one here. In non-stop mode, wait until
15892 GDB acks all pending events before exiting.
15893 (handle_serial_event, handle_target_event): New.
15894 * remote-utils.c (remote_open): Install remote_desc in the event
15896 (remote_close): Remove remote_desc from the event loop.
15897 (putpkt_binary): Rename to...
15898 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15899 (putpkt_binary): New as wrapper around putpkt_binary_1.
15900 (putpkt_notif): New.
15901 (prepare_resume_reply): In non-stop mode, don't change the
15903 * event-loop.c: New.
15904 * Makefile.in (OBJ): Add event-loop.o.
15905 (event-loop.o): New rule.
15907 * linux-low.h (pid_of): Moved here.
15909 (get_lwp_thread): Use lwpid_of.
15910 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15911 * linux-low.c (pid_of): Delete.
15912 (inferior_pid): Use lwpid_of.
15913 (linux_event_pipe): New.
15914 (target_is_async_p): New.
15916 (handle_extended_wait): Use lwpid_of.
15917 (add_lwp): Don't set lwpid field.
15918 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15919 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15920 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15921 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15922 first. Adjust to linux_wait_for_event interface changes. Use
15924 (linux_detach): Don't delete the main lwp here.
15925 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15926 (status_pending_p): Don't consider explicitly suspended lwps.
15927 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15928 pointer. Add OPTIONS argument. Change return type to int. Use
15929 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15930 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15931 pointer. Add status pointer argument. Return a pid instead of a
15932 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15933 changes. In non-stop mode, don't switch to a random thread.
15934 (linux_wait): Rename to...
15935 (linux_wait_1): ... this. Add target_options argument, and handle
15936 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15937 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15938 clean exit and signal exit code. Don't stop all threads in
15939 non-stop mode. In all-stop mode, only stop all threads when
15940 reporting a stop to GDB. Handle explicit thread stop requests.
15941 (async_file_flush, async_file_mark): New.
15943 (send_sigstop): Use lwpid_of.
15944 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15945 interface changes. In non-stop mode, don't switch to a random
15947 (linux_resume_one_lwp): Use lwpid_of.
15948 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15949 (linux_resume_one_thread): ... this. Handle resume_stop. In
15950 non-stop mode, don't look for pending flag in all threads.
15951 (resume_status_pending_p): Don't consider explicitly suspended
15953 (my_waitpid): Reimplement. Emulate __WALL.
15954 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15956 (sigchld_handler, linux_supports_non_stop, linux_async)
15957 (linux_start_non_stop): New.
15958 (linux_target_ops): Register linux_supports_non_stop, linux_async
15959 and linux_start_non_stop.
15960 (initialize_low): Install SIGCHLD handler.
15961 * thread-db.c (thread_db_create_event, find_one_thread)
15962 (thread_db_get_tls_address): Use lwpid_of.
15963 * win32-low.c (win32_detach): Adjust to use resume_kind.
15964 (win32_wait): Add `options' argument.
15965 * spu-low.c (spu_resume): Adjust to use resume_kind.
15966 (spu_wait): Add `options' argument.
15968 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15970 Decouple target code from remote protocol.
15972 * target.h (enum target_waitkind): New.
15973 (struct target_waitstatus): New.
15974 (struct target_ops) <wait>: Return an unsigned long. Take a
15975 target_waitstatus pointer instead of a char pointer.
15976 (mywait): Likewise.
15977 * target.c (mywait): Change prototype to return an unsigned long.
15978 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15979 * server.h (thread_from_wait, old_thread_from_wait): Delete
15981 (prepare_resume_reply): Change prototype to take a
15983 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15984 (last_status, last_ptid): New.
15985 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15986 pid instead of a signal.
15987 (attach_inferior): Remove "status" and "signal" parameters.
15989 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15991 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15992 (handle_v_requests, myresume): Remove "status" and "signal"
15993 parameters. Adjust.
15994 (handle_status): New.
15995 (main): Delete local `status'. Adjust.
15996 * remote-utils.c: Include target.h.
15997 (prepare_resume_reply): Change prototype to take a
15998 target_waitstatus. Adjust.
16000 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16002 * spu-low.c (spu_wait): Adjust.
16003 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16005 (win32_wait): Adjust.
16007 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16009 * target.h (struct thread_resume): Delete leave_stopped member.
16010 (struct target_ops): Add a `n' argument to the `resume' callback.
16011 * server.c (start_inferior): Adjust.
16012 (handle_v_cont, myresume): Adjust.
16013 * linux-low.c (check_removed_breakpoint): Adjust to resume
16014 interface change, and to removed leave_stopped field.
16015 (resume_ptr): Delete.
16016 (struct thread_resume_array): New.
16017 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16018 resume interface change.
16019 (linux_continue_one_thread, linux_queue_one_thread)
16020 (resume_status_pending_p): Check if the resume field is NULL
16021 instead of checking the leave_stopped member.
16022 (linux_resume): Adjust to the target resume interface change.
16023 * spu-low.c (spu_resume): Adjust to the target resume interface
16025 * win32-low.c (win32_detach, win32_resume): Ditto.
16027 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16029 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16031 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16033 (linux_continue_one_thread): Only preserve the stepping flag if
16034 there's a pending breakpoint.
16036 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16038 * server.c (main): After the inferior having exited, call
16039 remote_close before exiting gdbserver.
16041 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16043 Fix size of FPSCR in Power 7 processors.
16044 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16045 (PPC_FEATURE_HAS_DFP): New #define.
16046 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16049 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16051 * server.c (handle_query) Whitespace and formatting.
16053 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16055 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16056 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16057 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16058 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16059 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16060 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16061 Makefile.in, configure.ac: Fix whitespace throughout.
16062 * configure: Regenerate.
16064 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16066 * inferiors.c (find_inferior): Make it safe for the callback
16067 function to delete the currently iterated inferior.
16069 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16071 * Makefile.in (linuw_low_h): Move higher.
16072 (thread-db.o): Depend on $(linux_low_h).
16074 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16076 Rename "process" to "lwp" throughout.
16078 * linux-low.c (all_processes): Rename to...
16079 (all_lwps): ... this.
16080 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16081 (add_process): Rename to ...
16082 (add_lwp): ... this. Adjust.
16083 (linux_create_inferior): Adjust.
16084 (linux_attach_lwp): Adjust.
16085 (linux_attach): Adjust.
16086 (linux_kill_one_process): Rename to ...
16087 (linux_kill_one_lwp): ... this. Adjust.
16088 (linux_kill): Adjust.
16089 (linux_detach_one_process): Rename to ...
16090 (linux_detach_one_lwp): ... this. Adjust.
16091 (linux_detach): Adjust.
16092 (check_removed_breakpoint): Adjust.
16093 (status_pending_p): Adjust.
16094 (linux_wait_for_process): Rename to ...
16095 (linux_wait_for_lwp): ... this. Adjust.
16096 (linux_wait_for_event): Adjust.
16097 (send_sigstop): Adjust.
16098 (wait_for_sigstop): Adjust.
16099 (stop_all_processes): Rename to ...
16100 (stop_all_lwps): ... this.
16101 (linux_resume_one_process): Rename to ...
16102 (linux_resume_one_lwp): ... this. Adjust.
16103 (linux_set_resume_request, linux_continue_one_thread)
16104 (linux_queue_one_thread, resume_status_pending_p)
16105 (usr_store_inferior_registers, regsets_store_inferior_registers)
16106 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16108 * linux-low.h (get_process): Rename to ...
16109 (get_lwp): ... this. Adjust.
16110 (get_thread_process): Rename to ...
16111 (get_thread_lwp): ... this. Adjust.
16112 (get_process_thread): Rename to ...
16113 (get_lwp_thread): ... this. Adjust.
16114 (struct process_info): Rename to ...
16115 (struct lwp_info): ... this.
16116 (all_processes): Rename to ...
16117 (all_lwps): ... this.
16118 * proc-service.c (ps_lgetregs): Adjust.
16119 * thread-db.c (thread_db_create_event, find_one_thread)
16120 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16122 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16124 * server.c (handle_query): Handle "qAttached".
16126 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16128 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16129 GPLv3, update license URL.
16131 2009-03-01 Doug Evans <dje@google.com>
16133 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16134 (server_h): Add gdb_signals.h.
16135 (signals.o): Update.
16136 * server.h (target_signal_from_host,target_signal_to_host_p)
16137 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16139 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16141 * remote-utils.c (getpkt): Also generate remote-debug
16142 information if noack_mode is set.
16144 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16146 * server.c (handle_query): Report qXfer:siginfo:read and
16147 qXfer:siginfo:write as supported and handle them.
16148 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16149 * linux-low.c (linux_xfer_siginfo): New.
16150 (linux_target_ops): Set it.
16152 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16154 * server.c (gdbserver_usage): Mention --remote-debug.
16155 (main): Accept '--remote-debug' switch.
16157 2009-01-18 Doug Evans <dje@google.com>
16159 * regcache.c (new_register_cache): No need to check result of xcalloc.
16160 * server.c (handle_search_memory): Back out calls to xmalloc,
16161 result is checked and error is returned to user upon failure.
16162 (handle_query): Ditto. Add more checks for result of malloc.
16163 (handle_v_cont): Check result of malloc, report error back to
16165 (handle_v_run): Ditto. Call freeargv.
16166 * server.h (freeargv): Declare.
16167 * utils.c (freeargv): New fn.
16169 2009-01-15 Doug Evans <dje@google.com>
16171 * gdbreplay.c (perror_with_name): Make arg const char *.
16172 * server.h (target_signal_to_name): Make return type const char *.
16173 * thread-db.c (thread_db_err_str): Make return type const char *.
16174 * utils.c (perror_with_name): Make arg const char *.
16176 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16178 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16179 when handling a EXIT_PROCESS_DEBUG_EVENT.
16181 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16183 * gdbreplay.c (gdbreplay_version): Update copyright year.
16184 * server.c (gdbserver_version): Likewise.
16186 2009-01-05 Doug Evans <dje@google.com>
16188 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16189 (handle_extended_wait): Improve comment.
16191 2008-12-13 Doug Evans <dje@google.com>
16193 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16194 * server.h (ATTR_MALLOC): New macro.
16195 (xmalloc,xcalloc,xstrdup): Declare.
16196 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16197 * inferiors.c: Ditto.
16198 * linux-low.c: Ditto.
16199 * mem-break.c: Ditto.
16200 * regcache.c: Ditto.
16201 * remote-utils.c: Ditto.
16204 * win32-low.c: Ditto.
16206 2008-12-12 Doug Evans <dje@google.com>
16208 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16209 in debugging printf.
16211 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16213 2008-12-09 Doug Evans <dje@google.com>
16215 * linux-low.h (struct process_info): Delete member tid, unused.
16216 * thread-db.c (find_one_thread): Update.
16217 (maybe_attach_thread): Update.
16219 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16221 * target.h (struct target_ops): Add qxfer_osdata member.
16222 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16224 (linux_qxfer_osdata): New functions.
16225 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16227 * server.c (handle_query): Handle "qXfer:osdata:read:".
16228 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16229 (buffer_xml_printf): New functions.
16230 * server.h (struct buffer): New.
16231 (buffer_grow_str, buffer_grow_str0): New macros.
16232 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16233 (buffer_xml_printf): Declare.
16235 2008-11-24 Doug Evans <dje@google.com>
16237 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16239 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16241 * server.c (handle_v_run): Always use the supplied argument list.
16243 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16245 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16246 (xtensa_regmap_table): Add entry for scompare1.
16248 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16250 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16251 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16252 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16253 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16254 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16255 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16256 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16257 XML target descriptions.
16258 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16259 when inferior is running on an ISA 2.05 or later processor. Add
16260 special case to return offset for full 64-bit slot of FPSCR when
16263 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16265 * Makefile.in (SFILES, clean): Added sparc64 files.
16266 (reg-sparc64.o, reg-sparc64.c): New.
16267 * configure.srv (sparc*-*-linux*): New configuration.
16268 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16269 syscall arguments for SPARC.
16270 (regsets_store_inferior_registers): Likewise.
16271 * linux-sparc-low.c: New file.
16273 2008-10-21 Doug Evans <dje@google.com>
16275 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16276 (READLINE_DIR,READLINE_DEP): Delete.
16277 (INTERNAL_CFLAGS): Update.
16278 (LINTFLAGS): Update.
16280 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16282 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16283 whole argv from the last run, not just argv[0].
16285 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16287 * regcache.c (new_register_cache): Return NULL if the register
16288 cache size isn't known yet.
16289 (free_register_cache): Avoid dereferencing a NULL regcache.
16291 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16293 * configure.srv: Merge MIPS and MIPS64.
16295 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16297 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16299 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16301 * Makefile.in: Add required vsx dependencies.
16303 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16304 Declare init_registers_powerpc_vsx32l.
16305 Declare init_registers_powerpc_vsx64l.
16306 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16307 (ppc_arch_setup): Check for VSX in hwcap.
16308 (ppc_fill_vsxregset): New function.
16309 (ppc_store_vsxregset): New function.
16310 Add new VSX entry in regset_info target_regsets.
16312 * configure.srv: Add new VSX dependencies.
16314 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16316 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16317 (remote_open): Set or clear transport_is_reliable.
16318 (putpkt_binary): Don't expect acks in noack mode.
16319 (getpkt): Don't send ack/nac in noack mode.
16320 * server.c (handle_general_set): Handle QStartNoAckMode.
16321 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16323 (main): Reset noack_mode on every connection.
16324 * server.h (noack_mode): Declare.
16326 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16328 * Makefile.in (GDBREPLAY_OBS): New variable.
16329 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16331 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16332 Daniel Jacobowitz <dan@codesourcery.com>
16334 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16335 (usr_store_inferior_registers): Likewise.
16336 (regsets_store_inferior_registers): Likewise.
16338 2008-07-31 Rolf Jansen <rj@surtec.com>
16339 Pedro Alves <pedro@codesourcery.com>
16341 * configure.ac: Check for memmem declaration.
16342 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16343 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16344 (disable_packet_qfThreadInfo): Unconditionally compile.
16345 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16346 * configure, config.in: Regenerate.
16348 2008-07-28 Doug Kwan <dougkwan@google.com>
16350 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16351 (linux_write_memory): Remove declaration of errno.
16353 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16355 * linux-low.c (handle_extended_wait): Do not use "status"
16356 variable uninitialized.
16358 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16360 * server.c (handle_v_attach): Inhibit reporting dll changes.
16362 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16364 * remote-utils.c (prepare_resume_reply): If requested, don't
16365 output "thread:TID" in the T stop reply.
16367 * server.c (disable_packet_vCont, disable_packet_Tthread)
16368 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16369 (handle_query): If requested, disable support for qC, qfThreadInfo
16371 (handle_v_requests): If requested, disable support for vCont.
16372 (gdbserver_show_disableable): New.
16373 (main): Handle --disable-packet and --disable-packet=LIST.
16375 * server.h (disable_packet_vCont, disable_packet_Tthread)
16376 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16378 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16380 * server.c (gdbserver_usage): Mention --version.
16382 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16384 * Makefile.in (gdbreplay.o): New rule.
16386 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16388 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16389 message, not gdbserver.
16391 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16392 Nathan Sidwell <nathan@codesourcery.com>
16393 Joseph Myers <joseph@codesourcery.com>
16395 * acinclude.m4: Include ../../config/acx.m4.
16396 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16397 * configure, config.in: Regenerate.
16398 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16399 * server.c (gdbserver_version): Print PKGVERSION.
16400 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16401 (main): Adjust gdbserver_usage calls.
16402 * gdbreplay.c (version, host_name): Add declarations.
16403 (gdbreplay_version, gdbreplay_usage): New.
16404 (main): Accept --version and --help options.
16406 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16408 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16409 (arm_breakpoint_at): Handle Thumb.
16410 (the_low_target): Add comment.
16412 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16414 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16416 2008-05-09 Doug Evans <dje@google.com>
16418 * server.h (decode_search_memory_packet): Declare.
16419 * remote-utils.c (decode_search_memory_packet): New fn.
16420 * server.c (handle_search_memory_1): New fn.
16421 (handle_search_memory): New fn.
16422 (handle_query): Process qSearch:memory packets.
16424 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16426 * regcache.c (registers_length): Remove.
16427 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16428 full register packet.
16429 * regcache.h (registers_length): Remove prototype.
16430 * server.h (PBUFSIZ): Define to 16384.
16432 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16434 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16435 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16436 powerpc-64l.o, and powerpc-altivec64l.o.
16437 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16438 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16439 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16440 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16441 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16444 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16445 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16446 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16447 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16448 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16449 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16450 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16451 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16452 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16453 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16456 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16457 (init_registers_powerpc_32l): ... this new prototype.
16458 (init_registers_powerpc_32): Remove, replace by ...
16459 (init_registers_powerpc_altivec32l): ... this new prototype.
16460 (init_registers_powerpc_e500): Remove, replace by ...
16461 (init_registers_powerpc_e500l): ... this new prototype.
16462 (init_registers_ppc64): Remove, replace by ...
16463 (init_registers_powerpc_64l): ... this new prototype.
16464 (init_registers_powerpc_64): Remove, replace by ...
16465 (init_registers_powerpc_altivec64l): ... this new prototype.
16466 (ppc_num_regs): Set to 73.
16467 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16468 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16469 (ppc_cannot_store_register): Handle orig_r3 and trap.
16470 (ppc_arch_setup): Update init_registers_... calls.
16471 (ppc_fill_gregset): Handle orig_r3 and trap.
16473 * inferiors.c (clear_inferiors): Reset current_inferior.
16475 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16477 * acinclude.m4: Add override.m4.
16478 * configure: Regenerate.
16480 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16482 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16483 initial call to init_register_ppc64.
16485 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16487 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16488 single powerpc*-*-linux* case.
16489 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16491 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16493 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16494 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16496 * linux-ppc-low.c: Include <elf.h>.
16497 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16498 (ppc_hwcap): New global variable.
16499 (ppc_regmap): Remove __SPE__ #ifdef sections.
16500 (ppc_regmap_e500): New global variable.
16501 (ppc_cannot_store_register): Update __SPE__ special case.
16502 (ppc_get_hwcap): New function.
16503 (ppc_arch_setup): Use it to determine whether inferior supports
16504 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16505 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16506 Do not access registers if target does not support AltiVec.
16507 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16508 Do not access registers if target does not support SPE.
16509 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16511 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16513 * linux-low.c (disabled_regsets, num_regsets): New.
16514 (use_regsets_p): Delete.
16515 (linux_wait_for_process): Clear disabled_regsets.
16516 (regsets_fetch_inferior_registers): Check and set it.
16517 (regsets_store_inferior_registers): Likewise.
16518 (linux_fetch_registers, linux_store_registers): Do not use
16520 (initialize_low): Allocate disabled_regsets.
16522 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16524 * Makefile.in (LIBOBJS): New.
16525 (OBS): Use LIBOBJS.
16526 (memmem.o): New rule.
16527 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16528 * configure: Regenerated.
16530 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16532 * server.c (handle_query): Never return "unsupported" for
16533 qXfer:features:read queries.
16535 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16537 * server.c (get_features_xml): Fix inverted condition.
16538 (handle_query): Always support qXfer:feature:read.
16540 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
16542 * server.c (wrapper_argv): New.
16543 (start_inferior): Handle wrapper_argv. If set, expect an extra
16545 (gdbserver_usage): Document --wrapper.
16546 (main): Parse --wrapper.
16548 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16550 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
16551 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
16552 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
16553 (ppc_set_pc): Likewise.
16554 (ppc_arch_setup): New function.
16555 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
16556 of collect_register.
16557 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
16559 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16561 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
16562 instead of linux-ppc64-low.o.
16563 * linux-ppc64-low.c: Remove file.
16564 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
16565 (linux-ppc64-low.o): Remove rule.
16567 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
16568 (init_registers_powerpc_64): Likewise.
16569 (ppc_regmap): Conditionally define depending on __powerpc64__.
16570 (ppc_cannot_store_register): Do not special-case "fpscr" when
16571 compiled on __powerpc64__.
16572 (ppc_collect_ptrace_register): New function.
16573 (ppc_supply_ptrace_register): New function.
16574 (ppc_breakpoint): Change type to "unsigned int".
16575 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
16576 (the_low_target): Conditionally provide initializers for the
16577 arch_setup member depending on __powerpc64__. Install
16578 collect_ptrace_register and supply_ptrace_register members.
16580 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16582 * regcache.h (gdbserver_xmltarget): Add extern declaration.
16583 * server.c (gdbserver_xmltarget): Define.
16584 (get_features_xml): Use it to replace "target.xml" and arch_string.
16586 * configure.srv: Remove srv_xmltarget. Add XML files that were
16587 mentioned there to srv_xmlfiles instead. Remove conditional tests
16588 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
16589 srv_xmlfiles and srv_regobj to include all possible choices.
16590 * configure.ac (srv_xmltarget): Remove.
16591 (srv_xmlfiles): Do not add "target.xml".
16592 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
16593 checks for supplementary target information.
16594 * configure: Regenerate.
16595 * Makefile.in (XML_TARGET): Remove.
16596 (target.xml): Remove rule.
16597 (clean): Do not clean up target.xml.
16598 (.PRECIOUS): Do not mention target.xml.
16600 * target.h (struct target_ops): Remove arch_string member.
16601 * linux-low.c (linux_arch_string): Remove.
16602 (linux_target_ops): Remove arch_string initializer.
16603 * linux-low.h (struct linux_target_ops): Remove arch_string member.
16604 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
16605 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
16606 * spu-low.c (spu_arch_string): Remove.
16607 (spu_target_ops): Remove arch_string initializer.
16608 * win32-low.c (win32_arch_string): Remove.
16609 (win32_target_ops): Remove arch_string initializer.
16610 * win32-low.h (struct win32_target_ops): Remove arch_string member.
16611 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
16612 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
16614 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16616 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
16617 by collect_ptrace_register and supply_ptrace_register hooks.
16618 * linux-low.c (fetch_register): Use supply_ptrace_register callback
16619 instead of checking for the_low_target.left_pad_xfer.
16620 (usr_store_inferior_registers): Use collect_ptrace_register callback
16621 instead of checking for the_low_target.left_pad_xfer.
16623 * linux-s390-low.c (s390_collect_ptrace_register): New function.
16624 (s390_supply_ptrace_register): Likewise.
16625 (s390_fill_gregset): Call s390_collect_ptrace_register.
16626 (the_low_target): Update.
16628 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
16629 (ppc_supply_ptrace_register): Likewise.
16630 (the_low_target): Update.
16632 * linux-i386-low.c (the_low_target): Update.
16633 * linux-x86-64-low.c (the_low_target): Update.
16635 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16637 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
16638 reg-s390.o and reg-s390x.o.
16640 * linux-low.c (new_inferior): New global variable.
16641 (linux_create_inferior, linux_attach): Set it.
16642 (linux_wait_for_process): Call the_low_target.arch_setup after the
16643 target has stopped for the first time.
16644 (initialize_low): Do not call the_low_target.arch_setup.
16646 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
16647 (s390_set_pc): Likewise.
16648 (s390_arch_setup): New function.
16649 (the_low_target): Use s390_arch_setup as arch_setup routine.
16651 * regcache.c (realloc_register_cache): New function.
16652 (set_register_cache): Call it for each existing regcache.
16654 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
16656 * server.h (init_registers): Remove prototype.
16658 * linux-low.h (struct linux_target_ops): Add arch_setup field.
16659 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
16660 instead of init_registers ().
16661 * linux-arm-low.c (init_registers_arm): Add prototype.
16662 (init_registers_arm_with_iwmmxt): Likewise.
16663 (the_low_target): Add initializer for arch_setup field.
16664 * linux-cris-low.c (init_registers_cris): Add prototype.
16665 (the_low_target): Add initializer for arch_setup field.
16666 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
16667 (the_low_target): Add initializer for arch_setup field.
16668 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
16669 (the_low_target): Add initializer for arch_setup field.
16670 * linux-ia64-low.c (init_registers_ia64): Add prototype.
16671 (the_low_target): Add initializer for arch_setup field.
16672 * linux-m32r-low.c (init_registers_m32r): Add prototype.
16673 (the_low_target): Add initializer for arch_setup field.
16674 * linux-m68k-low.c (init_registers_m68k): Add prototype.
16675 (the_low_target): Add initializer for arch_setup field.
16676 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
16677 (init_registers_mips64_linux): Likewise.
16678 (the_low_target): Add initializer for arch_setup field.
16679 * linux-ppc-low.c (init_registers_ppc): Add prototype.
16680 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
16681 (the_low_target): Add initializer for arch_setup field.
16682 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
16683 (init_registers_powerpc_64): Likewise.
16684 (the_low_target): Add initializer for arch_setup field.
16685 * linux-s390-low.c (init_registers_s390): Add prototype.
16686 (init_registers_s390x): Likewise.
16687 (the_low_target): Add initializer for arch_setup field.
16688 * linux-sh-low.c (init_registers_sh): Add prototype.
16689 (the_low_target): Add initializer for arch_setup field.
16690 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
16691 (the_low_target): Add initializer for arch_setup field.
16692 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
16693 (the_low_target): Add initializer for arch_setup field.
16695 * win32-low.h (struct win32_target_ops): Add arch_setup field.
16696 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
16697 instead of init_registers ().
16698 * win32-arm-low.c (init_registers_arm): Add prototype.
16699 (the_low_target): Add initializer for arch_setup field.
16700 * win32-i386-low.c (init_registers_i386): Add prototype.
16701 (the_low_target): Add initializer for arch_setup field.
16703 * spu-low.c (init_registers_spu): Add prototype.
16704 (initialize_low): Call initialie_registers_spu () instead of
16705 initialize_registers ().
16707 2008-02-19 Pedro Alves <pedro@codesourcery.com>
16709 * server.c (handle_v_requests): When handling the vRun and vAttach
16710 packets, if already debugging a process, don't kill it. Return an
16713 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
16715 * server.c (handle_query): Correct length check.
16717 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
16719 * win32-low.c (do_initial_child_stuff): Add process handle
16720 parameter. Set current_process_handle and current_process_id from the
16721 parameters. Clear globals.
16722 (win32_create_inferior): Don't set current_process_handle and
16723 current_process_id here. Instead pass them on the call to
16724 do_initial_child_stuff.
16725 (win32_attach): Likewise.
16726 (win32_clear_inferiors): New.
16727 (win32_kill): Don't close the current process handle or the
16728 current thread handle here. Instead call win32_clear_inferiors.
16729 (win32_detach): Don't open a new handle to the process. Call
16730 win32_clear_inferiors.
16731 (win32_join): Don't rely on current_process_handle; open a new
16732 handle using the process id.
16733 (win32_wait): Call win32_clear_inferiors when the inferior process
16736 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
16738 * server.c (monitor_show_help): Add "exit".
16740 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
16742 * Makefile.in (SFILES): Add linux-xtensa-low.c.
16743 (clean): Add reg-xtensa.c.
16744 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
16745 * configure.srv (xtensa*-*-linux*) New target.
16746 * linux-xtensa-low.c: New.
16747 * xtensa-xtregs.c: New.
16749 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16751 * hostio.c: Don't include errno.h.
16752 (errno_to_fileio_errno): Move to hostio-errno.
16753 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16754 error number outputting to the target->hostio_last_error callback.
16755 (hostio_packet_error): Use FILEIO_EINVAL directly.
16756 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16757 calls to hostio_error.
16758 * hostio-errno.c: New.
16759 * server.h (hostio_last_error_from_errno): Declare.
16760 * target.h (target_ops): Add hostio_last_error member.
16761 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16762 as hostio_last_error handler.
16763 * spu-low.c (spu_target_ops): Likewise.
16764 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16765 (wince_hostio_last_error): New functions.
16766 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16767 as hostio_last_error handler.
16768 (win32_target_ops) [!_WIN32_WCE]: Register
16769 hostio_last_error_from_errno as hostio_last_error handler.
16770 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16771 (hostio-errno.o): New rule.
16772 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16773 * configure.srv (srv_hostio_err_objs): New variable. Default to
16775 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16776 * configure: Regenerate.
16778 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16780 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16781 (linux_kill, linux_detach): Clean up the process list.
16782 * remote-utils.c (remote_open): Improve port number parsing.
16783 (putpkt_binary, input_interrupt): Only send interrupts if the target
16785 * server.c (extended_protocol): Make static.
16786 (attached): Define earlier.
16787 (exit_requested, response_needed, program_argv): New variables.
16788 (target_running): New.
16789 (start_inferior): Clear attached here.
16790 (attach_inferior): Set attached here.
16791 (require_running): Define.
16792 (handle_query): Use require_running and target_running. Implement
16794 (handle_v_attach, handle_v_run): New.
16795 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16796 (gdbserver_usage): Update.
16797 (main): Redo argument parsing. Handle --debug and --multi. Handle
16798 --attach along with other options or after the port. Save
16799 program_argv. Support no initial program. Resynchronize
16800 communication with GDB after an error. Handle "monitor exit".
16801 Use require_running and target_running. Always allow the extended
16802 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16803 restart in extended mode.
16804 * README: Refer to the GDB manual. Update --attach usage.
16806 2007-12-20 Andreas Schwab <schwab@suse.de>
16808 * linux-low.c (STACK_SIZE): Define.
16809 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16810 (linux_test_for_tracefork): Likewise.
16812 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16814 * linux-low.c (linux_wait_for_event): Update messages. Do not
16815 reinsert auto-delete breakpoints.
16816 * mem-break.c (struct breakpoint): Change return type of handler to
16818 (set_breakpoint_at): Update handler type.
16819 (reinsert_breakpoint_handler): Return 1 instead of calling
16821 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16823 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16824 * mem-break.h (set_breakpoint_at): Update handler type.
16825 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16826 * win32-low.c (auto_delete_breakpoint): New.
16827 (get_child_debug_event): Use it.
16829 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16831 * configure.ac: Check for pread and pwrite.
16832 * hostio.c (handle_pread): Fall back to lseek and read.
16833 (handle_pwrite): Fall back to lseek and write.
16834 * config.in, configure: Regenerated.
16836 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16838 * server.c (myresume): Add own_buf argument.
16839 (main): Update calls.
16841 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16843 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16844 * remote-utils.c (remote_open): Do not call disable_async_io.
16845 (block_async_io): Delete.
16846 (unblock_async_io): Make static.
16847 (initialize_async_io): New.
16848 * server.c (handle_v_cont): Handle async I/O here.
16849 (myresume): Likewise. Move other common resume tasks here...
16850 (main): ... from here. Call initialize_async_io. Disable async
16851 I/O before the main loop.
16852 * server.h (initialize_async_io): Declare.
16853 (block_async_io, unblock_async_io): Delete prototypes.
16854 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16856 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16858 * remote-utils.c (readchar): Allow binary data in received messages.
16860 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16862 * win32-low.c (attaching): New global.
16863 (win32_create_inferior): Clear the `attaching' global.
16864 (win32_attach): Set the `attaching' global.
16865 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16866 attaching. Only set a breakpoint at the entry point if not
16869 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16871 * server.c (main): Don't report dll events on the initial
16872 connection on attaches.
16874 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16876 * server.c (main): Relax numerical bases supported for the pid of
16877 the --attach command line argument.
16879 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16881 * win32-low.c (win32_attach): Call OpenProcess before
16882 DebugActiveProcess, not after. Add last error output to error
16885 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16887 * win32-low.c (win32_get_thread_context)
16888 (win32_set_thread_context): New functions.
16889 (thread_rec): Use win32_get_thread_context.
16890 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16891 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16894 2007-12-03 Leo Zayas
16895 Pedro Alves <pedro_alves@portugalmail.pt>
16897 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16899 (child_add_thread): Minor cleanup.
16900 (child_continue): Resume artificially suspended threads before
16901 calling ContinueDebugEvent.
16902 (suspend_one_thread): New.
16903 (fake_breakpoint_event): New.
16904 (get_child_debug_event): Change return type to int. Check here if
16905 gdb sent an interrupt request. If a soft interrupt was requested,
16906 fake a breakpoint event. Return 0 if there is no event to handle,
16908 (win32_wait): Don't check here if gdb sent an interrupt request.
16909 Ensure there is a valid event to handle.
16910 (win32_request_interrupt): Add soft interruption method as last
16913 2007-12-03 Leo Zayas
16914 Pedro Alves <pedro_alves@portugalmail.pt>
16916 * win32-low.h (win32_thread_info): Add descriptions to the
16917 structure members. Replace `suspend_count' counter by a
16919 * win32-low.c (thread_rec): Update condition of when to get the
16920 context from the inferior. Rely on ContextFlags being set if it
16921 has already been retrieved. Only suspend the inferior thread if
16922 we haven't already. Warn if that fails.
16923 (continue_one_thread): s/suspend_count/suspended/. Only call
16924 ResumeThread once. Warn if that fails.
16926 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16928 * win32-low.c (win32_wait): Don't read from the inferior when it
16929 has already exited.
16931 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16933 * Makefile.in (win32_low_h): New variable.
16934 (win32-low.o): Add dependency on $(win32_low_h).
16935 (win32-arm-low.o, win32-i386-low.o): New rules.
16937 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16939 * hostio.c: Correct copyright year.
16941 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16943 * Makefile.in (OBS): Add hostio.o.
16944 (hostio.o): New rule.
16945 * server.h (handle_vFile): Declare.
16946 * hostio.c: New file.
16947 * server.c (handle_v_requests): Take packet_len and new_packet_len
16948 for binary packets. Call handle_vFile.
16949 (main): Update call to handle_v_requests.
16951 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16953 * linux-low.c: Include <sched.h>.
16955 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16957 * linux-low.c (linux_tracefork_grandchild): New.
16958 (linux_tracefork_child): Use clone.
16959 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16961 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16963 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16965 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16967 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16969 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16971 * inferiors.c (change_inferior_id): Delete.
16972 (add_pid_to_list, pull_pid_from_list): New.
16973 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16974 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16975 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16976 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16977 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16978 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16979 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16980 (using_threads): Always set to 1.
16981 (handle_extended_wait): New.
16982 (add_process): Do not set TID.
16983 (linux_create_inferior): Set must_set_ptrace_flags.
16984 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16985 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16986 (linux_thread_alive): Rename TID argument to LWPID.
16987 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16988 (linux_wait_for_event): Do not use TID or check using_threads. Update
16989 call to dead_thread_notify. Call handle_extended_wait.
16990 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16991 (send_sigstop): Delete sigstop_sent.
16992 (wait_for_sigstop): Avoid TID.
16993 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16994 (linux_test_for_tracefork): New.
16995 (linux_lookup_signals): Use thread_db_active and
16996 linux_supports_tracefork_flag.
16997 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16998 * linux-low.h (get_process_thread): Avoid TID.
16999 (struct process_ifo): Move thread_known and tid to the end. Remove
17001 (linux_attach_lwp, thread_db_init): Update prototypes.
17002 * server.h (change_inferior_id): Delete prototype.
17003 (add_pid_to_list, pull_pid_from_list): New prototypes.
17004 * thread-db.c (thread_db_use_events): New.
17005 (find_first_thread): Rename to...
17006 (find_one_thread): ...this. Update callers and messages. Do not
17007 call fatal. Check thread_db_use_events. Do not call
17008 change_inferior_id or new_thread_notify.
17009 (maybe_attach_thread): Update. Do not call new_thread_notify.
17010 (thread_db_init): Set thread_db_use_events. Check use_events.
17011 * utils.c (fatal, warning): Correct message prefix.
17013 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17015 * Makefile.in (clean): Remove new files.
17016 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17017 (powerpc-64.o, powerpc-64.c): New rules.
17018 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17019 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17021 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17023 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17024 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17025 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17026 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17027 (target_regsets): Add AltiVec and SPE register sets.
17028 * configure.ac: Check for AltiVec and SPE.
17029 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17030 (ppc_fill_vrregset, ppc_store_vrregset): New.
17031 (target_regsets): Add AltiVec register set.
17032 * configure: Regenerated.
17034 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17036 * linux-low.c (O_LARGEFILE): Define.
17037 (linux_read_memory): Use /proc/PID/mem.
17038 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17039 * configure, config.in: Regenerated.
17041 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17043 * linux-low.c (linux_wait_for_event): Do not pass signals while
17046 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17048 * win32-low.c (create_process): New.
17049 (win32_create_inferior): Use create_process instead of
17050 CreateProcess. If create_process failed retry appending an ".exe"
17051 suffix. Store the GetLastError result immediatelly after
17052 create_process calls and use it on the call to error.
17054 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17056 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17058 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17060 * configure.ac: Switch license to GPLv3.
17062 2007-08-01 Michael Snyder <msnyder@access-company.com>
17064 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17066 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17068 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17070 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17071 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17072 CloseToolhelp32Snapshot.
17073 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17074 CloseToolhelp32Snapshot.
17076 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17078 * server.c (main): Check for inferior exit before main loop.
17080 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17082 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17083 instead of on tmp_desc.
17085 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17086 Daniel Jacobowitz <dan@codesourcery.com>
17088 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17089 (add_thread): Minor cleanups.
17090 (clear_inferiors): Move lower in the file. Clear the DLL
17092 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17093 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17094 (xml_escape_text): New.
17095 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17097 (handle_v_cont): Report errors.
17098 (gdbserver_version): Update.
17099 (main): Correct size of own_buf. Do not report initial DLL events.
17100 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17101 (unloaded_dll, xml_escape_text): New.
17102 * win32-low.c (enum target_waitkind): Update comments.
17103 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17104 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17105 (win32_EnumProcessModules, win32_GetModuleInformation)
17106 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17107 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17108 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17109 (win32_Module32First, win32_Module32Next, load_toolhelp)
17110 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17111 (get_child_debug_event): Handle DLL events.
17112 (win32_wait): Likewise.
17114 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17116 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17117 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17119 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17121 * win32-low.c (handle_output_debug_string): Ignore event if not
17124 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17126 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17128 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17130 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17132 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17134 * inferiors.c (change_inferior_id): Add comment.
17135 * linux-low.c (check_removed_breakpoint): Add an early
17136 prototype. Improve debug output.
17137 (linux_attach): Doc update.
17138 (linux_detach_one_process, linux_detach): Clean up before releasing
17140 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17141 * linux-low.h (struct process_info): Doc improvement.
17142 * mem-break.c (delete_all_breakpoints): New.
17143 * mem-break.h (delete_all_breakpoints): New prototype.
17144 * thread-db.c (find_first_thread): New.
17145 (thread_db_create_event): Call it instead of
17146 thread_db_find_new_threads. Clean up unused variables.
17147 (maybe_attach_thread): Remove first thread handling.
17148 (thread_db_find_new_threads): Use find_first_thread.
17149 (thread_db_get_tls_address): Likewise.
17151 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17153 * thread-db.c (thread_db_find_new_threads): Add prototype.
17154 (thread_db_create_event): Check for the main thread before adding
17156 (maybe_attach_thread): Only enable event reporting if TID == 0.
17157 (thread_db_get_tls_address): Check for new threads.
17159 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17161 * linux-low.c (linux_create_inferior): Try execv before execvp.
17162 * spu-low.c (spu_create_inferior): Likewise.
17164 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17166 * linux-low.c (linux_create_inferior): Change execv to execvp.
17167 * spu-low.c (spu_create_inferior): Likewies.
17169 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17171 * Makefile.in (clean): Clean new files instead of deleted ones.
17172 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17173 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17175 * configure.srv: Specify XML files and new regformats for MIPS and
17177 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17178 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17179 an entry for the restart register.
17180 (mips_cannot_fetch_register, mips_cannot_store_register)
17181 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17182 register names to match the XML descriptions.
17183 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17184 restart register instead of $0.
17186 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17187 Markus Deuling <deuling@de.ibm.com>
17189 * remote-utils.c (decode_xfer_write): New function.
17190 * server.h (decode_xfer_write): Add prototype.
17191 * server.c (handle_query): Add PACKET_LEN argument. Support
17192 qXfer:spu:read and qXfer:spu:write packets.
17193 (main): Pass packet_len to handle_query.
17194 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17195 * target.h (target_ops): Add qxfer_spu.
17197 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17199 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17200 accessing non-seekable spufs files.
17202 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17204 * server.c (handle_query): Add reply for qC packet.
17206 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17207 Leo Zayas <lerele@champenstudios@com>
17209 * server.h (check_remote_input_interrupt_request): New function.
17210 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17211 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17212 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17213 (check_remote_input_interrupt_request): New function.
17214 * server.h (check_remote_input_interrupt_request): Declare.
17215 * win32-low.c (winapi_DebugBreakProcess,
17216 winapi_GenerateConsoleCtrlEvent): New typedefs.
17217 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17219 (win32_wait): Check for remote interrupt request
17220 with check_remote_input_interrupt_request.
17221 (win32_request_interrupt): New function.
17222 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17224 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17226 * win32-low.c (debug_registers_changed,
17227 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17228 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17229 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17230 (thread_rec): Get context using the low target.
17231 (child_add_thread): Call thread_added on the low target,
17232 which does the same thing.
17234 (do_initial_child_stuff): Remove debug registers references.
17235 Set context using the low target. Resume threads after
17236 setting the contexts.
17237 (child_continue): Remove dead variable. Remove debug
17238 registers references.
17239 (child_fetch_inferior_registers): Go through the low target.
17240 (do_child_store_inferior_registers): Remove.
17241 (child_store_inferior_registers): Go through the low target.
17242 (win32_resume): Remove debug registers references.
17243 Set context using the low target.
17244 (handle_exception): Change return type to void. Don't record
17245 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17246 first chance exception.
17247 (get_child_debug_event): Change return type to void. Remove
17248 goto loop. Always return after waiting for debug event.
17249 (win32_wait): Convert to switch statement. Handle spurious
17252 * win32-i386-low.c (debug_registers_changed,
17253 debug_registers_used): New.
17254 (initial_stuff): Rename to ...
17255 (i386_initial_stuff): ... this. Clear debug registers
17257 (store_debug_registers): Delete.
17258 (i386_get_thread_context): New.
17259 (load_debug_registers): Delete.
17260 (i386_set_thread_context): New.
17261 (i386_thread_added): New.
17262 (single_step): Rename to ...
17263 (i386_single_step): ... this.
17264 (do_fetch_inferior_registers): Rename to ...
17265 (i386_fetch_inferior_register): ... this.
17266 (i386_store_inferior_register): New.
17267 (the_low_target): Adapt to new interface.
17269 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17270 (arm_get_thread_context): New.
17271 (arm_set_thread_context): New.
17273 (do_fetch_inferior_registers): Rename to ...
17274 (arm_fetch_inferior_register): ... this.
17275 (arm_store_inferior_register): New.
17276 (arm_wince_breakpoint): Reimplement as unsigned long.
17277 (arm_wince_breakpoint_len): Define.
17278 (the_low_target): Adapt to new interface.
17280 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17281 load_debug_registers. Add get_thread_context, set_thread_context,
17282 thread_added and store_inferior_register. Rename
17283 fetch_inferior_registers to fetch_inferior_register.
17284 (regptr): Remove declaration.
17286 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17288 * linux-low.c (linux_detach): Change return type to int. Return 0.
17289 * spu-low.c (spu_detach): Likewise.
17291 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17293 * target.h (target_ops): Change return type of detach to int.
17295 (join_inferior): New.
17296 * server.c (main): Don't skip detach support on mingw32.
17297 If the inferior doesn't support detaching return error.
17298 Call join_inferior instead of using waitpid.
17299 * linux-low.c (linux_join): New.
17300 (linux_target_op): Add linux_join.
17301 * spu-low.c (spu_join): New.
17302 (spu_target_ops): Add spu_join.
17303 * win32-low.c (win32_detach): Adapt to new interface.
17304 Reopen current_process_handle before detaching. Issue a child
17305 resume before detaching.
17307 (win32_target_op): Add win32_join.
17309 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17311 * win32-low.c (win32-attach): Fix return value.
17312 * target.h (target_ops): Describe ATTACH return values.
17314 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17316 * win32-low.c (GETPROCADDRESS): Define.
17317 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17318 (winapi_DebugSetProcessKillOnExit): Likewise.
17319 (win32_create_inferior): Force usage of ansi CreateProcessA.
17320 (win32_attach): Use GETPROCADDRESS.
17321 (win32_detach): Likewise.
17323 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17325 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17327 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17329 * win32-low.c: Commit leftover changes from 2007-03-29.
17331 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17333 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17334 fields short instead of int. Add explicit padding.
17335 (i387_cache_to_fsave): Remove unnecessary casts.
17336 (i387_fsave_to_cache): Doc fix.
17337 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17339 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17341 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17342 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17344 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17346 * configure.srv (arm*-*-mingw32ce*): Move near the other
17349 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17351 * configure.ac: Add errno checking.
17352 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17353 sys/file.h and malloc.h.
17354 (AC_CHECK_DECLS): Add perror.
17355 (srv_mingwce): Handle.
17356 * configure.srv (i[34567]86-*-cygwin*): Add
17357 win32-i386-low.o to srv_tgtobj.
17358 (i[34567]86-*-mingw*): Likewise.
17359 (arm*-*-mingw32ce*): Add case.
17360 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17361 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17362 [__MINGW32CE__] (strerror): New function.
17363 [__MINGW32CE__] (errno): Define to GetLastError.
17364 [__MINGW32CE__] (COUNTOF): New macro.
17365 (remote_open): Remove extra close call.
17366 * mem-break.c (delete_breakpoint_at): New function.
17367 * mem-break.h (delete_breakpoint_at): Declare.
17368 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17369 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17370 [USE_WIN32API] (read, write): Add char* casts.
17371 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17372 * server.h: Include wincecompat.h on Windows CE.
17373 [HAVE_ERRNO_H]: Check.
17374 (perror): Declare if not declared.
17375 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17376 (perror_with_name): Remove errno declaration.
17377 * wincecompat.h: New.
17378 * wincecompat.c: New.
17379 * win32-low.h: New.
17380 * win32-arm-low.c: New.
17381 * win32-i386-low.c: New.
17382 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17383 (OUTMSG2): Make it safe.
17385 (COUNTOF): New macro.
17386 (NUM_REGS): Get it from the low target.
17387 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17388 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17389 (thread_rec): Let low target handle debug registers.
17390 (child_add_thread): Likewise.
17391 (child_init_thread_list): Likewise.
17392 (continue_one_thread): Likewise.
17394 (do_child_fetch_inferior_registers): Move to ...
17395 * win32-i386-low.c: ... here, and rename to ...
17396 (do_fetch_inferior_registers): ... this.
17397 * win32-low.c (child_fetch_inferior_registers):
17398 Go through the low target.
17399 (do_child_store_inferior_registers): Use regptr.
17400 (strwinerror): New function.
17401 (win32_create_inferior): Handle Windows CE.
17402 Use strwinerror instead of strerror on Windows error
17403 codes. Add program to the error output.
17404 Don't close the main thread handle on Windows CE.
17405 (win32_attach): Use coredll.dll on Windows CE.
17406 (win32_kill): Close current process and current
17408 (win32_detach): Use coredll.dll on Windows CE.
17409 (win32_resume): Let low target handle debug registers, and
17411 (handle_exception): Add/Remove initial breakpoint. Avoid
17412 non-existant WSTOPSIG on Windows CE.
17413 (win32_read_inferior_memory): Cast to remove warning.
17414 (win32_arch_string): Go through the low target.
17415 (initialize_low): Call set_breakpoint_data with the low
17416 target's breakpoint.
17417 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17418 FOP_REGNUM, mappings): Move to ...
17419 * win32-i386-low.c: ... here.
17420 * win32-low.c (win32_thread_info): Move to ...
17421 * win32-low.h: ... here.
17422 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17423 win32-arm-low.c and wincecompat.c.
17424 (all:): Add $EXEEXT.
17425 (install-only:): Likewise.
17426 (gdbserver:): Likewise.
17427 (gdbreplay:): Likewise.
17428 * config.in: Regenerate.
17429 * configure: Regenerate.
17431 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17433 * win32-low.c: Rename typedef thread_info to
17434 win32_thread_info throughout.
17436 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17438 * win32-i386-low.c: Rename to ...
17439 * win32-low.c: ... this.
17440 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17441 * Makefile.in: Likewise.
17443 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17445 * remote-utils.c (monitor_output): Constify msg parameter.
17446 * server.h (monitor_output): Likewise.
17447 * win32-i386-low.c (handle_output_debug_string): New.
17448 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17449 handle_output_debug_string.
17450 (get_child_debug_event): Likewise.
17452 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17454 * server.c (main): Correct strtoul check.
17456 2007-03-27 Jon Ringle <jon@ringle.org>
17458 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17460 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17462 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17464 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17466 * terminal.h: Check HAVE_SGTTY_H.
17468 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17470 * remote-utils.c (remote_open): Print out the assigned port number.
17472 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17474 * remote-utils.c (monitor_output): New function.
17475 * server.c (debug_threads): Define here.
17476 (monitor_show_help): New function.
17477 (handle_query): Handle qRcmd.
17478 (main): Do not handle 'd' packet.
17479 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17480 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17483 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17485 * Makefile.in (EXEEXT): New.
17486 (clean): Use $(EXEEXT).
17488 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17490 * target.h (target_ops): Rename send_signal to request_interrupt,
17491 and remove enum target_signal parameter.
17492 * linux-low.c (linux_request_interrupt): Rename from
17493 linux_send_signal, and always send SIGINT.
17494 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17495 and always send SIGINT.
17496 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17498 (input_interrupt): Likewise.
17500 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17502 * server.c (get_features_xml): Check if target implemented
17504 * win32-i386-low.c (win32_arch_string): New.
17505 (win32_target_ops): Add win32_arch_string as arch_string member.
17507 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17509 * spu-low.c (spu_arch_string): New.
17510 (spu_target_ops): Add spu_arch_string.
17512 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17514 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17515 * configure.ac: Do not check for terminal.h.
17516 * configure, config.in: Regenerated.
17518 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17520 * Makefile.in (OBS): Add $(XML_BUILTIN).
17521 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17523 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17524 (arm-with-iwmmxt.c): New.
17525 * config.in, configure: Regenerate.
17526 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17527 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17528 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17529 (arm*-*-linux*): Add iWMMXt and regset support.
17530 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17531 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17532 (arm_store_wmmxregset, target_regsets): New.
17533 * server.c (get_features_xml): Take annex argument. Check builtin
17535 (handle_query): Handle multiple annexes.
17537 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17539 * remote-utils.c [USE_WIN32API] (read, write): Define.
17540 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
17543 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
17545 * linux-i386-low.c (the_low_target): Set arch_string.
17546 * linux-x86-64-low.c (the_low_target): Likewise.
17547 * linux-low.c (linux_arch_string): New.
17548 (linux_target_ops): Add it.
17549 * linux-low.h (struct linux_target_ops): Add arch_string.
17550 * server.c (write_qxfer_response): Use const void * for DATA.
17551 (get_features_xml): New.
17552 (handle_query): Handle qXfer:features:read. Report it for qSupported.
17553 * target.h (struct target_ops): Add arch_string method.
17555 2007-01-03 Denis Pilat <denis.pilat@st.com>
17556 Daniel Jacobowitz <dan@codesourcery.com>
17558 * linux-low.c (linux_kill): Handle being called with no threads.
17559 * win32-i386-low.c (win32_kill): Likewise.
17560 (get_child_debug_event): Clear current_process_handle.
17562 2006-12-30 Denis PILAT <denis.pilat@st.com>
17563 Daniel Jacobowitz <dan@codesourcery.com>
17565 * remote-utils.c (remote_open): Check the type of specified
17566 serial port devices before opening them.
17567 * server.c (main): Kill the inferior if an error occurs during
17568 the first remote_open.
17570 2006-12-05 Markus Deuling <deuling@de.ibm.com>
17572 * README: Update supported targets.
17574 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
17576 * Makefile.in (clean): Remove reg-mips64.c.
17577 (reg-mips64.c, reg-mips64.o): New rules.
17578 * configure.srv: Handle mips64. Include regset support for mips.
17579 * linux-mips-low.c (union mips_register): New.
17580 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
17581 (mips_breakpoint, mips_breakpoint_at): Use int.
17582 (mips_collect_register, mips_supply_register)
17583 (mips_collect_register_32bit, mips_supply_register_32bit)
17584 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
17585 (mips_store_fpregset, target_regsets): New.
17586 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
17588 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
17590 * configure.srv: Add target "spu*-*-*".
17591 * Makefile.in (clean): Remove reg-spu.c.
17592 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
17593 * spu-low.c: New file.
17595 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17597 * configure.ac: Correct td_thr_tls_get_addr test.
17598 * configure: Regenerated.
17600 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
17602 * linux-low.c (linux_wait_for_event): Reformat. Use the
17603 pass_signals array.
17604 * remote-utils.c (decode_address_to_semicolon): New.
17605 * server.c (pass_signals, handle_general_set): New.
17606 (handle_query): Mention QPassSignals for qSupported.
17607 (main): Call handle_general_set.
17608 * server.h (pass_signals, decode_address_to_semicolon): New.
17610 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
17612 * server.c (handle_query): Correct error handling for read_auxv.
17614 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
17616 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
17617 and srv_linux_thread_db to yes.
17618 * linux-s390-low.c (s390_fill_gregset): New function.
17619 (target_regsets): Define data structure.
17621 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
17623 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
17624 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
17625 * config.in, configure: Regenerated.
17626 * inferiors.c (gdb_id_to_thread): New function.
17627 (gdb_id_to_thread_id): Use it.
17628 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
17629 * linux-low.h (struct process_info): Add th member.
17630 (thread_db_get_tls_address): New prototype.
17631 * remote-utils.c (decode_address): Make non-static.
17632 * server.c (handle_query): Handle qGetTLSAddr.
17633 * server.h (gdb_id_to_thread, decode_address): New prototypes.
17634 * target.h (struct target_ops): Add get_tls_address.
17635 * thread-db.c (maybe_attach_thread): Save the thread handle.
17636 (thread_db_get_tls_address): New.
17638 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
17640 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
17641 (linux_resume_one_process): Take a siginfo_t *. Update all
17642 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
17643 (struct pending_signals): Add a siginfo_t.
17644 (linux_wait_for_process): Always set last_status.
17645 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
17646 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
17647 * linux-low.h (struct process_info): Add last_status.
17649 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
17651 * remote-utils.c (try_rle): New function.
17652 (putpkt_binary): Use it.
17654 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
17656 * Makefile.in (clean): Clean reg-x86-64-linux.c.
17657 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
17658 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
17659 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
17660 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
17663 2006-08-08 Richard Sandiford <richard@codesourcery.com>
17665 * server.c (terminal_fd): New variable.
17666 (old_foreground_pgrp): Likewise.
17667 (restore_old_foreground_pgrp): New function.
17668 (start_inferior): Record the terminal file descriptor in terminal_fd
17669 and its original foreground group in old_foreground_pgrp. Register
17670 restore_old_foreground_pgrp with atexit().
17672 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
17674 * server.c (handle_query): Correct qPart to qXfer.
17676 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
17678 * configure.ac: Check for more headers which are missing on
17679 Windows. Automatically supply -lwsock32 and USE_WIN32API.
17680 * configure.srv: Add Cygwin and mingw32.
17681 * remote-utils.c: Don't include headers unconditionally which
17682 are missing on mingw32. Include <winsock.h> for mingw32.
17683 (remote_open): Adjust for mingw32 support. Flush
17684 standard error after writing to it.
17685 (remote_close, putpkt_binary, input_interrupt, block_async_io)
17686 (unblock_async_io, enable_async_io, disable_async_io)
17687 (readchar, getpkt): Update for Winsock support.
17688 (prepare_resume_reply): Expect a protocol signal number.
17689 * server.c: Disable <sys/wait.h> on mingw32.
17690 (start_inferior): Adjust for mingw32 support. Flush
17691 standard error after writing to it.
17692 (attach_inferior): Likewise. Use protocol signal
17694 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
17696 * win32-i386-low.c: New file.
17697 * Makefile.in (XM_CLIBS): Set.
17698 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
17699 (win32-i386-low.o): New dependency rule.
17700 * linux-low.c (linux_wait): Use target signal numbers.
17701 * target.h (struct target_ops): Doc fix.
17702 * server.h (target_signal_to_name): New prototype.
17703 * gdbreplay.c: Don't include headers unconditionally which
17704 are missing on mingw32. Include <winsock.h> for mingw32.
17705 (remote_close, remote_open): Adjust for Winsock support.
17706 * configure, config.in: Regenerated.
17708 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17710 * server.c (decode_xfer_read, write_qxfer_response): New.
17711 (handle_query): Take a packet length argument. Handle
17712 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
17713 the qSupported response.
17714 (main): Update call to handle_query.
17716 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
17718 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
17719 (putpkt_binary): Renamed from putpkt and adjusted for binary
17721 (putpkt): New wrapper for putpkt_binary.
17722 (readchar): Don't mask off the high bit.
17723 (decode_X_packet): New function.
17724 * server.c (main): Call putpkt_binary if a handler sets the packet
17725 length. Save the length of the incoming packet. Handle 'X'.
17726 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
17728 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
17730 * server.c (handle_query): Handle qSupported.
17732 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17734 * remote-utils.c (all_symbols_looked_up): New variable.
17735 (look_up_one_symbol): Check it.
17736 * server.h (look_up_one_symbol): New declaration.
17737 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
17739 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
17741 * Makefile.in (linux-arm-low.o): Update dependencies.
17742 * linux-arm-low.c: Include "gdb_proc_service.h".
17743 (PTRACE_GET_THREAD_AREA): Define.
17744 (ps_get_thread_area): New function.
17746 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17748 * configure.srv (m68k*-*-uclinux*): New target.
17749 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17750 (linux_resume_one_process): Remove extraneous cast.
17751 (linux_read_offsets): New.
17752 (linux_target_op): Add linux_read_offsets on mmuless systems.
17753 * server.c (handle_query): Add qOffsets logic.
17754 * target.h (struct target_ops): Add read_offsets.
17756 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17758 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17759 (PTRACE_GET_THREAD_AREA): Define.
17760 (ps_get_thread_area): New function.
17761 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17762 (linux-x86-64-low.o): Update.
17764 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17766 * configure.ac: Remove checks for prfpregset_t.
17767 * gdb_proc_service.h: New file.
17768 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17769 new "gdb_proc_service.h".
17770 * proc-service.c: Likewise.
17771 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17772 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17773 * Makefile.in (gdb_proc_service_h): Updated.
17774 * configure, config.in: Regenerated.
17776 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17778 * remote-utils.c (prepare_resume_reply): Move declaration
17779 of gdb_id_from_wait to the top of the block.
17781 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17783 * linux-low.c (regsets_store_inferior_registers): Read the regset
17784 from the target before filling it.
17786 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17788 * server.c (attach_inferior): Return SIGTRAP for a successful
17791 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17793 * Makefile.in (OBS): Add version.o.
17794 (STAGESTUFF): Delete.
17795 (version.o): Add dependencies.
17796 (version.c): Replace rule.
17797 (clean): Remove version.c.
17798 * server.c (gdbserver_version): New.
17799 (gdbserver_usage): Use printf.
17800 (main): Handle --version and --help.
17801 * server.h (version, host_name): Add declarations.
17803 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17815 * linux-x86-64-low.c:
17817 * linux-s390-low.c:
17818 * linux-ppc64-low.c:
17820 * linux-mips-low.c:
17821 * linux-m68k-low.c:
17822 * linux-m32r-low.c:
17825 * linux-ia64-low.c:
17826 * linux-i386-low.c:
17827 * linux-crisv32-low.c:
17839 * gdbserver.1: Add (C) after Copyright. Update the FSF
17842 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17844 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17845 (arm_breakpoint_at): Recognize both breakpoints.
17846 (the_low_target): Use the correct breakpoint instruction.
17848 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17850 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17851 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17852 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17853 (the_low_target): Update.
17855 2005-10-25 Andreas Schwab <schwab@suse.de>
17857 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17859 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17860 (ia64_num_regs): Reduce to 462.
17862 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17864 * acinclude.m4: Correct quoting.
17865 * aclocal.m4: Regenerated.
17867 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17868 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17869 (thread_db_init): Call thread_db_err_str.
17870 * configure.ac: Check for TD_VERSION.
17871 * config.in, configure: Regenerated.
17873 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17875 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17877 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17879 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17880 is not available. Define HAVE_PTRACE_GETREGS if it is.
17881 * config.in, configure: Regenerated.
17882 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17883 * linux-i386-low.c, linux-m68k-low.c: Update to use
17884 HAVE_PTRACE_GETREGS.
17885 * linux-low.c (regsets_fetch_inferior_registers)
17886 (regsets_store_inferior_registers): Only return 0 if we processed
17888 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17889 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17891 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17893 * inferiors.c (struct thread_info): Add gdb_id.
17894 (add_thread): Add gdb_id argument.
17895 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17896 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17897 calls to add_thread.
17898 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17899 * server.c (handle_query): Use thread_to_gdb_id.
17900 (handle_v_cont, main): Use gdb_id_to_thread_id.
17901 * server.h (add_thread): Update prototype.
17902 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17905 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17907 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17908 left-padded registers.
17909 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17910 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17912 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17914 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17915 * configure: Regenerate.
17916 * config.in: Regenerate.
17917 * server.h (NEED_DECLARATION_STRERROR):
17918 Replace with !HAVE_DECL_STRERROR.
17920 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17922 * linux-low.c (linux_wait, linux_send_signal): Don't test
17923 an unsigned long variable for > 0 if it could be MAX_ULONG.
17924 * server.c (myresume): Likewise.
17925 * target.c (set_desired_inferior): Likewise.
17927 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17929 * configure.ac: Simplify and improve check for socklen_t.
17930 * configure, config.in: Regenerate.
17932 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17934 * acconfig.h: Remove.
17935 * configure.ac: Add a test for socklen_t. Use three-argument
17936 AC_DEFINE throughout.
17937 * config.in: Regenerated using autoheader 2.59.
17938 * configure: Regenerated.
17940 * gdbreplay.c (socklen_t): Provide a default.
17941 (remote_open): Use socklen_t.
17942 * remote-utils.c (socklen_t): Provide a default.
17943 (remote_open): Use socklen_t.
17944 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17947 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17949 * linux-low.c (linux_read_memory, linux_write_memory)
17950 (linux_read_auxv): Likewise.
17951 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17952 (check_mem_write): Likewise.
17953 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17955 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17956 (registers_from_string, register_data): Likewise.
17957 * server.c (handle_query, main): Likewise.
17958 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17959 (decode_M_packet): Likewise.
17960 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17961 * target.h (struct target_ops): Update read_memory, write_memory,
17963 (read_inferior_memory, write_inferior_memory): Update.
17964 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17965 to unsigned char *.
17966 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17967 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17968 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17969 linux-s390-low.c, linux-sh-low.c: Update for changes in
17970 read_inferior_memory and the_low_target->breakpoint.
17972 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17974 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17975 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17976 * configure.srv: Add powerpc64-*-linux*.
17977 * linux-ppc64-low.c: New file.
17979 2005-05-23 Orjan Friberg <orjanf@axis.com>
17981 * linux-cris-low.c: New file with support for CRIS.
17982 * linux-crisv32-low.c: Ditto for CRISv32.
17983 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17984 (clean): Add reg-cris.c and reg-crisv32.c.
17985 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17986 reg-crisv32.o, and reg-crisv32.c to make rules.
17987 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17988 recognized targets.
17990 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17992 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17993 of sizeof (PTRACE_XFER_TYPE).
17994 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17996 2005-05-12 Orjan Friberg <orjanf@axis.com>
17998 * target.h (struct target_ops): Add insert_watchpoint,
17999 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18000 pointers for hardware watchpoint support.
18001 * linux-low.h (struct linux_target_ops): Ditto.
18002 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18003 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18004 to linux_target_ops.
18005 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18007 * server.c (main): Recognize 'Z' and 'z' packets.
18009 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18011 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18012 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18013 (the_low_target): Add new members.
18015 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18017 * proc-service.c (ps_lgetregs): Search all_processes instead of
18020 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18022 * server.c (start_inferior): Change return type to int.
18023 (attach_inferior): Change sigptr to int *.
18024 (handle_v_cont, handle_v_requests): Change signal to int *.
18025 (main): Change signal to int.
18027 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18029 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18030 * configure.srv: Add m32r*-*-linux*.
18031 * linux-m32r-low.c: New file.
18033 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18035 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18037 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18039 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18040 Take unsigned long arguments for PIDs.
18041 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18042 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18043 (wait_for_sigstop, linux_resume_one_process)
18044 (regsets_fetch_inferior_registers, linux_send_signal)
18045 (linux_read_auxv): Likewise. Update the types of variables holding
18046 PIDs. Update format string specifiers.
18047 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18048 * remote-utils.c (prepare_resume_reply): Likewise.
18049 * server.c (cont_thread, general_thread, step_thread)
18050 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18052 (handle_query): Update format specifiers.
18053 (handle_v_cont, main): Use strtoul for thread IDs.
18054 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18055 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18056 (general_thread, step_thread, thread_from_wait)
18057 (old_thread_from_wait): Update.
18058 * target.h (struct thread_resume): Use unsigned long for THREAD.
18059 (struct target_ops): Use unsigned long for arguments to attach and
18062 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18064 * acinclude.m4: Include bfd/bfd.m4 directly.
18065 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18066 <agriffis@toolchain.org>.
18067 * aclocal.m4, configure: Regenerated.
18069 2005-01-07 Andrew Cagney <cagney@gnu.org>
18071 * configure.ac: Rename configure.in, require autoconf 2.59.
18072 * configure: Re-generate.
18074 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18076 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18077 LIBS when finished.
18078 * aclocal.m4: Regenerated.
18079 * configure: Regenerated.
18081 2004-11-21 Andreas Schwab <schwab@suse.de>
18083 * linux-m68k-low.c (m68k_num_gregs): Define.
18084 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18085 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18086 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18087 (m68k_breakpoint_at): New. Add to the_low_target.
18089 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18090 srv_linux_thread_db to yes.
18092 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18094 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18095 (ARCH_SET_FS): Likewise.
18096 (ARCH_GET_FS): Likewise.
18097 (ARCH_GET_GS): Likewise.
18099 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18101 * linux-i386-low.c (ps_get_thread_area): New.
18102 * linux-x86-64-low.c (ps_get_thread_area): New.
18103 * linux-low.c: Include <sys/syscall.h>.
18104 (linux_kill_one_process): Don't kill the first thread here.
18105 (linux_kill): Kill the first thread here.
18106 (kill_lwp): New function.
18107 (send_sigstop, linux_send_signal): Use it.
18108 * proc-service.c: Clean up #ifdefs.
18109 (fpregset_info): Delete.
18110 (ps_lgetregs): Update and enable implementation.
18111 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18113 * remote-utils.c (struct sym_cache, symbol_cache): New.
18114 (input_interrupt): Print a clearer message.
18115 (async_io_enabled): New variable.
18116 (enable_async_io, disable_async_io): Use it. Update comments.
18117 (look_up_one_symbol): Use the symbol cache.
18118 * thread-db.c (thread_db_look_up_symbols): New function.
18119 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18121 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18123 * configure.in: Test for -rdynamic.
18124 * configure: Regenerated.
18125 * Makefile (INTERNAL_LDFLAGS): New.
18126 (gdbserver, gdbreplay): Use it.
18128 2004-09-02 Andrew Cagney <cagney@gnu.org>
18130 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18132 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18134 * linux-low.c (linux_wait): Clear all_processes list also.
18136 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18138 * linux-low.c: Include <errno.h>. Remove extern declaration of
18141 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18143 * gdbreplay.c, server.h, utils.c: Update copyright years.
18145 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18147 * server.c (main): Print child status or termination signal from
18148 variable 'signal', not 'sig'.
18150 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18152 * linux-low.c (linux_read_memory): Change return type to
18153 int. Check for and return error from ptrace().
18154 * target.c (read_inferior_memory): Change return type to int. Pass
18155 back return status from the_target->read_memory().
18156 * target.h (struct target_ops): Adapt *read_memory() prototype.
18158 (read_inferior_memory): Adapt prototype.
18159 * server.c (main): Return an error packet if
18160 read_inferior_memory() returns an error.
18162 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18164 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18165 Unify with other clean targets.
18167 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18169 * server.c (handle_v_cont): Call set_desired_inferior.
18171 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18173 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18175 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18177 * linux-low.c (linux_wait): Unblock async I/O.
18178 (linux_resume): Block and enable async I/O.
18179 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18180 * server.h (block_async_io, unblock_async_io): Add prototypes.
18182 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18184 * remote-utils.c (remote_open): Print a status notice after
18185 opening a TCP port.
18186 * server.c (attach_inferior): Print a status notice after
18189 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18191 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18193 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18195 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18197 * server.c, target.h: Update copyright years.
18199 2004-02-25 Roland McGrath <roland@redhat.com>
18201 * target.h (struct target_ops): New member `read_auxv'.
18202 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18203 * linux-low.c (linux_read_auxv): New function.
18204 (linux_target_ops): Initialize `read_auxv' member to that.
18206 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18208 Committed by Jim Blandy <jimb@redhat.com>.
18210 * linux-s390-low.c (s390_num_regs): Update.
18211 (s390_regmap): Remove control registers. Use __s390x__ predefine
18212 instead of GPR_SIZE to distiguish s390 and s390x targets.
18214 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18216 * linux-low.c: Update copyright year.
18217 (check_removed_breakpoint): Clear pending_is_breakpoint.
18218 (linux_set_resume_request, linux_queue_one_thread)
18219 (resume_status_pending_p): New functions.
18220 (linux_continue_one_thread): Use process->resume.
18221 (linux_resume): Only resume threads if there are no pending events.
18222 * linux-low.h (struct process_info): Add resume request
18225 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18227 * regcache.c (new_register_cache): Clear the allocated register
18228 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18230 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18232 * linux-low.c (linux_resume): Take a struct thread_resume *
18234 (linux_wait): Update call.
18235 (resume_ptr): New static variable.
18236 (linux_continue_one_thread): Renamed from
18237 linux_continue_one_process. Use resume_ptr.
18238 (linux_resume): Use linux_continue_one_thread.
18239 * server.c (handle_v_cont, handle_v_requests): New functions.
18240 (myresume): New function.
18241 (main): Handle 'v' case.
18242 * target.h (struct thread_resume): New type.
18243 (struct target_ops): Change argument of "resume" to struct
18245 (myresume): Delete macro.
18247 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18249 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18250 (uninstall): Support DESTDIR.
18252 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18254 * configure.srv: Add xscale*linux copy of arm*linux entry.
18256 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18258 * linux-arm-low.c (arm_reinsert_addr): New function.
18259 (the_low_target): Add arm_reinsert_addr.
18261 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18263 * mem-break.c: Remove whitespace at end of file.
18265 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18267 * configure.in: Check whether we need to prototype strerror.
18268 * server.h: Optionally prototype strerror.
18269 * gdbreplay.c (perror_with_name): Use strerror.
18270 * linux-low.c (linux_attach_lwp): Use strerror.
18271 * utils.c (perror_with_name): Use strerror.
18272 * config.in, configure: Regenerated.
18274 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18276 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18277 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18279 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18281 * Makefile.in (SFILES): Update.
18282 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18283 low-sun3.c: Remove files.
18285 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18287 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18288 (linux_detach_one_process, linux_detach): New functions.
18289 (linux_target_ops): Add linux_detach.
18290 * server.c (main): Handle 'D' packet.
18291 * target.h (struct target_ops): Add "detach" member.
18292 (detach_inferior): Define.
18294 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18296 From Kelley Cook <kelleycook@wideopenwest.com>:
18297 * configure.srv: Accept i[34567]86 variants.
18299 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18301 * linux-low.c (linux_wait_for_event): Correct comment typos.
18302 (linux_resume_one_process): Call check_removed_breakpoint.
18303 (linux_send_signal): New function.
18304 (linux_target_ops): Add linux_send_signal.
18305 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18307 * target.h (struct target_ops): Add send_signal.
18309 2003-05-29 Jim Blandy <jimb@redhat.com>
18311 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18312 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18313 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18314 away part of the register's value.
18316 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18318 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18319 (linux_wait_for_event, linux_init_signals): Likewise.
18321 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18323 * configure.in: Check for stdlib.h.
18324 * configure: Regenerated.
18325 * config.in: Regenerated.
18327 2003-01-04 Andreas Schwab <schwab@suse.de>
18329 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18331 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18333 * Makefile.in: Remove obsolete code.
18335 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18337 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18338 defined(PT_FPR0_HI).
18340 2002-11-17 Stuart Hughes <seh@zee2.com>
18342 * linux-arm-low.c (arm_num_regs): Increase.
18343 (arm_regmap): Include status register.
18345 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18347 * linux-low.c (register_addr): Remove incorrect -1 check.
18349 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18351 * linux-low.c (linux_create_inferior): Call setpgid. Return
18353 (unstopped_p, linux_signal_pid): Remove.
18354 (linux_target_ops): Remove linux_signal_pid.
18355 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18356 global instead of target method.
18357 * target.h (struct target_ops): Remove signal_pid. Update comment
18358 for create_inferior.
18359 * server.c (signal_pid): New variable.
18360 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18361 gdbserver. Set the child to be the foreground process group.
18362 (attach_inferior): Set signal_pid.
18364 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18366 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18368 2002-08-20 Jim Blandy <jimb@redhat.com>
18370 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18373 2002-08-01 Andrew Cagney <cagney@redhat.com>
18375 * Makefile.in: Make chill references obsolete.
18377 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18379 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18380 * configure: Regenerate.
18381 * config.in: Regenerate.
18383 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18385 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18386 (perror_with_name, remote_close, remote_open, expect, play): Static.
18388 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18390 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18391 byte offsets instead of an array of indexes.
18392 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18394 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18396 * regcache.c: Add comment.
18398 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18400 * thread-db.c: New file.
18401 * proc-service.c: New file.
18402 * acinclude.m4: New file.
18403 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18404 proc-service.o, and thread-db.o.
18405 (linux-low.o): Add USE_THREAD_DB.
18406 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18407 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18408 * aclocal.m4: Regenerated.
18409 * config.in: Regenerated.
18410 * configure: Regenerated.
18411 * configure.in: Check for proc_service.h, sys/procfs.h,
18412 thread_db.h, and linux/elf.h headrs.
18413 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18414 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18415 Check for -lthread_db and thread support.
18416 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18417 PowerPC, and SuperH.
18418 * i387-fp.c: Constify arguments.
18419 * i387-fp.h: Likewise.
18420 * inferiors.c: (struct thread_info): Renamed from
18421 `struct inferior_info'. Remove PID member. Use generic inferior
18422 list header. All uses updated.
18423 (inferiors, signal_pid): Removed.
18424 (all_threads): New variable.
18425 (get_thread): Define.
18426 (add_inferior_to_list): New function.
18427 (for_each_inferior): New function.
18428 (change_inferior_id): New function.
18429 (add_inferior): Removed.
18430 (remove_inferior): New function.
18431 (add_thread): New function.
18432 (free_one_thread): New function.
18433 (remove_thread): New function.
18434 (clear_inferiors): Use for_each_inferior and free_one_thread.
18435 (find_inferior): New function.
18436 (find_inferior_id): New function.
18437 (inferior_target_data): Update argument type.
18438 (set_inferior_target_data): Likewise.
18439 (inferior_regcache_data): Likewise.
18440 (set_inferior_regcache_data): Likewise.
18441 * linux-low.c (linux_bp_reinsert): Remove.
18442 (all_processes, stopping_threads, using_thrads)
18443 (struct pending_signals, debug_threads, pid_of): New.
18444 (inferior_pid): Replace with macro.
18445 (struct inferior_linux_data): Remove.
18446 (get_stop_pc, add_process): New functions.
18447 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18448 Use add_process and add_thread.
18449 (linux_attach_lwp): New function, based on old linux_attach. Use
18450 add_process and add_thread. Set stop_expected for new threads.
18451 (linux_attach): New function.
18452 (linux_kill_one_process): New function.
18453 (linux_kill): Kill all LWPs.
18454 (linux_thread_alive): Use find_inferior_id.
18455 (check_removed_breakpoints, status_pending_p): New functions.
18456 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18457 Update. Use WNOHANG. Wait for cloned processes also. Update process
18458 struct for the found process.
18459 (linux_wait_for_event): New function.
18460 (linux_wait): Use it. Support LWPs.
18461 (send_sigstop, wait_for_sigstop, stop_all_processes)
18462 (linux_resume_one_process, linux_continue_one_process): New functions.
18463 (linux_resume): Support LWPs.
18464 (REGISTER_RAW_SIZE): Remove.
18465 (fetch_register): Use register_size instead. Call supply_register.
18466 (usr_store_inferior_registers): Likewise. Call collect_register.
18467 Fix recursive case.
18468 (regsets_fetch_inferior_registers): Improve error message.
18469 (regsets_store_inferior_registers): Add debugging.
18470 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18471 (unstopped_p, linux_signal_pid): New functions.
18472 (linux_target_ops): Add linux_signal_pid.
18473 (linux_init_signals): New function.
18474 (initialize_low): Call it. Initialize using_threads.
18475 * regcache.c (inferior_regcache_data): Add valid
18477 (get_regcache): Fetch registers lazily. Add fetch argument
18478 and update all callers.
18479 (regcache_invalidate_one, regcache_invalidate): New
18481 (new_register_cache): Renamed from create_register_cache.
18482 Return the new regcache.
18483 (free_register_cache): Change argument to a void *.
18484 (registers_to_string, registers_from_string): Call get_regcache
18485 with fetch flag set.
18486 (register_data): Make static. Pass fetch flag to get_regcache.
18487 (supply_register): Call get_regcache with fetch flag clear.
18488 (collect_register): Call get_regcache with fetch flag set.
18489 (collect_register_as_string): New function.
18490 * regcache.h: Update.
18491 * remote-utils.c (putpkt): Flush after debug output and use
18493 Handle input interrupts while waiting for an ACK.
18494 (input_interrupt): Use signal_pid method.
18495 (getpkt): Flush after debug output and use stderr.
18496 (outreg): Use collect_register_as_string.
18497 (new_thread_notify, dead_thread_notify): New functions.
18498 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18499 and general_thread.
18500 (look_up_one_symbol): Flush after debug output.
18501 * server.c (step_thread, server_waiting): New variables.
18502 (start_inferior): Don't use signal_pid. Update call to mywait.
18503 (attach_inferior): Update call to mywait.
18504 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18505 (main): Don't fetch/store registers explicitly. Use
18506 set_desired_inferior. Support proposed ``Hs'' packet. Update
18508 * server.h: Update.
18509 (struct inferior_list, struct_inferior_list_entry): New.
18510 * target.c (set_desired_inferior): New.
18511 (write_inferior_memory): Constify.
18512 (mywait): New function.
18513 * target.h: Update.
18514 (struct target_ops): New signal_pid method.
18515 (mywait): Removed macro, added prototype.
18517 * linux-low.h (regset_func): Removed.
18518 (regset_fill_func, regset_store_func): New.
18519 (enum regset_type): New.
18520 (struct regset_info): Add type field. Use new operation types.
18521 (struct linux_target_ops): stop_pc renamed to get_pc.
18522 Add decr_pc_after_break and breakpoint_at.
18523 (get_process, get_thread_proess, get_process_thread)
18524 (strut process_info, all_processes, linux_attach_lwp)
18525 (thread_db_init): New.
18527 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18528 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18529 (the_low_target): Add new members.
18530 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18531 (i386_store_fpxregset): Constify.
18532 (target_regsets): Add new kind identifier.
18533 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18534 (i386_set_pc): Add debugging.
18535 (i386_breakpoint_at): New function.
18536 (the_low_target): Add new members.
18537 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18538 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
18539 (mips_breakpoint_at): New.
18540 (the_low_target): Add new members.
18541 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
18542 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
18543 (the_low_target): Add new members.
18544 * linux-sh-low.c (sh_get_pc, sh_set_pc)
18545 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
18546 (the_low_target): Add new members.
18547 * linux-x86-64-low.c (target_regsets): Add new kind
18550 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
18552 From Martin Pool <mbp@samba.org>:
18553 * server.c (gdbserver_usage): New function.
18556 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
18558 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
18559 stop_at -> stop_pc.
18561 2002-05-04 Andrew Cagney <ac131313@redhat.com>
18563 * Makefile.in: Remove obsolete code.
18565 2002-04-24 Michal Ludvig <mludvig@suse.cz>
18567 * linux-low.c (regsets_fetch_inferior_registers),
18568 (regsets_store_inferior_registers): Removed cast to int from
18570 * regcache.h: Added declaration of struct inferior_info.
18572 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18574 * inferiors.c (struct inferior_info): Add regcache_data.
18575 (add_inferior): Call create_register_cache.
18576 (clear_inferiors): Call free_register_cache.
18577 (inferior_regcache_data, set_inferior_regcache_data): New functions.
18578 * regcache.c (struct inferior_regcache_data): New.
18579 (registers): Remove.
18580 (get_regcache): New function.
18581 (create_register_cache, free_register_cache): New functions.
18582 (set_register_cache): Don't initialize the register cache here.
18583 (registers_to_string, registers_from_string, register_data): Call
18585 * regcache.h: Add prototypes.
18586 * server.h: Likewise.
18588 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
18590 * mem-break.c: New file.
18591 * mem-break.h: New file.
18592 * Makefile.in: Add mem-break.o rule; update server.h
18594 * inferiors.c (struct inferior_info): Add target_data
18596 (clear_inferiors): Free target_data member if set.
18597 (inferior_target_data, set_inferior_target_data): New functions.
18598 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
18599 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
18600 * linux-low.c (linux_bp_reinsert): New variable.
18601 (struct inferior_linux_data): New.
18602 (linux_create_inferior): Use set_inferior_target_data.
18603 (linux_attach): Likewise. Call add_inferior.
18604 (linux_wait_for_one_inferior): New function.
18605 (linux_wait): Call it.
18606 (linux_write_memory): Add const.
18607 (initialize_low): Call set_breakpoint_data.
18608 * linux-low.h (struct linux_target_ops): Add breakpoint
18610 * server.c (attach_inferior): Remove extra add_inferior
18612 * server.h: Include mem-break.h. Update inferior.c
18614 * target.c (read_inferior_memory)
18615 (write_inferior_memory): New functions.
18616 * target.h (read_inferior_memory)
18617 (write_inferior_memory): Change macros to prototypes.
18618 (struct target_ops): Update comments. Add const to write_memory
18621 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
18623 * linux-low.c (usr_store_inferior_registers): Support
18624 registers which are allowed to fail to store.
18625 * linux-low.h (linux_target_ops): Likewise.
18626 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
18627 (ppc_cannot_store_register): FPSCR may not be storable.
18629 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18631 * server.h: Include <string.h> if HAVE_STRING_H.
18632 * ChangeLog: Correct paths in last ChangeLog entry.
18634 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18636 * linux-low.h: Remove obsolete prototypes.
18637 (struct linux_target_ops): New.
18638 (extern the_low_target): New.
18639 * linux-low.c (num_regs, regmap): Remove declarations.
18640 (register_addr): Use the_low_target explicitly.
18641 (fetch_register): Likewise.
18642 (usr_fetch_inferior_registers): Likewise.
18643 (usr_store_inferior_registers): Likewise.
18644 * linux-arm-low.c (num_regs): Remove.
18645 (arm_num_regs): Define.
18646 (arm_regmap): Renamed from regmap, made static.
18647 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
18649 (arm_cannot_store_register): Renamed from cannot_store_register,
18651 (the_low_target): New.
18652 * linux-i386-low.c (num_regs): Remove.
18653 (i386_num_regs): Define.
18654 (i386_regmap): Renamed from regmap, made static.
18655 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
18657 (i386_cannot_store_register): Renamed from cannot_store_register,
18659 (the_low_target): New.
18660 * linux-ia64-low.c (num_regs): Remove.
18661 (ia64_num_regs): Define.
18662 (ia64_regmap): Renamed from regmap, made static.
18663 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
18665 (ia64_cannot_store_register): Renamed from cannot_store_register,
18667 (the_low_target): New.
18668 * linux-m68k-low.c (num_regs): Remove.
18669 (m68k_num_regs): Define.
18670 (m68k_regmap): Renamed from regmap, made static.
18671 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
18673 (m68k_cannot_store_register): Renamed from cannot_store_register,
18675 (the_low_target): New.
18676 * linux-mips-low.c (num_regs): Remove.
18677 (mips_num_regs): Define.
18678 (mips_regmap): Renamed from regmap, made static.
18679 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
18681 (mips_cannot_store_register): Renamed from cannot_store_register,
18683 (the_low_target): New.
18684 * linux-ppc-low.c (num_regs): Remove.
18685 (ppc_num_regs): Define.
18686 (ppc_regmap): Renamed from regmap, made static.
18687 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
18689 (ppc_cannot_store_register): Renamed from cannot_store_register,
18691 (the_low_target): New.
18692 * linux-s390-low.c (num_regs): Remove.
18693 (s390_num_regs): Define.
18694 (s390_regmap): Renamed from regmap, made static.
18695 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
18697 (s390_cannot_store_register): Renamed from cannot_store_register,
18699 (the_low_target): New.
18700 * linux-sh-low.c (num_regs): Remove.
18701 (sh_num_regs): Define.
18702 (sh_regmap): Renamed from regmap, made static.
18703 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
18705 (sh_cannot_store_register): Renamed from cannot_store_register,
18707 (the_low_target): New.
18708 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
18709 (the_low_target): New.
18711 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18713 * Makefile.in: Add stamp-h target.
18714 * configure.in: Create stamp-h.
18715 * configure: Regenerated.
18717 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18719 * inferiors.c: New file.
18720 * target.c: New file.
18721 * target.h: New file.
18722 * Makefile.in: Add target.o and inferiors.o. Update
18724 * linux-low.c (inferior_pid): New static variable,
18725 moved from server.c.
18726 (linux_create_inferior): Renamed from create_inferior.
18727 Call add_inferior. Return 0 on success instead of a PID.
18728 (linux_attach): Renamed from myattach.
18729 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
18730 (linux_thread_alive): Renamed from mythread_alive.
18731 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
18733 (linux_resume): Renamed from myresume. Add missing ``return 0''.
18734 (regsets_store_inferior_registers): Correct error message.
18735 Add missing ``return 0''.
18736 (linux_fetch_registers): Renamed from fetch_inferior_registers.
18737 (linux_store_registers): Renamed from store_inferior_registers.
18738 (linux_read_memory): Renamed from read_inferior_memory.
18739 (linux_write_memory): Renamed from write_inferior_memory.
18740 (linux_target_ops): New structure.
18741 (initialize_low): Call set_target_ops ().
18742 * remote-utils.c (unhexify): New function.
18743 (hexify): New function.
18744 (input_interrupt): Send signals to ``signal_pid''.
18745 * server.c (inferior_pid): Remove.
18746 (start_inferior): Update create_inferior call.
18747 (attach_inferior): Call add_inferior.
18748 (handle_query): New function.
18749 (main): Call handle_query for `q' packets.
18750 * server.h: Include "target.h". Remove obsolete prototypes.
18751 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18753 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18755 * Makefile.in: Add WARN_CFLAGS. Update configury
18757 * configure.in: Check for <string.h>
18758 * configure: Regenerate.
18759 * config.in: Regenerate.
18760 * gdbreplay.c: Include needed system headers.
18761 (remote_open): Remove strchr prototype.
18762 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18763 * regcache.c (supply_register): Change buf argument to const void *.
18764 (supply_register_by_name): Likewise.
18765 (collect_register): Change buf argument to void *.
18766 (collect_register_by_name): Likewise.
18767 * regcache.h: Add missing prototypes.
18768 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18769 * server.c (handle_query): New function.
18770 (attached): New static variable, moved out of main.
18771 (main): Quiet longjmp clobber warnings.
18772 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18773 * utils.c (error): Remove NORETURN.