fc01891dd9c5f80382369a2bb5743b40c84cf33d
[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 emit_ops op into a method of
4 process_target.
5
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op.
8 (target_emit_ops): Update the macro.
9 * target.cc (process_target::emit_ops): Define.
10
11 Update the derived classes and callers below.
12
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_emit_ops): Turn into ...
15 (linux_process_target::emit_ops): ... this.
16 * linux-low.h (class linux_process_target): Update.
17 * lynx-low.cc (lynx_target_ops): Update.
18 * nto-low.cc (nto_target_ops): Update.
19 * win32-low.cc (win32_target_ops): Update.
20
21 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
22
23 Turn process_stratum_target's install_fast_tracepoint_jump_pad
24 and get_min_fast_tracepoint_insn_len ops into methods of
25 process_target.
26
27 * target.h (struct process_stratum_target): Remove the target ops.
28 (class process_target): Add the target ops. Also add
29 'supports_fast_tracepoints'.
30 (target_supports_fast_tracepoints): Update the macro.
31 (target_get_min_fast_tracepoint_insn_len): Update the macro.
32 (install_fast_tracepoint_jump_pad): Update and rename the macro
33 to ...
34 (target_install_fast_tracepoint_jump_pad): ... this.
35 * target.cc (process_target::supports_fast_tracepoints): Define.
36 (process_target::install_fast_tracepoint_jump_pad): Define.
37 (process_target::get_min_fast_tracepoint_insn_len): Define.
38
39 Update the derived classes and callers below.
40
41 * tracepoint.cc (install_fast_tracepoint): Update.
42 * linux-low.cc (linux_target_ops): Update.
43 (linux_process_target::supports_fast_tracepoints): Define.
44 (linux_install_fast_tracepoint_jump_pad): Turn into ...
45 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
46 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
47 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
48 * linux-low.h (class linux_process_target): Update.
49 * lynx-low.cc (lynx_target_ops): Update.
50 * nto-low.cc (nto_target_ops): Update.
51 * win32-low.cc (win32_target_ops): Update.
52
53 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
54
55 Turn process_stratum_target's stabilize_threads op into a
56 method of process_target.
57
58 * target.h (struct process_stratum_target): Remove the target op.
59 (class process_target): Add the target op.
60 (target_stabilize_threads): Update the macro.
61 * target.cc (process_target::stabilize_threads): Define.
62
63 Update the derived classes and callers below.
64
65 * server.cc (handle_status): Update.
66 * tracepoint.cc (cmd_qtdp): Update.
67 (cmd_qtstart): Update.
68 * linux-low.cc (linux_target_ops): Update.
69 (linux_stabilize_threads): Turn into ...
70 (linux_process_target::stabilize_threads): ... this.
71 (linux_wait_1): Update.
72 * linux-low.h (class linux_process_target): Update.
73 * lynx-low.cc (lynx_target_ops): Update.
74 * nto-low.cc (nto_target_ops): Update.
75 * win32-low.cc (win32_target_ops): Update.
76
77 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
78
79 Turn process_stratum_target's pause_all and unpause_all ops
80 into methods of process_target.
81
82 * target.h (struct process_stratum_target): Remove the target ops.
83 (class process_target): Add the target ops.
84 (pause_all): Update the macro and rename to...
85 (target_pause_all): ... this.
86 (unpause_all): Update the macro and rename to...
87 (target_unpause_all): ... this.
88 * target.cc (process_target::pause_all): Define.
89 (process_target::unpause_all): Define.
90
91 Update the derived classes and callers below.
92
93 * server.cc (handle_status): Update.
94 * tracepoint.cc (clear_installed_tracepoints): Update.
95 (cmd_qtdp): Update.
96 (cmd_qtstart): Update.
97 (stop_tracing): Update.
98 (cmd_qtstatus): Update.
99 (upload_fast_traceframes): Update.
100 (run_inferior_command): Update.
101 * linux-low.cc (linux_target_ops): Update.
102 (linux_pause_all): Turn into ...
103 (linux_process_target::pause_all): ... this.
104 (linux_unpause_all): Turn into ...
105 (linux_process_target::unpause_all): ... this.
106 (linux_process_target::prepare_to_access_memory): Update.
107 (linux_process_target::done_accessing_memory): Update.
108 * linux-low.h (class linux_process_target): Update.
109 * lynx-low.cc (lynx_target_ops): Update.
110 * nto-low.cc (nto_target_ops): Update.
111 * win32-low.cc (win32_target_ops): Update.
112
113 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
114
115 Turn process_stratum_target's get_tib_address op into a method of
116 process_target.
117
118 * target.h (struct process_stratum_target): Remove the target op.
119 (class process_target): Add the target op. Also add
120 'supports_get_tib_address'.
121 * target.cc (process_target::get_tib_address): Define.
122 (process_target::supports_get_tib_address): Define.
123
124 Update the derived classes and callers below.
125
126 * server.cc (handle_query): Update.
127 * linux-low.cc (win32_target_ops): Update.
128 * lynx-low.cc (lynx_target_ops): Update.
129 * nto-low.cc (nto_target_ops): Update.
130 * win32-low.cc (win32_target_ops): Update.
131 (win32_process_target::supports_get_tib_address): Define.
132 (win32_get_tib_address): Turn into ...
133 (win32_process_target::get_tib_address): ... this.
134 * win32-low.h (class win32_process_target): Update.
135
136 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
137
138 Turn process_stratum_target's thread_stopped op into a method of
139 process_target.
140
141 * target.h (struct process_stratum_target): Remove the target op.
142 (class process_target): Add the target op. Also add
143 'supports_thread_stopped'.
144 (target_thread_stopped): Update the macro.
145 * target.cc (process_target::thread_stopped): Define.
146 (process_target::supports_thread_stopped): Define.
147 (prepare_to_access_memory): Update.
148
149 Update the derived classes and callers below.
150
151 * server.cc (queue_stop_reply_callback): Update.
152 * linux-low.cc (linux_target_ops): Update.
153 (linux_process_target::supports_thread_stopped): Define.
154 (linux_thread_stopped): Turn into ...
155 (linux_process_target::thread_stopped): ... this.
156 * linux-low.h (class linux_process_target): Update.
157 * lynx-low.cc (lynx_target_ops): Update.
158 * nto-low.cc (nto_target_ops): Update.
159 * win32-low.cc (win32_target_ops): Update.
160
161 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
162
163 Turn process_stratum_target's read_pc and write_pc ops into
164 methods of process_target.
165
166 * target.h (struct process_stratum_target): Remove the target ops.
167 (class process_target): Add the target ops.
168 * target.cc (process_target::read_pc): Define.
169 (process_target::write_pc): Define.
170
171 Update the derived classes and callers below.
172
173 * regcache.cc (regcache_read_pc): Update.
174 (regcache_write_pc): Update.
175 * linux-low.cc (linux_target_ops): Update.
176 (linux_read_pc): Turn into ...
177 (linux_process_target::read_pc): ... this.
178 (linux_write_pc): Turn into ...
179 (linux_process_target::write_pc): ... 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 supports_tracepoints op into a
188 method 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_supports_tracepoints): Update the macro.
193 * target.cc (process_target::supports_tracepoints): Define.
194
195 Update the derived classes and callers below.
196
197 * linux-low.cc (linux_target_ops): Update.
198 (linux_supports_tracepoints): Turn into ...
199 (linux_process_target::supports_tracepoints): ... 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 process_qsupported op into a method
208 of process_target.
209
210 * target.h (struct process_stratum_target): Remove the target op.
211 (class process_target): Add the target op.
212 (target_process_qsupported): Update the macro.
213 * target.cc (process_target::process_qsupported): Define.
214
215 Update the derived classes and callers below.
216
217 * linux-low.cc (linux_target_ops): Update.
218 (linux_process_qsupported): Turn into ...
219 (linux_process_target::process_qsupported): ... this.
220 * linux-low.h (class linux_process_target): Update.
221 * lynx-low.cc (lynx_target_ops): Update.
222 * nto-low.cc (nto_target_ops): Update.
223 * win32-low.cc (win32_target_ops): Update.
224
225 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
226
227 Turn process_stratum_target's read_loadmap op into a method of
228 process_target.
229
230 * target.h (struct process_stratum_target): Remove the target op.
231 (class process_target): Add the target op. Also add
232 'supports_read_loadmap'.
233 * target.cc (process_target::read_loadmap): Define.
234 (process_target::supports_read_loadmap): Define.
235
236 Update the derived classes and callers below.
237
238 * server.cc (handle_qxfer_fdpic): Update.
239 (handle_query): Update.
240 * linux-low.cc (linux_target_ops): Update.
241 (linux_process_target::supports_read_loadmap): Define.
242 (linux_read_loadmap): Turn into ...
243 (linux_process_target::read_loadmap): ... this.
244 * linux-low.h (class linux_process_target): Update.
245 * lynx-low.cc (lynx_target_ops): Update.
246 * nto-low.cc (nto_target_ops): Update.
247 * win32-low.cc (win32_target_ops): Update.
248
249 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
250
251 Turn process_stratum_target's core_of_thread op into a method of
252 process_target.
253
254 * target.h (struct process_stratum_target): Remove the target op.
255 (class process_target): Add the target op.
256 (target_core_of_thread): Update the macro.
257 * target.cc (process_target::core_of_thread): Define.
258
259 Update the derived classes and callers below.
260
261 * linux-low.cc (linux_target_ops): Update.
262 (linux_process_target::core_of_thread): 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_monitor_command 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_monitor_command): Update the macro.
276 * target.cc (process_target::handle_monitor_command): Define.
277
278 Update the derived classes and callers below.
279
280 * server.cc (handle_query): Update.
281 * linux-low.cc (linux_target_ops): Update.
282 (linux_process_target::handle_monitor_command): Define.
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 handle_new_gdb_connection op into a
291 method of process_target.
292
293 * target.h (struct process_stratum_target): Remove the target op.
294 (class process_target): Add the target op.
295 (target_handle_new_gdb_connection): Update the macro.
296 * target.cc (process_target::handle_new_gdb_connection): Define.
297
298 Update the derived classes and callers below.
299
300 * linux-low.cc (linux_target_ops): Update.
301 (linux_handle_new_gdb_connection): Turn into ...
302 (linux_process_target::handle_new_gdb_connection): ... this.
303 * linux-low.h (class linux_process_target): Update.
304 * lynx-low.cc (lynx_target_ops): Update.
305 * nto-low.cc (nto_target_ops): Update.
306 * win32-low.cc (win32_target_ops): Update.
307
308 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
309
310 Turn process_stratum_target's supports_fork_events,
311 supports_vfork_events, and supports_exec_events ops into methods
312 of process_target.
313
314 * target.h (struct process_stratum_target): Remove the target ops.
315 (class process_target): Add the target ops.
316 (target_supports_fork_events): Update the macro.
317 (target_supports_vfork_events): Update the macro.
318 (target_supports_exec_events): Update the macro.
319 * target.cc (process_target::supports_fork_events): Define.
320 (process_target::supports_vfork_events): Define.
321 (process_target::supports_exec_events): Define.
322
323 Update the derived classes and callers below.
324
325 * linux-low.cc (linux_target_ops): Update.
326 (linux_supports_fork_events): Turn into ...
327 (linux_process_target::supports_fork_events): ... this.
328 (linux_supports_vfork_events): Turn into ...
329 (linux_process_target::supports_vfork_events): ... this.
330 (linux_supports_exec_events): Turn into ...
331 (linux_process_target::supports_exec_events): ... 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_multi_process op into a
340 method of process_target.
341
342 * target.h (struct process_stratum_target): Remove the target op.
343 (class process_target): Add the target op.
344 * target.cc (process_target::supports_multi_process): Define.
345 (target_supports_multi_process): Update.
346
347 Update the derived classes and callers below.
348
349 * linux-low.cc (linux_target_ops): Update.
350 (linux_supports_multi_process): Turn into ...
351 (linux_process_target::supports_multi_process): ... this.
352 * linux-low.h (class linux_process_target): Update.
353 * lynx-low.cc (lynx_target_ops): Update.
354 * nto-low.cc (nto_target_ops): Update.
355 * win32-low.cc (win32_target_ops): Update.
356
357 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
358
359 Turn process_stratum_target's supports_non_stop, async, and
360 start_non_stop ops into methods of process_target.
361
362 * target.h (struct process_stratum_target): Remove the target ops.
363 (class process_target): Add the target ops.
364 (target_supports_non_stop): Update the macro.
365 (target_async): Update the macro.
366 (start_non_stop): Remove declaration.
367 * target.cc (process_target::supports_non_stop): Define.
368 (process_target::async): Define.
369 (process_target::start_non_stop): Define.
370 (start_non_stop): Remove.
371
372 Update the derived classes and callers below.
373
374 * server.cc (handle_qxfer_siginfo): Update.
375 (handle_query): Update.
376 * linux-low.cc (linux_target_ops): Update.
377 (linux_supports_non_stop): Turn into ...
378 (linux_process_target::supports_non_stop): ... this.
379 (linux_async): Turn into ...
380 (linux_process_target::async): ... this.
381 (linux_start_non_stop): Turn into ...
382 (linux_process_target::start_non_stop): ... this.
383 * linux-low.h (class linux_process_target): Update.
384 * lynx-low.cc (lynx_target_ops): Update.
385 * nto-low.cc (nto_target_ops): Update.
386 (nto_supports_non_stop): Remove; rely on the default behavior
387 instead.
388 * win32-low.cc (win32_target_ops): Update.
389
390 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
391
392 Turn process_stratum_target's qxfer_siginfo op into a method of
393 process_target.
394
395 * target.h (struct process_stratum_target): Remove the target op.
396 (class process_target): Add the target op. Also add
397 'supports_qxfer_siginfo'.
398 * target.cc (process_target::qxfer_siginfo): Define.
399 (process_target::supports_qxfer_siginfo): Define.
400
401 Update the derived classes and callers below.
402
403 * server.cc (handle_qxfer_siginfo): Update.
404 (handle_query): Update.
405 * linux-low.cc (linux_target_ops): Update.
406 (linux_process_target::supports_qxfer_siginfo): Define.
407 (linux_xfer_siginfo): Turn into ...
408 (linux_process_target::qxfer_siginfo): ... this.
409 * linux-low.h (class linux_process_target): Update.
410 * lynx-low.cc (lynx_target_ops): Update.
411 * nto-low.cc (nto_target_ops): Update.
412 * win32-low.cc (win32_target_ops): Update.
413
414 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
415
416 Turn process_stratum_target's qxfer_osdata op into a method of
417 process_target.
418
419 * target.h (struct process_stratum_target): Remove the target op.
420 (class process_target): Add the target op. Also add
421 'supports_qxfer_osdata'.
422 * target.cc (process_target::qxfer_osdata): Define.
423 (process_target::supports_qxfer_osdata): Define.
424
425 Update the derived classes and callers below.
426
427 * server.cc (handle_qxfer_osdata): Update.
428 (handle_query): Update.
429 * linux-low.cc (linux_target_ops): Update.
430 (linux_process_target::supports_qxfer_osdata): Define.
431 (linux_qxfer_osdata): Turn into ...
432 (linux_process_target::qxfer_osdata): ... this.
433 * linux-low.h (class linux_process_target): Update.
434 * lynx-low.cc (lynx_target_ops): Update.
435 * nto-low.cc (nto_target_ops): Update.
436 * win32-low.cc (win32_target_ops): Update.
437
438 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
439
440 Turn process_stratum_target's hostio_last_error op into a
441 method of process_target.
442
443 * target.h (struct process_stratum_target): Remove the target op.
444 (class process_target): Add the target op.
445 * target.cc: Add "hostio.h" to includes.
446 (process_target::hostio_last_error): Define.
447
448 Update the derived classes and callers below.
449
450 * hostio.cc (hostio_error): Update.
451 * linux-low.cc: Remove "hostio.h" from includes.
452 (linux_target_ops): Update.
453 * lynx-low.cc (lynx_target_ops): Update.
454 * nto-low.cc (nto_target_ops): Update.
455 * win32-low.h (class win32_process_target): Update.
456 * win32-low.cc (win32_target_ops): Update.
457 (wince_hostio_last_error): Turn into ...
458 (win32_process_target::hostio_last_error): ... this.
459
460 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
461
462 Turn process_stratum_target's get_tls_address op into a method of
463 process_target.
464
465 * target.h (struct process_stratum_target): Remove the target op.
466 (class process_target): Add the target op. Also add
467 'supports_get_tls_address'.
468 * target.cc (process_target::get_tls_address): Define.
469 (process_target::supports_get_tls_address): Define.
470
471 Update the derived classes and callers below.
472
473 * server.cc (handle_query): Update.
474 * linux-low.cc (linux_target_ops): Update.
475 (linux_process_target::supports_get_tls_address): Define.
476 (linux_process_target::get_tls_address): Define.
477 * linux-low.h (class linux_process_target): Update.
478 * lynx-low.cc (lynx_target_ops): Update.
479 * nto-low.cc (nto_target_ops): Update.
480 * win32-low.cc (win32_target_ops): Update.
481
482 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
483
484 Turn process_stratum_target's read_offsets op into a method of
485 process_target.
486
487 * target.h (struct process_stratum_target): Remove the target op.
488 (class process_target): Add the target op. Also add
489 'supports_read_offsets'.
490 * target.cc (process_target::read_offsets): Define.
491 (process_target::supports_read_offsets): Define.
492
493 Update the derived classes and callers below.
494
495 * server.cc (handle_query): Update.
496 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
497 (linux_target_ops): Update.
498 (linux_process_target::supports_read_offsets): Define.
499 (linux_read_offsets): Turn into ...
500 (linux_process_target::read_offsets): ... this.
501 * linux-low.h (class linux_process_target): Update.
502 * lynx-low.cc (lynx_target_ops): Update.
503 * nto-low.cc (nto_target_ops): Update.
504 * win32-low.cc (win32_target_ops): Update.
505
506 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
507
508 Turn process_stratum_target's stopped_by_watchpoint and
509 stopped_data_address ops into methods of process_target.
510
511 * target.h (struct process_stratum_target): Remove the target ops.
512 (class process_target): Add the target ops.
513 * target.cc (process_target::stopped_by_watchpoint): Define.
514 (process_target::stopped_data_address): Define.
515
516 Update the derived classes and callers below.
517
518 * remote-utils.cc (prepare_resume_reply): Update.
519 * linux-low.cc (linux_target_ops): Update.
520 (linux_stopped_by_watchpoint): Turn into ...
521 (linux_process_target::stopped_by_watchpoint): ... this.
522 (linux_stopped_data_address): Turn into ...
523 (linux_process_target::stopped_data_address): ... this.
524 * linux-low.h (class linux_process_target): Update.
525 * lynx-low.cc (lynx_target_ops): Update.
526 * nto-low.cc (nto_target_ops): Update.
527 (nto_stopped_by_watchpoint): Turn into ...
528 (nto_process_target::stopped_by_watchpoint): ... this.
529 (nto_stopped_data_address): Turn into ...
530 (nto_process_target::stopped_data_address): ... this.
531 * nto-low.h (class nto_process_target): Update.
532 * win32-low.cc (win32_target_ops): Update.
533 (win32_stopped_by_watchpoint): Turn into ...
534 (win32_process_target::stopped_by_watchpoint): ... this.
535 (win32_stopped_data_address): Turn into ...
536 (win32_process_target::stopped_data_address): ... this.
537 * win32-low.h (class win32_process_target): Update.
538
539 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
540
541 Turn process_stratum_target's supports_hardware_single_step op into
542 a method of process_target.
543
544 * target.h (struct process_stratum_target): Remove the target op.
545 (class process_target): Add the target op.
546 (target_supports_hardware_single_step): Update the macro.
547 (target_can_do_hardware_single_step): Remove declaration.
548 * target.cc (process_target::supports_hardware_single_step): Define.
549 (target_can_do_hardware_single_step): Remove.
550
551 Update the derived classes and callers below.
552
553 * linux-low.h (class linux_process_target): Update.
554 * linux-low.cc (linux_target_ops): Update.
555 (linux_supports_hardware_single_step): Turn into ...
556 (linux_process_target::supports_hardware_single_step): ... this.
557 * lynx-low.h (class lynx_process_target): Update.
558 * lynx-low.cc (lynx_target_ops): Update.
559 (lynx_process_target::supports_hardware_single_step): Define.
560 * nto-low.h (class nto_process_target): Update.
561 * nto-low.cc (nto_target_ops): Update.
562 (nto_process_target::supports_hardware_single_step): Define.
563 * win32-low.h (class win32_process_target): Update.
564 * win32-low.cc (win32_target_ops): Update.
565 (win32_process_target::supports_hardware_single_step): Define.
566
567 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
568
569 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
570 ops into methods of process_target.
571
572 * target.h (struct process_stratum_target): Remove the target ops.
573 (class process_target): Add the target ops.
574 (target_stopped_by_hw_breakpoint): Update the macro.
575 (target_supports_stopped_by_hw_breakpoint): Update the macro.
576 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
577 (process_target::supports_stopped_by_hw_breakpoint): Define.
578
579 Update the derived classes and callers below.
580
581 * linux-low.cc (linux_target_ops): Update.
582 (linux_stopped_by_hw_breakpoint): Turn into ...
583 (linux_process_target::stopped_by_hw_breakpoint): ... this.
584 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
585 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
586 * linux-low.h (class linux_process_target): Update.
587 * lynx-low.cc (lynx_target_ops): Update.
588 * nto-low.cc (nto_target_ops): Update.
589 * win32-low.cc (win32_target_ops): Update.
590
591 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
592
593 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
594 ops into methods of process_target.
595
596 * target.h (struct process_stratum_target): Remove the target ops.
597 (class process_target): Add the target ops.
598 (target_stopped_by_sw_breakpoint): Update the macro.
599 (target_supports_stopped_by_sw_breakpoint): Update the macro.
600 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
601 (process_target::supports_stopped_by_sw_breakpoint): Define.
602
603 Update the derived classes and callers below.
604
605 * linux-low.cc (linux_target_ops): Update.
606 (linux_stopped_by_sw_breakpoint): Turn into ...
607 (linux_process_target::stopped_by_sw_breakpoint): ... this.
608 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
609 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
610 * linux-low.h (class linux_process_target): Update.
611 * lynx-low.cc (lynx_target_ops): Update.
612 * nto-low.cc (nto_target_ops): Update.
613 * win32-low.cc (win32_target_ops): Update.
614
615 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
616
617 Turn process_stratum_target's insert_point and remove_point ops
618 into methods of process_target.
619
620 * target.h (struct process_stratum_target): Remove the target ops.
621 (class process_target): Add the target ops.
622 * target.cc (process_target::insert_point): Define.
623 (process_target::remove_point): Define.
624
625 Update the derived classes and callers below.
626
627 * mem-break.cc (set_raw_breakpoint_at): Update.
628 (delete_raw_breakpoint): Update.
629 (uninsert_raw_breakpoint): Update.
630 (reinsert_raw_breakpoint): Update.
631 * linux-low.cc (linux_target_ops): Update.
632 (linux_insert_point): Turn into ...
633 (linux_process_target::insert_point): ... this.
634 (linux_remove_point): Turn into ...
635 (linux_process_target::remove_point): ... this.
636 * linux-low.h (class linux_process_target): Update.
637 * lynx-low.cc (lynx_target_ops): Update.
638 * nto-low.cc (nto_target_ops): Update.
639 (nto_insert_point): Turn into ...
640 (nto_process_target::insert_point): ... this.
641 (nto_remove_point): Turn into ...
642 (nto_process_target::remove_point): ... this.
643 * nto-low.h (class nto_process_target): Update.
644 * win32-low.cc (win32_target_ops): Update.
645 (win32_insert_point): Turn into ...
646 (win32_process_target::insert_point): ... this.
647 (win32_remove_point): Turn into ...
648 (win32_process_target::remove_point): ... this.
649 * win32-low.h (class win32_process_target): Update.
650
651 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
652
653 Turn process_stratum_target's supports_z_point_type op into a
654 method of process_target.
655
656 * target.h (struct process_stratum_target): Remove the target op.
657 (class process_target): Add the target op.
658 * target.cc (process_target::supports_z_point_type): Define.
659
660 Update the derived classes and callers below.
661
662 * mem-break.cc (z_type_supported): Update.
663 * linux-low.cc (linux_target_ops): Update.
664 (linux_supports_z_point_type): Turn into ...
665 (linux_process_target::supports_z_point_type): ... this.
666 * linux-low.h (class linux_process_target): Update.
667 * lynx-low.cc (lynx_target_ops): Update.
668 * nto-low.cc (nto_target_ops): Update.
669 (nto_supports_z_point_type): Turn into ...
670 (nto_process_target::supports_z_point_type): ... this.
671 * nto-low.h (class nto_process_target): Update.
672 * win32-low.cc (win32_target_ops): Update.
673 (win32_supports_z_point_type): Turn into ...
674 (win32_process_target::supports_z_point_type): ... this.
675 * win32-low.h (class win32_process_target): Update.
676
677 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
678
679 Turn process_stratum_target's read_auxv op into a method of
680 process_target.
681
682 * target.h (class process_stratum_target): Remove the target op.
683 (struct process_target): Add the target op. Also add
684 'supports_read_auxv'.
685 * target.cc (process_target::read_auxv): Define.
686 (process_target::supports_read_auxv): Define.
687
688 Update the derived classes and callers below.
689
690 * server.cc (handle_qxfer_auxv): Update.
691 (handle_query): Update.
692 * linux-low.cc (linux_target_ops): Update.
693 (linux_process_target::supports_read_auxv): Define.
694 (linux_read_auxv): Turn into ...
695 (linux_process_target::read_auxv): ... this.
696 * linux-low.h (class linux_process_target): Update.
697 * lynx-low.cc (lynx_target_ops): Update.
698 * nto-low.cc (nto_target_ops): Update.
699 (nto_process_target::supports_read_auxv): Define.
700 (nto_read_auxv): Turn into ...
701 (nto_process_target::read_auxv): ... this.
702 * nto-low.h (class nto_process_target): Update.
703 * win32-low.cc (win32_target_ops): Update.
704
705 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
706
707 Turn process_stratum_target's request_interrupt op into a method of
708 process_target.
709
710 * target.h (struct process_stratum_target): Remove the target op.
711 (class process_target): Add the target op.
712
713 Update the derived classes and callers below.
714
715 * remote-utils.cc (putpkt_binary_1): Update.
716 (input_interrupt): Update.
717 (getpkt): Update.
718 * server.cc (handle_v_requests): Update.
719 * linux-low.cc (linux_target_ops): Update.
720 (linux_request_interrupt): Turn into ...
721 (linux_process_target::request_interrupt): ... this.
722 * linux-low.h (class linux_process_target): Update.
723 * lynx-low.cc (lynx_target_ops): Update.
724 (lynx_request_interrupt): Turn into ...
725 (lynx_process_target::request_interrupt): ... this.
726 * lynx-low.h (class lynx_process_target): Update.
727 * nto-low.cc (nto_target_ops): Update.
728 (nto_request_interrupt): Turn into ...
729 (nto_process_target::request_interrupt): ... this.
730 * nto-low.h (class nto_process_target): Update.
731 * win32-low.cc (win32_target_ops): Update.
732 (win32_request_interrupt): Turn into ...
733 (win32_process_target::request_interrupt): ... this.
734 * win32-low.h (class win32_process_target): Update.
735
736 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
737
738 Turn process_stratum_target's look_up_symbols op into a method of
739 process_target.
740
741 * target.h (struct process_stratum_target): Remove the target op.
742 (class process_target): Add the target op.
743 * target.cc (process_target::look_up_symbols): Define.
744
745 Update the derived classes and callers below.
746
747 * server.cc (handle_query): Update.
748 * linux-low.cc (linux_target_ops): Update.
749 (linux_look_up_symbols): Turn into ...
750 (linux_process_target::look_up_symbols): ... this.
751 * linux-low.h (class linux_process_target): Update.
752 * lynx-low.cc (lynx_target_ops): Update.
753 * nto-low.cc (nto_target_ops): Update.
754 * win32-low.cc (win32_target_ops): Update.
755
756 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
757
758 Turn process_stratum_target's read_memory and write_memory
759 ops into methods of process_target.
760
761 * target.h (struct process_stratum_target): Remove the target ops.
762 (class process_target): Add the target ops.
763
764 Update the derived classes and callers below.
765
766 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
767 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
768 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
769 (arm_get_syscall_trapinfo): Update.
770 * linux-cris-low.cc (cris_breakpoint_at): Update.
771 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
772 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
773 * linux-mips-low.cc (mips_breakpoint_at): Update.
774 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
775 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
776 * linux-sh-low.cc (sh_breakpoint_at): Update.
777 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
778 (sparc_store_gregset_from_stack): Update.
779 (sparc_breakpoint_at): Update.
780 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
781 * linux-tile-low.cc (tile_breakpoint_at): Update.
782 * linux-x86-low.cc (x86_breakpoint_at): Update.
783 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
784 * mem-brea.cc (insert_memory_breakpoint): Update.
785 (validate_inserted_breakpoint): Update.
786 * target.cc (read_inferior_memory): Update.
787 (target_write_memory): Update.
788 * linux-low.cc (linux_target_ops): Update.
789 (linux_read_memory): Make a wrapper around the read_memory target
790 op call.
791 (linux_process_target::read_memory): Rename from linux_read_memory.
792 (linux_write_memory): Turn into ...
793 (linux_process_target::write_memory): ... this.
794 * linux-low.h (class linux_process_target): Update.
795 * lynx-low.cc (lynx_target_ops): Update.
796 (lynx_read_memory): Turn into ...
797 (lynx_process_target::read_memory): ... this.
798 (lynx_write_memory): Turn into ...
799 (lynx_process_target::write_memory): ... this.
800 * lynx-low.h (class lynx_process_target): Update.
801 * nto-low.cc (nto_target_ops): Update.
802 (nto_read_memory): Turn into ...
803 (nto_process_target::read_memory): ... this.
804 (nto_write_memory): Turn into ...
805 (nto_process_target::write_memory): ... this.
806 * nto-low.h (class nto_process_target): Update.
807 * win32-low.cc (win32_target_ops): Update.
808 (win32_read_inferior_memory): Turn into ...
809 (win32_process_target::read_memory): ... this.
810 (win32_write_inferior_memory): Turn into ...
811 (win32_process_target::write_memory): ... this.
812 * win32-low.h (class win32_process_target): Update.
813
814 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
815
816 Turn process_stratum_target's prepare_to_access_memory and
817 done_accessing_memory ops into methods of process_target.
818
819 * target.h (struct process_stratum_target): Remove the target ops.
820 (class process_target): Add the target ops.
821 * target.cc (process_target::prepare_to_access_memory): Define.
822 (process_target::done_accessing_memory): Define.
823 (prepare_to_access_memory): Update.
824 (done_accessing_memory): Update.
825
826 Update the derived classes and callers below.
827
828 * linux-low.cc (linux_target_ops): Update.
829 (linux_prepare_to_access_memory): Turn into ...
830 (linux_process_target::prepare_to_access_memory): ... this.
831 (linux_done_accessing_memory): Turn into ...
832 (linux_process_target::done_accessing_memory): ... this.
833 * linux-low.h (class linux_process_target): Update.
834 * lynx-low.cc (lynx_target_ops): Update.
835 * nto-low.cc (nto_target_ops): Update.
836 * win32-low.cc (win32_target_ops): Update.
837
838 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
839
840 Turn process_stratum_target's fetch_registers and store_registers
841 ops into methods of process_target.
842
843 * target.h (struct process_stratum_target): Remove the target ops.
844 (class process_target): Add the target ops.
845 (fetch_inferior_registers): Update the macro.
846 (store_inferior_registers): Update the macro.
847
848 Update the derived classes and callers below.
849
850 * linux-low.cc (linux_target_ops): Update.
851 (linux_fetch_registers): Turn into ...
852 (linux_process_target::fetch_registers): ... this.
853 (linux_store_registers): Turn into ...
854 (linux_process_target::store_registers): ... this.
855 * linux-low.h (class linux_process_target): Update.
856 * lynx-low.cc (lynx_target_ops): Update.
857 (lynx_fetch_registers): Turn into ...
858 (lynx_process_target::fetch_registers): ... this.
859 (lynx_store_registers): Turn into ...
860 (lynx_process_target::store_registers): ... this.
861 * lynx-low.h (class lynx_process_target): Update.
862 * nto-low.cc (nto_target_ops): Update.
863 (nto_fetch_registers): Turn into ...
864 (nto_process_target::fetch_registers): ... this.
865 (nto_store_registers): Turn into ...
866 (nto_process_target::store_registers): ... this.
867 * nto-low.h (class nto_process_target): Update.
868 * win32-low.cc (win32_target_ops): Update.
869 (win32_fetch_inferior_registers): Turn into ...
870 (win32_process_target::fetch_registers): ... this.
871 (win32_store_inferior_registers): Turn into ...
872 (win32_process_target::store_registers): ... this.
873 * win32-low.h (class win32_process_target): Update.
874
875 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
876
877 Turn process_stratum_target's wait op into a method of
878 process_target.
879
880 * target.h (struct process_stratum_target): Remove the target op.
881 (class process_target): Add the target op.
882
883 Update the derived classes and callers below.
884
885 * target.cc (target_wait): Update.
886 * linux-low.cc (linux_target_ops): Update.
887 (linux_wait): Turn into ...
888 (linux_process_target::wait): ... this.
889 * linux-low.h (class linux_process_target): Update.
890 * lynx-low.cc (lynx_target_ops): Update.
891 (lynx_wait): Turn into ...
892 (lynx_process_target::wait): ... this.
893 * lynx-low.h (class lynx_process_target): Update.
894 * nto-low.cc (nto_target_ops): Update.
895 (nto_wait): Turn into ...
896 (nto_process_target::wait): ... this.
897 * nto-low.h (class nto_process_target): Update.
898 * win32-low.cc (win32_target_ops): Update.
899 (win32_wait): Turn into ...
900 (win32_process_target::wait): ... this.
901 (do_initial_child_stuff): Update.
902 * win32-low.h (class win32_process_target): Update.
903
904 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
905
906 Turn process_stratum_target's resume op into a method of
907 process_target.
908
909 * target.h (struct process_stratum_target): Remove the target op.
910 (class process_target): Add the target op.
911
912 Update the derived classes and callers below.
913
914 * server.cc (resume): Update.
915 * target.cc (target_stop_and_wait): Update.
916 (target_continue_no_signal): Update.
917 (target_continue): Update.
918 * linux-low.cc (linux_target_ops): Update.
919 (linux_resume): Turn into ...
920 (linux_process_target::resume): ... this.
921 * linux-low.h (class linux_process_target): Update.
922 * lynx-low.cc (lynx_target_ops): Update.
923 (lynx_resume): Turn into ...
924 (lynx_process_target::resume): ... this.
925 * lynx-low.h (class lynx_process_target): Update.
926 * nto-low.cc (nto_target_ops): Update.
927 (nto_resume): Turn into ...
928 (nto_process_target::resume): ... this.
929 * nto-low.h (class nto_process_target): Update.
930 * win32-low.cc (win32_target_ops): Update.
931 (win32_resume): Turn into ...
932 (win32_process_target::resume): ... this.
933 (win32_process_target::detach): Update.
934 (do_initial_child_stuff): Update.
935 * win32-low.h (class win32_process_target): Update.
936
937 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
938
939 Turn process_stratum_target's thread_alive op into a method of
940 process_target.
941
942 * target.h (struct process_stratum_target): Remove the target op.
943 (class process_target): Add the target op.
944 (mythread_alive): Update the macro.
945
946 Update the derived classes and callers below.
947
948 * linux-low.cc (linux_target_ops): Update.
949 (linux_thread_alive): Turn into ...
950 (linux_process_target::thread_alive): ... this.
951 (wait_for_sigstop): Update.
952 * linux-low.h (class linux_process_target): Update.
953 * lynx-low.cc (lynx_target_ops): Update.
954 (lynx_thread_alive): Turn into ...
955 (lynx_process_target::thread_alive): ... this.
956 * lynx-low.h (class lynx_process_target): Update.
957 * nto-low.cc (nto_target_ops): Update.
958 (nto_thread_alive): Turn into ...
959 (nto_process_target::thread_alive): ... this.
960 * nto-low.h (class nto_process_target): Update.
961 * win32-low.cc (win32_target_ops): Update.
962 (win32_thread_alive): Turn into ...
963 (win32_process_target::thread_alive): ... this.
964 * win32-low.h (class win32_process_target): Update.
965
966 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
967
968 Turn process_stratum_target's join op into a method of
969 process_target.
970
971 * target.h (struct process_stratum_target): Remove the target op.
972 (class process_target): Add the target op.
973 (join_inferior): Update the macro.
974
975 Update the derived classes and callers below.
976
977 * linux-low.cc (linux_target_ops): Update.
978 (linux_join): Turn into ...
979 (linux_process_target::join): ... this.
980 * linux-low.h (class linux_process_target): Update.
981 * lynx-low.cc (lynx_target_ops): Update.
982 (lynx_join): Turn into ...
983 (lynx_process_target::join): ... this.
984 * lynx-low.h (class lynx_process_target): Update.
985 * nto-low.cc (nto_target_ops): Update.
986 (nto_process_target::join): Define.
987 * nto-low.h (class nto_process_target): Update.
988 * win32-low.cc (win32_target_ops): Update.
989 (win32_join): Turn into ...
990 (win32_process_target::join): ... this.
991 * win32-low.h (class win32_process_target): Update.
992
993 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
994
995 Turn process_stratum_target's mourn op into a method of
996 process_target.
997
998 * target.h (struct process_stratum_target): Remove the target op.
999 (class process_target): Add the target op.
1000
1001 Update the derived classes and callers below.
1002
1003 * target.cc (target_mourn_inferior): Update.
1004 * linux-low.cc (linux_target_ops): Update.
1005 (linux_mourn): Turn into ...
1006 (linux_process_target::mourn): ... this.
1007 (handle_extended_wait): Update.
1008 (linux_process_target::kill): Update.
1009 (linux_process_target::detach): Update.
1010 * linux-low.h (class linux_process_target): Update.
1011 * lynx-low.cc (lynx_target_ops): Update.
1012 (lynx_mourn): Turn into ...
1013 (lynx_process_target::mourn): ... this.
1014 * lynx-low.h (class lynx_process_target): Update.
1015 * nto-low.cc (nto_target_ops): Update.
1016 (nto_mourn): Turn into ...
1017 (nto_process_target::mourn): ... this.
1018 * nto-low.h (class nto_process_target): Update.
1019 * win32-low.cc (win32_target_ops): Update.
1020 (win32_mourn): Turn into ...
1021 (win32_process_target::mourn): ... this.
1022 * win32-low.h (class win32_process_target): Update.
1023
1024 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1025
1026 Turn process_stratum_target's detach op into a method of
1027 process_target.
1028
1029 * target.h (struct process_stratum_target): Remove the target op.
1030 (class process_target): Add the target op.
1031 (detach_inferior): Update the macro.
1032
1033 Update the derived classes and callers below.
1034
1035 * linux-low.cc (linux_target_ops): Update.
1036 (linux_detach): Turn into ...
1037 (linux_process_target::detach): ... this.
1038 * linux-low.h (class linux_process_target): Update.
1039 * lynx-low.cc (lynx_target_ops): Update.
1040 (lynx_detach): Turn into ...
1041 (lynx_process_target::detach): ... this.
1042 * lynx-low.h (class lynx_process_target): Update.
1043 * nto-low.cc (nto_target_ops): Update.
1044 (nto_detach): Turn into ...
1045 (nto_process_target::detach): ... this.
1046 * nto-low.h (class nto_process_target): Update.
1047 * win32-low.cc (win32_target_ops): Update.
1048 (win32_detach): Turn into ...
1049 (win32_process_target::detach): ... this.
1050 * win32-low.h (class win32_process_target): Update.
1051
1052 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1053
1054 Turn process_stratum_target's kill op into a method of
1055 process_target.
1056
1057 * target.h (struct process_stratum_target): Remove the target op.
1058 (class process_target): Add the target op.
1059
1060 Update the derived classes and callers below.
1061
1062 * target.cc (kill_inferior): Update.
1063 * linux-low.cc (linux_target_ops): Update.
1064 (linux_kill): Turn into ...
1065 (linux_process_target::kill): ... this.
1066 * linux-low.h (class linux_process_target): Update.
1067 * lynx-low.cc (lynx_target_ops): Update.
1068 (lynx_kill): Turn into ...
1069 (lynx_process_target::kill): ... this.
1070 * lynx-low.h (class lynx_process_target): Update.
1071 * nto-low.cc (nto_target_ops): Update.
1072 (nto_kill): Turn into ...
1073 (nto_process_target::kill): ... this.
1074 * nto-low.h (class nto_process_target): Update.
1075 * win32-low.cc (win32_target_ops): Update.
1076 (win32_kill): Turn into ...
1077 (win32_process_target::kill): ... this.
1078 * win32-low.h (class win32_process_target): Update.
1079
1080 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1081
1082 Turn process_stratum_target's attach op into a method of
1083 process_target.
1084
1085 * target.h (struct process_stratum_target): Remove the target op.
1086 (class process_target): Add the target op.
1087 (myattach): Update the macro.
1088
1089 Update the derived classes and callers below.
1090
1091 * linux-low.cc (linux_target_ops): Update.
1092 (linux_attach): Turn into ...
1093 (linux_process_target::attach): ... this.
1094 * linux-low.h (class linux_process_target): Update.
1095 * lynx-low.cc (lynx_target_ops): Update.
1096 (lynx_attach): Turn into ...
1097 (lynx_process_target::attach): ... this.
1098 * lynx-low.h (class lynx_process_target): Update.
1099 * nto-low.cc (nto_target_ops): Update.
1100 (nto_attach): Turn into ...
1101 (nto_process_target::attach): ... this.
1102 * nto-low.h (class nto_process_target): Update.
1103 * win32-low.cc (win32_target_ops): Update.
1104 (win32_attach): Turn into ...
1105 (win32_process_target::attach): ... this.
1106 * win32-low.h (class win32_process_target): Update.
1107
1108 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1109
1110 Turn process_stratum_target's post_create_inferior op into a method
1111 of process_target.
1112
1113 * target.h (struct process_stratum_target): Remove the target op.
1114 (class process_target): Add the target op.
1115 (target_post_create_inferior): Update the macro.
1116 * target.cc (process_target::post_create_inferior): Define.
1117
1118 Update the derived classes and callers below.
1119
1120 * linux-low.cc (linux_target_ops): Update.
1121 (linux_post_create_inferior): Turn into ...
1122 (linux_process_target::post_create_inferior): ... this.
1123 * linux-low.h (class linux_process_target): Update.
1124 * lynx-low.cc (lynx_target_ops): Update.
1125 * nto-low.cc (nto_target_ops): Update.
1126 * win32-low.cc (win32_target_ops): Update.
1127
1128 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1129
1130 Turn process_stratum_target's create_inferior op into a method of
1131 process_target.
1132
1133 * target.h (struct process_stratum_target): Remove the target op.
1134 (class process_target): Add the target op.
1135 (create_inferior): Rename the macro to ...
1136 (target_create_inferior): ... this.
1137
1138 Update the derived classes and callers below.
1139
1140 * server.cc (handle_v_run): Update.
1141 (captured_main): Update.
1142 (process_serial_event): Update.
1143 * linux-low.cc (linux_target_ops): Update.
1144 (linux_create_inferior): Turn into ...
1145 (linux_process_target::create_inferior): ... this.
1146 * linux-low.h (class linux_process_target): Update.
1147 * lynx-low.cc (lynx_target_ops): Update.
1148 (lynx_create_inferior): Turn into ...
1149 (lynx_process_target::create_inferior): ... this.
1150 * lynx-low.h (class lynx_process_target): Update.
1151 * nto-low.cc (nto_target_ops): Update.
1152 (nto_create_inferior): Turn into ...
1153 (nto_process_target::create_inferior): ... this.
1154 * nto-low.h (class nto_process_target): Update.
1155 * win32-low.cc (win32_target_ops): Update.
1156 (win32_create_inferior): Turn into ...
1157 (win32_process_target::create_inferior): ... this.
1158 * win32-low.h (class win32_process_target): Update.
1159
1160 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1161
1162 * target.h (class process_target): New class definition.
1163 (struct process_stratum_target) <pt>: New field with type
1164 'process_target*'.
1165 * linux-low.h (class linux_process_target): Define as a derived
1166 class of 'process_target'.
1167 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1168 as the 'pt' field.
1169 * lynx-low.h (class lynx_process_target): Define as a derived
1170 class of 'process_target'.
1171 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1172 as the 'pt' field.
1173 * nto-low.h (class nto_process_target): Define as a derived
1174 class of 'process_target'.
1175 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1176 as the 'pt' field.
1177 * win32-low.h (class win32_process_target): Define as a derived
1178 class of 'process_target'.
1179 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1180 as the 'pt' field.
1181
1182 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1183
1184 * configure: Regenerate.
1185
1186 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1187 Andrew Burgess <andrew.burgess@embecosm.com>
1188
1189 * linux-riscv-low.cc: New file.
1190 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1191 and nat/riscv-linux-tdesc.c.
1192 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1193 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1194 Define.
1195
1196 2020-02-14 Tom Tromey <tom@tromey.com>
1197
1198 * acinclude.m4: Don't include acx_configure_dir.m4.
1199 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1200 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1201 (all, install-only, uninstall, clean-info, clean)
1202 (maintainer-clean): Don't recurse.
1203 (subdir_do, all-lib): Remove.
1204 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1205 (GNULIB_H): Remove.
1206 (generated_files): Update.
1207 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1208 * configure: Rebuild.
1209 * configure.ac: Don't configure gnulib or libiberty.
1210 (GNULIB): Update.
1211
1212 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1213
1214 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1215 preparing the command line for CreateProcess.
1216 (win32_create_inferior): Reflect the program name in debugging
1217 output that shows the process and its command line.
1218
1219 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1220
1221 * Makefile.in: Rename source files from .c to .cc.
1222 * %.c: Rename to %.cc.
1223 * configure.ac: Rename server.c to server.cc.
1224 * configure: Re-generate.
1225
1226 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1227
1228 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1229
1230 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1231
1232 * win32-low.c (win32_create_inferior): Set signal_pid.
1233
1234 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1235 Pedro Alves <palves@redhat.com>
1236
1237 Skip building gdbserver in a cross-configuration.
1238 * configure.srv: Set $gdbserver_host depending on whether $target
1239 is $host. Use $gdbserver_host instead of $host.
1240
1241 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1242
1243 * configure: Re-generate.
1244
1245 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1246
1247 * configure: Re-generate.
1248
1249 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1250
1251 * acinclude.m4: Update warning.m4 path.
1252
1253 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1254
1255 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1256 (handle_exception): Set siginfo_er.
1257 (win32_xfer_siginfo): New function.
1258
1259 2020-02-07 Tom Tromey <tom@tromey.com>
1260 Pedro Alves <palves@redhat.com>
1261
1262 * README: Update build documentation.
1263 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1264 host, not target.
1265 * configure.ac: Update paths.
1266 * configure: Rebuild.
1267 * acinclude.m4: Update paths.
1268 * Makefile.in: Update include paths.
1269 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1270 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1271 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1272 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1273 (%-generated.c): Update paths.
1274 * Move entire directory from ../gdb/gdbserver.
1275
1276 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1277
1278 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1279
1280 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1281
1282 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1283 assignment instead of srv_linux_obj.
1284
1285 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1286
1287 * server.c (handle_qxfer_libraries): Write segment-address with
1288 paddress.
1289
1290 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1291
1292 * Makefile.in (install-strip): New target.
1293 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1294 * aclocal.m4: Regenerate.
1295 * configure: Regenerate.
1296 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1297
1298 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1299
1300 * Makefile.in (SFILES): Adjust paths to point to real files.
1301 (OBS): Move waitstatus.o to target/waitstatus.o.
1302 (TAGS): Transform paths appropriately.
1303 (%.o): Rename to...
1304 (nat/%.o): ... this pattern rule.
1305 (%.o): Rename to...
1306 (target/%.o): ... this pattern rule.
1307 * configure.srv: Adjust paths throughout to include nat/ prefix
1308 with the revant files.
1309 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1310 * configure: Regenerate.
1311
1312 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1313
1314 * Makefile.in (TAGS): Remove config files from the recipe.
1315
1316 2020-01-14 Tom Tromey <tom@tromey.com>
1317
1318 * configure: Rebuild.
1319 * configure.ac: Remove any checks that were added to common.m4.
1320 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1321 lib-link.m4.
1322
1323 2020-01-14 Tom Tromey <tom@tromey.com>
1324
1325 * server.h: Include config.h.
1326 * gdbreplay.c: Include config.h.
1327 * configure: Rebuild.
1328 * configure.ac: Don't source common.host.
1329 * acinclude.m4: Update path.
1330 * Makefile.in (INCSUPPORT): New variable.
1331 (INCLUDE_CFLAGS): Add INCSUPPORT.
1332 (SFILES): Update paths.
1333 (version-generated.c): Update path to create-version.sh.
1334 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1335
1336 2020-01-14 Tom Tromey <tom@tromey.com>
1337
1338 * configure.ac (LIBS): Use WIN32APILIBS.
1339 (USE_WIN32API): Don't define.
1340 * configure: Rebuild.
1341
1342 2020-01-14 Tom Tromey <tom@tromey.com>
1343
1344 * configure: Rebuild.
1345
1346 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1347
1348 * Makefile.in (%-generated.c): Remove rule for files from
1349 regformats/i386.
1350
1351 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1352
1353 * configure: Re-generate.
1354
1355 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1356
1357 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1358 Define to static.
1359 * tracepoint.c (stop_tracing, flush_trace_buffer,
1360 about_to_request_buffer_space, get_trace_state_variable_value,
1361 set_trace_state_variable_value, gdb_collect): Add declaration.
1362
1363 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1364
1365 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1366 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1367 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1368 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1369 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1370 static.
1371
1372 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1373
1374 * inferiors.c: Include gdbsupport/common-inferior.h.
1375
1376 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1377
1378 * hostio-errno.c: Include hostio.h.
1379
1380 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1381
1382 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1383 prerequisite.
1384
1385 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1386
1387 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1388 * linux-arm-tdesc.h: Include arch/arm.h.
1389
1390 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1391
1392 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1393
1394 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1395
1396 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1397 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1398
1399 2020-01-10 Pedro Alves <palves@redhat.com>
1400
1401 * fork-child.c (post_fork_inferior): Pass target down to
1402 startup_inferior.
1403 * inferiors.c (switch_to_thread): Add process_stratum_target
1404 parameter.
1405 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1406 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1407 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1408 * remote-utils.c (prepare_resume_reply): Pass the target to
1409 switch_to_thread.
1410 * target.c (the_target): Now a process_stratum_target.
1411 (done_accessing_memory): Pass the target to switch_to_thread.
1412 (set_target_ops): Ajust to use process_stratum_target.
1413 * target.h (struct target_ops): Rename to ...
1414 (struct process_stratum_target): ... this.
1415 (the_target, set_target_ops): Adjust.
1416 (prepare_to_access_memory): Adjust comment.
1417 * win32-low.c (child_xfer_memory): Adjust to use
1418 process_stratum_target.
1419 (win32_target_ops): Now a process_stratum_target.
1420
1421 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1422 Pedro Alves <palves@redhat.com>
1423
1424 * win32-low.c (get_child_debug_event): Extract the fatal exception
1425 from the exit status and convert to the equivalent Posix signal
1426 number.
1427 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1428 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1429
1430 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1431
1432 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1433
1434 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1435
1436 * server.c (gdbserver_version): Change copyright year to 2020.
1437 * gdbreplay.c (gdbreplay_version): Likewise.
1438
1439 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1440
1441 * configure: Regenerate.
1442 * configure.ac: Quote variable arguments of test.
1443
1444 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1445
1446 * Makefile.in: Fix build with GNU Make 3.81
1447
1448 2019-12-16 Tom Tromey <tromey@adacore.com>
1449
1450 * server.c (get_exec_file): Constify result.
1451
1452 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1453
1454 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1455 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1456 * config.in: Regenerate.
1457 * configure: Regenerate.
1458 * configure.ac: Don't check for strerror.
1459 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1460 Call safe_strerror instead of strerror.
1461 * server.h (strerror): Remove this now-unnecessary declaration.
1462 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1463 strerror.
1464 (gdb_agent_helper_thread): Likewise.
1465 * utils.c (perror_with_name): Likewise.
1466
1467 2019-11-26 Tom Tromey <tom@tromey.com>
1468
1469 * configure, config.in: Rebuild.
1470
1471 2019-11-26 Tom Tromey <tom@tromey.com>
1472
1473 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1474 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1475 gdb_sigmask.
1476 * configure, config.in: Rebuild.
1477
1478 2019-11-26 Tom Tromey <tom@tromey.com>
1479
1480 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1481 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1482 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1483 * acinclude.m4: Include ax_pthread.m4.
1484 * config.in, configure: Rebuild.
1485
1486 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1487
1488 * debug.c (debug_set_output): Call safe_strerror instead of
1489 strerror.
1490 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1491 (linux_kill_one_lwp): Likewise.
1492 (linux_detach_one_lwp): Likewise.
1493 (linux_wait_for_event_filtered): Likewise.
1494 (store_register): Likewise.
1495 * lynx-low.c (lynx_attach): Likewise.
1496 * mem-break.c (insert_memory_breakpoint): Likewise.
1497 (remove_memory_breakpoint): Likewise.
1498 (delete_fast_tracepoint_jump): Likewise.
1499 (set_fast_tracepoint_jump): Likewise.
1500 (uninsert_fast_tracepoint_jumps_at): Likewise.
1501 (reinsert_fast_tracepoint_jumps_at): Likewise.
1502 * nto-low.c (nto_xfer_memory): Likewise.
1503 (nto_resume): Likewise.
1504
1505 2019-11-20 Luis Machado <luis.machado@linaro.org>
1506
1507 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1508 instead of register count.
1509 * tdesc.c (tdesc_contains_feature): New function.
1510 * tdesc.h (tdesc_contains_feature): New prototype.
1511
1512 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1513
1514 * Makefile.in: Add safe-strerror.c.
1515 * configure: Regenerate.
1516 * configure.ac: Don't source common.host.
1517
1518 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1519
1520 * config.in: Regenerate.
1521 * configure: Regenerate.
1522
1523 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1524
1525 * ax.c (ax_printf): Handle size_t_arg.
1526
1527 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1528
1529 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1530 * mi/mi-main.c (output_cores): Likewise.
1531 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1532 (linux_xfer_osdata_modules): Likewise.
1533 * remote.c (register_remote_support_xml): Likewise.
1534 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1535 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1536
1537 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1538
1539 * configure: Regenerate.
1540 * configure.ac: Remove check for strerror_r.
1541
1542 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1543
1544 * config.in: Regenerate.
1545 * configure: Regenerate.
1546 * configure.ac: Also check for strerror_r.
1547
1548 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1549
1550 * ax.h (debug_agent): Remove duplicate declaration.
1551
1552 2019-10-26 Tom de Vries <tdevries@suse.de>
1553
1554 * linux-aarch64-low.c: Fix typos in comments.
1555 * linux-arm-low.c: Same.
1556 * linux-low.c: Same.
1557 * linux-ppc-low.c: Same.
1558 * proc-service.c: Same.
1559 * regcache.h: Same.
1560 * server.c: Same.
1561 * tracepoint.c: Same.
1562 * win32-low.c: Same.
1563
1564 2019-10-25 Tom Tromey <tromey@adacore.com>
1565
1566 * utils.c (xstrdup): Remove.
1567
1568 2019-10-23 Tom Tromey <tom@tromey.com>
1569
1570 * configure, config.in: Rebuild.
1571
1572 2019-10-23 Tom Tromey <tom@tromey.com>
1573
1574 * configure: Rebuild.
1575 * acinclude.m4: Use m4_include, not sinclude.
1576
1577 2019-10-17 Tom Tromey <tromey@adacore.com>
1578
1579 * configure: Rebuild.
1580 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1581 in AC_CONFIG_FILES invocation.
1582 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1583 invocation.
1584
1585 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1586
1587 * server.c: Include xml-builtin.h.
1588 (get_xml_features): Don't declare xml_builtins here.
1589
1590 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1591
1592 * Makefile.in: Remove references to vec-ipa.o.
1593
1594 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1595
1596 * Makefile.in: Remove references to vec.c.
1597
1598 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1599
1600 * server.c (server_waiting): Change to bool.
1601 (extended_protocol): Likewise.
1602 (response_needed): Likewise.
1603 (exit_requested): Likewise.
1604 (run_once): Likewise.
1605 (report_no_resumed): Likewise.
1606 (non_stop): Likewise.
1607 (disable_packet_vCont): Likewise.
1608 (disable_packet_Tthread): Likewise.
1609 (disable_packet_qC): Likewise.
1610 (disable_packet_qfThreadInfo): Likewise.
1611 (handle_general_set): Update.
1612 (handle_detach): Update.
1613 (handle_monitor_command): Update.
1614 (handle_query): Update.
1615 (captured_main): Update.
1616 (process_serial_event): Update.
1617 * server.h (server_waiting): Change to bool.
1618 (disable_packet_vCont): Likewise.
1619 (disable_packet_Tthread): Likewise.
1620 (disable_packet_qC): Likewise.
1621 (disable_packet_qfThreadInfo): Likewise.
1622 (run_once): Likewise.
1623 (non_stop): Likewise.
1624 * target.c (target_stop_and_wait): Update.
1625
1626 2019-10-02 Tom Tromey <tromey@adacore.com>
1627
1628 * Makefile.in (SFILES): Add common-inferior.c.
1629 (OBS): Add common-inferior.o.
1630 * server.c (startup_with_shell): Don't define.
1631
1632 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1633
1634 * linux-low.c (linux_low_read_btrace): Update for change to
1635 std::vector.
1636
1637 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1638
1639 * debug.c (debug_threads): Remove comment in favor of the header.
1640 * debug.h (using_threads): Add declaration.
1641 (debug_threads): Add comment.
1642 * linux-aarch64-low.c: Include debug.h and remove declaration of
1643 debug_threads.
1644 * nto-low.c: Likewise.
1645 * remote-utils.c: Likewise.
1646 * thread-db.c: Likewise.
1647
1648 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1649
1650 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1651 and powerpc-cell64l-ipa.o.
1652 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1653 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1654 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1655 (spu*-*-*): Remove.
1656
1657 * spu-low.c: Remove file.
1658
1659 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1660 (parse_spufs_run): Remove.
1661 (ppc_get_pc): Remove Cell/B.E. support.
1662 (ppc_set_pc): Likewise.
1663 (ppc_breakpoint_at): Likewise.
1664 (ppc_arch_setup): Likewise.
1665 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1666 tdesc_powerpc_cell32l.
1667 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1668 or init_registers_powerpc_cell32l.
1669 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1670 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1671 or init_registers_powerpc_cell32l.
1672 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1673 (init_registers_powerpc_cell32l): Remove prototype.
1674 (init_registers_powerpc_cell64l): Likewise.
1675
1676 * target.h (struct target_ops): Remove qxfer_spu member.
1677 * server.c (handle_qxfer_spu): Remove.
1678 (qxfer_packets): Remove entry for "spu".
1679 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1680 * linux-low.c (SPUFS_MAGIC): Remove.
1681 (spu_enumerate_spu_ids): Remove.
1682 (linux_qxfer_spu): Remove.
1683 (linux_target_ops): Remove qxfer_spu member.
1684 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1685 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1686 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1687
1688 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1689
1690 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1691 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1692 * config.in: Regenerate.
1693 * configure: Regenerate.
1694
1695 2019-08-15 Tom Tromey <tromey@adacore.com>
1696
1697 * target.c (target_write_memory): Use gdb::byte_vector.
1698
1699 2019-08-15 Tom Tromey <tromey@adacore.com>
1700
1701 * tracepoint.c (write_inferior_data_pointer)
1702 (write_inferior_integer, write_inferior_int8)
1703 (write_inferior_uinteger, m_tracepoint_action_download)
1704 (r_tracepoint_action_download, x_tracepoint_action_download)
1705 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1706 (download_agent_expr, download_tracepoint_1)
1707 (download_trace_state_variables, upload_fast_traceframes): Update.
1708 * server.c (gdb_write_memory): Update.
1709 * remote-utils.c (relocate_instruction): Update.
1710 * proc-service.c (ps_pdwrite): Update.
1711 * mem-break.c (remove_memory_breakpoint)
1712 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1713 (uninsert_fast_tracepoint_jumps_at)
1714 (reinsert_fast_tracepoint_jumps_at): Update.
1715 * linux-x86-low.c (append_insns)
1716 (i386_install_fast_tracepoint_jump_pad)
1717 (amd64_write_goto_address, i386_write_goto_address): Update.
1718 * linux-s390-low.c (append_insns, s390_write_goto_address):
1719 Update.
1720 * linux-ppc-low.c (ppc_relocate_instruction)
1721 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1722 (ppc_write_goto_address): Update.
1723 * linux-aarch64-low.c (append_insns): Update.
1724 * target.h (struct target_ops): Update.
1725 (write_inferior_memory): Don't declare.
1726 * target.c (target_write_memory): Rename from
1727 write_inferior_memory. Remove old target_write_memory.
1728
1729 2019-08-15 Tom Tromey <tromey@adacore.com>
1730
1731 * target.c (write_inferior_memory): Use std::vector.
1732
1733 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1734
1735 PR build/24886
1736 * configure.ac: Drop enable-libmcheck support.
1737 * configure, config.in: Rebuild.
1738 * acinclude.m4: Don't include it.
1739
1740 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1741
1742 * configure.srv: Remove Arm xml files.
1743
1744 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1745
1746 * configure.srv: Add new files. Remove xml generated files.
1747 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1748 registers.
1749 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1750 * linux-aarch32-tdesc.c: New file.
1751 * linux-aarch32-tdesc.h: New file.
1752 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1753 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1754 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1755 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1756 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1757 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1758 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1759 (arm_read_description): Call arm_linux_read_description.
1760 (initialize_low_arch): Don't init registers.
1761 * linux-arm-tdesc.c: New file.
1762 * linux-arm-tdesc.h: New file.
1763
1764 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1765
1766 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1767 Move counter inside for.
1768 (arm_read_description): Check ptrace earlier.
1769 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1770
1771 2019-07-09 Tom Tromey <tom@tromey.com>
1772
1773 * configure: Rebuild.
1774 * configure.ac: Change common to gdbsupport.
1775 * acinclude.m4: Change common to gdbsupport.
1776 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1777 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1778 common to gdbsupport.
1779 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1780 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1781 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1782 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1783 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1784 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1785 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1786 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1787 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1788 common to gdbsupport.
1789
1790 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1791
1792 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1793 defines.
1794 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1795
1796 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1797
1798 * configure.srv: Remove legacy xml.
1799 * linux-aarch64-low.c (initialize_low_arch): Remove
1800 initialize_low_tdesc call.
1801 * linux-aarch64-tdesc-selftest.c: Remove file.
1802 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1803 * linux-x86-low.c (initialize_low_arch): Remove
1804 initialize_low_tdesc call.
1805 * linux-x86-tdesc-selftest.c: Remove file.
1806 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1807
1808 2019-06-20 Tom de Vries <tdevries@suse.de>
1809
1810 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1811 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1812
1813 2019-06-19 Tom de Vries <tdevries@suse.de>
1814
1815 * debug.h (debug_write): Change return type to ssize_t.
1816 * debug.c (debug_write): Same.
1817
1818 2019-06-14 Tom Tromey <tom@tromey.com>
1819
1820 * configure.ac: Use new path to gnulib.
1821 * configure: Rebuild.
1822 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1823 to gnulib.
1824
1825 2019-06-11 Tom Tromey <tom@tromey.com>
1826
1827 * Makefile.in (SFILES): Add alloc.c.
1828 (OBS): Add alloc.o.
1829 (IPA_OBJS): Add alloc-ipa.o.
1830 (alloc-ipa.o): New target.
1831 (%.o: ../%.c): New pattern rule.
1832
1833 2019-06-10 Tom Tromey <tromey@adacore.com>
1834
1835 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1836 end warning with a newline.
1837 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1838 newline.
1839 * thread-db.c (attach_thread): Don't end warning with a newline.
1840 (thread_db_notice_clone): Likewise.
1841 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1842 newline.
1843 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1844 end warning with a newline.
1845
1846 2019-06-04 Pedro Alves <palves@redhat.com>
1847
1848 * server.c (captured_main): Use make_unique_xstrdup.
1849
1850 2019-06-02 Tom Tromey <tom@tromey.com>
1851
1852 * gdbreplay.c (fromhex): Remove.
1853 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1854
1855 2019-05-29 Tom Tromey <tromey@adacore.com>
1856
1857 * configure: Rebuild.
1858
1859 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1860
1861 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1862 sign extension code on 32-bit builds.
1863
1864 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1865
1866 * remote-utils.c:
1867 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1868
1869 2019-04-19 Tom Tromey <tom@tromey.com>
1870
1871 * server.c (struct vstop_notif): Derive from notif_event.
1872 <base>: Remove.
1873 (queue_stop_reply): Update.
1874 (remove_all_on_match_ptid): Change type. Rewrite.
1875 (discard_queued_stop_replies): Rewrite.
1876 (in_queued_stop_replies_ptid): Change type.
1877 (in_queued_stop_replies): Rewrite.
1878 (notif_stop): Update.
1879 (queue_stop_reply_callback): Update.
1880 (captured_main): Don't call initialize_notif.
1881 (push_stop_notification): Update.
1882 * notif.c (notif_write_event, handle_notif_ack)
1883 (notif_event_enque, notif_push): Update.
1884 (notif_event_xfree, initialize_notif): Remove.
1885 * notif.h (struct notif_event): Include <list>, not
1886 "common/queue.h".
1887 (struct notif_server) <queue>: Now a std::list.
1888 (notif_event_p): Remove typedef.
1889 (initialize_notif): Don't declare.
1890 (struct notif_event): Add virtual destructor.
1891
1892 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1893
1894 * ax.c (ax_vdebug): Call debug_printf.
1895 * debug.c (debug_write): New function.
1896 * debug.h (debug_write): New declaration.
1897 * linux-low.c (sigchld_handler): Call debug_write.
1898
1899 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1900
1901 * debug.c (debug_set_output): New function.
1902 (debug_vprintf): Send output to debug_file.
1903 (debug_flush): Likewise.
1904 * debug.h (debug_set_output): New declaration.
1905 * server.c (handle_monitor_command): Add debug-file option.
1906 (captured_main): Likewise.
1907
1908 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1909
1910 * debug.c (remote_debug): Add definition.
1911 * debug.h (remote_debug): Add declaration.
1912 * hostio.c (remote_debug): Remove declaration.
1913 * remote-utils.c (struct ui_file): Likewise.
1914 (remote_debug): Likewise.
1915 * remote-utils.h (remote_debug): Likewise,
1916 * server.c (remote_debug): Remove definition.
1917
1918 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1919
1920 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1921 when using a 64-bit gdbserver.
1922
1923 2019-04-09 Tom Tromey <tromey@adacore.com>
1924
1925 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1926
1927 2019-04-08 Tom Tromey <tom@tromey.com>
1928
1929 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1930 throw.
1931 (linux_resume_one_lwp): Likewise.
1932
1933 2019-04-08 Tom Tromey <tom@tromey.com>
1934
1935 * gdbreplay.c: Update.
1936 * linux-low.c: Update.
1937 * server.c: Update.
1938
1939 2019-04-08 Tom Tromey <tom@tromey.com>
1940
1941 * server.c: Use C++ exception handling.
1942 * linux-low.c: Use C++ exception handling.
1943 * gdbreplay.c: Use C++ exception handling.
1944
1945 2019-04-08 Tom Tromey <tom@tromey.com>
1946
1947 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1948 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1949 (captured_main, main): Update.
1950 * gdbreplay.c (main): Update.
1951
1952 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1953
1954 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1955 value in argument pointer, return 1 if the entry is found and 0
1956 otherwise. Move comment.
1957 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1958 * linux-low.h (linux_get_auxv): Declare.
1959 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1960
1961 2019-04-05 Tom Tromey <tromey@adacore.com>
1962
1963 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1964 variables.
1965
1966 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1967
1968 * linux-low.c (AT_HWCAP2): Add define if not already included.
1969
1970 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1971
1972 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1973 (aarch64_arch_setup): Call linux_get_hwcap.
1974 * linux-arm-low.c (arm_get_hwcap): Remove function.
1975 (arm_read_description): Call linux_get_hwcap.
1976 * linux-low.c (linux_get_auxv): New function.
1977 (linux_get_hwcap): Likewise.
1978 (linux_get_hwcap2): Likewise.
1979 * linux-low.h (linux_get_hwcap): New declaration.
1980 (linux_get_hwcap2): Likewise.
1981 * linux-ppc-low.c (ppc_get_auxv): Remove function.
1982 (ppc_arch_setup): Call linux_get_hwcap.
1983 * linux-s390-low.c (s390_get_hwcap): Remove function.
1984 (s390_arch_setup): Call linux_get_hwcap.
1985
1986 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1987 Jiong Wang <jiong.wang@arm.com>
1988
1989 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
1990 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
1991 to fail.
1992 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
1993
1994 2019-03-22 Alan Hayward <alan.hayward@arm.com>
1995 Jiong Wang <jiong.wang@arm.com>
1996
1997 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
1998 (aarch64_get_hwcap): New function.
1999 (aarch64_arch_setup): Read APIA hwcap.
2000
2001 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2002 Jiong Wang <jiong.wang@arm.com>
2003
2004 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2005 (initialize_low_tracepoint): Likewise.
2006 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2007 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2008 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2009 (aarch64_linux_read_description): Likewise.
2010 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2011
2012 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2013
2014 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2015 i386_create_target_description for 'segments' parameter.
2016 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2017 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2018 * win32-i386-low.c (i386_arch_setup): Likewise.
2019
2020 2019-03-12 Tom Tromey <tromey@adacore.com>
2021
2022 * linux-low.c (iterate_over_lwps): Update.
2023
2024 2019-03-06 Tom Tromey <tom@tromey.com>
2025
2026 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2027 (captured_main): Use SCOPE_EXIT.
2028
2029 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2030
2031 * configure.srv: Use '$enable_unittest' instead of '$development'
2032 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2033 case.
2034
2035 2019-02-27 Tom Tromey <tromey@adacore.com>
2036
2037 * gdbreplay.c (logchar): Handle \r\n.
2038
2039 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2040
2041 * linux-low.c (linux_attach): Add process before lwp.
2042 * server.c (attach_inferior): Check if already attached.
2043
2044 2019-02-07 Tom Tromey <tom@tromey.com>
2045
2046 * x86-tdesc.h: Rename include guard.
2047 * x86-low.h: Add include guard.
2048 * wincecompat.h: Rename include guard.
2049 * win32-low.h: Add include guard.
2050 * utils.h: Rename include guard.
2051 * tracepoint.h: Rename include guard.
2052 * tdesc.h: Rename include guard.
2053 * target.h: Rename include guard.
2054 * server.h: Rename include guard.
2055 * remote-utils.h: Rename include guard.
2056 * regcache.h: Rename include guard.
2057 * nto-low.h: Rename include guard.
2058 * notif.h: Add include guard.
2059 * mem-break.h: Rename include guard.
2060 * lynx-low.h: Add include guard.
2061 * linux-x86-tdesc.h: Add include guard.
2062 * linux-s390-tdesc.h: Add include guard.
2063 * linux-ppc-tdesc-init.h: Add include guard.
2064 * linux-low.h: Add include guard.
2065 * linux-aarch64-tdesc.h: Add include guard.
2066 * linux-aarch32-low.h: Add include guard.
2067 * inferiors.h: Rename include guard.
2068 * i387-fp.h: Rename include guard.
2069 * hostio.h: Rename include guard.
2070 * gdbthread.h: Rename include guard.
2071 * gdb_proc_service.h: Rename include guard.
2072 * event-loop.h: Rename include guard.
2073 * dll.h: Rename include guard.
2074 * debug.h: Rename include guard.
2075 * ax.h: Rename include guard.
2076
2077 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2078
2079 PR gdb/23985
2080 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2081 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2082
2083 2019-01-25 Tom Tromey <tom@tromey.com>
2084
2085 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2086
2087 2019-01-25 Tom Tromey <tom@tromey.com>
2088
2089 * win32-low.c: Fix common/ includes.
2090 * win32-i386-low.c: Fix common/ includes.
2091 * tracepoint.c: Fix common/ includes.
2092 * thread-db.c: Fix common/ includes.
2093 * target.h: Fix common/ includes.
2094 * symbol.c: Fix common/ includes.
2095 * spu-low.c: Fix common/ includes.
2096 * server.h: Fix common/ includes.
2097 * server.c: Fix common/ includes.
2098 * remote-utils.c: Fix common/ includes.
2099 * regcache.h: Fix common/ includes.
2100 * regcache.c: Fix common/ includes.
2101 * nto-x86-low.c: Fix common/ includes.
2102 * notif.h: Fix common/ includes.
2103 * mem-break.h: Fix common/ includes.
2104 * lynx-low.c: Fix common/ includes.
2105 * lynx-i386-low.c: Fix common/ includes.
2106 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2107 * linux-x86-low.c: Fix common/ includes.
2108 * linux-low.c: Fix common/ includes.
2109 * inferiors.h: Fix common/ includes.
2110 * i387-fp.c: Fix common/ includes.
2111 * hostio.c: Fix common/ includes.
2112 * hostio-errno.c: Fix common/ includes.
2113 * gdbthread.h: Fix common/ includes.
2114 * gdbreplay.c: Fix common/ includes.
2115 * fork-child.c: Fix common/ includes.
2116 * event-loop.c: Fix common/ includes.
2117 * ax.c:
2118 (enum gdb_agent_op): Fix common/ includes.
2119
2120 2019-01-21 Tom Tromey <tom@tromey.com>
2121
2122 * tracepoint.c: Fix includes.
2123 * remote-utils.c: Fix includes.
2124 * linux-x86-low.c: Fix includes.
2125
2126 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2127
2128 * gdbreplay.c (gdbreplay_version): Update copyright year in
2129 version message.
2130 * server.c (gdbserver_version): Likewise.
2131
2132 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2133
2134 * linux-low.c (add_lwp): Switch ordering.
2135
2136 2018-11-29 Tom Tromey <tom@tromey.com>
2137
2138 * win32-low.c (win32_join): Take pid, not process.
2139 * target.h (struct target_ops) <join>: Change argument type.
2140 (join_inferior): Change argument name.
2141 * spu-low.c (spu_join): Take pid, not process.
2142 * server.c (handle_detach): Preserve pid before destroying
2143 process.
2144 * lynx-low.c (lynx_join): Take pid, not process.
2145 * linux-low.c (linux_join): Take pid, not process.
2146
2147 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2148
2149 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2150 (aarch64_cannot_fetch_register): Likewise.
2151 (struct linux_target_ops): Update references.
2152
2153 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2154
2155 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2156
2157 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2158
2159 * configure.srv (ipa_ppc_linux_regobj): Add
2160 powerpc-isa207-htm-vsx32l-ipa.o and
2161 powerpc-isa207-htm-vsx64l-ipa.o.
2162 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2163 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2164 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2165 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2166 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2167 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2168 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2169 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2170 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2171 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2172 (init_registers_powerpc_isa207_htm_vsx32l)
2173 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2174 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2175 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2176 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2177 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2178 (ppc_store_tm_ctarregset): New functions.
2179 (ppc_regsets): Add entries for HTM regsets.
2180 (ppc_arch_setup): Set htm in features struct when needed. Set
2181 sizes for the HTM regsets.
2182 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2183 (initialize_low_arch): Call
2184 init_registers_powerpc_isa207_htm_vsx32l and
2185 init_registers_powerpc_isa207_htm_vsx64l.
2186 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2187 PPC_TDESC_ISA207_HTM_VSX.
2188 (initialize_low_tracepoint): Call
2189 init_registers_powerpc_isa207_htm_vsx32l and
2190 init_registers_powerpc_isa207_htm_vsx64l.
2191
2192 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2193
2194 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2195 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2196 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2197 (ppc_store_pmuregset): New functions.
2198 (ppc_regsets): Add entries for ebb and pmu regsets.
2199 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2200 pmu regsets are available. Set sizes for these regsets.
2201
2202 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2203
2204 * configure.srv (ipa_ppc_linux_regobj): Add
2205 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2206 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2207 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2208 rs6000/powerpc-isa207-vsx32l.xml, and
2209 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2210 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2211 <PPC_TDESC_ISA207_VSX>: New enum value.
2212 (init_registers_powerpc_isa207_vsx32l): Declare.
2213 (init_registers_powerpc_isa207_vsx64l): Declare.
2214 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2215 (ppc_store_tarregset): New function.
2216 (ppc_regsets): Add entry for the TAR regset.
2217 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2218 size for the TAR regsets.
2219 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2220 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2221 and init_registers_powerpc_isa207_vsx64l.
2222 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2223 (initialize_low_tracepoint): Call
2224 init_registers_powerpc_isa207_vsx32l and
2225 init_registers_powerpc_isa207_vsx64l.
2226
2227 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2228 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2229
2230 * configure.srv (ipa_ppc_linux_regobj): Add
2231 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2232 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2233 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2234 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2235 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2236 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2237 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2238 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2239 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2240 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2241 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2242 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2243 (ppc_hwcap): Add comment.
2244 (ppc_hwcap2): New global.
2245 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2246 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2247 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2248 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2249 when needed. Set sizes for the the DSCR and PPR regsets.
2250 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2251 (initialize_low_arch): Call
2252 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2253 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2254 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2255 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2256 (initialize_low_tracepoint): Call
2257 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2258 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2259
2260 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2261
2262 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2263
2264 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2265 Simon Marchi <simark@simark.ca>
2266
2267 * acinclude.m4: Include "../selftest.m4".
2268 * configure: Regenerate.
2269 * configure.ac: Use "GDB_AC_SELFTEST".
2270 * configure.srv: Use "$enable_unittests" instead of
2271 "$development" when checking whether unit tests have been
2272 enabled.
2273 * server.c (captured_main): Update message informing that
2274 selftests have been disabled.
2275
2276 2018-10-04 Tom Tromey <tom@tromey.com>
2277
2278 * configure: Rebuild.
2279
2280 2018-10-04 Tom Tromey <tom@tromey.com>
2281
2282 * server.c (handle_status): Rename inner "thread".
2283 (process_serial_event): Declare "res" in 'm' case.
2284 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2285 (iterate_over_lwps): Rename inner "thread".
2286 (linux_qxfer_libraries_svr4): Rename inner "len".
2287 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2288
2289 2018-10-01 Gary Benson <gbenson@redhat.com>
2290
2291 * gdb_proc_service.h: Moved common code to
2292 common/gdb_proc_service.h.
2293
2294 2018-10-01 Gary Benson <gbenson@redhat.com>
2295
2296 * gdb_proc_service.h: Synchronize comments and whitespace with
2297 GDB's version of this file.
2298
2299 2018-09-25 Tom Tromey <tom@tromey.com>
2300
2301 * configure: Rebuild.
2302 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2303
2304 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2305
2306 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2307 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2308 ($(IPA_LIB)): Sort IPA_OBJS.
2309
2310 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2311
2312 * Makefile.in: Remove references to $(ADD_DEPS).
2313
2314 2018-09-16 Tom Tromey <tom@tromey.com>
2315
2316 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2317 variables.
2318 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2319 variables.
2320
2321 2018-09-05 Tom Tromey <tom@tromey.com>
2322
2323 * configure: Rebuild.
2324
2325 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2326
2327 PR build/23399
2328 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2329
2330 2018-08-27 Tom Tromey <tom@tromey.com>
2331
2332 PR build/23087:
2333 * configure: Rebuild.
2334
2335 2018-08-27 Tom Tromey <tom@tromey.com>
2336
2337 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2338 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2339 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2340 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2341 (s390x_emit_stack_adjust): Add casts to unsigned char.
2342
2343 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2344
2345 PR gdb/23374
2346 PR gdb/23375
2347 * server.h (struct client_state) <disable_randomization>:
2348 Initialize to 1.
2349
2350 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2351
2352 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2353 variable.
2354 (mips_supply_ptrace_register): Likewise.
2355
2356 2018-07-22 Tom Tromey <tom@tromey.com>
2357
2358 * configure: Rebuild.
2359
2360 2018-07-22 Tom Tromey <tom@tromey.com>
2361
2362 * win32-low.c (win32_create_inferior): Remove unused variables.
2363 * gdbreplay.c (remote_open): Remove unused variable.
2364 * remote-utils.c (remote_prepare): Remove unused variable.
2365 * x86-tdesc.h (X86_TDESC_H): Define.
2366 (amd64_expedite_regs): Define conditionally.
2367 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2368 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2369 * remote-utils.c (readchar): Remove unused variable.
2370
2371 2018-07-13 Pedro Alves <palves@redhat.com>
2372
2373 * linux-low.c (linux_kill): Change parameter to process_info
2374 pointer instead of pid. Adjust.
2375 * lynx-low.c (lynx_kill): Likewise.
2376 * nto-low.c (nto_kill): Likewise.
2377 * spu-low.c (spu_kill): Likewise.
2378 * win32-low.c (win32_kill): Likewise.
2379 * server.c (handle_v_kill, kill_inferior_callback)
2380 (detach_or_kill_for_exit): Adjust.
2381 * target.c (kill_inferior): Change parameter to process_info
2382 pointer instead of pid. Adjust.
2383 * target.h (struct target_ops) <kill>: Change parameter to
2384 process_info pointer instead of pid. Adjust all implementations
2385 and callers.
2386 (kill_inferior): Likewise.
2387
2388 2018-07-13 Pedro Alves <palves@redhat.com>
2389
2390 * linux-low.c (linux_detach, linux_join): Change parameter to
2391 process_info pointer instead of pid. Adjust.
2392 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2393 * nto-low.c (nto_detach): Likewise.
2394 * spu-low.c (spu_detach, spu_join): Likewise.
2395 * win32-low.c (win32_detach, win32_join): Likewise.
2396 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2397 * target.h (struct target_ops) <detach, join>: Change parameter to
2398 process_info pointer instead of pid. Adjust all implementations
2399 and callers.
2400 (detach_inferior, join_inferior): Rename 'pid' parameter to
2401 'proc'.
2402
2403 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2404 Jan Kratochvil <jan.kratochvil@redhat.com>
2405 Paul Fertser <fercerpav@gmail.com>
2406 Tsutomu Seki <sekiriki@gmail.com>
2407
2408 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2409 (OBS): Add 'common/netstuff.o'.
2410 (GDBREPLAY_OBS): Likewise.
2411 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2412 (remote_open): Implement support for IPv6
2413 connections.
2414 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2415 and 'wspiapi.h'.
2416 (handle_accept_event): Accept connections from IPv6 sources.
2417 (remote_prepare): Handle IPv6-style hostnames; implement
2418 support for IPv6 connections.
2419 (remote_open): Implement support for printing connections from
2420 IPv6 sources.
2421
2422 2018-07-11 Pedro Alves <palves@redhat.com>
2423
2424 PR gdb/23377
2425 * mem-break.c (any_persistent_commands): Add process_info
2426 parameter and use it instead of relying on the current process.
2427 Change return type to bool.
2428 * mem-break.h (any_persistent_commands): Add process_info
2429 parameter and change return type to bool.
2430 * server.c (handle_detach): Remove require_running_or_return call.
2431 Look up the process_info for the process we're about to detach.
2432 If not found, return back error to GDB. Adjust
2433 any_persistent_commands call to pass down a process pointer.
2434
2435 2018-07-11 Pedro Alves <palves@redhat.com>
2436
2437 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2438 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2439 instead of collect_register_by_name.
2440 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2441 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2442
2443 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2444 Pedro Alves <palves@redhat.com>
2445
2446 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2447
2448 2018-07-03 Tom Tromey <tom@tromey.com>
2449
2450 * linux-low.c: Update.
2451 * lynx-low.c: Update.
2452 * mem-break.c: Update.
2453 * nto-low.c: Update.
2454 * remote-utils.c: Update.
2455 * server.c: Update.
2456 * spu-low.c: Update.
2457 * target.c: Update.
2458 * win32-low.c: Update.
2459
2460 2018-07-03 Tom Tromey <tom@tromey.com>
2461
2462 * server.c: Update.
2463
2464 2018-07-03 Tom Tromey <tom@tromey.com>
2465
2466 * linux-low.c: Update.
2467
2468 2018-07-03 Tom Tromey <tom@tromey.com>
2469
2470 * target.c: Update.
2471
2472 2018-07-03 Tom Tromey <tom@tromey.com>
2473
2474 * linux-low.c: Update.
2475 * linux-mips-low.c: Update.
2476 * lynx-low.c: Update.
2477 * nto-low.c: Update.
2478 * remote-utils.c: Update.
2479 * server.c: Update.
2480 * spu-low.c: Update.
2481 * target.c: Update.
2482 * thread-db.c: Update.
2483
2484 2018-07-03 Tom Tromey <tom@tromey.com>
2485
2486 * linux-low.c: Update.
2487 * linux-mips-low.c: Update.
2488 * lynx-low.c: Update.
2489 * mem-break.c: Update.
2490 * nto-low.c: Update.
2491 * remote-utils.c: Update.
2492 * server.c: Update.
2493 * spu-low.c: Update.
2494 * target.c: Update.
2495 * tracepoint.c: Update.
2496
2497 2018-07-03 Tom Tromey <tom@tromey.com>
2498
2499 * linux-low.c: Update.
2500 * linux-ppc-low.c: Update.
2501 * linux-x86-low.c: Update.
2502 * proc-service.c: Update.
2503 * server.c: Update.
2504 * spu-low.c: Update.
2505 * thread-db.c: Update.
2506 * win32-low.c: Update.
2507
2508 2018-07-03 Tom Tromey <tom@tromey.com>
2509
2510 * linux-low.c: Update.
2511 * lynx-low.c: Update.
2512 * nto-low.c: Update.
2513 * remote-utils.c: Update.
2514 * spu-low.c: Update.
2515 * thread-db.c: Update.
2516 * win32-low.c: Update.
2517
2518 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2519
2520 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2521 parameter in call to 'amd64_create_target_description'.
2522
2523 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2524
2525 * x86-tdesc.h: Remove executable permission flag.
2526
2527 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2528
2529 * configure.ac: Remove AC_PREREQ, add missing quoting.
2530 * configure: Re-generate.
2531 * config.in: Re-generate.
2532 * aclocal.m4: Re-generate.
2533
2534 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2535
2536 * tracepoint.h (current_traceframe): Remove declaration.
2537
2538 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2539
2540 * linux-aarch64-low.c (is_sve_tdesc): New function.
2541 (aarch64_sve_regs_copy_to_regcache): Likewise.
2542 (aarch64_sve_regs_copy_from_regcache): Likewise.
2543 (aarch64_regs_info): Add SVE checks.
2544 (initialize_low_arch): Initialize SVE.
2545
2546 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2547
2548 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2549
2550 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2551
2552 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2553 (initialize_low_tracepoint): Likewise
2554 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2555 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2556 param.
2557 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2558 checks.
2559 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2560
2561 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2562
2563 * server.h (PBUFSIZ): Increase size
2564
2565 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2566
2567 * regcache.c (regcache::raw_compare): New function.
2568 * regcache.h (regcache::raw_compare): New declaration.
2569
2570 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2571
2572 * regcache.c (new_register_cache): Use new.
2573 (free_register_cache): Use delete.
2574 (register_data): Use const.
2575 (supply_register): Move body inside regcache.
2576 (regcache::raw_supply): New override function.
2577 (collect_register): Move body inside regcache.
2578 (regcache::raw_collect): New override function.
2579 (regcache::get_register_status): New override function.
2580 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2581
2582 2018-06-09 Tom Tromey <tom@tromey.com>
2583
2584 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2585 declare queue.
2586 (event_queue): Use std::queue.
2587 (gdb_event_xfree): Remove.
2588 (initialize_event_loop, process_event, wait_for_event): Update.
2589
2590 2018-06-08 Stan Cox <scox@redhat.com>
2591
2592 * win32-low.c (win32_create_inferior): last_ptid and last_status
2593 moved to client_state.
2594
2595 2018-06-08 Pedro Alves <palves@redhat.com>
2596
2597 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2598 common/common-exceptions.o, common/common-utils.o,
2599 common/errors.o, common/print-utils.o and utils.o.
2600 * gdbreplay.c: Include "common-defs.h" instead of the two
2601 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2602 string.h or alloca.h.
2603 (perror_with_name): Delete.
2604 (remote_open): Use xstrdup instead of strdup.
2605 (main): Rename to ...
2606 (captured_main): ... this.
2607 (main): New.
2608
2609 2018-06-08 Tom Tromey <tom@tromey.com>
2610
2611 * linux-low.c (linux_low_read_btrace): Update.
2612
2613 2018-06-04 Stan Cox <scox@redhat.com>
2614
2615 * server.h (struct client_state): New.
2616 * server.c (cont_thread, general_thread, multi_process)
2617 (report_fork_events, report_vfork_events, report_exec_events)
2618 (report_thread_events, swbreak_feature, hwbreak_feature)
2619 (vCont_supported, disable_randomization, pass_signals)
2620 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2621 Moved to client_state.
2622 * remote-utils.c (remote_debug, noack_mode)
2623 (transport_is_reliable): Moved to client_state.
2624 * tracepoint.c (current_traceframe): Moved to client_state.
2625
2626 Update all callers.
2627 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2628 linux-low.c, remote-utils.h, target.c: Use client_state.
2629
2630 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2631
2632 * configure.srv: Add new c/h file.
2633
2634 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2635
2636 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2637 null VQ.
2638
2639 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2640
2641 * gdb.arch/mips-fpregset-core.exp: New test.
2642 * gdb.arch/mips-fpregset-core.c: New test source.
2643
2644 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2645
2646 PR server/23198
2647 * hostio.c (require_int): Do not report overflow for integers
2648 between 0xfffffff and 0x7fffffff.
2649
2650 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2651
2652 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2653 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2654 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2655 functions.
2656 (the_low_target): Wire them.
2657
2658 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2659
2660 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2661 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2662 mode. Call collect_register_by_name with vscr using
2663 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2664 (ppc_store_vrregset): Add and set vscr_offset variable as in
2665 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2666 vscr_offset.
2667
2668 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2669
2670 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2671 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2672 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2673
2674 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2675
2676 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2677 (ppc_store_vsxregset): Likewise.
2678 (ppc_fill_vrregset): Likewise.
2679 (ppc_store_vrregset): Likewise.
2680 (ppc_fill_evrregset): Likewise.
2681 (ppc_store_evrregset): Likewise.
2682 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2683 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2684 needed.
2685
2686 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2687
2688 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2689 wordsize of the inferior. Call ppc_linux_target_wordsize.
2690
2691 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2692
2693 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2694 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2695 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2696 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2697 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2698 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2699 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2700 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2701 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2702 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2703 (tdesc_powerpc_e500l): Remove.
2704 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2705 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2706 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2707 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2708 linux-ppc-tdesc.h.
2709 (ppc_arch_setup): Remove target description matching code. Fill a
2710 ppc_linux_features struct and call ppc_linux_match_description
2711 with it.
2712
2713 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2714
2715 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2716 width of the requested register exceeds the width of the
2717 `ptrace' data type.
2718 (mips_cannot_store_register): Likewise.
2719
2720 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2721
2722 * linux-mips-low.c (mips_fetch_register): New function. Update
2723 preceding comment.
2724 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2725 (the_low_target): Wire `mips_fetch_register'.
2726
2727 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2728
2729 * lynx-i386-low.c (LYNXOS_178): New macro.
2730 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2731 the layout on LynxOS-178.
2732 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2733 handle floating point registers that are not supported by
2734 LynxOS-178.
2735
2736 2018-05-10 Tom Tromey <tom@tromey.com>
2737
2738 * configure: Rebuild.
2739
2740 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2741
2742 PR server/23158:
2743 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2744 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2745 Use it to set the expedite_regs field in the given tdesc.
2746 * x86-tdesc.h: New file.
2747 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2748 Adjust following the addition of the new expedite_regs parameter
2749 to init_target_desc.
2750 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2751 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2752 (i386_linux_read_description, amd64_linux_read_description):
2753 Adjust following the addition of the new expedite_regs parameter
2754 to init_target_desc.
2755 * lynx-i386-low.c: #include "x86-tdesc.h".
2756 (lynx_i386_arch_setup): Adjust following the addition of the new
2757 expedite_regs parameter to init_target_desc.
2758 * nto-x86-low.c: #include "x86-tdesc.h".
2759 (nto_x86_arch_setup): Adjust following the addition of the new
2760 expedite_regs parameter to init_target_desc.
2761 * win32-i386-low.c: #include "x86-tdesc.h".
2762 (i386_arch_setup): Adjust following the addition of the new
2763 expedite_regs parameter to init_target_desc.
2764
2765 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2766
2767 PR server/23158:
2768 * win32-low.c (win32_create_inferior): Add call to my_wait
2769 setting last_status global.
2770
2771 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2772
2773 PR server/23158:
2774 * win32-low.c (create_process): Only call gdb_tilde_expand if
2775 inferior_cwd is not NULL.
2776
2777 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2778
2779 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2780 registers to the cache if their values have changed.
2781 (i387_xsave_to_cache): Provide default values for x87 control
2782 registers when these features are available, but disabled.
2783 * regcache.c (supply_register_by_name_zeroed): New function.
2784 * regcache.h (supply_register_by_name_zeroed): Declare new
2785 function.
2786
2787 2018-05-07 Tom Tromey <tom@tromey.com>
2788
2789 * configure: Rebuild.
2790
2791 2018-05-04 Tom Tromey <tom@tromey.com>
2792
2793 * configure: Rebuild.
2794
2795 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2796 Pedro Alves <palves@redhat.com>
2797
2798 * linux-aarch64-low.c (aarch64_stopped_data_address):
2799 Likewise.
2800
2801 2018-04-27 Tom Tromey <tom@tromey.com>
2802
2803 * configure: Rebuild.
2804
2805 2018-04-23 Tom Tromey <tom@tromey.com>
2806
2807 * configure: Rebuild.
2808
2809 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2810
2811 * Makefile.in (depcomp): Add "..".
2812 (all_deps_files): New and use it.
2813
2814 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2815
2816 * configure.srv (aarch64*-*-linux*): Don't include xml.
2817 (i[34567]86-*-cygwin*): Likewise.
2818 (i[34567]86-*-linux*): Likewise.
2819 (i[34567]86-*-lynxos*): Likewise.
2820 (i[34567]86-*-mingw32ce*): Likewise.
2821 (i[34567]86-*-mingw*): Likewise.
2822 (i[34567]86-*-nto*): Likewise.
2823 (tic6x-*-uclinux): Likewise.
2824 (x86_64-*-linux*): Likewise.
2825 (x86_64-*-mingw*): Likewise.
2826 (x86_64-*-cygwin*): Likewise.
2827
2828 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2829
2830 * tdesc.c: Remove xml parameter.
2831
2832 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2833
2834 * server.c (get_features_xml): Remove cast.
2835 * tdesc.c (void target_desc::accept): Fill in function.
2836 (tdesc_get_features_xml): Remove old xml creation.
2837 (print_xml_feature::visit_pre): Add xml vistor.
2838 * tdesc.h (struct target_desc): Make xmltarget mutable.
2839 (tdesc_get_features_xml): Remove declaration.
2840
2841 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2842
2843 * tdesc.c (tdesc_architecture_name): Add new function.
2844 (tdesc_osabi_name): Likewise.
2845 (tdesc_get_features_xml): Use new functions.
2846
2847 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2848
2849 * tdesc.c (tdesc_create_flags): Remove.
2850 (tdesc_add_flag): Likewise.
2851 (tdesc_named_type): Likewise.
2852 (tdesc_create_union): Likewise.
2853 (tdesc_create_struct): Likewise.
2854 (tdesc_create_vector): Likewise.
2855 (tdesc_add_bitfield): Likewise.
2856 (tdesc_add_field): Likewise.
2857 (tdesc_set_struct_size): Likewise.
2858
2859 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2860
2861 * tdesc.c (~target_desc): Remove implictly deleted items.
2862 (init_target_desc): Iterate all features.
2863 (tdesc_get_features_xml): Use vector.
2864 (tdesc_create_feature): Create feature.
2865 * tdesc.h (tdesc_feature) Remove
2866 (target_desc): Add features.
2867
2868 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2869
2870 * Makefile.in: Add common/tdesc.c
2871 * tdesc.c (init_target_desc): init all reg_defs from register
2872 vector.
2873 (tdesc_create_reg): Create tdesc_reg.
2874 * tdesc.h (tdesc_feature): Add register vector.
2875
2876 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2877
2878 * tdesc.h (struct target_desc) <features>: Change type to
2879 std::vector<std::string>.
2880 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2881 changes.
2882 (tdesc_get_features_xml): Likewise.
2883 (tdesc_create_feature): Likewise.
2884
2885 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2886
2887 * regcache.c (find_register_by_number): Return a ref.
2888 (find_regno): Use references.
2889 (register_size): Likewise.
2890 (register_data): Likewise.
2891 * tdesc.c (target_desc::~target_desc): Remove free calls.
2892 (target_desc::operator==): Use std::vector compare.
2893 (init_target_desc): Use reference.
2894 (tdesc_create_reg): Use reg constructors.
2895 * tdesc.h (struct target_desc): Replace pointer with object.
2896
2897 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2898
2899 * regcache.c (find_register_by_number): Make static.
2900 (find_regno): Use find_register_by_number
2901 * regcache.h (struct reg): Remove declaration.
2902
2903 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2904
2905 * tdesc.c (target_desc::~target_desc): Move to here.
2906 (target_desc::operator==): Likewise.
2907 * tdesc.h (target_desc::~target_desc): Move from here.
2908 (target_desc::operator==): Likewise.
2909
2910 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2911
2912 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2913
2914 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2915
2916 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2917 S390_TDESC_GS.
2918 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2919 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2920 and init_registers_s390_gs_linux64.
2921
2922 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2923
2924 * linux-s390-low.c (s390_fill_gs): Remove function.
2925 (s390_fill_gsbc): Remove function.
2926 (s390_regsets): Set fill functions for the guarded storage regsets
2927 to NULL.
2928
2929 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2930
2931 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2932 the word size. Add comment.
2933 (s390_get_wordsize): New function.
2934 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2935 pswm with it. Instead, use s390_get_wordsize to determine the
2936 word size first and derive the correct tdesc from that directly.
2937
2938 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2939
2940 * Makefile.in: Include silent-rules.mk.
2941 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2942 (COMPILE): Add ECHO_CXX.
2943 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2944 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2945 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2946 (version-generated.c): Add ECHO_GEN.
2947 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2948 (IPAGENT_COMPILE): Add ECHO_CXX.
2949 (%-generated.c): Add ECHO_REGDAT.
2950
2951 2018-03-14 Tom Tromey <tom@tromey.com>
2952
2953 PR cli/14977:
2954 * ax.c (ax_printf): Special case for NULL.
2955
2956 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2957
2958 * linux-low.c (linux_qxfer_libraries_svr4): Use
2959 xml_escape_text_append.
2960
2961 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2962
2963 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2964
2965 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2966
2967 * server.c (handle_general_set): Remove unnecessary xstrdup.
2968
2969 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2970
2971 * server.c (parse_debug_format_options): Adjust to
2972 delim_string_to_char_ptr_vec changes.
2973 * thread-db.c (thread_db_load_search): Adjust to
2974 dirnames_to_char_ptr_vec changes.
2975
2976 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2977
2978 * target.h (target_enable_btrace, target_disable_btrace)
2979 (target_read_btrace, target_read_btrace_conf): Turn macro into
2980 inline function. Throw error if target method is not defined.
2981 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
2982 check for btrace target method. Be prepared to handle exceptions
2983 from btrace target methods.
2984
2985 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2986
2987 * server.c (captured_main): Change order of error message printed
2988 when the current working directory cannot be found.
2989
2990 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
2991
2992 * server.c: Include "filenames.h" and "pathstuff.h".
2993 (program_name): Delete variable.
2994 (program_path): New anonymous class.
2995 (get_exec_wrapper): Use "program_path" instead of
2996 "program_name".
2997 (handle_v_run): Likewise.
2998 (captured_main): Likewise.
2999 (process_serial_event): Likewise.
3000
3001 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3002
3003 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3004 (OBJS): Add "pathstuff.o".
3005 * server.c (current_directory): New global variable.
3006 (captured_main): Initialize "current_directory".
3007
3008 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3009
3010 * tdesc.c: Use common/tdesc.h.
3011 * tdesc.h: Likewise.
3012
3013 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3014 Simon Marchi <simon.marchi@ericsson.com>
3015
3016 * Makefile.in: Switch order of make rules.
3017
3018 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3019
3020 * Makefile.in: Add common directory in build.
3021 * configure.ac: Add common reference.
3022 * configure: Regenerate.
3023
3024 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3025
3026 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3027 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3028 * spu-low.c (spu_target_ops): Likewise.
3029 * win32-low.c (win32_target_ops): Likewise.
3030 * server.c (supported_btrace_packets): Report packets unconditionally.
3031 * target.h (target_ops) <supports_btrace>: Remove.
3032 (target_supports_btrace): Remove.
3033
3034 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3035
3036 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3037 (handle_btrace_disable): Change return type to void. Use exceptions
3038 to report errors.
3039 (handle_btrace_general_set): Catch exception and copy message to
3040 return message.
3041
3042 2018-02-08 Tom Tromey <tom@tromey.com>
3043
3044 * linux-low.c (install_software_single_step_breakpoints): Use
3045 make_scoped_restore.
3046 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3047 (do_restore_current_thread_cleanup): Remove.
3048 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3049 declare.
3050
3051 2018-02-08 Tom Tromey <tom@tromey.com>
3052
3053 * mem-break.c (set_raw_breakpoint_at): Use
3054 gdb::unique_xmalloc_ptr.
3055
3056 2018-01-30 Pedro Alves <palves@redhat.com>
3057
3058 PR gdb/13211
3059 * target.c (target_terminal::terminal_state): Rename to ...
3060 (target_terminal::m_terminal_state): ... this.
3061
3062 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3063
3064 * linux-low.c (handle_extended_wait): Surround call to
3065 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3066
3067 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3068
3069 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3070 linux_ptrace_attach_fail_reason_string now returning an
3071 std::string.
3072 (linux_attach): Likewise.
3073 * thread-db.c (attach_thread): Likewise.
3074
3075 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3076
3077 PR gdb/21559
3078 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3079 checking for fs_base/gs_base fields in struct user_regs_struct.
3080 * configure: Regenerate.
3081
3082 2018-01-16 Yao Qi <yao.qi@linaro.org>
3083
3084 PR gdb/18749
3085 * linux-low.c (fetch_register): Call supply_register instead of
3086 error.
3087
3088 2018-01-08 Yao Qi <yao.qi@linaro.org>
3089 Simon Marchi <simon.marchi@ericsson.com>
3090
3091 * Makefile.in (OBS): Remove selftest.o.
3092 * configure.ac: Set srv_selftest_objs if $development is true.
3093 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3094 * configure: Re-generated.
3095 * server.c (captured_main): Wrap variable selftest_filter with
3096 GDB_SELF_TEST.
3097
3098 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3099
3100 * server.c (parse_debug_format_options): Return std::string.
3101 (handle_monitor_command, captured_main): Adjust.
3102
3103 2018-01-05 Pedro Alves <palves@redhat.com>
3104
3105 PR gdb/18653
3106 * server.c (captured_main): Pass quiet=false to
3107 save_original_signals_state.
3108
3109 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3110
3111 * gdbreplay.c (gdbreplay_version): Update copyright year in
3112 version message.
3113 * server.c (gdbserver_version): Likewise.
3114
3115 2017-12-08 Tom Tromey <tom@tromey.com>
3116
3117 * ax.c (ax_printf): Update.
3118
3119 2017-12-07 Yao Qi <yao.qi@linaro.org>
3120
3121 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3122 aarch64_linux_read_description.
3123 * linux-amd64-ipa.c (idx2mask): New array.
3124 (get_ipa_tdesc): Move idx2mask out.
3125 (initialize_low_tracepoint): Initialize target descriptions.
3126 * linux-i386-ipa.c (idx2mask): New array.
3127 (get_ipa_tdesc): Move idx2mask out.
3128 (initialize_low_tracepoint): Initialize target descriptions.
3129
3130 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3131
3132 * tdesc.c (struct tdesc_type): Change return type.
3133 (tdesc_add_flag): Change parameter type.
3134 (tdesc_add_bitfield): Likewise.
3135 (tdesc_add_field): Likewise.
3136 (tdesc_set_struct_size): Likewise.
3137
3138 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3139
3140 * regcache.c (registers_to_string): Remove unused variable.
3141
3142 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3143
3144 * inferiors.c (for_each_inferior_with_data): Remove.
3145 * inferiors.h (for_each_inferior_with_data): Remove.
3146 * server.c (handle_qxfer_threads_worker): Change parameter type.
3147 (handle_qxfer_threads_proper): Use for_each_thread.
3148
3149 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3150
3151 * inferiors.c (for_each_inferior): Remove.
3152 (clear_inferiors): Use for_each_thread.
3153 * inferiors.h (for_each_inferior): Remove.
3154 * linux-low.c (linux_wait_for_event_filtered): Use
3155 for_each_thread.
3156 (linux_stabilize_threads): Likewise.
3157 * regcache.c (regcache_release): Likewise.
3158 * server.c (gdb_wants_all_threads_stopped): Likewise.
3159 (clear_pending_status_callback): Remove.
3160 (handle_status): Use for_each_thread.
3161 (captured_main): Likewise.
3162 * win32-low.c (child_init_thread_list): Likewise.
3163 (win32_clear_inferiors): Likewise.
3164 (fake_breakpoint_event): Likewise.
3165
3166 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3167
3168 * inferiors.h (find_inferior): Remove.
3169 * inferiors.c (find_inferior): Remove.
3170
3171 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3172
3173 * linux-low.c (resume_status_pending_p): Update comment.
3174 (need_step_over_p): Update comment.
3175
3176 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3177
3178 * linux-low.c (proceed_one_lwp): Return void, change parameter
3179 type.
3180 (unsuspend_and_proceed_one_lwp): Likewise.
3181 (proceed_all_lwps): Use for_each_thread.
3182 (unstop_all_lwps): Likewise.
3183
3184 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3185
3186 * linux-low.c (linux_resume_one_thread): Return void, take
3187 parameter directly.
3188 (linux_resume): Use for_each_thread.
3189
3190 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3191
3192 * linux-low.c (send_sigstop_callback): Return void, change
3193 parameter type. Rename to...
3194 (send_sigstop): ... this.
3195 (suspend_and_send_sigstop_callback): Return void, change parameter
3196 type. Rename to...
3197 (suspend_and_send_sigstop): ... this.
3198 (stop_all_lwps): Use for_each_thread.
3199
3200 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3201
3202 * linux-low.c (lwp_running): Return bool, remove unused
3203 argument.
3204 (linux_stabilize_threads): Use find_thread.
3205
3206 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3207
3208 * linux-low.c (select_singlestep_lwp_callback): Remove.
3209 (count_events_callback): Remove.
3210 (select_event_lwp_callback): Remove.
3211 (select_event_lwp): Use find_thread/for_each_thread.
3212
3213 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3214
3215 * linux-low.c (not_stopped_callback): Return bool, take filter
3216 argument directly.
3217 (linux_wait_for_event_filtered): Use find_thread.
3218 (linux_wait_1): Likewise.
3219
3220 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3221
3222 * linux-low.c (same_lwp): Remove.
3223 (find_lwp_pid): Use find_thread.
3224
3225 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3226
3227 * linux-low.c (delete_lwp_callback): Remove.
3228 (linux_mourn): Use for_each_thread.
3229
3230 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3231
3232 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3233 args parameter, don't check for pid.
3234 (linux_detach): Use for_each_thread.
3235
3236 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3237
3238 * linux-low.c (struct counter): Remove.
3239 (second_thread_of_pid_p): Remove.
3240 (last_thread_of_process_p): Use find_thread.
3241
3242 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3243
3244 * inferiors.c (find_inferior_in_random): Remove.
3245 * inferiors.h (find_inferior_in_random): Remove.
3246 * linux-low.c (status_pending_p_callback): Return bool, accept
3247 parameter ptid directly.
3248 (linux_wait_for_event_filtered): Use find_thread_in_random.
3249 (linux_wait_1): Likewise.
3250
3251 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3252
3253 * inferiors.c (find_inferior_id): Remove.
3254 (find_thread_ptid): Move implemention from find_inferior_id to
3255 here.
3256 * inferiors.h (find_inferior_id): Remove.
3257 * server.c (handle_status): Use find_thread_ptid.
3258 (process_serial_event): Likewise.
3259 * thread-db.c (find_one_thread): Likewise.
3260 (thread_db_thread_handle): Likewise.
3261 * win32-low.c (thread_rec): Likewise.
3262 (child_delete_thread): Likewise.
3263 (win32_thread_alive): Likewise.
3264 (get_child_debug_event): Likewise.
3265
3266 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3267
3268 * linux-mips-low.c (update_watch_registers_callback): Return
3269 void, remove pid_p parameter, don't check for pid.
3270 (mips_insert_point, mips_remove_point): Use for_each_thread.
3271
3272 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3273
3274 * lynx.low (lynx_delete_thread_callback): Remove.
3275 (lynx_mourn): Use for_each_thread.
3276
3277 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3278
3279 * regcache.c (regcache_invalidate_one): Remove.
3280 (regcache_invalidate_pid): use for_each_thread.
3281
3282 2017-11-26 Tom Tromey <tom@tromey.com>
3283
3284 * linux-low.c (linux_create_inferior): Update.
3285
3286 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3287
3288 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3289
3290 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3291
3292 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3293 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3294 * linux-aarch64-tdesc-selftest.c: New file.
3295 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3296
3297 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3298
3299 * configure.srv: Add new file.
3300 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3301 * linux-aarch64-tdesc-selftest.c: New file.
3302 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3303
3304 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3305
3306 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3307 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3308 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3309
3310 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3311
3312 * configure.srv: Add new files.
3313 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3314 aarch64_linux_read_description.
3315 * linux-aarch64-low.c (aarch64_linux_read_description):
3316 Merge with aarch64_arch_setup.
3317 (aarch64_arch_setup): Call aarch64_linux_read_description.
3318 * linux-aarch64-tdesc.c: New file.
3319 * linux-aarch64-tdesc.h: New file.
3320
3321 2017-11-24 Yao Qi <yao.qi@linaro.org>
3322
3323 * configure.srv: Set $srv_regobj for tic6x-linux.
3324 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3325 (tic6x_read_description): Move some code to tic6x_arch_setup.
3326 (tic6x_tdesc_test): New function.
3327 (initialize_low_arch): Call selftests::register_test.
3328
3329 2017-11-22 Yao Qi <yao.qi@linaro.org>
3330
3331 * remote-utils.c (prepare_resume_reply): Use memcpy.
3332
3333 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3334
3335 * linux-low.c (kill_one_lwp_callback): Return void, take
3336 argument directly, don't filter on pid.
3337 (linux_kill): Use for_each_thread.
3338
3339 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3340
3341 * linux-low.c (need_step_over_p): Return bool, remove dummy
3342 argument.
3343 (linux_resume, proceed_all_lwps): Use find_thread.
3344
3345 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3346
3347 * linux-low.c (resume_status_pending_p): Return bool, remove
3348 flag_p argument.
3349 (linux_resume): Use find_thread.
3350
3351 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3352
3353 * linux-low.c (struct thread_resume_array): Remove.
3354 (linux_set_resume_request): Return void, take arguments
3355 directly.
3356 (linux_resume): Use for_each_thread.
3357
3358 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3359
3360 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3361 return bool, remove data argument.
3362 (linux_stabilize_threads): Use find_thread.
3363
3364 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3365
3366 * linux-low.c (unsuspend_one_lwp): Remove.
3367 (unsuspend_all_lwps): Use for_each_thread, inline code from
3368 unsuspend_one_lwp.
3369
3370 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3371
3372 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3373 * linux-low.c (struct iterate_over_lwps_args): Remove.
3374 (iterate_over_lwps_filter): Remove.
3375 (iterate_over_lwps): Use find_thread.
3376
3377 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3378
3379 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3380 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3381 code from reset_lwp_ptrace_options_callback.
3382
3383 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3384
3385 * linux-arm-low.c (struct update_registers_data): Remove.
3386 (update_registers_callback): Return void, take arguments
3387 directly, don't check thread's pid.
3388 (arm_insert_point, arm_remove_point): Use for_each_thread.
3389
3390 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3391
3392 * win32-low.c (continue_one_thread): Return void, take argument
3393 directly.
3394 (child_continue): Use for_each_thread.
3395
3396 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3397
3398 * win32-i386-low.c (update_debug_registers_callback): Rename
3399 to ...
3400 (update_debug_registers): ... this, return void, remove pid_p arg.
3401 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3402
3403 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3404
3405 * inferiors.h (struct process_info): Add constructor, initialize
3406 fields..
3407 <syscalls_to_catch>: Change type to std::vector<int>.
3408 * inferiors.c (add_process): Allocate process_info with new.
3409 (remove_process): Free process_info with delete.
3410 * linux-low.c (handle_extended_wait): Adjust.
3411 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3412 * server.c (handle_general_set): Adjust.
3413
3414 2017-11-16 Pedro Alves <palves@redhat.com>
3415
3416 * remote-utils.c (remote_close): Block SIGIO signals instead of
3417 uninstalling the SIGIO handler.
3418
3419 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3420
3421 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3422
3423 2017-11-16 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3426 (tic6x_store_gregset): Likewise.
3427 (tic6x_usrregs_info): Move it up.
3428
3429 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3430
3431 * Makefile.in: Update arch rules.
3432 * configure.srv: Explicitly mark arch/ files.
3433
3434 2017-11-13 Andreas Schwab <schwab@suse.de>
3435
3436 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3437 function.
3438 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3439
3440 2017-11-06 Pedro Alves <palves@redhat.com>
3441
3442 * config.in, configure: Regenerate.
3443
3444 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3445
3446 * target.c (struct thread_search): Remove.
3447 (thread_search_callback): Remove.
3448 (prepare_to_access_memory): Use for_each_thread instead of
3449 find_inferior. Inline code from thread_search_callback.
3450
3451 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3452
3453 * server.c (struct visit_actioned_threads_data): Remove.
3454 (visit_actioned_threads): Change prototype to take arguments
3455 directly.
3456 (resume): Use find_thread instead of find_inferior.
3457
3458 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3459
3460 * server.c (queue_stop_reply_callback): Change prototype, return
3461 void.
3462 (find_status_pending_thread_callback): Remove.
3463 (handle_status): Replace find_inferior with find_thread and
3464 for_each_thread.
3465
3466 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3467
3468 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3469 with REGNO.
3470 (aarch64_store_gregset): Likewise.
3471 (aarch64_fill_fpregset): Likewise.
3472 (aarch64_store_fpregset): Likewise.
3473
3474 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3475
3476 * gdbthread.h (find_thread, for_each_thread): New functions.
3477 * inferiors.c (thread_of_pid): Remove.
3478 (find_any_thread_of_pid): Use find_thread.
3479 * linux-low.c (num_lwps): Use for_each_thread.
3480
3481 2017-10-17 Yao Qi <yao.qi@linaro.org>
3482
3483 * Makefile.in: Remove one rule.
3484 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3485
3486 2017-10-17 Yao Qi <yao.qi@linaro.org>
3487
3488 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3489 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3490
3491 2017-10-17 Yao Qi <yao.qi@linaro.org>
3492
3493 * configure.srv: Rename arm.o with arch/arm.o.
3494
3495 2017-10-17 Yao Qi <yao.qi@linaro.org>
3496
3497 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3498 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3499 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3500 (arch-i386.o, arch-amd64.o): Remove rules.
3501 (arch/%.o): New rule.
3502 Update POSTCOMPILE and COMPILE.pre.
3503 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3504 * configure: Re-generated.
3505 * configure.srv: Replace arch-i386.o with arch/i386.o.
3506 Replace arch-amd64.o with arch/amd64.o.
3507
3508 2017-10-16 Yao Qi <yao.qi@linaro.org>
3509
3510 * configure: Regenerated.
3511
3512 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3513
3514 * inferiors.h: (struct inferior_list): Remove.
3515 (struct inferior_list_entry); Remove.
3516 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3517 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3518 get_first_inferior): Remove.
3519 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3520 find_inferior_id, find_inferior_in_random): Change signature.
3521 * inferiors.c (all_threads): Change type to
3522 std::list<thread_info *>.
3523 (get_thread): Remove macro.
3524 (find_inferior, find_inferior_id): Change signature, implement
3525 using find_thread.
3526 (find_inferior_in_random): Change signature, implement using
3527 find_thread_in_random.
3528 (for_each_inferior, for_each_inferior_with_data): Change
3529 signature, implement using for_each_thread.
3530 (add_inferior_to_list, remove_inferior): Remove.
3531 (add_thread, get_first_thread, thread_of_pid,
3532 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3533 (get_first_inferior, one_inferior_p, clear_inferior_list):
3534 Remove.
3535 (clear_inferiors, get_thread_process): Update.
3536 * gdbthread.h: Include <list>.
3537 (struct thread_info) <entry>: Remove field.
3538 <id>: New field.
3539 (all_threads): Change type to std::list<thread_info *>.
3540 (get_first_inferior): Add doc.
3541 (find_thread, for_each_thread, find_thread_in_random): New
3542 functions.
3543 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3544 * linux-arm-low.c (update_registers_callback): Update.
3545 * linux-low.c (second_thread_of_pid_p): Update.
3546 (kill_one_lwp_callback, linux_detach_lwp_callback,
3547 delete_lwp_callback, status_pending_p_callback, same_lwp,
3548 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3549 iterate_over_lwps, not_stopped_callback,
3550 resume_stopped_resumed_lwps, count_events_callback,
3551 select_singlestep_lwp_callback, select_event_lwp_callback,
3552 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3553 suspend_and_send_sigstop_callback, wait_for_sigstop,
3554 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3555 lwp_running, linux_set_resume_request, resume_status_pending_p,
3556 need_step_over_p, start_step_over, linux_resume_one_thread,
3557 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3558 reset_lwp_ptrace_options_callback): Update.
3559 * linux-mips-low.c (update_watch_registers_callback): Update.
3560 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3561 Update.
3562 (free_register_cache_thread_one): Remove.
3563 (regcache_release): Update.
3564 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3565 handle_qxfer_threads_worker): Update.
3566 (handle_query): Update, use list iterator.
3567 (visit_actioned_threads, handle_pending_status,
3568 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3569 clear_pending_status_callback, set_pending_status_callback,
3570 find_status_pending_thread_callback, handle_status,
3571 process_serial_event): Update.
3572 * target.c (thread_search_callback): Update.
3573 * thread-db.c (thread_db_get_tls_address): Update.
3574 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3575 Update.
3576 * win32-i386-low.c (update_debug_registers_callback): Update.
3577 * win32-low.c (delete_thread_info, child_delete_thread,
3578 continue_one_thread, suspend_one_thread,
3579 get_child_debug_event): Adjust.
3580
3581 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3582
3583 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3584 * inferiors.h: Include <list>.
3585 (struct process_info) <entry>: Remove field.
3586 <pid>: New field.
3587 (pid_of): Change macro to function.
3588 (ptid_of, lwpid_of): Remove macro.
3589 (all_processes): Change type to std::list<process_info *>.
3590 (ALL_PROCESSES): Remove macro.
3591 (for_each_process, find_process): New function.
3592 * inferiors.c (all_processes): Change type to
3593 std::list<process_info *>.
3594 (find_thread_process): Adjust.
3595 (add_process): Likewise.
3596 (remove_process): Likewise.
3597 (find_process_pid): Likewise.
3598 (get_first_process): Likewise.
3599 (started_inferior_callback): Remove.
3600 (have_started_inferiors_p): Adjust.
3601 (attached_inferior_callback): Remove.
3602 (have_attached_inferiors_p): Adjust.
3603 * linux-low.c (check_zombie_leaders): Likewise.
3604 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3605 (x86_linux_update_xmltarget): Adjust.
3606 * server.c (handle_query): Likewise.
3607 (gdb_reattached_process): Remove.
3608 (handle_status): Adjust.
3609 (kill_inferior_callback): Likewise.
3610 (detach_or_kill_inferior): Remove.
3611 (print_started_pid): Likewise.
3612 (print_attached_pid): Likewise.
3613 (detach_or_kill_for_exit): Update.
3614 (process_serial_event): Likewise.
3615 * linux-arm-low.c (arm_new_fork): Likewise.
3616
3617 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3618
3619 * dll.h: Include <list>.
3620 (struct dll_info): Add constructor.
3621 <entry>: Remove field.
3622 (all_dlls): Change type to std::list<dll_info>.
3623 * dll.c: Include <algorithm>.
3624 (get_dll): Remove macro.
3625 (all_dlls): Change type to std::list<dll_info *>.
3626 (free_one_dll): Remove.
3627 (match_dll): Likewise.
3628 (loaded_dll): Adjust.
3629 (unloaded_dll): Adjust to all_dlls type change, use
3630 std::find_if. Inline code from match_dll.
3631 (clear_dlls): Adjust to all_dlls type change.
3632 * server.c (emit_dll_description): Remove.
3633 (handle_qxfer_libraries): Adjust to all_dlls type change,
3634 integrate emit_dll_description's functionality.
3635
3636 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3637
3638 * linux-low.h (struct linux_target_ops) <delete_process>: New
3639 field.
3640 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3641 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3642 (struct linux_target_ops): Add delete_process callback.
3643 * linux-arm-low.c (arm_delete_process): New.
3644 (struct linux_target_ops): Add delete_process callback.
3645 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3646 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3647 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3648 * linux-mips-low.c (mips_linux_delete_process): New.
3649 (struct linux_target_ops): Add delete_process callback.
3650 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3651 * linux-s390-low.c (struct linux_target_ops): Likewise.
3652 * linux-sh-low.c (struct linux_target_ops): Likewise.
3653 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3654 * linux-tile-low.c (struct linux_target_ops): Likewise.
3655 * linux-x86-low.c (x86_linux_delete_process): New.
3656 (struct linux_target_ops): Add delete_process callback.
3657 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3658
3659 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3660
3661 * linux-aarch64-low.c (the_low_target): Add thread delete
3662 callback.
3663 * linux-arm-low.c (arm_delete_thread): New function.
3664 (the_low_target): Add thread delete callback.
3665 * linux-bfin-low.c (the_low_target): Likewise.
3666 * linux-crisv32-low.c (the_low_target): Likewise.
3667 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3668 set.
3669 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3670 field.
3671 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3672 * linux-mips-low.c (mips_linux_delete_thread): New function.
3673 (the_low_target): Add thread delete callback.
3674 * linux-ppc-low.c (the_low_target): Likewise.
3675 * linux-s390-low.c (the_low_target): Likewise.
3676 * linux-sh-low.c (the_low_target): Likewise.
3677 * linux-tic6x-low.c (the_low_target): Likewise.
3678 * linux-tile-low.c (the_low_target): Likewise.
3679 * linux-x86-low.c (the_low_target): Likewise.
3680 * linux-xtensa-low.c (the_low_target): Likewise.
3681
3682 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3683
3684 * win32-low.c: Include "common-inferior.h".
3685
3686 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3687
3688 * inferiors.c (set_inferior_cwd): New function.
3689 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3690 (handle_query): Inform that QSetWorkingDir is supported.
3691 * win32-low.c (create_process): Pass the inferior's cwd to
3692 CreateProcess.
3693
3694 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3695
3696 * inferiors.c (current_inferior_cwd): New global variable.
3697 (get_inferior_cwd): New function.
3698 * inferiors.h (struct process_info) <cwd>: New field.
3699
3700 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3701
3702 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3703 (OBS): Add gdb_tilde_expand.o.
3704
3705 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3706
3707 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3708 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3709
3710 2017-09-29 Pedro Alves <palves@redhat.com>
3711
3712 * ax.c (gdb_parse_agent_expr): Constify.
3713 * ax.h (gdb_parse_agent_expr): Constify.
3714 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3715 Constify.
3716 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3717 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3718 * remote-utils.h (read_ptid): Constify.
3719 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3720 (process_point_options, process_serial_event): Constify.
3721 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3722 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3723 (cmd_qtbuffer): Constify.
3724
3725 2017-09-29 Pedro Alves <palves@redhat.com>
3726
3727 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3728 fails.
3729
3730 2017-09-29 Pedro Alves <palves@redhat.com>
3731
3732 * linux-low.c (handle_extended_wait): Pass parent thread instead
3733 of process to thread_db_notice_clone.
3734 * linux-low.h (thread_db_notice_clone): Replace parent process
3735 parameter with parent thread parameter.
3736 * thread-db.c (find_one_thread): Add comment.
3737 (thread_db_notice_clone): Replace parent process parameter with
3738 parent thread parameter. Temporarily switch to the parent thread.
3739
3740 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3741
3742 * gdbthread.h: Include "common-gdbthread.h".
3743 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3744 "if" when validating the ptid.
3745 * remote-utils.c: Include "gdbthread.h".
3746 (prepare_resume_reply): Use "switch_to_thread".
3747 * target.c (done_accessing_memory): Likewise.
3748
3749 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3750
3751 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3752 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3753 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3754 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3755 s390x-gs-linux64-ipa.o to ipa_obj.
3756 * linux-s390-low.c (HWCAP_S390_GS): New define.
3757 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3758 New functions.
3759 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3760 (s390_arch_setup): Check for guarded-storage support and choose
3761 appropriate tdesc.
3762 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3763 init_registers_s390x_gs_linux64.
3764 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3765 enum value.
3766 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3767 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3768
3769 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3770
3771 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3772
3773 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3774
3775 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3776 (thread_db_thread_handle): Declare.
3777 * linux-low.c (linux_target_ops): Initialize thread_handle.
3778 * server.c (handle_qxfer_threads_worker): Add support for
3779 "handle" attribute.
3780 * target.h (struct target_ops): Add new function pointer,
3781 thread_handle.
3782 (target_thread_handle): Define.
3783 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3784 field in lwp.
3785 (thread_db_thread_handle): New function.
3786
3787 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3788
3789 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3790 * linux-low.h (thread_db_notice_clone): Declare.
3791 * thread-db.c (thread_db_notice_clone): New function.
3792
3793 2017-09-21 Pedro Alves <palves@redhat.com>
3794
3795 * server.c (gdb_read_memory, handle_status, process_serial_event)
3796 (handle_serial_event, handle_target_event): Adjust to
3797 set_desired_thread prototype change.
3798 * target.c (set_desired_thread): Remove 'use_general' parameter
3799 and adjust.
3800 * target.h (set_desired_thread): Remove 'use_general' parameter.
3801
3802 2017-09-20 Tom Tromey <tom@tromey.com>
3803
3804 * target.c (target_terminal::terminal_state): Define.
3805 (target_terminal::init): Rename from target_terminal_init.
3806 (target_terminal::inferior): Rename from
3807 target_terminal_inferior.
3808 (target_terminal::ours): Rename from target_terminal_ours.
3809 (target_terminal::ours_for_output, target_terminal::info): New.
3810
3811 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3812
3813 * server.c (accumulate_file_name_length): Remove.
3814 (emit_dll_description): Adjust to std::string change.
3815 (handle_qxfer_libraries): Use std::string to hold document.
3816
3817 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3818
3819 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3820 return type of xml_escape_text.
3821 * server.c (emit_dll_description): Likewise.
3822
3823 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3824
3825 * server.c (captured_main): Accept argument for --selftest.
3826 Update run_tests call.
3827 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3828 when registering selftests.
3829
3830 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3831
3832 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3833 instead of "VEC" for "target_desc.reg_defs".
3834 (regcache_cpy): Likewise.
3835 (registers_to_string): Likewise.
3836 (registers_from_string): Likewise.
3837 (find_regno): Likewise.
3838 (supply_regblock): Likewise.
3839 (regcache_raw_read_unsigned): Likewise.
3840 * tdesc.c (init_target_desc): Likewise.
3841 (tdesc_create_reg): Likewise.
3842 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3843 (struct target_desc) <reg_defs>: Convert to "std::vector".
3844 (target_desc): Do not initialize "reg_defs".
3845 (~target_desc): Update code to use "std::vector" instead of "VEC"
3846 for "target_desc.reg_defs".
3847 (operator==): Likewise.
3848
3849 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3850
3851 * inferiors.h (thread_to_gdb_id): Remove.
3852 * inferiors.c (thread_to_gdb_id): Remove.
3853 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3854 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3855 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3856 Likewise.
3857 * nto-low.c (nto_fetch_registers, nto_store_registers,
3858 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3859
3860 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3861
3862 * inferiors.h (gdb_id_to_thread_id): Remove.
3863 * inferiors.c (gdb_id_to_thread_id): Remove.
3864 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3865 removal. Move pid declaration closer to where it's used.
3866
3867 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3868
3869 * server.c (handle_detach): New function.
3870 (process_serial_event): Move code out, call handle_detach.
3871
3872 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3873
3874 * server.c (require_running): Rename to ...
3875 (require_running_or_return): ... this ...
3876 (require_running_or_break): ... and this.
3877 (handle_query, process_serial_event): Adjust.
3878
3879 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3880
3881 * linux-low.c (linux_set_resume_request): Remove unused
3882 variables.
3883
3884 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3885
3886 * server.c (first_thread_of): Remove.
3887 (process_serial_event): Replace usage of first_thread_of with
3888 find_any_thread_of_pid.
3889 * tracepoint.c (same_process_p): Remove.
3890 (gdb_agent_about_to_close): Replace usage of same_process_p with
3891 find_any_thread_of_pid.
3892 * linux-x86-low.c (same_process_callback): Remove.
3893 (x86_arch_setup_process_callback): Replace usage of
3894 same_process_callback with find_any_thread_of_pid.
3895 * thread-db.c (any_thread_of): Remove.
3896 (switch_to_process): Replace usage of any_thread_of with
3897 find_any_thread_of_pid.
3898 * inferiors.c (thread_pid_matches_callback): Remove.
3899 (find_thread_process): Adjust to use find_any_thread_of_pid.
3900
3901 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3902
3903 * regcache.c (get_thread_regcache): Guard calls to "memset"
3904 with "!VEC_empty".
3905
3906 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3907
3908 * linux-low.c (handle_extended_wait): Use
3909 "allocate_target_description" instead of "XNEW".
3910 * linux-x86-low.c (initialize_low_arch): Likewise.
3911
3912 2017-09-05 Yao Qi <yao.qi@linaro.org>
3913
3914 * configure.srv (srv_i386_regobj): Remove.
3915 (srv_amd64_regobj): Remove.
3916 (srv_regobj): Set it to "" for x86 non-linux targets.
3917 * linux-x86-tdesc.c (i386_linux_read_description):
3918 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3919 (init_registers_i386): Remove the declaration.
3920 (tdesc_i386): Remove the declaration.
3921 (lynx_i386_arch_setup): Call i386_create_target_description.
3922 * nto-x86-low.c: Likewise.
3923 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3924 [!__x86_64__]: include arch/i386.h.
3925 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3926
3927 2017-09-05 Yao Qi <yao.qi@linaro.org>
3928
3929 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3930 i386/amd64-XXX-linux from it.
3931
3932 2017-09-05 Yao Qi <yao.qi@linaro.org>
3933
3934 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3935 false.
3936 (ipa_amd64_linux_regobj): Remove.
3937 (ipa_x32_linux_regobj): Remove.
3938
3939 2017-09-05 Yao Qi <yao.qi@linaro.org>
3940
3941 * Makefile.in (arch-amd64.o): New rule.
3942 * configure.srv: Append arch-amd64.o.
3943 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3944 (get_ipa_tdesc): Call amd64_linux_read_description.
3945 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3946 and init_registers_amd64_XXX.
3947 * linux-x86-low.c (x86_linux_read_description): Call
3948 amd64_linux_read_description.
3949 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3950 (initialize_low_arch): Don't call init_registers_x32_XXX and
3951 init_registers_amd64_XXX.
3952 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3953 and tdesc_amd64_XXX.
3954 [__x86_64__] (amd64_tdesc_test): New function.
3955 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3956 and init_registers_amd64_XXX.
3957 * linux-x86-tdesc.c: Include arch/amd64.h.
3958 (xcr0_to_tdesc_idx): New function.
3959 (i386_linux_read_description): New function.
3960 (amd64_get_ipa_tdesc_idx): New function.
3961 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3962 (amd64_get_ipa_tdesc): Declare.
3963
3964 2017-09-05 Yao Qi <yao.qi@linaro.org>
3965
3966 * configure.srv (srv_i386_linux_xmlfiles): Remove
3967 i386/i386-XXX-linux.xml from it.
3968
3969 2017-09-05 Yao Qi <yao.qi@linaro.org>
3970
3971 * configure.srv: Set srv_i386_linux_regobj empty if $development
3972 is false.
3973 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3974 initialize_low_tdesc.
3975 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3976 with #if initialize_low_tdesc.
3977 * linux-x86-tdesc-selftest.c: New file.
3978 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3979
3980 2017-09-05 Yao Qi <yao.qi@linaro.org>
3981
3982 * Makefile.in (arch-i386.o): New rule.
3983 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
3984 (x86_64-*-linux*): Likewise.
3985 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
3986 include arch/i386.h.
3987 (i386_linux_read_description): Remove code and call
3988 i386_create_target_description.
3989 * tdesc.c (allocate_target_description): New function.
3990 * tdesc.h (set_tdesc_architecture): Remove declaration.
3991 (set_tdesc_osabi): Likewise.
3992
3993 2017-09-05 Yao Qi <yao.qi@linaro.org>
3994
3995 * linux-x86-tdesc.c: Don't include <inttypes.h>.
3996 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
3997 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
3998 .xmltarget.
3999 * server.c (get_features_xml): Call tdesc_get_features_xml.
4000 * tdesc.c (set_tdesc_architecture): New function.
4001 (set_tdesc_osabi): New function.
4002 (tdesc_get_features_xml): New function.
4003 (tdesc_create_feature): Add an argument.
4004 * tdesc.h (struct target_desc) <features>: New field.
4005 <arch, osabi>: New field.
4006 (~target_desc): xfree features, arch, and osabi.
4007 (target_desc::oerator==): Don't compare .xmltarget.
4008 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4009 (set_tdesc_osabi): Likewise.
4010 (tdesc_get_features_xml): Likewise.
4011
4012 2017-09-05 Yao Qi <yao.qi@linaro.org>
4013
4014 * linux-x86-tdesc.c: Include selftest.h.
4015 (i386_tdesc_test): New function.
4016 (initialize_low_tdesc): Call selftests::register_test.
4017 * tdesc.h: Include regdef.h.
4018 (target_desc): Override operator == and !=.
4019
4020 2017-09-05 Yao Qi <yao.qi@linaro.org>
4021
4022 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4023 (ipa_obj): Likewise.
4024 * linux-i386-ipa.c: Include common/x86-xstate.h
4025 (get_ipa_tdesc): Call i386_linux_read_description.
4026 (initialize_low_tracepoint): Don't call init_registers_XXX
4027 functions, call initialize_low_tdesc instead.
4028 * linux-x86-low.c (x86_linux_read_description): Call
4029 i386_linux_read_description.
4030 (initialize_low_arch): Don't call init_registers_i386_XXX
4031 functions, call initialize_low_tdesc.
4032 * linux-x86-tdesc.c: New file.
4033 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4034 (i386_get_ipa_tdesc_idx): Declare.
4035 (i386_get_ipa_tdesc): Declare.
4036 (initialize_low_tdesc): Declare.
4037
4038 2017-09-05 Yao Qi <yao.qi@linaro.org>
4039
4040 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4041 instead of 0.
4042
4043 2017-09-05 Yao Qi <yao.qi@linaro.org>
4044
4045 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4046 * regcache.c (get_thread_regcache): Use VEC_length.
4047 (init_register_cache): Likewise.
4048 (regcache_cpy): Likewise.
4049 (registers_to_string): Iterate reg_defs via VEC_iterate.
4050 (find_regno): Likewise.
4051 (find_register_by_number): Use VEC_index.
4052 (register_size): Call find_register_by_number.
4053 (register_data): Call find_register_by_number.
4054 (supply_regblock): Use VEC_length.
4055 (regcache_raw_read_unsigned): Likewise.
4056 * tdesc.c (init_target_desc): Iterate reg_defs via
4057 VEC_iterate.
4058 (default_description): Update initializer.
4059 (copy_target_description): Don't update field num_registers.
4060 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4061 <num_registers>: Remove.
4062
4063 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4064
4065 * Makefile.in (.SECONDARY): Define target.
4066
4067 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4068
4069 * linux-low.c (linux_wait_1): Adjust.
4070 * server.c (queue_stop_reply_callback): Adjust.
4071
4072 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4073
4074 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4075 QEnvironmentUnset and QEnvironmentReset packets.
4076 (handle_query): Inform remote that QEnvironmentHexEncoded,
4077 QEnvironmentUnset and QEnvironmentReset are supported.
4078
4079 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4080
4081 * inferiors.h (inferior_target_data): Rename to ...
4082 (thread_target_data): ... this.
4083 (inferior_regcache_data): Rename to ...
4084 (thread_regcache_data): ... this.
4085 (set_inferior_regcache_data): Rename to ...
4086 (set_thread_regcache_data): ... this.
4087 * inferiors.c (inferior_target_data): Rename to ...
4088 (thread_target_data): ... this.
4089 (inferior_regcache_data): Rename to ...
4090 (thread_regcache_data): ... this.
4091 (set_inferior_regcache_data): Rename to ...
4092 (set_thread_regcache_data): ... this.
4093 (free_one_thread): Update.
4094 * linux-low.h (get_thread_lwp): Update.
4095 * regcache.c (get_thread_regcache): Update.
4096 (regcache_invalidate_thread): Update.
4097 (free_register_cache_thread): Update.
4098 * win32-i386-low.c (update_debug_registers_callback): Update.
4099 (win32_get_current_dr): Update.
4100 * win32-low.c (thread_rec): Update.
4101 (delete_thread_info): Update.
4102 (continue_one_thread): Update.
4103 (suspend_one_thread): Update.
4104
4105 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4106
4107 * inferiors.c (set_inferior_target_data): Remove.
4108 * inferiors.h (set_inferior_target_data): Remove.
4109
4110 2017-08-18 Yao Qi <yao.qi@linaro.org>
4111
4112 * Makefile.in (OBS): Add selftest.o.
4113 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4114 * configure, config.in: Re-generated.
4115 * server.c: Include common/sefltest.h.
4116 (captured_main): Handle option --selftest.
4117
4118 2017-08-09 Yao Qi <yao.qi@linaro.org>
4119
4120 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4121 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4122 i386-avx-mpx.o and i386-mmx.o.
4123 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4124 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4125 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4126 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4127 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4128 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4129 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4130 i386/amd64-avx-mpx.xml.
4131
4132 2017-08-09 Yao Qi <yao.qi@linaro.org>
4133
4134 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4135 and x32-avx-avx512.o.
4136 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4137 i386/x32-avx-avx512.xml.
4138
4139 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4140
4141 * tracepoint.h (enum class fast_tpoint_collect_result): New
4142 enumeration.
4143 (fast_tracepoint_collecting): Change return type to
4144 fast_tpoint_collect_result.
4145 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4146 * linux-low.h: Include tracepoint.h.
4147 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4148 fast_tpoint_collect_result.
4149 * linux-low.c (handle_tracepoints): Adjust.
4150 (linux_fast_tracepoint_collecting): Change return type to
4151 fast_tpoint_collect_result.
4152 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4153 linux_wait_1, stuck_in_jump_pad_callback,
4154 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4155 proceed_one_lwp): Adjust to type change.
4156
4157 2017-07-10 Yao Qi <yao.qi@linaro.org>
4158
4159 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4160
4161 2017-06-29 Yao Qi <yao.qi@linaro.org>
4162
4163 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4164 Remove.
4165 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4166
4167 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4168
4169 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4170
4171 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4172
4173 * linux-low.c (linux_create_inferior): Adjust code to access the
4174 environment information via 'gdb_environ' class.
4175 * lynx-low.c (lynx_create_inferior): Likewise.
4176 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4177 (get_environ): Return a pointer to 'our_environ'.
4178 (captured_main): Initialize 'our_environ'.
4179 * server.h (get_environ): Adjust prototype.
4180 * spu-low.c (spu_create_inferior): Adjust code to access the
4181 environment information via 'gdb_environ' class.
4182
4183 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4184
4185 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4186 usage of "register" keyword.
4187
4188 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4189
4190 * configure: Re-generate.
4191
4192 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4193
4194 * configure: Re-generate.
4195
4196 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4197
4198 * Makefile.in (COMPILE.pre): Add "-x c++".
4199
4200 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4201
4202 * fork-child.c: Conditionally include <signal.h>.
4203
4204 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4205
4206 * server.c (handle_general_set): Handle new packet
4207 "QStartupWithShell".
4208 (handle_query): Add "QStartupWithShell" to the list of supported
4209 packets.
4210 (gdbserver_usage): Add help text explaining the
4211 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4212 options.
4213 (captured_main): Recognize and act upon the presence of the new
4214 CLI options.
4215
4216 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4217 Pedro Alves <palves@redhat.com>
4218
4219 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4220 * configure: Regenerate.
4221 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4222 "fork-inferior.o".
4223 (i[34567]86-*-lynxos*): Likewise.
4224 (spu*-*-*): Likewise.
4225 * fork-child.c: New file.
4226 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4227 and "environ.h".
4228 (linux_ptrace_fun): New function.
4229 (linux_create_inferior): Adjust function prototype to reflect
4230 change on "target.h". Adjust function code to use
4231 "fork_inferior".
4232 (linux_request_interrupt): Delete "signal_pid".
4233 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4234 (lynx_ptrace_fun): New function.
4235 (lynx_create_inferior): Adjust function prototype to reflect
4236 change on "target.h". Adjust function code to use
4237 "fork_inferior".
4238 * nto-low.c (nto_create_inferior): Adjust function prototype and
4239 code to reflect change on "target.h". Update comments.
4240 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4241 "common-terminal.h" and "environ.h".
4242 (terminal_fd): Moved to fork-child.c.
4243 (old_foreground_pgrp): Likewise.
4244 (restore_old_foreground_pgrp): Likewise.
4245 (last_status): Make it global.
4246 (last_ptid): Likewise.
4247 (our_environ): New variable.
4248 (startup_with_shell): Likewise.
4249 (program_name): Likewise.
4250 (program_argv): Rename to...
4251 (program_args): ...this.
4252 (wrapper_argv): New variable.
4253 (start_inferior): Delete function.
4254 (get_exec_wrapper): New function.
4255 (get_exec_file): Likewise.
4256 (get_environ): Likewise.
4257 (prefork_hook): Likewise.
4258 (post_fork_inferior): Likewise.
4259 (postfork_hook): Likewise.
4260 (postfork_child_hook): Likewise.
4261 (handle_v_run): Update code to deal with arguments coming from the
4262 remote host. Update calls from "start_inferior" to
4263 "create_inferior".
4264 (captured_main): Likewise. Initialize environment variable. Call
4265 "have_job_control".
4266 * server.h (post_fork_inferior): New prototype.
4267 (get_environ): Likewise.
4268 (last_status): Declare.
4269 (last_ptid): Likewise.
4270 (signal_pid): Likewise.
4271 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4272 (spu_ptrace_fun): New function.
4273 (spu_create_inferior): Adjust function prototype to reflect change
4274 on "target.h". Adjust function code to use "fork_inferior".
4275 * target.c (target_terminal_init): New function.
4276 (target_terminal_inferior): Likewise.
4277 (target_terminal_ours): Likewise.
4278 * target.h: Include <vector>.
4279 (struct target_ops) <create_inferior>: Update prototype.
4280 (create_inferior): Update macro.
4281 * utils.c (gdb_flush_out_err): New function.
4282 * win32-low.c (win32_create_inferior): Adjust function prototype
4283 and code to reflect change on "target.h".
4284
4285 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4286
4287 * inferiors.c (switch_to_thread): New function.
4288
4289 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4290
4291 * Makefile.in (SFILE): Add "common/job-control.c".
4292 (OBS): Add "job-control.o".
4293
4294 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4295
4296 * Makefile: Remove "@host_makefile_frag@".
4297
4298 2017-05-05 Pedro Alves <palves@redhat.com>
4299
4300 * configure: Regenerate.
4301
4302 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4303
4304 * configure: Regenerate.
4305
4306 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4307
4308 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4309 software_single_step change of return type to
4310 std::vector<CORE_ADDR>.
4311 * linux-low.c (install_software_single_step_breakpoints):
4312 Likewise.
4313 * linux-low.h (install_software_single_step_breakpoints):
4314 Likewise.
4315
4316 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4317
4318 * remote-utils.c: Include "gdb_termios.h" instead of
4319 "terminal.h".
4320 * terminal.h: Delete file.
4321
4322 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4323
4324 * server.c: Include <vector>.
4325 <program_argv, wrapper_argv>: Convert to std::vector.
4326 (start_inferior): Rewrite function to use C++.
4327 (handle_v_run): Likewise. Update code that calculates the argv
4328 based on the vRun packet; use C++.
4329 (captured_main): Likewise.
4330
4331 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4332
4333 * server.c (handle_v_cont): Initialize thread_resume::thread
4334 with null_ptid.
4335
4336 2017-04-05 Pedro Alves <palves@redhat.com>
4337
4338 * configure: Regenerate.
4339
4340 2017-04-05 Pedro Alves <palves@redhat.com>
4341
4342 * gdbreplay.c (sync_error): Constify.
4343 * linux-x86-low.c (push_opcode): Constify.
4344
4345 2017-04-05 Pedro Alves <palves@redhat.com>
4346
4347 * win32-low.c (get_child_debug_event)
4348 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4349 Report TARGET_WAITKIND_SPURIOUS instead.
4350
4351 2017-04-05 Pedro Alves <palves@redhat.com>
4352
4353 * remote-utils.c (remote_prepare, remote_open): Constify.
4354 * remote-utils.h (remote_prepare, remote_open): Constify.
4355 * server.c (captured_main): Constify 'port' handling.
4356
4357 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4358
4359 * Makefile.in (clean): Clear .deps.
4360
4361 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4362
4363 * .gitignore: Remove generated files, replace with wildcard.
4364 * (clean): Replace removal of generated files with wildcard.
4365 (version.c): Replace with...
4366 (version-generated.c): ...this.
4367 (xml-builtin.c): Replace with...
4368 (xml-builtin-generated.c): ...this.
4369 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4370 (%.c: *regformats*): Replace with...
4371 (%-generated.c: *regformats*): ...this.
4372
4373 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4374
4375 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4376 (xtensa_fill_gregset): Call collect_register_by_name for
4377 threadptr register.
4378 (xtensa_store_gregset): Call supply_register_by_name for
4379 threadptr register.
4380
4381 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4382
4383 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4384 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4385 (xtensa_store_gregset): Call supply_register for all registers in
4386 a0_regnum..a0_regnum + C0_NREGS range.
4387
4388 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4389
4390 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4391 (ax-ipa.o: ax.c): Remove.
4392 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4393 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4394 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4395 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4396 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4397
4398 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4399
4400 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4401 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4402 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4403 (errors-ipa.o: ../common/errors.c): Remove.
4404 (format-ipa.o: ../common/format.c): Remove.
4405 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4406
4407 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4408
4409 * Makefile.in (%-ipa.o: %.c): New rule.
4410 (tracepoint-ipa.o: tracepoint.c): Remove.
4411 (utils-ipa.o: utils.c): Remove.
4412 (remote-utils-ipa.o: remote-utils.c): Remove.
4413 (regcache-ipa.o: regcache.c): Remove.
4414 (i386-linux-ipa.o: i386-linux.c): Remove.
4415 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4416 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4417 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4418 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4419 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4420 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4421 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4422 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4423 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4424 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4425 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4426 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4427 (aarch64-ipa.o: aarch64.c): Remove.
4428 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4429 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4430 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4431 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4432 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4433 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4434 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4435 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4436 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4437 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4438 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4439 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4440 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4441 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4442 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4443 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4444 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4445 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4446 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4447 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4448 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4449 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4450 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4451 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4452 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4453 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4454 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4455 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4456 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4457 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4458 (tdesc-ipa.o: tdesc.c): Remove.
4459 (x32-linux-ipa.o: x32-linux.c): Remove.
4460 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4461 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4462
4463 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4464
4465 * Makefile.in (%.o: ../arch/%.c): New rule.
4466 (arm.o: ../arch/arm.c): Remove.
4467 (arm-linux.o: ../arch/arm-linux.c): Remove.
4468 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4469 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4470
4471 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4472
4473 * Makefile.in (%.o: ../nat/%.c): New rule.
4474 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4475 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4476 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4477 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4478 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4479 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4480 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4481 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4482 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4483 (linux-personality.o: ../nat/linux-personality.c): Remove.
4484 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4485 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4486 (x86-linux.o: ../nat/x86-linux.c): Remove.
4487 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4488 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4489
4490 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4491
4492 * Makefile.in (%.o: ../common/%.c): New rule.
4493 (signals.o: ../common/signals.c): Remove.
4494 (print-utils.o: ../common/print-utils.c): Remove.
4495 (rsp-low.o: ../common/rsp-low.c): Remove.
4496 (common-utils.o: ../common/common-utils.c): Remove.
4497 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4498 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4499 (vec.o: ../common/vec.c): Remove.
4500 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4501 (xml-utils.o: ../common/xml-utils.c): Remove.
4502 (ptid.o: ../common/ptid.c): Remove.
4503 (buffer.o: ../common/buffer.c): Remove.
4504 (format.o: ../common/format.c): Remove.
4505 (filestuff.o: ../common/filestuff.c): Remove.
4506 (agent.o: ../common/agent.c): Remove.
4507 (errors.o: ../common/errors.c): Remove.
4508 (environ.o: ../common/environ.c): Remove.
4509 (common-debug.o: ../common/common-debug.c): Remove.
4510 (cleanups.o: ../common/cleanups.c): Remove.
4511 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4512 (fileio.o: ../common/fileio.c): Remove.
4513 (common-regcache.o: ../common/common-regcache.c): Remove.
4514 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4515 (new-op.o: ../common/new-op.c): Remove.
4516 (btrace-common.o: ../common/btrace-common.c): Remove.
4517
4518 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4519
4520 * Makefile.in (%.o: ../target/%.c): New rule.
4521 (waitstatus.o: ../target/waitstatus.c): Remove.
4522
4523 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4524
4525 * Makefile.in
4526 (%.c: ../regformats/%.dat,
4527 (%.c: ../regformats/arm/%.dat,
4528 (%.c: ../regformats/i386/%.dat,
4529 (%.c: ../regformats/rs6000/%.dat): New rules.
4530 (aarch64.c): Remove.
4531 (reg-arm.c): Remove.
4532 (arm-with-iwmmxt.c): Remove.
4533 (arm-with-vfpv2.c): Remove.
4534 (arm-with-vfpv3.c): Remove.
4535 (arm-with-neon.c): Remove.
4536 (reg-bfin.c): Remove.
4537 (reg-cris.c): Remove.
4538 (reg-crisv32.c): Remove.
4539 (i386.c): Remove.
4540 (i386-linux.c): Remove.
4541 (i386-avx.c): Remove.
4542 (i386-avx-linux.c): Remove.
4543 (i386-avx-avx512.c): Remove.
4544 (i386-avx-avx512-linux.c): Remove.
4545 (i386-mpx.c): Remove.
4546 (i386-mpx-linux.c): Remove.
4547 (i386-avx-mpx-avx512-pku.c): Remove.
4548 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4549 (i386-avx-mpx.c): Remove.
4550 (i386-avx-mpx-linux.c): Remove.
4551 (i386-mmx.c): Remove.
4552 (i386-mmx-linux.c): Remove.
4553 (reg-ia64.c): Remove.
4554 (reg-m32r.c): Remove.
4555 (reg-m68k.c): Remove.
4556 (reg-cf.c): Remove.
4557 (mips-linux.c): Remove.
4558 (mips-dsp-linux.c): Remove.
4559 (mips64-linux.c): Remove.
4560 (mips64-dsp-linux.c): Remove.
4561 (nios2-linux.c): Remove.
4562 (powerpc-32.c): Remove.
4563 (powerpc-32l.c): Remove.
4564 (powerpc-altivec32l.c): Remove.
4565 (powerpc-cell32l.c): Remove.
4566 (powerpc-vsx32l.c): Remove.
4567 (powerpc-isa205-32l.c): Remove.
4568 (powerpc-isa205-altivec32l.c): Remove.
4569 (powerpc-isa205-vsx32l.c): Remove.
4570 (powerpc-e500l.c): Remove.
4571 (powerpc-64l.c): Remove.
4572 (powerpc-altivec64l.c): Remove.
4573 (powerpc-cell64l.c): Remove.
4574 (powerpc-vsx64l.c): Remove.
4575 (powerpc-isa205-64l.c): Remove.
4576 (powerpc-isa205-altivec64l.c): Remove.
4577 (powerpc-isa205-vsx64l.c): Remove.
4578 (s390-linux32.c): Remove.
4579 (s390-linux32v1.c): Remove.
4580 (s390-linux32v2.c): Remove.
4581 (s390-linux64.c): Remove.
4582 (s390-linux64v1.c): Remove.
4583 (s390-linux64v2.c): Remove.
4584 (s390-te-linux64.c): Remove.
4585 (s390-vx-linux64.c): Remove.
4586 (s390-tevx-linux64.c): Remove.
4587 (s390x-linux64.c): Remove.
4588 (s390x-linux64v1.c): Remove.
4589 (s390x-linux64v2.c): Remove.
4590 (s390x-te-linux64.c): Remove.
4591 (s390x-vx-linux64.c): Remove.
4592 (s390x-tevx-linux64.c): Remove.
4593 (tic6x-c64xp-linux.c): Remove.
4594 (tic6x-c64x-linux.c): Remove.
4595 (tic6x-c62x-linux.c): Remove.
4596 (reg-sh.c): Remove.
4597 (reg-sparc64.c): Remove.
4598 (reg-spu.c): Remove.
4599 (amd64.c): Remove.
4600 (amd64-linux.c): Remove.
4601 (amd64-avx.c): Remove.
4602 (amd64-avx-linux.c): Remove.
4603 (amd64-avx-avx512.c): Remove.
4604 (amd64-avx-avx512-linux.c): Remove.
4605 (amd64-mpx.c): Remove.
4606 (amd64-mpx-linux.c): Remove.
4607 (amd64-avx-mpx-avx512-pku.c): Remove.
4608 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4609 (amd64-avx-mpx.c): Remove.
4610 (amd64-avx-mpx-linux.c): Remove.
4611 (x32.c): Remove.
4612 (x32-linux.c): Remove.
4613 (x32-avx.c): Remove.
4614 (x32-avx-linux.c): Remove.
4615 (x32-avx-avx512.c): Remove.
4616 (x32-avx-avx512-linux.c): Remove.
4617 (reg-xtensa.c): Remove.
4618 (reg-tilegx.c): Remove.
4619 (reg-tilegx32.c): Remove.
4620
4621 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4622
4623 * Makefile.in (SFILES): Add "common/environ.c".
4624 (OBJS): Add "common/environ.h".
4625
4626 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4627
4628 * configure.ac: Check if the fs_base and gs_base members of
4629 `struct user_regs_struct' exist.
4630 * config.in: Regenerated.
4631 * configure: Likewise.
4632
4633 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4634
4635 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4636 target_read_memory.
4637 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4638 (get_next_pcs_syscall_next_pc): Likewise.
4639
4640 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4641
4642 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4643 * nto-x86-low.c: Likewise.
4644
4645 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4646
4647 * Makefile.in: Include disable-implicit-rules.mk.
4648
4649 2016-11-23 Pedro Alves <palves@redhat.com>
4650
4651 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4652 (debug_vprintf): Use std::chrono::steady_clock instead of
4653 gettimeofday. Use '.' instead of ':'.
4654 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4655 (get_timestamp): Use std::chrono::steady_clock instead of
4656 gettimeofday.
4657
4658 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4659
4660 * Makefile.in: Fix whitespace formatting.
4661
4662 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4663
4664 * Makefile.in (SFILES, OBS): Flatten list and order
4665 alphabetically.
4666
4667 2016-11-23 Pedro Alves <palves@redhat.com>
4668
4669 * event-loop.c (handle_file_event): Use warning.
4670 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4671 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4672 Use warning.
4673
4674 2016-11-23 Pedro Alves <palves@redhat.com>
4675
4676 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4677 output.
4678 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4679 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4680 debug_printf and debug_flush for debug output.
4681 * server.c (handle_general_set): Likewise.
4682 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4683 output.
4684
4685 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4686
4687 * Makefile.in (.c.o): Replace rule with ...
4688 (%.o: %.c): ... this one.
4689
4690 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4691
4692 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4693 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4694 make.
4695 * configure.ac: Remove checks for the make program.
4696 * configure: Re-generate.
4697
4698 2016-10-28 Pedro Alves <palves@redhat.com>
4699
4700 * Makefile.in (CXX_DIALECT): Get from configure.
4701 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4702 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4703 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4704 * config.in: Regenerate.
4705 * configure: Regenerate.
4706
4707 2016-10-27 Yao Qi <yao.qi@linaro.org>
4708
4709 * linux-low.c (linux_supports_range_stepping): Return true if
4710 can_software_single_step return true.
4711
4712 2016-10-27 Yao Qi <yao.qi@linaro.org>
4713
4714 * inferiors.c (find_inferior_in_random): New function.
4715 * inferiors.h (find_inferior_in_random): Declare.
4716 * linux-low.c (linux_wait_for_event_filtered): Call
4717 find_inferior_in_random instead of find_inferior.
4718
4719 2016-10-27 Yao Qi <yao.qi@linaro.org>
4720
4721 * linux-low.c (linux_wait_1): If single-step breakpoints are
4722 inserted, remove them.
4723
4724 2016-10-26 Pedro Alves <palves@redhat.com>
4725
4726 * linux-low.c (handle_extended_wait): Link parent/child fork
4727 threads.
4728 (linux_wait_1): Unlink them.
4729 (linux_set_resume_request): Ignore resume requests for
4730 already-resumed and unhandled fork child threads.
4731 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4732 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4733 New functions.
4734 (handle_v_requests) <vCont>: Don't call require_running.
4735 * server.h (in_queued_stop_replies): New declaration.
4736
4737 2016-10-24 Yao Qi <yao.qi@linaro.org>
4738
4739 PR server/20733
4740 * linux-aarch64-low.c (append_insns): Cast the return value to
4741 'uint32_t *'.
4742
4743 2016-10-10 Yao Qi <yao.qi@linaro.org>
4744
4745 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4746
4747 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4748
4749 * target.c (target_supports_multi_process): New function, moved
4750 from...
4751 * target.h (target_supports_multi_process): ... here. Remove
4752 macro.
4753
4754 2016-10-05 Tom Tromey <tom@tromey.com>
4755
4756 PR remote/20655:
4757 * tracepoint.c (handle_tracepoint_bkpts): Check
4758 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4759
4760 2016-10-05 Yao Qi <yao.qi@linaro.org>
4761
4762 * configure.srv: Update the path of arm-*.xml files.
4763
4764 2016-10-05 Terry Guo <terry.guo@arm.com>
4765 Yao Qi <yao.qi@linaro.org>
4766
4767 * Makefile.in: Adjust the path of rules.
4768 * configure.srv: Update the path of xml files.
4769 * regformats/arm-with-iwmmxt.dat: Regenerated.
4770 * regformats/arm-with-neon.dat: Likewise.
4771 * regformats/arm-with-vfpv2.dat: Likewise.
4772 * regformats/arm-with-vfpv3.dat Likewise.
4773
4774 2016-09-30 Yao Qi <yao.qi@linaro.org>
4775
4776 PR gdbserver/20627
4777 * target.c (target_stop_and_wait): Don't call
4778 target_continue_no_signal, use resume_stop instead.
4779
4780 2016-09-26 Yao Qi <yao.qi@linaro.org>
4781
4782 * linux-low.c (linux_wait_1): Call debug_exit.
4783
4784 2016-09-23 Pedro Alves <palves@redhat.com>
4785
4786 * Makefile.in (SFILES): Add common/new-op.c.
4787 (OBS): Add common/new-op.o.
4788 (new-op.o): New rule.
4789
4790 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4791
4792 * .gitinore: Ignore more files.
4793
4794 2016-09-21 Yao Qi <yao.qi@linaro.org>
4795
4796 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4797 23.
4798
4799 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4800
4801 * server.c (start_inferior): Call target_mourn_inferior instead of
4802 mourn_inferior; pass ptid_t argument to it.
4803 (resume): Likewise.
4804 (handle_target_event): Likewise.
4805 * target.c (target_mourn_inferior): New function.
4806 * target.h (mourn_inferior): Delete macro.
4807
4808 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4809
4810 * linux-low.c (lwp_is_stepping): New function.
4811
4812 2016-09-06 Carl Love <cel@us.ibm.com>
4813
4814 * server.c (start_inferior): Fixed comment, requested comment change
4815 didn't get updated correctly. Removed reference to ptrace () call as
4816 it is only true on Linux systems.
4817
4818 2016-09-06 Carl Love <cel@us.ibm.com>
4819
4820 * server.c (start_inferior): Do not call
4821 function target_post_create_inferior () if the
4822 inferior process has already exited.
4823
4824 2016-09-05 Pedro Alves <palves@redhat.com>
4825
4826 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4827 (COMPILE.pre, CC_LD): Use CXX directly.
4828 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4829 * acinclude.m4: Don't include build-with-cxx.m4.
4830 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4831 * configure: Regenerate.
4832
4833 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4834
4835 PR gdb/19495
4836 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4837 call writing data to own_buf.
4838
4839 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4840
4841 * target.c (mywait): Call target_wait instead of
4842 the_target->wait.
4843 (target_wait): New function.
4844
4845 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4846
4847 * server.c (start_inferior): New variable 'ptid'. Replace calls
4848 to the_target->resume by target_continue{,_no_signal}, depending
4849 on the case.
4850 * target.c (target_stop_and_wait): Call target_continue_no_signal
4851 instead of the_target->resume.
4852 (target_continue): New function.
4853
4854 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4855
4856 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4857
4858 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4859
4860 PR server/20491
4861 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4862 ps_prochandle.
4863 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4864 * linux-arm-low.c (ps_get_thread_area): Likewise.
4865 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4866 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4867 * linux-mips-low.c (ps_get_thread_area): Likewise.
4868 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4869 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4870 * linux-x86-low.c (ps_get_thread_area): Likewise.
4871 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4872
4873 2016-08-19 Pedro Alves <palves@redhat.com>
4874
4875 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4876
4877 2016-08-19 Pedro Alves <palves@redhat.com>
4878
4879 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4880 comment. Use memcpy instead of casting through unsigned long.
4881
4882 2016-08-19 Pedro Alves <palves@redhat.com>
4883
4884 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4885 allocating around 0x80000000.
4886
4887 2016-08-19 Pedro Alves <palves@redhat.com>
4888
4889 PR gdb/20415
4890 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4891 (x32-avx512-linux-ipa.o): New rules.
4892 * configure.ac (x86_64-*-linux*): New x32 check.
4893 * configure.srv (ipa_x32_linux_regobj): New.
4894 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4895 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4896 descriptions.
4897 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4898 descriptions.
4899 * configure: Regenerate.
4900
4901 2016-08-09 Pedro Alves <palves@redhat.com>
4902
4903 PR gdb/18653
4904 * Makefile.in (OBS): Add signals-state-save-restore.o.
4905 (signals-state-save-restore.o): New rule.
4906 * config.in: Regenerate.
4907 * configure: Regenerate.
4908 * linux-low.c: Include "signals-state-save-restore.h".
4909 (linux_create_inferior): Call
4910 restore_original_signals_state.
4911 * server.c: Include "dispositions-save-restore.h".
4912 (captured_main): Call save_original_signals_state.
4913
4914 2016-08-05 Pedro Alves <palves@redhat.com>
4915
4916 * configure: Regenerate.
4917
4918 2016-08-04 Yao Qi <yao.qi@linaro.org>
4919
4920 * linux-low.c (regsets_fetch_inferior_registers): Check
4921 errno is ESRCH or not.
4922
4923 2016-08-02 Yao Qi <yao.qi@linaro.org>
4924
4925 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4926 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4927 (thread_db_load_search): Update.
4928 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4929 td_ta_set_event and td_ta_event_getmsg.
4930
4931 2016-07-26 Pedro Alves <palves@redhat.com>
4932
4933 PR server/20414
4934 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4935 of unsigned long for 64-bit registers and use uint32_t instead of
4936 unsigned int for 32-bit registers.
4937
4938 2016-07-26 Pedro Alves <palves@redhat.com>
4939
4940 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4941 to 'ptrace'.
4942
4943 2016-07-21 Tom Tromey <tom@tromey.com>
4944
4945 * configure: Rebuild.
4946
4947 2016-07-21 Yao Qi <yao.qi@linaro.org>
4948
4949 * mem-break.c (find_gdb_breakpoint): Cast bp to
4950 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4951
4952 2016-07-21 Yao Qi <yao.qi@linaro.org>
4953
4954 * server.c (handle_v_requests): Support s and S actions
4955 if target_supports_software_single_step return true.
4956
4957 2016-07-21 Yao Qi <yao.qi@linaro.org>
4958
4959 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4960 is resume_step, call maybe_hw_step.
4961 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4962 and unstop them.
4963 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4964 breakpoints or not.
4965 (proceed_one_lwp): If resume request is resume_step, install
4966 reinsert breakpoints and call maybe_hw_step.
4967
4968 2016-07-21 Yao Qi <yao.qi@linaro.org>
4969
4970 * linux-low.c (proceed_one_lwp): Declare.
4971 (linux_resume_one_thread): Remove local variable 'step'.
4972 Lift code enqueue signal. Call proceed_one_lwp instead of
4973 linux_resume_one_lwp.
4974
4975 2016-07-21 Yao Qi <yao.qi@linaro.org>
4976
4977 * linux-low.c (linux_resume_one_thread): Call
4978 enqueue_pending_signal.
4979
4980 2016-07-21 Yao Qi <yao.qi@linaro.org>
4981
4982 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
4983 * inferiors.c (do_restore_current_thread_cleanup): New function.
4984 (make_cleanup_restore_current_thread): Likewise.
4985 * linux-low.c (install_software_single_step_breakpoints): Call
4986 make_cleanup_restore_current_thread. Switch current_thread to
4987 thread.
4988
4989 2016-07-21 Yao Qi <yao.qi@linaro.org>
4990
4991 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
4992 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
4993 (clone_one_breakpoint): Likewise.
4994 (delete_reinsert_breakpoints): Change parameter to thread.
4995 Callers updated.
4996 (has_reinsert_breakpoints): Likewise.
4997 (uninsert_reinsert_breakpoints): Likewise.
4998 (reinsert_reinsert_breakpoints): Likewise.
4999 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5000 (delete_reinsert_breakpoints): Likewise.
5001 (reinsert_reinsert_breakpoints): Likewise.
5002 (uninsert_reinsert_breakpoints): Likewise.
5003 (has_reinsert_breakpoints): Likewise.
5004
5005 2016-07-21 Yao Qi <yao.qi@linaro.org>
5006
5007 * inferiors.c (get_thread_process): Make parameter const.
5008 * inferiors.h (get_thread_process): Update declaration.
5009 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5010 Add new parameters child_thread and parent_thread. Callers
5011 updated.
5012 * mem-break.h (clone_all_breakpoints): Update declaration.
5013
5014 2016-07-21 Yao Qi <yao.qi@linaro.org>
5015
5016 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5017 <command_list, handler>: Remove.
5018 (struct gdb_breakpoint): New.
5019 (struct other_breakpoint): New.
5020 (struct reinsert_breakpoint): New.
5021 (is_gdb_breakpoint): New function.
5022 (any_persistent_commands): Update command_list if
5023 is_gdb_breakpoint returns true.
5024 (set_breakpoint): Create breakpoints according to their types.
5025 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5026 (set_gdb_breakpoint_1): Likewise.
5027 (set_gdb_breakpoint): Likewise.
5028 (clear_breakpoint_conditions): Change parameter type to
5029 'struct gdb_breakpoint *'.
5030 (clear_breakpoint_commands): Likewise.
5031 (clear_breakpoint_conditions_and_commands): Likewise.
5032 (add_condition_to_breakpoint): Likewise.
5033 (add_breakpoint_condition): Likewise.
5034 (add_commands_to_breakpoint): Likewise.
5035 (check_breakpoints): Check other_breakpoint.
5036 (clone_one_breakpoint): Clone breakpopint according to its type.
5037 * mem-break.h (struct gdb_breakpoint): Declare.
5038 (set_gdb_breakpoint): Update declaration.
5039 (clear_breakpoint_conditions_and_commands): Likewise.
5040 (add_breakpoint_condition): Likewise.
5041 (add_breakpoint_commands): Likewise.
5042 * server.c (process_point_options): Change parameter type to
5043 'struct gdb_breakpoint *'.
5044
5045 2016-07-21 Yao Qi <yao.qi@linaro.org>
5046
5047 * mem-break.c (set_breakpoint_at): Rename it to ...
5048 (set_breakpoint_type_at): ... it.
5049 (set_breakpoint_at): Call set_breakpoint_type_at.
5050 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5051 * mem-break.h (set_breakpoint_at): Update comments.
5052
5053 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5054
5055 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5056 to buf parameter.
5057 (nios2_store_gregset): Likewise.
5058
5059 2016-07-01 Pedro Alves <palves@redhat.com>
5060 Antoine Tremblay <antoine.tremblay@ericsson.com>
5061
5062 * linux-low.c: Change interface to take the target lwp_info
5063 pointer directly and return void. Handle detaching from a zombie
5064 thread.
5065 (linux_detach_lwp_callback): New function.
5066 (linux_detach): Detach from the leader thread after detaching from
5067 the clone threads.
5068
5069 2016-06-28 Yao Qi <yao.qi@linaro.org>
5070
5071 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5072 for variable new_offset.
5073 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5074 (aarch64_ftrace_insn_reloc_cb): Likewise.
5075 (aarch64_ftrace_insn_reloc_tb): Likewise.
5076 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5077 PRIx64 instead of PRIx32.
5078
5079 2016-06-28 Yao Qi <yao.qi@linaro.org>
5080
5081 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5082 (the_low_target): Install arm_get_syscall_trapinfo.
5083
5084 2016-06-28 Yao Qi <yao.qi@linaro.org>
5085
5086 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5087 function.
5088 (the_low_target): Install aarch64_get_syscall_trapinfo.
5089
5090 2016-06-28 Yao Qi <yao.qi@linaro.org>
5091
5092 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5093 Callers updated.
5094 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5095 Remove parameter sysno.
5096 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5097 sysret.
5098
5099 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5100
5101 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5102 (s390_emit_ne_goto): Likewise.
5103 (s390_emit_lt_goto): Likewise.
5104 (s390_emit_le_goto): Likewise.
5105 (s390_emit_gt_goto): Likewise.
5106 (s390_emit_ge_goto): Likewise.
5107 (s390x_emit_eq_goto): Likewise.
5108 (s390x_emit_ne_goto): Likewise.
5109 (s390x_emit_lt_goto): Likewise.
5110 (s390x_emit_le_goto): Likewise.
5111 (s390x_emit_gt_goto): Likewise.
5112 (s390x_emit_ge_goto): Likewise.
5113 (s390_emit_ops_impl): Mark variable static.
5114 (s390x_emit_ops): Likewise.
5115
5116 2016-06-17 Yao Qi <yao.qi@linaro.org>
5117
5118 * linux-low.c (handle_extended_wait): Call
5119 uninsert_reinsert_breakpoints for the parent process. Remove
5120 reinsert breakpoints from the child process. Reinsert them to
5121 the parent process when vfork is done.
5122 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5123 (reinsert_reinsert_breakpoints): New function.
5124 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5125 (reinsert_reinsert_breakpoints): Declare.
5126
5127 2016-06-17 Yao Qi <yao.qi@linaro.org>
5128
5129 * linux-low.c (handle_extended_wait): If the parent is doing
5130 step-over, remove the reinsert breakpoints from the forked child.
5131
5132 2016-06-17 Yao Qi <yao.qi@linaro.org>
5133
5134 * linux-low.c (unsuspend_all_lwps): Declare.
5135 (linux_low_filter_event): If thread exited, call finish_step_over.
5136 If step-over is finished, unsuspend other threads.
5137
5138 2016-06-17 Yao Qi <yao.qi@linaro.org>
5139
5140 * linux-low.c (linux_resume_one_lwp_throw): Assert
5141 has_reinsert_breakpoints returns false.
5142 * mem-break.c (delete_disabled_breakpoints): Assert
5143 bp type isn't reinsert_breakpoint.
5144
5145 2016-06-17 Yao Qi <yao.qi@linaro.org>
5146
5147 * linux-low.c (maybe_hw_step): New function.
5148 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5149 (finish_step_over): Switch current_thread to lwp temporarily,
5150 and assert has_reinsert_breakpoints returns true.
5151 (proceed_one_lwp): Call maybe_hw_step.
5152 * mem-break.c (has_reinsert_breakpoints): New function.
5153 * mem-break.h (has_reinsert_breakpoints): Declare.
5154
5155 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5156
5157 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5158
5159 2016-05-17 Yao Qi <yao.qi@linaro.org>
5160
5161 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5162 instead of find_inferior.
5163
5164 2016-05-05 Yao Qi <yao.qi@linaro.org>
5165
5166 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5167 Initialize res to zero.
5168
5169 2016-05-05 Yao Qi <yao.qi@linaro.org>
5170
5171 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5172 to uint32_t.
5173
5174 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5175
5176 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5177 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5178 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5179
5180 2016-04-28 Par Olsson <par.olsson@windriver.com>
5181 Simon Marchi <simon.marchi@ericsson.com>
5182
5183 * tracepoint.c (write_inferior_int8): New function.
5184 (cmd_qtenable_disable): Write enable flag using
5185 write_inferior_int8.
5186
5187 2016-04-25 Yao Qi <yao.qi@linaro.org>
5188
5189 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5190 (need_step_over_p): Return zero if the LWP has pending signals
5191 can be delivered on software single step target.
5192
5193 2016-04-25 Yao Qi <yao.qi@linaro.org>
5194
5195 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5196 return instead of error.
5197
5198 2016-04-22 Yao Qi <yao.qi@linaro.org>
5199
5200 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5201 to 23.
5202
5203 2016-04-22 Yao Qi <yao.qi@linaro.org>
5204
5205 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5206 signal when stepping over breakpoint with software single
5207 step.
5208
5209 2016-04-21 Pedro Alves <palves@redhat.com>
5210
5211 * linux-s390-low.c (s390_collect_ptrace_register)
5212 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5213 add casts.
5214 (s390_check_regset): Use void * instead of gdb_byte *.
5215
5216 2016-04-20 Pedro Alves <palves@redhat.com>
5217
5218 * configure: Renegerate.
5219
5220 2016-04-20 Yao Qi <yao.qi@linaro.org>
5221
5222 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5223 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5224 number 16.
5225 (arm_store_gregset): Likewise.
5226
5227 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5228
5229 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5230 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5231 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5232 (amd64-avx-mpx-linux.c): New rules.
5233 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5234 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5235 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5236 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5237 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5238 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5239 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5240 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5241 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5242 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5243 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5244 * linux-x86-low.c (x86_linux_read_description): Add case for
5245 X86_XSTATE_AVX_MPX_MASK.
5246 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5247 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5248 init_registers_i386_avx_mpx_linux.
5249 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5250 (initialize_low_tracepoint): Call
5251 init_registers_i386_avx_mpx_linux.
5252 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5253 (initialize_low_tracepoint): Call
5254 init_registers_amd64_avx_mpx_linux.
5255 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5256 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5257 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5258 declarations.
5259
5260 2016-04-18 Pedro Alves <palves@redhat.com>
5261
5262 * configure: Regenerate.
5263
5264 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5265
5266 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5267 (aarch64_emit_sub): Likewise.
5268
5269 2016-04-12 Pedro Alves <palves@redhat.com>
5270
5271 * utils.c (prepare_to_throw_exception): Delete.
5272
5273 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5274
5275 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5276
5277 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5278
5279 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5280
5281 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5282
5283 * linux-aarch64-ipa.c: Add <elf.h> include.
5284 * linux-ppc-ipa.c: Add <elf.h> include.
5285 * linux-s390-ipa.c: Add <elf.h> include.
5286
5287 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5288
5289 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5290 (get_raw_reg_ptr): Likewise.
5291 (get_trace_state_variable_value_ptr): Likewise.
5292 (set_trace_state_variable_value_ptr): Likewise.
5293 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5294 char *.
5295
5296 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5297 Marcin Kościelnicki <koriakin@0x04.net>
5298
5299 PR/17221
5300 * linux-ppc-low.c (emit_insns): New function.
5301 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5302 (ppc_emit_prologue): New function.
5303 (ppc_emit_epilogue): New function.
5304 (ppc_emit_add): New function.
5305 (ppc_emit_sub): New function.
5306 (ppc_emit_mul): New function.
5307 (ppc_emit_lsh): New function.
5308 (ppc_emit_rsh_signed): New function.
5309 (ppc_emit_rsh_unsigned): New function.
5310 (ppc_emit_ext): New function.
5311 (ppc_emit_zero_ext): New function.
5312 (ppc_emit_log_not): New function.
5313 (ppc_emit_bit_and): New function.
5314 (ppc_emit_bit_or): New function.
5315 (ppc_emit_bit_xor): New function.
5316 (ppc_emit_bit_not): New function.
5317 (ppc_emit_equal): New function.
5318 (ppc_emit_less_signed): New function.
5319 (ppc_emit_less_unsigned): New function.
5320 (ppc_emit_ref): New function.
5321 (ppc_emit_const): New function.
5322 (ppc_emit_reg): New function.
5323 (ppc_emit_pop): New function.
5324 (ppc_emit_stack_flush): New function.
5325 (ppc_emit_swap): New function.
5326 (ppc_emit_stack_adjust): New function.
5327 (ppc_emit_call): New function.
5328 (ppc_emit_int_call_1): New function.
5329 (ppc_emit_void_call_2): New function.
5330 (ppc_emit_if_goto): New function.
5331 (ppc_emit_goto): New function.
5332 (ppc_emit_eq_goto): New function.
5333 (ppc_emit_ne_goto): New function.
5334 (ppc_emit_lt_goto): New function.
5335 (ppc_emit_le_goto): New function.
5336 (ppc_emit_gt_goto): New function.
5337 (ppc_emit_ge_goto): New function.
5338 (ppc_write_goto_address): New function.
5339 (ppc_emit_ops_impl): New static variable.
5340 (ppc64v1_emit_prologue): New function.
5341 (ppc64v2_emit_prologue): New function.
5342 (ppc64_emit_epilogue): New function.
5343 (ppc64_emit_add): New function.
5344 (ppc64_emit_sub): New function.
5345 (ppc64_emit_mul): New function.
5346 (ppc64_emit_lsh): New function.
5347 (ppc64_emit_rsh_signed): New function.
5348 (ppc64_emit_rsh_unsigned): New function.
5349 (ppc64_emit_ext): New function.
5350 (ppc64_emit_zero_ext): New function.
5351 (ppc64_emit_log_not): New function.
5352 (ppc64_emit_bit_and): New function.
5353 (ppc64_emit_bit_or): New function.
5354 (ppc64_emit_bit_xor): New function.
5355 (ppc64_emit_bit_not): New function.
5356 (ppc64_emit_equal): New function.
5357 (ppc64_emit_less_signed): New function.
5358 (ppc64_emit_less_unsigned): New function.
5359 (ppc64_emit_ref): New function.
5360 (ppc64_emit_const): New function.
5361 (ppc64v1_emit_reg): New function.
5362 (ppc64v2_emit_reg): New function.
5363 (ppc64_emit_pop): New function.
5364 (ppc64_emit_stack_flush): New function.
5365 (ppc64_emit_swap): New function.
5366 (ppc64v1_emit_call): New function.
5367 (ppc64v2_emit_call): New function.
5368 (ppc64v1_emit_int_call_1): New function.
5369 (ppc64v2_emit_int_call_1): New function.
5370 (ppc64v1_emit_void_call_2): New function.
5371 (ppc64v2_emit_void_call_2): New function.
5372 (ppc64_emit_if_goto): New function.
5373 (ppc64_emit_eq_goto): New function.
5374 (ppc64_emit_ne_goto): New function.
5375 (ppc64_emit_lt_goto): New function.
5376 (ppc64_emit_le_goto): New function.
5377 (ppc64_emit_gt_goto): New function.
5378 (ppc64_emit_ge_goto): New function.
5379 (ppc64v1_emit_ops_impl): New static variable.
5380 (ppc64v2_emit_ops_impl): New static variable.
5381 (ppc_emit_ops): New function.
5382 (linux_low_target): Wire in ppc_emit_ops.
5383
5384 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5385 Marcin Kościelnicki <koriakin@0x04.net>
5386
5387 PR/17221
5388 * Makefile.in: Add powerpc-*-ipa.o
5389 * configure.srv: Add ipa_obj for powerpc*-linux.
5390 * linux-ppc-ipa.c: New file.
5391 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5392 includes.
5393 (PPC_FIELD): New macro.
5394 (PPC_SEXT): New macro.
5395 (PPC_OP6): New macro.
5396 (PPC_BO): New macro.
5397 (PPC_LI): New macro.
5398 (PPC_BD): New macro.
5399 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5400 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5401 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5402 (ppc_get_thread_area): New function.
5403 (is_elfv2_inferior): New function.
5404 (gen_ds_form): New function.
5405 (GEN_STD): New macro.
5406 (GEN_STDU): New macro.
5407 (GEN_LD): New macro.
5408 (GEN_LDU): New macro.
5409 (gen_d_form): New function.
5410 (GEN_ADDI): New macro.
5411 (GEN_ADDIS): New macro.
5412 (GEN_LI): New macro.
5413 (GEN_LIS): New macro.
5414 (GEN_ORI): New macro.
5415 (GEN_ORIS): New macro.
5416 (GEN_LWZ): New macro.
5417 (GEN_STW): New macro.
5418 (GEN_STWU): New macro.
5419 (gen_xfx_form): New function.
5420 (GEN_MFSPR): New macro.
5421 (GEN_MTSPR): New macro.
5422 (GEN_MFCR): New macro.
5423 (GEN_MTCR): New macro.
5424 (GEN_SYNC): New macro.
5425 (GEN_LWSYNC): New macro.
5426 (gen_x_form): New function.
5427 (GEN_OR): New macro.
5428 (GEN_MR): New macro.
5429 (GEN_LWARX): New macro.
5430 (GEN_STWCX): New macro.
5431 (GEN_CMPW): New macro.
5432 (gen_md_form): New function.
5433 (GEN_RLDICL): New macro.
5434 (GEN_RLDICR): New macro.
5435 (gen_i_form): New function.
5436 (GEN_B): New macro.
5437 (GEN_BL): New macro.
5438 (gen_b_form): New function.
5439 (GEN_BNE): New macro.
5440 (GEN_LOAD): New macro.
5441 (GEN_STORE): New macro.
5442 (gen_limm): New function.
5443 (gen_atomic_xchg): New function.
5444 (gen_call): New function.
5445 (ppc_relocate_instruction): New function.
5446 (ppc_install_fast_tracepoint_jump_pad): New function.
5447 (ppc_get_min_fast_tracepoint_insn_len): New function.
5448 (ppc_get_ipa_tdesc_idx): New function.
5449 (the_low_target): Wire in the new functions.
5450 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5451 tdescs.
5452 * linux-ppc-tdesc.h: New file.
5453
5454 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5455
5456 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5457 (alloc_jump_pad_buffer): New function.
5458 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5459 (alloc_jump_pad_buffer): New function.
5460 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5461 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5462 (alloc_jump_pad_buffer): New function.
5463 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5464 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5465 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5466 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5467
5468 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5469
5470 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5471 * linux-amd64-ipa.c: Likewise.
5472 * linux-i386-ipa.c: Likewise.
5473 * linux-s390-ipa.c: Likewise.
5474 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5475 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5476 set_trace_state_variable_value_ptr.
5477 (struct ipa_sym_addresses): Likewise.
5478 (symbol_list): Likewise.
5479 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5480 accessing gdb_collect directly.
5481 (gdb_collect_ptr_type): New typedef.
5482 (get_raw_reg_ptr_type): New typedef.
5483 (get_trace_state_variable_value_ptr_type): New typedef.
5484 (set_trace_state_variable_value_ptr_type): New typedef.
5485 (gdb_collect_ptr): New global.
5486 (get_raw_reg_ptr): New global.
5487 (get_trace_state_variable_value_ptr): New global.
5488 (set_trace_state_variable_value_ptr): New global.
5489 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5490 accessing get_raw_reg directly.
5491 (get_get_tsv_func_addr): Likewise for
5492 get_trace_state_variable_value_ptr.
5493 (get_set_tsv_func_addr): Likewise for
5494 set_trace_state_variable_value_ptr.
5495 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5496
5497 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5498
5499 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5500
5501 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5502
5503 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5504 packets.
5505 (relocate_instruction): Remove own_buf.
5506 * server.c (own_buf): Make global.
5507 (handle_v_requests): Make global.
5508 * server.h (own_buf): New declaration.
5509 (handle_v_requests): New prototype.
5510
5511 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5512
5513 PR 18377
5514 * linux-s390-low.c (add_insns): New function.
5515 (s390_emit_prologue): New function.
5516 (s390_emit_epilogue): New function.
5517 (s390_emit_add): New function.
5518 (s390_emit_sub): New function.
5519 (s390_emit_mul): New function.
5520 (s390_emit_lsh): New function.
5521 (s390_emit_rsh_signed): New function.
5522 (s390_emit_rsh_unsigned): New function.
5523 (s390_emit_ext): New function.
5524 (s390_emit_log_not): New function.
5525 (s390_emit_bit_and): New function.
5526 (s390_emit_bit_or): New function.
5527 (s390_emit_bit_xor): New function.
5528 (s390_emit_bit_not): New function.
5529 (s390_emit_equal): New function.
5530 (s390_emit_less_signed): New function.
5531 (s390_emit_less_unsigned): New function.
5532 (s390_emit_ref): New function.
5533 (s390_emit_if_goto): New function.
5534 (s390_emit_goto): New function.
5535 (s390_write_goto_address): New function.
5536 (s390_emit_litpool): New function.
5537 (s390_emit_const): New function.
5538 (s390_emit_call): New function.
5539 (s390_emit_reg): New function.
5540 (s390_emit_pop): New function.
5541 (s390_emit_stack_flush): New function.
5542 (s390_emit_zero_ext): New function.
5543 (s390_emit_swap): New function.
5544 (s390_emit_stack_adjust): New function.
5545 (s390_emit_set_r2): New function.
5546 (s390_emit_int_call_1): New function.
5547 (s390_emit_void_call_2): New function.
5548 (s390_emit_eq_goto): New function.
5549 (s390_emit_ne_goto): New function.
5550 (s390_emit_lt_goto): New function.
5551 (s390_emit_le_goto): New function.
5552 (s390_emit_gt_goto): New function.
5553 (s390_emit_ge_goto): New function.
5554 (s390x_emit_prologue): New function.
5555 (s390x_emit_epilogue): New function.
5556 (s390x_emit_add): New function.
5557 (s390x_emit_sub): New function.
5558 (s390x_emit_mul): New function.
5559 (s390x_emit_lsh): New function.
5560 (s390x_emit_rsh_signed): New function.
5561 (s390x_emit_rsh_unsigned): New function.
5562 (s390x_emit_ext): New function.
5563 (s390x_emit_log_not): New function.
5564 (s390x_emit_bit_and): New function.
5565 (s390x_emit_bit_or): New function.
5566 (s390x_emit_bit_xor): New function.
5567 (s390x_emit_bit_not): New function.
5568 (s390x_emit_equal): New function.
5569 (s390x_emit_less_signed): New function.
5570 (s390x_emit_less_unsigned): New function.
5571 (s390x_emit_ref): New function.
5572 (s390x_emit_if_goto): New function.
5573 (s390x_emit_const): New function.
5574 (s390x_emit_call): New function.
5575 (s390x_emit_reg): New function.
5576 (s390x_emit_pop): New function.
5577 (s390x_emit_stack_flush): New function.
5578 (s390x_emit_zero_ext): New function.
5579 (s390x_emit_swap): New function.
5580 (s390x_emit_stack_adjust): New function.
5581 (s390x_emit_int_call_1): New function.
5582 (s390x_emit_void_call_2): New function.
5583 (s390x_emit_eq_goto): New function.
5584 (s390x_emit_ne_goto): New function.
5585 (s390x_emit_lt_goto): New function.
5586 (s390x_emit_le_goto): New function.
5587 (s390x_emit_gt_goto): New function.
5588 (s390x_emit_ge_goto): New function.
5589 (s390_emit_ops): New function.
5590 (struct linux_target_ops): Fill in emit_ops hook.
5591
5592 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5593
5594 PR 18377
5595 * Makefile.in: Add s390 IPA files.
5596 * configure.srv: Build IPA for s390.
5597 * linux-s390-ipa.c: New file.
5598 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5599 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5600 (tdesc_s390_linux32): Likewise.
5601 (init_registers_s390_linux32v1): Likewise.
5602 (tdesc_s390_linux32v1): Likewise.
5603 (init_registers_s390_linux32v2): Likewise.
5604 (tdesc_s390_linux32v2): Likewise.
5605 (init_registers_s390_linux64): Likewise.
5606 (tdesc_s390_linux64): Likewise.
5607 (init_registers_s390_linux64v1): Likewise.
5608 (tdesc_s390_linux64v1): Likewise.
5609 (init_registers_s390_linux64v2): Likewise.
5610 (tdesc_s390_linux64v2): Likewise.
5611 (init_registers_s390_te_linux64): Likewise.
5612 (tdesc_s390_te_linux64): Likewise.
5613 (init_registers_s390_vx_linux64): Likewise.
5614 (tdesc_s390_vx_linux64): Likewise.
5615 (init_registers_s390_tevx_linux64): Likewise.
5616 (tdesc_s390_tevx_linux64): Likewise.
5617 (init_registers_s390x_linux64): Likewise.
5618 (tdesc_s390x_linux64): Likewise.
5619 (init_registers_s390x_linux64v1): Likewise.
5620 (tdesc_s390x_linux64v1): Likewise.
5621 (init_registers_s390x_linux64v2): Likewise.
5622 (tdesc_s390x_linux64v2): Likewise.
5623 (init_registers_s390x_te_linux64): Likewise.
5624 (tdesc_s390x_te_linux64): Likewise.
5625 (init_registers_s390x_vx_linux64): Likewise.
5626 (tdesc_s390x_vx_linux64): Likewise.
5627 (init_registers_s390x_tevx_linux64): Likewise.
5628 (tdesc_s390x_tevx_linux64): Likewise.
5629 (have_hwcap_s390_vx): New static variable.
5630 (s390_arch_setup): Fill have_hwcap_s390_vx.
5631 (s390_get_thread_area): New function.
5632 (s390_ft_entry_gpr_esa): New const.
5633 (s390_ft_entry_gpr_zarch): New const.
5634 (s390_ft_entry_misc): New const.
5635 (s390_ft_entry_fr): New const.
5636 (s390_ft_entry_vr): New const.
5637 (s390_ft_main_31): New const.
5638 (s390_ft_main_64): New const.
5639 (s390_ft_exit_fr): New const.
5640 (s390_ft_exit_vr): New const.
5641 (s390_ft_exit_misc): New const.
5642 (s390_ft_exit_gpr_esa): New const.
5643 (s390_ft_exit_gpr_zarch): New const.
5644 (append_insns): New function.
5645 (s390_relocate_instruction): New function.
5646 (s390_install_fast_tracepoint_jump_pad): New function.
5647 (s390_get_min_fast_tracepoint_insn_len): New function.
5648 (s390_get_ipa_tdesc_idx): New function.
5649 (struct linux_target_ops): Wire in the above functions.
5650 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5651 * linux-s390-tdesc.h: New file.
5652
5653 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5654
5655 * linux-s390-low.c (s390_supports_tracepoints): New function.
5656 (struct linux_target_ops): Fill supports_tracepoints hook.
5657
5658 2016-03-18 Yao Qi <yao.qi@linaro.org>
5659
5660 * linux-low.c (lwp_signal_can_be_delivered): New function.
5661 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5662
5663 2016-03-18 Yao Qi <yao.qi@linaro.org>
5664
5665 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5666 0 if signal is enqueued. Remove 'signal' from one debugging
5667 message. Move one debugging message to some lines below.
5668 Remove code setting 'signal' to 0.
5669
5670 2016-03-18 Yao Qi <yao.qi@linaro.org>
5671
5672 * linux-low.c (linux_low_filter_event): Remove redundant
5673 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5674
5675 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5676
5677 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5678 (struct linux_target_ops): Wire in the above.
5679
5680 2016-03-03 Yao Qi <yao.qi@linaro.org>
5681
5682 * linux-low.c: Update comments to start_step_over.
5683
5684 2016-03-03 Yao Qi <yao.qi@linaro.org>
5685
5686 PR server/19736
5687 * linux-low.c (handle_extended_wait): Set child suspended
5688 if event_lwp->bp_reinsert isn't zero.
5689
5690 2016-03-02 Yao Qi <yao.qi@linaro.org>
5691
5692 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5693 enqueue_pending_signal.
5694
5695 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5696
5697 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5698 is actually loaded.
5699
5700 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5701
5702 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5703 (s390_regmap_3264) [!__s390x__]: New global.
5704 (s390_collect_ptrace_register): Skip map entries containing -1.
5705 (s390_supply_ptrace_register): Ditto.
5706 (s390_fill_gprs_high): New function.
5707 (s390_store_gprs_high): New function.
5708 (s390_regsets): Add NT_S390_HIGH_GPRS.
5709 (s390_get_hwcap): Enable on 31-bit.
5710 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5711 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5712 Detect NT_S390_HIGH_GPRS.
5713 (s390_usrregs_info_3264): Enable on 31-bit.
5714 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5715 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5716
5717 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5718
5719 PR gdb/13808
5720 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5721 * configure.srv: Ditto.
5722 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5723 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5724 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5725 (init_registers_amd64_linux): Remove prototype.
5726 (tdesc_amd64_linux): Remove declaration.
5727 (get_ipa_tdesc): New function.
5728 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5729 initialize remaining tdescs.
5730 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5731 (init_registers_i386_linux): Remove prototype.
5732 (tdesc_i386_linux): Remove declaration.
5733 (get_ipa_tdesc): New function.
5734 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5735 initialize remaining tdescs.
5736 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5737 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5738 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5739 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5740 (x86_get_ipa_tdesc_idx): New function.
5741 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5742 * linux-x86-tdesc.h: New file.
5743 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5744 (target_get_ipa_tdesc_idx): New macro.
5745 * tracepoint.c (ipa_tdesc_idx): New macro.
5746 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5747 (symbol_list): Add ipa_tdesc_idx.
5748 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5749 (ipa_tdesc): Remove.
5750 (ipa_tdesc_idx): New variable.
5751 (get_context_regcache): Use get_ipa_tdesc.
5752 (gdb_collect): Ditto.
5753 (gdb_probe): Ditto.
5754 * tracepoint.h (get_ipa_tdesc): New prototype.
5755 (ipa_tdesc): Remove.
5756
5757 2016-02-24 Pedro Alves <palves@redhat.com>
5758
5759 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5760 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5761 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5762 Factor out common code between the USE_SIGTRAP_SIGINFO and
5763 !USE_SIGTRAP_SIGINFO blocks.
5764 (linux_low_filter_event): Call save_stop_reason instead of
5765 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5766 Update comments.
5767 (linux_wait_1): Update comments.
5768
5769 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5770
5771 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5772 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5773 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5774 ppc_insert_point, ppc_remove_point.
5775
5776 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5777
5778 * linux-s390-low.c (s390_supports_z_point_type): New function.
5779 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5780
5781 2016-02-16 Yao Qi <yao.qi@linaro.org>
5782
5783 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5784 PC. Get pc from regcache_read_pc.
5785
5786 2016-02-12 Yao Qi <yao.qi@linaro.org>
5787
5788 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5789 or linux_get_pc_32bit.
5790 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5791
5792 2016-02-12 Yao Qi <yao.qi@linaro.org>
5793
5794 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5795 arm_linux_get_next_pcs_fixup.
5796
5797 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5798
5799 * tracepoint.c (x_tracepoint_action_download): Change
5800 write_inferior_data_ptr to write_inferior_data_pointer.
5801 (cmd_qtstart): Likewise.
5802 (write_inferior_data_ptr): Remove.
5803 (download_agent_expr): Change write_inferior_data_ptr to
5804 write_inferior_data_pointer.
5805 (download_tracepoint_1): Likewise.
5806 (download_tracepoint): Likewise.
5807 (download_trace_state_variables): Likewise.
5808
5809 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5810 Marcin Kościelnicki <koriakin@0x04.net>
5811
5812 * tracepoint.c (struct tracepoint_action_ops): Remove.
5813 (struct tracepoint_action): Remove ops.
5814 (m_tracepoint_action_download, r_tracepoint_action_download)
5815 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5816 size and offset accordingly.
5817 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5818 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5819 (tracepoint_action_send, tracepoint_action_download): New functions.
5820 Helpers for trace action handlers.
5821 (add_tracepoint_action): Remove setup actions ops.
5822 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5823
5824 2016-02-10 Yao Qi <yao.qi@linaro.org>
5825
5826 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5827
5828 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5829
5830 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5831 to AC_OUTPUT.
5832 * configure: Regenerate.
5833
5834 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5835
5836 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5837 void * to gdb_byte *.
5838 * linux-low.c (siginfo_fixup): Likewise.
5839 (linux_xfer_siginfo): Likewise.
5840 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5841 Likewise.
5842 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5843
5844 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5845
5846 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5847 to srv_tgtobj.
5848 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5849 to srv_tgtobj.
5850 * linux-x86-low.c [__x86_64__]: Include
5851 "nat/amd64-linux-siginfo.h".
5852 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5853 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5854 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5855 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5856 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5857 (cpt_si_fd, si_timerid, si_overrun): Move from
5858 nat/amd64-linux-siginfo.c.
5859 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5860
5861 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5862
5863 * server.c (skip_to_semicolon): Remove.
5864 (process_point_options): Use strchrnul instead of
5865 skip_to_semicolon.
5866
5867 2016-01-26 Yao Qi <yao.qi@linaro.org>
5868
5869 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5870 * linux-low.c (install_software_single_step_breakpoints): Don't
5871 call regcache_read_pc.
5872 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5873 argument pc.
5874
5875 2016-01-26 Yao Qi <yao.qi@linaro.org>
5876
5877 * linux-low.c (install_software_single_step_breakpoints): Call
5878 regcache_read_pc instead of get_pc.
5879
5880 2016-01-26 Yao Qi <yao.qi@linaro.org>
5881
5882 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5883 (unblock_async_io): Rename to ...
5884 (block_unblock_async_io): ... it. New function.
5885 (enable_async_io): Don't install SIGIO handler. Unblock it
5886 instead.
5887 (disable_async_io): Don't ignore SIGIO. Block it instead.
5888 (initialize_async_io): Install SIGIO handler. Don't call
5889 unblock_async_io.
5890
5891 2016-01-26 Yao Qi <yao.qi@linaro.org>
5892
5893 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5894 first character is '\003', call *the_target->request_interrupt.
5895
5896 2016-01-25 Yao Qi <yao.qi@linaro.org>
5897
5898 * remote-utils.c (new_thread_notify): Remove.
5899 (dead_thread_notify): Likewise.
5900 * remote-utils.h (new_thread_notify): Remove declaration.
5901 (dead_thread_notify): Likewise.
5902
5903 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5904
5905 * gdb.trace/pending.exp: Fix expected message on continue.
5906
5907 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5908
5909 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5910 it works properly on big-endian machines where sizeof (CORE_ADDR)
5911 != sizeof (void *).
5912
5913 2016-01-21 Pedro Alves <palves@redhat.com>
5914
5915 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5916 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5917 * configure: Regenerate.
5918
5919 2016-01-21 Yao Qi <yao.qi@linaro.org>
5920
5921 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5922 is_thumb and set it according to CPSR saved on the stack.
5923 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5924 arm_sigreturn_next_pc.
5925
5926 2016-01-18 Yao Qi <yao.qi@linaro.org>
5927
5928 * linux-low.c (linux_set_pc_64bit): New function.
5929 (linux_get_pc_64bit): New function.
5930 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5931 Declare.
5932 * linux-sparc-low.c (debug_threads): Remove declaration.
5933 (sparc_get_pc): Remove.
5934 (the_low_target): Use linux_get_pc_64bit instead of
5935 sparc_get_pc.
5936 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5937 (the_low_target): Use linux_get_pc_64bit and
5938 linux_set_pc_64bit.
5939
5940 2016-01-18 Yao Qi <yao.qi@linaro.org>
5941
5942 * linux-arm-low.c (debug_threads): Remove declaration.
5943 (arm_get_pc, arm_set_pc): Remove.
5944 (the_low_target): Use linux_get_pc_32bit and
5945 linux_set_pc_32bit.
5946 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5947 (the_low_target): Use linux_get_pc_32bit and
5948 linux_set_pc_32bit.
5949 * linux-cris-low.c (debug_threads): Remove declaration.
5950 (cris_get_pc, cris_set_pc,): Remove.
5951 (the_low_target): Use linux_get_pc_32bit and
5952 linux_set_pc_32bit.
5953 * linux-crisv32-low.c (debug_threads): Remove declaration.
5954 (cris_get_pc, cris_set_pc): Remove.
5955 (the_low_target): Use linux_get_pc_32bit and
5956 linux_set_pc_32bit.
5957 * linux-low.c: Include inttypes.h.
5958 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5959 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5960 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5961 (the_low_target): Use linux_get_pc_32bit and
5962 linux_set_pc_32bit.
5963 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5964 (the_low_target): Use linux_get_pc_32bit and
5965 linux_set_pc_32bit.
5966 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5967 (the_low_target): Use linux_get_pc_32bit and
5968 linux_set_pc_32bit.
5969 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5970 (the_low_target): Use linux_get_pc_32bit and
5971 linux_set_pc_32bit.
5972 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5973 (the_low_target): Use linux_get_pc_32bit and
5974 linux_set_pc_32bit.
5975
5976 2016-01-18 Gary Benson <gbenson@redhat.com>
5977
5978 * configure.ac (AC_FUNC_FORK): New check.
5979 * config.in: Regenerate.
5980 * configure: Likewise.
5981
5982 2016-01-14 Yao Qi <yao.qi@linaro.org>
5983
5984 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
5985 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5986 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
5987 arm_get_next_pcs_ctor.
5988
5989 2016-01-12 Josh Stone <jistone@redhat.com>
5990 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5991
5992 * inferiors.h: Include "gdb_vecs.h".
5993 (struct process_info): Add syscalls_to_catch.
5994 * inferiors.c (remove_process): Free syscalls_to_catch.
5995 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
5996 syscall_return stops.
5997 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
5998 * server.c (handle_general_set): Handle QCatchSyscalls.
5999 (handle_query): Report support for QCatchSyscalls.
6000 * target.h (struct target_ops): Add supports_catch_syscall.
6001 (target_supports_catch_syscall): New macro.
6002 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6003 (struct lwp_info): Add syscall_state.
6004 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6005 Maintain syscall_state and syscalls_to_catch across exec.
6006 (get_syscall_trapinfo): New function, proxy to the_low_target.
6007 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6008 (linux_low_filter_event): Toggle syscall_state entry/return for
6009 syscall traps, and set it ignored for all others.
6010 (gdb_catching_syscalls_p): New function.
6011 (gdb_catch_this_syscall_p): New function.
6012 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6013 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6014 (linux_supports_catch_syscall): New function.
6015 (linux_target_ops): Install it.
6016 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6017 (the_low_target): Install it.
6018
6019 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6020
6021 * acinclude.m4: Include new ../warning.m4 file.
6022 * configure: Regenerated.
6023 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6024
6025 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6026
6027 * ax.c (is_goto_target): Mark static.
6028 * linux-low.c (register_addr): Likewise.
6029 (linux_fetch_registers, linux_store_registers): Likewise.
6030 * mem-break.c (any_persistent_commands): Fix old prototype.
6031 (add_commands_to_breakpoint): Mark static.
6032 * regcache.c (find_register_by_name): Delete unused func.
6033 * remote-utils.c (hex_or_minus_one): Mark static.
6034 * server.c (monitor_show_help): Mark static.
6035 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6036 handle_v_requests): Likewise.
6037
6038 2016-01-12 Pedro Alves <palves@redhat.com>
6039
6040 Remove use of the registered trademark symbol throughout.
6041
6042 2016-01-08 Yao Qi <yao.qi@linaro.org>
6043
6044 * remote-utils.c (getpkt): If c is '\003', call target hook
6045 request_interrupt.
6046
6047 2016-01-06 Yao Qi <yao.qi@linaro.org>
6048
6049 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6050 linux-aarch32-low.c.
6051 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6052 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6053 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6054 (thumb2_breakpoint): Declare.
6055 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6056 linux-aarch32-low.h.
6057 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6058 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6059 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6060
6061 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6062
6063 * gdbreplay.c (gdbreplay_version): Change copyright year in
6064 version message.
6065 * server.c (gdbserver_version): Likewise.
6066
6067 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6068
6069 * server.c (crc32_table): Delete.
6070 (crc32): Use libiberty's xcrc32 function.
6071
6072 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6073
6074 * lynx-low.c (lynx_delete_thread_callback): New function.
6075 (lynx_mourn): Properly delete our process and all of its
6076 threads. Remove call to clear_inferiors.
6077
6078 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6079
6080 * target.c (thread_search_callback): Add check that
6081 the thread_stopped target callback is not NULL before
6082 calling it.
6083
6084 2015-12-21 Yao Qi <yao.qi@linaro.org>
6085
6086 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6087 arm breakpoint.
6088
6089 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6090
6091 * server.c (handle_query): Call target_supports_software_single_step.
6092
6093 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6094
6095 * linux-low.c (single_step): New function.
6096 (linux_resume_one_lwp_throw): Call single_step.
6097 (start_step_over): Likewise.
6098
6099 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6100
6101 * Makefile.in (SFILES): Append arch/arm-linux.c,
6102 arch/arm-get-next-pcs.c.
6103 (arm-linux.o): New rule.
6104 (arm-get-next-pcs.o): New rule.
6105 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6106 arm-linux.o.
6107 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6108 to linux-aarch32-low.c.
6109 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6110 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6111 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6112 (thumb2_breakpoint_len): Likewise.
6113 (arm_is_thumb_mode): Make non-static.
6114 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6115 from linux-aarch32-low.c.
6116 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6117 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6118 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6119 (thumb2_breakpoint_len): Likewise.
6120 (arm_is_thumb_mode): New declaration.
6121 * linux-arm-low.c: Include arch/arm-linux.h
6122 aarch/arm-get-next-pcs.h, sys/syscall.h.
6123 (get_next_pcs_ops): New struct.
6124 (get_next_pcs_addr_bits_remove): New function.
6125 (get_next_pcs_is_thumb): New function.
6126 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6127 (arm_sigreturn_next_pc): Likewise.
6128 (get_next_pcs_syscall_next_pc): Likewise.
6129 (arm_gdbserver_get_next_pcs): Likewise.
6130 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6131 Initialize.
6132 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6133 * server.h: Include gdb_vecs.h.
6134
6135 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6136
6137 * Makefile.in (SFILES): Append common/common-regcache.c.
6138 (OBS): Append common-regcache.o.
6139 (common-regcache.o): New rule.
6140 * regcache.c (init_register_cache): Initialize cache to
6141 REG_UNAVAILABLE.
6142 (regcache_raw_read_unsigned): New function.
6143 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6144 register_status enum.
6145
6146 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6147
6148 * linux-aarch64-low.c (the_low_targets): Rename
6149 breakpoint_reinsert_addr to get_next_pcs.
6150 * linux-arm-low.c (the_low_targets): Likewise.
6151 * linux-bfin-low.c (the_low_targets): Likewise.
6152 * linux-cris-low.c (the_low_targets): Likewise.
6153 * linux-crisv32-low.c (the_low_targets): Likewise.
6154 * linux-low.c (can_software_single_step): Likewise.
6155 (install_software_single_step_breakpoints): New function.
6156 (start_step_over): Use install_software_single_step_breakpoints.
6157 * linux-low.h: New CORE_ADDR vector.
6158 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6159 get_next_pcs.
6160 * linux-mips-low.c (the_low_targets): Likewise.
6161 * linux-nios2-low.c (the_low_targets): Likewise.
6162 * linux-sparc-low.c (the_low_targets): Likewise.
6163
6164 2015-12-17 Pedro Alves <palves@redhat.com>
6165
6166 * linux-low.c (linux_kill_one_lwp): Remove references to
6167 LinuxThreads.
6168 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6169 to 'kill'.
6170 (linux_init_signals): Delete.
6171 (initialize_low): Adjust.
6172 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6173
6174 2015-12-16 Pedro Alves <palves@redhat.com>
6175
6176 * configure.ac (compiler warning flags): When testing a
6177 -Wno-foo option, check whether -Wfoo works instead.
6178 * configure: Regenerate.
6179
6180 2015-12-11 Don Breazeal <donb@codesourcery.com>
6181
6182 * server.c (process_serial_event): Don't exit from gdbserver
6183 in remote mode if there are still active inferiors.
6184
6185 2015-12-11 Yao Qi <yao.qi@linaro.org>
6186
6187 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6188 arm_breakpoint_at if the process is 32-bit.
6189
6190 2015-12-11 Yao Qi <yao.qi@linaro.org>
6191
6192 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6193 arm breakpoint.
6194
6195 2015-12-07 Yao Qi <yao.qi@linaro.org>
6196
6197 * configure.srv: Append arm.o to srv_tgtobj for
6198 aarch64*-*-linux* target.
6199 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6200 from linux-arm-low.c.
6201 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6202 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6203 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6204 (thumb2_breakpoint_len): Likewise.
6205 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6206 (arm_breakpoint_kinds): Likewise.
6207 (arm_breakpoint_kind_from_pc): Likewise.
6208 (arm_sw_breakpoint_from_kind): Likewise.
6209 (arm_breakpoint_kind_from_current_state): Likewise.
6210 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6211 (arm_sw_breakpoint_from_kind): Declare.
6212 (arm_breakpoint_kind_from_current_state): Declare.
6213 (arm_breakpoint_at): Declare.
6214 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6215 arm_sw_breakpoint_from_kind if process is 32-bit.
6216 (aarch64_breakpoint_kind_from_pc): New function.
6217 (aarch64_breakpoint_kind_from_current_state): New function.
6218 (the_low_target): Initialize fields breakpoint_kind_from_pc
6219 and breakpoint_kind_from_current_state.
6220 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6221 linux-aarch32-low.c.
6222 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6223 (arm_breakpoint, arm_breakpoint_len): Likewise.
6224 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6225 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6226 (arm_is_thumb_mode): Likewise.
6227 (arm_breakpoint_at): Likewise.
6228 (arm_breakpoint_kind_from_pc): Likewise.
6229 (arm_sw_breakpoint_from_kind): Likewise.
6230 (arm_breakpoint_kind_from_current_state): Likewise.
6231
6232 Revert:
6233 2015-08-04 Yao Qi <yao.qi@linaro.org>
6234
6235 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6236 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6237 * server.c (extended_protocol): Remove "static".
6238 * server.h (extended_protocol): Declare it.
6239
6240 2015-12-04 Josh Stone <jistone@redhat.com>
6241
6242 * target.h (struct target_ops) <arch_setup>: Rename to ...
6243 (struct target_ops) <post_create_inferior>: ... this.
6244 (target_arch_setup): Rename to ...
6245 (target_post_create_inferior): ... this, calling post_create_inferior.
6246 * server.c (start_inferior): Update target_arch_setup calls to
6247 target_post_create_inferior.
6248 * linux-low.c (linux_low_ptrace_options): Forward declare.
6249 (linux_arch_setup): Update its comment for general use.
6250 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6251 (struct linux_target_ops): Use linux_post_create_inferior.
6252 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6253 to post_create_inferior.
6254 * nto-low.c (struct nto_target_ops): Likewise.
6255 * spu-low.c (struct spu_target_ops): Likewise.
6256 * win32-low.c (struct win32_target_ops): Likewise.
6257
6258 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6259
6260 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6261
6262 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6263
6264 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6265 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6266 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6267 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6268 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6269 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6270 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6271 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6272 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6273 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6274 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6275 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6276
6277 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6278
6279 * linux-low.c (linux_look_up_symbols): Don't call
6280 linux_supports_traceclone.
6281 * linux-low.h (thread_db_init): Remove use_events argument.
6282 * thread-db.c (thread_db_use_event): Remove global variable.
6283 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6284 (struct thread_db) <td_create_bp>: Remove field.
6285 (thread_db_create_event): Remove function.
6286 (thread_db_enable_reporting): Likewise.
6287 (find_one_thread): Don't check for thread_db_use_events.
6288 (attach_thread): Likewise.
6289 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6290 (try_thread_db_load_1): Don't check for thread_db_use_events.
6291 (thread_db_init): Remove use_events argument and thread events
6292 handling.
6293 (remove_thread_event_breakpoints): Remove function.
6294 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6295
6296 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6297
6298 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6299 New function.
6300 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6301 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6302 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6303 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6304 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6305 Initialize.
6306 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6307 New function.
6308 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6309 * linux-low.c (can_hardware_single_step): Use
6310 supports_hardware_single_step.
6311 (can_software_single_step): New function.
6312 (start_step_over): Call can_software_single_step.
6313 (linux_supports_hardware_single_step): New function.
6314 (struct target_ops) <supports_software_single_step>: Initialize.
6315 * linux-low.h (struct linux_target_ops)
6316 <supports_hardware_single_step>: Initialize.
6317 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6318 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6319 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6320 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6321 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6322 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6323 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6324 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6325 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6326 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6327 Initialize.
6328 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6329 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6330 Initialize.
6331 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6332 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6333 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6334 New function.
6335 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6336 * target.h (struct target_ops): <supports_software_single_step>:
6337 New field.
6338 (target_supports_software_single_step): New macro.
6339
6340 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6341
6342 * linux-low.c (linux_wait_1): Fix pc advance condition.
6343 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6344 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6345
6346 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6347
6348 * linux-arm-low.c (arm_is_thumb_mode): New function.
6349 (arm_breakpoint_at): Use arm_is_thumb_mode.
6350 (arm_breakpoint_kind_from_current_state): New function.
6351 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6352 Initialize.
6353 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6354 (linux_breakpoint_kind_from_current_state): New function.
6355 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6356 * linux-low.h (struct linux_target_ops)
6357 <breakpoint_kind_from_current_state>: New field.
6358 * target.h (struct target_ops): Likewise.
6359 (target_breakpoint_kind_from_current_state): New macro.
6360
6361 2015-11-30 Pedro Alves <palves@redhat.com>
6362
6363 * linux-low.c (linux_resume): Wake up the event loop before
6364 returning.
6365
6366 2015-11-30 Pedro Alves <palves@redhat.com>
6367
6368 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6369 check.
6370 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6371 to -1.
6372 * target.c (struct thread_search): New structure.
6373 (thread_search_callback): New function.
6374 (prev_general_thread): New global.
6375 (prepare_to_access_memory, done_accessing_memory): New functions.
6376 * target.h (prepare_to_access_memory, done_accessing_memory):
6377 Replace macros with function declarations.
6378
6379 2015-11-30 Pedro Alves <palves@redhat.com>
6380
6381 PR 14618
6382 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6383 report TARGET_WAITKIND_NO_RESUMED.
6384 * remote-utils.c (prepare_resume_reply): Handle
6385 TARGET_WAITKIND_NO_RESUMED.
6386 * server.c (report_no_resumed): New global.
6387 (handle_query) <qSupported>: Handle "no-resumed+". Report
6388 "no-resumed+" support.
6389 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6390 return error if the client doesn't support no-resumed events.
6391 (push_stop_notification): New function.
6392 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6393 events if the client supports them.
6394
6395 2015-11-30 Pedro Alves <palves@redhat.com>
6396
6397 * linux-low.c (thread_still_has_status_pending_p): Don't check
6398 vCont;t here.
6399 (lwp_resumed): New function.
6400 (status_pending_p_callback): Return early if the LWP is not
6401 supposed to be resumed.
6402
6403 2015-11-30 Pedro Alves <palves@redhat.com>
6404
6405 * linux-low.c (handle_extended_wait): Assert that the LWP's
6406 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6407 thread create events, leave the new child's status pending.
6408 (linux_low_filter_event): If GDB wants to hear about thread exit
6409 events, leave the LWP marked dead and don't delete it.
6410 (linux_wait_for_event_filtered): Don't check for thread exit.
6411 (filter_exit_event): New function.
6412 (linux_wait_1): Use it, when returning an exit event.
6413 (linux_resume_one_lwp_throw): Assert that the LWP's
6414 waitstatus is TARGET_WAITKIND_IGNORE.
6415 * remote-utils.c (prepare_resume_reply): Handle
6416 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6417 * server.c (report_thread_events): New global.
6418 (handle_general_set): Handle QThreadEvents.
6419 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6420 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6421 TARGET_WAITKIND_THREAD_EXITED.
6422 * server.h (report_thread_events): Declare.
6423
6424 2015-11-30 Pedro Alves <palves@redhat.com>
6425
6426 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6427 the thread's last_resume_kind was resume_stop.
6428
6429 2015-11-30 Pedro Alves <palves@redhat.com>
6430
6431 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6432 before returning.
6433
6434 2015-11-30 Pedro Alves <palves@redhat.com>
6435
6436 * server.c (handle_v_requests): Handle vCtrlC.
6437
6438 2015-11-30 Pedro Alves <palves@redhat.com>
6439
6440 * gdbthread.h (find_any_thread_of_pid): Declare.
6441 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6442 functions.
6443 * server.c (handle_query): If current_thread is NULL, look for
6444 another thread of the selected process.
6445
6446 2015-11-26 Daniel Colascione <dancol@dancol.org>
6447 Simon Marchi <simon.marchi@ericsson.com>
6448
6449 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6450 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6451 name in reply.
6452 * target.h (struct target_ops) <thread_name>: New field.
6453 (target_thread_name): New macro.
6454
6455 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6456
6457 * regcache.h (regcache_invalidate_pid): Add declaration.
6458 * regcache.c (regcache_invalidate_pid): New function, extracted
6459 from regcache_invalidate.
6460 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6461 Add trivial documentation comment.
6462 * lynx-low.c: Use regcache_invalidate_pid instead of
6463 regcache_invalidate.
6464
6465 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6466
6467 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6468 and Elf64_auxv_t if the target is Android.
6469
6470 2015-11-22 Doug Evans <xdje42@gmail.com>
6471
6472 * target.h: #include <sys/types.h>.
6473
6474 2015-11-19 Pedro Alves <palves@redhat.com>
6475
6476 * linux-low.c (linux_process_qsupported): Change prototype.
6477 Adjust.
6478 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6479 Change prototype.
6480 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6481 and adjust to loop over all features.
6482 * server.c (handle_query) <qSupported>: Adjust to call
6483 target_process_qsupported once, passing it a vector of unprocessed
6484 features.
6485 * target.h (struct target_ops) <process_qsupported>: Change
6486 prototype.
6487 (target_process_qsupported): Adjust.
6488
6489 2015-11-19 Pedro Alves <palves@redhat.com>
6490
6491 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6492 mode.
6493 * configure: Regenerate.
6494
6495 2015-11-19 Pedro Alves <palves@redhat.com>
6496
6497 * configure: Regenerate.
6498
6499 2015-11-19 Yao Qi <yao.qi@linaro.org>
6500
6501 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6502 type to uint32_t.
6503
6504 2015-11-19 Yao Qi <yao.qi@linaro.org>
6505
6506 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6507 (struct aarch64_operand): Move enum out.
6508
6509 2015-11-19 Yao Qi <yao.qi@linaro.org>
6510
6511 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6512 struct user_fpsimd_state *.
6513 (aarch64_store_fpregset): Likewise.
6514
6515 2015-11-19 Yao Qi <yao.qi@linaro.org>
6516
6517 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6518 struct user_pt_regs *.
6519 (aarch64_store_gregset): Likewise.
6520
6521 2015-11-18 Pedro Alves <palves@redhat.com>
6522
6523 * Makefile.in (all_object_files): Add $IPA_OBJS.
6524
6525 2015-11-17 Pedro Alves <palves@redhat.com>
6526
6527 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6528 GDB_SIGNAL_0 and gdb_signal_to_string.
6529
6530 2015-11-17 Pedro Alves <palves@redhat.com>
6531
6532 * win32-low.c (handle_output_debug_string): Remove parameter.
6533 (win32_kill): Remove our_status local and adjust call to
6534 handle_output_debug_string.
6535 (get_child_debug_event): Adjust call to
6536 handle_output_debug_string.
6537
6538 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6539
6540 * linux-mips-low.c (mips_fill_gregset): Add cast.
6541 (mips_store_gregset): Likewise.
6542 (mips_fill_fpregset): Likewise.
6543 (mips_store_fpregset): Likewise.
6544
6545 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6546
6547 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6548 priv.
6549
6550 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6551
6552 * linux-mips-low.c (mips_linux_new_thread): Change type of
6553 watch_type to enum target_hw_bp_type.
6554
6555 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6556
6557 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6558 Change return type to arm_hwbp_type.
6559
6560 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6561
6562 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6563 (arm_store_gregset): Likewise.
6564 * linux-arm-low.c (arm_get_hwcap): Likewise.
6565 (arm_read_description): Likewise.
6566
6567 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6568
6569 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6570
6571 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6572
6573 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6574 (ppc_fill_vsxregset): Likewise.
6575 (ppc_store_vsxregset): Likewise.
6576 (ppc_fill_vrregset): Likewise.
6577 (ppc_store_vrregset): Likewise.
6578 (ppc_fill_evrregset): Likewise.
6579 (ppc_store_evrregset): Likewise.
6580
6581 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6582
6583 * linux-ppc-low.c (ppc_usrregs_info): Remove
6584 forward-declaration.
6585 (ppc_arch_setup): Move lower in file.
6586
6587 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6588
6589 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6590 (ps_pdwrite): Likewise.
6591
6592 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6593
6594 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6595 to after assert checks.
6596
6597 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6598
6599 * proc-service.c (ps_pdread): Add/adjust casts.
6600 (ps_pdwrite): Add/adjust casts.
6601
6602 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6603
6604 * server.c (handle_search_memory_1): Cast return value of
6605 memmem.
6606
6607 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6608
6609 * server.c (write_qxfer_response): Change type of data to
6610 gdb_byte *.
6611
6612 2015-10-29 Pedro Alves <palves@redhat.com>
6613
6614 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6615
6616 2015-10-29 Pedro Alves <palves@redhat.com>
6617
6618 * tracepoint.c (clear_installed_tracepoints): Add casts.
6619
6620 2015-10-29 Pedro Alves <palves@redhat.com>
6621
6622 * server.c (handle_v_cont, process_serial_event): Add enum
6623 gdb_signal casts to signal parsing code.
6624
6625 2015-10-29 Pedro Alves <palves@redhat.com>
6626
6627 * linux-low.h (NULL_REGSET): Define.
6628 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6629 * linux-arm-low.c (arm_regsets): Likewise.
6630 * linux-crisv32-low.c (cris_regsets): Likewise.
6631 * linux-m68k-low.c (m68k_regsets): Likewise.
6632 * linux-mips-low.c (mips_regsets): Likewise.
6633 * linux-nios2-low.c (nios2_regsets): Likewise.
6634 * linux-ppc-low.c (ppc_regsets): Likewise.
6635 * linux-s390-low.c (s390_regsets): Likewise.
6636 * linux-sh-low.c (sh_regsets): Likewise.
6637 * linux-sparc-low.c (sparc_regsets): Likewise.
6638 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6639 * linux-tile-low.c (tile_regsets): Likewise.
6640 * linux-x86-low.c (x86_regsets): Likewise.
6641 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6642
6643 2015-10-29 Pedro Alves <palves@redhat.com>
6644
6645 * linux-low.h (NULL_REGSET): Define.
6646 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6647 * linux-arm-low.c (arm_regsets): Likewise.
6648 * linux-crisv32-low.c (cris_regsets): Likewise.
6649 * linux-m68k-low.c (m68k_regsets): Likewise.
6650 * linux-mips-low.c (mips_regsets): Likewise.
6651 * linux-nios2-low.c (nios2_regsets): Likewise.
6652 * linux-ppc-low.c (ppc_regsets): Likewise.
6653 * linux-s390-low.c (s390_regsets): Likewise.
6654 * linux-sh-low.c (sh_regsets): Likewise.
6655 * linux-sparc-low.c (sparc_regsets): Likewise.
6656 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6657 * linux-tile-low.c (tile_regsets): Likewise.
6658 * linux-x86-low.c (x86_regsets): Likewise.
6659 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6660
6661 2015-10-26 Doug Evans <dje@google.com>
6662
6663 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6664
6665 2015-10-26 Doug Evans <dje@google.com>
6666
6667 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6668
6669 2015-10-26 Doug Evans <dje@google.com>
6670
6671 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6672 for debug_printf.
6673 (attach_thread, find_new_threads_callback): Ditto.
6674
6675 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6676
6677 * mem-break.h (set_breakpoint_data): Remove.
6678
6679 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6680
6681 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6682 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6683 (initialize_low): Remove set_breakpoint_data call.
6684 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6685 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6686 (initialize_low): Remove set_breakpoint_data call.
6687 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6688 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6689 (initialize_low): Remove set_breakpoint_data call.
6690
6691 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6692
6693 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6694 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6695 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6696 * target.h (target_breakpoint_kind_from_pc): New macro.
6697
6698 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6699
6700 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6701 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6702 the default breakpoint kind.
6703
6704 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6705
6706 * linux-arm-low.c (arm_supports_z_point_type): Add software
6707 breakpoint support.
6708
6709 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6710
6711 * linux-arm-low.c: Refactor breakpoint definitions.
6712 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6713 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6714
6715 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6716
6717 * Makefile.in: Add arm.c/o.
6718 * configure.srv: Likewise.
6719 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6720 (arm_breakpoint_kind_from_pc): New function.
6721 (arm_sw_breakpoint_from_kind): Return proper kind.
6722 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6723
6724 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6725
6726 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6727 removal.
6728 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6729 (struct raw_breakpoint) <size>: Remove.
6730 (struct raw_breakpoint) <kind>: Add.
6731 (bp_size): New function.
6732 (bp_opcode): Likewise.
6733 (find_raw_breakpoint_at): Adjust for kind.
6734 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6735 (remove_memory_breakpoint): Adjust for kind call bp_size.
6736 (set_raw_breakpoint_at): Adjust for kind.
6737 (set_breakpoint): Likewise.
6738 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6739 (delete_raw_breakpoint): Adjust for kind.
6740 (delete_breakpoint): Likewise.
6741 (find_gdb_breakpoint): Likewise.
6742 (set_gdb_breakpoint_1): Likewise.
6743 (set_gdb_breakpoint): Likewise.
6744 (delete_gdb_breakpoint_1): Likewise.
6745 (delete_gdb_breakpoint): Likewise.
6746 (uninsert_raw_breakpoint): Likewise.
6747 (reinsert_raw_breakpoint): Likewise.
6748 (set_breakpoint_data): Remove.
6749 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6750 (check_mem_read): Adjust for kind call bp_size.
6751 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6752 (clone_one_breakpoint): Adjust for kind.
6753 * mem-break.h (set_gdb_breakpoint): Likewise.
6754 (delete_gdb_breakpoint): Likewise.
6755 * server.c (process_serial_event): Likewise.
6756
6757 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6758
6759 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6760 (struct linux_target_ops) <breakpoint>: Remove.
6761 (struct linux_target_ops) <breakpoint_len>: Remove.
6762 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6763 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6764 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6765 (arm_sw_breakpoint_from_kind): New function.
6766 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6767 (struct linux_target_ops) <breakpoint>: Remove.
6768 (struct linux_target_ops) <breakpoint_len>: Remove.
6769 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6770 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6771 * linux-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6782 and sw_breakpoint_from_kind to increment the pc.
6783 (linux_breakpoint_kind_from_pc): New function.
6784 (linux_sw_breakpoint_from_kind): New function.
6785 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6786 (initialize_low): Call breakpoint_kind_from_pc and
6787 sw_breakpoint_from_kind to replace breakpoint_data/len.
6788 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6789 New field.
6790 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6791 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6817 (struct linux_target_ops) <breakpoint>: Remove.
6818 (struct linux_target_ops) <breakpoint_len>: Remove.
6819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6820 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6821 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6822 (struct linux_target_ops) <breakpoint>: Remove.
6823 (struct linux_target_ops) <breakpoint_len>: Remove.
6824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6826 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6827 (struct linux_target_ops) <breakpoint>: Remove.
6828 (struct linux_target_ops) <breakpoint_len>: Remove.
6829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6831 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6832 (struct linux_target_ops) <breakpoint>: Remove.
6833 (struct linux_target_ops) <breakpoint_len>: Remove.
6834 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6835 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6836 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6837 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6838 (struct linux_target_ops) <breakpoint>: Remove.
6839 (struct linux_target_ops) <breakpoint_len>: Remove.
6840 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6841 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6842 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6843 (struct linux_target_ops) <breakpoint>: Remove.
6844 (struct linux_target_ops) <breakpoint_len>: Remove.
6845 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6846 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6847
6848 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6849
6850 * linux-cris-low.c (cris_get_pc): Remove void arg.
6851
6852 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6853
6854 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6855 variable name.
6856
6857 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6858
6859 * inferiors.c (thread_pid_matches_callback): New function.
6860 (find_thread_process): New function.
6861 (remove_thread): Reset current_thread.
6862 (remove_process): Assert threads have been removed first.
6863
6864 2015-10-15 Yao Qi <yao.qi@linaro.org>
6865
6866 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6867 if it is 3.
6868 (aarch64_remove_point): Likewise.
6869 * regcache.c (regcache_register_size): New function.
6870
6871 2015-10-12 Yao Qi <yao.qi@linaro.org>
6872
6873 * linux-aarch64-low.c: Update all callers as emit_load_store
6874 is renamed to aarch64_emit_load_store.
6875
6876 2015-10-12 Yao Qi <yao.qi@linaro.org>
6877
6878 * linux-aarch64-low.c: Update all callers of function renaming
6879 from emit_insn to aarch64_emit_insn.
6880
6881 2015-10-12 Yao Qi <yao.qi@linaro.org>
6882
6883 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6884 arch/aarch64-insn.h.
6885 (struct aarch64_memory_operand): Likewise.
6886 (ENCODE): Likewise.
6887 (emit_insn): Move to arch/aarch64-insn.c.
6888 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6889 (emit_load_store): Move to arch/aarch64-insn.c.
6890 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6891 (can_encode_int32): Remove.
6892
6893 2015-10-12 Yao Qi <yao.qi@linaro.org>
6894
6895 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6896 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6897 (aarch64_relocate_instruction): Likewise.
6898 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6899 (struct aarch64_insn_visitor): Likewise.
6900
6901 2015-10-12 Yao Qi <yao.qi@linaro.org>
6902
6903 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6904 (struct aarch64_insn_visitor): New.
6905 (struct aarch64_insn_relocation_data): New.
6906 (aarch64_ftrace_insn_reloc_b): New function.
6907 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6908 (aarch64_ftrace_insn_reloc_cb): Likewise.
6909 (aarch64_ftrace_insn_reloc_tb): Likewise.
6910 (aarch64_ftrace_insn_reloc_adr): Likewise.
6911 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6912 (aarch64_ftrace_insn_reloc_others): Likewise.
6913 (visitor): New.
6914 (aarch64_relocate_instruction): Use visitor.
6915
6916 2015-10-12 Yao Qi <yao.qi@linaro.org>
6917
6918 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6919 int. Add argument buf.
6920 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6921 aarch64_relocate_instruction.
6922
6923 2015-10-12 Yao Qi <yao.qi@linaro.org>
6924
6925 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6926 argument insn. Remove local variable insn. Don't call
6927 target_read_uint32.
6928 (aarch64_install_fast_tracepoint_jump_pad): Call
6929 target_read_uint32.
6930
6931 2015-09-30 Yao Qi <yao.qi@linaro.org>
6932
6933 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6934 (emit_load_store_pair): Likewise.
6935
6936 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6937
6938 * dll.c (match_dll): Add cast(s).
6939 (unloaded_dll): Likewise.
6940 * linux-low.c (second_thread_of_pid_p): Likewise.
6941 (delete_lwp_callback): Likewise.
6942 (count_events_callback): Likewise.
6943 (select_event_lwp_callback): Likewise.
6944 (linux_set_resume_request): Likewise.
6945 * server.c (accumulate_file_name_length): Likewise.
6946 (emit_dll_description): Likewise.
6947 (handle_qxfer_threads_worker): Likewise.
6948 (visit_actioned_threads): Likewise.
6949 * thread-db.c (any_thread_of): Likewise.
6950 * tracepoint.c (same_process_p): Likewise.
6951 (match_blocktype): Likewise.
6952 (build_traceframe_info_xml): Likewise.
6953
6954 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6955
6956 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6957 assignment.
6958 (gdb_unparse_agent_expr): Likewise.
6959 * hostio.c (require_data): Likewise.
6960 (handle_pread): Likewise.
6961 * linux-low.c (disable_regset): Likewise.
6962 (fetch_register): Likewise.
6963 (store_register): Likewise.
6964 (get_dynamic): Likewise.
6965 (linux_qxfer_libraries_svr4): Likewise.
6966 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6967 (set_fast_tracepoint_jump): Likewise.
6968 (uninsert_fast_tracepoint_jumps_at): Likewise.
6969 (reinsert_fast_tracepoint_jumps_at): Likewise.
6970 (validate_inserted_breakpoint): Likewise.
6971 (clone_agent_expr): Likewise.
6972 * regcache.c (init_register_cache): Likewise.
6973 * remote-utils.c (putpkt_binary_1): Likewise.
6974 (decode_M_packet): Likewise.
6975 (decode_X_packet): Likewise.
6976 (look_up_one_symbol): Likewise.
6977 (relocate_instruction): Likewise.
6978 (monitor_output): Likewise.
6979 * server.c (handle_search_memory): Likewise.
6980 (handle_qxfer_exec_file): Likewise.
6981 (handle_qxfer_libraries): Likewise.
6982 (handle_qxfer): Likewise.
6983 (handle_query): Likewise.
6984 (handle_v_cont): Likewise.
6985 (handle_v_run): Likewise.
6986 (captured_main): Likewise.
6987 * target.c (write_inferior_memory): Likewise.
6988 * thread-db.c (try_thread_db_load_from_dir): Likewise.
6989 * tracepoint.c (init_trace_buffer): Likewise.
6990 (add_tracepoint_action): Likewise.
6991 (add_traceframe): Likewise.
6992 (add_traceframe_block): Likewise.
6993 (cmd_qtdpsrc): Likewise.
6994 (cmd_qtdv): Likewise.
6995 (cmd_qtstatus): Likewise.
6996 (response_source): Likewise.
6997 (response_tsv): Likewise.
6998 (cmd_qtnotes): Likewise.
6999 (gdb_collect): Likewise.
7000 (initialize_tracepoint): Likewise.
7001
7002 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7003
7004 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7005 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7006 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7007 <NOP>: New.
7008 (enum aarch64_condition_codes): New enum.
7009 (w0): New static global.
7010 (fp): Likewise.
7011 (lr): Likewise.
7012 (struct aarch64_memory_operand) <type>: New
7013 MEMORY_OPERAND_POSTINDEX type.
7014 (postindex_memory_operand): New helper function.
7015 (emit_ret): New function.
7016 (emit_load_store_pair): New function, factored out of emit_stp
7017 with support for MEMORY_OPERAND_POSTINDEX.
7018 (emit_stp): Rewrite using emit_load_store_pair.
7019 (emit_ldp): New function.
7020 (emit_load_store): Likewise.
7021 (emit_ldr): Mention post-index instruction in comment.
7022 (emit_ldrh): New function.
7023 (emit_ldrb): New function.
7024 (emit_ldrsw): Mention post-index instruction in comment.
7025 (emit_str): Likewise.
7026 (emit_subs): New function.
7027 (emit_cmp): Likewise.
7028 (emit_and): Likewise.
7029 (emit_orr): Likewise.
7030 (emit_orn): Likewise.
7031 (emit_eor): Likewise.
7032 (emit_mvn): Likewise.
7033 (emit_lslv): Likewise.
7034 (emit_lsrv): Likewise.
7035 (emit_asrv): Likewise.
7036 (emit_mul): Likewise.
7037 (emit_sbfm): Likewise.
7038 (emit_sbfx): Likewise.
7039 (emit_ubfm): Likewise.
7040 (emit_ubfx): Likewise.
7041 (emit_csinc): Likewise.
7042 (emit_cset): Likewise.
7043 (emit_nop): Likewise.
7044 (emit_ops_insns): New helper function.
7045 (emit_pop): Likewise.
7046 (emit_push): Likewise.
7047 (aarch64_emit_prologue): New function.
7048 (aarch64_emit_epilogue): Likewise.
7049 (aarch64_emit_add): Likewise.
7050 (aarch64_emit_sub): Likewise.
7051 (aarch64_emit_mul): Likewise.
7052 (aarch64_emit_lsh): Likewise.
7053 (aarch64_emit_rsh_signed): Likewise.
7054 (aarch64_emit_rsh_unsigned): Likewise.
7055 (aarch64_emit_ext): Likewise.
7056 (aarch64_emit_log_not): Likewise.
7057 (aarch64_emit_bit_and): Likewise.
7058 (aarch64_emit_bit_or): Likewise.
7059 (aarch64_emit_bit_xor): Likewise.
7060 (aarch64_emit_bit_not): Likewise.
7061 (aarch64_emit_equal): Likewise.
7062 (aarch64_emit_less_signed): Likewise.
7063 (aarch64_emit_less_unsigned): Likewise.
7064 (aarch64_emit_ref): Likewise.
7065 (aarch64_emit_if_goto): Likewise.
7066 (aarch64_emit_goto): Likewise.
7067 (aarch64_write_goto_address): Likewise.
7068 (aarch64_emit_const): Likewise.
7069 (aarch64_emit_call): Likewise.
7070 (aarch64_emit_reg): Likewise.
7071 (aarch64_emit_pop): Likewise.
7072 (aarch64_emit_stack_flush): Likewise.
7073 (aarch64_emit_zero_ext): Likewise.
7074 (aarch64_emit_swap): Likewise.
7075 (aarch64_emit_stack_adjust): Likewise.
7076 (aarch64_emit_int_call_1): Likewise.
7077 (aarch64_emit_void_call_2): Likewise.
7078 (aarch64_emit_eq_goto): Likewise.
7079 (aarch64_emit_ne_goto): Likewise.
7080 (aarch64_emit_lt_goto): Likewise.
7081 (aarch64_emit_le_goto): Likewise.
7082 (aarch64_emit_gt_goto): Likewise.
7083 (aarch64_emit_ge_got): Likewise.
7084 (aarch64_emit_ops_impl): New static global variable.
7085 (aarch64_emit_ops): New target function, return
7086 &aarch64_emit_ops_impl.
7087 (struct linux_target_ops): Install it.
7088
7089 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7090
7091 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7092 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7093 aarch64-ipa.o.
7094 * linux-aarch64-ipa.c: New file.
7095 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7096 and endian.h.
7097 (aarch64_get_thread_area): New target method.
7098 (extract_signed_bitfield): New helper function.
7099 (aarch64_decode_ldr_literal): New function.
7100 (enum aarch64_opcodes): New enum.
7101 (struct aarch64_register): New struct.
7102 (struct aarch64_operand): New struct.
7103 (x0): New static global.
7104 (x1): Likewise.
7105 (x2): Likewise.
7106 (x3): Likewise.
7107 (x4): Likewise.
7108 (w2): Likewise.
7109 (ip0): Likewise.
7110 (sp): Likewise.
7111 (xzr): Likewise.
7112 (aarch64_register): New helper function.
7113 (register_operand): Likewise.
7114 (immediate_operand): Likewise.
7115 (struct aarch64_memory_operand): New struct.
7116 (offset_memory_operand): New helper function.
7117 (preindex_memory_operand): Likewise.
7118 (enum aarch64_system_control_registers): New enum.
7119 (ENCODE): New macro.
7120 (emit_insn): New helper function.
7121 (emit_b): New function.
7122 (emit_bcond): Likewise.
7123 (emit_cb): Likewise.
7124 (emit_tb): Likewise.
7125 (emit_blr): Likewise.
7126 (emit_stp): Likewise.
7127 (emit_ldp_q_offset): Likewise.
7128 (emit_stp_q_offset): Likewise.
7129 (emit_load_store): Likewise.
7130 (emit_ldr): Likewise.
7131 (emit_ldrsw): Likewise.
7132 (emit_str): Likewise.
7133 (emit_ldaxr): Likewise.
7134 (emit_stxr): Likewise.
7135 (emit_stlr): Likewise.
7136 (emit_data_processing_reg): Likewise.
7137 (emit_data_processing): Likewise.
7138 (emit_add): Likewise.
7139 (emit_sub): Likewise.
7140 (emit_mov): Likewise.
7141 (emit_movk): Likewise.
7142 (emit_mov_addr): Likewise.
7143 (emit_mrs): Likewise.
7144 (emit_msr): Likewise.
7145 (emit_sevl): Likewise.
7146 (emit_wfe): Likewise.
7147 (append_insns): Likewise.
7148 (can_encode_int32_in): New helper function.
7149 (aarch64_relocate_instruction): New function.
7150 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7151 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7152 (struct linux_target_ops): Install aarch64_get_thread_area,
7153 aarch64_install_fast_tracepoint_jump_pad and
7154 aarch64_get_min_fast_tracepoint_insn_len.
7155
7156 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7157
7158 * Makefile.in (aarch64-insn.o): New rule.
7159 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7160
7161 2015-09-21 Yao Qi <yao.qi@linaro.org>
7162
7163 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7164
7165 2015-09-21 Yao Qi <yao.qi@linaro.org>
7166
7167 * tracepoint.c (max_jump_pad_size): Remove.
7168
7169 2015-09-18 Yao Qi <yao.qi@linaro.org>
7170
7171 * linux-aarch64-low.c: Don't include sys/uio.h.
7172 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7173
7174 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7175
7176 * tracepoint.c (eval_result_type): Change prototype.
7177 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7178
7179 2015-09-15 Pedro Alves <palves@redhat.com>
7180
7181 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7182 Check whether to report exec events instead of checking whether
7183 multiprocess is enabled.
7184
7185 2015-09-15 Pedro Alves <palves@redhat.com>
7186
7187 PR remote/18965
7188 * remote-utils.c (prepare_resume_reply): Merge
7189 TARGET_WAITKIND_VFORK_DONE switch case with the
7190 TARGET_WAITKIND_FORKED case.
7191
7192 2015-09-15 Yao Qi <yao.qi@linaro.org>
7193
7194 * server.c (handle_query): Check string comparison using
7195 "else if" instead of "if".
7196
7197 2015-09-15 Yao Qi <yao.qi@linaro.org>
7198
7199 * server.c (vCont_supported): New global variable.
7200 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7201 matches. Append ";vContSupported+" to own_buf.
7202 (handle_v_requests): Append ";s;S" to own_buf if target supports
7203 hardware single step or vCont_supported is false.
7204 (capture_main): Set vCont_supported to zero.
7205
7206 2015-09-15 Yao Qi <yao.qi@linaro.org>
7207
7208 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7209 it to ...
7210 (linux_supports_hardware_single_step): ... New function.
7211 (linux_target_ops): Update.
7212 * lynx-low.c (lynx_target_ops): Set field
7213 supports_hardware_single_step to target_can_do_hardware_single_step.
7214 * nto-low.c (nto_target_ops): Likewise.
7215 * spu-low.c (spu_target_ops): Likewise.
7216 * win32-low.c (win32_target_ops): Likewise.
7217 * target.c (target_can_do_hardware_single_step): New function.
7218 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7219 Remove. <supports_hardware_single_step>: New field.
7220 (target_supports_conditional_breakpoints): Remove.
7221 (target_supports_hardware_single_step): New macro.
7222 (target_can_do_hardware_single_step): Declare.
7223 * server.c (handle_query): Use target_supports_hardware_single_step
7224 instead of target_supports_conditional_breakpoints.
7225
7226 2015-09-15 Yao Qi <yao.qi@linaro.org>
7227
7228 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7229 function.
7230 (struct linux_target_ops the_low_target): Install
7231 aarch64_linux_siginfo_fixup.
7232
7233 2015-09-11 Don Breazeal <donb@codesourcery.com>
7234 Luis Machado <lgustavo@codesourcery.com>
7235
7236 * linux-low.c (linux_mourn): Static declaration.
7237 (linux_arch_setup): Move in front of
7238 handle_extended_wait.
7239 (linux_arch_setup_thread): New function.
7240 (handle_extended_wait): Handle exec events. Call
7241 linux_arch_setup_thread. Make event_lwp argument a
7242 pointer-to-a-pointer.
7243 (check_zombie_leaders): Do not check stopped threads.
7244 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7245 (linux_low_filter_event): Add lwp and thread for exec'ing
7246 non-leader thread if leader thread has been deleted.
7247 Refactor code into linux_arch_setup_thread and call it.
7248 Pass child lwp pointer by reference to handle_extended_wait.
7249 (linux_wait_for_event_filtered): Update comment.
7250 (linux_wait_1): Prevent clobbering exec event status.
7251 (linux_supports_exec_events): New function.
7252 (linux_target_ops) <supports_exec_events>: Initialize new member.
7253 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7254 new member.
7255 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7256 * server.c (report_exec_events): New global variable.
7257 (handle_query): Handle qSupported query for exec-events feature.
7258 (captured_main): Initialize report_exec_events.
7259 * server.h (report_exec_events): Declare new global variable.
7260 * target.h (struct target_ops) <supports_exec_events>: New
7261 member.
7262 (target_supports_exec_events): New macro.
7263 * win32-low.c (win32_target_ops) <supports_exec_events>:
7264 Initialize new member.
7265
7266 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7267
7268 * linux-low.c (linux_low_enable_btrace): Remove.
7269 (linux_target_ops): Replace linux_low_enable_btrace with
7270 linux_enable_btrace.
7271
7272 2015-09-03 Yao Qi <yao.qi@linaro.org>
7273
7274 * linux-aarch64-low.c (aarch64_insert_point): Call
7275 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7276 returns true.
7277
7278 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7279
7280 * linux-low.c (check_stopped_by_breakpoint): Use
7281 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7282
7283 2015-08-27 Pedro Alves <palves@redhat.com>
7284
7285 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7286
7287 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7288
7289 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7290 the XNEW-family equivalent.
7291 (compile_bytecodes): Likewise.
7292 * dll.c (loaded_dll): Likewise.
7293 * event-loop.c (append_callback_event): Likewise.
7294 (create_file_handler): Likewise.
7295 (create_file_event): Likewise.
7296 * hostio.c (handle_open): Likewise.
7297 * inferiors.c (add_thread): Likewise.
7298 (add_process): Likewise.
7299 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7300 * linux-arm-low.c (arm_new_process): Likewise.
7301 (arm_new_thread): Likewise.
7302 * linux-low.c (add_to_pid_list): Likewise.
7303 (linux_add_process): Likewise.
7304 (handle_extended_wait): Likewise.
7305 (add_lwp): Likewise.
7306 (enqueue_one_deferred_signal): Likewise.
7307 (enqueue_pending_signal): Likewise.
7308 (linux_resume_one_lwp_throw): Likewise.
7309 (linux_resume_one_thread): Likewise.
7310 (linux_read_memory): Likewise.
7311 (linux_write_memory): Likewise.
7312 * linux-mips-low.c (mips_linux_new_process): Likewise.
7313 (mips_linux_new_thread): Likewise.
7314 (mips_add_watchpoint): Likewise.
7315 * linux-x86-low.c (initialize_low_arch): Likewise.
7316 * lynx-low.c (lynx_add_process): Likewise.
7317 * mem-break.c (set_raw_breakpoint_at): Likewise.
7318 (set_breakpoint): Likewise.
7319 (add_condition_to_breakpoint): Likewise.
7320 (add_commands_to_breakpoint): Likewise.
7321 (clone_agent_expr): Likewise.
7322 (clone_one_breakpoint): Likewise.
7323 * regcache.c (new_register_cache): Likewise.
7324 * remote-utils.c (look_up_one_symbol): Likewise.
7325 * server.c (queue_stop_reply): Likewise.
7326 (start_inferior): Likewise.
7327 (queue_stop_reply_callback): Likewise.
7328 (handle_target_event): Likewise.
7329 * spu-low.c (fetch_ppc_memory): Likewise.
7330 (store_ppc_memory): Likewise.
7331 * target.c (set_target_ops): Likewise.
7332 * thread-db.c (thread_db_load_search): Likewise.
7333 (try_thread_db_load_1): Likewise.
7334 * tracepoint.c (add_tracepoint): Likewise.
7335 (add_tracepoint_action): Likewise.
7336 (create_trace_state_variable): Likewise.
7337 (cmd_qtdpsrc): Likewise.
7338 (cmd_qtro): Likewise.
7339 (add_while_stepping_state): Likewise.
7340 * win32-low.c (child_add_thread): Likewise.
7341 (get_image_name): Likewise.
7342
7343 2015-08-25 Yao Qi <yao.qi@linaro.org>
7344
7345 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7346
7347 2015-08-25 Yao Qi <yao.qi@linaro.org>
7348
7349 * Makefile.in (aarch64-linux.o): New rule.
7350 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7351 srv_tgtobj.
7352 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7353 (aarch64_init_debug_reg_state): Make it extern.
7354 (aarch64_linux_prepare_to_resume): Remove.
7355
7356 2015-08-25 Yao Qi <yao.qi@linaro.org>
7357
7358 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7359 lwp_arch_private_info and ptid_of_lwp.
7360
7361 2015-08-25 Yao Qi <yao.qi@linaro.org>
7362
7363 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7364 Find proc_info by find_process_pid. All callers updated.
7365
7366 2015-08-25 Yao Qi <yao.qi@linaro.org>
7367
7368 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7369 Remove.
7370 (debug_reg_change_callback): Remove.
7371 (aarch64_notify_debug_reg_change): Remove.
7372
7373 2015-08-25 Yao Qi <yao.qi@linaro.org>
7374
7375 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7376 Call current_lwp_ptid.
7377
7378 2015-08-25 Yao Qi <yao.qi@linaro.org>
7379
7380 * linux-aarch64-low.c (debug_reg_change_callback): Use
7381 debug_printf.
7382
7383 2015-08-25 Yao Qi <yao.qi@linaro.org>
7384
7385 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7386
7387 2015-08-25 Yao Qi <yao.qi@linaro.org>
7388
7389 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7390
7391 2015-08-25 Yao Qi <yao.qi@linaro.org>
7392
7393 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7394 the code.
7395
7396 2015-08-25 Yao Qi <yao.qi@linaro.org>
7397
7398 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7399 Remove.
7400 (debug_reg_change_callback): Remove argument entry and add argument
7401 lwp. Remove local variable thread. Don't print thread id in the
7402 debugging output. Don't check whether pid of thread equals to pid.
7403 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7404 iterate_over_lwps instead find_inferior.
7405
7406 2015-08-24 Pedro Alves <palves@redhat.com>
7407
7408 * inferiors.c (get_first_process): New function.
7409 * inferiors.h (get_first_process): New declaration.
7410 * remote-utils.c (read_ptid): Default to the first process in the
7411 list, instead of to the current thread's process.
7412
7413 2015-08-24 Pedro Alves <palves@redhat.com>
7414
7415 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7416 * event-loop.c: Likewise.
7417 * remote-utils.c: Likewise.
7418 * tracepoint.c: Likewise.
7419
7420 2015-08-24 Pedro Alves <palves@redhat.com>
7421
7422 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7423 ptid_get_lwp.
7424
7425 2015-08-21 Pedro Alves <palves@redhat.com>
7426
7427 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7428 instead of literal 1.
7429
7430 2015-08-21 Pedro Alves <palves@redhat.com>
7431
7432 * tdesc.c (default_description): Explicitly zero-initialize.
7433
7434 2015-08-21 Pedro Alves <palves@redhat.com>
7435
7436 PR gdb/18749
7437 * inferiors.c (remove_thread): Discard any pending stop reply for
7438 this thread.
7439 * server.c (remove_all_on_match_pid): Rename to ...
7440 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7441 instead of a pid.
7442 (discard_queued_stop_replies): Change parameter to a ptid. Now
7443 extern.
7444 (handle_v_kill, kill_inferior_callback, captured_main)
7445 (process_serial_event): Adjust.
7446 * server.h (discard_queued_stop_replies): Declare.
7447
7448 2015-08-21 Pedro Alves <palves@redhat.com>
7449
7450 * linux-low.c (wait_for_sigstop): Always switch to no thread
7451 selected if the previously current thread dies.
7452 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7453 process instead of the current thread's.
7454 * remote-utils.c (input_interrupt): Don't check if there's no
7455 current thread.
7456 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7457 current thread to the general thread fails, error out.
7458 (handle_qxfer_auxv, handle_qxfer_libraries)
7459 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7460 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7461 (handle_query): Check if there's a thread selected instead of
7462 checking whether there's any thread in the thread list.
7463 (handle_qxfer_threads, handle_qxfer_btrace)
7464 (handle_qxfer_btrace_conf): Don't error out early if there's no
7465 thread in the thread list.
7466 (handle_v_cont, myresume): Don't set the current thread to the
7467 continue thread.
7468 (process_serial_event) <Hg handling>: Also set thread_id if the
7469 previous general thread is still alive.
7470 (process_serial_event) <g/G handling>: If setting the current
7471 thread to the general thread fails, error out.
7472 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7473 thread's lwp instead of the current thread's.
7474 * target.c (set_desired_thread): If the desired thread was not
7475 found, leave the current thread pointing to NULL. Return an int
7476 (boolean) indicating success.
7477 * target.h (set_desired_thread): Change return type to int.
7478
7479 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7480
7481 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7482 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7483 #includes.
7484 (ps_get_thread_area): New function.
7485
7486 2015-08-19 Gary Benson <gbenson@redhat.com>
7487
7488 * hostio.c (handle_pread): Do not attempt to read more data
7489 than hostio_reply_with_data can fit in a packet.
7490
7491 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7492
7493 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7494
7495 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7496
7497 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7498
7499 2015-08-06 Pedro Alves <palves@redhat.com>
7500
7501 * tracepoint.c (expr_eval_result): Now an int.
7502
7503 2015-08-06 Pedro Alves <palves@redhat.com>
7504
7505 * gdbthread.h (struct regcache): Forward declare.
7506 (struct thread_info) <regcache_data>: Now a struct regcache
7507 pointer.
7508 * inferiors.c (inferior_regcache_data)
7509 (set_inferior_regcache_data): Now work with struct regcache
7510 pointers.
7511 * inferiors.h (struct regcache): Forward declare.
7512 (inferior_regcache_data, set_inferior_regcache_data): Now work
7513 with struct regcache pointers.
7514 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7515 (free_register_cache_thread): Remove struct regcache pointer
7516 casts.
7517
7518 2015-08-06 Pedro Alves <palves@redhat.com>
7519
7520 * server.c (captured_main): On error, print the exception message
7521 to stderr, and if run_once is set, throw a quit.
7522
7523 2015-08-06 Pedro Alves <palves@redhat.com>
7524
7525 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7526 the current thread.
7527
7528 2015-08-06 Pedro Alves <palves@redhat.com>
7529
7530 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7531 reading beyond the passed in buffer length.
7532
7533 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7534
7535 * tracepoint.c (symbol_list) <required>: Remove.
7536
7537 2015-08-06 Pedro Alves <palves@redhat.com>
7538
7539 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7540 count if stopping and suspending threads.
7541 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7542 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7543 (linux_detach): Complete an ongoing step-over.
7544 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7545 throughout.
7546 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7547 (linux_wait_1): If passing a signal to the inferior after
7548 finishing a step-over, unsuspend and re-resume all lwps. If we
7549 see a single-step event but the thread should be continuing, don't
7550 pass the trap to gdb.
7551 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7552 internal_error instead of gdb_assert.
7553 (enqueue_pending_signal): New function.
7554 (check_ptrace_stopped_lwp_gone): Add debug output.
7555 (start_step_over): Use internal_error instead of gdb_assert.
7556 (complete_ongoing_step_over): New function.
7557 (linux_resume_one_thread): Don't resume a suspended thread.
7558 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7559 it stepping.
7560
7561 2015-08-06 Pedro Alves <palves@redhat.com>
7562
7563 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7564 (linux_thread_alive): Use lwp_is_marked_dead.
7565 (extended_event_reported): Delete.
7566 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7567 instead of extended_event_reported.
7568 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7569 as well.
7570 (lwp_is_marked_dead): New function.
7571 (lwp_running): Use lwp_is_marked_dead.
7572 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7573 comment.
7574
7575 2015-08-06 Pedro Alves <palves@redhat.com>
7576
7577 * linux-low.c (linux_wait_1): Move fork event output out of the
7578 !report_to_gdb check. Pass event_child->waitstatus to
7579 target_waitstatus_to_string instead of ourstatus.
7580
7581 2015-08-04 Yao Qi <yao.qi@linaro.org>
7582
7583 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7584 if current_thread is 32 bit.
7585
7586 2015-08-04 Yao Qi <yao.qi@linaro.org>
7587
7588 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7589 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7590 * server.c (extended_protocol): Remove "static".
7591 * server.h (extended_protocol): Declare it.
7592
7593 2015-08-04 Yao Qi <yao.qi@linaro.org>
7594
7595 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7596 both aarch64 and aarch32.
7597 (aarch64_set_pc): Likewise.
7598
7599 2015-08-04 Yao Qi <yao.qi@linaro.org>
7600
7601 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7602 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7603 arm-with-neon.xml to srv_xmlfiles.
7604 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7605 (is_64bit_tdesc): New function.
7606 (aarch64_linux_read_description): New function.
7607 (aarch64_arch_setup): Call aarch64_linux_read_description.
7608 (regs_info): Rename to regs_info_aarch64.
7609 (aarch64_regs_info): Return right regs_info.
7610 (initialize_low_arch): Call initialize_low_arch_aarch32.
7611
7612 2015-08-04 Yao Qi <yao.qi@linaro.org>
7613
7614 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7615 * linux-aarch32-low.c: New file.
7616 * linux-aarch32-low.h: New file.
7617 * linux-arm-low.c (arm_fill_gregset): Move it to
7618 linux-aarch32-low.c.
7619 (arm_store_gregset): Likewise.
7620 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7621 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7622 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7623 (regs_info): Rename to regs_info_arm.
7624 (arm_regs_info): Return regs_info_aarch32 if
7625 have_ptrace_getregset is 1 and target description is
7626 arm_with_neon or arm_with_vfpv3.
7627 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7628 Call initialize_low_arch_aarch32 instead.
7629
7630 2015-08-04 Yao Qi <yao.qi@linaro.org>
7631
7632 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7633 * linux-low.c: ... here.
7634 * linux-low.h (have_ptrace_getregset): Declare it.
7635
7636 2015-08-04 Pedro Alves <palves@redhat.com>
7637
7638 * thread-db.c (struct thread_db): Use new typedefs.
7639 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7640 CHK calls.
7641 (disable_thread_event_reporting): Cast result of dlsym to
7642 destination function pointer type.
7643 (thread_db_mourn): Use td_ta_delete_ftype.
7644
7645 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7646
7647 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7648 arch variant.
7649 (CDX_BREAKPOINT): Define for R2.
7650 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7651 (the_low_target): Add comments.
7652
7653 2015-07-30 Yao Qi <yao.qi@linaro.org>
7654
7655 * linux-arm-low.c (arm_hwcap): Remove it.
7656 (arm_read_description): New local variable arm_hwcap. Don't
7657 set arm_hwcap to zero.
7658
7659 2015-07-30 Yao Qi <yao.qi@linaro.org>
7660
7661 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7662 Use regcache->tdesc instead.
7663 (arm_store_wmmxregset): Likewise.
7664 (arm_fill_vfpregset): Likewise.
7665 (arm_store_vfpregset): Likewise.
7666
7667 2015-07-30 Yao Qi <yao.qi@linaro.org>
7668
7669 * linux-arm-low.c: Include arch/arm.h.
7670 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7671 (arm_store_gregset): Likewise.
7672
7673 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7674
7675 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7676 ptrace's 4th parameter.
7677
7678 2015-07-27 Yao Qi <yao.qi@linaro.org>
7679
7680 * configure.srv (case aarch64*-*-linux*): Don't set
7681 srv_linux_usrregs.
7682
7683 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7684
7685 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7686 sys/ptrace.h.
7687 * linux-arm-low.c: Likewise.
7688 * linux-cris-low.c: Likewise.
7689 * linux-crisv32-low.c: Likewise.
7690 * linux-low.c: Likewise.
7691 * linux-m68k-low.c: Likewise.
7692 * linux-mips-low.c: Likewise.
7693 * linux-nios2-low.c: Likewise.
7694 * linux-s390-low.c: Likewise.
7695 * linux-sparc-low.c: Likewise.
7696 * linux-tic6x-low.c: Likewise.
7697 * linux-tile-low.c: Likewise.
7698 * linux-x86-low.c: Likewise.
7699
7700 2015-07-24 Pedro Alves <palves@redhat.com>
7701
7702 * config.in: Regenerate.
7703 * configure: Regenerate.
7704
7705 2015-07-24 Pedro Alves <palves@redhat.com>
7706
7707 * acinclude.m4: Include ../ptrace.m4.
7708 * configure.ac: Call GDB_AC_PTRACE.
7709 * config.in, configure: Regenerate.
7710
7711 2015-07-24 Yao Qi <yao.qi@linaro.org>
7712
7713 * linux-low.c (linux_create_inferior): Remove setting to
7714 proc->priv->new_inferior.
7715 (linux_attach): Likewise.
7716 (linux_low_filter_event): Likewise.
7717 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7718
7719 2015-07-24 Yao Qi <yao.qi@linaro.org>
7720
7721 * linux-low.c (linux_arch_setup): New function.
7722 (linux_low_filter_event): If proc->tdesc is NULL and
7723 proc->attached is true, call the_low_target.arch_setup.
7724 Otherwise, keep status pending, and return.
7725 (linux_resume_one_lwp_throw): Don't call get_pc if
7726 thread->while_stepping isn't NULL. Don't call
7727 get_thread_regcache if proc->tdesc is NULL.
7728 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7729 (linux_target_ops): Install arch_setup.
7730 * server.c (start_inferior): Call the_target->arch_setup.
7731 * target.h (struct target_ops) <arch_setup>: New field.
7732 (target_arch_setup): New marco.
7733 * lynx-low.c (lynx_target_ops): Update.
7734 * nto-low.c (nto_target_ops): Update.
7735 * spu-low.c (spu_target_ops): Update.
7736 * win32-low.c (win32_target_ops): Update.
7737
7738 2015-07-24 Yao Qi <yao.qi@linaro.org>
7739
7740 * linux-low.c (linux_add_process): Don't set
7741 proc->priv->new_inferior.
7742 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7743 (linux_attach): Likewise.
7744
7745 2015-07-24 Yao Qi <yao.qi@linaro.org>
7746
7747 * server.c (start_inferior): Code refactor.
7748
7749 2015-07-24 Yao Qi <yao.qi@linaro.org>
7750
7751 * server.c (process_serial_event): Set general_thread.
7752
7753 2015-07-21 Yao Qi <yao.qi@linaro.org>
7754
7755 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7756 aarch64_linux_get_debug_reg_capacity.
7757
7758 2015-07-17 Yao Qi <yao.qi@linaro.org>
7759
7760 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7761 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7762 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7763 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7764 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7765 (AARCH64_HWP_ALIGNMENT): Likewise.
7766 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7767 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7768 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7769 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7770 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7771 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7772 (struct aarch64_debug_reg_state): Likewise.
7773 (struct arch_lwp_info): Likewise.
7774 (aarch64_align_watchpoint): Likewise.
7775 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7776 (aarch64_watchpoint_length): Likewise.
7777 (aarch64_point_encode_ctrl_reg): Likewise
7778 (aarch64_point_is_aligned): Likewise.
7779 (aarch64_align_watchpoint): Likewise.
7780 (aarch64_linux_set_debug_regs):
7781 (aarch64_dr_state_insert_one_point): Likewise.
7782 (aarch64_dr_state_remove_one_point): Likewise.
7783 (aarch64_handle_breakpoint): Likewise.
7784 (aarch64_handle_aligned_watchpoint): Likewise.
7785 (aarch64_handle_unaligned_watchpoint): Likewise.
7786 (aarch64_handle_watchpoint): Likewise.
7787
7788 2015-07-17 Yao Qi <yao.qi@linaro.org>
7789
7790 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7791 and don't aarch64_get_debug_reg_state. All callers update.
7792 (aarch64_handle_aligned_watchpoint): Likewise.
7793 (aarch64_handle_unaligned_watchpoint): Likewise.
7794 (aarch64_handle_watchpoint): Likewise.
7795 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7796 (aarch64_remove_point): Likewise.
7797
7798 2015-07-17 Yao Qi <yao.qi@linaro.org>
7799
7800 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7801 debug_printf.
7802 (aarch64_handle_unaligned_watchpoint): Likewise.
7803
7804 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7805
7806 Revert the previous 3 commits:
7807 Move gdb_regex* to common/
7808 Move linux_find_memory_regions_full & co.
7809 gdbserver build-id attribute generator
7810
7811 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7812 Jan Kratochvil <jan.kratochvil@redhat.com>
7813
7814 gdbserver build-id attribute generator.
7815 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7816 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7817 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7818 (find_phdr): New.
7819 (get_dynamic): Use find_pdhr to traverse program headers.
7820 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7821 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7822 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7823 (get_hex_build_id): New.
7824 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7825 to reply XML document.
7826
7827 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7828 Jan Kratochvil <jan.kratochvil@redhat.com>
7829
7830 * target.c: Include target/target-utils.h and fcntl.h.
7831 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7832 (target_fileio_read_stralloc): New functions.
7833
7834 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7835
7836 * Makefile.in (OBS): Add gdb_regex.o.
7837 (gdb_regex.o): New.
7838 * config.in: Rebuilt.
7839 * configure: Rebuilt.
7840
7841 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7842 Jan Kratochvil <jan.kratochvil@redhat.com>
7843
7844 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7845 * Makefile.in (OBS): Add target-utils.o.
7846 (linux-maps.o, target-utils.o): New.
7847 * configure.srv (srv_linux_obj): Add linux-maps.o.
7848
7849 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7850
7851 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7852 function, return 1.
7853 (the_low_target): Install it.
7854
7855 2015-07-14 Pedro Alves <palves@redhat.com>
7856
7857 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7858 Instead, ignore ECHILD, and throw an error for other errnos.
7859
7860 2015-07-10 Pedro Alves <palves@redhat.com>
7861
7862 * event-loop.c (struct callback_event) <data>: Change type to
7863 gdb_client_data instance instead of gdb_client_data pointer.
7864 (append_callback_event): Adjust.
7865
7866 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7867
7868 * linux-aarch64-low.c: Add comments for each linux_target_ops
7869 method. Remove comments already covered in target_ops and
7870 linux_target_ops definitions.
7871 (the_low_target): Add comments for each unimplemented method.
7872
7873 2015-07-09 Yao Qi <yao.qi@linaro.org>
7874
7875 * linux-aarch64-low.c (aarch64_regmap): Remove.
7876 (aarch64_usrregs_info): Remove.
7877 (regs_info): Set field usrregs to NULL.
7878
7879 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7880
7881 * linux-low.c: Include "rsp-low.h"
7882 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7883 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7884 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7885 (handle_btrace_enable_pt): New.
7886 (handle_btrace_general_set): Support "pt".
7887 (handle_btrace_conf_general_set): Support "pt:size".
7888
7889 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7890
7891 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7892 Z_PACKET_SW_BP.
7893
7894 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7895
7896 * linux-aarch64-low.c: Remove comment about endianness.
7897 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7898 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7899 memcmp.
7900
7901 2015-06-24 Gary Benson <gbenson@redhat.com>
7902
7903 * linux-i386-ipa.c (stdint.h): Do not include.
7904 * lynx-i386-low.c (stdint.h): Likewise.
7905 * lynx-ppc-low.c (stdint.h): Likewise.
7906 * mem-break.c (stdint.h): Likewise.
7907 * thread-db.c (stdint.h): Likewise.
7908 * tracepoint.c (stdint.h): Likewise.
7909 * win32-low.c (stdint.h): Likewise.
7910
7911 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7912
7913 * server.c (write_qxfer_response): Update call to
7914 remote_escape_output.
7915
7916 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7917 Jan Kratochvil <jan.kratochvil@redhat.com>
7918
7919 Merge multiple hex conversions.
7920 * gdbreplay.c (tohex): Rename to 'fromhex'.
7921 (logchar): Use fromhex.
7922
7923 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7924
7925 * server.c (handle_qxfer_libraries): Set `version' attribute for
7926 <library-list>.
7927
7928 2015-06-10 Gary Benson <gbenson@redhat.com>
7929
7930 * target.h (struct target_ops) <multifs_open>: New field.
7931 <multifs_unlink>: Likewise.
7932 <multifs_readlink>: Likewise.
7933 * linux-low.c (nat/linux-namespaces.h): New include.
7934 (linux_target_ops): Initialize the_target->multifs_open,
7935 the_target->multifs_unlink and the_target->multifs_readlink.
7936 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7937 * hostio.c (hostio_fs_pid): New static variable.
7938 (hostio_handle_new_gdb_connection): New function.
7939 (handle_setfs): Likewise.
7940 (handle_open): Use the_target->multifs_open as appropriate.
7941 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7942 (handle_readlink): Use the_target->multifs_readlink as
7943 appropriate.
7944 (handle_vFile): Handle vFile:setfs packets.
7945 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7946 after target_handle_new_gdb_connection.
7947
7948 2015-06-10 Gary Benson <gbenson@redhat.com>
7949
7950 * configure.ac (AC_CHECK_FUNCS): Add setns.
7951 * config.in: Regenerate.
7952 * configure: Likewise.
7953 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7954 (linux-namespaces.o): New rule.
7955 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7956
7957 2015-06-09 Gary Benson <gbenson@redhat.com>
7958
7959 * hostio.c (handle_open): Process mode argument with
7960 fileio_to_host_mode.
7961
7962 2015-06-01 Yao Qi <yao.qi@linaro.org>
7963
7964 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7965 * linux-x86-low.c: Likewise.
7966
7967 2015-05-28 Don Breazeal <donb@codesourcery.com>
7968
7969 * linux-low.c (handle_extended_wait): Initialize
7970 thread_info.last_resume_kind for new fork children.
7971
7972 2015-05-15 Pedro Alves <palves@redhat.com>
7973
7974 * target.h (target_handle_new_gdb_connection): Rewrite using if
7975 wrapped in do/while.
7976
7977 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7978
7979 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
7980 * configure, config.in: Regenerate.
7981 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
7982 Declare typedef.
7983
7984 2015-05-12 Don Breazeal <donb@codesourcery.com>
7985
7986 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
7987 PTRACE_EVENT_VFORK_DONE.
7988 (linux_low_ptrace_options, extended_event_reported): Add vfork
7989 events.
7990 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
7991 and "vforkdone" for RSP 'T' Stop Reply Packet.
7992 * server.h (report_vfork_events): Declare
7993 global variable.
7994
7995 2015-05-12 Don Breazeal <donb@codesourcery.com>
7996
7997 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
7998 (the_low_target) <new_fork>: Initialize new member.
7999 * linux-arm-low.c (arm_new_fork): New function.
8000 (the_low_target) <new_fork>: Initialize new member.
8001 * linux-low.c (handle_extended_wait): Call new target function
8002 new_fork.
8003 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8004 * linux-mips-low.c (mips_add_watchpoint): New function
8005 extracted from mips_insert_point.
8006 (the_low_target) <new_fork>: Initialize new member.
8007 (mips_linux_new_fork): New function.
8008 (mips_insert_point): Call mips_add_watchpoint.
8009 * linux-x86-low.c (x86_linux_new_fork): New function.
8010 (the_low_target) <new_fork>: Initialize new member.
8011
8012 2015-05-12 Don Breazeal <donb@codesourcery.com>
8013
8014 * linux-low.c (handle_extended_wait): Implement return value,
8015 rename argument 'event_child' to 'event_lwp', handle
8016 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8017 (linux_low_ptrace_options): New function.
8018 (linux_low_filter_event): Call linux_low_ptrace_options,
8019 use different argument fo linux_enable_event_reporting,
8020 use return value from handle_extended_wait.
8021 (extended_event_reported): New function.
8022 (linux_wait_1): Call extended_event_reported and set
8023 status to report fork events.
8024 (linux_write_memory): Add pid to debug message.
8025 (reset_lwp_ptrace_options_callback): New function.
8026 (linux_handle_new_gdb_connection): New function.
8027 (linux_target_ops): Initialize new structure member.
8028 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8029 * lynx-low.c: Initialize new structure member.
8030 * remote-utils.c (prepare_resume_reply): Implement stop reason
8031 "fork" for "T" stop message.
8032 * server.c (handle_query): Call handle_new_gdb_connection.
8033 * server.h (report_fork_events): Declare global flag.
8034 * target.h (struct target_ops) <handle_new_gdb_connection>:
8035 New member.
8036 (target_handle_new_gdb_connection): New macro.
8037 * win32-low.c: Initialize new structure member.
8038
8039 2015-05-12 Don Breazeal <donb@codesourcery.com>
8040
8041 * mem-break.c (APPEND_TO_LIST): Define macro.
8042 (clone_agent_expr): New function.
8043 (clone_one_breakpoint): New function.
8044 (clone_all_breakpoints): New function.
8045 * mem-break.h: Declare new functions.
8046
8047 2015-05-12 Don Breazeal <donb@codesourcery.com>
8048
8049 * linux-low.c (linux_supports_fork_events): New function.
8050 (linux_supports_vfork_events): New function.
8051 (linux_target_ops): Initialize new structure members.
8052 (initialize_low): Call linux_check_ptrace_features.
8053 * lynx-low.c (lynx_target_ops): Initialize new structure
8054 members.
8055 * server.c (report_fork_events, report_vfork_events):
8056 New global flags.
8057 (handle_query): Add new features to qSupported packet and
8058 response.
8059 (captured_main): Initialize new global variables.
8060 * target.h (struct target_ops) <supports_fork_events>:
8061 New member.
8062 <supports_vfork_events>: New member.
8063 (target_supports_fork_events): New macro.
8064 (target_supports_vfork_events): New macro.
8065 * win32-low.c (win32_target_ops): Initialize new structure
8066 members.
8067
8068 2015-05-12 Gary Benson <gbenson@redhat.com>
8069
8070 * server.c (handle_qxfer_exec_file): Use current process
8071 if annex is empty.
8072
8073 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8074
8075 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8076 Remove HAVE_PTRACE_GETREGS conditionals.
8077 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8078 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8079
8080 2015-05-08 Yao Qi <yao.qi@linaro.org>
8081
8082 * linux-low.c (linux_supports_conditional_breakpoints): New
8083 function.
8084 (linux_target_ops): Install new target method.
8085 * lynx-low.c (lynx_target_ops): Install NULL hook for
8086 supports_conditional_breakpoints.
8087 * nto-low.c (nto_target_ops): Likewise.
8088 * spu-low.c (spu_target_ops): Likewise.
8089 * win32-low.c (win32_target_ops): Likewise.
8090 * server.c (handle_query): Check
8091 target_supports_conditional_breakpoints.
8092 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8093 New field.
8094 (target_supports_conditional_breakpoints): New macro.
8095
8096 2015-05-06 Pedro Alves <palves@redhat.com>
8097
8098 PR server/18081
8099 * server.c (start_inferior): If the process exits, mourn it.
8100
8101 2015-04-21 Gary Benson <gbenson@redhat.com>
8102
8103 * hostio.c (fileio_open_flags_to_host): Factored out to
8104 fileio_to_host_openflags in common/fileio.c. Single use
8105 updated.
8106
8107 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8108
8109 * linux-xtensa-low.c (xtensa_fill_gregset)
8110 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8111 XCHAL_HAVE_LOOP.
8112
8113 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8114
8115 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8116 (regs_info): Replace usrregs pointer with NULL.
8117
8118 2015-04-17 Gary Benson <gbenson@redhat.com>
8119
8120 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8121 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8122 * server.c (handle_qxfer_exec_file): New function.
8123 (qxfer_packets): Add exec-file entry.
8124 (handle_query): Report qXfer:exec-file:read as supported packet.
8125
8126 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8127
8128 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8129
8130 2015-04-09 Gary Benson <gbenson@redhat.com>
8131
8132 * hostio-errno.c (errno_to_fileio_error): Remove function.
8133 Update caller to use remote_fileio_to_fio_error.
8134
8135 2015-04-09 Yao Qi <yao.qi@linaro.org>
8136
8137 * linux-low.c (linux_insert_point): Call
8138 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8139 (linux_remove_point): Call remove_memory_breakpoint if type is
8140 raw_bkpt_type_sw.
8141 * linux-x86-low.c (x86_insert_point): Don't call
8142 insert_memory_breakpoint.
8143 (x86_remove_point): Don't call remove_memory_breakpoint.
8144
8145 2015-04-01 Pedro Alves <palves@redhat.com>
8146 Cleber Rosa <crosa@redhat.com>
8147
8148 * server.c (gdbserver_usage): Reorganize and extend the usage
8149 message.
8150
8151 2015-03-24 Pedro Alves <palves@redhat.com>
8152
8153 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8154 output. Also dump TRAP_TRACE.
8155 (linux_low_filter_event): In debug output, distinguish a
8156 resume_stop SIGSTOP from a delayed SIGSTOP.
8157
8158 2015-03-24 Gary Benson <gbenson@redhat.com>
8159
8160 * linux-x86-low.c (x86_linux_new_thread): Moved to
8161 nat/x86-linux.c.
8162 (x86_linux_prepare_to_resume): Likewise.
8163
8164 2015-03-24 Gary Benson <gbenson@redhat.com>
8165
8166 * Makefile.in (x86-linux-dregs.o): New rule.
8167 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8168 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8169 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8170 (x86_linux_dr_get): Likewise.
8171 (x86_linux_dr_set): Likewise.
8172 (update_debug_registers_callback): Likewise.
8173 (x86_linux_dr_set_addr): Likewise.
8174 (x86_linux_dr_get_addr): Likewise.
8175 (x86_linux_dr_set_control): Likewise.
8176 (x86_linux_dr_get_control): Likewise.
8177 (x86_linux_dr_get_status): Likewise.
8178 (x86_linux_update_debug_registers): Likewise.
8179
8180 2015-03-24 Gary Benson <gbenson@redhat.com>
8181
8182 * linux-x86-low.c (x86_linux_update_debug_registers):
8183 New function, factored out from...
8184 (x86_linux_prepare_to_resume): ...this.
8185
8186 2015-03-24 Gary Benson <gbenson@redhat.com>
8187
8188 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8189 (x86_linux_dr_set): Likewise.
8190 (update_debug_registers_callback): Likewise.
8191 (x86_linux_dr_set_addr): Likewise.
8192 (x86_linux_dr_get_addr): Likewise.
8193 (x86_linux_dr_set_control): Likewise.
8194 (x86_linux_dr_get_control): Likewise.
8195 (x86_linux_dr_get_status): Likewise.
8196 (x86_linux_prepare_to_resume): Likewise.
8197
8198 2015-03-24 Gary Benson <gbenson@redhat.com>
8199
8200 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8201 Use perror_with_name. Pass string through gettext.
8202 (x86_linux_dr_set): Likewise.
8203
8204 2015-03-24 Gary Benson <gbenson@redhat.com>
8205
8206 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8207 (x86_linux_dr_set_addr): ...this.
8208 (x86_dr_low_get_addr): Rename to...
8209 (x86_linux_dr_get_addr): ...this.
8210 (x86_dr_low_set_control): Rename to...
8211 (x86_linux_dr_set_control): ...this.
8212 (x86_dr_low_get_control): Rename to...
8213 (x86_linux_dr_get_control): ...this.
8214 (x86_dr_low_get_status): Rename to...
8215 (x86_linux_dr_get_status): ...this.
8216 (x86_dr_low): Update with new function names.
8217
8218 2015-03-24 Gary Benson <gbenson@redhat.com>
8219
8220 * Makefile.in (x86-linux.o): New rule.
8221 * configure.srv: Add x86-linux.o to relevant targets.
8222 * linux-low.c (lwp_set_arch_private_info): New function.
8223 (lwp_arch_private_info): Likewise.
8224 * linux-x86-low.c: Include nat/x86-linux.h.
8225 (arch_lwp_info): Removed structure.
8226 (update_debug_registers_callback):
8227 Use lwp_set_debug_registers_changed.
8228 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8229 and lwp_set_debug_registers_changed.
8230 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8231
8232 2015-03-24 Gary Benson <gbenson@redhat.com>
8233
8234 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8235 * linux-arm-low.c (arm_new_thread): Likewise.
8236 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8237 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8238 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8239 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8240
8241 2015-03-24 Gary Benson <gbenson@redhat.com>
8242
8243 * linux-low.c (ptid_of_lwp): New function.
8244 (lwp_is_stopped): Likewise.
8245 (lwp_stop_reason): Likewise.
8246 * linux-x86-low.c (update_debug_registers_callback):
8247 Use lwp_is_stopped.
8248 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8249 lwp_stop_reason.
8250
8251 2015-03-24 Gary Benson <gbenson@redhat.com>
8252
8253 * linux-low.h (linux_stop_lwp): Remove declaration.
8254
8255 2015-03-24 Gary Benson <gbenson@redhat.com>
8256
8257 * linux-low.h: Include nat/linux-nat.h.
8258 * linux-low.c (iterate_over_lwps_args): New structure.
8259 (iterate_over_lwps_filter): New function.
8260 (iterate_over_lwps): Likewise.
8261 * linux-x86-low.c (update_debug_registers_callback):
8262 Update signature to what iterate_over_lwps expects.
8263 Remove PID check that iterate_over_lwps now performs.
8264 (x86_dr_low_set_addr): Use iterate_over_lwps.
8265 (x86_dr_low_set_control): Likewise.
8266
8267 2015-03-24 Gary Benson <gbenson@redhat.com>
8268
8269 * linux-x86-low.c (x86_debug_reg_state): New function.
8270 (x86_linux_prepare_to_resume): Use the above.
8271
8272 2015-03-24 Gary Benson <gbenson@redhat.com>
8273
8274 * linux-low.c (current_lwp_ptid): New function.
8275 * linux-x86-low.c: Include nat/linux-nat.h.
8276 (x86_dr_low_get_addr): Use current_lwp_ptid.
8277 (x86_dr_low_get_control): Likewise.
8278 (x86_dr_low_get_status): Likewise.
8279
8280 2015-03-20 Pedro Alves <palves@redhat.com>
8281
8282 * tracepoint.c (cmd_qtstatus): Make "str" const.
8283
8284 2015-03-20 Pedro Alves <palves@redhat.com>
8285
8286 * server.c (handle_general_set): Make "req_str" const.
8287
8288 2015-03-19 Pedro Alves <palves@redhat.com>
8289
8290 * linux-low.c (linux_resume_one_lwp): Rename to ...
8291 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8292 instead call perror_with_name.
8293 (check_ptrace_stopped_lwp_gone): New function.
8294 (linux_resume_one_lwp): Reimplement as wrapper around
8295 linux_resume_one_lwp_throw that swallows errors if the LWP is
8296 gone.
8297
8298 2015-03-19 Pedro Alves <palves@redhat.com>
8299
8300 * linux-low.c (count_events_callback, select_event_lwp_callback):
8301 No longer check whether the thread has resume_stop as last resume
8302 kind.
8303
8304 2015-03-19 Pedro Alves <palves@redhat.com>
8305
8306 * linux-low.c (count_events_callback, select_event_lwp_callback):
8307 Use the lwp's status_pending_p field, not the thread's.
8308
8309 2015-03-19 Pedro Alves <palves@redhat.com>
8310
8311 * linux-low.c (select_event_lwp_callback): Update comments to
8312 no longer mention SIGTRAP.
8313
8314 2015-03-18 Gary Benson <gbenson@redhat.com>
8315
8316 * server.c (handle_query): Do not report vFile:fstat as supported.
8317
8318 2015-03-11 Gary Benson <gbenson@redhat.com>
8319
8320 * hostio.c (sys/types.h): New include.
8321 (sys/stat.h): Likewise.
8322 (common-remote-fileio.h): Likewise.
8323 (handle_fstat): New function.
8324 (handle_vFile): Handle vFile:fstat packets.
8325
8326 2015-03-11 Gary Benson <gbenson@redhat.com>
8327
8328 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8329 struct stat.st_blocks and struct stat.st_blksize.
8330 * configure: Regenerate.
8331 * config.in: Likewise.
8332 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8333 (OBS): Add common-remote-fileio.o.
8334 (common-remote-fileio.o): New rule.
8335
8336 2015-03-09 Pedro Alves <palves@redhat.com>
8337
8338 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8339 'struct sockaddr' pointer in 'accept' call.
8340
8341 2015-03-09 Pedro Alves <palves@redhat.com>
8342
8343 Revert:
8344 2015-03-07 Pedro Alves <palves@redhat.com>
8345 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8346 or <winsock2.h> here. Instead include "gdb_socket.h".
8347 (remote_open): Use union gdb_sockaddr_u.
8348 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8349 or <winsock2.h> here. Instead include "gdb_socket.h".
8350 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8351 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8352 or <sys/un.h>.
8353 (init_named_socket, gdb_agent_helper_thread): Use union
8354 gdb_sockaddr_u.
8355
8356 2015-03-07 Pedro Alves <palves@redhat.com>
8357
8358 * configure.ac (build_warnings): Move
8359 -Wdeclaration-after-statement to the C-specific set.
8360 * configure: Regenerate.
8361
8362 2015-03-07 Pedro Alves <palves@redhat.com>
8363
8364 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8365 or <winsock2.h> here. Instead include "gdb_socket.h".
8366 (remote_open): Use union gdb_sockaddr_u.
8367 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8368 or <winsock2.h> here. Instead include "gdb_socket.h".
8369 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8370 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8371 or <sys/un.h>.
8372 (init_named_socket, gdb_agent_helper_thread): Use union
8373 gdb_sockaddr_u.
8374
8375 2015-03-07 Pedro Alves <palves@redhat.com>
8376
8377 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8378 instead.
8379
8380 2015-03-06 Yao Qi <yao.qi@linaro.org>
8381
8382 * linux-aarch64-low.c (aarch64_insert_point): Use
8383 show_debug_regs as a boolean.
8384 (aarch64_remove_point): Likewise.
8385
8386 2015-03-05 Pedro Alves <palves@redhat.com>
8387
8388 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8389 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8390 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8391 * nto-low.c (nto_target_ops): Likewise.
8392 * spu-low.c (spu_target_ops): Likewise.
8393 * win32-low.c (win32_target_ops): Likewise.
8394
8395 2015-03-04 Pedro Alves <palves@redhat.com>
8396
8397 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8398 Decide whether a breakpoint triggered based on the SIGTRAP's
8399 siginfo.si_code.
8400 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8401 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8402 (linux_low_filter_event): Check for breakpoints before checking
8403 watchpoints.
8404 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8405 siginfo.si_code.
8406 (linux_stopped_by_sw_breakpoint)
8407 (linux_supports_stopped_by_sw_breakpoint)
8408 (linux_stopped_by_hw_breakpoint)
8409 (linux_supports_stopped_by_hw_breakpoint): New functions.
8410 (linux_target_ops): Install new target methods.
8411
8412 2015-03-04 Pedro Alves <palves@redhat.com>
8413
8414 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8415 * server.c (swbreak_feature, hwbreak_feature): New globals.
8416 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8417 (captured_main): Clear swbreak_feature and hwbreak_feature.
8418 * server.h (swbreak_feature, hwbreak_feature): Declare.
8419 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8420 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8421 supports_stopped_by_hw_breakpoint>: New fields.
8422 (target_supports_stopped_by_sw_breakpoint)
8423 (target_stopped_by_sw_breakpoint)
8424 (target_supports_stopped_by_hw_breakpoint)
8425 (target_stopped_by_hw_breakpoint): Declare.
8426
8427 2015-03-04 Pedro Alves <palves@redhat.com>
8428
8429 enum lwp_stop_reason -> enum target_stop_reason
8430 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8431 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8432 (linux_wait_1, stuck_in_jump_pad_callback)
8433 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8434 (linux_stopped_by_watchpoint):
8435 * linux-low.h (enum lwp_stop_reason): Delete.
8436 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8437 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8438
8439 2015-03-04 Yao Qi <yao.qi@linaro.org>
8440
8441 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8442
8443 2015-03-03 Gary Benson <gbenson@redhat.com>
8444
8445 * hostio.c (handle_vFile): Fix prefix lengths.
8446
8447 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8448
8449 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8450 ptr_bits.
8451
8452 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8453
8454 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8455 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8456 (clean): Add "rm -f" for above C files.
8457 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8458 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8459 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8460 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8461 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8462 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8463 (init_registers_s390x_vx_linux64)
8464 (init_registers_s390x_tevx_linux64)
8465 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8466 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8467 declarations.
8468 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8469 (s390_store_vxrs_high): New functions.
8470 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8471 NT_S390_VXRS_HIGH.
8472 (s390_arch_setup): Add logic for selecting one of the new target
8473 descriptions. Activate the new vector regsets if applicable.
8474 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8475 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8476 and init_registers_s390x_tevx_linux64.
8477
8478 2015-03-01 Pedro Alves <palves@redhat.com>
8479
8480 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8481 parameter.
8482
8483 2015-02-27 Pedro Alves <palves@redhat.com>
8484
8485 * linux-x86-low.c (u_debugreg_offset): New function.
8486 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8487
8488 2015-02-27 Pedro Alves <palves@redhat.com>
8489
8490 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8491 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8492 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8493 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8494 (ps_lsetfpregs, ps_getpid)
8495 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8496 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8497 (ps_lsetxregs, ps_plog): Declare.
8498
8499 2015-02-27 Pedro Alves <palves@redhat.com>
8500
8501 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8502 IP_AGENT_EXPORT_FUNC.
8503 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8504 IP_AGENT_EXPORT_FUNC.
8505 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8506 (IP_AGENT_EXPORT): Delete.
8507 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8508 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8509 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8510 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8511 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8512 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8513 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8514 (traceframe_read_count, traceframe_write_count)
8515 (traceframes_created, trace_state_variables, get_raw_reg)
8516 (get_trace_state_variable_value, set_trace_state_variable_value)
8517 (ust_loaded, helper_thread_id, cmd_buf): Use
8518 IPA_SYM_EXPORTED_NAME.
8519 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8520 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8521 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8522 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8523 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8524 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8525 EXTERN_C_PUSH/EXTERN_C_POP.
8526 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8527 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8528 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8529 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8530 (traceframe_write_count, traceframe_read_count)
8531 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8532 (about_to_request_buffer_space, get_trace_state_variable_value)
8533 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8534 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8535 EXTERN_C_PUSH/EXTERN_C_POP.
8536 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8537 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8538 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8539 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8540 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8541 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8542 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8543 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8544 Define.
8545 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8546 (IP_AGENT_EXPORT_VAR_DECL): Define.
8547 (tracing): Declare.
8548 (gdb_agent_get_raw_reg): Declare.
8549
8550 2015-02-27 Tom Tromey <tromey@redhat.com>
8551 Pedro Alves <palves@redhat.com>
8552
8553 Rename symbols whose names are reserved C++ keywords throughout.
8554
8555 2015-02-27 Pedro Alves <palves@redhat.com>
8556
8557 * Makefile.in (COMPILER): New, get it from autoconf.
8558 (CXX): Get from autoconf instead.
8559 (COMPILE.pre): Use COMPILER.
8560 (CC-LD): Rename to ...
8561 (CC_LD): ... this. Use COMPILER.
8562 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8563 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8564 * acinclude.m4: Include build-with-cxx.m4.
8565 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8566 Disable -Werror by default if building in C++ mode.
8567 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8568 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8569 the C++ compiler. Save/restore CXXFLAGS too.
8570 * configure: Regenerate.
8571
8572 2015-02-27 Pedro Alves <palves@redhat.com>
8573
8574 * acinclude.m4: Include libiberty.m4.
8575 * configure.ac: Call libiberty_INIT.
8576 * config.in, configure: Regenerate.
8577
8578 2015-02-26 Pedro Alves <palves@redhat.com>
8579
8580 * linux-low.c (linux_wait_1): When incrementing the PC past a
8581 program breakpoint always use the_low_target.breakpoint_len as
8582 increment, rather than the maximum between that and
8583 the_low_target.decr_pc_after_break.
8584
8585 2015-02-23 Pedro Alves <palves@redhat.com>
8586
8587 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8588 thread was doing a step-over; always adjust the PC if
8589 we stepped over a permanent breakpoint.
8590 (linux_wait_1): If we stepped over breakpoint that was on top of a
8591 permanent breakpoint, manually advance the PC past it.
8592
8593 2015-02-23 Pedro Alves <palves@redhat.com>
8594
8595 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8596 modes.
8597 (x86_fill_gregset, x86_store_gregset): Use it when handling
8598 $orig_eax.
8599
8600 2015-02-20 Pedro Alves <palves@redhat.com>
8601
8602 * thread-db.c: Include "nat/linux-procfs.h".
8603 (thread_db_init): Skip listing new threads if the kernel supports
8604 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8605
8606 2015-02-20 Pedro Alves <palves@redhat.com>
8607
8608 * linux-low.c (status_pending_p_callback): Use ptid_match.
8609
8610 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8611
8612 PR breakpoints/16812
8613 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8614 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8615 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8616
8617 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8618
8619 PR breakpoints/15956
8620 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8621
8622 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8623
8624 * linux-low.c (linux_low_btrace_conf): Print size.
8625 * server.c (handle_btrace_conf_general_set): New.
8626 (hanle_general_set): Call handle_btrace_conf_general_set.
8627 (handle_query): Report Qbtrace-conf:bts:size as supported.
8628
8629 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8630
8631 * linux-low.c (linux_low_enable_btrace): Update parameters.
8632 (linux_low_btrace_conf): New.
8633 (linux_target_ops)<to_btrace_conf>: Initialize.
8634 * server.c (current_btrace_conf): New.
8635 (handle_btrace_enable): Rename to ...
8636 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8637 to target_enable_btrace. Update comment. Update users.
8638 (handle_qxfer_btrace_conf): New.
8639 (qxfer_packets): Add btrace-conf entry.
8640 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8641 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8642 (target_ops)<read_btrace_conf>: New.
8643 (target_enable_btrace): Update parameters.
8644 (target_read_btrace_conf): New.
8645
8646 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8647
8648 * server.c (handle_btrace_general_set): Remove call to
8649 target_supports_btrace.
8650 (supported_btrace_packets): New.
8651 (handle_query): Call supported_btrace_packets.
8652 * target.h: include btrace-common.h.
8653 (btrace_target_info): Removed.
8654 (supports_btrace, target_supports_btrace): Update parameters.
8655
8656 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8657
8658 * Makefile.in (SFILES): Add common/btrace-common.c.
8659 (OBS): Add common/btrace-common.o.
8660 (btrace-common.o): Add build rules.
8661 * linux-low: Include btrace-common.h.
8662 (linux_low_read_btrace): Use struct btrace_data. Call
8663 btrace_data_init and btrace_data_fini.
8664
8665 2015-02-06 Pedro Alves <palves@redhat.com>
8666
8667 * thread-db.c (find_new_threads_callback): Add debug output.
8668
8669 2015-02-04 Pedro Alves <palves@redhat.com>
8670
8671 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8672 (resume_stopped_resumed_lwps): New function.
8673 (linux_wait_for_event_filtered): Use it.
8674
8675 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8676
8677 * Makefile.in (SFILES): Add linux-personality.c.
8678 (linux-personality.o): New rule.
8679 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8680 list of objects to be built.
8681 * linux-low.c: Include nat/linux-personality.h.
8682 (linux_create_inferior): Remove code to disable address space
8683 randomization (moved to ../nat/linux-personality.c). Create
8684 cleanup to disable address space randomization.
8685
8686 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8687
8688 * Makefile.in (posix-strerror.o): New rule.
8689 (mingw-strerror.o): Likewise.
8690 * configure: Regenerated.
8691 * configure.ac: Source file ../common/common.host. Initialize new
8692 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8693
8694 2015-01-14 Yao Qi <yao@codesourcery.com>
8695
8696 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8697 (ppc-linux.o): New rule.
8698 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8699 * configure.ac: AC_CHECK_FUNCS(getauxval).
8700 * config.in: Re-generated.
8701 * configure: Re-generated.
8702 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8703 ppc64_64bit_inferior_p
8704
8705 2015-01-14 Yao Qi <yao@codesourcery.com>
8706
8707 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8708 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8709 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8710 (PT_ORIG_R3, PT_TRAP): Likewise.
8711 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8712 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8713 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8714
8715 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8716
8717 * i387-fp.c (i387_cache_to_xsave): In look over
8718 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8719 zmmh_low_space field by use of zmmh_high_space.
8720
8721 2015-01-09 Pedro Alves <palves@redhat.com>
8722
8723 * linux-low.c (step_over_bkpt): Move higher up in the file.
8724 (handle_extended_wait): Don't store the stop_pc here.
8725 (get_stop_pc): Adjust comments and rename to ...
8726 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8727 stopped for a software breakpoint or hardware breakpoint.
8728 (thread_still_has_status_pending_p): New function.
8729 (status_pending_p_callback): Use
8730 thread_still_has_status_pending_p. If the event is no longer
8731 interesting, resume the LWP.
8732 (handle_tracepoints): Add assert.
8733 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8734 (wstatus_maybe_breakpoint): New function.
8735 (cancel_breakpoint): Delete function.
8736 (check_stopped_by_watchpoint): New function, factored out from
8737 linux_low_filter_event.
8738 (lp_status_maybe_breakpoint): Delete function.
8739 (linux_low_filter_event): Remove filter_ptid argument.
8740 Leave thread group exits pending here. Store the LWP's stop PC.
8741 Always leave events pending.
8742 (linux_wait_for_event_filtered): Pull all events out of the
8743 kernel, and leave them all pending.
8744 (count_events_callback, select_event_lwp_callback): Consider all
8745 events.
8746 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8747 (select_event_lwp): Only give preference to the stepping LWP in
8748 all-stop mode. Adjust comments.
8749 (ignore_event): New function.
8750 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8751 references to cancel_breakpoints. Adjust to renames. Also give
8752 equal priority to all LWPs that have had events in non-stop mode.
8753 If reporting a software breakpoint event, unadjust the LWP's PC.
8754 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8755 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8756 Adjust.
8757 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8758 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8759 (linux_stopped_by_watchpoint): Adjust.
8760 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8761 * linux-low.h (enum lwp_stop_reason): New.
8762 (struct lwp_info) <stop_pc>: Adjust comment.
8763 <stopped_by_watchpoint>: Delete field.
8764 <stop_reason>: New field.
8765 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8766 * mem-break.c (software_breakpoint_inserted_here)
8767 (hardware_breakpoint_inserted_here): New function.
8768 * mem-break.h (software_breakpoint_inserted_here)
8769 (hardware_breakpoint_inserted_here): Declare.
8770 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8771 (cancel_breakpoints): Delete.
8772 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8773 (upload_fast_traceframes): Remove references to
8774 cancel_breakpoints.
8775
8776 2015-01-09 Pedro Alves <palves@redhat.com>
8777
8778 * thread-db.c (find_new_threads_callback): Ignore thread if the
8779 kernel thread ID is -1.
8780
8781 2015-01-09 Pedro Alves <palves@redhat.com>
8782
8783 * linux-low.c (linux_attach_fail_reason_string): Move to
8784 nat/linux-ptrace.c, and rename.
8785 (linux_attach_lwp): Update comment.
8786 (attach_proc_task_lwp_callback): New function.
8787 (linux_attach): Adjust to rename and use
8788 linux_proc_attach_tgid_threads.
8789 (linux_attach_fail_reason_string): Delete declaration.
8790
8791 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8792
8793 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8794 * server.c (gdbserver_version): Likewise.
8795
8796 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8797
8798 * remote-utils.c: Include ctype.h.
8799 (input_interrupt): Explicitly handle the case when the char
8800 received is the NUL byte. Improve the printing of non-ASCII
8801 characters.
8802
8803 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8804
8805 * linux-low.c (linux_low_filter_event): Update call to
8806 linux_enable_event_reporting following the addition of
8807 a new parameter to that function.
8808
8809 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8810
8811 PR server/17457
8812 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8813 (AARCH64_FPCR_REGNO): Likewise.
8814 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8815 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8816 (aarch64_store_fpregset): Likewise.
8817
8818 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8819
8820 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8821 Remove FIXME comment about assumption about N.
8822
8823 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8824
8825 * configure.ac: If large-file support is disabled in GDBserver,
8826 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8827 * configure: Regenerate.
8828
8829 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8830
8831 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8832 warning upon ENODATA from ptrace.
8833 * linux-s390-low.c (s390_store_tdb): New.
8834 (s390_regsets): Add regset for NT_S390_TDB.
8835
8836 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8837
8838 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8839 without a fill_function.
8840 * linux-s390-low.c (s390_fill_last_break): Remove.
8841 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8842 (s390_arch_setup): Use regset's size instead of fill_function for
8843 loop end condition.
8844
8845 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8846
8847 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8848 the regset's store function when ptrace returned an error.
8849 * regcache.c (get_thread_regcache): Invalidate register cache
8850 before fetching inferior's registers.
8851
8852 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8853
8854 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8855 while-loop as for-loop.
8856 (regsets_store_inferior_registers): Likewise.
8857
8858 2014-11-28 Yao Qi <yao@codesourcery.com>
8859
8860 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8861 * config.in, configure: Re-generate.
8862 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8863 is defined.
8864
8865 2014-11-21 Yao Qi <yao@codesourcery.com>
8866
8867 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8868 (AC_CHECK_HEADERS): Remove malloc.h.
8869 * configure: Re-generated.
8870 * config.in: Re-generated.
8871 * server.h: Don't include alloca.h and malloc.h.
8872 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8873 Don't include malloc.h.
8874
8875 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8876
8877 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8878 corresponding ERRNO check in same block.
8879
8880 2014-11-12 Pedro Alves <palves@redhat.com>
8881
8882 * server.c (cont_thread): Update comment.
8883 (start_inferior, attach_inferior): No longer clear cont_thread.
8884 (handle_v_cont): No longer set cont_thread.
8885 (captured_main): Clear cont_thread each time a GDB connects.
8886
8887 2014-11-12 Pedro Alves <palves@redhat.com>
8888
8889 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8890 thread, and don't resume all threads if the Hc thread has exited.
8891
8892 2014-11-12 Pedro Alves <palves@redhat.com>
8893
8894 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8895 the process group instead of to a specific LWP.
8896
8897 2014-10-15 Pedro Alves <palves@redhat.com>
8898
8899 PR server/17487
8900 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8901 parameter.
8902 (arm_set_thread_context): Delete.
8903 (the_low_target): Adjust.
8904 * win32-i386-low.c (debug_registers_changed)
8905 (debug_registers_used): Delete.
8906 (update_debug_registers_callback): New function.
8907 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8908 needing to update their debug registers.
8909 (win32_get_current_dr): New function.
8910 (x86_dr_low_get_addr, x86_dr_low_get_control)
8911 (x86_dr_low_get_status): Fetch the debug register from the thread
8912 record's context.
8913 (i386_initial_stuff): Adjust.
8914 (i386_get_thread_context): Remove current_event parameter. Don't
8915 clear debug_registers_changed nor copy DR values to
8916 debug_reg_state.
8917 (i386_set_thread_context): Delete.
8918 (i386_prepare_to_resume): New function.
8919 (i386_thread_added): Mark the thread as needing to update irs
8920 debug registers.
8921 (the_low_target): Remove i386_set_thread_context and install
8922 i386_prepare_to_resume.
8923 * win32-low.c (win32_get_thread_context): Adjust.
8924 (win32_set_thread_context): Use SetThreadContext
8925 directly.
8926 (win32_prepare_to_resume): New function.
8927 (win32_require_context): New function, factored out from ...
8928 (thread_rec): ... this.
8929 (continue_one_thread): Call win32_prepare_to_resume on each thread
8930 we're about to continue.
8931 (win32_resume): Call win32_prepare_to_resume on the event thread.
8932 * win32-low.h (struct win32_thread_info)
8933 <debug_registers_changed>: New field.
8934 (struct win32_target_ops): Change prototype of set_thread_context,
8935 delete set_thread_context and add prepare_to_resume.
8936 (win32_require_context): New declaration.
8937
8938 2014-10-08 Gary Benson <gbenson@redhat.com>
8939
8940 * server.h: Do not include common-exceptions.h.
8941
8942 2014-10-08 Gary Benson <gbenson@redhat.com>
8943
8944 * server.h: Do not include cleanups.h.
8945
8946 2014-09-30 James Hogan <james.hogan@imgtec.com>
8947
8948 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8949 mips64-dsp-linux.c.
8950
8951 2014-09-23 Yao Qi <yao@codesourcery.com>
8952
8953 * linux-low.c (lp_status_maybe_breakpoint): New function.
8954 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8955 (count_events_callback): Likewise.
8956 (select_event_lwp_callback): Likewise.
8957 (cancel_breakpoints_callback): Likewise.
8958
8959 2014-09-19 Don Breazeal <donb@codesourcery.com>
8960
8961 * linux-low.c (handle_extended_wait): Call
8962 linux_ptrace_get_extended_event.
8963 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8964 linux_is_extended_waitstatus.
8965
8966 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8967
8968 * Makefile.in (CPPFLAGS): Define.
8969 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8970 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8971
8972 2014-09-16 Gary Benson <gbenson@redhat.com>
8973
8974 * inferiors.h (current_inferior): Renamed as...
8975 (current_thread): New variable. All uses updated.
8976 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8977 (maybe_move_out_of_jump_pad): Likewise.
8978 (cancel_breakpoint): Likewise.
8979 (linux_low_filter_event): Likewise.
8980 (wait_for_sigstop): Likewise.
8981 (linux_resume_one_lwp): Likewise.
8982 (need_step_over_p): Likewise.
8983 (start_step_over): Likewise.
8984 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
8985 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
8986 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
8987 and save_inferior as saved_thread.
8988 * regcache.c (get_thread_regcache): Renamed saved_inferior as
8989 saved_thread.
8990 (regcache_invalidate_thread): Likewise.
8991 * remote-utils.c (prepare_resume_reply): Likewise.
8992 * thread-db.c (thread_db_get_tls_address): Likewise.
8993 (disable_thread_event_reporting): Likewise.
8994 (remove_thread_event_breakpoints): Likewise.
8995 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
8996 as saved_thread.
8997 * target.h (set_desired_inferior): Renamed as...
8998 (set_desired_thread): New declaration. All uses updated.
8999 * server.c (myresume): Updated comment to reference thread instead
9000 of inferior.
9001 (handle_serial_event): Likewise.
9002 (handle_target_event): Likewise.
9003
9004 2014-09-12 Tom Tromey <tromey@redhat.com>
9005 Gary Benson <gbenson@redhat.com>
9006
9007 * regcache.h: Include common-regcache.h.
9008 (regcache_read_pc): Don't declare.
9009 * regcache.c (get_thread_regcache_for_ptid): New function.
9010
9011 2014-09-11 Tom Tromey <tromey@redhat.com>
9012 Gary Benson <gbenson@redhat.com>
9013
9014 * symbol.c: New file.
9015 * Makefile.in (SFILES): Add symbol.c.
9016 (OBS): Add symbol.o.
9017
9018 2014-09-11 Gary Benson <gbenson@redhat.com>
9019
9020 * target.c (target_stop_ptid, target_continue_ptid): New
9021 functions.
9022
9023 2014-09-11 Tom Tromey <tromey@redhat.com>
9024 Gary Benson <gbenson@redhat.com>
9025
9026 * target.h: Include target/target.h.
9027 * target.c (target_read_memory, target_read_uint32)
9028 (target_write_memory): New functions.
9029
9030 2014-09-11 Gary Benson <gbenson@redhat.com>
9031
9032 * server.h (debug_hw_points): Don't declare.
9033 * server.c (debug_hw_points): Don't define. Replace all uses
9034 with show_debug_regs.
9035 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9036 all uses with show_debug_regs.
9037
9038 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9039
9040 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9041 endianness into account.
9042 (ppc_supply_ptrace_register): Likewise.
9043
9044 2014-09-03 James Hogan <james.hogan@imgtec.com>
9045
9046 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9047 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9048
9049 2014-09-03 Gary Benson <gbenson@redhat.com>
9050
9051 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9052 ALL_DEBUG_ADDRESS_REGISTERS.
9053
9054 2014-09-02 Gary Benson <gbenson@redhat.com>
9055
9056 * i386-low.h: Renamed as...
9057 * x86-low.h: New file. All type, function and variable name
9058 prefixes changed from "i386_" to "x86_". All references updated.
9059 * i386-low.c: Renamed as...
9060 * x86-low.c: New file. All type, function and variable name
9061 prefixes changed from "i386_" to "x86_". All references updated.
9062
9063 2014-09-02 Gary Benson <gbenson@redhat.com>
9064
9065 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9066 (x86_linux_new_thread): Likewise.
9067
9068 2014-08-29 Gary Benson <gbenson@redhat.com>
9069
9070 * server.h (setjmp.h): Do not include.
9071 (toplevel): Do not declare.
9072 (common-exceptions.h): Include.
9073 (cleanups.h): Likewise.
9074 * server.c (toplevel): Do not define.
9075 (exit_code): New static global.
9076 (detach_or_kill_for_exit_cleanup): New function.
9077 (main): New function. Original main renamed to...
9078 (captured_main): New function.
9079 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9080
9081 2014-08-29 Gary Benson <gbenson@redhat.com>
9082
9083 * Makefile.in (SFILES): Add common/common-exceptions.c.
9084 (OBS): Add common-exceptions.o.
9085 (common-exceptions.o): New rule.
9086 * utils.c (prepare_to_throw_exception): New function.
9087
9088 2014-08-29 Gary Benson <gbenson@redhat.com>
9089
9090 * config.in: Regenerate.
9091 * configure: Likewise.
9092
9093 2014-08-29 Gary Benson <gbenson@redhat.com>
9094
9095 * Makefile.in (SFILES): Add common/cleanups.c.
9096 (OBS): cleanups.o.
9097 (cleanups.o): New rule.
9098
9099 2014-08-29 Gary Benson <gbenson@redhat.com>
9100
9101 * utils.c (internal_vwarning): New function.
9102
9103 2014-08-28 Gary Benson <gbenson@redhat.com>
9104
9105 * utils.h (fatal): Remove declaration.
9106 * utils.c (fatal): Remove function.
9107
9108 2014-08-28 Gary Benson <gbenson@redhat.com>
9109
9110 * tracepoint.c (gdb_agent_init): Replace fatal with
9111 perror_with_name.
9112 (initialize_tracepoint): Likewise.
9113
9114 2014-08-28 Gary Benson <gbenson@redhat.com>
9115
9116 * remote-utils.c (remote_prepare): Replace fatal with error.
9117
9118 2014-08-28 Gary Benson <gbenson@redhat.com>
9119
9120 * linux-low.c (linux_async): Replace fatal with warning.
9121 Tidy up and return.
9122 (linux_start_non_stop): Return -1 if linux_async failed.
9123
9124 2014-08-28 Gary Benson <gbenson@redhat.com>
9125
9126 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9127 gdb_assert.
9128 (i386_dr_low_get_addr): Remove vague comment.
9129 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9130 gdb_assert.
9131
9132 2014-08-28 Gary Benson <gbenson@redhat.com>
9133
9134 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9135 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9136 internal_error.
9137 (linux_resume_one_lwp): Likewise.
9138 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9139 gdb_assert.
9140 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9141 with internal_error.
9142 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9143 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9144 (find_register_by_name): Replace fatal with internal_error.
9145 (find_regno): Likewise.
9146 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9147 * thread-db.c (thread_db_create_event): Likewise.
9148 (thread_db_load_search): Likewise.
9149 (try_thread_db_load_1): Likewise.
9150 * tracepoint.c (get_jump_space_head): Replace fatal with
9151 internal_error.
9152 (claim_trampoline_space): Likewise.
9153 (have_fast_tracepoint_trampoline_buffer): Likewise.
9154 (cmd_qtstart): Likewise.
9155 (stop_tracing): Likewise.
9156 (fast_tracepoint_collecting): Likewise.
9157 (target_malloc): Likewise.
9158 (download_tracepoint): Likewise.
9159 (download_trace_state_variables): Replace check with gdb_assert.
9160 (upload_fast_traceframes): Replace fatal with internal_error.
9161
9162 2014-08-19 Tom Tromey <tromey@redhat.com>
9163 Gary Benson <gbenson@redhat.com>
9164
9165 * Makefile.in (SFILES): Add common/common-debug.c.
9166 (OBS): Add common-debug.o.
9167 (common-debug.o): New rule.
9168 * debug.h (debug_printf): Don't declare.
9169 * debug.c (debug_printf): Renamed and rewritten as...
9170 (debug_vprintf): New function.
9171
9172 2014-08-19 Gary Benson <gbenson@redhat.com>
9173
9174 * utils.h: Do not include print-utils.h.
9175
9176 2014-08-19 Tom Tromey <tromey@redhat.com>
9177 Gary Benson <gbenson@redhat.com>
9178
9179 * server.h: Add static assertion.
9180 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9181
9182 2014-08-19 Tom Tromey <tromey@redhat.com>
9183 Gary Benson <gbenson@redhat.com>
9184
9185 * Makefile.in (SFILES): Add common/errors.c.
9186 (OBS): Add errors.o.
9187 (IPA_OBS): Add errors-ipa.o.
9188 (errors.o): New rule.
9189 (errors-ipa.o): Likewise.
9190 * utils.h (perror_with_name, error, warning): Don't declare.
9191 * utils.c (warning): Renamed and rewritten as...
9192 (vwarning): New function.
9193 (error): Renamed and rewritten as...
9194 (verror): New function.
9195 (internal_error): Renamed and rewritten as...
9196 (internal_verror): New function.
9197
9198 2014-08-07 Gary Benson <gbenson@redhat.com>
9199
9200 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9201 * configure: Regenerate.
9202 * config.in: Likewise.
9203 * server.h: Do not include errno.h.
9204 * event-loop.c: Likewise.
9205 * hostio-errno.c: Likewise.
9206 * linux-low.c: Likewise.
9207 * remote-utils.c: Likewise.
9208 * spu-low.c: Likewise.
9209 * utils.c: Likewise.
9210 * gdbreplay.c: Unconditionally include errno.h.
9211
9212 2014-08-07 Gary Benson <gbenson@redhat.com>
9213
9214 * server.h: Do not include string.h.
9215 * event-loop.c: Likewise.
9216 * linux-low.c: Likewise.
9217 * regcache.c: Likewise.
9218 * remote-utils.c: Likewise.
9219 * spu-low.c: Likewise.
9220 * utils.c: Likewise.
9221
9222 2014-08-07 Gary Benson <gbenson@redhat.com>
9223
9224 * server.h: Do not include gdb_assert.h.
9225
9226 2014-08-07 Gary Benson <gbenson@redhat.com>
9227
9228 * server.h: Do not include common-utils.h.
9229
9230 2014-08-07 Gary Benson <gbenson@redhat.com>
9231
9232 * server.h: Do not include ptid.h.
9233 * notif.h: Likewise.
9234
9235 2014-08-07 Gary Benson <gbenson@redhat.com>
9236
9237 * server.h: Do not include gdb_locale.h.
9238
9239 2014-08-07 Gary Benson <gbenson@redhat.com>
9240
9241 * server.h: Do not include gdb/signals.h.
9242 * win32-low.c: Likewise.
9243
9244 2014-08-07 Gary Benson <gbenson@redhat.com>
9245
9246 * server.h: Do not include pathmax.h.
9247
9248 2014-08-07 Gary Benson <gbenson@redhat.com>
9249
9250 * server.h: Do not include libiberty.h.
9251 * linux-bfin-low.c: Likewise.
9252
9253 2014-08-07 Gary Benson <gbenson@redhat.com>
9254
9255 * server.h: Do not include ansidecl.h.
9256
9257 2014-08-07 Gary Benson <gbenson@redhat.com>
9258
9259 * linux-x86-low.c: Do not include stddef.h.
9260 * lynx-ppc-low.c: Likewise.
9261 * tracepoint.c: Likewise.
9262
9263 2014-08-07 Gary Benson <gbenson@redhat.com>
9264
9265 * server.h: Do not include stdarg.h.
9266 * nto-low.c: Likewise.
9267
9268 2014-08-07 Gary Benson <gbenson@redhat.com>
9269
9270 * server.h: Do not include stdlib.h.
9271 * inferiors.c: Likewise.
9272 * linux-low.c: Likewise.
9273 * regcache.c: Likewise.
9274 * spu-low.c: Likewise.
9275 * tracepoint.c: Likewise.
9276 * utils.c: Likewise.
9277
9278 2014-08-07 Gary Benson <gbenson@redhat.com>
9279
9280 * server.h: Do not include stdio.h.
9281 * linux-low.c: Likewise.
9282 * remote-utils.c: Likewise.
9283 * spu-low.c: Likewise.
9284 * utils.c: Likewise.
9285 * wincecompat.c: Likewise.
9286
9287 2014-08-06 Gary Benson <gbenson@redhat.com>
9288
9289 * regcache.c (init_register_cache): Move conditionals inside if.
9290
9291 2014-08-06 Gary Benson <gbenson@redhat.com>
9292
9293 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9294
9295 2014-07-31 Gary Benson <gbenson@redhat.com>
9296
9297 * ax.h: Do not include server.h.
9298 * gdbthread.h: Likewise.
9299 * lynx-low.h: Likewise.
9300 * notif.h: Likewise.
9301
9302 2014-07-30 Gary Benson <gbenson@redhat.com>
9303
9304 * server.h: Include common-defs.h.
9305 Do not include config.h or build-gnulib-gdbserver/config.h.
9306
9307 2014-07-30 Gary Benson <gbenson@redhat.com>
9308
9309 * hostio-errno.c: Move server.h to top of includes list.
9310 * inferiors.c: Likewise.
9311 * linux-x86-low.c: Likewise.
9312 * notif.c: Include server.h.
9313
9314 2014-07-24 Tom Tromey <tromey@redhat.com>
9315 Gary Benson <gbenson@redhat.com>
9316
9317 * server.h (CORE_ADDR): Now unsigned.
9318
9319 2014-07-16 Pedro Alves <palves@redhat.com>
9320
9321 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9322
9323 2014-07-15 Pedro Alves <palves@redhat.com>
9324
9325 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9326 copy.
9327
9328 2014-07-11 Pedro Alves <palves@redhat.com>
9329
9330 * linux-low.c (kill_wait_lwp): New function, based on
9331 kill_one_lwp_callback, but use my_waitpid directly.
9332 (kill_one_lwp_callback, linux_kill): Use it.
9333
9334 2014-06-23 Pedro Alves <palves@redhat.com>
9335
9336 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9337 before setting DR0..DR3.
9338
9339 2014-06-20 Gary Benson <gbenson@redhat.com>
9340
9341 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9342 * configure: Regenerated.
9343 * config.in: Likewise.
9344
9345 2014-06-20 Gary Benson <gbenson@redhat.com>
9346
9347 * Makefile.in (SFILES): Update locations for files moved
9348 from common to nat.
9349 (object file files): Reordered.
9350
9351 2014-06-20 Gary Benson <gbenson@redhat.com>
9352
9353 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9354 (i386_dr_low_set_addr): Likewise.
9355 (i386_dr_low_get_addr): Likewise.
9356 (i386_dr_low_can_set_control): Likewise.
9357 (i386_dr_low_set_control): Likewise.
9358 (i386_dr_low_get_control): Likewise.
9359 (i386_dr_low_get_status): Likewise.
9360 (i386_get_debug_register_length): Likewise.
9361 * linux-x86-low.c (i386_dr_low_set_addr):
9362 Changed signature. Made static.
9363 (i386_dr_low_get_addr): Likewise.
9364 (i386_dr_low_set_control): Likewise.
9365 (i386_dr_low_get_control): Likewise.
9366 (i386_dr_low_get_status): Likewise.
9367 (i386_dr_low): New global variable.
9368 * win32-i386-low.c (i386_dr_low_set_addr):
9369 Changed signature. Made static.
9370 (i386_dr_low_get_addr): Likewise.
9371 (i386_dr_low_set_control): Likewise.
9372 (i386_dr_low_get_control): Likewise.
9373 (i386_dr_low_get_status): Likewise.
9374 (i386_dr_low): New global variable.
9375
9376 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9377
9378 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9379 * Makefile.in (AR, AR_FLAGS): Define.
9380 * configure: Regenerate.
9381
9382 2014-06-19 Gary Benson <gbenson@redhat.com>
9383
9384 * Makefile.in (i386-dregs.o): New rule.
9385 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9386 * i386-low.c (target.h): Remove include.
9387 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9388 (DR_CONTROL_SHIFT): Likewise.
9389 (DR_CONTROL_SIZE): Likewise.
9390 (DR_RW_EXECUTE): Likewise.
9391 (DR_RW_WRITE): Likewise.
9392 (DR_RW_READ): Likewise.
9393 (DR_RW_IORW): Likewise.
9394 (DR_LEN_1): Likewise.
9395 (DR_LEN_2): Likewise.
9396 (DR_LEN_4): Likewise.
9397 (DR_LEN_8): Likewise.
9398 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9399 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9400 (DR_ENABLE_SIZE): Likewise.
9401 (DR_LOCAL_SLOWDOWN): Likewise.
9402 (DR_GLOBAL_SLOWDOWN): Likewise.
9403 (DR_CONTROL_RESERVED): Likewise.
9404 (I386_DR_CONTROL_MASK): Likewise.
9405 (I386_DR_VACANT): Likewise.
9406 (I386_DR_LOCAL_ENABLE): Likewise.
9407 (I386_DR_GLOBAL_ENABLE): Likewise.
9408 (I386_DR_DISABLE): Likewise.
9409 (I386_DR_SET_RW_LEN): Likewise.
9410 (I386_DR_GET_RW_LEN): Likewise.
9411 (I386_DR_WATCH_HIT): Likewise.
9412 (i386_wp_op_t): Likewise.
9413 (i386_show_dr): Likewise.
9414 (i386_length_and_rw_bits): Likewise.
9415 (i386_insert_aligned_watchpoint): Likewise.
9416 (i386_remove_aligned_watchpoint): Likewise.
9417 (i386_handle_nonaligned_watchpoint): Likewise.
9418 i386_update_inferior_debug_regs(): Likewise.
9419 (i386_dr_insert_watchpoint): Likewise.
9420 (i386_dr_remove_watchpoint): Likewise.
9421 (i386_dr_region_ok_for_watchpoint): Likewise.
9422 (i386_dr_stopped_data_address): Likewise.
9423 (i386_dr_stopped_by_watchpoint): Likewise.
9424
9425 2014-06-19 Gary Benson <gbenson@redhat.com>
9426
9427 * i386-low.c (i386_dr_show): Renamed to
9428 i386_show_dr and made static. All uses updated.
9429 (i386_dr_length_and_rw_bits): Renamed to
9430 i386_length_and_rw_bits and made static.
9431 All uses updated.
9432 (i386_dr_insert_aligned_watchpoint): Renamed to
9433 i386_insert_aligned_watchpoint and made static.
9434 All uses updated.
9435 (i386_dr_remove_aligned_watchpoint): Renamed to
9436 i386_remove_aligned_watchpoint and made static.
9437 All uses updated.
9438 (i386_dr_update_inferior_debug_regs): Renamed to
9439 i386_update_inferior_debug_regs and made static.
9440 All uses updated.
9441
9442 2014-06-18 Gary Benson <gbenson@redhat.com>
9443
9444 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9445 (i386_dr_low_can_set_control): Likewise.
9446 (i386_get_debug_register_length): Likewise.
9447 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9448 (i386_dr_low_can_set_control): Likewise.
9449 (i386_get_debug_register_length): Likewise.
9450
9451 2014-06-17 Gary Benson <gbenson@redhat.com>
9452
9453 * i386-low.h (i386-dregs.h): New include.
9454 (DR_FIRSTADDR): Now in i386-dregs.h.
9455 (DR_LASTADDR): Likewise.
9456 (DR_NADDR): Likewise.
9457 (DR_STATUS): Likewise.
9458 (DR_CONTROL): Likewise.
9459 (i386_debug_reg_state): Likewise.
9460 (i386_dr_insert_watchpoint): Likewise.
9461 (i386_dr_remove_watchpoint): Likewise.
9462 (i386_dr_region_ok_for_watchpoint): Likewise.
9463 (i386_dr_stopped_data_address): Likewise.
9464 (i386_dr_stopped_by_watchpoint): Likewise.
9465 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9466
9467 2014-06-18 Gary Benson <gbenson@redhat.com>
9468
9469 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9470 i386_dr_insert_watchpoint.
9471 (i386_low_remove_watchpoint): Renamed to
9472 i386_dr_remove_watchpoint.
9473 (i386_low_region_ok_for_watchpoint): Renamed to
9474 i386_dr_region_ok_for_watchpoint.
9475 (i386_low_stopped_data_address): Renamed to
9476 i386_dr_stopped_data_address.
9477 (i386_low_stopped_by_watchpoint): Renamed to
9478 i386_dr_stopped_by_watchpoint.
9479 * i386-low.c (i386_show_dr): Renamed to
9480 i386_dr_show and made nonstatic. All uses updated.
9481 (i386_length_and_rw_bits): Renamed to
9482 i386_dr_length_and_rw_bits and made nonstatic.
9483 All uses updated.
9484 (i386_insert_aligned_watchpoint): Renamed to
9485 i386_dr_insert_aligned_watchpoint and made nonstatic.
9486 All uses updated.
9487 (i386_remove_aligned_watchpoint): Renamed to
9488 i386_dr_remove_aligned_watchpoint and made nonstatic.
9489 All uses updated.
9490 (i386_update_inferior_debug_regs): Renamed to
9491 i386_dr_update_inferior_debug_regs and made nonstatic.
9492 All uses updated.
9493 (i386_low_insert_watchpoint): Renamed to
9494 i386_dr_insert_watchpoint. All uses updated.
9495 (i386_low_remove_watchpoint): Renamed to
9496 i386_dr_remove_watchpoint. All uses updated.
9497 (i386_low_region_ok_for_watchpoint): Renamed to
9498 i386_dr_region_ok_for_watchpoint. All uses updated.
9499 (i386_low_stopped_data_address): Renamed to
9500 i386_dr_stopped_data_address. All uses updated.
9501 (i386_low_stopped_by_watchpoint): Renamed to
9502 i386_dr_stopped_by_watchpoint. All uses updated.
9503
9504 2014-06-18 Gary Benson <gbenson@redhat.com>
9505
9506 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9507 (i386_dr_low_can_set_control): Likewise.
9508 (i386_insert_aligned_watchpoint): New check.
9509
9510 2014-06-18 Gary Benson <gbenson@redhat.com>
9511
9512 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9513 Renamed to state.
9514
9515 2014-06-18 Gary Benson <gbenson@redhat.com>
9516
9517 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9518 instead of fatal and error.
9519 (i386_handle_nonaligned_watchpoint): Likewise.
9520
9521 2014-06-18 Gary Benson <gbenson@redhat.com>
9522
9523 * i386-low.c (i386_get_debug_register_length): New macro.
9524 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9525 (i386_show_dr): Use debug_printf instead of fprintf. Use
9526 phex to format values.
9527
9528 2014-06-18 Gary Benson <gbenson@redhat.com>
9529
9530 * i386-low.h: Comment changes.
9531 * i386-low.c: Likewise.
9532
9533 2014-06-18 Gary Benson <gbenson@redhat.com>
9534
9535 * i386-low.c: Whitespace changes.
9536
9537 2014-06-12 Tom Tromey <tromey@redhat.com>
9538
9539 * utils.c (freeargv): Remove.
9540
9541 2014-06-12 Tom Tromey <tromey@redhat.com>
9542
9543 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9544 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9545 (parse_debug_format_options): Likewise.
9546 (gdbserver_usage): Likewise.
9547 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9548 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9549 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9550 against libiberty.
9551 ($(LIBGNU)): Depend on libiberty.
9552 (all-lib): Recurse into all subdirs.
9553 (install-only): Invoke "install" target in subdirs.
9554 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9555 targets.
9556 * configure: Rebuild.
9557 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9558 for vasprintf, vsnprintf, or gettimeofday.
9559 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9560 srv_tgtobj.
9561
9562 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9563
9564 * development.sh: Delete.
9565 * Makefile.in (config.status): Adjust dependency on development.sh.
9566 * configure.ac: Adjust development.sh source call.
9567 * configure: Regenerate.
9568
9569 2014-06-02 Pedro Alves <palves@redhat.com>
9570
9571 * ax.c (gdb_free_agent_expr): New function.
9572 * ax.h (gdb_free_agent_expr): New declaration.
9573 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9574 list.
9575 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9576 static.
9577 (clear_breakpoint_conditions_and_commands): New function.
9578 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9579 (clear_breakpoint_conditions_and_commands): New declaration.
9580
9581 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9582
9583 * linux-aarch64-low.c (asm/ptrace.h): Include.
9584
9585 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9586
9587 Fix TLS access for -static -pthread.
9588 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9589 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9590 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9591
9592 2014-05-20 Pedro Alves <palves@redhat.com>
9593
9594 * linux-aarch64-low.c (aarch64_insert_point)
9595 (aarch64_remove_point): No longer check whether the type is
9596 supported here. Adjust to new interface.
9597 (the_low_target): Install aarch64_supports_z_point_type as
9598 supports_z_point_type method.
9599 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9600 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9601 instead of a Z packet char. Adjust.
9602 (arm_supports_z_point_type): New function.
9603 (arm_insert_point, arm_remove_point): Adjust to new interface.
9604 (the_low_target): Install arm_supports_z_point_type.
9605 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9606 (cris_insert_point, cris_remove_point): Adjust to new interface.
9607 Don't check whether the type is supported here.
9608 (the_low_target): Install cris_supports_z_point_type.
9609 * linux-low.c (linux_supports_z_point_type): New function.
9610 (linux_insert_point, linux_remove_point): Adjust to new interface.
9611 * linux-low.h (struct linux_target_ops) <insert_point,
9612 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9613 raw_breakpoint pointer parameter.
9614 <supports_z_point_type>: New method.
9615 * linux-mips-low.c (mips_supports_z_point_type): New function.
9616 (mips_insert_point, mips_remove_point): Adjust to new interface.
9617 Use mips_supports_z_point_type.
9618 (the_low_target): Install mips_supports_z_point_type.
9619 * linux-ppc-low.c (the_low_target): Install NULL as
9620 supports_z_point_type method.
9621 * linux-s390-low.c (the_low_target): Install NULL as
9622 supports_z_point_type method.
9623 * linux-sparc-low.c (the_low_target): Install NULL as
9624 supports_z_point_type method.
9625 * linux-x86-low.c (x86_supports_z_point_type): New function.
9626 (x86_insert_point): Adjust to new insert_point interface. Use
9627 insert_memory_breakpoint. Adjust to new
9628 i386_low_insert_watchpoint interface.
9629 (x86_remove_point): Adjust to remove_point interface. Use
9630 remove_memory_breakpoint. Adjust to new
9631 i386_low_remove_watchpoint interface.
9632 (the_low_target): Install x86_supports_z_point_type.
9633 * lynx-low.c (lynx_target_ops): Install NULL as
9634 supports_z_point_type callback.
9635 * nto-low.c (nto_supports_z_point_type): New.
9636 (nto_insert_point, nto_remove_point): Adjust to new interface.
9637 (nto_target_ops): Install nto_supports_z_point_type.
9638 * mem-break.c: Adjust intro comment.
9639 (struct raw_breakpoint) <raw_type, size>: New fields.
9640 <inserted>: Update comment.
9641 <shlib_disabled>: Delete field.
9642 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9643 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9644 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9645 (raw_bkpt_type_to_target_hw_bp_type): New function.
9646 (find_enabled_raw_code_breakpoint_at): New function.
9647 (find_raw_breakpoint_at): New type and size parameters. Use them.
9648 (insert_memory_breakpoint): New function, based off
9649 set_raw_breakpoint_at.
9650 (remove_memory_breakpoint): New function.
9651 (set_raw_breakpoint_at): Reimplement.
9652 (set_breakpoint): New, based on set_breakpoint_at.
9653 (set_breakpoint_at): Reimplement.
9654 (delete_raw_breakpoint): Go through the_target->remove_point
9655 instead of assuming memory breakpoints.
9656 (find_gdb_breakpoint_at): Delete.
9657 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9658 (find_gdb_breakpoint): New function.
9659 (set_gdb_breakpoint_at): Delete.
9660 (z_type_supported): New function.
9661 (set_gdb_breakpoint_1): New function, loosely based off
9662 set_gdb_breakpoint_at.
9663 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9664 (delete_gdb_breakpoint_at): Delete.
9665 (delete_gdb_breakpoint_1): New function, loosely based off
9666 delete_gdb_breakpoint_at.
9667 (delete_gdb_breakpoint): New function.
9668 (clear_gdb_breakpoint_conditions): Rename to ...
9669 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9670 breakpoint.
9671 (add_condition_to_breakpoint): Make static.
9672 (add_breakpoint_condition): Take a struct breakpoint pointer
9673 instead of an address. Adjust.
9674 (gdb_condition_true_at_breakpoint): Rename to ...
9675 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9676 z_type parameter.
9677 (gdb_condition_true_at_breakpoint): Reimplement.
9678 (add_breakpoint_commands): Take a struct breakpoint pointer
9679 instead of an address. Adjust.
9680 (gdb_no_commands_at_breakpoint): Rename to ...
9681 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9682 parameter. Return true if no breakpoint was found. Change debug
9683 output.
9684 (gdb_no_commands_at_breakpoint): Reimplement.
9685 (run_breakpoint_commands): Rename to ...
9686 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9687 and change return type to boolean.
9688 (run_breakpoint_commands): New function.
9689 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9690 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9691 breakpoint. Go through the_target->remove_point instead of
9692 assuming memory breakpoint.
9693 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9694 software and hardware breakpoints.
9695 (reinsert_raw_breakpoint): Go through the_target->insert_point
9696 instead of assuming memory breakpoint.
9697 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9698 software and hardware breakpoints.
9699 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9700 Check both software and hardware breakpoints.
9701 (validate_inserted_breakpoint): Assert the breakpoint is a
9702 software breakpoint. Set the inserted flag to -1 instead of
9703 setting shlib_disabled.
9704 (delete_disabled_breakpoints): Adjust.
9705 (validate_breakpoints): Only validate software breakpoints.
9706 Adjust to inserted flag change.
9707 (check_mem_read, check_mem_write): Skip breakpoint types other
9708 than software breakpoints. Adjust to inserted flag change.
9709 * mem-break.h (enum raw_bkpt_type): New enum.
9710 (raw_breakpoint, struct process_info): Forward declare.
9711 (Z_packet_to_target_hw_bp_type): Delete declaration.
9712 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9713 (set_gdb_breakpoint, delete_gdb_breakpoint)
9714 (clear_breakpoint_conditions): New declarations.
9715 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9716 (breakpoint_inserted_here): Update comment.
9717 (add_breakpoint_condition, add_breakpoint_commands): Replace
9718 address parameter with a breakpoint pointer parameter.
9719 (gdb_breakpoint_here): Update comment.
9720 (delete_gdb_breakpoint_at): Delete.
9721 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9722 * server.c (process_point_options): Take a struct breakpoint
9723 pointer instead of an address. Adjust.
9724 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9725 delete_gdb_breakpoint.
9726 * spu-low.c (spu_target_ops): Install NULL as
9727 supports_z_point_type method.
9728 * target.h: Include mem-break.h.
9729 (struct target_ops) <prepare_to_access_memory>: Update comment.
9730 <supports_z_point_type>: New field.
9731 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9732 instead of a char. Also take a raw breakpoint pointer.
9733 * win32-arm-low.c (the_low_target): Install NULL as
9734 supports_z_point_type.
9735 * win32-i386-low.c (i386_supports_z_point_type): New function.
9736 (i386_insert_point, i386_remove_point): Adjust to new interface.
9737 (the_low_target): Install i386_supports_z_point_type.
9738 * win32-low.c (win32_supports_z_point_type): New function.
9739 (win32_insert_point, win32_remove_point): Adjust to new interface.
9740 (win32_target_ops): Install win32_supports_z_point_type.
9741 * win32-low.h (struct win32_target_ops):
9742 <supports_z_point_type>: New method.
9743 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9744 instead of a char. Also take a raw breakpoint pointer.
9745
9746 2014-05-20 Pedro Alves <palves@redhat.com>
9747
9748 * mem-break.h: Include break-common.h.
9749 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9750 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9751 (Z_packet_to_target_hw_bp_type): New declaration.
9752 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9753 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9754 (Z_PACKET_ACCESS_WP): Delete macros.
9755 (Z_packet_to_hw_type): Delete function.
9756 * i386-low.h: Don't include break-common.h here.
9757 (Z_packet_to_hw_type): Delete declaration.
9758 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9759 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9760 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9761 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9762 * linux-aarch64-low.c: Don't include break-common.h here.
9763 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9764 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9765 (Z_packet_to_target_hw_bp_type): Delete function.
9766 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9767 function.
9768 (mips_insert_point, mips_remove_point): Use
9769 Z_packet_to_target_hw_bp_type.
9770
9771 2014-05-20 Pedro Alves <palves@redhat.com>
9772
9773 * linux-aarch64-low.c: Include break-common.h.
9774 (enum target_point_type): Delete.
9775 (Z_packet_to_point_type): Rename to ...
9776 (Z_packet_to_target_hw_bp_type): ... this, and return a
9777 target_hw_bp_type instead.
9778 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9779 instead of an enum target_point_type.
9780 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9781 breakpoint type.
9782 (aarch64_dr_state_insert_one_point)
9783 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9784 (aarch64_handle_aligned_watchpoint)
9785 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9786 Take an enum target_hw_bp_type instead of an enum
9787 target_point_type.
9788 (aarch64_supports_z_point_type): New function.
9789 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9790 use Z_packet_to_target_hw_bp_type.
9791
9792 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9793
9794 * configure.ac: Only use -Werror by default when DEVELOPMENT
9795 is true.
9796 * configure: Regenerate.
9797
9798 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9799
9800 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9801 * linux-x86-low.c (X86_64_USER_REGS): New.
9802 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9803
9804 2014-04-28 Yao Qi <yao@codesourcery.com>
9805
9806 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9807 name.
9808
9809 2014-04-25 Pedro Alves <palves@redhat.com>
9810
9811 PR server/16255
9812 * linux-low.c (linux_attach_fail_reason_string): New function.
9813 (linux_attach_lwp): Delete.
9814 (linux_attach_lwp_1): Rename to ...
9815 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9816 argument. Remove "initial" parameter. Return int instead of
9817 void. Don't error or warn here.
9818 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9819 failure to attach to the tgid. Call warning when failing to
9820 attach to an lwp.
9821 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9822 argument. Remove "initial" parameter. Return int instead of
9823 void. Don't error or warn here.
9824 (linux_attach_fail_reason_string): New declaration.
9825 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9826 interface change. Use linux_attach_fail_reason_string.
9827
9828 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9829 Walfred Tedeschi <walfred.tedeschi@intel.com>
9830
9831 * Makefile.in: Added rules to handle new files
9832 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9833 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9834 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9835 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9836 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9837 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9838 x32-avx512-linux.o.
9839 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9840 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9841 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9842 i386/x32-avx512.xml.
9843 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9844 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9845 i386/x32-avx512-linux.xml.
9846 * i387-fp.c (num_avx512_k_registers): New constant for number
9847 of K registers.
9848 (num_avx512_zmmh_low_registers): New constant for number of
9849 lower ZMM registers (0-15).
9850 (num_avx512_zmmh_high_registers): New constant for number of
9851 higher ZMM registers (16-31).
9852 (num_avx512_ymmh_registers): New contant for number of higher
9853 YMM registers (ymm16-31 added by avx521 on x86_64).
9854 (num_avx512_xmm_registers): New constant for number of higher
9855 XMM registers (xmm16-31 added by AVX512 on x86_64).
9856 (struct i387_xsave): Add space for AVX512 registers.
9857 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9858 Add code to handle AVX512 registers.
9859 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9860 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9861 prototypei from generated file.
9862 (tdesc_amd64_avx512_linux): Likewise.
9863 (init_registers_x32_avx512_linux): Likewise.
9864 (tdesc_x32_avx512_linux): Likewise.
9865 (init_registers_i386_avx512_linux): Likewise.
9866 (tdesc_i386_avx512_linux): Likewise.
9867 (x86_64_regmap): Add AVX512 registers.
9868 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9869 mask.
9870 (initialize_low_arch): Add code to initialize AVX512 registers.
9871
9872 2014-04-23 Pedro Alves <palves@redhat.com>
9873
9874 * mem-break.c (find_gdb_breakpoint_at): Make static.
9875 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9876
9877 2014-04-23 Pedro Alves <palves@redhat.com>
9878
9879 * i386-low.c: Don't include break-common.h here.
9880 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9881 prototype to take target_hw_bp_type as argument instead of a Z
9882 packet char.
9883 * i386-low.h: Include break-common.h here.
9884 (Z_packet_to_hw_type): Declare.
9885 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9886 prototypes.
9887 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9888 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9889 (x86_remove_point): Convert the packet number to a
9890 target_hw_bp_type before calling i386_low_remove_watchpoint.
9891 * win32-i386-low.c (i386_insert_point): Convert the packet number
9892 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9893 (i386_remove_point): Convert the packet number to a
9894 target_hw_bp_type before calling i386_low_remove_watchpoint.
9895
9896 2014-04-23 Pedro Alves <palves@redhat.com>
9897
9898 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9899
9900 2014-04-10 Pedro Alves <palves@redhat.com>
9901
9902 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9903 Check if the condition or command is NULL before checking if the
9904 breakpoint is known. On success, return true.
9905 * mem-break.h (add_breakpoint_condition): Document return.
9906 (add_breakpoint_commands): Add describing comment.
9907 * server.c (skip_to_semicolon): New function.
9908 (process_point_options): Use it.
9909
9910 2014-04-09 Pedro Alves <palves@redhat.com>
9911
9912 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9913 to lwpid_of.
9914
9915 2014-02-27 Pedro Alves <palves@redhat.com>
9916
9917 PR 12702
9918 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9919 macros.
9920 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9921 output.
9922 (last_thread_of_process_p): Take a PID argument instead of a
9923 thread pointer.
9924 (linux_wait_for_lwp): Delete.
9925 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9926 functions.
9927 (linux_low_filter_event): New function, party factored out from
9928 linux_wait_for_event.
9929 (linux_wait_for_event): Rename to ...
9930 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9931 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9932 sigsuspend. Check for zombie leaders.
9933 (linux_wait_for_event): Reimplement as wrapper around
9934 linux_wait_for_event_filtered.
9935 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9936 a normal or signal exit is seen, it's the whole process exiting.
9937 (wait_for_sigstop): No longer a for_each_inferior callback.
9938 Rewrite on top of linux_wait_for_event_filtered.
9939 (stop_all_lwps): Call wait_for_sigstop directly.
9940 * server.c (resume, handle_target_event): Handle
9941 TARGET_WAITKIND_NO_RESUMED.
9942
9943 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9944
9945 * win32-low.c (psapi_get_dll_name,
9946 * win32_CreateToolhelp32Snapshot): Delete.
9947 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9948 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9949 Delete.
9950 (handle_load_dll): Add function description.
9951 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9952
9953 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9954
9955 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9956 Add comment.
9957 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9958 base address when calling win32_add_one_solib.
9959 (handle_load_dll): Delete local variable load_addr.
9960 Remove 0x1000 offset applied to DLL base address when calling
9961 win32_add_one_solib.
9962 (handle_unload_dll): Add comment.
9963
9964 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9965
9966 * win32-low.c (win32_add_all_dlls): Renames
9967 win32_ensure_ntdll_loaded. Rewrite function documentation.
9968 Adjust implementation to always load all DLLs.
9969 Add 0x1000 offset to DLL base address when calling
9970 win32_add_one_solib.
9971 (child_initialization_done): New static global.
9972 (do_initial_child_stuff): Set child_initialization_done to
9973 zero during child initialization, and 1 after. Replace call
9974 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9975 Add comment.
9976 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9977 (handle_unload_dll): Add function documentation.
9978 (get_child_debug_event): Ignore load and unload DLL events
9979 during child initialization.
9980
9981 2014-02-20 Doug Evans <dje@google.com>
9982
9983 Remove global all_lwps.
9984 * inferiors.h (ptid_of): Move here from linux-low.h.
9985 (pid_of, lwpid_of): Ditto.
9986 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
9987 parameter is a struct thread_info * now.
9988 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
9989 directly. Pass &all_threads to find_inferior instead of &all_lwps.
9990 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
9991 directly.
9992 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
9993 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
9994 * linux-arm-low.c (update_registers_callback): Update, "entry"
9995 parameter is a struct thread_info * now.
9996 Fetch lwpid from current_inferior directly.
9997 (arm_insert_point): Pass &all_threads to find_inferior instead of
9998 &all_lwps.
9999 (arm_remove_point): Ditto.
10000 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10001 (arm_prepare_to_resume): Fetch pid from thread.
10002 (arm_read_description): Fetch lwpid from current_inferior directly.
10003 * linux-low.c (all_lwps): Delete.
10004 (delete_lwp): Delete call to remove_inferior.
10005 (handle_extended_wait): Fetch lwpid from thread.
10006 (add_lwp): Don't set lwp->entry.id. Remove call to
10007 add_inferior_to_list.
10008 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10009 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10010 (kill_one_lwp_callback): Ditto.
10011 (linux_kill): Don't dereference NULL pointer.
10012 Fetch ptid,lwpid from thread.
10013 (get_detach_signal): Fetch ptid from thread.
10014 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10015 Simplify call to regcache_invalidate_thread.
10016 (delete_lwp_callback): Update, "entry" parameter is a
10017 struct thread_info * now. Fetch pid from thread.
10018 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10019 (status_pending_p_callback): Update, "entry" parameter is a
10020 struct thread_info * now. Fetch ptid from thread.
10021 (find_lwp_pid): Update, "entry" parameter is a
10022 struct thread_info * now.
10023 (linux_wait_for_lwp): Fetch pid from thread.
10024 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10025 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10026 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10027 (dequeue_one_deferred_signal): Ditto.
10028 (cancel_breakpoint): Fetch ptid from current_inferior.
10029 (linux_wait_for_event): Pass &all_threads to find_inferior,
10030 not &all_lwps. Fetch ptid, lwpid from thread.
10031 (count_events_callback): Update, "entry" parameter is a
10032 struct thread_info * now.
10033 (select_singlestep_lwp_callback): Ditto.
10034 (select_event_lwp_callback): Ditto.
10035 (cancel_breakpoints_callback): Ditto.
10036 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10037 not &all_lwps.
10038 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10039 (unsuspend_one_lwp): Update, "entry" parameter is a
10040 struct thread_info * now.
10041 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10042 not &all_lwps.
10043 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10044 Fetch lwpid from thread, not lwp.
10045 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10046 Pass &all_threads to find_inferior, not &all_lwps.
10047 (send_sigstop): Fetch lwpid from thread, not lwp.
10048 (send_sigstop_callback): Update, "entry" parameter is a
10049 struct thread_info * now.
10050 (suspend_and_send_sigstop_callback): Ditto.
10051 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10052 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10053 struct thread_info * now.
10054 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10055 from thread, lwp.
10056 (lwp_running): Update, "entry" parameter is a
10057 struct thread_info * now.
10058 (stop_all_lwps): Fetch ptid from thread.
10059 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10060 (linux_resume_one_lwp): Fetch lwpid from thread.
10061 (linux_set_resume_request): Update, "entry" parameter is a
10062 struct thread_info * now. Fetch pid, lwpid from thread.
10063 (resume_status_pending_p): Update, "entry" parameter is a
10064 struct thread_info * now.
10065 (need_step_over_p): Ditto. Fetch lwpid from thread.
10066 (start_step_over): Fetch lwpid from thread.
10067 (linux_resume_one_thread): Update, "entry" parameter is a
10068 struct thread_info * now. Fetch lwpid from thread.
10069 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10070 (proceed_one_lwp): Update, "entry" parameter is a
10071 struct thread_info * now. Fetch lwpid from thread.
10072 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10073 struct thread_info * now.
10074 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10075 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10076 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10077 directly.
10078 (regsets_store_inferior_registers): Ditto.
10079 (fetch_register, store_register): Ditto.
10080 (linux_read_memory, linux_write_memory): Ditto.
10081 (linux_request_interrupt): Ditto.
10082 (linux_read_auxv): Ditto.
10083 (linux_xfer_siginfo): Ditto.
10084 (linux_qxfer_spu): Ditto.
10085 (linux_qxfer_libraries_svr4): Ditto.
10086 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10087 moved to inferiors.h.
10088 (get_lwp): Delete.
10089 (get_thread_lwp): Update.
10090 (struct lwp_info): Delete member "entry". Simplify comment for
10091 member "thread".
10092 (all_lwps): Delete.
10093 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10094 current_inferior directly.
10095 (update_watch_registers_callback): Update, "entry" parameter is a
10096 struct thread_info * now. Fetch pid from thread.
10097 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10098 (mips_insert_point): Fetch lwpid from current_inferior.
10099 Pass &all_threads to find_inferior, not &all_lwps.
10100 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10101 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10102 directly.
10103 (mips_stopped_data_address): Ditto.
10104 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10105 directly.
10106 * linux-tile-low.c (tile_arch_setup): Ditto.
10107 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10108 (update_debug_registers_callback): Update, "entry" parameter is a
10109 struct thread_info * now. Fetch pid from thread.
10110 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10111 Pass &all_threads to find_inferior, not &all_lwps.
10112 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10113 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10114 Pass &all_threads to find_inferior, not &all_lwps.
10115 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10116 (i386_dr_low_get_status): Ditto.
10117 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10118 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10119 (x86_linux_read_description): Ditto.
10120 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10121
10122 2014-02-20 Doug Evans <dje@google.com>
10123
10124 * inferiors.c (get_first_inferior): Fix buglet.
10125
10126 2014-02-19 Doug Evans <dje@google.com>
10127
10128 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10129 * inferiors.c (add_thread): Change result type to struct thread_info *.
10130 All callers updated.
10131 (add_lwp): Call add_thread here instead of in callers.
10132 All callers updated.
10133 * linux-low.h (get_lwp_thread): Rewrite.
10134 (struct lwp_info): New member "thread".
10135
10136 2014-02-19 Doug Evans <dje@google.com>
10137
10138 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10139 All callers updated.
10140
10141 2014-02-19 Doug Evans <dje@google.com>
10142
10143 * inferiors.c (add_thread): Fix whitespace.
10144
10145 2014-02-19 Doug Evans <dje@google.com>
10146
10147 * dll.c (clear_dlls): Replace accessing list implemention details
10148 with API function.
10149 * gdbthread.h (get_first_thread): Declare.
10150 * inferiors.c (for_each_inferior_with_data): New function.
10151 (get_first_thread): New function.
10152 (find_thread_ptid): Simplify.
10153 (get_first_inferior): New function.
10154 (clear_list): Delete.
10155 (one_inferior_p): New function.
10156 (clear_inferior_list): New function.
10157 (clear_inferiors): Update.
10158 * inferiors.h (for_each_inferior_with_data): Declare.
10159 (clear_inferior_list): Declare.
10160 (one_inferior_p): Declare.
10161 (get_first_inferior): Declare.
10162 * linux-low.c (linux_wait_for_event): Replace accessing list
10163 implemention details with API function.
10164 * server.c (target_running): Ditto.
10165 (accumulate_file_name_length): New function.
10166 (emit_dll_description): New function.
10167 (handle_qxfer_libraries): Replace accessing list implemention
10168 details with API function.
10169 (handle_qxfer_threads_worker): New function.
10170 (handle_qxfer_threads_proper): Replace accessing list implemention
10171 details with API function.
10172 (handle_query): Ditto.
10173 (visit_actioned_threads_callback_ftype): New typedef.
10174 (visit_actioned_threads_data): New struct.
10175 (visit_actioned_threads): Rewrite to be find_inferior callback.
10176 (resume): Call find_inferior.
10177 (handle_status): Replace accessing list implemention
10178 details with API function.
10179 (process_serial_event): Replace accessing list implemention details
10180 with API function.
10181 * target.c (set_desired_inferior): Replace accessing list implemention
10182 details with API function.
10183 * tracepoint.c (same_process_p): New function.
10184 (gdb_agent_about_to_close): Replace accessing list implemention
10185 details with API function.
10186 * win32-low.c (child_delete_thread): Replace accessing list
10187 implemention details with API function.
10188 (match_dll_by_basename): New function.
10189 (dll_is_loaded_by_basename): New function.
10190 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10191 details call to dll_is_loaded_by_basename.
10192
10193 2014-02-19 Doug Evans <dje@google.com>
10194
10195 * dll.h (struct dll_info): Add comment.
10196 * gdbthread.h (struct thread_info): Add comment.
10197 (current_ptid): Simplify.
10198 * inferiors.c (add_process): Update.
10199 (remove_process): Update.
10200 * inferiors.h (struct process_info): Rename member "head" to "entry".
10201 * linux-low.c (delete_lwp): Update.
10202 (add_lwp): Update.
10203 (last_thread_of_process_p): Update.
10204 (kill_one_lwp_callback, linux_kill): Update.
10205 (status_pending_p_callback): Update.
10206 (wait_for_sigstop): Update. Simplify read of ptid.
10207 (start_step_over): Update.
10208 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10209 (get_lwp_thread): Update.
10210 (struct lwp_info): Rename member "head" to "entry".
10211 * regcache.h (inferior_list_entry): Delete.
10212 * server.c (kill_inferior_callback): Update.
10213 (detach_or_kill_inferior_callback): Update.
10214 (print_started_pid): Update.
10215 (print_attached_pid): Update.
10216 (process_serial_event): Simplify read of ptid.
10217 * thread-db.c (thread_db_create_event): Update.
10218 (thread_db_get_tls_address): Update.
10219 * win32-low.c (current_inferior_ptid): Simplify.
10220
10221 2014-02-19 Tom Tromey <tromey@redhat.com>
10222
10223 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10224 argument.
10225 (target_supports_btrace): Update.
10226
10227 2014-02-14 Yao Qi <yao@codesourcery.com>
10228
10229 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10230 (rsp-low-ipa.o): New target.
10231
10232 2014-02-12 Tom Tromey <tromey@redhat.com>
10233
10234 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10235 convert_ascii_to_int.
10236 * regcache.c (registers_to_string): Likewise.
10237 * remote-utils.c (decode_M_packet): Likewise.
10238 * server.c (process_serial_event): Likewise.
10239
10240 2014-02-12 Tom Tromey <tromey@redhat.com>
10241
10242 * server.c (handle_query, handle_v_run): Use hex2bin, not
10243 unhexify.
10244 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10245
10246 2014-02-12 Tom Tromey <tromey@redhat.com>
10247
10248 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10249 convert_int_to_ascii.
10250 * regcache.c (registers_to_string, collect_register_as_string):
10251 Likewise.
10252 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10253 Likewise.
10254 * server.c (process_serial_event): Likewise.
10255 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10256 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10257
10258 2014-02-12 Tom Tromey <tromey@redhat.com>
10259
10260 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10261 bin2hex, not hexify.
10262 * tracepoint.c (cmd_qtstatus): Likewise.
10263
10264 2014-02-12 Tom Tromey <tromey@redhat.com>
10265
10266 * remote-utils.c (monitor_output): Pass explicit length to
10267 hexify.
10268
10269 2014-02-12 Tom Tromey <tromey@redhat.com>
10270
10271 * tracepoint.c: Include rsp-low.h.
10272 * server.c: Include rsp-low.h.
10273 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10274 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10275 declare.
10276 * remote-utils.c: Include rsp-low.h.
10277 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10278 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10279 (convert_int_to_ascii, convert_ascii_to_int): Move to
10280 common/rsp-low.c.
10281 * regcache.c: Include rsp-low.h.
10282 * ax.c: Include rsp-low.h.
10283 * Makefile.in (SFILES): Add common/rsp-low.c.
10284 (OBS): Add rsp-low.o.
10285 (rsp-low.o): New target.
10286
10287 2014-02-12 Tom Tromey <tromey@redhat.com>
10288
10289 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10290 Include print-utils.h.
10291 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10292 (plongest, thirty_two, phex_nz): Remove.
10293 * Makefile.in (SFILES): Add common/print-utils.c.
10294 (OBS): Add print-utils.o.
10295 (print-utils-ipa.o): New target.
10296 (print-utils.o): New target.
10297 (IPA_OBJS): Add print-utils-ipa.o.
10298
10299 2014-02-06 Tom Tromey <tromey@redhat.com>
10300
10301 * Makefile.in (SFILES): Fix indentation.
10302
10303 2014-02-05 Doug Evans <dje@google.com>
10304
10305 * linux-low.c (linux_wait_for_event): Improve comment.
10306 (linux_wait_1): Keep current_inferior in sync with event_child.
10307
10308 2014-01-22 Doug Evans <dje@google.com>
10309
10310 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10311
10312 2014-01-22 Doug Evans <dje@google.com>
10313
10314 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10315 * configure: Regenerate.
10316 * config.in: Regenerate.
10317 * Makefile.in (SFILES): Add debug.c.
10318 (OBS): Add debug.o.
10319 * debug.c: New file.
10320 * debug.h: New file.
10321 * linux-aarch64-low.c (*): Update all debugging printfs to use
10322 debug_printf instead of fprintf.
10323 * linux-arm-low.c (*): Ditto.
10324 * linux-cris-low.c (*): Ditto.
10325 * linux-crisv32-low.c (*): Ditto.
10326 * linux-m32r-low.c (*): Ditto.
10327 * linux-sparc-low.c (*): Ditto.
10328 * linux-x86.c (*): Ditto.
10329 * linux-low.c (*): Ditto.
10330 (linux_wait_1): Add calls to debug_enter, debug_exit.
10331 (linux_wait): Remove redundant debugging printf.
10332 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10333 (linux_resume, unstop_all_lwps): Ditto.
10334 * mem-break.c (*): Update all debugging printfs to use
10335 debug_printf instead of fprintf.
10336 * remote-utils.c (*): Ditto.
10337 * thread-db.c (*): Ditto.
10338 * server.c #include <ctype.h>, "gdb_vecs.h".
10339 (debug_threads): Moved to debug.c.
10340 (*): Update all debugging printfs to use debug_printf instead of
10341 fprintf.
10342 (start_inferior): Replace call to fflush with call to debug_flush.
10343 (monitor_show_help): Mention set debug-format.
10344 (parse_debug_format_options): New function.
10345 (handle_monitor_command): Handle "monitor set debug-format".
10346 (gdbserver_usage): Mention --debug-format.
10347 (main): Parse --debug-format.
10348 * server.h (debug_threads): Declaration moved to debug.h.
10349 #include "debug.h".
10350 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10351 trace_debug_1 that uses debug_printf.
10352 (tracepoint_look_up_symbols): Update all debugging printfs to use
10353 debug_printf instead of fprintf.
10354
10355 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10356
10357 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10358 sys/ptrace.h.
10359
10360 2014-01-17 Pedro Alves <palves@redhat.com>
10361
10362 PR build/16445
10363 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10364 defined after including gdb_proc_service.h.
10365
10366 2014-01-16 Doug Evans <dje@google.com>
10367
10368 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10369 (match_dll): Use it.
10370
10371 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10372
10373 * target.h (target_ops) <read_btrace>: Change parameters and
10374 return type to allow error reporting.
10375 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10376 trace reading errors on.
10377 * linux-low.c (linux_low_read_btrace): Pass trace reading
10378 errors on.
10379 (linux_low_disable_btrace): New.
10380
10381 2014-01-15 Doug Evans <dje@google.com>
10382
10383 * inferiors.c (thread_id_to_gdb_id): Delete.
10384 * inferiors.h (thread_id_to_gdb_id): Delete.
10385
10386 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10387
10388 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10389 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10390 versions.
10391
10392 2014-01-08 Pedro Alves <palves@redhat.com>
10393
10394 * server.c (handle_status): Don't discard previous queued stop
10395 replies or thread's pending status here.
10396 (main) <disconnection>: Do it here instead.
10397
10398 2014-01-08 Pedro Alves <palves@redhat.com>
10399
10400 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10401 * server.c (visit_actioned_threads, handle_pending_status): New
10402 function.
10403 (handle_v_cont): Factor out parts to ...
10404 (resume): ... this new function. If in all-stop, and a thread
10405 being resumed has a pending status, report it without actually
10406 resuming.
10407 (myresume): Adjust to use the new 'resume' function.
10408 (clear_pending_status_callback, set_pending_status_callback)
10409 (find_status_pending_thread_callback): New functions.
10410 (handle_status): Handle the case of multiple threads having
10411 interesting statuses to report. Report threads' real last signal
10412 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10413 with an interesting thread to report the status for, instead of
10414 always reporting the status of the first thread.
10415
10416 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10417
10418 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10419 * gdbreplay.c (gdbreplay_version): Likewise.
10420
10421 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10422
10423 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10424 iov.iov_len with the real length in use.
10425
10426 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10427
10428 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10429 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10430 for all targets that use win32-low.c.
10431 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10432 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10433
10434 2013-12-13 Pedro Alves <palves@redhat.com>
10435
10436 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10437 if equal to TARGET_WAITKIND_LOADED.
10438 * win32-low.c (cached_status): New static global.
10439 (win32_wait): Add declaration.
10440 (do_initial_child_stuff): Flush all initial pending debug events
10441 up to the initial breakpoint.
10442 (win32_wait): If CACHED_STATUS was set, return that instead
10443 of doing a real wait. Remove the code resuming the execution
10444 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10445 during the initial phase. Also remove the code changing
10446 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10447 TARGET_WAITKIND_STOPPED.
10448
10449 2013-12-11 Yao Qi <yao@codesourcery.com>
10450
10451 * notif.c (handle_notif_ack): Return 0 if no notification
10452 matches.
10453
10454 2013-11-20 Doug Evans <dje@google.com>
10455
10456 * linux-low.c (linux_set_resume_request): Fix comment.
10457
10458 2013-11-20 Doug Evans <dje@google.com>
10459
10460 * linux-low.c (resume_status_pending_p): Tweak comment.
10461
10462 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10463
10464 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10465 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10466 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10467 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10468 (srv_amd64_regobj): Add amd64-mpx.o.
10469 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10470 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10471 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10472 * i387-fp.c (num_pl_bnd_register) Added constant.
10473 (num_pl_bnd_cfg_registers) Added constant.
10474 (struct i387_xsave) Added reserved area and MPX fields.
10475 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10476 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10477 function.
10478 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10479 (init_registers_amd64_mpx_linux): Declare new function.
10480 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10481 (x86_64_regmap): Add MPX registers.
10482 (x86_linux_read_description): Add MPX case.
10483 (initialize_low_arch): Initialize MPX targets.
10484
10485 2013-11-18 Tom Tromey <tromey@redhat.com>
10486
10487 * configure: Rebuild.
10488 * configure.ac: Don't check for stdlib.h.
10489 * gdbreplay.c: Unconditionally include stdlib.h.
10490
10491 2013-11-18 Tom Tromey <tromey@redhat.com>
10492
10493 * config.in: Rebuild.
10494 * configure: Rebuild.
10495 * configure.ac: Don't use AC_HEADER_DIRENT.
10496
10497 2013-11-18 Tom Tromey <tromey@redhat.com>
10498
10499 * server.h: Don't check HAVE_STRING_H.
10500 * gdbreplay.c: Don't check HAVE_STRING_H.
10501 * configure: Rebuild.
10502
10503 2013-11-18 Tom Tromey <tromey@redhat.com>
10504
10505 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10506 LIBGNU.
10507
10508 2013-11-08 Tom Tromey <tromey@redhat.com>
10509
10510 * configure, config.in: Rebuild.
10511 * configure.ac: Remove unused configury.
10512
10513 2013-11-08 Tom Tromey <tromey@redhat.com>
10514
10515 * acinclude.m4: Include common.m4, codeset.m4.
10516 * configure, config.in: Rebuild.
10517 * configure.ac: Use GDB_AC_COMMON.
10518
10519 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10520
10521 * linux-s390-low.c (HWCAP_S390_TE): New define.
10522 (s390_arch_setup): Consider the TE field in the HWCAP for
10523 determining 'have_regset_tdb'.
10524
10525 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10526
10527 PR gdb/16014
10528 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10529 call to sizeof.
10530
10531 2013-10-02 Pedro Alves <palves@redhat.com>
10532
10533 * server.c (process_serial_event): Don't output "GDBserver
10534 exiting" if GDB is connected through stdio.
10535 * target.c (mywait): Likewise, be silent if GDB is connected
10536 through stdio.
10537
10538 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10539
10540 * lynx-low.c (lynx_add_threads_after_attach): New function.
10541 (lynx_attach): Remove call to add_thread. Add call to
10542 lynx_add_threads_after_attach instead.
10543
10544 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10545
10546 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10547 * config.in, configure: Regenerated.
10548
10549 2013-09-18 Yao Qi <yao@codesourcery.com>
10550
10551 PR server/15959
10552 * server.c (start_inferior): Clear 'resume_info'.
10553
10554 2013-09-16 Jiong Wang <jiwang@tilera.com>
10555
10556 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10557 for each register.
10558
10559 2013-09-16 Jiong Wang <jiwang@tilera.com>
10560
10561 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10562 linux-tile-low.o to srv_tgtobj.
10563
10564 2013-09-16 Will Newton <will.newton@linaro.org>
10565
10566 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10567 out regs.
10568
10569 2013-09-06 Pedro Alves <palves@redhat.com>
10570
10571 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10572 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10573 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10574 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10575 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10576 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10577
10578 2013-09-06 Pedro Alves <palves@redhat.com>
10579
10580 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10581 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10582
10583 2013-09-06 Pedro Alves <palves@redhat.com>
10584
10585 * linux-amd64-ipa.c: Include tracepoint.h.
10586 * linux-i386-ipa.c: Include tracepoint.h.
10587
10588 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10589
10590 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10591 (ps_get_thread_area): New function.
10592
10593 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10594
10595 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10596 (initialize_low_arch): Call init_registers_crisv32 rather than
10597 init_register_crisv32.
10598
10599 2013-09-05 Pedro Alves <palves@redhat.com>
10600
10601 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10602 to ...
10603 * hostio.h: ... this new file.
10604 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10605 win32-low.c: Include hostio.h.
10606
10607 2013-09-05 Pedro Alves <palves@redhat.com>
10608
10609 * server.h (gdb_client_data, handler_func, callback_handler_func)
10610 (delete_file_handler, add_file_handler, append_callback_event)
10611 (delete_callback_event, start_event_loop, initialize_event_loop):
10612 Move to event-loop.h and include it.
10613 * event-loop.h: New file.
10614
10615 2013-09-05 Pedro Alves <palves@redhat.com>
10616
10617 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10618 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10619 (loaded_dll, unloaded_dll): Move to ...
10620 * dll.h: ... this new file.
10621 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10622
10623 2013-09-05 Pedro Alves <palves@redhat.com>
10624
10625 * server.h (current_process, get_thread_process, all_processes)
10626 (add_inferior_to_list, for_each_inferior, current_inferior)
10627 (remove_inferior, add_process, remove_process, find_process_pid)
10628 (have_started_inferiors_p, have_attached_inferiors_p)
10629 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10630 (clear_inferiors, find_inferior, find_inferior_id)
10631 (inferior_target_data, set_inferior_target_data)
10632 (inferior_regcache_data, set_inferior_regcache_data): Move to
10633 inferiors.h, and include it.
10634 * inferiors.h: New file.
10635
10636 2013-09-05 Pedro Alves <palves@redhat.com>
10637
10638 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10639 Move ...
10640 * ax.h: ... here.
10641
10642 2013-09-05 Pedro Alves <palves@redhat.com>
10643
10644 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10645 tracepoint.h.
10646 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10647 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10648 (handle_tracepoint_general_set, handle_tracepoint_query)
10649 (tracepoint_finished_step, tracepoint_was_hit)
10650 (release_while_stepping_state_list, current_traceframe)
10651 (in_readonly_region, traceframe_read_mem)
10652 (fetch_traceframe_registers, traceframe_read_sdata)
10653 (traceframe_read_info, struct fast_tpoint_collect_status)
10654 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10655 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10656 (supply_fast_tracepoint_registers)
10657 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10658 (ipa_tdesc, claim_trampoline_space)
10659 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10660 (agent_mem_read, agent_get_trace_state_variable_value)
10661 (agent_set_trace_state_variable_value, agent_tsv_read)
10662 (agent_mem_read_string, get_raw_reg_func_addr)
10663 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10664 * tracepoint.h: ... this new file.
10665
10666 2013-09-05 Pedro Alves <palves@redhat.com>
10667
10668 * server.h (perror_with_name, error, fatal, warning, paddress)
10669 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10670 include it.
10671 * utils.h: New file.
10672
10673 2013-09-05 Pedro Alves <palves@redhat.com>
10674
10675 * server.h (remote_debug, noack_mode, transport_is_reliable)
10676 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10677 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10678 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10679 (write_enn, initialize_async_io, enable_async_io)
10680 (disable_async_io, check_remote_input_interrupt_request)
10681 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10682 (dead_thread_notify, prepare_resume_reply)
10683 (decode_address_to_semicolon, decode_address, decode_m_packet)
10684 (decode_M_packet, decode_X_packet, decode_xfer_write)
10685 (decode_search_memory_packet, unhexify, hexify)
10686 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10687 (look_up_one_symbol, relocate_instruction)
10688 (monitor_output): Move to remote-utils.h, and include it.
10689 * remote-utils.h: New file.
10690
10691 2013-09-05 Pedro Alves <palves@redhat.com>
10692
10693 * server.h (_): Delete.
10694
10695 2013-09-02 Pedro Alves <palves@redhat.com>
10696
10697 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10698 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10699 allocated.
10700 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10701
10702 2013-09-02 Pierre Muller <muller@sourceware.org>
10703
10704 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10705 or WriteProcessMemory complete successfully and handle
10706 ERROR_PARTIAL_COPY error.
10707
10708 2013-09-02 Pedro Alves <palves@redhat.com>
10709
10710 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10711 error instead of EIO.
10712
10713 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10714
10715 PR server/15604
10716 * linux-low.c: Include filestuff.h.
10717 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10718 * lynx-low.c: Include filestuff.h.
10719 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10720 * server.c: Include filestuff.h.
10721 (main): Call notice_open_fds.
10722 * spu-low.c: Include filestuff.h.
10723 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10724
10725 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10726
10727 * Makefile.in: Explain why ../target and ../nat are not
10728 listed as include file search paths.
10729 (linux-waitpid.o): New object file rule.
10730 * configure.srv (srv_native_linux_obj): New variable.
10731 Replace all occurrences of linux native object files with
10732 $srv_native_linux_obj.
10733 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10734 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10735 (linux_enable_event_reporting): Remove declaration.
10736 (my_waitpid): Moved to common/linux-waitpid.c.
10737 (linux_wait_for_event): Pass ptid when calling
10738 linux_enable_event_reporting.
10739 (linux_supports_tracefork_flag): Remove.
10740 (linux_enable_event_reporting): Likewise.
10741 (linux_tracefork_grandchild): Remove.
10742 (STACK_SIZE): Moved to common/linux-ptrace.c.
10743 (linux_tracefork_child): Remove.
10744 (linux_test_for_tracefork): Remove.
10745 (linux_look_up_symbols): Call linux_supports_traceclone.
10746 (initialize_low): Remove call to linux_test_for_tracefork.
10747 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10748 common/linux-ptrace.h.
10749 (PTRACE_TYPE_ARG4): Likewise.
10750 Include linux-ptrace.h.
10751
10752 2013-08-21 Pedro Alves <palves@redhat.com>
10753
10754 * config.in: Renegerate.
10755
10756 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10757
10758 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10759 (SFILES): Remove $(srcdir)/common/target-common.c and
10760 add $(srcdir)/target/waitstatus.c.
10761 (OBS): Remove target-common.o and add waitstatus.o.
10762 (server_h): Remove $(srcdir)/../common/target-common.h and
10763 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10764 and $(srcdir)/../target/waitstatus.h.
10765 (target-common.o): Remove.
10766 (waitstatus.o): New target object file.
10767 * target.h: Do not include target-common.h and
10768 include target/resume.h, target/wait.h and
10769 target/waitstatus.h.
10770
10771 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10772
10773 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10774 to PTRACE_TYPE_ARG3.
10775 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10776 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10777 PTRACE_TYPE_ARG4.
10778 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10779 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10780
10781 2013-07-27 Jie Zhang <jie@codesourcery.com>
10782 Daniel Jacobowitz <dan@codesourcery.com>
10783 Yao Qi <yao@codesourcery.com>
10784
10785 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10786 (mips-linux-watch.o): New rule.
10787 (mips_linux_watch_h): New variable.
10788 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10789 srv_tgtobj.
10790 * linux-mips-low.c: Include mips-linux-watch.h.
10791 (struct arch_process_info, struct arch_lwp_info): New.
10792 (update_watch_registers_callback): New function.
10793 (mips_linux_new_process, mips_linux_new_thread) New functions.
10794 (mips_linux_prepare_to_resume, mips_insert_point): New
10795 functions.
10796 (mips_remove_point, mips_stopped_by_watchpoint): New
10797 functions.
10798 (rsp_bp_type_to_target_hw_bp_type): New function.
10799 (mips_stopped_data_address): New function.
10800 (the_low_target): Add watchpoint support functions.
10801
10802 2013-07-27 Yao Qi <yao@codesourcery.com>
10803
10804 * i386-low.c: Include break-common.h.
10805 (enum target_hw_bp_type): Remove.
10806
10807 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10808
10809 * Makefile.in (SFILES): /common/target-common.c.
10810 (OBS): Add target-common.o.
10811 (server_h): Add $(srcdir)/../common/target-common.h.
10812 (target-common.o): New target.
10813 * server.c (queue_stop_reply_callback): Free
10814 status string after use.
10815 * target.c (target_waitstatus_to_string): Remove.
10816 * target.h: Include target-common.h.
10817 (resume_kind): Likewise.
10818 (target_waitkind): Likewise.
10819 (target_waitstatus): Likewise.
10820 (TARGET_WNOHANG): Likewise.
10821
10822 2013-07-04 Yao Qi <yao@codesourcery.com>
10823
10824 * Makefile.in (host_alias): Use @host_noncanonical@.
10825 (target_alias): Use @target_noncanonical@.
10826 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10827 ACX_NONCANONICAL_HOST.
10828 * configure: Regenerated.
10829
10830 Revert:
10831 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10832
10833 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10834 * configure: Rebuild.
10835 * Makefile.in (version_host, version_target): Get from configure.
10836 (version.c): Use $(version_host) and $(version_target).
10837
10838 2013-07-03 Pedro Alves <palves@redhat.com>
10839
10840 * Makefile.in (config.status): Depend on development.sh.
10841 * acinclude.m4: Include libmcheck.m4.
10842 * configure: Regenerate.
10843
10844 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10845
10846 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10847 attribute inside the parentheses.
10848 (winapi_DebugSetProcessKillOnExit): Ditto.
10849 (winapi_DebugBreakProcess): Ditto.
10850 (winapi_GenerateConsoleCtrlEvent): Ditto.
10851
10852 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10853
10854 * notif.h (notif_event): Add a dummy member to avoid compiler
10855 errors.
10856
10857 2013-07-01 Pedro Alves <palves@redhat.com>
10858
10859 * hostio.c (HOSTIO_PATH_MAX): Define.
10860 (require_filename, handle_open, handle_unlink, handle_readlink):
10861 Use it.
10862
10863 2013-07-01 Pedro Alves <palves@redhat.com>
10864
10865 * server.h: Include "pathmax.h".
10866 * linux-low.c: Don't include sys/param.h.
10867 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10868 MAXPATHLEN.
10869 * win32-low.c: Don't include sys/param.h.
10870 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10871
10872 2013-07-01 Pedro Alves <palves@redhat.com>
10873
10874 * event-loop.c: Don't check HAVE_UNISTD_H before including
10875 <unistd.h>.
10876 * gdbreplay.c: Likewise.
10877 * remote-utils.c: Likewise.
10878 * server.c: Likewise.
10879 * configure.ac: Don't check for unistd.h.
10880 * configure: Regenerate.
10881
10882 2013-06-28 Tom Tromey <tromey@redhat.com>
10883
10884 * Makefile.in (version.c): Use version.in, not
10885 common/version.in.
10886
10887 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10888
10889 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10890 * configure: Rebuild.
10891 * Makefile.in (version_host, version_target): Get from configure.
10892 (version.c): Use $(version_host) and $(version_target).
10893
10894 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10895
10896 Fix trace-status to output user name without trailing colon.
10897 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10898
10899 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10900
10901 Fix trace-status to output proper start-time and stop-time.
10902 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10903 output start time and stop time in hex as gdb expects.
10904
10905 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10906
10907 * tracepoint.c (build_traceframe_info_xml): Output trace state
10908 variables present in the trace buffer.
10909
10910 2013-06-24 Tom Tromey <tromey@redhat.com>
10911
10912 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10913 create-version.sh.
10914 (version.o): Remove.
10915 * gdbreplay.c: Include version.h.
10916 (version, host_name): Don't declare.
10917 * server.h: Include version.h.
10918 (version, host_name): Don't declare.
10919
10920 2013-06-12 Pedro Alves <palves@redhat.com>
10921
10922 * linux-x86-low.c (linux_is_elf64): Delete global.
10923 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10924 with local linux_pid_exe_is_elf_64_file use.
10925
10926 2013-06-11 Pedro Alves <palves@redhat.com>
10927
10928 * linux-low.c (regset_disabled, disable_regset): New functions.
10929 (regsets_fetch_inferior_registers)
10930 (regsets_store_inferior_registers): Use them.
10931 (initialize_regsets_info); Don't allocate the disabled_regsets
10932 array here.
10933 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10934 comment.
10935
10936 2013-06-11 Pedro Alves <palves@redhat.com>
10937
10938 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10939 xmalloc.
10940
10941 2013-06-11 Pedro Alves <palves@redhat.com>
10942
10943 * linux-x86-low.c (initialize_low_arch): Call
10944 init_registers_x32_avx_linux.
10945
10946 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10947
10948 Fix compatibility with Android Bionic.
10949 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10950 it is not empty.
10951
10952 2013-06-07 Pedro Alves <palves@redhat.com>
10953
10954 PR server/14823
10955 * Makefile.in (OBS): Add tdesc.o.
10956 (IPA_OBJS): Add tdesc-ipa.o.
10957 (tdesc-ipa.o): New rule.
10958 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10959 interface.
10960 * linux-low.c (new_inferior): Delete.
10961 (disabled_regsets, num_regsets): Delete.
10962 (linux_add_process): Adjust to set the new per-process
10963 new_inferior flag.
10964 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10965 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10966 was a stop. When calling arch_setup, switch the current inferior
10967 to the thread that got an event.
10968 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10969 (regsets_fetch_inferior_registers)
10970 (regsets_store_inferior_registers): New regsets_info parameter.
10971 Adjust to use it.
10972 (linux_register_in_regsets): New regs_info parameter. Adjust to
10973 use it.
10974 (register_addr, fetch_register, store_register): New usrregs_info
10975 parameter. Adjust to use it.
10976 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10977 parameter regs_info. Adjust to use it.
10978 (linux_fetch_registers): Get the current inferior's regs_info, and
10979 adjust to use it.
10980 (linux_store_registers): Ditto.
10981 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
10982 (initialize_low): Don't initialize the target_regsets here. Call
10983 initialize_low_arch.
10984 * linux-low.h (target_regsets): Delete declaration.
10985 (struct regsets_info): New.
10986 (struct usrregs_info): New.
10987 (struct regs_info): New.
10988 (struct process_info_private) <new_inferior>: New field.
10989 (struct linux_target_ops): Delete the num_regs, regmap, and
10990 regset_bitmap fields. New field regs_info.
10991 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
10992 * i387-fp.c (num_xmm_registers): Delete.
10993 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
10994 calls to new interface.
10995 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
10996 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
10997 Infer the number of xmm registers from the regcache's target
10998 description.
10999 * i387-fp.h (num_xmm_registers): Delete.
11000 * inferiors.c (add_thread): Don't install the thread's regcache
11001 here.
11002 * proc-service.c (gregset_info): Fetch the current inferior's
11003 regs_info. Adjust to use it.
11004 * regcache.c: Include tdesc.h.
11005 (register_bytes, reg_defs, num_registers)
11006 (gdbserver_expedite_regs): Delete.
11007 (get_thread_regcache): If the thread doesn't have a regcache yet,
11008 create one, instead of aborting gdbserver.
11009 (regcache_invalidate_one): Rename to ...
11010 (regcache_invalidate_thread): ... this.
11011 (regcache_invalidate_one): New.
11012 (regcache_invalidate): Only invalidate registers of the current
11013 process.
11014 (init_register_cache): Add target_desc parameter, and use it.
11015 (new_register_cache): Ditto. Assert the target description has a
11016 non zero registers_size.
11017 (regcache_cpy): Add assertions. Adjust.
11018 (realloc_register_cache, set_register_cache): Delete.
11019 (registers_to_string, registers_from_string): Adjust.
11020 (find_register_by_name, find_regno, find_register_by_number)
11021 (register_cache_size): Add target_desc parameter, and use it.
11022 (free_register_cache_thread, free_register_cache_thread_one)
11023 (regcache_release, register_cache_size): New.
11024 (register_size): Add target_desc parameter, and use it.
11025 (register_data, supply_register, supply_register_zeroed)
11026 (supply_regblock, supply_register_by_name, collect_register)
11027 (collect_register_as_string, collect_register_by_name): Adjust.
11028 * regcache.h (struct target_desc): Forward declare.
11029 (struct regcache) <tdesc>: New field.
11030 (init_register_cache, new_register_cache): Add target_desc
11031 parameter.
11032 (regcache_invalidate_thread): Declare.
11033 (regcache_invalidate_one): Delete declaration.
11034 (regcache_release): Declare.
11035 (find_register_by_number, register_cache_size, register_size)
11036 (find_regno): Add target_desc parameter.
11037 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11038 declarations.
11039 * remote-utils.c: Include tdesc.h.
11040 (outreg, prepare_resume_reply): Adjust.
11041 * server.c: Include tdesc.h.
11042 (gdbserver_xmltarget): Delete declaration.
11043 (get_features_xml, process_serial_event): Adjust.
11044 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11045 declare.
11046 (struct process_info) <tdesc>: New field.
11047 (ipa_tdesc): Declare.
11048 * tdesc.c: New file.
11049 * tdesc.h: New file.
11050 * tracepoint.c: Include tdesc.h.
11051 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11052 (get_context_regcache): Adjust to pass ipa_tdesc down.
11053 (do_action_at_tracepoint): Adjust to get the register cache size
11054 from the context regcache's description.
11055 (traceframe_walk_blocks): Adjust to get the register cache size
11056 from the current trace frame's description.
11057 (traceframe_get_pc): Adjust to get current trace frame's
11058 description and pass it down.
11059 (gdb_collect): Adjust to get the register cache size from the
11060 IPA's description.
11061 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11062 (gdbserver_xmltarget): Delete.
11063 (initialize_low_tracepoint): Set the ipa's target description.
11064 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11065 (initialize_low_tracepoint): Set the ipa's target description.
11066 * linux-x86-low.c: Include tdesc.h.
11067 [__x86_64__] (is_64bit_tdesc): New.
11068 (ps_get_thread_area, x86_get_thread_area): Use it.
11069 (i386_cannot_store_register): Rename to ...
11070 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11071 (i386_cannot_fetch_register): Rename to ...
11072 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11073 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11074 to new interface.
11075 (target_regsets): Rename to ...
11076 (x86_regsets): ... this.
11077 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11078 interface.
11079 (x86_siginfo_fixup): Use is_64bit_tdesc.
11080 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11081 (tdesc_x32_avx_linux, tdesc_x32_linux)
11082 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11083 Declare.
11084 (x86_linux_update_xmltarget): Delete.
11085 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11086 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11087 (AMD64_LINUX_USER64_CS): New.
11088 (x86_linux_read_description): New, based on
11089 x86_linux_update_xmltarget.
11090 (same_process_callback): New.
11091 (x86_arch_setup_process_callback): New.
11092 (x86_linux_update_xmltarget): New.
11093 (x86_regsets_info): New.
11094 (amd64_linux_regs_info): New.
11095 (i386_linux_usrregs_info): New.
11096 (i386_linux_regs_info): New.
11097 (x86_linux_regs_info): New.
11098 (x86_arch_setup): Reimplement.
11099 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11100 (x86_emit_ops): Ditto.
11101 (the_low_target): Adjust. Install x86_linux_regs_info,
11102 x86_cannot_fetch_register, and x86_cannot_store_register.
11103 (initialize_low_arch): New.
11104 * linux-ia64-low.c (tdesc_ia64): Declare.
11105 (ia64_fetch_register): Adjust.
11106 (ia64_usrregs_info, regs_info): New globals.
11107 (ia64_regs_info): New function.
11108 (the_low_target): Adjust.
11109 (initialize_low_arch): New function.
11110 * linux-sparc-low.c (tdesc_sparc64): Declare.
11111 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11112 Adjust.
11113 (sparc_arch_setup): New function.
11114 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11115 (the_low_target): Adjust.
11116 (initialize_low_arch): New function.
11117 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11118 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11119 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11120 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11121 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11122 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11123 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11124 (tdesc_powerpc_isa205_vsx64l): Declare.
11125 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11126 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11127 (ppc_set_pc, ppc_get_hwcap): Adjust.
11128 (ppc_usrregs_info): Forward declare.
11129 (!__powerpc64__) ppc_regmap_adjusted: New global.
11130 (ppc_arch_setup): Adjust to the current process'es target
11131 description.
11132 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11133 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11134 (ppc_store_evrregset): Adjust.
11135 (target_regsets): Rename to ...
11136 (ppc_regsets): ... this, and make static.
11137 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11138 (ppc_regs_info): New function.
11139 (the_low_target): Adjust.
11140 (initialize_low_arch): New function.
11141 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11142 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11143 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11144 (tdesc_s390x_linux64v2): Declare.
11145 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11146 (s390_fill_gregset, s390_store_last_break): Adjust.
11147 (target_regsets): Rename to ...
11148 (s390_regsets): ... this, and make static.
11149 (s390_get_pc, s390_set_pc): Adjust.
11150 (s390_get_hwcap): New target_desc parameter, and use it.
11151 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11152 (s390_arch_setup): Adjust to set the current process'es target
11153 description. Don't adjust the regmap.
11154 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11155 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11156 (regs_info_3264): New globals.
11157 (s390_regs_info): New function.
11158 (the_low_target): Adjust.
11159 (initialize_low_arch): New function.
11160 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11161 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11162 [__mips64] (init_registers_mips_linux)
11163 (init_registers_mips_dsp_linux): Delete defines.
11164 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11165 (have_dsp): New global.
11166 (mips_read_description): New, based on mips_arch_setup.
11167 (mips_arch_setup): Reimplement.
11168 (get_usrregs_info): New function.
11169 (mips_cannot_fetch_register, mips_cannot_store_register)
11170 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11171 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11172 (target_regsets): Rename to ...
11173 (mips_regsets): ... this, and make static.
11174 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11175 (dsp_regs_info, regs_info): New globals.
11176 (mips_regs_info): New function.
11177 (the_low_target): Adjust.
11178 (initialize_low_arch): New function.
11179 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11180 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11181 Declare.
11182 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11183 (arm_read_description): New, with bits factored from
11184 arm_arch_setup.
11185 (arm_arch_setup): Reimplement.
11186 (target_regsets): Rename to ...
11187 (arm_regsets): ... this, and make static.
11188 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11189 (arm_regs_info): New function.
11190 (the_low_target): Adjust.
11191 (initialize_low_arch): New function.
11192 * linux-m68k-low.c (tdesc_m68k): Declare.
11193 (target_regsets): Rename to ...
11194 (m68k_regsets): ... this, and make static.
11195 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11196 (m68k_regs_info): New function.
11197 (m68k_arch_setup): New function.
11198 (the_low_target): Adjust.
11199 (initialize_low_arch): New function.
11200 * linux-sh-low.c (tdesc_sharch): Declare.
11201 (target_regsets): Rename to ...
11202 (sh_regsets): ... this, and make static.
11203 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11204 (sh_regs_info, sh_arch_setup): New functions.
11205 (the_low_target): Adjust.
11206 (initialize_low_arch): New function.
11207 * linux-bfin-low.c (tdesc_bfin): Declare.
11208 (bfin_arch_setup): New function.
11209 (bfin_usrregs_info, regs_info): New globals.
11210 (bfin_regs_info): New function.
11211 (the_low_target): Adjust.
11212 (initialize_low_arch): New function.
11213 * linux-cris-low.c (tdesc_cris): Declare.
11214 (cris_arch_setup): New function.
11215 (cris_usrregs_info, regs_info): New globals.
11216 (cris_regs_info): New function.
11217 (the_low_target): Adjust.
11218 (initialize_low_arch): New function.
11219 * linux-cris-low.c (tdesc_crisv32): Declare.
11220 (cris_arch_setup): New function.
11221 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11222 (cris_regs_info): New function.
11223 (the_low_target): Adjust.
11224 (initialize_low_arch): New function.
11225 * linux-m32r-low.c (tdesc_m32r): Declare.
11226 (m32r_arch_setup): New function.
11227 (m32r_usrregs_info, regs_info): New globals.
11228 (m32r_regs_info): Adjust.
11229 (initialize_low_arch): New function.
11230 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11231 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11232 (tic6x_usrregs_info): Forward declare.
11233 (tic6x_read_description): New function, based on ...
11234 (tic6x_arch_setup): ... this. Reimplement.
11235 (target_regsets): Rename to ...
11236 (tic6x_regsets): ... this, and make static.
11237 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11238 (tic6x_regs_info): New function.
11239 (the_low_target): Adjust.
11240 (initialize_low_arch): New function.
11241 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11242 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11243 (target_regsets): Rename to ...
11244 (xtensa_regsets): ... this, and make static.
11245 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11246 globals.
11247 (xtensa_arch_setup, xtensa_regs_info): New functions.
11248 (the_low_target): Adjust.
11249 (initialize_low_arch): New function.
11250 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11251 (nios2_arch_setup): Set the current process'es tdesc.
11252 (target_regsets): Rename to ...
11253 (nios2_regsets): ... this.
11254 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11255 (nios2_regs_info): New function.
11256 (the_low_target): Adjust.
11257 (initialize_low_arch): New function.
11258 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11259 (aarch64_arch_setup): Set the current process'es tdesc.
11260 (target_regsets): Rename to ...
11261 (aarch64_regsets): ... this.
11262 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11263 (aarch64_regs_info): New function.
11264 (the_low_target): Adjust.
11265 (initialize_low_arch): New function.
11266 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11267 globals.
11268 (target_regsets): Rename to ...
11269 (tile_regsets): ... this.
11270 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11271 (tile_regs_info): New function.
11272 (tile_arch_setup): Set the current process'es tdesc.
11273 (the_low_target): Adjust.
11274 (initialize_low_arch): New function.
11275 * spu-low.c (tdesc_spu): Declare.
11276 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11277 * win32-arm-low.c (tdesc_arm): Declare.
11278 (arm_arch_setup): New function.
11279 (the_low_target): Install arm_arch_setup instead of
11280 init_registers_arm.
11281 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11282 (init_windows_x86): Rename to ...
11283 (i386_arch_setup): ... this. Set `win32_tdesc'.
11284 (the_low_target): Adjust.
11285 * win32-low.c (win32_tdesc): New global.
11286 (child_add_thread): Don't create the thread cache here.
11287 (do_initial_child_stuff): Set the new process'es tdesc.
11288 * win32-low.h (struct target_desc): Forward declare.
11289 (win32_tdesc): Declare.
11290 * lynx-i386-low.c (tdesc_i386): Declare global.
11291 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11292 * lynx-low.c (lynx_tdesc): New global.
11293 (lynx_add_process): Set the new process'es tdesc.
11294 * lynx-low.h (struct target_desc): Forward declare.
11295 (lynx_tdesc): Declare global.
11296 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11297 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11298 * nto-low.c (nto_tdesc): New global.
11299 (do_attach): Set the new process'es tdesc.
11300 * nto-low.h (struct target_desc): Forward declare.
11301 (nto_tdesc): Declare.
11302 * nto-x86-low.c (tdesc_i386): Declare.
11303 (nto_x86_arch_setup): Set `nto_tdesc'.
11304
11305 2013-06-04 Gary Benson <gbenson@redhat.com>
11306
11307 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11308 to qSupported response when appropriate.
11309 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11310 with nonzero-length annex.
11311 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11312 arguments supplied in annex.
11313
11314 2013-05-31 Doug Evans <dje@google.com>
11315
11316 PR server/15594
11317 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11318 64 bits in 64-cross-32 environment.
11319
11320 2013-05-28 Pedro Alves <palves@redhat.com>
11321
11322 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11323 (aarch64-without-fpu.c): Delete rule.
11324 * configure.srv (aarch64*-*-linux*): Remove references to
11325 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11326 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11327 declaration.
11328
11329 2013-05-24 Pedro Alves <palves@redhat.com>
11330
11331 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11332 instead of strchr/decode_address. Error if the range isn't split
11333 with a ','. Don't assume there's be a ':' in the action.
11334
11335 2013-05-23 Yao Qi <yao@codesourcery.com>
11336 Pedro Alves <palves@redhat.com>
11337
11338 * linux-low.c (lwp_in_step_range): New function.
11339 (linux_wait_1): If the thread was range stepping and stopped
11340 outside the stepping range, report the stop to GDB. Otherwise,
11341 continue stepping. Add range stepping debug output.
11342 (linux_set_resume_request): Copy the step range from the resume
11343 request to the lwp.
11344 (linux_supports_range_stepping): New.
11345 (linux_target_ops) <supports_range_stepping>: Set to
11346 linux_supports_range_stepping.
11347 * linux-low.h (struct linux_target_ops)
11348 <supports_range_stepping>: New field.
11349 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11350 * linux-x86-low.c (x86_supports_range_stepping): New.
11351 (the_low_target) <supports_range_stepping>: Set to
11352 x86_supports_range_stepping.
11353 * server.c (handle_v_cont): Handle 'r' action.
11354 (handle_v_requests): Append ";r" if the target supports range
11355 stepping.
11356 * target.h (struct thread_resume) <step_range_start,
11357 step_range_end>: New fields.
11358 (struct target_ops) <supports_range_stepping>:
11359 New field.
11360 (target_supports_range_stepping): New macro.
11361
11362 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11363
11364 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11365 confusion in comment.
11366
11367 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11368
11369 * lynx-low.c (struct process_info_private): New type.
11370 (lynx_add_process): New function.
11371 (lynx_create_inferior, lynx_attach): Replace calls to
11372 add_process by calls to lynx_add_process.
11373 (lynx_resume): If PTID is null, then try using
11374 current_process()->private->last_wait_event_ptid.
11375 Add comments.
11376 (lynx_clear_inferiors): Delete. The contents of that function
11377 has been inlined in lynx_mourn;
11378 (lynx_wait_1): Save the ptid in the process's private data.
11379 (lynx_mourn): Free the process' private data. Replace call
11380 to lynx_clear_inferiors by call to clear_inferiors.
11381
11382 2013-05-17 Yao Qi <yao@codesourcery.com>
11383
11384 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11385 the right place.
11386
11387 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11388
11389 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11390 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11391 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11392 PT_TEXT_END_ADDR guards. Update comments.
11393 (linux_target_op) <read_offsets>: Conditionally define to
11394 linux_read_offsets if the target is UCLIBC and if it defines
11395 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11396
11397 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11398 Andrew Jenner <andrew@codesourcery.com>
11399
11400 * Makefile.in (SFILES): Add linux-nios2-low.c.
11401 (clean): Add action to delete nios2-linux.c.
11402 (nios2-linux.c): New rule.
11403 * configure.srv: Add nios2*-*-linux*.
11404 * linux-nios2-low.c: New.
11405
11406 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11407
11408 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11409
11410 2013-04-25 Hui Zhu <hui@codesourcery.com>
11411
11412 PR gdb/15186
11413 * ax.c (ax_printf): Add fflush.
11414
11415 2013-04-22 Tom Tromey <tromey@redhat.com>
11416
11417 * Makefile.in (SFILES): Add filestuff.c.
11418 (OBS): Add filestuff.o.
11419 (filestuff.o): New target.
11420 * config.in, configure: Rebuild.
11421 * configure.ac: Check for fdwalk, pipe2.
11422
11423 2013-04-17 Pedro Alves <palves@redhat.com>
11424
11425 * configure.ac (USE_THREAD_DB): Delete variable.
11426 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11427 Don't AC_SUBST USE_THREAD_DB.
11428 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11429 * config.in, configure: Regenerate.
11430
11431 2013-04-16 Pedro Alves <palves@redhat.com>
11432
11433 * linux-low.h (struct lwp_info) <thread_known>: Move under
11434 the USE_THREAD_DB #ifdef.
11435
11436 2013-04-16 Pedro Alves <palves@redhat.com>
11437
11438 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11439 (linux-low.o): Delete rule.
11440 * linux-low.h: Always include "gdb_thread_db.h" instead of
11441 conditionally including thread_db.h.
11442 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11443 HAVE_THREAD_DB_H.
11444
11445 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11446
11447 * Makefile.in (install-only): Fix make install regression.
11448
11449 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11450
11451 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11452 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11453 installation.
11454 * gdbserver.1: Remove.
11455
11456 2013-03-22 Pedro Alves <palves@redhat.com>
11457
11458 * linux-low.c (handle_extended_wait): Don't call
11459 linux_enable_event_reporting.
11460
11461 2013-03-15 Tony Theodore <tonyt@logyst.com>
11462
11463 PR build/9098:
11464 * Makefile.in (SHELL): Use @SHELL@.
11465
11466 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11467
11468 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11469 compiler warning.
11470
11471 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11472
11473 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11474 Remove extraneous NULL element.
11475
11476 2013-03-13 Yao Qi <yao@codesourcery.com>
11477
11478 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11479 'V' block in trace frame.
11480
11481 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11482
11483 * target.h (struct target_ops): Add btrace ops.
11484 (target_supports_btrace): New macro.
11485 (target_enable_btrace): New macro.
11486 (target_disable_btrace): New macro.
11487 (target_read_btrace): New macro.
11488 * gdbthread.h (struct thread_info): Add btrace field.
11489 * server.c: Include btrace-common.h.
11490 (handle_btrace_general_set): New function.
11491 (handle_btrace_enable): New function.
11492 (handle_btrace_disable): New function.
11493 (handle_general_set): Call handle_btrace_general_set.
11494 (handle_qxfer_btrace): New function.
11495 (struct qxfer qxfer_packets[]): Add btrace entry.
11496 * inferiors.c (remove_thread): Disable btrace.
11497 * linux-low: Include linux-btrace.h.
11498 (linux_low_enable_btrace): New function.
11499 (linux_low_read_btrace): New function.
11500 (linux_target_ops): Add btrace ops.
11501 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11502 Add srv_linux_btrace=yes.
11503 (x86_64-*-linux*): Add linux-btrace.o.
11504 Add srv_linux_btrace=yes.
11505 * configure.ac: Define HAVE_LINUX_BTRACE.
11506 * config.in: Regenerated.
11507 * configure: Regenerated.
11508
11509 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11510
11511 * server.c (handle_qxfer): Preserve error message if -3 is
11512 returned.
11513 (qxfer): Document the -3 return value.
11514
11515 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11516
11517 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11518 (linux_btrace_h): New variable.
11519 (linux-btrace.o): New rule.
11520
11521 2013-03-08 Stan Shebs <stan@codesourcery.com>
11522 Hafiz Abid Qadeer <abidh@codesourcery.com>
11523
11524 * tracepoint.c (trace_buffer_size): New global.
11525 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11526 (init_trace_buffer): Change to one-argument function. Allocate
11527 trace buffer memory.
11528 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11529 handle QTBuffer:size packet.
11530 (cmd_bigqtbuffer_size): New function.
11531 (initialize_tracepoint): Call init_trace_buffer with
11532 DEFAULT_TRACE_BUFFER_SIZE.
11533 * server.c (handle_query): Add QTBuffer:size in the
11534 supported packets.
11535
11536 2013-03-07 Yao Qi <yao@codesourcery.com>
11537
11538 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11539 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11540 of -1.
11541 (cmd_qtsp): Adjust condition. Do post increment.
11542 Set cur_action and cur_step_action back to 0.
11543
11544 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11545
11546 PR server/15236
11547 * linux-low.c (linux_write_memory): Return early success if LEN is
11548 zero.
11549
11550 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11551
11552 * configure.srv: Add x86_64-*-cygwin* as target.
11553
11554 2013-02-28 Tom Tromey <tromey@redhat.com>
11555
11556 * configure.ac: Invoke AC_SYS_LARGEFILE.
11557 * configure, config.in: Rebuild.
11558
11559 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11560
11561 * win32-low.c: Throughout, fix format strings and casts of
11562 printf-like functions to avoid type related warnings on all
11563 platforms.
11564 (get_child_debug_event): Print dwDebugEventCode as hex since
11565 that's how it's usually documented.
11566
11567 2013-02-28 Yao Qi <yao@codesourcery.com>
11568
11569 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11570 pulongest.
11571
11572 2013-02-27 Jiong Wang <jiwang@tilera.com>
11573
11574 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11575 (reg-tilegx32.c): New rule.
11576 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11577 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11578 different register info initializer according to elf class.
11579 (init_registers_tilgx32): New function. The tilegx32 register info
11580 initializer.
11581 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11582 (tile_store_gregset): Likewise.
11583
11584 2013-02-27 Yao Qi <yao@codesourcery.com>
11585
11586 * server.c (process_point_options): Print debug message when
11587 debug_threads is true.
11588
11589 2013-02-26 Yao Qi <yao@codesourcery.com>
11590
11591 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11592
11593 2013-02-19 Pedro Alves <palves@redhat.com>
11594 Kai Tietz <ktietz@redhat.com>
11595
11596 PR gdb/15161
11597
11598 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11599 instead of strtoul to extract address from packet.
11600 (process_serial_event) <'z'>: Likewise.
11601
11602 2013-02-18 Yao Qi <yao@codesourcery.com>
11603
11604 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11605
11606 2013-02-14 Pedro Alves <palves@redhat.com>
11607
11608 Plug memory leak.
11609
11610 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11611 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11612
11613 2013-02-14 Pedro Alves <palves@redhat.com>
11614
11615 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11616
11617 2013-02-14 Pedro Alves <palves@redhat.com>
11618
11619 * tracepoint.c (save_string): Delete.
11620 (add_tracepoint_action): Use savestring instead of save_string.
11621
11622 2013-02-12 Pedro Alves <palves@redhat.com>
11623
11624 * linux-xtensa-low.c: Ditto.
11625 * xtensa-xtregs.c: Ditto.
11626
11627 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11628
11629 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11630 thread_db.
11631
11632 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11633
11634 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11635 aarch64_num_wp_regs and aarch64_num_bp_regs to
11636 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11637
11638 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11639
11640 * linux-aarch64-low.c (ps_get_thread_area): Replace
11641 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11642
11643 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11644 Marcus Shawcroft <marcus.shawcroft@arm.com>
11645 Nigel Stephens <nigel.stephens@arm.com>
11646 Yufeng Zhang <yufeng.zhang@arm.com>
11647
11648 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11649 (aarch64.c, aarch64-without-fpu.c): New targets.
11650 * configure.srv (aarch64*-*-linux*): New.
11651 * linux-aarch64-low.c: New file.
11652
11653 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11654
11655 * linux-low.c (handle_extended_wait, linux_create_inferior)
11656 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11657 (dequeue_one_deferred_signal, linux_resume_one_thread)
11658 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11659 (linux_tracefork_grandchild, linux_test_for_tracefork)
11660 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11661 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11662 where the argument is 0.
11663
11664 2013-01-25 Yao Qi <yao@codesourcery.com>
11665
11666 * event-loop.c: Include "queue.h".
11667 (gdb_event_p): New typedef.
11668 (struct gdb_event) <next_event>: Remove.
11669 (event_queue): Change to QUEUE(gdb_event_p).
11670 (async_queue_event): Remove.
11671 (gdb_event_xfree): New.
11672 (initialize_event_loop): New.
11673 (process_event): Use API from QUEUE.
11674 (wait_for_event): Likewise.
11675 * server.c (main): Call initialize_event_loop.
11676 * server.h (initialize_event_loop): Declare.
11677
11678 2013-01-18 Yao Qi <yao@codesourcery.com>
11679
11680 * ax.h (struct eval_agent_expr_context): New.
11681 (gdb_eval_agent_expr): Update declaration.
11682 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11683 TFRAME. Add new argument CTX.
11684 * server.h (struct eval_agent_expr_context): Declare.
11685 (agent_mem_read, agent_tsv_read): Update declaration.
11686 (agent_mem_read_string): Likewise.
11687 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11688 (add_traceframe_block): Add new argument TPOINT.
11689 Increase TPOINT->traceframe_usage.
11690 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11691 eval_tracepoint_agent_expr.
11692 (condition_true_at_tracepoint): Likewise.
11693 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11694 (agent_mem_read_string, agent_tsv_read): Likewise.
11695
11696 2013-01-16 Yao Qi <yao@codesourcery.com>
11697
11698 * linux-low.c (linux_resume_one_lwp): Don't check
11699 'lwp->bp_reinsert != 0'.
11700
11701 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11702 Pedro Alves <palves@redhat.com>
11703
11704 * lynx-low.c (ptrace_request_to_str): Define a temporary
11705 macro and use it to simplify this function's implementation.
11706
11707 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11708
11709 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11710 sets errno.
11711
11712 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11713
11714 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11715
11716 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11717
11718 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11719
11720 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11721
11722 * lynx-low.c (lynx_resume): Use the resume_info parameter
11723 to determine the ptid for the lynx_ptrace call, unless
11724 it is equal to minus_one_ptid, in which case we use the
11725 ptid of the current_inferior.
11726 (lynx_wait_1): After having received a thread create/exit
11727 event, resume the inferior's execution using the signaling
11728 thread's ptid, rather than the old ptid.
11729
11730 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11731
11732 * lynx-low.c (lynx_resume): Delete variable ret.
11733
11734 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11735
11736 * gdbreplay.c (gdbreplay_version): Update copyright year.
11737 * server.c (gdbserver_version): Likewise.
11738
11739 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11740
11741 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11742 new thread.
11743
11744 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11745
11746 * lynx-low.c (ptrace_request_to_str): Add handling for
11747 PTRACE_GETTRACESIG.
11748
11749 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11750
11751 * lynx-low.c (lynx_attach): Delete variable new_process.
11752
11753 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11754
11755 * lynx-low.c (lynx_create_inferior): Delete variable
11756 new_process.
11757
11758 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11759
11760 * lynx-low.c (ptrace_request_to_str): Do not handle
11761 PTRACE_GETTHREADLIST if this macro does not exist.
11762
11763 2012-12-15 Yao Qi <yao@codesourcery.com>
11764
11765 * Makefile.in (OBS): Add notif.o.
11766 * notif.c, notif.h: New.
11767 * server.c: Include "notif.h".
11768 (struct vstop_notif) <next>: Remove.
11769 <base>: New field.
11770 (queue_stop_reply): Update.
11771 (push_event, send_next_stop_reply): Remove.
11772 (discard_queued_stop_replies): Update.
11773 (notif_stop): New variable.
11774 (handle_v_stopped): Remove.
11775 (handle_v_requests): Don't call handle_v_stopped. Call
11776 handle_ack_notif instead.
11777 (queue_stop_reply_callback): Call notif_event_enque instead
11778 of queue_stop_reply.
11779 (handle_status): Don't call send_next_stop_reply, call
11780 notif_write_event instead.
11781 (kill_inferior_callback): Likewise.
11782 (detach_or_kill_inferior_callback): Likewise.
11783 (main): Call initialize_notif.
11784 (process_serial_event): Call QUEUE_is_empty.
11785 (handle_target_event): Call notif_push instead of push event.
11786 * server.h (push_event): Remove declaration.
11787
11788 2012-12-10 Tom Tromey <tromey@redhat.com>
11789
11790 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11791 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11792 macros.
11793 (.c.o): Rewrite.
11794 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11795 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11796 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11797 (amd64-linux-ipa.o, ax.o): Rewrite.
11798 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11799 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11800 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11801 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11802 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11803 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11804 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11805 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11806 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11807 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11808 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11809 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11810 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11811 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11812 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11813 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11814 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11815 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11816 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11817 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11818 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11819 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11820 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11821 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11822 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11823 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11824 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11825 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11826 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11827 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11828 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11829 (reg-tilegx.o): Remove.
11830 (all_object_files): New macro.
11831 Include .deps files.
11832 * aclocal.m4, configure: Rebuild.
11833 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11834 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11835 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11836
11837 2012-12-05 Tom Tromey <tromey@redhat.com>
11838
11839 PR gdb/14917:
11840 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11841
11842 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11843
11844 * configure.ac: Check for linux/perf_event.h.
11845 * config.in: Regenerated.
11846 * configure: Regenerated.
11847
11848 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11849
11850 * hostio.c (handle_readlink): Decrease buffer size
11851 parameter passed to readlink by one byte.
11852
11853 2012-11-26 Yao Qi <yao@codesourcery.com>
11854
11855 * configure.ac (build_warnings): Append '-Wempty-body'.
11856 * configure: Regenerated.
11857 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11858 body.
11859
11860 2012-11-15 Pierre Muller <muller@sourceware.org>
11861
11862 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11863 * config.in: Regenerate.
11864 * configure: Regenerate.
11865 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11866 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11867 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11868 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11869 header.
11870 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11871 instead of <sys/wait.h> header.
11872 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11873
11874 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11875
11876 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11877 (various make rules): Remove -DGDBSERVER
11878
11879 2012-11-09 Yao Qi <yao@codesourcery.com>
11880
11881 * spu-low.c (current_ptid): Move it to ..
11882 * gdbthread.h: ... here. New.
11883 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11884 * server.c (myresume, process_serial_event): Likewise.
11885 * thread-db.c (thread_db_find_new_threads): Likewise.
11886 * tracepoint.c (run_inferior_command): Likewise.
11887
11888 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11889
11890 * server.c (handle_search_memory_1): Include access length in
11891 warning message.
11892
11893 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11894
11895 * linux-crisv32-low.c: Fix compile errors.
11896
11897 2012-09-04 Yao Qi <yao@codesourcery.com>
11898
11899 * tracepoint.c (cmd_qtsv): Adjust debug message.
11900 Don't check CUR_TPOINT.
11901
11902 2012-08-28 Yao Qi <yao@codesourcery.com>
11903
11904 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11905 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11906 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11907 Remove declarations of xmalloc, xreallloc, xstrdup and
11908 freeargv.
11909 * Makefile.in (libiberty_h): New.
11910 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11911 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11912
11913 2012-08-23 Yao Qi <yao@codesourcery.com>
11914
11915 * server.h: Remove declaration of 'xsnprintf'.
11916
11917 2012-08-22 Keith Seitz <keiths@redhat.com>
11918
11919 * server.h: Include build-gnulib-gbserver/config.h.
11920 * gdbreplay.c: Likewise.
11921
11922 2012-08-08 Doug Evans <dje@google.com>
11923
11924 * Makefile.in (SFILES): Add gdb_vecs.c.
11925 (OBS): Add gdb_vecs.o.
11926 (gdb_vecs_h, host_defs_h): New variables.
11927 (thread-db.o): Add $(gdb_vecs_h) dependency.
11928 (gdb_vecs.o): New rule.
11929 * thread-db.c: #include "gdb_vecs.h".
11930 (thread_db_load_search): Use a vector to iterate over path elements.
11931 Handle text appearing after "$pdir".
11932
11933 * configure.ac: Add check for strstr.
11934 * config.in: Regenerate.
11935 * configure: Regenerate.
11936
11937 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11938
11939 * hostio.c (handle_pread): If pread fails, fall back to attempting
11940 lseek/read.
11941 (handle_pwrite): Likewise for pwrite.
11942
11943 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11944
11945 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11946 between unsupported TYPE and unimplementable ADDR/LEN combination.
11947 (arm_insert_point): Act on new return value.
11948
11949 2012-07-31 Pedro Alves <palves@redhat.com>
11950
11951 * server.c (process_point_options): Only skip tokens if we find
11952 one that is unrecognized. Don't treat 'X' specially while
11953 skipping unrecognized tokens.
11954
11955 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11956
11957 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11958 to 4-byte-align HW breakpoint addresses for Thumb.
11959
11960 2012-07-27 Yao Qi <yao@codesourcery.com>
11961
11962 PR remote/14161.
11963
11964 * server.h: Declare gdb_agent_about_to_close.
11965 * target.c (kill_inferior): Include "agent.h".
11966 New. Send command 'kill'.
11967 * target.h (kill_inferior): Removed macro.
11968 * tracepoint.c (gdb_agent_about_to_close): New.
11969 (gdb_agent_helper_thread): Handle command 'close'.
11970 Wait endlessly until the inferior stops.
11971 Install gdb_agent_remove_socket to atexit hook.
11972 (agent_socket_name): New static variable.
11973 (gdb_agent_socket_init): Replace local variable 'name' with
11974 'agent_socket_name'.
11975 (gdb_agent_remove_socket): New.
11976
11977 2012-07-27 Yao Qi <yao@codesourcery.com>
11978
11979 * server.c (process_point_options): Stop at 'X' when parsing.
11980
11981 2012-07-19 Michael Eager <eager@eagercon.com>
11982
11983 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
11984 to hw_execute.
11985 * linux-x86-low.c (x86_insert_point, x86_remove_point):
11986 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
11987 hardware breakpoint.
11988
11989 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11990
11991 * gdbserver/linux-low.c (initialize_low): Call
11992 linux_ptrace_init_warnings.
11993
11994 2012-07-02 Doug Evans <dje@google.com>
11995
11996 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
11997 pointer to int.
11998
11999 2012-07-02 Stan Shebs <stan@codesourcery.com>
12000
12001 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12002 (ax.o): Add it to build rule.
12003 (ax-ipa.o): Ditto.
12004 (OBS): Add format.o.
12005 (IPA_OBS): Add format.o.
12006 * server.c (handle_query): Claim support for breakpoint commands.
12007 (process_point_options): Add command case.
12008 (process_serial_event): Leave running if there are printfs in
12009 effect.
12010 * mem-break.h (any_persistent_commands): Declare.
12011 (add_breakpoint_commands): Declare.
12012 (gdb_no_commands_at_breakpoint): Declare.
12013 (run_breakpoint_commands): Declare.
12014 * mem-break.c (struct point_command_list): New struct.
12015 (struct breakpoint): New field command_list.
12016 (any_persistent_commands): New function.
12017 (add_commands_to_breakpoint): New function.
12018 (add_breakpoint_commands): New function.
12019 (gdb_no_commands_at_breakpoint): New function.
12020 (run_breakpoint_commands): New function.
12021 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12022 locally.
12023 * ax.c: Include format.h.
12024 (ax_printf): New function.
12025 (gdb_eval_agent_expr): Add printf opcode.
12026
12027 2012-06-13 Yao Qi <yao@codesourcery.com>
12028
12029 * server.c (start_inferior): Remove duplicated writes to fields
12030 'last_resume_kind' and 'last_status' of 'current_inferior'.
12031
12032 2012-06-12 Yao Qi <yao@codesourcery.com>
12033 Pedro Alves <palves@redhat.com>
12034
12035 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12036 comment.
12037 * server.c (handle_v_cont): Extend comment.
12038
12039 2012-06-11 Yao Qi <yao@codesourcery.com>
12040
12041 * linux-low.c (linux_attach): Add 'static'.
12042
12043 2012-06-06 Yao Qi <yao@codesourcery.com>
12044
12045 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12046
12047 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12048
12049 Fix gcc -flto compilation warning.
12050 * server.c (main): Make variable multi_mode and attach volatile.
12051
12052 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12053
12054 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12055 if the platform doesn't know about it.
12056
12057 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12058
12059 * Makefile.in (SFILES): Add linux-tile-low.c.
12060 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12061 * configure.srv: Handle tilegx-*-linux*.
12062 * linux-tile-low.c: New file.
12063
12064 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12065
12066 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12067
12068 2012-05-24 Pedro Alves <palves@redhat.com>
12069
12070 PR gdb/7205
12071
12072 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12073
12074 2012-05-24 Pedro Alves <palves@redhat.com>
12075
12076 PR gdb/7205
12077
12078 Replace target_signal with gdb_signal throughout.
12079
12080 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12081
12082 * linux-low.c (linux_store_registers): Avoid the copying sequence
12083 when no data has been retrieved by ptrace.
12084
12085 2012-05-22 Will Deacon <will.deacon@arm.com>
12086
12087 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12088 Include asm/ptrace.h.
12089 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12090 already defined.
12091
12092 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12093
12094 * linux-low.c (linux_store_registers): Don't re-retrieve data
12095 with ptrace that has already been obtained from /proc. Always
12096 copy any data retrieved with ptrace to the buffer supplied.
12097
12098 2012-05-11 Yao Qi <yao@codesourcery.com>
12099 Pedro Alves <palves@redhat.com>
12100
12101 * linux-low.c (enum stopping_threads_kind): New.
12102 (stopping_threads): Change type to `enum stopping_threads_kind'.
12103 (handle_extended_wait): If stopping and suspending threads, leave
12104 the new_lwp suspended too.
12105 (linux_wait_for_event): Adjust.
12106 (stop_all_lwps): Set `stopping_threads' to
12107 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12108 whether we're suspending threads or just stopping them. Assert no
12109 recursion happens.
12110
12111 2012-04-29 Yao Qi <yao@codesourcery.com>
12112
12113 * server.h: Move some code to ...
12114 * gdbthread.h: ... here. New.
12115 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12116 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12117 (nto-low.o, win32-low.o): Likewise.
12118 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12119 * regcache.c, remote-utils.c, server.c: Likewise.
12120 * target.c, tracepoint.c, win32-low.c: Likewise.
12121
12122 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12123
12124 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12125 (PTRACE_ARG4_TYPE): Likewise.
12126 (PTRACE_XFER_TYPE): Likewise.
12127 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12128 ptrace to PTRACE_ARG3_TYPE.
12129 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12130 (PTRACE_ARG4_TYPE): Likewise.
12131 (PTRACE_XFER_TYPE): Likewise.
12132 (linux_detach_one_lwp): Cast fourth argument of
12133 ptrace to long then PTRACE_ARG4_TYPE.
12134 (regsets_fetch_inferior_registers): Cast third argument of
12135 ptrace to long then PTRACE_ARG3_TYPE.
12136 (regsets_store_inferior_registers): Likewise.
12137
12138 2012-04-20 Pedro Alves <palves@redhat.com>
12139
12140 * configure: Regenerate.
12141
12142 2012-04-19 Pedro Alves <palves@redhat.com>
12143
12144 * Makefile.in (GNULIB_BUILDDIR): New.
12145 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12146 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12147 (all, install-only, uninstall, clean-info, all-lib, clean): No
12148 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12149 (maintainer-clean realclean distclean): Use subdir_do.
12150 (subdir_do): New.
12151 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12152 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12153 * acinclude.m4: Include acx_configure_dir.m4.
12154 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12155 calls. Call AC_PROG_RANLIB. Configure gnulib using
12156 ACX_CONFIGURE_DIR.
12157 (GNULIB): New.
12158 (GNULIB_STDINT_H): Adjust.
12159 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12160 * gdbreplay.c: Include build-gnulib/config.h.
12161 * server.h: Likewise.
12162 * aclocal.m4: Regenerate.
12163 * config.in: Regenerate.
12164 * configure: Regenerate.
12165
12166 2012-04-19 Pedro Alves <palves@redhat.com>
12167
12168 * Makefile.in (LIBGNU, INCGNU): Adjust.
12169 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12170 (all, install-only, uninstall, clean-info, all-lib, clean)
12171 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12172 * configure.ac: Adjust AC_OUTPUT output.
12173 * aclocal.m4: Regenerate.
12174 * configure: Regenerate.
12175
12176 2012-04-19 Pedro Alves <palves@redhat.com>
12177
12178 * Makefile.in (generated_files): New.
12179 (server_h): Remove the explicit dependency on config.h, and depend
12180 on $generated_files.
12181
12182 2012-04-19 Pedro Alves <palves@redhat.com>
12183
12184 * Makefile.in (INCGNU): Add -Ignulib.
12185
12186 2012-04-19 Pedro Alves <palves@redhat.com>
12187
12188 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12189 (INCGNU): ... this, and spell out -I here.
12190 (GNULIB_LIB): Rename to ...
12191 (LIBGNU): ... this.
12192 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12193
12194 2012-04-19 Pedro Alves <palves@redhat.com>
12195
12196 * config.in: Regenerate.
12197
12198 2012-04-19 Pedro Alves <palves@redhat.com>
12199
12200 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12201 * server.h (memmem): Remove declaration.
12202 * config.in: Regenerate.
12203 * configure: Regenerate.
12204
12205 2012-04-19 Yao Qi <yao@codesourcery.com>
12206
12207 * Makefile.in (SFILES): Add common/vec.c.
12208 (OBS): Add vec.o.
12209 (vec.o): New rule.
12210
12211 2012-04-19 Yao Qi <yao@codesourcery.com>
12212
12213 * remote-utils.c (prepare_resume_reply): Replace with macro
12214 target_core_of_thread.
12215 * server.c (handle_qxfer_threads_proper): Likewise.
12216 * target.h (traget_core_of_thread): New macro.
12217
12218 2012-04-18 Pedro Alves <palves@redhat.com>
12219
12220 * aclocal.m4: Regenerate.
12221 * configure: Regenerate.
12222
12223 2012-04-16 Yao Qi <yao@codesourcery.com>
12224
12225 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12226 duplicated on address.
12227
12228 2012-04-16 Yao Qi <yao@codesourcery.com>
12229
12230 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12231 (struct tracepoint_action_ops) <send>: New field.
12232 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12233 (agent_expr_send, x_tracepoint_action_send): New.
12234 (l_tracepoint_action_send): New.
12235 (cmd_qtdp): Download and install tracepoint
12236 according to `use_agent'.
12237 (run_inferior_command): Add one more parameter `len'.
12238 Update callers.
12239 (tracepoint_send_agent): New.
12240 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12241
12242 2012-04-16 Yao Qi <yao@codesourcery.com>
12243
12244 * tracepoint.c (download_tracepoints): Moved to ...
12245 (cmd_qtstart): ... here.
12246
12247 2012-04-14 Yao Qi <yao@codesourcery.com>
12248
12249 * tracepoint.c: Include inttypes.h.
12250 (struct collect_memory_action): Use sized types.
12251 (struct tracepoint): Likewise.
12252 (cmd_qtdp, stop_tracing): Update print specifiers.
12253 (cmd_qtp, response_tracepoint): Likewise.
12254 (collect_data_at_tracepoint): Likewise.
12255 (collect_data_at_step): Likewise.
12256
12257 2012-04-14 Yao Qi <yao@codesourcery.com>
12258
12259 Import gnulib module inttypes.
12260 * aclocal.m4, config.in, configure: Regenerated.
12261
12262 2012-04-14 Yao Qi <yao@codesourcery.com>
12263
12264 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12265 Makefile and config.status at last.
12266
12267 2012-04-13 Yao Qi <yao@codesourcery.com>
12268
12269 * tracepoint.c: Include stdint.h unconditionally.
12270
12271 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12272
12273 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12274 on BFD_HAVE_SYS_PROCFS_TYPE.
12275 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12276 * configure: Regenerate.
12277 * config.in: Likewise.
12278
12279 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12280
12281 * Makefile.in (clean): Also remove x32.c x32-linux.c
12282 x32-avx.c x32-avx-linux.c.
12283 (x32.o): New target.
12284 (x32.c): Likewise.
12285 (x32-linux.o): Likewise.
12286 (x32-linux.c): Likewise.
12287 (x32-avx.o): Likewise.
12288 (x32-avx.c): Likewise.
12289 (x32-avx-linux.o): Likewise.
12290 (x32-avx-linux.c): Likewise.
12291
12292 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12293 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12294 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12295 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12296 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12297 i386/x32-avx-linux.xml.
12298
12299 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12300 (init_registers_x32_avx_linux): Likwise.
12301 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12302 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12303
12304 2012-04-13 Pedro Alves <palves@redhat.com>
12305
12306 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12307 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12308 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12309 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12310 the sub-make.
12311
12312 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12313
12314 * linux-x86-low.c (compat_x32_clock_t): New.
12315 (compat_x32_siginfo_t): Likewise.
12316 (compat_x32_siginfo_from_siginfo): Likewise.
12317 (siginfo_from_compat_x32_siginfo): Likewise.
12318 (linux_is_elf64): Likewise.
12319 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12320 and siginfo_from_compat_x32_siginfo for x32.
12321 (x86_arch_setup): Set linux_is_elf64.
12322
12323 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12324
12325 PR gdb/13969
12326 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12327 e_machine field.
12328 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12329 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12330 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12331 compatible with process.
12332
12333 2012-04-12 Yao Qi <yao@codesourcery.com>
12334
12335 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12336 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12337 (install-only, install-info, clean): Handle sub dir gnulib.
12338 (all-lib, am--refresh): New targets.
12339 (memmem.o): Remove target.
12340 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12341 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12342 (AC_REPLACE_FUNCS): Remove memmem.
12343 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12344 (AC_OUTPUT): Generate Makefile in gnulib/.
12345 * aclocal.m4, config.in, configure: Regenerated.
12346
12347 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12348
12349 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12350
12351 2012-04-05 Pedro Alves <palves@redhat.com>
12352
12353 -Werror=strict-aliasing
12354
12355 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12356 pointer.
12357
12358 2012-04-04 Pedro Alves <palves@redhat.com>
12359
12360 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12361 (sparc_store_gregset_from_stack, sparc_store_gregset)
12362 (sparc_breakpoint_at): Fix formatting.
12363
12364 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12365
12366 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12367 are available.
12368 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12369 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12370 * config.in: Regenerate.
12371 * configure: Likewise.
12372
12373 2012-03-29 Pedro Alves <palves@redhat.com>
12374
12375 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12376 Correct ptrace arguments.
12377
12378 2012-03-28 Pedro Alves <palves@redhat.com>
12379
12380 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12381 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12382 (IA64_FR1_REGNUM): New defines.
12383 (ia64_fetch_register): New.
12384 (the_low_target): Install it.
12385 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12386 field.
12387 * linux-low.c (linux_fetch_registers): Try the
12388 the_low_target.fetch_register hook first.
12389
12390 * linux-arm-low.c (the_low_target): Adjust.
12391 * linux-bfin-low.c (the_low_target): Adjust.
12392 * linux-cris-low.c (the_low_target): Adjust.
12393 * linux-crisv32-low.c (the_low_target): Adjust.
12394 * linux-m32r-low.c (the_low_target): Adjust.
12395 * linux-m68k-low.c (the_low_target): Adjust.
12396 * linux-mips-low.c (the_low_target): Adjust.
12397 * linux-ppc-low.c (the_low_target): Adjust.
12398 * linux-s390-low.c (the_low_target): Adjust.
12399 * linux-sh-low.c (the_low_target): Adjust.
12400 * linux-sparc-low.c (the_low_target): Adjust.
12401 * linux-tic6x-low.c (the_low_target): Adjust.
12402 * linux-x86-low.c (the_low_target): Adjust.
12403 * linux-xtensa-low.c (the_low_target): Adjust.
12404
12405 2012-03-26 Pedro Alves <palves@redhat.com>
12406
12407 * server.c (handle_qxfer_libraries): Don't bail early if
12408 the_target->qxfer_libraries_svr4 is not NULL.
12409
12410 2012-03-26 Pedro Alves <palves@redhat.com>
12411
12412 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12413
12414 2012-03-23 Pedro Alves <palves@redhat.com>
12415
12416 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12417 "library-list-svr4" element's start tag when the the DSO list is
12418 empty.
12419
12420 2012-03-23 Pedro Alves <palves@redhat.com>
12421
12422 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12423 a variable whose type size is the same as the inferior's pointer
12424 size.
12425
12426 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12427
12428 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12429 struct siginfo.
12430 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12431 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12432 * linux-low.h: Include <signal.h>.
12433 (struct siginfo): Remove forward declaration.
12434 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12435 struct siginfo.
12436
12437 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12438
12439 * .gitignore: Ignore more files.
12440
12441 2012-03-19 Pedro Alves <palves@redhat.com>
12442 Jan Kratochvil <jan.kratochvil@redhat.com>
12443
12444 * server.c (cont_thread, general_thread): Add describing comments.
12445 (start_inferior): Clear `cont_thread'.
12446 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12447 of a process.
12448
12449 2012-03-15 Yao Qi <yao@codesourcery.com>
12450
12451 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12452 handling to ...
12453 (cmd_qtdp): ... here.
12454
12455 2012-03-15 Yao Qi <yao@codesourcery.com>
12456
12457 * tracepoint.c (struct tracepoint_action_ops): New.
12458 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12459 (m_tracepoint_action_download): New.
12460 (r_tracepoint_action_download): New.
12461 (x_tracepoint_action_download): New.
12462 (l_tracepoint_action_download): New.
12463 (add_tracepoint_action): Install `action->ops' according type.
12464 (download_tracepoint_1): Move code `download' function pointer
12465 of various tracepoint_action_ops.
12466
12467 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12468
12469 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12470 linux_ptrace_attach_warnings.
12471
12472 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12473
12474 * Makefile.in (linux-ptrace.o): New.
12475 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12476 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12477 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12478 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12479 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12480 of these targets.
12481 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12482
12483 2012-03-08 Yao Qi <yao@codesourcery.com>
12484 Pedro Alves <palves@redhat.com>
12485
12486 Fix PR server/13392.
12487 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12488 offset of JMP insn.
12489 * tracepoint.c (remove_tracepoint): New.
12490 (cmd_qtdp): Call remove_tracepoint when failed to install.
12491
12492 2012-03-07 Pedro Alves <palves@redhat.com>
12493
12494 * linux-low.c (get_detach_signal): New.
12495 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12496 Pass on pending signals to PTRACE_DETACH. Check the result of the
12497 ptrace call.
12498 * server.c (program_signals, program_signals_p): New.
12499 (handle_general_set): Handle QProgramSignals.
12500 * server.h (program_signals, program_signals_p): Declare.
12501
12502 2012-03-05 Pedro Alves <palves@redhat.com>
12503 Jan Kratochvil <jan.kratochvil@redhat.com>
12504
12505 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12506 New comment why.
12507
12508 2012-03-03 Yao Qi <yao@codesourcery.com>
12509
12510 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12511 agent_look_up_symbols.
12512
12513 2012-03-03 Yao Qi <yao@codesourcery.com>
12514
12515 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12516 (linux-x86-low.o): Likewise.
12517 * server.h: Remove in_process_agent_loaded.
12518 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12519 common/agent.c.
12520 Update callers.
12521
12522 2012-03-03 Yao Qi <yao@codesourcery.com>
12523
12524 * tracepoint.c (gdb_agent_capability): New global.
12525 (in_process_agent_loaded_ust): Renamed to
12526 `in_process_agent_supports_ust'.
12527 Update callers.
12528 (in_process_agent_supports_ust): Call agent_capability_check.
12529 (clear_installed_tracepoints): Assert that agent supports
12530 agent.
12531
12532 2012-03-03 Yao Qi <yao@codesourcery.com>
12533
12534 * linux-low.c (linux_supports_agent): New.
12535 (linux_target_ops): Initialize field `supports_agent' with
12536 linux_supports_agent.
12537 * target.h (struct target_ops) <supports_agent>: New.
12538 (target_supports_agent): New macro.
12539 * server.c (handle_general_set): Handle packet 'QAgent'.
12540 (handle_query): Send `QAgent+'.
12541 * Makefile.in (server.o): Depends on agent.h.
12542
12543 2012-03-03 Yao Qi <yao@codesourcery.com>
12544
12545 * Makefile.in (OBS): Add agent.o.
12546 Add new rule for agent.o.
12547 Track dependence of tracepoint.c on agent.h.
12548 * tracepoint.c (run_inferior_command_1):
12549 (run_inferior_command): Call agent_run_command.
12550 (gdb_ust_connect_sync_socket): Deleted. Move it to
12551 common/agent.c.
12552 (resume_thread, stop_thread): Likewise.
12553 (gdb_ust_socket_init): Renamed to ...
12554 (gdb_agent_socket_init): ... New.
12555 (gdb_ust_thread): Renamed to ...
12556 (gdb_agent_helper_thread): ... New.
12557 (gdb_ust_init): Move some code to ...
12558 (gdb_agent_init): ... here. New.
12559 [HAVE_UST]: Call gdb_ust_init.
12560 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12561 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12562 * config.in, configure: Regenerated.
12563
12564 2012-03-02 Pedro Alves <palves@redhat.com>
12565
12566 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12567 * linux-low.c (struct simple_pid_list): New.
12568 (stopped_pids): New a struct simple_pid_list pointer.
12569 (add_to_pid_list, pull_pid_from_list): New.
12570 (handle_extended_wait): Don't assume the first signal new children
12571 report is SIGSTOP. Adjust call to pull_pid_from_list.
12572 (linux_wait_for_lwp): Adjust.
12573
12574 2012-03-02 Yao Qi <yao@codesourcery.com>
12575
12576 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12577 debug log.
12578
12579 2012-03-02 Yao Qi <yao@codesourcery.com>
12580
12581 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12582 `stop_pc' and `tpoint'. Update caller.
12583
12584 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12585
12586 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12587 * linux-low.c (use_linux_regsets): New macro.
12588 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12589 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12590 (linux_register_in_regsets): New function.
12591 (usr_fetch_inferior_registers): Skip registers covered by
12592 regsets.
12593 (usr_store_inferior_registers): Likewise.
12594 (usr_fetch_inferior_registers): New macro.
12595 (usr_store_inferior_registers): Likewise.
12596 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12597 (linux_store_registers): Likewise.
12598 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12599 prototype.
12600 (init_registers_mips64_dsp_linux): Likewise.
12601 (init_registers_mips_linux): New macro.
12602 (init_registers_mips_dsp_linux): Likewise.
12603 (mips_dsp_num_regs): Likewise.
12604 (DSP_BASE, DSP_CONTROL): New fallback macros.
12605 (mips_base_regs): New macro.
12606 (mips_regmap): Use it. Fix the size.
12607 (mips_dsp_regmap): New variable.
12608 (mips_dsp_regset_bitmap): Likewise.
12609 (mips_arch_setup): New function.
12610 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12611 than mips_regmap.
12612 (mips_cannot_store_register): Likewise.
12613 (the_low_target): Update .arch_setup, .num_regs and .regmap
12614 initializers. Add .regset_bitmap initializer.
12615 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12616 initializer.
12617 * linux-bfin-low.c (the_low_target): Likewise.
12618 * linux-cris-low.c (the_low_target): Likewise.
12619 * linux-crisv32-low.c (the_low_target): Likewise.
12620 * linux-ia64-low.c (the_low_target): Likewise.
12621 * linux-m32r-low.c (the_low_target): Likewise.
12622 * linux-m68k-low.c (the_low_target): Likewise.
12623 * linux-ppc-low.c (the_low_target): Likewise.
12624 * linux-s390-low.c (the_low_target): Likewise.
12625 * linux-sh-low.c (the_low_target): Likewise.
12626 * linux-sparc-low.c (the_low_target): Likewise.
12627 * linux-tic6x-low.c (the_low_target): Likewise.
12628 * linux-x86-low.c (the_low_target): Likewise.
12629 * linux-xtensa-low.c (the_low_target): Likewise.
12630 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12631 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12632 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12633 srv_xmlfiles.
12634 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12635 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12636
12637 2012-02-29 Yao Qi <yao@codesourcery.com>
12638 Pedro Alves <palves@redhat.com>
12639
12640 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12641 `step_over_finished' is true.
12642
12643 2012-02-27 Pedro Alves <palves@redhat.com>
12644
12645 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12646 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12647
12648 2012-02-27 Pedro Alves <palves@redhat.com>
12649
12650 PR server/9684
12651 * linux-low.c (pid_is_stopped): New.
12652 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12653
12654 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12655
12656 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12657 of conditions.
12658
12659 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12660
12661 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12662
12663 2012-02-24 Luis Machado <lgustavo@codesourcery>
12664
12665 * server.c (handle_query): Advertise support for target-side
12666 breakpoint condition evaluation.
12667 (process_point_options): New function.
12668 (process_serial_event): When inserting a breakpoint, check for
12669 a target-side condition that should be evaluated.
12670
12671 * mem-break.c: Include regcache.h and ax.h.
12672 (point_cond_list_t): New data structure.
12673 (breakpoint) <cond_list>: New field.
12674 (find_gdb_breakpoint_at): Make non-static.
12675 (delete_gdb_breakpoint_at): Clear any target-side
12676 conditions.
12677 (clear_gdb_breakpoint_conditions): New function.
12678 (add_condition_to_breakpoint): Likewise.
12679 (add_breakpoint_condition): Likewise.
12680 (gdb_condition_true_at_breakpoint): Likewise.
12681 (gdb_breakpoint_here): Return result directly instead
12682 of going through a local variable.
12683
12684 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12685 (clear_gdb_breakpoint_conditions): Likewise.
12686 (add_breakpoint_condition): Likewise.
12687 (gdb_condition_true_at_breakpoint): Likewise.
12688
12689 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12690 (need_step_over_p): Take target-side breakpoint condition into
12691 consideration.
12692
12693 2012-02-24 Luis Machado <lgustavo@codesourcery>
12694
12695 * server.h: Include tracepoint.h.
12696 (agent_mem_read, agent_get_trace_state_variable_value,
12697 agent_set_trace_state_variable_value,
12698 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12699 get_set_tsv_func_addr): New prototypes.
12700
12701 * ax.h: New include file.
12702 * ax.c: New source file.
12703
12704 * tracepoint.c: Include ax.h.
12705 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12706 agent_expr, eval_result_type): Move to ax.h.
12707 (parse_agent_expr): Rename to ...
12708 (gdb_parse_agent_expr): ... this, make it non-static and move
12709 to ax.h.
12710 (unparse_agent_expr) Rename to ...
12711 (gdb_unparse_agent_expr): ... this, make it non-static and move
12712 to ax.h.
12713 (eval_agent_expr): Rename to ...
12714 (eval_tracepoint_agent_expr): ... this.
12715 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12716 forward declarations.
12717 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12718 (agent_get_trace_state_variable_value): New function.
12719 (agent_set_trace_state_variable_value): New function.
12720 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12721 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12722 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12723 (condition_true_at_tracepoint): Likewise.
12724 (parse_agent_expr): Rename to ...
12725 (gdb_parse_agent_expr): ... this and move to ax.c.
12726 (unparse_agent_expr): Rename to ...
12727 (gdb_unparse_agent_expr): ... this and move to ax.c.
12728 (gdb_agent_op_name): Move to ax.c.
12729 (eval_agent_expr): Rename to ...
12730 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12731 and move to ax.c.
12732 (eval_tracepoint_agent_expr): New function.
12733 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12734 non-static.
12735 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12736 ax.c.
12737 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12738 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12739 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12740 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12741 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12742 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12743 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12744 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12745 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12746 (compile_bytecodes): Remove forward declaration.
12747 (is_goto_target): Move to ax.c.
12748 (compile_bytecodes): Move to ax.c and call
12749 agent_get_trace_state_variable_value (...) and
12750 agent_set_trace_state_variable_value (...).
12751
12752 * Makefile.in: Update ax.c and IPA dependencies.
12753
12754 2012-02-24 Pedro Alves <palves@redhat.com>
12755
12756 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12757 (cmd_bigqtbuffer_circular): ... this. Only handle
12758 'QTBuffer:circular:'.
12759 (handle_tracepoint_general_set): Adjust.
12760
12761 2012-02-16 Yao Qi <yao@codesourcery.com>
12762
12763 * inferiors.c: Move code to ...
12764 * dll.c: .... here. New.
12765 * server.h: Declare clear_dlls.
12766 * Makefile.in (SFILES): Add dll.c.
12767 (OBS): Add dll.o
12768 (dll.o): New rule.
12769
12770 2012-02-11 Yao Qi <yao@codesourcery.com>
12771
12772 * server.c: (handle_monitor_command): Add a new parameter
12773 `own_buf'.
12774 (handle_query): Update caller.
12775
12776 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12777
12778 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12779 * configure, config.in: Regenerate.
12780 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12781 is not defined.
12782
12783 2012-02-02 Pedro Alves <palves@redhat.com>
12784
12785 Try SIGKILL first, then PTRACE_KILL.
12786 * linux-low.c (linux_kill_one_lwp): New.
12787 (linux_kill_one_lwp): Rename to ...
12788 (kill_one_lwp_callback): ... this. Use the new
12789 linux_kill_one_lwp.
12790
12791 2012-02-02 Pedro Alves <palves@redhat.com>
12792
12793 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12794 inferior.
12795
12796 2012-01-27 Pedro Alves <palves@redhat.com>
12797
12798 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12799 (elf_64_file_p): Make static.
12800 (linux_pid_exe_is_elf_64_file): New.
12801 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12802 Delete declarations.
12803 (linux_pid_exe_is_elf_64_file): Declare.
12804 * linux-x86-low.c (x86_arch_setup): Use
12805 linux_pid_exe_is_elf_64_file.
12806
12807 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12808
12809 * linux-low.c (linux_wait_for_event_1): Rename to ...
12810 (linux_wait_for_event): ... here and merge it with former
12811 linux_wait_for_event - new variable wait_ptid, use it.
12812 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12813
12814 2012-01-23 Pedro Alves <palves@redhat.com>
12815
12816 * server.c (main): Avoid yet another case of infinite loop while
12817 detaching/killing after a longjmp.
12818
12819 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12820
12821 Code cleanup.
12822 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12823
12824 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12825
12826 * hostio.c (handle_readlink): New function.
12827 (handle_vFile): Call it to handle "vFile:readlink" packets.
12828
12829 2012-01-20 Pedro Alves <palves@redhat.com>
12830 Ulrich Weigand <ulrich.weigand@linaro.org>
12831
12832 * server.c (handle_v_requests): Only support vAttach and vRun to
12833 start multiple processes when in extended protocol mode.
12834
12835 2012-01-17 Pedro Alves <palves@redhat.com>
12836
12837 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12838 memalign plus mprotect to allocate the scratch buffer.
12839
12840 2012-01-13 Pedro Alves <palves@redhat.com>
12841
12842 * server.c (attach_inferior): Clear `cont_thread'.
12843
12844 2012-01-13 Pedro Alves <palves@redhat.com>
12845
12846 * server.c (main): Avoid infinite loop while detaching/killing
12847 after a longjmp.
12848
12849 2012-01-09 Doug Evans <dje@google.com>
12850
12851 * server.c (start_inferior): Set last_ptid in --wrapper case.
12852
12853 2012-01-06 Yao Qi <yao@codesourcery.com>
12854
12855 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12856 defined.
12857 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12858
12859 2012-01-04 Yao Qi <yao@codesourcery.com>
12860
12861 * tracepoint.c (cmd_qtdp): Print debug message
12862 for static tracepoint.
12863
12864 2012-01-04 Yao Qi <yao@codesourcery.com>
12865
12866 * tracepoint.c (trace_vdebug): Differentiate debug message
12867 between gdbserver and IPA.
12868
12869 2012-01-03 Yao Qi <yao@codesourcery.com>
12870
12871 * tracepoint.c (tracepoint_was_hit): Don't collect for
12872 static tracepoint.
12873
12874 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12875
12876 * terminal.h: Reformat copyright header.
12877
12878 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12879
12880 * server.c (gdbserver_version): Update copyright year.
12881 * gdbreplay.c (gdbreplay_version): Likewise.
12882
12883 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12884
12885 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12886
12887 Revert:
12888 2011-12-18 Hui Zhu <teawater@gmail.com>
12889 * linux-low.c (linux_create_inferior): Save return value to ret.
12890
12891 2011-12-18 Hui Zhu <teawater@gmail.com>
12892
12893 * linux-low.c (linux_create_inferior): Save return value to ret.
12894
12895 2011-12-16 Doug Evans <dje@google.com>
12896
12897 * linux-low.c (linux_create_inferior): If stdio connection,
12898 redirect stdin from /dev/null, stdout to stderr.
12899 * remote-utils.c (remote_is_stdio): New static global.
12900 (remote_connection_is_stdio): New function.
12901 (remote_prepare): Handle stdio connection.
12902 (remote_open): Ditto.
12903 (remote_close): Don't close stdin for stdio connections.
12904 (read_prim,write_prim): New functions. Replace all calls to
12905 read/write to these.
12906 * server.c (main): Watch for "-" argument. Move call to
12907 remote_prepare before start_inferior.
12908 * server.h (STDIO_CONNECTION_NAME): New macro.
12909 (remote_connection_is_stdio): Declare.
12910
12911 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12912 in debugging output.
12913
12914 2011-12-15 Yao Qi <yao@codesourcery.com>
12915
12916 * tracepoint.c: Include sys/syscall.h.
12917 (gdb_ust_thread): Remove preprocessor conditional.
12918
12919 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12920
12921 * linux-low.c (linux_detach_one_lwp): Call
12922 the_low_target.prepare_to_resume before detaching.
12923
12924 2011-12-14 Yao Qi <yao@codesourcery.com>
12925
12926 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12927 of write.
12928
12929 2011-12-14 Yao Qi <yao@codesourcery.com>
12930
12931 * i386-low.c (i386_low_stopped_data_address): Initialize local
12932 variable `control'.
12933
12934 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12935
12936 PR remote/13492
12937
12938 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12939 DR_CONTROL unless necessary. Extend comments.
12940 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12941 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12942
12943 2011-12-13 Yao Qi <yao@codesourcery.com>
12944
12945 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12946 macros.
12947 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12948
12949 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12950
12951 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12952 Print new debug message for such case.
12953
12954 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12955
12956 Fix overlapping memcpy.
12957 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12958 the read_inferior_memory transfer.
12959 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12960 write_inferior_memory transfer.
12961 (set_fast_tracepoint_jump): New variable buf. Use it for the
12962 read_inferior_memory and write_inferior_memory transfers.
12963 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12964 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12965 Use it for the write_inferior_memory transfer.
12966 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12967 buffers.
12968
12969 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12970
12971 * linux-low.c (fetch_register, store_register): Make code
12972 consistent, fix formatting.
12973
12974 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12975
12976 * linux-low.c (usr_store_inferior_registers): Factor out code
12977 to handle individual registers into...
12978 (store_register): ... this new function.
12979
12980 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
12981
12982 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
12983 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
12984 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
12985 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
12986 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
12987 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
12988 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
12989 (srv_xmlfiles): Add new XML files.
12990
12991 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
12992 and <sys/uio.h>.
12993 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
12994 (init_registers_s390_linux32v1): Add prototype.
12995 (init_registers_s390_linux32v2): Likewise.
12996 (init_registers_s390_linux64v1): Likewise.
12997 (init_registers_s390_linux64v2): Likewise.
12998 (init_registers_s390x_linux64v1): Likewise.
12999 (init_registers_s390x_linux64v2): Likewise.
13000 (s390_num_regs): Increment to 52.
13001 (s390_regmap): Add orig_r2 register.
13002 (s390_num_regs_3264): Increment to 68.
13003 (s390_regmap_3264): Add orig_r2 register.
13004 (s390_collect_ptrace_register): Handle orig_r2 register.
13005 (s390_supply_ptrace_register): Likewise.
13006 (s390_fill_last_break): New function.
13007 (s390_store_last_break): Likewise.
13008 (s390_fill_system_call): New function.
13009 (s390_store_system_call): Likewise.
13010 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13011 register sets.
13012 (s390_check_regset): New function.
13013 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13014 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13015 Update target_regsets for available register sets.
13016
13017 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13018 Jan Kratochvil <jan.kratochvil@redhat.com>
13019
13020 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13021 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13022 New.
13023 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13024 * linux-low.h (struct process_info_private): New member r_debug.
13025 * server.c (handle_qxfer_libraries): Call
13026 the_target->qxfer_libraries_svr4.
13027 (handle_qxfer_libraries_svr4): New function.
13028 (qxfer_packets): New entry "libraries-svr4".
13029 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13030 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13031 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13032 PACKET_qXfer_libraries_svr4.
13033
13034 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13035
13036 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13037 PSW address/mask between 8-byte and 16-byte formats.
13038 (s390_supply_ptrace_register): Likewise.
13039 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13040 basic addressing mode bit.
13041
13042 2011-11-24 Stan Shebs <stan@codesourcery.com>
13043
13044 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13045
13046 2011-11-17 Stan Shebs <stan@codesourcery.com>
13047
13048 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13049 (tracing_start_time): New global.
13050 (tracing_stop_time): New global.
13051 (tracing_user_name): New global.
13052 (tracing_notes): New global.
13053 (tracing_stop_note): New global.
13054 (cmd_qtstart): Set traceframe_usage, start_time.
13055 (stop_tracing): Set stop_time.
13056 (cmd_qtstatus): Report additional status.
13057 (cmd_qtp): New function.
13058 (handle_tracepoint_query): Call it.
13059 (cmd_qtnotes): New function.
13060 (handle_tracepoint_general_set): Call it.
13061 (get_timestamp): Rename from tsv_get_timestamp.
13062
13063 2011-11-14 Stan Shebs <stan@codesourcery.com>
13064 Kwok Cheung Yeung <kcy@codesourcery.com>
13065
13066 * linux-x86-low.c (small_jump_insn): New.
13067 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13068 trampoline and error message, build a trampoline and issue a small
13069 jump instruction to it.
13070 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13071 trampoline and error message.
13072 (x86_get_min_fast_tracepoint_insn_len): New.
13073 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13074 * linux-low.h (struct linux_target_ops): Add arguments to
13075 install_fast_tracepoint_jump_pad operation, add new operation.
13076 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13077 arguments.
13078 (linux_get_min_fast_tracepoint_insn_len): New function.
13079 (linux_target_op): Add new operation.
13080 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13081 (gdb_trampoline_buffer_end): Ditto.
13082 (gdb_trampoline_buffer_error): Ditto.
13083 (struct ipa_sym_addresses): Add fields for new IPA variables.
13084 (symbol_list): Add entries for new IPA variables.
13085 (struct tracepoint): Add fields to hold the address range of the
13086 trampoline used by the tracepoint.
13087 (trampoline_buffer_head): New static variable.
13088 (trampoline_buffer_tail): Ditto.
13089 (claim_trampoline_space): New function.
13090 (have_fast_tracepoint_trampoline_buffer): New function.
13091 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13092 structure.
13093 (install_fast_tracepoint): Ditto, also add error buffer argument.
13094 (cmd_qtminftpilen): New function.
13095 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13096 (fast_tracepoint_from_trampoline_address): New function.
13097 (fast_tracepoint_collecting): Handle trampoline as part of jump
13098 pad space.
13099 (set_trampoline_buffer_space): New function.
13100 (initialize_tracepoint): Initialize new IPA variables.
13101 * target.h (struct target_ops): Add arguments to
13102 install_fast_tracepoint_jump_pad operation, add new
13103 get_min_fast_tracepoint_insn_len operation.
13104 (target_get_min_fast_tracepoint_insn_len): New.
13105 (install_fast_tracepoint_jump_pad): Add arguments.
13106 * server.h (IPA_BUFSIZ): Define.
13107 * linux-i386-ipa.c: Include extra header files.
13108 (initialize_fast_tracepoint_trampoline_buffer): New function.
13109 (initialize_low_tracepoint): Call it.
13110 * server.h (set_trampoline_buffer_space): Declare.
13111 (claim_trampoline_space): Ditto.
13112 (have_fast_tracepoint_trampoline_buffer): Ditto.
13113
13114 2011-11-14 Yao Qi <yao@codesourcery.com>
13115
13116 * server.c (handle_query): Handle InstallInTrace for qSupported.
13117 * tracepoint.c (add_tracepoint): Sort list.
13118 (install_tracepoint, download_tracepoint): New.
13119 (cmd_qtdp): Call them to install and download tracepoints.
13120 (sort_tracepoints): Removed.
13121 (cmd_qtstart): Update.
13122
13123 2011-11-14 Yao Qi <yao@codesourcery.com>
13124
13125 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13126 * mem-break.h: Declare.
13127 * tracepoint.c (cmd_qtstart): Move some code to ...
13128 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13129 New.
13130 (download_tracepoints): Move some code to ...
13131 (download_tracepoint_1): ... here. New.
13132
13133 2011-11-08 Yao Qi <yao@codesourcery.com>
13134
13135 * remote-utils.c (relocate_instruction): A comment fix.
13136
13137 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13138
13139 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13140 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13141 dr_status_mirror and dr_control_mirror from debug_reg_state.
13142 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13143 (i386_initial_stuff): Remove use of deleted globals.
13144 (i386_get_thread_context, i386_set_thread_context,
13145 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13146 from debug_reg_state.
13147
13148 2011-11-05 Yao Qi <yao@codesourcery.com>
13149
13150 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13151 address as TPOINT's.
13152
13153 2011-11-02 Stan Shebs <stan@codesourcery.com>
13154
13155 * tracepoint.c (agent_mem_read_string): New function.
13156 (eval_agent_expr): Call it for tracenz.
13157 * server.c (handle_query): Report support for tracenz.
13158
13159 2011-11-02 Yao Qi <yao@codesourcery.com>
13160
13161 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13162
13163 2011-11-02 Yao Qi <yao@codesourcery.com>
13164
13165 * target.h: Fix a typo in comment.
13166
13167 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13168
13169 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13170 clobber the breakpoints' shadows with fast tracepoint jumps.
13171 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13172 * target.c (write_inferior_memory): Also pass MYADDR down to
13173 check_mem_write.
13174
13175 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13176
13177 * configure.ac: Check support for personality routine.
13178 * configure: Regenerate.
13179 * config.in: Likewise.
13180 * linux-low.c: Include <sys/personality.h>.
13181 Define ADDR_NO_RANDOMIZE if necessary.
13182 (linux_create_inferior): Disable address space randomization when
13183 forking inferior, if requested.
13184 (linux_supports_disable_randomization): New function.
13185 (linux_target_ops): Install it.
13186 * server.h (disable_randomization): Declare.
13187 * server.c (disable_randomization): New global variable.
13188 (handle_general_set): Handle QDisableRandomization.
13189 (handle_query): Likewise for qSupported.
13190 (main): Support --disable-randomization and --no-disable-randomization
13191 command line arguments.
13192 * target.h (struct target_ops): Add supports_disable_randomization.
13193 (target_supports_disable_randomization): New macro.
13194
13195 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13196
13197 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13198 ifdef check.
13199 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13200 [!PT_GETDSBT] (target_loadmap): New definition.
13201 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13202 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13203 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13204 and PT_GETDSBT to LINUX_LOADMAP.
13205 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13206 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13207
13208 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13209
13210 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13211 (arm_linux_hwbp_cap): New static variable.
13212 (arm_linux_get_hwbp_cap): Replace by ...
13213 (arm_linux_init_hwbp_cap): ... this new function.
13214 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13215 (arm_linux_get_hw_watchpoint_count): Likewise.
13216 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13217 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13218 (arm_prepare_to_resume): Use perror_with_name instead of error.
13219
13220 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13221
13222 * linux-arm-low.c: Include <signal.h>.
13223 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13224 (struct arm_linux_hwbp_cap): New data type.
13225 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13226 (struct arm_linux_hw_breakpoint): New data type.
13227 (MAX_BPTS, MAX_WPTS): Define.
13228 (struct arch_process_info, struct arch_lwp_info): New data types.
13229 (arm_linux_get_hwbp_cap): New function.
13230 (arm_linux_get_hw_breakpoint_count): Likewise.
13231 (arm_linux_get_hw_watchpoint_count): Likewise.
13232 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13233 (arm_hwbp_control_initialize): Likewise.
13234 (arm_hwbp_control_is_enabled): Likewise.
13235 (arm_hwbp_control_is_initialized): Likewise.
13236 (arm_hwbp_control_disable): Likewise.
13237 (arm_linux_hw_breakpoint_equal): Likewise.
13238 (arm_linux_hw_point_initialize): Likewise.
13239 (struct update_registers_data): New data structure.
13240 (update_registers_callback: New function.
13241 (arm_insert_point): Likewise.
13242 (arm_remove_point): Likewise.
13243 (arm_stopped_by_watchpoint): Likewise.
13244 (arm_stopped_data_address): Likewise.
13245 (arm_new_process): Likewise.
13246 (arm_new_thread): Likewise.
13247 (arm_prepare_to_resume): Likewise.
13248 (the_low_target): Register arm_insert_point, arm_remove_point,
13249 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13250 arm_new_thread, and arm_prepare_to_resume.
13251
13252 2011-09-15 Stan Shebs <stan@codesourcery.com>
13253
13254 * server.h (struct emit_ops): Add compare-goto fields.
13255 * tracepoint.c (gdb_agent_op_sizes): New table.
13256 (emit_eq_goto): New function.
13257 (emit_ne_goto): New function.
13258 (emit_lt_goto): New function.
13259 (emit_le_goto): New function.
13260 (emit_gt_goto): New function.
13261 (emit_ge_goto): New function.
13262 (is_goto_target): New function.
13263 (compile_bytecodes): Recognize special cases of compare-goto
13264 combinations and call specialized emitters for them.
13265 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13266 (amd64_emit_ne_goto): New function.
13267 (amd64_emit_lt_goto): New function.
13268 (amd64_emit_le_goto): New function.
13269 (amd64_emit_gt_goto): New function.
13270 (amd64_emit_ge_goto): New function.
13271 (amd64_emit_ops): Add the new functions.
13272 (i386_emit_eq_goto): New function.
13273 (i386_emit_ne_goto): New function.
13274 (i386_emit_lt_goto): New function.
13275 (i386_emit_le_goto): New function.
13276 (i386_emit_gt_goto): New function.
13277 (i386_emit_ge_goto): New function.
13278 (i386_emit_ops): Add the new functions.
13279
13280 2011-09-08 Stan Shebs <stan@codesourcery.com>
13281
13282 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13283 (i386_emit_epilogue): Restore %ebx.
13284
13285 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13286
13287 * server.c (step_thread): Remove definition.
13288 (process_serial_event): Don't handle Hs.
13289 * server.h (step_thread): Remove declaration.
13290 * target.c (set_desired_inferior): Remove use of step_thread.
13291
13292 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13293
13294 * linux-low.c: Include linux-procfs.h.
13295 (linux_attach_lwp_1): Update comments.
13296 (linux_attach): Scan for existing threads when attaching to a
13297 process that is the tgid.
13298 * Makefile.in: Update dependencies.
13299
13300 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13301
13302 * configure.srv: Add linux-procfs.o dependencies.
13303
13304 2011-08-14 Yao Qi <yao@codesourcery.com>
13305
13306 * target.h (struct target_ops): Fix indent.
13307 * win32-low.c (win32_target_ops): Fix comment.
13308
13309 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13310 Yao Qi <yao@codesourcery.com>
13311
13312 * Makefile.in (clean): Remove tic6x-*.c files.
13313 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13314 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13315 (tic6x-c64xp-linux.c): Likewise.
13316 * configure.srv: Add support for tic6x-*-uclinux.
13317 * linux-tic6x-low.c: New.
13318 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13319
13320 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13321 Yao Qi <yao@codesourcery.com>
13322
13323 * target.h (struct target_ops): Add read_loadmap.
13324 * linux-low.c (struct target_loadseg): New type.
13325 (struct target_loadmap): New type.
13326 (linux_read_loadmap): New function.
13327 (linux_target_ops): Add linux_read_loadmap.
13328 * server.c (handle_query): Support qXfer:fdpic:read packet.
13329 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13330 to NULL.
13331
13332 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13333
13334 * win32-low.c: Include <stdint.h>.
13335
13336 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13337
13338 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13339 to the inferior here.
13340 (i386_remove_aligned_watchpoint): Ditto.
13341 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13342 fit part of the watchpoint in the debug registers.
13343 (i386_update_inferior_debug_regs): New.
13344 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13345 registers, and only update the inferior on success.
13346 (i386_low_remove_watchpoint): Ditto.
13347
13348 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13349
13350 * linux-low.c (compare_ints, unique, list_threads, show_process,
13351 linux_core_of_thread): Delete.
13352 (linux_target_ops): Change linux_core_of_thread to
13353 linux_common_core_of_thread.
13354 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13355 * utils.c (malloc_failure): Change type of argument.
13356 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13357 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13358 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13359 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13360 (IPA_OBJS): Add common-utils-ipa.o.
13361 (ptid_h, linux_osdata_h): New macros.
13362 (server_h): Add common/common-utils.h, common/xml-utils.h,
13363 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13364 common/ptid.h.
13365 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13366 ptid.o, buffer.o): New rules.
13367 (linux-low.o): Add common/linux-osdata.h as a dependency.
13368 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13369 * configure.ac: Add AC_HEADER_DIRENT check.
13370 * config.in: Regenerate.
13371 * configure: Regenerate.
13372 * remote-utils.c (xml_escape_text): Delete.
13373 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13374 buffer_xml_printf): Move to common/buffer.c.
13375 * server.c (main): Remove call to initialize_inferiors.
13376 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13377 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13378 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13379 internal_error, gdb_assert, gdb_assert_fail): Delete.
13380 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13381 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13382 common/buffer.h.
13383 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13384 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13385 initialize_inferiors): Delete.
13386
13387 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13388
13389 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13390 symbol error.
13391
13392 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13393
13394 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13395 assertion.
13396 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13397
13398 2011-05-26 Yao Qi <yao@codesourcery.com>
13399
13400 * Makefile.in (thread-db.o): Track dependence to
13401 common/gdb_thread_db.h.
13402 * thread-db.c: include gdb_thread_db.h from right place.
13403
13404 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13405
13406 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13407 __FILE__ and __LINE__ to internal_error.
13408
13409 2011-05-13 Doug Evans <dje@google.com>
13410
13411 * thread-db.c (try_thread_db_load_from_sdir): New function.
13412 (try_thread_db_load_from_dir): New function.
13413 (thread_db_load_search): Handle $sdir, ignore $pdir.
13414 Remove trying of system directories if search of
13415 libthread-db-search-path fails, that is now done via $sdir.
13416
13417 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13418
13419 * server.c (handle_query): Add EnableDisableTracepoints to the list
13420 of supported features.
13421 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13422 tracepoints.
13423 (cmd_qtenable_disable): New.
13424 (cmd_qtstart): Install tracepoints even if disabled.
13425 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13426 receiving a QTEnable or QTDisable packet.
13427 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13428 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13429 tracepoints.
13430 (gdb_probe): Skip data collection if static tracepoint is disabled.
13431
13432 2011-05-10 Doug Evans <dje@google.com>
13433
13434 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13435
13436 2011-05-04 Doug Evans <dje@google.com>
13437
13438 * linux-low.c (linux_join): Skip process lookup.
13439 * spu-low.c (spu_join): Ditto.
13440 * server.c (join_inferiors_callback): Delete.
13441 (process_serial_event): For 'D' packet (detach) call join_inferior
13442 directly.
13443
13444 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13445
13446 * README: Don't mention xscale*-*-linux*.
13447 * configure.srv (xscale*-*-linux*): Don't handle target.
13448
13449 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13450
13451 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13452 casting pointers.
13453 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13454 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13455 (i386_emit_void_call_2): Likewise.
13456
13457 2011-04-26 Yao Qi <yao@codesourcery.com>
13458
13459 * linux-low.c: Move common macros to linux-ptrace.h.
13460 Include linux-ptrace.h.
13461 * Makefile.in (linux_ptrace_h): New.
13462 (linux-low.o): Depends on linux-ptrace.h.
13463
13464 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13465
13466 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13467 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13468 (remote_prepare): New function with most of the TCP code from ...
13469 (remote_open): ... here. Detect PORT here unconditionally. Move also
13470 setting transport_is_reliable.
13471 * server.c (run_once): New variable.
13472 (gdbserver_usage): Document it.
13473 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13474 the first run if RUN_ONCE.
13475 * server.h (run_once, remote_prepare): New declarations.
13476
13477 2011-04-19 Tom Tromey <tromey@redhat.com>
13478
13479 * win32-low.c (handle_load_dll): Remove duplicate "the".
13480
13481 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13482
13483 Remove support for old Cygwin 1.5 versions.
13484 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13485 function to avoid warning.
13486 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13487 warning.
13488
13489 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13490
13491 * gdbserver/server.h (Macro _): Define it if not available.
13492
13493 2011-03-14 Michael Snyder <msnyder@vmware.com>
13494
13495 * hostio.c (handle_close): Remove unnecessary null test.
13496
13497 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13498
13499 * Makefile.in (maintainer-clean realclean distclean): Remove
13500 "make ... subdir_do" command.
13501
13502 2011-03-10 Michael Snyder <msnyder@vmware.com>
13503
13504 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13505
13506 * server.c (handle_v_run): Free alloced buffer on early return.
13507
13508 2011-03-09 Yao Qi <yao@codesourcery.com>
13509
13510 Revert:
13511 2011-03-04 Yao Qi <yao@codesourcery.com>
13512
13513 * Makefile.in: Remove GNU make feature --directory.
13514
13515 2011-03-05 Yao Qi <yao@codesourcery.com>
13516
13517 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13518 (subdir_do): New make target. Copied from gdb/Makefile.
13519 (maintainer-clean, realclean, distclean, clean): Call corresponding
13520 make targets in common/Makefile.
13521
13522 2011-02-11 Yao Qi <yao@codesourcery.com>
13523
13524 * configure.ac: Call AC_PROG_RANLIB.
13525 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13526 * configure: Regenerate.
13527
13528 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13529
13530 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13531
13532 2011-03-06 Yao Qi <yao@codesourcery.com>
13533
13534 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13535
13536 2011-03-05 Yao Qi <yao@codesourcery.com>
13537
13538 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13539 (subdir_do): New make target. Copied from gdb/Makefile.
13540 (maintainer-clean, realclean, distclean, clean): Call corresponding
13541 make targets in common/Makefile.
13542
13543 2011-03-04 Yao Qi <yao@codesourcery.com>
13544
13545 * Makefile.in: Remove GNU make feature --directory.
13546
13547 2011-03-04 Michael Snyder <msnyder@vmware.com>
13548
13549 * server.c (queue_stop_reply): Call xmalloc not malloc.
13550
13551 2011-03-02 Michael Snyder <msnyder@vmware.com>
13552
13553 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13554
13555 2011-02-28 Michael Snyder <msnyder@vmware.com>
13556
13557 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13558 (cmd_qtframe): Ditto.
13559 (cmd_qtbuffer): Ditto.
13560 (cmd_bigqtbuffer): Ditto.
13561
13562 * utils.c (decimal2str): Initialize 'width' to nine, then
13563 don't mess with it.
13564
13565 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13566
13567 * hostio.c (require_data): Free *data, not data.
13568
13569 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13570
13571 * hostio.c (require_data): Use free, not xfree.
13572
13573 2011-02-27 Michael Snyder <msnyder@vmware.com>
13574
13575 * server.c (handle_query): Discard unused value.
13576
13577 * hostio.c (require_data): Free malloc memory before returning
13578 error.
13579
13580 2011-02-26 Michael Snyder <msnyder@vmware.com>
13581
13582 * linux-low.c (list_threads): Call closedir for dirent.
13583
13584 2011-02-27 Michael Snyder <msnyder@vmware.com>
13585
13586 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13587 a case statement falls through.
13588
13589 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13590
13591 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13592 in comparison.
13593
13594 2011-02-26 Michael Snyder <msnyder@vmware.com>
13595
13596 * utils.c (decimal2str): Eliminate dead code and dead param.
13597 (pulongest): Drop dead param from call to decimal2str.
13598 (plongest): Ditto.
13599
13600 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13601
13602 Revert the following patch (not approved yet):
13603 2011-02-21 Hui Zhu <teawater@gmail.com>
13604 * tracepoint.c (tp_printf): New function.
13605 (eval_agent_expr): Handle gdb_agent_op_printf.
13606
13607 2011-02-21 Hui Zhu <teawater@gmail.com>
13608
13609 * tracepoint.c (tp_printf): New function.
13610 (eval_agent_expr): Handle gdb_agent_op_printf.
13611
13612 2011-02-18 Tom Tromey <tromey@redhat.com>
13613
13614 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13615 (tracepoint.o): Likewise.
13616 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13617 (gdb_agent_op_names): Likewise.
13618
13619 2011-02-18 Tom Tromey <tromey@redhat.com>
13620
13621 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13622 gdb_agent_op_rot>: New constants.
13623 (gdb_agent_op_names): Add pick and roll.
13624 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13625 cases.
13626
13627 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13628
13629 * aclocal.m4: Regenerated with aclocal-1.11.1.
13630
13631 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13632
13633 * server.c (handle_qxfer_traceframe_info): New.
13634 (qxfer_packets): Register "traceframe-info".
13635 (handle_query): Report support for qXfer:traceframe-info:read+.
13636 * tracepoint.c (match_blocktype): New.
13637 (traceframe_find_block_type): Rename to ...
13638 (traceframe_walk_blocks): ... this. Add callback filter argument,
13639 and use it.
13640 (traceframe_find_block_type): New, reimplemented on top of
13641 traceframe_walk_blocks.
13642 (build_traceframe_info_xml): New.
13643 (traceframe_read_info): New.
13644 * server.h (traceframe_read_info): Declare.
13645
13646 2011-02-11 Yao Qi <yao@codesourcery.com>
13647
13648 * configure.ac: Call AC_PROG_RANLIB.
13649 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13650 * configure: Regenerate.
13651
13652 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13653
13654 * server.c (gdb_read_memory): Change return semantics to allow
13655 partial transfers.
13656 (handle_search_memory_1): Adjust.
13657 (process_serial_event) <'m' packet>: Handle partial transfers.
13658 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13659
13660 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13661
13662 * regcache.c (init_register_cache): Initialize
13663 regcache->register_status.
13664 (free_register_cache): Release regcache->register_status.
13665 (regcache_cpy): Copy register_status.
13666 (registers_to_string): Print 'x's for unavailable registers.
13667 (supply_register): Mark the register's status valid or
13668 unavailable, depending on whether a buffer was passed in or not.
13669 (supply_register_zeroed): New.
13670 (supply_regblock): Mark the registers' status valid or
13671 unavailable, depending on whether a buffer was passed in or not.
13672 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13673 (struct regcache): New `register_status' field.
13674 (supply_register_zeroed): Declare.
13675 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13676 supply_register_zeroed, rather than passing a NULL buffer to
13677 supply_register.
13678 * tracepoint.c (fetch_traceframe_registers): Update comment.
13679
13680 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13681
13682 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13683 buffer explicit.
13684
13685 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13686
13687 * server.h (decode_xfer_write): Change prototype.
13688 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13689 and don't extract the annex here.
13690 * server.c (decode_xfer_read): Remove `annex' parameter,
13691 and don't extract the annex here.
13692 (decode_xfer): New.
13693 (struct qxfer): New.
13694 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13695 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13696 (handle_qxfer_statictrace): New functions, abstracted out from
13697 handle_query, and made to use the struct qxfer interface.
13698 (handle_threads_qxfer_proper): Rename to ...
13699 (handle_qxfer_threads_proper): ... this.
13700 (handle_threads_qxfer): Rename to ...
13701 (handle_qxfer_threads): ... this. Adjust.
13702 (qxfer_packets): New array.
13703 (handle_qxfer): New function.
13704 (handle_query): Use handle_qxfer.
13705
13706 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13707
13708 * gdbreplay.c: Shorten lines of >= 80 columns.
13709 * linux-low.c: Ditto.
13710 * linux-ppc-low.c: Ditto.
13711 * linux-s390-low.c: Ditto.
13712 * linux-sparc-low.c: Ditto.
13713 * linux-x86-low.c: Ditto.
13714 * linux-xtensa-low.c: Ditto.
13715 * mem-break.c: Ditto.
13716 * nto-low.c: Ditto.
13717 * regcache.h: Ditto.
13718 * remote-utils.c: Ditto.
13719 * server.c: Ditto.
13720 * server.h: Ditto.
13721 * thread-db.c: Ditto.
13722 * tracepoint.c: Ditto.
13723 * utils.c: Ditto.
13724 * win32-low.h: Ditto.
13725
13726 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13727
13728 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13729 update.
13730
13731 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13732
13733 * server.c (gdbserver_version): Update copyright year in version
13734 output.
13735 * gdbreplay.c (gdbreplay_version): Ditto.
13736
13737 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13738
13739 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13740 * linux-bfin-low.c: New file.
13741 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13742 PT_DATA_ADDR for BFIN targets.
13743 * Makefile.in (SFILES): Add linux-bfin-low.c.
13744 (clean): Remove reg-bfin.c.
13745 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13746 * README: Mention supported Blackfin targets.
13747
13748 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13749
13750 * .gitignore: New file.
13751
13752 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13753
13754 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13755
13756 2010-10-22 Jie Zhang <jie@codesourcery.com>
13757
13758 * Makefile.in: Add FLAGS_TO_PASS variable.
13759 (install): Remove dependency of install-only and recursively
13760 invoke make for install-only.
13761
13762 2010-10-04 Doug Evans <dje@google.com>
13763
13764 * Makefile.in (uninstall): Use $(DESTDIR).
13765
13766 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13767
13768 PR gdb/11842
13769
13770 * linux-x86-low.c (compat_siginfo_from_siginfo)
13771 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13772 si_code is < 0. Check for si_code == SI_TIMER before checking for
13773 si_code < 0.
13774
13775 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13776
13777 * lynx-i386-low.c: New file.
13778 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13779
13780 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13781
13782 * lynx-low.c (ptrace_request_to_str): Remove handling for
13783 request values that have been removed in LynxOS 5.x.
13784
13785 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13786
13787 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13788 <ptrace.h>
13789
13790 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13791
13792 * configure.ac: Add --enable-inprocess-agent option.
13793 * configure: Rebuilt.
13794
13795 2010-09-06 Yao Qi <yao@codesourcery.com>
13796
13797 * linux-low.c (linux_kill): Remove unused variable.
13798 (linux_stabilize_threads): Likewise.
13799 * server.c (start_inferior): Likewise.
13800 (queue_stop_reply_callback): Likewise.
13801 * tracepoint.c (do_action_at_tracepoint): Likewise.
13802
13803 2010-09-06 Yao Qi <yao@codesourcery.com>
13804
13805 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13806 on return.
13807
13808 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13809
13810 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13811
13812 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13813
13814 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13815 "$(IPA_DEPFILES)".
13816
13817 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13818
13819 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13820 gdbserver/lynx-ppc-low.c: New files.
13821 * Makefile.in (lynx_low_h): New variable.
13822 (lynx-low.o, lynx-ppc-low.o): New rules.
13823 * configure.ac: On LynxOS, link with -lnetinet.
13824 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13825 * configure: regenerate.
13826
13827 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13828
13829 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13830 * configure.ac: Add check for vasprintf and vsnprintf.
13831 * configure, config.in: Regenerate.
13832 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13833
13834 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13835
13836 * gdbreplay.c: Move include of alloca.h up, next to include of
13837 malloc.h.
13838 * server.h: Add include of malloc.h.
13839 * mem-break.c: Remove include of malloc.h.
13840 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13841
13842 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13843
13844 * Makefile.in (memmem.o): Build with -Wno-error.
13845
13846 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13847
13848 * utils.c (xsnprintf): Make non-static.
13849 * server.h: Add xsnprintf declaration.
13850 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13851 replace calls to snprintf by calls to xsnprintf throughout.
13852
13853 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13854
13855 * configure.ac: Add configure check for alloca.
13856 * configure, config.in: Regenerate.
13857 * server.h: Include alloca.h if it exists.
13858 * gdbreplay.c: Include alloca.h if it exists.
13859
13860 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13861
13862 * linux-low.c (__SIGRTMIN): Define if not already defined.
13863 (linux_create_inferior): Check for __ANDROID__ rather than
13864 __SIGRTMIN.
13865 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13866 are already deferred.
13867 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13868 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13869 stopped and already has a pending signal to report.
13870 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13871 a pending signal to report or is moving out of a jump pad.
13872 (linux_init_signals): Check for __ANDROID__ rather than
13873 __SIGRTMIN.
13874
13875 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13876
13877 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13878 debug_threads check. Avoid a linear search when not doing debug
13879 output.
13880
13881 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13882
13883 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13884 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13885 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13886 (process_event): Change local fd's type to gdb_fildes_t.
13887 (create_file_handler): Adjust prototype.
13888 (delete_file_handler): Adjust prototype.
13889 (handle_file_event): Adjust prototype. Use pfildes.
13890 (create_file_event): Adjsut prototype.
13891 * remote-utils.c (remote_desc, listen_desc): Change type to
13892 gdb_fildes_t.
13893 * server.h: New gdb_fildes_t typedef.
13894 [USE_WIN32API]: Include winsock2.h.
13895 (delete_file_handler, add_file_handler): Adjust prototypes.
13896 (pfildes): Declare.
13897 * utils.c (pfildes): New.
13898
13899 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13900
13901 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13902 * configure: Regenerate.
13903
13904 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13905
13906 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13907 (linux_done_accessing_memory): ... this.
13908 (linux_target_ops): Adjust.
13909 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13910 * nto-low.c (nto_target_ops): Adjust comment.
13911 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13912 * spu-low.c (spu_target_ops): Adjust comment.
13913 * target.h (target_ops): Rename unprepare_to_access_memory field
13914 to done_accessing_memory.
13915 (unprepare_to_access_memory): Rename to ...
13916 (done_accessing_memory): ... this.
13917
13918 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13919
13920 * linux-low.c (linux_prepare_to_access_memory): New.
13921 (linux_unprepare_to_access_memory): New.
13922 (linux_target_ops): Install them.
13923 * server.c (read_memory): Rename to ...
13924 (gdb_read_memory): ... this. Use
13925 prepare_to_access_memory/prepare_to_access_memory.
13926 (write_memory): Rename to ...
13927 (gdb_write_memory): ... this. Use
13928 prepare_to_access_memory/prepare_to_access_memory.
13929 (handle_search_memory_1): Adjust.
13930 (process_serial_event): Adjust.
13931 * target.h (struct target_ops): New fields
13932 prepare_to_access_memory and unprepare_to_access_memory.
13933 (prepare_to_access_memory, unprepare_to_access_memory): New.
13934 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13935 prepare_to_access_memory/prepare_to_access_memory.
13936 * nto-low.c (nto_target_ops): Adjust.
13937 * spu-low.c (spu_target_ops): Adjust.
13938 * win32-low.c (win32_target_ops): Adjust.
13939
13940 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13941
13942 * Makefile.in (WARN_CFLAGS): Get it from configure.
13943 (WERROR_CFLAGS): New.
13944 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13945 * configure.ac: Introduce --enable-werror, which adds -Werror to
13946 the compiler command line. Enabled by default. Disable with
13947 --disable-werror. Add -Wdeclaration-after-statement
13948 Wpointer-arith and -Wformat-nonliteral to warning flags.
13949 * configure: Regenerate.
13950
13951 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13952
13953 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13954
13955 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13956
13957 * gdbreplay.c (remote_error): New.
13958 (gdbchar): New.
13959 (expect): Use gdbchar. Check for error reading from GDB.
13960 Clarify sync error output.
13961 (play): Check for errors writing to GDB.
13962 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13963 * remote-utils.c (getpkt): Check for errors writing to the remote
13964 descriptor.
13965
13966 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13967
13968 * linux-low.c (linux_wait_1): Move non-debugging code out of
13969 `debug_threads' control.
13970
13971 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13972
13973 * linux-low.c (linux_wait_1): Don't set last_status here.
13974 * server.c (push_event, queue_stop_reply_callback): Assert we're
13975 not pushing a TARGET_WAITKIND_IGNORE event.
13976 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13977 (myresume, handle_target_event): Set the thread's last_resume_kind
13978 and last_status from the target returned status.
13979
13980 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13981
13982 PR threads/10729
13983
13984 * linux-x86-low.c (update_debug_registers_callback): New.
13985 (i386_dr_low_set_addr): Use it.
13986 (i386_dr_low_get_addr): New.
13987 (i386_dr_low_set_control): Use update_debug_registers_callback.
13988 (i386_dr_low_get_control): New.
13989 (i386_dr_low_get_status): Adjust.
13990 * linux-low.c (linux_stop_lwp): New.
13991 * linux-low.h (linux_stop_lwp): Declare.
13992
13993 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
13994 argument instead of a i386_debug_reg_state.
13995 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
13996 a i386_debug_reg_state.
13997 (i386_insert_aligned_watchpoint): Adjust.
13998 (i386_remove_aligned_watchpoint): Adjust.
13999 (i386_low_stopped_data_address): Read the debug registers from the
14000 inferior instead of from the mirrors.
14001 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14002 (i386_dr_low_get_addr): Declare.
14003 (i386_dr_low_get_control): Declare.
14004 (i386_dr_low_get_status): Change prototype.
14005
14006 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14007 (i386_dr_low_get_addr): New.
14008 (i386_dr_low_get_control): New.
14009 (i386_dr_low_get_status): Adjust prototype. Return
14010 dr_status_mirror.
14011 (i386_initial_stuff): Clear dr_status_mirror and
14012 dr_control_mirror.
14013 (i386_get_thread_context): Adjust.
14014 (i386_set_thread_context): Adjust.
14015 (i386_thread_added): Adjust.
14016
14017 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14018
14019 * linux-low.h (linux_thread_area): Delete declaration.
14020
14021 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14022
14023 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14024 after its termination.
14025
14026 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14027
14028 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14029 (gdb_wants_all_stopped): Delete.
14030 (linux_wait_1): Don't call them.
14031 * server.c (handle_v_cont): Tag all threads as want-stopped.
14032 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14033 stopped as "client-wants-stopped".
14034
14035 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14036
14037 * Makefile.in (signals_h): New.
14038 (server_h): Depend on it.
14039 (server.o): Don't depend on $(signals_def).
14040 (signals.o): Depend on $(signals_def).
14041
14042 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14043
14044 * Makefile.in (signals_def): New.
14045 (server_h): Append include/gdb/signals.h and signals_def.
14046 (server.o): Append signals_def.
14047
14048 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14049
14050 * server.c (handle_target_event): Use target_signal_to_host for
14051 resume_info.sig initialization.
14052 * target.h (struct thread_resume) <sig>: New comment.
14053
14054 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14055
14056 * server.c (handle_query): strcpy() the returned string from paddress()
14057 instead of sprintf().
14058 * utils.c (paddress): Return phex_nz().
14059
14060 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14061
14062 * server.c (handle_v_cont): Call mourn_inferior if process
14063 just exited.
14064 (myresume): Likewise.
14065
14066 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14067
14068 Static tracepoints, and integration with UST.
14069
14070 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14071 * mem-break.c (uninsert_all_breakpoints)
14072 (reinsert_all_breakpoints): New.
14073 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14074 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14075 (gdb_agent_ust_loaded, helper_thread_id)
14076 (gdb_agent_helper_thread_id): New macros.
14077 (struct ipa_sym_addresses): Add addr_ust_loaded,
14078 addr_helper_thread_id, addr_cmd_buf.
14079 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14080 (in_process_agent_loaded_ust): New.
14081 (write_e_ust_not_loaded): New.
14082 (maybe_write_ipa_ust_not_loaded): New.
14083 (struct collect_static_trace_data_action): New.
14084 (enum tracepoint_type) <static_tracepoint>: New.
14085 (struct tracepoint) <handle>: Mention static tracepoints.
14086 (struct static_tracepoint_ctx): New.
14087 (CMD_BUF_SIZE): New.
14088 (add_tracepoint_action): Handle static tracepoint actions.
14089 (unprobe_marker_at): New.
14090 (clear_installed_tracepoints): Handle static tracepoints.
14091 (cmd_qtdp): Handle static tracepoints.
14092 (probe_marker_at): New.
14093 (cmd_qtstart): Handle static tracepoints.
14094 (response_tracepoint): Handle static tracepoints.
14095 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14096 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14097 (get_context_regcache): Handle static tracepoints.
14098 (do_action_at_tracepoint): Handle static tracepoint actions.
14099 (traceframe_find_block_type): Handle static trace data blocks.
14100 (traceframe_read_sdata): New.
14101 (download_tracepoints): Download static tracepoint actions.
14102 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14103 (GDB_PROBE_NAME): New.
14104 (ust_ops): New.
14105 (GET_UST_SYM): New.
14106 (USTF): New.
14107 (dlsym_ust): New.
14108 (ust_marker_to_static_tracepoint): New.
14109 (gdb_probe): New.
14110 (collect_ust_data_at_tracepoint): New.
14111 (gdb_ust_probe): New.
14112 (UNIX_PATH_MAX, SOCK_DIR): New.
14113 (gdb_ust_connect_sync_socket): New.
14114 (resume_thread, stop_thread): New.
14115 (run_inferior_command): New.
14116 (init_named_socket): New.
14117 (gdb_ust_socket_init): New.
14118 (cstr_to_hexstr): New.
14119 (next_st): New.
14120 (first_marker, next_marker): New.
14121 (response_ust_marker): New.
14122 (cmd_qtfstm, cmd_qtsstm): New.
14123 (unprobe_marker_at, probe_marker_at): New.
14124 (cmd_qtstmat, gdb_ust_thread): New.
14125 (gdb_ust_init): New.
14126 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14127 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14128 (ST_REGENTRY): New.
14129 (x86_64_st_collect_regmap): New.
14130 (X86_64_NUM_ST_COLLECT_GREGS): New.
14131 (AMD64_RIP_REGNUM): New.
14132 (supply_static_tracepoint_registers): New.
14133 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14134 (ST_REGENTRY): New.
14135 (i386_st_collect_regmap): New.
14136 (i386_NUM_ST_COLLECT_GREGS): New.
14137 (supply_static_tracepoint_registers): New.
14138 * server.c (handle_query): Handle qXfer:statictrace:read.
14139 <qSupported>: Report support for StaticTracepoints, and
14140 qXfer:statictrace:read features.
14141 * server.h (traceframe_read_sdata)
14142 (supply_static_tracepoint_registers): Declare.
14143 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14144 (unpack_varlen_hex): Include in IPA build.
14145 * Makefile.in (ustlibs, ustinc): New.
14146 (IPA_OBJS): Add remote-utils-ipa.o.
14147 ($(IPA_LIB)): Link -ldl and -lpthread.
14148 (UST_CFLAGS): New.
14149 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14150 * config.in, configure: Regenerate.
14151
14152 2010-06-20 Ian Lance Taylor <iant@google.com>
14153 Pedro Alves <pedro@codesourcery.com>
14154
14155 * linux-x86-low.c (always_true): Delete.
14156 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14157 trying to fool the compiler with always_true.
14158
14159 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14160
14161 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14162 conditions in gdbserver.
14163
14164 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14165
14166 * spu-low.c (spu_read_memory): Wrap around local store limit.
14167 (spu_write_memory): Likewise.
14168
14169 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14170
14171 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14172 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14173 LONGEST uses.
14174 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14175 uses.
14176 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14177 uses with LONGEST uses.
14178
14179 2010-06-14 Stan Shebs <stan@codesourcery.com>
14180 Pedro Alves <pedro@codesourcery.com>
14181
14182 Bytecode compiler.
14183
14184 * linux-x86-low.c: Include limits.h.
14185 (add_insns): New.
14186 (always_true): New.
14187 (EMIT_ASM): New.
14188 (EMIT_ASM32): New.
14189 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14190 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14191 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14192 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14193 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14194 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14195 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14196 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14197 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14198 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14199 (amd64_emit_void_call_2): New.
14200 (amd64_emit_ops): New.
14201 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14202 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14203 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14204 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14205 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14206 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14207 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14208 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14209 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14210 (i386_emit_stack_adjust, i386_emit_int_call_1)
14211 (i386_emit_void_call_2): New.
14212 (i386_emit_ops): New.
14213 (x86_emit_ops): New.
14214 (the_low_target): Install x86_emit_ops.
14215 * server.h (struct emit_ops): New.
14216 (get_raw_reg_func_addr): Declare.
14217 (current_insn_ptr, emit_error): Declare.
14218 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14219 (set_trace_state_variable_value): New defines.
14220 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14221 addr_get_trace_state_variable_value and
14222 addr_set_trace_state_variable_value.
14223 (symbol_list): New fields for get_raw_reg,
14224 get_trace_state_variable_value and set_trace_state_variable_value.
14225 (condfn): New typedef.
14226 (struct tracepoint): New field `compiled_cond'.
14227 (do_action_at_tracepoint): Clear compiled_cond.
14228 (get_trace_state_variable_value, set_trace_state_variable_value):
14229 Export in the IPA.
14230 (condition_true_at_tracepoint): If there's a compiled condition,
14231 run that.
14232 (current_insn_ptr, emit_error): New globals.
14233 (struct bytecode_address): New.
14234 (get_raw_reg_func_addr): New.
14235 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14236 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14237 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14238 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14239 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14240 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14241 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14242 (compile_tracepoint_condition, compile_bytecodes): New.
14243 * target.h (emit_ops): Forward declare.
14244 (struct target_ops): New field emit_ops.
14245 (target_emit_ops): New.
14246 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14247 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14248 * linux-low.c (linux_emit_ops): New.
14249 (linux_target_ops): Install it.
14250 * linux-low.h (struct linux_target_ops): New field emit_ops.
14251
14252 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14253
14254 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14255 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14256
14257 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14258 Stan Shebs <stan@codesourcery.com>
14259
14260 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14261 (all): Depend on $(extra_libraries).
14262 (install-only): Install the IPA.
14263 (IPA_OBJS, IPA_LIB): New.
14264 (clean): Remove the IPA lib.
14265 (IPAGENT_CFLAGS): New.
14266 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14267 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14268 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14269 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14270 * configure.ac: Check for atomic builtins support in the compiler.
14271 (IPA_DEPFILES, extra_libraries): Define.
14272 * configure.srv (ipa_obj): Add description.
14273 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14274 (i[34567]86-*-linux*): Set ipa_obj.
14275 (x86_64-*-linux*): Set ipa_obj.
14276 * linux-low.c (stabilizing_threads): New.
14277 (supports_fast_tracepoints): New.
14278 (linux_detach): Stabilize threads before detaching.
14279 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14280 the lwp is either not stabilizing, or is moving out of a jump pad.
14281 (linux_fast_tracepoint_collecting): New.
14282 (maybe_move_out_of_jump_pad): New.
14283 (enqueue_one_deferred_signal): New.
14284 (dequeue_one_deferred_signal): New.
14285 (linux_wait_for_event_1): If moving out of a jump pad, defer
14286 pending signals to later.
14287 (linux_stabilize_threads): New.
14288 (linux_wait_1): Check if threads need moving out of jump pads, and
14289 do it if so.
14290 (stuck_in_jump_pad_callback): New.
14291 (move_out_of_jump_pad_callback): New.
14292 (lwp_running): New.
14293 (linux_resume_one_lwp): Handle moving out of jump pads.
14294 (linux_set_resume_request): Dequeue deferred signals.
14295 (need_step_over_p): Also step over fast tracepoint jumps.
14296 (start_step_over): Also uninsert fast tracepoint jumps.
14297 (finish_step_over): Also reinsert fast tracepoint jumps.
14298 (linux_install_fast_tracepoint_jump): New.
14299 (linux_target_ops): Install linux_stabilize_threads and
14300 linux_install_fast_tracepoint_jump_pad.
14301 * linux-low.h (linux_target_ops) <get_thread_area,
14302 install_fast_tracepoint_jump_pad>: New fields.
14303 (struct lwp_info) <collecting_fast_tracepoint,
14304 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14305 (linux_get_thread_area): Declare.
14306 * linux-x86-low.c (jump_insn): New.
14307 (x86_get_thread_area): New.
14308 (append_insns): New.
14309 (push_opcode): New.
14310 (amd64_install_fast_tracepoint_jump_pad): New.
14311 (i386_install_fast_tracepoint_jump_pad): New.
14312 (x86_install_fast_tracepoint_jump_pad): New.
14313 (the_low_target): Install x86_get_thread_area and
14314 x86_install_fast_tracepoint_jump_pad.
14315 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14316 (struct fast_tracepoint_jump): New.
14317 (fast_tracepoint_jump_insn): New.
14318 (fast_tracepoint_jump_shadow): New.
14319 (find_fast_tracepoint_jump_at): New.
14320 (fast_tracepoint_jump_here): New.
14321 (delete_fast_tracepoint_jump): New.
14322 (set_fast_tracepoint_jump): New.
14323 (uninsert_fast_tracepoint_jumps_at): New.
14324 (reinsert_fast_tracepoint_jumps_at): New.
14325 (set_breakpoint_at): Use write_inferior_memory.
14326 (uninsert_raw_breakpoint): Use write_inferior_memory.
14327 (check_mem_read): Mask out fast tracepoint jumps.
14328 (check_mem_write): Mask out fast tracepoint jumps.
14329 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14330 (set_fast_tracepoint_jump): Declare.
14331 (delete_fast_tracepoint_jump)
14332 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14333 (reinsert_fast_tracepoint_jumps_at): Declare.
14334 * regcache.c: Don't compile many functions when building the
14335 in-process agent library.
14336 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14337 the register buffer in the heap.
14338 (free_register_cache): If the register buffer isn't owned by the
14339 regcache, don't free it.
14340 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14341 pre-existing register caches.
14342 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14343 type.
14344 (convert_ascii_to_int): : Constify `from' parameter type.
14345 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14346 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14347 the needed buffer in-place.
14348 (relocate_instruction): New.
14349 * server.c (handle_query) <qSymbols>: If the target supports
14350 tracepoints, give it a chance of looking up symbols. Report
14351 support for fast tracepoints.
14352 (handle_status): Stabilize threads.
14353 (process_serial_event): Adjust.
14354 * server.h (struct fast_tracepoint_jump): Forward declare.
14355 (struct process_info) <fast_tracepoint_jumps>: New field.
14356 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14357 (decode_X_packet, decode_M_packet): Adjust.
14358 (relocate_instruction): Declare.
14359 (in_process_agent_loaded): Declare.
14360 (tracepoint_look_up_symbols): Declare.
14361 (struct fast_tpoint_collect_status): Declare.
14362 (fast_tracepoint_collecting): Declare.
14363 (force_unlock_trace_buffer): Declare.
14364 (handle_tracepoint_bkpts): Declare.
14365 (initialize_low_tracepoint)
14366 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14367 * target.h (struct target_ops) <stabilize_threads,
14368 install_fast_tracepoint_jump_pad>: New fields.
14369 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14370 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14371 [HAVE_STDINT_H]: Include stdint.h.
14372 (trace_debug_1): Rename to ...
14373 (trace_vdebug): ... this.
14374 (trace_debug): Rename to ...
14375 (trace_debug_1): ... this. Add `level' parameter.
14376 (trace_debug): New.
14377 (ATTR_USED, ATTR_NOINLINE): New.
14378 (IP_AGENT_EXPORT): New.
14379 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14380 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14381 (about_to_request_buffer_space, trace_buffer_is_full)
14382 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14383 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14384 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14385 (traceframe_write_count, traceframes_created)
14386 (trace_state_variables)
14387 New renaming defines.
14388 (struct ipa_sym_addresses): New.
14389 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14390 (symbol_list): New.
14391 (ipa_sym_addrs): New.
14392 (all_tracepoint_symbols_looked_up): New.
14393 (in_process_agent_loaded): New.
14394 (write_e_ipa_not_loaded): New.
14395 (maybe_write_ipa_not_loaded): New.
14396 (tracepoint_look_up_symbols): New.
14397 (debug_threads) [IN_PROCESS_AGENT]: New.
14398 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14399 (UNKNOWN_SIDE_EFFECTS): New.
14400 (stop_tracing): New.
14401 (flush_trace_buffer): New.
14402 (stop_tracing_bkpt): New.
14403 (flush_trace_buffer_bkpt): New.
14404 (read_inferior_integer): New.
14405 (read_inferior_uinteger): New.
14406 (read_inferior_data_pointer): New.
14407 (write_inferior_data_pointer): New.
14408 (write_inferior_integer): New.
14409 (write_inferior_uinteger): New.
14410 (struct collect_static_trace_data_action): Delete.
14411 (enum tracepoint_type): New.
14412 (struct tracepoint) <type>: New field `type'.
14413 <actions_str, step_actions, step_actions_str>: Only include in
14414 GDBserver.
14415 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14416 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14417 (tracepoints): Use IP_AGENT_EXPORT.
14418 (last_tracepoint): Don't include in the IPA.
14419 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14420 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14421 (alloced_trace_state_variables): New.
14422 (trace_state_variables): Use IP_AGENT_EXPORT.
14423 (traceframe_t): Delete unused variable.
14424 (circular_trace_buffer): Don't include in the IPA.
14425 (trace_buffer_start): Delete.
14426 (struct trace_buffer_control): New.
14427 (trace_buffer_free): Delete.
14428 (struct ipa_trace_buffer_control): New.
14429 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14430 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14431 New.
14432 (trace_buffer_ctrl): New.
14433 (TRACE_BUFFER_CTRL_CURR): New.
14434 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14435 Reimplement as macros.
14436 (trace_buffer_wrap): Delete.
14437 (traceframe_write_count, traceframe_read_count)
14438 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14439 (struct tracepoint_hit_ctx) <type>: New field.
14440 (struct fast_tracepoint_ctx): New.
14441 (memory_barrier): New.
14442 (cmpxchg): New.
14443 (record_tracepoint_error): Update atomically in the IPA.
14444 (clear_inferior_trace_buffer): New.
14445 (about_to_request_buffer_space): New.
14446 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14447 updating the same buffer.
14448 (add_tracepoint): Default the tracepoint's type to trap
14449 tracepoint, and orig_size to -1.
14450 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14451 internal variables.
14452 (create_trace_state_variable): New parameter `gdb'. Handle it.
14453 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14454 (cmd_qtdp): Handle fast tracepoints.
14455 (cmd_qtdv): Adjust.
14456 (max_jump_pad_size): New.
14457 (gdb_jump_pad_head): New.
14458 (get_jump_space_head): New.
14459 (claim_jump_space): New.
14460 (sort_tracepoints): New.
14461 (MAX_JUMP_SIZE): New.
14462 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14463 IPA.
14464 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14465 support. Upload fast traceframes, and delete internal IPA
14466 breakpoints.
14467 (stop_tracing_handler): New.
14468 (flush_trace_buffer_handler): New.
14469 (cmd_qtstop): Upload fast tracepoints.
14470 (response_tracepoint): Handle fast tracepoints.
14471 (tracepoint_finished_step): Upload fast traceframes. Set the
14472 tracepoint hit context's tracepoint type.
14473 (handle_tracepoint_bkpts): New.
14474 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14475 type. Add comment about fast tracepoints.
14476 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14477 non-existing action_str field.
14478 (get_context_regcache): Handle fast tracepoints.
14479 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14480 to the regcache.
14481 (fast_tracepoint_from_jump_pad_address): New.
14482 (fast_tracepoint_from_ipa_tpoint_address): New.
14483 (collecting_t): New.
14484 (force_unlock_trace_buffer): New.
14485 (fast_tracepoint_collecting): New.
14486 (collecting): New.
14487 (gdb_collect): New.
14488 (write_inferior_data_ptr): New.
14489 (target_tp_heap): New.
14490 (target_malloc): New.
14491 (download_agent_expr): New.
14492 (UALIGN): New.
14493 (download_tracepoints): New.
14494 (download_trace_state_variables): New.
14495 (upload_fast_traceframes): New.
14496 (IPA_FIRST_TRACEFRAME): New.
14497 (IPA_NEXT_TRACEFRAME_1): New.
14498 (IPA_NEXT_TRACEFRAME): New.
14499 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14500 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14501 (gdb_jump_pad_buffer_end): New.
14502 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14503 (initialize_tracepoint): Adjust.
14504 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14505 buffer. Initialize the low module.
14506 * utils.c (PREFIX, TOOLNAME): New.
14507 (malloc_failure): Use PREFIX.
14508 (error): In the IPA, an error causes an exit.
14509 (fatal, warning): Use PREFIX.
14510 (internal_error): Use TOOLNAME.
14511 (NUMCELLS): Increase to 10.
14512 * configure, config.in: Regenerate.
14513
14514 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14515
14516 * server.c (handle_query) <qSupported>: Do two passes over the
14517 qSupported string to avoid nesting strtok.
14518
14519 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14520
14521 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14522 (CDEPS): New.
14523 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14524 -Wl,--dynamic-list.
14525 * configure: Regenerate.
14526 * proc-service.list: New.
14527
14528 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14529
14530 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14531 New comment.
14532
14533 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14534
14535 * gdbreplay.c (remote_open): Check error return from socket() call by
14536 its equality to -1 not by it being negative.
14537 * remote-utils.c (remote_open): Likewise.
14538
14539 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14540
14541 * config.h: Regenerate.
14542
14543 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14544
14545 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14546 doesn't provide PTRACE_GET_THREAD_AREA.
14547
14548 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14549
14550 * linux-m68k-low.c: Include <asm/ptrace.h>
14551 (ps_get_thread_area): Implement.
14552
14553 2010-05-03 Doug Evans <dje@google.com>
14554
14555 * event-loop.c (struct callback_event): New struct.
14556 (callback_list): New global.
14557 (append_callback_event, delete_callback_event): New functions.
14558 (process_callback): New function.
14559 (start_event_loop): Call it.
14560 * remote-utils.c (NOT_SCHEDULED): Define.
14561 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14562 moved out of readchar.
14563 (readchar): Rewrite. Call reschedule before returning.
14564 (reset_readchar): New function.
14565 (remote_close): Call it.
14566 (process_remaining, reschedule): New functions.
14567 * server.h (callback_handler_func): New typedef.
14568 (append_callback_event, delete_callback_event): Declare.
14569
14570 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14571
14572 * proc-service.c (ps_pglobal_lookup): Use
14573 thread_db_look_up_one_symbol.
14574 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14575 parameter. Use it instead of all_symbols_looked_up.
14576 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14577 field.
14578 (all_symbols_looked_up): Don't declare.
14579 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14580 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14581 field.
14582 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14583 Set all_symbols_looked_up here.
14584 (thread_db_look_up_one_symbol): New.
14585 (thread_db_get_tls_address): Adjust.
14586 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14587 thread_db object on the heap, and tentatively set it in the
14588 process structure.
14589 (thread_db_init): Don't set all_symbols_looked_up here.
14590 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14591
14592 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14593
14594 * linux-low.c (linux_kill, linux_detach): Adjust.
14595 (status_pending_p_callback): Remove redundant statement. Check
14596 for !TARGET_WAITIKIND_IGNORE, instead of
14597 TARGET_WAITKIND_STOPPED.
14598 (handle_tracepoints): Make sure LWP is locked. Adjust.
14599 (linux_wait_for_event_1): Adjust.
14600 (linux_cancel_breakpoints): New.
14601 (unsuspend_one_lwp): New.
14602 (unsuspend_all_lwps): New.
14603 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14604 (send_sigstop_callback): Change return type to int, add new
14605 `except' parameter and handle it.
14606 (suspend_and_send_sigstop_callback): New.
14607 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14608 pass them down. If SUSPEND, also increment the lwp's suspend
14609 count.
14610 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14611 (need_step_over_p): Don't consider suspended LWPs.
14612 (start_step_over): Adjust.
14613 (proceed_one_lwp): Change return type to int, add new `except'
14614 parameter and handle it.
14615 (unsuspend_and_proceed_one_lwp): New.
14616 (proceed_all_lwps): Use find_inferior instead of
14617 for_each_inferior.
14618 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14619 also decrement the suspend count of LWPs. Pass `except' down,
14620 instead of hacking its suspend count.
14621 (linux_pause_all): Add `freeze' parameter. Adjust.
14622 (linux_unpause_all): New.
14623 (linux_target_ops): Install linux_unpause_all.
14624 * server.c (handle_status): Adjust.
14625 * target.h (struct target_ops): New fields `unpause_all' and
14626 `cancel_breakpoints'. Add new parameter to `pause_all'.
14627 (pause_all): Add new `freeze' parameter.
14628 (unpause_all): New.
14629 (cancel_breakpoints): New.
14630 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14631 cancel breakpoints.
14632 (cmd_qtstart): Pause threads.
14633 (stop_tracing): Pause threads, and cancel breakpoints.
14634 * win32-low.c (win32_target_ops): Adjust.
14635
14636 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14637
14638 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14639 the inferior right away from here...
14640 (linux_wait_1): ... to here, and adjust to check the thread's
14641 last_resume_kind instead of the lwp's step or stop_expected flags.
14642
14643 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14644
14645 * README: Use consistent `GDB' and `GDBserver' spellings.
14646
14647 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14648
14649 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14650 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14651 (linux_detach_one_lwp): Assume the lwp is stopped.
14652 (any_thread_of): Delete.
14653 (linux_detach): Stop all lwps here. Don't blindly delete all
14654 breakpoints.
14655 (delete_lwp_callback): New.
14656 (linux_mourn): Delete all lwps of the process that is gone.
14657 (linux_wait_1): Don't delete the last lwp of the process here.
14658 * mem-break.h (mark_breakpoints_out): Declare.
14659 * mem-break.c (mark_breakpoints_out): New.
14660 (free_all_breakpoints): Use it.
14661 * server.c (handle_target_event): If the process is gone, mark
14662 breakpoints out.
14663 * thread-db.c (struct thread_db) <create_bp>: New field.
14664 (thread_db_enable_reporting): Fix prototype. Store a thread event
14665 breakpoint reference in the thread_db struct.
14666 (thread_db_load_search): Clear the thread_db object.
14667 (try_thread_db_load_1): Ditto.
14668 (switch_to_process): New.
14669 (disable_thread_event_reporting): Use it.
14670 (remove_thread_event_breakpoints): New.
14671 (thread_db_detach, thread_db_mourn): Use it.
14672
14673 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14674
14675 * linux-low.c (linux_enable_event_reporting): New.
14676 (linux_wait_for_event_1, handle_extended_wait): Use it.
14677
14678 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14679
14680 * linux-low.c (linux_kill_one_lwp, linux_kill)
14681 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14682 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14683 SIGSTOP even if the LWP is stopped.
14684 (send_sigstop_callback): New.
14685 (stop_all_lwps): Use send_sigstop_callback instead.
14686 (linux_resume_one_thread): Adjust.
14687 (proceed_one_lwp): Still proceed an LWP that the client has
14688 requested to stop, if we haven't reported it as stopped yet. Make
14689 sure that LWPs the client want stopped, have a pending SIGSTOP.
14690
14691 2010-04-26 Doug Evans <dje@google.com>
14692
14693 * server.c (handle_general_set): Make static.
14694
14695 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14696 Print received char after testing for error/eof instead of before.
14697 (input_interrupt): Tweak comment.
14698
14699 2010-04-23 Doug Evans <dje@google.com>
14700
14701 * server.c (start_inferior): Print inferior argv if --debug.
14702
14703 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14704
14705 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14706 * nto-x86-low.c: Include server.h
14707
14708 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14709
14710 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14711 be consistent with other sources of this directory.
14712 (init_registers_amd64): Correct name of source file of this function
14713 in the comment.
14714
14715 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14716
14717 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14718 64-bit executables.
14719
14720 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14721
14722 * win32-i386-low.c: Add 64-bit support.
14723 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14724 (init_registers_amd64): Declare.
14725 (mappings): Add 64-bit version of array.
14726 (init_windows_x86): New function.
14727 (the_low_target): Change init_arch field to init_windows_x86.
14728
14729 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14730
14731 * win32-low.c: Adapt to support also 64-bit architecture.
14732 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14733 (get_image_name): Use SIZE_T type for local variable `done'.
14734 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14735 (toolhelp_get_dll_name): Idem.
14736 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14737 Use uintptr_t typecast to avoid warning.
14738 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14739 (handle_exception): Use phex_nz to avoid warning.
14740 (win32_wait): Remove unused local variable `process'.
14741
14742 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14743
14744 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14745 `amd64-avx.o'.
14746
14747 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14748
14749 * configure.ac: Use `ws2_32' library for srv_mingw.
14750 * configure: Regenerate.
14751 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14752 * remote-utils.c: Likewise.
14753
14754 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14755
14756 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14757 if __x86_64__ is defined.
14758
14759 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14760
14761 * configure: Regenerate.
14762
14763 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14764
14765 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14766 * target.h (target_ops): New get_tib_address field.
14767 * win32-low.h (win32_thread_info): Add thread_local_base field.
14768 * win32-low.c (child_add_thread): Add tlb argument.
14769 Set thread_local_base field to TLB.
14770 (get_child_debug_event): Adapt to child_add_thread change.
14771 (win32_get_tib_address): New function.
14772 (win32_target_ops): Set get_tib_address field to
14773 win32_get_tib_address.
14774 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14775
14776 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14777
14778 * linux-low.c (linux_mourn): Also remove the process.
14779 * server.c (handle_target_event): Don't remove the process here.
14780 * nto-low.c (nto_mourn): New.
14781 (nto_target_ops): Install it.
14782 * spu-low.c (spu_mourn): New.
14783 (spu_target_ops): Install it.
14784 * win32-low.c (win32_mourn): New.
14785 (win32_target_ops): Install it.
14786
14787 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14788
14789 * server.h (buffer_xml_printf): Remove redundant `;'.
14790
14791 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14792
14793 * regcache.c (set_register_cache): Invalidate regcaches before
14794 changing the register cache layout.
14795 (regcache_invalidate_one): Allow a NULL regcache.
14796 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14797 regcaches before changing the register cache layout or the target
14798 regsets.
14799
14800 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14801
14802 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14803 variable warning on Linux/x86-64.
14804
14805 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14806
14807 GDBserver disconnected tracing support.
14808
14809 * linux-low.c (linux_remove_process): Delete.
14810 (add_lwp): Don't set last_resume_kind here.
14811 (linux_kill): Use `mourn'.
14812 (linux_detach): Use `thread_db_detach', and `mourn'.
14813 (linux_mourn): New.
14814 (linux_attach_lwp_1): Adjust comment.
14815 (linux_attach): last_resume_kind moved the thread_info; adjust.
14816 (status_pending_p_callback): Adjust.
14817 (linux_wait_for_event_1): Adjust.
14818 (count_events_callback, select_singlestep_lwp_callback)
14819 (select_event_lwp_callback, cancel_breakpoints_callback)
14820 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14821 (proceed_one_lwp): Adjust.
14822 (linux_async): Add debug output.
14823 (linux_thread_stopped): New.
14824 (linux_pause_all): New.
14825 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14826 linux_pause_all.
14827 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14828 (thread_db_free): Delete declaration.
14829 (thread_db_detach, thread_db_mourn): Declare.
14830 * thread-db.c (thread_db_init): Use thread_db_mourn.
14831 (thread_db_free): Delete, split in two.
14832 (disable_thread_event_reporting): New.
14833 (thread_db_detach): New.
14834 (thread_db_mourn): New.
14835
14836 * server.h (struct thread_info) <last_resume_kind>: New field.
14837 <attached>: Add comment.
14838 <gdb_detached>: New field.
14839 (handler_func): Change return type to int.
14840 (handle_serial_event, handle_target_event): Ditto.
14841 (gdb_connected): Declare.
14842 (tracing): Delete.
14843 (disconnected_tracing): Declare.
14844 (stop_tracing): Declare.
14845
14846 * server.c (handle_query) <qSupported>: Report support for
14847 disconnected tracing.
14848 (queue_stop_reply_callback): Account for running threads.
14849 (gdb_wants_thread_stopped): New.
14850 (gdb_wants_all_threads_stopped): New.
14851 (gdb_reattached_process): New.
14852 (handle_status): Clear the `gdb_detached' flag of all processes.
14853 In all-stop, stop all threads.
14854 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14855 (process_serial_event): If the remote connection breaks, or if an
14856 exit was forced with "monitor exit", force an event loop exit.
14857 Handle disconnected tracing on detach.
14858 (handle_serial_event): Adjust.
14859 (handle_target_event): If GDB isn't connected, forward events back
14860 to the inferior, unless the last process exited, in which case,
14861 exit gdbserver. Adjust interface.
14862
14863 * remote-utils.c (remote_open): Don't block in accept. Instead
14864 register an event loop source on the listen socket file
14865 descriptor. Refactor bits into ...
14866 (listen_desc): ... this new global.
14867 (gdb_connected): ... this new function.
14868 (enable_async_notification): ... this new function.
14869 (handle_accept_event): ... this new function.
14870 (remote_close): Clear remote_desc.
14871
14872 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14873
14874 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14875 New fields.
14876 (mourn_inferior): Define.
14877 (target_process_qsupported): Avoid the dangling else problem.
14878 (thread_stopped): Define.
14879 (pause_all): Define.
14880 (target_waitstatus_to_string): Declare.
14881 * target.c (target_waitstatus_to_string): New.
14882
14883 * tracepoint.c (tracing): Make extern.
14884 (disconnected_tracing): New.
14885 (stop_tracing): Make extern. Handle tracing stops due to GDB
14886 disconnecting.
14887 (cmd_qtdisconnected): New.
14888 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14889 (handle_tracepoint_general_set): Handle QTDisconnected.
14890
14891 * event-loop.c (event_handler_func): Change return type to int.
14892 (process_event): Bail out if the event handler wants the event
14893 loop to stop.
14894 (handle_file_event): Ditto.
14895 (start_event_loop): Bail out if the event handler wants the event
14896 loop to stop.
14897
14898 * nto-low.c (nto_target_ops): Adjust.
14899 * spu-low.c (spu_wait): Don't remove the process here.
14900 (spu_target_ops): Adjust.
14901 * win32-low.c (win32_wait): Don't remove the process here.
14902 (win32_target_ops): Adjust.
14903
14904 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14905
14906 * regcache.c (realloc_register_cache): Invalidate inferior's
14907 regcache before recreating it.
14908
14909 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14910
14911 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14912
14913 2010-04-09 Stan Shebs <stan@codesourcery.com>
14914 Pedro Alves <pedro@codesourcery.com>
14915
14916 * server.h (LONGEST): New.
14917 (struct thread_info) <while_stepping>: New field.
14918 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14919 Declare.
14920 (initialize_tracepoint, handle_tracepoint_general_set)
14921 (handle_tracepoint_query, tracepoint_finished_step)
14922 (tracepoint_was_hit, release_while_stepping_state_list):
14923 (current_traceframe): Declare.
14924 * server.c (handle_general_set): Handle tracepoint packets.
14925 (read_memory): New.
14926 (write_memory): New.
14927 (handle_search_memory_1): Use read_memory.
14928 (handle_query): Report support for conditional tracepoints, trace
14929 state variables, and tracepoint sources. Handle tracepoint
14930 queries.
14931 (main): Initialize the tracepoints module.
14932 (process_serial_event): Handle traceframe reads/writes.
14933
14934 * linux-low.c (handle_tracepoints): New.
14935 (linux_wait_1): Call it.
14936 (linux_resume_one_lwp): Handle while-stepping.
14937 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14938 (linux_target_ops): Install them.
14939 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14940 New field.
14941 * linux-x86-low.c (x86_supports_tracepoints): New.
14942 (the_low_target). Install it.
14943
14944 * mem-break.h (delete_breakpoint): Declare.
14945 * mem-break.c (delete_breakpoint): Make external.
14946
14947 * target.h (struct target_ops): Add `supports_tracepoints',
14948 `read_pc', and `write_pc' fields.
14949 (target_supports_tracepoints): Define.
14950 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14951 (phex_nz): New.
14952
14953 * regcache.h (struct regcache) <registers_owned>: New field.
14954 (init_register_cache, regcache_cpy): Declare.
14955 (regcache_read_pc, regcache_write_pc): Declare.
14956 (register_cache_size): Declare.
14957 (supply_regblock): Declare.
14958 * regcache.c (init_register_cache): New.
14959 (new_register_cache): Use it.
14960 (regcache_cpy): New.
14961 (register_cache_size): New.
14962 (supply_regblock): New.
14963 (regcache_read_pc, regcache_write_pc): New.
14964
14965 * tracepoint.c: New.
14966
14967 * Makefile.in (OBS): Add tracepoint.o.
14968 (tracepoint.o): New rule.
14969
14970 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14971
14972 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14973 (i386-mmx.o): New.
14974 (i386-mmx.c): Likewise.
14975 (i386-mmx-linux.o): Likewise.
14976 (i386-mmx-linux.c): Likewise.
14977
14978 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14979 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
14980 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
14981 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
14982
14983 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
14984 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
14985 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
14986
14987 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
14988
14989 * Makefile.in (clean): Updated.
14990 (i386-avx.o): New.
14991 (i386-avx.c): Likewise.
14992 (i386-avx-linux.o): Likewise.
14993 (i386-avx-linux.c): Likewise.
14994 (amd64-avx.o): Likewise.
14995 (amd64-avx.c): Likewise.
14996 (amd64-avx-linux.o): Likewise.
14997 (amd64-avx-linux.c): Likewise.
14998
14999 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15000 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15001 (srv_amd64_regobj): Add amd64-avx.o.
15002 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15003 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15004 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15005 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15006 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15007 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15008 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15009
15010 * i387-fp.c: Include "i386-xstate.h".
15011 (i387_xsave): New.
15012 (i387_cache_to_xsave): Likewise.
15013 (i387_xsave_to_cache): Likewise.
15014 (x86_xcr0): Likewise.
15015
15016 * i387-fp.h (i387_cache_to_xsave): Likewise.
15017 (i387_xsave_to_cache): Likewise.
15018 (x86_xcr0): Likewise.
15019
15020 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15021 * linux-crisv32-low.c (target_regsets): Likewise.
15022 * linux-m68k-low.c (target_regsets): Likewise.
15023 * linux-mips-low.c (target_regsets): Likewise.
15024 * linux-ppc-low.c (target_regsets): Likewise.
15025 * linux-s390-low.c (target_regsets): Likewise.
15026 * linux-sh-low.c (target_regsets): Likewise.
15027 * linux-sparc-low.c (target_regsets): Likewise.
15028 * linux-xtensa-low.c (target_regsets): Likewise.
15029
15030 * linux-low.c: Include <sys/uio.h>.
15031 (regsets_fetch_inferior_registers): Support nt_type.
15032 (regsets_store_inferior_registers): Likewise.
15033 (linux_process_qsupported): New.
15034 (linux_target_ops): Add linux_process_qsupported.
15035
15036 * linux-low.h (regset_info): Add nt_type.
15037 (linux_target_ops): Add process_qsupported.
15038
15039 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15040 and <sys/uio.h>.
15041 (init_registers_i386_avx_linux): New.
15042 (init_registers_amd64_avx_linux): Likewise.
15043 (xmltarget_i386_linux_no_xml): Likewise.
15044 (xmltarget_amd64_linux_no_xml): Likewise.
15045 (PTRACE_GETREGSET): Likewise.
15046 (PTRACE_SETREGSET): Likewise.
15047 (x86_fill_xstateregset): Likewise.
15048 (x86_store_xstateregset): Likewise.
15049 (use_xml): Likewise.
15050 (x86_linux_update_xmltarget): Likewise.
15051 (x86_linux_process_qsupported): Likewise.
15052 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15053 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15054 init_registers_i386_linux here. Call
15055 x86_linux_update_xmltarget.
15056 (the_low_target): Add x86_linux_process_qsupported.
15057
15058 * server.c (handle_query): Call target_process_qsupported.
15059
15060 * target.h (target_ops): Add process_qsupported.
15061 (target_process_qsupported): New.
15062
15063 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15064
15065 * inferiors.c (add_thread): Set last_status kind to
15066 TARGET_WAITKIND_IGNORE.
15067 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15068 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15069 (linux_wait_1): Move `thread' local definition to block that uses
15070 it. Don't NULL initialize `event_child'.
15071 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15072 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15073 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15074
15075 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15076
15077 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15078 an extended waitstatus, or by a watchpoint.
15079 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15080 thread was stepping or has been stopped by a watchpoint.
15081
15082 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15083
15084 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15085 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15086 of another, then delete the previous, and validate all
15087 breakpoints.
15088 (validate_inserted_breakpoint): New.
15089 (delete_disabled_breakpoints): New.
15090 (validate_breakpoints): New.
15091 (check_mem_read): Validate breakpoints before trusting their
15092 shadow. Delete disabled breakpoints.
15093 (check_mem_write): Validate breakpoints before trusting they
15094 should be inserted. Delete disabled breakpoints.
15095 * mem-break.h (validate_breakpoints):
15096 * server.c (handle_query): Validate breakpoints when we see a
15097 qSymbol query.
15098
15099 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15100
15101 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15102 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15103 if we could tell there's a GDB breakpoint at stop_pc.
15104 (need_step_over_p): Don't do a step over if we find a GDB
15105 breakpoint at the resume PC.
15106
15107 * mem-break.c (struct raw_breakpoint): New.
15108 (enum bkpt_type): New type `gdb_breakpoint'.
15109 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15110 fields. New field `raw'.
15111 (find_raw_breakpoint_at): New.
15112 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15113 breakpoint instead.
15114 (set_breakpoint_at): Adjust.
15115 (delete_raw_breakpoint): New.
15116 (release_breakpoint): New.
15117 (delete_breakpoint): Rename to...
15118 (delete_breakpoint_1): ... this. Add proc parameter. Use
15119 release_breakpoint. Return ENOENT.
15120 (delete_breakpoint): Reimplement.
15121 (find_breakpoint_at): Delete.
15122 (find_gdb_breakpoint_at): New.
15123 (delete_breakpoint_at): Delete.
15124 (set_gdb_breakpoint_at): New.
15125 (delete_gdb_breakpoint_at): New.
15126 (gdb_breakpoint_here): New.
15127 (set_reinsert_breakpoint): Use release_breakpoint.
15128 (uninsert_breakpoint): Rename to ...
15129 (uninsert_raw_breakpoint): ... this.
15130 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15131 (reinsert_raw_breakpoint): Change parameter type to
15132 raw_breakpoint.
15133 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15134 instead.
15135 (check_breakpoints): Adjust. Use release_breakpoint.
15136 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15137 (breakpoint_inserted_here): Ditto.
15138 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15139 Don't trust the breakpoint's shadow if it is not inserted.
15140 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15141 (delete_all_breakpoints): Adjust.
15142 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15143 use delete_breakpoint_1.
15144
15145 * mem-break.h (breakpoints_supported): Delete declaration.
15146 (set_gdb_breakpoint_at): Declare.
15147 (gdb_breakpoint_here): Declare.
15148 (delete_breakpoint_at): Delete.
15149 (delete_gdb_breakpoint_at): Declare.
15150
15151 * server.h (struct raw_breakpoint): Forward declare.
15152 (struct process_info): New field `raw_breakpoints'.
15153
15154 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15155 breakpoints.
15156
15157 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15158
15159 * linux-low.c (status_pending_p_callback): Fix comment.
15160 (linux_wait_for_event_1): Move most of the internal breakpoint
15161 handling from here...
15162 (linux_wait_1): ... to here.
15163 (count_events_callback): New.
15164 (select_singlestep_lwp_callback): New.
15165 (select_event_lwp_callback): New.
15166 (cancel_breakpoints_callback): New.
15167 (select_event_lwp): New.
15168 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15169 priority to all LWPs that have had events that should be reported
15170 to the client. Cancel breakpoints when about to reporting the
15171 event to the client, not while stopping lwps. No longer cancel
15172 finished single-steps here.
15173 (cancel_finished_single_step): Delete.
15174 (cancel_finished_single_steps): Delete.
15175
15176 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15177
15178 * mem-break.c (enum bkpt_type): New.
15179 (struct breakpoint): New field `type'.
15180 (set_breakpoint_at): Change return type to struct breakpoint
15181 pointer. Set type to `other_breakpoint' by default.
15182 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15183 in the breakpoint list.
15184 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15185 (reinsert_breakpoint): Rename to ...
15186 (reinsert_raw_breakpoint): ... this.
15187 (reinsert_breakpoints_at): Adjust.
15188 * mem-break.h (struct breakpoint): Declare.
15189 (set_breakpoint_at): Change return type to struct breakpoint
15190 pointer.
15191
15192 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15193
15194 * server.c (handle_query): Assign, not compare.
15195
15196 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15197
15198 Teach linux gdbserver to step-over-breakpoints.
15199
15200 * linux-low.c (can_hardware_single_step): New.
15201 (supports_breakpoints): New.
15202 (handle_extended_wait): If stopping threads, read the stop pc of
15203 the new cloned LWP.
15204 (get_pc): New.
15205 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15206 low target doesn't support retrieving the PC.
15207 (add_lwp): Set last_resume_kind to resume_continue.
15208 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15209 (linux_attach): Don't clear stop_expected. Set the lwp's
15210 last_resume_kind to resume_stop.
15211 (linux_detach_one_lwp): Don't check for removed breakpoints.
15212 (check_removed_breakpoint): Delete.
15213 (status_pending_p): Rename to ...
15214 (status_pending_p_callback): ... this. Don't check for removed
15215 breakpoints. Don't consider threads that are stopped from GDB's
15216 perspective.
15217 (linux_wait_for_lwp): Always read the stop_pc here.
15218 (cancel_breakpoint): New.
15219 (step_over_bkpt): New global.
15220 (linux_wait_for_event_1): Implement stepping over breakpoints.
15221 (gdb_wants_lwp_stopped): New.
15222 (gdb_wants_all_stopped): New.
15223 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15224 single-step traps here. Store the thread's last reported target
15225 wait status.
15226 (send_sigstop): Don't clear stop_expected. Always set it,
15227 instead.
15228 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15229 (cancel_finished_single_step): New.
15230 (cancel_finished_single_steps): New.
15231 (wait_for_sigstop): Don't cancel finished single-step traps here.
15232 (linux_resume_one_lwp): Don't check for removed breakpoints.
15233 Don't set `step' on non-hardware step archs.
15234 (linux_set_resume_request): Ignore resume_stop requests if already
15235 stopping or stopped. Set the lwp's last_resume_kind.
15236 (resume_status_pending_p): Don't check for removed breakpoints.
15237 (need_step_over_p): New.
15238 (start_step_over): New.
15239 (finish_step_over): New.
15240 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15241 requests. Clear the thread's last reported target waitstatus.
15242 Don't use the `suspended' flag. Don't consider pending breakpoints.
15243 (linux_resume): Start a step-over if necessary.
15244 (proceed_one_lwp): New.
15245 (proceed_all_lwps): New.
15246 (unstop_all_lwps): New.
15247 * linux-low.h (struct lwp_info): Rewrite comment for the
15248 `suspended' flag. Add the `stop_pc' field. Delete the
15249 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15250 Add `'last_resume_kind' and `need_step_over' fields.
15251 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15252 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15253 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15254 (set_raw_breakpoint_at): New.
15255 (set_breakpoint_at): Rewrite to use it.
15256 (reinsert_breakpoint_handler): Delete.
15257 (set_reinsert_breakpoint): New.
15258 (reinsert_breakpoint_by_bp): Delete.
15259 (delete_reinsert_breakpoints): New.
15260 (uninsert_breakpoint): Rewrite.
15261 (uninsert_breakpoints_at): New.
15262 (reinsert_breakpoint): Rewrite.
15263 (reinsert_breakpoints_at): New.
15264 (check_breakpoints): Rewrite.
15265 (breakpoint_here): New.
15266 (breakpoint_inserted_here): New.
15267 (check_mem_read): Adjust.
15268 * mem-break.h (breakpoints_supported, breakpoint_here)
15269 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15270 (reinsert_breakpoint_by_bp): Delete declaration.
15271 (delete_reinsert_breakpoints): Declare.
15272 (reinsert_breakpoint): Delete declaration.
15273 (reinsert_breakpoints_at): Declare.
15274 (uninsert_breakpoint): Delete declaration.
15275 (uninsert_breakpoints_at): Declare.
15276 (check_breakpoints): Adjust prototype.
15277 * server.h: Adjust include order.
15278 (struct thread_info): Declare here. Add a `last_status' field.
15279
15280 2010-03-23 Michael Snyder <msnyder@vmware.com>
15281
15282 * server.c (crc32): New function.
15283 (handle_query): Add handling for 'qCRC:' request.
15284
15285 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15286
15287 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15288 lwp had been stopped by a watchpoint.
15289
15290 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15291
15292 * server.h (internal_error): Declare.
15293 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15294 * utils.c (internal_error): New function.
15295
15296 2010-03-15 Andreas Schwab <schwab@redhat.com>
15297
15298 * configure.srv: Fix typo setting srv_regobj.
15299
15300 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15301
15302 * linux-low.c (fetch_register): Avoid passing a non string literal
15303 format to `error'.
15304 (usr_store_inferior_registers): Ditto.
15305
15306 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15307
15308 * linux-low.c (linux_write_memory): Bail out early if peeking
15309 memory failed.
15310
15311 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15312
15313 * linux-low.h (struct lwp_info): New fields
15314 `stopped_by_watchpoint' and `stopped_data_address'.
15315 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15316 here, and cache them in the lwp object.
15317 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15318 directly.
15319 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15320 field.
15321 (linux_stopped_by_watchpoint): Rewrite.
15322 (linux_stopped_data_address): Rewrite.
15323
15324 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15325
15326 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15327 switching the current inferior, not before.
15328
15329 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15330
15331 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15332 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15333 i386-linux.c and amd64-linux.c.
15334 (reg-i386.o): Removed.
15335 (reg-i386.c): Likewise.
15336 (reg-i386-linux.o): Likewise.
15337 (reg-i386-linux.c): Likewise.
15338 (reg-x86-64.o): Likewise.
15339 (reg-x86-64.c): Likewise.
15340 (reg-x86-64-linux.o): Likewise.
15341 (reg-x86-64-linux.c): Likewise.
15342 (i386.o): New.
15343 (i386.c): Likewise.
15344 (i386-linux.o): Likewise.
15345 (i386-linux.c): Likewise.
15346 (amd64.o): Likewise.
15347 (amd64.c): Likewise.
15348 (amd64-linux.o): Likewise.
15349 (amd64-linux.c): Likewise.
15350
15351 * configure.srv (srv_i386_regobj): New.
15352 (srv_i386_linux_regobj): Likewise.
15353 (srv_amd64_regobj): Likewise.
15354 (srv_amd64_linux_regobj): Likewise.
15355 (srv_i386_32bit_xmlfiles): Likewise.
15356 (srv_i386_64bit_xmlfiles): Likewise.
15357 (srv_i386_xmlfiles): Likewise.
15358 (srv_amd64_xmlfiles): Likewise.
15359 (srv_i386_linux_xmlfiles): Likewise.
15360 (srv_amd64_linux_xmlfiles): Likewise.
15361 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15362 srv_xmlfiles to $srv_i386_xmlfiles.
15363 (i[34567]86-*-mingw32ce*): Likewise.
15364 (i[34567]86-*-mingw*): Likewise.
15365 (i[34567]86-*-nto*): Likewise.
15366 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15367 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15368 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15369 (x86_64-*-linux*): Likewise.
15370
15371 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15372 (init_registers_amd64_linux): New.
15373 (x86_arch_setup): Replace init_registers_x86_64_linux with
15374 init_registers_amd64_linux.
15375
15376 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15377
15378 * configure.ac: Check for libdl. If it is not available link against
15379 static libthread_db.
15380 * configure: Regenerate.
15381
15382 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15383
15384 PR9605
15385
15386 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15387 handing a read watchpoint.
15388 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15389
15390 2010-02-12 Doug Evans <dje@google.com>
15391
15392 * linux-low.c (linux_supports_tracefork_flag): Document.
15393 (linux_look_up_symbols): Add comment.
15394
15395 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15396
15397 * regcache.c (supply_register): Clear regcache if buf is NULL.
15398
15399 2010-02-02 Nicolas Roche <roche@sourceware.org>
15400 Joel Brobecker <brobecker@adacore.com>
15401
15402 * inferiors.c (find_inferior): Add function documentation.
15403 (unloaded_dll): Handle the case where the unloaded dll has not
15404 been previously registered in the dll list.
15405
15406 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15407
15408 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15409 (thumb2_breakpoint): New.
15410 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15411
15412 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15413
15414 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15415 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15416 breakpoints.
15417
15418 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15419
15420 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15421
15422 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15423
15424 * linux-s390-low.c (s390_collect_ptrace_register)
15425 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15426
15427 2010-01-21 Doug Evans <dje@google.com>
15428
15429 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15430 (PTRACE_ARG4_TYPE): New macro.
15431 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15432 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15433 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15434 (usr_store_inferior_registers): Ditto.
15435 (linux_read_memory, linux_write_memory): Ditto.
15436 (linux_test_for_tracefork): Ditto.
15437
15438 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15439 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15440
15441 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15442
15443 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15444 target.
15445
15446 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15447
15448 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15449 prototype to take a regcache. Adjust.
15450
15451 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15452
15453 * regcache.h (struct thread_info): Forward declare.
15454 (struct regcache): New.
15455 (new_register_cache): Adjust prototype.
15456 (get_thread_regcache): Declare.
15457 (free_register_cache): Adjust prototype.
15458 (registers_to_string, registers_from_string): Ditto.
15459 (supply_register, supply_register_by_name, collect_register)
15460 (collect_register_as_string, collect_register_by_name): Ditto.
15461 * regcache.c (struct inferior_regcache_data): Delete.
15462 (get_regcache): Rename to ...
15463 (get_thread_regcache): ... this. Adjust. Switch inferior before
15464 fetching registers.
15465 (regcache_invalidate_one): Adjust.
15466 (regcache_invalidate): Fix prototype.
15467 (new_register_cache): Return the new register cache.
15468 (free_register_cache): Change prototype.
15469 (realloc_register_cache): Adjust.
15470 (registers_to_string): Change prototype to take a regcache. Adjust.
15471 (registers_from_string): Ditto.
15472 (register_data): Ditto.
15473 (supply_register): Ditto.
15474 (supply_register_by_name): Ditto.
15475 (collect_register): Ditto.
15476 (collect_register_as_string): Ditto.
15477 (collect_register_by_name): Ditto.
15478 * server.c (process_serial_event): Adjust.
15479 * linux-low.h (regset_fill_func, regset_store_func): Change
15480 prototype.
15481 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15482 Change prototype.
15483 * linux-low.c (get_stop_pc): Adjust.
15484 (check_removed_breakpoint): Adjust.
15485 (linux_wait_for_event): Adjust.
15486 (linux_resume_one_lwp): Adjust.
15487 (fetch_register): Add regcache parameter. Adjust.
15488 (usr_store_inferior_registers): Ditto.
15489 (regsets_fetch_inferior_registers): Ditto.
15490 (regsets_store_inferior_registers): Ditto.
15491 (linux_fetch_registers, linux_store_registers): Ditto.
15492 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15493 regcache. Adjust.
15494 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15495 Ditto.
15496 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15497 prototype to take a regcache.
15498 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15499 * remote-utils.c (convert_ascii_to_int, outreg)
15500 (prepare_resume_reply): Change prototype to take a regcache.
15501 Adjust.
15502 * target.h (struct target_ops) <fetch_registers, store_registers>:
15503 Change prototype to take a regcache.
15504 (fetch_inferior_registers, store_inferior_registers): Change
15505 prototype to take a regcache. Adjust.
15506 * proc-service.c (ps_lgetregs): Adjust.
15507 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15508 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15509 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15510 take a regcache. Adjust.
15511 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15512 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15513 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15514 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15515 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15516 (cris_cannot_fetch_register):
15517 (cris_breakpoint_at): Change prototype to take a regcache.
15518 Adjust.
15519 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15520 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15521 to take a regcache. Adjust.
15522 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15523 Adjust.
15524 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15525 take a regcache. Adjust.
15526 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15527 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15528 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15529 * linux-mips-low.c (mips_get_pc):
15530 (mips_set_pc): Change prototype to take a regcache. Adjust.
15531 (mips_reinsert_addr): Adjust.
15532 (mips_collect_register): Change prototype to take a regcache.
15533 Adjust.
15534 (mips_supply_register):
15535 (mips_collect_register_32bit, mips_supply_register_32bit)
15536 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15537 (mips_store_fpregset): Ditto.
15538 * linux-ppc-low.c (ppc_supply_ptrace_register)
15539 (ppc_supply_ptrace_register): Ditto.
15540 (parse_spufs_run): Adjust.
15541 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15542 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15543 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15544 take a regcache. Adjust.
15545 * linux-s390-low.c (s390_collect_ptrace_register)
15546 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15547 (s390_set_pc): Change prototype to take a regcache. Adjust.
15548 (s390_arch_setup): Adjust.
15549 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15550 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15551 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15552 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15553 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15554 regcache. Adjust.
15555 (sparc_breakpoint_at): Adjust.
15556 * linux-xtensa-low.c (xtensa_fill_gregset):
15557 (xtensa_store_gregset):
15558 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15559 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15560 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15561 prototype to take a regcache. Adjust.
15562 * win32-arm-low.c (arm_fetch_inferior_register)
15563 (arm_store_inferior_register): Change prototype to take a
15564 regcache. Adjust.
15565 * win32-i386-low.c (i386_fetch_inferior_register)
15566 (i386_store_inferior_register): Change prototype to take a
15567 regcache. Adjust.
15568 * win32-low.c (child_fetch_inferior_registers)
15569 (child_store_inferior_registers): Change prototype to take a
15570 regcache. Adjust.
15571 (win32_wait): Adjust.
15572 (win32_fetch_inferior_registers): Change prototype to take a
15573 regcache. Adjust.
15574 (win32_store_inferior_registers): Adjust.
15575 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15576 store_inferior_register>: Change prototype to take a regcache.
15577
15578 2010-01-20 Doug Evans <dje@google.com>
15579
15580 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15581 #ifdef.
15582 (linux_wait_for_event1, linux_init_signals): Ditto.
15583 (W_STOPCODE): Provide definition if missing.
15584
15585 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15586
15587 * linux-low.c (linux_core_of_thread): New.
15588 (compare_ints, show_process, list_threads): New.
15589 (linux_qxfer_osdata): Report threads and cores.
15590 (linux_target_op): Register linux_core_of_thread.
15591 * remote-utils.c (prepare_resume_reply): Report the core.
15592 (buffer_xml_printf): Support %d specifier.
15593 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15594 New.
15595 (handle_query): Handle qXfer:threads. Announce availability
15596 thereof.
15597 * target.h (struct target_ops): New field core_of_thread.
15598
15599 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15600
15601 * Makefile.in (clean): Remove new generated files.
15602 (reg-s390.o, reg-s390.c): Remove rules.
15603 (reg-s390x.o, reg-s390x.c): Likewise.
15604 (s390-linux32.o, s390-linux32.c): Add rules.
15605 (s390-linux64.o, s390-linux64.c): Likewise.
15606 (s390x-linux64.o, s390x-linux64.c): Likewise.
15607 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15608 * linux-s390-low.c: Include <elf.h>.
15609 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15610 (init_registers_s390): Remove prototype.
15611 (init_registers_s390x): Likewise.
15612 (init_registers_s390_linux32): Add prototype.
15613 (init_registers_s390_linux64): Likewise.
15614 (init_registers_s390x_linux64): Likewise.
15615 (s390_num_regs_3264): New define.
15616 (s390_regmap_3264): New global variable.
15617 (s390_cannot_fetch_register): Remove obsolete check.
15618 (s390_cannot_store_register): Likewise.
15619 (s390_collect_ptrace_register): Handle upper/lower register halves.
15620 (s390_supply_ptrace_register): Likewise.
15621 (s390_fill_gregset): Update to register number changes.
15622 (s390_get_hwcap): New routine.
15623 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15624 Install appropriate regmap and register set.
15625
15626 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15627
15628 * server.c (gdbserver_version): Update copyright year to 2010.
15629 * gdbreplay.c (gdbreplay_version): Likewise.
15630
15631 2009-12-28 Doug Evans <dje@google.com>
15632
15633 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15634 elf/external.h. Include <elf.h> instead but only if necessary.
15635
15636 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15637
15638 * linux-low.c (linux_remove_process): Remove `detaching'
15639 parameter. Don't release/detach from thread_db here.
15640 (linux_kill): Release/detach from thread_db here, ...
15641 (linux_detach): ... and here, before actually detaching.
15642 (linux_wait_1): ... and here, when a process exits.
15643 * thread-db.c (any_thread_of): New.
15644 (thread_db_free): Switch the current inferior to a thread of the
15645 passed in process.
15646
15647 2009-12-21 Doug Evans <dje@google.com>
15648
15649 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15650
15651 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15652 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15653 warning ifndef __NR_tkill. Move setting of errno there too.
15654 Delete unnecessary resetting of errno after syscall.
15655 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15656
15657 * configure.ac: Check for dladdr.
15658 * config.in: Regenerate.
15659 * configure: Regenerate.
15660 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15661 (try_thread_db_load): Update.
15662
15663 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15664
15665 2009-12-18 Doug Evans <dje@google.com>
15666
15667 * event-loop.c: Include unistd.h if it exists.
15668
15669 * linux-low.c (my_waitpid): Move definition away from being in
15670 between linux_tracefork_child/linux_test_for_tracefork.
15671
15672 * gdb_proc_service.h (psaddr_t): Fix type.
15673 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15674 signature to match glibc.
15675
15676 2009-12-16 Doug Evans <dje@google.com>
15677
15678 * linux-low.c (linux_read_memory): Fix argument to read.
15679
15680 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15681
15682 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15683 events, don't leave current_inferior pointing at null.
15684
15685 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15686
15687 * win32-low.c (LOG): Delete.
15688 (OUTMSG): Output to stderr.
15689 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15690 on compile time LOG macro.
15691 (win32_wait): Fix debug output.
15692
15693 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15694
15695 * win32-low.c (win32_add_one_solib): If the dll name is
15696 "ntdll.dll", prepend the system directory to the dll path.
15697
15698 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15699
15700 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15701
15702 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15703 Vladimir Prus <vladimir@codesourcery.com>
15704
15705 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15706 * configure.ac: Check for __mcoldfire__ and set
15707 gdb_cv_m68k_is_coldfire.
15708 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15709 reg-cf.o and reg-m68k.o.
15710 * configure: Regenerated.
15711
15712 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15713
15714 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15715 Pass it to thread_db_free.
15716 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15717 proper `detaching' argument to linux_remove_process.
15718 * linux-low.h (thread_db_free): Add `detaching' parameter.
15719 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15720 to thread_db_free.
15721 (thread_db_free): Add `detaching' parameter. Only
15722 call td_ta_clear_event if detaching from process.
15723
15724 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15725
15726 * thread-db.c (thread_db_free): Fix typo.
15727
15728 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15729
15730 PR gdb/10838
15731 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15732
15733 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15734
15735 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15736 with an i686 compiler.
15737 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15738 needed.
15739 * configure: Rebuilt.
15740
15741 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15742
15743 PR gdb/10783
15744
15745 * server.c (handle_search_memory_1): Correct read_addr initialization
15746 in loop for searching subsequent chunks.
15747
15748 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15749
15750 * configure.ac: New --with-libthread-db option.
15751 * thread-db.c: Allow direct dependence on libthread_db.
15752 (thread_db_free): Adjust.
15753 * config.in: Regenerate.
15754 * configure: Likewise.
15755
15756 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15757
15758 PR gdb/10757
15759 * thread-db.c (attach_thread): New function.
15760 (maybe_attach_thread): Return success/failure.
15761 (find_new_threads_callback): Adjust.
15762 (thread_db_find_new_threads): Loop until no new threads.
15763
15764 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15765
15766 * proc-service.c (ps_lgetregs): Formatting.
15767
15768 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15769
15770 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15771 * configure.ac: Adjust.
15772 * linux-low.h (struct process_info_private): Move members to struct
15773 thread_db.
15774 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15775 * linux-low.c (linux_remove_process): Adjust.
15776 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15777 * server.c (handle_query): Move code ...
15778 (handle_monitor_command): ... here. New function.
15779 * target.h (struct target_ops): New member.
15780 * thread-db.c (struct thread_db): New.
15781 (libthread_db_search_path): New variable.
15782 (thread_db_create_event, thread_db_enable_reporting)
15783 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15784 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15785 (try_thread_db_load_1, dladdr_to_soname): New functions.
15786 (try_thread_db_load, thread_db_load_search): New functions.
15787 (thread_db_init): Search for libthread_db.
15788 (thread_db_free): New function.
15789 (thread_db_handle_monitor_command): Likewise.
15790 * config.in: Regenerate.
15791 * configure: Regenerate.
15792
15793 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15794
15795 * spu-low.c (spu_kill): Wait for inferior to terminate.
15796 Call clear_inferiors.
15797 (spu_detach): Call clear_inferiors.
15798
15799 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15800
15801 * aclocal.m4: Regenerate.
15802 * config.in: Likewise.
15803 * configure: Likewise.
15804
15805 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15806
15807 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15808 (parse_spufs_run): New function.
15809 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15810 (ppc_breakpoint_at): Handle SPU breakpoints.
15811
15812 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15813
15814 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15815 (SPUFS_MAGIC): Define.
15816 (spu_enumerate_spu_ids): New function.
15817 (linux_qxfer_spu): New function.
15818 (linux_target_ops): Install linux_qxfer_spu.
15819
15820 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15821
15822 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15823 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15824 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15825 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15826 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15827 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15828 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15829 (init_registers_powerpc_cell32l): Add prototype.
15830 (init_registers_powerpc_cell64l): Likewise.
15831 (ppc_arch_setup): Detect Cell/B.E. architecture.
15832
15833 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15834
15835 * Makefile.in (datarootdir): New variable.
15836
15837 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15838
15839 * linux-low.c (linux_write_memory): Update debugging output.
15840 * Makefile.in (clean): Add new descriptions.
15841 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15842 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15843 * configure.srv: Add new files for arm*-*-linux*.
15844 * linux-arm-low.c: Add new declarations.
15845 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15846 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15847 (HWCAP_VFPv3D16): New.
15848 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15849 instead of __IWMMXT__.
15850 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15851 (arm_arch_setup): New.
15852 (target_regsets): Remove #ifdef. Add VFP regset.
15853 (the_low_target): Use arm_arch_setup.
15854
15855 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15856
15857 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15858 the main thread again.
15859
15860 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15861
15862 Adding Neutrino gdbserver.
15863 * configure: Regenerated.
15864 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15865 * configure.srv (i[34567]86-*-nto*): New target.
15866 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15867 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15868 (nto_comctrl) [__QNX__]: New function.
15869 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15870
15871 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15872
15873 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15874 srv_tgtobj.
15875
15876 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15877 Pedro Alves <pedro@codesourcery.com>
15878
15879 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15880 don't support CONTEXT_EXTENDED_REGISTERS.
15881 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15882 (the_low_target): Install them.
15883 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15884 failing with ERROR_PIPE_NOT_CONNECTED.
15885
15886 2009-06-30 Doug Evans <dje@google.com>
15887 Pierre Muller <muller@ics.u-strasbg.fr>
15888
15889 Add h/w watchpoint support to x86-linux, win32-i386.
15890 * Makefile.in (SFILES): Add i386-low.c
15891 (i386_low_h): Define.
15892 (i386-low.o): Add dependencies.
15893 (linux-x86-low.o): Add i386-low.h dependency.
15894 (win32-i386-low.o): Ditto.
15895 * i386-low.c: New file.
15896 * i386-low.h: New file.
15897 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15898 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15899 * linux-low.c (linux_add_process): Initialize arch_private.
15900 (linux_remove_process): Free arch_private.
15901 (add_lwp): Initialize arch_private.
15902 (delete_lwp): Free arch_private.
15903 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15904 provided.
15905 * linux-low.h (process_info_private): New member arch_private.
15906 (lwp_info): New member arch_private.
15907 (linux_target_ops): New members new_process, new_thread,
15908 prepare_to_resume.
15909 (ptid_of): New macro.
15910 * linux-x86-low.c: Include stddef.h, i386-low.h.
15911 (arch_process_info): New struct.
15912 (arch_lwp_info): New struct.
15913 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15914 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15915 (i386_dr_low_get_status): New function.
15916 (x86_insert_point, x86_remove_point): New functions.
15917 (x86_stopped_by_watchpoint): New function.
15918 (x86_stopped_data_address): New function.
15919 (x86_linux_new_process, x86_linux_new_thread): New functions.
15920 (x86_linux_prepare_to_resume): New function.
15921 (the_low_target): Add entries for insert_point, remove_point,
15922 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15923 prepare_to_resume.
15924 * server.c (debug_hw_points): New global.
15925 (monitor_show_help): Document set debug-hw-points.
15926 (handle_query): Process "set debug-hw-points".
15927 * server.h (debug_hw_points): Declare.
15928 (paddress): Declare.
15929 * utils.c (NUMCELLS, CELLSIZE): New macros.
15930 (get_sell, xsnprintf, paddress): New functions.
15931 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15932 remove_point, stopped_by_watchpoint, stopped_data_address.
15933 * win32-i386-low.c: Include i386-low.h.
15934 (debug_reg_state): Replaces dr.
15935 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15936 (i386_dr_low_get_status): New function.
15937 (i386_insert_point, i386_remove_point): New functions.
15938 (i386_stopped_by_watchpoint): New function.
15939 (i386_stopped_data_address): New function.
15940 (i386_initial_stuff): Update.
15941 (get_thread_context,set_thread_context,i386_thread_added): Update.
15942 (the_low_target): Add entries for insert_point,
15943 remove_point, stopped_by_watchpoint, stopped_data_address.
15944 * win32-low.c (win32_insert_watchpoint): New function.
15945 (win32_remove_watchpoint): New function.
15946 (win32_stopped_by_watchpoint): New function.
15947 (win32_stopped_data_address): New function.
15948 (win32_target_ops): Add entries for insert_watchpoint,
15949 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15950 * win32-low.h (win32_target_ops): New members insert_point,
15951 remove_point, stopped_by_watchpoint, stopped_data_address.
15952
15953 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15954
15955 * server.c (process_serial_event): Re-return unsupported, not
15956 error, if the type isn't recognized. Re-allow supporting only
15957 insert or remove packets. Also call require_running for
15958 breakpoints. Add missing break statement to default case. Tidy.
15959 * target.h (struct target_ops): Rename insert_watchpoint to
15960 insert_point, and remove_watchpoint to remove_point.
15961
15962 * linux-low.h (struct linux_target_ops): Likewise.
15963 * linux-low.c (linux_insert_watchpoint): Rename to ...
15964 (linux_insert_point): ... this. Adjust.
15965 (linux_remove_watchpoint): Rename to ...
15966 (linux_remove_point): ... this. Adjust.
15967 (linux_target_ops): Adjust.
15968 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15969 (cris_insert_point): ... this.
15970 (cris_remove_watchpoint): Rename to ...
15971 (cris_remove_point): ... this.
15972 (the_low_target): Adjust.
15973
15974 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15975
15976 * server.c (handle_v_kill): Pass signal_pid to
15977 kill_inferior if multi_process is zero.
15978
15979 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
15980
15981 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
15982 * target.h (target_ops): Comment for *_watchpoint to make it clear
15983 the functions can get types '0' and '1'.
15984
15985 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
15986
15987 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
15988 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
15989 * regcache.c (get_regcache): Likewise.
15990 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
15991 * win32-low.c (child_fetch_inferior_registers): Remove check for
15992 regno 0.
15993
15994 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
15995 Pedro Alves <pedro@codesourcery.com>
15996
15997 * target.h (struct target_ops) <supports_multi_process>: New
15998 callback.
15999 (target_supports_multi_process): New.
16000 * server.c (handle_query): Even if GDB reports support, only
16001 enable multi-process if the target also supports it. Report
16002 multi-process support only if the target backend supports it.
16003 * linux-low.c (linux_supports_multi_process): New function.
16004 (linux_target_ops): Install it as target_supports_multi_process
16005 callback.
16006
16007 2009-05-24 Doug Evans <dje@google.com>
16008
16009 Global renaming of find_thread_pid to find_thread_ptid.
16010 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16011 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16012 All callers updated.
16013
16014 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16015 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16016 directly.
16017
16018 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16019 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16020 (linux_resume_one_lwp): Ditto.
16021
16022 2009-05-23 Doug Evans <dje@google.com>
16023
16024 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16025 from struct inferior_list_entry * to struct lwp_info *.
16026 All callers updated.
16027
16028 2009-05-13 Doug Evans <dje@google.com>
16029
16030 * linux-x86-low.c: Don't include assert.h.
16031 (x86_siginfo_fixup): Use fatal, not assert.
16032 (x86_arch_setup): Fix comment.
16033
16034 2009-05-12 Doug Evans <dje@google.com>
16035
16036 Biarch support for i386/amd64 gdbserver.
16037 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16038 Add linux-x86-low.c.
16039 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16040 (linux-x86-low.o): Add.
16041 * linux-x86-64-low.c: Delete.
16042 * linux-i386-low.c: Delete.
16043 * linux-x86-low.c: New file.
16044 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16045 linux-x86-low.o.
16046 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16047 linux-x86-low.o.
16048 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16049 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16050 (linux_child_pid_to_exec_file): New function.
16051 (elf_64_header_p, elf_64_file_p): New functions.
16052 (siginfo_fixup): New function.
16053 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16054 give target a chance to convert layout.
16055 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16056 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16057
16058 2009-05-07 Doug Evans <dje@google.com>
16059
16060 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16061 (regsets_store_inferior_registers): Ditto.
16062
16063 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16064
16065 PR server/10048
16066
16067 * linux-low.c (must_set_ptrace_flags): Delete.
16068 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16069 of the global.
16070 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16071 `lwp->must_set_ptrace_flags' instead.
16072 (linux_wait_for_event_1): Set ptrace options here.
16073 (linux_wait_1): ... not here.
16074
16075 2009-04-30 Doug Evans <dje@google.com>
16076
16077 * inferiors.c (started_inferior_callback): New function.
16078 (attached_inferior_callback): New function.
16079 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16080 * server.c (print_started_pid, print_attached_pid): New functions.
16081 (detach_or_kill_for_exit): New function.
16082 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16083 * server.h (have_started_inferiors_p): Declare.
16084 (have_attached_inferiors_p): Declare.
16085
16086 * inferiors.c (remove_process): Fix memory leak, free process.
16087 * linux-low.c (linux_remove_process): New function.
16088 (linux_kill): Call it instead of remove_process.
16089 (linux_detach, linux_wait_1): Ditto.
16090
16091 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16092
16093 * configure.srv: Add x86 Windows CE target.
16094
16095 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16096
16097 * inferiors.c (get_thread_process): Make global.
16098 * server.h (get_thread_process): Add prototype.
16099 * thread-db.c (find_one_thread): Use get_thread_process
16100 instead of current_process.
16101 (thread_db_get_tls_address): Do not crash if called when
16102 thread layer is not yet initialized.
16103
16104 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16105
16106 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16107 * spu-low.c (current_tid): Rename to ...
16108 (current_ptid): ... this.
16109 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16110 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16111 ptid_get_lwp (current_ptid) instead of current_tid.
16112 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16113 instead of current_tid. Use find_process_pid to verify pid
16114 argument is valid. Pass proper argument to remove_process.
16115 (spu_thread_alive): Compare current_ptid instead of current_tid.
16116 (spu_resume): Likewise.
16117
16118 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16119
16120 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16121 variable.
16122
16123 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16124
16125 Implement the multiprocess extensions, and add linux multiprocess
16126 support.
16127
16128 * server.h (ULONGEST): Declare.
16129 (struct ptid, ptid_t): New.
16130 (minus_one_ptid, null_ptid): Declare.
16131 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16132 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16133 (struct inferior_list_entry): Change `id' type from unsigned from
16134 to ptid_t.
16135 (struct sym_cache, struct breakpoint, struct
16136 process_info_private): Forward declare.
16137 (struct process_info): Declare.
16138 (current_process): Declare.
16139 (all_processes): Declare.
16140 (initialize_inferiors): Declare.
16141 (add_thread): Adjust to use ptid_t.
16142 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16143 (add_process, remove_process, find_thread_pid): Declare.
16144 (find_inferior_id): Adjust to use ptid_t.
16145 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16146 (multi_process): Declare.
16147 (push_event): Adjust to use ptid_t.
16148 (read_ptid, write_ptid): Declare.
16149 (prepare_resume_reply): Adjust to use ptid_t.
16150 (clear_symbol_cache): Declare.
16151 * inferiors.c (all_processes): New.
16152 (null_ptid, minus_one_ptid): New.
16153 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16154 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16155 (add_thread): Change unsigned long to ptid. Remove gdb_id
16156 parameter. Adjust.
16157 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16158 (gdb_id_to_thread): Rename to ...
16159 (find_thread_pid): ... this. Change unsigned long to ptid.
16160 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16161 (loaded_dll, pull_pid_from_list): Adjust.
16162 (add_process, remove_process, find_process_pid)
16163 (get_thread_process, current_process, initialize_inferiors): New.
16164 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16165 (struct target_waitstatus) <related_pid>: Ditto.
16166 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16167 return type to int.
16168 (struct target_ops) <join>: Add `pid' argument.
16169 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16170 (struct target_ops) <wait>: Add `ptid' field. Change return type
16171 to ptid.
16172 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16173 (mywait): Add `ptid' argument. Change return type to ptid_t.
16174 (target_pid_to_str): Declare.
16175 * target.c (set_desired_inferior): Adjust to use ptids.
16176 (mywait): Add new `ptid' argument. Adjust.
16177 (target_pid_to_str): New.
16178 * mem-break.h (free_all_breakpoints): Declare.
16179 * mem-break.c (breakpoints): Delelete.
16180 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16181 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16182 to use per-process breakpoint list.
16183 (free_all_breakpoints): New.
16184 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16185 (symbol_cache, all_symbols_looked_up): Delete.
16186 (hexchars): New.
16187 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16188 read_ptid): New.
16189 (prepare_resume_reply): Change ptid argument's type from unsigned
16190 long to ptid_t. Adjust. Implement W;process and X;process.
16191 (free_sym_cache, clear_symbol_cache): New.
16192 (look_up_one_symbol): Adjust to per-process symbol cache. *
16193 * server.c (cont_thread, general_thread, step_thread): Change type
16194 to ptid_t.
16195 (attached): Delete.
16196 (multi_process): New.
16197 (last_ptid): Change type to ptid_t.
16198 (struct vstop_notif) <ptid>: Change type to ptid_t.
16199 (queue_stop_reply, push_event): Change `ptid' argument's type to
16200 ptid_t.
16201 (discard_queued_stop_replies): Add `pid' argument.
16202 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16203 changes. Don't reference the `attached' global.
16204 (attach_inferior): Adjust to mywait interface changes.
16205 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16206 features. Handle and report "multiprocess+". Handle
16207 "qAttached:PID".
16208 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16209 changes.
16210 (handle_v_kill): New.
16211 (handle_v_stopped): Adjust to use target_pid_to_str.
16212 (handle_v_requests): Allow multiple attaches and runs when
16213 multiprocess extensions are in effect. Handle "vKill".
16214 (myresume): Adjust to use ptids.
16215 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16216 (handle_status): Adjust to discard_queued_stop_replies interface
16217 change.
16218 (first_thread_of, kill_inferior_callback)
16219 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16220 (main): Call initialize_inferiors. Adjust to use ptids, killing
16221 and detaching from all inferiors. Handle multiprocess packet
16222 variants.
16223 * linux-low.h: Include gdb_proc_service.h.
16224 (struct process_info_private): New.
16225 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16226 <lwpid_of>: Use ptid_get_lwp.
16227 (get_lwp_thread): Adjust.
16228 (struct lwp_info): Add `dead' member.
16229 (find_lwp_pid): Declare.
16230 * linux-low.c (thread_db_active): Delete.
16231 (new_inferior): Adjust comment.
16232 (inferior_pid): Delete.
16233 (linux_add_process): New.
16234 (handle_extended_wait): Adjust.
16235 (add_lwp): Change unsigned long to ptid.
16236 (linux_create_inferior): Add process to processes table. Adjust
16237 to use ptids. Don't set new_inferior here.
16238 (linux_attach_lwp): Rename to ...
16239 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16240 it. Adjust to use ptids.
16241 (linux_attach_lwp): New.
16242 (linux_attach): Add process to processes table. Don't set
16243 new_inferior here.
16244 (struct counter): New.
16245 (second_thread_of_pid_p, last_thread_of_process_p): New.
16246 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16247 multiple processes.
16248 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16249 processes. Remove process from process table.
16250 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16251 to multiple processes.
16252 (any_thread_of): New.
16253 (linux_detach): Add `pid' argument, and handle it. Remove process
16254 from processes table.
16255 (linux_join): Add `pid' argument. Handle it.
16256 (linux_thread_alive): Change unsighed long argument to ptid_t.
16257 Consider dead lwps as not being alive.
16258 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16259 threads we're not interested in.
16260 (same_lwp, find_lwp_pid): New.
16261 (linux_wait_for_lwp): Change `pid' argument's type from int to
16262 ptid_t. Adjust.
16263 (linux_wait_for_event): Rename to ...
16264 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16265 from int to ptid_t. Adjust.
16266 (linux_wait_for_event): New.
16267 (linux_wait_1): Add `ptid' argument. Change return type to
16268 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16269 that exit from the process table.
16270 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16271 Adjust.
16272 (mark_lwp_dead): New.
16273 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16274 stopping all threads, mark its main lwp as dead.
16275 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16276 ptids.
16277 (fetch_register, usr_store_inferior_registers)
16278 (regsets_fetch_inferior_registers)
16279 (regsets_store_inferior_registers, linux_read_memory)
16280 (linux_write_memory): Inline `inferior_pid'.
16281 (linux_look_up_symbols): Adjust to use per-process
16282 `thread_db_active'.
16283 (linux_request_interrupt): Adjust to use ptids.
16284 (linux_read_auxv): Inline `inferior_pid'.
16285 (initialize_low): Don't reference thread_db_active.
16286 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16287 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16288 (ps_getpid): Return the pid of the current inferior.
16289 * thread-db.c (proc_handle, thread_agent): Delete.
16290 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16291 per-process data.
16292 (find_one_thread): Change argument type to ptid_t. Adjust to
16293 per-process data.
16294 (maybe_attach_thread): Adjust to per-process data and ptids.
16295 (thread_db_find_new_threads): Ditto.
16296 (thread_db_init): Ditto.
16297 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16298 processes table. Adjust to use ptids.
16299 (spu_kill, spu_detach): Adjust interface. Remove process from
16300 processes table.
16301 (spu_join, spu_thread_alive): Adjust interface.
16302 (spu_wait): Adjust interface. Remove process from processes
16303 table. Adjust to use ptids.
16304 * win32-low.c (current_inferior_tid): Delete.
16305 (current_inferior_ptid): New.
16306 (debug_event_ptid): New.
16307 (thread_rec): Take a ptid. Adjust.
16308 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16309 (child_delete_thread): Ditto.
16310 (do_initial_child_stuff): Add `attached' argument. Add process to
16311 processes table.
16312 (child_fetch_inferior_registers, child_store_inferior_registers):
16313 Adjust.
16314 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16315 (win32_attach): Pass 1 to do_initial_child_stuff.
16316 (win32_kill): Adjust interface. Remove process from processes
16317 table.
16318 (win32_detach): Ditto.
16319 (win32_join): Adjust interface.
16320 (win32_thread_alive): Take a ptid.
16321 (win32_resume): Adjust to use ptids.
16322 (get_child_debug_event): Ditto.
16323 (win32_wait): Adjust interface. Remove exiting process from
16324 processes table.
16325
16326 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16327
16328 Non-stop mode support.
16329
16330 * server.h (non_stop): Declare.
16331 (gdb_client_data, handler_func): Declare.
16332 (delete_file_handler, add_file_handler, start_event_loop):
16333 Declare.
16334 (handle_serial_event, handle_target_event, push_event)
16335 (putpkt_notif): Declare.
16336 * target.h (enum resume_kind): New.
16337 (struct thread_resume): Replace `step' field by `kind' field.
16338 (TARGET_WNOHANG): Define.
16339 (struct target_ops) <wait>: Add `options' argument.
16340 <supports_non_stop, async, start_non_stop>: New fields.
16341 (target_supports_non_stop, target_async): New.
16342 (start_non_stop): Declare.
16343 (mywait): Add `options' argument.
16344 * target.c (mywait): Add `options' argument. Print child exit
16345 notifications here.
16346 (start_non_stop): New.
16347 * server.c (non_stop, own_buf, mem_buf): New globals.
16348 (struct vstop_notif): New.
16349 (notif_queue): New global.
16350 (queue_stop_reply, push_event, discard_queued_stop_replies)
16351 (send_next_stop_reply): New.
16352 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16353 interface changes.
16354 (attach_inferior): In non-stop mode, don't wait for the target
16355 here.
16356 (handle_general_set): Handle QNonStop.
16357 (handle_query): When handling qC, return the current general
16358 thread, instead of the first thread of the list.
16359 (handle_query): If the backend supports non-stop mode, include
16360 QNonStop+ in the qSupported query response.
16361 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16362 and non-stop mode.
16363 (handle_v_attach, handle_v_run): Handle non-stop mode.
16364 (handle_v_stopped): New.
16365 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16366 (myresume): Adjust to use resume_kind. Handle non-stop.
16367 (queue_stop_reply_callback): New.
16368 (handle_status): Handle non-stop mode.
16369 (main): Clear non_stop flag on reconnection. Use the event-loop.
16370 Refactor serial protocol handling from here ...
16371 (process_serial_event): ... to this new function. When GDB
16372 selects any thread, select one here. In non-stop mode, wait until
16373 GDB acks all pending events before exiting.
16374 (handle_serial_event, handle_target_event): New.
16375 * remote-utils.c (remote_open): Install remote_desc in the event
16376 loop.
16377 (remote_close): Remove remote_desc from the event loop.
16378 (putpkt_binary): Rename to...
16379 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16380 (putpkt_binary): New as wrapper around putpkt_binary_1.
16381 (putpkt_notif): New.
16382 (prepare_resume_reply): In non-stop mode, don't change the
16383 general_thread.
16384 * event-loop.c: New.
16385 * Makefile.in (OBJ): Add event-loop.o.
16386 (event-loop.o): New rule.
16387
16388 * linux-low.h (pid_of): Moved here.
16389 (lwpid_of): New.
16390 (get_lwp_thread): Use lwpid_of.
16391 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16392 * linux-low.c (pid_of): Delete.
16393 (inferior_pid): Use lwpid_of.
16394 (linux_event_pipe): New.
16395 (target_is_async_p): New.
16396 (delete_lwp): New.
16397 (handle_extended_wait): Use lwpid_of.
16398 (add_lwp): Don't set lwpid field.
16399 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16400 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16401 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16402 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16403 first. Adjust to linux_wait_for_event interface changes. Use
16404 lwpid_of.
16405 (linux_detach): Don't delete the main lwp here.
16406 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16407 (status_pending_p): Don't consider explicitly suspended lwps.
16408 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16409 pointer. Add OPTIONS argument. Change return type to int. Use
16410 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16411 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16412 pointer. Add status pointer argument. Return a pid instead of a
16413 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16414 changes. In non-stop mode, don't switch to a random thread.
16415 (linux_wait): Rename to...
16416 (linux_wait_1): ... this. Add target_options argument, and handle
16417 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16418 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16419 clean exit and signal exit code. Don't stop all threads in
16420 non-stop mode. In all-stop mode, only stop all threads when
16421 reporting a stop to GDB. Handle explicit thread stop requests.
16422 (async_file_flush, async_file_mark): New.
16423 (linux_wait): New.
16424 (send_sigstop): Use lwpid_of.
16425 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16426 interface changes. In non-stop mode, don't switch to a random
16427 thread.
16428 (linux_resume_one_lwp): Use lwpid_of.
16429 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16430 (linux_resume_one_thread): ... this. Handle resume_stop. In
16431 non-stop mode, don't look for pending flag in all threads.
16432 (resume_status_pending_p): Don't consider explicitly suspended
16433 threads.
16434 (my_waitpid): Reimplement. Emulate __WALL.
16435 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16436 Use lwpid_of.
16437 (sigchld_handler, linux_supports_non_stop, linux_async)
16438 (linux_start_non_stop): New.
16439 (linux_target_ops): Register linux_supports_non_stop, linux_async
16440 and linux_start_non_stop.
16441 (initialize_low): Install SIGCHLD handler.
16442 * thread-db.c (thread_db_create_event, find_one_thread)
16443 (thread_db_get_tls_address): Use lwpid_of.
16444 * win32-low.c (win32_detach): Adjust to use resume_kind.
16445 (win32_wait): Add `options' argument.
16446 * spu-low.c (spu_resume): Adjust to use resume_kind.
16447 (spu_wait): Add `options' argument.
16448
16449 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16450
16451 Decouple target code from remote protocol.
16452
16453 * target.h (enum target_waitkind): New.
16454 (struct target_waitstatus): New.
16455 (struct target_ops) <wait>: Return an unsigned long. Take a
16456 target_waitstatus pointer instead of a char pointer.
16457 (mywait): Likewise.
16458 * target.c (mywait): Change prototype to return an unsigned long.
16459 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16460 * server.h (thread_from_wait, old_thread_from_wait): Delete
16461 declarations.
16462 (prepare_resume_reply): Change prototype to take a
16463 target_waitstatus.
16464 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16465 (last_status, last_ptid): New.
16466 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16467 pid instead of a signal.
16468 (attach_inferior): Remove "status" and "signal" parameters.
16469 Adjust.
16470 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16471 not as an address.
16472 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16473 (handle_v_requests, myresume): Remove "status" and "signal"
16474 parameters. Adjust.
16475 (handle_status): New.
16476 (main): Delete local `status'. Adjust.
16477 * remote-utils.c: Include target.h.
16478 (prepare_resume_reply): Change prototype to take a
16479 target_waitstatus. Adjust.
16480
16481 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16482 interface.
16483 * spu-low.c (spu_wait): Adjust.
16484 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16485 Delete.
16486 (win32_wait): Adjust.
16487
16488 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16489
16490 * target.h (struct thread_resume): Delete leave_stopped member.
16491 (struct target_ops): Add a `n' argument to the `resume' callback.
16492 * server.c (start_inferior): Adjust.
16493 (handle_v_cont, myresume): Adjust.
16494 * linux-low.c (check_removed_breakpoint): Adjust to resume
16495 interface change, and to removed leave_stopped field.
16496 (resume_ptr): Delete.
16497 (struct thread_resume_array): New.
16498 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16499 resume interface change.
16500 (linux_continue_one_thread, linux_queue_one_thread)
16501 (resume_status_pending_p): Check if the resume field is NULL
16502 instead of checking the leave_stopped member.
16503 (linux_resume): Adjust to the target resume interface change.
16504 * spu-low.c (spu_resume): Adjust to the target resume interface
16505 change.
16506 * win32-low.c (win32_detach, win32_resume): Ditto.
16507
16508 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16509
16510 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16511 flag.
16512 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16513 pending.
16514 (linux_continue_one_thread): Only preserve the stepping flag if
16515 there's a pending breakpoint.
16516
16517 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16518
16519 * server.c (main): After the inferior having exited, call
16520 remote_close before exiting gdbserver.
16521
16522 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16523
16524 Fix size of FPSCR in Power 7 processors.
16525 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16526 (PPC_FEATURE_HAS_DFP): New #define.
16527 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16528 size of the FPSCR.
16529
16530 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16531
16532 * server.c (handle_query) Whitespace and formatting.
16533
16534 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16535
16536 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16537 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16538 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16539 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16540 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16541 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16542 Makefile.in, configure.ac: Fix whitespace throughout.
16543 * configure: Regenerate.
16544
16545 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16546
16547 * inferiors.c (find_inferior): Make it safe for the callback
16548 function to delete the currently iterated inferior.
16549
16550 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16551
16552 * Makefile.in (linuw_low_h): Move higher.
16553 (thread-db.o): Depend on $(linux_low_h).
16554
16555 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16556
16557 Rename "process" to "lwp" throughout.
16558
16559 * linux-low.c (all_processes): Rename to...
16560 (all_lwps): ... this.
16561 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16562 (add_process): Rename to ...
16563 (add_lwp): ... this. Adjust.
16564 (linux_create_inferior): Adjust.
16565 (linux_attach_lwp): Adjust.
16566 (linux_attach): Adjust.
16567 (linux_kill_one_process): Rename to ...
16568 (linux_kill_one_lwp): ... this. Adjust.
16569 (linux_kill): Adjust.
16570 (linux_detach_one_process): Rename to ...
16571 (linux_detach_one_lwp): ... this. Adjust.
16572 (linux_detach): Adjust.
16573 (check_removed_breakpoint): Adjust.
16574 (status_pending_p): Adjust.
16575 (linux_wait_for_process): Rename to ...
16576 (linux_wait_for_lwp): ... this. Adjust.
16577 (linux_wait_for_event): Adjust.
16578 (send_sigstop): Adjust.
16579 (wait_for_sigstop): Adjust.
16580 (stop_all_processes): Rename to ...
16581 (stop_all_lwps): ... this.
16582 (linux_resume_one_process): Rename to ...
16583 (linux_resume_one_lwp): ... this. Adjust.
16584 (linux_set_resume_request, linux_continue_one_thread)
16585 (linux_queue_one_thread, resume_status_pending_p)
16586 (usr_store_inferior_registers, regsets_store_inferior_registers)
16587 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16588 Adjust.
16589 * linux-low.h (get_process): Rename to ...
16590 (get_lwp): ... this. Adjust.
16591 (get_thread_process): Rename to ...
16592 (get_thread_lwp): ... this. Adjust.
16593 (get_process_thread): Rename to ...
16594 (get_lwp_thread): ... this. Adjust.
16595 (struct process_info): Rename to ...
16596 (struct lwp_info): ... this.
16597 (all_processes): Rename to ...
16598 (all_lwps): ... this.
16599 * proc-service.c (ps_lgetregs): Adjust.
16600 * thread-db.c (thread_db_create_event, find_one_thread)
16601 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16602
16603 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16604
16605 * server.c (handle_query): Handle "qAttached".
16606
16607 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16608
16609 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16610 GPLv3, update license URL.
16611
16612 2009-03-01 Doug Evans <dje@google.com>
16613
16614 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16615 (server_h): Add gdb_signals.h.
16616 (signals.o): Update.
16617 * server.h (target_signal_from_host,target_signal_to_host_p)
16618 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16619
16620 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16621
16622 * remote-utils.c (getpkt): Also generate remote-debug
16623 information if noack_mode is set.
16624
16625 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16626
16627 * server.c (handle_query): Report qXfer:siginfo:read and
16628 qXfer:siginfo:write as supported and handle them.
16629 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16630 * linux-low.c (linux_xfer_siginfo): New.
16631 (linux_target_ops): Set it.
16632
16633 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16634
16635 * server.c (gdbserver_usage): Mention --remote-debug.
16636 (main): Accept '--remote-debug' switch.
16637
16638 2009-01-18 Doug Evans <dje@google.com>
16639
16640 * regcache.c (new_register_cache): No need to check result of xcalloc.
16641 * server.c (handle_search_memory): Back out calls to xmalloc,
16642 result is checked and error is returned to user upon failure.
16643 (handle_query): Ditto. Add more checks for result of malloc.
16644 (handle_v_cont): Check result of malloc, report error back to
16645 user upon failure.
16646 (handle_v_run): Ditto. Call freeargv.
16647 * server.h (freeargv): Declare.
16648 * utils.c (freeargv): New fn.
16649
16650 2009-01-15 Doug Evans <dje@google.com>
16651
16652 * gdbreplay.c (perror_with_name): Make arg const char *.
16653 * server.h (target_signal_to_name): Make return type const char *.
16654 * thread-db.c (thread_db_err_str): Make return type const char *.
16655 * utils.c (perror_with_name): Make arg const char *.
16656
16657 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16658
16659 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16660 when handling a EXIT_PROCESS_DEBUG_EVENT.
16661
16662 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16663
16664 * gdbreplay.c (gdbreplay_version): Update copyright year.
16665 * server.c (gdbserver_version): Likewise.
16666
16667 2009-01-05 Doug Evans <dje@google.com>
16668
16669 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16670 (handle_extended_wait): Improve comment.
16671
16672 2008-12-13 Doug Evans <dje@google.com>
16673
16674 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16675 * server.h (ATTR_MALLOC): New macro.
16676 (xmalloc,xcalloc,xstrdup): Declare.
16677 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16678 * inferiors.c: Ditto.
16679 * linux-low.c: Ditto.
16680 * mem-break.c: Ditto.
16681 * regcache.c: Ditto.
16682 * remote-utils.c: Ditto.
16683 * server.c: Ditto.
16684 * target.c: Ditto.
16685 * win32-low.c: Ditto.
16686
16687 2008-12-12 Doug Evans <dje@google.com>
16688
16689 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16690 in debugging printf.
16691
16692 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16693
16694 2008-12-09 Doug Evans <dje@google.com>
16695
16696 * linux-low.h (struct process_info): Delete member tid, unused.
16697 * thread-db.c (find_one_thread): Update.
16698 (maybe_attach_thread): Update.
16699
16700 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16701
16702 * target.h (struct target_ops): Add qxfer_osdata member.
16703 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16704 and dirent.h.
16705 (linux_qxfer_osdata): New functions.
16706 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16707 callback.
16708 * server.c (handle_query): Handle "qXfer:osdata:read:".
16709 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16710 (buffer_xml_printf): New functions.
16711 * server.h (struct buffer): New.
16712 (buffer_grow_str, buffer_grow_str0): New macros.
16713 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16714 (buffer_xml_printf): Declare.
16715
16716 2008-11-24 Doug Evans <dje@google.com>
16717
16718 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16719
16720 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16721
16722 * server.c (handle_v_run): Always use the supplied argument list.
16723
16724 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16725
16726 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16727 (xtensa_regmap_table): Add entry for scompare1.
16728
16729 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16730
16731 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16732 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16733 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16734 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16735 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16736 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16737 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16738 XML target descriptions.
16739 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16740 when inferior is running on an ISA 2.05 or later processor. Add
16741 special case to return offset for full 64-bit slot of FPSCR when
16742 in 32-bits.
16743
16744 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16745
16746 * Makefile.in (SFILES, clean): Added sparc64 files.
16747 (reg-sparc64.o, reg-sparc64.c): New.
16748 * configure.srv (sparc*-*-linux*): New configuration.
16749 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16750 syscall arguments for SPARC.
16751 (regsets_store_inferior_registers): Likewise.
16752 * linux-sparc-low.c: New file.
16753
16754 2008-10-21 Doug Evans <dje@google.com>
16755
16756 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16757 (READLINE_DIR,READLINE_DEP): Delete.
16758 (INTERNAL_CFLAGS): Update.
16759 (LINTFLAGS): Update.
16760
16761 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16762
16763 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16764 whole argv from the last run, not just argv[0].
16765
16766 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16767
16768 * regcache.c (new_register_cache): Return NULL if the register
16769 cache size isn't known yet.
16770 (free_register_cache): Avoid dereferencing a NULL regcache.
16771
16772 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16773
16774 * configure.srv: Merge MIPS and MIPS64.
16775
16776 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16777
16778 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16779
16780 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16781
16782 * Makefile.in: Add required vsx dependencies.
16783
16784 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16785 Declare init_registers_powerpc_vsx32l.
16786 Declare init_registers_powerpc_vsx64l.
16787 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16788 (ppc_arch_setup): Check for VSX in hwcap.
16789 (ppc_fill_vsxregset): New function.
16790 (ppc_store_vsxregset): New function.
16791 Add new VSX entry in regset_info target_regsets.
16792
16793 * configure.srv: Add new VSX dependencies.
16794
16795 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16796
16797 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16798 (remote_open): Set or clear transport_is_reliable.
16799 (putpkt_binary): Don't expect acks in noack mode.
16800 (getpkt): Don't send ack/nac in noack mode.
16801 * server.c (handle_general_set): Handle QStartNoAckMode.
16802 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16803 qSupported.
16804 (main): Reset noack_mode on every connection.
16805 * server.h (noack_mode): Declare.
16806
16807 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16808
16809 * Makefile.in (GDBREPLAY_OBS): New variable.
16810 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16811
16812 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16813 Daniel Jacobowitz <dan@codesourcery.com>
16814
16815 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16816 (usr_store_inferior_registers): Likewise.
16817 (regsets_store_inferior_registers): Likewise.
16818
16819 2008-07-31 Rolf Jansen <rj@surtec.com>
16820 Pedro Alves <pedro@codesourcery.com>
16821
16822 * configure.ac: Check for memmem declaration.
16823 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16824 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16825 (disable_packet_qfThreadInfo): Unconditionally compile.
16826 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16827 * configure, config.in: Regenerate.
16828
16829 2008-07-28 Doug Kwan <dougkwan@google.com>
16830
16831 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16832 (linux_write_memory): Remove declaration of errno.
16833
16834 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16835
16836 * linux-low.c (handle_extended_wait): Do not use "status"
16837 variable uninitialized.
16838
16839 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16840
16841 * server.c (handle_v_attach): Inhibit reporting dll changes.
16842
16843 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16844
16845 * remote-utils.c (prepare_resume_reply): If requested, don't
16846 output "thread:TID" in the T stop reply.
16847
16848 * server.c (disable_packet_vCont, disable_packet_Tthread)
16849 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16850 (handle_query): If requested, disable support for qC, qfThreadInfo
16851 and qsThreadInfo.
16852 (handle_v_requests): If requested, disable support for vCont.
16853 (gdbserver_show_disableable): New.
16854 (main): Handle --disable-packet and --disable-packet=LIST.
16855
16856 * server.h (disable_packet_vCont, disable_packet_Tthread)
16857 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16858
16859 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16860
16861 * server.c (gdbserver_usage): Mention --version.
16862
16863 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16864
16865 * Makefile.in (gdbreplay.o): New rule.
16866
16867 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16868
16869 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16870 message, not gdbserver.
16871
16872 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16873 Nathan Sidwell <nathan@codesourcery.com>
16874 Joseph Myers <joseph@codesourcery.com>
16875
16876 * acinclude.m4: Include ../../config/acx.m4.
16877 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16878 * configure, config.in: Regenerate.
16879 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16880 * server.c (gdbserver_version): Print PKGVERSION.
16881 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16882 (main): Adjust gdbserver_usage calls.
16883 * gdbreplay.c (version, host_name): Add declarations.
16884 (gdbreplay_version, gdbreplay_usage): New.
16885 (main): Accept --version and --help options.
16886
16887 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16888
16889 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16890 (arm_breakpoint_at): Handle Thumb.
16891 (the_low_target): Add comment.
16892
16893 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16894
16895 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16896
16897 2008-05-09 Doug Evans <dje@google.com>
16898
16899 * server.h (decode_search_memory_packet): Declare.
16900 * remote-utils.c (decode_search_memory_packet): New fn.
16901 * server.c (handle_search_memory_1): New fn.
16902 (handle_search_memory): New fn.
16903 (handle_query): Process qSearch:memory packets.
16904
16905 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16906
16907 * regcache.c (registers_length): Remove.
16908 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16909 full register packet.
16910 * regcache.h (registers_length): Remove prototype.
16911 * server.h (PBUFSIZ): Define to 16384.
16912
16913 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16914
16915 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16916 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16917 powerpc-64l.o, and powerpc-altivec64l.o.
16918 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16919 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16920 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16921 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16922 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16923 to srv_xmlfiles.
16924
16925 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16926 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16927 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16928 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16929 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16930 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16931 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16932 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16933 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16934 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16935 (clean): Update.
16936
16937 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16938 (init_registers_powerpc_32l): ... this new prototype.
16939 (init_registers_powerpc_32): Remove, replace by ...
16940 (init_registers_powerpc_altivec32l): ... this new prototype.
16941 (init_registers_powerpc_e500): Remove, replace by ...
16942 (init_registers_powerpc_e500l): ... this new prototype.
16943 (init_registers_ppc64): Remove, replace by ...
16944 (init_registers_powerpc_64l): ... this new prototype.
16945 (init_registers_powerpc_64): Remove, replace by ...
16946 (init_registers_powerpc_altivec64l): ... this new prototype.
16947 (ppc_num_regs): Set to 73.
16948 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16949 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16950 (ppc_cannot_store_register): Handle orig_r3 and trap.
16951 (ppc_arch_setup): Update init_registers_... calls.
16952 (ppc_fill_gregset): Handle orig_r3 and trap.
16953
16954 * inferiors.c (clear_inferiors): Reset current_inferior.
16955
16956 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16957
16958 * acinclude.m4: Add override.m4.
16959 * configure: Regenerate.
16960
16961 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16962
16963 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16964 initial call to init_register_ppc64.
16965
16966 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16967
16968 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16969 single powerpc*-*-linux* case.
16970 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16971
16972 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16973
16974 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16975 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16976 from reg_xmlfiles.
16977 * linux-ppc-low.c: Include <elf.h>.
16978 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16979 (ppc_hwcap): New global variable.
16980 (ppc_regmap): Remove __SPE__ #ifdef sections.
16981 (ppc_regmap_e500): New global variable.
16982 (ppc_cannot_store_register): Update __SPE__ special case.
16983 (ppc_get_hwcap): New function.
16984 (ppc_arch_setup): Use it to determine whether inferior supports
16985 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
16986 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
16987 Do not access registers if target does not support AltiVec.
16988 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
16989 Do not access registers if target does not support SPE.
16990 (target_regsets): Unconditionally include AltiVec and SPE regsets.
16991
16992 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
16993
16994 * linux-low.c (disabled_regsets, num_regsets): New.
16995 (use_regsets_p): Delete.
16996 (linux_wait_for_process): Clear disabled_regsets.
16997 (regsets_fetch_inferior_registers): Check and set it.
16998 (regsets_store_inferior_registers): Likewise.
16999 (linux_fetch_registers, linux_store_registers): Do not use
17000 use_regsets_p.
17001 (initialize_low): Allocate disabled_regsets.
17002
17003 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17004
17005 * Makefile.in (LIBOBJS): New.
17006 (OBS): Use LIBOBJS.
17007 (memmem.o): New rule.
17008 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17009 * configure: Regenerated.
17010
17011 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17012
17013 * server.c (handle_query): Never return "unsupported" for
17014 qXfer:features:read queries.
17015
17016 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17017
17018 * server.c (get_features_xml): Fix inverted condition.
17019 (handle_query): Always support qXfer:feature:read.
17020
17021 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17022
17023 * server.c (wrapper_argv): New.
17024 (start_inferior): Handle wrapper_argv. If set, expect an extra
17025 trap.
17026 (gdbserver_usage): Document --wrapper.
17027 (main): Parse --wrapper.
17028
17029 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17030
17031 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17032 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17033 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17034 (ppc_set_pc): Likewise.
17035 (ppc_arch_setup): New function.
17036 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17037 of collect_register.
17038 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17039
17040 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17041
17042 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17043 instead of linux-ppc64-low.o.
17044 * linux-ppc64-low.c: Remove file.
17045 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17046 (linux-ppc64-low.o): Remove rule.
17047
17048 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17049 (init_registers_powerpc_64): Likewise.
17050 (ppc_regmap): Conditionally define depending on __powerpc64__.
17051 (ppc_cannot_store_register): Do not special-case "fpscr" when
17052 compiled on __powerpc64__.
17053 (ppc_collect_ptrace_register): New function.
17054 (ppc_supply_ptrace_register): New function.
17055 (ppc_breakpoint): Change type to "unsigned int".
17056 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17057 (the_low_target): Conditionally provide initializers for the
17058 arch_setup member depending on __powerpc64__. Install
17059 collect_ptrace_register and supply_ptrace_register members.
17060
17061 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17062
17063 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17064 * server.c (gdbserver_xmltarget): Define.
17065 (get_features_xml): Use it to replace "target.xml" and arch_string.
17066
17067 * configure.srv: Remove srv_xmltarget. Add XML files that were
17068 mentioned there to srv_xmlfiles instead. Remove conditional tests
17069 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17070 srv_xmlfiles and srv_regobj to include all possible choices.
17071 * configure.ac (srv_xmltarget): Remove.
17072 (srv_xmlfiles): Do not add "target.xml".
17073 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17074 checks for supplementary target information.
17075 * configure: Regenerate.
17076 * Makefile.in (XML_TARGET): Remove.
17077 (target.xml): Remove rule.
17078 (clean): Do not clean up target.xml.
17079 (.PRECIOUS): Do not mention target.xml.
17080
17081 * target.h (struct target_ops): Remove arch_string member.
17082 * linux-low.c (linux_arch_string): Remove.
17083 (linux_target_ops): Remove arch_string initializer.
17084 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17085 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17086 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17087 * spu-low.c (spu_arch_string): Remove.
17088 (spu_target_ops): Remove arch_string initializer.
17089 * win32-low.c (win32_arch_string): Remove.
17090 (win32_target_ops): Remove arch_string initializer.
17091 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17092 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17093 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17094
17095 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17096
17097 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17098 by collect_ptrace_register and supply_ptrace_register hooks.
17099 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17100 instead of checking for the_low_target.left_pad_xfer.
17101 (usr_store_inferior_registers): Use collect_ptrace_register callback
17102 instead of checking for the_low_target.left_pad_xfer.
17103
17104 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17105 (s390_supply_ptrace_register): Likewise.
17106 (s390_fill_gregset): Call s390_collect_ptrace_register.
17107 (the_low_target): Update.
17108
17109 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17110 (ppc_supply_ptrace_register): Likewise.
17111 (the_low_target): Update.
17112
17113 * linux-i386-low.c (the_low_target): Update.
17114 * linux-x86-64-low.c (the_low_target): Update.
17115
17116 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17117
17118 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17119 reg-s390.o and reg-s390x.o.
17120
17121 * linux-low.c (new_inferior): New global variable.
17122 (linux_create_inferior, linux_attach): Set it.
17123 (linux_wait_for_process): Call the_low_target.arch_setup after the
17124 target has stopped for the first time.
17125 (initialize_low): Do not call the_low_target.arch_setup.
17126
17127 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17128 (s390_set_pc): Likewise.
17129 (s390_arch_setup): New function.
17130 (the_low_target): Use s390_arch_setup as arch_setup routine.
17131
17132 * regcache.c (realloc_register_cache): New function.
17133 (set_register_cache): Call it for each existing regcache.
17134
17135 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17136
17137 * server.h (init_registers): Remove prototype.
17138
17139 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17140 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17141 instead of init_registers ().
17142 * linux-arm-low.c (init_registers_arm): Add prototype.
17143 (init_registers_arm_with_iwmmxt): Likewise.
17144 (the_low_target): Add initializer for arch_setup field.
17145 * linux-cris-low.c (init_registers_cris): Add prototype.
17146 (the_low_target): Add initializer for arch_setup field.
17147 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17148 (the_low_target): Add initializer for arch_setup field.
17149 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17150 (the_low_target): Add initializer for arch_setup field.
17151 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17152 (the_low_target): Add initializer for arch_setup field.
17153 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17154 (the_low_target): Add initializer for arch_setup field.
17155 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17156 (the_low_target): Add initializer for arch_setup field.
17157 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17158 (init_registers_mips64_linux): Likewise.
17159 (the_low_target): Add initializer for arch_setup field.
17160 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17161 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17162 (the_low_target): Add initializer for arch_setup field.
17163 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17164 (init_registers_powerpc_64): Likewise.
17165 (the_low_target): Add initializer for arch_setup field.
17166 * linux-s390-low.c (init_registers_s390): Add prototype.
17167 (init_registers_s390x): Likewise.
17168 (the_low_target): Add initializer for arch_setup field.
17169 * linux-sh-low.c (init_registers_sh): Add prototype.
17170 (the_low_target): Add initializer for arch_setup field.
17171 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17172 (the_low_target): Add initializer for arch_setup field.
17173 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17174 (the_low_target): Add initializer for arch_setup field.
17175
17176 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17177 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17178 instead of init_registers ().
17179 * win32-arm-low.c (init_registers_arm): Add prototype.
17180 (the_low_target): Add initializer for arch_setup field.
17181 * win32-i386-low.c (init_registers_i386): Add prototype.
17182 (the_low_target): Add initializer for arch_setup field.
17183
17184 * spu-low.c (init_registers_spu): Add prototype.
17185 (initialize_low): Call initialie_registers_spu () instead of
17186 initialize_registers ().
17187
17188 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17189
17190 * server.c (handle_v_requests): When handling the vRun and vAttach
17191 packets, if already debugging a process, don't kill it. Return an
17192 error instead.
17193
17194 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17195
17196 * server.c (handle_query): Correct length check.
17197
17198 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17199
17200 * win32-low.c (do_initial_child_stuff): Add process handle
17201 parameter. Set current_process_handle and current_process_id from the
17202 parameters. Clear globals.
17203 (win32_create_inferior): Don't set current_process_handle and
17204 current_process_id here. Instead pass them on the call to
17205 do_initial_child_stuff.
17206 (win32_attach): Likewise.
17207 (win32_clear_inferiors): New.
17208 (win32_kill): Don't close the current process handle or the
17209 current thread handle here. Instead call win32_clear_inferiors.
17210 (win32_detach): Don't open a new handle to the process. Call
17211 win32_clear_inferiors.
17212 (win32_join): Don't rely on current_process_handle; open a new
17213 handle using the process id.
17214 (win32_wait): Call win32_clear_inferiors when the inferior process
17215 has exited.
17216
17217 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17218
17219 * server.c (monitor_show_help): Add "exit".
17220
17221 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17222
17223 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17224 (clean): Add reg-xtensa.c.
17225 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17226 * configure.srv (xtensa*-*-linux*) New target.
17227 * linux-xtensa-low.c: New.
17228 * xtensa-xtregs.c: New.
17229
17230 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17231
17232 * hostio.c: Don't include errno.h.
17233 (errno_to_fileio_errno): Move to hostio-errno.
17234 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17235 error number outputting to the target->hostio_last_error callback.
17236 (hostio_packet_error): Use FILEIO_EINVAL directly.
17237 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17238 calls to hostio_error.
17239 * hostio-errno.c: New.
17240 * server.h (hostio_last_error_from_errno): Declare.
17241 * target.h (target_ops): Add hostio_last_error member.
17242 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17243 as hostio_last_error handler.
17244 * spu-low.c (spu_target_ops): Likewise.
17245 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17246 (wince_hostio_last_error): New functions.
17247 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17248 as hostio_last_error handler.
17249 (win32_target_ops) [!_WIN32_WCE]: Register
17250 hostio_last_error_from_errno as hostio_last_error handler.
17251 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17252 (hostio-errno.o): New rule.
17253 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17254 * configure.srv (srv_hostio_err_objs): New variable. Default to
17255 hostio-errno.o.
17256 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17257 * configure: Regenerate.
17258
17259 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17260
17261 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17262 (linux_kill, linux_detach): Clean up the process list.
17263 * remote-utils.c (remote_open): Improve port number parsing.
17264 (putpkt_binary, input_interrupt): Only send interrupts if the target
17265 is running.
17266 * server.c (extended_protocol): Make static.
17267 (attached): Define earlier.
17268 (exit_requested, response_needed, program_argv): New variables.
17269 (target_running): New.
17270 (start_inferior): Clear attached here.
17271 (attach_inferior): Set attached here.
17272 (require_running): Define.
17273 (handle_query): Use require_running and target_running. Implement
17274 "monitor exit".
17275 (handle_v_attach, handle_v_run): New.
17276 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17277 (gdbserver_usage): Update.
17278 (main): Redo argument parsing. Handle --debug and --multi. Handle
17279 --attach along with other options or after the port. Save
17280 program_argv. Support no initial program. Resynchronize
17281 communication with GDB after an error. Handle "monitor exit".
17282 Use require_running and target_running. Always allow the extended
17283 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17284 restart in extended mode.
17285 * README: Refer to the GDB manual. Update --attach usage.
17286
17287 2007-12-20 Andreas Schwab <schwab@suse.de>
17288
17289 * linux-low.c (STACK_SIZE): Define.
17290 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17291 (linux_test_for_tracefork): Likewise.
17292
17293 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17294
17295 * linux-low.c (linux_wait_for_event): Update messages. Do not
17296 reinsert auto-delete breakpoints.
17297 * mem-break.c (struct breakpoint): Change return type of handler to
17298 int.
17299 (set_breakpoint_at): Update handler type.
17300 (reinsert_breakpoint_handler): Return 1 instead of calling
17301 delete_breakpoint.
17302 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17303 setting a new one.
17304 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17305 * mem-break.h (set_breakpoint_at): Update handler type.
17306 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17307 * win32-low.c (auto_delete_breakpoint): New.
17308 (get_child_debug_event): Use it.
17309
17310 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17311
17312 * configure.ac: Check for pread and pwrite.
17313 * hostio.c (handle_pread): Fall back to lseek and read.
17314 (handle_pwrite): Fall back to lseek and write.
17315 * config.in, configure: Regenerated.
17316
17317 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17318
17319 * server.c (myresume): Add own_buf argument.
17320 (main): Update calls.
17321
17322 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17323
17324 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17325 * remote-utils.c (remote_open): Do not call disable_async_io.
17326 (block_async_io): Delete.
17327 (unblock_async_io): Make static.
17328 (initialize_async_io): New.
17329 * server.c (handle_v_cont): Handle async I/O here.
17330 (myresume): Likewise. Move other common resume tasks here...
17331 (main): ... from here. Call initialize_async_io. Disable async
17332 I/O before the main loop.
17333 * server.h (initialize_async_io): Declare.
17334 (block_async_io, unblock_async_io): Delete prototypes.
17335 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17336
17337 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17338
17339 * remote-utils.c (readchar): Allow binary data in received messages.
17340
17341 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17342
17343 * win32-low.c (attaching): New global.
17344 (win32_create_inferior): Clear the `attaching' global.
17345 (win32_attach): Set the `attaching' global.
17346 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17347 attaching. Only set a breakpoint at the entry point if not
17348 attaching.
17349
17350 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17351
17352 * server.c (main): Don't report dll events on the initial
17353 connection on attaches.
17354
17355 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17356
17357 * server.c (main): Relax numerical bases supported for the pid of
17358 the --attach command line argument.
17359
17360 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17361
17362 * win32-low.c (win32_attach): Call OpenProcess before
17363 DebugActiveProcess, not after. Add last error output to error
17364 call.
17365
17366 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17367
17368 * win32-low.c (win32_get_thread_context)
17369 (win32_set_thread_context): New functions.
17370 (thread_rec): Use win32_get_thread_context.
17371 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17372 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17373 field.
17374
17375 2007-12-03 Leo Zayas
17376 Pedro Alves <pedro_alves@portugalmail.pt>
17377
17378 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17379 global variables.
17380 (child_add_thread): Minor cleanup.
17381 (child_continue): Resume artificially suspended threads before
17382 calling ContinueDebugEvent.
17383 (suspend_one_thread): New.
17384 (fake_breakpoint_event): New.
17385 (get_child_debug_event): Change return type to int. Check here if
17386 gdb sent an interrupt request. If a soft interrupt was requested,
17387 fake a breakpoint event. Return 0 if there is no event to handle,
17388 and 1 otherwise.
17389 (win32_wait): Don't check here if gdb sent an interrupt request.
17390 Ensure there is a valid event to handle.
17391 (win32_request_interrupt): Add soft interruption method as last
17392 resort.
17393
17394 2007-12-03 Leo Zayas
17395 Pedro Alves <pedro_alves@portugalmail.pt>
17396
17397 * win32-low.h (win32_thread_info): Add descriptions to the
17398 structure members. Replace `suspend_count' counter by a
17399 `suspended' flag.
17400 * win32-low.c (thread_rec): Update condition of when to get the
17401 context from the inferior. Rely on ContextFlags being set if it
17402 has already been retrieved. Only suspend the inferior thread if
17403 we haven't already. Warn if that fails.
17404 (continue_one_thread): s/suspend_count/suspended/. Only call
17405 ResumeThread once. Warn if that fails.
17406
17407 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17408
17409 * win32-low.c (win32_wait): Don't read from the inferior when it
17410 has already exited.
17411
17412 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17413
17414 * Makefile.in (win32_low_h): New variable.
17415 (win32-low.o): Add dependency on $(win32_low_h).
17416 (win32-arm-low.o, win32-i386-low.o): New rules.
17417
17418 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17419
17420 * hostio.c: Correct copyright year.
17421
17422 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17423
17424 * Makefile.in (OBS): Add hostio.o.
17425 (hostio.o): New rule.
17426 * server.h (handle_vFile): Declare.
17427 * hostio.c: New file.
17428 * server.c (handle_v_requests): Take packet_len and new_packet_len
17429 for binary packets. Call handle_vFile.
17430 (main): Update call to handle_v_requests.
17431
17432 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17433
17434 * linux-low.c: Include <sched.h>.
17435
17436 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17437
17438 * linux-low.c (linux_tracefork_grandchild): New.
17439 (linux_tracefork_child): Use clone.
17440 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17441
17442 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17443
17444 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17445
17446 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17447
17448 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17449
17450 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17451
17452 * inferiors.c (change_inferior_id): Delete.
17453 (add_pid_to_list, pull_pid_from_list): New.
17454 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17455 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17456 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17457 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17458 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17459 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17460 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17461 (using_threads): Always set to 1.
17462 (handle_extended_wait): New.
17463 (add_process): Do not set TID.
17464 (linux_create_inferior): Set must_set_ptrace_flags.
17465 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17466 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17467 (linux_thread_alive): Rename TID argument to LWPID.
17468 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17469 (linux_wait_for_event): Do not use TID or check using_threads. Update
17470 call to dead_thread_notify. Call handle_extended_wait.
17471 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17472 (send_sigstop): Delete sigstop_sent.
17473 (wait_for_sigstop): Avoid TID.
17474 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17475 (linux_test_for_tracefork): New.
17476 (linux_lookup_signals): Use thread_db_active and
17477 linux_supports_tracefork_flag.
17478 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17479 * linux-low.h (get_process_thread): Avoid TID.
17480 (struct process_ifo): Move thread_known and tid to the end. Remove
17481 sigstop_sent.
17482 (linux_attach_lwp, thread_db_init): Update prototypes.
17483 * server.h (change_inferior_id): Delete prototype.
17484 (add_pid_to_list, pull_pid_from_list): New prototypes.
17485 * thread-db.c (thread_db_use_events): New.
17486 (find_first_thread): Rename to...
17487 (find_one_thread): ...this. Update callers and messages. Do not
17488 call fatal. Check thread_db_use_events. Do not call
17489 change_inferior_id or new_thread_notify.
17490 (maybe_attach_thread): Update. Do not call new_thread_notify.
17491 (thread_db_init): Set thread_db_use_events. Check use_events.
17492 * utils.c (fatal, warning): Correct message prefix.
17493
17494 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17495
17496 * Makefile.in (clean): Remove new files.
17497 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17498 (powerpc-64.o, powerpc-64.c): New rules.
17499 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17500 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17501 with SPE.
17502 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17503 SPE targets.
17504 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17505 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17506 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17507 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17508 (target_regsets): Add AltiVec and SPE register sets.
17509 * configure.ac: Check for AltiVec and SPE.
17510 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17511 (ppc_fill_vrregset, ppc_store_vrregset): New.
17512 (target_regsets): Add AltiVec register set.
17513 * configure: Regenerated.
17514
17515 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17516
17517 * linux-low.c (O_LARGEFILE): Define.
17518 (linux_read_memory): Use /proc/PID/mem.
17519 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17520 * configure, config.in: Regenerated.
17521
17522 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17523
17524 * linux-low.c (linux_wait_for_event): Do not pass signals while
17525 single-stepping.
17526
17527 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17528
17529 * win32-low.c (create_process): New.
17530 (win32_create_inferior): Use create_process instead of
17531 CreateProcess. If create_process failed retry appending an ".exe"
17532 suffix. Store the GetLastError result immediatelly after
17533 create_process calls and use it on the call to error.
17534
17535 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17536
17537 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17538
17539 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17540
17541 * configure.ac: Switch license to GPLv3.
17542
17543 2007-08-01 Michael Snyder <msnyder@access-company.com>
17544
17545 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17546
17547 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17548
17549 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17550 typedef.
17551 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17552 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17553 CloseToolhelp32Snapshot.
17554 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17555 CloseToolhelp32Snapshot.
17556
17557 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17558
17559 * server.c (main): Check for inferior exit before main loop.
17560
17561 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17562
17563 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17564 instead of on tmp_desc.
17565
17566 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17567 Daniel Jacobowitz <dan@codesourcery.com>
17568
17569 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17570 (add_thread): Minor cleanups.
17571 (clear_inferiors): Move lower in the file. Clear the DLL
17572 list.
17573 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17574 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17575 (xml_escape_text): New.
17576 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17577 for qSupported.
17578 (handle_v_cont): Report errors.
17579 (gdbserver_version): Update.
17580 (main): Correct size of own_buf. Do not report initial DLL events.
17581 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17582 (unloaded_dll, xml_escape_text): New.
17583 * win32-low.c (enum target_waitkind): Update comments.
17584 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17585 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17586 (win32_EnumProcessModules, win32_GetModuleInformation)
17587 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17588 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17589 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17590 (win32_Module32First, win32_Module32Next, load_toolhelp)
17591 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17592 (get_child_debug_event): Handle DLL events.
17593 (win32_wait): Likewise.
17594
17595 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17596
17597 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17598 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17599
17600 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17601
17602 * win32-low.c (handle_output_debug_string): Ignore event if not
17603 waiting.
17604
17605 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17606
17607 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17608
17609 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17610
17611 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17612
17613 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17614
17615 * inferiors.c (change_inferior_id): Add comment.
17616 * linux-low.c (check_removed_breakpoint): Add an early
17617 prototype. Improve debug output.
17618 (linux_attach): Doc update.
17619 (linux_detach_one_process, linux_detach): Clean up before releasing
17620 each process.
17621 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17622 * linux-low.h (struct process_info): Doc improvement.
17623 * mem-break.c (delete_all_breakpoints): New.
17624 * mem-break.h (delete_all_breakpoints): New prototype.
17625 * thread-db.c (find_first_thread): New.
17626 (thread_db_create_event): Call it instead of
17627 thread_db_find_new_threads. Clean up unused variables.
17628 (maybe_attach_thread): Remove first thread handling.
17629 (thread_db_find_new_threads): Use find_first_thread.
17630 (thread_db_get_tls_address): Likewise.
17631
17632 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17633
17634 * thread-db.c (thread_db_find_new_threads): Add prototype.
17635 (thread_db_create_event): Check for the main thread before adding
17636 a new thread.
17637 (maybe_attach_thread): Only enable event reporting if TID == 0.
17638 (thread_db_get_tls_address): Check for new threads.
17639
17640 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17641
17642 * linux-low.c (linux_create_inferior): Try execv before execvp.
17643 * spu-low.c (spu_create_inferior): Likewise.
17644
17645 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17646
17647 * linux-low.c (linux_create_inferior): Change execv to execvp.
17648 * spu-low.c (spu_create_inferior): Likewies.
17649
17650 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17651
17652 * Makefile.in (clean): Clean new files instead of deleted ones.
17653 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17654 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17655 rules.
17656 * configure.srv: Specify XML files and new regformats for MIPS and
17657 MIPS64 GNU/Linux.
17658 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17659 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17660 an entry for the restart register.
17661 (mips_cannot_fetch_register, mips_cannot_store_register)
17662 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17663 register names to match the XML descriptions.
17664 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17665 restart register instead of $0.
17666
17667 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17668 Markus Deuling <deuling@de.ibm.com>
17669
17670 * remote-utils.c (decode_xfer_write): New function.
17671 * server.h (decode_xfer_write): Add prototype.
17672 * server.c (handle_query): Add PACKET_LEN argument. Support
17673 qXfer:spu:read and qXfer:spu:write packets.
17674 (main): Pass packet_len to handle_query.
17675 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17676 * target.h (target_ops): Add qxfer_spu.
17677
17678 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17679
17680 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17681 accessing non-seekable spufs files.
17682
17683 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17684
17685 * server.c (handle_query): Add reply for qC packet.
17686
17687 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17688 Leo Zayas <lerele@champenstudios@com>
17689
17690 * server.h (check_remote_input_interrupt_request): New function.
17691 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17692 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17693 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17694 (check_remote_input_interrupt_request): New function.
17695 * server.h (check_remote_input_interrupt_request): Declare.
17696 * win32-low.c (winapi_DebugBreakProcess,
17697 winapi_GenerateConsoleCtrlEvent): New typedefs.
17698 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17699 to 250 ms.
17700 (win32_wait): Check for remote interrupt request
17701 with check_remote_input_interrupt_request.
17702 (win32_request_interrupt): New function.
17703 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17704
17705 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17706
17707 * win32-low.c (debug_registers_changed,
17708 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17709 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17710 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17711 (thread_rec): Get context using the low target.
17712 (child_add_thread): Call thread_added on the low target,
17713 which does the same thing.
17714 (regptr): Delete.
17715 (do_initial_child_stuff): Remove debug registers references.
17716 Set context using the low target. Resume threads after
17717 setting the contexts.
17718 (child_continue): Remove dead variable. Remove debug
17719 registers references.
17720 (child_fetch_inferior_registers): Go through the low target.
17721 (do_child_store_inferior_registers): Remove.
17722 (child_store_inferior_registers): Go through the low target.
17723 (win32_resume): Remove debug registers references.
17724 Set context using the low target.
17725 (handle_exception): Change return type to void. Don't record
17726 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17727 first chance exception.
17728 (get_child_debug_event): Change return type to void. Remove
17729 goto loop. Always return after waiting for debug event.
17730 (win32_wait): Convert to switch statement. Handle spurious
17731 events.
17732
17733 * win32-i386-low.c (debug_registers_changed,
17734 debug_registers_used): New.
17735 (initial_stuff): Rename to ...
17736 (i386_initial_stuff): ... this. Clear debug registers
17737 state variables.
17738 (store_debug_registers): Delete.
17739 (i386_get_thread_context): New.
17740 (load_debug_registers): Delete.
17741 (i386_set_thread_context): New.
17742 (i386_thread_added): New.
17743 (single_step): Rename to ...
17744 (i386_single_step): ... this.
17745 (do_fetch_inferior_registers): Rename to ...
17746 (i386_fetch_inferior_register): ... this.
17747 (i386_store_inferior_register): New.
17748 (the_low_target): Adapt to new interface.
17749
17750 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17751 (arm_get_thread_context): New.
17752 (arm_set_thread_context): New.
17753 (regptr): New.
17754 (do_fetch_inferior_registers): Rename to ...
17755 (arm_fetch_inferior_register): ... this.
17756 (arm_store_inferior_register): New.
17757 (arm_wince_breakpoint): Reimplement as unsigned long.
17758 (arm_wince_breakpoint_len): Define.
17759 (the_low_target): Adapt to new interface.
17760
17761 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17762 load_debug_registers. Add get_thread_context, set_thread_context,
17763 thread_added and store_inferior_register. Rename
17764 fetch_inferior_registers to fetch_inferior_register.
17765 (regptr): Remove declaration.
17766
17767 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17768
17769 * linux-low.c (linux_detach): Change return type to int. Return 0.
17770 * spu-low.c (spu_detach): Likewise.
17771
17772 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17773
17774 * target.h (target_ops): Change return type of detach to int.
17775 Add join.
17776 (join_inferior): New.
17777 * server.c (main): Don't skip detach support on mingw32.
17778 If the inferior doesn't support detaching return error.
17779 Call join_inferior instead of using waitpid.
17780 * linux-low.c (linux_join): New.
17781 (linux_target_op): Add linux_join.
17782 * spu-low.c (spu_join): New.
17783 (spu_target_ops): Add spu_join.
17784 * win32-low.c (win32_detach): Adapt to new interface.
17785 Reopen current_process_handle before detaching. Issue a child
17786 resume before detaching.
17787 (win32_join): New.
17788 (win32_target_op): Add win32_join.
17789
17790 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17791
17792 * win32-low.c (win32-attach): Fix return value.
17793 * target.h (target_ops): Describe ATTACH return values.
17794
17795 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17796
17797 * win32-low.c (GETPROCADDRESS): Define.
17798 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17799 (winapi_DebugSetProcessKillOnExit): Likewise.
17800 (win32_create_inferior): Force usage of ansi CreateProcessA.
17801 (win32_attach): Use GETPROCADDRESS.
17802 (win32_detach): Likewise.
17803
17804 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17805
17806 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17807
17808 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17809
17810 * win32-low.c: Commit leftover changes from 2007-03-29.
17811
17812 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17813
17814 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17815 fields short instead of int. Add explicit padding.
17816 (i387_cache_to_fsave): Remove unnecessary casts.
17817 (i387_fsave_to_cache): Doc fix.
17818 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17819
17820 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17821
17822 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17823 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17824
17825 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17826
17827 * configure.srv (arm*-*-mingw32ce*): Move near the other
17828 arm targets.
17829
17830 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17831
17832 * configure.ac: Add errno checking.
17833 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17834 sys/file.h and malloc.h.
17835 (AC_CHECK_DECLS): Add perror.
17836 (srv_mingwce): Handle.
17837 * configure.srv (i[34567]86-*-cygwin*): Add
17838 win32-i386-low.o to srv_tgtobj.
17839 (i[34567]86-*-mingw*): Likewise.
17840 (arm*-*-mingw32ce*): Add case.
17841 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17842 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17843 [__MINGW32CE__] (strerror): New function.
17844 [__MINGW32CE__] (errno): Define to GetLastError.
17845 [__MINGW32CE__] (COUNTOF): New macro.
17846 (remote_open): Remove extra close call.
17847 * mem-break.c (delete_breakpoint_at): New function.
17848 * mem-break.h (delete_breakpoint_at): Declare.
17849 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17850 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17851 [USE_WIN32API] (read, write): Add char* casts.
17852 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17853 * server.h: Include wincecompat.h on Windows CE.
17854 [HAVE_ERRNO_H]: Check.
17855 (perror): Declare if not declared.
17856 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17857 (perror_with_name): Remove errno declaration.
17858 * wincecompat.h: New.
17859 * wincecompat.c: New.
17860 * win32-low.h: New.
17861 * win32-arm-low.c: New.
17862 * win32-i386-low.c: New.
17863 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17864 (OUTMSG2): Make it safe.
17865 (_T): New macro.
17866 (COUNTOF): New macro.
17867 (NUM_REGS): Get it from the low target.
17868 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17869 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17870 (thread_rec): Let low target handle debug registers.
17871 (child_add_thread): Likewise.
17872 (child_init_thread_list): Likewise.
17873 (continue_one_thread): Likewise.
17874 (regptr): New.
17875 (do_child_fetch_inferior_registers): Move to ...
17876 * win32-i386-low.c: ... here, and rename to ...
17877 (do_fetch_inferior_registers): ... this.
17878 * win32-low.c (child_fetch_inferior_registers):
17879 Go through the low target.
17880 (do_child_store_inferior_registers): Use regptr.
17881 (strwinerror): New function.
17882 (win32_create_inferior): Handle Windows CE.
17883 Use strwinerror instead of strerror on Windows error
17884 codes. Add program to the error output.
17885 Don't close the main thread handle on Windows CE.
17886 (win32_attach): Use coredll.dll on Windows CE.
17887 (win32_kill): Close current process and current
17888 thread handles.
17889 (win32_detach): Use coredll.dll on Windows CE.
17890 (win32_resume): Let low target handle debug registers, and
17891 step request.
17892 (handle_exception): Add/Remove initial breakpoint. Avoid
17893 non-existant WSTOPSIG on Windows CE.
17894 (win32_read_inferior_memory): Cast to remove warning.
17895 (win32_arch_string): Go through the low target.
17896 (initialize_low): Call set_breakpoint_data with the low
17897 target's breakpoint.
17898 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17899 FOP_REGNUM, mappings): Move to ...
17900 * win32-i386-low.c: ... here.
17901 * win32-low.c (win32_thread_info): Move to ...
17902 * win32-low.h: ... here.
17903 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17904 win32-arm-low.c and wincecompat.c.
17905 (all:): Add $EXEEXT.
17906 (install-only:): Likewise.
17907 (gdbserver:): Likewise.
17908 (gdbreplay:): Likewise.
17909 * config.in: Regenerate.
17910 * configure: Regenerate.
17911
17912 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17913
17914 * win32-low.c: Rename typedef thread_info to
17915 win32_thread_info throughout.
17916
17917 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17918
17919 * win32-i386-low.c: Rename to ...
17920 * win32-low.c: ... this.
17921 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17922 * Makefile.in: Likewise.
17923
17924 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17925
17926 * remote-utils.c (monitor_output): Constify msg parameter.
17927 * server.h (monitor_output): Likewise.
17928 * win32-i386-low.c (handle_output_debug_string): New.
17929 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17930 handle_output_debug_string.
17931 (get_child_debug_event): Likewise.
17932
17933 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17934
17935 * server.c (main): Correct strtoul check.
17936
17937 2007-03-27 Jon Ringle <jon@ringle.org>
17938
17939 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17940
17941 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17942
17943 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17944
17945 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17946
17947 * terminal.h: Check HAVE_SGTTY_H.
17948
17949 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17950
17951 * remote-utils.c (remote_open): Print out the assigned port number.
17952
17953 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17954
17955 * remote-utils.c (monitor_output): New function.
17956 * server.c (debug_threads): Define here.
17957 (monitor_show_help): New function.
17958 (handle_query): Handle qRcmd.
17959 (main): Do not handle 'd' packet.
17960 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17961 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17962 of debug_threads.
17963
17964 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17965
17966 * Makefile.in (EXEEXT): New.
17967 (clean): Use $(EXEEXT).
17968
17969 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17970
17971 * target.h (target_ops): Rename send_signal to request_interrupt,
17972 and remove enum target_signal parameter.
17973 * linux-low.c (linux_request_interrupt): Rename from
17974 linux_send_signal, and always send SIGINT.
17975 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17976 and always send SIGINT.
17977 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17978 of send_signal.
17979 (input_interrupt): Likewise.
17980
17981 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17982
17983 * server.c (get_features_xml): Check if target implemented
17984 arch_string.
17985 * win32-i386-low.c (win32_arch_string): New.
17986 (win32_target_ops): Add win32_arch_string as arch_string member.
17987
17988 2007-02-22 Markus Deuling <deuling@de.ibm.com>
17989
17990 * spu-low.c (spu_arch_string): New.
17991 (spu_target_ops): Add spu_arch_string.
17992
17993 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
17994
17995 * remote-utils.c: Remove HAVE_TERMINAL_H check.
17996 * configure.ac: Do not check for terminal.h.
17997 * configure, config.in: Regenerated.
17998
17999 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18000
18001 * Makefile.in (OBS): Add $(XML_BUILTIN).
18002 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18003 (clean): Update.
18004 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18005 (arm-with-iwmmxt.c): New.
18006 * config.in, configure: Regenerate.
18007 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18008 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18009 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18010 (arm*-*-linux*): Add iWMMXt and regset support.
18011 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18012 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18013 (arm_store_wmmxregset, target_regsets): New.
18014 * server.c (get_features_xml): Take annex argument. Check builtin
18015 XML documents.
18016 (handle_query): Handle multiple annexes.
18017
18018 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18019
18020 * remote-utils.c [USE_WIN32API] (read, write): Define.
18021 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18022 write.
18023
18024 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18025
18026 * linux-i386-low.c (the_low_target): Set arch_string.
18027 * linux-x86-64-low.c (the_low_target): Likewise.
18028 * linux-low.c (linux_arch_string): New.
18029 (linux_target_ops): Add it.
18030 * linux-low.h (struct linux_target_ops): Add arch_string.
18031 * server.c (write_qxfer_response): Use const void * for DATA.
18032 (get_features_xml): New.
18033 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18034 * target.h (struct target_ops): Add arch_string method.
18035
18036 2007-01-03 Denis Pilat <denis.pilat@st.com>
18037 Daniel Jacobowitz <dan@codesourcery.com>
18038
18039 * linux-low.c (linux_kill): Handle being called with no threads.
18040 * win32-i386-low.c (win32_kill): Likewise.
18041 (get_child_debug_event): Clear current_process_handle.
18042
18043 2006-12-30 Denis PILAT <denis.pilat@st.com>
18044 Daniel Jacobowitz <dan@codesourcery.com>
18045
18046 * remote-utils.c (remote_open): Check the type of specified
18047 serial port devices before opening them.
18048 * server.c (main): Kill the inferior if an error occurs during
18049 the first remote_open.
18050
18051 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18052
18053 * README: Update supported targets.
18054
18055 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18056
18057 * Makefile.in (clean): Remove reg-mips64.c.
18058 (reg-mips64.c, reg-mips64.o): New rules.
18059 * configure.srv: Handle mips64. Include regset support for mips.
18060 * linux-mips-low.c (union mips_register): New.
18061 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18062 (mips_breakpoint, mips_breakpoint_at): Use int.
18063 (mips_collect_register, mips_supply_register)
18064 (mips_collect_register_32bit, mips_supply_register_32bit)
18065 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18066 (mips_store_fpregset, target_regsets): New.
18067 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18068
18069 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18070
18071 * configure.srv: Add target "spu*-*-*".
18072 * Makefile.in (clean): Remove reg-spu.c.
18073 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18074 * spu-low.c: New file.
18075
18076 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18077
18078 * configure.ac: Correct td_thr_tls_get_addr test.
18079 * configure: Regenerated.
18080
18081 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18082
18083 * linux-low.c (linux_wait_for_event): Reformat. Use the
18084 pass_signals array.
18085 * remote-utils.c (decode_address_to_semicolon): New.
18086 * server.c (pass_signals, handle_general_set): New.
18087 (handle_query): Mention QPassSignals for qSupported.
18088 (main): Call handle_general_set.
18089 * server.h (pass_signals, decode_address_to_semicolon): New.
18090
18091 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18092
18093 * server.c (handle_query): Correct error handling for read_auxv.
18094
18095 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18096
18097 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18098 and srv_linux_thread_db to yes.
18099 * linux-s390-low.c (s390_fill_gregset): New function.
18100 (target_regsets): Define data structure.
18101
18102 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18103
18104 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18105 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18106 * config.in, configure: Regenerated.
18107 * inferiors.c (gdb_id_to_thread): New function.
18108 (gdb_id_to_thread_id): Use it.
18109 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18110 * linux-low.h (struct process_info): Add th member.
18111 (thread_db_get_tls_address): New prototype.
18112 * remote-utils.c (decode_address): Make non-static.
18113 * server.c (handle_query): Handle qGetTLSAddr.
18114 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18115 * target.h (struct target_ops): Add get_tls_address.
18116 * thread-db.c (maybe_attach_thread): Save the thread handle.
18117 (thread_db_get_tls_address): New.
18118
18119 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18120
18121 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18122 (linux_resume_one_process): Take a siginfo_t *. Update all
18123 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18124 (struct pending_signals): Add a siginfo_t.
18125 (linux_wait_for_process): Always set last_status.
18126 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18127 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18128 * linux-low.h (struct process_info): Add last_status.
18129
18130 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18131
18132 * remote-utils.c (try_rle): New function.
18133 (putpkt_binary): Use it.
18134
18135 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18136
18137 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18138 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18139 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18140 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18141 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18142 point registers.
18143
18144 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18145
18146 * server.c (terminal_fd): New variable.
18147 (old_foreground_pgrp): Likewise.
18148 (restore_old_foreground_pgrp): New function.
18149 (start_inferior): Record the terminal file descriptor in terminal_fd
18150 and its original foreground group in old_foreground_pgrp. Register
18151 restore_old_foreground_pgrp with atexit().
18152
18153 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18154
18155 * server.c (handle_query): Correct qPart to qXfer.
18156
18157 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18158
18159 * configure.ac: Check for more headers which are missing on
18160 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18161 * configure.srv: Add Cygwin and mingw32.
18162 * remote-utils.c: Don't include headers unconditionally which
18163 are missing on mingw32. Include <winsock.h> for mingw32.
18164 (remote_open): Adjust for mingw32 support. Flush
18165 standard error after writing to it.
18166 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18167 (unblock_async_io, enable_async_io, disable_async_io)
18168 (readchar, getpkt): Update for Winsock support.
18169 (prepare_resume_reply): Expect a protocol signal number.
18170 * server.c: Disable <sys/wait.h> on mingw32.
18171 (start_inferior): Adjust for mingw32 support. Flush
18172 standard error after writing to it.
18173 (attach_inferior): Likewise. Use protocol signal
18174 numbers.
18175 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18176 and names.
18177 * win32-i386-low.c: New file.
18178 * Makefile.in (XM_CLIBS): Set.
18179 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18180 (win32-i386-low.o): New dependency rule.
18181 * linux-low.c (linux_wait): Use target signal numbers.
18182 * target.h (struct target_ops): Doc fix.
18183 * server.h (target_signal_to_name): New prototype.
18184 * gdbreplay.c: Don't include headers unconditionally which
18185 are missing on mingw32. Include <winsock.h> for mingw32.
18186 (remote_close, remote_open): Adjust for Winsock support.
18187 * configure, config.in: Regenerated.
18188
18189 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18190
18191 * server.c (decode_xfer_read, write_qxfer_response): New.
18192 (handle_query): Take a packet length argument. Handle
18193 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18194 the qSupported response.
18195 (main): Update call to handle_query.
18196
18197 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18198
18199 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18200 (putpkt_binary): Renamed from putpkt and adjusted for binary
18201 data.
18202 (putpkt): New wrapper for putpkt_binary.
18203 (readchar): Don't mask off the high bit.
18204 (decode_X_packet): New function.
18205 * server.c (main): Call putpkt_binary if a handler sets the packet
18206 length. Save the length of the incoming packet. Handle 'X'.
18207 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18208
18209 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18210
18211 * server.c (handle_query): Handle qSupported.
18212
18213 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18214
18215 * remote-utils.c (all_symbols_looked_up): New variable.
18216 (look_up_one_symbol): Check it.
18217 * server.h (look_up_one_symbol): New declaration.
18218 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18219
18220 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18221
18222 * Makefile.in (linux-arm-low.o): Update dependencies.
18223 * linux-arm-low.c: Include "gdb_proc_service.h".
18224 (PTRACE_GET_THREAD_AREA): Define.
18225 (ps_get_thread_area): New function.
18226
18227 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18228
18229 * configure.srv (m68k*-*-uclinux*): New target.
18230 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18231 (linux_resume_one_process): Remove extraneous cast.
18232 (linux_read_offsets): New.
18233 (linux_target_op): Add linux_read_offsets on mmuless systems.
18234 * server.c (handle_query): Add qOffsets logic.
18235 * target.h (struct target_ops): Add read_offsets.
18236
18237 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18238
18239 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18240 (PTRACE_GET_THREAD_AREA): Define.
18241 (ps_get_thread_area): New function.
18242 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18243 (linux-x86-64-low.o): Update.
18244
18245 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18246
18247 * configure.ac: Remove checks for prfpregset_t.
18248 * gdb_proc_service.h: New file.
18249 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18250 new "gdb_proc_service.h".
18251 * proc-service.c: Likewise.
18252 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18253 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18254 * Makefile.in (gdb_proc_service_h): Updated.
18255 * configure, config.in: Regenerated.
18256
18257 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18258
18259 * remote-utils.c (prepare_resume_reply): Move declaration
18260 of gdb_id_from_wait to the top of the block.
18261
18262 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18263
18264 * linux-low.c (regsets_store_inferior_registers): Read the regset
18265 from the target before filling it.
18266
18267 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18268
18269 * server.c (attach_inferior): Return SIGTRAP for a successful
18270 attach.
18271
18272 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18273
18274 * Makefile.in (OBS): Add version.o.
18275 (STAGESTUFF): Delete.
18276 (version.o): Add dependencies.
18277 (version.c): Replace rule.
18278 (clean): Remove version.c.
18279 * server.c (gdbserver_version): New.
18280 (gdbserver_usage): Use printf.
18281 (main): Handle --version and --help.
18282 * server.h (version, host_name): Add declarations.
18283
18284 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18285
18286 * linux-arm-low.c:
18287 * linux-arm-low.c:
18288 * inferiors.c:
18289 * i387-fp.h:
18290 * i387-fp.c:
18291 * gdbreplay.c:
18292 * regcache.c:
18293 * proc-service.c:
18294 * mem-break.h:
18295 * mem-break.c:
18296 * linux-x86-64-low.c:
18297 * linux-sh-low.c:
18298 * linux-s390-low.c:
18299 * linux-ppc64-low.c:
18300 * linux-ppc-low.c:
18301 * linux-mips-low.c:
18302 * linux-m68k-low.c:
18303 * linux-m32r-low.c:
18304 * linux-low.h:
18305 * linux-low.c:
18306 * linux-ia64-low.c:
18307 * linux-i386-low.c:
18308 * linux-crisv32-low.c:
18309 * thread-db.c:
18310 * terminal.h:
18311 * target.h:
18312 * target.c:
18313 * server.h:
18314 * server.c:
18315 * remote-utils.c:
18316 * regcache.h:
18317 * utils.c:
18318 * Makefile.in:
18319 * configure.ac:
18320 * gdbserver.1: Add (C) after Copyright. Update the FSF
18321 address.
18322
18323 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18324
18325 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18326 (arm_breakpoint_at): Recognize both breakpoints.
18327 (the_low_target): Use the correct breakpoint instruction.
18328
18329 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18330
18331 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18332 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18333 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18334 (the_low_target): Update.
18335
18336 2005-10-25 Andreas Schwab <schwab@suse.de>
18337
18338 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18339
18340 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18341 (ia64_num_regs): Reduce to 462.
18342
18343 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18344
18345 * acinclude.m4: Correct quoting.
18346 * aclocal.m4: Regenerated.
18347
18348 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18349 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18350 (thread_db_init): Call thread_db_err_str.
18351 * configure.ac: Check for TD_VERSION.
18352 * config.in, configure: Regenerated.
18353
18354 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18355
18356 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18357
18358 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18359
18360 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18361 is not available. Define HAVE_PTRACE_GETREGS if it is.
18362 * config.in, configure: Regenerated.
18363 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18364 * linux-i386-low.c, linux-m68k-low.c: Update to use
18365 HAVE_PTRACE_GETREGS.
18366 * linux-low.c (regsets_fetch_inferior_registers)
18367 (regsets_store_inferior_registers): Only return 0 if we processed
18368 GENERAL_REGS.
18369 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18370 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18371
18372 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18373
18374 * inferiors.c (struct thread_info): Add gdb_id.
18375 (add_thread): Add gdb_id argument.
18376 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18377 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18378 calls to add_thread.
18379 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18380 * server.c (handle_query): Use thread_to_gdb_id.
18381 (handle_v_cont, main): Use gdb_id_to_thread_id.
18382 * server.h (add_thread): Update prototype.
18383 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18384 prototypes.
18385
18386 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18387
18388 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18389 left-padded registers.
18390 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18391 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18392
18393 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18394
18395 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18396 * configure: Regenerate.
18397 * config.in: Regenerate.
18398 * server.h (NEED_DECLARATION_STRERROR):
18399 Replace with !HAVE_DECL_STRERROR.
18400
18401 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18402
18403 * linux-low.c (linux_wait, linux_send_signal): Don't test
18404 an unsigned long variable for > 0 if it could be MAX_ULONG.
18405 * server.c (myresume): Likewise.
18406 * target.c (set_desired_inferior): Likewise.
18407
18408 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18409
18410 * configure.ac: Simplify and improve check for socklen_t.
18411 * configure, config.in: Regenerate.
18412
18413 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18414
18415 * acconfig.h: Remove.
18416 * configure.ac: Add a test for socklen_t. Use three-argument
18417 AC_DEFINE throughout.
18418 * config.in: Regenerated using autoheader 2.59.
18419 * configure: Regenerated.
18420
18421 * gdbreplay.c (socklen_t): Provide a default.
18422 (remote_open): Use socklen_t.
18423 * remote-utils.c (socklen_t): Provide a default.
18424 (remote_open): Use socklen_t.
18425 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18426 unsigned char.
18427
18428 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18429 char for buffers.
18430 * linux-low.c (linux_read_memory, linux_write_memory)
18431 (linux_read_auxv): Likewise.
18432 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18433 (check_mem_write): Likewise.
18434 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18435 Likewise.
18436 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18437 (registers_from_string, register_data): Likewise.
18438 * server.c (handle_query, main): Likewise.
18439 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18440 (decode_M_packet): Likewise.
18441 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18442 * target.h (struct target_ops): Update read_memory, write_memory,
18443 and read_auxv.
18444 (read_inferior_memory, write_inferior_memory): Update.
18445 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18446 to unsigned char *.
18447 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18448 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18449 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18450 linux-s390-low.c, linux-sh-low.c: Update for changes in
18451 read_inferior_memory and the_low_target->breakpoint.
18452
18453 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18454
18455 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18456 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18457 * configure.srv: Add powerpc64-*-linux*.
18458 * linux-ppc64-low.c: New file.
18459
18460 2005-05-23 Orjan Friberg <orjanf@axis.com>
18461
18462 * linux-cris-low.c: New file with support for CRIS.
18463 * linux-crisv32-low.c: Ditto for CRISv32.
18464 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18465 (clean): Add reg-cris.c and reg-crisv32.c.
18466 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18467 reg-crisv32.o, and reg-crisv32.c to make rules.
18468 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18469 recognized targets.
18470
18471 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18472
18473 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18474 of sizeof (PTRACE_XFER_TYPE).
18475 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18476
18477 2005-05-12 Orjan Friberg <orjanf@axis.com>
18478
18479 * target.h (struct target_ops): Add insert_watchpoint,
18480 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18481 pointers for hardware watchpoint support.
18482 * linux-low.h (struct linux_target_ops): Ditto.
18483 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18484 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18485 to linux_target_ops.
18486 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18487 reply packet.
18488 * server.c (main): Recognize 'Z' and 'z' packets.
18489
18490 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18491
18492 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18493 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18494 (the_low_target): Add new members.
18495
18496 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18497
18498 * proc-service.c (ps_lgetregs): Search all_processes instead of
18499 all_threads.
18500
18501 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18502
18503 * server.c (start_inferior): Change return type to int.
18504 (attach_inferior): Change sigptr to int *.
18505 (handle_v_cont, handle_v_requests): Change signal to int *.
18506 (main): Change signal to int.
18507
18508 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18509
18510 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18511 * configure.srv: Add m32r*-*-linux*.
18512 * linux-m32r-low.c: New file.
18513
18514 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18515
18516 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18517
18518 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18519
18520 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18521 Take unsigned long arguments for PIDs.
18522 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18523 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18524 (wait_for_sigstop, linux_resume_one_process)
18525 (regsets_fetch_inferior_registers, linux_send_signal)
18526 (linux_read_auxv): Likewise. Update the types of variables holding
18527 PIDs. Update format string specifiers.
18528 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18529 * remote-utils.c (prepare_resume_reply): Likewise.
18530 * server.c (cont_thread, general_thread, step_thread)
18531 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18532 unsigned long.
18533 (handle_query): Update format specifiers.
18534 (handle_v_cont, main): Use strtoul for thread IDs.
18535 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18536 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18537 (general_thread, step_thread, thread_from_wait)
18538 (old_thread_from_wait): Update.
18539 * target.h (struct thread_resume): Use unsigned long for THREAD.
18540 (struct target_ops): Use unsigned long for arguments to attach and
18541 thread_alive.
18542
18543 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18544
18545 * acinclude.m4: Include bfd/bfd.m4 directly.
18546 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18547 <agriffis@toolchain.org>.
18548 * aclocal.m4, configure: Regenerated.
18549
18550 2005-01-07 Andrew Cagney <cagney@gnu.org>
18551
18552 * configure.ac: Rename configure.in, require autoconf 2.59.
18553 * configure: Re-generate.
18554
18555 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18556
18557 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18558 LIBS when finished.
18559 * aclocal.m4: Regenerated.
18560 * configure: Regenerated.
18561
18562 2004-11-21 Andreas Schwab <schwab@suse.de>
18563
18564 * linux-m68k-low.c (m68k_num_gregs): Define.
18565 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18566 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18567 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18568 (m68k_breakpoint_at): New. Add to the_low_target.
18569
18570 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18571 srv_linux_thread_db to yes.
18572
18573 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18574
18575 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18576 (ARCH_SET_FS): Likewise.
18577 (ARCH_GET_FS): Likewise.
18578 (ARCH_GET_GS): Likewise.
18579
18580 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18581
18582 * linux-i386-low.c (ps_get_thread_area): New.
18583 * linux-x86-64-low.c (ps_get_thread_area): New.
18584 * linux-low.c: Include <sys/syscall.h>.
18585 (linux_kill_one_process): Don't kill the first thread here.
18586 (linux_kill): Kill the first thread here.
18587 (kill_lwp): New function.
18588 (send_sigstop, linux_send_signal): Use it.
18589 * proc-service.c: Clean up #ifdefs.
18590 (fpregset_info): Delete.
18591 (ps_lgetregs): Update and enable implementation.
18592 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18593 implementations.
18594 * remote-utils.c (struct sym_cache, symbol_cache): New.
18595 (input_interrupt): Print a clearer message.
18596 (async_io_enabled): New variable.
18597 (enable_async_io, disable_async_io): Use it. Update comments.
18598 (look_up_one_symbol): Use the symbol cache.
18599 * thread-db.c (thread_db_look_up_symbols): New function.
18600 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18601
18602 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18603
18604 * configure.in: Test for -rdynamic.
18605 * configure: Regenerated.
18606 * Makefile (INTERNAL_LDFLAGS): New.
18607 (gdbserver, gdbreplay): Use it.
18608
18609 2004-09-02 Andrew Cagney <cagney@gnu.org>
18610
18611 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18612
18613 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18614
18615 * linux-low.c (linux_wait): Clear all_processes list also.
18616
18617 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18618
18619 * linux-low.c: Include <errno.h>. Remove extern declaration of
18620 errno.
18621
18622 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18623
18624 * gdbreplay.c, server.h, utils.c: Update copyright years.
18625
18626 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18627
18628 * server.c (main): Print child status or termination signal from
18629 variable 'signal', not 'sig'.
18630
18631 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18632
18633 * linux-low.c (linux_read_memory): Change return type to
18634 int. Check for and return error from ptrace().
18635 * target.c (read_inferior_memory): Change return type to int. Pass
18636 back return status from the_target->read_memory().
18637 * target.h (struct target_ops): Adapt *read_memory() prototype.
18638 Update comment.
18639 (read_inferior_memory): Adapt prototype.
18640 * server.c (main): Return an error packet if
18641 read_inferior_memory() returns an error.
18642
18643 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18644
18645 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18646 Unify with other clean targets.
18647
18648 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18649
18650 * server.c (handle_v_cont): Call set_desired_inferior.
18651
18652 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18653
18654 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18655
18656 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18657
18658 * linux-low.c (linux_wait): Unblock async I/O.
18659 (linux_resume): Block and enable async I/O.
18660 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18661 * server.h (block_async_io, unblock_async_io): Add prototypes.
18662
18663 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18664
18665 * remote-utils.c (remote_open): Print a status notice after
18666 opening a TCP port.
18667 * server.c (attach_inferior): Print a status notice after
18668 attaching.
18669
18670 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18671
18672 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18673
18674 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18675
18676 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18677 error packet.
18678 * server.c, target.h: Update copyright years.
18679
18680 2004-02-25 Roland McGrath <roland@redhat.com>
18681
18682 * target.h (struct target_ops): New member `read_auxv'.
18683 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18684 * linux-low.c (linux_read_auxv): New function.
18685 (linux_target_ops): Initialize `read_auxv' member to that.
18686
18687 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18688
18689 Committed by Jim Blandy <jimb@redhat.com>.
18690
18691 * linux-s390-low.c (s390_num_regs): Update.
18692 (s390_regmap): Remove control registers. Use __s390x__ predefine
18693 instead of GPR_SIZE to distiguish s390 and s390x targets.
18694
18695 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18696
18697 * linux-low.c: Update copyright year.
18698 (check_removed_breakpoint): Clear pending_is_breakpoint.
18699 (linux_set_resume_request, linux_queue_one_thread)
18700 (resume_status_pending_p): New functions.
18701 (linux_continue_one_thread): Use process->resume.
18702 (linux_resume): Only resume threads if there are no pending events.
18703 * linux-low.h (struct process_info): Add resume request
18704 pointer.
18705
18706 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18707
18708 * regcache.c (new_register_cache): Clear the allocated register
18709 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18710
18711 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18712
18713 * linux-low.c (linux_resume): Take a struct thread_resume *
18714 argument.
18715 (linux_wait): Update call.
18716 (resume_ptr): New static variable.
18717 (linux_continue_one_thread): Renamed from
18718 linux_continue_one_process. Use resume_ptr.
18719 (linux_resume): Use linux_continue_one_thread.
18720 * server.c (handle_v_cont, handle_v_requests): New functions.
18721 (myresume): New function.
18722 (main): Handle 'v' case.
18723 * target.h (struct thread_resume): New type.
18724 (struct target_ops): Change argument of "resume" to struct
18725 thread_resume *.
18726 (myresume): Delete macro.
18727
18728 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18729
18730 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18731 (uninstall): Support DESTDIR.
18732
18733 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18734
18735 * configure.srv: Add xscale*linux copy of arm*linux entry.
18736
18737 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18738
18739 * linux-arm-low.c (arm_reinsert_addr): New function.
18740 (the_low_target): Add arm_reinsert_addr.
18741
18742 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18743
18744 * mem-break.c: Remove whitespace at end of file.
18745
18746 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18747
18748 * configure.in: Check whether we need to prototype strerror.
18749 * server.h: Optionally prototype strerror.
18750 * gdbreplay.c (perror_with_name): Use strerror.
18751 * linux-low.c (linux_attach_lwp): Use strerror.
18752 * utils.c (perror_with_name): Use strerror.
18753 * config.in, configure: Regenerated.
18754
18755 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18756
18757 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18758 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18759
18760 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18761
18762 * Makefile.in (SFILES): Update.
18763 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18764 low-sun3.c: Remove files.
18765
18766 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18767
18768 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18769 (linux_detach_one_process, linux_detach): New functions.
18770 (linux_target_ops): Add linux_detach.
18771 * server.c (main): Handle 'D' packet.
18772 * target.h (struct target_ops): Add "detach" member.
18773 (detach_inferior): Define.
18774
18775 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18776
18777 From Kelley Cook <kelleycook@wideopenwest.com>:
18778 * configure.srv: Accept i[34567]86 variants.
18779
18780 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18781
18782 * linux-low.c (linux_wait_for_event): Correct comment typos.
18783 (linux_resume_one_process): Call check_removed_breakpoint.
18784 (linux_send_signal): New function.
18785 (linux_target_ops): Add linux_send_signal.
18786 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18787 of kill.
18788 * target.h (struct target_ops): Add send_signal.
18789
18790 2003-05-29 Jim Blandy <jimb@redhat.com>
18791
18792 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18793 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18794 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18795 away part of the register's value.
18796
18797 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18798
18799 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18800 (linux_wait_for_event, linux_init_signals): Likewise.
18801
18802 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18803
18804 * configure.in: Check for stdlib.h.
18805 * configure: Regenerated.
18806 * config.in: Regenerated.
18807
18808 2003-01-04 Andreas Schwab <schwab@suse.de>
18809
18810 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18811
18812 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18813
18814 * Makefile.in: Remove obsolete code.
18815
18816 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18817
18818 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18819 defined(PT_FPR0_HI).
18820
18821 2002-11-17 Stuart Hughes <seh@zee2.com>
18822
18823 * linux-arm-low.c (arm_num_regs): Increase.
18824 (arm_regmap): Include status register.
18825
18826 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18827
18828 * linux-low.c (register_addr): Remove incorrect -1 check.
18829
18830 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18831
18832 * linux-low.c (linux_create_inferior): Call setpgid. Return
18833 the new PID.
18834 (unstopped_p, linux_signal_pid): Remove.
18835 (linux_target_ops): Remove linux_signal_pid.
18836 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18837 global instead of target method.
18838 * target.h (struct target_ops): Remove signal_pid. Update comment
18839 for create_inferior.
18840 * server.c (signal_pid): New variable.
18841 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18842 gdbserver. Set the child to be the foreground process group.
18843 (attach_inferior): Set signal_pid.
18844
18845 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18846
18847 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18848
18849 2002-08-20 Jim Blandy <jimb@redhat.com>
18850
18851 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18852 default for this.
18853
18854 2002-08-01 Andrew Cagney <cagney@redhat.com>
18855
18856 * Makefile.in: Make chill references obsolete.
18857
18858 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18859
18860 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18861 * configure: Regenerate.
18862 * config.in: Regenerate.
18863
18864 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18865
18866 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18867 (perror_with_name, remote_close, remote_open, expect, play): Static.
18868
18869 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18870
18871 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18872 byte offsets instead of an array of indexes.
18873 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18874
18875 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18876
18877 * regcache.c: Add comment.
18878
18879 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18880
18881 * thread-db.c: New file.
18882 * proc-service.c: New file.
18883 * acinclude.m4: New file.
18884 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18885 proc-service.o, and thread-db.o.
18886 (linux-low.o): Add USE_THREAD_DB.
18887 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18888 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18889 * aclocal.m4: Regenerated.
18890 * config.in: Regenerated.
18891 * configure: Regenerated.
18892 * configure.in: Check for proc_service.h, sys/procfs.h,
18893 thread_db.h, and linux/elf.h headrs.
18894 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18895 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18896 Check for -lthread_db and thread support.
18897 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18898 PowerPC, and SuperH.
18899 * i387-fp.c: Constify arguments.
18900 * i387-fp.h: Likewise.
18901 * inferiors.c: (struct thread_info): Renamed from
18902 `struct inferior_info'. Remove PID member. Use generic inferior
18903 list header. All uses updated.
18904 (inferiors, signal_pid): Removed.
18905 (all_threads): New variable.
18906 (get_thread): Define.
18907 (add_inferior_to_list): New function.
18908 (for_each_inferior): New function.
18909 (change_inferior_id): New function.
18910 (add_inferior): Removed.
18911 (remove_inferior): New function.
18912 (add_thread): New function.
18913 (free_one_thread): New function.
18914 (remove_thread): New function.
18915 (clear_inferiors): Use for_each_inferior and free_one_thread.
18916 (find_inferior): New function.
18917 (find_inferior_id): New function.
18918 (inferior_target_data): Update argument type.
18919 (set_inferior_target_data): Likewise.
18920 (inferior_regcache_data): Likewise.
18921 (set_inferior_regcache_data): Likewise.
18922 * linux-low.c (linux_bp_reinsert): Remove.
18923 (all_processes, stopping_threads, using_thrads)
18924 (struct pending_signals, debug_threads, pid_of): New.
18925 (inferior_pid): Replace with macro.
18926 (struct inferior_linux_data): Remove.
18927 (get_stop_pc, add_process): New functions.
18928 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18929 Use add_process and add_thread.
18930 (linux_attach_lwp): New function, based on old linux_attach. Use
18931 add_process and add_thread. Set stop_expected for new threads.
18932 (linux_attach): New function.
18933 (linux_kill_one_process): New function.
18934 (linux_kill): Kill all LWPs.
18935 (linux_thread_alive): Use find_inferior_id.
18936 (check_removed_breakpoints, status_pending_p): New functions.
18937 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18938 Update. Use WNOHANG. Wait for cloned processes also. Update process
18939 struct for the found process.
18940 (linux_wait_for_event): New function.
18941 (linux_wait): Use it. Support LWPs.
18942 (send_sigstop, wait_for_sigstop, stop_all_processes)
18943 (linux_resume_one_process, linux_continue_one_process): New functions.
18944 (linux_resume): Support LWPs.
18945 (REGISTER_RAW_SIZE): Remove.
18946 (fetch_register): Use register_size instead. Call supply_register.
18947 (usr_store_inferior_registers): Likewise. Call collect_register.
18948 Fix recursive case.
18949 (regsets_fetch_inferior_registers): Improve error message.
18950 (regsets_store_inferior_registers): Add debugging.
18951 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18952 (unstopped_p, linux_signal_pid): New functions.
18953 (linux_target_ops): Add linux_signal_pid.
18954 (linux_init_signals): New function.
18955 (initialize_low): Call it. Initialize using_threads.
18956 * regcache.c (inferior_regcache_data): Add valid
18957 flag.
18958 (get_regcache): Fetch registers lazily. Add fetch argument
18959 and update all callers.
18960 (regcache_invalidate_one, regcache_invalidate): New
18961 functions.
18962 (new_register_cache): Renamed from create_register_cache.
18963 Return the new regcache.
18964 (free_register_cache): Change argument to a void *.
18965 (registers_to_string, registers_from_string): Call get_regcache
18966 with fetch flag set.
18967 (register_data): Make static. Pass fetch flag to get_regcache.
18968 (supply_register): Call get_regcache with fetch flag clear.
18969 (collect_register): Call get_regcache with fetch flag set.
18970 (collect_register_as_string): New function.
18971 * regcache.h: Update.
18972 * remote-utils.c (putpkt): Flush after debug output and use
18973 stderr.
18974 Handle input interrupts while waiting for an ACK.
18975 (input_interrupt): Use signal_pid method.
18976 (getpkt): Flush after debug output and use stderr.
18977 (outreg): Use collect_register_as_string.
18978 (new_thread_notify, dead_thread_notify): New functions.
18979 (prepare_resume_reply): Check using_threads. Set thread_from_wait
18980 and general_thread.
18981 (look_up_one_symbol): Flush after debug output.
18982 * server.c (step_thread, server_waiting): New variables.
18983 (start_inferior): Don't use signal_pid. Update call to mywait.
18984 (attach_inferior): Update call to mywait.
18985 (handle_query): Handle qfThreadInfo and qsThreadInfo.
18986 (main): Don't fetch/store registers explicitly. Use
18987 set_desired_inferior. Support proposed ``Hs'' packet. Update
18988 calls to mywait.
18989 * server.h: Update.
18990 (struct inferior_list, struct_inferior_list_entry): New.
18991 * target.c (set_desired_inferior): New.
18992 (write_inferior_memory): Constify.
18993 (mywait): New function.
18994 * target.h: Update.
18995 (struct target_ops): New signal_pid method.
18996 (mywait): Removed macro, added prototype.
18997
18998 * linux-low.h (regset_func): Removed.
18999 (regset_fill_func, regset_store_func): New.
19000 (enum regset_type): New.
19001 (struct regset_info): Add type field. Use new operation types.
19002 (struct linux_target_ops): stop_pc renamed to get_pc.
19003 Add decr_pc_after_break and breakpoint_at.
19004 (get_process, get_thread_proess, get_process_thread)
19005 (strut process_info, all_processes, linux_attach_lwp)
19006 (thread_db_init): New.
19007
19008 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19009 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19010 (the_low_target): Add new members.
19011 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19012 (i386_store_fpxregset): Constify.
19013 (target_regsets): Add new kind identifier.
19014 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19015 (i386_set_pc): Add debugging.
19016 (i386_breakpoint_at): New function.
19017 (the_low_target): Add new members.
19018 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19019 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19020 (mips_breakpoint_at): New.
19021 (the_low_target): Add new members.
19022 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19023 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19024 (the_low_target): Add new members.
19025 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19026 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19027 (the_low_target): Add new members.
19028 * linux-x86-64-low.c (target_regsets): Add new kind
19029 identifier.
19030
19031 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19032
19033 From Martin Pool <mbp@samba.org>:
19034 * server.c (gdbserver_usage): New function.
19035 (main): Call it.
19036
19037 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19038
19039 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19040 stop_at -> stop_pc.
19041
19042 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19043
19044 * Makefile.in: Remove obsolete code.
19045
19046 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19047
19048 * linux-low.c (regsets_fetch_inferior_registers),
19049 (regsets_store_inferior_registers): Removed cast to int from
19050 ptrace() calls.
19051 * regcache.h: Added declaration of struct inferior_info.
19052
19053 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19054
19055 * inferiors.c (struct inferior_info): Add regcache_data.
19056 (add_inferior): Call create_register_cache.
19057 (clear_inferiors): Call free_register_cache.
19058 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19059 * regcache.c (struct inferior_regcache_data): New.
19060 (registers): Remove.
19061 (get_regcache): New function.
19062 (create_register_cache, free_register_cache): New functions.
19063 (set_register_cache): Don't initialize the register cache here.
19064 (registers_to_string, registers_from_string, register_data): Call
19065 get_regcache.
19066 * regcache.h: Add prototypes.
19067 * server.h: Likewise.
19068
19069 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19070
19071 * mem-break.c: New file.
19072 * mem-break.h: New file.
19073 * Makefile.in: Add mem-break.o rule; update server.h
19074 dependencies.
19075 * inferiors.c (struct inferior_info): Add target_data
19076 member.
19077 (clear_inferiors): Free target_data member if set.
19078 (inferior_target_data, set_inferior_target_data): New functions.
19079 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19080 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19081 * linux-low.c (linux_bp_reinsert): New variable.
19082 (struct inferior_linux_data): New.
19083 (linux_create_inferior): Use set_inferior_target_data.
19084 (linux_attach): Likewise. Call add_inferior.
19085 (linux_wait_for_one_inferior): New function.
19086 (linux_wait): Call it.
19087 (linux_write_memory): Add const.
19088 (initialize_low): Call set_breakpoint_data.
19089 * linux-low.h (struct linux_target_ops): Add breakpoint
19090 handling members.
19091 * server.c (attach_inferior): Remove extra add_inferior
19092 call.
19093 * server.h: Include mem-break.h. Update inferior.c
19094 prototypes.
19095 * target.c (read_inferior_memory)
19096 (write_inferior_memory): New functions.
19097 * target.h (read_inferior_memory)
19098 (write_inferior_memory): Change macros to prototypes.
19099 (struct target_ops): Update comments. Add const to write_memory
19100 definition.
19101
19102 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19103
19104 * linux-low.c (usr_store_inferior_registers): Support
19105 registers which are allowed to fail to store.
19106 * linux-low.h (linux_target_ops): Likewise.
19107 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19108 (ppc_cannot_store_register): FPSCR may not be storable.
19109
19110 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19111
19112 * server.h: Include <string.h> if HAVE_STRING_H.
19113 * ChangeLog: Correct paths in last ChangeLog entry.
19114
19115 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19116
19117 * linux-low.h: Remove obsolete prototypes.
19118 (struct linux_target_ops): New.
19119 (extern the_low_target): New.
19120 * linux-low.c (num_regs, regmap): Remove declarations.
19121 (register_addr): Use the_low_target explicitly.
19122 (fetch_register): Likewise.
19123 (usr_fetch_inferior_registers): Likewise.
19124 (usr_store_inferior_registers): Likewise.
19125 * linux-arm-low.c (num_regs): Remove.
19126 (arm_num_regs): Define.
19127 (arm_regmap): Renamed from regmap, made static.
19128 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19129 made static.
19130 (arm_cannot_store_register): Renamed from cannot_store_register,
19131 made static.
19132 (the_low_target): New.
19133 * linux-i386-low.c (num_regs): Remove.
19134 (i386_num_regs): Define.
19135 (i386_regmap): Renamed from regmap, made static.
19136 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19137 made static.
19138 (i386_cannot_store_register): Renamed from cannot_store_register,
19139 made static.
19140 (the_low_target): New.
19141 * linux-ia64-low.c (num_regs): Remove.
19142 (ia64_num_regs): Define.
19143 (ia64_regmap): Renamed from regmap, made static.
19144 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19145 made static.
19146 (ia64_cannot_store_register): Renamed from cannot_store_register,
19147 made static.
19148 (the_low_target): New.
19149 * linux-m68k-low.c (num_regs): Remove.
19150 (m68k_num_regs): Define.
19151 (m68k_regmap): Renamed from regmap, made static.
19152 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19153 made static.
19154 (m68k_cannot_store_register): Renamed from cannot_store_register,
19155 made static.
19156 (the_low_target): New.
19157 * linux-mips-low.c (num_regs): Remove.
19158 (mips_num_regs): Define.
19159 (mips_regmap): Renamed from regmap, made static.
19160 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19161 made static.
19162 (mips_cannot_store_register): Renamed from cannot_store_register,
19163 made static.
19164 (the_low_target): New.
19165 * linux-ppc-low.c (num_regs): Remove.
19166 (ppc_num_regs): Define.
19167 (ppc_regmap): Renamed from regmap, made static.
19168 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19169 made static.
19170 (ppc_cannot_store_register): Renamed from cannot_store_register,
19171 made static.
19172 (the_low_target): New.
19173 * linux-s390-low.c (num_regs): Remove.
19174 (s390_num_regs): Define.
19175 (s390_regmap): Renamed from regmap, made static.
19176 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19177 made static.
19178 (s390_cannot_store_register): Renamed from cannot_store_register,
19179 made static.
19180 (the_low_target): New.
19181 * linux-sh-low.c (num_regs): Remove.
19182 (sh_num_regs): Define.
19183 (sh_regmap): Renamed from regmap, made static.
19184 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19185 made static.
19186 (sh_cannot_store_register): Renamed from cannot_store_register,
19187 made static.
19188 (the_low_target): New.
19189 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19190 (the_low_target): New.
19191
19192 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19193
19194 * Makefile.in: Add stamp-h target.
19195 * configure.in: Create stamp-h.
19196 * configure: Regenerated.
19197
19198 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19199
19200 * inferiors.c: New file.
19201 * target.c: New file.
19202 * target.h: New file.
19203 * Makefile.in: Add target.o and inferiors.o. Update
19204 dependencies.
19205 * linux-low.c (inferior_pid): New static variable,
19206 moved from server.c.
19207 (linux_create_inferior): Renamed from create_inferior.
19208 Call add_inferior. Return 0 on success instead of a PID.
19209 (linux_attach): Renamed from myattach.
19210 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19211 (linux_thread_alive): Renamed from mythread_alive.
19212 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19213 child dies.
19214 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19215 (regsets_store_inferior_registers): Correct error message.
19216 Add missing ``return 0''.
19217 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19218 (linux_store_registers): Renamed from store_inferior_registers.
19219 (linux_read_memory): Renamed from read_inferior_memory.
19220 (linux_write_memory): Renamed from write_inferior_memory.
19221 (linux_target_ops): New structure.
19222 (initialize_low): Call set_target_ops ().
19223 * remote-utils.c (unhexify): New function.
19224 (hexify): New function.
19225 (input_interrupt): Send signals to ``signal_pid''.
19226 * server.c (inferior_pid): Remove.
19227 (start_inferior): Update create_inferior call.
19228 (attach_inferior): Call add_inferior.
19229 (handle_query): New function.
19230 (main): Call handle_query for `q' packets.
19231 * server.h: Include "target.h". Remove obsolete prototypes.
19232 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19233
19234 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19235
19236 * Makefile.in: Add WARN_CFLAGS. Update configury
19237 dependencies.
19238 * configure.in: Check for <string.h>
19239 * configure: Regenerate.
19240 * config.in: Regenerate.
19241 * gdbreplay.c: Include needed system headers.
19242 (remote_open): Remove strchr prototype.
19243 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19244 * regcache.c (supply_register): Change buf argument to const void *.
19245 (supply_register_by_name): Likewise.
19246 (collect_register): Change buf argument to void *.
19247 (collect_register_by_name): Likewise.
19248 * regcache.h: Add missing prototypes.
19249 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19250 * server.c (handle_query): New function.
19251 (attached): New static variable, moved out of main.
19252 (main): Quiet longjmp clobber warnings.
19253 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19254 * utils.c (error): Remove NORETURN.
19255 (fatal): Likewise.
This page took 0.477625 seconds and 4 git commands to generate.