gdbserver: turn fast tracepoint target ops into methods
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's install_fast_tracepoint_jump_pad
4 and get_min_fast_tracepoint_insn_len ops into methods of
5 process_target.
6
7 * target.h (struct process_stratum_target): Remove the target ops.
8 (class process_target): Add the target ops. Also add
9 'supports_fast_tracepoints'.
10 (target_supports_fast_tracepoints): Update the macro.
11 (target_get_min_fast_tracepoint_insn_len): Update the macro.
12 (install_fast_tracepoint_jump_pad): Update and rename the macro
13 to ...
14 (target_install_fast_tracepoint_jump_pad): ... this.
15 * target.cc (process_target::supports_fast_tracepoints): Define.
16 (process_target::install_fast_tracepoint_jump_pad): Define.
17 (process_target::get_min_fast_tracepoint_insn_len): Define.
18
19 Update the derived classes and callers below.
20
21 * tracepoint.cc (install_fast_tracepoint): Update.
22 * linux-low.cc (linux_target_ops): Update.
23 (linux_process_target::supports_fast_tracepoints): Define.
24 (linux_install_fast_tracepoint_jump_pad): Turn into ...
25 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
26 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
27 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
28 * linux-low.h (class linux_process_target): Update.
29 * lynx-low.cc (lynx_target_ops): Update.
30 * nto-low.cc (nto_target_ops): Update.
31 * win32-low.cc (win32_target_ops): Update.
32
33 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
34
35 Turn process_stratum_target's stabilize_threads op into a
36 method of process_target.
37
38 * target.h (struct process_stratum_target): Remove the target op.
39 (class process_target): Add the target op.
40 (target_stabilize_threads): Update the macro.
41 * target.cc (process_target::stabilize_threads): Define.
42
43 Update the derived classes and callers below.
44
45 * server.cc (handle_status): Update.
46 * tracepoint.cc (cmd_qtdp): Update.
47 (cmd_qtstart): Update.
48 * linux-low.cc (linux_target_ops): Update.
49 (linux_stabilize_threads): Turn into ...
50 (linux_process_target::stabilize_threads): ... this.
51 (linux_wait_1): Update.
52 * linux-low.h (class linux_process_target): Update.
53 * lynx-low.cc (lynx_target_ops): Update.
54 * nto-low.cc (nto_target_ops): Update.
55 * win32-low.cc (win32_target_ops): Update.
56
57 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
58
59 Turn process_stratum_target's pause_all and unpause_all ops
60 into methods of process_target.
61
62 * target.h (struct process_stratum_target): Remove the target ops.
63 (class process_target): Add the target ops.
64 (pause_all): Update the macro and rename to...
65 (target_pause_all): ... this.
66 (unpause_all): Update the macro and rename to...
67 (target_unpause_all): ... this.
68 * target.cc (process_target::pause_all): Define.
69 (process_target::unpause_all): Define.
70
71 Update the derived classes and callers below.
72
73 * server.cc (handle_status): Update.
74 * tracepoint.cc (clear_installed_tracepoints): Update.
75 (cmd_qtdp): Update.
76 (cmd_qtstart): Update.
77 (stop_tracing): Update.
78 (cmd_qtstatus): Update.
79 (upload_fast_traceframes): Update.
80 (run_inferior_command): Update.
81 * linux-low.cc (linux_target_ops): Update.
82 (linux_pause_all): Turn into ...
83 (linux_process_target::pause_all): ... this.
84 (linux_unpause_all): Turn into ...
85 (linux_process_target::unpause_all): ... this.
86 (linux_process_target::prepare_to_access_memory): Update.
87 (linux_process_target::done_accessing_memory): Update.
88 * linux-low.h (class linux_process_target): Update.
89 * lynx-low.cc (lynx_target_ops): Update.
90 * nto-low.cc (nto_target_ops): Update.
91 * win32-low.cc (win32_target_ops): Update.
92
93 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
94
95 Turn process_stratum_target's get_tib_address op into a method of
96 process_target.
97
98 * target.h (struct process_stratum_target): Remove the target op.
99 (class process_target): Add the target op. Also add
100 'supports_get_tib_address'.
101 * target.cc (process_target::get_tib_address): Define.
102 (process_target::supports_get_tib_address): Define.
103
104 Update the derived classes and callers below.
105
106 * server.cc (handle_query): Update.
107 * linux-low.cc (win32_target_ops): Update.
108 * lynx-low.cc (lynx_target_ops): Update.
109 * nto-low.cc (nto_target_ops): Update.
110 * win32-low.cc (win32_target_ops): Update.
111 (win32_process_target::supports_get_tib_address): Define.
112 (win32_get_tib_address): Turn into ...
113 (win32_process_target::get_tib_address): ... this.
114 * win32-low.h (class win32_process_target): Update.
115
116 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
117
118 Turn process_stratum_target's thread_stopped op into a method of
119 process_target.
120
121 * target.h (struct process_stratum_target): Remove the target op.
122 (class process_target): Add the target op. Also add
123 'supports_thread_stopped'.
124 (target_thread_stopped): Update the macro.
125 * target.cc (process_target::thread_stopped): Define.
126 (process_target::supports_thread_stopped): Define.
127 (prepare_to_access_memory): Update.
128
129 Update the derived classes and callers below.
130
131 * server.cc (queue_stop_reply_callback): Update.
132 * linux-low.cc (linux_target_ops): Update.
133 (linux_process_target::supports_thread_stopped): Define.
134 (linux_thread_stopped): Turn into ...
135 (linux_process_target::thread_stopped): ... this.
136 * linux-low.h (class linux_process_target): Update.
137 * lynx-low.cc (lynx_target_ops): Update.
138 * nto-low.cc (nto_target_ops): Update.
139 * win32-low.cc (win32_target_ops): Update.
140
141 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
142
143 Turn process_stratum_target's read_pc and write_pc ops into
144 methods of process_target.
145
146 * target.h (struct process_stratum_target): Remove the target ops.
147 (class process_target): Add the target ops.
148 * target.cc (process_target::read_pc): Define.
149 (process_target::write_pc): Define.
150
151 Update the derived classes and callers below.
152
153 * regcache.cc (regcache_read_pc): Update.
154 (regcache_write_pc): Update.
155 * linux-low.cc (linux_target_ops): Update.
156 (linux_read_pc): Turn into ...
157 (linux_process_target::read_pc): ... this.
158 (linux_write_pc): Turn into ...
159 (linux_process_target::write_pc): ... this.
160 * linux-low.h (class linux_process_target): Update.
161 * lynx-low.cc (lynx_target_ops): Update.
162 * nto-low.cc (nto_target_ops): Update.
163 * win32-low.cc (win32_target_ops): Update.
164
165 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
166
167 Turn process_stratum_target's supports_tracepoints op into a
168 method of process_target.
169
170 * target.h (struct process_stratum_target): Remove the target op.
171 (class process_target): Add the target op.
172 (target_supports_tracepoints): Update the macro.
173 * target.cc (process_target::supports_tracepoints): Define.
174
175 Update the derived classes and callers below.
176
177 * linux-low.cc (linux_target_ops): Update.
178 (linux_supports_tracepoints): Turn into ...
179 (linux_process_target::supports_tracepoints): ... this.
180 * linux-low.h (class linux_process_target): Update.
181 * lynx-low.cc (lynx_target_ops): Update.
182 * nto-low.cc (nto_target_ops): Update.
183 * win32-low.cc (win32_target_ops): Update.
184
185 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
186
187 Turn process_stratum_target's process_qsupported op into a method
188 of process_target.
189
190 * target.h (struct process_stratum_target): Remove the target op.
191 (class process_target): Add the target op.
192 (target_process_qsupported): Update the macro.
193 * target.cc (process_target::process_qsupported): Define.
194
195 Update the derived classes and callers below.
196
197 * linux-low.cc (linux_target_ops): Update.
198 (linux_process_qsupported): Turn into ...
199 (linux_process_target::process_qsupported): ... this.
200 * linux-low.h (class linux_process_target): Update.
201 * lynx-low.cc (lynx_target_ops): Update.
202 * nto-low.cc (nto_target_ops): Update.
203 * win32-low.cc (win32_target_ops): Update.
204
205 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
206
207 Turn process_stratum_target's read_loadmap op into a method of
208 process_target.
209
210 * target.h (struct process_stratum_target): Remove the target op.
211 (class process_target): Add the target op. Also add
212 'supports_read_loadmap'.
213 * target.cc (process_target::read_loadmap): Define.
214 (process_target::supports_read_loadmap): Define.
215
216 Update the derived classes and callers below.
217
218 * server.cc (handle_qxfer_fdpic): Update.
219 (handle_query): Update.
220 * linux-low.cc (linux_target_ops): Update.
221 (linux_process_target::supports_read_loadmap): Define.
222 (linux_read_loadmap): Turn into ...
223 (linux_process_target::read_loadmap): ... this.
224 * linux-low.h (class linux_process_target): Update.
225 * lynx-low.cc (lynx_target_ops): Update.
226 * nto-low.cc (nto_target_ops): Update.
227 * win32-low.cc (win32_target_ops): Update.
228
229 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
230
231 Turn process_stratum_target's core_of_thread op into a method of
232 process_target.
233
234 * target.h (struct process_stratum_target): Remove the target op.
235 (class process_target): Add the target op.
236 (target_core_of_thread): Update the macro.
237 * target.cc (process_target::core_of_thread): Define.
238
239 Update the derived classes and callers below.
240
241 * linux-low.cc (linux_target_ops): Update.
242 (linux_process_target::core_of_thread): Define.
243 * linux-low.h (class linux_process_target): Update.
244 * lynx-low.cc (lynx_target_ops): Update.
245 * nto-low.cc (nto_target_ops): Update.
246 * win32-low.cc (win32_target_ops): Update.
247
248 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
249
250 Turn process_stratum_target's handle_monitor_command op into a
251 method of process_target.
252
253 * target.h (struct process_stratum_target): Remove the target op.
254 (class process_target): Add the target op.
255 (target_handle_monitor_command): Update the macro.
256 * target.cc (process_target::handle_monitor_command): Define.
257
258 Update the derived classes and callers below.
259
260 * server.cc (handle_query): Update.
261 * linux-low.cc (linux_target_ops): Update.
262 (linux_process_target::handle_monitor_command): Define.
263 * linux-low.h (class linux_process_target): Update.
264 * lynx-low.cc (lynx_target_ops): Update.
265 * nto-low.cc (nto_target_ops): Update.
266 * win32-low.cc (win32_target_ops): Update.
267
268 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
269
270 Turn process_stratum_target's handle_new_gdb_connection op into a
271 method of process_target.
272
273 * target.h (struct process_stratum_target): Remove the target op.
274 (class process_target): Add the target op.
275 (target_handle_new_gdb_connection): Update the macro.
276 * target.cc (process_target::handle_new_gdb_connection): Define.
277
278 Update the derived classes and callers below.
279
280 * linux-low.cc (linux_target_ops): Update.
281 (linux_handle_new_gdb_connection): Turn into ...
282 (linux_process_target::handle_new_gdb_connection): ... this.
283 * linux-low.h (class linux_process_target): Update.
284 * lynx-low.cc (lynx_target_ops): Update.
285 * nto-low.cc (nto_target_ops): Update.
286 * win32-low.cc (win32_target_ops): Update.
287
288 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
289
290 Turn process_stratum_target's supports_fork_events,
291 supports_vfork_events, and supports_exec_events ops into methods
292 of process_target.
293
294 * target.h (struct process_stratum_target): Remove the target ops.
295 (class process_target): Add the target ops.
296 (target_supports_fork_events): Update the macro.
297 (target_supports_vfork_events): Update the macro.
298 (target_supports_exec_events): Update the macro.
299 * target.cc (process_target::supports_fork_events): Define.
300 (process_target::supports_vfork_events): Define.
301 (process_target::supports_exec_events): Define.
302
303 Update the derived classes and callers below.
304
305 * linux-low.cc (linux_target_ops): Update.
306 (linux_supports_fork_events): Turn into ...
307 (linux_process_target::supports_fork_events): ... this.
308 (linux_supports_vfork_events): Turn into ...
309 (linux_process_target::supports_vfork_events): ... this.
310 (linux_supports_exec_events): Turn into ...
311 (linux_process_target::supports_exec_events): ... this.
312 * linux-low.h (class linux_process_target): Update.
313 * lynx-low.cc (lynx_target_ops): Update.
314 * nto-low.cc (nto_target_ops): Update.
315 * win32-low.cc (win32_target_ops): Update.
316
317 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
318
319 Turn process_stratum_target's supports_multi_process op into a
320 method of process_target.
321
322 * target.h (struct process_stratum_target): Remove the target op.
323 (class process_target): Add the target op.
324 * target.cc (process_target::supports_multi_process): Define.
325 (target_supports_multi_process): Update.
326
327 Update the derived classes and callers below.
328
329 * linux-low.cc (linux_target_ops): Update.
330 (linux_supports_multi_process): Turn into ...
331 (linux_process_target::supports_multi_process): ... this.
332 * linux-low.h (class linux_process_target): Update.
333 * lynx-low.cc (lynx_target_ops): Update.
334 * nto-low.cc (nto_target_ops): Update.
335 * win32-low.cc (win32_target_ops): Update.
336
337 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
338
339 Turn process_stratum_target's supports_non_stop, async, and
340 start_non_stop ops into methods of process_target.
341
342 * target.h (struct process_stratum_target): Remove the target ops.
343 (class process_target): Add the target ops.
344 (target_supports_non_stop): Update the macro.
345 (target_async): Update the macro.
346 (start_non_stop): Remove declaration.
347 * target.cc (process_target::supports_non_stop): Define.
348 (process_target::async): Define.
349 (process_target::start_non_stop): Define.
350 (start_non_stop): Remove.
351
352 Update the derived classes and callers below.
353
354 * server.cc (handle_qxfer_siginfo): Update.
355 (handle_query): Update.
356 * linux-low.cc (linux_target_ops): Update.
357 (linux_supports_non_stop): Turn into ...
358 (linux_process_target::supports_non_stop): ... this.
359 (linux_async): Turn into ...
360 (linux_process_target::async): ... this.
361 (linux_start_non_stop): Turn into ...
362 (linux_process_target::start_non_stop): ... this.
363 * linux-low.h (class linux_process_target): Update.
364 * lynx-low.cc (lynx_target_ops): Update.
365 * nto-low.cc (nto_target_ops): Update.
366 (nto_supports_non_stop): Remove; rely on the default behavior
367 instead.
368 * win32-low.cc (win32_target_ops): Update.
369
370 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
371
372 Turn process_stratum_target's qxfer_siginfo op into a method of
373 process_target.
374
375 * target.h (struct process_stratum_target): Remove the target op.
376 (class process_target): Add the target op. Also add
377 'supports_qxfer_siginfo'.
378 * target.cc (process_target::qxfer_siginfo): Define.
379 (process_target::supports_qxfer_siginfo): Define.
380
381 Update the derived classes and callers below.
382
383 * server.cc (handle_qxfer_siginfo): Update.
384 (handle_query): Update.
385 * linux-low.cc (linux_target_ops): Update.
386 (linux_process_target::supports_qxfer_siginfo): Define.
387 (linux_xfer_siginfo): Turn into ...
388 (linux_process_target::qxfer_siginfo): ... this.
389 * linux-low.h (class linux_process_target): Update.
390 * lynx-low.cc (lynx_target_ops): Update.
391 * nto-low.cc (nto_target_ops): Update.
392 * win32-low.cc (win32_target_ops): Update.
393
394 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
395
396 Turn process_stratum_target's qxfer_osdata op into a method of
397 process_target.
398
399 * target.h (struct process_stratum_target): Remove the target op.
400 (class process_target): Add the target op. Also add
401 'supports_qxfer_osdata'.
402 * target.cc (process_target::qxfer_osdata): Define.
403 (process_target::supports_qxfer_osdata): Define.
404
405 Update the derived classes and callers below.
406
407 * server.cc (handle_qxfer_osdata): Update.
408 (handle_query): Update.
409 * linux-low.cc (linux_target_ops): Update.
410 (linux_process_target::supports_qxfer_osdata): Define.
411 (linux_qxfer_osdata): Turn into ...
412 (linux_process_target::qxfer_osdata): ... this.
413 * linux-low.h (class linux_process_target): Update.
414 * lynx-low.cc (lynx_target_ops): Update.
415 * nto-low.cc (nto_target_ops): Update.
416 * win32-low.cc (win32_target_ops): Update.
417
418 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
419
420 Turn process_stratum_target's hostio_last_error op into a
421 method of process_target.
422
423 * target.h (struct process_stratum_target): Remove the target op.
424 (class process_target): Add the target op.
425 * target.cc: Add "hostio.h" to includes.
426 (process_target::hostio_last_error): Define.
427
428 Update the derived classes and callers below.
429
430 * hostio.cc (hostio_error): Update.
431 * linux-low.cc: Remove "hostio.h" from includes.
432 (linux_target_ops): Update.
433 * lynx-low.cc (lynx_target_ops): Update.
434 * nto-low.cc (nto_target_ops): Update.
435 * win32-low.h (class win32_process_target): Update.
436 * win32-low.cc (win32_target_ops): Update.
437 (wince_hostio_last_error): Turn into ...
438 (win32_process_target::hostio_last_error): ... this.
439
440 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
441
442 Turn process_stratum_target's get_tls_address op into a method of
443 process_target.
444
445 * target.h (struct process_stratum_target): Remove the target op.
446 (class process_target): Add the target op. Also add
447 'supports_get_tls_address'.
448 * target.cc (process_target::get_tls_address): Define.
449 (process_target::supports_get_tls_address): Define.
450
451 Update the derived classes and callers below.
452
453 * server.cc (handle_query): Update.
454 * linux-low.cc (linux_target_ops): Update.
455 (linux_process_target::supports_get_tls_address): Define.
456 (linux_process_target::get_tls_address): Define.
457 * linux-low.h (class linux_process_target): Update.
458 * lynx-low.cc (lynx_target_ops): Update.
459 * nto-low.cc (nto_target_ops): Update.
460 * win32-low.cc (win32_target_ops): Update.
461
462 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
463
464 Turn process_stratum_target's read_offsets op into a method of
465 process_target.
466
467 * target.h (struct process_stratum_target): Remove the target op.
468 (class process_target): Add the target op. Also add
469 'supports_read_offsets'.
470 * target.cc (process_target::read_offsets): Define.
471 (process_target::supports_read_offsets): Define.
472
473 Update the derived classes and callers below.
474
475 * server.cc (handle_query): Update.
476 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
477 (linux_target_ops): Update.
478 (linux_process_target::supports_read_offsets): Define.
479 (linux_read_offsets): Turn into ...
480 (linux_process_target::read_offsets): ... this.
481 * linux-low.h (class linux_process_target): Update.
482 * lynx-low.cc (lynx_target_ops): Update.
483 * nto-low.cc (nto_target_ops): Update.
484 * win32-low.cc (win32_target_ops): Update.
485
486 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
487
488 Turn process_stratum_target's stopped_by_watchpoint and
489 stopped_data_address ops into methods of process_target.
490
491 * target.h (struct process_stratum_target): Remove the target ops.
492 (class process_target): Add the target ops.
493 * target.cc (process_target::stopped_by_watchpoint): Define.
494 (process_target::stopped_data_address): Define.
495
496 Update the derived classes and callers below.
497
498 * remote-utils.cc (prepare_resume_reply): Update.
499 * linux-low.cc (linux_target_ops): Update.
500 (linux_stopped_by_watchpoint): Turn into ...
501 (linux_process_target::stopped_by_watchpoint): ... this.
502 (linux_stopped_data_address): Turn into ...
503 (linux_process_target::stopped_data_address): ... this.
504 * linux-low.h (class linux_process_target): Update.
505 * lynx-low.cc (lynx_target_ops): Update.
506 * nto-low.cc (nto_target_ops): Update.
507 (nto_stopped_by_watchpoint): Turn into ...
508 (nto_process_target::stopped_by_watchpoint): ... this.
509 (nto_stopped_data_address): Turn into ...
510 (nto_process_target::stopped_data_address): ... this.
511 * nto-low.h (class nto_process_target): Update.
512 * win32-low.cc (win32_target_ops): Update.
513 (win32_stopped_by_watchpoint): Turn into ...
514 (win32_process_target::stopped_by_watchpoint): ... this.
515 (win32_stopped_data_address): Turn into ...
516 (win32_process_target::stopped_data_address): ... this.
517 * win32-low.h (class win32_process_target): Update.
518
519 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
520
521 Turn process_stratum_target's supports_hardware_single_step op into
522 a method of process_target.
523
524 * target.h (struct process_stratum_target): Remove the target op.
525 (class process_target): Add the target op.
526 (target_supports_hardware_single_step): Update the macro.
527 (target_can_do_hardware_single_step): Remove declaration.
528 * target.cc (process_target::supports_hardware_single_step): Define.
529 (target_can_do_hardware_single_step): Remove.
530
531 Update the derived classes and callers below.
532
533 * linux-low.h (class linux_process_target): Update.
534 * linux-low.cc (linux_target_ops): Update.
535 (linux_supports_hardware_single_step): Turn into ...
536 (linux_process_target::supports_hardware_single_step): ... this.
537 * lynx-low.h (class lynx_process_target): Update.
538 * lynx-low.cc (lynx_target_ops): Update.
539 (lynx_process_target::supports_hardware_single_step): Define.
540 * nto-low.h (class nto_process_target): Update.
541 * nto-low.cc (nto_target_ops): Update.
542 (nto_process_target::supports_hardware_single_step): Define.
543 * win32-low.h (class win32_process_target): Update.
544 * win32-low.cc (win32_target_ops): Update.
545 (win32_process_target::supports_hardware_single_step): Define.
546
547 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
548
549 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
550 ops into methods of process_target.
551
552 * target.h (struct process_stratum_target): Remove the target ops.
553 (class process_target): Add the target ops.
554 (target_stopped_by_hw_breakpoint): Update the macro.
555 (target_supports_stopped_by_hw_breakpoint): Update the macro.
556 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
557 (process_target::supports_stopped_by_hw_breakpoint): Define.
558
559 Update the derived classes and callers below.
560
561 * linux-low.cc (linux_target_ops): Update.
562 (linux_stopped_by_hw_breakpoint): Turn into ...
563 (linux_process_target::stopped_by_hw_breakpoint): ... this.
564 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
565 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
566 * linux-low.h (class linux_process_target): Update.
567 * lynx-low.cc (lynx_target_ops): Update.
568 * nto-low.cc (nto_target_ops): Update.
569 * win32-low.cc (win32_target_ops): Update.
570
571 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
572
573 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
574 ops into methods of process_target.
575
576 * target.h (struct process_stratum_target): Remove the target ops.
577 (class process_target): Add the target ops.
578 (target_stopped_by_sw_breakpoint): Update the macro.
579 (target_supports_stopped_by_sw_breakpoint): Update the macro.
580 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
581 (process_target::supports_stopped_by_sw_breakpoint): Define.
582
583 Update the derived classes and callers below.
584
585 * linux-low.cc (linux_target_ops): Update.
586 (linux_stopped_by_sw_breakpoint): Turn into ...
587 (linux_process_target::stopped_by_sw_breakpoint): ... this.
588 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
589 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
590 * linux-low.h (class linux_process_target): Update.
591 * lynx-low.cc (lynx_target_ops): Update.
592 * nto-low.cc (nto_target_ops): Update.
593 * win32-low.cc (win32_target_ops): Update.
594
595 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
596
597 Turn process_stratum_target's insert_point and remove_point ops
598 into methods of process_target.
599
600 * target.h (struct process_stratum_target): Remove the target ops.
601 (class process_target): Add the target ops.
602 * target.cc (process_target::insert_point): Define.
603 (process_target::remove_point): Define.
604
605 Update the derived classes and callers below.
606
607 * mem-break.cc (set_raw_breakpoint_at): Update.
608 (delete_raw_breakpoint): Update.
609 (uninsert_raw_breakpoint): Update.
610 (reinsert_raw_breakpoint): Update.
611 * linux-low.cc (linux_target_ops): Update.
612 (linux_insert_point): Turn into ...
613 (linux_process_target::insert_point): ... this.
614 (linux_remove_point): Turn into ...
615 (linux_process_target::remove_point): ... this.
616 * linux-low.h (class linux_process_target): Update.
617 * lynx-low.cc (lynx_target_ops): Update.
618 * nto-low.cc (nto_target_ops): Update.
619 (nto_insert_point): Turn into ...
620 (nto_process_target::insert_point): ... this.
621 (nto_remove_point): Turn into ...
622 (nto_process_target::remove_point): ... this.
623 * nto-low.h (class nto_process_target): Update.
624 * win32-low.cc (win32_target_ops): Update.
625 (win32_insert_point): Turn into ...
626 (win32_process_target::insert_point): ... this.
627 (win32_remove_point): Turn into ...
628 (win32_process_target::remove_point): ... this.
629 * win32-low.h (class win32_process_target): Update.
630
631 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
632
633 Turn process_stratum_target's supports_z_point_type op into a
634 method of process_target.
635
636 * target.h (struct process_stratum_target): Remove the target op.
637 (class process_target): Add the target op.
638 * target.cc (process_target::supports_z_point_type): Define.
639
640 Update the derived classes and callers below.
641
642 * mem-break.cc (z_type_supported): Update.
643 * linux-low.cc (linux_target_ops): Update.
644 (linux_supports_z_point_type): Turn into ...
645 (linux_process_target::supports_z_point_type): ... this.
646 * linux-low.h (class linux_process_target): Update.
647 * lynx-low.cc (lynx_target_ops): Update.
648 * nto-low.cc (nto_target_ops): Update.
649 (nto_supports_z_point_type): Turn into ...
650 (nto_process_target::supports_z_point_type): ... this.
651 * nto-low.h (class nto_process_target): Update.
652 * win32-low.cc (win32_target_ops): Update.
653 (win32_supports_z_point_type): Turn into ...
654 (win32_process_target::supports_z_point_type): ... this.
655 * win32-low.h (class win32_process_target): Update.
656
657 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
658
659 Turn process_stratum_target's read_auxv op into a method of
660 process_target.
661
662 * target.h (class process_stratum_target): Remove the target op.
663 (struct process_target): Add the target op. Also add
664 'supports_read_auxv'.
665 * target.cc (process_target::read_auxv): Define.
666 (process_target::supports_read_auxv): Define.
667
668 Update the derived classes and callers below.
669
670 * server.cc (handle_qxfer_auxv): Update.
671 (handle_query): Update.
672 * linux-low.cc (linux_target_ops): Update.
673 (linux_process_target::supports_read_auxv): Define.
674 (linux_read_auxv): Turn into ...
675 (linux_process_target::read_auxv): ... this.
676 * linux-low.h (class linux_process_target): Update.
677 * lynx-low.cc (lynx_target_ops): Update.
678 * nto-low.cc (nto_target_ops): Update.
679 (nto_process_target::supports_read_auxv): Define.
680 (nto_read_auxv): Turn into ...
681 (nto_process_target::read_auxv): ... this.
682 * nto-low.h (class nto_process_target): Update.
683 * win32-low.cc (win32_target_ops): Update.
684
685 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
686
687 Turn process_stratum_target's request_interrupt op into a method of
688 process_target.
689
690 * target.h (struct process_stratum_target): Remove the target op.
691 (class process_target): Add the target op.
692
693 Update the derived classes and callers below.
694
695 * remote-utils.cc (putpkt_binary_1): Update.
696 (input_interrupt): Update.
697 (getpkt): Update.
698 * server.cc (handle_v_requests): Update.
699 * linux-low.cc (linux_target_ops): Update.
700 (linux_request_interrupt): Turn into ...
701 (linux_process_target::request_interrupt): ... this.
702 * linux-low.h (class linux_process_target): Update.
703 * lynx-low.cc (lynx_target_ops): Update.
704 (lynx_request_interrupt): Turn into ...
705 (lynx_process_target::request_interrupt): ... this.
706 * lynx-low.h (class lynx_process_target): Update.
707 * nto-low.cc (nto_target_ops): Update.
708 (nto_request_interrupt): Turn into ...
709 (nto_process_target::request_interrupt): ... this.
710 * nto-low.h (class nto_process_target): Update.
711 * win32-low.cc (win32_target_ops): Update.
712 (win32_request_interrupt): Turn into ...
713 (win32_process_target::request_interrupt): ... this.
714 * win32-low.h (class win32_process_target): Update.
715
716 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
717
718 Turn process_stratum_target's look_up_symbols op into a method of
719 process_target.
720
721 * target.h (struct process_stratum_target): Remove the target op.
722 (class process_target): Add the target op.
723 * target.cc (process_target::look_up_symbols): Define.
724
725 Update the derived classes and callers below.
726
727 * server.cc (handle_query): Update.
728 * linux-low.cc (linux_target_ops): Update.
729 (linux_look_up_symbols): Turn into ...
730 (linux_process_target::look_up_symbols): ... this.
731 * linux-low.h (class linux_process_target): Update.
732 * lynx-low.cc (lynx_target_ops): Update.
733 * nto-low.cc (nto_target_ops): Update.
734 * win32-low.cc (win32_target_ops): Update.
735
736 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
737
738 Turn process_stratum_target's read_memory and write_memory
739 ops into methods of process_target.
740
741 * target.h (struct process_stratum_target): Remove the target ops.
742 (class process_target): Add the target ops.
743
744 Update the derived classes and callers below.
745
746 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
747 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
748 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
749 (arm_get_syscall_trapinfo): Update.
750 * linux-cris-low.cc (cris_breakpoint_at): Update.
751 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
752 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
753 * linux-mips-low.cc (mips_breakpoint_at): Update.
754 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
755 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
756 * linux-sh-low.cc (sh_breakpoint_at): Update.
757 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
758 (sparc_store_gregset_from_stack): Update.
759 (sparc_breakpoint_at): Update.
760 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
761 * linux-tile-low.cc (tile_breakpoint_at): Update.
762 * linux-x86-low.cc (x86_breakpoint_at): Update.
763 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
764 * mem-brea.cc (insert_memory_breakpoint): Update.
765 (validate_inserted_breakpoint): Update.
766 * target.cc (read_inferior_memory): Update.
767 (target_write_memory): Update.
768 * linux-low.cc (linux_target_ops): Update.
769 (linux_read_memory): Make a wrapper around the read_memory target
770 op call.
771 (linux_process_target::read_memory): Rename from linux_read_memory.
772 (linux_write_memory): Turn into ...
773 (linux_process_target::write_memory): ... this.
774 * linux-low.h (class linux_process_target): Update.
775 * lynx-low.cc (lynx_target_ops): Update.
776 (lynx_read_memory): Turn into ...
777 (lynx_process_target::read_memory): ... this.
778 (lynx_write_memory): Turn into ...
779 (lynx_process_target::write_memory): ... this.
780 * lynx-low.h (class lynx_process_target): Update.
781 * nto-low.cc (nto_target_ops): Update.
782 (nto_read_memory): Turn into ...
783 (nto_process_target::read_memory): ... this.
784 (nto_write_memory): Turn into ...
785 (nto_process_target::write_memory): ... this.
786 * nto-low.h (class nto_process_target): Update.
787 * win32-low.cc (win32_target_ops): Update.
788 (win32_read_inferior_memory): Turn into ...
789 (win32_process_target::read_memory): ... this.
790 (win32_write_inferior_memory): Turn into ...
791 (win32_process_target::write_memory): ... this.
792 * win32-low.h (class win32_process_target): Update.
793
794 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
795
796 Turn process_stratum_target's prepare_to_access_memory and
797 done_accessing_memory ops into methods of process_target.
798
799 * target.h (struct process_stratum_target): Remove the target ops.
800 (class process_target): Add the target ops.
801 * target.cc (process_target::prepare_to_access_memory): Define.
802 (process_target::done_accessing_memory): Define.
803 (prepare_to_access_memory): Update.
804 (done_accessing_memory): Update.
805
806 Update the derived classes and callers below.
807
808 * linux-low.cc (linux_target_ops): Update.
809 (linux_prepare_to_access_memory): Turn into ...
810 (linux_process_target::prepare_to_access_memory): ... this.
811 (linux_done_accessing_memory): Turn into ...
812 (linux_process_target::done_accessing_memory): ... this.
813 * linux-low.h (class linux_process_target): Update.
814 * lynx-low.cc (lynx_target_ops): Update.
815 * nto-low.cc (nto_target_ops): Update.
816 * win32-low.cc (win32_target_ops): Update.
817
818 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
819
820 Turn process_stratum_target's fetch_registers and store_registers
821 ops into methods of process_target.
822
823 * target.h (struct process_stratum_target): Remove the target ops.
824 (class process_target): Add the target ops.
825 (fetch_inferior_registers): Update the macro.
826 (store_inferior_registers): Update the macro.
827
828 Update the derived classes and callers below.
829
830 * linux-low.cc (linux_target_ops): Update.
831 (linux_fetch_registers): Turn into ...
832 (linux_process_target::fetch_registers): ... this.
833 (linux_store_registers): Turn into ...
834 (linux_process_target::store_registers): ... this.
835 * linux-low.h (class linux_process_target): Update.
836 * lynx-low.cc (lynx_target_ops): Update.
837 (lynx_fetch_registers): Turn into ...
838 (lynx_process_target::fetch_registers): ... this.
839 (lynx_store_registers): Turn into ...
840 (lynx_process_target::store_registers): ... this.
841 * lynx-low.h (class lynx_process_target): Update.
842 * nto-low.cc (nto_target_ops): Update.
843 (nto_fetch_registers): Turn into ...
844 (nto_process_target::fetch_registers): ... this.
845 (nto_store_registers): Turn into ...
846 (nto_process_target::store_registers): ... this.
847 * nto-low.h (class nto_process_target): Update.
848 * win32-low.cc (win32_target_ops): Update.
849 (win32_fetch_inferior_registers): Turn into ...
850 (win32_process_target::fetch_registers): ... this.
851 (win32_store_inferior_registers): Turn into ...
852 (win32_process_target::store_registers): ... this.
853 * win32-low.h (class win32_process_target): Update.
854
855 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
856
857 Turn process_stratum_target's wait op into a method of
858 process_target.
859
860 * target.h (struct process_stratum_target): Remove the target op.
861 (class process_target): Add the target op.
862
863 Update the derived classes and callers below.
864
865 * target.cc (target_wait): Update.
866 * linux-low.cc (linux_target_ops): Update.
867 (linux_wait): Turn into ...
868 (linux_process_target::wait): ... this.
869 * linux-low.h (class linux_process_target): Update.
870 * lynx-low.cc (lynx_target_ops): Update.
871 (lynx_wait): Turn into ...
872 (lynx_process_target::wait): ... this.
873 * lynx-low.h (class lynx_process_target): Update.
874 * nto-low.cc (nto_target_ops): Update.
875 (nto_wait): Turn into ...
876 (nto_process_target::wait): ... this.
877 * nto-low.h (class nto_process_target): Update.
878 * win32-low.cc (win32_target_ops): Update.
879 (win32_wait): Turn into ...
880 (win32_process_target::wait): ... this.
881 (do_initial_child_stuff): Update.
882 * win32-low.h (class win32_process_target): Update.
883
884 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
885
886 Turn process_stratum_target's resume op into a method of
887 process_target.
888
889 * target.h (struct process_stratum_target): Remove the target op.
890 (class process_target): Add the target op.
891
892 Update the derived classes and callers below.
893
894 * server.cc (resume): Update.
895 * target.cc (target_stop_and_wait): Update.
896 (target_continue_no_signal): Update.
897 (target_continue): Update.
898 * linux-low.cc (linux_target_ops): Update.
899 (linux_resume): Turn into ...
900 (linux_process_target::resume): ... this.
901 * linux-low.h (class linux_process_target): Update.
902 * lynx-low.cc (lynx_target_ops): Update.
903 (lynx_resume): Turn into ...
904 (lynx_process_target::resume): ... this.
905 * lynx-low.h (class lynx_process_target): Update.
906 * nto-low.cc (nto_target_ops): Update.
907 (nto_resume): Turn into ...
908 (nto_process_target::resume): ... this.
909 * nto-low.h (class nto_process_target): Update.
910 * win32-low.cc (win32_target_ops): Update.
911 (win32_resume): Turn into ...
912 (win32_process_target::resume): ... this.
913 (win32_process_target::detach): Update.
914 (do_initial_child_stuff): Update.
915 * win32-low.h (class win32_process_target): Update.
916
917 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
918
919 Turn process_stratum_target's thread_alive op into a method of
920 process_target.
921
922 * target.h (struct process_stratum_target): Remove the target op.
923 (class process_target): Add the target op.
924 (mythread_alive): Update the macro.
925
926 Update the derived classes and callers below.
927
928 * linux-low.cc (linux_target_ops): Update.
929 (linux_thread_alive): Turn into ...
930 (linux_process_target::thread_alive): ... this.
931 (wait_for_sigstop): Update.
932 * linux-low.h (class linux_process_target): Update.
933 * lynx-low.cc (lynx_target_ops): Update.
934 (lynx_thread_alive): Turn into ...
935 (lynx_process_target::thread_alive): ... this.
936 * lynx-low.h (class lynx_process_target): Update.
937 * nto-low.cc (nto_target_ops): Update.
938 (nto_thread_alive): Turn into ...
939 (nto_process_target::thread_alive): ... this.
940 * nto-low.h (class nto_process_target): Update.
941 * win32-low.cc (win32_target_ops): Update.
942 (win32_thread_alive): Turn into ...
943 (win32_process_target::thread_alive): ... this.
944 * win32-low.h (class win32_process_target): Update.
945
946 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
947
948 Turn process_stratum_target's join op into a method of
949 process_target.
950
951 * target.h (struct process_stratum_target): Remove the target op.
952 (class process_target): Add the target op.
953 (join_inferior): Update the macro.
954
955 Update the derived classes and callers below.
956
957 * linux-low.cc (linux_target_ops): Update.
958 (linux_join): Turn into ...
959 (linux_process_target::join): ... this.
960 * linux-low.h (class linux_process_target): Update.
961 * lynx-low.cc (lynx_target_ops): Update.
962 (lynx_join): Turn into ...
963 (lynx_process_target::join): ... this.
964 * lynx-low.h (class lynx_process_target): Update.
965 * nto-low.cc (nto_target_ops): Update.
966 (nto_process_target::join): Define.
967 * nto-low.h (class nto_process_target): Update.
968 * win32-low.cc (win32_target_ops): Update.
969 (win32_join): Turn into ...
970 (win32_process_target::join): ... this.
971 * win32-low.h (class win32_process_target): Update.
972
973 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
974
975 Turn process_stratum_target's mourn op into a method of
976 process_target.
977
978 * target.h (struct process_stratum_target): Remove the target op.
979 (class process_target): Add the target op.
980
981 Update the derived classes and callers below.
982
983 * target.cc (target_mourn_inferior): Update.
984 * linux-low.cc (linux_target_ops): Update.
985 (linux_mourn): Turn into ...
986 (linux_process_target::mourn): ... this.
987 (handle_extended_wait): Update.
988 (linux_process_target::kill): Update.
989 (linux_process_target::detach): Update.
990 * linux-low.h (class linux_process_target): Update.
991 * lynx-low.cc (lynx_target_ops): Update.
992 (lynx_mourn): Turn into ...
993 (lynx_process_target::mourn): ... this.
994 * lynx-low.h (class lynx_process_target): Update.
995 * nto-low.cc (nto_target_ops): Update.
996 (nto_mourn): Turn into ...
997 (nto_process_target::mourn): ... this.
998 * nto-low.h (class nto_process_target): Update.
999 * win32-low.cc (win32_target_ops): Update.
1000 (win32_mourn): Turn into ...
1001 (win32_process_target::mourn): ... this.
1002 * win32-low.h (class win32_process_target): Update.
1003
1004 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1005
1006 Turn process_stratum_target's detach op into a method of
1007 process_target.
1008
1009 * target.h (struct process_stratum_target): Remove the target op.
1010 (class process_target): Add the target op.
1011 (detach_inferior): Update the macro.
1012
1013 Update the derived classes and callers below.
1014
1015 * linux-low.cc (linux_target_ops): Update.
1016 (linux_detach): Turn into ...
1017 (linux_process_target::detach): ... this.
1018 * linux-low.h (class linux_process_target): Update.
1019 * lynx-low.cc (lynx_target_ops): Update.
1020 (lynx_detach): Turn into ...
1021 (lynx_process_target::detach): ... this.
1022 * lynx-low.h (class lynx_process_target): Update.
1023 * nto-low.cc (nto_target_ops): Update.
1024 (nto_detach): Turn into ...
1025 (nto_process_target::detach): ... this.
1026 * nto-low.h (class nto_process_target): Update.
1027 * win32-low.cc (win32_target_ops): Update.
1028 (win32_detach): Turn into ...
1029 (win32_process_target::detach): ... this.
1030 * win32-low.h (class win32_process_target): Update.
1031
1032 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1033
1034 Turn process_stratum_target's kill op into a method of
1035 process_target.
1036
1037 * target.h (struct process_stratum_target): Remove the target op.
1038 (class process_target): Add the target op.
1039
1040 Update the derived classes and callers below.
1041
1042 * target.cc (kill_inferior): Update.
1043 * linux-low.cc (linux_target_ops): Update.
1044 (linux_kill): Turn into ...
1045 (linux_process_target::kill): ... this.
1046 * linux-low.h (class linux_process_target): Update.
1047 * lynx-low.cc (lynx_target_ops): Update.
1048 (lynx_kill): Turn into ...
1049 (lynx_process_target::kill): ... this.
1050 * lynx-low.h (class lynx_process_target): Update.
1051 * nto-low.cc (nto_target_ops): Update.
1052 (nto_kill): Turn into ...
1053 (nto_process_target::kill): ... this.
1054 * nto-low.h (class nto_process_target): Update.
1055 * win32-low.cc (win32_target_ops): Update.
1056 (win32_kill): Turn into ...
1057 (win32_process_target::kill): ... this.
1058 * win32-low.h (class win32_process_target): Update.
1059
1060 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1061
1062 Turn process_stratum_target's attach op into a method of
1063 process_target.
1064
1065 * target.h (struct process_stratum_target): Remove the target op.
1066 (class process_target): Add the target op.
1067 (myattach): Update the macro.
1068
1069 Update the derived classes and callers below.
1070
1071 * linux-low.cc (linux_target_ops): Update.
1072 (linux_attach): Turn into ...
1073 (linux_process_target::attach): ... this.
1074 * linux-low.h (class linux_process_target): Update.
1075 * lynx-low.cc (lynx_target_ops): Update.
1076 (lynx_attach): Turn into ...
1077 (lynx_process_target::attach): ... this.
1078 * lynx-low.h (class lynx_process_target): Update.
1079 * nto-low.cc (nto_target_ops): Update.
1080 (nto_attach): Turn into ...
1081 (nto_process_target::attach): ... this.
1082 * nto-low.h (class nto_process_target): Update.
1083 * win32-low.cc (win32_target_ops): Update.
1084 (win32_attach): Turn into ...
1085 (win32_process_target::attach): ... this.
1086 * win32-low.h (class win32_process_target): Update.
1087
1088 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1089
1090 Turn process_stratum_target's post_create_inferior op into a method
1091 of process_target.
1092
1093 * target.h (struct process_stratum_target): Remove the target op.
1094 (class process_target): Add the target op.
1095 (target_post_create_inferior): Update the macro.
1096 * target.cc (process_target::post_create_inferior): Define.
1097
1098 Update the derived classes and callers below.
1099
1100 * linux-low.cc (linux_target_ops): Update.
1101 (linux_post_create_inferior): Turn into ...
1102 (linux_process_target::post_create_inferior): ... this.
1103 * linux-low.h (class linux_process_target): Update.
1104 * lynx-low.cc (lynx_target_ops): Update.
1105 * nto-low.cc (nto_target_ops): Update.
1106 * win32-low.cc (win32_target_ops): Update.
1107
1108 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1109
1110 Turn process_stratum_target's create_inferior op into a method of
1111 process_target.
1112
1113 * target.h (struct process_stratum_target): Remove the target op.
1114 (class process_target): Add the target op.
1115 (create_inferior): Rename the macro to ...
1116 (target_create_inferior): ... this.
1117
1118 Update the derived classes and callers below.
1119
1120 * server.cc (handle_v_run): Update.
1121 (captured_main): Update.
1122 (process_serial_event): Update.
1123 * linux-low.cc (linux_target_ops): Update.
1124 (linux_create_inferior): Turn into ...
1125 (linux_process_target::create_inferior): ... this.
1126 * linux-low.h (class linux_process_target): Update.
1127 * lynx-low.cc (lynx_target_ops): Update.
1128 (lynx_create_inferior): Turn into ...
1129 (lynx_process_target::create_inferior): ... this.
1130 * lynx-low.h (class lynx_process_target): Update.
1131 * nto-low.cc (nto_target_ops): Update.
1132 (nto_create_inferior): Turn into ...
1133 (nto_process_target::create_inferior): ... this.
1134 * nto-low.h (class nto_process_target): Update.
1135 * win32-low.cc (win32_target_ops): Update.
1136 (win32_create_inferior): Turn into ...
1137 (win32_process_target::create_inferior): ... this.
1138 * win32-low.h (class win32_process_target): Update.
1139
1140 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1141
1142 * target.h (class process_target): New class definition.
1143 (struct process_stratum_target) <pt>: New field with type
1144 'process_target*'.
1145 * linux-low.h (class linux_process_target): Define as a derived
1146 class of 'process_target'.
1147 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1148 as the 'pt' field.
1149 * lynx-low.h (class lynx_process_target): Define as a derived
1150 class of 'process_target'.
1151 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1152 as the 'pt' field.
1153 * nto-low.h (class nto_process_target): Define as a derived
1154 class of 'process_target'.
1155 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1156 as the 'pt' field.
1157 * win32-low.h (class win32_process_target): Define as a derived
1158 class of 'process_target'.
1159 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1160 as the 'pt' field.
1161
1162 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1163
1164 * configure: Regenerate.
1165
1166 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1167 Andrew Burgess <andrew.burgess@embecosm.com>
1168
1169 * linux-riscv-low.cc: New file.
1170 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1171 and nat/riscv-linux-tdesc.c.
1172 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1173 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1174 Define.
1175
1176 2020-02-14 Tom Tromey <tom@tromey.com>
1177
1178 * acinclude.m4: Don't include acx_configure_dir.m4.
1179 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1180 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1181 (all, install-only, uninstall, clean-info, clean)
1182 (maintainer-clean): Don't recurse.
1183 (subdir_do, all-lib): Remove.
1184 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1185 (GNULIB_H): Remove.
1186 (generated_files): Update.
1187 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1188 * configure: Rebuild.
1189 * configure.ac: Don't configure gnulib or libiberty.
1190 (GNULIB): Update.
1191
1192 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1193
1194 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1195 preparing the command line for CreateProcess.
1196 (win32_create_inferior): Reflect the program name in debugging
1197 output that shows the process and its command line.
1198
1199 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1200
1201 * Makefile.in: Rename source files from .c to .cc.
1202 * %.c: Rename to %.cc.
1203 * configure.ac: Rename server.c to server.cc.
1204 * configure: Re-generate.
1205
1206 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1207
1208 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1209
1210 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1211
1212 * win32-low.c (win32_create_inferior): Set signal_pid.
1213
1214 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1215 Pedro Alves <palves@redhat.com>
1216
1217 Skip building gdbserver in a cross-configuration.
1218 * configure.srv: Set $gdbserver_host depending on whether $target
1219 is $host. Use $gdbserver_host instead of $host.
1220
1221 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1222
1223 * configure: Re-generate.
1224
1225 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1226
1227 * configure: Re-generate.
1228
1229 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1230
1231 * acinclude.m4: Update warning.m4 path.
1232
1233 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1234
1235 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1236 (handle_exception): Set siginfo_er.
1237 (win32_xfer_siginfo): New function.
1238
1239 2020-02-07 Tom Tromey <tom@tromey.com>
1240 Pedro Alves <palves@redhat.com>
1241
1242 * README: Update build documentation.
1243 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1244 host, not target.
1245 * configure.ac: Update paths.
1246 * configure: Rebuild.
1247 * acinclude.m4: Update paths.
1248 * Makefile.in: Update include paths.
1249 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1250 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1251 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1252 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1253 (%-generated.c): Update paths.
1254 * Move entire directory from ../gdb/gdbserver.
1255
1256 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1257
1258 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1259
1260 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1261
1262 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1263 assignment instead of srv_linux_obj.
1264
1265 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1266
1267 * server.c (handle_qxfer_libraries): Write segment-address with
1268 paddress.
1269
1270 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1271
1272 * Makefile.in (install-strip): New target.
1273 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1274 * aclocal.m4: Regenerate.
1275 * configure: Regenerate.
1276 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1277
1278 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1279
1280 * Makefile.in (SFILES): Adjust paths to point to real files.
1281 (OBS): Move waitstatus.o to target/waitstatus.o.
1282 (TAGS): Transform paths appropriately.
1283 (%.o): Rename to...
1284 (nat/%.o): ... this pattern rule.
1285 (%.o): Rename to...
1286 (target/%.o): ... this pattern rule.
1287 * configure.srv: Adjust paths throughout to include nat/ prefix
1288 with the revant files.
1289 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1290 * configure: Regenerate.
1291
1292 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1293
1294 * Makefile.in (TAGS): Remove config files from the recipe.
1295
1296 2020-01-14 Tom Tromey <tom@tromey.com>
1297
1298 * configure: Rebuild.
1299 * configure.ac: Remove any checks that were added to common.m4.
1300 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1301 lib-link.m4.
1302
1303 2020-01-14 Tom Tromey <tom@tromey.com>
1304
1305 * server.h: Include config.h.
1306 * gdbreplay.c: Include config.h.
1307 * configure: Rebuild.
1308 * configure.ac: Don't source common.host.
1309 * acinclude.m4: Update path.
1310 * Makefile.in (INCSUPPORT): New variable.
1311 (INCLUDE_CFLAGS): Add INCSUPPORT.
1312 (SFILES): Update paths.
1313 (version-generated.c): Update path to create-version.sh.
1314 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1315
1316 2020-01-14 Tom Tromey <tom@tromey.com>
1317
1318 * configure.ac (LIBS): Use WIN32APILIBS.
1319 (USE_WIN32API): Don't define.
1320 * configure: Rebuild.
1321
1322 2020-01-14 Tom Tromey <tom@tromey.com>
1323
1324 * configure: Rebuild.
1325
1326 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1327
1328 * Makefile.in (%-generated.c): Remove rule for files from
1329 regformats/i386.
1330
1331 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1332
1333 * configure: Re-generate.
1334
1335 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1336
1337 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1338 Define to static.
1339 * tracepoint.c (stop_tracing, flush_trace_buffer,
1340 about_to_request_buffer_space, get_trace_state_variable_value,
1341 set_trace_state_variable_value, gdb_collect): Add declaration.
1342
1343 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1344
1345 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1346 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1347 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1348 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1349 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1350 static.
1351
1352 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1353
1354 * inferiors.c: Include gdbsupport/common-inferior.h.
1355
1356 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1357
1358 * hostio-errno.c: Include hostio.h.
1359
1360 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1361
1362 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1363 prerequisite.
1364
1365 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1366
1367 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1368 * linux-arm-tdesc.h: Include arch/arm.h.
1369
1370 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1371
1372 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1373
1374 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1375
1376 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1377 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1378
1379 2020-01-10 Pedro Alves <palves@redhat.com>
1380
1381 * fork-child.c (post_fork_inferior): Pass target down to
1382 startup_inferior.
1383 * inferiors.c (switch_to_thread): Add process_stratum_target
1384 parameter.
1385 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1386 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1387 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1388 * remote-utils.c (prepare_resume_reply): Pass the target to
1389 switch_to_thread.
1390 * target.c (the_target): Now a process_stratum_target.
1391 (done_accessing_memory): Pass the target to switch_to_thread.
1392 (set_target_ops): Ajust to use process_stratum_target.
1393 * target.h (struct target_ops): Rename to ...
1394 (struct process_stratum_target): ... this.
1395 (the_target, set_target_ops): Adjust.
1396 (prepare_to_access_memory): Adjust comment.
1397 * win32-low.c (child_xfer_memory): Adjust to use
1398 process_stratum_target.
1399 (win32_target_ops): Now a process_stratum_target.
1400
1401 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1402 Pedro Alves <palves@redhat.com>
1403
1404 * win32-low.c (get_child_debug_event): Extract the fatal exception
1405 from the exit status and convert to the equivalent Posix signal
1406 number.
1407 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1408 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1409
1410 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1411
1412 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1413
1414 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1415
1416 * server.c (gdbserver_version): Change copyright year to 2020.
1417 * gdbreplay.c (gdbreplay_version): Likewise.
1418
1419 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1420
1421 * configure: Regenerate.
1422 * configure.ac: Quote variable arguments of test.
1423
1424 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1425
1426 * Makefile.in: Fix build with GNU Make 3.81
1427
1428 2019-12-16 Tom Tromey <tromey@adacore.com>
1429
1430 * server.c (get_exec_file): Constify result.
1431
1432 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1433
1434 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1435 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1436 * config.in: Regenerate.
1437 * configure: Regenerate.
1438 * configure.ac: Don't check for strerror.
1439 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1440 Call safe_strerror instead of strerror.
1441 * server.h (strerror): Remove this now-unnecessary declaration.
1442 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1443 strerror.
1444 (gdb_agent_helper_thread): Likewise.
1445 * utils.c (perror_with_name): Likewise.
1446
1447 2019-11-26 Tom Tromey <tom@tromey.com>
1448
1449 * configure, config.in: Rebuild.
1450
1451 2019-11-26 Tom Tromey <tom@tromey.com>
1452
1453 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1454 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1455 gdb_sigmask.
1456 * configure, config.in: Rebuild.
1457
1458 2019-11-26 Tom Tromey <tom@tromey.com>
1459
1460 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1461 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1462 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1463 * acinclude.m4: Include ax_pthread.m4.
1464 * config.in, configure: Rebuild.
1465
1466 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1467
1468 * debug.c (debug_set_output): Call safe_strerror instead of
1469 strerror.
1470 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1471 (linux_kill_one_lwp): Likewise.
1472 (linux_detach_one_lwp): Likewise.
1473 (linux_wait_for_event_filtered): Likewise.
1474 (store_register): Likewise.
1475 * lynx-low.c (lynx_attach): Likewise.
1476 * mem-break.c (insert_memory_breakpoint): Likewise.
1477 (remove_memory_breakpoint): Likewise.
1478 (delete_fast_tracepoint_jump): Likewise.
1479 (set_fast_tracepoint_jump): Likewise.
1480 (uninsert_fast_tracepoint_jumps_at): Likewise.
1481 (reinsert_fast_tracepoint_jumps_at): Likewise.
1482 * nto-low.c (nto_xfer_memory): Likewise.
1483 (nto_resume): Likewise.
1484
1485 2019-11-20 Luis Machado <luis.machado@linaro.org>
1486
1487 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1488 instead of register count.
1489 * tdesc.c (tdesc_contains_feature): New function.
1490 * tdesc.h (tdesc_contains_feature): New prototype.
1491
1492 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1493
1494 * Makefile.in: Add safe-strerror.c.
1495 * configure: Regenerate.
1496 * configure.ac: Don't source common.host.
1497
1498 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1499
1500 * config.in: Regenerate.
1501 * configure: Regenerate.
1502
1503 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1504
1505 * ax.c (ax_printf): Handle size_t_arg.
1506
1507 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1508
1509 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1510 * mi/mi-main.c (output_cores): Likewise.
1511 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1512 (linux_xfer_osdata_modules): Likewise.
1513 * remote.c (register_remote_support_xml): Likewise.
1514 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1515 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1516
1517 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1518
1519 * configure: Regenerate.
1520 * configure.ac: Remove check for strerror_r.
1521
1522 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1523
1524 * config.in: Regenerate.
1525 * configure: Regenerate.
1526 * configure.ac: Also check for strerror_r.
1527
1528 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1529
1530 * ax.h (debug_agent): Remove duplicate declaration.
1531
1532 2019-10-26 Tom de Vries <tdevries@suse.de>
1533
1534 * linux-aarch64-low.c: Fix typos in comments.
1535 * linux-arm-low.c: Same.
1536 * linux-low.c: Same.
1537 * linux-ppc-low.c: Same.
1538 * proc-service.c: Same.
1539 * regcache.h: Same.
1540 * server.c: Same.
1541 * tracepoint.c: Same.
1542 * win32-low.c: Same.
1543
1544 2019-10-25 Tom Tromey <tromey@adacore.com>
1545
1546 * utils.c (xstrdup): Remove.
1547
1548 2019-10-23 Tom Tromey <tom@tromey.com>
1549
1550 * configure, config.in: Rebuild.
1551
1552 2019-10-23 Tom Tromey <tom@tromey.com>
1553
1554 * configure: Rebuild.
1555 * acinclude.m4: Use m4_include, not sinclude.
1556
1557 2019-10-17 Tom Tromey <tromey@adacore.com>
1558
1559 * configure: Rebuild.
1560 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1561 in AC_CONFIG_FILES invocation.
1562 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1563 invocation.
1564
1565 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1566
1567 * server.c: Include xml-builtin.h.
1568 (get_xml_features): Don't declare xml_builtins here.
1569
1570 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1571
1572 * Makefile.in: Remove references to vec-ipa.o.
1573
1574 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1575
1576 * Makefile.in: Remove references to vec.c.
1577
1578 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1579
1580 * server.c (server_waiting): Change to bool.
1581 (extended_protocol): Likewise.
1582 (response_needed): Likewise.
1583 (exit_requested): Likewise.
1584 (run_once): Likewise.
1585 (report_no_resumed): Likewise.
1586 (non_stop): Likewise.
1587 (disable_packet_vCont): Likewise.
1588 (disable_packet_Tthread): Likewise.
1589 (disable_packet_qC): Likewise.
1590 (disable_packet_qfThreadInfo): Likewise.
1591 (handle_general_set): Update.
1592 (handle_detach): Update.
1593 (handle_monitor_command): Update.
1594 (handle_query): Update.
1595 (captured_main): Update.
1596 (process_serial_event): Update.
1597 * server.h (server_waiting): Change to bool.
1598 (disable_packet_vCont): Likewise.
1599 (disable_packet_Tthread): Likewise.
1600 (disable_packet_qC): Likewise.
1601 (disable_packet_qfThreadInfo): Likewise.
1602 (run_once): Likewise.
1603 (non_stop): Likewise.
1604 * target.c (target_stop_and_wait): Update.
1605
1606 2019-10-02 Tom Tromey <tromey@adacore.com>
1607
1608 * Makefile.in (SFILES): Add common-inferior.c.
1609 (OBS): Add common-inferior.o.
1610 * server.c (startup_with_shell): Don't define.
1611
1612 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1613
1614 * linux-low.c (linux_low_read_btrace): Update for change to
1615 std::vector.
1616
1617 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1618
1619 * debug.c (debug_threads): Remove comment in favor of the header.
1620 * debug.h (using_threads): Add declaration.
1621 (debug_threads): Add comment.
1622 * linux-aarch64-low.c: Include debug.h and remove declaration of
1623 debug_threads.
1624 * nto-low.c: Likewise.
1625 * remote-utils.c: Likewise.
1626 * thread-db.c: Likewise.
1627
1628 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1629
1630 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1631 and powerpc-cell64l-ipa.o.
1632 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1633 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1634 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1635 (spu*-*-*): Remove.
1636
1637 * spu-low.c: Remove file.
1638
1639 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1640 (parse_spufs_run): Remove.
1641 (ppc_get_pc): Remove Cell/B.E. support.
1642 (ppc_set_pc): Likewise.
1643 (ppc_breakpoint_at): Likewise.
1644 (ppc_arch_setup): Likewise.
1645 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1646 tdesc_powerpc_cell32l.
1647 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1648 or init_registers_powerpc_cell32l.
1649 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1650 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1651 or init_registers_powerpc_cell32l.
1652 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1653 (init_registers_powerpc_cell32l): Remove prototype.
1654 (init_registers_powerpc_cell64l): Likewise.
1655
1656 * target.h (struct target_ops): Remove qxfer_spu member.
1657 * server.c (handle_qxfer_spu): Remove.
1658 (qxfer_packets): Remove entry for "spu".
1659 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1660 * linux-low.c (SPUFS_MAGIC): Remove.
1661 (spu_enumerate_spu_ids): Remove.
1662 (linux_qxfer_spu): Remove.
1663 (linux_target_ops): Remove qxfer_spu member.
1664 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1665 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1666 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1667
1668 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1669
1670 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1671 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1672 * config.in: Regenerate.
1673 * configure: Regenerate.
1674
1675 2019-08-15 Tom Tromey <tromey@adacore.com>
1676
1677 * target.c (target_write_memory): Use gdb::byte_vector.
1678
1679 2019-08-15 Tom Tromey <tromey@adacore.com>
1680
1681 * tracepoint.c (write_inferior_data_pointer)
1682 (write_inferior_integer, write_inferior_int8)
1683 (write_inferior_uinteger, m_tracepoint_action_download)
1684 (r_tracepoint_action_download, x_tracepoint_action_download)
1685 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1686 (download_agent_expr, download_tracepoint_1)
1687 (download_trace_state_variables, upload_fast_traceframes): Update.
1688 * server.c (gdb_write_memory): Update.
1689 * remote-utils.c (relocate_instruction): Update.
1690 * proc-service.c (ps_pdwrite): Update.
1691 * mem-break.c (remove_memory_breakpoint)
1692 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1693 (uninsert_fast_tracepoint_jumps_at)
1694 (reinsert_fast_tracepoint_jumps_at): Update.
1695 * linux-x86-low.c (append_insns)
1696 (i386_install_fast_tracepoint_jump_pad)
1697 (amd64_write_goto_address, i386_write_goto_address): Update.
1698 * linux-s390-low.c (append_insns, s390_write_goto_address):
1699 Update.
1700 * linux-ppc-low.c (ppc_relocate_instruction)
1701 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1702 (ppc_write_goto_address): Update.
1703 * linux-aarch64-low.c (append_insns): Update.
1704 * target.h (struct target_ops): Update.
1705 (write_inferior_memory): Don't declare.
1706 * target.c (target_write_memory): Rename from
1707 write_inferior_memory. Remove old target_write_memory.
1708
1709 2019-08-15 Tom Tromey <tromey@adacore.com>
1710
1711 * target.c (write_inferior_memory): Use std::vector.
1712
1713 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1714
1715 PR build/24886
1716 * configure.ac: Drop enable-libmcheck support.
1717 * configure, config.in: Rebuild.
1718 * acinclude.m4: Don't include it.
1719
1720 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1721
1722 * configure.srv: Remove Arm xml files.
1723
1724 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1725
1726 * configure.srv: Add new files. Remove xml generated files.
1727 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1728 registers.
1729 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1730 * linux-aarch32-tdesc.c: New file.
1731 * linux-aarch32-tdesc.h: New file.
1732 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1733 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1734 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1735 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1736 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1737 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1738 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1739 (arm_read_description): Call arm_linux_read_description.
1740 (initialize_low_arch): Don't init registers.
1741 * linux-arm-tdesc.c: New file.
1742 * linux-arm-tdesc.h: New file.
1743
1744 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1745
1746 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1747 Move counter inside for.
1748 (arm_read_description): Check ptrace earlier.
1749 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1750
1751 2019-07-09 Tom Tromey <tom@tromey.com>
1752
1753 * configure: Rebuild.
1754 * configure.ac: Change common to gdbsupport.
1755 * acinclude.m4: Change common to gdbsupport.
1756 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1757 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1758 common to gdbsupport.
1759 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1760 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1761 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1762 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1763 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1764 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1765 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1766 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1767 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1768 common to gdbsupport.
1769
1770 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1771
1772 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1773 defines.
1774 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1775
1776 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1777
1778 * configure.srv: Remove legacy xml.
1779 * linux-aarch64-low.c (initialize_low_arch): Remove
1780 initialize_low_tdesc call.
1781 * linux-aarch64-tdesc-selftest.c: Remove file.
1782 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1783 * linux-x86-low.c (initialize_low_arch): Remove
1784 initialize_low_tdesc call.
1785 * linux-x86-tdesc-selftest.c: Remove file.
1786 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1787
1788 2019-06-20 Tom de Vries <tdevries@suse.de>
1789
1790 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1791 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1792
1793 2019-06-19 Tom de Vries <tdevries@suse.de>
1794
1795 * debug.h (debug_write): Change return type to ssize_t.
1796 * debug.c (debug_write): Same.
1797
1798 2019-06-14 Tom Tromey <tom@tromey.com>
1799
1800 * configure.ac: Use new path to gnulib.
1801 * configure: Rebuild.
1802 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1803 to gnulib.
1804
1805 2019-06-11 Tom Tromey <tom@tromey.com>
1806
1807 * Makefile.in (SFILES): Add alloc.c.
1808 (OBS): Add alloc.o.
1809 (IPA_OBJS): Add alloc-ipa.o.
1810 (alloc-ipa.o): New target.
1811 (%.o: ../%.c): New pattern rule.
1812
1813 2019-06-10 Tom Tromey <tromey@adacore.com>
1814
1815 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1816 end warning with a newline.
1817 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1818 newline.
1819 * thread-db.c (attach_thread): Don't end warning with a newline.
1820 (thread_db_notice_clone): Likewise.
1821 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1822 newline.
1823 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1824 end warning with a newline.
1825
1826 2019-06-04 Pedro Alves <palves@redhat.com>
1827
1828 * server.c (captured_main): Use make_unique_xstrdup.
1829
1830 2019-06-02 Tom Tromey <tom@tromey.com>
1831
1832 * gdbreplay.c (fromhex): Remove.
1833 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1834
1835 2019-05-29 Tom Tromey <tromey@adacore.com>
1836
1837 * configure: Rebuild.
1838
1839 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1840
1841 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1842 sign extension code on 32-bit builds.
1843
1844 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1845
1846 * remote-utils.c:
1847 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1848
1849 2019-04-19 Tom Tromey <tom@tromey.com>
1850
1851 * server.c (struct vstop_notif): Derive from notif_event.
1852 <base>: Remove.
1853 (queue_stop_reply): Update.
1854 (remove_all_on_match_ptid): Change type. Rewrite.
1855 (discard_queued_stop_replies): Rewrite.
1856 (in_queued_stop_replies_ptid): Change type.
1857 (in_queued_stop_replies): Rewrite.
1858 (notif_stop): Update.
1859 (queue_stop_reply_callback): Update.
1860 (captured_main): Don't call initialize_notif.
1861 (push_stop_notification): Update.
1862 * notif.c (notif_write_event, handle_notif_ack)
1863 (notif_event_enque, notif_push): Update.
1864 (notif_event_xfree, initialize_notif): Remove.
1865 * notif.h (struct notif_event): Include <list>, not
1866 "common/queue.h".
1867 (struct notif_server) <queue>: Now a std::list.
1868 (notif_event_p): Remove typedef.
1869 (initialize_notif): Don't declare.
1870 (struct notif_event): Add virtual destructor.
1871
1872 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1873
1874 * ax.c (ax_vdebug): Call debug_printf.
1875 * debug.c (debug_write): New function.
1876 * debug.h (debug_write): New declaration.
1877 * linux-low.c (sigchld_handler): Call debug_write.
1878
1879 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1880
1881 * debug.c (debug_set_output): New function.
1882 (debug_vprintf): Send output to debug_file.
1883 (debug_flush): Likewise.
1884 * debug.h (debug_set_output): New declaration.
1885 * server.c (handle_monitor_command): Add debug-file option.
1886 (captured_main): Likewise.
1887
1888 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1889
1890 * debug.c (remote_debug): Add definition.
1891 * debug.h (remote_debug): Add declaration.
1892 * hostio.c (remote_debug): Remove declaration.
1893 * remote-utils.c (struct ui_file): Likewise.
1894 (remote_debug): Likewise.
1895 * remote-utils.h (remote_debug): Likewise,
1896 * server.c (remote_debug): Remove definition.
1897
1898 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1899
1900 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1901 when using a 64-bit gdbserver.
1902
1903 2019-04-09 Tom Tromey <tromey@adacore.com>
1904
1905 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1906
1907 2019-04-08 Tom Tromey <tom@tromey.com>
1908
1909 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1910 throw.
1911 (linux_resume_one_lwp): Likewise.
1912
1913 2019-04-08 Tom Tromey <tom@tromey.com>
1914
1915 * gdbreplay.c: Update.
1916 * linux-low.c: Update.
1917 * server.c: Update.
1918
1919 2019-04-08 Tom Tromey <tom@tromey.com>
1920
1921 * server.c: Use C++ exception handling.
1922 * linux-low.c: Use C++ exception handling.
1923 * gdbreplay.c: Use C++ exception handling.
1924
1925 2019-04-08 Tom Tromey <tom@tromey.com>
1926
1927 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1928 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1929 (captured_main, main): Update.
1930 * gdbreplay.c (main): Update.
1931
1932 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1933
1934 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1935 value in argument pointer, return 1 if the entry is found and 0
1936 otherwise. Move comment.
1937 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1938 * linux-low.h (linux_get_auxv): Declare.
1939 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1940
1941 2019-04-05 Tom Tromey <tromey@adacore.com>
1942
1943 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1944 variables.
1945
1946 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1947
1948 * linux-low.c (AT_HWCAP2): Add define if not already included.
1949
1950 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1951
1952 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1953 (aarch64_arch_setup): Call linux_get_hwcap.
1954 * linux-arm-low.c (arm_get_hwcap): Remove function.
1955 (arm_read_description): Call linux_get_hwcap.
1956 * linux-low.c (linux_get_auxv): New function.
1957 (linux_get_hwcap): Likewise.
1958 (linux_get_hwcap2): Likewise.
1959 * linux-low.h (linux_get_hwcap): New declaration.
1960 (linux_get_hwcap2): Likewise.
1961 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1962 (ppc_arch_setup): Call linux_get_hwcap.
1963 * linux-s390-low.c (s390_get_hwcap): Remove function.
1964 (s390_arch_setup): Call linux_get_hwcap.
1965
1966 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1967 Jiong Wang <jiong.wang@arm.com>
1968
1969 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1970 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1971 to fail.
1972 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1973
1974 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1975 Jiong Wang <jiong.wang@arm.com>
1976
1977 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1978 (aarch64_get_hwcap): New function.
1979 (aarch64_arch_setup): Read APIA hwcap.
1980
1981 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1982 Jiong Wang <jiong.wang@arm.com>
1983
1984 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
1985 (initialize_low_tracepoint): Likewise.
1986 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
1987 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
1988 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
1989 (aarch64_linux_read_description): Likewise.
1990 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
1991
1992 2019-03-12 John Baldwin <jhb@FreeBSD.org>
1993
1994 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
1995 i386_create_target_description for 'segments' parameter.
1996 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
1997 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1998 * win32-i386-low.c (i386_arch_setup): Likewise.
1999
2000 2019-03-12 Tom Tromey <tromey@adacore.com>
2001
2002 * linux-low.c (iterate_over_lwps): Update.
2003
2004 2019-03-06 Tom Tromey <tom@tromey.com>
2005
2006 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2007 (captured_main): Use SCOPE_EXIT.
2008
2009 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2010
2011 * configure.srv: Use '$enable_unittest' instead of '$development'
2012 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2013 case.
2014
2015 2019-02-27 Tom Tromey <tromey@adacore.com>
2016
2017 * gdbreplay.c (logchar): Handle \r\n.
2018
2019 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2020
2021 * linux-low.c (linux_attach): Add process before lwp.
2022 * server.c (attach_inferior): Check if already attached.
2023
2024 2019-02-07 Tom Tromey <tom@tromey.com>
2025
2026 * x86-tdesc.h: Rename include guard.
2027 * x86-low.h: Add include guard.
2028 * wincecompat.h: Rename include guard.
2029 * win32-low.h: Add include guard.
2030 * utils.h: Rename include guard.
2031 * tracepoint.h: Rename include guard.
2032 * tdesc.h: Rename include guard.
2033 * target.h: Rename include guard.
2034 * server.h: Rename include guard.
2035 * remote-utils.h: Rename include guard.
2036 * regcache.h: Rename include guard.
2037 * nto-low.h: Rename include guard.
2038 * notif.h: Add include guard.
2039 * mem-break.h: Rename include guard.
2040 * lynx-low.h: Add include guard.
2041 * linux-x86-tdesc.h: Add include guard.
2042 * linux-s390-tdesc.h: Add include guard.
2043 * linux-ppc-tdesc-init.h: Add include guard.
2044 * linux-low.h: Add include guard.
2045 * linux-aarch64-tdesc.h: Add include guard.
2046 * linux-aarch32-low.h: Add include guard.
2047 * inferiors.h: Rename include guard.
2048 * i387-fp.h: Rename include guard.
2049 * hostio.h: Rename include guard.
2050 * gdbthread.h: Rename include guard.
2051 * gdb_proc_service.h: Rename include guard.
2052 * event-loop.h: Rename include guard.
2053 * dll.h: Rename include guard.
2054 * debug.h: Rename include guard.
2055 * ax.h: Rename include guard.
2056
2057 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2058
2059 PR gdb/23985
2060 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2061 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2062
2063 2019-01-25 Tom Tromey <tom@tromey.com>
2064
2065 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2066
2067 2019-01-25 Tom Tromey <tom@tromey.com>
2068
2069 * win32-low.c: Fix common/ includes.
2070 * win32-i386-low.c: Fix common/ includes.
2071 * tracepoint.c: Fix common/ includes.
2072 * thread-db.c: Fix common/ includes.
2073 * target.h: Fix common/ includes.
2074 * symbol.c: Fix common/ includes.
2075 * spu-low.c: Fix common/ includes.
2076 * server.h: Fix common/ includes.
2077 * server.c: Fix common/ includes.
2078 * remote-utils.c: Fix common/ includes.
2079 * regcache.h: Fix common/ includes.
2080 * regcache.c: Fix common/ includes.
2081 * nto-x86-low.c: Fix common/ includes.
2082 * notif.h: Fix common/ includes.
2083 * mem-break.h: Fix common/ includes.
2084 * lynx-low.c: Fix common/ includes.
2085 * lynx-i386-low.c: Fix common/ includes.
2086 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2087 * linux-x86-low.c: Fix common/ includes.
2088 * linux-low.c: Fix common/ includes.
2089 * inferiors.h: Fix common/ includes.
2090 * i387-fp.c: Fix common/ includes.
2091 * hostio.c: Fix common/ includes.
2092 * hostio-errno.c: Fix common/ includes.
2093 * gdbthread.h: Fix common/ includes.
2094 * gdbreplay.c: Fix common/ includes.
2095 * fork-child.c: Fix common/ includes.
2096 * event-loop.c: Fix common/ includes.
2097 * ax.c:
2098 (enum gdb_agent_op): Fix common/ includes.
2099
2100 2019-01-21 Tom Tromey <tom@tromey.com>
2101
2102 * tracepoint.c: Fix includes.
2103 * remote-utils.c: Fix includes.
2104 * linux-x86-low.c: Fix includes.
2105
2106 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2107
2108 * gdbreplay.c (gdbreplay_version): Update copyright year in
2109 version message.
2110 * server.c (gdbserver_version): Likewise.
2111
2112 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2113
2114 * linux-low.c (add_lwp): Switch ordering.
2115
2116 2018-11-29 Tom Tromey <tom@tromey.com>
2117
2118 * win32-low.c (win32_join): Take pid, not process.
2119 * target.h (struct target_ops) <join>: Change argument type.
2120 (join_inferior): Change argument name.
2121 * spu-low.c (spu_join): Take pid, not process.
2122 * server.c (handle_detach): Preserve pid before destroying
2123 process.
2124 * lynx-low.c (lynx_join): Take pid, not process.
2125 * linux-low.c (linux_join): Take pid, not process.
2126
2127 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2128
2129 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2130 (aarch64_cannot_fetch_register): Likewise.
2131 (struct linux_target_ops): Update references.
2132
2133 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2134
2135 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2136
2137 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2138
2139 * configure.srv (ipa_ppc_linux_regobj): Add
2140 powerpc-isa207-htm-vsx32l-ipa.o and
2141 powerpc-isa207-htm-vsx64l-ipa.o.
2142 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2143 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2144 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2145 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2146 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2147 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2148 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2149 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2150 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2151 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2152 (init_registers_powerpc_isa207_htm_vsx32l)
2153 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2154 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2155 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2156 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2157 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2158 (ppc_store_tm_ctarregset): New functions.
2159 (ppc_regsets): Add entries for HTM regsets.
2160 (ppc_arch_setup): Set htm in features struct when needed. Set
2161 sizes for the HTM regsets.
2162 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2163 (initialize_low_arch): Call
2164 init_registers_powerpc_isa207_htm_vsx32l and
2165 init_registers_powerpc_isa207_htm_vsx64l.
2166 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2167 PPC_TDESC_ISA207_HTM_VSX.
2168 (initialize_low_tracepoint): Call
2169 init_registers_powerpc_isa207_htm_vsx32l and
2170 init_registers_powerpc_isa207_htm_vsx64l.
2171
2172 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2173
2174 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2175 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2176 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2177 (ppc_store_pmuregset): New functions.
2178 (ppc_regsets): Add entries for ebb and pmu regsets.
2179 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2180 pmu regsets are available. Set sizes for these regsets.
2181
2182 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2183
2184 * configure.srv (ipa_ppc_linux_regobj): Add
2185 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2186 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2187 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2188 rs6000/powerpc-isa207-vsx32l.xml, and
2189 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2190 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2191 <PPC_TDESC_ISA207_VSX>: New enum value.
2192 (init_registers_powerpc_isa207_vsx32l): Declare.
2193 (init_registers_powerpc_isa207_vsx64l): Declare.
2194 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2195 (ppc_store_tarregset): New function.
2196 (ppc_regsets): Add entry for the TAR regset.
2197 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2198 size for the TAR regsets.
2199 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2200 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2201 and init_registers_powerpc_isa207_vsx64l.
2202 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2203 (initialize_low_tracepoint): Call
2204 init_registers_powerpc_isa207_vsx32l and
2205 init_registers_powerpc_isa207_vsx64l.
2206
2207 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2208 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2209
2210 * configure.srv (ipa_ppc_linux_regobj): Add
2211 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2212 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2213 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2214 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2215 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2216 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2217 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2218 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2219 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2220 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2221 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2222 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2223 (ppc_hwcap): Add comment.
2224 (ppc_hwcap2): New global.
2225 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2226 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2227 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2228 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2229 when needed. Set sizes for the the DSCR and PPR regsets.
2230 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2231 (initialize_low_arch): Call
2232 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2233 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2234 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2235 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2236 (initialize_low_tracepoint): Call
2237 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2238 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2239
2240 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2241
2242 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2243
2244 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2245 Simon Marchi <simark@simark.ca>
2246
2247 * acinclude.m4: Include "../selftest.m4".
2248 * configure: Regenerate.
2249 * configure.ac: Use "GDB_AC_SELFTEST".
2250 * configure.srv: Use "$enable_unittests" instead of
2251 "$development" when checking whether unit tests have been
2252 enabled.
2253 * server.c (captured_main): Update message informing that
2254 selftests have been disabled.
2255
2256 2018-10-04 Tom Tromey <tom@tromey.com>
2257
2258 * configure: Rebuild.
2259
2260 2018-10-04 Tom Tromey <tom@tromey.com>
2261
2262 * server.c (handle_status): Rename inner "thread".
2263 (process_serial_event): Declare "res" in 'm' case.
2264 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2265 (iterate_over_lwps): Rename inner "thread".
2266 (linux_qxfer_libraries_svr4): Rename inner "len".
2267 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2268
2269 2018-10-01 Gary Benson <gbenson@redhat.com>
2270
2271 * gdb_proc_service.h: Moved common code to
2272 common/gdb_proc_service.h.
2273
2274 2018-10-01 Gary Benson <gbenson@redhat.com>
2275
2276 * gdb_proc_service.h: Synchronize comments and whitespace with
2277 GDB's version of this file.
2278
2279 2018-09-25 Tom Tromey <tom@tromey.com>
2280
2281 * configure: Rebuild.
2282 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2283
2284 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2285
2286 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2287 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2288 ($(IPA_LIB)): Sort IPA_OBJS.
2289
2290 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2291
2292 * Makefile.in: Remove references to $(ADD_DEPS).
2293
2294 2018-09-16 Tom Tromey <tom@tromey.com>
2295
2296 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2297 variables.
2298 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2299 variables.
2300
2301 2018-09-05 Tom Tromey <tom@tromey.com>
2302
2303 * configure: Rebuild.
2304
2305 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2306
2307 PR build/23399
2308 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2309
2310 2018-08-27 Tom Tromey <tom@tromey.com>
2311
2312 PR build/23087:
2313 * configure: Rebuild.
2314
2315 2018-08-27 Tom Tromey <tom@tromey.com>
2316
2317 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2318 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2319 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2320 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2321 (s390x_emit_stack_adjust): Add casts to unsigned char.
2322
2323 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2324
2325 PR gdb/23374
2326 PR gdb/23375
2327 * server.h (struct client_state) <disable_randomization>:
2328 Initialize to 1.
2329
2330 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2331
2332 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2333 variable.
2334 (mips_supply_ptrace_register): Likewise.
2335
2336 2018-07-22 Tom Tromey <tom@tromey.com>
2337
2338 * configure: Rebuild.
2339
2340 2018-07-22 Tom Tromey <tom@tromey.com>
2341
2342 * win32-low.c (win32_create_inferior): Remove unused variables.
2343 * gdbreplay.c (remote_open): Remove unused variable.
2344 * remote-utils.c (remote_prepare): Remove unused variable.
2345 * x86-tdesc.h (X86_TDESC_H): Define.
2346 (amd64_expedite_regs): Define conditionally.
2347 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2348 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2349 * remote-utils.c (readchar): Remove unused variable.
2350
2351 2018-07-13 Pedro Alves <palves@redhat.com>
2352
2353 * linux-low.c (linux_kill): Change parameter to process_info
2354 pointer instead of pid. Adjust.
2355 * lynx-low.c (lynx_kill): Likewise.
2356 * nto-low.c (nto_kill): Likewise.
2357 * spu-low.c (spu_kill): Likewise.
2358 * win32-low.c (win32_kill): Likewise.
2359 * server.c (handle_v_kill, kill_inferior_callback)
2360 (detach_or_kill_for_exit): Adjust.
2361 * target.c (kill_inferior): Change parameter to process_info
2362 pointer instead of pid. Adjust.
2363 * target.h (struct target_ops) <kill>: Change parameter to
2364 process_info pointer instead of pid. Adjust all implementations
2365 and callers.
2366 (kill_inferior): Likewise.
2367
2368 2018-07-13 Pedro Alves <palves@redhat.com>
2369
2370 * linux-low.c (linux_detach, linux_join): Change parameter to
2371 process_info pointer instead of pid. Adjust.
2372 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2373 * nto-low.c (nto_detach): Likewise.
2374 * spu-low.c (spu_detach, spu_join): Likewise.
2375 * win32-low.c (win32_detach, win32_join): Likewise.
2376 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2377 * target.h (struct target_ops) <detach, join>: Change parameter to
2378 process_info pointer instead of pid. Adjust all implementations
2379 and callers.
2380 (detach_inferior, join_inferior): Rename 'pid' parameter to
2381 'proc'.
2382
2383 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2384 Jan Kratochvil <jan.kratochvil@redhat.com>
2385 Paul Fertser <fercerpav@gmail.com>
2386 Tsutomu Seki <sekiriki@gmail.com>
2387
2388 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2389 (OBS): Add 'common/netstuff.o'.
2390 (GDBREPLAY_OBS): Likewise.
2391 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2392 (remote_open): Implement support for IPv6
2393 connections.
2394 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2395 and 'wspiapi.h'.
2396 (handle_accept_event): Accept connections from IPv6 sources.
2397 (remote_prepare): Handle IPv6-style hostnames; implement
2398 support for IPv6 connections.
2399 (remote_open): Implement support for printing connections from
2400 IPv6 sources.
2401
2402 2018-07-11 Pedro Alves <palves@redhat.com>
2403
2404 PR gdb/23377
2405 * mem-break.c (any_persistent_commands): Add process_info
2406 parameter and use it instead of relying on the current process.
2407 Change return type to bool.
2408 * mem-break.h (any_persistent_commands): Add process_info
2409 parameter and change return type to bool.
2410 * server.c (handle_detach): Remove require_running_or_return call.
2411 Look up the process_info for the process we're about to detach.
2412 If not found, return back error to GDB. Adjust
2413 any_persistent_commands call to pass down a process pointer.
2414
2415 2018-07-11 Pedro Alves <palves@redhat.com>
2416
2417 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2418 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2419 instead of collect_register_by_name.
2420 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2421 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2422
2423 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2424 Pedro Alves <palves@redhat.com>
2425
2426 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2427
2428 2018-07-03 Tom Tromey <tom@tromey.com>
2429
2430 * linux-low.c: Update.
2431 * lynx-low.c: Update.
2432 * mem-break.c: Update.
2433 * nto-low.c: Update.
2434 * remote-utils.c: Update.
2435 * server.c: Update.
2436 * spu-low.c: Update.
2437 * target.c: Update.
2438 * win32-low.c: Update.
2439
2440 2018-07-03 Tom Tromey <tom@tromey.com>
2441
2442 * server.c: Update.
2443
2444 2018-07-03 Tom Tromey <tom@tromey.com>
2445
2446 * linux-low.c: Update.
2447
2448 2018-07-03 Tom Tromey <tom@tromey.com>
2449
2450 * target.c: Update.
2451
2452 2018-07-03 Tom Tromey <tom@tromey.com>
2453
2454 * linux-low.c: Update.
2455 * linux-mips-low.c: Update.
2456 * lynx-low.c: Update.
2457 * nto-low.c: Update.
2458 * remote-utils.c: Update.
2459 * server.c: Update.
2460 * spu-low.c: Update.
2461 * target.c: Update.
2462 * thread-db.c: Update.
2463
2464 2018-07-03 Tom Tromey <tom@tromey.com>
2465
2466 * linux-low.c: Update.
2467 * linux-mips-low.c: Update.
2468 * lynx-low.c: Update.
2469 * mem-break.c: Update.
2470 * nto-low.c: Update.
2471 * remote-utils.c: Update.
2472 * server.c: Update.
2473 * spu-low.c: Update.
2474 * target.c: Update.
2475 * tracepoint.c: Update.
2476
2477 2018-07-03 Tom Tromey <tom@tromey.com>
2478
2479 * linux-low.c: Update.
2480 * linux-ppc-low.c: Update.
2481 * linux-x86-low.c: Update.
2482 * proc-service.c: Update.
2483 * server.c: Update.
2484 * spu-low.c: Update.
2485 * thread-db.c: Update.
2486 * win32-low.c: Update.
2487
2488 2018-07-03 Tom Tromey <tom@tromey.com>
2489
2490 * linux-low.c: Update.
2491 * lynx-low.c: Update.
2492 * nto-low.c: Update.
2493 * remote-utils.c: Update.
2494 * spu-low.c: Update.
2495 * thread-db.c: Update.
2496 * win32-low.c: Update.
2497
2498 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2499
2500 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2501 parameter in call to 'amd64_create_target_description'.
2502
2503 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2504
2505 * x86-tdesc.h: Remove executable permission flag.
2506
2507 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2508
2509 * configure.ac: Remove AC_PREREQ, add missing quoting.
2510 * configure: Re-generate.
2511 * config.in: Re-generate.
2512 * aclocal.m4: Re-generate.
2513
2514 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2515
2516 * tracepoint.h (current_traceframe): Remove declaration.
2517
2518 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2519
2520 * linux-aarch64-low.c (is_sve_tdesc): New function.
2521 (aarch64_sve_regs_copy_to_regcache): Likewise.
2522 (aarch64_sve_regs_copy_from_regcache): Likewise.
2523 (aarch64_regs_info): Add SVE checks.
2524 (initialize_low_arch): Initialize SVE.
2525
2526 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2527
2528 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2529
2530 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2531
2532 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2533 (initialize_low_tracepoint): Likewise
2534 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2535 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2536 param.
2537 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2538 checks.
2539 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2540
2541 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2542
2543 * server.h (PBUFSIZ): Increase size
2544
2545 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2546
2547 * regcache.c (regcache::raw_compare): New function.
2548 * regcache.h (regcache::raw_compare): New declaration.
2549
2550 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2551
2552 * regcache.c (new_register_cache): Use new.
2553 (free_register_cache): Use delete.
2554 (register_data): Use const.
2555 (supply_register): Move body inside regcache.
2556 (regcache::raw_supply): New override function.
2557 (collect_register): Move body inside regcache.
2558 (regcache::raw_collect): New override function.
2559 (regcache::get_register_status): New override function.
2560 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2561
2562 2018-06-09 Tom Tromey <tom@tromey.com>
2563
2564 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2565 declare queue.
2566 (event_queue): Use std::queue.
2567 (gdb_event_xfree): Remove.
2568 (initialize_event_loop, process_event, wait_for_event): Update.
2569
2570 2018-06-08 Stan Cox <scox@redhat.com>
2571
2572 * win32-low.c (win32_create_inferior): last_ptid and last_status
2573 moved to client_state.
2574
2575 2018-06-08 Pedro Alves <palves@redhat.com>
2576
2577 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2578 common/common-exceptions.o, common/common-utils.o,
2579 common/errors.o, common/print-utils.o and utils.o.
2580 * gdbreplay.c: Include "common-defs.h" instead of the two
2581 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2582 string.h or alloca.h.
2583 (perror_with_name): Delete.
2584 (remote_open): Use xstrdup instead of strdup.
2585 (main): Rename to ...
2586 (captured_main): ... this.
2587 (main): New.
2588
2589 2018-06-08 Tom Tromey <tom@tromey.com>
2590
2591 * linux-low.c (linux_low_read_btrace): Update.
2592
2593 2018-06-04 Stan Cox <scox@redhat.com>
2594
2595 * server.h (struct client_state): New.
2596 * server.c (cont_thread, general_thread, multi_process)
2597 (report_fork_events, report_vfork_events, report_exec_events)
2598 (report_thread_events, swbreak_feature, hwbreak_feature)
2599 (vCont_supported, disable_randomization, pass_signals)
2600 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2601 Moved to client_state.
2602 * remote-utils.c (remote_debug, noack_mode)
2603 (transport_is_reliable): Moved to client_state.
2604 * tracepoint.c (current_traceframe): Moved to client_state.
2605
2606 Update all callers.
2607 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2608 linux-low.c, remote-utils.h, target.c: Use client_state.
2609
2610 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2611
2612 * configure.srv: Add new c/h file.
2613
2614 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2615
2616 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2617 null VQ.
2618
2619 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2620
2621 * gdb.arch/mips-fpregset-core.exp: New test.
2622 * gdb.arch/mips-fpregset-core.c: New test source.
2623
2624 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2625
2626 PR server/23198
2627 * hostio.c (require_int): Do not report overflow for integers
2628 between 0xfffffff and 0x7fffffff.
2629
2630 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2631
2632 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2633 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2634 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2635 functions.
2636 (the_low_target): Wire them.
2637
2638 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2639
2640 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2641 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2642 mode. Call collect_register_by_name with vscr using
2643 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2644 (ppc_store_vrregset): Add and set vscr_offset variable as in
2645 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2646 vscr_offset.
2647
2648 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2649
2650 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2651 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2652 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2653
2654 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2655
2656 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2657 (ppc_store_vsxregset): Likewise.
2658 (ppc_fill_vrregset): Likewise.
2659 (ppc_store_vrregset): Likewise.
2660 (ppc_fill_evrregset): Likewise.
2661 (ppc_store_evrregset): Likewise.
2662 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2663 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2664 needed.
2665
2666 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2667
2668 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2669 wordsize of the inferior. Call ppc_linux_target_wordsize.
2670
2671 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2672
2673 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2674 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2675 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2676 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2677 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2678 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2679 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2680 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2681 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2682 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2683 (tdesc_powerpc_e500l): Remove.
2684 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2685 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2686 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2687 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2688 linux-ppc-tdesc.h.
2689 (ppc_arch_setup): Remove target description matching code. Fill a
2690 ppc_linux_features struct and call ppc_linux_match_description
2691 with it.
2692
2693 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2694
2695 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2696 width of the requested register exceeds the width of the
2697 `ptrace' data type.
2698 (mips_cannot_store_register): Likewise.
2699
2700 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2701
2702 * linux-mips-low.c (mips_fetch_register): New function. Update
2703 preceding comment.
2704 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2705 (the_low_target): Wire `mips_fetch_register'.
2706
2707 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2708
2709 * lynx-i386-low.c (LYNXOS_178): New macro.
2710 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2711 the layout on LynxOS-178.
2712 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2713 handle floating point registers that are not supported by
2714 LynxOS-178.
2715
2716 2018-05-10 Tom Tromey <tom@tromey.com>
2717
2718 * configure: Rebuild.
2719
2720 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2721
2722 PR server/23158:
2723 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2724 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2725 Use it to set the expedite_regs field in the given tdesc.
2726 * x86-tdesc.h: New file.
2727 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2728 Adjust following the addition of the new expedite_regs parameter
2729 to init_target_desc.
2730 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2731 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2732 (i386_linux_read_description, amd64_linux_read_description):
2733 Adjust following the addition of the new expedite_regs parameter
2734 to init_target_desc.
2735 * lynx-i386-low.c: #include "x86-tdesc.h".
2736 (lynx_i386_arch_setup): Adjust following the addition of the new
2737 expedite_regs parameter to init_target_desc.
2738 * nto-x86-low.c: #include "x86-tdesc.h".
2739 (nto_x86_arch_setup): Adjust following the addition of the new
2740 expedite_regs parameter to init_target_desc.
2741 * win32-i386-low.c: #include "x86-tdesc.h".
2742 (i386_arch_setup): Adjust following the addition of the new
2743 expedite_regs parameter to init_target_desc.
2744
2745 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2746
2747 PR server/23158:
2748 * win32-low.c (win32_create_inferior): Add call to my_wait
2749 setting last_status global.
2750
2751 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2752
2753 PR server/23158:
2754 * win32-low.c (create_process): Only call gdb_tilde_expand if
2755 inferior_cwd is not NULL.
2756
2757 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2758
2759 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2760 registers to the cache if their values have changed.
2761 (i387_xsave_to_cache): Provide default values for x87 control
2762 registers when these features are available, but disabled.
2763 * regcache.c (supply_register_by_name_zeroed): New function.
2764 * regcache.h (supply_register_by_name_zeroed): Declare new
2765 function.
2766
2767 2018-05-07 Tom Tromey <tom@tromey.com>
2768
2769 * configure: Rebuild.
2770
2771 2018-05-04 Tom Tromey <tom@tromey.com>
2772
2773 * configure: Rebuild.
2774
2775 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2776 Pedro Alves <palves@redhat.com>
2777
2778 * linux-aarch64-low.c (aarch64_stopped_data_address):
2779 Likewise.
2780
2781 2018-04-27 Tom Tromey <tom@tromey.com>
2782
2783 * configure: Rebuild.
2784
2785 2018-04-23 Tom Tromey <tom@tromey.com>
2786
2787 * configure: Rebuild.
2788
2789 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2790
2791 * Makefile.in (depcomp): Add "..".
2792 (all_deps_files): New and use it.
2793
2794 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2795
2796 * configure.srv (aarch64*-*-linux*): Don't include xml.
2797 (i[34567]86-*-cygwin*): Likewise.
2798 (i[34567]86-*-linux*): Likewise.
2799 (i[34567]86-*-lynxos*): Likewise.
2800 (i[34567]86-*-mingw32ce*): Likewise.
2801 (i[34567]86-*-mingw*): Likewise.
2802 (i[34567]86-*-nto*): Likewise.
2803 (tic6x-*-uclinux): Likewise.
2804 (x86_64-*-linux*): Likewise.
2805 (x86_64-*-mingw*): Likewise.
2806 (x86_64-*-cygwin*): Likewise.
2807
2808 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2809
2810 * tdesc.c: Remove xml parameter.
2811
2812 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2813
2814 * server.c (get_features_xml): Remove cast.
2815 * tdesc.c (void target_desc::accept): Fill in function.
2816 (tdesc_get_features_xml): Remove old xml creation.
2817 (print_xml_feature::visit_pre): Add xml vistor.
2818 * tdesc.h (struct target_desc): Make xmltarget mutable.
2819 (tdesc_get_features_xml): Remove declaration.
2820
2821 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2822
2823 * tdesc.c (tdesc_architecture_name): Add new function.
2824 (tdesc_osabi_name): Likewise.
2825 (tdesc_get_features_xml): Use new functions.
2826
2827 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2828
2829 * tdesc.c (tdesc_create_flags): Remove.
2830 (tdesc_add_flag): Likewise.
2831 (tdesc_named_type): Likewise.
2832 (tdesc_create_union): Likewise.
2833 (tdesc_create_struct): Likewise.
2834 (tdesc_create_vector): Likewise.
2835 (tdesc_add_bitfield): Likewise.
2836 (tdesc_add_field): Likewise.
2837 (tdesc_set_struct_size): Likewise.
2838
2839 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2840
2841 * tdesc.c (~target_desc): Remove implictly deleted items.
2842 (init_target_desc): Iterate all features.
2843 (tdesc_get_features_xml): Use vector.
2844 (tdesc_create_feature): Create feature.
2845 * tdesc.h (tdesc_feature) Remove
2846 (target_desc): Add features.
2847
2848 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2849
2850 * Makefile.in: Add common/tdesc.c
2851 * tdesc.c (init_target_desc): init all reg_defs from register
2852 vector.
2853 (tdesc_create_reg): Create tdesc_reg.
2854 * tdesc.h (tdesc_feature): Add register vector.
2855
2856 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2857
2858 * tdesc.h (struct target_desc) <features>: Change type to
2859 std::vector<std::string>.
2860 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2861 changes.
2862 (tdesc_get_features_xml): Likewise.
2863 (tdesc_create_feature): Likewise.
2864
2865 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2866
2867 * regcache.c (find_register_by_number): Return a ref.
2868 (find_regno): Use references.
2869 (register_size): Likewise.
2870 (register_data): Likewise.
2871 * tdesc.c (target_desc::~target_desc): Remove free calls.
2872 (target_desc::operator==): Use std::vector compare.
2873 (init_target_desc): Use reference.
2874 (tdesc_create_reg): Use reg constructors.
2875 * tdesc.h (struct target_desc): Replace pointer with object.
2876
2877 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2878
2879 * regcache.c (find_register_by_number): Make static.
2880 (find_regno): Use find_register_by_number
2881 * regcache.h (struct reg): Remove declaration.
2882
2883 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2884
2885 * tdesc.c (target_desc::~target_desc): Move to here.
2886 (target_desc::operator==): Likewise.
2887 * tdesc.h (target_desc::~target_desc): Move from here.
2888 (target_desc::operator==): Likewise.
2889
2890 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2891
2892 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2893
2894 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2895
2896 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2897 S390_TDESC_GS.
2898 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2899 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2900 and init_registers_s390_gs_linux64.
2901
2902 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2903
2904 * linux-s390-low.c (s390_fill_gs): Remove function.
2905 (s390_fill_gsbc): Remove function.
2906 (s390_regsets): Set fill functions for the guarded storage regsets
2907 to NULL.
2908
2909 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2910
2911 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2912 the word size. Add comment.
2913 (s390_get_wordsize): New function.
2914 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2915 pswm with it. Instead, use s390_get_wordsize to determine the
2916 word size first and derive the correct tdesc from that directly.
2917
2918 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2919
2920 * Makefile.in: Include silent-rules.mk.
2921 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2922 (COMPILE): Add ECHO_CXX.
2923 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2924 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2925 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2926 (version-generated.c): Add ECHO_GEN.
2927 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2928 (IPAGENT_COMPILE): Add ECHO_CXX.
2929 (%-generated.c): Add ECHO_REGDAT.
2930
2931 2018-03-14 Tom Tromey <tom@tromey.com>
2932
2933 PR cli/14977:
2934 * ax.c (ax_printf): Special case for NULL.
2935
2936 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2937
2938 * linux-low.c (linux_qxfer_libraries_svr4): Use
2939 xml_escape_text_append.
2940
2941 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2942
2943 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2944
2945 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2946
2947 * server.c (handle_general_set): Remove unnecessary xstrdup.
2948
2949 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2950
2951 * server.c (parse_debug_format_options): Adjust to
2952 delim_string_to_char_ptr_vec changes.
2953 * thread-db.c (thread_db_load_search): Adjust to
2954 dirnames_to_char_ptr_vec changes.
2955
2956 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2957
2958 * target.h (target_enable_btrace, target_disable_btrace)
2959 (target_read_btrace, target_read_btrace_conf): Turn macro into
2960 inline function. Throw error if target method is not defined.
2961 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2962 check for btrace target method. Be prepared to handle exceptions
2963 from btrace target methods.
2964
2965 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2966
2967 * server.c (captured_main): Change order of error message printed
2968 when the current working directory cannot be found.
2969
2970 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2971
2972 * server.c: Include "filenames.h" and "pathstuff.h".
2973 (program_name): Delete variable.
2974 (program_path): New anonymous class.
2975 (get_exec_wrapper): Use "program_path" instead of
2976 "program_name".
2977 (handle_v_run): Likewise.
2978 (captured_main): Likewise.
2979 (process_serial_event): Likewise.
2980
2981 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2982
2983 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
2984 (OBJS): Add "pathstuff.o".
2985 * server.c (current_directory): New global variable.
2986 (captured_main): Initialize "current_directory".
2987
2988 2018-02-26 Alan Hayward <alan.hayward@arm.com>
2989
2990 * tdesc.c: Use common/tdesc.h.
2991 * tdesc.h: Likewise.
2992
2993 2018-02-20 Alan Hayward <alan.hayward@arm.com>
2994 Simon Marchi <simon.marchi@ericsson.com>
2995
2996 * Makefile.in: Switch order of make rules.
2997
2998 2018-02-19 Alan Hayward <alan.hayward@arm.com>
2999
3000 * Makefile.in: Add common directory in build.
3001 * configure.ac: Add common reference.
3002 * configure: Regenerate.
3003
3004 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3005
3006 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3007 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3008 * spu-low.c (spu_target_ops): Likewise.
3009 * win32-low.c (win32_target_ops): Likewise.
3010 * server.c (supported_btrace_packets): Report packets unconditionally.
3011 * target.h (target_ops) <supports_btrace>: Remove.
3012 (target_supports_btrace): Remove.
3013
3014 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3015
3016 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3017 (handle_btrace_disable): Change return type to void. Use exceptions
3018 to report errors.
3019 (handle_btrace_general_set): Catch exception and copy message to
3020 return message.
3021
3022 2018-02-08 Tom Tromey <tom@tromey.com>
3023
3024 * linux-low.c (install_software_single_step_breakpoints): Use
3025 make_scoped_restore.
3026 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3027 (do_restore_current_thread_cleanup): Remove.
3028 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3029 declare.
3030
3031 2018-02-08 Tom Tromey <tom@tromey.com>
3032
3033 * mem-break.c (set_raw_breakpoint_at): Use
3034 gdb::unique_xmalloc_ptr.
3035
3036 2018-01-30 Pedro Alves <palves@redhat.com>
3037
3038 PR gdb/13211
3039 * target.c (target_terminal::terminal_state): Rename to ...
3040 (target_terminal::m_terminal_state): ... this.
3041
3042 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3043
3044 * linux-low.c (handle_extended_wait): Surround call to
3045 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3046
3047 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3048
3049 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3050 linux_ptrace_attach_fail_reason_string now returning an
3051 std::string.
3052 (linux_attach): Likewise.
3053 * thread-db.c (attach_thread): Likewise.
3054
3055 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3056
3057 PR gdb/21559
3058 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3059 checking for fs_base/gs_base fields in struct user_regs_struct.
3060 * configure: Regenerate.
3061
3062 2018-01-16 Yao Qi <yao.qi@linaro.org>
3063
3064 PR gdb/18749
3065 * linux-low.c (fetch_register): Call supply_register instead of
3066 error.
3067
3068 2018-01-08 Yao Qi <yao.qi@linaro.org>
3069 Simon Marchi <simon.marchi@ericsson.com>
3070
3071 * Makefile.in (OBS): Remove selftest.o.
3072 * configure.ac: Set srv_selftest_objs if $development is true.
3073 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3074 * configure: Re-generated.
3075 * server.c (captured_main): Wrap variable selftest_filter with
3076 GDB_SELF_TEST.
3077
3078 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3079
3080 * server.c (parse_debug_format_options): Return std::string.
3081 (handle_monitor_command, captured_main): Adjust.
3082
3083 2018-01-05 Pedro Alves <palves@redhat.com>
3084
3085 PR gdb/18653
3086 * server.c (captured_main): Pass quiet=false to
3087 save_original_signals_state.
3088
3089 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3090
3091 * gdbreplay.c (gdbreplay_version): Update copyright year in
3092 version message.
3093 * server.c (gdbserver_version): Likewise.
3094
3095 2017-12-08 Tom Tromey <tom@tromey.com>
3096
3097 * ax.c (ax_printf): Update.
3098
3099 2017-12-07 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3102 aarch64_linux_read_description.
3103 * linux-amd64-ipa.c (idx2mask): New array.
3104 (get_ipa_tdesc): Move idx2mask out.
3105 (initialize_low_tracepoint): Initialize target descriptions.
3106 * linux-i386-ipa.c (idx2mask): New array.
3107 (get_ipa_tdesc): Move idx2mask out.
3108 (initialize_low_tracepoint): Initialize target descriptions.
3109
3110 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3111
3112 * tdesc.c (struct tdesc_type): Change return type.
3113 (tdesc_add_flag): Change parameter type.
3114 (tdesc_add_bitfield): Likewise.
3115 (tdesc_add_field): Likewise.
3116 (tdesc_set_struct_size): Likewise.
3117
3118 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3119
3120 * regcache.c (registers_to_string): Remove unused variable.
3121
3122 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3123
3124 * inferiors.c (for_each_inferior_with_data): Remove.
3125 * inferiors.h (for_each_inferior_with_data): Remove.
3126 * server.c (handle_qxfer_threads_worker): Change parameter type.
3127 (handle_qxfer_threads_proper): Use for_each_thread.
3128
3129 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3130
3131 * inferiors.c (for_each_inferior): Remove.
3132 (clear_inferiors): Use for_each_thread.
3133 * inferiors.h (for_each_inferior): Remove.
3134 * linux-low.c (linux_wait_for_event_filtered): Use
3135 for_each_thread.
3136 (linux_stabilize_threads): Likewise.
3137 * regcache.c (regcache_release): Likewise.
3138 * server.c (gdb_wants_all_threads_stopped): Likewise.
3139 (clear_pending_status_callback): Remove.
3140 (handle_status): Use for_each_thread.
3141 (captured_main): Likewise.
3142 * win32-low.c (child_init_thread_list): Likewise.
3143 (win32_clear_inferiors): Likewise.
3144 (fake_breakpoint_event): Likewise.
3145
3146 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3147
3148 * inferiors.h (find_inferior): Remove.
3149 * inferiors.c (find_inferior): Remove.
3150
3151 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3152
3153 * linux-low.c (resume_status_pending_p): Update comment.
3154 (need_step_over_p): Update comment.
3155
3156 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3157
3158 * linux-low.c (proceed_one_lwp): Return void, change parameter
3159 type.
3160 (unsuspend_and_proceed_one_lwp): Likewise.
3161 (proceed_all_lwps): Use for_each_thread.
3162 (unstop_all_lwps): Likewise.
3163
3164 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3165
3166 * linux-low.c (linux_resume_one_thread): Return void, take
3167 parameter directly.
3168 (linux_resume): Use for_each_thread.
3169
3170 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3171
3172 * linux-low.c (send_sigstop_callback): Return void, change
3173 parameter type. Rename to...
3174 (send_sigstop): ... this.
3175 (suspend_and_send_sigstop_callback): Return void, change parameter
3176 type. Rename to...
3177 (suspend_and_send_sigstop): ... this.
3178 (stop_all_lwps): Use for_each_thread.
3179
3180 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3181
3182 * linux-low.c (lwp_running): Return bool, remove unused
3183 argument.
3184 (linux_stabilize_threads): Use find_thread.
3185
3186 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3187
3188 * linux-low.c (select_singlestep_lwp_callback): Remove.
3189 (count_events_callback): Remove.
3190 (select_event_lwp_callback): Remove.
3191 (select_event_lwp): Use find_thread/for_each_thread.
3192
3193 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3194
3195 * linux-low.c (not_stopped_callback): Return bool, take filter
3196 argument directly.
3197 (linux_wait_for_event_filtered): Use find_thread.
3198 (linux_wait_1): Likewise.
3199
3200 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3201
3202 * linux-low.c (same_lwp): Remove.
3203 (find_lwp_pid): Use find_thread.
3204
3205 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3206
3207 * linux-low.c (delete_lwp_callback): Remove.
3208 (linux_mourn): Use for_each_thread.
3209
3210 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3211
3212 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3213 args parameter, don't check for pid.
3214 (linux_detach): Use for_each_thread.
3215
3216 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3217
3218 * linux-low.c (struct counter): Remove.
3219 (second_thread_of_pid_p): Remove.
3220 (last_thread_of_process_p): Use find_thread.
3221
3222 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3223
3224 * inferiors.c (find_inferior_in_random): Remove.
3225 * inferiors.h (find_inferior_in_random): Remove.
3226 * linux-low.c (status_pending_p_callback): Return bool, accept
3227 parameter ptid directly.
3228 (linux_wait_for_event_filtered): Use find_thread_in_random.
3229 (linux_wait_1): Likewise.
3230
3231 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3232
3233 * inferiors.c (find_inferior_id): Remove.
3234 (find_thread_ptid): Move implemention from find_inferior_id to
3235 here.
3236 * inferiors.h (find_inferior_id): Remove.
3237 * server.c (handle_status): Use find_thread_ptid.
3238 (process_serial_event): Likewise.
3239 * thread-db.c (find_one_thread): Likewise.
3240 (thread_db_thread_handle): Likewise.
3241 * win32-low.c (thread_rec): Likewise.
3242 (child_delete_thread): Likewise.
3243 (win32_thread_alive): Likewise.
3244 (get_child_debug_event): Likewise.
3245
3246 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3247
3248 * linux-mips-low.c (update_watch_registers_callback): Return
3249 void, remove pid_p parameter, don't check for pid.
3250 (mips_insert_point, mips_remove_point): Use for_each_thread.
3251
3252 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3253
3254 * lynx.low (lynx_delete_thread_callback): Remove.
3255 (lynx_mourn): Use for_each_thread.
3256
3257 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3258
3259 * regcache.c (regcache_invalidate_one): Remove.
3260 (regcache_invalidate_pid): use for_each_thread.
3261
3262 2017-11-26 Tom Tromey <tom@tromey.com>
3263
3264 * linux-low.c (linux_create_inferior): Update.
3265
3266 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3267
3268 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3269
3270 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3271
3272 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3273 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3274 * linux-aarch64-tdesc-selftest.c: New file.
3275 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3276
3277 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3278
3279 * configure.srv: Add new file.
3280 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3281 * linux-aarch64-tdesc-selftest.c: New file.
3282 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3283
3284 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3285
3286 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3287 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3288 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3289
3290 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3291
3292 * configure.srv: Add new files.
3293 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3294 aarch64_linux_read_description.
3295 * linux-aarch64-low.c (aarch64_linux_read_description):
3296 Merge with aarch64_arch_setup.
3297 (aarch64_arch_setup): Call aarch64_linux_read_description.
3298 * linux-aarch64-tdesc.c: New file.
3299 * linux-aarch64-tdesc.h: New file.
3300
3301 2017-11-24 Yao Qi <yao.qi@linaro.org>
3302
3303 * configure.srv: Set $srv_regobj for tic6x-linux.
3304 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3305 (tic6x_read_description): Move some code to tic6x_arch_setup.
3306 (tic6x_tdesc_test): New function.
3307 (initialize_low_arch): Call selftests::register_test.
3308
3309 2017-11-22 Yao Qi <yao.qi@linaro.org>
3310
3311 * remote-utils.c (prepare_resume_reply): Use memcpy.
3312
3313 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3314
3315 * linux-low.c (kill_one_lwp_callback): Return void, take
3316 argument directly, don't filter on pid.
3317 (linux_kill): Use for_each_thread.
3318
3319 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3320
3321 * linux-low.c (need_step_over_p): Return bool, remove dummy
3322 argument.
3323 (linux_resume, proceed_all_lwps): Use find_thread.
3324
3325 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3326
3327 * linux-low.c (resume_status_pending_p): Return bool, remove
3328 flag_p argument.
3329 (linux_resume): Use find_thread.
3330
3331 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3332
3333 * linux-low.c (struct thread_resume_array): Remove.
3334 (linux_set_resume_request): Return void, take arguments
3335 directly.
3336 (linux_resume): Use for_each_thread.
3337
3338 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3339
3340 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3341 return bool, remove data argument.
3342 (linux_stabilize_threads): Use find_thread.
3343
3344 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3345
3346 * linux-low.c (unsuspend_one_lwp): Remove.
3347 (unsuspend_all_lwps): Use for_each_thread, inline code from
3348 unsuspend_one_lwp.
3349
3350 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3351
3352 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3353 * linux-low.c (struct iterate_over_lwps_args): Remove.
3354 (iterate_over_lwps_filter): Remove.
3355 (iterate_over_lwps): Use find_thread.
3356
3357 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3358
3359 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3360 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3361 code from reset_lwp_ptrace_options_callback.
3362
3363 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3364
3365 * linux-arm-low.c (struct update_registers_data): Remove.
3366 (update_registers_callback): Return void, take arguments
3367 directly, don't check thread's pid.
3368 (arm_insert_point, arm_remove_point): Use for_each_thread.
3369
3370 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3371
3372 * win32-low.c (continue_one_thread): Return void, take argument
3373 directly.
3374 (child_continue): Use for_each_thread.
3375
3376 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3377
3378 * win32-i386-low.c (update_debug_registers_callback): Rename
3379 to ...
3380 (update_debug_registers): ... this, return void, remove pid_p arg.
3381 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3382
3383 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3384
3385 * inferiors.h (struct process_info): Add constructor, initialize
3386 fields..
3387 <syscalls_to_catch>: Change type to std::vector<int>.
3388 * inferiors.c (add_process): Allocate process_info with new.
3389 (remove_process): Free process_info with delete.
3390 * linux-low.c (handle_extended_wait): Adjust.
3391 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3392 * server.c (handle_general_set): Adjust.
3393
3394 2017-11-16 Pedro Alves <palves@redhat.com>
3395
3396 * remote-utils.c (remote_close): Block SIGIO signals instead of
3397 uninstalling the SIGIO handler.
3398
3399 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3400
3401 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3402
3403 2017-11-16 Yao Qi <yao.qi@linaro.org>
3404
3405 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3406 (tic6x_store_gregset): Likewise.
3407 (tic6x_usrregs_info): Move it up.
3408
3409 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3410
3411 * Makefile.in: Update arch rules.
3412 * configure.srv: Explicitly mark arch/ files.
3413
3414 2017-11-13 Andreas Schwab <schwab@suse.de>
3415
3416 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3417 function.
3418 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3419
3420 2017-11-06 Pedro Alves <palves@redhat.com>
3421
3422 * config.in, configure: Regenerate.
3423
3424 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3425
3426 * target.c (struct thread_search): Remove.
3427 (thread_search_callback): Remove.
3428 (prepare_to_access_memory): Use for_each_thread instead of
3429 find_inferior. Inline code from thread_search_callback.
3430
3431 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3432
3433 * server.c (struct visit_actioned_threads_data): Remove.
3434 (visit_actioned_threads): Change prototype to take arguments
3435 directly.
3436 (resume): Use find_thread instead of find_inferior.
3437
3438 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3439
3440 * server.c (queue_stop_reply_callback): Change prototype, return
3441 void.
3442 (find_status_pending_thread_callback): Remove.
3443 (handle_status): Replace find_inferior with find_thread and
3444 for_each_thread.
3445
3446 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3447
3448 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3449 with REGNO.
3450 (aarch64_store_gregset): Likewise.
3451 (aarch64_fill_fpregset): Likewise.
3452 (aarch64_store_fpregset): Likewise.
3453
3454 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3455
3456 * gdbthread.h (find_thread, for_each_thread): New functions.
3457 * inferiors.c (thread_of_pid): Remove.
3458 (find_any_thread_of_pid): Use find_thread.
3459 * linux-low.c (num_lwps): Use for_each_thread.
3460
3461 2017-10-17 Yao Qi <yao.qi@linaro.org>
3462
3463 * Makefile.in: Remove one rule.
3464 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3465
3466 2017-10-17 Yao Qi <yao.qi@linaro.org>
3467
3468 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3469 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3470
3471 2017-10-17 Yao Qi <yao.qi@linaro.org>
3472
3473 * configure.srv: Rename arm.o with arch/arm.o.
3474
3475 2017-10-17 Yao Qi <yao.qi@linaro.org>
3476
3477 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3478 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3479 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3480 (arch-i386.o, arch-amd64.o): Remove rules.
3481 (arch/%.o): New rule.
3482 Update POSTCOMPILE and COMPILE.pre.
3483 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3484 * configure: Re-generated.
3485 * configure.srv: Replace arch-i386.o with arch/i386.o.
3486 Replace arch-amd64.o with arch/amd64.o.
3487
3488 2017-10-16 Yao Qi <yao.qi@linaro.org>
3489
3490 * configure: Regenerated.
3491
3492 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3493
3494 * inferiors.h: (struct inferior_list): Remove.
3495 (struct inferior_list_entry); Remove.
3496 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3497 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3498 get_first_inferior): Remove.
3499 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3500 find_inferior_id, find_inferior_in_random): Change signature.
3501 * inferiors.c (all_threads): Change type to
3502 std::list<thread_info *>.
3503 (get_thread): Remove macro.
3504 (find_inferior, find_inferior_id): Change signature, implement
3505 using find_thread.
3506 (find_inferior_in_random): Change signature, implement using
3507 find_thread_in_random.
3508 (for_each_inferior, for_each_inferior_with_data): Change
3509 signature, implement using for_each_thread.
3510 (add_inferior_to_list, remove_inferior): Remove.
3511 (add_thread, get_first_thread, thread_of_pid,
3512 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3513 (get_first_inferior, one_inferior_p, clear_inferior_list):
3514 Remove.
3515 (clear_inferiors, get_thread_process): Update.
3516 * gdbthread.h: Include <list>.
3517 (struct thread_info) <entry>: Remove field.
3518 <id>: New field.
3519 (all_threads): Change type to std::list<thread_info *>.
3520 (get_first_inferior): Add doc.
3521 (find_thread, for_each_thread, find_thread_in_random): New
3522 functions.
3523 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3524 * linux-arm-low.c (update_registers_callback): Update.
3525 * linux-low.c (second_thread_of_pid_p): Update.
3526 (kill_one_lwp_callback, linux_detach_lwp_callback,
3527 delete_lwp_callback, status_pending_p_callback, same_lwp,
3528 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3529 iterate_over_lwps, not_stopped_callback,
3530 resume_stopped_resumed_lwps, count_events_callback,
3531 select_singlestep_lwp_callback, select_event_lwp_callback,
3532 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3533 suspend_and_send_sigstop_callback, wait_for_sigstop,
3534 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3535 lwp_running, linux_set_resume_request, resume_status_pending_p,
3536 need_step_over_p, start_step_over, linux_resume_one_thread,
3537 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3538 reset_lwp_ptrace_options_callback): Update.
3539 * linux-mips-low.c (update_watch_registers_callback): Update.
3540 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3541 Update.
3542 (free_register_cache_thread_one): Remove.
3543 (regcache_release): Update.
3544 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3545 handle_qxfer_threads_worker): Update.
3546 (handle_query): Update, use list iterator.
3547 (visit_actioned_threads, handle_pending_status,
3548 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3549 clear_pending_status_callback, set_pending_status_callback,
3550 find_status_pending_thread_callback, handle_status,
3551 process_serial_event): Update.
3552 * target.c (thread_search_callback): Update.
3553 * thread-db.c (thread_db_get_tls_address): Update.
3554 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3555 Update.
3556 * win32-i386-low.c (update_debug_registers_callback): Update.
3557 * win32-low.c (delete_thread_info, child_delete_thread,
3558 continue_one_thread, suspend_one_thread,
3559 get_child_debug_event): Adjust.
3560
3561 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3562
3563 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3564 * inferiors.h: Include <list>.
3565 (struct process_info) <entry>: Remove field.
3566 <pid>: New field.
3567 (pid_of): Change macro to function.
3568 (ptid_of, lwpid_of): Remove macro.
3569 (all_processes): Change type to std::list<process_info *>.
3570 (ALL_PROCESSES): Remove macro.
3571 (for_each_process, find_process): New function.
3572 * inferiors.c (all_processes): Change type to
3573 std::list<process_info *>.
3574 (find_thread_process): Adjust.
3575 (add_process): Likewise.
3576 (remove_process): Likewise.
3577 (find_process_pid): Likewise.
3578 (get_first_process): Likewise.
3579 (started_inferior_callback): Remove.
3580 (have_started_inferiors_p): Adjust.
3581 (attached_inferior_callback): Remove.
3582 (have_attached_inferiors_p): Adjust.
3583 * linux-low.c (check_zombie_leaders): Likewise.
3584 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3585 (x86_linux_update_xmltarget): Adjust.
3586 * server.c (handle_query): Likewise.
3587 (gdb_reattached_process): Remove.
3588 (handle_status): Adjust.
3589 (kill_inferior_callback): Likewise.
3590 (detach_or_kill_inferior): Remove.
3591 (print_started_pid): Likewise.
3592 (print_attached_pid): Likewise.
3593 (detach_or_kill_for_exit): Update.
3594 (process_serial_event): Likewise.
3595 * linux-arm-low.c (arm_new_fork): Likewise.
3596
3597 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3598
3599 * dll.h: Include <list>.
3600 (struct dll_info): Add constructor.
3601 <entry>: Remove field.
3602 (all_dlls): Change type to std::list<dll_info>.
3603 * dll.c: Include <algorithm>.
3604 (get_dll): Remove macro.
3605 (all_dlls): Change type to std::list<dll_info *>.
3606 (free_one_dll): Remove.
3607 (match_dll): Likewise.
3608 (loaded_dll): Adjust.
3609 (unloaded_dll): Adjust to all_dlls type change, use
3610 std::find_if. Inline code from match_dll.
3611 (clear_dlls): Adjust to all_dlls type change.
3612 * server.c (emit_dll_description): Remove.
3613 (handle_qxfer_libraries): Adjust to all_dlls type change,
3614 integrate emit_dll_description's functionality.
3615
3616 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3617
3618 * linux-low.h (struct linux_target_ops) <delete_process>: New
3619 field.
3620 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3621 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3622 (struct linux_target_ops): Add delete_process callback.
3623 * linux-arm-low.c (arm_delete_process): New.
3624 (struct linux_target_ops): Add delete_process callback.
3625 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3626 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3627 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3628 * linux-mips-low.c (mips_linux_delete_process): New.
3629 (struct linux_target_ops): Add delete_process callback.
3630 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3631 * linux-s390-low.c (struct linux_target_ops): Likewise.
3632 * linux-sh-low.c (struct linux_target_ops): Likewise.
3633 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3634 * linux-tile-low.c (struct linux_target_ops): Likewise.
3635 * linux-x86-low.c (x86_linux_delete_process): New.
3636 (struct linux_target_ops): Add delete_process callback.
3637 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3638
3639 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3640
3641 * linux-aarch64-low.c (the_low_target): Add thread delete
3642 callback.
3643 * linux-arm-low.c (arm_delete_thread): New function.
3644 (the_low_target): Add thread delete callback.
3645 * linux-bfin-low.c (the_low_target): Likewise.
3646 * linux-crisv32-low.c (the_low_target): Likewise.
3647 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3648 set.
3649 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3650 field.
3651 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3652 * linux-mips-low.c (mips_linux_delete_thread): New function.
3653 (the_low_target): Add thread delete callback.
3654 * linux-ppc-low.c (the_low_target): Likewise.
3655 * linux-s390-low.c (the_low_target): Likewise.
3656 * linux-sh-low.c (the_low_target): Likewise.
3657 * linux-tic6x-low.c (the_low_target): Likewise.
3658 * linux-tile-low.c (the_low_target): Likewise.
3659 * linux-x86-low.c (the_low_target): Likewise.
3660 * linux-xtensa-low.c (the_low_target): Likewise.
3661
3662 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3663
3664 * win32-low.c: Include "common-inferior.h".
3665
3666 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3667
3668 * inferiors.c (set_inferior_cwd): New function.
3669 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3670 (handle_query): Inform that QSetWorkingDir is supported.
3671 * win32-low.c (create_process): Pass the inferior's cwd to
3672 CreateProcess.
3673
3674 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3675
3676 * inferiors.c (current_inferior_cwd): New global variable.
3677 (get_inferior_cwd): New function.
3678 * inferiors.h (struct process_info) <cwd>: New field.
3679
3680 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3681
3682 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3683 (OBS): Add gdb_tilde_expand.o.
3684
3685 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3686
3687 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3688 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3689
3690 2017-09-29 Pedro Alves <palves@redhat.com>
3691
3692 * ax.c (gdb_parse_agent_expr): Constify.
3693 * ax.h (gdb_parse_agent_expr): Constify.
3694 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3695 Constify.
3696 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3697 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3698 * remote-utils.h (read_ptid): Constify.
3699 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3700 (process_point_options, process_serial_event): Constify.
3701 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3702 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3703 (cmd_qtbuffer): Constify.
3704
3705 2017-09-29 Pedro Alves <palves@redhat.com>
3706
3707 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3708 fails.
3709
3710 2017-09-29 Pedro Alves <palves@redhat.com>
3711
3712 * linux-low.c (handle_extended_wait): Pass parent thread instead
3713 of process to thread_db_notice_clone.
3714 * linux-low.h (thread_db_notice_clone): Replace parent process
3715 parameter with parent thread parameter.
3716 * thread-db.c (find_one_thread): Add comment.
3717 (thread_db_notice_clone): Replace parent process parameter with
3718 parent thread parameter. Temporarily switch to the parent thread.
3719
3720 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3721
3722 * gdbthread.h: Include "common-gdbthread.h".
3723 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3724 "if" when validating the ptid.
3725 * remote-utils.c: Include "gdbthread.h".
3726 (prepare_resume_reply): Use "switch_to_thread".
3727 * target.c (done_accessing_memory): Likewise.
3728
3729 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3730
3731 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3732 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3733 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3734 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3735 s390x-gs-linux64-ipa.o to ipa_obj.
3736 * linux-s390-low.c (HWCAP_S390_GS): New define.
3737 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3738 New functions.
3739 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3740 (s390_arch_setup): Check for guarded-storage support and choose
3741 appropriate tdesc.
3742 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3743 init_registers_s390x_gs_linux64.
3744 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3745 enum value.
3746 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3747 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3748
3749 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3750
3751 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3752
3753 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3754
3755 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3756 (thread_db_thread_handle): Declare.
3757 * linux-low.c (linux_target_ops): Initialize thread_handle.
3758 * server.c (handle_qxfer_threads_worker): Add support for
3759 "handle" attribute.
3760 * target.h (struct target_ops): Add new function pointer,
3761 thread_handle.
3762 (target_thread_handle): Define.
3763 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3764 field in lwp.
3765 (thread_db_thread_handle): New function.
3766
3767 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3768
3769 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3770 * linux-low.h (thread_db_notice_clone): Declare.
3771 * thread-db.c (thread_db_notice_clone): New function.
3772
3773 2017-09-21 Pedro Alves <palves@redhat.com>
3774
3775 * server.c (gdb_read_memory, handle_status, process_serial_event)
3776 (handle_serial_event, handle_target_event): Adjust to
3777 set_desired_thread prototype change.
3778 * target.c (set_desired_thread): Remove 'use_general' parameter
3779 and adjust.
3780 * target.h (set_desired_thread): Remove 'use_general' parameter.
3781
3782 2017-09-20 Tom Tromey <tom@tromey.com>
3783
3784 * target.c (target_terminal::terminal_state): Define.
3785 (target_terminal::init): Rename from target_terminal_init.
3786 (target_terminal::inferior): Rename from
3787 target_terminal_inferior.
3788 (target_terminal::ours): Rename from target_terminal_ours.
3789 (target_terminal::ours_for_output, target_terminal::info): New.
3790
3791 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3792
3793 * server.c (accumulate_file_name_length): Remove.
3794 (emit_dll_description): Adjust to std::string change.
3795 (handle_qxfer_libraries): Use std::string to hold document.
3796
3797 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3798
3799 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3800 return type of xml_escape_text.
3801 * server.c (emit_dll_description): Likewise.
3802
3803 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3804
3805 * server.c (captured_main): Accept argument for --selftest.
3806 Update run_tests call.
3807 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3808 when registering selftests.
3809
3810 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3811
3812 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3813 instead of "VEC" for "target_desc.reg_defs".
3814 (regcache_cpy): Likewise.
3815 (registers_to_string): Likewise.
3816 (registers_from_string): Likewise.
3817 (find_regno): Likewise.
3818 (supply_regblock): Likewise.
3819 (regcache_raw_read_unsigned): Likewise.
3820 * tdesc.c (init_target_desc): Likewise.
3821 (tdesc_create_reg): Likewise.
3822 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3823 (struct target_desc) <reg_defs>: Convert to "std::vector".
3824 (target_desc): Do not initialize "reg_defs".
3825 (~target_desc): Update code to use "std::vector" instead of "VEC"
3826 for "target_desc.reg_defs".
3827 (operator==): Likewise.
3828
3829 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3830
3831 * inferiors.h (thread_to_gdb_id): Remove.
3832 * inferiors.c (thread_to_gdb_id): Remove.
3833 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3834 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3835 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3836 Likewise.
3837 * nto-low.c (nto_fetch_registers, nto_store_registers,
3838 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3839
3840 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3841
3842 * inferiors.h (gdb_id_to_thread_id): Remove.
3843 * inferiors.c (gdb_id_to_thread_id): Remove.
3844 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3845 removal. Move pid declaration closer to where it's used.
3846
3847 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3848
3849 * server.c (handle_detach): New function.
3850 (process_serial_event): Move code out, call handle_detach.
3851
3852 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3853
3854 * server.c (require_running): Rename to ...
3855 (require_running_or_return): ... this ...
3856 (require_running_or_break): ... and this.
3857 (handle_query, process_serial_event): Adjust.
3858
3859 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3860
3861 * linux-low.c (linux_set_resume_request): Remove unused
3862 variables.
3863
3864 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3865
3866 * server.c (first_thread_of): Remove.
3867 (process_serial_event): Replace usage of first_thread_of with
3868 find_any_thread_of_pid.
3869 * tracepoint.c (same_process_p): Remove.
3870 (gdb_agent_about_to_close): Replace usage of same_process_p with
3871 find_any_thread_of_pid.
3872 * linux-x86-low.c (same_process_callback): Remove.
3873 (x86_arch_setup_process_callback): Replace usage of
3874 same_process_callback with find_any_thread_of_pid.
3875 * thread-db.c (any_thread_of): Remove.
3876 (switch_to_process): Replace usage of any_thread_of with
3877 find_any_thread_of_pid.
3878 * inferiors.c (thread_pid_matches_callback): Remove.
3879 (find_thread_process): Adjust to use find_any_thread_of_pid.
3880
3881 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3882
3883 * regcache.c (get_thread_regcache): Guard calls to "memset"
3884 with "!VEC_empty".
3885
3886 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3887
3888 * linux-low.c (handle_extended_wait): Use
3889 "allocate_target_description" instead of "XNEW".
3890 * linux-x86-low.c (initialize_low_arch): Likewise.
3891
3892 2017-09-05 Yao Qi <yao.qi@linaro.org>
3893
3894 * configure.srv (srv_i386_regobj): Remove.
3895 (srv_amd64_regobj): Remove.
3896 (srv_regobj): Set it to "" for x86 non-linux targets.
3897 * linux-x86-tdesc.c (i386_linux_read_description):
3898 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3899 (init_registers_i386): Remove the declaration.
3900 (tdesc_i386): Remove the declaration.
3901 (lynx_i386_arch_setup): Call i386_create_target_description.
3902 * nto-x86-low.c: Likewise.
3903 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3904 [!__x86_64__]: include arch/i386.h.
3905 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3906
3907 2017-09-05 Yao Qi <yao.qi@linaro.org>
3908
3909 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3910 i386/amd64-XXX-linux from it.
3911
3912 2017-09-05 Yao Qi <yao.qi@linaro.org>
3913
3914 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3915 false.
3916 (ipa_amd64_linux_regobj): Remove.
3917 (ipa_x32_linux_regobj): Remove.
3918
3919 2017-09-05 Yao Qi <yao.qi@linaro.org>
3920
3921 * Makefile.in (arch-amd64.o): New rule.
3922 * configure.srv: Append arch-amd64.o.
3923 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3924 (get_ipa_tdesc): Call amd64_linux_read_description.
3925 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3926 and init_registers_amd64_XXX.
3927 * linux-x86-low.c (x86_linux_read_description): Call
3928 amd64_linux_read_description.
3929 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3930 (initialize_low_arch): Don't call init_registers_x32_XXX and
3931 init_registers_amd64_XXX.
3932 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3933 and tdesc_amd64_XXX.
3934 [__x86_64__] (amd64_tdesc_test): New function.
3935 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3936 and init_registers_amd64_XXX.
3937 * linux-x86-tdesc.c: Include arch/amd64.h.
3938 (xcr0_to_tdesc_idx): New function.
3939 (i386_linux_read_description): New function.
3940 (amd64_get_ipa_tdesc_idx): New function.
3941 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3942 (amd64_get_ipa_tdesc): Declare.
3943
3944 2017-09-05 Yao Qi <yao.qi@linaro.org>
3945
3946 * configure.srv (srv_i386_linux_xmlfiles): Remove
3947 i386/i386-XXX-linux.xml from it.
3948
3949 2017-09-05 Yao Qi <yao.qi@linaro.org>
3950
3951 * configure.srv: Set srv_i386_linux_regobj empty if $development
3952 is false.
3953 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3954 initialize_low_tdesc.
3955 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3956 with #if initialize_low_tdesc.
3957 * linux-x86-tdesc-selftest.c: New file.
3958 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3959
3960 2017-09-05 Yao Qi <yao.qi@linaro.org>
3961
3962 * Makefile.in (arch-i386.o): New rule.
3963 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3964 (x86_64-*-linux*): Likewise.
3965 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3966 include arch/i386.h.
3967 (i386_linux_read_description): Remove code and call
3968 i386_create_target_description.
3969 * tdesc.c (allocate_target_description): New function.
3970 * tdesc.h (set_tdesc_architecture): Remove declaration.
3971 (set_tdesc_osabi): Likewise.
3972
3973 2017-09-05 Yao Qi <yao.qi@linaro.org>
3974
3975 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3976 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3977 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3978 .xmltarget.
3979 * server.c (get_features_xml): Call tdesc_get_features_xml.
3980 * tdesc.c (set_tdesc_architecture): New function.
3981 (set_tdesc_osabi): New function.
3982 (tdesc_get_features_xml): New function.
3983 (tdesc_create_feature): Add an argument.
3984 * tdesc.h (struct target_desc) <features>: New field.
3985 <arch, osabi>: New field.
3986 (~target_desc): xfree features, arch, and osabi.
3987 (target_desc::oerator==): Don't compare .xmltarget.
3988 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
3989 (set_tdesc_osabi): Likewise.
3990 (tdesc_get_features_xml): Likewise.
3991
3992 2017-09-05 Yao Qi <yao.qi@linaro.org>
3993
3994 * linux-x86-tdesc.c: Include selftest.h.
3995 (i386_tdesc_test): New function.
3996 (initialize_low_tdesc): Call selftests::register_test.
3997 * tdesc.h: Include regdef.h.
3998 (target_desc): Override operator == and !=.
3999
4000 2017-09-05 Yao Qi <yao.qi@linaro.org>
4001
4002 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4003 (ipa_obj): Likewise.
4004 * linux-i386-ipa.c: Include common/x86-xstate.h
4005 (get_ipa_tdesc): Call i386_linux_read_description.
4006 (initialize_low_tracepoint): Don't call init_registers_XXX
4007 functions, call initialize_low_tdesc instead.
4008 * linux-x86-low.c (x86_linux_read_description): Call
4009 i386_linux_read_description.
4010 (initialize_low_arch): Don't call init_registers_i386_XXX
4011 functions, call initialize_low_tdesc.
4012 * linux-x86-tdesc.c: New file.
4013 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4014 (i386_get_ipa_tdesc_idx): Declare.
4015 (i386_get_ipa_tdesc): Declare.
4016 (initialize_low_tdesc): Declare.
4017
4018 2017-09-05 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4021 instead of 0.
4022
4023 2017-09-05 Yao Qi <yao.qi@linaro.org>
4024
4025 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4026 * regcache.c (get_thread_regcache): Use VEC_length.
4027 (init_register_cache): Likewise.
4028 (regcache_cpy): Likewise.
4029 (registers_to_string): Iterate reg_defs via VEC_iterate.
4030 (find_regno): Likewise.
4031 (find_register_by_number): Use VEC_index.
4032 (register_size): Call find_register_by_number.
4033 (register_data): Call find_register_by_number.
4034 (supply_regblock): Use VEC_length.
4035 (regcache_raw_read_unsigned): Likewise.
4036 * tdesc.c (init_target_desc): Iterate reg_defs via
4037 VEC_iterate.
4038 (default_description): Update initializer.
4039 (copy_target_description): Don't update field num_registers.
4040 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4041 <num_registers>: Remove.
4042
4043 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4044
4045 * Makefile.in (.SECONDARY): Define target.
4046
4047 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4048
4049 * linux-low.c (linux_wait_1): Adjust.
4050 * server.c (queue_stop_reply_callback): Adjust.
4051
4052 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4053
4054 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4055 QEnvironmentUnset and QEnvironmentReset packets.
4056 (handle_query): Inform remote that QEnvironmentHexEncoded,
4057 QEnvironmentUnset and QEnvironmentReset are supported.
4058
4059 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4060
4061 * inferiors.h (inferior_target_data): Rename to ...
4062 (thread_target_data): ... this.
4063 (inferior_regcache_data): Rename to ...
4064 (thread_regcache_data): ... this.
4065 (set_inferior_regcache_data): Rename to ...
4066 (set_thread_regcache_data): ... this.
4067 * inferiors.c (inferior_target_data): Rename to ...
4068 (thread_target_data): ... this.
4069 (inferior_regcache_data): Rename to ...
4070 (thread_regcache_data): ... this.
4071 (set_inferior_regcache_data): Rename to ...
4072 (set_thread_regcache_data): ... this.
4073 (free_one_thread): Update.
4074 * linux-low.h (get_thread_lwp): Update.
4075 * regcache.c (get_thread_regcache): Update.
4076 (regcache_invalidate_thread): Update.
4077 (free_register_cache_thread): Update.
4078 * win32-i386-low.c (update_debug_registers_callback): Update.
4079 (win32_get_current_dr): Update.
4080 * win32-low.c (thread_rec): Update.
4081 (delete_thread_info): Update.
4082 (continue_one_thread): Update.
4083 (suspend_one_thread): Update.
4084
4085 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4086
4087 * inferiors.c (set_inferior_target_data): Remove.
4088 * inferiors.h (set_inferior_target_data): Remove.
4089
4090 2017-08-18 Yao Qi <yao.qi@linaro.org>
4091
4092 * Makefile.in (OBS): Add selftest.o.
4093 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4094 * configure, config.in: Re-generated.
4095 * server.c: Include common/sefltest.h.
4096 (captured_main): Handle option --selftest.
4097
4098 2017-08-09 Yao Qi <yao.qi@linaro.org>
4099
4100 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4101 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4102 i386-avx-mpx.o and i386-mmx.o.
4103 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4104 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4105 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4106 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4107 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4108 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4109 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4110 i386/amd64-avx-mpx.xml.
4111
4112 2017-08-09 Yao Qi <yao.qi@linaro.org>
4113
4114 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4115 and x32-avx-avx512.o.
4116 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4117 i386/x32-avx-avx512.xml.
4118
4119 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4120
4121 * tracepoint.h (enum class fast_tpoint_collect_result): New
4122 enumeration.
4123 (fast_tracepoint_collecting): Change return type to
4124 fast_tpoint_collect_result.
4125 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4126 * linux-low.h: Include tracepoint.h.
4127 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4128 fast_tpoint_collect_result.
4129 * linux-low.c (handle_tracepoints): Adjust.
4130 (linux_fast_tracepoint_collecting): Change return type to
4131 fast_tpoint_collect_result.
4132 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4133 linux_wait_1, stuck_in_jump_pad_callback,
4134 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4135 proceed_one_lwp): Adjust to type change.
4136
4137 2017-07-10 Yao Qi <yao.qi@linaro.org>
4138
4139 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4140
4141 2017-06-29 Yao Qi <yao.qi@linaro.org>
4142
4143 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4144 Remove.
4145 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4146
4147 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4148
4149 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4150
4151 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4152
4153 * linux-low.c (linux_create_inferior): Adjust code to access the
4154 environment information via 'gdb_environ' class.
4155 * lynx-low.c (lynx_create_inferior): Likewise.
4156 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4157 (get_environ): Return a pointer to 'our_environ'.
4158 (captured_main): Initialize 'our_environ'.
4159 * server.h (get_environ): Adjust prototype.
4160 * spu-low.c (spu_create_inferior): Adjust code to access the
4161 environment information via 'gdb_environ' class.
4162
4163 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4164
4165 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4166 usage of "register" keyword.
4167
4168 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4169
4170 * configure: Re-generate.
4171
4172 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4173
4174 * configure: Re-generate.
4175
4176 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4177
4178 * Makefile.in (COMPILE.pre): Add "-x c++".
4179
4180 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4181
4182 * fork-child.c: Conditionally include <signal.h>.
4183
4184 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4185
4186 * server.c (handle_general_set): Handle new packet
4187 "QStartupWithShell".
4188 (handle_query): Add "QStartupWithShell" to the list of supported
4189 packets.
4190 (gdbserver_usage): Add help text explaining the
4191 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4192 options.
4193 (captured_main): Recognize and act upon the presence of the new
4194 CLI options.
4195
4196 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4197 Pedro Alves <palves@redhat.com>
4198
4199 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4200 * configure: Regenerate.
4201 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4202 "fork-inferior.o".
4203 (i[34567]86-*-lynxos*): Likewise.
4204 (spu*-*-*): Likewise.
4205 * fork-child.c: New file.
4206 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4207 and "environ.h".
4208 (linux_ptrace_fun): New function.
4209 (linux_create_inferior): Adjust function prototype to reflect
4210 change on "target.h". Adjust function code to use
4211 "fork_inferior".
4212 (linux_request_interrupt): Delete "signal_pid".
4213 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4214 (lynx_ptrace_fun): New function.
4215 (lynx_create_inferior): Adjust function prototype to reflect
4216 change on "target.h". Adjust function code to use
4217 "fork_inferior".
4218 * nto-low.c (nto_create_inferior): Adjust function prototype and
4219 code to reflect change on "target.h". Update comments.
4220 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4221 "common-terminal.h" and "environ.h".
4222 (terminal_fd): Moved to fork-child.c.
4223 (old_foreground_pgrp): Likewise.
4224 (restore_old_foreground_pgrp): Likewise.
4225 (last_status): Make it global.
4226 (last_ptid): Likewise.
4227 (our_environ): New variable.
4228 (startup_with_shell): Likewise.
4229 (program_name): Likewise.
4230 (program_argv): Rename to...
4231 (program_args): ...this.
4232 (wrapper_argv): New variable.
4233 (start_inferior): Delete function.
4234 (get_exec_wrapper): New function.
4235 (get_exec_file): Likewise.
4236 (get_environ): Likewise.
4237 (prefork_hook): Likewise.
4238 (post_fork_inferior): Likewise.
4239 (postfork_hook): Likewise.
4240 (postfork_child_hook): Likewise.
4241 (handle_v_run): Update code to deal with arguments coming from the
4242 remote host. Update calls from "start_inferior" to
4243 "create_inferior".
4244 (captured_main): Likewise. Initialize environment variable. Call
4245 "have_job_control".
4246 * server.h (post_fork_inferior): New prototype.
4247 (get_environ): Likewise.
4248 (last_status): Declare.
4249 (last_ptid): Likewise.
4250 (signal_pid): Likewise.
4251 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4252 (spu_ptrace_fun): New function.
4253 (spu_create_inferior): Adjust function prototype to reflect change
4254 on "target.h". Adjust function code to use "fork_inferior".
4255 * target.c (target_terminal_init): New function.
4256 (target_terminal_inferior): Likewise.
4257 (target_terminal_ours): Likewise.
4258 * target.h: Include <vector>.
4259 (struct target_ops) <create_inferior>: Update prototype.
4260 (create_inferior): Update macro.
4261 * utils.c (gdb_flush_out_err): New function.
4262 * win32-low.c (win32_create_inferior): Adjust function prototype
4263 and code to reflect change on "target.h".
4264
4265 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4266
4267 * inferiors.c (switch_to_thread): New function.
4268
4269 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4270
4271 * Makefile.in (SFILE): Add "common/job-control.c".
4272 (OBS): Add "job-control.o".
4273
4274 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4275
4276 * Makefile: Remove "@host_makefile_frag@".
4277
4278 2017-05-05 Pedro Alves <palves@redhat.com>
4279
4280 * configure: Regenerate.
4281
4282 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4283
4284 * configure: Regenerate.
4285
4286 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4287
4288 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4289 software_single_step change of return type to
4290 std::vector<CORE_ADDR>.
4291 * linux-low.c (install_software_single_step_breakpoints):
4292 Likewise.
4293 * linux-low.h (install_software_single_step_breakpoints):
4294 Likewise.
4295
4296 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4297
4298 * remote-utils.c: Include "gdb_termios.h" instead of
4299 "terminal.h".
4300 * terminal.h: Delete file.
4301
4302 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4303
4304 * server.c: Include <vector>.
4305 <program_argv, wrapper_argv>: Convert to std::vector.
4306 (start_inferior): Rewrite function to use C++.
4307 (handle_v_run): Likewise. Update code that calculates the argv
4308 based on the vRun packet; use C++.
4309 (captured_main): Likewise.
4310
4311 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4312
4313 * server.c (handle_v_cont): Initialize thread_resume::thread
4314 with null_ptid.
4315
4316 2017-04-05 Pedro Alves <palves@redhat.com>
4317
4318 * configure: Regenerate.
4319
4320 2017-04-05 Pedro Alves <palves@redhat.com>
4321
4322 * gdbreplay.c (sync_error): Constify.
4323 * linux-x86-low.c (push_opcode): Constify.
4324
4325 2017-04-05 Pedro Alves <palves@redhat.com>
4326
4327 * win32-low.c (get_child_debug_event)
4328 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4329 Report TARGET_WAITKIND_SPURIOUS instead.
4330
4331 2017-04-05 Pedro Alves <palves@redhat.com>
4332
4333 * remote-utils.c (remote_prepare, remote_open): Constify.
4334 * remote-utils.h (remote_prepare, remote_open): Constify.
4335 * server.c (captured_main): Constify 'port' handling.
4336
4337 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4338
4339 * Makefile.in (clean): Clear .deps.
4340
4341 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4342
4343 * .gitignore: Remove generated files, replace with wildcard.
4344 * (clean): Replace removal of generated files with wildcard.
4345 (version.c): Replace with...
4346 (version-generated.c): ...this.
4347 (xml-builtin.c): Replace with...
4348 (xml-builtin-generated.c): ...this.
4349 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4350 (%.c: *regformats*): Replace with...
4351 (%-generated.c: *regformats*): ...this.
4352
4353 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4354
4355 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4356 (xtensa_fill_gregset): Call collect_register_by_name for
4357 threadptr register.
4358 (xtensa_store_gregset): Call supply_register_by_name for
4359 threadptr register.
4360
4361 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4362
4363 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4364 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4365 (xtensa_store_gregset): Call supply_register for all registers in
4366 a0_regnum..a0_regnum + C0_NREGS range.
4367
4368 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4369
4370 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4371 (ax-ipa.o: ax.c): Remove.
4372 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4373 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4374 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4375 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4376 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4377
4378 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4379
4380 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4381 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4382 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4383 (errors-ipa.o: ../common/errors.c): Remove.
4384 (format-ipa.o: ../common/format.c): Remove.
4385 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4386
4387 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4388
4389 * Makefile.in (%-ipa.o: %.c): New rule.
4390 (tracepoint-ipa.o: tracepoint.c): Remove.
4391 (utils-ipa.o: utils.c): Remove.
4392 (remote-utils-ipa.o: remote-utils.c): Remove.
4393 (regcache-ipa.o: regcache.c): Remove.
4394 (i386-linux-ipa.o: i386-linux.c): Remove.
4395 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4396 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4397 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4398 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4399 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4400 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4401 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4402 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4403 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4404 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4405 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4406 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4407 (aarch64-ipa.o: aarch64.c): Remove.
4408 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4409 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4410 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4411 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4412 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4413 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4414 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4415 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4416 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4417 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4418 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4419 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4420 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4421 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4422 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4423 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4424 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4425 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4426 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4427 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4428 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4429 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4430 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4431 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4432 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4433 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4434 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4435 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4436 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4437 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4438 (tdesc-ipa.o: tdesc.c): Remove.
4439 (x32-linux-ipa.o: x32-linux.c): Remove.
4440 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4441 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4442
4443 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4444
4445 * Makefile.in (%.o: ../arch/%.c): New rule.
4446 (arm.o: ../arch/arm.c): Remove.
4447 (arm-linux.o: ../arch/arm-linux.c): Remove.
4448 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4449 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4450
4451 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4452
4453 * Makefile.in (%.o: ../nat/%.c): New rule.
4454 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4455 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4456 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4457 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4458 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4459 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4460 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4461 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4462 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4463 (linux-personality.o: ../nat/linux-personality.c): Remove.
4464 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4465 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4466 (x86-linux.o: ../nat/x86-linux.c): Remove.
4467 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4468 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4469
4470 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4471
4472 * Makefile.in (%.o: ../common/%.c): New rule.
4473 (signals.o: ../common/signals.c): Remove.
4474 (print-utils.o: ../common/print-utils.c): Remove.
4475 (rsp-low.o: ../common/rsp-low.c): Remove.
4476 (common-utils.o: ../common/common-utils.c): Remove.
4477 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4478 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4479 (vec.o: ../common/vec.c): Remove.
4480 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4481 (xml-utils.o: ../common/xml-utils.c): Remove.
4482 (ptid.o: ../common/ptid.c): Remove.
4483 (buffer.o: ../common/buffer.c): Remove.
4484 (format.o: ../common/format.c): Remove.
4485 (filestuff.o: ../common/filestuff.c): Remove.
4486 (agent.o: ../common/agent.c): Remove.
4487 (errors.o: ../common/errors.c): Remove.
4488 (environ.o: ../common/environ.c): Remove.
4489 (common-debug.o: ../common/common-debug.c): Remove.
4490 (cleanups.o: ../common/cleanups.c): Remove.
4491 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4492 (fileio.o: ../common/fileio.c): Remove.
4493 (common-regcache.o: ../common/common-regcache.c): Remove.
4494 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4495 (new-op.o: ../common/new-op.c): Remove.
4496 (btrace-common.o: ../common/btrace-common.c): Remove.
4497
4498 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4499
4500 * Makefile.in (%.o: ../target/%.c): New rule.
4501 (waitstatus.o: ../target/waitstatus.c): Remove.
4502
4503 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4504
4505 * Makefile.in
4506 (%.c: ../regformats/%.dat,
4507 (%.c: ../regformats/arm/%.dat,
4508 (%.c: ../regformats/i386/%.dat,
4509 (%.c: ../regformats/rs6000/%.dat): New rules.
4510 (aarch64.c): Remove.
4511 (reg-arm.c): Remove.
4512 (arm-with-iwmmxt.c): Remove.
4513 (arm-with-vfpv2.c): Remove.
4514 (arm-with-vfpv3.c): Remove.
4515 (arm-with-neon.c): Remove.
4516 (reg-bfin.c): Remove.
4517 (reg-cris.c): Remove.
4518 (reg-crisv32.c): Remove.
4519 (i386.c): Remove.
4520 (i386-linux.c): Remove.
4521 (i386-avx.c): Remove.
4522 (i386-avx-linux.c): Remove.
4523 (i386-avx-avx512.c): Remove.
4524 (i386-avx-avx512-linux.c): Remove.
4525 (i386-mpx.c): Remove.
4526 (i386-mpx-linux.c): Remove.
4527 (i386-avx-mpx-avx512-pku.c): Remove.
4528 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4529 (i386-avx-mpx.c): Remove.
4530 (i386-avx-mpx-linux.c): Remove.
4531 (i386-mmx.c): Remove.
4532 (i386-mmx-linux.c): Remove.
4533 (reg-ia64.c): Remove.
4534 (reg-m32r.c): Remove.
4535 (reg-m68k.c): Remove.
4536 (reg-cf.c): Remove.
4537 (mips-linux.c): Remove.
4538 (mips-dsp-linux.c): Remove.
4539 (mips64-linux.c): Remove.
4540 (mips64-dsp-linux.c): Remove.
4541 (nios2-linux.c): Remove.
4542 (powerpc-32.c): Remove.
4543 (powerpc-32l.c): Remove.
4544 (powerpc-altivec32l.c): Remove.
4545 (powerpc-cell32l.c): Remove.
4546 (powerpc-vsx32l.c): Remove.
4547 (powerpc-isa205-32l.c): Remove.
4548 (powerpc-isa205-altivec32l.c): Remove.
4549 (powerpc-isa205-vsx32l.c): Remove.
4550 (powerpc-e500l.c): Remove.
4551 (powerpc-64l.c): Remove.
4552 (powerpc-altivec64l.c): Remove.
4553 (powerpc-cell64l.c): Remove.
4554 (powerpc-vsx64l.c): Remove.
4555 (powerpc-isa205-64l.c): Remove.
4556 (powerpc-isa205-altivec64l.c): Remove.
4557 (powerpc-isa205-vsx64l.c): Remove.
4558 (s390-linux32.c): Remove.
4559 (s390-linux32v1.c): Remove.
4560 (s390-linux32v2.c): Remove.
4561 (s390-linux64.c): Remove.
4562 (s390-linux64v1.c): Remove.
4563 (s390-linux64v2.c): Remove.
4564 (s390-te-linux64.c): Remove.
4565 (s390-vx-linux64.c): Remove.
4566 (s390-tevx-linux64.c): Remove.
4567 (s390x-linux64.c): Remove.
4568 (s390x-linux64v1.c): Remove.
4569 (s390x-linux64v2.c): Remove.
4570 (s390x-te-linux64.c): Remove.
4571 (s390x-vx-linux64.c): Remove.
4572 (s390x-tevx-linux64.c): Remove.
4573 (tic6x-c64xp-linux.c): Remove.
4574 (tic6x-c64x-linux.c): Remove.
4575 (tic6x-c62x-linux.c): Remove.
4576 (reg-sh.c): Remove.
4577 (reg-sparc64.c): Remove.
4578 (reg-spu.c): Remove.
4579 (amd64.c): Remove.
4580 (amd64-linux.c): Remove.
4581 (amd64-avx.c): Remove.
4582 (amd64-avx-linux.c): Remove.
4583 (amd64-avx-avx512.c): Remove.
4584 (amd64-avx-avx512-linux.c): Remove.
4585 (amd64-mpx.c): Remove.
4586 (amd64-mpx-linux.c): Remove.
4587 (amd64-avx-mpx-avx512-pku.c): Remove.
4588 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4589 (amd64-avx-mpx.c): Remove.
4590 (amd64-avx-mpx-linux.c): Remove.
4591 (x32.c): Remove.
4592 (x32-linux.c): Remove.
4593 (x32-avx.c): Remove.
4594 (x32-avx-linux.c): Remove.
4595 (x32-avx-avx512.c): Remove.
4596 (x32-avx-avx512-linux.c): Remove.
4597 (reg-xtensa.c): Remove.
4598 (reg-tilegx.c): Remove.
4599 (reg-tilegx32.c): Remove.
4600
4601 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4602
4603 * Makefile.in (SFILES): Add "common/environ.c".
4604 (OBJS): Add "common/environ.h".
4605
4606 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4607
4608 * configure.ac: Check if the fs_base and gs_base members of
4609 `struct user_regs_struct' exist.
4610 * config.in: Regenerated.
4611 * configure: Likewise.
4612
4613 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4614
4615 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4616 target_read_memory.
4617 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4618 (get_next_pcs_syscall_next_pc): Likewise.
4619
4620 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4621
4622 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4623 * nto-x86-low.c: Likewise.
4624
4625 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4626
4627 * Makefile.in: Include disable-implicit-rules.mk.
4628
4629 2016-11-23 Pedro Alves <palves@redhat.com>
4630
4631 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4632 (debug_vprintf): Use std::chrono::steady_clock instead of
4633 gettimeofday. Use '.' instead of ':'.
4634 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4635 (get_timestamp): Use std::chrono::steady_clock instead of
4636 gettimeofday.
4637
4638 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4639
4640 * Makefile.in: Fix whitespace formatting.
4641
4642 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4643
4644 * Makefile.in (SFILES, OBS): Flatten list and order
4645 alphabetically.
4646
4647 2016-11-23 Pedro Alves <palves@redhat.com>
4648
4649 * event-loop.c (handle_file_event): Use warning.
4650 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4651 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4652 Use warning.
4653
4654 2016-11-23 Pedro Alves <palves@redhat.com>
4655
4656 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4657 output.
4658 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4659 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4660 debug_printf and debug_flush for debug output.
4661 * server.c (handle_general_set): Likewise.
4662 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4663 output.
4664
4665 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4666
4667 * Makefile.in (.c.o): Replace rule with ...
4668 (%.o: %.c): ... this one.
4669
4670 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4671
4672 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4673 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4674 make.
4675 * configure.ac: Remove checks for the make program.
4676 * configure: Re-generate.
4677
4678 2016-10-28 Pedro Alves <palves@redhat.com>
4679
4680 * Makefile.in (CXX_DIALECT): Get from configure.
4681 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4682 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4683 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4684 * config.in: Regenerate.
4685 * configure: Regenerate.
4686
4687 2016-10-27 Yao Qi <yao.qi@linaro.org>
4688
4689 * linux-low.c (linux_supports_range_stepping): Return true if
4690 can_software_single_step return true.
4691
4692 2016-10-27 Yao Qi <yao.qi@linaro.org>
4693
4694 * inferiors.c (find_inferior_in_random): New function.
4695 * inferiors.h (find_inferior_in_random): Declare.
4696 * linux-low.c (linux_wait_for_event_filtered): Call
4697 find_inferior_in_random instead of find_inferior.
4698
4699 2016-10-27 Yao Qi <yao.qi@linaro.org>
4700
4701 * linux-low.c (linux_wait_1): If single-step breakpoints are
4702 inserted, remove them.
4703
4704 2016-10-26 Pedro Alves <palves@redhat.com>
4705
4706 * linux-low.c (handle_extended_wait): Link parent/child fork
4707 threads.
4708 (linux_wait_1): Unlink them.
4709 (linux_set_resume_request): Ignore resume requests for
4710 already-resumed and unhandled fork child threads.
4711 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4712 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4713 New functions.
4714 (handle_v_requests) <vCont>: Don't call require_running.
4715 * server.h (in_queued_stop_replies): New declaration.
4716
4717 2016-10-24 Yao Qi <yao.qi@linaro.org>
4718
4719 PR server/20733
4720 * linux-aarch64-low.c (append_insns): Cast the return value to
4721 'uint32_t *'.
4722
4723 2016-10-10 Yao Qi <yao.qi@linaro.org>
4724
4725 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4726
4727 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4728
4729 * target.c (target_supports_multi_process): New function, moved
4730 from...
4731 * target.h (target_supports_multi_process): ... here. Remove
4732 macro.
4733
4734 2016-10-05 Tom Tromey <tom@tromey.com>
4735
4736 PR remote/20655:
4737 * tracepoint.c (handle_tracepoint_bkpts): Check
4738 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4739
4740 2016-10-05 Yao Qi <yao.qi@linaro.org>
4741
4742 * configure.srv: Update the path of arm-*.xml files.
4743
4744 2016-10-05 Terry Guo <terry.guo@arm.com>
4745 Yao Qi <yao.qi@linaro.org>
4746
4747 * Makefile.in: Adjust the path of rules.
4748 * configure.srv: Update the path of xml files.
4749 * regformats/arm-with-iwmmxt.dat: Regenerated.
4750 * regformats/arm-with-neon.dat: Likewise.
4751 * regformats/arm-with-vfpv2.dat: Likewise.
4752 * regformats/arm-with-vfpv3.dat Likewise.
4753
4754 2016-09-30 Yao Qi <yao.qi@linaro.org>
4755
4756 PR gdbserver/20627
4757 * target.c (target_stop_and_wait): Don't call
4758 target_continue_no_signal, use resume_stop instead.
4759
4760 2016-09-26 Yao Qi <yao.qi@linaro.org>
4761
4762 * linux-low.c (linux_wait_1): Call debug_exit.
4763
4764 2016-09-23 Pedro Alves <palves@redhat.com>
4765
4766 * Makefile.in (SFILES): Add common/new-op.c.
4767 (OBS): Add common/new-op.o.
4768 (new-op.o): New rule.
4769
4770 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4771
4772 * .gitinore: Ignore more files.
4773
4774 2016-09-21 Yao Qi <yao.qi@linaro.org>
4775
4776 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4777 23.
4778
4779 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4780
4781 * server.c (start_inferior): Call target_mourn_inferior instead of
4782 mourn_inferior; pass ptid_t argument to it.
4783 (resume): Likewise.
4784 (handle_target_event): Likewise.
4785 * target.c (target_mourn_inferior): New function.
4786 * target.h (mourn_inferior): Delete macro.
4787
4788 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4789
4790 * linux-low.c (lwp_is_stepping): New function.
4791
4792 2016-09-06 Carl Love <cel@us.ibm.com>
4793
4794 * server.c (start_inferior): Fixed comment, requested comment change
4795 didn't get updated correctly. Removed reference to ptrace () call as
4796 it is only true on Linux systems.
4797
4798 2016-09-06 Carl Love <cel@us.ibm.com>
4799
4800 * server.c (start_inferior): Do not call
4801 function target_post_create_inferior () if the
4802 inferior process has already exited.
4803
4804 2016-09-05 Pedro Alves <palves@redhat.com>
4805
4806 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4807 (COMPILE.pre, CC_LD): Use CXX directly.
4808 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4809 * acinclude.m4: Don't include build-with-cxx.m4.
4810 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4811 * configure: Regenerate.
4812
4813 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4814
4815 PR gdb/19495
4816 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4817 call writing data to own_buf.
4818
4819 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4820
4821 * target.c (mywait): Call target_wait instead of
4822 the_target->wait.
4823 (target_wait): New function.
4824
4825 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4826
4827 * server.c (start_inferior): New variable 'ptid'. Replace calls
4828 to the_target->resume by target_continue{,_no_signal}, depending
4829 on the case.
4830 * target.c (target_stop_and_wait): Call target_continue_no_signal
4831 instead of the_target->resume.
4832 (target_continue): New function.
4833
4834 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4835
4836 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4837
4838 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4839
4840 PR server/20491
4841 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4842 ps_prochandle.
4843 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4844 * linux-arm-low.c (ps_get_thread_area): Likewise.
4845 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4846 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4847 * linux-mips-low.c (ps_get_thread_area): Likewise.
4848 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4849 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4850 * linux-x86-low.c (ps_get_thread_area): Likewise.
4851 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4852
4853 2016-08-19 Pedro Alves <palves@redhat.com>
4854
4855 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4856
4857 2016-08-19 Pedro Alves <palves@redhat.com>
4858
4859 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4860 comment. Use memcpy instead of casting through unsigned long.
4861
4862 2016-08-19 Pedro Alves <palves@redhat.com>
4863
4864 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4865 allocating around 0x80000000.
4866
4867 2016-08-19 Pedro Alves <palves@redhat.com>
4868
4869 PR gdb/20415
4870 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4871 (x32-avx512-linux-ipa.o): New rules.
4872 * configure.ac (x86_64-*-linux*): New x32 check.
4873 * configure.srv (ipa_x32_linux_regobj): New.
4874 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4875 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4876 descriptions.
4877 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4878 descriptions.
4879 * configure: Regenerate.
4880
4881 2016-08-09 Pedro Alves <palves@redhat.com>
4882
4883 PR gdb/18653
4884 * Makefile.in (OBS): Add signals-state-save-restore.o.
4885 (signals-state-save-restore.o): New rule.
4886 * config.in: Regenerate.
4887 * configure: Regenerate.
4888 * linux-low.c: Include "signals-state-save-restore.h".
4889 (linux_create_inferior): Call
4890 restore_original_signals_state.
4891 * server.c: Include "dispositions-save-restore.h".
4892 (captured_main): Call save_original_signals_state.
4893
4894 2016-08-05 Pedro Alves <palves@redhat.com>
4895
4896 * configure: Regenerate.
4897
4898 2016-08-04 Yao Qi <yao.qi@linaro.org>
4899
4900 * linux-low.c (regsets_fetch_inferior_registers): Check
4901 errno is ESRCH or not.
4902
4903 2016-08-02 Yao Qi <yao.qi@linaro.org>
4904
4905 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4906 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4907 (thread_db_load_search): Update.
4908 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4909 td_ta_set_event and td_ta_event_getmsg.
4910
4911 2016-07-26 Pedro Alves <palves@redhat.com>
4912
4913 PR server/20414
4914 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4915 of unsigned long for 64-bit registers and use uint32_t instead of
4916 unsigned int for 32-bit registers.
4917
4918 2016-07-26 Pedro Alves <palves@redhat.com>
4919
4920 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4921 to 'ptrace'.
4922
4923 2016-07-21 Tom Tromey <tom@tromey.com>
4924
4925 * configure: Rebuild.
4926
4927 2016-07-21 Yao Qi <yao.qi@linaro.org>
4928
4929 * mem-break.c (find_gdb_breakpoint): Cast bp to
4930 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4931
4932 2016-07-21 Yao Qi <yao.qi@linaro.org>
4933
4934 * server.c (handle_v_requests): Support s and S actions
4935 if target_supports_software_single_step return true.
4936
4937 2016-07-21 Yao Qi <yao.qi@linaro.org>
4938
4939 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4940 is resume_step, call maybe_hw_step.
4941 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4942 and unstop them.
4943 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4944 breakpoints or not.
4945 (proceed_one_lwp): If resume request is resume_step, install
4946 reinsert breakpoints and call maybe_hw_step.
4947
4948 2016-07-21 Yao Qi <yao.qi@linaro.org>
4949
4950 * linux-low.c (proceed_one_lwp): Declare.
4951 (linux_resume_one_thread): Remove local variable 'step'.
4952 Lift code enqueue signal. Call proceed_one_lwp instead of
4953 linux_resume_one_lwp.
4954
4955 2016-07-21 Yao Qi <yao.qi@linaro.org>
4956
4957 * linux-low.c (linux_resume_one_thread): Call
4958 enqueue_pending_signal.
4959
4960 2016-07-21 Yao Qi <yao.qi@linaro.org>
4961
4962 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4963 * inferiors.c (do_restore_current_thread_cleanup): New function.
4964 (make_cleanup_restore_current_thread): Likewise.
4965 * linux-low.c (install_software_single_step_breakpoints): Call
4966 make_cleanup_restore_current_thread. Switch current_thread to
4967 thread.
4968
4969 2016-07-21 Yao Qi <yao.qi@linaro.org>
4970
4971 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4972 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4973 (clone_one_breakpoint): Likewise.
4974 (delete_reinsert_breakpoints): Change parameter to thread.
4975 Callers updated.
4976 (has_reinsert_breakpoints): Likewise.
4977 (uninsert_reinsert_breakpoints): Likewise.
4978 (reinsert_reinsert_breakpoints): Likewise.
4979 * mem-break.h (set_reinsert_breakpoint): Update declaration.
4980 (delete_reinsert_breakpoints): Likewise.
4981 (reinsert_reinsert_breakpoints): Likewise.
4982 (uninsert_reinsert_breakpoints): Likewise.
4983 (has_reinsert_breakpoints): Likewise.
4984
4985 2016-07-21 Yao Qi <yao.qi@linaro.org>
4986
4987 * inferiors.c (get_thread_process): Make parameter const.
4988 * inferiors.h (get_thread_process): Update declaration.
4989 * mem-break.c (clone_all_breakpoints): Remove all parameters.
4990 Add new parameters child_thread and parent_thread. Callers
4991 updated.
4992 * mem-break.h (clone_all_breakpoints): Update declaration.
4993
4994 2016-07-21 Yao Qi <yao.qi@linaro.org>
4995
4996 * mem-break.c (struct breakpoint) <cond_list>: Remove.
4997 <command_list, handler>: Remove.
4998 (struct gdb_breakpoint): New.
4999 (struct other_breakpoint): New.
5000 (struct reinsert_breakpoint): New.
5001 (is_gdb_breakpoint): New function.
5002 (any_persistent_commands): Update command_list if
5003 is_gdb_breakpoint returns true.
5004 (set_breakpoint): Create breakpoints according to their types.
5005 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5006 (set_gdb_breakpoint_1): Likewise.
5007 (set_gdb_breakpoint): Likewise.
5008 (clear_breakpoint_conditions): Change parameter type to
5009 'struct gdb_breakpoint *'.
5010 (clear_breakpoint_commands): Likewise.
5011 (clear_breakpoint_conditions_and_commands): Likewise.
5012 (add_condition_to_breakpoint): Likewise.
5013 (add_breakpoint_condition): Likewise.
5014 (add_commands_to_breakpoint): Likewise.
5015 (check_breakpoints): Check other_breakpoint.
5016 (clone_one_breakpoint): Clone breakpopint according to its type.
5017 * mem-break.h (struct gdb_breakpoint): Declare.
5018 (set_gdb_breakpoint): Update declaration.
5019 (clear_breakpoint_conditions_and_commands): Likewise.
5020 (add_breakpoint_condition): Likewise.
5021 (add_breakpoint_commands): Likewise.
5022 * server.c (process_point_options): Change parameter type to
5023 'struct gdb_breakpoint *'.
5024
5025 2016-07-21 Yao Qi <yao.qi@linaro.org>
5026
5027 * mem-break.c (set_breakpoint_at): Rename it to ...
5028 (set_breakpoint_type_at): ... it.
5029 (set_breakpoint_at): Call set_breakpoint_type_at.
5030 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5031 * mem-break.h (set_breakpoint_at): Update comments.
5032
5033 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5034
5035 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5036 to buf parameter.
5037 (nios2_store_gregset): Likewise.
5038
5039 2016-07-01 Pedro Alves <palves@redhat.com>
5040 Antoine Tremblay <antoine.tremblay@ericsson.com>
5041
5042 * linux-low.c: Change interface to take the target lwp_info
5043 pointer directly and return void. Handle detaching from a zombie
5044 thread.
5045 (linux_detach_lwp_callback): New function.
5046 (linux_detach): Detach from the leader thread after detaching from
5047 the clone threads.
5048
5049 2016-06-28 Yao Qi <yao.qi@linaro.org>
5050
5051 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5052 for variable new_offset.
5053 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5054 (aarch64_ftrace_insn_reloc_cb): Likewise.
5055 (aarch64_ftrace_insn_reloc_tb): Likewise.
5056 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5057 PRIx64 instead of PRIx32.
5058
5059 2016-06-28 Yao Qi <yao.qi@linaro.org>
5060
5061 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5062 (the_low_target): Install arm_get_syscall_trapinfo.
5063
5064 2016-06-28 Yao Qi <yao.qi@linaro.org>
5065
5066 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5067 function.
5068 (the_low_target): Install aarch64_get_syscall_trapinfo.
5069
5070 2016-06-28 Yao Qi <yao.qi@linaro.org>
5071
5072 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5073 Callers updated.
5074 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5075 Remove parameter sysno.
5076 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5077 sysret.
5078
5079 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5080
5081 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5082 (s390_emit_ne_goto): Likewise.
5083 (s390_emit_lt_goto): Likewise.
5084 (s390_emit_le_goto): Likewise.
5085 (s390_emit_gt_goto): Likewise.
5086 (s390_emit_ge_goto): Likewise.
5087 (s390x_emit_eq_goto): Likewise.
5088 (s390x_emit_ne_goto): Likewise.
5089 (s390x_emit_lt_goto): Likewise.
5090 (s390x_emit_le_goto): Likewise.
5091 (s390x_emit_gt_goto): Likewise.
5092 (s390x_emit_ge_goto): Likewise.
5093 (s390_emit_ops_impl): Mark variable static.
5094 (s390x_emit_ops): Likewise.
5095
5096 2016-06-17 Yao Qi <yao.qi@linaro.org>
5097
5098 * linux-low.c (handle_extended_wait): Call
5099 uninsert_reinsert_breakpoints for the parent process. Remove
5100 reinsert breakpoints from the child process. Reinsert them to
5101 the parent process when vfork is done.
5102 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5103 (reinsert_reinsert_breakpoints): New function.
5104 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5105 (reinsert_reinsert_breakpoints): Declare.
5106
5107 2016-06-17 Yao Qi <yao.qi@linaro.org>
5108
5109 * linux-low.c (handle_extended_wait): If the parent is doing
5110 step-over, remove the reinsert breakpoints from the forked child.
5111
5112 2016-06-17 Yao Qi <yao.qi@linaro.org>
5113
5114 * linux-low.c (unsuspend_all_lwps): Declare.
5115 (linux_low_filter_event): If thread exited, call finish_step_over.
5116 If step-over is finished, unsuspend other threads.
5117
5118 2016-06-17 Yao Qi <yao.qi@linaro.org>
5119
5120 * linux-low.c (linux_resume_one_lwp_throw): Assert
5121 has_reinsert_breakpoints returns false.
5122 * mem-break.c (delete_disabled_breakpoints): Assert
5123 bp type isn't reinsert_breakpoint.
5124
5125 2016-06-17 Yao Qi <yao.qi@linaro.org>
5126
5127 * linux-low.c (maybe_hw_step): New function.
5128 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5129 (finish_step_over): Switch current_thread to lwp temporarily,
5130 and assert has_reinsert_breakpoints returns true.
5131 (proceed_one_lwp): Call maybe_hw_step.
5132 * mem-break.c (has_reinsert_breakpoints): New function.
5133 * mem-break.h (has_reinsert_breakpoints): Declare.
5134
5135 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5136
5137 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5138
5139 2016-05-17 Yao Qi <yao.qi@linaro.org>
5140
5141 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5142 instead of find_inferior.
5143
5144 2016-05-05 Yao Qi <yao.qi@linaro.org>
5145
5146 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5147 Initialize res to zero.
5148
5149 2016-05-05 Yao Qi <yao.qi@linaro.org>
5150
5151 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5152 to uint32_t.
5153
5154 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5155
5156 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5157 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5158 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5159
5160 2016-04-28 Par Olsson <par.olsson@windriver.com>
5161 Simon Marchi <simon.marchi@ericsson.com>
5162
5163 * tracepoint.c (write_inferior_int8): New function.
5164 (cmd_qtenable_disable): Write enable flag using
5165 write_inferior_int8.
5166
5167 2016-04-25 Yao Qi <yao.qi@linaro.org>
5168
5169 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5170 (need_step_over_p): Return zero if the LWP has pending signals
5171 can be delivered on software single step target.
5172
5173 2016-04-25 Yao Qi <yao.qi@linaro.org>
5174
5175 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5176 return instead of error.
5177
5178 2016-04-22 Yao Qi <yao.qi@linaro.org>
5179
5180 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5181 to 23.
5182
5183 2016-04-22 Yao Qi <yao.qi@linaro.org>
5184
5185 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5186 signal when stepping over breakpoint with software single
5187 step.
5188
5189 2016-04-21 Pedro Alves <palves@redhat.com>
5190
5191 * linux-s390-low.c (s390_collect_ptrace_register)
5192 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5193 add casts.
5194 (s390_check_regset): Use void * instead of gdb_byte *.
5195
5196 2016-04-20 Pedro Alves <palves@redhat.com>
5197
5198 * configure: Renegerate.
5199
5200 2016-04-20 Yao Qi <yao.qi@linaro.org>
5201
5202 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5203 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5204 number 16.
5205 (arm_store_gregset): Likewise.
5206
5207 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5208
5209 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5210 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5211 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5212 (amd64-avx-mpx-linux.c): New rules.
5213 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5214 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5215 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5216 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5217 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5218 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5219 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5220 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5221 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5222 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5223 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5224 * linux-x86-low.c (x86_linux_read_description): Add case for
5225 X86_XSTATE_AVX_MPX_MASK.
5226 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5227 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5228 init_registers_i386_avx_mpx_linux.
5229 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5230 (initialize_low_tracepoint): Call
5231 init_registers_i386_avx_mpx_linux.
5232 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5233 (initialize_low_tracepoint): Call
5234 init_registers_amd64_avx_mpx_linux.
5235 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5236 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5237 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5238 declarations.
5239
5240 2016-04-18 Pedro Alves <palves@redhat.com>
5241
5242 * configure: Regenerate.
5243
5244 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5245
5246 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5247 (aarch64_emit_sub): Likewise.
5248
5249 2016-04-12 Pedro Alves <palves@redhat.com>
5250
5251 * utils.c (prepare_to_throw_exception): Delete.
5252
5253 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5254
5255 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5256
5257 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5258
5259 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5260
5261 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5262
5263 * linux-aarch64-ipa.c: Add <elf.h> include.
5264 * linux-ppc-ipa.c: Add <elf.h> include.
5265 * linux-s390-ipa.c: Add <elf.h> include.
5266
5267 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5268
5269 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5270 (get_raw_reg_ptr): Likewise.
5271 (get_trace_state_variable_value_ptr): Likewise.
5272 (set_trace_state_variable_value_ptr): Likewise.
5273 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5274 char *.
5275
5276 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5277 Marcin Kościelnicki <koriakin@0x04.net>
5278
5279 PR/17221
5280 * linux-ppc-low.c (emit_insns): New function.
5281 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5282 (ppc_emit_prologue): New function.
5283 (ppc_emit_epilogue): New function.
5284 (ppc_emit_add): New function.
5285 (ppc_emit_sub): New function.
5286 (ppc_emit_mul): New function.
5287 (ppc_emit_lsh): New function.
5288 (ppc_emit_rsh_signed): New function.
5289 (ppc_emit_rsh_unsigned): New function.
5290 (ppc_emit_ext): New function.
5291 (ppc_emit_zero_ext): New function.
5292 (ppc_emit_log_not): New function.
5293 (ppc_emit_bit_and): New function.
5294 (ppc_emit_bit_or): New function.
5295 (ppc_emit_bit_xor): New function.
5296 (ppc_emit_bit_not): New function.
5297 (ppc_emit_equal): New function.
5298 (ppc_emit_less_signed): New function.
5299 (ppc_emit_less_unsigned): New function.
5300 (ppc_emit_ref): New function.
5301 (ppc_emit_const): New function.
5302 (ppc_emit_reg): New function.
5303 (ppc_emit_pop): New function.
5304 (ppc_emit_stack_flush): New function.
5305 (ppc_emit_swap): New function.
5306 (ppc_emit_stack_adjust): New function.
5307 (ppc_emit_call): New function.
5308 (ppc_emit_int_call_1): New function.
5309 (ppc_emit_void_call_2): New function.
5310 (ppc_emit_if_goto): New function.
5311 (ppc_emit_goto): New function.
5312 (ppc_emit_eq_goto): New function.
5313 (ppc_emit_ne_goto): New function.
5314 (ppc_emit_lt_goto): New function.
5315 (ppc_emit_le_goto): New function.
5316 (ppc_emit_gt_goto): New function.
5317 (ppc_emit_ge_goto): New function.
5318 (ppc_write_goto_address): New function.
5319 (ppc_emit_ops_impl): New static variable.
5320 (ppc64v1_emit_prologue): New function.
5321 (ppc64v2_emit_prologue): New function.
5322 (ppc64_emit_epilogue): New function.
5323 (ppc64_emit_add): New function.
5324 (ppc64_emit_sub): New function.
5325 (ppc64_emit_mul): New function.
5326 (ppc64_emit_lsh): New function.
5327 (ppc64_emit_rsh_signed): New function.
5328 (ppc64_emit_rsh_unsigned): New function.
5329 (ppc64_emit_ext): New function.
5330 (ppc64_emit_zero_ext): New function.
5331 (ppc64_emit_log_not): New function.
5332 (ppc64_emit_bit_and): New function.
5333 (ppc64_emit_bit_or): New function.
5334 (ppc64_emit_bit_xor): New function.
5335 (ppc64_emit_bit_not): New function.
5336 (ppc64_emit_equal): New function.
5337 (ppc64_emit_less_signed): New function.
5338 (ppc64_emit_less_unsigned): New function.
5339 (ppc64_emit_ref): New function.
5340 (ppc64_emit_const): New function.
5341 (ppc64v1_emit_reg): New function.
5342 (ppc64v2_emit_reg): New function.
5343 (ppc64_emit_pop): New function.
5344 (ppc64_emit_stack_flush): New function.
5345 (ppc64_emit_swap): New function.
5346 (ppc64v1_emit_call): New function.
5347 (ppc64v2_emit_call): New function.
5348 (ppc64v1_emit_int_call_1): New function.
5349 (ppc64v2_emit_int_call_1): New function.
5350 (ppc64v1_emit_void_call_2): New function.
5351 (ppc64v2_emit_void_call_2): New function.
5352 (ppc64_emit_if_goto): New function.
5353 (ppc64_emit_eq_goto): New function.
5354 (ppc64_emit_ne_goto): New function.
5355 (ppc64_emit_lt_goto): New function.
5356 (ppc64_emit_le_goto): New function.
5357 (ppc64_emit_gt_goto): New function.
5358 (ppc64_emit_ge_goto): New function.
5359 (ppc64v1_emit_ops_impl): New static variable.
5360 (ppc64v2_emit_ops_impl): New static variable.
5361 (ppc_emit_ops): New function.
5362 (linux_low_target): Wire in ppc_emit_ops.
5363
5364 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5365 Marcin Kościelnicki <koriakin@0x04.net>
5366
5367 PR/17221
5368 * Makefile.in: Add powerpc-*-ipa.o
5369 * configure.srv: Add ipa_obj for powerpc*-linux.
5370 * linux-ppc-ipa.c: New file.
5371 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5372 includes.
5373 (PPC_FIELD): New macro.
5374 (PPC_SEXT): New macro.
5375 (PPC_OP6): New macro.
5376 (PPC_BO): New macro.
5377 (PPC_LI): New macro.
5378 (PPC_BD): New macro.
5379 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5380 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5381 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5382 (ppc_get_thread_area): New function.
5383 (is_elfv2_inferior): New function.
5384 (gen_ds_form): New function.
5385 (GEN_STD): New macro.
5386 (GEN_STDU): New macro.
5387 (GEN_LD): New macro.
5388 (GEN_LDU): New macro.
5389 (gen_d_form): New function.
5390 (GEN_ADDI): New macro.
5391 (GEN_ADDIS): New macro.
5392 (GEN_LI): New macro.
5393 (GEN_LIS): New macro.
5394 (GEN_ORI): New macro.
5395 (GEN_ORIS): New macro.
5396 (GEN_LWZ): New macro.
5397 (GEN_STW): New macro.
5398 (GEN_STWU): New macro.
5399 (gen_xfx_form): New function.
5400 (GEN_MFSPR): New macro.
5401 (GEN_MTSPR): New macro.
5402 (GEN_MFCR): New macro.
5403 (GEN_MTCR): New macro.
5404 (GEN_SYNC): New macro.
5405 (GEN_LWSYNC): New macro.
5406 (gen_x_form): New function.
5407 (GEN_OR): New macro.
5408 (GEN_MR): New macro.
5409 (GEN_LWARX): New macro.
5410 (GEN_STWCX): New macro.
5411 (GEN_CMPW): New macro.
5412 (gen_md_form): New function.
5413 (GEN_RLDICL): New macro.
5414 (GEN_RLDICR): New macro.
5415 (gen_i_form): New function.
5416 (GEN_B): New macro.
5417 (GEN_BL): New macro.
5418 (gen_b_form): New function.
5419 (GEN_BNE): New macro.
5420 (GEN_LOAD): New macro.
5421 (GEN_STORE): New macro.
5422 (gen_limm): New function.
5423 (gen_atomic_xchg): New function.
5424 (gen_call): New function.
5425 (ppc_relocate_instruction): New function.
5426 (ppc_install_fast_tracepoint_jump_pad): New function.
5427 (ppc_get_min_fast_tracepoint_insn_len): New function.
5428 (ppc_get_ipa_tdesc_idx): New function.
5429 (the_low_target): Wire in the new functions.
5430 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5431 tdescs.
5432 * linux-ppc-tdesc.h: New file.
5433
5434 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5435
5436 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5437 (alloc_jump_pad_buffer): New function.
5438 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5439 (alloc_jump_pad_buffer): New function.
5440 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5441 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5442 (alloc_jump_pad_buffer): New function.
5443 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5444 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5445 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5446 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5447
5448 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5449
5450 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5451 * linux-amd64-ipa.c: Likewise.
5452 * linux-i386-ipa.c: Likewise.
5453 * linux-s390-ipa.c: Likewise.
5454 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5455 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5456 set_trace_state_variable_value_ptr.
5457 (struct ipa_sym_addresses): Likewise.
5458 (symbol_list): Likewise.
5459 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5460 accessing gdb_collect directly.
5461 (gdb_collect_ptr_type): New typedef.
5462 (get_raw_reg_ptr_type): New typedef.
5463 (get_trace_state_variable_value_ptr_type): New typedef.
5464 (set_trace_state_variable_value_ptr_type): New typedef.
5465 (gdb_collect_ptr): New global.
5466 (get_raw_reg_ptr): New global.
5467 (get_trace_state_variable_value_ptr): New global.
5468 (set_trace_state_variable_value_ptr): New global.
5469 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5470 accessing get_raw_reg directly.
5471 (get_get_tsv_func_addr): Likewise for
5472 get_trace_state_variable_value_ptr.
5473 (get_set_tsv_func_addr): Likewise for
5474 set_trace_state_variable_value_ptr.
5475 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5476
5477 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5478
5479 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5480
5481 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5482
5483 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5484 packets.
5485 (relocate_instruction): Remove own_buf.
5486 * server.c (own_buf): Make global.
5487 (handle_v_requests): Make global.
5488 * server.h (own_buf): New declaration.
5489 (handle_v_requests): New prototype.
5490
5491 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5492
5493 PR 18377
5494 * linux-s390-low.c (add_insns): New function.
5495 (s390_emit_prologue): New function.
5496 (s390_emit_epilogue): New function.
5497 (s390_emit_add): New function.
5498 (s390_emit_sub): New function.
5499 (s390_emit_mul): New function.
5500 (s390_emit_lsh): New function.
5501 (s390_emit_rsh_signed): New function.
5502 (s390_emit_rsh_unsigned): New function.
5503 (s390_emit_ext): New function.
5504 (s390_emit_log_not): New function.
5505 (s390_emit_bit_and): New function.
5506 (s390_emit_bit_or): New function.
5507 (s390_emit_bit_xor): New function.
5508 (s390_emit_bit_not): New function.
5509 (s390_emit_equal): New function.
5510 (s390_emit_less_signed): New function.
5511 (s390_emit_less_unsigned): New function.
5512 (s390_emit_ref): New function.
5513 (s390_emit_if_goto): New function.
5514 (s390_emit_goto): New function.
5515 (s390_write_goto_address): New function.
5516 (s390_emit_litpool): New function.
5517 (s390_emit_const): New function.
5518 (s390_emit_call): New function.
5519 (s390_emit_reg): New function.
5520 (s390_emit_pop): New function.
5521 (s390_emit_stack_flush): New function.
5522 (s390_emit_zero_ext): New function.
5523 (s390_emit_swap): New function.
5524 (s390_emit_stack_adjust): New function.
5525 (s390_emit_set_r2): New function.
5526 (s390_emit_int_call_1): New function.
5527 (s390_emit_void_call_2): New function.
5528 (s390_emit_eq_goto): New function.
5529 (s390_emit_ne_goto): New function.
5530 (s390_emit_lt_goto): New function.
5531 (s390_emit_le_goto): New function.
5532 (s390_emit_gt_goto): New function.
5533 (s390_emit_ge_goto): New function.
5534 (s390x_emit_prologue): New function.
5535 (s390x_emit_epilogue): New function.
5536 (s390x_emit_add): New function.
5537 (s390x_emit_sub): New function.
5538 (s390x_emit_mul): New function.
5539 (s390x_emit_lsh): New function.
5540 (s390x_emit_rsh_signed): New function.
5541 (s390x_emit_rsh_unsigned): New function.
5542 (s390x_emit_ext): New function.
5543 (s390x_emit_log_not): New function.
5544 (s390x_emit_bit_and): New function.
5545 (s390x_emit_bit_or): New function.
5546 (s390x_emit_bit_xor): New function.
5547 (s390x_emit_bit_not): New function.
5548 (s390x_emit_equal): New function.
5549 (s390x_emit_less_signed): New function.
5550 (s390x_emit_less_unsigned): New function.
5551 (s390x_emit_ref): New function.
5552 (s390x_emit_if_goto): New function.
5553 (s390x_emit_const): New function.
5554 (s390x_emit_call): New function.
5555 (s390x_emit_reg): New function.
5556 (s390x_emit_pop): New function.
5557 (s390x_emit_stack_flush): New function.
5558 (s390x_emit_zero_ext): New function.
5559 (s390x_emit_swap): New function.
5560 (s390x_emit_stack_adjust): New function.
5561 (s390x_emit_int_call_1): New function.
5562 (s390x_emit_void_call_2): New function.
5563 (s390x_emit_eq_goto): New function.
5564 (s390x_emit_ne_goto): New function.
5565 (s390x_emit_lt_goto): New function.
5566 (s390x_emit_le_goto): New function.
5567 (s390x_emit_gt_goto): New function.
5568 (s390x_emit_ge_goto): New function.
5569 (s390_emit_ops): New function.
5570 (struct linux_target_ops): Fill in emit_ops hook.
5571
5572 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5573
5574 PR 18377
5575 * Makefile.in: Add s390 IPA files.
5576 * configure.srv: Build IPA for s390.
5577 * linux-s390-ipa.c: New file.
5578 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5579 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5580 (tdesc_s390_linux32): Likewise.
5581 (init_registers_s390_linux32v1): Likewise.
5582 (tdesc_s390_linux32v1): Likewise.
5583 (init_registers_s390_linux32v2): Likewise.
5584 (tdesc_s390_linux32v2): Likewise.
5585 (init_registers_s390_linux64): Likewise.
5586 (tdesc_s390_linux64): Likewise.
5587 (init_registers_s390_linux64v1): Likewise.
5588 (tdesc_s390_linux64v1): Likewise.
5589 (init_registers_s390_linux64v2): Likewise.
5590 (tdesc_s390_linux64v2): Likewise.
5591 (init_registers_s390_te_linux64): Likewise.
5592 (tdesc_s390_te_linux64): Likewise.
5593 (init_registers_s390_vx_linux64): Likewise.
5594 (tdesc_s390_vx_linux64): Likewise.
5595 (init_registers_s390_tevx_linux64): Likewise.
5596 (tdesc_s390_tevx_linux64): Likewise.
5597 (init_registers_s390x_linux64): Likewise.
5598 (tdesc_s390x_linux64): Likewise.
5599 (init_registers_s390x_linux64v1): Likewise.
5600 (tdesc_s390x_linux64v1): Likewise.
5601 (init_registers_s390x_linux64v2): Likewise.
5602 (tdesc_s390x_linux64v2): Likewise.
5603 (init_registers_s390x_te_linux64): Likewise.
5604 (tdesc_s390x_te_linux64): Likewise.
5605 (init_registers_s390x_vx_linux64): Likewise.
5606 (tdesc_s390x_vx_linux64): Likewise.
5607 (init_registers_s390x_tevx_linux64): Likewise.
5608 (tdesc_s390x_tevx_linux64): Likewise.
5609 (have_hwcap_s390_vx): New static variable.
5610 (s390_arch_setup): Fill have_hwcap_s390_vx.
5611 (s390_get_thread_area): New function.
5612 (s390_ft_entry_gpr_esa): New const.
5613 (s390_ft_entry_gpr_zarch): New const.
5614 (s390_ft_entry_misc): New const.
5615 (s390_ft_entry_fr): New const.
5616 (s390_ft_entry_vr): New const.
5617 (s390_ft_main_31): New const.
5618 (s390_ft_main_64): New const.
5619 (s390_ft_exit_fr): New const.
5620 (s390_ft_exit_vr): New const.
5621 (s390_ft_exit_misc): New const.
5622 (s390_ft_exit_gpr_esa): New const.
5623 (s390_ft_exit_gpr_zarch): New const.
5624 (append_insns): New function.
5625 (s390_relocate_instruction): New function.
5626 (s390_install_fast_tracepoint_jump_pad): New function.
5627 (s390_get_min_fast_tracepoint_insn_len): New function.
5628 (s390_get_ipa_tdesc_idx): New function.
5629 (struct linux_target_ops): Wire in the above functions.
5630 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5631 * linux-s390-tdesc.h: New file.
5632
5633 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5634
5635 * linux-s390-low.c (s390_supports_tracepoints): New function.
5636 (struct linux_target_ops): Fill supports_tracepoints hook.
5637
5638 2016-03-18 Yao Qi <yao.qi@linaro.org>
5639
5640 * linux-low.c (lwp_signal_can_be_delivered): New function.
5641 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5642
5643 2016-03-18 Yao Qi <yao.qi@linaro.org>
5644
5645 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5646 0 if signal is enqueued. Remove 'signal' from one debugging
5647 message. Move one debugging message to some lines below.
5648 Remove code setting 'signal' to 0.
5649
5650 2016-03-18 Yao Qi <yao.qi@linaro.org>
5651
5652 * linux-low.c (linux_low_filter_event): Remove redundant
5653 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5654
5655 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5656
5657 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5658 (struct linux_target_ops): Wire in the above.
5659
5660 2016-03-03 Yao Qi <yao.qi@linaro.org>
5661
5662 * linux-low.c: Update comments to start_step_over.
5663
5664 2016-03-03 Yao Qi <yao.qi@linaro.org>
5665
5666 PR server/19736
5667 * linux-low.c (handle_extended_wait): Set child suspended
5668 if event_lwp->bp_reinsert isn't zero.
5669
5670 2016-03-02 Yao Qi <yao.qi@linaro.org>
5671
5672 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5673 enqueue_pending_signal.
5674
5675 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5676
5677 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5678 is actually loaded.
5679
5680 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5681
5682 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5683 (s390_regmap_3264) [!__s390x__]: New global.
5684 (s390_collect_ptrace_register): Skip map entries containing -1.
5685 (s390_supply_ptrace_register): Ditto.
5686 (s390_fill_gprs_high): New function.
5687 (s390_store_gprs_high): New function.
5688 (s390_regsets): Add NT_S390_HIGH_GPRS.
5689 (s390_get_hwcap): Enable on 31-bit.
5690 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5691 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5692 Detect NT_S390_HIGH_GPRS.
5693 (s390_usrregs_info_3264): Enable on 31-bit.
5694 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5695 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5696
5697 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5698
5699 PR gdb/13808
5700 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5701 * configure.srv: Ditto.
5702 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5703 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5704 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5705 (init_registers_amd64_linux): Remove prototype.
5706 (tdesc_amd64_linux): Remove declaration.
5707 (get_ipa_tdesc): New function.
5708 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5709 initialize remaining tdescs.
5710 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5711 (init_registers_i386_linux): Remove prototype.
5712 (tdesc_i386_linux): Remove declaration.
5713 (get_ipa_tdesc): New function.
5714 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5715 initialize remaining tdescs.
5716 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5717 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5718 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5719 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5720 (x86_get_ipa_tdesc_idx): New function.
5721 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5722 * linux-x86-tdesc.h: New file.
5723 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5724 (target_get_ipa_tdesc_idx): New macro.
5725 * tracepoint.c (ipa_tdesc_idx): New macro.
5726 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5727 (symbol_list): Add ipa_tdesc_idx.
5728 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5729 (ipa_tdesc): Remove.
5730 (ipa_tdesc_idx): New variable.
5731 (get_context_regcache): Use get_ipa_tdesc.
5732 (gdb_collect): Ditto.
5733 (gdb_probe): Ditto.
5734 * tracepoint.h (get_ipa_tdesc): New prototype.
5735 (ipa_tdesc): Remove.
5736
5737 2016-02-24 Pedro Alves <palves@redhat.com>
5738
5739 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5740 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5741 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5742 Factor out common code between the USE_SIGTRAP_SIGINFO and
5743 !USE_SIGTRAP_SIGINFO blocks.
5744 (linux_low_filter_event): Call save_stop_reason instead of
5745 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5746 Update comments.
5747 (linux_wait_1): Update comments.
5748
5749 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5750
5751 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5752 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5753 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5754 ppc_insert_point, ppc_remove_point.
5755
5756 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5757
5758 * linux-s390-low.c (s390_supports_z_point_type): New function.
5759 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5760
5761 2016-02-16 Yao Qi <yao.qi@linaro.org>
5762
5763 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5764 PC. Get pc from regcache_read_pc.
5765
5766 2016-02-12 Yao Qi <yao.qi@linaro.org>
5767
5768 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5769 or linux_get_pc_32bit.
5770 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5771
5772 2016-02-12 Yao Qi <yao.qi@linaro.org>
5773
5774 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5775 arm_linux_get_next_pcs_fixup.
5776
5777 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5778
5779 * tracepoint.c (x_tracepoint_action_download): Change
5780 write_inferior_data_ptr to write_inferior_data_pointer.
5781 (cmd_qtstart): Likewise.
5782 (write_inferior_data_ptr): Remove.
5783 (download_agent_expr): Change write_inferior_data_ptr to
5784 write_inferior_data_pointer.
5785 (download_tracepoint_1): Likewise.
5786 (download_tracepoint): Likewise.
5787 (download_trace_state_variables): Likewise.
5788
5789 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5790 Marcin Kościelnicki <koriakin@0x04.net>
5791
5792 * tracepoint.c (struct tracepoint_action_ops): Remove.
5793 (struct tracepoint_action): Remove ops.
5794 (m_tracepoint_action_download, r_tracepoint_action_download)
5795 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5796 size and offset accordingly.
5797 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5798 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5799 (tracepoint_action_send, tracepoint_action_download): New functions.
5800 Helpers for trace action handlers.
5801 (add_tracepoint_action): Remove setup actions ops.
5802 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5803
5804 2016-02-10 Yao Qi <yao.qi@linaro.org>
5805
5806 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5807
5808 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5809
5810 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5811 to AC_OUTPUT.
5812 * configure: Regenerate.
5813
5814 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5815
5816 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5817 void * to gdb_byte *.
5818 * linux-low.c (siginfo_fixup): Likewise.
5819 (linux_xfer_siginfo): Likewise.
5820 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5821 Likewise.
5822 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5823
5824 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5825
5826 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5827 to srv_tgtobj.
5828 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5829 to srv_tgtobj.
5830 * linux-x86-low.c [__x86_64__]: Include
5831 "nat/amd64-linux-siginfo.h".
5832 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5833 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5834 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5835 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5836 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5837 (cpt_si_fd, si_timerid, si_overrun): Move from
5838 nat/amd64-linux-siginfo.c.
5839 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5840
5841 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5842
5843 * server.c (skip_to_semicolon): Remove.
5844 (process_point_options): Use strchrnul instead of
5845 skip_to_semicolon.
5846
5847 2016-01-26 Yao Qi <yao.qi@linaro.org>
5848
5849 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5850 * linux-low.c (install_software_single_step_breakpoints): Don't
5851 call regcache_read_pc.
5852 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5853 argument pc.
5854
5855 2016-01-26 Yao Qi <yao.qi@linaro.org>
5856
5857 * linux-low.c (install_software_single_step_breakpoints): Call
5858 regcache_read_pc instead of get_pc.
5859
5860 2016-01-26 Yao Qi <yao.qi@linaro.org>
5861
5862 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5863 (unblock_async_io): Rename to ...
5864 (block_unblock_async_io): ... it. New function.
5865 (enable_async_io): Don't install SIGIO handler. Unblock it
5866 instead.
5867 (disable_async_io): Don't ignore SIGIO. Block it instead.
5868 (initialize_async_io): Install SIGIO handler. Don't call
5869 unblock_async_io.
5870
5871 2016-01-26 Yao Qi <yao.qi@linaro.org>
5872
5873 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5874 first character is '\003', call *the_target->request_interrupt.
5875
5876 2016-01-25 Yao Qi <yao.qi@linaro.org>
5877
5878 * remote-utils.c (new_thread_notify): Remove.
5879 (dead_thread_notify): Likewise.
5880 * remote-utils.h (new_thread_notify): Remove declaration.
5881 (dead_thread_notify): Likewise.
5882
5883 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5884
5885 * gdb.trace/pending.exp: Fix expected message on continue.
5886
5887 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5888
5889 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5890 it works properly on big-endian machines where sizeof (CORE_ADDR)
5891 != sizeof (void *).
5892
5893 2016-01-21 Pedro Alves <palves@redhat.com>
5894
5895 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5896 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5897 * configure: Regenerate.
5898
5899 2016-01-21 Yao Qi <yao.qi@linaro.org>
5900
5901 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5902 is_thumb and set it according to CPSR saved on the stack.
5903 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5904 arm_sigreturn_next_pc.
5905
5906 2016-01-18 Yao Qi <yao.qi@linaro.org>
5907
5908 * linux-low.c (linux_set_pc_64bit): New function.
5909 (linux_get_pc_64bit): New function.
5910 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5911 Declare.
5912 * linux-sparc-low.c (debug_threads): Remove declaration.
5913 (sparc_get_pc): Remove.
5914 (the_low_target): Use linux_get_pc_64bit instead of
5915 sparc_get_pc.
5916 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5917 (the_low_target): Use linux_get_pc_64bit and
5918 linux_set_pc_64bit.
5919
5920 2016-01-18 Yao Qi <yao.qi@linaro.org>
5921
5922 * linux-arm-low.c (debug_threads): Remove declaration.
5923 (arm_get_pc, arm_set_pc): Remove.
5924 (the_low_target): Use linux_get_pc_32bit and
5925 linux_set_pc_32bit.
5926 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5927 (the_low_target): Use linux_get_pc_32bit and
5928 linux_set_pc_32bit.
5929 * linux-cris-low.c (debug_threads): Remove declaration.
5930 (cris_get_pc, cris_set_pc,): Remove.
5931 (the_low_target): Use linux_get_pc_32bit and
5932 linux_set_pc_32bit.
5933 * linux-crisv32-low.c (debug_threads): Remove declaration.
5934 (cris_get_pc, cris_set_pc): Remove.
5935 (the_low_target): Use linux_get_pc_32bit and
5936 linux_set_pc_32bit.
5937 * linux-low.c: Include inttypes.h.
5938 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5939 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5940 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5941 (the_low_target): Use linux_get_pc_32bit and
5942 linux_set_pc_32bit.
5943 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5944 (the_low_target): Use linux_get_pc_32bit and
5945 linux_set_pc_32bit.
5946 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5947 (the_low_target): Use linux_get_pc_32bit and
5948 linux_set_pc_32bit.
5949 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5950 (the_low_target): Use linux_get_pc_32bit and
5951 linux_set_pc_32bit.
5952 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5953 (the_low_target): Use linux_get_pc_32bit and
5954 linux_set_pc_32bit.
5955
5956 2016-01-18 Gary Benson <gbenson@redhat.com>
5957
5958 * configure.ac (AC_FUNC_FORK): New check.
5959 * config.in: Regenerate.
5960 * configure: Likewise.
5961
5962 2016-01-14 Yao Qi <yao.qi@linaro.org>
5963
5964 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5965 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5966 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5967 arm_get_next_pcs_ctor.
5968
5969 2016-01-12 Josh Stone <jistone@redhat.com>
5970 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5971
5972 * inferiors.h: Include "gdb_vecs.h".
5973 (struct process_info): Add syscalls_to_catch.
5974 * inferiors.c (remove_process): Free syscalls_to_catch.
5975 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5976 syscall_return stops.
5977 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5978 * server.c (handle_general_set): Handle QCatchSyscalls.
5979 (handle_query): Report support for QCatchSyscalls.
5980 * target.h (struct target_ops): Add supports_catch_syscall.
5981 (target_supports_catch_syscall): New macro.
5982 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
5983 (struct lwp_info): Add syscall_state.
5984 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
5985 Maintain syscall_state and syscalls_to_catch across exec.
5986 (get_syscall_trapinfo): New function, proxy to the_low_target.
5987 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
5988 (linux_low_filter_event): Toggle syscall_state entry/return for
5989 syscall traps, and set it ignored for all others.
5990 (gdb_catching_syscalls_p): New function.
5991 (gdb_catch_this_syscall_p): New function.
5992 (linux_wait_1): Handle SYSCALL_SIGTRAP.
5993 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
5994 (linux_supports_catch_syscall): New function.
5995 (linux_target_ops): Install it.
5996 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
5997 (the_low_target): Install it.
5998
5999 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6000
6001 * acinclude.m4: Include new ../warning.m4 file.
6002 * configure: Regenerated.
6003 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6004
6005 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6006
6007 * ax.c (is_goto_target): Mark static.
6008 * linux-low.c (register_addr): Likewise.
6009 (linux_fetch_registers, linux_store_registers): Likewise.
6010 * mem-break.c (any_persistent_commands): Fix old prototype.
6011 (add_commands_to_breakpoint): Mark static.
6012 * regcache.c (find_register_by_name): Delete unused func.
6013 * remote-utils.c (hex_or_minus_one): Mark static.
6014 * server.c (monitor_show_help): Mark static.
6015 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6016 handle_v_requests): Likewise.
6017
6018 2016-01-12 Pedro Alves <palves@redhat.com>
6019
6020 Remove use of the registered trademark symbol throughout.
6021
6022 2016-01-08 Yao Qi <yao.qi@linaro.org>
6023
6024 * remote-utils.c (getpkt): If c is '\003', call target hook
6025 request_interrupt.
6026
6027 2016-01-06 Yao Qi <yao.qi@linaro.org>
6028
6029 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6030 linux-aarch32-low.c.
6031 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6032 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6033 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6034 (thumb2_breakpoint): Declare.
6035 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6036 linux-aarch32-low.h.
6037 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6038 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6039 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6040
6041 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6042
6043 * gdbreplay.c (gdbreplay_version): Change copyright year in
6044 version message.
6045 * server.c (gdbserver_version): Likewise.
6046
6047 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6048
6049 * server.c (crc32_table): Delete.
6050 (crc32): Use libiberty's xcrc32 function.
6051
6052 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6053
6054 * lynx-low.c (lynx_delete_thread_callback): New function.
6055 (lynx_mourn): Properly delete our process and all of its
6056 threads. Remove call to clear_inferiors.
6057
6058 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6059
6060 * target.c (thread_search_callback): Add check that
6061 the thread_stopped target callback is not NULL before
6062 calling it.
6063
6064 2015-12-21 Yao Qi <yao.qi@linaro.org>
6065
6066 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6067 arm breakpoint.
6068
6069 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6070
6071 * server.c (handle_query): Call target_supports_software_single_step.
6072
6073 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6074
6075 * linux-low.c (single_step): New function.
6076 (linux_resume_one_lwp_throw): Call single_step.
6077 (start_step_over): Likewise.
6078
6079 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6080
6081 * Makefile.in (SFILES): Append arch/arm-linux.c,
6082 arch/arm-get-next-pcs.c.
6083 (arm-linux.o): New rule.
6084 (arm-get-next-pcs.o): New rule.
6085 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6086 arm-linux.o.
6087 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6088 to linux-aarch32-low.c.
6089 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6090 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6091 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6092 (thumb2_breakpoint_len): Likewise.
6093 (arm_is_thumb_mode): Make non-static.
6094 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6095 from linux-aarch32-low.c.
6096 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6097 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6098 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6099 (thumb2_breakpoint_len): Likewise.
6100 (arm_is_thumb_mode): New declaration.
6101 * linux-arm-low.c: Include arch/arm-linux.h
6102 aarch/arm-get-next-pcs.h, sys/syscall.h.
6103 (get_next_pcs_ops): New struct.
6104 (get_next_pcs_addr_bits_remove): New function.
6105 (get_next_pcs_is_thumb): New function.
6106 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6107 (arm_sigreturn_next_pc): Likewise.
6108 (get_next_pcs_syscall_next_pc): Likewise.
6109 (arm_gdbserver_get_next_pcs): Likewise.
6110 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6111 Initialize.
6112 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6113 * server.h: Include gdb_vecs.h.
6114
6115 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6116
6117 * Makefile.in (SFILES): Append common/common-regcache.c.
6118 (OBS): Append common-regcache.o.
6119 (common-regcache.o): New rule.
6120 * regcache.c (init_register_cache): Initialize cache to
6121 REG_UNAVAILABLE.
6122 (regcache_raw_read_unsigned): New function.
6123 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6124 register_status enum.
6125
6126 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6127
6128 * linux-aarch64-low.c (the_low_targets): Rename
6129 breakpoint_reinsert_addr to get_next_pcs.
6130 * linux-arm-low.c (the_low_targets): Likewise.
6131 * linux-bfin-low.c (the_low_targets): Likewise.
6132 * linux-cris-low.c (the_low_targets): Likewise.
6133 * linux-crisv32-low.c (the_low_targets): Likewise.
6134 * linux-low.c (can_software_single_step): Likewise.
6135 (install_software_single_step_breakpoints): New function.
6136 (start_step_over): Use install_software_single_step_breakpoints.
6137 * linux-low.h: New CORE_ADDR vector.
6138 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6139 get_next_pcs.
6140 * linux-mips-low.c (the_low_targets): Likewise.
6141 * linux-nios2-low.c (the_low_targets): Likewise.
6142 * linux-sparc-low.c (the_low_targets): Likewise.
6143
6144 2015-12-17 Pedro Alves <palves@redhat.com>
6145
6146 * linux-low.c (linux_kill_one_lwp): Remove references to
6147 LinuxThreads.
6148 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6149 to 'kill'.
6150 (linux_init_signals): Delete.
6151 (initialize_low): Adjust.
6152 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6153
6154 2015-12-16 Pedro Alves <palves@redhat.com>
6155
6156 * configure.ac (compiler warning flags): When testing a
6157 -Wno-foo option, check whether -Wfoo works instead.
6158 * configure: Regenerate.
6159
6160 2015-12-11 Don Breazeal <donb@codesourcery.com>
6161
6162 * server.c (process_serial_event): Don't exit from gdbserver
6163 in remote mode if there are still active inferiors.
6164
6165 2015-12-11 Yao Qi <yao.qi@linaro.org>
6166
6167 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6168 arm_breakpoint_at if the process is 32-bit.
6169
6170 2015-12-11 Yao Qi <yao.qi@linaro.org>
6171
6172 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6173 arm breakpoint.
6174
6175 2015-12-07 Yao Qi <yao.qi@linaro.org>
6176
6177 * configure.srv: Append arm.o to srv_tgtobj for
6178 aarch64*-*-linux* target.
6179 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6180 from linux-arm-low.c.
6181 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6182 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6183 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6184 (thumb2_breakpoint_len): Likewise.
6185 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6186 (arm_breakpoint_kinds): Likewise.
6187 (arm_breakpoint_kind_from_pc): Likewise.
6188 (arm_sw_breakpoint_from_kind): Likewise.
6189 (arm_breakpoint_kind_from_current_state): Likewise.
6190 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6191 (arm_sw_breakpoint_from_kind): Declare.
6192 (arm_breakpoint_kind_from_current_state): Declare.
6193 (arm_breakpoint_at): Declare.
6194 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6195 arm_sw_breakpoint_from_kind if process is 32-bit.
6196 (aarch64_breakpoint_kind_from_pc): New function.
6197 (aarch64_breakpoint_kind_from_current_state): New function.
6198 (the_low_target): Initialize fields breakpoint_kind_from_pc
6199 and breakpoint_kind_from_current_state.
6200 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6201 linux-aarch32-low.c.
6202 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6203 (arm_breakpoint, arm_breakpoint_len): Likewise.
6204 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6205 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6206 (arm_is_thumb_mode): Likewise.
6207 (arm_breakpoint_at): Likewise.
6208 (arm_breakpoint_kind_from_pc): Likewise.
6209 (arm_sw_breakpoint_from_kind): Likewise.
6210 (arm_breakpoint_kind_from_current_state): Likewise.
6211
6212 Revert:
6213 2015-08-04 Yao Qi <yao.qi@linaro.org>
6214
6215 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6216 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6217 * server.c (extended_protocol): Remove "static".
6218 * server.h (extended_protocol): Declare it.
6219
6220 2015-12-04 Josh Stone <jistone@redhat.com>
6221
6222 * target.h (struct target_ops) <arch_setup>: Rename to ...
6223 (struct target_ops) <post_create_inferior>: ... this.
6224 (target_arch_setup): Rename to ...
6225 (target_post_create_inferior): ... this, calling post_create_inferior.
6226 * server.c (start_inferior): Update target_arch_setup calls to
6227 target_post_create_inferior.
6228 * linux-low.c (linux_low_ptrace_options): Forward declare.
6229 (linux_arch_setup): Update its comment for general use.
6230 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6231 (struct linux_target_ops): Use linux_post_create_inferior.
6232 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6233 to post_create_inferior.
6234 * nto-low.c (struct nto_target_ops): Likewise.
6235 * spu-low.c (struct spu_target_ops): Likewise.
6236 * win32-low.c (struct win32_target_ops): Likewise.
6237
6238 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6239
6240 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6241
6242 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6243
6244 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6245 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6246 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6247 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6248 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6249 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6250 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6251 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6252 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6253 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6254 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6255 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6256
6257 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6258
6259 * linux-low.c (linux_look_up_symbols): Don't call
6260 linux_supports_traceclone.
6261 * linux-low.h (thread_db_init): Remove use_events argument.
6262 * thread-db.c (thread_db_use_event): Remove global variable.
6263 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6264 (struct thread_db) <td_create_bp>: Remove field.
6265 (thread_db_create_event): Remove function.
6266 (thread_db_enable_reporting): Likewise.
6267 (find_one_thread): Don't check for thread_db_use_events.
6268 (attach_thread): Likewise.
6269 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6270 (try_thread_db_load_1): Don't check for thread_db_use_events.
6271 (thread_db_init): Remove use_events argument and thread events
6272 handling.
6273 (remove_thread_event_breakpoints): Remove function.
6274 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6275
6276 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6277
6278 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6279 New function.
6280 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6281 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6282 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6283 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6284 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6285 Initialize.
6286 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6287 New function.
6288 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6289 * linux-low.c (can_hardware_single_step): Use
6290 supports_hardware_single_step.
6291 (can_software_single_step): New function.
6292 (start_step_over): Call can_software_single_step.
6293 (linux_supports_hardware_single_step): New function.
6294 (struct target_ops) <supports_software_single_step>: Initialize.
6295 * linux-low.h (struct linux_target_ops)
6296 <supports_hardware_single_step>: Initialize.
6297 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6298 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6299 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6300 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6301 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6302 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6303 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6304 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6305 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6306 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6307 Initialize.
6308 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6309 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6310 Initialize.
6311 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6312 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6313 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6314 New function.
6315 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6316 * target.h (struct target_ops): <supports_software_single_step>:
6317 New field.
6318 (target_supports_software_single_step): New macro.
6319
6320 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6321
6322 * linux-low.c (linux_wait_1): Fix pc advance condition.
6323 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6324 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6325
6326 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6327
6328 * linux-arm-low.c (arm_is_thumb_mode): New function.
6329 (arm_breakpoint_at): Use arm_is_thumb_mode.
6330 (arm_breakpoint_kind_from_current_state): New function.
6331 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6332 Initialize.
6333 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6334 (linux_breakpoint_kind_from_current_state): New function.
6335 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6336 * linux-low.h (struct linux_target_ops)
6337 <breakpoint_kind_from_current_state>: New field.
6338 * target.h (struct target_ops): Likewise.
6339 (target_breakpoint_kind_from_current_state): New macro.
6340
6341 2015-11-30 Pedro Alves <palves@redhat.com>
6342
6343 * linux-low.c (linux_resume): Wake up the event loop before
6344 returning.
6345
6346 2015-11-30 Pedro Alves <palves@redhat.com>
6347
6348 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6349 check.
6350 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6351 to -1.
6352 * target.c (struct thread_search): New structure.
6353 (thread_search_callback): New function.
6354 (prev_general_thread): New global.
6355 (prepare_to_access_memory, done_accessing_memory): New functions.
6356 * target.h (prepare_to_access_memory, done_accessing_memory):
6357 Replace macros with function declarations.
6358
6359 2015-11-30 Pedro Alves <palves@redhat.com>
6360
6361 PR 14618
6362 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6363 report TARGET_WAITKIND_NO_RESUMED.
6364 * remote-utils.c (prepare_resume_reply): Handle
6365 TARGET_WAITKIND_NO_RESUMED.
6366 * server.c (report_no_resumed): New global.
6367 (handle_query) <qSupported>: Handle "no-resumed+". Report
6368 "no-resumed+" support.
6369 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6370 return error if the client doesn't support no-resumed events.
6371 (push_stop_notification): New function.
6372 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6373 events if the client supports them.
6374
6375 2015-11-30 Pedro Alves <palves@redhat.com>
6376
6377 * linux-low.c (thread_still_has_status_pending_p): Don't check
6378 vCont;t here.
6379 (lwp_resumed): New function.
6380 (status_pending_p_callback): Return early if the LWP is not
6381 supposed to be resumed.
6382
6383 2015-11-30 Pedro Alves <palves@redhat.com>
6384
6385 * linux-low.c (handle_extended_wait): Assert that the LWP's
6386 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6387 thread create events, leave the new child's status pending.
6388 (linux_low_filter_event): If GDB wants to hear about thread exit
6389 events, leave the LWP marked dead and don't delete it.
6390 (linux_wait_for_event_filtered): Don't check for thread exit.
6391 (filter_exit_event): New function.
6392 (linux_wait_1): Use it, when returning an exit event.
6393 (linux_resume_one_lwp_throw): Assert that the LWP's
6394 waitstatus is TARGET_WAITKIND_IGNORE.
6395 * remote-utils.c (prepare_resume_reply): Handle
6396 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6397 * server.c (report_thread_events): New global.
6398 (handle_general_set): Handle QThreadEvents.
6399 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6400 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6401 TARGET_WAITKIND_THREAD_EXITED.
6402 * server.h (report_thread_events): Declare.
6403
6404 2015-11-30 Pedro Alves <palves@redhat.com>
6405
6406 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6407 the thread's last_resume_kind was resume_stop.
6408
6409 2015-11-30 Pedro Alves <palves@redhat.com>
6410
6411 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6412 before returning.
6413
6414 2015-11-30 Pedro Alves <palves@redhat.com>
6415
6416 * server.c (handle_v_requests): Handle vCtrlC.
6417
6418 2015-11-30 Pedro Alves <palves@redhat.com>
6419
6420 * gdbthread.h (find_any_thread_of_pid): Declare.
6421 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6422 functions.
6423 * server.c (handle_query): If current_thread is NULL, look for
6424 another thread of the selected process.
6425
6426 2015-11-26 Daniel Colascione <dancol@dancol.org>
6427 Simon Marchi <simon.marchi@ericsson.com>
6428
6429 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6430 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6431 name in reply.
6432 * target.h (struct target_ops) <thread_name>: New field.
6433 (target_thread_name): New macro.
6434
6435 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6436
6437 * regcache.h (regcache_invalidate_pid): Add declaration.
6438 * regcache.c (regcache_invalidate_pid): New function, extracted
6439 from regcache_invalidate.
6440 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6441 Add trivial documentation comment.
6442 * lynx-low.c: Use regcache_invalidate_pid instead of
6443 regcache_invalidate.
6444
6445 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6446
6447 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6448 and Elf64_auxv_t if the target is Android.
6449
6450 2015-11-22 Doug Evans <xdje42@gmail.com>
6451
6452 * target.h: #include <sys/types.h>.
6453
6454 2015-11-19 Pedro Alves <palves@redhat.com>
6455
6456 * linux-low.c (linux_process_qsupported): Change prototype.
6457 Adjust.
6458 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6459 Change prototype.
6460 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6461 and adjust to loop over all features.
6462 * server.c (handle_query) <qSupported>: Adjust to call
6463 target_process_qsupported once, passing it a vector of unprocessed
6464 features.
6465 * target.h (struct target_ops) <process_qsupported>: Change
6466 prototype.
6467 (target_process_qsupported): Adjust.
6468
6469 2015-11-19 Pedro Alves <palves@redhat.com>
6470
6471 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6472 mode.
6473 * configure: Regenerate.
6474
6475 2015-11-19 Pedro Alves <palves@redhat.com>
6476
6477 * configure: Regenerate.
6478
6479 2015-11-19 Yao Qi <yao.qi@linaro.org>
6480
6481 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6482 type to uint32_t.
6483
6484 2015-11-19 Yao Qi <yao.qi@linaro.org>
6485
6486 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6487 (struct aarch64_operand): Move enum out.
6488
6489 2015-11-19 Yao Qi <yao.qi@linaro.org>
6490
6491 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6492 struct user_fpsimd_state *.
6493 (aarch64_store_fpregset): Likewise.
6494
6495 2015-11-19 Yao Qi <yao.qi@linaro.org>
6496
6497 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6498 struct user_pt_regs *.
6499 (aarch64_store_gregset): Likewise.
6500
6501 2015-11-18 Pedro Alves <palves@redhat.com>
6502
6503 * Makefile.in (all_object_files): Add $IPA_OBJS.
6504
6505 2015-11-17 Pedro Alves <palves@redhat.com>
6506
6507 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6508 GDB_SIGNAL_0 and gdb_signal_to_string.
6509
6510 2015-11-17 Pedro Alves <palves@redhat.com>
6511
6512 * win32-low.c (handle_output_debug_string): Remove parameter.
6513 (win32_kill): Remove our_status local and adjust call to
6514 handle_output_debug_string.
6515 (get_child_debug_event): Adjust call to
6516 handle_output_debug_string.
6517
6518 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6519
6520 * linux-mips-low.c (mips_fill_gregset): Add cast.
6521 (mips_store_gregset): Likewise.
6522 (mips_fill_fpregset): Likewise.
6523 (mips_store_fpregset): Likewise.
6524
6525 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6526
6527 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6528 priv.
6529
6530 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6531
6532 * linux-mips-low.c (mips_linux_new_thread): Change type of
6533 watch_type to enum target_hw_bp_type.
6534
6535 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6536
6537 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6538 Change return type to arm_hwbp_type.
6539
6540 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6541
6542 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6543 (arm_store_gregset): Likewise.
6544 * linux-arm-low.c (arm_get_hwcap): Likewise.
6545 (arm_read_description): Likewise.
6546
6547 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6548
6549 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6550
6551 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6552
6553 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6554 (ppc_fill_vsxregset): Likewise.
6555 (ppc_store_vsxregset): Likewise.
6556 (ppc_fill_vrregset): Likewise.
6557 (ppc_store_vrregset): Likewise.
6558 (ppc_fill_evrregset): Likewise.
6559 (ppc_store_evrregset): Likewise.
6560
6561 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6562
6563 * linux-ppc-low.c (ppc_usrregs_info): Remove
6564 forward-declaration.
6565 (ppc_arch_setup): Move lower in file.
6566
6567 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6568
6569 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6570 (ps_pdwrite): Likewise.
6571
6572 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6573
6574 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6575 to after assert checks.
6576
6577 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6578
6579 * proc-service.c (ps_pdread): Add/adjust casts.
6580 (ps_pdwrite): Add/adjust casts.
6581
6582 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6583
6584 * server.c (handle_search_memory_1): Cast return value of
6585 memmem.
6586
6587 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6588
6589 * server.c (write_qxfer_response): Change type of data to
6590 gdb_byte *.
6591
6592 2015-10-29 Pedro Alves <palves@redhat.com>
6593
6594 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6595
6596 2015-10-29 Pedro Alves <palves@redhat.com>
6597
6598 * tracepoint.c (clear_installed_tracepoints): Add casts.
6599
6600 2015-10-29 Pedro Alves <palves@redhat.com>
6601
6602 * server.c (handle_v_cont, process_serial_event): Add enum
6603 gdb_signal casts to signal parsing code.
6604
6605 2015-10-29 Pedro Alves <palves@redhat.com>
6606
6607 * linux-low.h (NULL_REGSET): Define.
6608 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6609 * linux-arm-low.c (arm_regsets): Likewise.
6610 * linux-crisv32-low.c (cris_regsets): Likewise.
6611 * linux-m68k-low.c (m68k_regsets): Likewise.
6612 * linux-mips-low.c (mips_regsets): Likewise.
6613 * linux-nios2-low.c (nios2_regsets): Likewise.
6614 * linux-ppc-low.c (ppc_regsets): Likewise.
6615 * linux-s390-low.c (s390_regsets): Likewise.
6616 * linux-sh-low.c (sh_regsets): Likewise.
6617 * linux-sparc-low.c (sparc_regsets): Likewise.
6618 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6619 * linux-tile-low.c (tile_regsets): Likewise.
6620 * linux-x86-low.c (x86_regsets): Likewise.
6621 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6622
6623 2015-10-29 Pedro Alves <palves@redhat.com>
6624
6625 * linux-low.h (NULL_REGSET): Define.
6626 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6627 * linux-arm-low.c (arm_regsets): Likewise.
6628 * linux-crisv32-low.c (cris_regsets): Likewise.
6629 * linux-m68k-low.c (m68k_regsets): Likewise.
6630 * linux-mips-low.c (mips_regsets): Likewise.
6631 * linux-nios2-low.c (nios2_regsets): Likewise.
6632 * linux-ppc-low.c (ppc_regsets): Likewise.
6633 * linux-s390-low.c (s390_regsets): Likewise.
6634 * linux-sh-low.c (sh_regsets): Likewise.
6635 * linux-sparc-low.c (sparc_regsets): Likewise.
6636 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6637 * linux-tile-low.c (tile_regsets): Likewise.
6638 * linux-x86-low.c (x86_regsets): Likewise.
6639 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6640
6641 2015-10-26 Doug Evans <dje@google.com>
6642
6643 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6644
6645 2015-10-26 Doug Evans <dje@google.com>
6646
6647 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6648
6649 2015-10-26 Doug Evans <dje@google.com>
6650
6651 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6652 for debug_printf.
6653 (attach_thread, find_new_threads_callback): Ditto.
6654
6655 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6656
6657 * mem-break.h (set_breakpoint_data): Remove.
6658
6659 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6660
6661 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6662 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6663 (initialize_low): Remove set_breakpoint_data call.
6664 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6665 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6666 (initialize_low): Remove set_breakpoint_data call.
6667 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6668 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6669 (initialize_low): Remove set_breakpoint_data call.
6670
6671 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6672
6673 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6674 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6675 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6676 * target.h (target_breakpoint_kind_from_pc): New macro.
6677
6678 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6679
6680 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6681 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6682 the default breakpoint kind.
6683
6684 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6685
6686 * linux-arm-low.c (arm_supports_z_point_type): Add software
6687 breakpoint support.
6688
6689 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6690
6691 * linux-arm-low.c: Refactor breakpoint definitions.
6692 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6693 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6694
6695 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6696
6697 * Makefile.in: Add arm.c/o.
6698 * configure.srv: Likewise.
6699 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6700 (arm_breakpoint_kind_from_pc): New function.
6701 (arm_sw_breakpoint_from_kind): Return proper kind.
6702 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6703
6704 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6705
6706 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6707 removal.
6708 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6709 (struct raw_breakpoint) <size>: Remove.
6710 (struct raw_breakpoint) <kind>: Add.
6711 (bp_size): New function.
6712 (bp_opcode): Likewise.
6713 (find_raw_breakpoint_at): Adjust for kind.
6714 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6715 (remove_memory_breakpoint): Adjust for kind call bp_size.
6716 (set_raw_breakpoint_at): Adjust for kind.
6717 (set_breakpoint): Likewise.
6718 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6719 (delete_raw_breakpoint): Adjust for kind.
6720 (delete_breakpoint): Likewise.
6721 (find_gdb_breakpoint): Likewise.
6722 (set_gdb_breakpoint_1): Likewise.
6723 (set_gdb_breakpoint): Likewise.
6724 (delete_gdb_breakpoint_1): Likewise.
6725 (delete_gdb_breakpoint): Likewise.
6726 (uninsert_raw_breakpoint): Likewise.
6727 (reinsert_raw_breakpoint): Likewise.
6728 (set_breakpoint_data): Remove.
6729 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6730 (check_mem_read): Adjust for kind call bp_size.
6731 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6732 (clone_one_breakpoint): Adjust for kind.
6733 * mem-break.h (set_gdb_breakpoint): Likewise.
6734 (delete_gdb_breakpoint): Likewise.
6735 * server.c (process_serial_event): Likewise.
6736
6737 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6738
6739 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6740 (struct linux_target_ops) <breakpoint>: Remove.
6741 (struct linux_target_ops) <breakpoint_len>: Remove.
6742 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6743 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6744 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6745 (arm_sw_breakpoint_from_kind): New function.
6746 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6747 (struct linux_target_ops) <breakpoint>: Remove.
6748 (struct linux_target_ops) <breakpoint_len>: Remove.
6749 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6750 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6751 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6752 (struct linux_target_ops) <breakpoint>: Remove.
6753 (struct linux_target_ops) <breakpoint_len>: Remove.
6754 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6755 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6756 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6757 (struct linux_target_ops) <breakpoint>: Remove.
6758 (struct linux_target_ops) <breakpoint_len>: Remove.
6759 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6760 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6761 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6762 and sw_breakpoint_from_kind to increment the pc.
6763 (linux_breakpoint_kind_from_pc): New function.
6764 (linux_sw_breakpoint_from_kind): New function.
6765 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6766 (initialize_low): Call breakpoint_kind_from_pc and
6767 sw_breakpoint_from_kind to replace breakpoint_data/len.
6768 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6769 New field.
6770 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6771 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6772 (struct linux_target_ops) <breakpoint>: Remove.
6773 (struct linux_target_ops) <breakpoint_len>: Remove.
6774 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6775 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6776 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6777 (struct linux_target_ops) <breakpoint>: Remove.
6778 (struct linux_target_ops) <breakpoint_len>: Remove.
6779 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6780 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6781 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6782 (struct linux_target_ops) <breakpoint>: Remove.
6783 (struct linux_target_ops) <breakpoint_len>: Remove.
6784 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6785 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6786 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6787 (struct linux_target_ops) <breakpoint>: Remove.
6788 (struct linux_target_ops) <breakpoint_len>: Remove.
6789 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6790 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6791 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6792 (struct linux_target_ops) <breakpoint>: Remove.
6793 (struct linux_target_ops) <breakpoint_len>: Remove.
6794 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6795 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6796 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6797 (struct linux_target_ops) <breakpoint>: Remove.
6798 (struct linux_target_ops) <breakpoint_len>: Remove.
6799 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6800 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6801 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6802 (struct linux_target_ops) <breakpoint>: Remove.
6803 (struct linux_target_ops) <breakpoint_len>: Remove.
6804 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6805 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6806 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6807 (struct linux_target_ops) <breakpoint>: Remove.
6808 (struct linux_target_ops) <breakpoint_len>: Remove.
6809 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6810 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6811 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6812 (struct linux_target_ops) <breakpoint>: Remove.
6813 (struct linux_target_ops) <breakpoint_len>: Remove.
6814 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6815 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6816 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6817 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6818 (struct linux_target_ops) <breakpoint>: Remove.
6819 (struct linux_target_ops) <breakpoint_len>: Remove.
6820 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6821 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6822 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6823 (struct linux_target_ops) <breakpoint>: Remove.
6824 (struct linux_target_ops) <breakpoint_len>: Remove.
6825 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6826 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6827
6828 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6829
6830 * linux-cris-low.c (cris_get_pc): Remove void arg.
6831
6832 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6833
6834 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6835 variable name.
6836
6837 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6838
6839 * inferiors.c (thread_pid_matches_callback): New function.
6840 (find_thread_process): New function.
6841 (remove_thread): Reset current_thread.
6842 (remove_process): Assert threads have been removed first.
6843
6844 2015-10-15 Yao Qi <yao.qi@linaro.org>
6845
6846 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6847 if it is 3.
6848 (aarch64_remove_point): Likewise.
6849 * regcache.c (regcache_register_size): New function.
6850
6851 2015-10-12 Yao Qi <yao.qi@linaro.org>
6852
6853 * linux-aarch64-low.c: Update all callers as emit_load_store
6854 is renamed to aarch64_emit_load_store.
6855
6856 2015-10-12 Yao Qi <yao.qi@linaro.org>
6857
6858 * linux-aarch64-low.c: Update all callers of function renaming
6859 from emit_insn to aarch64_emit_insn.
6860
6861 2015-10-12 Yao Qi <yao.qi@linaro.org>
6862
6863 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6864 arch/aarch64-insn.h.
6865 (struct aarch64_memory_operand): Likewise.
6866 (ENCODE): Likewise.
6867 (emit_insn): Move to arch/aarch64-insn.c.
6868 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6869 (emit_load_store): Move to arch/aarch64-insn.c.
6870 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6871 (can_encode_int32): Remove.
6872
6873 2015-10-12 Yao Qi <yao.qi@linaro.org>
6874
6875 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6876 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6877 (aarch64_relocate_instruction): Likewise.
6878 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6879 (struct aarch64_insn_visitor): Likewise.
6880
6881 2015-10-12 Yao Qi <yao.qi@linaro.org>
6882
6883 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6884 (struct aarch64_insn_visitor): New.
6885 (struct aarch64_insn_relocation_data): New.
6886 (aarch64_ftrace_insn_reloc_b): New function.
6887 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6888 (aarch64_ftrace_insn_reloc_cb): Likewise.
6889 (aarch64_ftrace_insn_reloc_tb): Likewise.
6890 (aarch64_ftrace_insn_reloc_adr): Likewise.
6891 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6892 (aarch64_ftrace_insn_reloc_others): Likewise.
6893 (visitor): New.
6894 (aarch64_relocate_instruction): Use visitor.
6895
6896 2015-10-12 Yao Qi <yao.qi@linaro.org>
6897
6898 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6899 int. Add argument buf.
6900 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6901 aarch64_relocate_instruction.
6902
6903 2015-10-12 Yao Qi <yao.qi@linaro.org>
6904
6905 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6906 argument insn. Remove local variable insn. Don't call
6907 target_read_uint32.
6908 (aarch64_install_fast_tracepoint_jump_pad): Call
6909 target_read_uint32.
6910
6911 2015-09-30 Yao Qi <yao.qi@linaro.org>
6912
6913 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6914 (emit_load_store_pair): Likewise.
6915
6916 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6917
6918 * dll.c (match_dll): Add cast(s).
6919 (unloaded_dll): Likewise.
6920 * linux-low.c (second_thread_of_pid_p): Likewise.
6921 (delete_lwp_callback): Likewise.
6922 (count_events_callback): Likewise.
6923 (select_event_lwp_callback): Likewise.
6924 (linux_set_resume_request): Likewise.
6925 * server.c (accumulate_file_name_length): Likewise.
6926 (emit_dll_description): Likewise.
6927 (handle_qxfer_threads_worker): Likewise.
6928 (visit_actioned_threads): Likewise.
6929 * thread-db.c (any_thread_of): Likewise.
6930 * tracepoint.c (same_process_p): Likewise.
6931 (match_blocktype): Likewise.
6932 (build_traceframe_info_xml): Likewise.
6933
6934 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6935
6936 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6937 assignment.
6938 (gdb_unparse_agent_expr): Likewise.
6939 * hostio.c (require_data): Likewise.
6940 (handle_pread): Likewise.
6941 * linux-low.c (disable_regset): Likewise.
6942 (fetch_register): Likewise.
6943 (store_register): Likewise.
6944 (get_dynamic): Likewise.
6945 (linux_qxfer_libraries_svr4): Likewise.
6946 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6947 (set_fast_tracepoint_jump): Likewise.
6948 (uninsert_fast_tracepoint_jumps_at): Likewise.
6949 (reinsert_fast_tracepoint_jumps_at): Likewise.
6950 (validate_inserted_breakpoint): Likewise.
6951 (clone_agent_expr): Likewise.
6952 * regcache.c (init_register_cache): Likewise.
6953 * remote-utils.c (putpkt_binary_1): Likewise.
6954 (decode_M_packet): Likewise.
6955 (decode_X_packet): Likewise.
6956 (look_up_one_symbol): Likewise.
6957 (relocate_instruction): Likewise.
6958 (monitor_output): Likewise.
6959 * server.c (handle_search_memory): Likewise.
6960 (handle_qxfer_exec_file): Likewise.
6961 (handle_qxfer_libraries): Likewise.
6962 (handle_qxfer): Likewise.
6963 (handle_query): Likewise.
6964 (handle_v_cont): Likewise.
6965 (handle_v_run): Likewise.
6966 (captured_main): Likewise.
6967 * target.c (write_inferior_memory): Likewise.
6968 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6969 * tracepoint.c (init_trace_buffer): Likewise.
6970 (add_tracepoint_action): Likewise.
6971 (add_traceframe): Likewise.
6972 (add_traceframe_block): Likewise.
6973 (cmd_qtdpsrc): Likewise.
6974 (cmd_qtdv): Likewise.
6975 (cmd_qtstatus): Likewise.
6976 (response_source): Likewise.
6977 (response_tsv): Likewise.
6978 (cmd_qtnotes): Likewise.
6979 (gdb_collect): Likewise.
6980 (initialize_tracepoint): Likewise.
6981
6982 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
6983
6984 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
6985 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
6986 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6987 <NOP>: New.
6988 (enum aarch64_condition_codes): New enum.
6989 (w0): New static global.
6990 (fp): Likewise.
6991 (lr): Likewise.
6992 (struct aarch64_memory_operand) <type>: New
6993 MEMORY_OPERAND_POSTINDEX type.
6994 (postindex_memory_operand): New helper function.
6995 (emit_ret): New function.
6996 (emit_load_store_pair): New function, factored out of emit_stp
6997 with support for MEMORY_OPERAND_POSTINDEX.
6998 (emit_stp): Rewrite using emit_load_store_pair.
6999 (emit_ldp): New function.
7000 (emit_load_store): Likewise.
7001 (emit_ldr): Mention post-index instruction in comment.
7002 (emit_ldrh): New function.
7003 (emit_ldrb): New function.
7004 (emit_ldrsw): Mention post-index instruction in comment.
7005 (emit_str): Likewise.
7006 (emit_subs): New function.
7007 (emit_cmp): Likewise.
7008 (emit_and): Likewise.
7009 (emit_orr): Likewise.
7010 (emit_orn): Likewise.
7011 (emit_eor): Likewise.
7012 (emit_mvn): Likewise.
7013 (emit_lslv): Likewise.
7014 (emit_lsrv): Likewise.
7015 (emit_asrv): Likewise.
7016 (emit_mul): Likewise.
7017 (emit_sbfm): Likewise.
7018 (emit_sbfx): Likewise.
7019 (emit_ubfm): Likewise.
7020 (emit_ubfx): Likewise.
7021 (emit_csinc): Likewise.
7022 (emit_cset): Likewise.
7023 (emit_nop): Likewise.
7024 (emit_ops_insns): New helper function.
7025 (emit_pop): Likewise.
7026 (emit_push): Likewise.
7027 (aarch64_emit_prologue): New function.
7028 (aarch64_emit_epilogue): Likewise.
7029 (aarch64_emit_add): Likewise.
7030 (aarch64_emit_sub): Likewise.
7031 (aarch64_emit_mul): Likewise.
7032 (aarch64_emit_lsh): Likewise.
7033 (aarch64_emit_rsh_signed): Likewise.
7034 (aarch64_emit_rsh_unsigned): Likewise.
7035 (aarch64_emit_ext): Likewise.
7036 (aarch64_emit_log_not): Likewise.
7037 (aarch64_emit_bit_and): Likewise.
7038 (aarch64_emit_bit_or): Likewise.
7039 (aarch64_emit_bit_xor): Likewise.
7040 (aarch64_emit_bit_not): Likewise.
7041 (aarch64_emit_equal): Likewise.
7042 (aarch64_emit_less_signed): Likewise.
7043 (aarch64_emit_less_unsigned): Likewise.
7044 (aarch64_emit_ref): Likewise.
7045 (aarch64_emit_if_goto): Likewise.
7046 (aarch64_emit_goto): Likewise.
7047 (aarch64_write_goto_address): Likewise.
7048 (aarch64_emit_const): Likewise.
7049 (aarch64_emit_call): Likewise.
7050 (aarch64_emit_reg): Likewise.
7051 (aarch64_emit_pop): Likewise.
7052 (aarch64_emit_stack_flush): Likewise.
7053 (aarch64_emit_zero_ext): Likewise.
7054 (aarch64_emit_swap): Likewise.
7055 (aarch64_emit_stack_adjust): Likewise.
7056 (aarch64_emit_int_call_1): Likewise.
7057 (aarch64_emit_void_call_2): Likewise.
7058 (aarch64_emit_eq_goto): Likewise.
7059 (aarch64_emit_ne_goto): Likewise.
7060 (aarch64_emit_lt_goto): Likewise.
7061 (aarch64_emit_le_goto): Likewise.
7062 (aarch64_emit_gt_goto): Likewise.
7063 (aarch64_emit_ge_got): Likewise.
7064 (aarch64_emit_ops_impl): New static global variable.
7065 (aarch64_emit_ops): New target function, return
7066 &aarch64_emit_ops_impl.
7067 (struct linux_target_ops): Install it.
7068
7069 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7070
7071 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7072 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7073 aarch64-ipa.o.
7074 * linux-aarch64-ipa.c: New file.
7075 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7076 and endian.h.
7077 (aarch64_get_thread_area): New target method.
7078 (extract_signed_bitfield): New helper function.
7079 (aarch64_decode_ldr_literal): New function.
7080 (enum aarch64_opcodes): New enum.
7081 (struct aarch64_register): New struct.
7082 (struct aarch64_operand): New struct.
7083 (x0): New static global.
7084 (x1): Likewise.
7085 (x2): Likewise.
7086 (x3): Likewise.
7087 (x4): Likewise.
7088 (w2): Likewise.
7089 (ip0): Likewise.
7090 (sp): Likewise.
7091 (xzr): Likewise.
7092 (aarch64_register): New helper function.
7093 (register_operand): Likewise.
7094 (immediate_operand): Likewise.
7095 (struct aarch64_memory_operand): New struct.
7096 (offset_memory_operand): New helper function.
7097 (preindex_memory_operand): Likewise.
7098 (enum aarch64_system_control_registers): New enum.
7099 (ENCODE): New macro.
7100 (emit_insn): New helper function.
7101 (emit_b): New function.
7102 (emit_bcond): Likewise.
7103 (emit_cb): Likewise.
7104 (emit_tb): Likewise.
7105 (emit_blr): Likewise.
7106 (emit_stp): Likewise.
7107 (emit_ldp_q_offset): Likewise.
7108 (emit_stp_q_offset): Likewise.
7109 (emit_load_store): Likewise.
7110 (emit_ldr): Likewise.
7111 (emit_ldrsw): Likewise.
7112 (emit_str): Likewise.
7113 (emit_ldaxr): Likewise.
7114 (emit_stxr): Likewise.
7115 (emit_stlr): Likewise.
7116 (emit_data_processing_reg): Likewise.
7117 (emit_data_processing): Likewise.
7118 (emit_add): Likewise.
7119 (emit_sub): Likewise.
7120 (emit_mov): Likewise.
7121 (emit_movk): Likewise.
7122 (emit_mov_addr): Likewise.
7123 (emit_mrs): Likewise.
7124 (emit_msr): Likewise.
7125 (emit_sevl): Likewise.
7126 (emit_wfe): Likewise.
7127 (append_insns): Likewise.
7128 (can_encode_int32_in): New helper function.
7129 (aarch64_relocate_instruction): New function.
7130 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7131 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7132 (struct linux_target_ops): Install aarch64_get_thread_area,
7133 aarch64_install_fast_tracepoint_jump_pad and
7134 aarch64_get_min_fast_tracepoint_insn_len.
7135
7136 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7137
7138 * Makefile.in (aarch64-insn.o): New rule.
7139 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7140
7141 2015-09-21 Yao Qi <yao.qi@linaro.org>
7142
7143 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7144
7145 2015-09-21 Yao Qi <yao.qi@linaro.org>
7146
7147 * tracepoint.c (max_jump_pad_size): Remove.
7148
7149 2015-09-18 Yao Qi <yao.qi@linaro.org>
7150
7151 * linux-aarch64-low.c: Don't include sys/uio.h.
7152 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7153
7154 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7155
7156 * tracepoint.c (eval_result_type): Change prototype.
7157 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7158
7159 2015-09-15 Pedro Alves <palves@redhat.com>
7160
7161 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7162 Check whether to report exec events instead of checking whether
7163 multiprocess is enabled.
7164
7165 2015-09-15 Pedro Alves <palves@redhat.com>
7166
7167 PR remote/18965
7168 * remote-utils.c (prepare_resume_reply): Merge
7169 TARGET_WAITKIND_VFORK_DONE switch case with the
7170 TARGET_WAITKIND_FORKED case.
7171
7172 2015-09-15 Yao Qi <yao.qi@linaro.org>
7173
7174 * server.c (handle_query): Check string comparison using
7175 "else if" instead of "if".
7176
7177 2015-09-15 Yao Qi <yao.qi@linaro.org>
7178
7179 * server.c (vCont_supported): New global variable.
7180 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7181 matches. Append ";vContSupported+" to own_buf.
7182 (handle_v_requests): Append ";s;S" to own_buf if target supports
7183 hardware single step or vCont_supported is false.
7184 (capture_main): Set vCont_supported to zero.
7185
7186 2015-09-15 Yao Qi <yao.qi@linaro.org>
7187
7188 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7189 it to ...
7190 (linux_supports_hardware_single_step): ... New function.
7191 (linux_target_ops): Update.
7192 * lynx-low.c (lynx_target_ops): Set field
7193 supports_hardware_single_step to target_can_do_hardware_single_step.
7194 * nto-low.c (nto_target_ops): Likewise.
7195 * spu-low.c (spu_target_ops): Likewise.
7196 * win32-low.c (win32_target_ops): Likewise.
7197 * target.c (target_can_do_hardware_single_step): New function.
7198 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7199 Remove. <supports_hardware_single_step>: New field.
7200 (target_supports_conditional_breakpoints): Remove.
7201 (target_supports_hardware_single_step): New macro.
7202 (target_can_do_hardware_single_step): Declare.
7203 * server.c (handle_query): Use target_supports_hardware_single_step
7204 instead of target_supports_conditional_breakpoints.
7205
7206 2015-09-15 Yao Qi <yao.qi@linaro.org>
7207
7208 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7209 function.
7210 (struct linux_target_ops the_low_target): Install
7211 aarch64_linux_siginfo_fixup.
7212
7213 2015-09-11 Don Breazeal <donb@codesourcery.com>
7214 Luis Machado <lgustavo@codesourcery.com>
7215
7216 * linux-low.c (linux_mourn): Static declaration.
7217 (linux_arch_setup): Move in front of
7218 handle_extended_wait.
7219 (linux_arch_setup_thread): New function.
7220 (handle_extended_wait): Handle exec events. Call
7221 linux_arch_setup_thread. Make event_lwp argument a
7222 pointer-to-a-pointer.
7223 (check_zombie_leaders): Do not check stopped threads.
7224 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7225 (linux_low_filter_event): Add lwp and thread for exec'ing
7226 non-leader thread if leader thread has been deleted.
7227 Refactor code into linux_arch_setup_thread and call it.
7228 Pass child lwp pointer by reference to handle_extended_wait.
7229 (linux_wait_for_event_filtered): Update comment.
7230 (linux_wait_1): Prevent clobbering exec event status.
7231 (linux_supports_exec_events): New function.
7232 (linux_target_ops) <supports_exec_events>: Initialize new member.
7233 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7234 new member.
7235 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7236 * server.c (report_exec_events): New global variable.
7237 (handle_query): Handle qSupported query for exec-events feature.
7238 (captured_main): Initialize report_exec_events.
7239 * server.h (report_exec_events): Declare new global variable.
7240 * target.h (struct target_ops) <supports_exec_events>: New
7241 member.
7242 (target_supports_exec_events): New macro.
7243 * win32-low.c (win32_target_ops) <supports_exec_events>:
7244 Initialize new member.
7245
7246 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7247
7248 * linux-low.c (linux_low_enable_btrace): Remove.
7249 (linux_target_ops): Replace linux_low_enable_btrace with
7250 linux_enable_btrace.
7251
7252 2015-09-03 Yao Qi <yao.qi@linaro.org>
7253
7254 * linux-aarch64-low.c (aarch64_insert_point): Call
7255 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7256 returns true.
7257
7258 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7259
7260 * linux-low.c (check_stopped_by_breakpoint): Use
7261 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7262
7263 2015-08-27 Pedro Alves <palves@redhat.com>
7264
7265 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7266
7267 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7268
7269 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7270 the XNEW-family equivalent.
7271 (compile_bytecodes): Likewise.
7272 * dll.c (loaded_dll): Likewise.
7273 * event-loop.c (append_callback_event): Likewise.
7274 (create_file_handler): Likewise.
7275 (create_file_event): Likewise.
7276 * hostio.c (handle_open): Likewise.
7277 * inferiors.c (add_thread): Likewise.
7278 (add_process): Likewise.
7279 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7280 * linux-arm-low.c (arm_new_process): Likewise.
7281 (arm_new_thread): Likewise.
7282 * linux-low.c (add_to_pid_list): Likewise.
7283 (linux_add_process): Likewise.
7284 (handle_extended_wait): Likewise.
7285 (add_lwp): Likewise.
7286 (enqueue_one_deferred_signal): Likewise.
7287 (enqueue_pending_signal): Likewise.
7288 (linux_resume_one_lwp_throw): Likewise.
7289 (linux_resume_one_thread): Likewise.
7290 (linux_read_memory): Likewise.
7291 (linux_write_memory): Likewise.
7292 * linux-mips-low.c (mips_linux_new_process): Likewise.
7293 (mips_linux_new_thread): Likewise.
7294 (mips_add_watchpoint): Likewise.
7295 * linux-x86-low.c (initialize_low_arch): Likewise.
7296 * lynx-low.c (lynx_add_process): Likewise.
7297 * mem-break.c (set_raw_breakpoint_at): Likewise.
7298 (set_breakpoint): Likewise.
7299 (add_condition_to_breakpoint): Likewise.
7300 (add_commands_to_breakpoint): Likewise.
7301 (clone_agent_expr): Likewise.
7302 (clone_one_breakpoint): Likewise.
7303 * regcache.c (new_register_cache): Likewise.
7304 * remote-utils.c (look_up_one_symbol): Likewise.
7305 * server.c (queue_stop_reply): Likewise.
7306 (start_inferior): Likewise.
7307 (queue_stop_reply_callback): Likewise.
7308 (handle_target_event): Likewise.
7309 * spu-low.c (fetch_ppc_memory): Likewise.
7310 (store_ppc_memory): Likewise.
7311 * target.c (set_target_ops): Likewise.
7312 * thread-db.c (thread_db_load_search): Likewise.
7313 (try_thread_db_load_1): Likewise.
7314 * tracepoint.c (add_tracepoint): Likewise.
7315 (add_tracepoint_action): Likewise.
7316 (create_trace_state_variable): Likewise.
7317 (cmd_qtdpsrc): Likewise.
7318 (cmd_qtro): Likewise.
7319 (add_while_stepping_state): Likewise.
7320 * win32-low.c (child_add_thread): Likewise.
7321 (get_image_name): Likewise.
7322
7323 2015-08-25 Yao Qi <yao.qi@linaro.org>
7324
7325 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7326
7327 2015-08-25 Yao Qi <yao.qi@linaro.org>
7328
7329 * Makefile.in (aarch64-linux.o): New rule.
7330 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7331 srv_tgtobj.
7332 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7333 (aarch64_init_debug_reg_state): Make it extern.
7334 (aarch64_linux_prepare_to_resume): Remove.
7335
7336 2015-08-25 Yao Qi <yao.qi@linaro.org>
7337
7338 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7339 lwp_arch_private_info and ptid_of_lwp.
7340
7341 2015-08-25 Yao Qi <yao.qi@linaro.org>
7342
7343 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7344 Find proc_info by find_process_pid. All callers updated.
7345
7346 2015-08-25 Yao Qi <yao.qi@linaro.org>
7347
7348 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7349 Remove.
7350 (debug_reg_change_callback): Remove.
7351 (aarch64_notify_debug_reg_change): Remove.
7352
7353 2015-08-25 Yao Qi <yao.qi@linaro.org>
7354
7355 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7356 Call current_lwp_ptid.
7357
7358 2015-08-25 Yao Qi <yao.qi@linaro.org>
7359
7360 * linux-aarch64-low.c (debug_reg_change_callback): Use
7361 debug_printf.
7362
7363 2015-08-25 Yao Qi <yao.qi@linaro.org>
7364
7365 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7366
7367 2015-08-25 Yao Qi <yao.qi@linaro.org>
7368
7369 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7370
7371 2015-08-25 Yao Qi <yao.qi@linaro.org>
7372
7373 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7374 the code.
7375
7376 2015-08-25 Yao Qi <yao.qi@linaro.org>
7377
7378 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7379 Remove.
7380 (debug_reg_change_callback): Remove argument entry and add argument
7381 lwp. Remove local variable thread. Don't print thread id in the
7382 debugging output. Don't check whether pid of thread equals to pid.
7383 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7384 iterate_over_lwps instead find_inferior.
7385
7386 2015-08-24 Pedro Alves <palves@redhat.com>
7387
7388 * inferiors.c (get_first_process): New function.
7389 * inferiors.h (get_first_process): New declaration.
7390 * remote-utils.c (read_ptid): Default to the first process in the
7391 list, instead of to the current thread's process.
7392
7393 2015-08-24 Pedro Alves <palves@redhat.com>
7394
7395 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7396 * event-loop.c: Likewise.
7397 * remote-utils.c: Likewise.
7398 * tracepoint.c: Likewise.
7399
7400 2015-08-24 Pedro Alves <palves@redhat.com>
7401
7402 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7403 ptid_get_lwp.
7404
7405 2015-08-21 Pedro Alves <palves@redhat.com>
7406
7407 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7408 instead of literal 1.
7409
7410 2015-08-21 Pedro Alves <palves@redhat.com>
7411
7412 * tdesc.c (default_description): Explicitly zero-initialize.
7413
7414 2015-08-21 Pedro Alves <palves@redhat.com>
7415
7416 PR gdb/18749
7417 * inferiors.c (remove_thread): Discard any pending stop reply for
7418 this thread.
7419 * server.c (remove_all_on_match_pid): Rename to ...
7420 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7421 instead of a pid.
7422 (discard_queued_stop_replies): Change parameter to a ptid. Now
7423 extern.
7424 (handle_v_kill, kill_inferior_callback, captured_main)
7425 (process_serial_event): Adjust.
7426 * server.h (discard_queued_stop_replies): Declare.
7427
7428 2015-08-21 Pedro Alves <palves@redhat.com>
7429
7430 * linux-low.c (wait_for_sigstop): Always switch to no thread
7431 selected if the previously current thread dies.
7432 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7433 process instead of the current thread's.
7434 * remote-utils.c (input_interrupt): Don't check if there's no
7435 current thread.
7436 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7437 current thread to the general thread fails, error out.
7438 (handle_qxfer_auxv, handle_qxfer_libraries)
7439 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7440 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7441 (handle_query): Check if there's a thread selected instead of
7442 checking whether there's any thread in the thread list.
7443 (handle_qxfer_threads, handle_qxfer_btrace)
7444 (handle_qxfer_btrace_conf): Don't error out early if there's no
7445 thread in the thread list.
7446 (handle_v_cont, myresume): Don't set the current thread to the
7447 continue thread.
7448 (process_serial_event) <Hg handling>: Also set thread_id if the
7449 previous general thread is still alive.
7450 (process_serial_event) <g/G handling>: If setting the current
7451 thread to the general thread fails, error out.
7452 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7453 thread's lwp instead of the current thread's.
7454 * target.c (set_desired_thread): If the desired thread was not
7455 found, leave the current thread pointing to NULL. Return an int
7456 (boolean) indicating success.
7457 * target.h (set_desired_thread): Change return type to int.
7458
7459 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7460
7461 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7462 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7463 #includes.
7464 (ps_get_thread_area): New function.
7465
7466 2015-08-19 Gary Benson <gbenson@redhat.com>
7467
7468 * hostio.c (handle_pread): Do not attempt to read more data
7469 than hostio_reply_with_data can fit in a packet.
7470
7471 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7472
7473 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7474
7475 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7476
7477 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7478
7479 2015-08-06 Pedro Alves <palves@redhat.com>
7480
7481 * tracepoint.c (expr_eval_result): Now an int.
7482
7483 2015-08-06 Pedro Alves <palves@redhat.com>
7484
7485 * gdbthread.h (struct regcache): Forward declare.
7486 (struct thread_info) <regcache_data>: Now a struct regcache
7487 pointer.
7488 * inferiors.c (inferior_regcache_data)
7489 (set_inferior_regcache_data): Now work with struct regcache
7490 pointers.
7491 * inferiors.h (struct regcache): Forward declare.
7492 (inferior_regcache_data, set_inferior_regcache_data): Now work
7493 with struct regcache pointers.
7494 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7495 (free_register_cache_thread): Remove struct regcache pointer
7496 casts.
7497
7498 2015-08-06 Pedro Alves <palves@redhat.com>
7499
7500 * server.c (captured_main): On error, print the exception message
7501 to stderr, and if run_once is set, throw a quit.
7502
7503 2015-08-06 Pedro Alves <palves@redhat.com>
7504
7505 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7506 the current thread.
7507
7508 2015-08-06 Pedro Alves <palves@redhat.com>
7509
7510 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7511 reading beyond the passed in buffer length.
7512
7513 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7514
7515 * tracepoint.c (symbol_list) <required>: Remove.
7516
7517 2015-08-06 Pedro Alves <palves@redhat.com>
7518
7519 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7520 count if stopping and suspending threads.
7521 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7522 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7523 (linux_detach): Complete an ongoing step-over.
7524 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7525 throughout.
7526 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7527 (linux_wait_1): If passing a signal to the inferior after
7528 finishing a step-over, unsuspend and re-resume all lwps. If we
7529 see a single-step event but the thread should be continuing, don't
7530 pass the trap to gdb.
7531 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7532 internal_error instead of gdb_assert.
7533 (enqueue_pending_signal): New function.
7534 (check_ptrace_stopped_lwp_gone): Add debug output.
7535 (start_step_over): Use internal_error instead of gdb_assert.
7536 (complete_ongoing_step_over): New function.
7537 (linux_resume_one_thread): Don't resume a suspended thread.
7538 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7539 it stepping.
7540
7541 2015-08-06 Pedro Alves <palves@redhat.com>
7542
7543 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7544 (linux_thread_alive): Use lwp_is_marked_dead.
7545 (extended_event_reported): Delete.
7546 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7547 instead of extended_event_reported.
7548 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7549 as well.
7550 (lwp_is_marked_dead): New function.
7551 (lwp_running): Use lwp_is_marked_dead.
7552 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7553 comment.
7554
7555 2015-08-06 Pedro Alves <palves@redhat.com>
7556
7557 * linux-low.c (linux_wait_1): Move fork event output out of the
7558 !report_to_gdb check. Pass event_child->waitstatus to
7559 target_waitstatus_to_string instead of ourstatus.
7560
7561 2015-08-04 Yao Qi <yao.qi@linaro.org>
7562
7563 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7564 if current_thread is 32 bit.
7565
7566 2015-08-04 Yao Qi <yao.qi@linaro.org>
7567
7568 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7569 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7570 * server.c (extended_protocol): Remove "static".
7571 * server.h (extended_protocol): Declare it.
7572
7573 2015-08-04 Yao Qi <yao.qi@linaro.org>
7574
7575 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7576 both aarch64 and aarch32.
7577 (aarch64_set_pc): Likewise.
7578
7579 2015-08-04 Yao Qi <yao.qi@linaro.org>
7580
7581 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7582 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7583 arm-with-neon.xml to srv_xmlfiles.
7584 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7585 (is_64bit_tdesc): New function.
7586 (aarch64_linux_read_description): New function.
7587 (aarch64_arch_setup): Call aarch64_linux_read_description.
7588 (regs_info): Rename to regs_info_aarch64.
7589 (aarch64_regs_info): Return right regs_info.
7590 (initialize_low_arch): Call initialize_low_arch_aarch32.
7591
7592 2015-08-04 Yao Qi <yao.qi@linaro.org>
7593
7594 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7595 * linux-aarch32-low.c: New file.
7596 * linux-aarch32-low.h: New file.
7597 * linux-arm-low.c (arm_fill_gregset): Move it to
7598 linux-aarch32-low.c.
7599 (arm_store_gregset): Likewise.
7600 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7601 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7602 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7603 (regs_info): Rename to regs_info_arm.
7604 (arm_regs_info): Return regs_info_aarch32 if
7605 have_ptrace_getregset is 1 and target description is
7606 arm_with_neon or arm_with_vfpv3.
7607 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7608 Call initialize_low_arch_aarch32 instead.
7609
7610 2015-08-04 Yao Qi <yao.qi@linaro.org>
7611
7612 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7613 * linux-low.c: ... here.
7614 * linux-low.h (have_ptrace_getregset): Declare it.
7615
7616 2015-08-04 Pedro Alves <palves@redhat.com>
7617
7618 * thread-db.c (struct thread_db): Use new typedefs.
7619 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7620 CHK calls.
7621 (disable_thread_event_reporting): Cast result of dlsym to
7622 destination function pointer type.
7623 (thread_db_mourn): Use td_ta_delete_ftype.
7624
7625 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7626
7627 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7628 arch variant.
7629 (CDX_BREAKPOINT): Define for R2.
7630 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7631 (the_low_target): Add comments.
7632
7633 2015-07-30 Yao Qi <yao.qi@linaro.org>
7634
7635 * linux-arm-low.c (arm_hwcap): Remove it.
7636 (arm_read_description): New local variable arm_hwcap. Don't
7637 set arm_hwcap to zero.
7638
7639 2015-07-30 Yao Qi <yao.qi@linaro.org>
7640
7641 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7642 Use regcache->tdesc instead.
7643 (arm_store_wmmxregset): Likewise.
7644 (arm_fill_vfpregset): Likewise.
7645 (arm_store_vfpregset): Likewise.
7646
7647 2015-07-30 Yao Qi <yao.qi@linaro.org>
7648
7649 * linux-arm-low.c: Include arch/arm.h.
7650 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7651 (arm_store_gregset): Likewise.
7652
7653 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7654
7655 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7656 ptrace's 4th parameter.
7657
7658 2015-07-27 Yao Qi <yao.qi@linaro.org>
7659
7660 * configure.srv (case aarch64*-*-linux*): Don't set
7661 srv_linux_usrregs.
7662
7663 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7664
7665 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7666 sys/ptrace.h.
7667 * linux-arm-low.c: Likewise.
7668 * linux-cris-low.c: Likewise.
7669 * linux-crisv32-low.c: Likewise.
7670 * linux-low.c: Likewise.
7671 * linux-m68k-low.c: Likewise.
7672 * linux-mips-low.c: Likewise.
7673 * linux-nios2-low.c: Likewise.
7674 * linux-s390-low.c: Likewise.
7675 * linux-sparc-low.c: Likewise.
7676 * linux-tic6x-low.c: Likewise.
7677 * linux-tile-low.c: Likewise.
7678 * linux-x86-low.c: Likewise.
7679
7680 2015-07-24 Pedro Alves <palves@redhat.com>
7681
7682 * config.in: Regenerate.
7683 * configure: Regenerate.
7684
7685 2015-07-24 Pedro Alves <palves@redhat.com>
7686
7687 * acinclude.m4: Include ../ptrace.m4.
7688 * configure.ac: Call GDB_AC_PTRACE.
7689 * config.in, configure: Regenerate.
7690
7691 2015-07-24 Yao Qi <yao.qi@linaro.org>
7692
7693 * linux-low.c (linux_create_inferior): Remove setting to
7694 proc->priv->new_inferior.
7695 (linux_attach): Likewise.
7696 (linux_low_filter_event): Likewise.
7697 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7698
7699 2015-07-24 Yao Qi <yao.qi@linaro.org>
7700
7701 * linux-low.c (linux_arch_setup): New function.
7702 (linux_low_filter_event): If proc->tdesc is NULL and
7703 proc->attached is true, call the_low_target.arch_setup.
7704 Otherwise, keep status pending, and return.
7705 (linux_resume_one_lwp_throw): Don't call get_pc if
7706 thread->while_stepping isn't NULL. Don't call
7707 get_thread_regcache if proc->tdesc is NULL.
7708 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7709 (linux_target_ops): Install arch_setup.
7710 * server.c (start_inferior): Call the_target->arch_setup.
7711 * target.h (struct target_ops) <arch_setup>: New field.
7712 (target_arch_setup): New marco.
7713 * lynx-low.c (lynx_target_ops): Update.
7714 * nto-low.c (nto_target_ops): Update.
7715 * spu-low.c (spu_target_ops): Update.
7716 * win32-low.c (win32_target_ops): Update.
7717
7718 2015-07-24 Yao Qi <yao.qi@linaro.org>
7719
7720 * linux-low.c (linux_add_process): Don't set
7721 proc->priv->new_inferior.
7722 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7723 (linux_attach): Likewise.
7724
7725 2015-07-24 Yao Qi <yao.qi@linaro.org>
7726
7727 * server.c (start_inferior): Code refactor.
7728
7729 2015-07-24 Yao Qi <yao.qi@linaro.org>
7730
7731 * server.c (process_serial_event): Set general_thread.
7732
7733 2015-07-21 Yao Qi <yao.qi@linaro.org>
7734
7735 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7736 aarch64_linux_get_debug_reg_capacity.
7737
7738 2015-07-17 Yao Qi <yao.qi@linaro.org>
7739
7740 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7741 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7742 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7743 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7744 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7745 (AARCH64_HWP_ALIGNMENT): Likewise.
7746 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7747 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7748 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7749 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7750 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7751 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7752 (struct aarch64_debug_reg_state): Likewise.
7753 (struct arch_lwp_info): Likewise.
7754 (aarch64_align_watchpoint): Likewise.
7755 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7756 (aarch64_watchpoint_length): Likewise.
7757 (aarch64_point_encode_ctrl_reg): Likewise
7758 (aarch64_point_is_aligned): Likewise.
7759 (aarch64_align_watchpoint): Likewise.
7760 (aarch64_linux_set_debug_regs):
7761 (aarch64_dr_state_insert_one_point): Likewise.
7762 (aarch64_dr_state_remove_one_point): Likewise.
7763 (aarch64_handle_breakpoint): Likewise.
7764 (aarch64_handle_aligned_watchpoint): Likewise.
7765 (aarch64_handle_unaligned_watchpoint): Likewise.
7766 (aarch64_handle_watchpoint): Likewise.
7767
7768 2015-07-17 Yao Qi <yao.qi@linaro.org>
7769
7770 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7771 and don't aarch64_get_debug_reg_state. All callers update.
7772 (aarch64_handle_aligned_watchpoint): Likewise.
7773 (aarch64_handle_unaligned_watchpoint): Likewise.
7774 (aarch64_handle_watchpoint): Likewise.
7775 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7776 (aarch64_remove_point): Likewise.
7777
7778 2015-07-17 Yao Qi <yao.qi@linaro.org>
7779
7780 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7781 debug_printf.
7782 (aarch64_handle_unaligned_watchpoint): Likewise.
7783
7784 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7785
7786 Revert the previous 3 commits:
7787 Move gdb_regex* to common/
7788 Move linux_find_memory_regions_full & co.
7789 gdbserver build-id attribute generator
7790
7791 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7792 Jan Kratochvil <jan.kratochvil@redhat.com>
7793
7794 gdbserver build-id attribute generator.
7795 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7796 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7797 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7798 (find_phdr): New.
7799 (get_dynamic): Use find_pdhr to traverse program headers.
7800 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7801 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7802 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7803 (get_hex_build_id): New.
7804 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7805 to reply XML document.
7806
7807 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7808 Jan Kratochvil <jan.kratochvil@redhat.com>
7809
7810 * target.c: Include target/target-utils.h and fcntl.h.
7811 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7812 (target_fileio_read_stralloc): New functions.
7813
7814 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7815
7816 * Makefile.in (OBS): Add gdb_regex.o.
7817 (gdb_regex.o): New.
7818 * config.in: Rebuilt.
7819 * configure: Rebuilt.
7820
7821 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7822 Jan Kratochvil <jan.kratochvil@redhat.com>
7823
7824 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7825 * Makefile.in (OBS): Add target-utils.o.
7826 (linux-maps.o, target-utils.o): New.
7827 * configure.srv (srv_linux_obj): Add linux-maps.o.
7828
7829 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7830
7831 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7832 function, return 1.
7833 (the_low_target): Install it.
7834
7835 2015-07-14 Pedro Alves <palves@redhat.com>
7836
7837 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7838 Instead, ignore ECHILD, and throw an error for other errnos.
7839
7840 2015-07-10 Pedro Alves <palves@redhat.com>
7841
7842 * event-loop.c (struct callback_event) <data>: Change type to
7843 gdb_client_data instance instead of gdb_client_data pointer.
7844 (append_callback_event): Adjust.
7845
7846 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7847
7848 * linux-aarch64-low.c: Add comments for each linux_target_ops
7849 method. Remove comments already covered in target_ops and
7850 linux_target_ops definitions.
7851 (the_low_target): Add comments for each unimplemented method.
7852
7853 2015-07-09 Yao Qi <yao.qi@linaro.org>
7854
7855 * linux-aarch64-low.c (aarch64_regmap): Remove.
7856 (aarch64_usrregs_info): Remove.
7857 (regs_info): Set field usrregs to NULL.
7858
7859 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7860
7861 * linux-low.c: Include "rsp-low.h"
7862 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7863 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7864 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7865 (handle_btrace_enable_pt): New.
7866 (handle_btrace_general_set): Support "pt".
7867 (handle_btrace_conf_general_set): Support "pt:size".
7868
7869 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7870
7871 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7872 Z_PACKET_SW_BP.
7873
7874 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7875
7876 * linux-aarch64-low.c: Remove comment about endianness.
7877 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7878 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7879 memcmp.
7880
7881 2015-06-24 Gary Benson <gbenson@redhat.com>
7882
7883 * linux-i386-ipa.c (stdint.h): Do not include.
7884 * lynx-i386-low.c (stdint.h): Likewise.
7885 * lynx-ppc-low.c (stdint.h): Likewise.
7886 * mem-break.c (stdint.h): Likewise.
7887 * thread-db.c (stdint.h): Likewise.
7888 * tracepoint.c (stdint.h): Likewise.
7889 * win32-low.c (stdint.h): Likewise.
7890
7891 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7892
7893 * server.c (write_qxfer_response): Update call to
7894 remote_escape_output.
7895
7896 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7897 Jan Kratochvil <jan.kratochvil@redhat.com>
7898
7899 Merge multiple hex conversions.
7900 * gdbreplay.c (tohex): Rename to 'fromhex'.
7901 (logchar): Use fromhex.
7902
7903 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7904
7905 * server.c (handle_qxfer_libraries): Set `version' attribute for
7906 <library-list>.
7907
7908 2015-06-10 Gary Benson <gbenson@redhat.com>
7909
7910 * target.h (struct target_ops) <multifs_open>: New field.
7911 <multifs_unlink>: Likewise.
7912 <multifs_readlink>: Likewise.
7913 * linux-low.c (nat/linux-namespaces.h): New include.
7914 (linux_target_ops): Initialize the_target->multifs_open,
7915 the_target->multifs_unlink and the_target->multifs_readlink.
7916 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7917 * hostio.c (hostio_fs_pid): New static variable.
7918 (hostio_handle_new_gdb_connection): New function.
7919 (handle_setfs): Likewise.
7920 (handle_open): Use the_target->multifs_open as appropriate.
7921 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7922 (handle_readlink): Use the_target->multifs_readlink as
7923 appropriate.
7924 (handle_vFile): Handle vFile:setfs packets.
7925 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7926 after target_handle_new_gdb_connection.
7927
7928 2015-06-10 Gary Benson <gbenson@redhat.com>
7929
7930 * configure.ac (AC_CHECK_FUNCS): Add setns.
7931 * config.in: Regenerate.
7932 * configure: Likewise.
7933 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7934 (linux-namespaces.o): New rule.
7935 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7936
7937 2015-06-09 Gary Benson <gbenson@redhat.com>
7938
7939 * hostio.c (handle_open): Process mode argument with
7940 fileio_to_host_mode.
7941
7942 2015-06-01 Yao Qi <yao.qi@linaro.org>
7943
7944 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7945 * linux-x86-low.c: Likewise.
7946
7947 2015-05-28 Don Breazeal <donb@codesourcery.com>
7948
7949 * linux-low.c (handle_extended_wait): Initialize
7950 thread_info.last_resume_kind for new fork children.
7951
7952 2015-05-15 Pedro Alves <palves@redhat.com>
7953
7954 * target.h (target_handle_new_gdb_connection): Rewrite using if
7955 wrapped in do/while.
7956
7957 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7958
7959 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7960 * configure, config.in: Regenerate.
7961 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7962 Declare typedef.
7963
7964 2015-05-12 Don Breazeal <donb@codesourcery.com>
7965
7966 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7967 PTRACE_EVENT_VFORK_DONE.
7968 (linux_low_ptrace_options, extended_event_reported): Add vfork
7969 events.
7970 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7971 and "vforkdone" for RSP 'T' Stop Reply Packet.
7972 * server.h (report_vfork_events): Declare
7973 global variable.
7974
7975 2015-05-12 Don Breazeal <donb@codesourcery.com>
7976
7977 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7978 (the_low_target) <new_fork>: Initialize new member.
7979 * linux-arm-low.c (arm_new_fork): New function.
7980 (the_low_target) <new_fork>: Initialize new member.
7981 * linux-low.c (handle_extended_wait): Call new target function
7982 new_fork.
7983 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
7984 * linux-mips-low.c (mips_add_watchpoint): New function
7985 extracted from mips_insert_point.
7986 (the_low_target) <new_fork>: Initialize new member.
7987 (mips_linux_new_fork): New function.
7988 (mips_insert_point): Call mips_add_watchpoint.
7989 * linux-x86-low.c (x86_linux_new_fork): New function.
7990 (the_low_target) <new_fork>: Initialize new member.
7991
7992 2015-05-12 Don Breazeal <donb@codesourcery.com>
7993
7994 * linux-low.c (handle_extended_wait): Implement return value,
7995 rename argument 'event_child' to 'event_lwp', handle
7996 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
7997 (linux_low_ptrace_options): New function.
7998 (linux_low_filter_event): Call linux_low_ptrace_options,
7999 use different argument fo linux_enable_event_reporting,
8000 use return value from handle_extended_wait.
8001 (extended_event_reported): New function.
8002 (linux_wait_1): Call extended_event_reported and set
8003 status to report fork events.
8004 (linux_write_memory): Add pid to debug message.
8005 (reset_lwp_ptrace_options_callback): New function.
8006 (linux_handle_new_gdb_connection): New function.
8007 (linux_target_ops): Initialize new structure member.
8008 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8009 * lynx-low.c: Initialize new structure member.
8010 * remote-utils.c (prepare_resume_reply): Implement stop reason
8011 "fork" for "T" stop message.
8012 * server.c (handle_query): Call handle_new_gdb_connection.
8013 * server.h (report_fork_events): Declare global flag.
8014 * target.h (struct target_ops) <handle_new_gdb_connection>:
8015 New member.
8016 (target_handle_new_gdb_connection): New macro.
8017 * win32-low.c: Initialize new structure member.
8018
8019 2015-05-12 Don Breazeal <donb@codesourcery.com>
8020
8021 * mem-break.c (APPEND_TO_LIST): Define macro.
8022 (clone_agent_expr): New function.
8023 (clone_one_breakpoint): New function.
8024 (clone_all_breakpoints): New function.
8025 * mem-break.h: Declare new functions.
8026
8027 2015-05-12 Don Breazeal <donb@codesourcery.com>
8028
8029 * linux-low.c (linux_supports_fork_events): New function.
8030 (linux_supports_vfork_events): New function.
8031 (linux_target_ops): Initialize new structure members.
8032 (initialize_low): Call linux_check_ptrace_features.
8033 * lynx-low.c (lynx_target_ops): Initialize new structure
8034 members.
8035 * server.c (report_fork_events, report_vfork_events):
8036 New global flags.
8037 (handle_query): Add new features to qSupported packet and
8038 response.
8039 (captured_main): Initialize new global variables.
8040 * target.h (struct target_ops) <supports_fork_events>:
8041 New member.
8042 <supports_vfork_events>: New member.
8043 (target_supports_fork_events): New macro.
8044 (target_supports_vfork_events): New macro.
8045 * win32-low.c (win32_target_ops): Initialize new structure
8046 members.
8047
8048 2015-05-12 Gary Benson <gbenson@redhat.com>
8049
8050 * server.c (handle_qxfer_exec_file): Use current process
8051 if annex is empty.
8052
8053 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8054
8055 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8056 Remove HAVE_PTRACE_GETREGS conditionals.
8057 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8058 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8059
8060 2015-05-08 Yao Qi <yao.qi@linaro.org>
8061
8062 * linux-low.c (linux_supports_conditional_breakpoints): New
8063 function.
8064 (linux_target_ops): Install new target method.
8065 * lynx-low.c (lynx_target_ops): Install NULL hook for
8066 supports_conditional_breakpoints.
8067 * nto-low.c (nto_target_ops): Likewise.
8068 * spu-low.c (spu_target_ops): Likewise.
8069 * win32-low.c (win32_target_ops): Likewise.
8070 * server.c (handle_query): Check
8071 target_supports_conditional_breakpoints.
8072 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8073 New field.
8074 (target_supports_conditional_breakpoints): New macro.
8075
8076 2015-05-06 Pedro Alves <palves@redhat.com>
8077
8078 PR server/18081
8079 * server.c (start_inferior): If the process exits, mourn it.
8080
8081 2015-04-21 Gary Benson <gbenson@redhat.com>
8082
8083 * hostio.c (fileio_open_flags_to_host): Factored out to
8084 fileio_to_host_openflags in common/fileio.c. Single use
8085 updated.
8086
8087 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8088
8089 * linux-xtensa-low.c (xtensa_fill_gregset)
8090 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8091 XCHAL_HAVE_LOOP.
8092
8093 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8094
8095 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8096 (regs_info): Replace usrregs pointer with NULL.
8097
8098 2015-04-17 Gary Benson <gbenson@redhat.com>
8099
8100 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8101 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8102 * server.c (handle_qxfer_exec_file): New function.
8103 (qxfer_packets): Add exec-file entry.
8104 (handle_query): Report qXfer:exec-file:read as supported packet.
8105
8106 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8107
8108 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8109
8110 2015-04-09 Gary Benson <gbenson@redhat.com>
8111
8112 * hostio-errno.c (errno_to_fileio_error): Remove function.
8113 Update caller to use remote_fileio_to_fio_error.
8114
8115 2015-04-09 Yao Qi <yao.qi@linaro.org>
8116
8117 * linux-low.c (linux_insert_point): Call
8118 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8119 (linux_remove_point): Call remove_memory_breakpoint if type is
8120 raw_bkpt_type_sw.
8121 * linux-x86-low.c (x86_insert_point): Don't call
8122 insert_memory_breakpoint.
8123 (x86_remove_point): Don't call remove_memory_breakpoint.
8124
8125 2015-04-01 Pedro Alves <palves@redhat.com>
8126 Cleber Rosa <crosa@redhat.com>
8127
8128 * server.c (gdbserver_usage): Reorganize and extend the usage
8129 message.
8130
8131 2015-03-24 Pedro Alves <palves@redhat.com>
8132
8133 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8134 output. Also dump TRAP_TRACE.
8135 (linux_low_filter_event): In debug output, distinguish a
8136 resume_stop SIGSTOP from a delayed SIGSTOP.
8137
8138 2015-03-24 Gary Benson <gbenson@redhat.com>
8139
8140 * linux-x86-low.c (x86_linux_new_thread): Moved to
8141 nat/x86-linux.c.
8142 (x86_linux_prepare_to_resume): Likewise.
8143
8144 2015-03-24 Gary Benson <gbenson@redhat.com>
8145
8146 * Makefile.in (x86-linux-dregs.o): New rule.
8147 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8148 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8149 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8150 (x86_linux_dr_get): Likewise.
8151 (x86_linux_dr_set): Likewise.
8152 (update_debug_registers_callback): Likewise.
8153 (x86_linux_dr_set_addr): Likewise.
8154 (x86_linux_dr_get_addr): Likewise.
8155 (x86_linux_dr_set_control): Likewise.
8156 (x86_linux_dr_get_control): Likewise.
8157 (x86_linux_dr_get_status): Likewise.
8158 (x86_linux_update_debug_registers): Likewise.
8159
8160 2015-03-24 Gary Benson <gbenson@redhat.com>
8161
8162 * linux-x86-low.c (x86_linux_update_debug_registers):
8163 New function, factored out from...
8164 (x86_linux_prepare_to_resume): ...this.
8165
8166 2015-03-24 Gary Benson <gbenson@redhat.com>
8167
8168 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8169 (x86_linux_dr_set): Likewise.
8170 (update_debug_registers_callback): Likewise.
8171 (x86_linux_dr_set_addr): Likewise.
8172 (x86_linux_dr_get_addr): Likewise.
8173 (x86_linux_dr_set_control): Likewise.
8174 (x86_linux_dr_get_control): Likewise.
8175 (x86_linux_dr_get_status): Likewise.
8176 (x86_linux_prepare_to_resume): Likewise.
8177
8178 2015-03-24 Gary Benson <gbenson@redhat.com>
8179
8180 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8181 Use perror_with_name. Pass string through gettext.
8182 (x86_linux_dr_set): Likewise.
8183
8184 2015-03-24 Gary Benson <gbenson@redhat.com>
8185
8186 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8187 (x86_linux_dr_set_addr): ...this.
8188 (x86_dr_low_get_addr): Rename to...
8189 (x86_linux_dr_get_addr): ...this.
8190 (x86_dr_low_set_control): Rename to...
8191 (x86_linux_dr_set_control): ...this.
8192 (x86_dr_low_get_control): Rename to...
8193 (x86_linux_dr_get_control): ...this.
8194 (x86_dr_low_get_status): Rename to...
8195 (x86_linux_dr_get_status): ...this.
8196 (x86_dr_low): Update with new function names.
8197
8198 2015-03-24 Gary Benson <gbenson@redhat.com>
8199
8200 * Makefile.in (x86-linux.o): New rule.
8201 * configure.srv: Add x86-linux.o to relevant targets.
8202 * linux-low.c (lwp_set_arch_private_info): New function.
8203 (lwp_arch_private_info): Likewise.
8204 * linux-x86-low.c: Include nat/x86-linux.h.
8205 (arch_lwp_info): Removed structure.
8206 (update_debug_registers_callback):
8207 Use lwp_set_debug_registers_changed.
8208 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8209 and lwp_set_debug_registers_changed.
8210 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8211
8212 2015-03-24 Gary Benson <gbenson@redhat.com>
8213
8214 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8215 * linux-arm-low.c (arm_new_thread): Likewise.
8216 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8217 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8218 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8219 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8220
8221 2015-03-24 Gary Benson <gbenson@redhat.com>
8222
8223 * linux-low.c (ptid_of_lwp): New function.
8224 (lwp_is_stopped): Likewise.
8225 (lwp_stop_reason): Likewise.
8226 * linux-x86-low.c (update_debug_registers_callback):
8227 Use lwp_is_stopped.
8228 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8229 lwp_stop_reason.
8230
8231 2015-03-24 Gary Benson <gbenson@redhat.com>
8232
8233 * linux-low.h (linux_stop_lwp): Remove declaration.
8234
8235 2015-03-24 Gary Benson <gbenson@redhat.com>
8236
8237 * linux-low.h: Include nat/linux-nat.h.
8238 * linux-low.c (iterate_over_lwps_args): New structure.
8239 (iterate_over_lwps_filter): New function.
8240 (iterate_over_lwps): Likewise.
8241 * linux-x86-low.c (update_debug_registers_callback):
8242 Update signature to what iterate_over_lwps expects.
8243 Remove PID check that iterate_over_lwps now performs.
8244 (x86_dr_low_set_addr): Use iterate_over_lwps.
8245 (x86_dr_low_set_control): Likewise.
8246
8247 2015-03-24 Gary Benson <gbenson@redhat.com>
8248
8249 * linux-x86-low.c (x86_debug_reg_state): New function.
8250 (x86_linux_prepare_to_resume): Use the above.
8251
8252 2015-03-24 Gary Benson <gbenson@redhat.com>
8253
8254 * linux-low.c (current_lwp_ptid): New function.
8255 * linux-x86-low.c: Include nat/linux-nat.h.
8256 (x86_dr_low_get_addr): Use current_lwp_ptid.
8257 (x86_dr_low_get_control): Likewise.
8258 (x86_dr_low_get_status): Likewise.
8259
8260 2015-03-20 Pedro Alves <palves@redhat.com>
8261
8262 * tracepoint.c (cmd_qtstatus): Make "str" const.
8263
8264 2015-03-20 Pedro Alves <palves@redhat.com>
8265
8266 * server.c (handle_general_set): Make "req_str" const.
8267
8268 2015-03-19 Pedro Alves <palves@redhat.com>
8269
8270 * linux-low.c (linux_resume_one_lwp): Rename to ...
8271 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8272 instead call perror_with_name.
8273 (check_ptrace_stopped_lwp_gone): New function.
8274 (linux_resume_one_lwp): Reimplement as wrapper around
8275 linux_resume_one_lwp_throw that swallows errors if the LWP is
8276 gone.
8277
8278 2015-03-19 Pedro Alves <palves@redhat.com>
8279
8280 * linux-low.c (count_events_callback, select_event_lwp_callback):
8281 No longer check whether the thread has resume_stop as last resume
8282 kind.
8283
8284 2015-03-19 Pedro Alves <palves@redhat.com>
8285
8286 * linux-low.c (count_events_callback, select_event_lwp_callback):
8287 Use the lwp's status_pending_p field, not the thread's.
8288
8289 2015-03-19 Pedro Alves <palves@redhat.com>
8290
8291 * linux-low.c (select_event_lwp_callback): Update comments to
8292 no longer mention SIGTRAP.
8293
8294 2015-03-18 Gary Benson <gbenson@redhat.com>
8295
8296 * server.c (handle_query): Do not report vFile:fstat as supported.
8297
8298 2015-03-11 Gary Benson <gbenson@redhat.com>
8299
8300 * hostio.c (sys/types.h): New include.
8301 (sys/stat.h): Likewise.
8302 (common-remote-fileio.h): Likewise.
8303 (handle_fstat): New function.
8304 (handle_vFile): Handle vFile:fstat packets.
8305
8306 2015-03-11 Gary Benson <gbenson@redhat.com>
8307
8308 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8309 struct stat.st_blocks and struct stat.st_blksize.
8310 * configure: Regenerate.
8311 * config.in: Likewise.
8312 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8313 (OBS): Add common-remote-fileio.o.
8314 (common-remote-fileio.o): New rule.
8315
8316 2015-03-09 Pedro Alves <palves@redhat.com>
8317
8318 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8319 'struct sockaddr' pointer in 'accept' call.
8320
8321 2015-03-09 Pedro Alves <palves@redhat.com>
8322
8323 Revert:
8324 2015-03-07 Pedro Alves <palves@redhat.com>
8325 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8326 or <winsock2.h> here. Instead include "gdb_socket.h".
8327 (remote_open): Use union gdb_sockaddr_u.
8328 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8329 or <winsock2.h> here. Instead include "gdb_socket.h".
8330 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8331 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8332 or <sys/un.h>.
8333 (init_named_socket, gdb_agent_helper_thread): Use union
8334 gdb_sockaddr_u.
8335
8336 2015-03-07 Pedro Alves <palves@redhat.com>
8337
8338 * configure.ac (build_warnings): Move
8339 -Wdeclaration-after-statement to the C-specific set.
8340 * configure: Regenerate.
8341
8342 2015-03-07 Pedro Alves <palves@redhat.com>
8343
8344 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8345 or <winsock2.h> here. Instead include "gdb_socket.h".
8346 (remote_open): Use union gdb_sockaddr_u.
8347 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8348 or <winsock2.h> here. Instead include "gdb_socket.h".
8349 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8350 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8351 or <sys/un.h>.
8352 (init_named_socket, gdb_agent_helper_thread): Use union
8353 gdb_sockaddr_u.
8354
8355 2015-03-07 Pedro Alves <palves@redhat.com>
8356
8357 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8358 instead.
8359
8360 2015-03-06 Yao Qi <yao.qi@linaro.org>
8361
8362 * linux-aarch64-low.c (aarch64_insert_point): Use
8363 show_debug_regs as a boolean.
8364 (aarch64_remove_point): Likewise.
8365
8366 2015-03-05 Pedro Alves <palves@redhat.com>
8367
8368 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8369 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8370 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8371 * nto-low.c (nto_target_ops): Likewise.
8372 * spu-low.c (spu_target_ops): Likewise.
8373 * win32-low.c (win32_target_ops): Likewise.
8374
8375 2015-03-04 Pedro Alves <palves@redhat.com>
8376
8377 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8378 Decide whether a breakpoint triggered based on the SIGTRAP's
8379 siginfo.si_code.
8380 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8381 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8382 (linux_low_filter_event): Check for breakpoints before checking
8383 watchpoints.
8384 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8385 siginfo.si_code.
8386 (linux_stopped_by_sw_breakpoint)
8387 (linux_supports_stopped_by_sw_breakpoint)
8388 (linux_stopped_by_hw_breakpoint)
8389 (linux_supports_stopped_by_hw_breakpoint): New functions.
8390 (linux_target_ops): Install new target methods.
8391
8392 2015-03-04 Pedro Alves <palves@redhat.com>
8393
8394 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8395 * server.c (swbreak_feature, hwbreak_feature): New globals.
8396 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8397 (captured_main): Clear swbreak_feature and hwbreak_feature.
8398 * server.h (swbreak_feature, hwbreak_feature): Declare.
8399 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8400 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8401 supports_stopped_by_hw_breakpoint>: New fields.
8402 (target_supports_stopped_by_sw_breakpoint)
8403 (target_stopped_by_sw_breakpoint)
8404 (target_supports_stopped_by_hw_breakpoint)
8405 (target_stopped_by_hw_breakpoint): Declare.
8406
8407 2015-03-04 Pedro Alves <palves@redhat.com>
8408
8409 enum lwp_stop_reason -> enum target_stop_reason
8410 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8411 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8412 (linux_wait_1, stuck_in_jump_pad_callback)
8413 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8414 (linux_stopped_by_watchpoint):
8415 * linux-low.h (enum lwp_stop_reason): Delete.
8416 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8417 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8418
8419 2015-03-04 Yao Qi <yao.qi@linaro.org>
8420
8421 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8422
8423 2015-03-03 Gary Benson <gbenson@redhat.com>
8424
8425 * hostio.c (handle_vFile): Fix prefix lengths.
8426
8427 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8428
8429 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8430 ptr_bits.
8431
8432 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8433
8434 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8435 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8436 (clean): Add "rm -f" for above C files.
8437 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8438 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8439 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8440 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8441 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8442 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8443 (init_registers_s390x_vx_linux64)
8444 (init_registers_s390x_tevx_linux64)
8445 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8446 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8447 declarations.
8448 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8449 (s390_store_vxrs_high): New functions.
8450 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8451 NT_S390_VXRS_HIGH.
8452 (s390_arch_setup): Add logic for selecting one of the new target
8453 descriptions. Activate the new vector regsets if applicable.
8454 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8455 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8456 and init_registers_s390x_tevx_linux64.
8457
8458 2015-03-01 Pedro Alves <palves@redhat.com>
8459
8460 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8461 parameter.
8462
8463 2015-02-27 Pedro Alves <palves@redhat.com>
8464
8465 * linux-x86-low.c (u_debugreg_offset): New function.
8466 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8467
8468 2015-02-27 Pedro Alves <palves@redhat.com>
8469
8470 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8471 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8472 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8473 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8474 (ps_lsetfpregs, ps_getpid)
8475 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8476 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8477 (ps_lsetxregs, ps_plog): Declare.
8478
8479 2015-02-27 Pedro Alves <palves@redhat.com>
8480
8481 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8482 IP_AGENT_EXPORT_FUNC.
8483 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8484 IP_AGENT_EXPORT_FUNC.
8485 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8486 (IP_AGENT_EXPORT): Delete.
8487 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8488 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8489 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8490 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8491 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8492 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8493 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8494 (traceframe_read_count, traceframe_write_count)
8495 (traceframes_created, trace_state_variables, get_raw_reg)
8496 (get_trace_state_variable_value, set_trace_state_variable_value)
8497 (ust_loaded, helper_thread_id, cmd_buf): Use
8498 IPA_SYM_EXPORTED_NAME.
8499 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8500 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8501 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8502 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8503 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8504 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8505 EXTERN_C_PUSH/EXTERN_C_POP.
8506 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8507 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8508 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8509 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8510 (traceframe_write_count, traceframe_read_count)
8511 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8512 (about_to_request_buffer_space, get_trace_state_variable_value)
8513 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8514 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8515 EXTERN_C_PUSH/EXTERN_C_POP.
8516 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8517 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8518 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8519 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8520 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8521 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8522 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8523 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8524 Define.
8525 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8526 (IP_AGENT_EXPORT_VAR_DECL): Define.
8527 (tracing): Declare.
8528 (gdb_agent_get_raw_reg): Declare.
8529
8530 2015-02-27 Tom Tromey <tromey@redhat.com>
8531 Pedro Alves <palves@redhat.com>
8532
8533 Rename symbols whose names are reserved C++ keywords throughout.
8534
8535 2015-02-27 Pedro Alves <palves@redhat.com>
8536
8537 * Makefile.in (COMPILER): New, get it from autoconf.
8538 (CXX): Get from autoconf instead.
8539 (COMPILE.pre): Use COMPILER.
8540 (CC-LD): Rename to ...
8541 (CC_LD): ... this. Use COMPILER.
8542 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8543 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8544 * acinclude.m4: Include build-with-cxx.m4.
8545 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8546 Disable -Werror by default if building in C++ mode.
8547 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8548 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8549 the C++ compiler. Save/restore CXXFLAGS too.
8550 * configure: Regenerate.
8551
8552 2015-02-27 Pedro Alves <palves@redhat.com>
8553
8554 * acinclude.m4: Include libiberty.m4.
8555 * configure.ac: Call libiberty_INIT.
8556 * config.in, configure: Regenerate.
8557
8558 2015-02-26 Pedro Alves <palves@redhat.com>
8559
8560 * linux-low.c (linux_wait_1): When incrementing the PC past a
8561 program breakpoint always use the_low_target.breakpoint_len as
8562 increment, rather than the maximum between that and
8563 the_low_target.decr_pc_after_break.
8564
8565 2015-02-23 Pedro Alves <palves@redhat.com>
8566
8567 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8568 thread was doing a step-over; always adjust the PC if
8569 we stepped over a permanent breakpoint.
8570 (linux_wait_1): If we stepped over breakpoint that was on top of a
8571 permanent breakpoint, manually advance the PC past it.
8572
8573 2015-02-23 Pedro Alves <palves@redhat.com>
8574
8575 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8576 modes.
8577 (x86_fill_gregset, x86_store_gregset): Use it when handling
8578 $orig_eax.
8579
8580 2015-02-20 Pedro Alves <palves@redhat.com>
8581
8582 * thread-db.c: Include "nat/linux-procfs.h".
8583 (thread_db_init): Skip listing new threads if the kernel supports
8584 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8585
8586 2015-02-20 Pedro Alves <palves@redhat.com>
8587
8588 * linux-low.c (status_pending_p_callback): Use ptid_match.
8589
8590 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8591
8592 PR breakpoints/16812
8593 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8594 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8595 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8596
8597 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8598
8599 PR breakpoints/15956
8600 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8601
8602 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8603
8604 * linux-low.c (linux_low_btrace_conf): Print size.
8605 * server.c (handle_btrace_conf_general_set): New.
8606 (hanle_general_set): Call handle_btrace_conf_general_set.
8607 (handle_query): Report Qbtrace-conf:bts:size as supported.
8608
8609 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8610
8611 * linux-low.c (linux_low_enable_btrace): Update parameters.
8612 (linux_low_btrace_conf): New.
8613 (linux_target_ops)<to_btrace_conf>: Initialize.
8614 * server.c (current_btrace_conf): New.
8615 (handle_btrace_enable): Rename to ...
8616 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8617 to target_enable_btrace. Update comment. Update users.
8618 (handle_qxfer_btrace_conf): New.
8619 (qxfer_packets): Add btrace-conf entry.
8620 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8621 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8622 (target_ops)<read_btrace_conf>: New.
8623 (target_enable_btrace): Update parameters.
8624 (target_read_btrace_conf): New.
8625
8626 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8627
8628 * server.c (handle_btrace_general_set): Remove call to
8629 target_supports_btrace.
8630 (supported_btrace_packets): New.
8631 (handle_query): Call supported_btrace_packets.
8632 * target.h: include btrace-common.h.
8633 (btrace_target_info): Removed.
8634 (supports_btrace, target_supports_btrace): Update parameters.
8635
8636 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8637
8638 * Makefile.in (SFILES): Add common/btrace-common.c.
8639 (OBS): Add common/btrace-common.o.
8640 (btrace-common.o): Add build rules.
8641 * linux-low: Include btrace-common.h.
8642 (linux_low_read_btrace): Use struct btrace_data. Call
8643 btrace_data_init and btrace_data_fini.
8644
8645 2015-02-06 Pedro Alves <palves@redhat.com>
8646
8647 * thread-db.c (find_new_threads_callback): Add debug output.
8648
8649 2015-02-04 Pedro Alves <palves@redhat.com>
8650
8651 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8652 (resume_stopped_resumed_lwps): New function.
8653 (linux_wait_for_event_filtered): Use it.
8654
8655 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8656
8657 * Makefile.in (SFILES): Add linux-personality.c.
8658 (linux-personality.o): New rule.
8659 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8660 list of objects to be built.
8661 * linux-low.c: Include nat/linux-personality.h.
8662 (linux_create_inferior): Remove code to disable address space
8663 randomization (moved to ../nat/linux-personality.c). Create
8664 cleanup to disable address space randomization.
8665
8666 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8667
8668 * Makefile.in (posix-strerror.o): New rule.
8669 (mingw-strerror.o): Likewise.
8670 * configure: Regenerated.
8671 * configure.ac: Source file ../common/common.host. Initialize new
8672 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8673
8674 2015-01-14 Yao Qi <yao@codesourcery.com>
8675
8676 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8677 (ppc-linux.o): New rule.
8678 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8679 * configure.ac: AC_CHECK_FUNCS(getauxval).
8680 * config.in: Re-generated.
8681 * configure: Re-generated.
8682 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8683 ppc64_64bit_inferior_p
8684
8685 2015-01-14 Yao Qi <yao@codesourcery.com>
8686
8687 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8688 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8689 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8690 (PT_ORIG_R3, PT_TRAP): Likewise.
8691 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8692 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8693 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8694
8695 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8696
8697 * i387-fp.c (i387_cache_to_xsave): In look over
8698 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8699 zmmh_low_space field by use of zmmh_high_space.
8700
8701 2015-01-09 Pedro Alves <palves@redhat.com>
8702
8703 * linux-low.c (step_over_bkpt): Move higher up in the file.
8704 (handle_extended_wait): Don't store the stop_pc here.
8705 (get_stop_pc): Adjust comments and rename to ...
8706 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8707 stopped for a software breakpoint or hardware breakpoint.
8708 (thread_still_has_status_pending_p): New function.
8709 (status_pending_p_callback): Use
8710 thread_still_has_status_pending_p. If the event is no longer
8711 interesting, resume the LWP.
8712 (handle_tracepoints): Add assert.
8713 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8714 (wstatus_maybe_breakpoint): New function.
8715 (cancel_breakpoint): Delete function.
8716 (check_stopped_by_watchpoint): New function, factored out from
8717 linux_low_filter_event.
8718 (lp_status_maybe_breakpoint): Delete function.
8719 (linux_low_filter_event): Remove filter_ptid argument.
8720 Leave thread group exits pending here. Store the LWP's stop PC.
8721 Always leave events pending.
8722 (linux_wait_for_event_filtered): Pull all events out of the
8723 kernel, and leave them all pending.
8724 (count_events_callback, select_event_lwp_callback): Consider all
8725 events.
8726 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8727 (select_event_lwp): Only give preference to the stepping LWP in
8728 all-stop mode. Adjust comments.
8729 (ignore_event): New function.
8730 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8731 references to cancel_breakpoints. Adjust to renames. Also give
8732 equal priority to all LWPs that have had events in non-stop mode.
8733 If reporting a software breakpoint event, unadjust the LWP's PC.
8734 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8735 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8736 Adjust.
8737 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8738 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8739 (linux_stopped_by_watchpoint): Adjust.
8740 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8741 * linux-low.h (enum lwp_stop_reason): New.
8742 (struct lwp_info) <stop_pc>: Adjust comment.
8743 <stopped_by_watchpoint>: Delete field.
8744 <stop_reason>: New field.
8745 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8746 * mem-break.c (software_breakpoint_inserted_here)
8747 (hardware_breakpoint_inserted_here): New function.
8748 * mem-break.h (software_breakpoint_inserted_here)
8749 (hardware_breakpoint_inserted_here): Declare.
8750 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8751 (cancel_breakpoints): Delete.
8752 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8753 (upload_fast_traceframes): Remove references to
8754 cancel_breakpoints.
8755
8756 2015-01-09 Pedro Alves <palves@redhat.com>
8757
8758 * thread-db.c (find_new_threads_callback): Ignore thread if the
8759 kernel thread ID is -1.
8760
8761 2015-01-09 Pedro Alves <palves@redhat.com>
8762
8763 * linux-low.c (linux_attach_fail_reason_string): Move to
8764 nat/linux-ptrace.c, and rename.
8765 (linux_attach_lwp): Update comment.
8766 (attach_proc_task_lwp_callback): New function.
8767 (linux_attach): Adjust to rename and use
8768 linux_proc_attach_tgid_threads.
8769 (linux_attach_fail_reason_string): Delete declaration.
8770
8771 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8772
8773 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8774 * server.c (gdbserver_version): Likewise.
8775
8776 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8777
8778 * remote-utils.c: Include ctype.h.
8779 (input_interrupt): Explicitly handle the case when the char
8780 received is the NUL byte. Improve the printing of non-ASCII
8781 characters.
8782
8783 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8784
8785 * linux-low.c (linux_low_filter_event): Update call to
8786 linux_enable_event_reporting following the addition of
8787 a new parameter to that function.
8788
8789 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8790
8791 PR server/17457
8792 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8793 (AARCH64_FPCR_REGNO): Likewise.
8794 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8795 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8796 (aarch64_store_fpregset): Likewise.
8797
8798 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8799
8800 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8801 Remove FIXME comment about assumption about N.
8802
8803 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8804
8805 * configure.ac: If large-file support is disabled in GDBserver,
8806 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8807 * configure: Regenerate.
8808
8809 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8810
8811 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8812 warning upon ENODATA from ptrace.
8813 * linux-s390-low.c (s390_store_tdb): New.
8814 (s390_regsets): Add regset for NT_S390_TDB.
8815
8816 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8817
8818 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8819 without a fill_function.
8820 * linux-s390-low.c (s390_fill_last_break): Remove.
8821 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8822 (s390_arch_setup): Use regset's size instead of fill_function for
8823 loop end condition.
8824
8825 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8826
8827 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8828 the regset's store function when ptrace returned an error.
8829 * regcache.c (get_thread_regcache): Invalidate register cache
8830 before fetching inferior's registers.
8831
8832 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8833
8834 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8835 while-loop as for-loop.
8836 (regsets_store_inferior_registers): Likewise.
8837
8838 2014-11-28 Yao Qi <yao@codesourcery.com>
8839
8840 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8841 * config.in, configure: Re-generate.
8842 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8843 is defined.
8844
8845 2014-11-21 Yao Qi <yao@codesourcery.com>
8846
8847 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8848 (AC_CHECK_HEADERS): Remove malloc.h.
8849 * configure: Re-generated.
8850 * config.in: Re-generated.
8851 * server.h: Don't include alloca.h and malloc.h.
8852 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8853 Don't include malloc.h.
8854
8855 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8856
8857 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8858 corresponding ERRNO check in same block.
8859
8860 2014-11-12 Pedro Alves <palves@redhat.com>
8861
8862 * server.c (cont_thread): Update comment.
8863 (start_inferior, attach_inferior): No longer clear cont_thread.
8864 (handle_v_cont): No longer set cont_thread.
8865 (captured_main): Clear cont_thread each time a GDB connects.
8866
8867 2014-11-12 Pedro Alves <palves@redhat.com>
8868
8869 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8870 thread, and don't resume all threads if the Hc thread has exited.
8871
8872 2014-11-12 Pedro Alves <palves@redhat.com>
8873
8874 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8875 the process group instead of to a specific LWP.
8876
8877 2014-10-15 Pedro Alves <palves@redhat.com>
8878
8879 PR server/17487
8880 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8881 parameter.
8882 (arm_set_thread_context): Delete.
8883 (the_low_target): Adjust.
8884 * win32-i386-low.c (debug_registers_changed)
8885 (debug_registers_used): Delete.
8886 (update_debug_registers_callback): New function.
8887 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8888 needing to update their debug registers.
8889 (win32_get_current_dr): New function.
8890 (x86_dr_low_get_addr, x86_dr_low_get_control)
8891 (x86_dr_low_get_status): Fetch the debug register from the thread
8892 record's context.
8893 (i386_initial_stuff): Adjust.
8894 (i386_get_thread_context): Remove current_event parameter. Don't
8895 clear debug_registers_changed nor copy DR values to
8896 debug_reg_state.
8897 (i386_set_thread_context): Delete.
8898 (i386_prepare_to_resume): New function.
8899 (i386_thread_added): Mark the thread as needing to update irs
8900 debug registers.
8901 (the_low_target): Remove i386_set_thread_context and install
8902 i386_prepare_to_resume.
8903 * win32-low.c (win32_get_thread_context): Adjust.
8904 (win32_set_thread_context): Use SetThreadContext
8905 directly.
8906 (win32_prepare_to_resume): New function.
8907 (win32_require_context): New function, factored out from ...
8908 (thread_rec): ... this.
8909 (continue_one_thread): Call win32_prepare_to_resume on each thread
8910 we're about to continue.
8911 (win32_resume): Call win32_prepare_to_resume on the event thread.
8912 * win32-low.h (struct win32_thread_info)
8913 <debug_registers_changed>: New field.
8914 (struct win32_target_ops): Change prototype of set_thread_context,
8915 delete set_thread_context and add prepare_to_resume.
8916 (win32_require_context): New declaration.
8917
8918 2014-10-08 Gary Benson <gbenson@redhat.com>
8919
8920 * server.h: Do not include common-exceptions.h.
8921
8922 2014-10-08 Gary Benson <gbenson@redhat.com>
8923
8924 * server.h: Do not include cleanups.h.
8925
8926 2014-09-30 James Hogan <james.hogan@imgtec.com>
8927
8928 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8929 mips64-dsp-linux.c.
8930
8931 2014-09-23 Yao Qi <yao@codesourcery.com>
8932
8933 * linux-low.c (lp_status_maybe_breakpoint): New function.
8934 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8935 (count_events_callback): Likewise.
8936 (select_event_lwp_callback): Likewise.
8937 (cancel_breakpoints_callback): Likewise.
8938
8939 2014-09-19 Don Breazeal <donb@codesourcery.com>
8940
8941 * linux-low.c (handle_extended_wait): Call
8942 linux_ptrace_get_extended_event.
8943 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8944 linux_is_extended_waitstatus.
8945
8946 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8947
8948 * Makefile.in (CPPFLAGS): Define.
8949 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8950 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8951
8952 2014-09-16 Gary Benson <gbenson@redhat.com>
8953
8954 * inferiors.h (current_inferior): Renamed as...
8955 (current_thread): New variable. All uses updated.
8956 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8957 (maybe_move_out_of_jump_pad): Likewise.
8958 (cancel_breakpoint): Likewise.
8959 (linux_low_filter_event): Likewise.
8960 (wait_for_sigstop): Likewise.
8961 (linux_resume_one_lwp): Likewise.
8962 (need_step_over_p): Likewise.
8963 (start_step_over): Likewise.
8964 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8965 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8966 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8967 and save_inferior as saved_thread.
8968 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8969 saved_thread.
8970 (regcache_invalidate_thread): Likewise.
8971 * remote-utils.c (prepare_resume_reply): Likewise.
8972 * thread-db.c (thread_db_get_tls_address): Likewise.
8973 (disable_thread_event_reporting): Likewise.
8974 (remove_thread_event_breakpoints): Likewise.
8975 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8976 as saved_thread.
8977 * target.h (set_desired_inferior): Renamed as...
8978 (set_desired_thread): New declaration. All uses updated.
8979 * server.c (myresume): Updated comment to reference thread instead
8980 of inferior.
8981 (handle_serial_event): Likewise.
8982 (handle_target_event): Likewise.
8983
8984 2014-09-12 Tom Tromey <tromey@redhat.com>
8985 Gary Benson <gbenson@redhat.com>
8986
8987 * regcache.h: Include common-regcache.h.
8988 (regcache_read_pc): Don't declare.
8989 * regcache.c (get_thread_regcache_for_ptid): New function.
8990
8991 2014-09-11 Tom Tromey <tromey@redhat.com>
8992 Gary Benson <gbenson@redhat.com>
8993
8994 * symbol.c: New file.
8995 * Makefile.in (SFILES): Add symbol.c.
8996 (OBS): Add symbol.o.
8997
8998 2014-09-11 Gary Benson <gbenson@redhat.com>
8999
9000 * target.c (target_stop_ptid, target_continue_ptid): New
9001 functions.
9002
9003 2014-09-11 Tom Tromey <tromey@redhat.com>
9004 Gary Benson <gbenson@redhat.com>
9005
9006 * target.h: Include target/target.h.
9007 * target.c (target_read_memory, target_read_uint32)
9008 (target_write_memory): New functions.
9009
9010 2014-09-11 Gary Benson <gbenson@redhat.com>
9011
9012 * server.h (debug_hw_points): Don't declare.
9013 * server.c (debug_hw_points): Don't define. Replace all uses
9014 with show_debug_regs.
9015 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9016 all uses with show_debug_regs.
9017
9018 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9019
9020 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9021 endianness into account.
9022 (ppc_supply_ptrace_register): Likewise.
9023
9024 2014-09-03 James Hogan <james.hogan@imgtec.com>
9025
9026 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9027 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9028
9029 2014-09-03 Gary Benson <gbenson@redhat.com>
9030
9031 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9032 ALL_DEBUG_ADDRESS_REGISTERS.
9033
9034 2014-09-02 Gary Benson <gbenson@redhat.com>
9035
9036 * i386-low.h: Renamed as...
9037 * x86-low.h: New file. All type, function and variable name
9038 prefixes changed from "i386_" to "x86_". All references updated.
9039 * i386-low.c: Renamed as...
9040 * x86-low.c: New file. All type, function and variable name
9041 prefixes changed from "i386_" to "x86_". All references updated.
9042
9043 2014-09-02 Gary Benson <gbenson@redhat.com>
9044
9045 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9046 (x86_linux_new_thread): Likewise.
9047
9048 2014-08-29 Gary Benson <gbenson@redhat.com>
9049
9050 * server.h (setjmp.h): Do not include.
9051 (toplevel): Do not declare.
9052 (common-exceptions.h): Include.
9053 (cleanups.h): Likewise.
9054 * server.c (toplevel): Do not define.
9055 (exit_code): New static global.
9056 (detach_or_kill_for_exit_cleanup): New function.
9057 (main): New function. Original main renamed to...
9058 (captured_main): New function.
9059 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9060
9061 2014-08-29 Gary Benson <gbenson@redhat.com>
9062
9063 * Makefile.in (SFILES): Add common/common-exceptions.c.
9064 (OBS): Add common-exceptions.o.
9065 (common-exceptions.o): New rule.
9066 * utils.c (prepare_to_throw_exception): New function.
9067
9068 2014-08-29 Gary Benson <gbenson@redhat.com>
9069
9070 * config.in: Regenerate.
9071 * configure: Likewise.
9072
9073 2014-08-29 Gary Benson <gbenson@redhat.com>
9074
9075 * Makefile.in (SFILES): Add common/cleanups.c.
9076 (OBS): cleanups.o.
9077 (cleanups.o): New rule.
9078
9079 2014-08-29 Gary Benson <gbenson@redhat.com>
9080
9081 * utils.c (internal_vwarning): New function.
9082
9083 2014-08-28 Gary Benson <gbenson@redhat.com>
9084
9085 * utils.h (fatal): Remove declaration.
9086 * utils.c (fatal): Remove function.
9087
9088 2014-08-28 Gary Benson <gbenson@redhat.com>
9089
9090 * tracepoint.c (gdb_agent_init): Replace fatal with
9091 perror_with_name.
9092 (initialize_tracepoint): Likewise.
9093
9094 2014-08-28 Gary Benson <gbenson@redhat.com>
9095
9096 * remote-utils.c (remote_prepare): Replace fatal with error.
9097
9098 2014-08-28 Gary Benson <gbenson@redhat.com>
9099
9100 * linux-low.c (linux_async): Replace fatal with warning.
9101 Tidy up and return.
9102 (linux_start_non_stop): Return -1 if linux_async failed.
9103
9104 2014-08-28 Gary Benson <gbenson@redhat.com>
9105
9106 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9107 gdb_assert.
9108 (i386_dr_low_get_addr): Remove vague comment.
9109 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9110 gdb_assert.
9111
9112 2014-08-28 Gary Benson <gbenson@redhat.com>
9113
9114 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9115 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9116 internal_error.
9117 (linux_resume_one_lwp): Likewise.
9118 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9119 gdb_assert.
9120 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9121 with internal_error.
9122 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9123 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9124 (find_register_by_name): Replace fatal with internal_error.
9125 (find_regno): Likewise.
9126 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9127 * thread-db.c (thread_db_create_event): Likewise.
9128 (thread_db_load_search): Likewise.
9129 (try_thread_db_load_1): Likewise.
9130 * tracepoint.c (get_jump_space_head): Replace fatal with
9131 internal_error.
9132 (claim_trampoline_space): Likewise.
9133 (have_fast_tracepoint_trampoline_buffer): Likewise.
9134 (cmd_qtstart): Likewise.
9135 (stop_tracing): Likewise.
9136 (fast_tracepoint_collecting): Likewise.
9137 (target_malloc): Likewise.
9138 (download_tracepoint): Likewise.
9139 (download_trace_state_variables): Replace check with gdb_assert.
9140 (upload_fast_traceframes): Replace fatal with internal_error.
9141
9142 2014-08-19 Tom Tromey <tromey@redhat.com>
9143 Gary Benson <gbenson@redhat.com>
9144
9145 * Makefile.in (SFILES): Add common/common-debug.c.
9146 (OBS): Add common-debug.o.
9147 (common-debug.o): New rule.
9148 * debug.h (debug_printf): Don't declare.
9149 * debug.c (debug_printf): Renamed and rewritten as...
9150 (debug_vprintf): New function.
9151
9152 2014-08-19 Gary Benson <gbenson@redhat.com>
9153
9154 * utils.h: Do not include print-utils.h.
9155
9156 2014-08-19 Tom Tromey <tromey@redhat.com>
9157 Gary Benson <gbenson@redhat.com>
9158
9159 * server.h: Add static assertion.
9160 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9161
9162 2014-08-19 Tom Tromey <tromey@redhat.com>
9163 Gary Benson <gbenson@redhat.com>
9164
9165 * Makefile.in (SFILES): Add common/errors.c.
9166 (OBS): Add errors.o.
9167 (IPA_OBS): Add errors-ipa.o.
9168 (errors.o): New rule.
9169 (errors-ipa.o): Likewise.
9170 * utils.h (perror_with_name, error, warning): Don't declare.
9171 * utils.c (warning): Renamed and rewritten as...
9172 (vwarning): New function.
9173 (error): Renamed and rewritten as...
9174 (verror): New function.
9175 (internal_error): Renamed and rewritten as...
9176 (internal_verror): New function.
9177
9178 2014-08-07 Gary Benson <gbenson@redhat.com>
9179
9180 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9181 * configure: Regenerate.
9182 * config.in: Likewise.
9183 * server.h: Do not include errno.h.
9184 * event-loop.c: Likewise.
9185 * hostio-errno.c: Likewise.
9186 * linux-low.c: Likewise.
9187 * remote-utils.c: Likewise.
9188 * spu-low.c: Likewise.
9189 * utils.c: Likewise.
9190 * gdbreplay.c: Unconditionally include errno.h.
9191
9192 2014-08-07 Gary Benson <gbenson@redhat.com>
9193
9194 * server.h: Do not include string.h.
9195 * event-loop.c: Likewise.
9196 * linux-low.c: Likewise.
9197 * regcache.c: Likewise.
9198 * remote-utils.c: Likewise.
9199 * spu-low.c: Likewise.
9200 * utils.c: Likewise.
9201
9202 2014-08-07 Gary Benson <gbenson@redhat.com>
9203
9204 * server.h: Do not include gdb_assert.h.
9205
9206 2014-08-07 Gary Benson <gbenson@redhat.com>
9207
9208 * server.h: Do not include common-utils.h.
9209
9210 2014-08-07 Gary Benson <gbenson@redhat.com>
9211
9212 * server.h: Do not include ptid.h.
9213 * notif.h: Likewise.
9214
9215 2014-08-07 Gary Benson <gbenson@redhat.com>
9216
9217 * server.h: Do not include gdb_locale.h.
9218
9219 2014-08-07 Gary Benson <gbenson@redhat.com>
9220
9221 * server.h: Do not include gdb/signals.h.
9222 * win32-low.c: Likewise.
9223
9224 2014-08-07 Gary Benson <gbenson@redhat.com>
9225
9226 * server.h: Do not include pathmax.h.
9227
9228 2014-08-07 Gary Benson <gbenson@redhat.com>
9229
9230 * server.h: Do not include libiberty.h.
9231 * linux-bfin-low.c: Likewise.
9232
9233 2014-08-07 Gary Benson <gbenson@redhat.com>
9234
9235 * server.h: Do not include ansidecl.h.
9236
9237 2014-08-07 Gary Benson <gbenson@redhat.com>
9238
9239 * linux-x86-low.c: Do not include stddef.h.
9240 * lynx-ppc-low.c: Likewise.
9241 * tracepoint.c: Likewise.
9242
9243 2014-08-07 Gary Benson <gbenson@redhat.com>
9244
9245 * server.h: Do not include stdarg.h.
9246 * nto-low.c: Likewise.
9247
9248 2014-08-07 Gary Benson <gbenson@redhat.com>
9249
9250 * server.h: Do not include stdlib.h.
9251 * inferiors.c: Likewise.
9252 * linux-low.c: Likewise.
9253 * regcache.c: Likewise.
9254 * spu-low.c: Likewise.
9255 * tracepoint.c: Likewise.
9256 * utils.c: Likewise.
9257
9258 2014-08-07 Gary Benson <gbenson@redhat.com>
9259
9260 * server.h: Do not include stdio.h.
9261 * linux-low.c: Likewise.
9262 * remote-utils.c: Likewise.
9263 * spu-low.c: Likewise.
9264 * utils.c: Likewise.
9265 * wincecompat.c: Likewise.
9266
9267 2014-08-06 Gary Benson <gbenson@redhat.com>
9268
9269 * regcache.c (init_register_cache): Move conditionals inside if.
9270
9271 2014-08-06 Gary Benson <gbenson@redhat.com>
9272
9273 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9274
9275 2014-07-31 Gary Benson <gbenson@redhat.com>
9276
9277 * ax.h: Do not include server.h.
9278 * gdbthread.h: Likewise.
9279 * lynx-low.h: Likewise.
9280 * notif.h: Likewise.
9281
9282 2014-07-30 Gary Benson <gbenson@redhat.com>
9283
9284 * server.h: Include common-defs.h.
9285 Do not include config.h or build-gnulib-gdbserver/config.h.
9286
9287 2014-07-30 Gary Benson <gbenson@redhat.com>
9288
9289 * hostio-errno.c: Move server.h to top of includes list.
9290 * inferiors.c: Likewise.
9291 * linux-x86-low.c: Likewise.
9292 * notif.c: Include server.h.
9293
9294 2014-07-24 Tom Tromey <tromey@redhat.com>
9295 Gary Benson <gbenson@redhat.com>
9296
9297 * server.h (CORE_ADDR): Now unsigned.
9298
9299 2014-07-16 Pedro Alves <palves@redhat.com>
9300
9301 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9302
9303 2014-07-15 Pedro Alves <palves@redhat.com>
9304
9305 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9306 copy.
9307
9308 2014-07-11 Pedro Alves <palves@redhat.com>
9309
9310 * linux-low.c (kill_wait_lwp): New function, based on
9311 kill_one_lwp_callback, but use my_waitpid directly.
9312 (kill_one_lwp_callback, linux_kill): Use it.
9313
9314 2014-06-23 Pedro Alves <palves@redhat.com>
9315
9316 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9317 before setting DR0..DR3.
9318
9319 2014-06-20 Gary Benson <gbenson@redhat.com>
9320
9321 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9322 * configure: Regenerated.
9323 * config.in: Likewise.
9324
9325 2014-06-20 Gary Benson <gbenson@redhat.com>
9326
9327 * Makefile.in (SFILES): Update locations for files moved
9328 from common to nat.
9329 (object file files): Reordered.
9330
9331 2014-06-20 Gary Benson <gbenson@redhat.com>
9332
9333 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9334 (i386_dr_low_set_addr): Likewise.
9335 (i386_dr_low_get_addr): Likewise.
9336 (i386_dr_low_can_set_control): Likewise.
9337 (i386_dr_low_set_control): Likewise.
9338 (i386_dr_low_get_control): Likewise.
9339 (i386_dr_low_get_status): Likewise.
9340 (i386_get_debug_register_length): Likewise.
9341 * linux-x86-low.c (i386_dr_low_set_addr):
9342 Changed signature. Made static.
9343 (i386_dr_low_get_addr): Likewise.
9344 (i386_dr_low_set_control): Likewise.
9345 (i386_dr_low_get_control): Likewise.
9346 (i386_dr_low_get_status): Likewise.
9347 (i386_dr_low): New global variable.
9348 * win32-i386-low.c (i386_dr_low_set_addr):
9349 Changed signature. Made static.
9350 (i386_dr_low_get_addr): Likewise.
9351 (i386_dr_low_set_control): Likewise.
9352 (i386_dr_low_get_control): Likewise.
9353 (i386_dr_low_get_status): Likewise.
9354 (i386_dr_low): New global variable.
9355
9356 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9357
9358 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9359 * Makefile.in (AR, AR_FLAGS): Define.
9360 * configure: Regenerate.
9361
9362 2014-06-19 Gary Benson <gbenson@redhat.com>
9363
9364 * Makefile.in (i386-dregs.o): New rule.
9365 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9366 * i386-low.c (target.h): Remove include.
9367 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9368 (DR_CONTROL_SHIFT): Likewise.
9369 (DR_CONTROL_SIZE): Likewise.
9370 (DR_RW_EXECUTE): Likewise.
9371 (DR_RW_WRITE): Likewise.
9372 (DR_RW_READ): Likewise.
9373 (DR_RW_IORW): Likewise.
9374 (DR_LEN_1): Likewise.
9375 (DR_LEN_2): Likewise.
9376 (DR_LEN_4): Likewise.
9377 (DR_LEN_8): Likewise.
9378 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9379 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9380 (DR_ENABLE_SIZE): Likewise.
9381 (DR_LOCAL_SLOWDOWN): Likewise.
9382 (DR_GLOBAL_SLOWDOWN): Likewise.
9383 (DR_CONTROL_RESERVED): Likewise.
9384 (I386_DR_CONTROL_MASK): Likewise.
9385 (I386_DR_VACANT): Likewise.
9386 (I386_DR_LOCAL_ENABLE): Likewise.
9387 (I386_DR_GLOBAL_ENABLE): Likewise.
9388 (I386_DR_DISABLE): Likewise.
9389 (I386_DR_SET_RW_LEN): Likewise.
9390 (I386_DR_GET_RW_LEN): Likewise.
9391 (I386_DR_WATCH_HIT): Likewise.
9392 (i386_wp_op_t): Likewise.
9393 (i386_show_dr): Likewise.
9394 (i386_length_and_rw_bits): Likewise.
9395 (i386_insert_aligned_watchpoint): Likewise.
9396 (i386_remove_aligned_watchpoint): Likewise.
9397 (i386_handle_nonaligned_watchpoint): Likewise.
9398 i386_update_inferior_debug_regs(): Likewise.
9399 (i386_dr_insert_watchpoint): Likewise.
9400 (i386_dr_remove_watchpoint): Likewise.
9401 (i386_dr_region_ok_for_watchpoint): Likewise.
9402 (i386_dr_stopped_data_address): Likewise.
9403 (i386_dr_stopped_by_watchpoint): Likewise.
9404
9405 2014-06-19 Gary Benson <gbenson@redhat.com>
9406
9407 * i386-low.c (i386_dr_show): Renamed to
9408 i386_show_dr and made static. All uses updated.
9409 (i386_dr_length_and_rw_bits): Renamed to
9410 i386_length_and_rw_bits and made static.
9411 All uses updated.
9412 (i386_dr_insert_aligned_watchpoint): Renamed to
9413 i386_insert_aligned_watchpoint and made static.
9414 All uses updated.
9415 (i386_dr_remove_aligned_watchpoint): Renamed to
9416 i386_remove_aligned_watchpoint and made static.
9417 All uses updated.
9418 (i386_dr_update_inferior_debug_regs): Renamed to
9419 i386_update_inferior_debug_regs and made static.
9420 All uses updated.
9421
9422 2014-06-18 Gary Benson <gbenson@redhat.com>
9423
9424 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9425 (i386_dr_low_can_set_control): Likewise.
9426 (i386_get_debug_register_length): Likewise.
9427 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9428 (i386_dr_low_can_set_control): Likewise.
9429 (i386_get_debug_register_length): Likewise.
9430
9431 2014-06-17 Gary Benson <gbenson@redhat.com>
9432
9433 * i386-low.h (i386-dregs.h): New include.
9434 (DR_FIRSTADDR): Now in i386-dregs.h.
9435 (DR_LASTADDR): Likewise.
9436 (DR_NADDR): Likewise.
9437 (DR_STATUS): Likewise.
9438 (DR_CONTROL): Likewise.
9439 (i386_debug_reg_state): Likewise.
9440 (i386_dr_insert_watchpoint): Likewise.
9441 (i386_dr_remove_watchpoint): Likewise.
9442 (i386_dr_region_ok_for_watchpoint): Likewise.
9443 (i386_dr_stopped_data_address): Likewise.
9444 (i386_dr_stopped_by_watchpoint): Likewise.
9445 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9446
9447 2014-06-18 Gary Benson <gbenson@redhat.com>
9448
9449 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9450 i386_dr_insert_watchpoint.
9451 (i386_low_remove_watchpoint): Renamed to
9452 i386_dr_remove_watchpoint.
9453 (i386_low_region_ok_for_watchpoint): Renamed to
9454 i386_dr_region_ok_for_watchpoint.
9455 (i386_low_stopped_data_address): Renamed to
9456 i386_dr_stopped_data_address.
9457 (i386_low_stopped_by_watchpoint): Renamed to
9458 i386_dr_stopped_by_watchpoint.
9459 * i386-low.c (i386_show_dr): Renamed to
9460 i386_dr_show and made nonstatic. All uses updated.
9461 (i386_length_and_rw_bits): Renamed to
9462 i386_dr_length_and_rw_bits and made nonstatic.
9463 All uses updated.
9464 (i386_insert_aligned_watchpoint): Renamed to
9465 i386_dr_insert_aligned_watchpoint and made nonstatic.
9466 All uses updated.
9467 (i386_remove_aligned_watchpoint): Renamed to
9468 i386_dr_remove_aligned_watchpoint and made nonstatic.
9469 All uses updated.
9470 (i386_update_inferior_debug_regs): Renamed to
9471 i386_dr_update_inferior_debug_regs and made nonstatic.
9472 All uses updated.
9473 (i386_low_insert_watchpoint): Renamed to
9474 i386_dr_insert_watchpoint. All uses updated.
9475 (i386_low_remove_watchpoint): Renamed to
9476 i386_dr_remove_watchpoint. All uses updated.
9477 (i386_low_region_ok_for_watchpoint): Renamed to
9478 i386_dr_region_ok_for_watchpoint. All uses updated.
9479 (i386_low_stopped_data_address): Renamed to
9480 i386_dr_stopped_data_address. All uses updated.
9481 (i386_low_stopped_by_watchpoint): Renamed to
9482 i386_dr_stopped_by_watchpoint. All uses updated.
9483
9484 2014-06-18 Gary Benson <gbenson@redhat.com>
9485
9486 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9487 (i386_dr_low_can_set_control): Likewise.
9488 (i386_insert_aligned_watchpoint): New check.
9489
9490 2014-06-18 Gary Benson <gbenson@redhat.com>
9491
9492 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9493 Renamed to state.
9494
9495 2014-06-18 Gary Benson <gbenson@redhat.com>
9496
9497 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9498 instead of fatal and error.
9499 (i386_handle_nonaligned_watchpoint): Likewise.
9500
9501 2014-06-18 Gary Benson <gbenson@redhat.com>
9502
9503 * i386-low.c (i386_get_debug_register_length): New macro.
9504 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9505 (i386_show_dr): Use debug_printf instead of fprintf. Use
9506 phex to format values.
9507
9508 2014-06-18 Gary Benson <gbenson@redhat.com>
9509
9510 * i386-low.h: Comment changes.
9511 * i386-low.c: Likewise.
9512
9513 2014-06-18 Gary Benson <gbenson@redhat.com>
9514
9515 * i386-low.c: Whitespace changes.
9516
9517 2014-06-12 Tom Tromey <tromey@redhat.com>
9518
9519 * utils.c (freeargv): Remove.
9520
9521 2014-06-12 Tom Tromey <tromey@redhat.com>
9522
9523 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9524 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9525 (parse_debug_format_options): Likewise.
9526 (gdbserver_usage): Likewise.
9527 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9528 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9529 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9530 against libiberty.
9531 ($(LIBGNU)): Depend on libiberty.
9532 (all-lib): Recurse into all subdirs.
9533 (install-only): Invoke "install" target in subdirs.
9534 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9535 targets.
9536 * configure: Rebuild.
9537 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9538 for vasprintf, vsnprintf, or gettimeofday.
9539 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9540 srv_tgtobj.
9541
9542 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9543
9544 * development.sh: Delete.
9545 * Makefile.in (config.status): Adjust dependency on development.sh.
9546 * configure.ac: Adjust development.sh source call.
9547 * configure: Regenerate.
9548
9549 2014-06-02 Pedro Alves <palves@redhat.com>
9550
9551 * ax.c (gdb_free_agent_expr): New function.
9552 * ax.h (gdb_free_agent_expr): New declaration.
9553 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9554 list.
9555 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9556 static.
9557 (clear_breakpoint_conditions_and_commands): New function.
9558 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9559 (clear_breakpoint_conditions_and_commands): New declaration.
9560
9561 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9562
9563 * linux-aarch64-low.c (asm/ptrace.h): Include.
9564
9565 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9566
9567 Fix TLS access for -static -pthread.
9568 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9569 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9570 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9571
9572 2014-05-20 Pedro Alves <palves@redhat.com>
9573
9574 * linux-aarch64-low.c (aarch64_insert_point)
9575 (aarch64_remove_point): No longer check whether the type is
9576 supported here. Adjust to new interface.
9577 (the_low_target): Install aarch64_supports_z_point_type as
9578 supports_z_point_type method.
9579 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9580 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9581 instead of a Z packet char. Adjust.
9582 (arm_supports_z_point_type): New function.
9583 (arm_insert_point, arm_remove_point): Adjust to new interface.
9584 (the_low_target): Install arm_supports_z_point_type.
9585 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9586 (cris_insert_point, cris_remove_point): Adjust to new interface.
9587 Don't check whether the type is supported here.
9588 (the_low_target): Install cris_supports_z_point_type.
9589 * linux-low.c (linux_supports_z_point_type): New function.
9590 (linux_insert_point, linux_remove_point): Adjust to new interface.
9591 * linux-low.h (struct linux_target_ops) <insert_point,
9592 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9593 raw_breakpoint pointer parameter.
9594 <supports_z_point_type>: New method.
9595 * linux-mips-low.c (mips_supports_z_point_type): New function.
9596 (mips_insert_point, mips_remove_point): Adjust to new interface.
9597 Use mips_supports_z_point_type.
9598 (the_low_target): Install mips_supports_z_point_type.
9599 * linux-ppc-low.c (the_low_target): Install NULL as
9600 supports_z_point_type method.
9601 * linux-s390-low.c (the_low_target): Install NULL as
9602 supports_z_point_type method.
9603 * linux-sparc-low.c (the_low_target): Install NULL as
9604 supports_z_point_type method.
9605 * linux-x86-low.c (x86_supports_z_point_type): New function.
9606 (x86_insert_point): Adjust to new insert_point interface. Use
9607 insert_memory_breakpoint. Adjust to new
9608 i386_low_insert_watchpoint interface.
9609 (x86_remove_point): Adjust to remove_point interface. Use
9610 remove_memory_breakpoint. Adjust to new
9611 i386_low_remove_watchpoint interface.
9612 (the_low_target): Install x86_supports_z_point_type.
9613 * lynx-low.c (lynx_target_ops): Install NULL as
9614 supports_z_point_type callback.
9615 * nto-low.c (nto_supports_z_point_type): New.
9616 (nto_insert_point, nto_remove_point): Adjust to new interface.
9617 (nto_target_ops): Install nto_supports_z_point_type.
9618 * mem-break.c: Adjust intro comment.
9619 (struct raw_breakpoint) <raw_type, size>: New fields.
9620 <inserted>: Update comment.
9621 <shlib_disabled>: Delete field.
9622 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9623 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9624 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9625 (raw_bkpt_type_to_target_hw_bp_type): New function.
9626 (find_enabled_raw_code_breakpoint_at): New function.
9627 (find_raw_breakpoint_at): New type and size parameters. Use them.
9628 (insert_memory_breakpoint): New function, based off
9629 set_raw_breakpoint_at.
9630 (remove_memory_breakpoint): New function.
9631 (set_raw_breakpoint_at): Reimplement.
9632 (set_breakpoint): New, based on set_breakpoint_at.
9633 (set_breakpoint_at): Reimplement.
9634 (delete_raw_breakpoint): Go through the_target->remove_point
9635 instead of assuming memory breakpoints.
9636 (find_gdb_breakpoint_at): Delete.
9637 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9638 (find_gdb_breakpoint): New function.
9639 (set_gdb_breakpoint_at): Delete.
9640 (z_type_supported): New function.
9641 (set_gdb_breakpoint_1): New function, loosely based off
9642 set_gdb_breakpoint_at.
9643 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9644 (delete_gdb_breakpoint_at): Delete.
9645 (delete_gdb_breakpoint_1): New function, loosely based off
9646 delete_gdb_breakpoint_at.
9647 (delete_gdb_breakpoint): New function.
9648 (clear_gdb_breakpoint_conditions): Rename to ...
9649 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9650 breakpoint.
9651 (add_condition_to_breakpoint): Make static.
9652 (add_breakpoint_condition): Take a struct breakpoint pointer
9653 instead of an address. Adjust.
9654 (gdb_condition_true_at_breakpoint): Rename to ...
9655 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9656 z_type parameter.
9657 (gdb_condition_true_at_breakpoint): Reimplement.
9658 (add_breakpoint_commands): Take a struct breakpoint pointer
9659 instead of an address. Adjust.
9660 (gdb_no_commands_at_breakpoint): Rename to ...
9661 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9662 parameter. Return true if no breakpoint was found. Change debug
9663 output.
9664 (gdb_no_commands_at_breakpoint): Reimplement.
9665 (run_breakpoint_commands): Rename to ...
9666 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9667 and change return type to boolean.
9668 (run_breakpoint_commands): New function.
9669 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9670 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9671 breakpoint. Go through the_target->remove_point instead of
9672 assuming memory breakpoint.
9673 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9674 software and hardware breakpoints.
9675 (reinsert_raw_breakpoint): Go through the_target->insert_point
9676 instead of assuming memory breakpoint.
9677 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9678 software and hardware breakpoints.
9679 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9680 Check both software and hardware breakpoints.
9681 (validate_inserted_breakpoint): Assert the breakpoint is a
9682 software breakpoint. Set the inserted flag to -1 instead of
9683 setting shlib_disabled.
9684 (delete_disabled_breakpoints): Adjust.
9685 (validate_breakpoints): Only validate software breakpoints.
9686 Adjust to inserted flag change.
9687 (check_mem_read, check_mem_write): Skip breakpoint types other
9688 than software breakpoints. Adjust to inserted flag change.
9689 * mem-break.h (enum raw_bkpt_type): New enum.
9690 (raw_breakpoint, struct process_info): Forward declare.
9691 (Z_packet_to_target_hw_bp_type): Delete declaration.
9692 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9693 (set_gdb_breakpoint, delete_gdb_breakpoint)
9694 (clear_breakpoint_conditions): New declarations.
9695 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9696 (breakpoint_inserted_here): Update comment.
9697 (add_breakpoint_condition, add_breakpoint_commands): Replace
9698 address parameter with a breakpoint pointer parameter.
9699 (gdb_breakpoint_here): Update comment.
9700 (delete_gdb_breakpoint_at): Delete.
9701 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9702 * server.c (process_point_options): Take a struct breakpoint
9703 pointer instead of an address. Adjust.
9704 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9705 delete_gdb_breakpoint.
9706 * spu-low.c (spu_target_ops): Install NULL as
9707 supports_z_point_type method.
9708 * target.h: Include mem-break.h.
9709 (struct target_ops) <prepare_to_access_memory>: Update comment.
9710 <supports_z_point_type>: New field.
9711 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9712 instead of a char. Also take a raw breakpoint pointer.
9713 * win32-arm-low.c (the_low_target): Install NULL as
9714 supports_z_point_type.
9715 * win32-i386-low.c (i386_supports_z_point_type): New function.
9716 (i386_insert_point, i386_remove_point): Adjust to new interface.
9717 (the_low_target): Install i386_supports_z_point_type.
9718 * win32-low.c (win32_supports_z_point_type): New function.
9719 (win32_insert_point, win32_remove_point): Adjust to new interface.
9720 (win32_target_ops): Install win32_supports_z_point_type.
9721 * win32-low.h (struct win32_target_ops):
9722 <supports_z_point_type>: New method.
9723 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9724 instead of a char. Also take a raw breakpoint pointer.
9725
9726 2014-05-20 Pedro Alves <palves@redhat.com>
9727
9728 * mem-break.h: Include break-common.h.
9729 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9730 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9731 (Z_packet_to_target_hw_bp_type): New declaration.
9732 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9733 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9734 (Z_PACKET_ACCESS_WP): Delete macros.
9735 (Z_packet_to_hw_type): Delete function.
9736 * i386-low.h: Don't include break-common.h here.
9737 (Z_packet_to_hw_type): Delete declaration.
9738 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9739 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9740 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9741 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9742 * linux-aarch64-low.c: Don't include break-common.h here.
9743 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9744 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9745 (Z_packet_to_target_hw_bp_type): Delete function.
9746 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9747 function.
9748 (mips_insert_point, mips_remove_point): Use
9749 Z_packet_to_target_hw_bp_type.
9750
9751 2014-05-20 Pedro Alves <palves@redhat.com>
9752
9753 * linux-aarch64-low.c: Include break-common.h.
9754 (enum target_point_type): Delete.
9755 (Z_packet_to_point_type): Rename to ...
9756 (Z_packet_to_target_hw_bp_type): ... this, and return a
9757 target_hw_bp_type instead.
9758 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9759 instead of an enum target_point_type.
9760 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9761 breakpoint type.
9762 (aarch64_dr_state_insert_one_point)
9763 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9764 (aarch64_handle_aligned_watchpoint)
9765 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9766 Take an enum target_hw_bp_type instead of an enum
9767 target_point_type.
9768 (aarch64_supports_z_point_type): New function.
9769 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9770 use Z_packet_to_target_hw_bp_type.
9771
9772 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9773
9774 * configure.ac: Only use -Werror by default when DEVELOPMENT
9775 is true.
9776 * configure: Regenerate.
9777
9778 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9779
9780 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9781 * linux-x86-low.c (X86_64_USER_REGS): New.
9782 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9783
9784 2014-04-28 Yao Qi <yao@codesourcery.com>
9785
9786 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9787 name.
9788
9789 2014-04-25 Pedro Alves <palves@redhat.com>
9790
9791 PR server/16255
9792 * linux-low.c (linux_attach_fail_reason_string): New function.
9793 (linux_attach_lwp): Delete.
9794 (linux_attach_lwp_1): Rename to ...
9795 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9796 argument. Remove "initial" parameter. Return int instead of
9797 void. Don't error or warn here.
9798 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9799 failure to attach to the tgid. Call warning when failing to
9800 attach to an lwp.
9801 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9802 argument. Remove "initial" parameter. Return int instead of
9803 void. Don't error or warn here.
9804 (linux_attach_fail_reason_string): New declaration.
9805 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9806 interface change. Use linux_attach_fail_reason_string.
9807
9808 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9809 Walfred Tedeschi <walfred.tedeschi@intel.com>
9810
9811 * Makefile.in: Added rules to handle new files
9812 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9813 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9814 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9815 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9816 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9817 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9818 x32-avx512-linux.o.
9819 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9820 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9821 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9822 i386/x32-avx512.xml.
9823 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9824 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9825 i386/x32-avx512-linux.xml.
9826 * i387-fp.c (num_avx512_k_registers): New constant for number
9827 of K registers.
9828 (num_avx512_zmmh_low_registers): New constant for number of
9829 lower ZMM registers (0-15).
9830 (num_avx512_zmmh_high_registers): New constant for number of
9831 higher ZMM registers (16-31).
9832 (num_avx512_ymmh_registers): New contant for number of higher
9833 YMM registers (ymm16-31 added by avx521 on x86_64).
9834 (num_avx512_xmm_registers): New constant for number of higher
9835 XMM registers (xmm16-31 added by AVX512 on x86_64).
9836 (struct i387_xsave): Add space for AVX512 registers.
9837 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9838 Add code to handle AVX512 registers.
9839 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9840 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9841 prototypei from generated file.
9842 (tdesc_amd64_avx512_linux): Likewise.
9843 (init_registers_x32_avx512_linux): Likewise.
9844 (tdesc_x32_avx512_linux): Likewise.
9845 (init_registers_i386_avx512_linux): Likewise.
9846 (tdesc_i386_avx512_linux): Likewise.
9847 (x86_64_regmap): Add AVX512 registers.
9848 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9849 mask.
9850 (initialize_low_arch): Add code to initialize AVX512 registers.
9851
9852 2014-04-23 Pedro Alves <palves@redhat.com>
9853
9854 * mem-break.c (find_gdb_breakpoint_at): Make static.
9855 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9856
9857 2014-04-23 Pedro Alves <palves@redhat.com>
9858
9859 * i386-low.c: Don't include break-common.h here.
9860 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9861 prototype to take target_hw_bp_type as argument instead of a Z
9862 packet char.
9863 * i386-low.h: Include break-common.h here.
9864 (Z_packet_to_hw_type): Declare.
9865 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9866 prototypes.
9867 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9868 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9869 (x86_remove_point): Convert the packet number to a
9870 target_hw_bp_type before calling i386_low_remove_watchpoint.
9871 * win32-i386-low.c (i386_insert_point): Convert the packet number
9872 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9873 (i386_remove_point): Convert the packet number to a
9874 target_hw_bp_type before calling i386_low_remove_watchpoint.
9875
9876 2014-04-23 Pedro Alves <palves@redhat.com>
9877
9878 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9879
9880 2014-04-10 Pedro Alves <palves@redhat.com>
9881
9882 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9883 Check if the condition or command is NULL before checking if the
9884 breakpoint is known. On success, return true.
9885 * mem-break.h (add_breakpoint_condition): Document return.
9886 (add_breakpoint_commands): Add describing comment.
9887 * server.c (skip_to_semicolon): New function.
9888 (process_point_options): Use it.
9889
9890 2014-04-09 Pedro Alves <palves@redhat.com>
9891
9892 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9893 to lwpid_of.
9894
9895 2014-02-27 Pedro Alves <palves@redhat.com>
9896
9897 PR 12702
9898 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9899 macros.
9900 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9901 output.
9902 (last_thread_of_process_p): Take a PID argument instead of a
9903 thread pointer.
9904 (linux_wait_for_lwp): Delete.
9905 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9906 functions.
9907 (linux_low_filter_event): New function, party factored out from
9908 linux_wait_for_event.
9909 (linux_wait_for_event): Rename to ...
9910 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9911 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9912 sigsuspend. Check for zombie leaders.
9913 (linux_wait_for_event): Reimplement as wrapper around
9914 linux_wait_for_event_filtered.
9915 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9916 a normal or signal exit is seen, it's the whole process exiting.
9917 (wait_for_sigstop): No longer a for_each_inferior callback.
9918 Rewrite on top of linux_wait_for_event_filtered.
9919 (stop_all_lwps): Call wait_for_sigstop directly.
9920 * server.c (resume, handle_target_event): Handle
9921 TARGET_WAITKIND_NO_RESUMED.
9922
9923 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9924
9925 * win32-low.c (psapi_get_dll_name,
9926 * win32_CreateToolhelp32Snapshot): Delete.
9927 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9928 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9929 Delete.
9930 (handle_load_dll): Add function description.
9931 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9932
9933 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9934
9935 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9936 Add comment.
9937 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9938 base address when calling win32_add_one_solib.
9939 (handle_load_dll): Delete local variable load_addr.
9940 Remove 0x1000 offset applied to DLL base address when calling
9941 win32_add_one_solib.
9942 (handle_unload_dll): Add comment.
9943
9944 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9945
9946 * win32-low.c (win32_add_all_dlls): Renames
9947 win32_ensure_ntdll_loaded. Rewrite function documentation.
9948 Adjust implementation to always load all DLLs.
9949 Add 0x1000 offset to DLL base address when calling
9950 win32_add_one_solib.
9951 (child_initialization_done): New static global.
9952 (do_initial_child_stuff): Set child_initialization_done to
9953 zero during child initialization, and 1 after. Replace call
9954 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9955 Add comment.
9956 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9957 (handle_unload_dll): Add function documentation.
9958 (get_child_debug_event): Ignore load and unload DLL events
9959 during child initialization.
9960
9961 2014-02-20 Doug Evans <dje@google.com>
9962
9963 Remove global all_lwps.
9964 * inferiors.h (ptid_of): Move here from linux-low.h.
9965 (pid_of, lwpid_of): Ditto.
9966 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9967 parameter is a struct thread_info * now.
9968 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9969 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9970 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9971 directly.
9972 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9973 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9974 * linux-arm-low.c (update_registers_callback): Update, "entry"
9975 parameter is a struct thread_info * now.
9976 Fetch lwpid from current_inferior directly.
9977 (arm_insert_point): Pass &all_threads to find_inferior instead of
9978 &all_lwps.
9979 (arm_remove_point): Ditto.
9980 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
9981 (arm_prepare_to_resume): Fetch pid from thread.
9982 (arm_read_description): Fetch lwpid from current_inferior directly.
9983 * linux-low.c (all_lwps): Delete.
9984 (delete_lwp): Delete call to remove_inferior.
9985 (handle_extended_wait): Fetch lwpid from thread.
9986 (add_lwp): Don't set lwp->entry.id. Remove call to
9987 add_inferior_to_list.
9988 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
9989 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
9990 (kill_one_lwp_callback): Ditto.
9991 (linux_kill): Don't dereference NULL pointer.
9992 Fetch ptid,lwpid from thread.
9993 (get_detach_signal): Fetch ptid from thread.
9994 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
9995 Simplify call to regcache_invalidate_thread.
9996 (delete_lwp_callback): Update, "entry" parameter is a
9997 struct thread_info * now. Fetch pid from thread.
9998 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
9999 (status_pending_p_callback): Update, "entry" parameter is a
10000 struct thread_info * now. Fetch ptid from thread.
10001 (find_lwp_pid): Update, "entry" parameter is a
10002 struct thread_info * now.
10003 (linux_wait_for_lwp): Fetch pid from thread.
10004 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10005 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10006 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10007 (dequeue_one_deferred_signal): Ditto.
10008 (cancel_breakpoint): Fetch ptid from current_inferior.
10009 (linux_wait_for_event): Pass &all_threads to find_inferior,
10010 not &all_lwps. Fetch ptid, lwpid from thread.
10011 (count_events_callback): Update, "entry" parameter is a
10012 struct thread_info * now.
10013 (select_singlestep_lwp_callback): Ditto.
10014 (select_event_lwp_callback): Ditto.
10015 (cancel_breakpoints_callback): Ditto.
10016 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10017 not &all_lwps.
10018 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10019 (unsuspend_one_lwp): Update, "entry" parameter is a
10020 struct thread_info * now.
10021 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10022 not &all_lwps.
10023 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10024 Fetch lwpid from thread, not lwp.
10025 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10026 Pass &all_threads to find_inferior, not &all_lwps.
10027 (send_sigstop): Fetch lwpid from thread, not lwp.
10028 (send_sigstop_callback): Update, "entry" parameter is a
10029 struct thread_info * now.
10030 (suspend_and_send_sigstop_callback): Ditto.
10031 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10032 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10033 struct thread_info * now.
10034 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10035 from thread, lwp.
10036 (lwp_running): Update, "entry" parameter is a
10037 struct thread_info * now.
10038 (stop_all_lwps): Fetch ptid from thread.
10039 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10040 (linux_resume_one_lwp): Fetch lwpid from thread.
10041 (linux_set_resume_request): Update, "entry" parameter is a
10042 struct thread_info * now. Fetch pid, lwpid from thread.
10043 (resume_status_pending_p): Update, "entry" parameter is a
10044 struct thread_info * now.
10045 (need_step_over_p): Ditto. Fetch lwpid from thread.
10046 (start_step_over): Fetch lwpid from thread.
10047 (linux_resume_one_thread): Update, "entry" parameter is a
10048 struct thread_info * now. Fetch lwpid from thread.
10049 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10050 (proceed_one_lwp): Update, "entry" parameter is a
10051 struct thread_info * now. Fetch lwpid from thread.
10052 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10053 struct thread_info * now.
10054 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10055 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10056 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10057 directly.
10058 (regsets_store_inferior_registers): Ditto.
10059 (fetch_register, store_register): Ditto.
10060 (linux_read_memory, linux_write_memory): Ditto.
10061 (linux_request_interrupt): Ditto.
10062 (linux_read_auxv): Ditto.
10063 (linux_xfer_siginfo): Ditto.
10064 (linux_qxfer_spu): Ditto.
10065 (linux_qxfer_libraries_svr4): Ditto.
10066 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10067 moved to inferiors.h.
10068 (get_lwp): Delete.
10069 (get_thread_lwp): Update.
10070 (struct lwp_info): Delete member "entry". Simplify comment for
10071 member "thread".
10072 (all_lwps): Delete.
10073 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10074 current_inferior directly.
10075 (update_watch_registers_callback): Update, "entry" parameter is a
10076 struct thread_info * now. Fetch pid from thread.
10077 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10078 (mips_insert_point): Fetch lwpid from current_inferior.
10079 Pass &all_threads to find_inferior, not &all_lwps.
10080 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10081 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10082 directly.
10083 (mips_stopped_data_address): Ditto.
10084 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10085 directly.
10086 * linux-tile-low.c (tile_arch_setup): Ditto.
10087 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10088 (update_debug_registers_callback): Update, "entry" parameter is a
10089 struct thread_info * now. Fetch pid from thread.
10090 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10091 Pass &all_threads to find_inferior, not &all_lwps.
10092 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10093 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10094 Pass &all_threads to find_inferior, not &all_lwps.
10095 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10096 (i386_dr_low_get_status): Ditto.
10097 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10098 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10099 (x86_linux_read_description): Ditto.
10100 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10101
10102 2014-02-20 Doug Evans <dje@google.com>
10103
10104 * inferiors.c (get_first_inferior): Fix buglet.
10105
10106 2014-02-19 Doug Evans <dje@google.com>
10107
10108 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10109 * inferiors.c (add_thread): Change result type to struct thread_info *.
10110 All callers updated.
10111 (add_lwp): Call add_thread here instead of in callers.
10112 All callers updated.
10113 * linux-low.h (get_lwp_thread): Rewrite.
10114 (struct lwp_info): New member "thread".
10115
10116 2014-02-19 Doug Evans <dje@google.com>
10117
10118 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10119 All callers updated.
10120
10121 2014-02-19 Doug Evans <dje@google.com>
10122
10123 * inferiors.c (add_thread): Fix whitespace.
10124
10125 2014-02-19 Doug Evans <dje@google.com>
10126
10127 * dll.c (clear_dlls): Replace accessing list implemention details
10128 with API function.
10129 * gdbthread.h (get_first_thread): Declare.
10130 * inferiors.c (for_each_inferior_with_data): New function.
10131 (get_first_thread): New function.
10132 (find_thread_ptid): Simplify.
10133 (get_first_inferior): New function.
10134 (clear_list): Delete.
10135 (one_inferior_p): New function.
10136 (clear_inferior_list): New function.
10137 (clear_inferiors): Update.
10138 * inferiors.h (for_each_inferior_with_data): Declare.
10139 (clear_inferior_list): Declare.
10140 (one_inferior_p): Declare.
10141 (get_first_inferior): Declare.
10142 * linux-low.c (linux_wait_for_event): Replace accessing list
10143 implemention details with API function.
10144 * server.c (target_running): Ditto.
10145 (accumulate_file_name_length): New function.
10146 (emit_dll_description): New function.
10147 (handle_qxfer_libraries): Replace accessing list implemention
10148 details with API function.
10149 (handle_qxfer_threads_worker): New function.
10150 (handle_qxfer_threads_proper): Replace accessing list implemention
10151 details with API function.
10152 (handle_query): Ditto.
10153 (visit_actioned_threads_callback_ftype): New typedef.
10154 (visit_actioned_threads_data): New struct.
10155 (visit_actioned_threads): Rewrite to be find_inferior callback.
10156 (resume): Call find_inferior.
10157 (handle_status): Replace accessing list implemention
10158 details with API function.
10159 (process_serial_event): Replace accessing list implemention details
10160 with API function.
10161 * target.c (set_desired_inferior): Replace accessing list implemention
10162 details with API function.
10163 * tracepoint.c (same_process_p): New function.
10164 (gdb_agent_about_to_close): Replace accessing list implemention
10165 details with API function.
10166 * win32-low.c (child_delete_thread): Replace accessing list
10167 implemention details with API function.
10168 (match_dll_by_basename): New function.
10169 (dll_is_loaded_by_basename): New function.
10170 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10171 details call to dll_is_loaded_by_basename.
10172
10173 2014-02-19 Doug Evans <dje@google.com>
10174
10175 * dll.h (struct dll_info): Add comment.
10176 * gdbthread.h (struct thread_info): Add comment.
10177 (current_ptid): Simplify.
10178 * inferiors.c (add_process): Update.
10179 (remove_process): Update.
10180 * inferiors.h (struct process_info): Rename member "head" to "entry".
10181 * linux-low.c (delete_lwp): Update.
10182 (add_lwp): Update.
10183 (last_thread_of_process_p): Update.
10184 (kill_one_lwp_callback, linux_kill): Update.
10185 (status_pending_p_callback): Update.
10186 (wait_for_sigstop): Update. Simplify read of ptid.
10187 (start_step_over): Update.
10188 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10189 (get_lwp_thread): Update.
10190 (struct lwp_info): Rename member "head" to "entry".
10191 * regcache.h (inferior_list_entry): Delete.
10192 * server.c (kill_inferior_callback): Update.
10193 (detach_or_kill_inferior_callback): Update.
10194 (print_started_pid): Update.
10195 (print_attached_pid): Update.
10196 (process_serial_event): Simplify read of ptid.
10197 * thread-db.c (thread_db_create_event): Update.
10198 (thread_db_get_tls_address): Update.
10199 * win32-low.c (current_inferior_ptid): Simplify.
10200
10201 2014-02-19 Tom Tromey <tromey@redhat.com>
10202
10203 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10204 argument.
10205 (target_supports_btrace): Update.
10206
10207 2014-02-14 Yao Qi <yao@codesourcery.com>
10208
10209 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10210 (rsp-low-ipa.o): New target.
10211
10212 2014-02-12 Tom Tromey <tromey@redhat.com>
10213
10214 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10215 convert_ascii_to_int.
10216 * regcache.c (registers_to_string): Likewise.
10217 * remote-utils.c (decode_M_packet): Likewise.
10218 * server.c (process_serial_event): Likewise.
10219
10220 2014-02-12 Tom Tromey <tromey@redhat.com>
10221
10222 * server.c (handle_query, handle_v_run): Use hex2bin, not
10223 unhexify.
10224 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10225
10226 2014-02-12 Tom Tromey <tromey@redhat.com>
10227
10228 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10229 convert_int_to_ascii.
10230 * regcache.c (registers_to_string, collect_register_as_string):
10231 Likewise.
10232 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10233 Likewise.
10234 * server.c (process_serial_event): Likewise.
10235 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10236 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10237
10238 2014-02-12 Tom Tromey <tromey@redhat.com>
10239
10240 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10241 bin2hex, not hexify.
10242 * tracepoint.c (cmd_qtstatus): Likewise.
10243
10244 2014-02-12 Tom Tromey <tromey@redhat.com>
10245
10246 * remote-utils.c (monitor_output): Pass explicit length to
10247 hexify.
10248
10249 2014-02-12 Tom Tromey <tromey@redhat.com>
10250
10251 * tracepoint.c: Include rsp-low.h.
10252 * server.c: Include rsp-low.h.
10253 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10254 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10255 declare.
10256 * remote-utils.c: Include rsp-low.h.
10257 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10258 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10259 (convert_int_to_ascii, convert_ascii_to_int): Move to
10260 common/rsp-low.c.
10261 * regcache.c: Include rsp-low.h.
10262 * ax.c: Include rsp-low.h.
10263 * Makefile.in (SFILES): Add common/rsp-low.c.
10264 (OBS): Add rsp-low.o.
10265 (rsp-low.o): New target.
10266
10267 2014-02-12 Tom Tromey <tromey@redhat.com>
10268
10269 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10270 Include print-utils.h.
10271 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10272 (plongest, thirty_two, phex_nz): Remove.
10273 * Makefile.in (SFILES): Add common/print-utils.c.
10274 (OBS): Add print-utils.o.
10275 (print-utils-ipa.o): New target.
10276 (print-utils.o): New target.
10277 (IPA_OBJS): Add print-utils-ipa.o.
10278
10279 2014-02-06 Tom Tromey <tromey@redhat.com>
10280
10281 * Makefile.in (SFILES): Fix indentation.
10282
10283 2014-02-05 Doug Evans <dje@google.com>
10284
10285 * linux-low.c (linux_wait_for_event): Improve comment.
10286 (linux_wait_1): Keep current_inferior in sync with event_child.
10287
10288 2014-01-22 Doug Evans <dje@google.com>
10289
10290 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10291
10292 2014-01-22 Doug Evans <dje@google.com>
10293
10294 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10295 * configure: Regenerate.
10296 * config.in: Regenerate.
10297 * Makefile.in (SFILES): Add debug.c.
10298 (OBS): Add debug.o.
10299 * debug.c: New file.
10300 * debug.h: New file.
10301 * linux-aarch64-low.c (*): Update all debugging printfs to use
10302 debug_printf instead of fprintf.
10303 * linux-arm-low.c (*): Ditto.
10304 * linux-cris-low.c (*): Ditto.
10305 * linux-crisv32-low.c (*): Ditto.
10306 * linux-m32r-low.c (*): Ditto.
10307 * linux-sparc-low.c (*): Ditto.
10308 * linux-x86.c (*): Ditto.
10309 * linux-low.c (*): Ditto.
10310 (linux_wait_1): Add calls to debug_enter, debug_exit.
10311 (linux_wait): Remove redundant debugging printf.
10312 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10313 (linux_resume, unstop_all_lwps): Ditto.
10314 * mem-break.c (*): Update all debugging printfs to use
10315 debug_printf instead of fprintf.
10316 * remote-utils.c (*): Ditto.
10317 * thread-db.c (*): Ditto.
10318 * server.c #include <ctype.h>, "gdb_vecs.h".
10319 (debug_threads): Moved to debug.c.
10320 (*): Update all debugging printfs to use debug_printf instead of
10321 fprintf.
10322 (start_inferior): Replace call to fflush with call to debug_flush.
10323 (monitor_show_help): Mention set debug-format.
10324 (parse_debug_format_options): New function.
10325 (handle_monitor_command): Handle "monitor set debug-format".
10326 (gdbserver_usage): Mention --debug-format.
10327 (main): Parse --debug-format.
10328 * server.h (debug_threads): Declaration moved to debug.h.
10329 #include "debug.h".
10330 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10331 trace_debug_1 that uses debug_printf.
10332 (tracepoint_look_up_symbols): Update all debugging printfs to use
10333 debug_printf instead of fprintf.
10334
10335 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10336
10337 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10338 sys/ptrace.h.
10339
10340 2014-01-17 Pedro Alves <palves@redhat.com>
10341
10342 PR build/16445
10343 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10344 defined after including gdb_proc_service.h.
10345
10346 2014-01-16 Doug Evans <dje@google.com>
10347
10348 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10349 (match_dll): Use it.
10350
10351 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10352
10353 * target.h (target_ops) <read_btrace>: Change parameters and
10354 return type to allow error reporting.
10355 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10356 trace reading errors on.
10357 * linux-low.c (linux_low_read_btrace): Pass trace reading
10358 errors on.
10359 (linux_low_disable_btrace): New.
10360
10361 2014-01-15 Doug Evans <dje@google.com>
10362
10363 * inferiors.c (thread_id_to_gdb_id): Delete.
10364 * inferiors.h (thread_id_to_gdb_id): Delete.
10365
10366 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10367
10368 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10369 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10370 versions.
10371
10372 2014-01-08 Pedro Alves <palves@redhat.com>
10373
10374 * server.c (handle_status): Don't discard previous queued stop
10375 replies or thread's pending status here.
10376 (main) <disconnection>: Do it here instead.
10377
10378 2014-01-08 Pedro Alves <palves@redhat.com>
10379
10380 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10381 * server.c (visit_actioned_threads, handle_pending_status): New
10382 function.
10383 (handle_v_cont): Factor out parts to ...
10384 (resume): ... this new function. If in all-stop, and a thread
10385 being resumed has a pending status, report it without actually
10386 resuming.
10387 (myresume): Adjust to use the new 'resume' function.
10388 (clear_pending_status_callback, set_pending_status_callback)
10389 (find_status_pending_thread_callback): New functions.
10390 (handle_status): Handle the case of multiple threads having
10391 interesting statuses to report. Report threads' real last signal
10392 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10393 with an interesting thread to report the status for, instead of
10394 always reporting the status of the first thread.
10395
10396 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10397
10398 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10399 * gdbreplay.c (gdbreplay_version): Likewise.
10400
10401 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10402
10403 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10404 iov.iov_len with the real length in use.
10405
10406 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10407
10408 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10409 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10410 for all targets that use win32-low.c.
10411 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10412 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10413
10414 2013-12-13 Pedro Alves <palves@redhat.com>
10415
10416 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10417 if equal to TARGET_WAITKIND_LOADED.
10418 * win32-low.c (cached_status): New static global.
10419 (win32_wait): Add declaration.
10420 (do_initial_child_stuff): Flush all initial pending debug events
10421 up to the initial breakpoint.
10422 (win32_wait): If CACHED_STATUS was set, return that instead
10423 of doing a real wait. Remove the code resuming the execution
10424 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10425 during the initial phase. Also remove the code changing
10426 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10427 TARGET_WAITKIND_STOPPED.
10428
10429 2013-12-11 Yao Qi <yao@codesourcery.com>
10430
10431 * notif.c (handle_notif_ack): Return 0 if no notification
10432 matches.
10433
10434 2013-11-20 Doug Evans <dje@google.com>
10435
10436 * linux-low.c (linux_set_resume_request): Fix comment.
10437
10438 2013-11-20 Doug Evans <dje@google.com>
10439
10440 * linux-low.c (resume_status_pending_p): Tweak comment.
10441
10442 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10443
10444 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10445 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10446 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10447 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10448 (srv_amd64_regobj): Add amd64-mpx.o.
10449 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10450 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10451 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10452 * i387-fp.c (num_pl_bnd_register) Added constant.
10453 (num_pl_bnd_cfg_registers) Added constant.
10454 (struct i387_xsave) Added reserved area and MPX fields.
10455 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10456 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10457 function.
10458 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10459 (init_registers_amd64_mpx_linux): Declare new function.
10460 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10461 (x86_64_regmap): Add MPX registers.
10462 (x86_linux_read_description): Add MPX case.
10463 (initialize_low_arch): Initialize MPX targets.
10464
10465 2013-11-18 Tom Tromey <tromey@redhat.com>
10466
10467 * configure: Rebuild.
10468 * configure.ac: Don't check for stdlib.h.
10469 * gdbreplay.c: Unconditionally include stdlib.h.
10470
10471 2013-11-18 Tom Tromey <tromey@redhat.com>
10472
10473 * config.in: Rebuild.
10474 * configure: Rebuild.
10475 * configure.ac: Don't use AC_HEADER_DIRENT.
10476
10477 2013-11-18 Tom Tromey <tromey@redhat.com>
10478
10479 * server.h: Don't check HAVE_STRING_H.
10480 * gdbreplay.c: Don't check HAVE_STRING_H.
10481 * configure: Rebuild.
10482
10483 2013-11-18 Tom Tromey <tromey@redhat.com>
10484
10485 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10486 LIBGNU.
10487
10488 2013-11-08 Tom Tromey <tromey@redhat.com>
10489
10490 * configure, config.in: Rebuild.
10491 * configure.ac: Remove unused configury.
10492
10493 2013-11-08 Tom Tromey <tromey@redhat.com>
10494
10495 * acinclude.m4: Include common.m4, codeset.m4.
10496 * configure, config.in: Rebuild.
10497 * configure.ac: Use GDB_AC_COMMON.
10498
10499 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10500
10501 * linux-s390-low.c (HWCAP_S390_TE): New define.
10502 (s390_arch_setup): Consider the TE field in the HWCAP for
10503 determining 'have_regset_tdb'.
10504
10505 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10506
10507 PR gdb/16014
10508 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10509 call to sizeof.
10510
10511 2013-10-02 Pedro Alves <palves@redhat.com>
10512
10513 * server.c (process_serial_event): Don't output "GDBserver
10514 exiting" if GDB is connected through stdio.
10515 * target.c (mywait): Likewise, be silent if GDB is connected
10516 through stdio.
10517
10518 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10519
10520 * lynx-low.c (lynx_add_threads_after_attach): New function.
10521 (lynx_attach): Remove call to add_thread. Add call to
10522 lynx_add_threads_after_attach instead.
10523
10524 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10525
10526 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10527 * config.in, configure: Regenerated.
10528
10529 2013-09-18 Yao Qi <yao@codesourcery.com>
10530
10531 PR server/15959
10532 * server.c (start_inferior): Clear 'resume_info'.
10533
10534 2013-09-16 Jiong Wang <jiwang@tilera.com>
10535
10536 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10537 for each register.
10538
10539 2013-09-16 Jiong Wang <jiwang@tilera.com>
10540
10541 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10542 linux-tile-low.o to srv_tgtobj.
10543
10544 2013-09-16 Will Newton <will.newton@linaro.org>
10545
10546 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10547 out regs.
10548
10549 2013-09-06 Pedro Alves <palves@redhat.com>
10550
10551 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10552 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10553 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10554 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10555 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10556 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10557
10558 2013-09-06 Pedro Alves <palves@redhat.com>
10559
10560 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10561 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10562
10563 2013-09-06 Pedro Alves <palves@redhat.com>
10564
10565 * linux-amd64-ipa.c: Include tracepoint.h.
10566 * linux-i386-ipa.c: Include tracepoint.h.
10567
10568 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10569
10570 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10571 (ps_get_thread_area): New function.
10572
10573 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10574
10575 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10576 (initialize_low_arch): Call init_registers_crisv32 rather than
10577 init_register_crisv32.
10578
10579 2013-09-05 Pedro Alves <palves@redhat.com>
10580
10581 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10582 to ...
10583 * hostio.h: ... this new file.
10584 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10585 win32-low.c: Include hostio.h.
10586
10587 2013-09-05 Pedro Alves <palves@redhat.com>
10588
10589 * server.h (gdb_client_data, handler_func, callback_handler_func)
10590 (delete_file_handler, add_file_handler, append_callback_event)
10591 (delete_callback_event, start_event_loop, initialize_event_loop):
10592 Move to event-loop.h and include it.
10593 * event-loop.h: New file.
10594
10595 2013-09-05 Pedro Alves <palves@redhat.com>
10596
10597 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10598 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10599 (loaded_dll, unloaded_dll): Move to ...
10600 * dll.h: ... this new file.
10601 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10602
10603 2013-09-05 Pedro Alves <palves@redhat.com>
10604
10605 * server.h (current_process, get_thread_process, all_processes)
10606 (add_inferior_to_list, for_each_inferior, current_inferior)
10607 (remove_inferior, add_process, remove_process, find_process_pid)
10608 (have_started_inferiors_p, have_attached_inferiors_p)
10609 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10610 (clear_inferiors, find_inferior, find_inferior_id)
10611 (inferior_target_data, set_inferior_target_data)
10612 (inferior_regcache_data, set_inferior_regcache_data): Move to
10613 inferiors.h, and include it.
10614 * inferiors.h: New file.
10615
10616 2013-09-05 Pedro Alves <palves@redhat.com>
10617
10618 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10619 Move ...
10620 * ax.h: ... here.
10621
10622 2013-09-05 Pedro Alves <palves@redhat.com>
10623
10624 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10625 tracepoint.h.
10626 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10627 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10628 (handle_tracepoint_general_set, handle_tracepoint_query)
10629 (tracepoint_finished_step, tracepoint_was_hit)
10630 (release_while_stepping_state_list, current_traceframe)
10631 (in_readonly_region, traceframe_read_mem)
10632 (fetch_traceframe_registers, traceframe_read_sdata)
10633 (traceframe_read_info, struct fast_tpoint_collect_status)
10634 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10635 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10636 (supply_fast_tracepoint_registers)
10637 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10638 (ipa_tdesc, claim_trampoline_space)
10639 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10640 (agent_mem_read, agent_get_trace_state_variable_value)
10641 (agent_set_trace_state_variable_value, agent_tsv_read)
10642 (agent_mem_read_string, get_raw_reg_func_addr)
10643 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10644 * tracepoint.h: ... this new file.
10645
10646 2013-09-05 Pedro Alves <palves@redhat.com>
10647
10648 * server.h (perror_with_name, error, fatal, warning, paddress)
10649 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10650 include it.
10651 * utils.h: New file.
10652
10653 2013-09-05 Pedro Alves <palves@redhat.com>
10654
10655 * server.h (remote_debug, noack_mode, transport_is_reliable)
10656 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10657 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10658 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10659 (write_enn, initialize_async_io, enable_async_io)
10660 (disable_async_io, check_remote_input_interrupt_request)
10661 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10662 (dead_thread_notify, prepare_resume_reply)
10663 (decode_address_to_semicolon, decode_address, decode_m_packet)
10664 (decode_M_packet, decode_X_packet, decode_xfer_write)
10665 (decode_search_memory_packet, unhexify, hexify)
10666 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10667 (look_up_one_symbol, relocate_instruction)
10668 (monitor_output): Move to remote-utils.h, and include it.
10669 * remote-utils.h: New file.
10670
10671 2013-09-05 Pedro Alves <palves@redhat.com>
10672
10673 * server.h (_): Delete.
10674
10675 2013-09-02 Pedro Alves <palves@redhat.com>
10676
10677 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10678 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10679 allocated.
10680 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10681
10682 2013-09-02 Pierre Muller <muller@sourceware.org>
10683
10684 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10685 or WriteProcessMemory complete successfully and handle
10686 ERROR_PARTIAL_COPY error.
10687
10688 2013-09-02 Pedro Alves <palves@redhat.com>
10689
10690 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10691 error instead of EIO.
10692
10693 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10694
10695 PR server/15604
10696 * linux-low.c: Include filestuff.h.
10697 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10698 * lynx-low.c: Include filestuff.h.
10699 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10700 * server.c: Include filestuff.h.
10701 (main): Call notice_open_fds.
10702 * spu-low.c: Include filestuff.h.
10703 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10704
10705 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10706
10707 * Makefile.in: Explain why ../target and ../nat are not
10708 listed as include file search paths.
10709 (linux-waitpid.o): New object file rule.
10710 * configure.srv (srv_native_linux_obj): New variable.
10711 Replace all occurrences of linux native object files with
10712 $srv_native_linux_obj.
10713 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10714 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10715 (linux_enable_event_reporting): Remove declaration.
10716 (my_waitpid): Moved to common/linux-waitpid.c.
10717 (linux_wait_for_event): Pass ptid when calling
10718 linux_enable_event_reporting.
10719 (linux_supports_tracefork_flag): Remove.
10720 (linux_enable_event_reporting): Likewise.
10721 (linux_tracefork_grandchild): Remove.
10722 (STACK_SIZE): Moved to common/linux-ptrace.c.
10723 (linux_tracefork_child): Remove.
10724 (linux_test_for_tracefork): Remove.
10725 (linux_look_up_symbols): Call linux_supports_traceclone.
10726 (initialize_low): Remove call to linux_test_for_tracefork.
10727 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10728 common/linux-ptrace.h.
10729 (PTRACE_TYPE_ARG4): Likewise.
10730 Include linux-ptrace.h.
10731
10732 2013-08-21 Pedro Alves <palves@redhat.com>
10733
10734 * config.in: Renegerate.
10735
10736 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10737
10738 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10739 (SFILES): Remove $(srcdir)/common/target-common.c and
10740 add $(srcdir)/target/waitstatus.c.
10741 (OBS): Remove target-common.o and add waitstatus.o.
10742 (server_h): Remove $(srcdir)/../common/target-common.h and
10743 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10744 and $(srcdir)/../target/waitstatus.h.
10745 (target-common.o): Remove.
10746 (waitstatus.o): New target object file.
10747 * target.h: Do not include target-common.h and
10748 include target/resume.h, target/wait.h and
10749 target/waitstatus.h.
10750
10751 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10752
10753 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10754 to PTRACE_TYPE_ARG3.
10755 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10756 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10757 PTRACE_TYPE_ARG4.
10758 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10759 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10760
10761 2013-07-27 Jie Zhang <jie@codesourcery.com>
10762 Daniel Jacobowitz <dan@codesourcery.com>
10763 Yao Qi <yao@codesourcery.com>
10764
10765 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10766 (mips-linux-watch.o): New rule.
10767 (mips_linux_watch_h): New variable.
10768 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10769 srv_tgtobj.
10770 * linux-mips-low.c: Include mips-linux-watch.h.
10771 (struct arch_process_info, struct arch_lwp_info): New.
10772 (update_watch_registers_callback): New function.
10773 (mips_linux_new_process, mips_linux_new_thread) New functions.
10774 (mips_linux_prepare_to_resume, mips_insert_point): New
10775 functions.
10776 (mips_remove_point, mips_stopped_by_watchpoint): New
10777 functions.
10778 (rsp_bp_type_to_target_hw_bp_type): New function.
10779 (mips_stopped_data_address): New function.
10780 (the_low_target): Add watchpoint support functions.
10781
10782 2013-07-27 Yao Qi <yao@codesourcery.com>
10783
10784 * i386-low.c: Include break-common.h.
10785 (enum target_hw_bp_type): Remove.
10786
10787 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10788
10789 * Makefile.in (SFILES): /common/target-common.c.
10790 (OBS): Add target-common.o.
10791 (server_h): Add $(srcdir)/../common/target-common.h.
10792 (target-common.o): New target.
10793 * server.c (queue_stop_reply_callback): Free
10794 status string after use.
10795 * target.c (target_waitstatus_to_string): Remove.
10796 * target.h: Include target-common.h.
10797 (resume_kind): Likewise.
10798 (target_waitkind): Likewise.
10799 (target_waitstatus): Likewise.
10800 (TARGET_WNOHANG): Likewise.
10801
10802 2013-07-04 Yao Qi <yao@codesourcery.com>
10803
10804 * Makefile.in (host_alias): Use @host_noncanonical@.
10805 (target_alias): Use @target_noncanonical@.
10806 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10807 ACX_NONCANONICAL_HOST.
10808 * configure: Regenerated.
10809
10810 Revert:
10811 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10812
10813 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10814 * configure: Rebuild.
10815 * Makefile.in (version_host, version_target): Get from configure.
10816 (version.c): Use $(version_host) and $(version_target).
10817
10818 2013-07-03 Pedro Alves <palves@redhat.com>
10819
10820 * Makefile.in (config.status): Depend on development.sh.
10821 * acinclude.m4: Include libmcheck.m4.
10822 * configure: Regenerate.
10823
10824 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10825
10826 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10827 attribute inside the parentheses.
10828 (winapi_DebugSetProcessKillOnExit): Ditto.
10829 (winapi_DebugBreakProcess): Ditto.
10830 (winapi_GenerateConsoleCtrlEvent): Ditto.
10831
10832 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10833
10834 * notif.h (notif_event): Add a dummy member to avoid compiler
10835 errors.
10836
10837 2013-07-01 Pedro Alves <palves@redhat.com>
10838
10839 * hostio.c (HOSTIO_PATH_MAX): Define.
10840 (require_filename, handle_open, handle_unlink, handle_readlink):
10841 Use it.
10842
10843 2013-07-01 Pedro Alves <palves@redhat.com>
10844
10845 * server.h: Include "pathmax.h".
10846 * linux-low.c: Don't include sys/param.h.
10847 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10848 MAXPATHLEN.
10849 * win32-low.c: Don't include sys/param.h.
10850 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10851
10852 2013-07-01 Pedro Alves <palves@redhat.com>
10853
10854 * event-loop.c: Don't check HAVE_UNISTD_H before including
10855 <unistd.h>.
10856 * gdbreplay.c: Likewise.
10857 * remote-utils.c: Likewise.
10858 * server.c: Likewise.
10859 * configure.ac: Don't check for unistd.h.
10860 * configure: Regenerate.
10861
10862 2013-06-28 Tom Tromey <tromey@redhat.com>
10863
10864 * Makefile.in (version.c): Use version.in, not
10865 common/version.in.
10866
10867 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10868
10869 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10870 * configure: Rebuild.
10871 * Makefile.in (version_host, version_target): Get from configure.
10872 (version.c): Use $(version_host) and $(version_target).
10873
10874 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10875
10876 Fix trace-status to output user name without trailing colon.
10877 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10878
10879 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10880
10881 Fix trace-status to output proper start-time and stop-time.
10882 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10883 output start time and stop time in hex as gdb expects.
10884
10885 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10886
10887 * tracepoint.c (build_traceframe_info_xml): Output trace state
10888 variables present in the trace buffer.
10889
10890 2013-06-24 Tom Tromey <tromey@redhat.com>
10891
10892 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10893 create-version.sh.
10894 (version.o): Remove.
10895 * gdbreplay.c: Include version.h.
10896 (version, host_name): Don't declare.
10897 * server.h: Include version.h.
10898 (version, host_name): Don't declare.
10899
10900 2013-06-12 Pedro Alves <palves@redhat.com>
10901
10902 * linux-x86-low.c (linux_is_elf64): Delete global.
10903 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10904 with local linux_pid_exe_is_elf_64_file use.
10905
10906 2013-06-11 Pedro Alves <palves@redhat.com>
10907
10908 * linux-low.c (regset_disabled, disable_regset): New functions.
10909 (regsets_fetch_inferior_registers)
10910 (regsets_store_inferior_registers): Use them.
10911 (initialize_regsets_info); Don't allocate the disabled_regsets
10912 array here.
10913 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10914 comment.
10915
10916 2013-06-11 Pedro Alves <palves@redhat.com>
10917
10918 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10919 xmalloc.
10920
10921 2013-06-11 Pedro Alves <palves@redhat.com>
10922
10923 * linux-x86-low.c (initialize_low_arch): Call
10924 init_registers_x32_avx_linux.
10925
10926 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10927
10928 Fix compatibility with Android Bionic.
10929 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10930 it is not empty.
10931
10932 2013-06-07 Pedro Alves <palves@redhat.com>
10933
10934 PR server/14823
10935 * Makefile.in (OBS): Add tdesc.o.
10936 (IPA_OBJS): Add tdesc-ipa.o.
10937 (tdesc-ipa.o): New rule.
10938 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10939 interface.
10940 * linux-low.c (new_inferior): Delete.
10941 (disabled_regsets, num_regsets): Delete.
10942 (linux_add_process): Adjust to set the new per-process
10943 new_inferior flag.
10944 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10945 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10946 was a stop. When calling arch_setup, switch the current inferior
10947 to the thread that got an event.
10948 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10949 (regsets_fetch_inferior_registers)
10950 (regsets_store_inferior_registers): New regsets_info parameter.
10951 Adjust to use it.
10952 (linux_register_in_regsets): New regs_info parameter. Adjust to
10953 use it.
10954 (register_addr, fetch_register, store_register): New usrregs_info
10955 parameter. Adjust to use it.
10956 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10957 parameter regs_info. Adjust to use it.
10958 (linux_fetch_registers): Get the current inferior's regs_info, and
10959 adjust to use it.
10960 (linux_store_registers): Ditto.
10961 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10962 (initialize_low): Don't initialize the target_regsets here. Call
10963 initialize_low_arch.
10964 * linux-low.h (target_regsets): Delete declaration.
10965 (struct regsets_info): New.
10966 (struct usrregs_info): New.
10967 (struct regs_info): New.
10968 (struct process_info_private) <new_inferior>: New field.
10969 (struct linux_target_ops): Delete the num_regs, regmap, and
10970 regset_bitmap fields. New field regs_info.
10971 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10972 * i387-fp.c (num_xmm_registers): Delete.
10973 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10974 calls to new interface.
10975 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10976 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10977 Infer the number of xmm registers from the regcache's target
10978 description.
10979 * i387-fp.h (num_xmm_registers): Delete.
10980 * inferiors.c (add_thread): Don't install the thread's regcache
10981 here.
10982 * proc-service.c (gregset_info): Fetch the current inferior's
10983 regs_info. Adjust to use it.
10984 * regcache.c: Include tdesc.h.
10985 (register_bytes, reg_defs, num_registers)
10986 (gdbserver_expedite_regs): Delete.
10987 (get_thread_regcache): If the thread doesn't have a regcache yet,
10988 create one, instead of aborting gdbserver.
10989 (regcache_invalidate_one): Rename to ...
10990 (regcache_invalidate_thread): ... this.
10991 (regcache_invalidate_one): New.
10992 (regcache_invalidate): Only invalidate registers of the current
10993 process.
10994 (init_register_cache): Add target_desc parameter, and use it.
10995 (new_register_cache): Ditto. Assert the target description has a
10996 non zero registers_size.
10997 (regcache_cpy): Add assertions. Adjust.
10998 (realloc_register_cache, set_register_cache): Delete.
10999 (registers_to_string, registers_from_string): Adjust.
11000 (find_register_by_name, find_regno, find_register_by_number)
11001 (register_cache_size): Add target_desc parameter, and use it.
11002 (free_register_cache_thread, free_register_cache_thread_one)
11003 (regcache_release, register_cache_size): New.
11004 (register_size): Add target_desc parameter, and use it.
11005 (register_data, supply_register, supply_register_zeroed)
11006 (supply_regblock, supply_register_by_name, collect_register)
11007 (collect_register_as_string, collect_register_by_name): Adjust.
11008 * regcache.h (struct target_desc): Forward declare.
11009 (struct regcache) <tdesc>: New field.
11010 (init_register_cache, new_register_cache): Add target_desc
11011 parameter.
11012 (regcache_invalidate_thread): Declare.
11013 (regcache_invalidate_one): Delete declaration.
11014 (regcache_release): Declare.
11015 (find_register_by_number, register_cache_size, register_size)
11016 (find_regno): Add target_desc parameter.
11017 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11018 declarations.
11019 * remote-utils.c: Include tdesc.h.
11020 (outreg, prepare_resume_reply): Adjust.
11021 * server.c: Include tdesc.h.
11022 (gdbserver_xmltarget): Delete declaration.
11023 (get_features_xml, process_serial_event): Adjust.
11024 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11025 declare.
11026 (struct process_info) <tdesc>: New field.
11027 (ipa_tdesc): Declare.
11028 * tdesc.c: New file.
11029 * tdesc.h: New file.
11030 * tracepoint.c: Include tdesc.h.
11031 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11032 (get_context_regcache): Adjust to pass ipa_tdesc down.
11033 (do_action_at_tracepoint): Adjust to get the register cache size
11034 from the context regcache's description.
11035 (traceframe_walk_blocks): Adjust to get the register cache size
11036 from the current trace frame's description.
11037 (traceframe_get_pc): Adjust to get current trace frame's
11038 description and pass it down.
11039 (gdb_collect): Adjust to get the register cache size from the
11040 IPA's description.
11041 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11042 (gdbserver_xmltarget): Delete.
11043 (initialize_low_tracepoint): Set the ipa's target description.
11044 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11045 (initialize_low_tracepoint): Set the ipa's target description.
11046 * linux-x86-low.c: Include tdesc.h.
11047 [__x86_64__] (is_64bit_tdesc): New.
11048 (ps_get_thread_area, x86_get_thread_area): Use it.
11049 (i386_cannot_store_register): Rename to ...
11050 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11051 (i386_cannot_fetch_register): Rename to ...
11052 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11053 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11054 to new interface.
11055 (target_regsets): Rename to ...
11056 (x86_regsets): ... this.
11057 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11058 interface.
11059 (x86_siginfo_fixup): Use is_64bit_tdesc.
11060 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11061 (tdesc_x32_avx_linux, tdesc_x32_linux)
11062 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11063 Declare.
11064 (x86_linux_update_xmltarget): Delete.
11065 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11066 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11067 (AMD64_LINUX_USER64_CS): New.
11068 (x86_linux_read_description): New, based on
11069 x86_linux_update_xmltarget.
11070 (same_process_callback): New.
11071 (x86_arch_setup_process_callback): New.
11072 (x86_linux_update_xmltarget): New.
11073 (x86_regsets_info): New.
11074 (amd64_linux_regs_info): New.
11075 (i386_linux_usrregs_info): New.
11076 (i386_linux_regs_info): New.
11077 (x86_linux_regs_info): New.
11078 (x86_arch_setup): Reimplement.
11079 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11080 (x86_emit_ops): Ditto.
11081 (the_low_target): Adjust. Install x86_linux_regs_info,
11082 x86_cannot_fetch_register, and x86_cannot_store_register.
11083 (initialize_low_arch): New.
11084 * linux-ia64-low.c (tdesc_ia64): Declare.
11085 (ia64_fetch_register): Adjust.
11086 (ia64_usrregs_info, regs_info): New globals.
11087 (ia64_regs_info): New function.
11088 (the_low_target): Adjust.
11089 (initialize_low_arch): New function.
11090 * linux-sparc-low.c (tdesc_sparc64): Declare.
11091 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11092 Adjust.
11093 (sparc_arch_setup): New function.
11094 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11095 (the_low_target): Adjust.
11096 (initialize_low_arch): New function.
11097 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11098 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11099 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11100 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11101 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11102 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11103 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11104 (tdesc_powerpc_isa205_vsx64l): Declare.
11105 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11106 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11107 (ppc_set_pc, ppc_get_hwcap): Adjust.
11108 (ppc_usrregs_info): Forward declare.
11109 (!__powerpc64__) ppc_regmap_adjusted: New global.
11110 (ppc_arch_setup): Adjust to the current process'es target
11111 description.
11112 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11113 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11114 (ppc_store_evrregset): Adjust.
11115 (target_regsets): Rename to ...
11116 (ppc_regsets): ... this, and make static.
11117 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11118 (ppc_regs_info): New function.
11119 (the_low_target): Adjust.
11120 (initialize_low_arch): New function.
11121 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11122 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11123 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11124 (tdesc_s390x_linux64v2): Declare.
11125 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11126 (s390_fill_gregset, s390_store_last_break): Adjust.
11127 (target_regsets): Rename to ...
11128 (s390_regsets): ... this, and make static.
11129 (s390_get_pc, s390_set_pc): Adjust.
11130 (s390_get_hwcap): New target_desc parameter, and use it.
11131 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11132 (s390_arch_setup): Adjust to set the current process'es target
11133 description. Don't adjust the regmap.
11134 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11135 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11136 (regs_info_3264): New globals.
11137 (s390_regs_info): New function.
11138 (the_low_target): Adjust.
11139 (initialize_low_arch): New function.
11140 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11141 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11142 [__mips64] (init_registers_mips_linux)
11143 (init_registers_mips_dsp_linux): Delete defines.
11144 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11145 (have_dsp): New global.
11146 (mips_read_description): New, based on mips_arch_setup.
11147 (mips_arch_setup): Reimplement.
11148 (get_usrregs_info): New function.
11149 (mips_cannot_fetch_register, mips_cannot_store_register)
11150 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11151 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11152 (target_regsets): Rename to ...
11153 (mips_regsets): ... this, and make static.
11154 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11155 (dsp_regs_info, regs_info): New globals.
11156 (mips_regs_info): New function.
11157 (the_low_target): Adjust.
11158 (initialize_low_arch): New function.
11159 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11160 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11161 Declare.
11162 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11163 (arm_read_description): New, with bits factored from
11164 arm_arch_setup.
11165 (arm_arch_setup): Reimplement.
11166 (target_regsets): Rename to ...
11167 (arm_regsets): ... this, and make static.
11168 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11169 (arm_regs_info): New function.
11170 (the_low_target): Adjust.
11171 (initialize_low_arch): New function.
11172 * linux-m68k-low.c (tdesc_m68k): Declare.
11173 (target_regsets): Rename to ...
11174 (m68k_regsets): ... this, and make static.
11175 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11176 (m68k_regs_info): New function.
11177 (m68k_arch_setup): New function.
11178 (the_low_target): Adjust.
11179 (initialize_low_arch): New function.
11180 * linux-sh-low.c (tdesc_sharch): Declare.
11181 (target_regsets): Rename to ...
11182 (sh_regsets): ... this, and make static.
11183 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11184 (sh_regs_info, sh_arch_setup): New functions.
11185 (the_low_target): Adjust.
11186 (initialize_low_arch): New function.
11187 * linux-bfin-low.c (tdesc_bfin): Declare.
11188 (bfin_arch_setup): New function.
11189 (bfin_usrregs_info, regs_info): New globals.
11190 (bfin_regs_info): New function.
11191 (the_low_target): Adjust.
11192 (initialize_low_arch): New function.
11193 * linux-cris-low.c (tdesc_cris): Declare.
11194 (cris_arch_setup): New function.
11195 (cris_usrregs_info, regs_info): New globals.
11196 (cris_regs_info): New function.
11197 (the_low_target): Adjust.
11198 (initialize_low_arch): New function.
11199 * linux-cris-low.c (tdesc_crisv32): Declare.
11200 (cris_arch_setup): New function.
11201 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11202 (cris_regs_info): New function.
11203 (the_low_target): Adjust.
11204 (initialize_low_arch): New function.
11205 * linux-m32r-low.c (tdesc_m32r): Declare.
11206 (m32r_arch_setup): New function.
11207 (m32r_usrregs_info, regs_info): New globals.
11208 (m32r_regs_info): Adjust.
11209 (initialize_low_arch): New function.
11210 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11211 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11212 (tic6x_usrregs_info): Forward declare.
11213 (tic6x_read_description): New function, based on ...
11214 (tic6x_arch_setup): ... this. Reimplement.
11215 (target_regsets): Rename to ...
11216 (tic6x_regsets): ... this, and make static.
11217 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11218 (tic6x_regs_info): New function.
11219 (the_low_target): Adjust.
11220 (initialize_low_arch): New function.
11221 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11222 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11223 (target_regsets): Rename to ...
11224 (xtensa_regsets): ... this, and make static.
11225 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11226 globals.
11227 (xtensa_arch_setup, xtensa_regs_info): New functions.
11228 (the_low_target): Adjust.
11229 (initialize_low_arch): New function.
11230 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11231 (nios2_arch_setup): Set the current process'es tdesc.
11232 (target_regsets): Rename to ...
11233 (nios2_regsets): ... this.
11234 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11235 (nios2_regs_info): New function.
11236 (the_low_target): Adjust.
11237 (initialize_low_arch): New function.
11238 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11239 (aarch64_arch_setup): Set the current process'es tdesc.
11240 (target_regsets): Rename to ...
11241 (aarch64_regsets): ... this.
11242 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11243 (aarch64_regs_info): New function.
11244 (the_low_target): Adjust.
11245 (initialize_low_arch): New function.
11246 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11247 globals.
11248 (target_regsets): Rename to ...
11249 (tile_regsets): ... this.
11250 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11251 (tile_regs_info): New function.
11252 (tile_arch_setup): Set the current process'es tdesc.
11253 (the_low_target): Adjust.
11254 (initialize_low_arch): New function.
11255 * spu-low.c (tdesc_spu): Declare.
11256 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11257 * win32-arm-low.c (tdesc_arm): Declare.
11258 (arm_arch_setup): New function.
11259 (the_low_target): Install arm_arch_setup instead of
11260 init_registers_arm.
11261 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11262 (init_windows_x86): Rename to ...
11263 (i386_arch_setup): ... this. Set `win32_tdesc'.
11264 (the_low_target): Adjust.
11265 * win32-low.c (win32_tdesc): New global.
11266 (child_add_thread): Don't create the thread cache here.
11267 (do_initial_child_stuff): Set the new process'es tdesc.
11268 * win32-low.h (struct target_desc): Forward declare.
11269 (win32_tdesc): Declare.
11270 * lynx-i386-low.c (tdesc_i386): Declare global.
11271 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11272 * lynx-low.c (lynx_tdesc): New global.
11273 (lynx_add_process): Set the new process'es tdesc.
11274 * lynx-low.h (struct target_desc): Forward declare.
11275 (lynx_tdesc): Declare global.
11276 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11277 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11278 * nto-low.c (nto_tdesc): New global.
11279 (do_attach): Set the new process'es tdesc.
11280 * nto-low.h (struct target_desc): Forward declare.
11281 (nto_tdesc): Declare.
11282 * nto-x86-low.c (tdesc_i386): Declare.
11283 (nto_x86_arch_setup): Set `nto_tdesc'.
11284
11285 2013-06-04 Gary Benson <gbenson@redhat.com>
11286
11287 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11288 to qSupported response when appropriate.
11289 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11290 with nonzero-length annex.
11291 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11292 arguments supplied in annex.
11293
11294 2013-05-31 Doug Evans <dje@google.com>
11295
11296 PR server/15594
11297 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11298 64 bits in 64-cross-32 environment.
11299
11300 2013-05-28 Pedro Alves <palves@redhat.com>
11301
11302 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11303 (aarch64-without-fpu.c): Delete rule.
11304 * configure.srv (aarch64*-*-linux*): Remove references to
11305 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11306 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11307 declaration.
11308
11309 2013-05-24 Pedro Alves <palves@redhat.com>
11310
11311 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11312 instead of strchr/decode_address. Error if the range isn't split
11313 with a ','. Don't assume there's be a ':' in the action.
11314
11315 2013-05-23 Yao Qi <yao@codesourcery.com>
11316 Pedro Alves <palves@redhat.com>
11317
11318 * linux-low.c (lwp_in_step_range): New function.
11319 (linux_wait_1): If the thread was range stepping and stopped
11320 outside the stepping range, report the stop to GDB. Otherwise,
11321 continue stepping. Add range stepping debug output.
11322 (linux_set_resume_request): Copy the step range from the resume
11323 request to the lwp.
11324 (linux_supports_range_stepping): New.
11325 (linux_target_ops) <supports_range_stepping>: Set to
11326 linux_supports_range_stepping.
11327 * linux-low.h (struct linux_target_ops)
11328 <supports_range_stepping>: New field.
11329 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11330 * linux-x86-low.c (x86_supports_range_stepping): New.
11331 (the_low_target) <supports_range_stepping>: Set to
11332 x86_supports_range_stepping.
11333 * server.c (handle_v_cont): Handle 'r' action.
11334 (handle_v_requests): Append ";r" if the target supports range
11335 stepping.
11336 * target.h (struct thread_resume) <step_range_start,
11337 step_range_end>: New fields.
11338 (struct target_ops) <supports_range_stepping>:
11339 New field.
11340 (target_supports_range_stepping): New macro.
11341
11342 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11343
11344 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11345 confusion in comment.
11346
11347 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11348
11349 * lynx-low.c (struct process_info_private): New type.
11350 (lynx_add_process): New function.
11351 (lynx_create_inferior, lynx_attach): Replace calls to
11352 add_process by calls to lynx_add_process.
11353 (lynx_resume): If PTID is null, then try using
11354 current_process()->private->last_wait_event_ptid.
11355 Add comments.
11356 (lynx_clear_inferiors): Delete. The contents of that function
11357 has been inlined in lynx_mourn;
11358 (lynx_wait_1): Save the ptid in the process's private data.
11359 (lynx_mourn): Free the process' private data. Replace call
11360 to lynx_clear_inferiors by call to clear_inferiors.
11361
11362 2013-05-17 Yao Qi <yao@codesourcery.com>
11363
11364 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11365 the right place.
11366
11367 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11368
11369 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11370 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11371 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11372 PT_TEXT_END_ADDR guards. Update comments.
11373 (linux_target_op) <read_offsets>: Conditionally define to
11374 linux_read_offsets if the target is UCLIBC and if it defines
11375 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11376
11377 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11378 Andrew Jenner <andrew@codesourcery.com>
11379
11380 * Makefile.in (SFILES): Add linux-nios2-low.c.
11381 (clean): Add action to delete nios2-linux.c.
11382 (nios2-linux.c): New rule.
11383 * configure.srv: Add nios2*-*-linux*.
11384 * linux-nios2-low.c: New.
11385
11386 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11387
11388 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11389
11390 2013-04-25 Hui Zhu <hui@codesourcery.com>
11391
11392 PR gdb/15186
11393 * ax.c (ax_printf): Add fflush.
11394
11395 2013-04-22 Tom Tromey <tromey@redhat.com>
11396
11397 * Makefile.in (SFILES): Add filestuff.c.
11398 (OBS): Add filestuff.o.
11399 (filestuff.o): New target.
11400 * config.in, configure: Rebuild.
11401 * configure.ac: Check for fdwalk, pipe2.
11402
11403 2013-04-17 Pedro Alves <palves@redhat.com>
11404
11405 * configure.ac (USE_THREAD_DB): Delete variable.
11406 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11407 Don't AC_SUBST USE_THREAD_DB.
11408 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11409 * config.in, configure: Regenerate.
11410
11411 2013-04-16 Pedro Alves <palves@redhat.com>
11412
11413 * linux-low.h (struct lwp_info) <thread_known>: Move under
11414 the USE_THREAD_DB #ifdef.
11415
11416 2013-04-16 Pedro Alves <palves@redhat.com>
11417
11418 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11419 (linux-low.o): Delete rule.
11420 * linux-low.h: Always include "gdb_thread_db.h" instead of
11421 conditionally including thread_db.h.
11422 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11423 HAVE_THREAD_DB_H.
11424
11425 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11426
11427 * Makefile.in (install-only): Fix make install regression.
11428
11429 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11430
11431 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11432 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11433 installation.
11434 * gdbserver.1: Remove.
11435
11436 2013-03-22 Pedro Alves <palves@redhat.com>
11437
11438 * linux-low.c (handle_extended_wait): Don't call
11439 linux_enable_event_reporting.
11440
11441 2013-03-15 Tony Theodore <tonyt@logyst.com>
11442
11443 PR build/9098:
11444 * Makefile.in (SHELL): Use @SHELL@.
11445
11446 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11447
11448 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11449 compiler warning.
11450
11451 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11452
11453 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11454 Remove extraneous NULL element.
11455
11456 2013-03-13 Yao Qi <yao@codesourcery.com>
11457
11458 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11459 'V' block in trace frame.
11460
11461 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11462
11463 * target.h (struct target_ops): Add btrace ops.
11464 (target_supports_btrace): New macro.
11465 (target_enable_btrace): New macro.
11466 (target_disable_btrace): New macro.
11467 (target_read_btrace): New macro.
11468 * gdbthread.h (struct thread_info): Add btrace field.
11469 * server.c: Include btrace-common.h.
11470 (handle_btrace_general_set): New function.
11471 (handle_btrace_enable): New function.
11472 (handle_btrace_disable): New function.
11473 (handle_general_set): Call handle_btrace_general_set.
11474 (handle_qxfer_btrace): New function.
11475 (struct qxfer qxfer_packets[]): Add btrace entry.
11476 * inferiors.c (remove_thread): Disable btrace.
11477 * linux-low: Include linux-btrace.h.
11478 (linux_low_enable_btrace): New function.
11479 (linux_low_read_btrace): New function.
11480 (linux_target_ops): Add btrace ops.
11481 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11482 Add srv_linux_btrace=yes.
11483 (x86_64-*-linux*): Add linux-btrace.o.
11484 Add srv_linux_btrace=yes.
11485 * configure.ac: Define HAVE_LINUX_BTRACE.
11486 * config.in: Regenerated.
11487 * configure: Regenerated.
11488
11489 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11490
11491 * server.c (handle_qxfer): Preserve error message if -3 is
11492 returned.
11493 (qxfer): Document the -3 return value.
11494
11495 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11496
11497 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11498 (linux_btrace_h): New variable.
11499 (linux-btrace.o): New rule.
11500
11501 2013-03-08 Stan Shebs <stan@codesourcery.com>
11502 Hafiz Abid Qadeer <abidh@codesourcery.com>
11503
11504 * tracepoint.c (trace_buffer_size): New global.
11505 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11506 (init_trace_buffer): Change to one-argument function. Allocate
11507 trace buffer memory.
11508 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11509 handle QTBuffer:size packet.
11510 (cmd_bigqtbuffer_size): New function.
11511 (initialize_tracepoint): Call init_trace_buffer with
11512 DEFAULT_TRACE_BUFFER_SIZE.
11513 * server.c (handle_query): Add QTBuffer:size in the
11514 supported packets.
11515
11516 2013-03-07 Yao Qi <yao@codesourcery.com>
11517
11518 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11519 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11520 of -1.
11521 (cmd_qtsp): Adjust condition. Do post increment.
11522 Set cur_action and cur_step_action back to 0.
11523
11524 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11525
11526 PR server/15236
11527 * linux-low.c (linux_write_memory): Return early success if LEN is
11528 zero.
11529
11530 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11531
11532 * configure.srv: Add x86_64-*-cygwin* as target.
11533
11534 2013-02-28 Tom Tromey <tromey@redhat.com>
11535
11536 * configure.ac: Invoke AC_SYS_LARGEFILE.
11537 * configure, config.in: Rebuild.
11538
11539 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11540
11541 * win32-low.c: Throughout, fix format strings and casts of
11542 printf-like functions to avoid type related warnings on all
11543 platforms.
11544 (get_child_debug_event): Print dwDebugEventCode as hex since
11545 that's how it's usually documented.
11546
11547 2013-02-28 Yao Qi <yao@codesourcery.com>
11548
11549 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11550 pulongest.
11551
11552 2013-02-27 Jiong Wang <jiwang@tilera.com>
11553
11554 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11555 (reg-tilegx32.c): New rule.
11556 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11557 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11558 different register info initializer according to elf class.
11559 (init_registers_tilgx32): New function. The tilegx32 register info
11560 initializer.
11561 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11562 (tile_store_gregset): Likewise.
11563
11564 2013-02-27 Yao Qi <yao@codesourcery.com>
11565
11566 * server.c (process_point_options): Print debug message when
11567 debug_threads is true.
11568
11569 2013-02-26 Yao Qi <yao@codesourcery.com>
11570
11571 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11572
11573 2013-02-19 Pedro Alves <palves@redhat.com>
11574 Kai Tietz <ktietz@redhat.com>
11575
11576 PR gdb/15161
11577
11578 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11579 instead of strtoul to extract address from packet.
11580 (process_serial_event) <'z'>: Likewise.
11581
11582 2013-02-18 Yao Qi <yao@codesourcery.com>
11583
11584 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11585
11586 2013-02-14 Pedro Alves <palves@redhat.com>
11587
11588 Plug memory leak.
11589
11590 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11591 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11592
11593 2013-02-14 Pedro Alves <palves@redhat.com>
11594
11595 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11596
11597 2013-02-14 Pedro Alves <palves@redhat.com>
11598
11599 * tracepoint.c (save_string): Delete.
11600 (add_tracepoint_action): Use savestring instead of save_string.
11601
11602 2013-02-12 Pedro Alves <palves@redhat.com>
11603
11604 * linux-xtensa-low.c: Ditto.
11605 * xtensa-xtregs.c: Ditto.
11606
11607 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11608
11609 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11610 thread_db.
11611
11612 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11613
11614 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11615 aarch64_num_wp_regs and aarch64_num_bp_regs to
11616 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11617
11618 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11619
11620 * linux-aarch64-low.c (ps_get_thread_area): Replace
11621 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11622
11623 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11624 Marcus Shawcroft <marcus.shawcroft@arm.com>
11625 Nigel Stephens <nigel.stephens@arm.com>
11626 Yufeng Zhang <yufeng.zhang@arm.com>
11627
11628 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11629 (aarch64.c, aarch64-without-fpu.c): New targets.
11630 * configure.srv (aarch64*-*-linux*): New.
11631 * linux-aarch64-low.c: New file.
11632
11633 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11634
11635 * linux-low.c (handle_extended_wait, linux_create_inferior)
11636 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11637 (dequeue_one_deferred_signal, linux_resume_one_thread)
11638 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11639 (linux_tracefork_grandchild, linux_test_for_tracefork)
11640 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11641 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11642 where the argument is 0.
11643
11644 2013-01-25 Yao Qi <yao@codesourcery.com>
11645
11646 * event-loop.c: Include "queue.h".
11647 (gdb_event_p): New typedef.
11648 (struct gdb_event) <next_event>: Remove.
11649 (event_queue): Change to QUEUE(gdb_event_p).
11650 (async_queue_event): Remove.
11651 (gdb_event_xfree): New.
11652 (initialize_event_loop): New.
11653 (process_event): Use API from QUEUE.
11654 (wait_for_event): Likewise.
11655 * server.c (main): Call initialize_event_loop.
11656 * server.h (initialize_event_loop): Declare.
11657
11658 2013-01-18 Yao Qi <yao@codesourcery.com>
11659
11660 * ax.h (struct eval_agent_expr_context): New.
11661 (gdb_eval_agent_expr): Update declaration.
11662 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11663 TFRAME. Add new argument CTX.
11664 * server.h (struct eval_agent_expr_context): Declare.
11665 (agent_mem_read, agent_tsv_read): Update declaration.
11666 (agent_mem_read_string): Likewise.
11667 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11668 (add_traceframe_block): Add new argument TPOINT.
11669 Increase TPOINT->traceframe_usage.
11670 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11671 eval_tracepoint_agent_expr.
11672 (condition_true_at_tracepoint): Likewise.
11673 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11674 (agent_mem_read_string, agent_tsv_read): Likewise.
11675
11676 2013-01-16 Yao Qi <yao@codesourcery.com>
11677
11678 * linux-low.c (linux_resume_one_lwp): Don't check
11679 'lwp->bp_reinsert != 0'.
11680
11681 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11682 Pedro Alves <palves@redhat.com>
11683
11684 * lynx-low.c (ptrace_request_to_str): Define a temporary
11685 macro and use it to simplify this function's implementation.
11686
11687 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11688
11689 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11690 sets errno.
11691
11692 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11693
11694 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11695
11696 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11697
11698 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11699
11700 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11701
11702 * lynx-low.c (lynx_resume): Use the resume_info parameter
11703 to determine the ptid for the lynx_ptrace call, unless
11704 it is equal to minus_one_ptid, in which case we use the
11705 ptid of the current_inferior.
11706 (lynx_wait_1): After having received a thread create/exit
11707 event, resume the inferior's execution using the signaling
11708 thread's ptid, rather than the old ptid.
11709
11710 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11711
11712 * lynx-low.c (lynx_resume): Delete variable ret.
11713
11714 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11715
11716 * gdbreplay.c (gdbreplay_version): Update copyright year.
11717 * server.c (gdbserver_version): Likewise.
11718
11719 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11720
11721 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11722 new thread.
11723
11724 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11725
11726 * lynx-low.c (ptrace_request_to_str): Add handling for
11727 PTRACE_GETTRACESIG.
11728
11729 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11730
11731 * lynx-low.c (lynx_attach): Delete variable new_process.
11732
11733 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11734
11735 * lynx-low.c (lynx_create_inferior): Delete variable
11736 new_process.
11737
11738 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11739
11740 * lynx-low.c (ptrace_request_to_str): Do not handle
11741 PTRACE_GETTHREADLIST if this macro does not exist.
11742
11743 2012-12-15 Yao Qi <yao@codesourcery.com>
11744
11745 * Makefile.in (OBS): Add notif.o.
11746 * notif.c, notif.h: New.
11747 * server.c: Include "notif.h".
11748 (struct vstop_notif) <next>: Remove.
11749 <base>: New field.
11750 (queue_stop_reply): Update.
11751 (push_event, send_next_stop_reply): Remove.
11752 (discard_queued_stop_replies): Update.
11753 (notif_stop): New variable.
11754 (handle_v_stopped): Remove.
11755 (handle_v_requests): Don't call handle_v_stopped. Call
11756 handle_ack_notif instead.
11757 (queue_stop_reply_callback): Call notif_event_enque instead
11758 of queue_stop_reply.
11759 (handle_status): Don't call send_next_stop_reply, call
11760 notif_write_event instead.
11761 (kill_inferior_callback): Likewise.
11762 (detach_or_kill_inferior_callback): Likewise.
11763 (main): Call initialize_notif.
11764 (process_serial_event): Call QUEUE_is_empty.
11765 (handle_target_event): Call notif_push instead of push event.
11766 * server.h (push_event): Remove declaration.
11767
11768 2012-12-10 Tom Tromey <tromey@redhat.com>
11769
11770 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11771 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11772 macros.
11773 (.c.o): Rewrite.
11774 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11775 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11776 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11777 (amd64-linux-ipa.o, ax.o): Rewrite.
11778 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11779 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11780 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11781 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11782 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11783 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11784 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11785 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11786 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11787 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11788 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11789 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11790 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11791 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11792 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11793 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11794 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11795 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11796 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11797 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11798 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11799 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11800 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11801 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11802 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11803 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11804 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11805 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11806 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11807 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11808 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11809 (reg-tilegx.o): Remove.
11810 (all_object_files): New macro.
11811 Include .deps files.
11812 * aclocal.m4, configure: Rebuild.
11813 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11814 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11815 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11816
11817 2012-12-05 Tom Tromey <tromey@redhat.com>
11818
11819 PR gdb/14917:
11820 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11821
11822 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11823
11824 * configure.ac: Check for linux/perf_event.h.
11825 * config.in: Regenerated.
11826 * configure: Regenerated.
11827
11828 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11829
11830 * hostio.c (handle_readlink): Decrease buffer size
11831 parameter passed to readlink by one byte.
11832
11833 2012-11-26 Yao Qi <yao@codesourcery.com>
11834
11835 * configure.ac (build_warnings): Append '-Wempty-body'.
11836 * configure: Regenerated.
11837 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11838 body.
11839
11840 2012-11-15 Pierre Muller <muller@sourceware.org>
11841
11842 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11843 * config.in: Regenerate.
11844 * configure: Regenerate.
11845 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11846 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11847 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11848 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11849 header.
11850 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11851 instead of <sys/wait.h> header.
11852 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11853
11854 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11855
11856 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11857 (various make rules): Remove -DGDBSERVER
11858
11859 2012-11-09 Yao Qi <yao@codesourcery.com>
11860
11861 * spu-low.c (current_ptid): Move it to ..
11862 * gdbthread.h: ... here. New.
11863 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11864 * server.c (myresume, process_serial_event): Likewise.
11865 * thread-db.c (thread_db_find_new_threads): Likewise.
11866 * tracepoint.c (run_inferior_command): Likewise.
11867
11868 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11869
11870 * server.c (handle_search_memory_1): Include access length in
11871 warning message.
11872
11873 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11874
11875 * linux-crisv32-low.c: Fix compile errors.
11876
11877 2012-09-04 Yao Qi <yao@codesourcery.com>
11878
11879 * tracepoint.c (cmd_qtsv): Adjust debug message.
11880 Don't check CUR_TPOINT.
11881
11882 2012-08-28 Yao Qi <yao@codesourcery.com>
11883
11884 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11885 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11886 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11887 Remove declarations of xmalloc, xreallloc, xstrdup and
11888 freeargv.
11889 * Makefile.in (libiberty_h): New.
11890 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11891 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11892
11893 2012-08-23 Yao Qi <yao@codesourcery.com>
11894
11895 * server.h: Remove declaration of 'xsnprintf'.
11896
11897 2012-08-22 Keith Seitz <keiths@redhat.com>
11898
11899 * server.h: Include build-gnulib-gbserver/config.h.
11900 * gdbreplay.c: Likewise.
11901
11902 2012-08-08 Doug Evans <dje@google.com>
11903
11904 * Makefile.in (SFILES): Add gdb_vecs.c.
11905 (OBS): Add gdb_vecs.o.
11906 (gdb_vecs_h, host_defs_h): New variables.
11907 (thread-db.o): Add $(gdb_vecs_h) dependency.
11908 (gdb_vecs.o): New rule.
11909 * thread-db.c: #include "gdb_vecs.h".
11910 (thread_db_load_search): Use a vector to iterate over path elements.
11911 Handle text appearing after "$pdir".
11912
11913 * configure.ac: Add check for strstr.
11914 * config.in: Regenerate.
11915 * configure: Regenerate.
11916
11917 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11918
11919 * hostio.c (handle_pread): If pread fails, fall back to attempting
11920 lseek/read.
11921 (handle_pwrite): Likewise for pwrite.
11922
11923 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11924
11925 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11926 between unsupported TYPE and unimplementable ADDR/LEN combination.
11927 (arm_insert_point): Act on new return value.
11928
11929 2012-07-31 Pedro Alves <palves@redhat.com>
11930
11931 * server.c (process_point_options): Only skip tokens if we find
11932 one that is unrecognized. Don't treat 'X' specially while
11933 skipping unrecognized tokens.
11934
11935 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11936
11937 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11938 to 4-byte-align HW breakpoint addresses for Thumb.
11939
11940 2012-07-27 Yao Qi <yao@codesourcery.com>
11941
11942 PR remote/14161.
11943
11944 * server.h: Declare gdb_agent_about_to_close.
11945 * target.c (kill_inferior): Include "agent.h".
11946 New. Send command 'kill'.
11947 * target.h (kill_inferior): Removed macro.
11948 * tracepoint.c (gdb_agent_about_to_close): New.
11949 (gdb_agent_helper_thread): Handle command 'close'.
11950 Wait endlessly until the inferior stops.
11951 Install gdb_agent_remove_socket to atexit hook.
11952 (agent_socket_name): New static variable.
11953 (gdb_agent_socket_init): Replace local variable 'name' with
11954 'agent_socket_name'.
11955 (gdb_agent_remove_socket): New.
11956
11957 2012-07-27 Yao Qi <yao@codesourcery.com>
11958
11959 * server.c (process_point_options): Stop at 'X' when parsing.
11960
11961 2012-07-19 Michael Eager <eager@eagercon.com>
11962
11963 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11964 to hw_execute.
11965 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11966 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11967 hardware breakpoint.
11968
11969 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11970
11971 * gdbserver/linux-low.c (initialize_low): Call
11972 linux_ptrace_init_warnings.
11973
11974 2012-07-02 Doug Evans <dje@google.com>
11975
11976 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11977 pointer to int.
11978
11979 2012-07-02 Stan Shebs <stan@codesourcery.com>
11980
11981 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
11982 (ax.o): Add it to build rule.
11983 (ax-ipa.o): Ditto.
11984 (OBS): Add format.o.
11985 (IPA_OBS): Add format.o.
11986 * server.c (handle_query): Claim support for breakpoint commands.
11987 (process_point_options): Add command case.
11988 (process_serial_event): Leave running if there are printfs in
11989 effect.
11990 * mem-break.h (any_persistent_commands): Declare.
11991 (add_breakpoint_commands): Declare.
11992 (gdb_no_commands_at_breakpoint): Declare.
11993 (run_breakpoint_commands): Declare.
11994 * mem-break.c (struct point_command_list): New struct.
11995 (struct breakpoint): New field command_list.
11996 (any_persistent_commands): New function.
11997 (add_commands_to_breakpoint): New function.
11998 (add_breakpoint_commands): New function.
11999 (gdb_no_commands_at_breakpoint): New function.
12000 (run_breakpoint_commands): New function.
12001 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12002 locally.
12003 * ax.c: Include format.h.
12004 (ax_printf): New function.
12005 (gdb_eval_agent_expr): Add printf opcode.
12006
12007 2012-06-13 Yao Qi <yao@codesourcery.com>
12008
12009 * server.c (start_inferior): Remove duplicated writes to fields
12010 'last_resume_kind' and 'last_status' of 'current_inferior'.
12011
12012 2012-06-12 Yao Qi <yao@codesourcery.com>
12013 Pedro Alves <palves@redhat.com>
12014
12015 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12016 comment.
12017 * server.c (handle_v_cont): Extend comment.
12018
12019 2012-06-11 Yao Qi <yao@codesourcery.com>
12020
12021 * linux-low.c (linux_attach): Add 'static'.
12022
12023 2012-06-06 Yao Qi <yao@codesourcery.com>
12024
12025 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12026
12027 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12028
12029 Fix gcc -flto compilation warning.
12030 * server.c (main): Make variable multi_mode and attach volatile.
12031
12032 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12033
12034 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12035 if the platform doesn't know about it.
12036
12037 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12038
12039 * Makefile.in (SFILES): Add linux-tile-low.c.
12040 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12041 * configure.srv: Handle tilegx-*-linux*.
12042 * linux-tile-low.c: New file.
12043
12044 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12045
12046 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12047
12048 2012-05-24 Pedro Alves <palves@redhat.com>
12049
12050 PR gdb/7205
12051
12052 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12053
12054 2012-05-24 Pedro Alves <palves@redhat.com>
12055
12056 PR gdb/7205
12057
12058 Replace target_signal with gdb_signal throughout.
12059
12060 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12061
12062 * linux-low.c (linux_store_registers): Avoid the copying sequence
12063 when no data has been retrieved by ptrace.
12064
12065 2012-05-22 Will Deacon <will.deacon@arm.com>
12066
12067 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12068 Include asm/ptrace.h.
12069 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12070 already defined.
12071
12072 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12073
12074 * linux-low.c (linux_store_registers): Don't re-retrieve data
12075 with ptrace that has already been obtained from /proc. Always
12076 copy any data retrieved with ptrace to the buffer supplied.
12077
12078 2012-05-11 Yao Qi <yao@codesourcery.com>
12079 Pedro Alves <palves@redhat.com>
12080
12081 * linux-low.c (enum stopping_threads_kind): New.
12082 (stopping_threads): Change type to `enum stopping_threads_kind'.
12083 (handle_extended_wait): If stopping and suspending threads, leave
12084 the new_lwp suspended too.
12085 (linux_wait_for_event): Adjust.
12086 (stop_all_lwps): Set `stopping_threads' to
12087 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12088 whether we're suspending threads or just stopping them. Assert no
12089 recursion happens.
12090
12091 2012-04-29 Yao Qi <yao@codesourcery.com>
12092
12093 * server.h: Move some code to ...
12094 * gdbthread.h: ... here. New.
12095 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12096 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12097 (nto-low.o, win32-low.o): Likewise.
12098 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12099 * regcache.c, remote-utils.c, server.c: Likewise.
12100 * target.c, tracepoint.c, win32-low.c: Likewise.
12101
12102 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12103
12104 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12105 (PTRACE_ARG4_TYPE): Likewise.
12106 (PTRACE_XFER_TYPE): Likewise.
12107 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12108 ptrace to PTRACE_ARG3_TYPE.
12109 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12110 (PTRACE_ARG4_TYPE): Likewise.
12111 (PTRACE_XFER_TYPE): Likewise.
12112 (linux_detach_one_lwp): Cast fourth argument of
12113 ptrace to long then PTRACE_ARG4_TYPE.
12114 (regsets_fetch_inferior_registers): Cast third argument of
12115 ptrace to long then PTRACE_ARG3_TYPE.
12116 (regsets_store_inferior_registers): Likewise.
12117
12118 2012-04-20 Pedro Alves <palves@redhat.com>
12119
12120 * configure: Regenerate.
12121
12122 2012-04-19 Pedro Alves <palves@redhat.com>
12123
12124 * Makefile.in (GNULIB_BUILDDIR): New.
12125 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12126 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12127 (all, install-only, uninstall, clean-info, all-lib, clean): No
12128 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12129 (maintainer-clean realclean distclean): Use subdir_do.
12130 (subdir_do): New.
12131 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12132 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12133 * acinclude.m4: Include acx_configure_dir.m4.
12134 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12135 calls. Call AC_PROG_RANLIB. Configure gnulib using
12136 ACX_CONFIGURE_DIR.
12137 (GNULIB): New.
12138 (GNULIB_STDINT_H): Adjust.
12139 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12140 * gdbreplay.c: Include build-gnulib/config.h.
12141 * server.h: Likewise.
12142 * aclocal.m4: Regenerate.
12143 * config.in: Regenerate.
12144 * configure: Regenerate.
12145
12146 2012-04-19 Pedro Alves <palves@redhat.com>
12147
12148 * Makefile.in (LIBGNU, INCGNU): Adjust.
12149 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12150 (all, install-only, uninstall, clean-info, all-lib, clean)
12151 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12152 * configure.ac: Adjust AC_OUTPUT output.
12153 * aclocal.m4: Regenerate.
12154 * configure: Regenerate.
12155
12156 2012-04-19 Pedro Alves <palves@redhat.com>
12157
12158 * Makefile.in (generated_files): New.
12159 (server_h): Remove the explicit dependency on config.h, and depend
12160 on $generated_files.
12161
12162 2012-04-19 Pedro Alves <palves@redhat.com>
12163
12164 * Makefile.in (INCGNU): Add -Ignulib.
12165
12166 2012-04-19 Pedro Alves <palves@redhat.com>
12167
12168 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12169 (INCGNU): ... this, and spell out -I here.
12170 (GNULIB_LIB): Rename to ...
12171 (LIBGNU): ... this.
12172 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12173
12174 2012-04-19 Pedro Alves <palves@redhat.com>
12175
12176 * config.in: Regenerate.
12177
12178 2012-04-19 Pedro Alves <palves@redhat.com>
12179
12180 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12181 * server.h (memmem): Remove declaration.
12182 * config.in: Regenerate.
12183 * configure: Regenerate.
12184
12185 2012-04-19 Yao Qi <yao@codesourcery.com>
12186
12187 * Makefile.in (SFILES): Add common/vec.c.
12188 (OBS): Add vec.o.
12189 (vec.o): New rule.
12190
12191 2012-04-19 Yao Qi <yao@codesourcery.com>
12192
12193 * remote-utils.c (prepare_resume_reply): Replace with macro
12194 target_core_of_thread.
12195 * server.c (handle_qxfer_threads_proper): Likewise.
12196 * target.h (traget_core_of_thread): New macro.
12197
12198 2012-04-18 Pedro Alves <palves@redhat.com>
12199
12200 * aclocal.m4: Regenerate.
12201 * configure: Regenerate.
12202
12203 2012-04-16 Yao Qi <yao@codesourcery.com>
12204
12205 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12206 duplicated on address.
12207
12208 2012-04-16 Yao Qi <yao@codesourcery.com>
12209
12210 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12211 (struct tracepoint_action_ops) <send>: New field.
12212 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12213 (agent_expr_send, x_tracepoint_action_send): New.
12214 (l_tracepoint_action_send): New.
12215 (cmd_qtdp): Download and install tracepoint
12216 according to `use_agent'.
12217 (run_inferior_command): Add one more parameter `len'.
12218 Update callers.
12219 (tracepoint_send_agent): New.
12220 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12221
12222 2012-04-16 Yao Qi <yao@codesourcery.com>
12223
12224 * tracepoint.c (download_tracepoints): Moved to ...
12225 (cmd_qtstart): ... here.
12226
12227 2012-04-14 Yao Qi <yao@codesourcery.com>
12228
12229 * tracepoint.c: Include inttypes.h.
12230 (struct collect_memory_action): Use sized types.
12231 (struct tracepoint): Likewise.
12232 (cmd_qtdp, stop_tracing): Update print specifiers.
12233 (cmd_qtp, response_tracepoint): Likewise.
12234 (collect_data_at_tracepoint): Likewise.
12235 (collect_data_at_step): Likewise.
12236
12237 2012-04-14 Yao Qi <yao@codesourcery.com>
12238
12239 Import gnulib module inttypes.
12240 * aclocal.m4, config.in, configure: Regenerated.
12241
12242 2012-04-14 Yao Qi <yao@codesourcery.com>
12243
12244 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12245 Makefile and config.status at last.
12246
12247 2012-04-13 Yao Qi <yao@codesourcery.com>
12248
12249 * tracepoint.c: Include stdint.h unconditionally.
12250
12251 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12252
12253 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12254 on BFD_HAVE_SYS_PROCFS_TYPE.
12255 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12256 * configure: Regenerate.
12257 * config.in: Likewise.
12258
12259 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12260
12261 * Makefile.in (clean): Also remove x32.c x32-linux.c
12262 x32-avx.c x32-avx-linux.c.
12263 (x32.o): New target.
12264 (x32.c): Likewise.
12265 (x32-linux.o): Likewise.
12266 (x32-linux.c): Likewise.
12267 (x32-avx.o): Likewise.
12268 (x32-avx.c): Likewise.
12269 (x32-avx-linux.o): Likewise.
12270 (x32-avx-linux.c): Likewise.
12271
12272 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12273 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12274 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12275 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12276 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12277 i386/x32-avx-linux.xml.
12278
12279 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12280 (init_registers_x32_avx_linux): Likwise.
12281 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12282 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12283
12284 2012-04-13 Pedro Alves <palves@redhat.com>
12285
12286 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12287 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12288 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12289 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12290 the sub-make.
12291
12292 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12293
12294 * linux-x86-low.c (compat_x32_clock_t): New.
12295 (compat_x32_siginfo_t): Likewise.
12296 (compat_x32_siginfo_from_siginfo): Likewise.
12297 (siginfo_from_compat_x32_siginfo): Likewise.
12298 (linux_is_elf64): Likewise.
12299 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12300 and siginfo_from_compat_x32_siginfo for x32.
12301 (x86_arch_setup): Set linux_is_elf64.
12302
12303 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12304
12305 PR gdb/13969
12306 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12307 e_machine field.
12308 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12309 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12310 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12311 compatible with process.
12312
12313 2012-04-12 Yao Qi <yao@codesourcery.com>
12314
12315 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12316 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12317 (install-only, install-info, clean): Handle sub dir gnulib.
12318 (all-lib, am--refresh): New targets.
12319 (memmem.o): Remove target.
12320 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12321 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12322 (AC_REPLACE_FUNCS): Remove memmem.
12323 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12324 (AC_OUTPUT): Generate Makefile in gnulib/.
12325 * aclocal.m4, config.in, configure: Regenerated.
12326
12327 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12328
12329 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12330
12331 2012-04-05 Pedro Alves <palves@redhat.com>
12332
12333 -Werror=strict-aliasing
12334
12335 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12336 pointer.
12337
12338 2012-04-04 Pedro Alves <palves@redhat.com>
12339
12340 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12341 (sparc_store_gregset_from_stack, sparc_store_gregset)
12342 (sparc_breakpoint_at): Fix formatting.
12343
12344 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12345
12346 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12347 are available.
12348 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12349 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12350 * config.in: Regenerate.
12351 * configure: Likewise.
12352
12353 2012-03-29 Pedro Alves <palves@redhat.com>
12354
12355 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12356 Correct ptrace arguments.
12357
12358 2012-03-28 Pedro Alves <palves@redhat.com>
12359
12360 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12361 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12362 (IA64_FR1_REGNUM): New defines.
12363 (ia64_fetch_register): New.
12364 (the_low_target): Install it.
12365 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12366 field.
12367 * linux-low.c (linux_fetch_registers): Try the
12368 the_low_target.fetch_register hook first.
12369
12370 * linux-arm-low.c (the_low_target): Adjust.
12371 * linux-bfin-low.c (the_low_target): Adjust.
12372 * linux-cris-low.c (the_low_target): Adjust.
12373 * linux-crisv32-low.c (the_low_target): Adjust.
12374 * linux-m32r-low.c (the_low_target): Adjust.
12375 * linux-m68k-low.c (the_low_target): Adjust.
12376 * linux-mips-low.c (the_low_target): Adjust.
12377 * linux-ppc-low.c (the_low_target): Adjust.
12378 * linux-s390-low.c (the_low_target): Adjust.
12379 * linux-sh-low.c (the_low_target): Adjust.
12380 * linux-sparc-low.c (the_low_target): Adjust.
12381 * linux-tic6x-low.c (the_low_target): Adjust.
12382 * linux-x86-low.c (the_low_target): Adjust.
12383 * linux-xtensa-low.c (the_low_target): Adjust.
12384
12385 2012-03-26 Pedro Alves <palves@redhat.com>
12386
12387 * server.c (handle_qxfer_libraries): Don't bail early if
12388 the_target->qxfer_libraries_svr4 is not NULL.
12389
12390 2012-03-26 Pedro Alves <palves@redhat.com>
12391
12392 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12393
12394 2012-03-23 Pedro Alves <palves@redhat.com>
12395
12396 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12397 "library-list-svr4" element's start tag when the the DSO list is
12398 empty.
12399
12400 2012-03-23 Pedro Alves <palves@redhat.com>
12401
12402 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12403 a variable whose type size is the same as the inferior's pointer
12404 size.
12405
12406 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12407
12408 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12409 struct siginfo.
12410 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12411 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12412 * linux-low.h: Include <signal.h>.
12413 (struct siginfo): Remove forward declaration.
12414 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12415 struct siginfo.
12416
12417 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12418
12419 * .gitignore: Ignore more files.
12420
12421 2012-03-19 Pedro Alves <palves@redhat.com>
12422 Jan Kratochvil <jan.kratochvil@redhat.com>
12423
12424 * server.c (cont_thread, general_thread): Add describing comments.
12425 (start_inferior): Clear `cont_thread'.
12426 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12427 of a process.
12428
12429 2012-03-15 Yao Qi <yao@codesourcery.com>
12430
12431 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12432 handling to ...
12433 (cmd_qtdp): ... here.
12434
12435 2012-03-15 Yao Qi <yao@codesourcery.com>
12436
12437 * tracepoint.c (struct tracepoint_action_ops): New.
12438 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12439 (m_tracepoint_action_download): New.
12440 (r_tracepoint_action_download): New.
12441 (x_tracepoint_action_download): New.
12442 (l_tracepoint_action_download): New.
12443 (add_tracepoint_action): Install `action->ops' according type.
12444 (download_tracepoint_1): Move code `download' function pointer
12445 of various tracepoint_action_ops.
12446
12447 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12448
12449 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12450 linux_ptrace_attach_warnings.
12451
12452 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12453
12454 * Makefile.in (linux-ptrace.o): New.
12455 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12456 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12457 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12458 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12459 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12460 of these targets.
12461 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12462
12463 2012-03-08 Yao Qi <yao@codesourcery.com>
12464 Pedro Alves <palves@redhat.com>
12465
12466 Fix PR server/13392.
12467 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12468 offset of JMP insn.
12469 * tracepoint.c (remove_tracepoint): New.
12470 (cmd_qtdp): Call remove_tracepoint when failed to install.
12471
12472 2012-03-07 Pedro Alves <palves@redhat.com>
12473
12474 * linux-low.c (get_detach_signal): New.
12475 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12476 Pass on pending signals to PTRACE_DETACH. Check the result of the
12477 ptrace call.
12478 * server.c (program_signals, program_signals_p): New.
12479 (handle_general_set): Handle QProgramSignals.
12480 * server.h (program_signals, program_signals_p): Declare.
12481
12482 2012-03-05 Pedro Alves <palves@redhat.com>
12483 Jan Kratochvil <jan.kratochvil@redhat.com>
12484
12485 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12486 New comment why.
12487
12488 2012-03-03 Yao Qi <yao@codesourcery.com>
12489
12490 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12491 agent_look_up_symbols.
12492
12493 2012-03-03 Yao Qi <yao@codesourcery.com>
12494
12495 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12496 (linux-x86-low.o): Likewise.
12497 * server.h: Remove in_process_agent_loaded.
12498 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12499 common/agent.c.
12500 Update callers.
12501
12502 2012-03-03 Yao Qi <yao@codesourcery.com>
12503
12504 * tracepoint.c (gdb_agent_capability): New global.
12505 (in_process_agent_loaded_ust): Renamed to
12506 `in_process_agent_supports_ust'.
12507 Update callers.
12508 (in_process_agent_supports_ust): Call agent_capability_check.
12509 (clear_installed_tracepoints): Assert that agent supports
12510 agent.
12511
12512 2012-03-03 Yao Qi <yao@codesourcery.com>
12513
12514 * linux-low.c (linux_supports_agent): New.
12515 (linux_target_ops): Initialize field `supports_agent' with
12516 linux_supports_agent.
12517 * target.h (struct target_ops) <supports_agent>: New.
12518 (target_supports_agent): New macro.
12519 * server.c (handle_general_set): Handle packet 'QAgent'.
12520 (handle_query): Send `QAgent+'.
12521 * Makefile.in (server.o): Depends on agent.h.
12522
12523 2012-03-03 Yao Qi <yao@codesourcery.com>
12524
12525 * Makefile.in (OBS): Add agent.o.
12526 Add new rule for agent.o.
12527 Track dependence of tracepoint.c on agent.h.
12528 * tracepoint.c (run_inferior_command_1):
12529 (run_inferior_command): Call agent_run_command.
12530 (gdb_ust_connect_sync_socket): Deleted. Move it to
12531 common/agent.c.
12532 (resume_thread, stop_thread): Likewise.
12533 (gdb_ust_socket_init): Renamed to ...
12534 (gdb_agent_socket_init): ... New.
12535 (gdb_ust_thread): Renamed to ...
12536 (gdb_agent_helper_thread): ... New.
12537 (gdb_ust_init): Move some code to ...
12538 (gdb_agent_init): ... here. New.
12539 [HAVE_UST]: Call gdb_ust_init.
12540 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12541 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12542 * config.in, configure: Regenerated.
12543
12544 2012-03-02 Pedro Alves <palves@redhat.com>
12545
12546 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12547 * linux-low.c (struct simple_pid_list): New.
12548 (stopped_pids): New a struct simple_pid_list pointer.
12549 (add_to_pid_list, pull_pid_from_list): New.
12550 (handle_extended_wait): Don't assume the first signal new children
12551 report is SIGSTOP. Adjust call to pull_pid_from_list.
12552 (linux_wait_for_lwp): Adjust.
12553
12554 2012-03-02 Yao Qi <yao@codesourcery.com>
12555
12556 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12557 debug log.
12558
12559 2012-03-02 Yao Qi <yao@codesourcery.com>
12560
12561 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12562 `stop_pc' and `tpoint'. Update caller.
12563
12564 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12565
12566 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12567 * linux-low.c (use_linux_regsets): New macro.
12568 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12569 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12570 (linux_register_in_regsets): New function.
12571 (usr_fetch_inferior_registers): Skip registers covered by
12572 regsets.
12573 (usr_store_inferior_registers): Likewise.
12574 (usr_fetch_inferior_registers): New macro.
12575 (usr_store_inferior_registers): Likewise.
12576 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12577 (linux_store_registers): Likewise.
12578 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12579 prototype.
12580 (init_registers_mips64_dsp_linux): Likewise.
12581 (init_registers_mips_linux): New macro.
12582 (init_registers_mips_dsp_linux): Likewise.
12583 (mips_dsp_num_regs): Likewise.
12584 (DSP_BASE, DSP_CONTROL): New fallback macros.
12585 (mips_base_regs): New macro.
12586 (mips_regmap): Use it. Fix the size.
12587 (mips_dsp_regmap): New variable.
12588 (mips_dsp_regset_bitmap): Likewise.
12589 (mips_arch_setup): New function.
12590 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12591 than mips_regmap.
12592 (mips_cannot_store_register): Likewise.
12593 (the_low_target): Update .arch_setup, .num_regs and .regmap
12594 initializers. Add .regset_bitmap initializer.
12595 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12596 initializer.
12597 * linux-bfin-low.c (the_low_target): Likewise.
12598 * linux-cris-low.c (the_low_target): Likewise.
12599 * linux-crisv32-low.c (the_low_target): Likewise.
12600 * linux-ia64-low.c (the_low_target): Likewise.
12601 * linux-m32r-low.c (the_low_target): Likewise.
12602 * linux-m68k-low.c (the_low_target): Likewise.
12603 * linux-ppc-low.c (the_low_target): Likewise.
12604 * linux-s390-low.c (the_low_target): Likewise.
12605 * linux-sh-low.c (the_low_target): Likewise.
12606 * linux-sparc-low.c (the_low_target): Likewise.
12607 * linux-tic6x-low.c (the_low_target): Likewise.
12608 * linux-x86-low.c (the_low_target): Likewise.
12609 * linux-xtensa-low.c (the_low_target): Likewise.
12610 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12611 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12612 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12613 srv_xmlfiles.
12614 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12615 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12616
12617 2012-02-29 Yao Qi <yao@codesourcery.com>
12618 Pedro Alves <palves@redhat.com>
12619
12620 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12621 `step_over_finished' is true.
12622
12623 2012-02-27 Pedro Alves <palves@redhat.com>
12624
12625 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12626 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12627
12628 2012-02-27 Pedro Alves <palves@redhat.com>
12629
12630 PR server/9684
12631 * linux-low.c (pid_is_stopped): New.
12632 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12633
12634 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12635
12636 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12637 of conditions.
12638
12639 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12640
12641 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12642
12643 2012-02-24 Luis Machado <lgustavo@codesourcery>
12644
12645 * server.c (handle_query): Advertise support for target-side
12646 breakpoint condition evaluation.
12647 (process_point_options): New function.
12648 (process_serial_event): When inserting a breakpoint, check for
12649 a target-side condition that should be evaluated.
12650
12651 * mem-break.c: Include regcache.h and ax.h.
12652 (point_cond_list_t): New data structure.
12653 (breakpoint) <cond_list>: New field.
12654 (find_gdb_breakpoint_at): Make non-static.
12655 (delete_gdb_breakpoint_at): Clear any target-side
12656 conditions.
12657 (clear_gdb_breakpoint_conditions): New function.
12658 (add_condition_to_breakpoint): Likewise.
12659 (add_breakpoint_condition): Likewise.
12660 (gdb_condition_true_at_breakpoint): Likewise.
12661 (gdb_breakpoint_here): Return result directly instead
12662 of going through a local variable.
12663
12664 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12665 (clear_gdb_breakpoint_conditions): Likewise.
12666 (add_breakpoint_condition): Likewise.
12667 (gdb_condition_true_at_breakpoint): Likewise.
12668
12669 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12670 (need_step_over_p): Take target-side breakpoint condition into
12671 consideration.
12672
12673 2012-02-24 Luis Machado <lgustavo@codesourcery>
12674
12675 * server.h: Include tracepoint.h.
12676 (agent_mem_read, agent_get_trace_state_variable_value,
12677 agent_set_trace_state_variable_value,
12678 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12679 get_set_tsv_func_addr): New prototypes.
12680
12681 * ax.h: New include file.
12682 * ax.c: New source file.
12683
12684 * tracepoint.c: Include ax.h.
12685 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12686 agent_expr, eval_result_type): Move to ax.h.
12687 (parse_agent_expr): Rename to ...
12688 (gdb_parse_agent_expr): ... this, make it non-static and move
12689 to ax.h.
12690 (unparse_agent_expr) Rename to ...
12691 (gdb_unparse_agent_expr): ... this, make it non-static and move
12692 to ax.h.
12693 (eval_agent_expr): Rename to ...
12694 (eval_tracepoint_agent_expr): ... this.
12695 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12696 forward declarations.
12697 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12698 (agent_get_trace_state_variable_value): New function.
12699 (agent_set_trace_state_variable_value): New function.
12700 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12701 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12702 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12703 (condition_true_at_tracepoint): Likewise.
12704 (parse_agent_expr): Rename to ...
12705 (gdb_parse_agent_expr): ... this and move to ax.c.
12706 (unparse_agent_expr): Rename to ...
12707 (gdb_unparse_agent_expr): ... this and move to ax.c.
12708 (gdb_agent_op_name): Move to ax.c.
12709 (eval_agent_expr): Rename to ...
12710 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12711 and move to ax.c.
12712 (eval_tracepoint_agent_expr): New function.
12713 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12714 non-static.
12715 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12716 ax.c.
12717 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12718 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12719 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12720 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12721 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12722 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12723 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12724 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12725 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12726 (compile_bytecodes): Remove forward declaration.
12727 (is_goto_target): Move to ax.c.
12728 (compile_bytecodes): Move to ax.c and call
12729 agent_get_trace_state_variable_value (...) and
12730 agent_set_trace_state_variable_value (...).
12731
12732 * Makefile.in: Update ax.c and IPA dependencies.
12733
12734 2012-02-24 Pedro Alves <palves@redhat.com>
12735
12736 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12737 (cmd_bigqtbuffer_circular): ... this. Only handle
12738 'QTBuffer:circular:'.
12739 (handle_tracepoint_general_set): Adjust.
12740
12741 2012-02-16 Yao Qi <yao@codesourcery.com>
12742
12743 * inferiors.c: Move code to ...
12744 * dll.c: .... here. New.
12745 * server.h: Declare clear_dlls.
12746 * Makefile.in (SFILES): Add dll.c.
12747 (OBS): Add dll.o
12748 (dll.o): New rule.
12749
12750 2012-02-11 Yao Qi <yao@codesourcery.com>
12751
12752 * server.c: (handle_monitor_command): Add a new parameter
12753 `own_buf'.
12754 (handle_query): Update caller.
12755
12756 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12757
12758 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12759 * configure, config.in: Regenerate.
12760 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12761 is not defined.
12762
12763 2012-02-02 Pedro Alves <palves@redhat.com>
12764
12765 Try SIGKILL first, then PTRACE_KILL.
12766 * linux-low.c (linux_kill_one_lwp): New.
12767 (linux_kill_one_lwp): Rename to ...
12768 (kill_one_lwp_callback): ... this. Use the new
12769 linux_kill_one_lwp.
12770
12771 2012-02-02 Pedro Alves <palves@redhat.com>
12772
12773 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12774 inferior.
12775
12776 2012-01-27 Pedro Alves <palves@redhat.com>
12777
12778 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12779 (elf_64_file_p): Make static.
12780 (linux_pid_exe_is_elf_64_file): New.
12781 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12782 Delete declarations.
12783 (linux_pid_exe_is_elf_64_file): Declare.
12784 * linux-x86-low.c (x86_arch_setup): Use
12785 linux_pid_exe_is_elf_64_file.
12786
12787 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12788
12789 * linux-low.c (linux_wait_for_event_1): Rename to ...
12790 (linux_wait_for_event): ... here and merge it with former
12791 linux_wait_for_event - new variable wait_ptid, use it.
12792 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12793
12794 2012-01-23 Pedro Alves <palves@redhat.com>
12795
12796 * server.c (main): Avoid yet another case of infinite loop while
12797 detaching/killing after a longjmp.
12798
12799 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12800
12801 Code cleanup.
12802 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12803
12804 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12805
12806 * hostio.c (handle_readlink): New function.
12807 (handle_vFile): Call it to handle "vFile:readlink" packets.
12808
12809 2012-01-20 Pedro Alves <palves@redhat.com>
12810 Ulrich Weigand <ulrich.weigand@linaro.org>
12811
12812 * server.c (handle_v_requests): Only support vAttach and vRun to
12813 start multiple processes when in extended protocol mode.
12814
12815 2012-01-17 Pedro Alves <palves@redhat.com>
12816
12817 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12818 memalign plus mprotect to allocate the scratch buffer.
12819
12820 2012-01-13 Pedro Alves <palves@redhat.com>
12821
12822 * server.c (attach_inferior): Clear `cont_thread'.
12823
12824 2012-01-13 Pedro Alves <palves@redhat.com>
12825
12826 * server.c (main): Avoid infinite loop while detaching/killing
12827 after a longjmp.
12828
12829 2012-01-09 Doug Evans <dje@google.com>
12830
12831 * server.c (start_inferior): Set last_ptid in --wrapper case.
12832
12833 2012-01-06 Yao Qi <yao@codesourcery.com>
12834
12835 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12836 defined.
12837 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12838
12839 2012-01-04 Yao Qi <yao@codesourcery.com>
12840
12841 * tracepoint.c (cmd_qtdp): Print debug message
12842 for static tracepoint.
12843
12844 2012-01-04 Yao Qi <yao@codesourcery.com>
12845
12846 * tracepoint.c (trace_vdebug): Differentiate debug message
12847 between gdbserver and IPA.
12848
12849 2012-01-03 Yao Qi <yao@codesourcery.com>
12850
12851 * tracepoint.c (tracepoint_was_hit): Don't collect for
12852 static tracepoint.
12853
12854 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12855
12856 * terminal.h: Reformat copyright header.
12857
12858 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12859
12860 * server.c (gdbserver_version): Update copyright year.
12861 * gdbreplay.c (gdbreplay_version): Likewise.
12862
12863 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12864
12865 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12866
12867 Revert:
12868 2011-12-18 Hui Zhu <teawater@gmail.com>
12869 * linux-low.c (linux_create_inferior): Save return value to ret.
12870
12871 2011-12-18 Hui Zhu <teawater@gmail.com>
12872
12873 * linux-low.c (linux_create_inferior): Save return value to ret.
12874
12875 2011-12-16 Doug Evans <dje@google.com>
12876
12877 * linux-low.c (linux_create_inferior): If stdio connection,
12878 redirect stdin from /dev/null, stdout to stderr.
12879 * remote-utils.c (remote_is_stdio): New static global.
12880 (remote_connection_is_stdio): New function.
12881 (remote_prepare): Handle stdio connection.
12882 (remote_open): Ditto.
12883 (remote_close): Don't close stdin for stdio connections.
12884 (read_prim,write_prim): New functions. Replace all calls to
12885 read/write to these.
12886 * server.c (main): Watch for "-" argument. Move call to
12887 remote_prepare before start_inferior.
12888 * server.h (STDIO_CONNECTION_NAME): New macro.
12889 (remote_connection_is_stdio): Declare.
12890
12891 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12892 in debugging output.
12893
12894 2011-12-15 Yao Qi <yao@codesourcery.com>
12895
12896 * tracepoint.c: Include sys/syscall.h.
12897 (gdb_ust_thread): Remove preprocessor conditional.
12898
12899 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12900
12901 * linux-low.c (linux_detach_one_lwp): Call
12902 the_low_target.prepare_to_resume before detaching.
12903
12904 2011-12-14 Yao Qi <yao@codesourcery.com>
12905
12906 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12907 of write.
12908
12909 2011-12-14 Yao Qi <yao@codesourcery.com>
12910
12911 * i386-low.c (i386_low_stopped_data_address): Initialize local
12912 variable `control'.
12913
12914 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12915
12916 PR remote/13492
12917
12918 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12919 DR_CONTROL unless necessary. Extend comments.
12920 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12921 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12922
12923 2011-12-13 Yao Qi <yao@codesourcery.com>
12924
12925 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12926 macros.
12927 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12928
12929 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12930
12931 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12932 Print new debug message for such case.
12933
12934 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12935
12936 Fix overlapping memcpy.
12937 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12938 the read_inferior_memory transfer.
12939 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12940 write_inferior_memory transfer.
12941 (set_fast_tracepoint_jump): New variable buf. Use it for the
12942 read_inferior_memory and write_inferior_memory transfers.
12943 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12944 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12945 Use it for the write_inferior_memory transfer.
12946 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12947 buffers.
12948
12949 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12950
12951 * linux-low.c (fetch_register, store_register): Make code
12952 consistent, fix formatting.
12953
12954 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12955
12956 * linux-low.c (usr_store_inferior_registers): Factor out code
12957 to handle individual registers into...
12958 (store_register): ... this new function.
12959
12960 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12961
12962 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12963 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12964 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12965 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12966 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12967 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12968 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12969 (srv_xmlfiles): Add new XML files.
12970
12971 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12972 and <sys/uio.h>.
12973 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12974 (init_registers_s390_linux32v1): Add prototype.
12975 (init_registers_s390_linux32v2): Likewise.
12976 (init_registers_s390_linux64v1): Likewise.
12977 (init_registers_s390_linux64v2): Likewise.
12978 (init_registers_s390x_linux64v1): Likewise.
12979 (init_registers_s390x_linux64v2): Likewise.
12980 (s390_num_regs): Increment to 52.
12981 (s390_regmap): Add orig_r2 register.
12982 (s390_num_regs_3264): Increment to 68.
12983 (s390_regmap_3264): Add orig_r2 register.
12984 (s390_collect_ptrace_register): Handle orig_r2 register.
12985 (s390_supply_ptrace_register): Likewise.
12986 (s390_fill_last_break): New function.
12987 (s390_store_last_break): Likewise.
12988 (s390_fill_system_call): New function.
12989 (s390_store_system_call): Likewise.
12990 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
12991 register sets.
12992 (s390_check_regset): New function.
12993 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
12994 NT_S390_SYSTEM_CALL regsets and use appropriate description.
12995 Update target_regsets for available register sets.
12996
12997 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
12998 Jan Kratochvil <jan.kratochvil@redhat.com>
12999
13000 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13001 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13002 New.
13003 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13004 * linux-low.h (struct process_info_private): New member r_debug.
13005 * server.c (handle_qxfer_libraries): Call
13006 the_target->qxfer_libraries_svr4.
13007 (handle_qxfer_libraries_svr4): New function.
13008 (qxfer_packets): New entry "libraries-svr4".
13009 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13010 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13011 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13012 PACKET_qXfer_libraries_svr4.
13013
13014 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13015
13016 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13017 PSW address/mask between 8-byte and 16-byte formats.
13018 (s390_supply_ptrace_register): Likewise.
13019 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13020 basic addressing mode bit.
13021
13022 2011-11-24 Stan Shebs <stan@codesourcery.com>
13023
13024 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13025
13026 2011-11-17 Stan Shebs <stan@codesourcery.com>
13027
13028 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13029 (tracing_start_time): New global.
13030 (tracing_stop_time): New global.
13031 (tracing_user_name): New global.
13032 (tracing_notes): New global.
13033 (tracing_stop_note): New global.
13034 (cmd_qtstart): Set traceframe_usage, start_time.
13035 (stop_tracing): Set stop_time.
13036 (cmd_qtstatus): Report additional status.
13037 (cmd_qtp): New function.
13038 (handle_tracepoint_query): Call it.
13039 (cmd_qtnotes): New function.
13040 (handle_tracepoint_general_set): Call it.
13041 (get_timestamp): Rename from tsv_get_timestamp.
13042
13043 2011-11-14 Stan Shebs <stan@codesourcery.com>
13044 Kwok Cheung Yeung <kcy@codesourcery.com>
13045
13046 * linux-x86-low.c (small_jump_insn): New.
13047 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13048 trampoline and error message, build a trampoline and issue a small
13049 jump instruction to it.
13050 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13051 trampoline and error message.
13052 (x86_get_min_fast_tracepoint_insn_len): New.
13053 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13054 * linux-low.h (struct linux_target_ops): Add arguments to
13055 install_fast_tracepoint_jump_pad operation, add new operation.
13056 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13057 arguments.
13058 (linux_get_min_fast_tracepoint_insn_len): New function.
13059 (linux_target_op): Add new operation.
13060 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13061 (gdb_trampoline_buffer_end): Ditto.
13062 (gdb_trampoline_buffer_error): Ditto.
13063 (struct ipa_sym_addresses): Add fields for new IPA variables.
13064 (symbol_list): Add entries for new IPA variables.
13065 (struct tracepoint): Add fields to hold the address range of the
13066 trampoline used by the tracepoint.
13067 (trampoline_buffer_head): New static variable.
13068 (trampoline_buffer_tail): Ditto.
13069 (claim_trampoline_space): New function.
13070 (have_fast_tracepoint_trampoline_buffer): New function.
13071 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13072 structure.
13073 (install_fast_tracepoint): Ditto, also add error buffer argument.
13074 (cmd_qtminftpilen): New function.
13075 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13076 (fast_tracepoint_from_trampoline_address): New function.
13077 (fast_tracepoint_collecting): Handle trampoline as part of jump
13078 pad space.
13079 (set_trampoline_buffer_space): New function.
13080 (initialize_tracepoint): Initialize new IPA variables.
13081 * target.h (struct target_ops): Add arguments to
13082 install_fast_tracepoint_jump_pad operation, add new
13083 get_min_fast_tracepoint_insn_len operation.
13084 (target_get_min_fast_tracepoint_insn_len): New.
13085 (install_fast_tracepoint_jump_pad): Add arguments.
13086 * server.h (IPA_BUFSIZ): Define.
13087 * linux-i386-ipa.c: Include extra header files.
13088 (initialize_fast_tracepoint_trampoline_buffer): New function.
13089 (initialize_low_tracepoint): Call it.
13090 * server.h (set_trampoline_buffer_space): Declare.
13091 (claim_trampoline_space): Ditto.
13092 (have_fast_tracepoint_trampoline_buffer): Ditto.
13093
13094 2011-11-14 Yao Qi <yao@codesourcery.com>
13095
13096 * server.c (handle_query): Handle InstallInTrace for qSupported.
13097 * tracepoint.c (add_tracepoint): Sort list.
13098 (install_tracepoint, download_tracepoint): New.
13099 (cmd_qtdp): Call them to install and download tracepoints.
13100 (sort_tracepoints): Removed.
13101 (cmd_qtstart): Update.
13102
13103 2011-11-14 Yao Qi <yao@codesourcery.com>
13104
13105 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13106 * mem-break.h: Declare.
13107 * tracepoint.c (cmd_qtstart): Move some code to ...
13108 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13109 New.
13110 (download_tracepoints): Move some code to ...
13111 (download_tracepoint_1): ... here. New.
13112
13113 2011-11-08 Yao Qi <yao@codesourcery.com>
13114
13115 * remote-utils.c (relocate_instruction): A comment fix.
13116
13117 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13118
13119 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13120 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13121 dr_status_mirror and dr_control_mirror from debug_reg_state.
13122 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13123 (i386_initial_stuff): Remove use of deleted globals.
13124 (i386_get_thread_context, i386_set_thread_context,
13125 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13126 from debug_reg_state.
13127
13128 2011-11-05 Yao Qi <yao@codesourcery.com>
13129
13130 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13131 address as TPOINT's.
13132
13133 2011-11-02 Stan Shebs <stan@codesourcery.com>
13134
13135 * tracepoint.c (agent_mem_read_string): New function.
13136 (eval_agent_expr): Call it for tracenz.
13137 * server.c (handle_query): Report support for tracenz.
13138
13139 2011-11-02 Yao Qi <yao@codesourcery.com>
13140
13141 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13142
13143 2011-11-02 Yao Qi <yao@codesourcery.com>
13144
13145 * target.h: Fix a typo in comment.
13146
13147 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13148
13149 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13150 clobber the breakpoints' shadows with fast tracepoint jumps.
13151 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13152 * target.c (write_inferior_memory): Also pass MYADDR down to
13153 check_mem_write.
13154
13155 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13156
13157 * configure.ac: Check support for personality routine.
13158 * configure: Regenerate.
13159 * config.in: Likewise.
13160 * linux-low.c: Include <sys/personality.h>.
13161 Define ADDR_NO_RANDOMIZE if necessary.
13162 (linux_create_inferior): Disable address space randomization when
13163 forking inferior, if requested.
13164 (linux_supports_disable_randomization): New function.
13165 (linux_target_ops): Install it.
13166 * server.h (disable_randomization): Declare.
13167 * server.c (disable_randomization): New global variable.
13168 (handle_general_set): Handle QDisableRandomization.
13169 (handle_query): Likewise for qSupported.
13170 (main): Support --disable-randomization and --no-disable-randomization
13171 command line arguments.
13172 * target.h (struct target_ops): Add supports_disable_randomization.
13173 (target_supports_disable_randomization): New macro.
13174
13175 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13176
13177 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13178 ifdef check.
13179 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13180 [!PT_GETDSBT] (target_loadmap): New definition.
13181 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13182 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13183 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13184 and PT_GETDSBT to LINUX_LOADMAP.
13185 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13186 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13187
13188 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13189
13190 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13191 (arm_linux_hwbp_cap): New static variable.
13192 (arm_linux_get_hwbp_cap): Replace by ...
13193 (arm_linux_init_hwbp_cap): ... this new function.
13194 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13195 (arm_linux_get_hw_watchpoint_count): Likewise.
13196 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13197 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13198 (arm_prepare_to_resume): Use perror_with_name instead of error.
13199
13200 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13201
13202 * linux-arm-low.c: Include <signal.h>.
13203 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13204 (struct arm_linux_hwbp_cap): New data type.
13205 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13206 (struct arm_linux_hw_breakpoint): New data type.
13207 (MAX_BPTS, MAX_WPTS): Define.
13208 (struct arch_process_info, struct arch_lwp_info): New data types.
13209 (arm_linux_get_hwbp_cap): New function.
13210 (arm_linux_get_hw_breakpoint_count): Likewise.
13211 (arm_linux_get_hw_watchpoint_count): Likewise.
13212 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13213 (arm_hwbp_control_initialize): Likewise.
13214 (arm_hwbp_control_is_enabled): Likewise.
13215 (arm_hwbp_control_is_initialized): Likewise.
13216 (arm_hwbp_control_disable): Likewise.
13217 (arm_linux_hw_breakpoint_equal): Likewise.
13218 (arm_linux_hw_point_initialize): Likewise.
13219 (struct update_registers_data): New data structure.
13220 (update_registers_callback: New function.
13221 (arm_insert_point): Likewise.
13222 (arm_remove_point): Likewise.
13223 (arm_stopped_by_watchpoint): Likewise.
13224 (arm_stopped_data_address): Likewise.
13225 (arm_new_process): Likewise.
13226 (arm_new_thread): Likewise.
13227 (arm_prepare_to_resume): Likewise.
13228 (the_low_target): Register arm_insert_point, arm_remove_point,
13229 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13230 arm_new_thread, and arm_prepare_to_resume.
13231
13232 2011-09-15 Stan Shebs <stan@codesourcery.com>
13233
13234 * server.h (struct emit_ops): Add compare-goto fields.
13235 * tracepoint.c (gdb_agent_op_sizes): New table.
13236 (emit_eq_goto): New function.
13237 (emit_ne_goto): New function.
13238 (emit_lt_goto): New function.
13239 (emit_le_goto): New function.
13240 (emit_gt_goto): New function.
13241 (emit_ge_goto): New function.
13242 (is_goto_target): New function.
13243 (compile_bytecodes): Recognize special cases of compare-goto
13244 combinations and call specialized emitters for them.
13245 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13246 (amd64_emit_ne_goto): New function.
13247 (amd64_emit_lt_goto): New function.
13248 (amd64_emit_le_goto): New function.
13249 (amd64_emit_gt_goto): New function.
13250 (amd64_emit_ge_goto): New function.
13251 (amd64_emit_ops): Add the new functions.
13252 (i386_emit_eq_goto): New function.
13253 (i386_emit_ne_goto): New function.
13254 (i386_emit_lt_goto): New function.
13255 (i386_emit_le_goto): New function.
13256 (i386_emit_gt_goto): New function.
13257 (i386_emit_ge_goto): New function.
13258 (i386_emit_ops): Add the new functions.
13259
13260 2011-09-08 Stan Shebs <stan@codesourcery.com>
13261
13262 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13263 (i386_emit_epilogue): Restore %ebx.
13264
13265 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13266
13267 * server.c (step_thread): Remove definition.
13268 (process_serial_event): Don't handle Hs.
13269 * server.h (step_thread): Remove declaration.
13270 * target.c (set_desired_inferior): Remove use of step_thread.
13271
13272 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13273
13274 * linux-low.c: Include linux-procfs.h.
13275 (linux_attach_lwp_1): Update comments.
13276 (linux_attach): Scan for existing threads when attaching to a
13277 process that is the tgid.
13278 * Makefile.in: Update dependencies.
13279
13280 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13281
13282 * configure.srv: Add linux-procfs.o dependencies.
13283
13284 2011-08-14 Yao Qi <yao@codesourcery.com>
13285
13286 * target.h (struct target_ops): Fix indent.
13287 * win32-low.c (win32_target_ops): Fix comment.
13288
13289 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13290 Yao Qi <yao@codesourcery.com>
13291
13292 * Makefile.in (clean): Remove tic6x-*.c files.
13293 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13294 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13295 (tic6x-c64xp-linux.c): Likewise.
13296 * configure.srv: Add support for tic6x-*-uclinux.
13297 * linux-tic6x-low.c: New.
13298 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13299
13300 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13301 Yao Qi <yao@codesourcery.com>
13302
13303 * target.h (struct target_ops): Add read_loadmap.
13304 * linux-low.c (struct target_loadseg): New type.
13305 (struct target_loadmap): New type.
13306 (linux_read_loadmap): New function.
13307 (linux_target_ops): Add linux_read_loadmap.
13308 * server.c (handle_query): Support qXfer:fdpic:read packet.
13309 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13310 to NULL.
13311
13312 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13313
13314 * win32-low.c: Include <stdint.h>.
13315
13316 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13317
13318 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13319 to the inferior here.
13320 (i386_remove_aligned_watchpoint): Ditto.
13321 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13322 fit part of the watchpoint in the debug registers.
13323 (i386_update_inferior_debug_regs): New.
13324 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13325 registers, and only update the inferior on success.
13326 (i386_low_remove_watchpoint): Ditto.
13327
13328 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13329
13330 * linux-low.c (compare_ints, unique, list_threads, show_process,
13331 linux_core_of_thread): Delete.
13332 (linux_target_ops): Change linux_core_of_thread to
13333 linux_common_core_of_thread.
13334 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13335 * utils.c (malloc_failure): Change type of argument.
13336 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13337 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13338 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13339 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13340 (IPA_OBJS): Add common-utils-ipa.o.
13341 (ptid_h, linux_osdata_h): New macros.
13342 (server_h): Add common/common-utils.h, common/xml-utils.h,
13343 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13344 common/ptid.h.
13345 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13346 ptid.o, buffer.o): New rules.
13347 (linux-low.o): Add common/linux-osdata.h as a dependency.
13348 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13349 * configure.ac: Add AC_HEADER_DIRENT check.
13350 * config.in: Regenerate.
13351 * configure: Regenerate.
13352 * remote-utils.c (xml_escape_text): Delete.
13353 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13354 buffer_xml_printf): Move to common/buffer.c.
13355 * server.c (main): Remove call to initialize_inferiors.
13356 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13357 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13358 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13359 internal_error, gdb_assert, gdb_assert_fail): Delete.
13360 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13361 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13362 common/buffer.h.
13363 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13364 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13365 initialize_inferiors): Delete.
13366
13367 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13368
13369 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13370 symbol error.
13371
13372 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13373
13374 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13375 assertion.
13376 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13377
13378 2011-05-26 Yao Qi <yao@codesourcery.com>
13379
13380 * Makefile.in (thread-db.o): Track dependence to
13381 common/gdb_thread_db.h.
13382 * thread-db.c: include gdb_thread_db.h from right place.
13383
13384 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13385
13386 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13387 __FILE__ and __LINE__ to internal_error.
13388
13389 2011-05-13 Doug Evans <dje@google.com>
13390
13391 * thread-db.c (try_thread_db_load_from_sdir): New function.
13392 (try_thread_db_load_from_dir): New function.
13393 (thread_db_load_search): Handle $sdir, ignore $pdir.
13394 Remove trying of system directories if search of
13395 libthread-db-search-path fails, that is now done via $sdir.
13396
13397 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13398
13399 * server.c (handle_query): Add EnableDisableTracepoints to the list
13400 of supported features.
13401 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13402 tracepoints.
13403 (cmd_qtenable_disable): New.
13404 (cmd_qtstart): Install tracepoints even if disabled.
13405 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13406 receiving a QTEnable or QTDisable packet.
13407 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13408 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13409 tracepoints.
13410 (gdb_probe): Skip data collection if static tracepoint is disabled.
13411
13412 2011-05-10 Doug Evans <dje@google.com>
13413
13414 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13415
13416 2011-05-04 Doug Evans <dje@google.com>
13417
13418 * linux-low.c (linux_join): Skip process lookup.
13419 * spu-low.c (spu_join): Ditto.
13420 * server.c (join_inferiors_callback): Delete.
13421 (process_serial_event): For 'D' packet (detach) call join_inferior
13422 directly.
13423
13424 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13425
13426 * README: Don't mention xscale*-*-linux*.
13427 * configure.srv (xscale*-*-linux*): Don't handle target.
13428
13429 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13430
13431 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13432 casting pointers.
13433 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13434 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13435 (i386_emit_void_call_2): Likewise.
13436
13437 2011-04-26 Yao Qi <yao@codesourcery.com>
13438
13439 * linux-low.c: Move common macros to linux-ptrace.h.
13440 Include linux-ptrace.h.
13441 * Makefile.in (linux_ptrace_h): New.
13442 (linux-low.o): Depends on linux-ptrace.h.
13443
13444 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13445
13446 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13447 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13448 (remote_prepare): New function with most of the TCP code from ...
13449 (remote_open): ... here. Detect PORT here unconditionally. Move also
13450 setting transport_is_reliable.
13451 * server.c (run_once): New variable.
13452 (gdbserver_usage): Document it.
13453 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13454 the first run if RUN_ONCE.
13455 * server.h (run_once, remote_prepare): New declarations.
13456
13457 2011-04-19 Tom Tromey <tromey@redhat.com>
13458
13459 * win32-low.c (handle_load_dll): Remove duplicate "the".
13460
13461 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13462
13463 Remove support for old Cygwin 1.5 versions.
13464 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13465 function to avoid warning.
13466 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13467 warning.
13468
13469 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13470
13471 * gdbserver/server.h (Macro _): Define it if not available.
13472
13473 2011-03-14 Michael Snyder <msnyder@vmware.com>
13474
13475 * hostio.c (handle_close): Remove unnecessary null test.
13476
13477 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13478
13479 * Makefile.in (maintainer-clean realclean distclean): Remove
13480 "make ... subdir_do" command.
13481
13482 2011-03-10 Michael Snyder <msnyder@vmware.com>
13483
13484 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13485
13486 * server.c (handle_v_run): Free alloced buffer on early return.
13487
13488 2011-03-09 Yao Qi <yao@codesourcery.com>
13489
13490 Revert:
13491 2011-03-04 Yao Qi <yao@codesourcery.com>
13492
13493 * Makefile.in: Remove GNU make feature --directory.
13494
13495 2011-03-05 Yao Qi <yao@codesourcery.com>
13496
13497 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13498 (subdir_do): New make target. Copied from gdb/Makefile.
13499 (maintainer-clean, realclean, distclean, clean): Call corresponding
13500 make targets in common/Makefile.
13501
13502 2011-02-11 Yao Qi <yao@codesourcery.com>
13503
13504 * configure.ac: Call AC_PROG_RANLIB.
13505 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13506 * configure: Regenerate.
13507
13508 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13509
13510 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13511
13512 2011-03-06 Yao Qi <yao@codesourcery.com>
13513
13514 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13515
13516 2011-03-05 Yao Qi <yao@codesourcery.com>
13517
13518 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13519 (subdir_do): New make target. Copied from gdb/Makefile.
13520 (maintainer-clean, realclean, distclean, clean): Call corresponding
13521 make targets in common/Makefile.
13522
13523 2011-03-04 Yao Qi <yao@codesourcery.com>
13524
13525 * Makefile.in: Remove GNU make feature --directory.
13526
13527 2011-03-04 Michael Snyder <msnyder@vmware.com>
13528
13529 * server.c (queue_stop_reply): Call xmalloc not malloc.
13530
13531 2011-03-02 Michael Snyder <msnyder@vmware.com>
13532
13533 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13534
13535 2011-02-28 Michael Snyder <msnyder@vmware.com>
13536
13537 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13538 (cmd_qtframe): Ditto.
13539 (cmd_qtbuffer): Ditto.
13540 (cmd_bigqtbuffer): Ditto.
13541
13542 * utils.c (decimal2str): Initialize 'width' to nine, then
13543 don't mess with it.
13544
13545 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13546
13547 * hostio.c (require_data): Free *data, not data.
13548
13549 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13550
13551 * hostio.c (require_data): Use free, not xfree.
13552
13553 2011-02-27 Michael Snyder <msnyder@vmware.com>
13554
13555 * server.c (handle_query): Discard unused value.
13556
13557 * hostio.c (require_data): Free malloc memory before returning
13558 error.
13559
13560 2011-02-26 Michael Snyder <msnyder@vmware.com>
13561
13562 * linux-low.c (list_threads): Call closedir for dirent.
13563
13564 2011-02-27 Michael Snyder <msnyder@vmware.com>
13565
13566 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13567 a case statement falls through.
13568
13569 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13570
13571 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13572 in comparison.
13573
13574 2011-02-26 Michael Snyder <msnyder@vmware.com>
13575
13576 * utils.c (decimal2str): Eliminate dead code and dead param.
13577 (pulongest): Drop dead param from call to decimal2str.
13578 (plongest): Ditto.
13579
13580 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13581
13582 Revert the following patch (not approved yet):
13583 2011-02-21 Hui Zhu <teawater@gmail.com>
13584 * tracepoint.c (tp_printf): New function.
13585 (eval_agent_expr): Handle gdb_agent_op_printf.
13586
13587 2011-02-21 Hui Zhu <teawater@gmail.com>
13588
13589 * tracepoint.c (tp_printf): New function.
13590 (eval_agent_expr): Handle gdb_agent_op_printf.
13591
13592 2011-02-18 Tom Tromey <tromey@redhat.com>
13593
13594 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13595 (tracepoint.o): Likewise.
13596 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13597 (gdb_agent_op_names): Likewise.
13598
13599 2011-02-18 Tom Tromey <tromey@redhat.com>
13600
13601 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13602 gdb_agent_op_rot>: New constants.
13603 (gdb_agent_op_names): Add pick and roll.
13604 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13605 cases.
13606
13607 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13608
13609 * aclocal.m4: Regenerated with aclocal-1.11.1.
13610
13611 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13612
13613 * server.c (handle_qxfer_traceframe_info): New.
13614 (qxfer_packets): Register "traceframe-info".
13615 (handle_query): Report support for qXfer:traceframe-info:read+.
13616 * tracepoint.c (match_blocktype): New.
13617 (traceframe_find_block_type): Rename to ...
13618 (traceframe_walk_blocks): ... this. Add callback filter argument,
13619 and use it.
13620 (traceframe_find_block_type): New, reimplemented on top of
13621 traceframe_walk_blocks.
13622 (build_traceframe_info_xml): New.
13623 (traceframe_read_info): New.
13624 * server.h (traceframe_read_info): Declare.
13625
13626 2011-02-11 Yao Qi <yao@codesourcery.com>
13627
13628 * configure.ac: Call AC_PROG_RANLIB.
13629 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13630 * configure: Regenerate.
13631
13632 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13633
13634 * server.c (gdb_read_memory): Change return semantics to allow
13635 partial transfers.
13636 (handle_search_memory_1): Adjust.
13637 (process_serial_event) <'m' packet>: Handle partial transfers.
13638 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13639
13640 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13641
13642 * regcache.c (init_register_cache): Initialize
13643 regcache->register_status.
13644 (free_register_cache): Release regcache->register_status.
13645 (regcache_cpy): Copy register_status.
13646 (registers_to_string): Print 'x's for unavailable registers.
13647 (supply_register): Mark the register's status valid or
13648 unavailable, depending on whether a buffer was passed in or not.
13649 (supply_register_zeroed): New.
13650 (supply_regblock): Mark the registers' status valid or
13651 unavailable, depending on whether a buffer was passed in or not.
13652 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13653 (struct regcache): New `register_status' field.
13654 (supply_register_zeroed): Declare.
13655 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13656 supply_register_zeroed, rather than passing a NULL buffer to
13657 supply_register.
13658 * tracepoint.c (fetch_traceframe_registers): Update comment.
13659
13660 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13661
13662 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13663 buffer explicit.
13664
13665 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13666
13667 * server.h (decode_xfer_write): Change prototype.
13668 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13669 and don't extract the annex here.
13670 * server.c (decode_xfer_read): Remove `annex' parameter,
13671 and don't extract the annex here.
13672 (decode_xfer): New.
13673 (struct qxfer): New.
13674 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13675 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13676 (handle_qxfer_statictrace): New functions, abstracted out from
13677 handle_query, and made to use the struct qxfer interface.
13678 (handle_threads_qxfer_proper): Rename to ...
13679 (handle_qxfer_threads_proper): ... this.
13680 (handle_threads_qxfer): Rename to ...
13681 (handle_qxfer_threads): ... this. Adjust.
13682 (qxfer_packets): New array.
13683 (handle_qxfer): New function.
13684 (handle_query): Use handle_qxfer.
13685
13686 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13687
13688 * gdbreplay.c: Shorten lines of >= 80 columns.
13689 * linux-low.c: Ditto.
13690 * linux-ppc-low.c: Ditto.
13691 * linux-s390-low.c: Ditto.
13692 * linux-sparc-low.c: Ditto.
13693 * linux-x86-low.c: Ditto.
13694 * linux-xtensa-low.c: Ditto.
13695 * mem-break.c: Ditto.
13696 * nto-low.c: Ditto.
13697 * regcache.h: Ditto.
13698 * remote-utils.c: Ditto.
13699 * server.c: Ditto.
13700 * server.h: Ditto.
13701 * thread-db.c: Ditto.
13702 * tracepoint.c: Ditto.
13703 * utils.c: Ditto.
13704 * win32-low.h: Ditto.
13705
13706 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13707
13708 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13709 update.
13710
13711 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13712
13713 * server.c (gdbserver_version): Update copyright year in version
13714 output.
13715 * gdbreplay.c (gdbreplay_version): Ditto.
13716
13717 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13718
13719 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13720 * linux-bfin-low.c: New file.
13721 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13722 PT_DATA_ADDR for BFIN targets.
13723 * Makefile.in (SFILES): Add linux-bfin-low.c.
13724 (clean): Remove reg-bfin.c.
13725 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13726 * README: Mention supported Blackfin targets.
13727
13728 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13729
13730 * .gitignore: New file.
13731
13732 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13733
13734 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13735
13736 2010-10-22 Jie Zhang <jie@codesourcery.com>
13737
13738 * Makefile.in: Add FLAGS_TO_PASS variable.
13739 (install): Remove dependency of install-only and recursively
13740 invoke make for install-only.
13741
13742 2010-10-04 Doug Evans <dje@google.com>
13743
13744 * Makefile.in (uninstall): Use $(DESTDIR).
13745
13746 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13747
13748 PR gdb/11842
13749
13750 * linux-x86-low.c (compat_siginfo_from_siginfo)
13751 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13752 si_code is < 0. Check for si_code == SI_TIMER before checking for
13753 si_code < 0.
13754
13755 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13756
13757 * lynx-i386-low.c: New file.
13758 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13759
13760 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13761
13762 * lynx-low.c (ptrace_request_to_str): Remove handling for
13763 request values that have been removed in LynxOS 5.x.
13764
13765 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13766
13767 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13768 <ptrace.h>
13769
13770 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13771
13772 * configure.ac: Add --enable-inprocess-agent option.
13773 * configure: Rebuilt.
13774
13775 2010-09-06 Yao Qi <yao@codesourcery.com>
13776
13777 * linux-low.c (linux_kill): Remove unused variable.
13778 (linux_stabilize_threads): Likewise.
13779 * server.c (start_inferior): Likewise.
13780 (queue_stop_reply_callback): Likewise.
13781 * tracepoint.c (do_action_at_tracepoint): Likewise.
13782
13783 2010-09-06 Yao Qi <yao@codesourcery.com>
13784
13785 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13786 on return.
13787
13788 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13789
13790 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13791
13792 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13793
13794 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13795 "$(IPA_DEPFILES)".
13796
13797 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13798
13799 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13800 gdbserver/lynx-ppc-low.c: New files.
13801 * Makefile.in (lynx_low_h): New variable.
13802 (lynx-low.o, lynx-ppc-low.o): New rules.
13803 * configure.ac: On LynxOS, link with -lnetinet.
13804 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13805 * configure: regenerate.
13806
13807 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13808
13809 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13810 * configure.ac: Add check for vasprintf and vsnprintf.
13811 * configure, config.in: Regenerate.
13812 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13813
13814 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13815
13816 * gdbreplay.c: Move include of alloca.h up, next to include of
13817 malloc.h.
13818 * server.h: Add include of malloc.h.
13819 * mem-break.c: Remove include of malloc.h.
13820 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13821
13822 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13823
13824 * Makefile.in (memmem.o): Build with -Wno-error.
13825
13826 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13827
13828 * utils.c (xsnprintf): Make non-static.
13829 * server.h: Add xsnprintf declaration.
13830 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13831 replace calls to snprintf by calls to xsnprintf throughout.
13832
13833 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13834
13835 * configure.ac: Add configure check for alloca.
13836 * configure, config.in: Regenerate.
13837 * server.h: Include alloca.h if it exists.
13838 * gdbreplay.c: Include alloca.h if it exists.
13839
13840 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13841
13842 * linux-low.c (__SIGRTMIN): Define if not already defined.
13843 (linux_create_inferior): Check for __ANDROID__ rather than
13844 __SIGRTMIN.
13845 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13846 are already deferred.
13847 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13848 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13849 stopped and already has a pending signal to report.
13850 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13851 a pending signal to report or is moving out of a jump pad.
13852 (linux_init_signals): Check for __ANDROID__ rather than
13853 __SIGRTMIN.
13854
13855 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13856
13857 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13858 debug_threads check. Avoid a linear search when not doing debug
13859 output.
13860
13861 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13862
13863 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13864 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13865 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13866 (process_event): Change local fd's type to gdb_fildes_t.
13867 (create_file_handler): Adjust prototype.
13868 (delete_file_handler): Adjust prototype.
13869 (handle_file_event): Adjust prototype. Use pfildes.
13870 (create_file_event): Adjsut prototype.
13871 * remote-utils.c (remote_desc, listen_desc): Change type to
13872 gdb_fildes_t.
13873 * server.h: New gdb_fildes_t typedef.
13874 [USE_WIN32API]: Include winsock2.h.
13875 (delete_file_handler, add_file_handler): Adjust prototypes.
13876 (pfildes): Declare.
13877 * utils.c (pfildes): New.
13878
13879 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13880
13881 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13882 * configure: Regenerate.
13883
13884 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13885
13886 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13887 (linux_done_accessing_memory): ... this.
13888 (linux_target_ops): Adjust.
13889 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13890 * nto-low.c (nto_target_ops): Adjust comment.
13891 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13892 * spu-low.c (spu_target_ops): Adjust comment.
13893 * target.h (target_ops): Rename unprepare_to_access_memory field
13894 to done_accessing_memory.
13895 (unprepare_to_access_memory): Rename to ...
13896 (done_accessing_memory): ... this.
13897
13898 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13899
13900 * linux-low.c (linux_prepare_to_access_memory): New.
13901 (linux_unprepare_to_access_memory): New.
13902 (linux_target_ops): Install them.
13903 * server.c (read_memory): Rename to ...
13904 (gdb_read_memory): ... this. Use
13905 prepare_to_access_memory/prepare_to_access_memory.
13906 (write_memory): Rename to ...
13907 (gdb_write_memory): ... this. Use
13908 prepare_to_access_memory/prepare_to_access_memory.
13909 (handle_search_memory_1): Adjust.
13910 (process_serial_event): Adjust.
13911 * target.h (struct target_ops): New fields
13912 prepare_to_access_memory and unprepare_to_access_memory.
13913 (prepare_to_access_memory, unprepare_to_access_memory): New.
13914 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13915 prepare_to_access_memory/prepare_to_access_memory.
13916 * nto-low.c (nto_target_ops): Adjust.
13917 * spu-low.c (spu_target_ops): Adjust.
13918 * win32-low.c (win32_target_ops): Adjust.
13919
13920 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13921
13922 * Makefile.in (WARN_CFLAGS): Get it from configure.
13923 (WERROR_CFLAGS): New.
13924 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13925 * configure.ac: Introduce --enable-werror, which adds -Werror to
13926 the compiler command line. Enabled by default. Disable with
13927 --disable-werror. Add -Wdeclaration-after-statement
13928 Wpointer-arith and -Wformat-nonliteral to warning flags.
13929 * configure: Regenerate.
13930
13931 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13932
13933 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13934
13935 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13936
13937 * gdbreplay.c (remote_error): New.
13938 (gdbchar): New.
13939 (expect): Use gdbchar. Check for error reading from GDB.
13940 Clarify sync error output.
13941 (play): Check for errors writing to GDB.
13942 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13943 * remote-utils.c (getpkt): Check for errors writing to the remote
13944 descriptor.
13945
13946 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13947
13948 * linux-low.c (linux_wait_1): Move non-debugging code out of
13949 `debug_threads' control.
13950
13951 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13952
13953 * linux-low.c (linux_wait_1): Don't set last_status here.
13954 * server.c (push_event, queue_stop_reply_callback): Assert we're
13955 not pushing a TARGET_WAITKIND_IGNORE event.
13956 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13957 (myresume, handle_target_event): Set the thread's last_resume_kind
13958 and last_status from the target returned status.
13959
13960 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13961
13962 PR threads/10729
13963
13964 * linux-x86-low.c (update_debug_registers_callback): New.
13965 (i386_dr_low_set_addr): Use it.
13966 (i386_dr_low_get_addr): New.
13967 (i386_dr_low_set_control): Use update_debug_registers_callback.
13968 (i386_dr_low_get_control): New.
13969 (i386_dr_low_get_status): Adjust.
13970 * linux-low.c (linux_stop_lwp): New.
13971 * linux-low.h (linux_stop_lwp): Declare.
13972
13973 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13974 argument instead of a i386_debug_reg_state.
13975 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13976 a i386_debug_reg_state.
13977 (i386_insert_aligned_watchpoint): Adjust.
13978 (i386_remove_aligned_watchpoint): Adjust.
13979 (i386_low_stopped_data_address): Read the debug registers from the
13980 inferior instead of from the mirrors.
13981 * i386-low.h (struct i386_debug_reg_state): Extend comment.
13982 (i386_dr_low_get_addr): Declare.
13983 (i386_dr_low_get_control): Declare.
13984 (i386_dr_low_get_status): Change prototype.
13985
13986 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
13987 (i386_dr_low_get_addr): New.
13988 (i386_dr_low_get_control): New.
13989 (i386_dr_low_get_status): Adjust prototype. Return
13990 dr_status_mirror.
13991 (i386_initial_stuff): Clear dr_status_mirror and
13992 dr_control_mirror.
13993 (i386_get_thread_context): Adjust.
13994 (i386_set_thread_context): Adjust.
13995 (i386_thread_added): Adjust.
13996
13997 2010-08-24 Pedro Alves <pedro@codesourcery.com>
13998
13999 * linux-low.h (linux_thread_area): Delete declaration.
14000
14001 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14002
14003 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14004 after its termination.
14005
14006 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14007
14008 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14009 (gdb_wants_all_stopped): Delete.
14010 (linux_wait_1): Don't call them.
14011 * server.c (handle_v_cont): Tag all threads as want-stopped.
14012 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14013 stopped as "client-wants-stopped".
14014
14015 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14016
14017 * Makefile.in (signals_h): New.
14018 (server_h): Depend on it.
14019 (server.o): Don't depend on $(signals_def).
14020 (signals.o): Depend on $(signals_def).
14021
14022 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14023
14024 * Makefile.in (signals_def): New.
14025 (server_h): Append include/gdb/signals.h and signals_def.
14026 (server.o): Append signals_def.
14027
14028 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14029
14030 * server.c (handle_target_event): Use target_signal_to_host for
14031 resume_info.sig initialization.
14032 * target.h (struct thread_resume) <sig>: New comment.
14033
14034 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14035
14036 * server.c (handle_query): strcpy() the returned string from paddress()
14037 instead of sprintf().
14038 * utils.c (paddress): Return phex_nz().
14039
14040 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14041
14042 * server.c (handle_v_cont): Call mourn_inferior if process
14043 just exited.
14044 (myresume): Likewise.
14045
14046 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14047
14048 Static tracepoints, and integration with UST.
14049
14050 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14051 * mem-break.c (uninsert_all_breakpoints)
14052 (reinsert_all_breakpoints): New.
14053 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14054 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14055 (gdb_agent_ust_loaded, helper_thread_id)
14056 (gdb_agent_helper_thread_id): New macros.
14057 (struct ipa_sym_addresses): Add addr_ust_loaded,
14058 addr_helper_thread_id, addr_cmd_buf.
14059 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14060 (in_process_agent_loaded_ust): New.
14061 (write_e_ust_not_loaded): New.
14062 (maybe_write_ipa_ust_not_loaded): New.
14063 (struct collect_static_trace_data_action): New.
14064 (enum tracepoint_type) <static_tracepoint>: New.
14065 (struct tracepoint) <handle>: Mention static tracepoints.
14066 (struct static_tracepoint_ctx): New.
14067 (CMD_BUF_SIZE): New.
14068 (add_tracepoint_action): Handle static tracepoint actions.
14069 (unprobe_marker_at): New.
14070 (clear_installed_tracepoints): Handle static tracepoints.
14071 (cmd_qtdp): Handle static tracepoints.
14072 (probe_marker_at): New.
14073 (cmd_qtstart): Handle static tracepoints.
14074 (response_tracepoint): Handle static tracepoints.
14075 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14076 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14077 (get_context_regcache): Handle static tracepoints.
14078 (do_action_at_tracepoint): Handle static tracepoint actions.
14079 (traceframe_find_block_type): Handle static trace data blocks.
14080 (traceframe_read_sdata): New.
14081 (download_tracepoints): Download static tracepoint actions.
14082 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14083 (GDB_PROBE_NAME): New.
14084 (ust_ops): New.
14085 (GET_UST_SYM): New.
14086 (USTF): New.
14087 (dlsym_ust): New.
14088 (ust_marker_to_static_tracepoint): New.
14089 (gdb_probe): New.
14090 (collect_ust_data_at_tracepoint): New.
14091 (gdb_ust_probe): New.
14092 (UNIX_PATH_MAX, SOCK_DIR): New.
14093 (gdb_ust_connect_sync_socket): New.
14094 (resume_thread, stop_thread): New.
14095 (run_inferior_command): New.
14096 (init_named_socket): New.
14097 (gdb_ust_socket_init): New.
14098 (cstr_to_hexstr): New.
14099 (next_st): New.
14100 (first_marker, next_marker): New.
14101 (response_ust_marker): New.
14102 (cmd_qtfstm, cmd_qtsstm): New.
14103 (unprobe_marker_at, probe_marker_at): New.
14104 (cmd_qtstmat, gdb_ust_thread): New.
14105 (gdb_ust_init): New.
14106 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14107 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14108 (ST_REGENTRY): New.
14109 (x86_64_st_collect_regmap): New.
14110 (X86_64_NUM_ST_COLLECT_GREGS): New.
14111 (AMD64_RIP_REGNUM): New.
14112 (supply_static_tracepoint_registers): New.
14113 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14114 (ST_REGENTRY): New.
14115 (i386_st_collect_regmap): New.
14116 (i386_NUM_ST_COLLECT_GREGS): New.
14117 (supply_static_tracepoint_registers): New.
14118 * server.c (handle_query): Handle qXfer:statictrace:read.
14119 <qSupported>: Report support for StaticTracepoints, and
14120 qXfer:statictrace:read features.
14121 * server.h (traceframe_read_sdata)
14122 (supply_static_tracepoint_registers): Declare.
14123 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14124 (unpack_varlen_hex): Include in IPA build.
14125 * Makefile.in (ustlibs, ustinc): New.
14126 (IPA_OBJS): Add remote-utils-ipa.o.
14127 ($(IPA_LIB)): Link -ldl and -lpthread.
14128 (UST_CFLAGS): New.
14129 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14130 * config.in, configure: Regenerate.
14131
14132 2010-06-20 Ian Lance Taylor <iant@google.com>
14133 Pedro Alves <pedro@codesourcery.com>
14134
14135 * linux-x86-low.c (always_true): Delete.
14136 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14137 trying to fool the compiler with always_true.
14138
14139 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14140
14141 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14142 conditions in gdbserver.
14143
14144 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14145
14146 * spu-low.c (spu_read_memory): Wrap around local store limit.
14147 (spu_write_memory): Likewise.
14148
14149 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14150
14151 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14152 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14153 LONGEST uses.
14154 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14155 uses.
14156 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14157 uses with LONGEST uses.
14158
14159 2010-06-14 Stan Shebs <stan@codesourcery.com>
14160 Pedro Alves <pedro@codesourcery.com>
14161
14162 Bytecode compiler.
14163
14164 * linux-x86-low.c: Include limits.h.
14165 (add_insns): New.
14166 (always_true): New.
14167 (EMIT_ASM): New.
14168 (EMIT_ASM32): New.
14169 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14170 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14171 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14172 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14173 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14174 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14175 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14176 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14177 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14178 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14179 (amd64_emit_void_call_2): New.
14180 (amd64_emit_ops): New.
14181 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14182 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14183 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14184 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14185 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14186 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14187 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14188 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14189 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14190 (i386_emit_stack_adjust, i386_emit_int_call_1)
14191 (i386_emit_void_call_2): New.
14192 (i386_emit_ops): New.
14193 (x86_emit_ops): New.
14194 (the_low_target): Install x86_emit_ops.
14195 * server.h (struct emit_ops): New.
14196 (get_raw_reg_func_addr): Declare.
14197 (current_insn_ptr, emit_error): Declare.
14198 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14199 (set_trace_state_variable_value): New defines.
14200 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14201 addr_get_trace_state_variable_value and
14202 addr_set_trace_state_variable_value.
14203 (symbol_list): New fields for get_raw_reg,
14204 get_trace_state_variable_value and set_trace_state_variable_value.
14205 (condfn): New typedef.
14206 (struct tracepoint): New field `compiled_cond'.
14207 (do_action_at_tracepoint): Clear compiled_cond.
14208 (get_trace_state_variable_value, set_trace_state_variable_value):
14209 Export in the IPA.
14210 (condition_true_at_tracepoint): If there's a compiled condition,
14211 run that.
14212 (current_insn_ptr, emit_error): New globals.
14213 (struct bytecode_address): New.
14214 (get_raw_reg_func_addr): New.
14215 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14216 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14217 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14218 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14219 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14220 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14221 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14222 (compile_tracepoint_condition, compile_bytecodes): New.
14223 * target.h (emit_ops): Forward declare.
14224 (struct target_ops): New field emit_ops.
14225 (target_emit_ops): New.
14226 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14227 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14228 * linux-low.c (linux_emit_ops): New.
14229 (linux_target_ops): Install it.
14230 * linux-low.h (struct linux_target_ops): New field emit_ops.
14231
14232 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14233
14234 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14235 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14236
14237 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14238 Stan Shebs <stan@codesourcery.com>
14239
14240 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14241 (all): Depend on $(extra_libraries).
14242 (install-only): Install the IPA.
14243 (IPA_OBJS, IPA_LIB): New.
14244 (clean): Remove the IPA lib.
14245 (IPAGENT_CFLAGS): New.
14246 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14247 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14248 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14249 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14250 * configure.ac: Check for atomic builtins support in the compiler.
14251 (IPA_DEPFILES, extra_libraries): Define.
14252 * configure.srv (ipa_obj): Add description.
14253 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14254 (i[34567]86-*-linux*): Set ipa_obj.
14255 (x86_64-*-linux*): Set ipa_obj.
14256 * linux-low.c (stabilizing_threads): New.
14257 (supports_fast_tracepoints): New.
14258 (linux_detach): Stabilize threads before detaching.
14259 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14260 the lwp is either not stabilizing, or is moving out of a jump pad.
14261 (linux_fast_tracepoint_collecting): New.
14262 (maybe_move_out_of_jump_pad): New.
14263 (enqueue_one_deferred_signal): New.
14264 (dequeue_one_deferred_signal): New.
14265 (linux_wait_for_event_1): If moving out of a jump pad, defer
14266 pending signals to later.
14267 (linux_stabilize_threads): New.
14268 (linux_wait_1): Check if threads need moving out of jump pads, and
14269 do it if so.
14270 (stuck_in_jump_pad_callback): New.
14271 (move_out_of_jump_pad_callback): New.
14272 (lwp_running): New.
14273 (linux_resume_one_lwp): Handle moving out of jump pads.
14274 (linux_set_resume_request): Dequeue deferred signals.
14275 (need_step_over_p): Also step over fast tracepoint jumps.
14276 (start_step_over): Also uninsert fast tracepoint jumps.
14277 (finish_step_over): Also reinsert fast tracepoint jumps.
14278 (linux_install_fast_tracepoint_jump): New.
14279 (linux_target_ops): Install linux_stabilize_threads and
14280 linux_install_fast_tracepoint_jump_pad.
14281 * linux-low.h (linux_target_ops) <get_thread_area,
14282 install_fast_tracepoint_jump_pad>: New fields.
14283 (struct lwp_info) <collecting_fast_tracepoint,
14284 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14285 (linux_get_thread_area): Declare.
14286 * linux-x86-low.c (jump_insn): New.
14287 (x86_get_thread_area): New.
14288 (append_insns): New.
14289 (push_opcode): New.
14290 (amd64_install_fast_tracepoint_jump_pad): New.
14291 (i386_install_fast_tracepoint_jump_pad): New.
14292 (x86_install_fast_tracepoint_jump_pad): New.
14293 (the_low_target): Install x86_get_thread_area and
14294 x86_install_fast_tracepoint_jump_pad.
14295 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14296 (struct fast_tracepoint_jump): New.
14297 (fast_tracepoint_jump_insn): New.
14298 (fast_tracepoint_jump_shadow): New.
14299 (find_fast_tracepoint_jump_at): New.
14300 (fast_tracepoint_jump_here): New.
14301 (delete_fast_tracepoint_jump): New.
14302 (set_fast_tracepoint_jump): New.
14303 (uninsert_fast_tracepoint_jumps_at): New.
14304 (reinsert_fast_tracepoint_jumps_at): New.
14305 (set_breakpoint_at): Use write_inferior_memory.
14306 (uninsert_raw_breakpoint): Use write_inferior_memory.
14307 (check_mem_read): Mask out fast tracepoint jumps.
14308 (check_mem_write): Mask out fast tracepoint jumps.
14309 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14310 (set_fast_tracepoint_jump): Declare.
14311 (delete_fast_tracepoint_jump)
14312 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14313 (reinsert_fast_tracepoint_jumps_at): Declare.
14314 * regcache.c: Don't compile many functions when building the
14315 in-process agent library.
14316 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14317 the register buffer in the heap.
14318 (free_register_cache): If the register buffer isn't owned by the
14319 regcache, don't free it.
14320 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14321 pre-existing register caches.
14322 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14323 type.
14324 (convert_ascii_to_int): : Constify `from' parameter type.
14325 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14326 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14327 the needed buffer in-place.
14328 (relocate_instruction): New.
14329 * server.c (handle_query) <qSymbols>: If the target supports
14330 tracepoints, give it a chance of looking up symbols. Report
14331 support for fast tracepoints.
14332 (handle_status): Stabilize threads.
14333 (process_serial_event): Adjust.
14334 * server.h (struct fast_tracepoint_jump): Forward declare.
14335 (struct process_info) <fast_tracepoint_jumps>: New field.
14336 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14337 (decode_X_packet, decode_M_packet): Adjust.
14338 (relocate_instruction): Declare.
14339 (in_process_agent_loaded): Declare.
14340 (tracepoint_look_up_symbols): Declare.
14341 (struct fast_tpoint_collect_status): Declare.
14342 (fast_tracepoint_collecting): Declare.
14343 (force_unlock_trace_buffer): Declare.
14344 (handle_tracepoint_bkpts): Declare.
14345 (initialize_low_tracepoint)
14346 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14347 * target.h (struct target_ops) <stabilize_threads,
14348 install_fast_tracepoint_jump_pad>: New fields.
14349 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14350 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14351 [HAVE_STDINT_H]: Include stdint.h.
14352 (trace_debug_1): Rename to ...
14353 (trace_vdebug): ... this.
14354 (trace_debug): Rename to ...
14355 (trace_debug_1): ... this. Add `level' parameter.
14356 (trace_debug): New.
14357 (ATTR_USED, ATTR_NOINLINE): New.
14358 (IP_AGENT_EXPORT): New.
14359 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14360 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14361 (about_to_request_buffer_space, trace_buffer_is_full)
14362 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14363 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14364 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14365 (traceframe_write_count, traceframes_created)
14366 (trace_state_variables)
14367 New renaming defines.
14368 (struct ipa_sym_addresses): New.
14369 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14370 (symbol_list): New.
14371 (ipa_sym_addrs): New.
14372 (all_tracepoint_symbols_looked_up): New.
14373 (in_process_agent_loaded): New.
14374 (write_e_ipa_not_loaded): New.
14375 (maybe_write_ipa_not_loaded): New.
14376 (tracepoint_look_up_symbols): New.
14377 (debug_threads) [IN_PROCESS_AGENT]: New.
14378 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14379 (UNKNOWN_SIDE_EFFECTS): New.
14380 (stop_tracing): New.
14381 (flush_trace_buffer): New.
14382 (stop_tracing_bkpt): New.
14383 (flush_trace_buffer_bkpt): New.
14384 (read_inferior_integer): New.
14385 (read_inferior_uinteger): New.
14386 (read_inferior_data_pointer): New.
14387 (write_inferior_data_pointer): New.
14388 (write_inferior_integer): New.
14389 (write_inferior_uinteger): New.
14390 (struct collect_static_trace_data_action): Delete.
14391 (enum tracepoint_type): New.
14392 (struct tracepoint) <type>: New field `type'.
14393 <actions_str, step_actions, step_actions_str>: Only include in
14394 GDBserver.
14395 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14396 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14397 (tracepoints): Use IP_AGENT_EXPORT.
14398 (last_tracepoint): Don't include in the IPA.
14399 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14400 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14401 (alloced_trace_state_variables): New.
14402 (trace_state_variables): Use IP_AGENT_EXPORT.
14403 (traceframe_t): Delete unused variable.
14404 (circular_trace_buffer): Don't include in the IPA.
14405 (trace_buffer_start): Delete.
14406 (struct trace_buffer_control): New.
14407 (trace_buffer_free): Delete.
14408 (struct ipa_trace_buffer_control): New.
14409 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14410 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14411 New.
14412 (trace_buffer_ctrl): New.
14413 (TRACE_BUFFER_CTRL_CURR): New.
14414 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14415 Reimplement as macros.
14416 (trace_buffer_wrap): Delete.
14417 (traceframe_write_count, traceframe_read_count)
14418 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14419 (struct tracepoint_hit_ctx) <type>: New field.
14420 (struct fast_tracepoint_ctx): New.
14421 (memory_barrier): New.
14422 (cmpxchg): New.
14423 (record_tracepoint_error): Update atomically in the IPA.
14424 (clear_inferior_trace_buffer): New.
14425 (about_to_request_buffer_space): New.
14426 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14427 updating the same buffer.
14428 (add_tracepoint): Default the tracepoint's type to trap
14429 tracepoint, and orig_size to -1.
14430 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14431 internal variables.
14432 (create_trace_state_variable): New parameter `gdb'. Handle it.
14433 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14434 (cmd_qtdp): Handle fast tracepoints.
14435 (cmd_qtdv): Adjust.
14436 (max_jump_pad_size): New.
14437 (gdb_jump_pad_head): New.
14438 (get_jump_space_head): New.
14439 (claim_jump_space): New.
14440 (sort_tracepoints): New.
14441 (MAX_JUMP_SIZE): New.
14442 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14443 IPA.
14444 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14445 support. Upload fast traceframes, and delete internal IPA
14446 breakpoints.
14447 (stop_tracing_handler): New.
14448 (flush_trace_buffer_handler): New.
14449 (cmd_qtstop): Upload fast tracepoints.
14450 (response_tracepoint): Handle fast tracepoints.
14451 (tracepoint_finished_step): Upload fast traceframes. Set the
14452 tracepoint hit context's tracepoint type.
14453 (handle_tracepoint_bkpts): New.
14454 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14455 type. Add comment about fast tracepoints.
14456 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14457 non-existing action_str field.
14458 (get_context_regcache): Handle fast tracepoints.
14459 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14460 to the regcache.
14461 (fast_tracepoint_from_jump_pad_address): New.
14462 (fast_tracepoint_from_ipa_tpoint_address): New.
14463 (collecting_t): New.
14464 (force_unlock_trace_buffer): New.
14465 (fast_tracepoint_collecting): New.
14466 (collecting): New.
14467 (gdb_collect): New.
14468 (write_inferior_data_ptr): New.
14469 (target_tp_heap): New.
14470 (target_malloc): New.
14471 (download_agent_expr): New.
14472 (UALIGN): New.
14473 (download_tracepoints): New.
14474 (download_trace_state_variables): New.
14475 (upload_fast_traceframes): New.
14476 (IPA_FIRST_TRACEFRAME): New.
14477 (IPA_NEXT_TRACEFRAME_1): New.
14478 (IPA_NEXT_TRACEFRAME): New.
14479 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14480 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14481 (gdb_jump_pad_buffer_end): New.
14482 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14483 (initialize_tracepoint): Adjust.
14484 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14485 buffer. Initialize the low module.
14486 * utils.c (PREFIX, TOOLNAME): New.
14487 (malloc_failure): Use PREFIX.
14488 (error): In the IPA, an error causes an exit.
14489 (fatal, warning): Use PREFIX.
14490 (internal_error): Use TOOLNAME.
14491 (NUMCELLS): Increase to 10.
14492 * configure, config.in: Regenerate.
14493
14494 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14495
14496 * server.c (handle_query) <qSupported>: Do two passes over the
14497 qSupported string to avoid nesting strtok.
14498
14499 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14500
14501 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14502 (CDEPS): New.
14503 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14504 -Wl,--dynamic-list.
14505 * configure: Regenerate.
14506 * proc-service.list: New.
14507
14508 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14509
14510 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14511 New comment.
14512
14513 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14514
14515 * gdbreplay.c (remote_open): Check error return from socket() call by
14516 its equality to -1 not by it being negative.
14517 * remote-utils.c (remote_open): Likewise.
14518
14519 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14520
14521 * config.h: Regenerate.
14522
14523 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14524
14525 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14526 doesn't provide PTRACE_GET_THREAD_AREA.
14527
14528 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14529
14530 * linux-m68k-low.c: Include <asm/ptrace.h>
14531 (ps_get_thread_area): Implement.
14532
14533 2010-05-03 Doug Evans <dje@google.com>
14534
14535 * event-loop.c (struct callback_event): New struct.
14536 (callback_list): New global.
14537 (append_callback_event, delete_callback_event): New functions.
14538 (process_callback): New function.
14539 (start_event_loop): Call it.
14540 * remote-utils.c (NOT_SCHEDULED): Define.
14541 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14542 moved out of readchar.
14543 (readchar): Rewrite. Call reschedule before returning.
14544 (reset_readchar): New function.
14545 (remote_close): Call it.
14546 (process_remaining, reschedule): New functions.
14547 * server.h (callback_handler_func): New typedef.
14548 (append_callback_event, delete_callback_event): Declare.
14549
14550 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14551
14552 * proc-service.c (ps_pglobal_lookup): Use
14553 thread_db_look_up_one_symbol.
14554 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14555 parameter. Use it instead of all_symbols_looked_up.
14556 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14557 field.
14558 (all_symbols_looked_up): Don't declare.
14559 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14560 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14561 field.
14562 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14563 Set all_symbols_looked_up here.
14564 (thread_db_look_up_one_symbol): New.
14565 (thread_db_get_tls_address): Adjust.
14566 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14567 thread_db object on the heap, and tentatively set it in the
14568 process structure.
14569 (thread_db_init): Don't set all_symbols_looked_up here.
14570 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14571
14572 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14573
14574 * linux-low.c (linux_kill, linux_detach): Adjust.
14575 (status_pending_p_callback): Remove redundant statement. Check
14576 for !TARGET_WAITIKIND_IGNORE, instead of
14577 TARGET_WAITKIND_STOPPED.
14578 (handle_tracepoints): Make sure LWP is locked. Adjust.
14579 (linux_wait_for_event_1): Adjust.
14580 (linux_cancel_breakpoints): New.
14581 (unsuspend_one_lwp): New.
14582 (unsuspend_all_lwps): New.
14583 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14584 (send_sigstop_callback): Change return type to int, add new
14585 `except' parameter and handle it.
14586 (suspend_and_send_sigstop_callback): New.
14587 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14588 pass them down. If SUSPEND, also increment the lwp's suspend
14589 count.
14590 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14591 (need_step_over_p): Don't consider suspended LWPs.
14592 (start_step_over): Adjust.
14593 (proceed_one_lwp): Change return type to int, add new `except'
14594 parameter and handle it.
14595 (unsuspend_and_proceed_one_lwp): New.
14596 (proceed_all_lwps): Use find_inferior instead of
14597 for_each_inferior.
14598 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14599 also decrement the suspend count of LWPs. Pass `except' down,
14600 instead of hacking its suspend count.
14601 (linux_pause_all): Add `freeze' parameter. Adjust.
14602 (linux_unpause_all): New.
14603 (linux_target_ops): Install linux_unpause_all.
14604 * server.c (handle_status): Adjust.
14605 * target.h (struct target_ops): New fields `unpause_all' and
14606 `cancel_breakpoints'. Add new parameter to `pause_all'.
14607 (pause_all): Add new `freeze' parameter.
14608 (unpause_all): New.
14609 (cancel_breakpoints): New.
14610 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14611 cancel breakpoints.
14612 (cmd_qtstart): Pause threads.
14613 (stop_tracing): Pause threads, and cancel breakpoints.
14614 * win32-low.c (win32_target_ops): Adjust.
14615
14616 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14617
14618 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14619 the inferior right away from here...
14620 (linux_wait_1): ... to here, and adjust to check the thread's
14621 last_resume_kind instead of the lwp's step or stop_expected flags.
14622
14623 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14624
14625 * README: Use consistent `GDB' and `GDBserver' spellings.
14626
14627 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14628
14629 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14630 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14631 (linux_detach_one_lwp): Assume the lwp is stopped.
14632 (any_thread_of): Delete.
14633 (linux_detach): Stop all lwps here. Don't blindly delete all
14634 breakpoints.
14635 (delete_lwp_callback): New.
14636 (linux_mourn): Delete all lwps of the process that is gone.
14637 (linux_wait_1): Don't delete the last lwp of the process here.
14638 * mem-break.h (mark_breakpoints_out): Declare.
14639 * mem-break.c (mark_breakpoints_out): New.
14640 (free_all_breakpoints): Use it.
14641 * server.c (handle_target_event): If the process is gone, mark
14642 breakpoints out.
14643 * thread-db.c (struct thread_db) <create_bp>: New field.
14644 (thread_db_enable_reporting): Fix prototype. Store a thread event
14645 breakpoint reference in the thread_db struct.
14646 (thread_db_load_search): Clear the thread_db object.
14647 (try_thread_db_load_1): Ditto.
14648 (switch_to_process): New.
14649 (disable_thread_event_reporting): Use it.
14650 (remove_thread_event_breakpoints): New.
14651 (thread_db_detach, thread_db_mourn): Use it.
14652
14653 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14654
14655 * linux-low.c (linux_enable_event_reporting): New.
14656 (linux_wait_for_event_1, handle_extended_wait): Use it.
14657
14658 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14659
14660 * linux-low.c (linux_kill_one_lwp, linux_kill)
14661 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14662 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14663 SIGSTOP even if the LWP is stopped.
14664 (send_sigstop_callback): New.
14665 (stop_all_lwps): Use send_sigstop_callback instead.
14666 (linux_resume_one_thread): Adjust.
14667 (proceed_one_lwp): Still proceed an LWP that the client has
14668 requested to stop, if we haven't reported it as stopped yet. Make
14669 sure that LWPs the client want stopped, have a pending SIGSTOP.
14670
14671 2010-04-26 Doug Evans <dje@google.com>
14672
14673 * server.c (handle_general_set): Make static.
14674
14675 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14676 Print received char after testing for error/eof instead of before.
14677 (input_interrupt): Tweak comment.
14678
14679 2010-04-23 Doug Evans <dje@google.com>
14680
14681 * server.c (start_inferior): Print inferior argv if --debug.
14682
14683 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14684
14685 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14686 * nto-x86-low.c: Include server.h
14687
14688 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14689
14690 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14691 be consistent with other sources of this directory.
14692 (init_registers_amd64): Correct name of source file of this function
14693 in the comment.
14694
14695 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14696
14697 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14698 64-bit executables.
14699
14700 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14701
14702 * win32-i386-low.c: Add 64-bit support.
14703 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14704 (init_registers_amd64): Declare.
14705 (mappings): Add 64-bit version of array.
14706 (init_windows_x86): New function.
14707 (the_low_target): Change init_arch field to init_windows_x86.
14708
14709 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14710
14711 * win32-low.c: Adapt to support also 64-bit architecture.
14712 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14713 (get_image_name): Use SIZE_T type for local variable `done'.
14714 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14715 (toolhelp_get_dll_name): Idem.
14716 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14717 Use uintptr_t typecast to avoid warning.
14718 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14719 (handle_exception): Use phex_nz to avoid warning.
14720 (win32_wait): Remove unused local variable `process'.
14721
14722 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14723
14724 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14725 `amd64-avx.o'.
14726
14727 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14728
14729 * configure.ac: Use `ws2_32' library for srv_mingw.
14730 * configure: Regenerate.
14731 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14732 * remote-utils.c: Likewise.
14733
14734 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14735
14736 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14737 if __x86_64__ is defined.
14738
14739 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14740
14741 * configure: Regenerate.
14742
14743 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14744
14745 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14746 * target.h (target_ops): New get_tib_address field.
14747 * win32-low.h (win32_thread_info): Add thread_local_base field.
14748 * win32-low.c (child_add_thread): Add tlb argument.
14749 Set thread_local_base field to TLB.
14750 (get_child_debug_event): Adapt to child_add_thread change.
14751 (win32_get_tib_address): New function.
14752 (win32_target_ops): Set get_tib_address field to
14753 win32_get_tib_address.
14754 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14755
14756 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14757
14758 * linux-low.c (linux_mourn): Also remove the process.
14759 * server.c (handle_target_event): Don't remove the process here.
14760 * nto-low.c (nto_mourn): New.
14761 (nto_target_ops): Install it.
14762 * spu-low.c (spu_mourn): New.
14763 (spu_target_ops): Install it.
14764 * win32-low.c (win32_mourn): New.
14765 (win32_target_ops): Install it.
14766
14767 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14768
14769 * server.h (buffer_xml_printf): Remove redundant `;'.
14770
14771 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14772
14773 * regcache.c (set_register_cache): Invalidate regcaches before
14774 changing the register cache layout.
14775 (regcache_invalidate_one): Allow a NULL regcache.
14776 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14777 regcaches before changing the register cache layout or the target
14778 regsets.
14779
14780 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14781
14782 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14783 variable warning on Linux/x86-64.
14784
14785 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14786
14787 GDBserver disconnected tracing support.
14788
14789 * linux-low.c (linux_remove_process): Delete.
14790 (add_lwp): Don't set last_resume_kind here.
14791 (linux_kill): Use `mourn'.
14792 (linux_detach): Use `thread_db_detach', and `mourn'.
14793 (linux_mourn): New.
14794 (linux_attach_lwp_1): Adjust comment.
14795 (linux_attach): last_resume_kind moved the thread_info; adjust.
14796 (status_pending_p_callback): Adjust.
14797 (linux_wait_for_event_1): Adjust.
14798 (count_events_callback, select_singlestep_lwp_callback)
14799 (select_event_lwp_callback, cancel_breakpoints_callback)
14800 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14801 (proceed_one_lwp): Adjust.
14802 (linux_async): Add debug output.
14803 (linux_thread_stopped): New.
14804 (linux_pause_all): New.
14805 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14806 linux_pause_all.
14807 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14808 (thread_db_free): Delete declaration.
14809 (thread_db_detach, thread_db_mourn): Declare.
14810 * thread-db.c (thread_db_init): Use thread_db_mourn.
14811 (thread_db_free): Delete, split in two.
14812 (disable_thread_event_reporting): New.
14813 (thread_db_detach): New.
14814 (thread_db_mourn): New.
14815
14816 * server.h (struct thread_info) <last_resume_kind>: New field.
14817 <attached>: Add comment.
14818 <gdb_detached>: New field.
14819 (handler_func): Change return type to int.
14820 (handle_serial_event, handle_target_event): Ditto.
14821 (gdb_connected): Declare.
14822 (tracing): Delete.
14823 (disconnected_tracing): Declare.
14824 (stop_tracing): Declare.
14825
14826 * server.c (handle_query) <qSupported>: Report support for
14827 disconnected tracing.
14828 (queue_stop_reply_callback): Account for running threads.
14829 (gdb_wants_thread_stopped): New.
14830 (gdb_wants_all_threads_stopped): New.
14831 (gdb_reattached_process): New.
14832 (handle_status): Clear the `gdb_detached' flag of all processes.
14833 In all-stop, stop all threads.
14834 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14835 (process_serial_event): If the remote connection breaks, or if an
14836 exit was forced with "monitor exit", force an event loop exit.
14837 Handle disconnected tracing on detach.
14838 (handle_serial_event): Adjust.
14839 (handle_target_event): If GDB isn't connected, forward events back
14840 to the inferior, unless the last process exited, in which case,
14841 exit gdbserver. Adjust interface.
14842
14843 * remote-utils.c (remote_open): Don't block in accept. Instead
14844 register an event loop source on the listen socket file
14845 descriptor. Refactor bits into ...
14846 (listen_desc): ... this new global.
14847 (gdb_connected): ... this new function.
14848 (enable_async_notification): ... this new function.
14849 (handle_accept_event): ... this new function.
14850 (remote_close): Clear remote_desc.
14851
14852 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14853
14854 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14855 New fields.
14856 (mourn_inferior): Define.
14857 (target_process_qsupported): Avoid the dangling else problem.
14858 (thread_stopped): Define.
14859 (pause_all): Define.
14860 (target_waitstatus_to_string): Declare.
14861 * target.c (target_waitstatus_to_string): New.
14862
14863 * tracepoint.c (tracing): Make extern.
14864 (disconnected_tracing): New.
14865 (stop_tracing): Make extern. Handle tracing stops due to GDB
14866 disconnecting.
14867 (cmd_qtdisconnected): New.
14868 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14869 (handle_tracepoint_general_set): Handle QTDisconnected.
14870
14871 * event-loop.c (event_handler_func): Change return type to int.
14872 (process_event): Bail out if the event handler wants the event
14873 loop to stop.
14874 (handle_file_event): Ditto.
14875 (start_event_loop): Bail out if the event handler wants the event
14876 loop to stop.
14877
14878 * nto-low.c (nto_target_ops): Adjust.
14879 * spu-low.c (spu_wait): Don't remove the process here.
14880 (spu_target_ops): Adjust.
14881 * win32-low.c (win32_wait): Don't remove the process here.
14882 (win32_target_ops): Adjust.
14883
14884 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14885
14886 * regcache.c (realloc_register_cache): Invalidate inferior's
14887 regcache before recreating it.
14888
14889 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14890
14891 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14892
14893 2010-04-09 Stan Shebs <stan@codesourcery.com>
14894 Pedro Alves <pedro@codesourcery.com>
14895
14896 * server.h (LONGEST): New.
14897 (struct thread_info) <while_stepping>: New field.
14898 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14899 Declare.
14900 (initialize_tracepoint, handle_tracepoint_general_set)
14901 (handle_tracepoint_query, tracepoint_finished_step)
14902 (tracepoint_was_hit, release_while_stepping_state_list):
14903 (current_traceframe): Declare.
14904 * server.c (handle_general_set): Handle tracepoint packets.
14905 (read_memory): New.
14906 (write_memory): New.
14907 (handle_search_memory_1): Use read_memory.
14908 (handle_query): Report support for conditional tracepoints, trace
14909 state variables, and tracepoint sources. Handle tracepoint
14910 queries.
14911 (main): Initialize the tracepoints module.
14912 (process_serial_event): Handle traceframe reads/writes.
14913
14914 * linux-low.c (handle_tracepoints): New.
14915 (linux_wait_1): Call it.
14916 (linux_resume_one_lwp): Handle while-stepping.
14917 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14918 (linux_target_ops): Install them.
14919 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14920 New field.
14921 * linux-x86-low.c (x86_supports_tracepoints): New.
14922 (the_low_target). Install it.
14923
14924 * mem-break.h (delete_breakpoint): Declare.
14925 * mem-break.c (delete_breakpoint): Make external.
14926
14927 * target.h (struct target_ops): Add `supports_tracepoints',
14928 `read_pc', and `write_pc' fields.
14929 (target_supports_tracepoints): Define.
14930 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14931 (phex_nz): New.
14932
14933 * regcache.h (struct regcache) <registers_owned>: New field.
14934 (init_register_cache, regcache_cpy): Declare.
14935 (regcache_read_pc, regcache_write_pc): Declare.
14936 (register_cache_size): Declare.
14937 (supply_regblock): Declare.
14938 * regcache.c (init_register_cache): New.
14939 (new_register_cache): Use it.
14940 (regcache_cpy): New.
14941 (register_cache_size): New.
14942 (supply_regblock): New.
14943 (regcache_read_pc, regcache_write_pc): New.
14944
14945 * tracepoint.c: New.
14946
14947 * Makefile.in (OBS): Add tracepoint.o.
14948 (tracepoint.o): New rule.
14949
14950 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14951
14952 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14953 (i386-mmx.o): New.
14954 (i386-mmx.c): Likewise.
14955 (i386-mmx-linux.o): Likewise.
14956 (i386-mmx-linux.c): Likewise.
14957
14958 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14959 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14960 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14961 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14962
14963 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14964 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14965 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14966
14967 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14968
14969 * Makefile.in (clean): Updated.
14970 (i386-avx.o): New.
14971 (i386-avx.c): Likewise.
14972 (i386-avx-linux.o): Likewise.
14973 (i386-avx-linux.c): Likewise.
14974 (amd64-avx.o): Likewise.
14975 (amd64-avx.c): Likewise.
14976 (amd64-avx-linux.o): Likewise.
14977 (amd64-avx-linux.c): Likewise.
14978
14979 * configure.srv (srv_i386_regobj): Add i386-avx.o.
14980 (srv_i386_linux_regobj): Add i386-avx-linux.o.
14981 (srv_amd64_regobj): Add amd64-avx.o.
14982 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
14983 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
14984 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
14985 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
14986 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
14987 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
14988 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
14989
14990 * i387-fp.c: Include "i386-xstate.h".
14991 (i387_xsave): New.
14992 (i387_cache_to_xsave): Likewise.
14993 (i387_xsave_to_cache): Likewise.
14994 (x86_xcr0): Likewise.
14995
14996 * i387-fp.h (i387_cache_to_xsave): Likewise.
14997 (i387_xsave_to_cache): Likewise.
14998 (x86_xcr0): Likewise.
14999
15000 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15001 * linux-crisv32-low.c (target_regsets): Likewise.
15002 * linux-m68k-low.c (target_regsets): Likewise.
15003 * linux-mips-low.c (target_regsets): Likewise.
15004 * linux-ppc-low.c (target_regsets): Likewise.
15005 * linux-s390-low.c (target_regsets): Likewise.
15006 * linux-sh-low.c (target_regsets): Likewise.
15007 * linux-sparc-low.c (target_regsets): Likewise.
15008 * linux-xtensa-low.c (target_regsets): Likewise.
15009
15010 * linux-low.c: Include <sys/uio.h>.
15011 (regsets_fetch_inferior_registers): Support nt_type.
15012 (regsets_store_inferior_registers): Likewise.
15013 (linux_process_qsupported): New.
15014 (linux_target_ops): Add linux_process_qsupported.
15015
15016 * linux-low.h (regset_info): Add nt_type.
15017 (linux_target_ops): Add process_qsupported.
15018
15019 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15020 and <sys/uio.h>.
15021 (init_registers_i386_avx_linux): New.
15022 (init_registers_amd64_avx_linux): Likewise.
15023 (xmltarget_i386_linux_no_xml): Likewise.
15024 (xmltarget_amd64_linux_no_xml): Likewise.
15025 (PTRACE_GETREGSET): Likewise.
15026 (PTRACE_SETREGSET): Likewise.
15027 (x86_fill_xstateregset): Likewise.
15028 (x86_store_xstateregset): Likewise.
15029 (use_xml): Likewise.
15030 (x86_linux_update_xmltarget): Likewise.
15031 (x86_linux_process_qsupported): Likewise.
15032 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15033 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15034 init_registers_i386_linux here. Call
15035 x86_linux_update_xmltarget.
15036 (the_low_target): Add x86_linux_process_qsupported.
15037
15038 * server.c (handle_query): Call target_process_qsupported.
15039
15040 * target.h (target_ops): Add process_qsupported.
15041 (target_process_qsupported): New.
15042
15043 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15044
15045 * inferiors.c (add_thread): Set last_status kind to
15046 TARGET_WAITKIND_IGNORE.
15047 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15048 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15049 (linux_wait_1): Move `thread' local definition to block that uses
15050 it. Don't NULL initialize `event_child'.
15051 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15052 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15053 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15054
15055 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15056
15057 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15058 an extended waitstatus, or by a watchpoint.
15059 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15060 thread was stepping or has been stopped by a watchpoint.
15061
15062 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15063
15064 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15065 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15066 of another, then delete the previous, and validate all
15067 breakpoints.
15068 (validate_inserted_breakpoint): New.
15069 (delete_disabled_breakpoints): New.
15070 (validate_breakpoints): New.
15071 (check_mem_read): Validate breakpoints before trusting their
15072 shadow. Delete disabled breakpoints.
15073 (check_mem_write): Validate breakpoints before trusting they
15074 should be inserted. Delete disabled breakpoints.
15075 * mem-break.h (validate_breakpoints):
15076 * server.c (handle_query): Validate breakpoints when we see a
15077 qSymbol query.
15078
15079 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15080
15081 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15082 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15083 if we could tell there's a GDB breakpoint at stop_pc.
15084 (need_step_over_p): Don't do a step over if we find a GDB
15085 breakpoint at the resume PC.
15086
15087 * mem-break.c (struct raw_breakpoint): New.
15088 (enum bkpt_type): New type `gdb_breakpoint'.
15089 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15090 fields. New field `raw'.
15091 (find_raw_breakpoint_at): New.
15092 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15093 breakpoint instead.
15094 (set_breakpoint_at): Adjust.
15095 (delete_raw_breakpoint): New.
15096 (release_breakpoint): New.
15097 (delete_breakpoint): Rename to...
15098 (delete_breakpoint_1): ... this. Add proc parameter. Use
15099 release_breakpoint. Return ENOENT.
15100 (delete_breakpoint): Reimplement.
15101 (find_breakpoint_at): Delete.
15102 (find_gdb_breakpoint_at): New.
15103 (delete_breakpoint_at): Delete.
15104 (set_gdb_breakpoint_at): New.
15105 (delete_gdb_breakpoint_at): New.
15106 (gdb_breakpoint_here): New.
15107 (set_reinsert_breakpoint): Use release_breakpoint.
15108 (uninsert_breakpoint): Rename to ...
15109 (uninsert_raw_breakpoint): ... this.
15110 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15111 (reinsert_raw_breakpoint): Change parameter type to
15112 raw_breakpoint.
15113 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15114 instead.
15115 (check_breakpoints): Adjust. Use release_breakpoint.
15116 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15117 (breakpoint_inserted_here): Ditto.
15118 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15119 Don't trust the breakpoint's shadow if it is not inserted.
15120 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15121 (delete_all_breakpoints): Adjust.
15122 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15123 use delete_breakpoint_1.
15124
15125 * mem-break.h (breakpoints_supported): Delete declaration.
15126 (set_gdb_breakpoint_at): Declare.
15127 (gdb_breakpoint_here): Declare.
15128 (delete_breakpoint_at): Delete.
15129 (delete_gdb_breakpoint_at): Declare.
15130
15131 * server.h (struct raw_breakpoint): Forward declare.
15132 (struct process_info): New field `raw_breakpoints'.
15133
15134 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15135 breakpoints.
15136
15137 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15138
15139 * linux-low.c (status_pending_p_callback): Fix comment.
15140 (linux_wait_for_event_1): Move most of the internal breakpoint
15141 handling from here...
15142 (linux_wait_1): ... to here.
15143 (count_events_callback): New.
15144 (select_singlestep_lwp_callback): New.
15145 (select_event_lwp_callback): New.
15146 (cancel_breakpoints_callback): New.
15147 (select_event_lwp): New.
15148 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15149 priority to all LWPs that have had events that should be reported
15150 to the client. Cancel breakpoints when about to reporting the
15151 event to the client, not while stopping lwps. No longer cancel
15152 finished single-steps here.
15153 (cancel_finished_single_step): Delete.
15154 (cancel_finished_single_steps): Delete.
15155
15156 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15157
15158 * mem-break.c (enum bkpt_type): New.
15159 (struct breakpoint): New field `type'.
15160 (set_breakpoint_at): Change return type to struct breakpoint
15161 pointer. Set type to `other_breakpoint' by default.
15162 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15163 in the breakpoint list.
15164 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15165 (reinsert_breakpoint): Rename to ...
15166 (reinsert_raw_breakpoint): ... this.
15167 (reinsert_breakpoints_at): Adjust.
15168 * mem-break.h (struct breakpoint): Declare.
15169 (set_breakpoint_at): Change return type to struct breakpoint
15170 pointer.
15171
15172 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15173
15174 * server.c (handle_query): Assign, not compare.
15175
15176 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15177
15178 Teach linux gdbserver to step-over-breakpoints.
15179
15180 * linux-low.c (can_hardware_single_step): New.
15181 (supports_breakpoints): New.
15182 (handle_extended_wait): If stopping threads, read the stop pc of
15183 the new cloned LWP.
15184 (get_pc): New.
15185 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15186 low target doesn't support retrieving the PC.
15187 (add_lwp): Set last_resume_kind to resume_continue.
15188 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15189 (linux_attach): Don't clear stop_expected. Set the lwp's
15190 last_resume_kind to resume_stop.
15191 (linux_detach_one_lwp): Don't check for removed breakpoints.
15192 (check_removed_breakpoint): Delete.
15193 (status_pending_p): Rename to ...
15194 (status_pending_p_callback): ... this. Don't check for removed
15195 breakpoints. Don't consider threads that are stopped from GDB's
15196 perspective.
15197 (linux_wait_for_lwp): Always read the stop_pc here.
15198 (cancel_breakpoint): New.
15199 (step_over_bkpt): New global.
15200 (linux_wait_for_event_1): Implement stepping over breakpoints.
15201 (gdb_wants_lwp_stopped): New.
15202 (gdb_wants_all_stopped): New.
15203 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15204 single-step traps here. Store the thread's last reported target
15205 wait status.
15206 (send_sigstop): Don't clear stop_expected. Always set it,
15207 instead.
15208 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15209 (cancel_finished_single_step): New.
15210 (cancel_finished_single_steps): New.
15211 (wait_for_sigstop): Don't cancel finished single-step traps here.
15212 (linux_resume_one_lwp): Don't check for removed breakpoints.
15213 Don't set `step' on non-hardware step archs.
15214 (linux_set_resume_request): Ignore resume_stop requests if already
15215 stopping or stopped. Set the lwp's last_resume_kind.
15216 (resume_status_pending_p): Don't check for removed breakpoints.
15217 (need_step_over_p): New.
15218 (start_step_over): New.
15219 (finish_step_over): New.
15220 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15221 requests. Clear the thread's last reported target waitstatus.
15222 Don't use the `suspended' flag. Don't consider pending breakpoints.
15223 (linux_resume): Start a step-over if necessary.
15224 (proceed_one_lwp): New.
15225 (proceed_all_lwps): New.
15226 (unstop_all_lwps): New.
15227 * linux-low.h (struct lwp_info): Rewrite comment for the
15228 `suspended' flag. Add the `stop_pc' field. Delete the
15229 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15230 Add `'last_resume_kind' and `need_step_over' fields.
15231 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15232 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15233 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15234 (set_raw_breakpoint_at): New.
15235 (set_breakpoint_at): Rewrite to use it.
15236 (reinsert_breakpoint_handler): Delete.
15237 (set_reinsert_breakpoint): New.
15238 (reinsert_breakpoint_by_bp): Delete.
15239 (delete_reinsert_breakpoints): New.
15240 (uninsert_breakpoint): Rewrite.
15241 (uninsert_breakpoints_at): New.
15242 (reinsert_breakpoint): Rewrite.
15243 (reinsert_breakpoints_at): New.
15244 (check_breakpoints): Rewrite.
15245 (breakpoint_here): New.
15246 (breakpoint_inserted_here): New.
15247 (check_mem_read): Adjust.
15248 * mem-break.h (breakpoints_supported, breakpoint_here)
15249 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15250 (reinsert_breakpoint_by_bp): Delete declaration.
15251 (delete_reinsert_breakpoints): Declare.
15252 (reinsert_breakpoint): Delete declaration.
15253 (reinsert_breakpoints_at): Declare.
15254 (uninsert_breakpoint): Delete declaration.
15255 (uninsert_breakpoints_at): Declare.
15256 (check_breakpoints): Adjust prototype.
15257 * server.h: Adjust include order.
15258 (struct thread_info): Declare here. Add a `last_status' field.
15259
15260 2010-03-23 Michael Snyder <msnyder@vmware.com>
15261
15262 * server.c (crc32): New function.
15263 (handle_query): Add handling for 'qCRC:' request.
15264
15265 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15266
15267 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15268 lwp had been stopped by a watchpoint.
15269
15270 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15271
15272 * server.h (internal_error): Declare.
15273 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15274 * utils.c (internal_error): New function.
15275
15276 2010-03-15 Andreas Schwab <schwab@redhat.com>
15277
15278 * configure.srv: Fix typo setting srv_regobj.
15279
15280 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15281
15282 * linux-low.c (fetch_register): Avoid passing a non string literal
15283 format to `error'.
15284 (usr_store_inferior_registers): Ditto.
15285
15286 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15287
15288 * linux-low.c (linux_write_memory): Bail out early if peeking
15289 memory failed.
15290
15291 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15292
15293 * linux-low.h (struct lwp_info): New fields
15294 `stopped_by_watchpoint' and `stopped_data_address'.
15295 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15296 here, and cache them in the lwp object.
15297 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15298 directly.
15299 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15300 field.
15301 (linux_stopped_by_watchpoint): Rewrite.
15302 (linux_stopped_data_address): Rewrite.
15303
15304 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15305
15306 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15307 switching the current inferior, not before.
15308
15309 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15310
15311 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15312 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15313 i386-linux.c and amd64-linux.c.
15314 (reg-i386.o): Removed.
15315 (reg-i386.c): Likewise.
15316 (reg-i386-linux.o): Likewise.
15317 (reg-i386-linux.c): Likewise.
15318 (reg-x86-64.o): Likewise.
15319 (reg-x86-64.c): Likewise.
15320 (reg-x86-64-linux.o): Likewise.
15321 (reg-x86-64-linux.c): Likewise.
15322 (i386.o): New.
15323 (i386.c): Likewise.
15324 (i386-linux.o): Likewise.
15325 (i386-linux.c): Likewise.
15326 (amd64.o): Likewise.
15327 (amd64.c): Likewise.
15328 (amd64-linux.o): Likewise.
15329 (amd64-linux.c): Likewise.
15330
15331 * configure.srv (srv_i386_regobj): New.
15332 (srv_i386_linux_regobj): Likewise.
15333 (srv_amd64_regobj): Likewise.
15334 (srv_amd64_linux_regobj): Likewise.
15335 (srv_i386_32bit_xmlfiles): Likewise.
15336 (srv_i386_64bit_xmlfiles): Likewise.
15337 (srv_i386_xmlfiles): Likewise.
15338 (srv_amd64_xmlfiles): Likewise.
15339 (srv_i386_linux_xmlfiles): Likewise.
15340 (srv_amd64_linux_xmlfiles): Likewise.
15341 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15342 srv_xmlfiles to $srv_i386_xmlfiles.
15343 (i[34567]86-*-mingw32ce*): Likewise.
15344 (i[34567]86-*-mingw*): Likewise.
15345 (i[34567]86-*-nto*): Likewise.
15346 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15347 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15348 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15349 (x86_64-*-linux*): Likewise.
15350
15351 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15352 (init_registers_amd64_linux): New.
15353 (x86_arch_setup): Replace init_registers_x86_64_linux with
15354 init_registers_amd64_linux.
15355
15356 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15357
15358 * configure.ac: Check for libdl. If it is not available link against
15359 static libthread_db.
15360 * configure: Regenerate.
15361
15362 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15363
15364 PR9605
15365
15366 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15367 handing a read watchpoint.
15368 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15369
15370 2010-02-12 Doug Evans <dje@google.com>
15371
15372 * linux-low.c (linux_supports_tracefork_flag): Document.
15373 (linux_look_up_symbols): Add comment.
15374
15375 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15376
15377 * regcache.c (supply_register): Clear regcache if buf is NULL.
15378
15379 2010-02-02 Nicolas Roche <roche@sourceware.org>
15380 Joel Brobecker <brobecker@adacore.com>
15381
15382 * inferiors.c (find_inferior): Add function documentation.
15383 (unloaded_dll): Handle the case where the unloaded dll has not
15384 been previously registered in the dll list.
15385
15386 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15387
15388 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15389 (thumb2_breakpoint): New.
15390 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15391
15392 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15393
15394 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15395 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15396 breakpoints.
15397
15398 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15399
15400 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15401
15402 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15403
15404 * linux-s390-low.c (s390_collect_ptrace_register)
15405 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15406
15407 2010-01-21 Doug Evans <dje@google.com>
15408
15409 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15410 (PTRACE_ARG4_TYPE): New macro.
15411 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15412 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15413 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15414 (usr_store_inferior_registers): Ditto.
15415 (linux_read_memory, linux_write_memory): Ditto.
15416 (linux_test_for_tracefork): Ditto.
15417
15418 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15419 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15420
15421 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15422
15423 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15424 target.
15425
15426 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15427
15428 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15429 prototype to take a regcache. Adjust.
15430
15431 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15432
15433 * regcache.h (struct thread_info): Forward declare.
15434 (struct regcache): New.
15435 (new_register_cache): Adjust prototype.
15436 (get_thread_regcache): Declare.
15437 (free_register_cache): Adjust prototype.
15438 (registers_to_string, registers_from_string): Ditto.
15439 (supply_register, supply_register_by_name, collect_register)
15440 (collect_register_as_string, collect_register_by_name): Ditto.
15441 * regcache.c (struct inferior_regcache_data): Delete.
15442 (get_regcache): Rename to ...
15443 (get_thread_regcache): ... this. Adjust. Switch inferior before
15444 fetching registers.
15445 (regcache_invalidate_one): Adjust.
15446 (regcache_invalidate): Fix prototype.
15447 (new_register_cache): Return the new register cache.
15448 (free_register_cache): Change prototype.
15449 (realloc_register_cache): Adjust.
15450 (registers_to_string): Change prototype to take a regcache. Adjust.
15451 (registers_from_string): Ditto.
15452 (register_data): Ditto.
15453 (supply_register): Ditto.
15454 (supply_register_by_name): Ditto.
15455 (collect_register): Ditto.
15456 (collect_register_as_string): Ditto.
15457 (collect_register_by_name): Ditto.
15458 * server.c (process_serial_event): Adjust.
15459 * linux-low.h (regset_fill_func, regset_store_func): Change
15460 prototype.
15461 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15462 Change prototype.
15463 * linux-low.c (get_stop_pc): Adjust.
15464 (check_removed_breakpoint): Adjust.
15465 (linux_wait_for_event): Adjust.
15466 (linux_resume_one_lwp): Adjust.
15467 (fetch_register): Add regcache parameter. Adjust.
15468 (usr_store_inferior_registers): Ditto.
15469 (regsets_fetch_inferior_registers): Ditto.
15470 (regsets_store_inferior_registers): Ditto.
15471 (linux_fetch_registers, linux_store_registers): Ditto.
15472 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15473 regcache. Adjust.
15474 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15475 Ditto.
15476 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15477 prototype to take a regcache.
15478 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15479 * remote-utils.c (convert_ascii_to_int, outreg)
15480 (prepare_resume_reply): Change prototype to take a regcache.
15481 Adjust.
15482 * target.h (struct target_ops) <fetch_registers, store_registers>:
15483 Change prototype to take a regcache.
15484 (fetch_inferior_registers, store_inferior_registers): Change
15485 prototype to take a regcache. Adjust.
15486 * proc-service.c (ps_lgetregs): Adjust.
15487 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15488 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15489 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15490 take a regcache. Adjust.
15491 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15492 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15493 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15494 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15495 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15496 (cris_cannot_fetch_register):
15497 (cris_breakpoint_at): Change prototype to take a regcache.
15498 Adjust.
15499 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15500 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15501 to take a regcache. Adjust.
15502 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15503 Adjust.
15504 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15505 take a regcache. Adjust.
15506 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15507 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15508 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15509 * linux-mips-low.c (mips_get_pc):
15510 (mips_set_pc): Change prototype to take a regcache. Adjust.
15511 (mips_reinsert_addr): Adjust.
15512 (mips_collect_register): Change prototype to take a regcache.
15513 Adjust.
15514 (mips_supply_register):
15515 (mips_collect_register_32bit, mips_supply_register_32bit)
15516 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15517 (mips_store_fpregset): Ditto.
15518 * linux-ppc-low.c (ppc_supply_ptrace_register)
15519 (ppc_supply_ptrace_register): Ditto.
15520 (parse_spufs_run): Adjust.
15521 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15522 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15523 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15524 take a regcache. Adjust.
15525 * linux-s390-low.c (s390_collect_ptrace_register)
15526 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15527 (s390_set_pc): Change prototype to take a regcache. Adjust.
15528 (s390_arch_setup): Adjust.
15529 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15530 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15531 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15532 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15533 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15534 regcache. Adjust.
15535 (sparc_breakpoint_at): Adjust.
15536 * linux-xtensa-low.c (xtensa_fill_gregset):
15537 (xtensa_store_gregset):
15538 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15539 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15540 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15541 prototype to take a regcache. Adjust.
15542 * win32-arm-low.c (arm_fetch_inferior_register)
15543 (arm_store_inferior_register): Change prototype to take a
15544 regcache. Adjust.
15545 * win32-i386-low.c (i386_fetch_inferior_register)
15546 (i386_store_inferior_register): Change prototype to take a
15547 regcache. Adjust.
15548 * win32-low.c (child_fetch_inferior_registers)
15549 (child_store_inferior_registers): Change prototype to take a
15550 regcache. Adjust.
15551 (win32_wait): Adjust.
15552 (win32_fetch_inferior_registers): Change prototype to take a
15553 regcache. Adjust.
15554 (win32_store_inferior_registers): Adjust.
15555 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15556 store_inferior_register>: Change prototype to take a regcache.
15557
15558 2010-01-20 Doug Evans <dje@google.com>
15559
15560 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15561 #ifdef.
15562 (linux_wait_for_event1, linux_init_signals): Ditto.
15563 (W_STOPCODE): Provide definition if missing.
15564
15565 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15566
15567 * linux-low.c (linux_core_of_thread): New.
15568 (compare_ints, show_process, list_threads): New.
15569 (linux_qxfer_osdata): Report threads and cores.
15570 (linux_target_op): Register linux_core_of_thread.
15571 * remote-utils.c (prepare_resume_reply): Report the core.
15572 (buffer_xml_printf): Support %d specifier.
15573 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15574 New.
15575 (handle_query): Handle qXfer:threads. Announce availability
15576 thereof.
15577 * target.h (struct target_ops): New field core_of_thread.
15578
15579 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15580
15581 * Makefile.in (clean): Remove new generated files.
15582 (reg-s390.o, reg-s390.c): Remove rules.
15583 (reg-s390x.o, reg-s390x.c): Likewise.
15584 (s390-linux32.o, s390-linux32.c): Add rules.
15585 (s390-linux64.o, s390-linux64.c): Likewise.
15586 (s390x-linux64.o, s390x-linux64.c): Likewise.
15587 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15588 * linux-s390-low.c: Include <elf.h>.
15589 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15590 (init_registers_s390): Remove prototype.
15591 (init_registers_s390x): Likewise.
15592 (init_registers_s390_linux32): Add prototype.
15593 (init_registers_s390_linux64): Likewise.
15594 (init_registers_s390x_linux64): Likewise.
15595 (s390_num_regs_3264): New define.
15596 (s390_regmap_3264): New global variable.
15597 (s390_cannot_fetch_register): Remove obsolete check.
15598 (s390_cannot_store_register): Likewise.
15599 (s390_collect_ptrace_register): Handle upper/lower register halves.
15600 (s390_supply_ptrace_register): Likewise.
15601 (s390_fill_gregset): Update to register number changes.
15602 (s390_get_hwcap): New routine.
15603 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15604 Install appropriate regmap and register set.
15605
15606 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15607
15608 * server.c (gdbserver_version): Update copyright year to 2010.
15609 * gdbreplay.c (gdbreplay_version): Likewise.
15610
15611 2009-12-28 Doug Evans <dje@google.com>
15612
15613 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15614 elf/external.h. Include <elf.h> instead but only if necessary.
15615
15616 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15617
15618 * linux-low.c (linux_remove_process): Remove `detaching'
15619 parameter. Don't release/detach from thread_db here.
15620 (linux_kill): Release/detach from thread_db here, ...
15621 (linux_detach): ... and here, before actually detaching.
15622 (linux_wait_1): ... and here, when a process exits.
15623 * thread-db.c (any_thread_of): New.
15624 (thread_db_free): Switch the current inferior to a thread of the
15625 passed in process.
15626
15627 2009-12-21 Doug Evans <dje@google.com>
15628
15629 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15630
15631 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15632 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15633 warning ifndef __NR_tkill. Move setting of errno there too.
15634 Delete unnecessary resetting of errno after syscall.
15635 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15636
15637 * configure.ac: Check for dladdr.
15638 * config.in: Regenerate.
15639 * configure: Regenerate.
15640 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15641 (try_thread_db_load): Update.
15642
15643 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15644
15645 2009-12-18 Doug Evans <dje@google.com>
15646
15647 * event-loop.c: Include unistd.h if it exists.
15648
15649 * linux-low.c (my_waitpid): Move definition away from being in
15650 between linux_tracefork_child/linux_test_for_tracefork.
15651
15652 * gdb_proc_service.h (psaddr_t): Fix type.
15653 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15654 signature to match glibc.
15655
15656 2009-12-16 Doug Evans <dje@google.com>
15657
15658 * linux-low.c (linux_read_memory): Fix argument to read.
15659
15660 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15661
15662 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15663 events, don't leave current_inferior pointing at null.
15664
15665 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15666
15667 * win32-low.c (LOG): Delete.
15668 (OUTMSG): Output to stderr.
15669 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15670 on compile time LOG macro.
15671 (win32_wait): Fix debug output.
15672
15673 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15674
15675 * win32-low.c (win32_add_one_solib): If the dll name is
15676 "ntdll.dll", prepend the system directory to the dll path.
15677
15678 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15679
15680 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15681
15682 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15683 Vladimir Prus <vladimir@codesourcery.com>
15684
15685 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15686 * configure.ac: Check for __mcoldfire__ and set
15687 gdb_cv_m68k_is_coldfire.
15688 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15689 reg-cf.o and reg-m68k.o.
15690 * configure: Regenerated.
15691
15692 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15693
15694 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15695 Pass it to thread_db_free.
15696 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15697 proper `detaching' argument to linux_remove_process.
15698 * linux-low.h (thread_db_free): Add `detaching' parameter.
15699 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15700 to thread_db_free.
15701 (thread_db_free): Add `detaching' parameter. Only
15702 call td_ta_clear_event if detaching from process.
15703
15704 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15705
15706 * thread-db.c (thread_db_free): Fix typo.
15707
15708 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15709
15710 PR gdb/10838
15711 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15712
15713 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15714
15715 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15716 with an i686 compiler.
15717 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15718 needed.
15719 * configure: Rebuilt.
15720
15721 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15722
15723 PR gdb/10783
15724
15725 * server.c (handle_search_memory_1): Correct read_addr initialization
15726 in loop for searching subsequent chunks.
15727
15728 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15729
15730 * configure.ac: New --with-libthread-db option.
15731 * thread-db.c: Allow direct dependence on libthread_db.
15732 (thread_db_free): Adjust.
15733 * config.in: Regenerate.
15734 * configure: Likewise.
15735
15736 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15737
15738 PR gdb/10757
15739 * thread-db.c (attach_thread): New function.
15740 (maybe_attach_thread): Return success/failure.
15741 (find_new_threads_callback): Adjust.
15742 (thread_db_find_new_threads): Loop until no new threads.
15743
15744 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15745
15746 * proc-service.c (ps_lgetregs): Formatting.
15747
15748 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15749
15750 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15751 * configure.ac: Adjust.
15752 * linux-low.h (struct process_info_private): Move members to struct
15753 thread_db.
15754 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15755 * linux-low.c (linux_remove_process): Adjust.
15756 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15757 * server.c (handle_query): Move code ...
15758 (handle_monitor_command): ... here. New function.
15759 * target.h (struct target_ops): New member.
15760 * thread-db.c (struct thread_db): New.
15761 (libthread_db_search_path): New variable.
15762 (thread_db_create_event, thread_db_enable_reporting)
15763 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15764 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15765 (try_thread_db_load_1, dladdr_to_soname): New functions.
15766 (try_thread_db_load, thread_db_load_search): New functions.
15767 (thread_db_init): Search for libthread_db.
15768 (thread_db_free): New function.
15769 (thread_db_handle_monitor_command): Likewise.
15770 * config.in: Regenerate.
15771 * configure: Regenerate.
15772
15773 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15774
15775 * spu-low.c (spu_kill): Wait for inferior to terminate.
15776 Call clear_inferiors.
15777 (spu_detach): Call clear_inferiors.
15778
15779 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15780
15781 * aclocal.m4: Regenerate.
15782 * config.in: Likewise.
15783 * configure: Likewise.
15784
15785 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15786
15787 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15788 (parse_spufs_run): New function.
15789 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15790 (ppc_breakpoint_at): Handle SPU breakpoints.
15791
15792 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15793
15794 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15795 (SPUFS_MAGIC): Define.
15796 (spu_enumerate_spu_ids): New function.
15797 (linux_qxfer_spu): New function.
15798 (linux_target_ops): Install linux_qxfer_spu.
15799
15800 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15801
15802 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15803 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15804 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15805 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15806 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15807 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15808 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15809 (init_registers_powerpc_cell32l): Add prototype.
15810 (init_registers_powerpc_cell64l): Likewise.
15811 (ppc_arch_setup): Detect Cell/B.E. architecture.
15812
15813 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15814
15815 * Makefile.in (datarootdir): New variable.
15816
15817 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15818
15819 * linux-low.c (linux_write_memory): Update debugging output.
15820 * Makefile.in (clean): Add new descriptions.
15821 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15822 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15823 * configure.srv: Add new files for arm*-*-linux*.
15824 * linux-arm-low.c: Add new declarations.
15825 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15826 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15827 (HWCAP_VFPv3D16): New.
15828 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15829 instead of __IWMMXT__.
15830 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15831 (arm_arch_setup): New.
15832 (target_regsets): Remove #ifdef. Add VFP regset.
15833 (the_low_target): Use arm_arch_setup.
15834
15835 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15836
15837 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15838 the main thread again.
15839
15840 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15841
15842 Adding Neutrino gdbserver.
15843 * configure: Regenerated.
15844 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15845 * configure.srv (i[34567]86-*-nto*): New target.
15846 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15847 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15848 (nto_comctrl) [__QNX__]: New function.
15849 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15850
15851 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15852
15853 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15854 srv_tgtobj.
15855
15856 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15857 Pedro Alves <pedro@codesourcery.com>
15858
15859 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15860 don't support CONTEXT_EXTENDED_REGISTERS.
15861 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15862 (the_low_target): Install them.
15863 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15864 failing with ERROR_PIPE_NOT_CONNECTED.
15865
15866 2009-06-30 Doug Evans <dje@google.com>
15867 Pierre Muller <muller@ics.u-strasbg.fr>
15868
15869 Add h/w watchpoint support to x86-linux, win32-i386.
15870 * Makefile.in (SFILES): Add i386-low.c
15871 (i386_low_h): Define.
15872 (i386-low.o): Add dependencies.
15873 (linux-x86-low.o): Add i386-low.h dependency.
15874 (win32-i386-low.o): Ditto.
15875 * i386-low.c: New file.
15876 * i386-low.h: New file.
15877 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15878 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15879 * linux-low.c (linux_add_process): Initialize arch_private.
15880 (linux_remove_process): Free arch_private.
15881 (add_lwp): Initialize arch_private.
15882 (delete_lwp): Free arch_private.
15883 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15884 provided.
15885 * linux-low.h (process_info_private): New member arch_private.
15886 (lwp_info): New member arch_private.
15887 (linux_target_ops): New members new_process, new_thread,
15888 prepare_to_resume.
15889 (ptid_of): New macro.
15890 * linux-x86-low.c: Include stddef.h, i386-low.h.
15891 (arch_process_info): New struct.
15892 (arch_lwp_info): New struct.
15893 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15894 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15895 (i386_dr_low_get_status): New function.
15896 (x86_insert_point, x86_remove_point): New functions.
15897 (x86_stopped_by_watchpoint): New function.
15898 (x86_stopped_data_address): New function.
15899 (x86_linux_new_process, x86_linux_new_thread): New functions.
15900 (x86_linux_prepare_to_resume): New function.
15901 (the_low_target): Add entries for insert_point, remove_point,
15902 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15903 prepare_to_resume.
15904 * server.c (debug_hw_points): New global.
15905 (monitor_show_help): Document set debug-hw-points.
15906 (handle_query): Process "set debug-hw-points".
15907 * server.h (debug_hw_points): Declare.
15908 (paddress): Declare.
15909 * utils.c (NUMCELLS, CELLSIZE): New macros.
15910 (get_sell, xsnprintf, paddress): New functions.
15911 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15912 remove_point, stopped_by_watchpoint, stopped_data_address.
15913 * win32-i386-low.c: Include i386-low.h.
15914 (debug_reg_state): Replaces dr.
15915 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15916 (i386_dr_low_get_status): New function.
15917 (i386_insert_point, i386_remove_point): New functions.
15918 (i386_stopped_by_watchpoint): New function.
15919 (i386_stopped_data_address): New function.
15920 (i386_initial_stuff): Update.
15921 (get_thread_context,set_thread_context,i386_thread_added): Update.
15922 (the_low_target): Add entries for insert_point,
15923 remove_point, stopped_by_watchpoint, stopped_data_address.
15924 * win32-low.c (win32_insert_watchpoint): New function.
15925 (win32_remove_watchpoint): New function.
15926 (win32_stopped_by_watchpoint): New function.
15927 (win32_stopped_data_address): New function.
15928 (win32_target_ops): Add entries for insert_watchpoint,
15929 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15930 * win32-low.h (win32_target_ops): New members insert_point,
15931 remove_point, stopped_by_watchpoint, stopped_data_address.
15932
15933 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15934
15935 * server.c (process_serial_event): Re-return unsupported, not
15936 error, if the type isn't recognized. Re-allow supporting only
15937 insert or remove packets. Also call require_running for
15938 breakpoints. Add missing break statement to default case. Tidy.
15939 * target.h (struct target_ops): Rename insert_watchpoint to
15940 insert_point, and remove_watchpoint to remove_point.
15941
15942 * linux-low.h (struct linux_target_ops): Likewise.
15943 * linux-low.c (linux_insert_watchpoint): Rename to ...
15944 (linux_insert_point): ... this. Adjust.
15945 (linux_remove_watchpoint): Rename to ...
15946 (linux_remove_point): ... this. Adjust.
15947 (linux_target_ops): Adjust.
15948 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15949 (cris_insert_point): ... this.
15950 (cris_remove_watchpoint): Rename to ...
15951 (cris_remove_point): ... this.
15952 (the_low_target): Adjust.
15953
15954 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15955
15956 * server.c (handle_v_kill): Pass signal_pid to
15957 kill_inferior if multi_process is zero.
15958
15959 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15960
15961 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15962 * target.h (target_ops): Comment for *_watchpoint to make it clear
15963 the functions can get types '0' and '1'.
15964
15965 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15966
15967 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15968 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15969 * regcache.c (get_regcache): Likewise.
15970 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15971 * win32-low.c (child_fetch_inferior_registers): Remove check for
15972 regno 0.
15973
15974 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15975 Pedro Alves <pedro@codesourcery.com>
15976
15977 * target.h (struct target_ops) <supports_multi_process>: New
15978 callback.
15979 (target_supports_multi_process): New.
15980 * server.c (handle_query): Even if GDB reports support, only
15981 enable multi-process if the target also supports it. Report
15982 multi-process support only if the target backend supports it.
15983 * linux-low.c (linux_supports_multi_process): New function.
15984 (linux_target_ops): Install it as target_supports_multi_process
15985 callback.
15986
15987 2009-05-24 Doug Evans <dje@google.com>
15988
15989 Global renaming of find_thread_pid to find_thread_ptid.
15990 * server.h (find_thread_ptid): Renamed from find_thread_pid.
15991 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
15992 All callers updated.
15993
15994 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
15995 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
15996 directly.
15997
15998 * linux-low.c (get_stop_pc): Print pc if debug_threads.
15999 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16000 (linux_resume_one_lwp): Ditto.
16001
16002 2009-05-23 Doug Evans <dje@google.com>
16003
16004 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16005 from struct inferior_list_entry * to struct lwp_info *.
16006 All callers updated.
16007
16008 2009-05-13 Doug Evans <dje@google.com>
16009
16010 * linux-x86-low.c: Don't include assert.h.
16011 (x86_siginfo_fixup): Use fatal, not assert.
16012 (x86_arch_setup): Fix comment.
16013
16014 2009-05-12 Doug Evans <dje@google.com>
16015
16016 Biarch support for i386/amd64 gdbserver.
16017 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16018 Add linux-x86-low.c.
16019 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16020 (linux-x86-low.o): Add.
16021 * linux-x86-64-low.c: Delete.
16022 * linux-i386-low.c: Delete.
16023 * linux-x86-low.c: New file.
16024 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16025 linux-x86-low.o.
16026 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16027 linux-x86-low.o.
16028 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16029 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16030 (linux_child_pid_to_exec_file): New function.
16031 (elf_64_header_p, elf_64_file_p): New functions.
16032 (siginfo_fixup): New function.
16033 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16034 give target a chance to convert layout.
16035 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16036 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16037
16038 2009-05-07 Doug Evans <dje@google.com>
16039
16040 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16041 (regsets_store_inferior_registers): Ditto.
16042
16043 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16044
16045 PR server/10048
16046
16047 * linux-low.c (must_set_ptrace_flags): Delete.
16048 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16049 of the global.
16050 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16051 `lwp->must_set_ptrace_flags' instead.
16052 (linux_wait_for_event_1): Set ptrace options here.
16053 (linux_wait_1): ... not here.
16054
16055 2009-04-30 Doug Evans <dje@google.com>
16056
16057 * inferiors.c (started_inferior_callback): New function.
16058 (attached_inferior_callback): New function.
16059 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16060 * server.c (print_started_pid, print_attached_pid): New functions.
16061 (detach_or_kill_for_exit): New function.
16062 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16063 * server.h (have_started_inferiors_p): Declare.
16064 (have_attached_inferiors_p): Declare.
16065
16066 * inferiors.c (remove_process): Fix memory leak, free process.
16067 * linux-low.c (linux_remove_process): New function.
16068 (linux_kill): Call it instead of remove_process.
16069 (linux_detach, linux_wait_1): Ditto.
16070
16071 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16072
16073 * configure.srv: Add x86 Windows CE target.
16074
16075 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16076
16077 * inferiors.c (get_thread_process): Make global.
16078 * server.h (get_thread_process): Add prototype.
16079 * thread-db.c (find_one_thread): Use get_thread_process
16080 instead of current_process.
16081 (thread_db_get_tls_address): Do not crash if called when
16082 thread layer is not yet initialized.
16083
16084 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16085
16086 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16087 * spu-low.c (current_tid): Rename to ...
16088 (current_ptid): ... this.
16089 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16090 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16091 ptid_get_lwp (current_ptid) instead of current_tid.
16092 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16093 instead of current_tid. Use find_process_pid to verify pid
16094 argument is valid. Pass proper argument to remove_process.
16095 (spu_thread_alive): Compare current_ptid instead of current_tid.
16096 (spu_resume): Likewise.
16097
16098 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16099
16100 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16101 variable.
16102
16103 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16104
16105 Implement the multiprocess extensions, and add linux multiprocess
16106 support.
16107
16108 * server.h (ULONGEST): Declare.
16109 (struct ptid, ptid_t): New.
16110 (minus_one_ptid, null_ptid): Declare.
16111 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16112 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16113 (struct inferior_list_entry): Change `id' type from unsigned from
16114 to ptid_t.
16115 (struct sym_cache, struct breakpoint, struct
16116 process_info_private): Forward declare.
16117 (struct process_info): Declare.
16118 (current_process): Declare.
16119 (all_processes): Declare.
16120 (initialize_inferiors): Declare.
16121 (add_thread): Adjust to use ptid_t.
16122 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16123 (add_process, remove_process, find_thread_pid): Declare.
16124 (find_inferior_id): Adjust to use ptid_t.
16125 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16126 (multi_process): Declare.
16127 (push_event): Adjust to use ptid_t.
16128 (read_ptid, write_ptid): Declare.
16129 (prepare_resume_reply): Adjust to use ptid_t.
16130 (clear_symbol_cache): Declare.
16131 * inferiors.c (all_processes): New.
16132 (null_ptid, minus_one_ptid): New.
16133 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16134 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16135 (add_thread): Change unsigned long to ptid. Remove gdb_id
16136 parameter. Adjust.
16137 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16138 (gdb_id_to_thread): Rename to ...
16139 (find_thread_pid): ... this. Change unsigned long to ptid.
16140 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16141 (loaded_dll, pull_pid_from_list): Adjust.
16142 (add_process, remove_process, find_process_pid)
16143 (get_thread_process, current_process, initialize_inferiors): New.
16144 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16145 (struct target_waitstatus) <related_pid>: Ditto.
16146 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16147 return type to int.
16148 (struct target_ops) <join>: Add `pid' argument.
16149 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16150 (struct target_ops) <wait>: Add `ptid' field. Change return type
16151 to ptid.
16152 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16153 (mywait): Add `ptid' argument. Change return type to ptid_t.
16154 (target_pid_to_str): Declare.
16155 * target.c (set_desired_inferior): Adjust to use ptids.
16156 (mywait): Add new `ptid' argument. Adjust.
16157 (target_pid_to_str): New.
16158 * mem-break.h (free_all_breakpoints): Declare.
16159 * mem-break.c (breakpoints): Delelete.
16160 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16161 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16162 to use per-process breakpoint list.
16163 (free_all_breakpoints): New.
16164 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16165 (symbol_cache, all_symbols_looked_up): Delete.
16166 (hexchars): New.
16167 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16168 read_ptid): New.
16169 (prepare_resume_reply): Change ptid argument's type from unsigned
16170 long to ptid_t. Adjust. Implement W;process and X;process.
16171 (free_sym_cache, clear_symbol_cache): New.
16172 (look_up_one_symbol): Adjust to per-process symbol cache. *
16173 * server.c (cont_thread, general_thread, step_thread): Change type
16174 to ptid_t.
16175 (attached): Delete.
16176 (multi_process): New.
16177 (last_ptid): Change type to ptid_t.
16178 (struct vstop_notif) <ptid>: Change type to ptid_t.
16179 (queue_stop_reply, push_event): Change `ptid' argument's type to
16180 ptid_t.
16181 (discard_queued_stop_replies): Add `pid' argument.
16182 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16183 changes. Don't reference the `attached' global.
16184 (attach_inferior): Adjust to mywait interface changes.
16185 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16186 features. Handle and report "multiprocess+". Handle
16187 "qAttached:PID".
16188 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16189 changes.
16190 (handle_v_kill): New.
16191 (handle_v_stopped): Adjust to use target_pid_to_str.
16192 (handle_v_requests): Allow multiple attaches and runs when
16193 multiprocess extensions are in effect. Handle "vKill".
16194 (myresume): Adjust to use ptids.
16195 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16196 (handle_status): Adjust to discard_queued_stop_replies interface
16197 change.
16198 (first_thread_of, kill_inferior_callback)
16199 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16200 (main): Call initialize_inferiors. Adjust to use ptids, killing
16201 and detaching from all inferiors. Handle multiprocess packet
16202 variants.
16203 * linux-low.h: Include gdb_proc_service.h.
16204 (struct process_info_private): New.
16205 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16206 <lwpid_of>: Use ptid_get_lwp.
16207 (get_lwp_thread): Adjust.
16208 (struct lwp_info): Add `dead' member.
16209 (find_lwp_pid): Declare.
16210 * linux-low.c (thread_db_active): Delete.
16211 (new_inferior): Adjust comment.
16212 (inferior_pid): Delete.
16213 (linux_add_process): New.
16214 (handle_extended_wait): Adjust.
16215 (add_lwp): Change unsigned long to ptid.
16216 (linux_create_inferior): Add process to processes table. Adjust
16217 to use ptids. Don't set new_inferior here.
16218 (linux_attach_lwp): Rename to ...
16219 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16220 it. Adjust to use ptids.
16221 (linux_attach_lwp): New.
16222 (linux_attach): Add process to processes table. Don't set
16223 new_inferior here.
16224 (struct counter): New.
16225 (second_thread_of_pid_p, last_thread_of_process_p): New.
16226 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16227 multiple processes.
16228 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16229 processes. Remove process from process table.
16230 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16231 to multiple processes.
16232 (any_thread_of): New.
16233 (linux_detach): Add `pid' argument, and handle it. Remove process
16234 from processes table.
16235 (linux_join): Add `pid' argument. Handle it.
16236 (linux_thread_alive): Change unsighed long argument to ptid_t.
16237 Consider dead lwps as not being alive.
16238 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16239 threads we're not interested in.
16240 (same_lwp, find_lwp_pid): New.
16241 (linux_wait_for_lwp): Change `pid' argument's type from int to
16242 ptid_t. Adjust.
16243 (linux_wait_for_event): Rename to ...
16244 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16245 from int to ptid_t. Adjust.
16246 (linux_wait_for_event): New.
16247 (linux_wait_1): Add `ptid' argument. Change return type to
16248 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16249 that exit from the process table.
16250 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16251 Adjust.
16252 (mark_lwp_dead): New.
16253 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16254 stopping all threads, mark its main lwp as dead.
16255 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16256 ptids.
16257 (fetch_register, usr_store_inferior_registers)
16258 (regsets_fetch_inferior_registers)
16259 (regsets_store_inferior_registers, linux_read_memory)
16260 (linux_write_memory): Inline `inferior_pid'.
16261 (linux_look_up_symbols): Adjust to use per-process
16262 `thread_db_active'.
16263 (linux_request_interrupt): Adjust to use ptids.
16264 (linux_read_auxv): Inline `inferior_pid'.
16265 (initialize_low): Don't reference thread_db_active.
16266 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16267 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16268 (ps_getpid): Return the pid of the current inferior.
16269 * thread-db.c (proc_handle, thread_agent): Delete.
16270 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16271 per-process data.
16272 (find_one_thread): Change argument type to ptid_t. Adjust to
16273 per-process data.
16274 (maybe_attach_thread): Adjust to per-process data and ptids.
16275 (thread_db_find_new_threads): Ditto.
16276 (thread_db_init): Ditto.
16277 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16278 processes table. Adjust to use ptids.
16279 (spu_kill, spu_detach): Adjust interface. Remove process from
16280 processes table.
16281 (spu_join, spu_thread_alive): Adjust interface.
16282 (spu_wait): Adjust interface. Remove process from processes
16283 table. Adjust to use ptids.
16284 * win32-low.c (current_inferior_tid): Delete.
16285 (current_inferior_ptid): New.
16286 (debug_event_ptid): New.
16287 (thread_rec): Take a ptid. Adjust.
16288 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16289 (child_delete_thread): Ditto.
16290 (do_initial_child_stuff): Add `attached' argument. Add process to
16291 processes table.
16292 (child_fetch_inferior_registers, child_store_inferior_registers):
16293 Adjust.
16294 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16295 (win32_attach): Pass 1 to do_initial_child_stuff.
16296 (win32_kill): Adjust interface. Remove process from processes
16297 table.
16298 (win32_detach): Ditto.
16299 (win32_join): Adjust interface.
16300 (win32_thread_alive): Take a ptid.
16301 (win32_resume): Adjust to use ptids.
16302 (get_child_debug_event): Ditto.
16303 (win32_wait): Adjust interface. Remove exiting process from
16304 processes table.
16305
16306 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16307
16308 Non-stop mode support.
16309
16310 * server.h (non_stop): Declare.
16311 (gdb_client_data, handler_func): Declare.
16312 (delete_file_handler, add_file_handler, start_event_loop):
16313 Declare.
16314 (handle_serial_event, handle_target_event, push_event)
16315 (putpkt_notif): Declare.
16316 * target.h (enum resume_kind): New.
16317 (struct thread_resume): Replace `step' field by `kind' field.
16318 (TARGET_WNOHANG): Define.
16319 (struct target_ops) <wait>: Add `options' argument.
16320 <supports_non_stop, async, start_non_stop>: New fields.
16321 (target_supports_non_stop, target_async): New.
16322 (start_non_stop): Declare.
16323 (mywait): Add `options' argument.
16324 * target.c (mywait): Add `options' argument. Print child exit
16325 notifications here.
16326 (start_non_stop): New.
16327 * server.c (non_stop, own_buf, mem_buf): New globals.
16328 (struct vstop_notif): New.
16329 (notif_queue): New global.
16330 (queue_stop_reply, push_event, discard_queued_stop_replies)
16331 (send_next_stop_reply): New.
16332 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16333 interface changes.
16334 (attach_inferior): In non-stop mode, don't wait for the target
16335 here.
16336 (handle_general_set): Handle QNonStop.
16337 (handle_query): When handling qC, return the current general
16338 thread, instead of the first thread of the list.
16339 (handle_query): If the backend supports non-stop mode, include
16340 QNonStop+ in the qSupported query response.
16341 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16342 and non-stop mode.
16343 (handle_v_attach, handle_v_run): Handle non-stop mode.
16344 (handle_v_stopped): New.
16345 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16346 (myresume): Adjust to use resume_kind. Handle non-stop.
16347 (queue_stop_reply_callback): New.
16348 (handle_status): Handle non-stop mode.
16349 (main): Clear non_stop flag on reconnection. Use the event-loop.
16350 Refactor serial protocol handling from here ...
16351 (process_serial_event): ... to this new function. When GDB
16352 selects any thread, select one here. In non-stop mode, wait until
16353 GDB acks all pending events before exiting.
16354 (handle_serial_event, handle_target_event): New.
16355 * remote-utils.c (remote_open): Install remote_desc in the event
16356 loop.
16357 (remote_close): Remove remote_desc from the event loop.
16358 (putpkt_binary): Rename to...
16359 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16360 (putpkt_binary): New as wrapper around putpkt_binary_1.
16361 (putpkt_notif): New.
16362 (prepare_resume_reply): In non-stop mode, don't change the
16363 general_thread.
16364 * event-loop.c: New.
16365 * Makefile.in (OBJ): Add event-loop.o.
16366 (event-loop.o): New rule.
16367
16368 * linux-low.h (pid_of): Moved here.
16369 (lwpid_of): New.
16370 (get_lwp_thread): Use lwpid_of.
16371 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16372 * linux-low.c (pid_of): Delete.
16373 (inferior_pid): Use lwpid_of.
16374 (linux_event_pipe): New.
16375 (target_is_async_p): New.
16376 (delete_lwp): New.
16377 (handle_extended_wait): Use lwpid_of.
16378 (add_lwp): Don't set lwpid field.
16379 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16380 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16381 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16382 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16383 first. Adjust to linux_wait_for_event interface changes. Use
16384 lwpid_of.
16385 (linux_detach): Don't delete the main lwp here.
16386 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16387 (status_pending_p): Don't consider explicitly suspended lwps.
16388 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16389 pointer. Add OPTIONS argument. Change return type to int. Use
16390 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16391 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16392 pointer. Add status pointer argument. Return a pid instead of a
16393 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16394 changes. In non-stop mode, don't switch to a random thread.
16395 (linux_wait): Rename to...
16396 (linux_wait_1): ... this. Add target_options argument, and handle
16397 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16398 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16399 clean exit and signal exit code. Don't stop all threads in
16400 non-stop mode. In all-stop mode, only stop all threads when
16401 reporting a stop to GDB. Handle explicit thread stop requests.
16402 (async_file_flush, async_file_mark): New.
16403 (linux_wait): New.
16404 (send_sigstop): Use lwpid_of.
16405 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16406 interface changes. In non-stop mode, don't switch to a random
16407 thread.
16408 (linux_resume_one_lwp): Use lwpid_of.
16409 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16410 (linux_resume_one_thread): ... this. Handle resume_stop. In
16411 non-stop mode, don't look for pending flag in all threads.
16412 (resume_status_pending_p): Don't consider explicitly suspended
16413 threads.
16414 (my_waitpid): Reimplement. Emulate __WALL.
16415 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16416 Use lwpid_of.
16417 (sigchld_handler, linux_supports_non_stop, linux_async)
16418 (linux_start_non_stop): New.
16419 (linux_target_ops): Register linux_supports_non_stop, linux_async
16420 and linux_start_non_stop.
16421 (initialize_low): Install SIGCHLD handler.
16422 * thread-db.c (thread_db_create_event, find_one_thread)
16423 (thread_db_get_tls_address): Use lwpid_of.
16424 * win32-low.c (win32_detach): Adjust to use resume_kind.
16425 (win32_wait): Add `options' argument.
16426 * spu-low.c (spu_resume): Adjust to use resume_kind.
16427 (spu_wait): Add `options' argument.
16428
16429 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16430
16431 Decouple target code from remote protocol.
16432
16433 * target.h (enum target_waitkind): New.
16434 (struct target_waitstatus): New.
16435 (struct target_ops) <wait>: Return an unsigned long. Take a
16436 target_waitstatus pointer instead of a char pointer.
16437 (mywait): Likewise.
16438 * target.c (mywait): Change prototype to return an unsigned long.
16439 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16440 * server.h (thread_from_wait, old_thread_from_wait): Delete
16441 declarations.
16442 (prepare_resume_reply): Change prototype to take a
16443 target_waitstatus.
16444 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16445 (last_status, last_ptid): New.
16446 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16447 pid instead of a signal.
16448 (attach_inferior): Remove "status" and "signal" parameters.
16449 Adjust.
16450 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16451 not as an address.
16452 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16453 (handle_v_requests, myresume): Remove "status" and "signal"
16454 parameters. Adjust.
16455 (handle_status): New.
16456 (main): Delete local `status'. Adjust.
16457 * remote-utils.c: Include target.h.
16458 (prepare_resume_reply): Change prototype to take a
16459 target_waitstatus. Adjust.
16460
16461 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16462 interface.
16463 * spu-low.c (spu_wait): Adjust.
16464 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16465 Delete.
16466 (win32_wait): Adjust.
16467
16468 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16469
16470 * target.h (struct thread_resume): Delete leave_stopped member.
16471 (struct target_ops): Add a `n' argument to the `resume' callback.
16472 * server.c (start_inferior): Adjust.
16473 (handle_v_cont, myresume): Adjust.
16474 * linux-low.c (check_removed_breakpoint): Adjust to resume
16475 interface change, and to removed leave_stopped field.
16476 (resume_ptr): Delete.
16477 (struct thread_resume_array): New.
16478 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16479 resume interface change.
16480 (linux_continue_one_thread, linux_queue_one_thread)
16481 (resume_status_pending_p): Check if the resume field is NULL
16482 instead of checking the leave_stopped member.
16483 (linux_resume): Adjust to the target resume interface change.
16484 * spu-low.c (spu_resume): Adjust to the target resume interface
16485 change.
16486 * win32-low.c (win32_detach, win32_resume): Ditto.
16487
16488 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16489
16490 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16491 flag.
16492 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16493 pending.
16494 (linux_continue_one_thread): Only preserve the stepping flag if
16495 there's a pending breakpoint.
16496
16497 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16498
16499 * server.c (main): After the inferior having exited, call
16500 remote_close before exiting gdbserver.
16501
16502 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16503
16504 Fix size of FPSCR in Power 7 processors.
16505 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16506 (PPC_FEATURE_HAS_DFP): New #define.
16507 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16508 size of the FPSCR.
16509
16510 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16511
16512 * server.c (handle_query) Whitespace and formatting.
16513
16514 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16515
16516 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16517 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16518 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16519 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16520 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16521 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16522 Makefile.in, configure.ac: Fix whitespace throughout.
16523 * configure: Regenerate.
16524
16525 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16526
16527 * inferiors.c (find_inferior): Make it safe for the callback
16528 function to delete the currently iterated inferior.
16529
16530 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16531
16532 * Makefile.in (linuw_low_h): Move higher.
16533 (thread-db.o): Depend on $(linux_low_h).
16534
16535 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16536
16537 Rename "process" to "lwp" throughout.
16538
16539 * linux-low.c (all_processes): Rename to...
16540 (all_lwps): ... this.
16541 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16542 (add_process): Rename to ...
16543 (add_lwp): ... this. Adjust.
16544 (linux_create_inferior): Adjust.
16545 (linux_attach_lwp): Adjust.
16546 (linux_attach): Adjust.
16547 (linux_kill_one_process): Rename to ...
16548 (linux_kill_one_lwp): ... this. Adjust.
16549 (linux_kill): Adjust.
16550 (linux_detach_one_process): Rename to ...
16551 (linux_detach_one_lwp): ... this. Adjust.
16552 (linux_detach): Adjust.
16553 (check_removed_breakpoint): Adjust.
16554 (status_pending_p): Adjust.
16555 (linux_wait_for_process): Rename to ...
16556 (linux_wait_for_lwp): ... this. Adjust.
16557 (linux_wait_for_event): Adjust.
16558 (send_sigstop): Adjust.
16559 (wait_for_sigstop): Adjust.
16560 (stop_all_processes): Rename to ...
16561 (stop_all_lwps): ... this.
16562 (linux_resume_one_process): Rename to ...
16563 (linux_resume_one_lwp): ... this. Adjust.
16564 (linux_set_resume_request, linux_continue_one_thread)
16565 (linux_queue_one_thread, resume_status_pending_p)
16566 (usr_store_inferior_registers, regsets_store_inferior_registers)
16567 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16568 Adjust.
16569 * linux-low.h (get_process): Rename to ...
16570 (get_lwp): ... this. Adjust.
16571 (get_thread_process): Rename to ...
16572 (get_thread_lwp): ... this. Adjust.
16573 (get_process_thread): Rename to ...
16574 (get_lwp_thread): ... this. Adjust.
16575 (struct process_info): Rename to ...
16576 (struct lwp_info): ... this.
16577 (all_processes): Rename to ...
16578 (all_lwps): ... this.
16579 * proc-service.c (ps_lgetregs): Adjust.
16580 * thread-db.c (thread_db_create_event, find_one_thread)
16581 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16582
16583 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16584
16585 * server.c (handle_query): Handle "qAttached".
16586
16587 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16588
16589 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16590 GPLv3, update license URL.
16591
16592 2009-03-01 Doug Evans <dje@google.com>
16593
16594 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16595 (server_h): Add gdb_signals.h.
16596 (signals.o): Update.
16597 * server.h (target_signal_from_host,target_signal_to_host_p)
16598 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16599
16600 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16601
16602 * remote-utils.c (getpkt): Also generate remote-debug
16603 information if noack_mode is set.
16604
16605 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16606
16607 * server.c (handle_query): Report qXfer:siginfo:read and
16608 qXfer:siginfo:write as supported and handle them.
16609 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16610 * linux-low.c (linux_xfer_siginfo): New.
16611 (linux_target_ops): Set it.
16612
16613 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16614
16615 * server.c (gdbserver_usage): Mention --remote-debug.
16616 (main): Accept '--remote-debug' switch.
16617
16618 2009-01-18 Doug Evans <dje@google.com>
16619
16620 * regcache.c (new_register_cache): No need to check result of xcalloc.
16621 * server.c (handle_search_memory): Back out calls to xmalloc,
16622 result is checked and error is returned to user upon failure.
16623 (handle_query): Ditto. Add more checks for result of malloc.
16624 (handle_v_cont): Check result of malloc, report error back to
16625 user upon failure.
16626 (handle_v_run): Ditto. Call freeargv.
16627 * server.h (freeargv): Declare.
16628 * utils.c (freeargv): New fn.
16629
16630 2009-01-15 Doug Evans <dje@google.com>
16631
16632 * gdbreplay.c (perror_with_name): Make arg const char *.
16633 * server.h (target_signal_to_name): Make return type const char *.
16634 * thread-db.c (thread_db_err_str): Make return type const char *.
16635 * utils.c (perror_with_name): Make arg const char *.
16636
16637 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16638
16639 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16640 when handling a EXIT_PROCESS_DEBUG_EVENT.
16641
16642 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16643
16644 * gdbreplay.c (gdbreplay_version): Update copyright year.
16645 * server.c (gdbserver_version): Likewise.
16646
16647 2009-01-05 Doug Evans <dje@google.com>
16648
16649 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16650 (handle_extended_wait): Improve comment.
16651
16652 2008-12-13 Doug Evans <dje@google.com>
16653
16654 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16655 * server.h (ATTR_MALLOC): New macro.
16656 (xmalloc,xcalloc,xstrdup): Declare.
16657 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16658 * inferiors.c: Ditto.
16659 * linux-low.c: Ditto.
16660 * mem-break.c: Ditto.
16661 * regcache.c: Ditto.
16662 * remote-utils.c: Ditto.
16663 * server.c: Ditto.
16664 * target.c: Ditto.
16665 * win32-low.c: Ditto.
16666
16667 2008-12-12 Doug Evans <dje@google.com>
16668
16669 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16670 in debugging printf.
16671
16672 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16673
16674 2008-12-09 Doug Evans <dje@google.com>
16675
16676 * linux-low.h (struct process_info): Delete member tid, unused.
16677 * thread-db.c (find_one_thread): Update.
16678 (maybe_attach_thread): Update.
16679
16680 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16681
16682 * target.h (struct target_ops): Add qxfer_osdata member.
16683 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16684 and dirent.h.
16685 (linux_qxfer_osdata): New functions.
16686 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16687 callback.
16688 * server.c (handle_query): Handle "qXfer:osdata:read:".
16689 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16690 (buffer_xml_printf): New functions.
16691 * server.h (struct buffer): New.
16692 (buffer_grow_str, buffer_grow_str0): New macros.
16693 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16694 (buffer_xml_printf): Declare.
16695
16696 2008-11-24 Doug Evans <dje@google.com>
16697
16698 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16699
16700 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16701
16702 * server.c (handle_v_run): Always use the supplied argument list.
16703
16704 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16705
16706 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16707 (xtensa_regmap_table): Add entry for scompare1.
16708
16709 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16710
16711 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16712 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16713 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16714 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16715 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16716 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16717 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16718 XML target descriptions.
16719 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16720 when inferior is running on an ISA 2.05 or later processor. Add
16721 special case to return offset for full 64-bit slot of FPSCR when
16722 in 32-bits.
16723
16724 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16725
16726 * Makefile.in (SFILES, clean): Added sparc64 files.
16727 (reg-sparc64.o, reg-sparc64.c): New.
16728 * configure.srv (sparc*-*-linux*): New configuration.
16729 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16730 syscall arguments for SPARC.
16731 (regsets_store_inferior_registers): Likewise.
16732 * linux-sparc-low.c: New file.
16733
16734 2008-10-21 Doug Evans <dje@google.com>
16735
16736 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16737 (READLINE_DIR,READLINE_DEP): Delete.
16738 (INTERNAL_CFLAGS): Update.
16739 (LINTFLAGS): Update.
16740
16741 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16742
16743 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16744 whole argv from the last run, not just argv[0].
16745
16746 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16747
16748 * regcache.c (new_register_cache): Return NULL if the register
16749 cache size isn't known yet.
16750 (free_register_cache): Avoid dereferencing a NULL regcache.
16751
16752 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16753
16754 * configure.srv: Merge MIPS and MIPS64.
16755
16756 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16757
16758 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16759
16760 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16761
16762 * Makefile.in: Add required vsx dependencies.
16763
16764 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16765 Declare init_registers_powerpc_vsx32l.
16766 Declare init_registers_powerpc_vsx64l.
16767 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16768 (ppc_arch_setup): Check for VSX in hwcap.
16769 (ppc_fill_vsxregset): New function.
16770 (ppc_store_vsxregset): New function.
16771 Add new VSX entry in regset_info target_regsets.
16772
16773 * configure.srv: Add new VSX dependencies.
16774
16775 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16776
16777 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16778 (remote_open): Set or clear transport_is_reliable.
16779 (putpkt_binary): Don't expect acks in noack mode.
16780 (getpkt): Don't send ack/nac in noack mode.
16781 * server.c (handle_general_set): Handle QStartNoAckMode.
16782 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16783 qSupported.
16784 (main): Reset noack_mode on every connection.
16785 * server.h (noack_mode): Declare.
16786
16787 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16788
16789 * Makefile.in (GDBREPLAY_OBS): New variable.
16790 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16791
16792 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16793 Daniel Jacobowitz <dan@codesourcery.com>
16794
16795 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16796 (usr_store_inferior_registers): Likewise.
16797 (regsets_store_inferior_registers): Likewise.
16798
16799 2008-07-31 Rolf Jansen <rj@surtec.com>
16800 Pedro Alves <pedro@codesourcery.com>
16801
16802 * configure.ac: Check for memmem declaration.
16803 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16804 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16805 (disable_packet_qfThreadInfo): Unconditionally compile.
16806 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16807 * configure, config.in: Regenerate.
16808
16809 2008-07-28 Doug Kwan <dougkwan@google.com>
16810
16811 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16812 (linux_write_memory): Remove declaration of errno.
16813
16814 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16815
16816 * linux-low.c (handle_extended_wait): Do not use "status"
16817 variable uninitialized.
16818
16819 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16820
16821 * server.c (handle_v_attach): Inhibit reporting dll changes.
16822
16823 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16824
16825 * remote-utils.c (prepare_resume_reply): If requested, don't
16826 output "thread:TID" in the T stop reply.
16827
16828 * server.c (disable_packet_vCont, disable_packet_Tthread)
16829 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16830 (handle_query): If requested, disable support for qC, qfThreadInfo
16831 and qsThreadInfo.
16832 (handle_v_requests): If requested, disable support for vCont.
16833 (gdbserver_show_disableable): New.
16834 (main): Handle --disable-packet and --disable-packet=LIST.
16835
16836 * server.h (disable_packet_vCont, disable_packet_Tthread)
16837 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16838
16839 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16840
16841 * server.c (gdbserver_usage): Mention --version.
16842
16843 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16844
16845 * Makefile.in (gdbreplay.o): New rule.
16846
16847 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16848
16849 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16850 message, not gdbserver.
16851
16852 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16853 Nathan Sidwell <nathan@codesourcery.com>
16854 Joseph Myers <joseph@codesourcery.com>
16855
16856 * acinclude.m4: Include ../../config/acx.m4.
16857 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16858 * configure, config.in: Regenerate.
16859 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16860 * server.c (gdbserver_version): Print PKGVERSION.
16861 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16862 (main): Adjust gdbserver_usage calls.
16863 * gdbreplay.c (version, host_name): Add declarations.
16864 (gdbreplay_version, gdbreplay_usage): New.
16865 (main): Accept --version and --help options.
16866
16867 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16868
16869 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16870 (arm_breakpoint_at): Handle Thumb.
16871 (the_low_target): Add comment.
16872
16873 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16874
16875 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16876
16877 2008-05-09 Doug Evans <dje@google.com>
16878
16879 * server.h (decode_search_memory_packet): Declare.
16880 * remote-utils.c (decode_search_memory_packet): New fn.
16881 * server.c (handle_search_memory_1): New fn.
16882 (handle_search_memory): New fn.
16883 (handle_query): Process qSearch:memory packets.
16884
16885 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16886
16887 * regcache.c (registers_length): Remove.
16888 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16889 full register packet.
16890 * regcache.h (registers_length): Remove prototype.
16891 * server.h (PBUFSIZ): Define to 16384.
16892
16893 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16894
16895 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16896 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16897 powerpc-64l.o, and powerpc-altivec64l.o.
16898 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16899 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16900 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16901 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16902 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16903 to srv_xmlfiles.
16904
16905 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16906 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16907 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16908 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16909 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16910 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16911 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16912 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16913 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16914 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16915 (clean): Update.
16916
16917 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16918 (init_registers_powerpc_32l): ... this new prototype.
16919 (init_registers_powerpc_32): Remove, replace by ...
16920 (init_registers_powerpc_altivec32l): ... this new prototype.
16921 (init_registers_powerpc_e500): Remove, replace by ...
16922 (init_registers_powerpc_e500l): ... this new prototype.
16923 (init_registers_ppc64): Remove, replace by ...
16924 (init_registers_powerpc_64l): ... this new prototype.
16925 (init_registers_powerpc_64): Remove, replace by ...
16926 (init_registers_powerpc_altivec64l): ... this new prototype.
16927 (ppc_num_regs): Set to 73.
16928 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16929 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16930 (ppc_cannot_store_register): Handle orig_r3 and trap.
16931 (ppc_arch_setup): Update init_registers_... calls.
16932 (ppc_fill_gregset): Handle orig_r3 and trap.
16933
16934 * inferiors.c (clear_inferiors): Reset current_inferior.
16935
16936 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16937
16938 * acinclude.m4: Add override.m4.
16939 * configure: Regenerate.
16940
16941 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16942
16943 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16944 initial call to init_register_ppc64.
16945
16946 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16947
16948 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16949 single powerpc*-*-linux* case.
16950 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16951
16952 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16953
16954 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16955 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16956 from reg_xmlfiles.
16957 * linux-ppc-low.c: Include <elf.h>.
16958 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16959 (ppc_hwcap): New global variable.
16960 (ppc_regmap): Remove __SPE__ #ifdef sections.
16961 (ppc_regmap_e500): New global variable.
16962 (ppc_cannot_store_register): Update __SPE__ special case.
16963 (ppc_get_hwcap): New function.
16964 (ppc_arch_setup): Use it to determine whether inferior supports
16965 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16966 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16967 Do not access registers if target does not support AltiVec.
16968 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16969 Do not access registers if target does not support SPE.
16970 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16971
16972 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16973
16974 * linux-low.c (disabled_regsets, num_regsets): New.
16975 (use_regsets_p): Delete.
16976 (linux_wait_for_process): Clear disabled_regsets.
16977 (regsets_fetch_inferior_registers): Check and set it.
16978 (regsets_store_inferior_registers): Likewise.
16979 (linux_fetch_registers, linux_store_registers): Do not use
16980 use_regsets_p.
16981 (initialize_low): Allocate disabled_regsets.
16982
16983 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
16984
16985 * Makefile.in (LIBOBJS): New.
16986 (OBS): Use LIBOBJS.
16987 (memmem.o): New rule.
16988 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
16989 * configure: Regenerated.
16990
16991 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
16992
16993 * server.c (handle_query): Never return "unsupported" for
16994 qXfer:features:read queries.
16995
16996 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
16997
16998 * server.c (get_features_xml): Fix inverted condition.
16999 (handle_query): Always support qXfer:feature:read.
17000
17001 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17002
17003 * server.c (wrapper_argv): New.
17004 (start_inferior): Handle wrapper_argv. If set, expect an extra
17005 trap.
17006 (gdbserver_usage): Document --wrapper.
17007 (main): Parse --wrapper.
17008
17009 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17010
17011 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17012 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17013 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17014 (ppc_set_pc): Likewise.
17015 (ppc_arch_setup): New function.
17016 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17017 of collect_register.
17018 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17019
17020 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17021
17022 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17023 instead of linux-ppc64-low.o.
17024 * linux-ppc64-low.c: Remove file.
17025 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17026 (linux-ppc64-low.o): Remove rule.
17027
17028 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17029 (init_registers_powerpc_64): Likewise.
17030 (ppc_regmap): Conditionally define depending on __powerpc64__.
17031 (ppc_cannot_store_register): Do not special-case "fpscr" when
17032 compiled on __powerpc64__.
17033 (ppc_collect_ptrace_register): New function.
17034 (ppc_supply_ptrace_register): New function.
17035 (ppc_breakpoint): Change type to "unsigned int".
17036 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17037 (the_low_target): Conditionally provide initializers for the
17038 arch_setup member depending on __powerpc64__. Install
17039 collect_ptrace_register and supply_ptrace_register members.
17040
17041 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17042
17043 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17044 * server.c (gdbserver_xmltarget): Define.
17045 (get_features_xml): Use it to replace "target.xml" and arch_string.
17046
17047 * configure.srv: Remove srv_xmltarget. Add XML files that were
17048 mentioned there to srv_xmlfiles instead. Remove conditional tests
17049 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17050 srv_xmlfiles and srv_regobj to include all possible choices.
17051 * configure.ac (srv_xmltarget): Remove.
17052 (srv_xmlfiles): Do not add "target.xml".
17053 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17054 checks for supplementary target information.
17055 * configure: Regenerate.
17056 * Makefile.in (XML_TARGET): Remove.
17057 (target.xml): Remove rule.
17058 (clean): Do not clean up target.xml.
17059 (.PRECIOUS): Do not mention target.xml.
17060
17061 * target.h (struct target_ops): Remove arch_string member.
17062 * linux-low.c (linux_arch_string): Remove.
17063 (linux_target_ops): Remove arch_string initializer.
17064 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17065 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17066 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17067 * spu-low.c (spu_arch_string): Remove.
17068 (spu_target_ops): Remove arch_string initializer.
17069 * win32-low.c (win32_arch_string): Remove.
17070 (win32_target_ops): Remove arch_string initializer.
17071 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17072 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17073 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17074
17075 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17076
17077 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17078 by collect_ptrace_register and supply_ptrace_register hooks.
17079 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17080 instead of checking for the_low_target.left_pad_xfer.
17081 (usr_store_inferior_registers): Use collect_ptrace_register callback
17082 instead of checking for the_low_target.left_pad_xfer.
17083
17084 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17085 (s390_supply_ptrace_register): Likewise.
17086 (s390_fill_gregset): Call s390_collect_ptrace_register.
17087 (the_low_target): Update.
17088
17089 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17090 (ppc_supply_ptrace_register): Likewise.
17091 (the_low_target): Update.
17092
17093 * linux-i386-low.c (the_low_target): Update.
17094 * linux-x86-64-low.c (the_low_target): Update.
17095
17096 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17097
17098 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17099 reg-s390.o and reg-s390x.o.
17100
17101 * linux-low.c (new_inferior): New global variable.
17102 (linux_create_inferior, linux_attach): Set it.
17103 (linux_wait_for_process): Call the_low_target.arch_setup after the
17104 target has stopped for the first time.
17105 (initialize_low): Do not call the_low_target.arch_setup.
17106
17107 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17108 (s390_set_pc): Likewise.
17109 (s390_arch_setup): New function.
17110 (the_low_target): Use s390_arch_setup as arch_setup routine.
17111
17112 * regcache.c (realloc_register_cache): New function.
17113 (set_register_cache): Call it for each existing regcache.
17114
17115 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17116
17117 * server.h (init_registers): Remove prototype.
17118
17119 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17120 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17121 instead of init_registers ().
17122 * linux-arm-low.c (init_registers_arm): Add prototype.
17123 (init_registers_arm_with_iwmmxt): Likewise.
17124 (the_low_target): Add initializer for arch_setup field.
17125 * linux-cris-low.c (init_registers_cris): Add prototype.
17126 (the_low_target): Add initializer for arch_setup field.
17127 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17128 (the_low_target): Add initializer for arch_setup field.
17129 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17130 (the_low_target): Add initializer for arch_setup field.
17131 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17132 (the_low_target): Add initializer for arch_setup field.
17133 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17134 (the_low_target): Add initializer for arch_setup field.
17135 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17136 (the_low_target): Add initializer for arch_setup field.
17137 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17138 (init_registers_mips64_linux): Likewise.
17139 (the_low_target): Add initializer for arch_setup field.
17140 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17141 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17142 (the_low_target): Add initializer for arch_setup field.
17143 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17144 (init_registers_powerpc_64): Likewise.
17145 (the_low_target): Add initializer for arch_setup field.
17146 * linux-s390-low.c (init_registers_s390): Add prototype.
17147 (init_registers_s390x): Likewise.
17148 (the_low_target): Add initializer for arch_setup field.
17149 * linux-sh-low.c (init_registers_sh): Add prototype.
17150 (the_low_target): Add initializer for arch_setup field.
17151 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17152 (the_low_target): Add initializer for arch_setup field.
17153 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17154 (the_low_target): Add initializer for arch_setup field.
17155
17156 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17157 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17158 instead of init_registers ().
17159 * win32-arm-low.c (init_registers_arm): Add prototype.
17160 (the_low_target): Add initializer for arch_setup field.
17161 * win32-i386-low.c (init_registers_i386): Add prototype.
17162 (the_low_target): Add initializer for arch_setup field.
17163
17164 * spu-low.c (init_registers_spu): Add prototype.
17165 (initialize_low): Call initialie_registers_spu () instead of
17166 initialize_registers ().
17167
17168 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17169
17170 * server.c (handle_v_requests): When handling the vRun and vAttach
17171 packets, if already debugging a process, don't kill it. Return an
17172 error instead.
17173
17174 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17175
17176 * server.c (handle_query): Correct length check.
17177
17178 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17179
17180 * win32-low.c (do_initial_child_stuff): Add process handle
17181 parameter. Set current_process_handle and current_process_id from the
17182 parameters. Clear globals.
17183 (win32_create_inferior): Don't set current_process_handle and
17184 current_process_id here. Instead pass them on the call to
17185 do_initial_child_stuff.
17186 (win32_attach): Likewise.
17187 (win32_clear_inferiors): New.
17188 (win32_kill): Don't close the current process handle or the
17189 current thread handle here. Instead call win32_clear_inferiors.
17190 (win32_detach): Don't open a new handle to the process. Call
17191 win32_clear_inferiors.
17192 (win32_join): Don't rely on current_process_handle; open a new
17193 handle using the process id.
17194 (win32_wait): Call win32_clear_inferiors when the inferior process
17195 has exited.
17196
17197 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17198
17199 * server.c (monitor_show_help): Add "exit".
17200
17201 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17202
17203 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17204 (clean): Add reg-xtensa.c.
17205 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17206 * configure.srv (xtensa*-*-linux*) New target.
17207 * linux-xtensa-low.c: New.
17208 * xtensa-xtregs.c: New.
17209
17210 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17211
17212 * hostio.c: Don't include errno.h.
17213 (errno_to_fileio_errno): Move to hostio-errno.
17214 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17215 error number outputting to the target->hostio_last_error callback.
17216 (hostio_packet_error): Use FILEIO_EINVAL directly.
17217 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17218 calls to hostio_error.
17219 * hostio-errno.c: New.
17220 * server.h (hostio_last_error_from_errno): Declare.
17221 * target.h (target_ops): Add hostio_last_error member.
17222 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17223 as hostio_last_error handler.
17224 * spu-low.c (spu_target_ops): Likewise.
17225 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17226 (wince_hostio_last_error): New functions.
17227 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17228 as hostio_last_error handler.
17229 (win32_target_ops) [!_WIN32_WCE]: Register
17230 hostio_last_error_from_errno as hostio_last_error handler.
17231 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17232 (hostio-errno.o): New rule.
17233 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17234 * configure.srv (srv_hostio_err_objs): New variable. Default to
17235 hostio-errno.o.
17236 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17237 * configure: Regenerate.
17238
17239 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17240
17241 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17242 (linux_kill, linux_detach): Clean up the process list.
17243 * remote-utils.c (remote_open): Improve port number parsing.
17244 (putpkt_binary, input_interrupt): Only send interrupts if the target
17245 is running.
17246 * server.c (extended_protocol): Make static.
17247 (attached): Define earlier.
17248 (exit_requested, response_needed, program_argv): New variables.
17249 (target_running): New.
17250 (start_inferior): Clear attached here.
17251 (attach_inferior): Set attached here.
17252 (require_running): Define.
17253 (handle_query): Use require_running and target_running. Implement
17254 "monitor exit".
17255 (handle_v_attach, handle_v_run): New.
17256 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17257 (gdbserver_usage): Update.
17258 (main): Redo argument parsing. Handle --debug and --multi. Handle
17259 --attach along with other options or after the port. Save
17260 program_argv. Support no initial program. Resynchronize
17261 communication with GDB after an error. Handle "monitor exit".
17262 Use require_running and target_running. Always allow the extended
17263 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17264 restart in extended mode.
17265 * README: Refer to the GDB manual. Update --attach usage.
17266
17267 2007-12-20 Andreas Schwab <schwab@suse.de>
17268
17269 * linux-low.c (STACK_SIZE): Define.
17270 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17271 (linux_test_for_tracefork): Likewise.
17272
17273 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17274
17275 * linux-low.c (linux_wait_for_event): Update messages. Do not
17276 reinsert auto-delete breakpoints.
17277 * mem-break.c (struct breakpoint): Change return type of handler to
17278 int.
17279 (set_breakpoint_at): Update handler type.
17280 (reinsert_breakpoint_handler): Return 1 instead of calling
17281 delete_breakpoint.
17282 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17283 setting a new one.
17284 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17285 * mem-break.h (set_breakpoint_at): Update handler type.
17286 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17287 * win32-low.c (auto_delete_breakpoint): New.
17288 (get_child_debug_event): Use it.
17289
17290 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17291
17292 * configure.ac: Check for pread and pwrite.
17293 * hostio.c (handle_pread): Fall back to lseek and read.
17294 (handle_pwrite): Fall back to lseek and write.
17295 * config.in, configure: Regenerated.
17296
17297 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17298
17299 * server.c (myresume): Add own_buf argument.
17300 (main): Update calls.
17301
17302 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17303
17304 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17305 * remote-utils.c (remote_open): Do not call disable_async_io.
17306 (block_async_io): Delete.
17307 (unblock_async_io): Make static.
17308 (initialize_async_io): New.
17309 * server.c (handle_v_cont): Handle async I/O here.
17310 (myresume): Likewise. Move other common resume tasks here...
17311 (main): ... from here. Call initialize_async_io. Disable async
17312 I/O before the main loop.
17313 * server.h (initialize_async_io): Declare.
17314 (block_async_io, unblock_async_io): Delete prototypes.
17315 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17316
17317 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17318
17319 * remote-utils.c (readchar): Allow binary data in received messages.
17320
17321 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17322
17323 * win32-low.c (attaching): New global.
17324 (win32_create_inferior): Clear the `attaching' global.
17325 (win32_attach): Set the `attaching' global.
17326 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17327 attaching. Only set a breakpoint at the entry point if not
17328 attaching.
17329
17330 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17331
17332 * server.c (main): Don't report dll events on the initial
17333 connection on attaches.
17334
17335 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17336
17337 * server.c (main): Relax numerical bases supported for the pid of
17338 the --attach command line argument.
17339
17340 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17341
17342 * win32-low.c (win32_attach): Call OpenProcess before
17343 DebugActiveProcess, not after. Add last error output to error
17344 call.
17345
17346 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17347
17348 * win32-low.c (win32_get_thread_context)
17349 (win32_set_thread_context): New functions.
17350 (thread_rec): Use win32_get_thread_context.
17351 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17352 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17353 field.
17354
17355 2007-12-03 Leo Zayas
17356 Pedro Alves <pedro_alves@portugalmail.pt>
17357
17358 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17359 global variables.
17360 (child_add_thread): Minor cleanup.
17361 (child_continue): Resume artificially suspended threads before
17362 calling ContinueDebugEvent.
17363 (suspend_one_thread): New.
17364 (fake_breakpoint_event): New.
17365 (get_child_debug_event): Change return type to int. Check here if
17366 gdb sent an interrupt request. If a soft interrupt was requested,
17367 fake a breakpoint event. Return 0 if there is no event to handle,
17368 and 1 otherwise.
17369 (win32_wait): Don't check here if gdb sent an interrupt request.
17370 Ensure there is a valid event to handle.
17371 (win32_request_interrupt): Add soft interruption method as last
17372 resort.
17373
17374 2007-12-03 Leo Zayas
17375 Pedro Alves <pedro_alves@portugalmail.pt>
17376
17377 * win32-low.h (win32_thread_info): Add descriptions to the
17378 structure members. Replace `suspend_count' counter by a
17379 `suspended' flag.
17380 * win32-low.c (thread_rec): Update condition of when to get the
17381 context from the inferior. Rely on ContextFlags being set if it
17382 has already been retrieved. Only suspend the inferior thread if
17383 we haven't already. Warn if that fails.
17384 (continue_one_thread): s/suspend_count/suspended/. Only call
17385 ResumeThread once. Warn if that fails.
17386
17387 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17388
17389 * win32-low.c (win32_wait): Don't read from the inferior when it
17390 has already exited.
17391
17392 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17393
17394 * Makefile.in (win32_low_h): New variable.
17395 (win32-low.o): Add dependency on $(win32_low_h).
17396 (win32-arm-low.o, win32-i386-low.o): New rules.
17397
17398 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17399
17400 * hostio.c: Correct copyright year.
17401
17402 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17403
17404 * Makefile.in (OBS): Add hostio.o.
17405 (hostio.o): New rule.
17406 * server.h (handle_vFile): Declare.
17407 * hostio.c: New file.
17408 * server.c (handle_v_requests): Take packet_len and new_packet_len
17409 for binary packets. Call handle_vFile.
17410 (main): Update call to handle_v_requests.
17411
17412 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17413
17414 * linux-low.c: Include <sched.h>.
17415
17416 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17417
17418 * linux-low.c (linux_tracefork_grandchild): New.
17419 (linux_tracefork_child): Use clone.
17420 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17421
17422 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17423
17424 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17425
17426 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17427
17428 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17429
17430 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17431
17432 * inferiors.c (change_inferior_id): Delete.
17433 (add_pid_to_list, pull_pid_from_list): New.
17434 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17435 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17436 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17437 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17438 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17439 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17440 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17441 (using_threads): Always set to 1.
17442 (handle_extended_wait): New.
17443 (add_process): Do not set TID.
17444 (linux_create_inferior): Set must_set_ptrace_flags.
17445 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17446 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17447 (linux_thread_alive): Rename TID argument to LWPID.
17448 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17449 (linux_wait_for_event): Do not use TID or check using_threads. Update
17450 call to dead_thread_notify. Call handle_extended_wait.
17451 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17452 (send_sigstop): Delete sigstop_sent.
17453 (wait_for_sigstop): Avoid TID.
17454 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17455 (linux_test_for_tracefork): New.
17456 (linux_lookup_signals): Use thread_db_active and
17457 linux_supports_tracefork_flag.
17458 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17459 * linux-low.h (get_process_thread): Avoid TID.
17460 (struct process_ifo): Move thread_known and tid to the end. Remove
17461 sigstop_sent.
17462 (linux_attach_lwp, thread_db_init): Update prototypes.
17463 * server.h (change_inferior_id): Delete prototype.
17464 (add_pid_to_list, pull_pid_from_list): New prototypes.
17465 * thread-db.c (thread_db_use_events): New.
17466 (find_first_thread): Rename to...
17467 (find_one_thread): ...this. Update callers and messages. Do not
17468 call fatal. Check thread_db_use_events. Do not call
17469 change_inferior_id or new_thread_notify.
17470 (maybe_attach_thread): Update. Do not call new_thread_notify.
17471 (thread_db_init): Set thread_db_use_events. Check use_events.
17472 * utils.c (fatal, warning): Correct message prefix.
17473
17474 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17475
17476 * Makefile.in (clean): Remove new files.
17477 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17478 (powerpc-64.o, powerpc-64.c): New rules.
17479 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17480 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17481 with SPE.
17482 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17483 SPE targets.
17484 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17485 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17486 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17487 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17488 (target_regsets): Add AltiVec and SPE register sets.
17489 * configure.ac: Check for AltiVec and SPE.
17490 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17491 (ppc_fill_vrregset, ppc_store_vrregset): New.
17492 (target_regsets): Add AltiVec register set.
17493 * configure: Regenerated.
17494
17495 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17496
17497 * linux-low.c (O_LARGEFILE): Define.
17498 (linux_read_memory): Use /proc/PID/mem.
17499 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17500 * configure, config.in: Regenerated.
17501
17502 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17503
17504 * linux-low.c (linux_wait_for_event): Do not pass signals while
17505 single-stepping.
17506
17507 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17508
17509 * win32-low.c (create_process): New.
17510 (win32_create_inferior): Use create_process instead of
17511 CreateProcess. If create_process failed retry appending an ".exe"
17512 suffix. Store the GetLastError result immediatelly after
17513 create_process calls and use it on the call to error.
17514
17515 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17516
17517 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17518
17519 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17520
17521 * configure.ac: Switch license to GPLv3.
17522
17523 2007-08-01 Michael Snyder <msnyder@access-company.com>
17524
17525 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17526
17527 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17528
17529 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17530 typedef.
17531 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17532 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17533 CloseToolhelp32Snapshot.
17534 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17535 CloseToolhelp32Snapshot.
17536
17537 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17538
17539 * server.c (main): Check for inferior exit before main loop.
17540
17541 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17542
17543 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17544 instead of on tmp_desc.
17545
17546 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17547 Daniel Jacobowitz <dan@codesourcery.com>
17548
17549 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17550 (add_thread): Minor cleanups.
17551 (clear_inferiors): Move lower in the file. Clear the DLL
17552 list.
17553 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17554 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17555 (xml_escape_text): New.
17556 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17557 for qSupported.
17558 (handle_v_cont): Report errors.
17559 (gdbserver_version): Update.
17560 (main): Correct size of own_buf. Do not report initial DLL events.
17561 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17562 (unloaded_dll, xml_escape_text): New.
17563 * win32-low.c (enum target_waitkind): Update comments.
17564 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17565 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17566 (win32_EnumProcessModules, win32_GetModuleInformation)
17567 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17568 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17569 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17570 (win32_Module32First, win32_Module32Next, load_toolhelp)
17571 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17572 (get_child_debug_event): Handle DLL events.
17573 (win32_wait): Likewise.
17574
17575 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17576
17577 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17578 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17579
17580 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17581
17582 * win32-low.c (handle_output_debug_string): Ignore event if not
17583 waiting.
17584
17585 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17586
17587 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17588
17589 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17590
17591 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17592
17593 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17594
17595 * inferiors.c (change_inferior_id): Add comment.
17596 * linux-low.c (check_removed_breakpoint): Add an early
17597 prototype. Improve debug output.
17598 (linux_attach): Doc update.
17599 (linux_detach_one_process, linux_detach): Clean up before releasing
17600 each process.
17601 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17602 * linux-low.h (struct process_info): Doc improvement.
17603 * mem-break.c (delete_all_breakpoints): New.
17604 * mem-break.h (delete_all_breakpoints): New prototype.
17605 * thread-db.c (find_first_thread): New.
17606 (thread_db_create_event): Call it instead of
17607 thread_db_find_new_threads. Clean up unused variables.
17608 (maybe_attach_thread): Remove first thread handling.
17609 (thread_db_find_new_threads): Use find_first_thread.
17610 (thread_db_get_tls_address): Likewise.
17611
17612 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17613
17614 * thread-db.c (thread_db_find_new_threads): Add prototype.
17615 (thread_db_create_event): Check for the main thread before adding
17616 a new thread.
17617 (maybe_attach_thread): Only enable event reporting if TID == 0.
17618 (thread_db_get_tls_address): Check for new threads.
17619
17620 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17621
17622 * linux-low.c (linux_create_inferior): Try execv before execvp.
17623 * spu-low.c (spu_create_inferior): Likewise.
17624
17625 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17626
17627 * linux-low.c (linux_create_inferior): Change execv to execvp.
17628 * spu-low.c (spu_create_inferior): Likewies.
17629
17630 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17631
17632 * Makefile.in (clean): Clean new files instead of deleted ones.
17633 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17634 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17635 rules.
17636 * configure.srv: Specify XML files and new regformats for MIPS and
17637 MIPS64 GNU/Linux.
17638 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17639 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17640 an entry for the restart register.
17641 (mips_cannot_fetch_register, mips_cannot_store_register)
17642 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17643 register names to match the XML descriptions.
17644 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17645 restart register instead of $0.
17646
17647 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17648 Markus Deuling <deuling@de.ibm.com>
17649
17650 * remote-utils.c (decode_xfer_write): New function.
17651 * server.h (decode_xfer_write): Add prototype.
17652 * server.c (handle_query): Add PACKET_LEN argument. Support
17653 qXfer:spu:read and qXfer:spu:write packets.
17654 (main): Pass packet_len to handle_query.
17655 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17656 * target.h (target_ops): Add qxfer_spu.
17657
17658 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17659
17660 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17661 accessing non-seekable spufs files.
17662
17663 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17664
17665 * server.c (handle_query): Add reply for qC packet.
17666
17667 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17668 Leo Zayas <lerele@champenstudios@com>
17669
17670 * server.h (check_remote_input_interrupt_request): New function.
17671 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17672 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17673 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17674 (check_remote_input_interrupt_request): New function.
17675 * server.h (check_remote_input_interrupt_request): Declare.
17676 * win32-low.c (winapi_DebugBreakProcess,
17677 winapi_GenerateConsoleCtrlEvent): New typedefs.
17678 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17679 to 250 ms.
17680 (win32_wait): Check for remote interrupt request
17681 with check_remote_input_interrupt_request.
17682 (win32_request_interrupt): New function.
17683 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17684
17685 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17686
17687 * win32-low.c (debug_registers_changed,
17688 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17689 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17690 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17691 (thread_rec): Get context using the low target.
17692 (child_add_thread): Call thread_added on the low target,
17693 which does the same thing.
17694 (regptr): Delete.
17695 (do_initial_child_stuff): Remove debug registers references.
17696 Set context using the low target. Resume threads after
17697 setting the contexts.
17698 (child_continue): Remove dead variable. Remove debug
17699 registers references.
17700 (child_fetch_inferior_registers): Go through the low target.
17701 (do_child_store_inferior_registers): Remove.
17702 (child_store_inferior_registers): Go through the low target.
17703 (win32_resume): Remove debug registers references.
17704 Set context using the low target.
17705 (handle_exception): Change return type to void. Don't record
17706 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17707 first chance exception.
17708 (get_child_debug_event): Change return type to void. Remove
17709 goto loop. Always return after waiting for debug event.
17710 (win32_wait): Convert to switch statement. Handle spurious
17711 events.
17712
17713 * win32-i386-low.c (debug_registers_changed,
17714 debug_registers_used): New.
17715 (initial_stuff): Rename to ...
17716 (i386_initial_stuff): ... this. Clear debug registers
17717 state variables.
17718 (store_debug_registers): Delete.
17719 (i386_get_thread_context): New.
17720 (load_debug_registers): Delete.
17721 (i386_set_thread_context): New.
17722 (i386_thread_added): New.
17723 (single_step): Rename to ...
17724 (i386_single_step): ... this.
17725 (do_fetch_inferior_registers): Rename to ...
17726 (i386_fetch_inferior_register): ... this.
17727 (i386_store_inferior_register): New.
17728 (the_low_target): Adapt to new interface.
17729
17730 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17731 (arm_get_thread_context): New.
17732 (arm_set_thread_context): New.
17733 (regptr): New.
17734 (do_fetch_inferior_registers): Rename to ...
17735 (arm_fetch_inferior_register): ... this.
17736 (arm_store_inferior_register): New.
17737 (arm_wince_breakpoint): Reimplement as unsigned long.
17738 (arm_wince_breakpoint_len): Define.
17739 (the_low_target): Adapt to new interface.
17740
17741 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17742 load_debug_registers. Add get_thread_context, set_thread_context,
17743 thread_added and store_inferior_register. Rename
17744 fetch_inferior_registers to fetch_inferior_register.
17745 (regptr): Remove declaration.
17746
17747 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17748
17749 * linux-low.c (linux_detach): Change return type to int. Return 0.
17750 * spu-low.c (spu_detach): Likewise.
17751
17752 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17753
17754 * target.h (target_ops): Change return type of detach to int.
17755 Add join.
17756 (join_inferior): New.
17757 * server.c (main): Don't skip detach support on mingw32.
17758 If the inferior doesn't support detaching return error.
17759 Call join_inferior instead of using waitpid.
17760 * linux-low.c (linux_join): New.
17761 (linux_target_op): Add linux_join.
17762 * spu-low.c (spu_join): New.
17763 (spu_target_ops): Add spu_join.
17764 * win32-low.c (win32_detach): Adapt to new interface.
17765 Reopen current_process_handle before detaching. Issue a child
17766 resume before detaching.
17767 (win32_join): New.
17768 (win32_target_op): Add win32_join.
17769
17770 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17771
17772 * win32-low.c (win32-attach): Fix return value.
17773 * target.h (target_ops): Describe ATTACH return values.
17774
17775 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17776
17777 * win32-low.c (GETPROCADDRESS): Define.
17778 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17779 (winapi_DebugSetProcessKillOnExit): Likewise.
17780 (win32_create_inferior): Force usage of ansi CreateProcessA.
17781 (win32_attach): Use GETPROCADDRESS.
17782 (win32_detach): Likewise.
17783
17784 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17785
17786 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17787
17788 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17789
17790 * win32-low.c: Commit leftover changes from 2007-03-29.
17791
17792 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17793
17794 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17795 fields short instead of int. Add explicit padding.
17796 (i387_cache_to_fsave): Remove unnecessary casts.
17797 (i387_fsave_to_cache): Doc fix.
17798 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17799
17800 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17801
17802 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17803 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17804
17805 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17806
17807 * configure.srv (arm*-*-mingw32ce*): Move near the other
17808 arm targets.
17809
17810 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17811
17812 * configure.ac: Add errno checking.
17813 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17814 sys/file.h and malloc.h.
17815 (AC_CHECK_DECLS): Add perror.
17816 (srv_mingwce): Handle.
17817 * configure.srv (i[34567]86-*-cygwin*): Add
17818 win32-i386-low.o to srv_tgtobj.
17819 (i[34567]86-*-mingw*): Likewise.
17820 (arm*-*-mingw32ce*): Add case.
17821 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17822 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17823 [__MINGW32CE__] (strerror): New function.
17824 [__MINGW32CE__] (errno): Define to GetLastError.
17825 [__MINGW32CE__] (COUNTOF): New macro.
17826 (remote_open): Remove extra close call.
17827 * mem-break.c (delete_breakpoint_at): New function.
17828 * mem-break.h (delete_breakpoint_at): Declare.
17829 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17830 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17831 [USE_WIN32API] (read, write): Add char* casts.
17832 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17833 * server.h: Include wincecompat.h on Windows CE.
17834 [HAVE_ERRNO_H]: Check.
17835 (perror): Declare if not declared.
17836 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17837 (perror_with_name): Remove errno declaration.
17838 * wincecompat.h: New.
17839 * wincecompat.c: New.
17840 * win32-low.h: New.
17841 * win32-arm-low.c: New.
17842 * win32-i386-low.c: New.
17843 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17844 (OUTMSG2): Make it safe.
17845 (_T): New macro.
17846 (COUNTOF): New macro.
17847 (NUM_REGS): Get it from the low target.
17848 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17849 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17850 (thread_rec): Let low target handle debug registers.
17851 (child_add_thread): Likewise.
17852 (child_init_thread_list): Likewise.
17853 (continue_one_thread): Likewise.
17854 (regptr): New.
17855 (do_child_fetch_inferior_registers): Move to ...
17856 * win32-i386-low.c: ... here, and rename to ...
17857 (do_fetch_inferior_registers): ... this.
17858 * win32-low.c (child_fetch_inferior_registers):
17859 Go through the low target.
17860 (do_child_store_inferior_registers): Use regptr.
17861 (strwinerror): New function.
17862 (win32_create_inferior): Handle Windows CE.
17863 Use strwinerror instead of strerror on Windows error
17864 codes. Add program to the error output.
17865 Don't close the main thread handle on Windows CE.
17866 (win32_attach): Use coredll.dll on Windows CE.
17867 (win32_kill): Close current process and current
17868 thread handles.
17869 (win32_detach): Use coredll.dll on Windows CE.
17870 (win32_resume): Let low target handle debug registers, and
17871 step request.
17872 (handle_exception): Add/Remove initial breakpoint. Avoid
17873 non-existant WSTOPSIG on Windows CE.
17874 (win32_read_inferior_memory): Cast to remove warning.
17875 (win32_arch_string): Go through the low target.
17876 (initialize_low): Call set_breakpoint_data with the low
17877 target's breakpoint.
17878 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17879 FOP_REGNUM, mappings): Move to ...
17880 * win32-i386-low.c: ... here.
17881 * win32-low.c (win32_thread_info): Move to ...
17882 * win32-low.h: ... here.
17883 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17884 win32-arm-low.c and wincecompat.c.
17885 (all:): Add $EXEEXT.
17886 (install-only:): Likewise.
17887 (gdbserver:): Likewise.
17888 (gdbreplay:): Likewise.
17889 * config.in: Regenerate.
17890 * configure: Regenerate.
17891
17892 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17893
17894 * win32-low.c: Rename typedef thread_info to
17895 win32_thread_info throughout.
17896
17897 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17898
17899 * win32-i386-low.c: Rename to ...
17900 * win32-low.c: ... this.
17901 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17902 * Makefile.in: Likewise.
17903
17904 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17905
17906 * remote-utils.c (monitor_output): Constify msg parameter.
17907 * server.h (monitor_output): Likewise.
17908 * win32-i386-low.c (handle_output_debug_string): New.
17909 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17910 handle_output_debug_string.
17911 (get_child_debug_event): Likewise.
17912
17913 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17914
17915 * server.c (main): Correct strtoul check.
17916
17917 2007-03-27 Jon Ringle <jon@ringle.org>
17918
17919 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17920
17921 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17922
17923 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17924
17925 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17926
17927 * terminal.h: Check HAVE_SGTTY_H.
17928
17929 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17930
17931 * remote-utils.c (remote_open): Print out the assigned port number.
17932
17933 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17934
17935 * remote-utils.c (monitor_output): New function.
17936 * server.c (debug_threads): Define here.
17937 (monitor_show_help): New function.
17938 (handle_query): Handle qRcmd.
17939 (main): Do not handle 'd' packet.
17940 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17941 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17942 of debug_threads.
17943
17944 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17945
17946 * Makefile.in (EXEEXT): New.
17947 (clean): Use $(EXEEXT).
17948
17949 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17950
17951 * target.h (target_ops): Rename send_signal to request_interrupt,
17952 and remove enum target_signal parameter.
17953 * linux-low.c (linux_request_interrupt): Rename from
17954 linux_send_signal, and always send SIGINT.
17955 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17956 and always send SIGINT.
17957 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17958 of send_signal.
17959 (input_interrupt): Likewise.
17960
17961 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17962
17963 * server.c (get_features_xml): Check if target implemented
17964 arch_string.
17965 * win32-i386-low.c (win32_arch_string): New.
17966 (win32_target_ops): Add win32_arch_string as arch_string member.
17967
17968 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17969
17970 * spu-low.c (spu_arch_string): New.
17971 (spu_target_ops): Add spu_arch_string.
17972
17973 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17974
17975 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17976 * configure.ac: Do not check for terminal.h.
17977 * configure, config.in: Regenerated.
17978
17979 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17980
17981 * Makefile.in (OBS): Add $(XML_BUILTIN).
17982 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
17983 (clean): Update.
17984 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
17985 (arm-with-iwmmxt.c): New.
17986 * config.in, configure: Regenerate.
17987 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
17988 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
17989 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
17990 (arm*-*-linux*): Add iWMMXt and regset support.
17991 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
17992 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
17993 (arm_store_wmmxregset, target_regsets): New.
17994 * server.c (get_features_xml): Take annex argument. Check builtin
17995 XML documents.
17996 (handle_query): Handle multiple annexes.
17997
17998 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17999
18000 * remote-utils.c [USE_WIN32API] (read, write): Define.
18001 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18002 write.
18003
18004 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18005
18006 * linux-i386-low.c (the_low_target): Set arch_string.
18007 * linux-x86-64-low.c (the_low_target): Likewise.
18008 * linux-low.c (linux_arch_string): New.
18009 (linux_target_ops): Add it.
18010 * linux-low.h (struct linux_target_ops): Add arch_string.
18011 * server.c (write_qxfer_response): Use const void * for DATA.
18012 (get_features_xml): New.
18013 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18014 * target.h (struct target_ops): Add arch_string method.
18015
18016 2007-01-03 Denis Pilat <denis.pilat@st.com>
18017 Daniel Jacobowitz <dan@codesourcery.com>
18018
18019 * linux-low.c (linux_kill): Handle being called with no threads.
18020 * win32-i386-low.c (win32_kill): Likewise.
18021 (get_child_debug_event): Clear current_process_handle.
18022
18023 2006-12-30 Denis PILAT <denis.pilat@st.com>
18024 Daniel Jacobowitz <dan@codesourcery.com>
18025
18026 * remote-utils.c (remote_open): Check the type of specified
18027 serial port devices before opening them.
18028 * server.c (main): Kill the inferior if an error occurs during
18029 the first remote_open.
18030
18031 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18032
18033 * README: Update supported targets.
18034
18035 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18036
18037 * Makefile.in (clean): Remove reg-mips64.c.
18038 (reg-mips64.c, reg-mips64.o): New rules.
18039 * configure.srv: Handle mips64. Include regset support for mips.
18040 * linux-mips-low.c (union mips_register): New.
18041 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18042 (mips_breakpoint, mips_breakpoint_at): Use int.
18043 (mips_collect_register, mips_supply_register)
18044 (mips_collect_register_32bit, mips_supply_register_32bit)
18045 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18046 (mips_store_fpregset, target_regsets): New.
18047 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18048
18049 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18050
18051 * configure.srv: Add target "spu*-*-*".
18052 * Makefile.in (clean): Remove reg-spu.c.
18053 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18054 * spu-low.c: New file.
18055
18056 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18057
18058 * configure.ac: Correct td_thr_tls_get_addr test.
18059 * configure: Regenerated.
18060
18061 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18062
18063 * linux-low.c (linux_wait_for_event): Reformat. Use the
18064 pass_signals array.
18065 * remote-utils.c (decode_address_to_semicolon): New.
18066 * server.c (pass_signals, handle_general_set): New.
18067 (handle_query): Mention QPassSignals for qSupported.
18068 (main): Call handle_general_set.
18069 * server.h (pass_signals, decode_address_to_semicolon): New.
18070
18071 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18072
18073 * server.c (handle_query): Correct error handling for read_auxv.
18074
18075 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18076
18077 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18078 and srv_linux_thread_db to yes.
18079 * linux-s390-low.c (s390_fill_gregset): New function.
18080 (target_regsets): Define data structure.
18081
18082 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18083
18084 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18085 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18086 * config.in, configure: Regenerated.
18087 * inferiors.c (gdb_id_to_thread): New function.
18088 (gdb_id_to_thread_id): Use it.
18089 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18090 * linux-low.h (struct process_info): Add th member.
18091 (thread_db_get_tls_address): New prototype.
18092 * remote-utils.c (decode_address): Make non-static.
18093 * server.c (handle_query): Handle qGetTLSAddr.
18094 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18095 * target.h (struct target_ops): Add get_tls_address.
18096 * thread-db.c (maybe_attach_thread): Save the thread handle.
18097 (thread_db_get_tls_address): New.
18098
18099 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18100
18101 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18102 (linux_resume_one_process): Take a siginfo_t *. Update all
18103 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18104 (struct pending_signals): Add a siginfo_t.
18105 (linux_wait_for_process): Always set last_status.
18106 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18107 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18108 * linux-low.h (struct process_info): Add last_status.
18109
18110 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18111
18112 * remote-utils.c (try_rle): New function.
18113 (putpkt_binary): Use it.
18114
18115 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18116
18117 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18118 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18119 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18120 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18121 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18122 point registers.
18123
18124 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18125
18126 * server.c (terminal_fd): New variable.
18127 (old_foreground_pgrp): Likewise.
18128 (restore_old_foreground_pgrp): New function.
18129 (start_inferior): Record the terminal file descriptor in terminal_fd
18130 and its original foreground group in old_foreground_pgrp. Register
18131 restore_old_foreground_pgrp with atexit().
18132
18133 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18134
18135 * server.c (handle_query): Correct qPart to qXfer.
18136
18137 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18138
18139 * configure.ac: Check for more headers which are missing on
18140 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18141 * configure.srv: Add Cygwin and mingw32.
18142 * remote-utils.c: Don't include headers unconditionally which
18143 are missing on mingw32. Include <winsock.h> for mingw32.
18144 (remote_open): Adjust for mingw32 support. Flush
18145 standard error after writing to it.
18146 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18147 (unblock_async_io, enable_async_io, disable_async_io)
18148 (readchar, getpkt): Update for Winsock support.
18149 (prepare_resume_reply): Expect a protocol signal number.
18150 * server.c: Disable <sys/wait.h> on mingw32.
18151 (start_inferior): Adjust for mingw32 support. Flush
18152 standard error after writing to it.
18153 (attach_inferior): Likewise. Use protocol signal
18154 numbers.
18155 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18156 and names.
18157 * win32-i386-low.c: New file.
18158 * Makefile.in (XM_CLIBS): Set.
18159 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18160 (win32-i386-low.o): New dependency rule.
18161 * linux-low.c (linux_wait): Use target signal numbers.
18162 * target.h (struct target_ops): Doc fix.
18163 * server.h (target_signal_to_name): New prototype.
18164 * gdbreplay.c: Don't include headers unconditionally which
18165 are missing on mingw32. Include <winsock.h> for mingw32.
18166 (remote_close, remote_open): Adjust for Winsock support.
18167 * configure, config.in: Regenerated.
18168
18169 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18170
18171 * server.c (decode_xfer_read, write_qxfer_response): New.
18172 (handle_query): Take a packet length argument. Handle
18173 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18174 the qSupported response.
18175 (main): Update call to handle_query.
18176
18177 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18178
18179 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18180 (putpkt_binary): Renamed from putpkt and adjusted for binary
18181 data.
18182 (putpkt): New wrapper for putpkt_binary.
18183 (readchar): Don't mask off the high bit.
18184 (decode_X_packet): New function.
18185 * server.c (main): Call putpkt_binary if a handler sets the packet
18186 length. Save the length of the incoming packet. Handle 'X'.
18187 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18188
18189 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18190
18191 * server.c (handle_query): Handle qSupported.
18192
18193 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18194
18195 * remote-utils.c (all_symbols_looked_up): New variable.
18196 (look_up_one_symbol): Check it.
18197 * server.h (look_up_one_symbol): New declaration.
18198 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18199
18200 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18201
18202 * Makefile.in (linux-arm-low.o): Update dependencies.
18203 * linux-arm-low.c: Include "gdb_proc_service.h".
18204 (PTRACE_GET_THREAD_AREA): Define.
18205 (ps_get_thread_area): New function.
18206
18207 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18208
18209 * configure.srv (m68k*-*-uclinux*): New target.
18210 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18211 (linux_resume_one_process): Remove extraneous cast.
18212 (linux_read_offsets): New.
18213 (linux_target_op): Add linux_read_offsets on mmuless systems.
18214 * server.c (handle_query): Add qOffsets logic.
18215 * target.h (struct target_ops): Add read_offsets.
18216
18217 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18218
18219 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18220 (PTRACE_GET_THREAD_AREA): Define.
18221 (ps_get_thread_area): New function.
18222 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18223 (linux-x86-64-low.o): Update.
18224
18225 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18226
18227 * configure.ac: Remove checks for prfpregset_t.
18228 * gdb_proc_service.h: New file.
18229 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18230 new "gdb_proc_service.h".
18231 * proc-service.c: Likewise.
18232 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18233 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18234 * Makefile.in (gdb_proc_service_h): Updated.
18235 * configure, config.in: Regenerated.
18236
18237 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18238
18239 * remote-utils.c (prepare_resume_reply): Move declaration
18240 of gdb_id_from_wait to the top of the block.
18241
18242 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18243
18244 * linux-low.c (regsets_store_inferior_registers): Read the regset
18245 from the target before filling it.
18246
18247 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18248
18249 * server.c (attach_inferior): Return SIGTRAP for a successful
18250 attach.
18251
18252 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18253
18254 * Makefile.in (OBS): Add version.o.
18255 (STAGESTUFF): Delete.
18256 (version.o): Add dependencies.
18257 (version.c): Replace rule.
18258 (clean): Remove version.c.
18259 * server.c (gdbserver_version): New.
18260 (gdbserver_usage): Use printf.
18261 (main): Handle --version and --help.
18262 * server.h (version, host_name): Add declarations.
18263
18264 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18265
18266 * linux-arm-low.c:
18267 * linux-arm-low.c:
18268 * inferiors.c:
18269 * i387-fp.h:
18270 * i387-fp.c:
18271 * gdbreplay.c:
18272 * regcache.c:
18273 * proc-service.c:
18274 * mem-break.h:
18275 * mem-break.c:
18276 * linux-x86-64-low.c:
18277 * linux-sh-low.c:
18278 * linux-s390-low.c:
18279 * linux-ppc64-low.c:
18280 * linux-ppc-low.c:
18281 * linux-mips-low.c:
18282 * linux-m68k-low.c:
18283 * linux-m32r-low.c:
18284 * linux-low.h:
18285 * linux-low.c:
18286 * linux-ia64-low.c:
18287 * linux-i386-low.c:
18288 * linux-crisv32-low.c:
18289 * thread-db.c:
18290 * terminal.h:
18291 * target.h:
18292 * target.c:
18293 * server.h:
18294 * server.c:
18295 * remote-utils.c:
18296 * regcache.h:
18297 * utils.c:
18298 * Makefile.in:
18299 * configure.ac:
18300 * gdbserver.1: Add (C) after Copyright. Update the FSF
18301 address.
18302
18303 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18304
18305 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18306 (arm_breakpoint_at): Recognize both breakpoints.
18307 (the_low_target): Use the correct breakpoint instruction.
18308
18309 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18310
18311 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18312 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18313 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18314 (the_low_target): Update.
18315
18316 2005-10-25 Andreas Schwab <schwab@suse.de>
18317
18318 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18319
18320 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18321 (ia64_num_regs): Reduce to 462.
18322
18323 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18324
18325 * acinclude.m4: Correct quoting.
18326 * aclocal.m4: Regenerated.
18327
18328 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18329 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18330 (thread_db_init): Call thread_db_err_str.
18331 * configure.ac: Check for TD_VERSION.
18332 * config.in, configure: Regenerated.
18333
18334 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18335
18336 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18337
18338 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18339
18340 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18341 is not available. Define HAVE_PTRACE_GETREGS if it is.
18342 * config.in, configure: Regenerated.
18343 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18344 * linux-i386-low.c, linux-m68k-low.c: Update to use
18345 HAVE_PTRACE_GETREGS.
18346 * linux-low.c (regsets_fetch_inferior_registers)
18347 (regsets_store_inferior_registers): Only return 0 if we processed
18348 GENERAL_REGS.
18349 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18350 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18351
18352 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18353
18354 * inferiors.c (struct thread_info): Add gdb_id.
18355 (add_thread): Add gdb_id argument.
18356 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18357 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18358 calls to add_thread.
18359 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18360 * server.c (handle_query): Use thread_to_gdb_id.
18361 (handle_v_cont, main): Use gdb_id_to_thread_id.
18362 * server.h (add_thread): Update prototype.
18363 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18364 prototypes.
18365
18366 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18367
18368 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18369 left-padded registers.
18370 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18371 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18372
18373 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18374
18375 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18376 * configure: Regenerate.
18377 * config.in: Regenerate.
18378 * server.h (NEED_DECLARATION_STRERROR):
18379 Replace with !HAVE_DECL_STRERROR.
18380
18381 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18382
18383 * linux-low.c (linux_wait, linux_send_signal): Don't test
18384 an unsigned long variable for > 0 if it could be MAX_ULONG.
18385 * server.c (myresume): Likewise.
18386 * target.c (set_desired_inferior): Likewise.
18387
18388 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18389
18390 * configure.ac: Simplify and improve check for socklen_t.
18391 * configure, config.in: Regenerate.
18392
18393 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18394
18395 * acconfig.h: Remove.
18396 * configure.ac: Add a test for socklen_t. Use three-argument
18397 AC_DEFINE throughout.
18398 * config.in: Regenerated using autoheader 2.59.
18399 * configure: Regenerated.
18400
18401 * gdbreplay.c (socklen_t): Provide a default.
18402 (remote_open): Use socklen_t.
18403 * remote-utils.c (socklen_t): Provide a default.
18404 (remote_open): Use socklen_t.
18405 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18406 unsigned char.
18407
18408 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18409 char for buffers.
18410 * linux-low.c (linux_read_memory, linux_write_memory)
18411 (linux_read_auxv): Likewise.
18412 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18413 (check_mem_write): Likewise.
18414 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18415 Likewise.
18416 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18417 (registers_from_string, register_data): Likewise.
18418 * server.c (handle_query, main): Likewise.
18419 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18420 (decode_M_packet): Likewise.
18421 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18422 * target.h (struct target_ops): Update read_memory, write_memory,
18423 and read_auxv.
18424 (read_inferior_memory, write_inferior_memory): Update.
18425 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18426 to unsigned char *.
18427 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18428 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18429 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18430 linux-s390-low.c, linux-sh-low.c: Update for changes in
18431 read_inferior_memory and the_low_target->breakpoint.
18432
18433 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18434
18435 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18436 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18437 * configure.srv: Add powerpc64-*-linux*.
18438 * linux-ppc64-low.c: New file.
18439
18440 2005-05-23 Orjan Friberg <orjanf@axis.com>
18441
18442 * linux-cris-low.c: New file with support for CRIS.
18443 * linux-crisv32-low.c: Ditto for CRISv32.
18444 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18445 (clean): Add reg-cris.c and reg-crisv32.c.
18446 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18447 reg-crisv32.o, and reg-crisv32.c to make rules.
18448 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18449 recognized targets.
18450
18451 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18452
18453 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18454 of sizeof (PTRACE_XFER_TYPE).
18455 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18456
18457 2005-05-12 Orjan Friberg <orjanf@axis.com>
18458
18459 * target.h (struct target_ops): Add insert_watchpoint,
18460 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18461 pointers for hardware watchpoint support.
18462 * linux-low.h (struct linux_target_ops): Ditto.
18463 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18464 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18465 to linux_target_ops.
18466 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18467 reply packet.
18468 * server.c (main): Recognize 'Z' and 'z' packets.
18469
18470 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18471
18472 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18473 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18474 (the_low_target): Add new members.
18475
18476 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18477
18478 * proc-service.c (ps_lgetregs): Search all_processes instead of
18479 all_threads.
18480
18481 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18482
18483 * server.c (start_inferior): Change return type to int.
18484 (attach_inferior): Change sigptr to int *.
18485 (handle_v_cont, handle_v_requests): Change signal to int *.
18486 (main): Change signal to int.
18487
18488 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18489
18490 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18491 * configure.srv: Add m32r*-*-linux*.
18492 * linux-m32r-low.c: New file.
18493
18494 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18495
18496 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18497
18498 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18499
18500 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18501 Take unsigned long arguments for PIDs.
18502 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18503 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18504 (wait_for_sigstop, linux_resume_one_process)
18505 (regsets_fetch_inferior_registers, linux_send_signal)
18506 (linux_read_auxv): Likewise. Update the types of variables holding
18507 PIDs. Update format string specifiers.
18508 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18509 * remote-utils.c (prepare_resume_reply): Likewise.
18510 * server.c (cont_thread, general_thread, step_thread)
18511 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18512 unsigned long.
18513 (handle_query): Update format specifiers.
18514 (handle_v_cont, main): Use strtoul for thread IDs.
18515 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18516 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18517 (general_thread, step_thread, thread_from_wait)
18518 (old_thread_from_wait): Update.
18519 * target.h (struct thread_resume): Use unsigned long for THREAD.
18520 (struct target_ops): Use unsigned long for arguments to attach and
18521 thread_alive.
18522
18523 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18524
18525 * acinclude.m4: Include bfd/bfd.m4 directly.
18526 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18527 <agriffis@toolchain.org>.
18528 * aclocal.m4, configure: Regenerated.
18529
18530 2005-01-07 Andrew Cagney <cagney@gnu.org>
18531
18532 * configure.ac: Rename configure.in, require autoconf 2.59.
18533 * configure: Re-generate.
18534
18535 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18536
18537 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18538 LIBS when finished.
18539 * aclocal.m4: Regenerated.
18540 * configure: Regenerated.
18541
18542 2004-11-21 Andreas Schwab <schwab@suse.de>
18543
18544 * linux-m68k-low.c (m68k_num_gregs): Define.
18545 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18546 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18547 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18548 (m68k_breakpoint_at): New. Add to the_low_target.
18549
18550 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18551 srv_linux_thread_db to yes.
18552
18553 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18554
18555 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18556 (ARCH_SET_FS): Likewise.
18557 (ARCH_GET_FS): Likewise.
18558 (ARCH_GET_GS): Likewise.
18559
18560 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18561
18562 * linux-i386-low.c (ps_get_thread_area): New.
18563 * linux-x86-64-low.c (ps_get_thread_area): New.
18564 * linux-low.c: Include <sys/syscall.h>.
18565 (linux_kill_one_process): Don't kill the first thread here.
18566 (linux_kill): Kill the first thread here.
18567 (kill_lwp): New function.
18568 (send_sigstop, linux_send_signal): Use it.
18569 * proc-service.c: Clean up #ifdefs.
18570 (fpregset_info): Delete.
18571 (ps_lgetregs): Update and enable implementation.
18572 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18573 implementations.
18574 * remote-utils.c (struct sym_cache, symbol_cache): New.
18575 (input_interrupt): Print a clearer message.
18576 (async_io_enabled): New variable.
18577 (enable_async_io, disable_async_io): Use it. Update comments.
18578 (look_up_one_symbol): Use the symbol cache.
18579 * thread-db.c (thread_db_look_up_symbols): New function.
18580 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18581
18582 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18583
18584 * configure.in: Test for -rdynamic.
18585 * configure: Regenerated.
18586 * Makefile (INTERNAL_LDFLAGS): New.
18587 (gdbserver, gdbreplay): Use it.
18588
18589 2004-09-02 Andrew Cagney <cagney@gnu.org>
18590
18591 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18592
18593 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18594
18595 * linux-low.c (linux_wait): Clear all_processes list also.
18596
18597 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18598
18599 * linux-low.c: Include <errno.h>. Remove extern declaration of
18600 errno.
18601
18602 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18603
18604 * gdbreplay.c, server.h, utils.c: Update copyright years.
18605
18606 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18607
18608 * server.c (main): Print child status or termination signal from
18609 variable 'signal', not 'sig'.
18610
18611 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18612
18613 * linux-low.c (linux_read_memory): Change return type to
18614 int. Check for and return error from ptrace().
18615 * target.c (read_inferior_memory): Change return type to int. Pass
18616 back return status from the_target->read_memory().
18617 * target.h (struct target_ops): Adapt *read_memory() prototype.
18618 Update comment.
18619 (read_inferior_memory): Adapt prototype.
18620 * server.c (main): Return an error packet if
18621 read_inferior_memory() returns an error.
18622
18623 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18624
18625 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18626 Unify with other clean targets.
18627
18628 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18629
18630 * server.c (handle_v_cont): Call set_desired_inferior.
18631
18632 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18633
18634 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18635
18636 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18637
18638 * linux-low.c (linux_wait): Unblock async I/O.
18639 (linux_resume): Block and enable async I/O.
18640 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18641 * server.h (block_async_io, unblock_async_io): Add prototypes.
18642
18643 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18644
18645 * remote-utils.c (remote_open): Print a status notice after
18646 opening a TCP port.
18647 * server.c (attach_inferior): Print a status notice after
18648 attaching.
18649
18650 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18651
18652 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18653
18654 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18655
18656 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18657 error packet.
18658 * server.c, target.h: Update copyright years.
18659
18660 2004-02-25 Roland McGrath <roland@redhat.com>
18661
18662 * target.h (struct target_ops): New member `read_auxv'.
18663 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18664 * linux-low.c (linux_read_auxv): New function.
18665 (linux_target_ops): Initialize `read_auxv' member to that.
18666
18667 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18668
18669 Committed by Jim Blandy <jimb@redhat.com>.
18670
18671 * linux-s390-low.c (s390_num_regs): Update.
18672 (s390_regmap): Remove control registers. Use __s390x__ predefine
18673 instead of GPR_SIZE to distiguish s390 and s390x targets.
18674
18675 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18676
18677 * linux-low.c: Update copyright year.
18678 (check_removed_breakpoint): Clear pending_is_breakpoint.
18679 (linux_set_resume_request, linux_queue_one_thread)
18680 (resume_status_pending_p): New functions.
18681 (linux_continue_one_thread): Use process->resume.
18682 (linux_resume): Only resume threads if there are no pending events.
18683 * linux-low.h (struct process_info): Add resume request
18684 pointer.
18685
18686 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18687
18688 * regcache.c (new_register_cache): Clear the allocated register
18689 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18690
18691 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18692
18693 * linux-low.c (linux_resume): Take a struct thread_resume *
18694 argument.
18695 (linux_wait): Update call.
18696 (resume_ptr): New static variable.
18697 (linux_continue_one_thread): Renamed from
18698 linux_continue_one_process. Use resume_ptr.
18699 (linux_resume): Use linux_continue_one_thread.
18700 * server.c (handle_v_cont, handle_v_requests): New functions.
18701 (myresume): New function.
18702 (main): Handle 'v' case.
18703 * target.h (struct thread_resume): New type.
18704 (struct target_ops): Change argument of "resume" to struct
18705 thread_resume *.
18706 (myresume): Delete macro.
18707
18708 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18709
18710 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18711 (uninstall): Support DESTDIR.
18712
18713 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18714
18715 * configure.srv: Add xscale*linux copy of arm*linux entry.
18716
18717 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18718
18719 * linux-arm-low.c (arm_reinsert_addr): New function.
18720 (the_low_target): Add arm_reinsert_addr.
18721
18722 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18723
18724 * mem-break.c: Remove whitespace at end of file.
18725
18726 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18727
18728 * configure.in: Check whether we need to prototype strerror.
18729 * server.h: Optionally prototype strerror.
18730 * gdbreplay.c (perror_with_name): Use strerror.
18731 * linux-low.c (linux_attach_lwp): Use strerror.
18732 * utils.c (perror_with_name): Use strerror.
18733 * config.in, configure: Regenerated.
18734
18735 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18736
18737 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18738 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18739
18740 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18741
18742 * Makefile.in (SFILES): Update.
18743 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18744 low-sun3.c: Remove files.
18745
18746 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18747
18748 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18749 (linux_detach_one_process, linux_detach): New functions.
18750 (linux_target_ops): Add linux_detach.
18751 * server.c (main): Handle 'D' packet.
18752 * target.h (struct target_ops): Add "detach" member.
18753 (detach_inferior): Define.
18754
18755 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18756
18757 From Kelley Cook <kelleycook@wideopenwest.com>:
18758 * configure.srv: Accept i[34567]86 variants.
18759
18760 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18761
18762 * linux-low.c (linux_wait_for_event): Correct comment typos.
18763 (linux_resume_one_process): Call check_removed_breakpoint.
18764 (linux_send_signal): New function.
18765 (linux_target_ops): Add linux_send_signal.
18766 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18767 of kill.
18768 * target.h (struct target_ops): Add send_signal.
18769
18770 2003-05-29 Jim Blandy <jimb@redhat.com>
18771
18772 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18773 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18774 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18775 away part of the register's value.
18776
18777 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18778
18779 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18780 (linux_wait_for_event, linux_init_signals): Likewise.
18781
18782 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18783
18784 * configure.in: Check for stdlib.h.
18785 * configure: Regenerated.
18786 * config.in: Regenerated.
18787
18788 2003-01-04 Andreas Schwab <schwab@suse.de>
18789
18790 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18791
18792 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18793
18794 * Makefile.in: Remove obsolete code.
18795
18796 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18797
18798 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18799 defined(PT_FPR0_HI).
18800
18801 2002-11-17 Stuart Hughes <seh@zee2.com>
18802
18803 * linux-arm-low.c (arm_num_regs): Increase.
18804 (arm_regmap): Include status register.
18805
18806 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18807
18808 * linux-low.c (register_addr): Remove incorrect -1 check.
18809
18810 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18811
18812 * linux-low.c (linux_create_inferior): Call setpgid. Return
18813 the new PID.
18814 (unstopped_p, linux_signal_pid): Remove.
18815 (linux_target_ops): Remove linux_signal_pid.
18816 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18817 global instead of target method.
18818 * target.h (struct target_ops): Remove signal_pid. Update comment
18819 for create_inferior.
18820 * server.c (signal_pid): New variable.
18821 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18822 gdbserver. Set the child to be the foreground process group.
18823 (attach_inferior): Set signal_pid.
18824
18825 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18826
18827 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18828
18829 2002-08-20 Jim Blandy <jimb@redhat.com>
18830
18831 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18832 default for this.
18833
18834 2002-08-01 Andrew Cagney <cagney@redhat.com>
18835
18836 * Makefile.in: Make chill references obsolete.
18837
18838 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18839
18840 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18841 * configure: Regenerate.
18842 * config.in: Regenerate.
18843
18844 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18845
18846 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18847 (perror_with_name, remote_close, remote_open, expect, play): Static.
18848
18849 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18850
18851 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18852 byte offsets instead of an array of indexes.
18853 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18854
18855 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18856
18857 * regcache.c: Add comment.
18858
18859 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18860
18861 * thread-db.c: New file.
18862 * proc-service.c: New file.
18863 * acinclude.m4: New file.
18864 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18865 proc-service.o, and thread-db.o.
18866 (linux-low.o): Add USE_THREAD_DB.
18867 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18868 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18869 * aclocal.m4: Regenerated.
18870 * config.in: Regenerated.
18871 * configure: Regenerated.
18872 * configure.in: Check for proc_service.h, sys/procfs.h,
18873 thread_db.h, and linux/elf.h headrs.
18874 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18875 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18876 Check for -lthread_db and thread support.
18877 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18878 PowerPC, and SuperH.
18879 * i387-fp.c: Constify arguments.
18880 * i387-fp.h: Likewise.
18881 * inferiors.c: (struct thread_info): Renamed from
18882 `struct inferior_info'. Remove PID member. Use generic inferior
18883 list header. All uses updated.
18884 (inferiors, signal_pid): Removed.
18885 (all_threads): New variable.
18886 (get_thread): Define.
18887 (add_inferior_to_list): New function.
18888 (for_each_inferior): New function.
18889 (change_inferior_id): New function.
18890 (add_inferior): Removed.
18891 (remove_inferior): New function.
18892 (add_thread): New function.
18893 (free_one_thread): New function.
18894 (remove_thread): New function.
18895 (clear_inferiors): Use for_each_inferior and free_one_thread.
18896 (find_inferior): New function.
18897 (find_inferior_id): New function.
18898 (inferior_target_data): Update argument type.
18899 (set_inferior_target_data): Likewise.
18900 (inferior_regcache_data): Likewise.
18901 (set_inferior_regcache_data): Likewise.
18902 * linux-low.c (linux_bp_reinsert): Remove.
18903 (all_processes, stopping_threads, using_thrads)
18904 (struct pending_signals, debug_threads, pid_of): New.
18905 (inferior_pid): Replace with macro.
18906 (struct inferior_linux_data): Remove.
18907 (get_stop_pc, add_process): New functions.
18908 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18909 Use add_process and add_thread.
18910 (linux_attach_lwp): New function, based on old linux_attach. Use
18911 add_process and add_thread. Set stop_expected for new threads.
18912 (linux_attach): New function.
18913 (linux_kill_one_process): New function.
18914 (linux_kill): Kill all LWPs.
18915 (linux_thread_alive): Use find_inferior_id.
18916 (check_removed_breakpoints, status_pending_p): New functions.
18917 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18918 Update. Use WNOHANG. Wait for cloned processes also. Update process
18919 struct for the found process.
18920 (linux_wait_for_event): New function.
18921 (linux_wait): Use it. Support LWPs.
18922 (send_sigstop, wait_for_sigstop, stop_all_processes)
18923 (linux_resume_one_process, linux_continue_one_process): New functions.
18924 (linux_resume): Support LWPs.
18925 (REGISTER_RAW_SIZE): Remove.
18926 (fetch_register): Use register_size instead. Call supply_register.
18927 (usr_store_inferior_registers): Likewise. Call collect_register.
18928 Fix recursive case.
18929 (regsets_fetch_inferior_registers): Improve error message.
18930 (regsets_store_inferior_registers): Add debugging.
18931 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18932 (unstopped_p, linux_signal_pid): New functions.
18933 (linux_target_ops): Add linux_signal_pid.
18934 (linux_init_signals): New function.
18935 (initialize_low): Call it. Initialize using_threads.
18936 * regcache.c (inferior_regcache_data): Add valid
18937 flag.
18938 (get_regcache): Fetch registers lazily. Add fetch argument
18939 and update all callers.
18940 (regcache_invalidate_one, regcache_invalidate): New
18941 functions.
18942 (new_register_cache): Renamed from create_register_cache.
18943 Return the new regcache.
18944 (free_register_cache): Change argument to a void *.
18945 (registers_to_string, registers_from_string): Call get_regcache
18946 with fetch flag set.
18947 (register_data): Make static. Pass fetch flag to get_regcache.
18948 (supply_register): Call get_regcache with fetch flag clear.
18949 (collect_register): Call get_regcache with fetch flag set.
18950 (collect_register_as_string): New function.
18951 * regcache.h: Update.
18952 * remote-utils.c (putpkt): Flush after debug output and use
18953 stderr.
18954 Handle input interrupts while waiting for an ACK.
18955 (input_interrupt): Use signal_pid method.
18956 (getpkt): Flush after debug output and use stderr.
18957 (outreg): Use collect_register_as_string.
18958 (new_thread_notify, dead_thread_notify): New functions.
18959 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18960 and general_thread.
18961 (look_up_one_symbol): Flush after debug output.
18962 * server.c (step_thread, server_waiting): New variables.
18963 (start_inferior): Don't use signal_pid. Update call to mywait.
18964 (attach_inferior): Update call to mywait.
18965 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18966 (main): Don't fetch/store registers explicitly. Use
18967 set_desired_inferior. Support proposed ``Hs'' packet. Update
18968 calls to mywait.
18969 * server.h: Update.
18970 (struct inferior_list, struct_inferior_list_entry): New.
18971 * target.c (set_desired_inferior): New.
18972 (write_inferior_memory): Constify.
18973 (mywait): New function.
18974 * target.h: Update.
18975 (struct target_ops): New signal_pid method.
18976 (mywait): Removed macro, added prototype.
18977
18978 * linux-low.h (regset_func): Removed.
18979 (regset_fill_func, regset_store_func): New.
18980 (enum regset_type): New.
18981 (struct regset_info): Add type field. Use new operation types.
18982 (struct linux_target_ops): stop_pc renamed to get_pc.
18983 Add decr_pc_after_break and breakpoint_at.
18984 (get_process, get_thread_proess, get_process_thread)
18985 (strut process_info, all_processes, linux_attach_lwp)
18986 (thread_db_init): New.
18987
18988 * linux-arm-low.c (arm_get_pc, arm_set_pc,
18989 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
18990 (the_low_target): Add new members.
18991 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
18992 (i386_store_fpxregset): Constify.
18993 (target_regsets): Add new kind identifier.
18994 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
18995 (i386_set_pc): Add debugging.
18996 (i386_breakpoint_at): New function.
18997 (the_low_target): Add new members.
18998 * linux-mips-low.c (mips_get_pc, mips_set_pc)
18999 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19000 (mips_breakpoint_at): New.
19001 (the_low_target): Add new members.
19002 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19003 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19004 (the_low_target): Add new members.
19005 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19006 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19007 (the_low_target): Add new members.
19008 * linux-x86-64-low.c (target_regsets): Add new kind
19009 identifier.
19010
19011 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19012
19013 From Martin Pool <mbp@samba.org>:
19014 * server.c (gdbserver_usage): New function.
19015 (main): Call it.
19016
19017 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19018
19019 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19020 stop_at -> stop_pc.
19021
19022 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19023
19024 * Makefile.in: Remove obsolete code.
19025
19026 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19027
19028 * linux-low.c (regsets_fetch_inferior_registers),
19029 (regsets_store_inferior_registers): Removed cast to int from
19030 ptrace() calls.
19031 * regcache.h: Added declaration of struct inferior_info.
19032
19033 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19034
19035 * inferiors.c (struct inferior_info): Add regcache_data.
19036 (add_inferior): Call create_register_cache.
19037 (clear_inferiors): Call free_register_cache.
19038 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19039 * regcache.c (struct inferior_regcache_data): New.
19040 (registers): Remove.
19041 (get_regcache): New function.
19042 (create_register_cache, free_register_cache): New functions.
19043 (set_register_cache): Don't initialize the register cache here.
19044 (registers_to_string, registers_from_string, register_data): Call
19045 get_regcache.
19046 * regcache.h: Add prototypes.
19047 * server.h: Likewise.
19048
19049 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19050
19051 * mem-break.c: New file.
19052 * mem-break.h: New file.
19053 * Makefile.in: Add mem-break.o rule; update server.h
19054 dependencies.
19055 * inferiors.c (struct inferior_info): Add target_data
19056 member.
19057 (clear_inferiors): Free target_data member if set.
19058 (inferior_target_data, set_inferior_target_data): New functions.
19059 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19060 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19061 * linux-low.c (linux_bp_reinsert): New variable.
19062 (struct inferior_linux_data): New.
19063 (linux_create_inferior): Use set_inferior_target_data.
19064 (linux_attach): Likewise. Call add_inferior.
19065 (linux_wait_for_one_inferior): New function.
19066 (linux_wait): Call it.
19067 (linux_write_memory): Add const.
19068 (initialize_low): Call set_breakpoint_data.
19069 * linux-low.h (struct linux_target_ops): Add breakpoint
19070 handling members.
19071 * server.c (attach_inferior): Remove extra add_inferior
19072 call.
19073 * server.h: Include mem-break.h. Update inferior.c
19074 prototypes.
19075 * target.c (read_inferior_memory)
19076 (write_inferior_memory): New functions.
19077 * target.h (read_inferior_memory)
19078 (write_inferior_memory): Change macros to prototypes.
19079 (struct target_ops): Update comments. Add const to write_memory
19080 definition.
19081
19082 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19083
19084 * linux-low.c (usr_store_inferior_registers): Support
19085 registers which are allowed to fail to store.
19086 * linux-low.h (linux_target_ops): Likewise.
19087 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19088 (ppc_cannot_store_register): FPSCR may not be storable.
19089
19090 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19091
19092 * server.h: Include <string.h> if HAVE_STRING_H.
19093 * ChangeLog: Correct paths in last ChangeLog entry.
19094
19095 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19096
19097 * linux-low.h: Remove obsolete prototypes.
19098 (struct linux_target_ops): New.
19099 (extern the_low_target): New.
19100 * linux-low.c (num_regs, regmap): Remove declarations.
19101 (register_addr): Use the_low_target explicitly.
19102 (fetch_register): Likewise.
19103 (usr_fetch_inferior_registers): Likewise.
19104 (usr_store_inferior_registers): Likewise.
19105 * linux-arm-low.c (num_regs): Remove.
19106 (arm_num_regs): Define.
19107 (arm_regmap): Renamed from regmap, made static.
19108 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19109 made static.
19110 (arm_cannot_store_register): Renamed from cannot_store_register,
19111 made static.
19112 (the_low_target): New.
19113 * linux-i386-low.c (num_regs): Remove.
19114 (i386_num_regs): Define.
19115 (i386_regmap): Renamed from regmap, made static.
19116 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19117 made static.
19118 (i386_cannot_store_register): Renamed from cannot_store_register,
19119 made static.
19120 (the_low_target): New.
19121 * linux-ia64-low.c (num_regs): Remove.
19122 (ia64_num_regs): Define.
19123 (ia64_regmap): Renamed from regmap, made static.
19124 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19125 made static.
19126 (ia64_cannot_store_register): Renamed from cannot_store_register,
19127 made static.
19128 (the_low_target): New.
19129 * linux-m68k-low.c (num_regs): Remove.
19130 (m68k_num_regs): Define.
19131 (m68k_regmap): Renamed from regmap, made static.
19132 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19133 made static.
19134 (m68k_cannot_store_register): Renamed from cannot_store_register,
19135 made static.
19136 (the_low_target): New.
19137 * linux-mips-low.c (num_regs): Remove.
19138 (mips_num_regs): Define.
19139 (mips_regmap): Renamed from regmap, made static.
19140 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19141 made static.
19142 (mips_cannot_store_register): Renamed from cannot_store_register,
19143 made static.
19144 (the_low_target): New.
19145 * linux-ppc-low.c (num_regs): Remove.
19146 (ppc_num_regs): Define.
19147 (ppc_regmap): Renamed from regmap, made static.
19148 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19149 made static.
19150 (ppc_cannot_store_register): Renamed from cannot_store_register,
19151 made static.
19152 (the_low_target): New.
19153 * linux-s390-low.c (num_regs): Remove.
19154 (s390_num_regs): Define.
19155 (s390_regmap): Renamed from regmap, made static.
19156 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19157 made static.
19158 (s390_cannot_store_register): Renamed from cannot_store_register,
19159 made static.
19160 (the_low_target): New.
19161 * linux-sh-low.c (num_regs): Remove.
19162 (sh_num_regs): Define.
19163 (sh_regmap): Renamed from regmap, made static.
19164 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19165 made static.
19166 (sh_cannot_store_register): Renamed from cannot_store_register,
19167 made static.
19168 (the_low_target): New.
19169 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19170 (the_low_target): New.
19171
19172 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19173
19174 * Makefile.in: Add stamp-h target.
19175 * configure.in: Create stamp-h.
19176 * configure: Regenerated.
19177
19178 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19179
19180 * inferiors.c: New file.
19181 * target.c: New file.
19182 * target.h: New file.
19183 * Makefile.in: Add target.o and inferiors.o. Update
19184 dependencies.
19185 * linux-low.c (inferior_pid): New static variable,
19186 moved from server.c.
19187 (linux_create_inferior): Renamed from create_inferior.
19188 Call add_inferior. Return 0 on success instead of a PID.
19189 (linux_attach): Renamed from myattach.
19190 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19191 (linux_thread_alive): Renamed from mythread_alive.
19192 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19193 child dies.
19194 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19195 (regsets_store_inferior_registers): Correct error message.
19196 Add missing ``return 0''.
19197 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19198 (linux_store_registers): Renamed from store_inferior_registers.
19199 (linux_read_memory): Renamed from read_inferior_memory.
19200 (linux_write_memory): Renamed from write_inferior_memory.
19201 (linux_target_ops): New structure.
19202 (initialize_low): Call set_target_ops ().
19203 * remote-utils.c (unhexify): New function.
19204 (hexify): New function.
19205 (input_interrupt): Send signals to ``signal_pid''.
19206 * server.c (inferior_pid): Remove.
19207 (start_inferior): Update create_inferior call.
19208 (attach_inferior): Call add_inferior.
19209 (handle_query): New function.
19210 (main): Call handle_query for `q' packets.
19211 * server.h: Include "target.h". Remove obsolete prototypes.
19212 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19213
19214 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19215
19216 * Makefile.in: Add WARN_CFLAGS. Update configury
19217 dependencies.
19218 * configure.in: Check for <string.h>
19219 * configure: Regenerate.
19220 * config.in: Regenerate.
19221 * gdbreplay.c: Include needed system headers.
19222 (remote_open): Remove strchr prototype.
19223 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19224 * regcache.c (supply_register): Change buf argument to const void *.
19225 (supply_register_by_name): Likewise.
19226 (collect_register): Change buf argument to void *.
19227 (collect_register_by_name): Likewise.
19228 * regcache.h: Add missing prototypes.
19229 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19230 * server.c (handle_query): New function.
19231 (attached): New static variable, moved out of main.
19232 (main): Quiet longjmp clobber warnings.
19233 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19234 * utils.c (error): Remove NORETURN.
19235 (fatal): Likewise.
This page took 0.575723 seconds and 4 git commands to generate.