]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/ChangeLog
gdbserver: turn target op 'supports_agent' into a method
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
c0245cb9
TBA
12020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's supports_agent 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_supports_agent): Update the macro.
9 * target.cc (process_target::supports_agent): Define.
10
11 Update the derived classes and callers below.
12
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_supports_agent): Turn into ...
15 (linux_process_target::supports_agent): ... 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
974387bb
TBA
212020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
22
23 Turn process_stratum_target's qxfer_libraries_svr4 op into a
24 method of process_target.
25
26 * target.h (struct process_stratum_target): Remove the target op.
27 (class process_target): Add the target op. Also add
28 'supports_qxfer_libraries_svr4'.
29 * target.cc (process_target::qxfer_libraries_svr4): Define.
30 (process_target::supports_qxfer_libraries_svr4): Define.
31
32 Update the derived classes and callers below.
33
34 * server.cc (handle_qxfer_libraries_svr4): Update.
35 (handle_query): Update.
36 * linux-low.cc (linux_target_ops): Update.
37 (linux_process_target::supports_qxfer_libraries_svr4): Define.
38 (linux_qxfer_libraries_svr4): Turn into ...
39 (linux_process_target::qxfer_libraries_svr4): ... this.
40 * linux-low.h (class linux_process_target): Update.
41 * lynx-low.cc (lynx_target_ops): Update.
42 * nto-low.cc (nto_target_ops): Update.
43 * win32-low.cc (win32_target_ops): Update.
44
c756403b
TBA
452020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
46
47 Turn process_stratum_target's supports_disable_randomization op
48 into a method of process_target.
49
50 * target.h (struct process_stratum_target): Remove the target op.
51 (class process_target): Add the target op.
52 (target_supports_disable_randomization): Update the macro.
53 * target.cc (process_target::supports_disable_randomization): Define.
54
55 Update the derived classes and callers below.
56
57 * linux-low.cc (linux_target_ops): Update.
58 (linux_supports_disable_randomization): Turn into ...
59 (linux_process_target::supports_disable_randomization): ... this.
60 * linux-low.h (class linux_process_target): Update.
61 * lynx-low.cc (lynx_target_ops): Update.
62 * nto-low.cc (nto_target_ops): Update.
63 * win32-low.cc (win32_target_ops): Update.
64
345dafad
TBA
652020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
66
67 Turn process_stratum_target's emit_ops op into a method of
68 process_target.
69
70 * target.h (struct process_stratum_target): Remove the target op.
71 (class process_target): Add the target op.
72 (target_emit_ops): Update the macro.
73 * target.cc (process_target::emit_ops): Define.
74
75 Update the derived classes and callers below.
76
77 * linux-low.cc (linux_target_ops): Update.
78 (linux_emit_ops): Turn into ...
79 (linux_process_target::emit_ops): ... this.
80 * linux-low.h (class linux_process_target): Update.
81 * lynx-low.cc (lynx_target_ops): Update.
82 * nto-low.cc (nto_target_ops): Update.
83 * win32-low.cc (win32_target_ops): Update.
84
c23c9391
TBA
852020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
86
87 Turn process_stratum_target's install_fast_tracepoint_jump_pad
88 and get_min_fast_tracepoint_insn_len ops into methods of
89 process_target.
90
91 * target.h (struct process_stratum_target): Remove the target ops.
92 (class process_target): Add the target ops. Also add
93 'supports_fast_tracepoints'.
94 (target_supports_fast_tracepoints): Update the macro.
95 (target_get_min_fast_tracepoint_insn_len): Update the macro.
96 (install_fast_tracepoint_jump_pad): Update and rename the macro
97 to ...
98 (target_install_fast_tracepoint_jump_pad): ... this.
99 * target.cc (process_target::supports_fast_tracepoints): Define.
100 (process_target::install_fast_tracepoint_jump_pad): Define.
101 (process_target::get_min_fast_tracepoint_insn_len): Define.
102
103 Update the derived classes and callers below.
104
105 * tracepoint.cc (install_fast_tracepoint): Update.
106 * linux-low.cc (linux_target_ops): Update.
107 (linux_process_target::supports_fast_tracepoints): Define.
108 (linux_install_fast_tracepoint_jump_pad): Turn into ...
109 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
110 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
111 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
112 * linux-low.h (class linux_process_target): Update.
113 * lynx-low.cc (lynx_target_ops): Update.
114 * nto-low.cc (nto_target_ops): Update.
115 * win32-low.cc (win32_target_ops): Update.
116
5c9eb2f2
TBA
1172020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
118
119 Turn process_stratum_target's stabilize_threads op into a
120 method of process_target.
121
122 * target.h (struct process_stratum_target): Remove the target op.
123 (class process_target): Add the target op.
124 (target_stabilize_threads): Update the macro.
125 * target.cc (process_target::stabilize_threads): Define.
126
127 Update the derived classes and callers below.
128
129 * server.cc (handle_status): Update.
130 * tracepoint.cc (cmd_qtdp): Update.
131 (cmd_qtstart): Update.
132 * linux-low.cc (linux_target_ops): Update.
133 (linux_stabilize_threads): Turn into ...
134 (linux_process_target::stabilize_threads): ... this.
135 (linux_wait_1): Update.
136 * linux-low.h (class linux_process_target): Update.
137 * lynx-low.cc (lynx_target_ops): Update.
138 * nto-low.cc (nto_target_ops): Update.
139 * win32-low.cc (win32_target_ops): Update.
140
29e8dc09
TBA
1412020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
142
143 Turn process_stratum_target's pause_all and unpause_all ops
144 into methods of process_target.
145
146 * target.h (struct process_stratum_target): Remove the target ops.
147 (class process_target): Add the target ops.
148 (pause_all): Update the macro and rename to...
149 (target_pause_all): ... this.
150 (unpause_all): Update the macro and rename to...
151 (target_unpause_all): ... this.
152 * target.cc (process_target::pause_all): Define.
153 (process_target::unpause_all): Define.
154
155 Update the derived classes and callers below.
156
157 * server.cc (handle_status): Update.
158 * tracepoint.cc (clear_installed_tracepoints): Update.
159 (cmd_qtdp): Update.
160 (cmd_qtstart): Update.
161 (stop_tracing): Update.
162 (cmd_qtstatus): Update.
163 (upload_fast_traceframes): Update.
164 (run_inferior_command): Update.
165 * linux-low.cc (linux_target_ops): Update.
166 (linux_pause_all): Turn into ...
167 (linux_process_target::pause_all): ... this.
168 (linux_unpause_all): Turn into ...
169 (linux_process_target::unpause_all): ... this.
170 (linux_process_target::prepare_to_access_memory): Update.
171 (linux_process_target::done_accessing_memory): Update.
172 * linux-low.h (class linux_process_target): Update.
173 * lynx-low.cc (lynx_target_ops): Update.
174 * nto-low.cc (nto_target_ops): Update.
175 * win32-low.cc (win32_target_ops): Update.
176
4e2e869c
TBA
1772020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
178
179 Turn process_stratum_target's get_tib_address op into a method of
180 process_target.
181
182 * target.h (struct process_stratum_target): Remove the target op.
183 (class process_target): Add the target op. Also add
184 'supports_get_tib_address'.
185 * target.cc (process_target::get_tib_address): Define.
186 (process_target::supports_get_tib_address): Define.
187
188 Update the derived classes and callers below.
189
190 * server.cc (handle_query): Update.
191 * linux-low.cc (win32_target_ops): Update.
192 * lynx-low.cc (lynx_target_ops): Update.
193 * nto-low.cc (nto_target_ops): Update.
194 * win32-low.cc (win32_target_ops): Update.
195 (win32_process_target::supports_get_tib_address): Define.
196 (win32_get_tib_address): Turn into ...
197 (win32_process_target::get_tib_address): ... this.
198 * win32-low.h (class win32_process_target): Update.
199
68119632
TBA
2002020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
201
202 Turn process_stratum_target's thread_stopped op into a method of
203 process_target.
204
205 * target.h (struct process_stratum_target): Remove the target op.
206 (class process_target): Add the target op. Also add
207 'supports_thread_stopped'.
208 (target_thread_stopped): Update the macro.
209 * target.cc (process_target::thread_stopped): Define.
210 (process_target::supports_thread_stopped): Define.
211 (prepare_to_access_memory): Update.
212
213 Update the derived classes and callers below.
214
215 * server.cc (queue_stop_reply_callback): Update.
216 * linux-low.cc (linux_target_ops): Update.
217 (linux_process_target::supports_thread_stopped): Define.
218 (linux_thread_stopped): Turn into ...
219 (linux_process_target::thread_stopped): ... 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
770d8f6a
TBA
2252020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
226
227 Turn process_stratum_target's read_pc and write_pc ops into
228 methods of process_target.
229
230 * target.h (struct process_stratum_target): Remove the target ops.
231 (class process_target): Add the target ops.
232 * target.cc (process_target::read_pc): Define.
233 (process_target::write_pc): Define.
234
235 Update the derived classes and callers below.
236
237 * regcache.cc (regcache_read_pc): Update.
238 (regcache_write_pc): Update.
239 * linux-low.cc (linux_target_ops): Update.
240 (linux_read_pc): Turn into ...
241 (linux_process_target::read_pc): ... this.
242 (linux_write_pc): Turn into ...
243 (linux_process_target::write_pc): ... 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
290732bf
TBA
2492020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
250
251 Turn process_stratum_target's supports_tracepoints op into a
252 method of process_target.
253
254 * target.h (struct process_stratum_target): Remove the target op.
255 (class process_target): Add the target op.
256 (target_supports_tracepoints): Update the macro.
257 * target.cc (process_target::supports_tracepoints): Define.
258
259 Update the derived classes and callers below.
260
261 * linux-low.cc (linux_target_ops): Update.
262 (linux_supports_tracepoints): Turn into ...
263 (linux_process_target::supports_tracepoints): ... this.
264 * linux-low.h (class linux_process_target): Update.
265 * lynx-low.cc (lynx_target_ops): Update.
266 * nto-low.cc (nto_target_ops): Update.
267 * win32-low.cc (win32_target_ops): Update.
268
0df28b1b
TBA
2692020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
270
271 Turn process_stratum_target's process_qsupported op into a method
272 of process_target.
273
274 * target.h (struct process_stratum_target): Remove the target op.
275 (class process_target): Add the target op.
276 (target_process_qsupported): Update the macro.
277 * target.cc (process_target::process_qsupported): Define.
278
279 Update the derived classes and callers below.
280
281 * linux-low.cc (linux_target_ops): Update.
282 (linux_process_qsupported): Turn into ...
283 (linux_process_target::process_qsupported): ... this.
284 * linux-low.h (class linux_process_target): Update.
285 * lynx-low.cc (lynx_target_ops): Update.
286 * nto-low.cc (nto_target_ops): Update.
287 * win32-low.cc (win32_target_ops): Update.
288
9da41fda
TBA
2892020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
290
291 Turn process_stratum_target's read_loadmap op into a method of
292 process_target.
293
294 * target.h (struct process_stratum_target): Remove the target op.
295 (class process_target): Add the target op. Also add
296 'supports_read_loadmap'.
297 * target.cc (process_target::read_loadmap): Define.
298 (process_target::supports_read_loadmap): Define.
299
300 Update the derived classes and callers below.
301
302 * server.cc (handle_qxfer_fdpic): Update.
303 (handle_query): Update.
304 * linux-low.cc (linux_target_ops): Update.
305 (linux_process_target::supports_read_loadmap): Define.
306 (linux_read_loadmap): Turn into ...
307 (linux_process_target::read_loadmap): ... this.
308 * linux-low.h (class linux_process_target): Update.
309 * lynx-low.cc (lynx_target_ops): Update.
310 * nto-low.cc (nto_target_ops): Update.
311 * win32-low.cc (win32_target_ops): Update.
312
95a45fc1
TBA
3132020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
314
315 Turn process_stratum_target's core_of_thread op into a method of
316 process_target.
317
318 * target.h (struct process_stratum_target): Remove the target op.
319 (class process_target): Add the target op.
320 (target_core_of_thread): Update the macro.
321 * target.cc (process_target::core_of_thread): Define.
322
323 Update the derived classes and callers below.
324
325 * linux-low.cc (linux_target_ops): Update.
326 (linux_process_target::core_of_thread): Define.
327 * linux-low.h (class linux_process_target): Update.
328 * lynx-low.cc (lynx_target_ops): Update.
329 * nto-low.cc (nto_target_ops): Update.
330 * win32-low.cc (win32_target_ops): Update.
331
55cf3021
TBA
3322020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
333
334 Turn process_stratum_target's handle_monitor_command op into a
335 method of process_target.
336
337 * target.h (struct process_stratum_target): Remove the target op.
338 (class process_target): Add the target op.
339 (target_handle_monitor_command): Update the macro.
340 * target.cc (process_target::handle_monitor_command): Define.
341
342 Update the derived classes and callers below.
343
344 * server.cc (handle_query): Update.
345 * linux-low.cc (linux_target_ops): Update.
346 (linux_process_target::handle_monitor_command): Define.
347 * linux-low.h (class linux_process_target): Update.
348 * lynx-low.cc (lynx_target_ops): Update.
349 * nto-low.cc (nto_target_ops): Update.
350 * win32-low.cc (win32_target_ops): Update.
351
fb00dfce
TBA
3522020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
353
354 Turn process_stratum_target's handle_new_gdb_connection op into a
355 method of process_target.
356
357 * target.h (struct process_stratum_target): Remove the target op.
358 (class process_target): Add the target op.
359 (target_handle_new_gdb_connection): Update the macro.
360 * target.cc (process_target::handle_new_gdb_connection): Define.
361
362 Update the derived classes and callers below.
363
364 * linux-low.cc (linux_target_ops): Update.
365 (linux_handle_new_gdb_connection): Turn into ...
366 (linux_process_target::handle_new_gdb_connection): ... this.
367 * linux-low.h (class linux_process_target): Update.
368 * lynx-low.cc (lynx_target_ops): Update.
369 * nto-low.cc (nto_target_ops): Update.
370 * win32-low.cc (win32_target_ops): Update.
371
9690a72a
TBA
3722020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
373
374 Turn process_stratum_target's supports_fork_events,
375 supports_vfork_events, and supports_exec_events ops into methods
376 of process_target.
377
378 * target.h (struct process_stratum_target): Remove the target ops.
379 (class process_target): Add the target ops.
380 (target_supports_fork_events): Update the macro.
381 (target_supports_vfork_events): Update the macro.
382 (target_supports_exec_events): Update the macro.
383 * target.cc (process_target::supports_fork_events): Define.
384 (process_target::supports_vfork_events): Define.
385 (process_target::supports_exec_events): Define.
386
387 Update the derived classes and callers below.
388
389 * linux-low.cc (linux_target_ops): Update.
390 (linux_supports_fork_events): Turn into ...
391 (linux_process_target::supports_fork_events): ... this.
392 (linux_supports_vfork_events): Turn into ...
393 (linux_process_target::supports_vfork_events): ... this.
394 (linux_supports_exec_events): Turn into ...
395 (linux_process_target::supports_exec_events): ... this.
396 * linux-low.h (class linux_process_target): Update.
397 * lynx-low.cc (lynx_target_ops): Update.
398 * nto-low.cc (nto_target_ops): Update.
399 * win32-low.cc (win32_target_ops): Update.
400
652aef77
TBA
4012020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
402
403 Turn process_stratum_target's supports_multi_process op into a
404 method of process_target.
405
406 * target.h (struct process_stratum_target): Remove the target op.
407 (class process_target): Add the target op.
408 * target.cc (process_target::supports_multi_process): Define.
409 (target_supports_multi_process): Update.
410
411 Update the derived classes and callers below.
412
413 * linux-low.cc (linux_target_ops): Update.
414 (linux_supports_multi_process): Turn into ...
415 (linux_process_target::supports_multi_process): ... this.
416 * linux-low.h (class linux_process_target): Update.
417 * lynx-low.cc (lynx_target_ops): Update.
418 * nto-low.cc (nto_target_ops): Update.
419 * win32-low.cc (win32_target_ops): Update.
420
0dc587d4
TBA
4212020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
422
423 Turn process_stratum_target's supports_non_stop, async, and
424 start_non_stop ops into methods of process_target.
425
426 * target.h (struct process_stratum_target): Remove the target ops.
427 (class process_target): Add the target ops.
428 (target_supports_non_stop): Update the macro.
429 (target_async): Update the macro.
430 (start_non_stop): Remove declaration.
431 * target.cc (process_target::supports_non_stop): Define.
432 (process_target::async): Define.
433 (process_target::start_non_stop): Define.
434 (start_non_stop): Remove.
435
436 Update the derived classes and callers below.
437
438 * server.cc (handle_qxfer_siginfo): Update.
439 (handle_query): Update.
440 * linux-low.cc (linux_target_ops): Update.
441 (linux_supports_non_stop): Turn into ...
442 (linux_process_target::supports_non_stop): ... this.
443 (linux_async): Turn into ...
444 (linux_process_target::async): ... this.
445 (linux_start_non_stop): Turn into ...
446 (linux_process_target::start_non_stop): ... this.
447 * linux-low.h (class linux_process_target): Update.
448 * lynx-low.cc (lynx_target_ops): Update.
449 * nto-low.cc (nto_target_ops): Update.
450 (nto_supports_non_stop): Remove; rely on the default behavior
451 instead.
452 * win32-low.cc (win32_target_ops): Update.
453
d7abedf7
TBA
4542020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
455
456 Turn process_stratum_target's qxfer_siginfo op into a method of
457 process_target.
458
459 * target.h (struct process_stratum_target): Remove the target op.
460 (class process_target): Add the target op. Also add
461 'supports_qxfer_siginfo'.
462 * target.cc (process_target::qxfer_siginfo): Define.
463 (process_target::supports_qxfer_siginfo): Define.
464
465 Update the derived classes and callers below.
466
467 * server.cc (handle_qxfer_siginfo): Update.
468 (handle_query): Update.
469 * linux-low.cc (linux_target_ops): Update.
470 (linux_process_target::supports_qxfer_siginfo): Define.
471 (linux_xfer_siginfo): Turn into ...
472 (linux_process_target::qxfer_siginfo): ... this.
473 * linux-low.h (class linux_process_target): Update.
474 * lynx-low.cc (lynx_target_ops): Update.
475 * nto-low.cc (nto_target_ops): Update.
476 * win32-low.cc (win32_target_ops): Update.
477
2d0795ee
TBA
4782020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
479
480 Turn process_stratum_target's qxfer_osdata op into a method of
481 process_target.
482
483 * target.h (struct process_stratum_target): Remove the target op.
484 (class process_target): Add the target op. Also add
485 'supports_qxfer_osdata'.
486 * target.cc (process_target::qxfer_osdata): Define.
487 (process_target::supports_qxfer_osdata): Define.
488
489 Update the derived classes and callers below.
490
491 * server.cc (handle_qxfer_osdata): Update.
492 (handle_query): Update.
493 * linux-low.cc (linux_target_ops): Update.
494 (linux_process_target::supports_qxfer_osdata): Define.
495 (linux_qxfer_osdata): Turn into ...
496 (linux_process_target::qxfer_osdata): ... this.
497 * linux-low.h (class linux_process_target): Update.
498 * lynx-low.cc (lynx_target_ops): Update.
499 * nto-low.cc (nto_target_ops): Update.
500 * win32-low.cc (win32_target_ops): Update.
501
ea06bbaa
TBA
5022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
503
504 Turn process_stratum_target's hostio_last_error op into a
505 method of process_target.
506
507 * target.h (struct process_stratum_target): Remove the target op.
508 (class process_target): Add the target op.
509 * target.cc: Add "hostio.h" to includes.
510 (process_target::hostio_last_error): Define.
511
512 Update the derived classes and callers below.
513
514 * hostio.cc (hostio_error): Update.
515 * linux-low.cc: Remove "hostio.h" from includes.
516 (linux_target_ops): Update.
517 * lynx-low.cc (lynx_target_ops): Update.
518 * nto-low.cc (nto_target_ops): Update.
519 * win32-low.h (class win32_process_target): Update.
520 * win32-low.cc (win32_target_ops): Update.
521 (wince_hostio_last_error): Turn into ...
522 (win32_process_target::hostio_last_error): ... this.
523
6e3fd7e9
TBA
5242020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
525
526 Turn process_stratum_target's get_tls_address op into a method of
527 process_target.
528
529 * target.h (struct process_stratum_target): Remove the target op.
530 (class process_target): Add the target op. Also add
531 'supports_get_tls_address'.
532 * target.cc (process_target::get_tls_address): Define.
533 (process_target::supports_get_tls_address): Define.
534
535 Update the derived classes and callers below.
536
537 * server.cc (handle_query): Update.
538 * linux-low.cc (linux_target_ops): Update.
539 (linux_process_target::supports_get_tls_address): Define.
540 (linux_process_target::get_tls_address): Define.
541 * linux-low.h (class linux_process_target): Update.
542 * lynx-low.cc (lynx_target_ops): Update.
543 * nto-low.cc (nto_target_ops): Update.
544 * win32-low.cc (win32_target_ops): Update.
545
5203ae1e
TBA
5462020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
547
548 Turn process_stratum_target's read_offsets op into a method of
549 process_target.
550
551 * target.h (struct process_stratum_target): Remove the target op.
552 (class process_target): Add the target op. Also add
553 'supports_read_offsets'.
554 * target.cc (process_target::read_offsets): Define.
555 (process_target::supports_read_offsets): Define.
556
557 Update the derived classes and callers below.
558
559 * server.cc (handle_query): Update.
560 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
561 (linux_target_ops): Update.
562 (linux_process_target::supports_read_offsets): Define.
563 (linux_read_offsets): Turn into ...
564 (linux_process_target::read_offsets): ... this.
565 * linux-low.h (class linux_process_target): Update.
566 * lynx-low.cc (lynx_target_ops): Update.
567 * nto-low.cc (nto_target_ops): Update.
568 * win32-low.cc (win32_target_ops): Update.
569
6eeb5c55
TBA
5702020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
571
572 Turn process_stratum_target's stopped_by_watchpoint and
573 stopped_data_address ops into methods of process_target.
574
575 * target.h (struct process_stratum_target): Remove the target ops.
576 (class process_target): Add the target ops.
577 * target.cc (process_target::stopped_by_watchpoint): Define.
578 (process_target::stopped_data_address): Define.
579
580 Update the derived classes and callers below.
581
582 * remote-utils.cc (prepare_resume_reply): Update.
583 * linux-low.cc (linux_target_ops): Update.
584 (linux_stopped_by_watchpoint): Turn into ...
585 (linux_process_target::stopped_by_watchpoint): ... this.
586 (linux_stopped_data_address): Turn into ...
587 (linux_process_target::stopped_data_address): ... this.
588 * linux-low.h (class linux_process_target): Update.
589 * lynx-low.cc (lynx_target_ops): Update.
590 * nto-low.cc (nto_target_ops): Update.
591 (nto_stopped_by_watchpoint): Turn into ...
592 (nto_process_target::stopped_by_watchpoint): ... this.
593 (nto_stopped_data_address): Turn into ...
594 (nto_process_target::stopped_data_address): ... this.
595 * nto-low.h (class nto_process_target): Update.
596 * win32-low.cc (win32_target_ops): Update.
597 (win32_stopped_by_watchpoint): Turn into ...
598 (win32_process_target::stopped_by_watchpoint): ... this.
599 (win32_stopped_data_address): Turn into ...
600 (win32_process_target::stopped_data_address): ... this.
601 * win32-low.h (class win32_process_target): Update.
602
22aa6223
TBA
6032020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
604
605 Turn process_stratum_target's supports_hardware_single_step op into
606 a method of process_target.
607
608 * target.h (struct process_stratum_target): Remove the target op.
609 (class process_target): Add the target op.
610 (target_supports_hardware_single_step): Update the macro.
611 (target_can_do_hardware_single_step): Remove declaration.
612 * target.cc (process_target::supports_hardware_single_step): Define.
613 (target_can_do_hardware_single_step): Remove.
614
615 Update the derived classes and callers below.
616
617 * linux-low.h (class linux_process_target): Update.
618 * linux-low.cc (linux_target_ops): Update.
619 (linux_supports_hardware_single_step): Turn into ...
620 (linux_process_target::supports_hardware_single_step): ... this.
621 * lynx-low.h (class lynx_process_target): Update.
622 * lynx-low.cc (lynx_target_ops): Update.
623 (lynx_process_target::supports_hardware_single_step): Define.
624 * nto-low.h (class nto_process_target): Update.
625 * nto-low.cc (nto_target_ops): Update.
626 (nto_process_target::supports_hardware_single_step): Define.
627 * win32-low.h (class win32_process_target): Update.
628 * win32-low.cc (win32_target_ops): Update.
629 (win32_process_target::supports_hardware_single_step): Define.
630
93fe88b2
TBA
6312020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
632
633 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
634 ops into methods of process_target.
635
636 * target.h (struct process_stratum_target): Remove the target ops.
637 (class process_target): Add the target ops.
638 (target_stopped_by_hw_breakpoint): Update the macro.
639 (target_supports_stopped_by_hw_breakpoint): Update the macro.
640 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
641 (process_target::supports_stopped_by_hw_breakpoint): Define.
642
643 Update the derived classes and callers below.
644
645 * linux-low.cc (linux_target_ops): Update.
646 (linux_stopped_by_hw_breakpoint): Turn into ...
647 (linux_process_target::stopped_by_hw_breakpoint): ... this.
648 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
649 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
650 * linux-low.h (class linux_process_target): Update.
651 * lynx-low.cc (lynx_target_ops): Update.
652 * nto-low.cc (nto_target_ops): Update.
653 * win32-low.cc (win32_target_ops): Update.
654
84320c4e
TBA
6552020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
656
657 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
658 ops into methods of process_target.
659
660 * target.h (struct process_stratum_target): Remove the target ops.
661 (class process_target): Add the target ops.
662 (target_stopped_by_sw_breakpoint): Update the macro.
663 (target_supports_stopped_by_sw_breakpoint): Update the macro.
664 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
665 (process_target::supports_stopped_by_sw_breakpoint): Define.
666
667 Update the derived classes and callers below.
668
669 * linux-low.cc (linux_target_ops): Update.
670 (linux_stopped_by_sw_breakpoint): Turn into ...
671 (linux_process_target::stopped_by_sw_breakpoint): ... this.
672 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
673 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
674 * linux-low.h (class linux_process_target): Update.
675 * lynx-low.cc (lynx_target_ops): Update.
676 * nto-low.cc (nto_target_ops): Update.
677 * win32-low.cc (win32_target_ops): Update.
678
7e0bde70
TBA
6792020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
680
681 Turn process_stratum_target's insert_point and remove_point ops
682 into methods of process_target.
683
684 * target.h (struct process_stratum_target): Remove the target ops.
685 (class process_target): Add the target ops.
686 * target.cc (process_target::insert_point): Define.
687 (process_target::remove_point): Define.
688
689 Update the derived classes and callers below.
690
691 * mem-break.cc (set_raw_breakpoint_at): Update.
692 (delete_raw_breakpoint): Update.
693 (uninsert_raw_breakpoint): Update.
694 (reinsert_raw_breakpoint): Update.
695 * linux-low.cc (linux_target_ops): Update.
696 (linux_insert_point): Turn into ...
697 (linux_process_target::insert_point): ... this.
698 (linux_remove_point): Turn into ...
699 (linux_process_target::remove_point): ... this.
700 * linux-low.h (class linux_process_target): Update.
701 * lynx-low.cc (lynx_target_ops): Update.
702 * nto-low.cc (nto_target_ops): Update.
703 (nto_insert_point): Turn into ...
704 (nto_process_target::insert_point): ... this.
705 (nto_remove_point): Turn into ...
706 (nto_process_target::remove_point): ... this.
707 * nto-low.h (class nto_process_target): Update.
708 * win32-low.cc (win32_target_ops): Update.
709 (win32_insert_point): Turn into ...
710 (win32_process_target::insert_point): ... this.
711 (win32_remove_point): Turn into ...
712 (win32_process_target::remove_point): ... this.
713 * win32-low.h (class win32_process_target): Update.
714
a2b2297a
TBA
7152020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
716
717 Turn process_stratum_target's supports_z_point_type op into a
718 method of process_target.
719
720 * target.h (struct process_stratum_target): Remove the target op.
721 (class process_target): Add the target op.
722 * target.cc (process_target::supports_z_point_type): Define.
723
724 Update the derived classes and callers below.
725
726 * mem-break.cc (z_type_supported): Update.
727 * linux-low.cc (linux_target_ops): Update.
728 (linux_supports_z_point_type): Turn into ...
729 (linux_process_target::supports_z_point_type): ... this.
730 * linux-low.h (class linux_process_target): Update.
731 * lynx-low.cc (lynx_target_ops): Update.
732 * nto-low.cc (nto_target_ops): Update.
733 (nto_supports_z_point_type): Turn into ...
734 (nto_process_target::supports_z_point_type): ... this.
735 * nto-low.h (class nto_process_target): Update.
736 * win32-low.cc (win32_target_ops): Update.
737 (win32_supports_z_point_type): Turn into ...
738 (win32_process_target::supports_z_point_type): ... this.
739 * win32-low.h (class win32_process_target): Update.
740
eac215cc
TBA
7412020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
742
743 Turn process_stratum_target's read_auxv op into a method of
744 process_target.
745
746 * target.h (class process_stratum_target): Remove the target op.
747 (struct process_target): Add the target op. Also add
748 'supports_read_auxv'.
749 * target.cc (process_target::read_auxv): Define.
750 (process_target::supports_read_auxv): Define.
751
752 Update the derived classes and callers below.
753
754 * server.cc (handle_qxfer_auxv): Update.
755 (handle_query): Update.
756 * linux-low.cc (linux_target_ops): Update.
757 (linux_process_target::supports_read_auxv): Define.
758 (linux_read_auxv): Turn into ...
759 (linux_process_target::read_auxv): ... this.
760 * linux-low.h (class linux_process_target): Update.
761 * lynx-low.cc (lynx_target_ops): Update.
762 * nto-low.cc (nto_target_ops): Update.
763 (nto_process_target::supports_read_auxv): Define.
764 (nto_read_auxv): Turn into ...
765 (nto_process_target::read_auxv): ... this.
766 * nto-low.h (class nto_process_target): Update.
767 * win32-low.cc (win32_target_ops): Update.
768
eb497a2a
TBA
7692020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
770
771 Turn process_stratum_target's request_interrupt op into a method of
772 process_target.
773
774 * target.h (struct process_stratum_target): Remove the target op.
775 (class process_target): Add the target op.
776
777 Update the derived classes and callers below.
778
779 * remote-utils.cc (putpkt_binary_1): Update.
780 (input_interrupt): Update.
781 (getpkt): Update.
782 * server.cc (handle_v_requests): Update.
783 * linux-low.cc (linux_target_ops): Update.
784 (linux_request_interrupt): Turn into ...
785 (linux_process_target::request_interrupt): ... this.
786 * linux-low.h (class linux_process_target): Update.
787 * lynx-low.cc (lynx_target_ops): Update.
788 (lynx_request_interrupt): Turn into ...
789 (lynx_process_target::request_interrupt): ... this.
790 * lynx-low.h (class lynx_process_target): Update.
791 * nto-low.cc (nto_target_ops): Update.
792 (nto_request_interrupt): Turn into ...
793 (nto_process_target::request_interrupt): ... this.
794 * nto-low.h (class nto_process_target): Update.
795 * win32-low.cc (win32_target_ops): Update.
796 (win32_request_interrupt): Turn into ...
797 (win32_process_target::request_interrupt): ... this.
798 * win32-low.h (class win32_process_target): Update.
799
2a31c7aa
TBA
8002020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
801
802 Turn process_stratum_target's look_up_symbols op into a method of
803 process_target.
804
805 * target.h (struct process_stratum_target): Remove the target op.
806 (class process_target): Add the target op.
807 * target.cc (process_target::look_up_symbols): Define.
808
809 Update the derived classes and callers below.
810
811 * server.cc (handle_query): Update.
812 * linux-low.cc (linux_target_ops): Update.
813 (linux_look_up_symbols): Turn into ...
814 (linux_process_target::look_up_symbols): ... this.
815 * linux-low.h (class linux_process_target): Update.
816 * lynx-low.cc (lynx_target_ops): Update.
817 * nto-low.cc (nto_target_ops): Update.
818 * win32-low.cc (win32_target_ops): Update.
819
e2558df3
TBA
8202020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
821
822 Turn process_stratum_target's read_memory and write_memory
823 ops into methods of process_target.
824
825 * target.h (struct process_stratum_target): Remove the target ops.
826 (class process_target): Add the target ops.
827
828 Update the derived classes and callers below.
829
830 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
831 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
832 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
833 (arm_get_syscall_trapinfo): Update.
834 * linux-cris-low.cc (cris_breakpoint_at): Update.
835 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
836 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
837 * linux-mips-low.cc (mips_breakpoint_at): Update.
838 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
839 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
840 * linux-sh-low.cc (sh_breakpoint_at): Update.
841 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
842 (sparc_store_gregset_from_stack): Update.
843 (sparc_breakpoint_at): Update.
844 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
845 * linux-tile-low.cc (tile_breakpoint_at): Update.
846 * linux-x86-low.cc (x86_breakpoint_at): Update.
847 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
848 * mem-brea.cc (insert_memory_breakpoint): Update.
849 (validate_inserted_breakpoint): Update.
850 * target.cc (read_inferior_memory): Update.
851 (target_write_memory): Update.
852 * linux-low.cc (linux_target_ops): Update.
853 (linux_read_memory): Make a wrapper around the read_memory target
854 op call.
855 (linux_process_target::read_memory): Rename from linux_read_memory.
856 (linux_write_memory): Turn into ...
857 (linux_process_target::write_memory): ... this.
858 * linux-low.h (class linux_process_target): Update.
859 * lynx-low.cc (lynx_target_ops): Update.
860 (lynx_read_memory): Turn into ...
861 (lynx_process_target::read_memory): ... this.
862 (lynx_write_memory): Turn into ...
863 (lynx_process_target::write_memory): ... this.
864 * lynx-low.h (class lynx_process_target): Update.
865 * nto-low.cc (nto_target_ops): Update.
866 (nto_read_memory): Turn into ...
867 (nto_process_target::read_memory): ... this.
868 (nto_write_memory): Turn into ...
869 (nto_process_target::write_memory): ... this.
870 * nto-low.h (class nto_process_target): Update.
871 * win32-low.cc (win32_target_ops): Update.
872 (win32_read_inferior_memory): Turn into ...
873 (win32_process_target::read_memory): ... this.
874 (win32_write_inferior_memory): Turn into ...
875 (win32_process_target::write_memory): ... this.
876 * win32-low.h (class win32_process_target): Update.
877
79b44087
TBA
8782020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
879
880 Turn process_stratum_target's prepare_to_access_memory and
881 done_accessing_memory ops into methods of process_target.
882
883 * target.h (struct process_stratum_target): Remove the target ops.
884 (class process_target): Add the target ops.
885 * target.cc (process_target::prepare_to_access_memory): Define.
886 (process_target::done_accessing_memory): Define.
887 (prepare_to_access_memory): Update.
888 (done_accessing_memory): Update.
889
890 Update the derived classes and callers below.
891
892 * linux-low.cc (linux_target_ops): Update.
893 (linux_prepare_to_access_memory): Turn into ...
894 (linux_process_target::prepare_to_access_memory): ... this.
895 (linux_done_accessing_memory): Turn into ...
896 (linux_process_target::done_accessing_memory): ... this.
897 * linux-low.h (class linux_process_target): Update.
898 * lynx-low.cc (lynx_target_ops): Update.
899 * nto-low.cc (nto_target_ops): Update.
900 * win32-low.cc (win32_target_ops): Update.
901
a5a4d4cd
TBA
9022020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
903
904 Turn process_stratum_target's fetch_registers and store_registers
905 ops into methods of process_target.
906
907 * target.h (struct process_stratum_target): Remove the target ops.
908 (class process_target): Add the target ops.
909 (fetch_inferior_registers): Update the macro.
910 (store_inferior_registers): Update the macro.
911
912 Update the derived classes and callers below.
913
914 * linux-low.cc (linux_target_ops): Update.
915 (linux_fetch_registers): Turn into ...
916 (linux_process_target::fetch_registers): ... this.
917 (linux_store_registers): Turn into ...
918 (linux_process_target::store_registers): ... this.
919 * linux-low.h (class linux_process_target): Update.
920 * lynx-low.cc (lynx_target_ops): Update.
921 (lynx_fetch_registers): Turn into ...
922 (lynx_process_target::fetch_registers): ... this.
923 (lynx_store_registers): Turn into ...
924 (lynx_process_target::store_registers): ... this.
925 * lynx-low.h (class lynx_process_target): Update.
926 * nto-low.cc (nto_target_ops): Update.
927 (nto_fetch_registers): Turn into ...
928 (nto_process_target::fetch_registers): ... this.
929 (nto_store_registers): Turn into ...
930 (nto_process_target::store_registers): ... this.
931 * nto-low.h (class nto_process_target): Update.
932 * win32-low.cc (win32_target_ops): Update.
933 (win32_fetch_inferior_registers): Turn into ...
934 (win32_process_target::fetch_registers): ... this.
935 (win32_store_inferior_registers): Turn into ...
936 (win32_process_target::store_registers): ... this.
937 * win32-low.h (class win32_process_target): Update.
938
6532e7e3
TBA
9392020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
940
941 Turn process_stratum_target's wait op into a method of
942 process_target.
943
944 * target.h (struct process_stratum_target): Remove the target op.
945 (class process_target): Add the target op.
946
947 Update the derived classes and callers below.
948
949 * target.cc (target_wait): Update.
950 * linux-low.cc (linux_target_ops): Update.
951 (linux_wait): Turn into ...
952 (linux_process_target::wait): ... this.
953 * linux-low.h (class linux_process_target): Update.
954 * lynx-low.cc (lynx_target_ops): Update.
955 (lynx_wait): Turn into ...
956 (lynx_process_target::wait): ... this.
957 * lynx-low.h (class lynx_process_target): Update.
958 * nto-low.cc (nto_target_ops): Update.
959 (nto_wait): Turn into ...
960 (nto_process_target::wait): ... this.
961 * nto-low.h (class nto_process_target): Update.
962 * win32-low.cc (win32_target_ops): Update.
963 (win32_wait): Turn into ...
964 (win32_process_target::wait): ... this.
965 (do_initial_child_stuff): Update.
966 * win32-low.h (class win32_process_target): Update.
967
0e4d7e35
TBA
9682020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
969
970 Turn process_stratum_target's resume op into a method of
971 process_target.
972
973 * target.h (struct process_stratum_target): Remove the target op.
974 (class process_target): Add the target op.
975
976 Update the derived classes and callers below.
977
978 * server.cc (resume): Update.
979 * target.cc (target_stop_and_wait): Update.
980 (target_continue_no_signal): Update.
981 (target_continue): Update.
982 * linux-low.cc (linux_target_ops): Update.
983 (linux_resume): Turn into ...
984 (linux_process_target::resume): ... this.
985 * linux-low.h (class linux_process_target): Update.
986 * lynx-low.cc (lynx_target_ops): Update.
987 (lynx_resume): Turn into ...
988 (lynx_process_target::resume): ... this.
989 * lynx-low.h (class lynx_process_target): Update.
990 * nto-low.cc (nto_target_ops): Update.
991 (nto_resume): Turn into ...
992 (nto_process_target::resume): ... this.
993 * nto-low.h (class nto_process_target): Update.
994 * win32-low.cc (win32_target_ops): Update.
995 (win32_resume): Turn into ...
996 (win32_process_target::resume): ... this.
997 (win32_process_target::detach): Update.
998 (do_initial_child_stuff): Update.
999 * win32-low.h (class win32_process_target): Update.
1000
13d3d99b
TBA
10012020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1002
1003 Turn process_stratum_target's thread_alive op into a method of
1004 process_target.
1005
1006 * target.h (struct process_stratum_target): Remove the target op.
1007 (class process_target): Add the target op.
1008 (mythread_alive): Update the macro.
1009
1010 Update the derived classes and callers below.
1011
1012 * linux-low.cc (linux_target_ops): Update.
1013 (linux_thread_alive): Turn into ...
1014 (linux_process_target::thread_alive): ... this.
1015 (wait_for_sigstop): Update.
1016 * linux-low.h (class linux_process_target): Update.
1017 * lynx-low.cc (lynx_target_ops): Update.
1018 (lynx_thread_alive): Turn into ...
1019 (lynx_process_target::thread_alive): ... this.
1020 * lynx-low.h (class lynx_process_target): Update.
1021 * nto-low.cc (nto_target_ops): Update.
1022 (nto_thread_alive): Turn into ...
1023 (nto_process_target::thread_alive): ... this.
1024 * nto-low.h (class nto_process_target): Update.
1025 * win32-low.cc (win32_target_ops): Update.
1026 (win32_thread_alive): Turn into ...
1027 (win32_process_target::thread_alive): ... this.
1028 * win32-low.h (class win32_process_target): Update.
1029
95a49a39
TBA
10302020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1031
1032 Turn process_stratum_target's join op into a method of
1033 process_target.
1034
1035 * target.h (struct process_stratum_target): Remove the target op.
1036 (class process_target): Add the target op.
1037 (join_inferior): Update the macro.
1038
1039 Update the derived classes and callers below.
1040
1041 * linux-low.cc (linux_target_ops): Update.
1042 (linux_join): Turn into ...
1043 (linux_process_target::join): ... this.
1044 * linux-low.h (class linux_process_target): Update.
1045 * lynx-low.cc (lynx_target_ops): Update.
1046 (lynx_join): Turn into ...
1047 (lynx_process_target::join): ... this.
1048 * lynx-low.h (class lynx_process_target): Update.
1049 * nto-low.cc (nto_target_ops): Update.
1050 (nto_process_target::join): Define.
1051 * nto-low.h (class nto_process_target): Update.
1052 * win32-low.cc (win32_target_ops): Update.
1053 (win32_join): Turn into ...
1054 (win32_process_target::join): ... this.
1055 * win32-low.h (class win32_process_target): Update.
1056
8adb37b9
TBA
10572020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1058
1059 Turn process_stratum_target's mourn op into a method of
1060 process_target.
1061
1062 * target.h (struct process_stratum_target): Remove the target op.
1063 (class process_target): Add the target op.
1064
1065 Update the derived classes and callers below.
1066
1067 * target.cc (target_mourn_inferior): Update.
1068 * linux-low.cc (linux_target_ops): Update.
1069 (linux_mourn): Turn into ...
1070 (linux_process_target::mourn): ... this.
1071 (handle_extended_wait): Update.
1072 (linux_process_target::kill): Update.
1073 (linux_process_target::detach): Update.
1074 * linux-low.h (class linux_process_target): Update.
1075 * lynx-low.cc (lynx_target_ops): Update.
1076 (lynx_mourn): Turn into ...
1077 (lynx_process_target::mourn): ... this.
1078 * lynx-low.h (class lynx_process_target): Update.
1079 * nto-low.cc (nto_target_ops): Update.
1080 (nto_mourn): Turn into ...
1081 (nto_process_target::mourn): ... this.
1082 * nto-low.h (class nto_process_target): Update.
1083 * win32-low.cc (win32_target_ops): Update.
1084 (win32_mourn): Turn into ...
1085 (win32_process_target::mourn): ... this.
1086 * win32-low.h (class win32_process_target): Update.
1087
9061c9cf
TBA
10882020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1089
1090 Turn process_stratum_target's detach op into a method of
1091 process_target.
1092
1093 * target.h (struct process_stratum_target): Remove the target op.
1094 (class process_target): Add the target op.
1095 (detach_inferior): Update the macro.
1096
1097 Update the derived classes and callers below.
1098
1099 * linux-low.cc (linux_target_ops): Update.
1100 (linux_detach): Turn into ...
1101 (linux_process_target::detach): ... this.
1102 * linux-low.h (class linux_process_target): Update.
1103 * lynx-low.cc (lynx_target_ops): Update.
1104 (lynx_detach): Turn into ...
1105 (lynx_process_target::detach): ... this.
1106 * lynx-low.h (class lynx_process_target): Update.
1107 * nto-low.cc (nto_target_ops): Update.
1108 (nto_detach): Turn into ...
1109 (nto_process_target::detach): ... this.
1110 * nto-low.h (class nto_process_target): Update.
1111 * win32-low.cc (win32_target_ops): Update.
1112 (win32_detach): Turn into ...
1113 (win32_process_target::detach): ... this.
1114 * win32-low.h (class win32_process_target): Update.
1115
c6885a57
TBA
11162020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1117
1118 Turn process_stratum_target's kill op into a method of
1119 process_target.
1120
1121 * target.h (struct process_stratum_target): Remove the target op.
1122 (class process_target): Add the target op.
1123
1124 Update the derived classes and callers below.
1125
1126 * target.cc (kill_inferior): Update.
1127 * linux-low.cc (linux_target_ops): Update.
1128 (linux_kill): Turn into ...
1129 (linux_process_target::kill): ... this.
1130 * linux-low.h (class linux_process_target): Update.
1131 * lynx-low.cc (lynx_target_ops): Update.
1132 (lynx_kill): Turn into ...
1133 (lynx_process_target::kill): ... this.
1134 * lynx-low.h (class lynx_process_target): Update.
1135 * nto-low.cc (nto_target_ops): Update.
1136 (nto_kill): Turn into ...
1137 (nto_process_target::kill): ... this.
1138 * nto-low.h (class nto_process_target): Update.
1139 * win32-low.cc (win32_target_ops): Update.
1140 (win32_kill): Turn into ...
1141 (win32_process_target::kill): ... this.
1142 * win32-low.h (class win32_process_target): Update.
1143
ef03dad8
TBA
11442020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1145
1146 Turn process_stratum_target's attach op into a method of
1147 process_target.
1148
1149 * target.h (struct process_stratum_target): Remove the target op.
1150 (class process_target): Add the target op.
1151 (myattach): Update the macro.
1152
1153 Update the derived classes and callers below.
1154
1155 * linux-low.cc (linux_target_ops): Update.
1156 (linux_attach): Turn into ...
1157 (linux_process_target::attach): ... this.
1158 * linux-low.h (class linux_process_target): Update.
1159 * lynx-low.cc (lynx_target_ops): Update.
1160 (lynx_attach): Turn into ...
1161 (lynx_process_target::attach): ... this.
1162 * lynx-low.h (class lynx_process_target): Update.
1163 * nto-low.cc (nto_target_ops): Update.
1164 (nto_attach): Turn into ...
1165 (nto_process_target::attach): ... this.
1166 * nto-low.h (class nto_process_target): Update.
1167 * win32-low.cc (win32_target_ops): Update.
1168 (win32_attach): Turn into ...
1169 (win32_process_target::attach): ... this.
1170 * win32-low.h (class win32_process_target): Update.
1171
6dee9afb
TBA
11722020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1173
1174 Turn process_stratum_target's post_create_inferior op into a method
1175 of process_target.
1176
1177 * target.h (struct process_stratum_target): Remove the target op.
1178 (class process_target): Add the target op.
1179 (target_post_create_inferior): Update the macro.
1180 * target.cc (process_target::post_create_inferior): Define.
1181
1182 Update the derived classes and callers below.
1183
1184 * linux-low.cc (linux_target_ops): Update.
1185 (linux_post_create_inferior): Turn into ...
1186 (linux_process_target::post_create_inferior): ... this.
1187 * linux-low.h (class linux_process_target): Update.
1188 * lynx-low.cc (lynx_target_ops): Update.
1189 * nto-low.cc (nto_target_ops): Update.
1190 * win32-low.cc (win32_target_ops): Update.
1191
15295543
TBA
11922020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1193
1194 Turn process_stratum_target's create_inferior op into a method of
1195 process_target.
1196
1197 * target.h (struct process_stratum_target): Remove the target op.
1198 (class process_target): Add the target op.
1199 (create_inferior): Rename the macro to ...
1200 (target_create_inferior): ... this.
1201
1202 Update the derived classes and callers below.
1203
1204 * server.cc (handle_v_run): Update.
1205 (captured_main): Update.
1206 (process_serial_event): Update.
1207 * linux-low.cc (linux_target_ops): Update.
1208 (linux_create_inferior): Turn into ...
1209 (linux_process_target::create_inferior): ... this.
1210 * linux-low.h (class linux_process_target): Update.
1211 * lynx-low.cc (lynx_target_ops): Update.
1212 (lynx_create_inferior): Turn into ...
1213 (lynx_process_target::create_inferior): ... this.
1214 * lynx-low.h (class lynx_process_target): Update.
1215 * nto-low.cc (nto_target_ops): Update.
1216 (nto_create_inferior): Turn into ...
1217 (nto_process_target::create_inferior): ... this.
1218 * nto-low.h (class nto_process_target): Update.
1219 * win32-low.cc (win32_target_ops): Update.
1220 (win32_create_inferior): Turn into ...
1221 (win32_process_target::create_inferior): ... this.
1222 * win32-low.h (class win32_process_target): Update.
1223
5ef9273d
TBA
12242020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1225
1226 * target.h (class process_target): New class definition.
1227 (struct process_stratum_target) <pt>: New field with type
1228 'process_target*'.
1229 * linux-low.h (class linux_process_target): Define as a derived
1230 class of 'process_target'.
1231 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1232 as the 'pt' field.
1233 * lynx-low.h (class lynx_process_target): Define as a derived
1234 class of 'process_target'.
1235 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1236 as the 'pt' field.
1237 * nto-low.h (class nto_process_target): Define as a derived
1238 class of 'process_target'.
1239 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1240 as the 'pt' field.
1241 * win32-low.h (class win32_process_target): Define as a derived
1242 class of 'process_target'.
1243 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1244 as the 'pt' field.
1245
9f1528a1
AB
12462020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1247
1248 * configure: Regenerate.
1249
bf84f706
MR
12502020-02-19 Maciej W. Rozycki <macro@wdc.com>
1251 Andrew Burgess <andrew.burgess@embecosm.com>
1252
1253 * linux-riscv-low.cc: New file.
1254 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1255 and nat/riscv-linux-tdesc.c.
1256 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1257 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1258 Define.
1259
1a627e7e
TT
12602020-02-14 Tom Tromey <tom@tromey.com>
1261
1262 * acinclude.m4: Don't include acx_configure_dir.m4.
1263 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1264 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1265 (all, install-only, uninstall, clean-info, clean)
1266 (maintainer-clean): Don't recurse.
1267 (subdir_do, all-lib): Remove.
1268 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1269 (GNULIB_H): Remove.
1270 (generated_files): Update.
1271 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1272 * configure: Rebuild.
1273 * configure.ac: Don't configure gnulib or libiberty.
1274 (GNULIB): Update.
1275
a9b34532
EZ
12762020-02-14 Eli Zaretskii <eliz@gnu.org>
1277
1278 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1279 preparing the command line for CreateProcess.
1280 (win32_create_inferior): Reflect the program name in debugging
1281 output that shows the process and its command line.
1282
feacfcac
SM
12832020-02-13 Simon Marchi <simon.marchi@efficios.com>
1284
1285 * Makefile.in: Rename source files from .c to .cc.
1286 * %.c: Rename to %.cc.
1287 * configure.ac: Rename server.c to server.cc.
1288 * configure: Re-generate.
1289
06b3c5bd
SM
12902020-02-13 Simon Marchi <simon.marchi@efficios.com>
1291
1292 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1293
052793ad
HD
12942020-02-12 Hannes Domani <ssbssa@yahoo.de>
1295
1296 * win32-low.c (win32_create_inferior): Set signal_pid.
1297
f20e3e82
MR
12982020-02-12 Maciej W. Rozycki <macro@wdc.com>
1299 Pedro Alves <palves@redhat.com>
1300
1301 Skip building gdbserver in a cross-configuration.
1302 * configure.srv: Set $gdbserver_host depending on whether $target
1303 is $host. Use $gdbserver_host instead of $host.
1304
8ddd8e0e
SM
13052020-02-11 Simon Marchi <simon.marchi@efficios.com>
1306
1307 * configure: Re-generate.
1308
898e7f60
SM
13092020-02-11 Simon Marchi <simon.marchi@efficios.com>
1310
1311 * configure: Re-generate.
1312
58df732b
SM
13132020-02-11 Simon Marchi <simon.marchi@efficios.com>
1314
1315 * acinclude.m4: Update warning.m4 path.
1316
7928d571
HD
13172020-02-09 Hannes Domani <ssbssa@yahoo.de>
1318
1319 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1320 (handle_exception): Set siginfo_er.
1321 (win32_xfer_siginfo): New function.
1322
919adfe8
TT
13232020-02-07 Tom Tromey <tom@tromey.com>
1324 Pedro Alves <palves@redhat.com>
1325
1326 * README: Update build documentation.
1327 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1328 host, not target.
1329 * configure.ac: Update paths.
1330 * configure: Rebuild.
1331 * acinclude.m4: Update paths.
1332 * Makefile.in: Update include paths.
1333 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1334 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1335 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1336 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1337 (%-generated.c): Update paths.
1338 * Move entire directory from ../gdb/gdbserver.
1339
287c844a
MR
13402020-01-29 Maciej W. Rozycki <macro@wdc.com>
1341
1342 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1343
548a204f
PFC
13442020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1345
1346 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1347 assignment instead of srv_linux_obj.
1348
a2236a08
HD
13492020-01-28 Hannes Domani <ssbssa@yahoo.de>
1350
1351 * server.c (handle_qxfer_libraries): Write segment-address with
1352 paddress.
1353
bdaed379
HD
13542020-01-24 Hannes Domani <ssbssa@yahoo.de>
1355
1356 * Makefile.in (install-strip): New target.
1357 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1358 * aclocal.m4: Regenerate.
1359 * configure: Regenerate.
1360 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1361
42cd72aa
MR
13622020-01-24 Maciej W. Rozycki <macro@wdc.com>
1363
1364 * Makefile.in (SFILES): Adjust paths to point to real files.
1365 (OBS): Move waitstatus.o to target/waitstatus.o.
1366 (TAGS): Transform paths appropriately.
1367 (%.o): Rename to...
1368 (nat/%.o): ... this pattern rule.
1369 (%.o): Rename to...
1370 (target/%.o): ... this pattern rule.
1371 * configure.srv: Adjust paths throughout to include nat/ prefix
1372 with the revant files.
1373 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1374 * configure: Regenerate.
1375
42ba50ec
MR
13762020-01-24 Maciej W. Rozycki <macro@wdc.com>
1377
1378 * Makefile.in (TAGS): Remove config files from the recipe.
1379
05ea2a05
TT
13802020-01-14 Tom Tromey <tom@tromey.com>
1381
1382 * configure: Rebuild.
1383 * configure.ac: Remove any checks that were added to common.m4.
1384 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1385 lib-link.m4.
1386
01027315
TT
13872020-01-14 Tom Tromey <tom@tromey.com>
1388
1389 * server.h: Include config.h.
1390 * gdbreplay.c: Include config.h.
1391 * configure: Rebuild.
1392 * configure.ac: Don't source common.host.
1393 * acinclude.m4: Update path.
1394 * Makefile.in (INCSUPPORT): New variable.
1395 (INCLUDE_CFLAGS): Add INCSUPPORT.
1396 (SFILES): Update paths.
1397 (version-generated.c): Update path to create-version.sh.
1398 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1399
b2ceabe8
TT
14002020-01-14 Tom Tromey <tom@tromey.com>
1401
1402 * configure.ac (LIBS): Use WIN32APILIBS.
1403 (USE_WIN32API): Don't define.
1404 * configure: Rebuild.
1405
25c51f71
TT
14062020-01-14 Tom Tromey <tom@tromey.com>
1407
1408 * configure: Rebuild.
1409
c0bd321d
SM
14102020-01-13 Simon Marchi <simon.marchi@efficios.com>
1411
1412 * Makefile.in (%-generated.c): Remove rule for files from
1413 regformats/i386.
1414
bb564c58
SM
14152020-01-13 Simon Marchi <simon.marchi@efficios.com>
1416
1417 * configure: Re-generate.
1418
6e37c371
SM
14192020-01-13 Simon Marchi <simon.marchi@efficios.com>
1420
1421 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1422 Define to static.
1423 * tracepoint.c (stop_tracing, flush_trace_buffer,
1424 about_to_request_buffer_space, get_trace_state_variable_value,
1425 set_trace_state_variable_value, gdb_collect): Add declaration.
1426
df4a0200
SM
14272020-01-13 Simon Marchi <simon.marchi@efficios.com>
1428
1429 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1430 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1431 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1432 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1433 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1434 static.
1435
89e94ec9
SM
14362020-01-13 Simon Marchi <simon.marchi@efficios.com>
1437
1438 * inferiors.c: Include gdbsupport/common-inferior.h.
1439
2552728a
SM
14402020-01-13 Simon Marchi <simon.marchi@efficios.com>
1441
1442 * hostio-errno.c: Include hostio.h.
1443
4025fa09
SM
14442020-01-13 Simon Marchi <simon.marchi@efficios.com>
1445
1446 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1447 prerequisite.
1448
c0b0a142
SM
14492020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1450
1451 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1452 * linux-arm-tdesc.h: Include arch/arm.h.
1453
bb1183e2
SM
14542020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1455
1456 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1457
f5df0b5f
SM
14582020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1459
1460 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1461 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1462
5b6d1e4f
PA
14632020-01-10 Pedro Alves <palves@redhat.com>
1464
1465 * fork-child.c (post_fork_inferior): Pass target down to
1466 startup_inferior.
1467 * inferiors.c (switch_to_thread): Add process_stratum_target
1468 parameter.
1469 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1470 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1471 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1472 * remote-utils.c (prepare_resume_reply): Pass the target to
1473 switch_to_thread.
1474 * target.c (the_target): Now a process_stratum_target.
1475 (done_accessing_memory): Pass the target to switch_to_thread.
1476 (set_target_ops): Ajust to use process_stratum_target.
1477 * target.h (struct target_ops): Rename to ...
1478 (struct process_stratum_target): ... this.
1479 (the_target, set_target_ops): Adjust.
1480 (prepare_to_access_memory): Adjust comment.
1481 * win32-low.c (child_xfer_memory): Adjust to use
1482 process_stratum_target.
1483 (win32_target_ops): Now a process_stratum_target.
1484
559e7e50
EZ
14852020-01-06 Eli Zaretskii <eliz@gnu.org>
1486 Pedro Alves <palves@redhat.com>
1487
1488 * win32-low.c (get_child_debug_event): Extract the fatal exception
1489 from the exit status and convert to the equivalent Posix signal
1490 number.
1491 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1492 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1493
48189bec
HD
14942020-01-01 Hannes Domani <ssbssa@yahoo.de>
1495
1496 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1497
5dd8bf88
JB
14982020-01-01 Joel Brobecker <brobecker@adacore.com>
1499
1500 * server.c (gdbserver_version): Change copyright year to 2020.
1501 * gdbreplay.c (gdbreplay_version): Likewise.
1502
0ad6b8ee
CB
15032019-12-19 Christian Biesinger <cbiesinger@google.com>
1504
1505 * configure: Regenerate.
1506 * configure.ac: Quote variable arguments of test.
1507
1ee7b812
BE
15082019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1509
1510 * Makefile.in: Fix build with GNU Make 3.81
1511
d9fa87f4
TT
15122019-12-16 Tom Tromey <tromey@adacore.com>
1513
1514 * server.c (get_exec_file): Constify result.
1515
ab7d13f0
CB
15162019-12-10 Christian Biesinger <cbiesinger@google.com>
1517
1518 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1519 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1520 * config.in: Regenerate.
1521 * configure: Regenerate.
1522 * configure.ac: Don't check for strerror.
1523 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1524 Call safe_strerror instead of strerror.
1525 * server.h (strerror): Remove this now-unnecessary declaration.
1526 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1527 strerror.
1528 (gdb_agent_helper_thread): Likewise.
1529 * utils.c (perror_with_name): Likewise.
1530
4da8c3a8
TT
15312019-11-26 Tom Tromey <tom@tromey.com>
1532
1533 * configure, config.in: Rebuild.
1534
21987b9c
TT
15352019-11-26 Tom Tromey <tom@tromey.com>
1536
1537 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1538 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1539 gdb_sigmask.
1540 * configure, config.in: Rebuild.
1541
5e030278
TT
15422019-11-26 Tom Tromey <tom@tromey.com>
1543
1544 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1545 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1546 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1547 * acinclude.m4: Include ax_pthread.m4.
1548 * config.in, configure: Rebuild.
1549
6d91ce9a
CB
15502019-11-26 Christian Biesinger <cbiesinger@google.com>
1551
1552 * debug.c (debug_set_output): Call safe_strerror instead of
1553 strerror.
1554 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1555 (linux_kill_one_lwp): Likewise.
1556 (linux_detach_one_lwp): Likewise.
1557 (linux_wait_for_event_filtered): Likewise.
1558 (store_register): Likewise.
1559 * lynx-low.c (lynx_attach): Likewise.
1560 * mem-break.c (insert_memory_breakpoint): Likewise.
1561 (remove_memory_breakpoint): Likewise.
1562 (delete_fast_tracepoint_jump): Likewise.
1563 (set_fast_tracepoint_jump): Likewise.
1564 (uninsert_fast_tracepoint_jumps_at): Likewise.
1565 (reinsert_fast_tracepoint_jumps_at): Likewise.
1566 * nto-low.c (nto_xfer_memory): Likewise.
1567 (nto_resume): Likewise.
1568
6cdd651f
LM
15692019-11-20 Luis Machado <luis.machado@linaro.org>
1570
1571 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1572 instead of register count.
1573 * tdesc.c (tdesc_contains_feature): New function.
1574 * tdesc.h (tdesc_contains_feature): New prototype.
1575
cd850b40
CB
15762019-11-15 Christian Biesinger <cbiesinger@google.com>
1577
1578 * Makefile.in: Add safe-strerror.c.
1579 * configure: Regenerate.
1580 * configure.ac: Don't source common.host.
1581
5abebf3c
CB
15822019-11-15 Christian Biesinger <cbiesinger@google.com>
1583
1584 * config.in: Regenerate.
1585 * configure: Regenerate.
1586
e06f3d6e
AB
15872019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1588
1589 * ax.c (ax_printf): Handle size_t_arg.
1590
ca3a04f6
CB
15912019-11-06 Christian Biesinger <cbiesinger@google.com>
1592
1593 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1594 * mi/mi-main.c (output_cores): Likewise.
1595 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1596 (linux_xfer_osdata_modules): Likewise.
1597 * remote.c (register_remote_support_xml): Likewise.
1598 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1599 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1600
e48f6033
CB
16012019-11-01 Christian Biesinger <cbiesinger@google.com>
1602
1603 * configure: Regenerate.
1604 * configure.ac: Remove check for strerror_r.
1605
e7e97a2e
CB
16062019-10-31 Christian Biesinger <cbiesinger@google.com>
1607
1608 * config.in: Regenerate.
1609 * configure: Regenerate.
1610 * configure.ac: Also check for strerror_r.
1611
75cafaa6
CB
16122019-10-31 Christian Biesinger <cbiesinger@google.com>
1613
1614 * ax.h (debug_agent): Remove duplicate declaration.
1615
30baf67b
TV
16162019-10-26 Tom de Vries <tdevries@suse.de>
1617
1618 * linux-aarch64-low.c: Fix typos in comments.
1619 * linux-arm-low.c: Same.
1620 * linux-low.c: Same.
1621 * linux-ppc-low.c: Same.
1622 * proc-service.c: Same.
1623 * regcache.h: Same.
1624 * server.c: Same.
1625 * tracepoint.c: Same.
1626 * win32-low.c: Same.
1627
52c64cf7
TT
16282019-10-25 Tom Tromey <tromey@adacore.com>
1629
1630 * utils.c (xstrdup): Remove.
1631
c12d372d
TT
16322019-10-23 Tom Tromey <tom@tromey.com>
1633
1634 * configure, config.in: Rebuild.
1635
4d0b984b
TT
16362019-10-23 Tom Tromey <tom@tromey.com>
1637
1638 * configure: Rebuild.
1639 * acinclude.m4: Use m4_include, not sinclude.
1640
c5adaa19
TT
16412019-10-17 Tom Tromey <tromey@adacore.com>
1642
1643 * configure: Rebuild.
1644 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1645 in AC_CONFIG_FILES invocation.
1646 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1647 invocation.
1648
fec4e896
CB
16492019-10-16 Christian Biesinger <cbiesinger@google.com>
1650
1651 * server.c: Include xml-builtin.h.
1652 (get_xml_features): Don't declare xml_builtins here.
1653
00975ff6
AB
16542019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1655
1656 * Makefile.in: Remove references to vec-ipa.o.
1657
0dc32745
AB
16582019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1659
1660 * Makefile.in: Remove references to vec.c.
1661
3e6ec53a
CB
16622019-10-02 Christian Biesinger <cbiesinger@google.com>
1663
1664 * server.c (server_waiting): Change to bool.
1665 (extended_protocol): Likewise.
1666 (response_needed): Likewise.
1667 (exit_requested): Likewise.
1668 (run_once): Likewise.
1669 (report_no_resumed): Likewise.
1670 (non_stop): Likewise.
1671 (disable_packet_vCont): Likewise.
1672 (disable_packet_Tthread): Likewise.
1673 (disable_packet_qC): Likewise.
1674 (disable_packet_qfThreadInfo): Likewise.
1675 (handle_general_set): Update.
1676 (handle_detach): Update.
1677 (handle_monitor_command): Update.
1678 (handle_query): Update.
1679 (captured_main): Update.
1680 (process_serial_event): Update.
1681 * server.h (server_waiting): Change to bool.
1682 (disable_packet_vCont): Likewise.
1683 (disable_packet_Tthread): Likewise.
1684 (disable_packet_qC): Likewise.
1685 (disable_packet_qfThreadInfo): Likewise.
1686 (run_once): Likewise.
1687 (non_stop): Likewise.
1688 * target.c (target_stop_and_wait): Update.
1689
80fd2826
TT
16902019-10-02 Tom Tromey <tromey@adacore.com>
1691
1692 * Makefile.in (SFILES): Add common-inferior.c.
1693 (OBS): Add common-inferior.o.
1694 * server.c (startup_with_shell): Don't define.
1695
46f29a9a
AB
16962019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1697
1698 * linux-low.c (linux_low_read_btrace): Update for change to
1699 std::vector.
1700
f9d949fb
CB
17012019-09-20 Christian Biesinger <cbiesinger@google.com>
1702
1703 * debug.c (debug_threads): Remove comment in favor of the header.
1704 * debug.h (using_threads): Add declaration.
1705 (debug_threads): Add comment.
1706 * linux-aarch64-low.c: Include debug.h and remove declaration of
1707 debug_threads.
1708 * nto-low.c: Likewise.
1709 * remote-utils.c: Likewise.
1710 * thread-db.c: Likewise.
1711
abf516c6
UW
17122019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1713
1714 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1715 and powerpc-cell64l-ipa.o.
1716 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1717 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1718 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1719 (spu*-*-*): Remove.
1720
1721 * spu-low.c: Remove file.
1722
1723 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1724 (parse_spufs_run): Remove.
1725 (ppc_get_pc): Remove Cell/B.E. support.
1726 (ppc_set_pc): Likewise.
1727 (ppc_breakpoint_at): Likewise.
1728 (ppc_arch_setup): Likewise.
1729 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1730 tdesc_powerpc_cell32l.
1731 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1732 or init_registers_powerpc_cell32l.
1733 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1734 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1735 or init_registers_powerpc_cell32l.
1736 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1737 (init_registers_powerpc_cell32l): Remove prototype.
1738 (init_registers_powerpc_cell64l): Likewise.
1739
1740 * target.h (struct target_ops): Remove qxfer_spu member.
1741 * server.c (handle_qxfer_spu): Remove.
1742 (qxfer_packets): Remove entry for "spu".
1743 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1744 * linux-low.c (SPUFS_MAGIC): Remove.
1745 (spu_enumerate_spu_ids): Remove.
1746 (linux_qxfer_spu): Remove.
1747 (linux_target_ops): Remove qxfer_spu member.
1748 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1749 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1750 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1751
2d41fa11
SDJ
17522019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1753
1754 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1755 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1756 * config.in: Regenerate.
1757 * configure: Regenerate.
1758
d59b55f0
TT
17592019-08-15 Tom Tromey <tromey@adacore.com>
1760
1761 * target.c (target_write_memory): Use gdb::byte_vector.
1762
4196ab2a
TT
17632019-08-15 Tom Tromey <tromey@adacore.com>
1764
1765 * tracepoint.c (write_inferior_data_pointer)
1766 (write_inferior_integer, write_inferior_int8)
1767 (write_inferior_uinteger, m_tracepoint_action_download)
1768 (r_tracepoint_action_download, x_tracepoint_action_download)
1769 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1770 (download_agent_expr, download_tracepoint_1)
1771 (download_trace_state_variables, upload_fast_traceframes): Update.
1772 * server.c (gdb_write_memory): Update.
1773 * remote-utils.c (relocate_instruction): Update.
1774 * proc-service.c (ps_pdwrite): Update.
1775 * mem-break.c (remove_memory_breakpoint)
1776 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1777 (uninsert_fast_tracepoint_jumps_at)
1778 (reinsert_fast_tracepoint_jumps_at): Update.
1779 * linux-x86-low.c (append_insns)
1780 (i386_install_fast_tracepoint_jump_pad)
1781 (amd64_write_goto_address, i386_write_goto_address): Update.
1782 * linux-s390-low.c (append_insns, s390_write_goto_address):
1783 Update.
1784 * linux-ppc-low.c (ppc_relocate_instruction)
1785 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1786 (ppc_write_goto_address): Update.
1787 * linux-aarch64-low.c (append_insns): Update.
1788 * target.h (struct target_ops): Update.
1789 (write_inferior_memory): Don't declare.
1790 * target.c (target_write_memory): Rename from
1791 write_inferior_memory. Remove old target_write_memory.
1792
c6778d00
TT
17932019-08-15 Tom Tromey <tromey@adacore.com>
1794
1795 * target.c (write_inferior_memory): Use std::vector.
1796
404f2902
FCE
17972019-08-06 Frank Ch. Eigler <fche@redhat.com>
1798
1799 PR build/24886
1800 * configure.ac: Drop enable-libmcheck support.
1801 * configure, config.in: Rebuild.
1802 * acinclude.m4: Don't include it.
1803
4c5aa8e0
AH
18042019-07-19 Alan Hayward <alan.hayward@arm.com>
1805
1806 * configure.srv: Remove Arm xml files.
1807
7cc17433
AH
18082019-07-19 Alan Hayward <alan.hayward@arm.com>
1809
1810 * configure.srv: Add new files. Remove xml generated files.
1811 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1812 registers.
1813 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1814 * linux-aarch32-tdesc.c: New file.
1815 * linux-aarch32-tdesc.h: New file.
1816 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1817 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1818 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1819 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1820 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1821 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1822 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1823 (arm_read_description): Call arm_linux_read_description.
1824 (initialize_low_arch): Don't init registers.
1825 * linux-arm-tdesc.c: New file.
1826 * linux-arm-tdesc.h: New file.
1827
166a82be
AH
18282019-07-10 Alan Hayward <alan.hayward@arm.com>
1829
1830 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1831 Move counter inside for.
1832 (arm_read_description): Check ptrace earlier.
1833 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1834
268a13a5
TT
18352019-07-09 Tom Tromey <tom@tromey.com>
1836
1837 * configure: Rebuild.
1838 * configure.ac: Change common to gdbsupport.
1839 * acinclude.m4: Change common to gdbsupport.
1840 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1841 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1842 common to gdbsupport.
1843 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1844 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1845 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1846 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1847 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1848 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1849 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1850 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1851 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1852 common to gdbsupport.
1853
350fab54
AH
18542019-07-04 Alan Hayward <alan.hayward@arm.com>
1855
1856 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1857 defines.
1858 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1859
2b40fda7
AH
18602019-07-04 Alan Hayward <alan.hayward@arm.com>
1861
1862 * configure.srv: Remove legacy xml.
1863 * linux-aarch64-low.c (initialize_low_arch): Remove
1864 initialize_low_tdesc call.
1865 * linux-aarch64-tdesc-selftest.c: Remove file.
1866 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1867 * linux-x86-low.c (initialize_low_arch): Remove
1868 initialize_low_tdesc call.
1869 * linux-x86-tdesc-selftest.c: Remove file.
1870 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1871
7d10623d
TV
18722019-06-20 Tom de Vries <tdevries@suse.de>
1873
1874 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1875 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1876
8d6a48df
TV
18772019-06-19 Tom de Vries <tdevries@suse.de>
1878
1879 * debug.h (debug_write): Change return type to ssize_t.
1880 * debug.c (debug_write): Same.
1881
73cc7272
TT
18822019-06-14 Tom Tromey <tom@tromey.com>
1883
1884 * configure.ac: Use new path to gnulib.
1885 * configure: Rebuild.
1886 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1887 to gnulib.
1888
08f10e02
TT
18892019-06-11 Tom Tromey <tom@tromey.com>
1890
1891 * Makefile.in (SFILES): Add alloc.c.
1892 (OBS): Add alloc.o.
1893 (IPA_OBJS): Add alloc-ipa.o.
1894 (alloc-ipa.o): New target.
1895 (%.o: ../%.c): New pattern rule.
1896
422186a9
TT
18972019-06-10 Tom Tromey <tromey@adacore.com>
1898
1899 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1900 end warning with a newline.
1901 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1902 newline.
1903 * thread-db.c (attach_thread): Don't end warning with a newline.
1904 (thread_db_notice_clone): Likewise.
1905 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1906 newline.
1907 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1908 end warning with a newline.
1909
b02f78f9
PA
19102019-06-04 Pedro Alves <palves@redhat.com>
1911
1912 * server.c (captured_main): Use make_unique_xstrdup.
1913
88ed7edb
TT
19142019-06-02 Tom Tromey <tom@tromey.com>
1915
1916 * gdbreplay.c (fromhex): Remove.
1917 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1918
33a6bc35
TT
19192019-05-29 Tom Tromey <tromey@adacore.com>
1920
1921 * configure: Rebuild.
1922
e90a813d
KB
19232019-05-06 Kevin Buettner <kevinb@redhat.com>
1924
1925 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1926 sign extension code on 32-bit builds.
1927
353ea2d1
EZ
19282019-05-03 Eli Zaretskii <eliz@gnu.org>
1929
1930 * remote-utils.c:
1931 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1932
b494cdff
TT
19332019-04-19 Tom Tromey <tom@tromey.com>
1934
1935 * server.c (struct vstop_notif): Derive from notif_event.
1936 <base>: Remove.
1937 (queue_stop_reply): Update.
1938 (remove_all_on_match_ptid): Change type. Rewrite.
1939 (discard_queued_stop_replies): Rewrite.
1940 (in_queued_stop_replies_ptid): Change type.
1941 (in_queued_stop_replies): Rewrite.
1942 (notif_stop): Update.
1943 (queue_stop_reply_callback): Update.
1944 (captured_main): Don't call initialize_notif.
1945 (push_stop_notification): Update.
1946 * notif.c (notif_write_event, handle_notif_ack)
1947 (notif_event_enque, notif_push): Update.
1948 (notif_event_xfree, initialize_notif): Remove.
1949 * notif.h (struct notif_event): Include <list>, not
1950 "common/queue.h".
1951 (struct notif_server) <queue>: Now a std::list.
1952 (notif_event_p): Remove typedef.
1953 (initialize_notif): Don't declare.
1954 (struct notif_event): Add virtual destructor.
1955
a7e559cc
AH
19562019-04-17 Alan Hayward <alan.hayward@arm.com>
1957
1958 * ax.c (ax_vdebug): Call debug_printf.
1959 * debug.c (debug_write): New function.
1960 * debug.h (debug_write): New declaration.
1961 * linux-low.c (sigchld_handler): Call debug_write.
1962
aeb2e706
AH
19632019-04-17 Alan Hayward <alan.hayward@arm.com>
1964
1965 * debug.c (debug_set_output): New function.
1966 (debug_vprintf): Send output to debug_file.
1967 (debug_flush): Likewise.
1968 * debug.h (debug_set_output): New declaration.
1969 * server.c (handle_monitor_command): Add debug-file option.
1970 (captured_main): Likewise.
1971
c1bc0935
AH
19722019-04-17 Alan Hayward <alan.hayward@arm.com>
1973
1974 * debug.c (remote_debug): Add definition.
1975 * debug.h (remote_debug): Add declaration.
1976 * hostio.c (remote_debug): Remove declaration.
1977 * remote-utils.c (struct ui_file): Likewise.
1978 (remote_debug): Likewise.
1979 * remote-utils.h (remote_debug): Likewise,
1980 * server.c (remote_debug): Remove definition.
1981
3f52fdbc
KB
19822019-04-10 Kevin Buettner <kevinb@redhat.com>
1983
1984 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1985 when using a 64-bit gdbserver.
1986
b0319eaa
TT
19872019-04-09 Tom Tromey <tromey@adacore.com>
1988
1989 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1990
eedc3f4f
TT
19912019-04-08 Tom Tromey <tom@tromey.com>
1992
1993 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1994 throw.
1995 (linux_resume_one_lwp): Likewise.
1996
230d2906
TT
19972019-04-08 Tom Tromey <tom@tromey.com>
1998
1999 * gdbreplay.c: Update.
2000 * linux-low.c: Update.
2001 * server.c: Update.
2002
a70b8144
TT
20032019-04-08 Tom Tromey <tom@tromey.com>
2004
2005 * server.c: Use C++ exception handling.
2006 * linux-low.c: Use C++ exception handling.
2007 * gdbreplay.c: Use C++ exception handling.
2008
3d6e9d23
TT
20092019-04-08 Tom Tromey <tom@tromey.com>
2010
2011 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2012 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2013 (captured_main, main): Update.
2014 * gdbreplay.c (main): Update.
2015
0570503d
PFC
20162019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2017
2018 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2019 value in argument pointer, return 1 if the entry is found and 0
2020 otherwise. Move comment.
2021 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2022 * linux-low.h (linux_get_auxv): Declare.
2023 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2024
227a9e65
TT
20252019-04-05 Tom Tromey <tromey@adacore.com>
2026
2027 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2028 variables.
2029
69f4c9cc
AH
20302019-03-28 Alan Hayward <alan.hayward@arm.com>
2031
2032 * linux-low.c (AT_HWCAP2): Add define if not already included.
2033
974c89e0
AH
20342019-03-26 Alan Hayward <alan.hayward@arm.com>
2035
2036 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2037 (aarch64_arch_setup): Call linux_get_hwcap.
2038 * linux-arm-low.c (arm_get_hwcap): Remove function.
2039 (arm_read_description): Call linux_get_hwcap.
2040 * linux-low.c (linux_get_auxv): New function.
2041 (linux_get_hwcap): Likewise.
2042 (linux_get_hwcap2): Likewise.
2043 * linux-low.h (linux_get_hwcap): New declaration.
2044 (linux_get_hwcap2): Likewise.
2045 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2046 (ppc_arch_setup): Call linux_get_hwcap.
2047 * linux-s390-low.c (s390_get_hwcap): Remove function.
2048 (s390_arch_setup): Call linux_get_hwcap.
2049
1ef53e6b
AH
20502019-03-22 Alan Hayward <alan.hayward@arm.com>
2051 Jiong Wang <jiong.wang@arm.com>
2052
2053 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2054 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2055 to fail.
2056 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2057
ee4fbcfa
AH
20582019-03-22 Alan Hayward <alan.hayward@arm.com>
2059 Jiong Wang <jiong.wang@arm.com>
2060
2061 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2062 (aarch64_get_hwcap): New function.
2063 (aarch64_arch_setup): Read APIA hwcap.
2064
6dc0ebde
AH
20652019-03-22 Alan Hayward <alan.hayward@arm.com>
2066 Jiong Wang <jiong.wang@arm.com>
2067
2068 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2069 (initialize_low_tracepoint): Likewise.
2070 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2071 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2072 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2073 (aarch64_linux_read_description): Likewise.
2074 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2075
1163a4b7
JB
20762019-03-12 John Baldwin <jhb@FreeBSD.org>
2077
2078 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2079 i386_create_target_description for 'segments' parameter.
2080 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2081 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2082 * win32-i386-low.c (i386_arch_setup): Likewise.
2083
d3a70e03
TT
20842019-03-12 Tom Tromey <tromey@adacore.com>
2085
2086 * linux-low.c (iterate_over_lwps): Update.
2087
37991b4f
TT
20882019-03-06 Tom Tromey <tom@tromey.com>
2089
2090 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2091 (captured_main): Use SCOPE_EXIT.
2092
45950eb6
SDJ
20932019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2094
2095 * configure.srv: Use '$enable_unittest' instead of '$development'
2096 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2097 case.
2098
43ac54fc
TT
20992019-02-27 Tom Tromey <tromey@adacore.com>
2100
2101 * gdbreplay.c (logchar): Handle \r\n.
2102
df0da8a2
AH
21032019-02-07 Alan Hayward <alan.hayward@arm.com>
2104
2105 * linux-low.c (linux_attach): Add process before lwp.
2106 * server.c (attach_inferior): Check if already attached.
2107
1a5c2598
TT
21082019-02-07 Tom Tromey <tom@tromey.com>
2109
2110 * x86-tdesc.h: Rename include guard.
2111 * x86-low.h: Add include guard.
2112 * wincecompat.h: Rename include guard.
2113 * win32-low.h: Add include guard.
2114 * utils.h: Rename include guard.
2115 * tracepoint.h: Rename include guard.
2116 * tdesc.h: Rename include guard.
2117 * target.h: Rename include guard.
2118 * server.h: Rename include guard.
2119 * remote-utils.h: Rename include guard.
2120 * regcache.h: Rename include guard.
2121 * nto-low.h: Rename include guard.
2122 * notif.h: Add include guard.
2123 * mem-break.h: Rename include guard.
2124 * lynx-low.h: Add include guard.
2125 * linux-x86-tdesc.h: Add include guard.
2126 * linux-s390-tdesc.h: Add include guard.
2127 * linux-ppc-tdesc-init.h: Add include guard.
2128 * linux-low.h: Add include guard.
2129 * linux-aarch64-tdesc.h: Add include guard.
2130 * linux-aarch32-low.h: Add include guard.
2131 * inferiors.h: Rename include guard.
2132 * i387-fp.h: Rename include guard.
2133 * hostio.h: Rename include guard.
2134 * gdbthread.h: Rename include guard.
2135 * gdb_proc_service.h: Rename include guard.
2136 * event-loop.h: Rename include guard.
2137 * dll.h: Rename include guard.
2138 * debug.h: Rename include guard.
2139 * ax.h: Rename include guard.
2140
956cc47c
SN
21412018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2142
2143 PR gdb/23985
2144 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2145 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2146
a0707f3c
TT
21472019-01-25 Tom Tromey <tom@tromey.com>
2148
2149 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2150
0747795c
TT
21512019-01-25 Tom Tromey <tom@tromey.com>
2152
2153 * win32-low.c: Fix common/ includes.
2154 * win32-i386-low.c: Fix common/ includes.
2155 * tracepoint.c: Fix common/ includes.
2156 * thread-db.c: Fix common/ includes.
2157 * target.h: Fix common/ includes.
2158 * symbol.c: Fix common/ includes.
2159 * spu-low.c: Fix common/ includes.
2160 * server.h: Fix common/ includes.
2161 * server.c: Fix common/ includes.
2162 * remote-utils.c: Fix common/ includes.
2163 * regcache.h: Fix common/ includes.
2164 * regcache.c: Fix common/ includes.
2165 * nto-x86-low.c: Fix common/ includes.
2166 * notif.h: Fix common/ includes.
2167 * mem-break.h: Fix common/ includes.
2168 * lynx-low.c: Fix common/ includes.
2169 * lynx-i386-low.c: Fix common/ includes.
2170 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2171 * linux-x86-low.c: Fix common/ includes.
2172 * linux-low.c: Fix common/ includes.
2173 * inferiors.h: Fix common/ includes.
2174 * i387-fp.c: Fix common/ includes.
2175 * hostio.c: Fix common/ includes.
2176 * hostio-errno.c: Fix common/ includes.
2177 * gdbthread.h: Fix common/ includes.
2178 * gdbreplay.c: Fix common/ includes.
2179 * fork-child.c: Fix common/ includes.
2180 * event-loop.c: Fix common/ includes.
2181 * ax.c:
2182 (enum gdb_agent_op): Fix common/ includes.
2183
be6d4f74
TT
21842019-01-21 Tom Tromey <tom@tromey.com>
2185
2186 * tracepoint.c: Fix includes.
2187 * remote-utils.c: Fix includes.
2188 * linux-x86-low.c: Fix includes.
2189
66d91b39
JB
21902019-01-01 Joel Brobecker <brobecker@adacore.com>
2191
2192 * gdbreplay.c (gdbreplay_version): Update copyright year in
2193 version message.
2194 * server.c (gdbserver_version): Likewise.
2195
754e3168
AH
21962018-12-05 Alan Hayward <alan.hayward@arm.com>
2197
2198 * linux-low.c (add_lwp): Switch ordering.
2199
d105de22
TT
22002018-11-29 Tom Tromey <tom@tromey.com>
2201
2202 * win32-low.c (win32_join): Take pid, not process.
2203 * target.h (struct target_ops) <join>: Change argument type.
2204 (join_inferior): Change argument name.
2205 * spu-low.c (spu_join): Take pid, not process.
2206 * server.c (handle_detach): Preserve pid before destroying
2207 process.
2208 * lynx-low.c (lynx_join): Take pid, not process.
2209 * linux-low.c (linux_join): Take pid, not process.
2210
50138245
AH
22112018-11-23 Alan Hayward <alan.hayward@arm.com>
2212
2213 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2214 (aarch64_cannot_fetch_register): Likewise.
2215 (struct linux_target_ops): Update references.
2216
64f57f3d
PFC
22172018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2218
2219 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2220
8d619c01
EBM
22212018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2222
2223 * configure.srv (ipa_ppc_linux_regobj): Add
2224 powerpc-isa207-htm-vsx32l-ipa.o and
2225 powerpc-isa207-htm-vsx64l-ipa.o.
2226 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2227 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2228 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2229 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2230 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2231 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2232 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2233 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2234 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2235 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2236 (init_registers_powerpc_isa207_htm_vsx32l)
2237 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2238 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2239 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2240 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2241 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2242 (ppc_store_tm_ctarregset): New functions.
2243 (ppc_regsets): Add entries for HTM regsets.
2244 (ppc_arch_setup): Set htm in features struct when needed. Set
2245 sizes for the HTM regsets.
2246 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2247 (initialize_low_arch): Call
2248 init_registers_powerpc_isa207_htm_vsx32l and
2249 init_registers_powerpc_isa207_htm_vsx64l.
2250 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2251 PPC_TDESC_ISA207_HTM_VSX.
2252 (initialize_low_tracepoint): Call
2253 init_registers_powerpc_isa207_htm_vsx32l and
2254 init_registers_powerpc_isa207_htm_vsx64l.
2255
232bfb86
EBM
22562018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2257
2258 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2259 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2260 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2261 (ppc_store_pmuregset): New functions.
2262 (ppc_regsets): Add entries for ebb and pmu regsets.
2263 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2264 pmu regsets are available. Set sizes for these regsets.
2265
f2cf6173
EBM
22662018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2267
2268 * configure.srv (ipa_ppc_linux_regobj): Add
2269 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2270 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2271 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2272 rs6000/powerpc-isa207-vsx32l.xml, and
2273 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2274 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2275 <PPC_TDESC_ISA207_VSX>: New enum value.
2276 (init_registers_powerpc_isa207_vsx32l): Declare.
2277 (init_registers_powerpc_isa207_vsx64l): Declare.
2278 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2279 (ppc_store_tarregset): New function.
2280 (ppc_regsets): Add entry for the TAR regset.
2281 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2282 size for the TAR regsets.
2283 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2284 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2285 and init_registers_powerpc_isa207_vsx64l.
2286 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2287 (initialize_low_tracepoint): Call
2288 init_registers_powerpc_isa207_vsx32l and
2289 init_registers_powerpc_isa207_vsx64l.
2290
7ca18ed6
EBM
22912018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2292 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2293
2294 * configure.srv (ipa_ppc_linux_regobj): Add
2295 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2296 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2297 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2298 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2299 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2300 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2301 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2302 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2303 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2304 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2305 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2306 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2307 (ppc_hwcap): Add comment.
2308 (ppc_hwcap2): New global.
2309 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2310 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2311 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2312 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2313 when needed. Set sizes for the the DSCR and PPR regsets.
2314 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2315 (initialize_low_arch): Call
2316 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2317 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2318 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2319 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2320 (initialize_low_tracepoint): Call
2321 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2322 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2323
5c849b22
PFC
23242018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2325
2326 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2327
8ecfd7bd
SDJ
23282018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2329 Simon Marchi <simark@simark.ca>
2330
2331 * acinclude.m4: Include "../selftest.m4".
2332 * configure: Regenerate.
2333 * configure.ac: Use "GDB_AC_SELFTEST".
2334 * configure.srv: Use "$enable_unittests" instead of
2335 "$development" when checking whether unit tests have been
2336 enabled.
2337 * server.c (captured_main): Update message informing that
2338 selftests have been disabled.
2339
96643e35
TT
23402018-10-04 Tom Tromey <tom@tromey.com>
2341
2342 * configure: Rebuild.
2343
da4ae14a
TT
23442018-10-04 Tom Tromey <tom@tromey.com>
2345
2346 * server.c (handle_status): Rename inner "thread".
2347 (process_serial_event): Declare "res" in 'm' case.
2348 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2349 (iterate_over_lwps): Rename inner "thread".
2350 (linux_qxfer_libraries_svr4): Rename inner "len".
2351 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2352
7c619dbd
GB
23532018-10-01 Gary Benson <gbenson@redhat.com>
2354
2355 * gdb_proc_service.h: Moved common code to
2356 common/gdb_proc_service.h.
2357
3795e814
GB
23582018-10-01 Gary Benson <gbenson@redhat.com>
2359
2360 * gdb_proc_service.h: Synchronize comments and whitespace with
2361 GDB's version of this file.
2362
49b036f1
TT
23632018-09-25 Tom Tromey <tom@tromey.com>
2364
2365 * configure: Rebuild.
2366 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2367
8ff03f0b
SM
23682018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2369
2370 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2371 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2372 ($(IPA_LIB)): Sort IPA_OBJS.
2373
a1cd91dc
SM
23742018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2375
2376 * Makefile.in: Remove references to $(ADD_DEPS).
2377
752312ba
TT
23782018-09-16 Tom Tromey <tom@tromey.com>
2379
2380 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2381 variables.
2382 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2383 variables.
2384
f1628857
TT
23852018-09-05 Tom Tromey <tom@tromey.com>
2386
2387 * configure: Rebuild.
2388
ad202fcc
SM
23892018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2390
2391 PR build/23399
2392 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2393
d3d8724a
TT
23942018-08-27 Tom Tromey <tom@tromey.com>
2395
2396 PR build/23087:
2397 * configure: Rebuild.
2398
b4f183d2
TT
23992018-08-27 Tom Tromey <tom@tromey.com>
2400
2401 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2402 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2403 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2404 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2405 (s390x_emit_stack_adjust): Add casts to unsigned char.
2406
4e2aa472
SM
24072018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2408
2409 PR gdb/23374
2410 PR gdb/23375
2411 * server.h (struct client_state) <disable_randomization>:
2412 Initialize to 1.
2413
cf4088a9
SM
24142018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2415
2416 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2417 variable.
2418 (mips_supply_ptrace_register): Likewise.
2419
a0de763e
TT
24202018-07-22 Tom Tromey <tom@tromey.com>
2421
2422 * configure: Rebuild.
2423
b0a7723d
TT
24242018-07-22 Tom Tromey <tom@tromey.com>
2425
2426 * win32-low.c (win32_create_inferior): Remove unused variables.
2427 * gdbreplay.c (remote_open): Remove unused variable.
2428 * remote-utils.c (remote_prepare): Remove unused variable.
2429 * x86-tdesc.h (X86_TDESC_H): Define.
2430 (amd64_expedite_regs): Define conditionally.
2431 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2432 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2433 * remote-utils.c (readchar): Remove unused variable.
2434
a780ef4f
PA
24352018-07-13 Pedro Alves <palves@redhat.com>
2436
2437 * linux-low.c (linux_kill): Change parameter to process_info
2438 pointer instead of pid. Adjust.
2439 * lynx-low.c (lynx_kill): Likewise.
2440 * nto-low.c (nto_kill): Likewise.
2441 * spu-low.c (spu_kill): Likewise.
2442 * win32-low.c (win32_kill): Likewise.
2443 * server.c (handle_v_kill, kill_inferior_callback)
2444 (detach_or_kill_for_exit): Adjust.
2445 * target.c (kill_inferior): Change parameter to process_info
2446 pointer instead of pid. Adjust.
2447 * target.h (struct target_ops) <kill>: Change parameter to
2448 process_info pointer instead of pid. Adjust all implementations
2449 and callers.
2450 (kill_inferior): Likewise.
2451
ef2ddb33
PA
24522018-07-13 Pedro Alves <palves@redhat.com>
2453
2454 * linux-low.c (linux_detach, linux_join): Change parameter to
2455 process_info pointer instead of pid. Adjust.
2456 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2457 * nto-low.c (nto_detach): Likewise.
2458 * spu-low.c (spu_detach, spu_join): Likewise.
2459 * win32-low.c (win32_detach, win32_join): Likewise.
2460 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2461 * target.h (struct target_ops) <detach, join>: Change parameter to
2462 process_info pointer instead of pid. Adjust all implementations
2463 and callers.
2464 (detach_inferior, join_inferior): Rename 'pid' parameter to
2465 'proc'.
2466
c7ab0aef
SDJ
24672018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2468 Jan Kratochvil <jan.kratochvil@redhat.com>
2469 Paul Fertser <fercerpav@gmail.com>
2470 Tsutomu Seki <sekiriki@gmail.com>
2471
2472 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2473 (OBS): Add 'common/netstuff.o'.
2474 (GDBREPLAY_OBS): Likewise.
2475 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2476 (remote_open): Implement support for IPv6
2477 connections.
2478 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2479 and 'wspiapi.h'.
2480 (handle_accept_event): Accept connections from IPv6 sources.
2481 (remote_prepare): Handle IPv6-style hostnames; implement
2482 support for IPv6 connections.
2483 (remote_open): Implement support for printing connections from
2484 IPv6 sources.
2485
31445d10
PA
24862018-07-11 Pedro Alves <palves@redhat.com>
2487
2488 PR gdb/23377
2489 * mem-break.c (any_persistent_commands): Add process_info
2490 parameter and use it instead of relying on the current process.
2491 Change return type to bool.
2492 * mem-break.h (any_persistent_commands): Add process_info
2493 parameter and change return type to bool.
2494 * server.c (handle_detach): Remove require_running_or_return call.
2495 Look up the process_info for the process we're about to detach.
2496 If not found, return back error to GDB. Adjust
2497 any_persistent_commands call to pass down a process pointer.
2498
cb197132
PA
24992018-07-11 Pedro Alves <palves@redhat.com>
2500
2501 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2502 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2503 instead of collect_register_by_name.
2504 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2505 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2506
1b919490
VB
25072018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2508 Pedro Alves <palves@redhat.com>
2509
2510 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2511
d7e15655
TT
25122018-07-03 Tom Tromey <tom@tromey.com>
2513
2514 * linux-low.c: Update.
2515 * lynx-low.c: Update.
2516 * mem-break.c: Update.
2517 * nto-low.c: Update.
2518 * remote-utils.c: Update.
2519 * server.c: Update.
2520 * spu-low.c: Update.
2521 * target.c: Update.
2522 * win32-low.c: Update.
2523
26a57c92
TT
25242018-07-03 Tom Tromey <tom@tromey.com>
2525
2526 * server.c: Update.
2527
0e998d96
TT
25282018-07-03 Tom Tromey <tom@tromey.com>
2529
2530 * linux-low.c: Update.
2531
cc6bcb54
TT
25322018-07-03 Tom Tromey <tom@tromey.com>
2533
2534 * target.c: Update.
2535
e38504b3
TT
25362018-07-03 Tom Tromey <tom@tromey.com>
2537
2538 * linux-low.c: Update.
2539 * linux-mips-low.c: Update.
2540 * lynx-low.c: Update.
2541 * nto-low.c: Update.
2542 * remote-utils.c: Update.
2543 * server.c: Update.
2544 * spu-low.c: Update.
2545 * target.c: Update.
2546 * thread-db.c: Update.
2547
e99b03dc
TT
25482018-07-03 Tom Tromey <tom@tromey.com>
2549
2550 * linux-low.c: Update.
2551 * linux-mips-low.c: Update.
2552 * lynx-low.c: Update.
2553 * mem-break.c: Update.
2554 * nto-low.c: Update.
2555 * remote-utils.c: Update.
2556 * server.c: Update.
2557 * spu-low.c: Update.
2558 * target.c: Update.
2559 * tracepoint.c: Update.
2560
f2907e49
TT
25612018-07-03 Tom Tromey <tom@tromey.com>
2562
2563 * linux-low.c: Update.
2564 * linux-ppc-low.c: Update.
2565 * linux-x86-low.c: Update.
2566 * proc-service.c: Update.
2567 * server.c: Update.
2568 * spu-low.c: Update.
2569 * thread-db.c: Update.
2570 * win32-low.c: Update.
2571
fd79271b
TT
25722018-07-03 Tom Tromey <tom@tromey.com>
2573
2574 * linux-low.c: Update.
2575 * lynx-low.c: Update.
2576 * nto-low.c: Update.
2577 * remote-utils.c: Update.
2578 * spu-low.c: Update.
2579 * thread-db.c: Update.
2580 * win32-low.c: Update.
2581
c0867626
SDJ
25822018-06-29 Joel Brobecker <brobecker@adacore.com>
2583
2584 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2585 parameter in call to 'amd64_create_target_description'.
2586
2512d7ef
JK
25872018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2588
2589 * x86-tdesc.h: Remove executable permission flag.
2590
d0ac1c44
SM
25912018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2592
2593 * configure.ac: Remove AC_PREREQ, add missing quoting.
2594 * configure: Re-generate.
2595 * config.in: Re-generate.
2596 * aclocal.m4: Re-generate.
2597
c4eb05ff
SM
25982018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2599
2600 * tracepoint.h (current_traceframe): Remove declaration.
2601
02895270
AH
26022018-06-18 Alan Hayward <alan.hayward@arm.com>
2603
2604 * linux-aarch64-low.c (is_sve_tdesc): New function.
2605 (aarch64_sve_regs_copy_to_regcache): Likewise.
2606 (aarch64_sve_regs_copy_from_regcache): Likewise.
2607 (aarch64_regs_info): Add SVE checks.
2608 (initialize_low_arch): Initialize SVE.
2609
e9902bfc
AH
26102018-06-18 Alan Hayward <alan.hayward@arm.com>
2611
2612 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2613
fefa175e
AH
26142018-06-11 Alan Hayward <alan.hayward@arm.com>
2615
2616 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2617 (initialize_low_tracepoint): Likewise
2618 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2619 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2620 param.
2621 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2622 checks.
2623 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2624
b91ad3ff
AH
26252018-06-11 Alan Hayward <alan.hayward@arm.com>
2626
2627 * server.h (PBUFSIZ): Increase size
2628
f868386e
AH
26292018-06-11 Alan Hayward <alan.hayward@arm.com>
2630
2631 * regcache.c (regcache::raw_compare): New function.
2632 * regcache.h (regcache::raw_compare): New declaration.
2633
9c861883
AH
26342018-06-11 Alan Hayward <alan.hayward@arm.com>
2635
2636 * regcache.c (new_register_cache): Use new.
2637 (free_register_cache): Use delete.
2638 (register_data): Use const.
2639 (supply_register): Move body inside regcache.
2640 (regcache::raw_supply): New override function.
2641 (collect_register): Move body inside regcache.
2642 (regcache::raw_collect): New override function.
2643 (regcache::get_register_status): New override function.
2644 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2645
40591844
TT
26462018-06-09 Tom Tromey <tom@tromey.com>
2647
2648 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2649 declare queue.
2650 (event_queue): Use std::queue.
2651 (gdb_event_xfree): Remove.
2652 (initialize_event_loop, process_event, wait_for_event): Update.
2653
6341380d
SC
26542018-06-08 Stan Cox <scox@redhat.com>
2655
2656 * win32-low.c (win32_create_inferior): last_ptid and last_status
2657 moved to client_state.
2658
03349c93
PA
26592018-06-08 Pedro Alves <palves@redhat.com>
2660
2661 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2662 common/common-exceptions.o, common/common-utils.o,
2663 common/errors.o, common/print-utils.o and utils.o.
2664 * gdbreplay.c: Include "common-defs.h" instead of the two
2665 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2666 string.h or alloca.h.
2667 (perror_with_name): Delete.
2668 (remote_open): Use xstrdup instead of strdup.
2669 (main): Rename to ...
2670 (captured_main): ... this.
2671 (main): New.
2672
8dcc53b3
TT
26732018-06-08 Tom Tromey <tom@tromey.com>
2674
2675 * linux-low.c (linux_low_read_btrace): Update.
2676
c12a5089
SC
26772018-06-04 Stan Cox <scox@redhat.com>
2678
2679 * server.h (struct client_state): New.
2680 * server.c (cont_thread, general_thread, multi_process)
2681 (report_fork_events, report_vfork_events, report_exec_events)
2682 (report_thread_events, swbreak_feature, hwbreak_feature)
2683 (vCont_supported, disable_randomization, pass_signals)
2684 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2685 Moved to client_state.
2686 * remote-utils.c (remote_debug, noack_mode)
2687 (transport_is_reliable): Moved to client_state.
2688 * tracepoint.c (current_traceframe): Moved to client_state.
2689
2690 Update all callers.
2691 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2692 linux-low.c, remote-utils.h, target.c: Use client_state.
2693
122394f1
AH
26942018-05-31 Alan Hayward <alan.hayward@arm.com>
2695
2696 * configure.srv: Add new c/h file.
2697
95228a0d
AH
26982018-05-31 Alan Hayward <alan.hayward@arm.com>
2699
2700 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2701 null VQ.
2702
d8dab6c3
MR
27032018-05-25 Maciej W. Rozycki <macro@mips.com>
2704
2705 * gdb.arch/mips-fpregset-core.exp: New test.
2706 * gdb.arch/mips-fpregset-core.c: New test source.
2707
81e25b7c
EK
27082018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2709
2710 PR server/23198
2711 * hostio.c (require_int): Do not report overflow for integers
2712 between 0xfffffff and 0x7fffffff.
2713
7e947ad3
MR
27142018-05-22 Maciej W. Rozycki <macro@mips.com>
2715
2716 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2717 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2718 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2719 functions.
2720 (the_low_target): Wire them.
2721
1d75a658
PFC
27222018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2723
2724 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2725 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2726 mode. Call collect_register_by_name with vscr using
2727 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2728 (ppc_store_vrregset): Add and set vscr_offset variable as in
2729 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2730 vscr_offset.
2731
d078308a
PFC
27322018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2733
2734 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2735 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2736 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2737
7273b5fc
PFC
27382018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2739
2740 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2741 (ppc_store_vsxregset): Likewise.
2742 (ppc_fill_vrregset): Likewise.
2743 (ppc_store_vrregset): Likewise.
2744 (ppc_fill_evrregset): Likewise.
2745 (ppc_store_evrregset): Likewise.
2746 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2747 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2748 needed.
2749
2e077f5e
PFC
27502018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2751
2752 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2753 wordsize of the inferior. Call ppc_linux_target_wordsize.
2754
bd64614e
PFC
27552018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2756
2757 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2758 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2759 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2760 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2761 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2762 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2763 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2764 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2765 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2766 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2767 (tdesc_powerpc_e500l): Remove.
2768 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2769 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2770 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2771 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2772 linux-ppc-tdesc.h.
2773 (ppc_arch_setup): Remove target description matching code. Fill a
2774 ppc_linux_features struct and call ppc_linux_match_description
2775 with it.
2776
75d74cca
MR
27772018-05-22 Maciej W. Rozycki <macro@mips.com>
2778
2779 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2780 width of the requested register exceeds the width of the
2781 `ptrace' data type.
2782 (mips_cannot_store_register): Likewise.
2783
e4439e43
MR
27842018-05-21 Maciej W. Rozycki <macro@mips.com>
2785
2786 * linux-mips-low.c (mips_fetch_register): New function. Update
2787 preceding comment.
2788 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2789 (the_low_target): Wire `mips_fetch_register'.
2790
55271bf9
JB
27912018-05-10 Joel Brobecker <brobecker@adacore.com>
2792
2793 * lynx-i386-low.c (LYNXOS_178): New macro.
2794 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2795 the layout on LynxOS-178.
2796 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2797 handle floating point registers that are not supported by
2798 LynxOS-178.
2799
1a34f210
TT
28002018-05-10 Tom Tromey <tom@tromey.com>
2801
2802 * configure: Rebuild.
2803
190852c8
JB
28042018-05-10 Joel Brobecker <brobecker@adacore.com>
2805
2806 PR server/23158:
2807 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2808 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2809 Use it to set the expedite_regs field in the given tdesc.
2810 * x86-tdesc.h: New file.
2811 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2812 Adjust following the addition of the new expedite_regs parameter
2813 to init_target_desc.
2814 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2815 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2816 (i386_linux_read_description, amd64_linux_read_description):
2817 Adjust following the addition of the new expedite_regs parameter
2818 to init_target_desc.
2819 * lynx-i386-low.c: #include "x86-tdesc.h".
2820 (lynx_i386_arch_setup): Adjust following the addition of the new
2821 expedite_regs parameter to init_target_desc.
2822 * nto-x86-low.c: #include "x86-tdesc.h".
2823 (nto_x86_arch_setup): Adjust following the addition of the new
2824 expedite_regs parameter to init_target_desc.
2825 * win32-i386-low.c: #include "x86-tdesc.h".
2826 (i386_arch_setup): Adjust following the addition of the new
2827 expedite_regs parameter to init_target_desc.
2828
7dbac825
JB
28292018-05-10 Joel Brobecker <brobecker@adacore.com>
2830
2831 PR server/23158:
2832 * win32-low.c (win32_create_inferior): Add call to my_wait
2833 setting last_status global.
2834
906994d9
JB
28352018-05-10 Joel Brobecker <brobecker@adacore.com>
2836
2837 PR server/23158:
2838 * win32-low.c (create_process): Only call gdb_tilde_expand if
2839 inferior_cwd is not NULL.
2840
8ee22052
AB
28412018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2842
2843 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2844 registers to the cache if their values have changed.
2845 (i387_xsave_to_cache): Provide default values for x87 control
2846 registers when these features are available, but disabled.
2847 * regcache.c (supply_register_by_name_zeroed): New function.
2848 * regcache.h (supply_register_by_name_zeroed): Declare new
2849 function.
2850
aff689d3
TT
28512018-05-07 Tom Tromey <tom@tromey.com>
2852
2853 * configure: Rebuild.
2854
85e26832
TT
28552018-05-04 Tom Tromey <tom@tromey.com>
2856
2857 * configure: Rebuild.
2858
a3b60e45
JK
28592018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2860 Pedro Alves <palves@redhat.com>
2861
2862 * linux-aarch64-low.c (aarch64_stopped_data_address):
2863 Likewise.
2864
632e107b
TT
28652018-04-27 Tom Tromey <tom@tromey.com>
2866
2867 * configure: Rebuild.
2868
458412c3
TT
28692018-04-23 Tom Tromey <tom@tromey.com>
2870
2871 * configure: Rebuild.
2872
f31c089e
SM
28732018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2874
2875 * Makefile.in (depcomp): Add "..".
2876 (all_deps_files): New and use it.
2877
b319b098
AH
28782018-04-18 Alan Hayward <alan.hayward@arm.com>
2879
2880 * configure.srv (aarch64*-*-linux*): Don't include xml.
2881 (i[34567]86-*-cygwin*): Likewise.
2882 (i[34567]86-*-linux*): Likewise.
2883 (i[34567]86-*-lynxos*): Likewise.
2884 (i[34567]86-*-mingw32ce*): Likewise.
2885 (i[34567]86-*-mingw*): Likewise.
2886 (i[34567]86-*-nto*): Likewise.
2887 (tic6x-*-uclinux): Likewise.
2888 (x86_64-*-linux*): Likewise.
2889 (x86_64-*-mingw*): Likewise.
2890 (x86_64-*-cygwin*): Likewise.
2891
3b74854b
AH
28922018-04-18 Alan Hayward <alan.hayward@arm.com>
2893
2894 * tdesc.c: Remove xml parameter.
2895
e98577a9
AH
28962018-04-18 Alan Hayward <alan.hayward@arm.com>
2897
2898 * server.c (get_features_xml): Remove cast.
2899 * tdesc.c (void target_desc::accept): Fill in function.
2900 (tdesc_get_features_xml): Remove old xml creation.
2901 (print_xml_feature::visit_pre): Add xml vistor.
2902 * tdesc.h (struct target_desc): Make xmltarget mutable.
2903 (tdesc_get_features_xml): Remove declaration.
2904
d278f585
AH
29052018-04-18 Alan Hayward <alan.hayward@arm.com>
2906
2907 * tdesc.c (tdesc_architecture_name): Add new function.
2908 (tdesc_osabi_name): Likewise.
2909 (tdesc_get_features_xml): Use new functions.
2910
eee8a18d
AH
29112018-04-18 Alan Hayward <alan.hayward@arm.com>
2912
2913 * tdesc.c (tdesc_create_flags): Remove.
2914 (tdesc_add_flag): Likewise.
2915 (tdesc_named_type): Likewise.
2916 (tdesc_create_union): Likewise.
2917 (tdesc_create_struct): Likewise.
2918 (tdesc_create_vector): Likewise.
2919 (tdesc_add_bitfield): Likewise.
2920 (tdesc_add_field): Likewise.
2921 (tdesc_set_struct_size): Likewise.
2922
82ec9bc7
AH
29232018-04-18 Alan Hayward <alan.hayward@arm.com>
2924
2925 * tdesc.c (~target_desc): Remove implictly deleted items.
2926 (init_target_desc): Iterate all features.
2927 (tdesc_get_features_xml): Use vector.
2928 (tdesc_create_feature): Create feature.
2929 * tdesc.h (tdesc_feature) Remove
2930 (target_desc): Add features.
2931
ea3e7d71
AH
29322018-04-18 Alan Hayward <alan.hayward@arm.com>
2933
2934 * Makefile.in: Add common/tdesc.c
2935 * tdesc.c (init_target_desc): init all reg_defs from register
2936 vector.
2937 (tdesc_create_reg): Create tdesc_reg.
2938 * tdesc.h (tdesc_feature): Add register vector.
2939
17d08cd4
SM
29402018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2941
2942 * tdesc.h (struct target_desc) <features>: Change type to
2943 std::vector<std::string>.
2944 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2945 changes.
2946 (tdesc_get_features_xml): Likewise.
2947 (tdesc_create_feature): Likewise.
2948
5cd3e386
AH
29492018-03-26 Alan Hayward <alan.hayward@arm.com>
2950
2951 * regcache.c (find_register_by_number): Return a ref.
2952 (find_regno): Use references.
2953 (register_size): Likewise.
2954 (register_data): Likewise.
2955 * tdesc.c (target_desc::~target_desc): Remove free calls.
2956 (target_desc::operator==): Use std::vector compare.
2957 (init_target_desc): Use reference.
2958 (tdesc_create_reg): Use reg constructors.
2959 * tdesc.h (struct target_desc): Replace pointer with object.
2960
dff7492c
AH
29612018-03-23 Alan Hayward <alan.hayward@arm.com>
2962
2963 * regcache.c (find_register_by_number): Make static.
2964 (find_regno): Use find_register_by_number
2965 * regcache.h (struct reg): Remove declaration.
2966
d80e5242
AH
29672018-03-23 Alan Hayward <alan.hayward@arm.com>
2968
2969 * tdesc.c (target_desc::~target_desc): Move to here.
2970 (target_desc::operator==): Likewise.
2971 * tdesc.h (target_desc::~target_desc): Move from here.
2972 (target_desc::operator==): Likewise.
2973
f69c5afb
AA
29742018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2975
2976 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2977
ce29f843
AA
29782018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2979
2980 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2981 S390_TDESC_GS.
2982 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2983 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2984 and init_registers_s390_gs_linux64.
2985
c49bd90b
AA
29862018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2987
2988 * linux-s390-low.c (s390_fill_gs): Remove function.
2989 (s390_fill_gsbc): Remove function.
2990 (s390_regsets): Set fill functions for the guarded storage regsets
2991 to NULL.
2992
7edb9bd3
AA
29932018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2994
2995 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2996 the word size. Add comment.
2997 (s390_get_wordsize): New function.
2998 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2999 pswm with it. Instead, use s390_get_wordsize to determine the
3000 word size first and derive the correct tdesc from that directly.
3001
39be3c7e
SM
30022018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3003
3004 * Makefile.in: Include silent-rules.mk.
3005 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3006 (COMPILE): Add ECHO_CXX.
3007 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3008 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3009 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3010 (version-generated.c): Add ECHO_GEN.
3011 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3012 (IPAGENT_COMPILE): Add ECHO_CXX.
3013 (%-generated.c): Add ECHO_REGDAT.
3014
3ae9ce5d
TT
30152018-03-14 Tom Tromey <tom@tromey.com>
3016
3017 PR cli/14977:
3018 * ax.c (ax_printf): Special case for NULL.
3019
e6a58aa8
SM
30202018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3021
3022 * linux-low.c (linux_qxfer_libraries_svr4): Use
3023 xml_escape_text_append.
3024
f6e8a41e
SM
30252018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3026
3027 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3028
b9671caf
SM
30292018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3030
3031 * server.c (handle_general_set): Remove unnecessary xstrdup.
3032
e80aaf61
SM
30332018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3034
3035 * server.c (parse_debug_format_options): Adjust to
3036 delim_string_to_char_ptr_vec changes.
3037 * thread-db.c (thread_db_load_search): Adjust to
3038 dirnames_to_char_ptr_vec changes.
3039
b1223e78
MM
30402018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3041
3042 * target.h (target_enable_btrace, target_disable_btrace)
3043 (target_read_btrace, target_read_btrace_conf): Turn macro into
3044 inline function. Throw error if target method is not defined.
3045 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3046 check for btrace target method. Be prepared to handle exceptions
3047 from btrace target methods.
3048
81561546
SDJ
30492018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3050
3051 * server.c (captured_main): Change order of error message printed
3052 when the current working directory cannot be found.
3053
25e3c82c
SDJ
30542018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3055
3056 * server.c: Include "filenames.h" and "pathstuff.h".
3057 (program_name): Delete variable.
3058 (program_path): New anonymous class.
3059 (get_exec_wrapper): Use "program_path" instead of
3060 "program_name".
3061 (handle_v_run): Likewise.
3062 (captured_main): Likewise.
3063 (process_serial_event): Likewise.
3064
b4987c95
SDJ
30652018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3066
3067 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3068 (OBJS): Add "pathstuff.o".
3069 * server.c (current_directory): New global variable.
3070 (captured_main): Initialize "current_directory".
3071
f46cd62a
AH
30722018-02-26 Alan Hayward <alan.hayward@arm.com>
3073
3074 * tdesc.c: Use common/tdesc.h.
3075 * tdesc.h: Likewise.
3076
a543c5ca
AH
30772018-02-20 Alan Hayward <alan.hayward@arm.com>
3078 Simon Marchi <simon.marchi@ericsson.com>
3079
3080 * Makefile.in: Switch order of make rules.
3081
b5884fa7
AH
30822018-02-19 Alan Hayward <alan.hayward@arm.com>
3083
3084 * Makefile.in: Add common directory in build.
3085 * configure.ac: Add common reference.
3086 * configure: Regenerate.
3087
de6242d3
MM
30882018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3089
3090 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3091 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3092 * spu-low.c (spu_target_ops): Likewise.
3093 * win32-low.c (win32_target_ops): Likewise.
3094 * server.c (supported_btrace_packets): Report packets unconditionally.
3095 * target.h (target_ops) <supports_btrace>: Remove.
3096 (target_supports_btrace): Remove.
3097
9ee23a85
MM
30982018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3099
3100 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3101 (handle_btrace_disable): Change return type to void. Use exceptions
3102 to report errors.
3103 (handle_btrace_general_set): Catch exception and copy message to
3104 return message.
3105
8ce47547
TT
31062018-02-08 Tom Tromey <tom@tromey.com>
3107
3108 * linux-low.c (install_software_single_step_breakpoints): Use
3109 make_scoped_restore.
3110 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3111 (do_restore_current_thread_cleanup): Remove.
3112 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3113 declare.
3114
45dd3607
TT
31152018-02-08 Tom Tromey <tom@tromey.com>
3116
3117 * mem-break.c (set_raw_breakpoint_at): Use
3118 gdb::unique_xmalloc_ptr.
3119
e671cd59
PA
31202018-01-30 Pedro Alves <palves@redhat.com>
3121
3122 PR gdb/13211
3123 * target.c (target_terminal::terminal_state): Rename to ...
3124 (target_terminal::m_terminal_state): ... this.
3125
a0aad537
JC
31262018-01-19 James Clarke <jrtc27@jrtc27.com>
3127
3128 * linux-low.c (handle_extended_wait): Surround call to
3129 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3130
4d9b86e1
SM
31312018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3132
3133 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3134 linux_ptrace_attach_fail_reason_string now returning an
3135 std::string.
3136 (linux_attach): Likewise.
3137 * thread-db.c (attach_thread): Likewise.
3138
f517c180
EA
31392018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3140
3141 PR gdb/21559
3142 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3143 checking for fs_base/gs_base fields in struct user_regs_struct.
3144 * configure: Regenerate.
3145
9a70f35c
YQ
31462018-01-16 Yao Qi <yao.qi@linaro.org>
3147
3148 PR gdb/18749
3149 * linux-low.c (fetch_register): Call supply_register instead of
3150 error.
3151
605fd3c6
YQ
31522018-01-08 Yao Qi <yao.qi@linaro.org>
3153 Simon Marchi <simon.marchi@ericsson.com>
3154
3155 * Makefile.in (OBS): Remove selftest.o.
3156 * configure.ac: Set srv_selftest_objs if $development is true.
3157 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3158 * configure: Re-generated.
3159 * server.c (captured_main): Wrap variable selftest_filter with
3160 GDB_SELF_TEST.
3161
2cc05030
SM
31622018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3163
3164 * server.c (parse_debug_format_options): Return std::string.
3165 (handle_monitor_command, captured_main): Adjust.
3166
e379cee6
PA
31672018-01-05 Pedro Alves <palves@redhat.com>
3168
3169 PR gdb/18653
3170 * server.c (captured_main): Pass quiet=false to
3171 save_original_signals_state.
3172
82e1e79a
JB
31732018-01-01 Joel Brobecker <brobecker@adacore.com>
3174
3175 * gdbreplay.c (gdbreplay_version): Update copyright year in
3176 version message.
3177 * server.c (gdbserver_version): Likewise.
3178
8e481c3b
TT
31792017-12-08 Tom Tromey <tom@tromey.com>
3180
3181 * ax.c (ax_printf): Update.
3182
a8806230
YQ
31832017-12-07 Yao Qi <yao.qi@linaro.org>
3184
3185 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3186 aarch64_linux_read_description.
3187 * linux-amd64-ipa.c (idx2mask): New array.
3188 (get_ipa_tdesc): Move idx2mask out.
3189 (initialize_low_tracepoint): Initialize target descriptions.
3190 * linux-i386-ipa.c (idx2mask): New array.
3191 (get_ipa_tdesc): Move idx2mask out.
3192 (initialize_low_tracepoint): Initialize target descriptions.
3193
d4a0e8b5
SM
31942017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3195
3196 * tdesc.c (struct tdesc_type): Change return type.
3197 (tdesc_add_flag): Change parameter type.
3198 (tdesc_add_bitfield): Likewise.
3199 (tdesc_add_field): Likewise.
3200 (tdesc_set_struct_size): Likewise.
3201
798a7429
SM
32022017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3203
3204 * regcache.c (registers_to_string): Remove unused variable.
3205
c0e15c9b
SM
32062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3207
3208 * inferiors.c (for_each_inferior_with_data): Remove.
3209 * inferiors.h (for_each_inferior_with_data): Remove.
3210 * server.c (handle_qxfer_threads_worker): Change parameter type.
3211 (handle_qxfer_threads_proper): Use for_each_thread.
3212
f0045347
SM
32132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3214
3215 * inferiors.c (for_each_inferior): Remove.
3216 (clear_inferiors): Use for_each_thread.
3217 * inferiors.h (for_each_inferior): Remove.
3218 * linux-low.c (linux_wait_for_event_filtered): Use
3219 for_each_thread.
3220 (linux_stabilize_threads): Likewise.
3221 * regcache.c (regcache_release): Likewise.
3222 * server.c (gdb_wants_all_threads_stopped): Likewise.
3223 (clear_pending_status_callback): Remove.
3224 (handle_status): Use for_each_thread.
3225 (captured_main): Likewise.
3226 * win32-low.c (child_init_thread_list): Likewise.
3227 (win32_clear_inferiors): Likewise.
3228 (fake_breakpoint_event): Likewise.
3229
9521758b
SM
32302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3231
3232 * inferiors.h (find_inferior): Remove.
3233 * inferiors.c (find_inferior): Remove.
3234
8f86d7aa
SM
32352017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3236
3237 * linux-low.c (resume_status_pending_p): Update comment.
3238 (need_step_over_p): Update comment.
3239
e2b44075
SM
32402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3241
3242 * linux-low.c (proceed_one_lwp): Return void, change parameter
3243 type.
3244 (unsuspend_and_proceed_one_lwp): Likewise.
3245 (proceed_all_lwps): Use for_each_thread.
3246 (unstop_all_lwps): Likewise.
3247
c80825ff
SM
32482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3249
3250 * linux-low.c (linux_resume_one_thread): Return void, take
3251 parameter directly.
3252 (linux_resume): Use for_each_thread.
3253
df3e4dbe
SM
32542017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3255
3256 * linux-low.c (send_sigstop_callback): Return void, change
3257 parameter type. Rename to...
3258 (send_sigstop): ... this.
3259 (suspend_and_send_sigstop_callback): Return void, change parameter
3260 type. Rename to...
3261 (suspend_and_send_sigstop): ... this.
3262 (stop_all_lwps): Use for_each_thread.
3263
5a6b0a41
SM
32642017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3265
3266 * linux-low.c (lwp_running): Return bool, remove unused
3267 argument.
3268 (linux_stabilize_threads): Use find_thread.
3269
39a64da5
SM
32702017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3271
3272 * linux-low.c (select_singlestep_lwp_callback): Remove.
3273 (count_events_callback): Remove.
3274 (select_event_lwp_callback): Remove.
3275 (select_event_lwp): Use find_thread/for_each_thread.
3276
a1385b7b
SM
32772017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3278
3279 * linux-low.c (not_stopped_callback): Return bool, take filter
3280 argument directly.
3281 (linux_wait_for_event_filtered): Use find_thread.
3282 (linux_wait_1): Likewise.
3283
454296a2
SM
32842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3285
3286 * linux-low.c (same_lwp): Remove.
3287 (find_lwp_pid): Use find_thread.
3288
6b2a85da
SM
32892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3290
3291 * linux-low.c (delete_lwp_callback): Remove.
3292 (linux_mourn): Use for_each_thread.
3293
798a38e8
SM
32942017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3295
3296 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3297 args parameter, don't check for pid.
3298 (linux_detach): Use for_each_thread.
3299
e4eb0dec
SM
33002017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3301
3302 * linux-low.c (struct counter): Remove.
3303 (second_thread_of_pid_p): Remove.
3304 (last_thread_of_process_p): Use find_thread.
3305
83e1b6c1
SM
33062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3307
3308 * inferiors.c (find_inferior_in_random): Remove.
3309 * inferiors.h (find_inferior_in_random): Remove.
3310 * linux-low.c (status_pending_p_callback): Return bool, accept
3311 parameter ptid directly.
3312 (linux_wait_for_event_filtered): Use find_thread_in_random.
3313 (linux_wait_1): Likewise.
3314
8dc7b443
SM
33152017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3316
3317 * inferiors.c (find_inferior_id): Remove.
3318 (find_thread_ptid): Move implemention from find_inferior_id to
3319 here.
3320 * inferiors.h (find_inferior_id): Remove.
3321 * server.c (handle_status): Use find_thread_ptid.
3322 (process_serial_event): Likewise.
3323 * thread-db.c (find_one_thread): Likewise.
3324 (thread_db_thread_handle): Likewise.
3325 * win32-low.c (thread_rec): Likewise.
3326 (child_delete_thread): Likewise.
3327 (win32_thread_alive): Likewise.
3328 (get_child_debug_event): Likewise.
3329
da25033c
SM
33302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3331
3332 * linux-mips-low.c (update_watch_registers_callback): Return
3333 void, remove pid_p parameter, don't check for pid.
3334 (mips_insert_point, mips_remove_point): Use for_each_thread.
3335
c91bb56b
SM
33362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3337
3338 * lynx.low (lynx_delete_thread_callback): Remove.
3339 (lynx_mourn): Use for_each_thread.
3340
634a3254
SM
33412017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3342
3343 * regcache.c (regcache_invalidate_one): Remove.
3344 (regcache_invalidate_pid): use for_each_thread.
3345
41272101
TT
33462017-11-26 Tom Tromey <tom@tromey.com>
3347
3348 * linux-low.c (linux_create_inferior): Update.
3349
f5291a6f
UW
33502017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3351
3352 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3353
6654d750
AH
33542017-11-24 Alan Hayward <alan.hayward@arm.com>
3355
3356 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3357 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3358 * linux-aarch64-tdesc-selftest.c: New file.
3359 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3360
33612017-11-24 Alan Hayward <alan.hayward@arm.com>
3362
3363 * configure.srv: Add new file.
3364 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3365 * linux-aarch64-tdesc-selftest.c: New file.
3366 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3367
49bdb7ee
AH
33682017-11-24 Alan Hayward <alan.hayward@arm.com>
3369
3370 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3371 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3372 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3373
d6d7ce56
AH
33742017-11-24 Alan Hayward <alan.hayward@arm.com>
3375
3376 * configure.srv: Add new files.
3377 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3378 aarch64_linux_read_description.
3379 * linux-aarch64-low.c (aarch64_linux_read_description):
3380 Merge with aarch64_arch_setup.
3381 (aarch64_arch_setup): Call aarch64_linux_read_description.
3382 * linux-aarch64-tdesc.c: New file.
3383 * linux-aarch64-tdesc.h: New file.
3384
506fe5f4
YQ
33852017-11-24 Yao Qi <yao.qi@linaro.org>
3386
3387 * configure.srv: Set $srv_regobj for tic6x-linux.
3388 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3389 (tic6x_read_description): Move some code to tic6x_arch_setup.
3390 (tic6x_tdesc_test): New function.
3391 (initialize_low_arch): Call selftests::register_test.
3392
29f9a567
YQ
33932017-11-22 Yao Qi <yao.qi@linaro.org>
3394
3395 * remote-utils.c (prepare_resume_reply): Use memcpy.
3396
578290ec
SM
33972017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3398
3399 * linux-low.c (kill_one_lwp_callback): Return void, take
3400 argument directly, don't filter on pid.
3401 (linux_kill): Use for_each_thread.
3402
eca55aec
SM
34032017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3404
3405 * linux-low.c (need_step_over_p): Return bool, remove dummy
3406 argument.
3407 (linux_resume, proceed_all_lwps): Use find_thread.
3408
25c28b4d
SM
34092017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3410
3411 * linux-low.c (resume_status_pending_p): Return bool, remove
3412 flag_p argument.
3413 (linux_resume): Use find_thread.
3414
5fdda392
SM
34152017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3416
3417 * linux-low.c (struct thread_resume_array): Remove.
3418 (linux_set_resume_request): Return void, take arguments
3419 directly.
3420 (linux_resume): Use for_each_thread.
3421
fcb056a5
SM
34222017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3423
3424 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3425 return bool, remove data argument.
3426 (linux_stabilize_threads): Use find_thread.
3427
139720c5
SM
34282017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3429
3430 * linux-low.c (unsuspend_one_lwp): Remove.
3431 (unsuspend_all_lwps): Use for_each_thread, inline code from
3432 unsuspend_one_lwp.
3433
6d1e5673
SM
34342017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3435
3436 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3437 * linux-low.c (struct iterate_over_lwps_args): Remove.
3438 (iterate_over_lwps_filter): Remove.
3439 (iterate_over_lwps): Use find_thread.
3440
bbf550d5
SM
34412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3442
3443 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3444 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3445 code from reset_lwp_ptrace_options_callback.
3446
00192f77
SM
34472017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3448
3449 * linux-arm-low.c (struct update_registers_data): Remove.
3450 (update_registers_callback): Return void, take arguments
3451 directly, don't check thread's pid.
3452 (arm_insert_point, arm_remove_point): Use for_each_thread.
3453
2bee2b6c
SM
34542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3455
3456 * win32-low.c (continue_one_thread): Return void, take argument
3457 directly.
3458 (child_continue): Use for_each_thread.
3459
0b360f19
SM
34602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3461
3462 * win32-i386-low.c (update_debug_registers_callback): Rename
3463 to ...
3464 (update_debug_registers): ... this, return void, remove pid_p arg.
3465 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3466
f27866ba
SM
34672017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3468
3469 * inferiors.h (struct process_info): Add constructor, initialize
3470 fields..
3471 <syscalls_to_catch>: Change type to std::vector<int>.
3472 * inferiors.c (add_process): Allocate process_info with new.
3473 (remove_process): Free process_info with delete.
3474 * linux-low.c (handle_extended_wait): Adjust.
3475 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3476 * server.c (handle_general_set): Adjust.
3477
e849ea89
PA
34782017-11-16 Pedro Alves <palves@redhat.com>
3479
3480 * remote-utils.c (remote_close): Block SIGIO signals instead of
3481 uninstalling the SIGIO handler.
3482
1d0aa65c
AH
34832017-11-16 Alan Hayward <alan.hayward@arm.com>
3484
3485 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3486
3491a34c
YQ
34872017-11-16 Yao Qi <yao.qi@linaro.org>
3488
3489 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3490 (tic6x_store_gregset): Likewise.
3491 (tic6x_usrregs_info): Move it up.
3492
a602f924
AH
34932017-11-15 Alan Hayward <alan.hayward@arm.com>
3494
3495 * Makefile.in: Update arch rules.
3496 * configure.srv: Explicitly mark arch/ files.
3497
5616b6c3
AS
34982017-11-13 Andreas Schwab <schwab@suse.de>
3499
3500 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3501 function.
3502 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3503
d1928160
PA
35042017-11-06 Pedro Alves <palves@redhat.com>
3505
3506 * config.in, configure: Regenerate.
3507
bac608e7
SM
35082017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3509
3510 * target.c (struct thread_search): Remove.
3511 (thread_search_callback): Remove.
3512 (prepare_to_access_memory): Use for_each_thread instead of
3513 find_inferior. Inline code from thread_search_callback.
3514
eaddb425
SM
35152017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3516
3517 * server.c (struct visit_actioned_threads_data): Remove.
3518 (visit_actioned_threads): Change prototype to take arguments
3519 directly.
3520 (resume): Use find_thread instead of find_inferior.
3521
99078d34
SM
35222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3523
3524 * server.c (queue_stop_reply_callback): Change prototype, return
3525 void.
3526 (find_status_pending_thread_callback): Remove.
3527 (handle_status): Replace find_inferior with find_thread and
3528 for_each_thread.
3529
cc628f3d
AH
35302017-10-25 Alan Hayward <alan.hayward@arm.com>
3531
3532 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3533 with REGNO.
3534 (aarch64_store_gregset): Likewise.
3535 (aarch64_fill_fpregset): Likewise.
3536 (aarch64_store_fpregset): Likewise.
3537
4d3bb80e
SM
35382017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3539
3540 * gdbthread.h (find_thread, for_each_thread): New functions.
3541 * inferiors.c (thread_of_pid): Remove.
3542 (find_any_thread_of_pid): Use find_thread.
3543 * linux-low.c (num_lwps): Use for_each_thread.
3544
7a7cdfa0
YQ
35452017-10-17 Yao Qi <yao.qi@linaro.org>
3546
3547 * Makefile.in: Remove one rule.
3548 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3549
e675d170
YQ
35502017-10-17 Yao Qi <yao.qi@linaro.org>
3551
3552 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3553 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3554
7eb4e0f9
YQ
35552017-10-17 Yao Qi <yao.qi@linaro.org>
3556
3557 * configure.srv: Rename arm.o with arch/arm.o.
3558
60d6cfc9
YQ
35592017-10-17 Yao Qi <yao.qi@linaro.org>
3560
3561 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3562 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3563 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3564 (arch-i386.o, arch-amd64.o): Remove rules.
3565 (arch/%.o): New rule.
3566 Update POSTCOMPILE and COMPILE.pre.
3567 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3568 * configure: Re-generated.
3569 * configure.srv: Replace arch-i386.o with arch/i386.o.
3570 Replace arch-amd64.o with arch/amd64.o.
3571
5bfda255
YQ
35722017-10-16 Yao Qi <yao.qi@linaro.org>
3573
3574 * configure: Regenerated.
3575
9c80ecd6
SM
35762017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3577
3578 * inferiors.h: (struct inferior_list): Remove.
3579 (struct inferior_list_entry); Remove.
3580 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3581 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3582 get_first_inferior): Remove.
3583 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3584 find_inferior_id, find_inferior_in_random): Change signature.
3585 * inferiors.c (all_threads): Change type to
3586 std::list<thread_info *>.
3587 (get_thread): Remove macro.
3588 (find_inferior, find_inferior_id): Change signature, implement
3589 using find_thread.
3590 (find_inferior_in_random): Change signature, implement using
3591 find_thread_in_random.
3592 (for_each_inferior, for_each_inferior_with_data): Change
3593 signature, implement using for_each_thread.
3594 (add_inferior_to_list, remove_inferior): Remove.
3595 (add_thread, get_first_thread, thread_of_pid,
3596 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3597 (get_first_inferior, one_inferior_p, clear_inferior_list):
3598 Remove.
3599 (clear_inferiors, get_thread_process): Update.
3600 * gdbthread.h: Include <list>.
3601 (struct thread_info) <entry>: Remove field.
3602 <id>: New field.
3603 (all_threads): Change type to std::list<thread_info *>.
3604 (get_first_inferior): Add doc.
3605 (find_thread, for_each_thread, find_thread_in_random): New
3606 functions.
3607 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3608 * linux-arm-low.c (update_registers_callback): Update.
3609 * linux-low.c (second_thread_of_pid_p): Update.
3610 (kill_one_lwp_callback, linux_detach_lwp_callback,
3611 delete_lwp_callback, status_pending_p_callback, same_lwp,
3612 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3613 iterate_over_lwps, not_stopped_callback,
3614 resume_stopped_resumed_lwps, count_events_callback,
3615 select_singlestep_lwp_callback, select_event_lwp_callback,
3616 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3617 suspend_and_send_sigstop_callback, wait_for_sigstop,
3618 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3619 lwp_running, linux_set_resume_request, resume_status_pending_p,
3620 need_step_over_p, start_step_over, linux_resume_one_thread,
3621 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3622 reset_lwp_ptrace_options_callback): Update.
3623 * linux-mips-low.c (update_watch_registers_callback): Update.
3624 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3625 Update.
3626 (free_register_cache_thread_one): Remove.
3627 (regcache_release): Update.
3628 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3629 handle_qxfer_threads_worker): Update.
3630 (handle_query): Update, use list iterator.
3631 (visit_actioned_threads, handle_pending_status,
3632 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3633 clear_pending_status_callback, set_pending_status_callback,
3634 find_status_pending_thread_callback, handle_status,
3635 process_serial_event): Update.
3636 * target.c (thread_search_callback): Update.
3637 * thread-db.c (thread_db_get_tls_address): Update.
3638 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3639 Update.
3640 * win32-i386-low.c (update_debug_registers_callback): Update.
3641 * win32-low.c (delete_thread_info, child_delete_thread,
3642 continue_one_thread, suspend_one_thread,
3643 get_child_debug_event): Adjust.
3644
9179355e
SM
36452017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3646
3647 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3648 * inferiors.h: Include <list>.
3649 (struct process_info) <entry>: Remove field.
3650 <pid>: New field.
3651 (pid_of): Change macro to function.
3652 (ptid_of, lwpid_of): Remove macro.
3653 (all_processes): Change type to std::list<process_info *>.
3654 (ALL_PROCESSES): Remove macro.
3655 (for_each_process, find_process): New function.
3656 * inferiors.c (all_processes): Change type to
3657 std::list<process_info *>.
3658 (find_thread_process): Adjust.
3659 (add_process): Likewise.
3660 (remove_process): Likewise.
3661 (find_process_pid): Likewise.
3662 (get_first_process): Likewise.
3663 (started_inferior_callback): Remove.
3664 (have_started_inferiors_p): Adjust.
3665 (attached_inferior_callback): Remove.
3666 (have_attached_inferiors_p): Adjust.
3667 * linux-low.c (check_zombie_leaders): Likewise.
3668 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3669 (x86_linux_update_xmltarget): Adjust.
3670 * server.c (handle_query): Likewise.
3671 (gdb_reattached_process): Remove.
3672 (handle_status): Adjust.
3673 (kill_inferior_callback): Likewise.
3674 (detach_or_kill_inferior): Remove.
3675 (print_started_pid): Likewise.
3676 (print_attached_pid): Likewise.
3677 (detach_or_kill_for_exit): Update.
3678 (process_serial_event): Likewise.
3679 * linux-arm-low.c (arm_new_fork): Likewise.
3680
c9cb8905
SM
36812017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3682
3683 * dll.h: Include <list>.
3684 (struct dll_info): Add constructor.
3685 <entry>: Remove field.
3686 (all_dlls): Change type to std::list<dll_info>.
3687 * dll.c: Include <algorithm>.
3688 (get_dll): Remove macro.
3689 (all_dlls): Change type to std::list<dll_info *>.
3690 (free_one_dll): Remove.
3691 (match_dll): Likewise.
3692 (loaded_dll): Adjust.
3693 (unloaded_dll): Adjust to all_dlls type change, use
3694 std::find_if. Inline code from match_dll.
3695 (clear_dlls): Adjust to all_dlls type change.
3696 * server.c (emit_dll_description): Remove.
3697 (handle_qxfer_libraries): Adjust to all_dlls type change,
3698 integrate emit_dll_description's functionality.
3699
04ec7890
SM
37002017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3701
3702 * linux-low.h (struct linux_target_ops) <delete_process>: New
3703 field.
3704 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3705 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3706 (struct linux_target_ops): Add delete_process callback.
3707 * linux-arm-low.c (arm_delete_process): New.
3708 (struct linux_target_ops): Add delete_process callback.
3709 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3710 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3711 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3712 * linux-mips-low.c (mips_linux_delete_process): New.
3713 (struct linux_target_ops): Add delete_process callback.
3714 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3715 * linux-s390-low.c (struct linux_target_ops): Likewise.
3716 * linux-sh-low.c (struct linux_target_ops): Likewise.
3717 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3718 * linux-tile-low.c (struct linux_target_ops): Likewise.
3719 * linux-x86-low.c (x86_linux_delete_process): New.
3720 (struct linux_target_ops): Add delete_process callback.
3721 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3722
466eecee
SM
37232017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3724
3725 * linux-aarch64-low.c (the_low_target): Add thread delete
3726 callback.
3727 * linux-arm-low.c (arm_delete_thread): New function.
3728 (the_low_target): Add thread delete callback.
3729 * linux-bfin-low.c (the_low_target): Likewise.
3730 * linux-crisv32-low.c (the_low_target): Likewise.
3731 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3732 set.
3733 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3734 field.
3735 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3736 * linux-mips-low.c (mips_linux_delete_thread): New function.
3737 (the_low_target): Add thread delete callback.
3738 * linux-ppc-low.c (the_low_target): Likewise.
3739 * linux-s390-low.c (the_low_target): Likewise.
3740 * linux-sh-low.c (the_low_target): Likewise.
3741 * linux-tic6x-low.c (the_low_target): Likewise.
3742 * linux-tile-low.c (the_low_target): Likewise.
3743 * linux-x86-low.c (the_low_target): Likewise.
3744 * linux-xtensa-low.c (the_low_target): Likewise.
3745
b79f7801
YZ
37462017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3747
3748 * win32-low.c: Include "common-inferior.h".
3749
bc3b087d
SDJ
37502017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3751
3752 * inferiors.c (set_inferior_cwd): New function.
3753 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3754 (handle_query): Inform that QSetWorkingDir is supported.
3755 * win32-low.c (create_process): Pass the inferior's cwd to
3756 CreateProcess.
3757
d092c5a2
SDJ
37582017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3759
3760 * inferiors.c (current_inferior_cwd): New global variable.
3761 (get_inferior_cwd): New function.
3762 * inferiors.h (struct process_info) <cwd>: New field.
3763
7da0a886
SDJ
37642017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3765
3766 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3767 (OBS): Add gdb_tilde_expand.o.
3768
289a6840
SM
37692017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3770
3771 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3772 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3773
256642e8
PA
37742017-09-29 Pedro Alves <palves@redhat.com>
3775
3776 * ax.c (gdb_parse_agent_expr): Constify.
3777 * ax.h (gdb_parse_agent_expr): Constify.
3778 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3779 Constify.
3780 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3781 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3782 * remote-utils.h (read_ptid): Constify.
3783 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3784 (process_point_options, process_serial_event): Constify.
3785 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3786 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3787 (cmd_qtbuffer): Constify.
3788
5b9ca4d4
PA
37892017-09-29 Pedro Alves <palves@redhat.com>
3790
3791 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3792 fails.
3793
94c207e0
PA
37942017-09-29 Pedro Alves <palves@redhat.com>
3795
3796 * linux-low.c (handle_extended_wait): Pass parent thread instead
3797 of process to thread_db_notice_clone.
3798 * linux-low.h (thread_db_notice_clone): Replace parent process
3799 parameter with parent thread parameter.
3800 * thread-db.c (find_one_thread): Add comment.
3801 (thread_db_notice_clone): Replace parent process parameter with
3802 parent thread parameter. Temporarily switch to the parent thread.
3803
75352e28
SDJ
38042017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3805
3806 * gdbthread.h: Include "common-gdbthread.h".
3807 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3808 "if" when validating the ptid.
3809 * remote-utils.c: Include "gdbthread.h".
3810 (prepare_resume_reply): Use "switch_to_thread".
3811 * target.c (done_accessing_memory): Likewise.
3812
ad339634
AA
38132017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3814
3815 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3816 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3817 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3818 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3819 s390x-gs-linux64-ipa.o to ipa_obj.
3820 * linux-s390-low.c (HWCAP_S390_GS): New define.
3821 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3822 New functions.
3823 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3824 (s390_arch_setup): Check for guarded-storage support and choose
3825 appropriate tdesc.
3826 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3827 init_registers_s390x_gs_linux64.
3828 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3829 enum value.
3830 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3831 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3832
cc4d742f
SM
38332017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3834
3835 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3836
f6327dcb
KB
38372017-09-21 Kevin Buettner <kevinb@redhat.com>
3838
3839 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3840 (thread_db_thread_handle): Declare.
3841 * linux-low.c (linux_target_ops): Initialize thread_handle.
3842 * server.c (handle_qxfer_threads_worker): Add support for
3843 "handle" attribute.
3844 * target.h (struct target_ops): Add new function pointer,
3845 thread_handle.
3846 (target_thread_handle): Define.
3847 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3848 field in lwp.
3849 (thread_db_thread_handle): New function.
3850
86299109
KB
38512017-09-21 Kevin Buettner <kevinb@redhat.com>
3852
3853 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3854 * linux-low.h (thread_db_notice_clone): Declare.
3855 * thread-db.c (thread_db_notice_clone): New function.
3856
f557a88a
PA
38572017-09-21 Pedro Alves <palves@redhat.com>
3858
3859 * server.c (gdb_read_memory, handle_status, process_serial_event)
3860 (handle_serial_event, handle_target_event): Adjust to
3861 set_desired_thread prototype change.
3862 * target.c (set_desired_thread): Remove 'use_general' parameter
3863 and adjust.
3864 * target.h (set_desired_thread): Remove 'use_general' parameter.
3865
223ffa71
TT
38662017-09-20 Tom Tromey <tom@tromey.com>
3867
3868 * target.c (target_terminal::terminal_state): Define.
3869 (target_terminal::init): Rename from target_terminal_init.
3870 (target_terminal::inferior): Rename from
3871 target_terminal_inferior.
3872 (target_terminal::ours): Rename from target_terminal_ours.
3873 (target_terminal::ours_for_output, target_terminal::info): New.
3874
04fd3ba9
SM
38752017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3876
3877 * server.c (accumulate_file_name_length): Remove.
3878 (emit_dll_description): Adjust to std::string change.
3879 (handle_qxfer_libraries): Use std::string to hold document.
3880
5e187554
SM
38812017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3882
3883 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3884 return type of xml_escape_text.
3885 * server.c (emit_dll_description): Likewise.
3886
1526853e
SM
38872017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3888
3889 * server.c (captured_main): Accept argument for --selftest.
3890 Update run_tests call.
3891 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3892 when registering selftests.
3893
c4dfafab
SDJ
38942017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3895
3896 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3897 instead of "VEC" for "target_desc.reg_defs".
3898 (regcache_cpy): Likewise.
3899 (registers_to_string): Likewise.
3900 (registers_from_string): Likewise.
3901 (find_regno): Likewise.
3902 (supply_regblock): Likewise.
3903 (regcache_raw_read_unsigned): Likewise.
3904 * tdesc.c (init_target_desc): Likewise.
3905 (tdesc_create_reg): Likewise.
3906 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3907 (struct target_desc) <reg_defs>: Convert to "std::vector".
3908 (target_desc): Do not initialize "reg_defs".
3909 (~target_desc): Update code to use "std::vector" instead of "VEC"
3910 for "target_desc.reg_defs".
3911 (operator==): Likewise.
3912
124aceb4
SM
39132017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3914
3915 * inferiors.h (thread_to_gdb_id): Remove.
3916 * inferiors.c (thread_to_gdb_id): Remove.
3917 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3918 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3919 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3920 Likewise.
3921 * nto-low.c (nto_fetch_registers, nto_store_registers,
3922 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3923
96cde54f
SM
39242017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3925
3926 * inferiors.h (gdb_id_to_thread_id): Remove.
3927 * inferiors.c (gdb_id_to_thread_id): Remove.
3928 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3929 removal. Move pid declaration closer to where it's used.
3930
e8ca139e
SM
39312017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3932
3933 * server.c (handle_detach): New function.
3934 (process_serial_event): Move code out, call handle_detach.
3935
f8a4e119
SM
39362017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3937
3938 * server.c (require_running): Rename to ...
3939 (require_running_or_return): ... this ...
3940 (require_running_or_break): ... and this.
3941 (handle_query, process_serial_event): Adjust.
3942
0eb0a407
SM
39432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3944
3945 * linux-low.c (linux_set_resume_request): Remove unused
3946 variables.
3947
785922a5
SM
39482017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3949
3950 * server.c (first_thread_of): Remove.
3951 (process_serial_event): Replace usage of first_thread_of with
3952 find_any_thread_of_pid.
3953 * tracepoint.c (same_process_p): Remove.
3954 (gdb_agent_about_to_close): Replace usage of same_process_p with
3955 find_any_thread_of_pid.
3956 * linux-x86-low.c (same_process_callback): Remove.
3957 (x86_arch_setup_process_callback): Replace usage of
3958 same_process_callback with find_any_thread_of_pid.
3959 * thread-db.c (any_thread_of): Remove.
3960 (switch_to_process): Replace usage of any_thread_of with
3961 find_any_thread_of_pid.
3962 * inferiors.c (thread_pid_matches_callback): Remove.
3963 (find_thread_process): Adjust to use find_any_thread_of_pid.
3964
a059f00c
SDJ
39652017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3966
3967 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 3968 with "!VEC_empty".
a059f00c 3969
cc397f3a
SDJ
39702017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3971
3972 * linux-low.c (handle_extended_wait): Use
3973 "allocate_target_description" instead of "XNEW".
3974 * linux-x86-low.c (initialize_low_arch): Likewise.
3975
22916b07
YQ
39762017-09-05 Yao Qi <yao.qi@linaro.org>
3977
3978 * configure.srv (srv_i386_regobj): Remove.
3979 (srv_amd64_regobj): Remove.
3980 (srv_regobj): Set it to "" for x86 non-linux targets.
3981 * linux-x86-tdesc.c (i386_linux_read_description):
3982 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3983 (init_registers_i386): Remove the declaration.
3984 (tdesc_i386): Remove the declaration.
3985 (lynx_i386_arch_setup): Call i386_create_target_description.
3986 * nto-x86-low.c: Likewise.
3987 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3988 [!__x86_64__]: include arch/i386.h.
3989 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3990
38602d55
YQ
39912017-09-05 Yao Qi <yao.qi@linaro.org>
3992
3993 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3994 i386/amd64-XXX-linux from it.
3995
44b886ff
YQ
39962017-09-05 Yao Qi <yao.qi@linaro.org>
3997
3998 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3999 false.
4000 (ipa_amd64_linux_regobj): Remove.
4001 (ipa_x32_linux_regobj): Remove.
4002
b4570e4b
YQ
40032017-09-05 Yao Qi <yao.qi@linaro.org>
4004
4005 * Makefile.in (arch-amd64.o): New rule.
4006 * configure.srv: Append arch-amd64.o.
4007 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4008 (get_ipa_tdesc): Call amd64_linux_read_description.
4009 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4010 and init_registers_amd64_XXX.
4011 * linux-x86-low.c (x86_linux_read_description): Call
4012 amd64_linux_read_description.
4013 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4014 (initialize_low_arch): Don't call init_registers_x32_XXX and
4015 init_registers_amd64_XXX.
4016 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4017 and tdesc_amd64_XXX.
4018 [__x86_64__] (amd64_tdesc_test): New function.
4019 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4020 and init_registers_amd64_XXX.
4021 * linux-x86-tdesc.c: Include arch/amd64.h.
4022 (xcr0_to_tdesc_idx): New function.
4023 (i386_linux_read_description): New function.
4024 (amd64_get_ipa_tdesc_idx): New function.
4025 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4026 (amd64_get_ipa_tdesc): Declare.
4027
d1f28ea2
YQ
40282017-09-05 Yao Qi <yao.qi@linaro.org>
4029
4030 * configure.srv (srv_i386_linux_xmlfiles): Remove
4031 i386/i386-XXX-linux.xml from it.
4032
25a93583
YQ
40332017-09-05 Yao Qi <yao.qi@linaro.org>
4034
4035 * configure.srv: Set srv_i386_linux_regobj empty if $development
4036 is false.
4037 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4038 initialize_low_tdesc.
4039 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4040 with #if initialize_low_tdesc.
4041 * linux-x86-tdesc-selftest.c: New file.
4042 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4043
5f035c07
YQ
40442017-09-05 Yao Qi <yao.qi@linaro.org>
4045
4046 * Makefile.in (arch-i386.o): New rule.
4047 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4048 (x86_64-*-linux*): Likewise.
4049 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4050 include arch/i386.h.
4051 (i386_linux_read_description): Remove code and call
4052 i386_create_target_description.
4053 * tdesc.c (allocate_target_description): New function.
4054 * tdesc.h (set_tdesc_architecture): Remove declaration.
4055 (set_tdesc_osabi): Likewise.
4056
0abe8a89
YQ
40572017-09-05 Yao Qi <yao.qi@linaro.org>
4058
4059 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4060 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4061 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4062 .xmltarget.
4063 * server.c (get_features_xml): Call tdesc_get_features_xml.
4064 * tdesc.c (set_tdesc_architecture): New function.
4065 (set_tdesc_osabi): New function.
4066 (tdesc_get_features_xml): New function.
4067 (tdesc_create_feature): Add an argument.
4068 * tdesc.h (struct target_desc) <features>: New field.
4069 <arch, osabi>: New field.
4070 (~target_desc): xfree features, arch, and osabi.
4071 (target_desc::oerator==): Don't compare .xmltarget.
4072 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4073 (set_tdesc_osabi): Likewise.
4074 (tdesc_get_features_xml): Likewise.
4075
0a188386
YQ
40762017-09-05 Yao Qi <yao.qi@linaro.org>
4077
4078 * linux-x86-tdesc.c: Include selftest.h.
4079 (i386_tdesc_test): New function.
4080 (initialize_low_tdesc): Call selftests::register_test.
4081 * tdesc.h: Include regdef.h.
4082 (target_desc): Override operator == and !=.
4083
f49ff000
YQ
40842017-09-05 Yao Qi <yao.qi@linaro.org>
4085
4086 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4087 (ipa_obj): Likewise.
4088 * linux-i386-ipa.c: Include common/x86-xstate.h
4089 (get_ipa_tdesc): Call i386_linux_read_description.
4090 (initialize_low_tracepoint): Don't call init_registers_XXX
4091 functions, call initialize_low_tdesc instead.
4092 * linux-x86-low.c (x86_linux_read_description): Call
4093 i386_linux_read_description.
4094 (initialize_low_arch): Don't call init_registers_i386_XXX
4095 functions, call initialize_low_tdesc.
4096 * linux-x86-tdesc.c: New file.
4097 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4098 (i386_get_ipa_tdesc_idx): Declare.
4099 (i386_get_ipa_tdesc): Declare.
4100 (initialize_low_tdesc): Declare.
4101
2b68ef2f
YQ
41022017-09-05 Yao Qi <yao.qi@linaro.org>
4103
4104 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4105 instead of 0.
4106
f7000548
YQ
41072017-09-05 Yao Qi <yao.qi@linaro.org>
4108
4109 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4110 * regcache.c (get_thread_regcache): Use VEC_length.
4111 (init_register_cache): Likewise.
4112 (regcache_cpy): Likewise.
4113 (registers_to_string): Iterate reg_defs via VEC_iterate.
4114 (find_regno): Likewise.
4115 (find_register_by_number): Use VEC_index.
4116 (register_size): Call find_register_by_number.
4117 (register_data): Call find_register_by_number.
4118 (supply_regblock): Use VEC_length.
4119 (regcache_raw_read_unsigned): Likewise.
4120 * tdesc.c (init_target_desc): Iterate reg_defs via
4121 VEC_iterate.
4122 (default_description): Update initializer.
4123 (copy_target_description): Don't update field num_registers.
4124 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4125 <num_registers>: Remove.
4126
50a421ac
SM
41272017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4128
4129 * Makefile.in (.SECONDARY): Define target.
4130
23fdd69e
SM
41312017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4132
4133 * linux-low.c (linux_wait_1): Adjust.
4134 * server.c (queue_stop_reply_callback): Adjust.
4135
0a2dde4a
SDJ
41362017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4137
4138 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4139 QEnvironmentUnset and QEnvironmentReset packets.
4140 (handle_query): Inform remote that QEnvironmentHexEncoded,
4141 QEnvironmentUnset and QEnvironmentReset are supported.
4142
6afd337d
SM
41432017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4144
4145 * inferiors.h (inferior_target_data): Rename to ...
4146 (thread_target_data): ... this.
4147 (inferior_regcache_data): Rename to ...
4148 (thread_regcache_data): ... this.
4149 (set_inferior_regcache_data): Rename to ...
4150 (set_thread_regcache_data): ... this.
4151 * inferiors.c (inferior_target_data): Rename to ...
4152 (thread_target_data): ... this.
4153 (inferior_regcache_data): Rename to ...
4154 (thread_regcache_data): ... this.
4155 (set_inferior_regcache_data): Rename to ...
4156 (set_thread_regcache_data): ... this.
4157 (free_one_thread): Update.
4158 * linux-low.h (get_thread_lwp): Update.
4159 * regcache.c (get_thread_regcache): Update.
4160 (regcache_invalidate_thread): Update.
4161 (free_register_cache_thread): Update.
4162 * win32-i386-low.c (update_debug_registers_callback): Update.
4163 (win32_get_current_dr): Update.
4164 * win32-low.c (thread_rec): Update.
4165 (delete_thread_info): Update.
4166 (continue_one_thread): Update.
4167 (suspend_one_thread): Update.
4168
a160cc46
SM
41692017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4170
4171 * inferiors.c (set_inferior_target_data): Remove.
4172 * inferiors.h (set_inferior_target_data): Remove.
4173
6d580b63
YQ
41742017-08-18 Yao Qi <yao.qi@linaro.org>
4175
4176 * Makefile.in (OBS): Add selftest.o.
4177 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4178 * configure, config.in: Re-generated.
4179 * server.c: Include common/sefltest.h.
4180 (captured_main): Handle option --selftest.
4181
f5a29eb0
YQ
41822017-08-09 Yao Qi <yao.qi@linaro.org>
4183
4184 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4185 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4186 i386-avx-mpx.o and i386-mmx.o.
4187 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4188 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4189 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4190 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4191 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4192 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4193 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4194 i386/amd64-avx-mpx.xml.
4195
57757c2f
YQ
41962017-08-09 Yao Qi <yao.qi@linaro.org>
4197
4198 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4199 and x32-avx-avx512.o.
4200 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4201 i386/x32-avx-avx512.xml.
4202
229d26fc
SM
42032017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4204
4205 * tracepoint.h (enum class fast_tpoint_collect_result): New
4206 enumeration.
4207 (fast_tracepoint_collecting): Change return type to
4208 fast_tpoint_collect_result.
4209 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4210 * linux-low.h: Include tracepoint.h.
4211 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4212 fast_tpoint_collect_result.
4213 * linux-low.c (handle_tracepoints): Adjust.
4214 (linux_fast_tracepoint_collecting): Change return type to
4215 fast_tpoint_collect_result.
4216 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4217 linux_wait_1, stuck_in_jump_pad_callback,
4218 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4219 proceed_one_lwp): Adjust to type change.
4220
2e1e43e1
YQ
42212017-07-10 Yao Qi <yao.qi@linaro.org>
4222
4223 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4224
adc764e7
YQ
42252017-06-29 Yao Qi <yao.qi@linaro.org>
4226
4227 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4228 Remove.
4229 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4230
a206891a
SM
42312017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4232
4233 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4234
9a6c7d9c
SDJ
42352017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4236
4237 * linux-low.c (linux_create_inferior): Adjust code to access the
4238 environment information via 'gdb_environ' class.
4239 * lynx-low.c (lynx_create_inferior): Likewise.
4240 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4241 (get_environ): Return a pointer to 'our_environ'.
4242 (captured_main): Initialize 'our_environ'.
4243 * server.h (get_environ): Adjust prototype.
4244 * spu-low.c (spu_create_inferior): Adjust code to access the
4245 environment information via 'gdb_environ' class.
4246
ae3e2ccf
SM
42472017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4248
4249 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4250 usage of "register" keyword.
4251
3e019bdc
SM
42522017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4253
4254 * configure: Re-generate.
4255
8465943a
SM
42562017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4257
4258 * configure: Re-generate.
4259
cf0dd6f0
SM
42602017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4261
4262 * Makefile.in (COMPILE.pre): Add "-x c++".
4263
9845682b
SDJ
42642017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4265
4266 * fork-child.c: Conditionally include <signal.h>.
4267
aefd8b33
SDJ
42682017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4269
4270 * server.c (handle_general_set): Handle new packet
4271 "QStartupWithShell".
4272 (handle_query): Add "QStartupWithShell" to the list of supported
4273 packets.
4274 (gdbserver_usage): Add help text explaining the
4275 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4276 options.
4277 (captured_main): Recognize and act upon the presence of the new
4278 CLI options.
4279
2090129c
SDJ
42802017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4281 Pedro Alves <palves@redhat.com>
4282
4283 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4284 * configure: Regenerate.
4285 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4286 "fork-inferior.o".
4287 (i[34567]86-*-lynxos*): Likewise.
4288 (spu*-*-*): Likewise.
4289 * fork-child.c: New file.
4290 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4291 and "environ.h".
4292 (linux_ptrace_fun): New function.
4293 (linux_create_inferior): Adjust function prototype to reflect
4294 change on "target.h". Adjust function code to use
4295 "fork_inferior".
4296 (linux_request_interrupt): Delete "signal_pid".
4297 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4298 (lynx_ptrace_fun): New function.
4299 (lynx_create_inferior): Adjust function prototype to reflect
4300 change on "target.h". Adjust function code to use
4301 "fork_inferior".
4302 * nto-low.c (nto_create_inferior): Adjust function prototype and
4303 code to reflect change on "target.h". Update comments.
4304 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4305 "common-terminal.h" and "environ.h".
4306 (terminal_fd): Moved to fork-child.c.
4307 (old_foreground_pgrp): Likewise.
4308 (restore_old_foreground_pgrp): Likewise.
4309 (last_status): Make it global.
4310 (last_ptid): Likewise.
4311 (our_environ): New variable.
4312 (startup_with_shell): Likewise.
4313 (program_name): Likewise.
4314 (program_argv): Rename to...
4315 (program_args): ...this.
4316 (wrapper_argv): New variable.
4317 (start_inferior): Delete function.
4318 (get_exec_wrapper): New function.
4319 (get_exec_file): Likewise.
4320 (get_environ): Likewise.
4321 (prefork_hook): Likewise.
4322 (post_fork_inferior): Likewise.
4323 (postfork_hook): Likewise.
4324 (postfork_child_hook): Likewise.
4325 (handle_v_run): Update code to deal with arguments coming from the
4326 remote host. Update calls from "start_inferior" to
4327 "create_inferior".
4328 (captured_main): Likewise. Initialize environment variable. Call
4329 "have_job_control".
4330 * server.h (post_fork_inferior): New prototype.
4331 (get_environ): Likewise.
4332 (last_status): Declare.
4333 (last_ptid): Likewise.
4334 (signal_pid): Likewise.
4335 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4336 (spu_ptrace_fun): New function.
4337 (spu_create_inferior): Adjust function prototype to reflect change
4338 on "target.h". Adjust function code to use "fork_inferior".
4339 * target.c (target_terminal_init): New function.
4340 (target_terminal_inferior): Likewise.
4341 (target_terminal_ours): Likewise.
4342 * target.h: Include <vector>.
4343 (struct target_ops) <create_inferior>: Update prototype.
4344 (create_inferior): Update macro.
4345 * utils.c (gdb_flush_out_err): New function.
4346 * win32-low.c (win32_create_inferior): Adjust function prototype
4347 and code to reflect change on "target.h".
4348
043a4934
SDJ
43492017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4350
4351 * inferiors.c (switch_to_thread): New function.
4352
15652511
SDJ
43532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4354
4355 * Makefile.in (SFILE): Add "common/job-control.c".
4356 (OBS): Add "job-control.o".
4357
21ea5acd
SDJ
43582017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4359
4360 * Makefile: Remove "@host_makefile_frag@".
4361
e13cb306
PA
43622017-05-05 Pedro Alves <palves@redhat.com>
4363
4364 * configure: Regenerate.
4365
c94fee56
SDJ
43662017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4367
4368 * configure: Regenerate.
4369
a0ff9e1a
SM
43702017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4371
4372 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4373 software_single_step change of return type to
4374 std::vector<CORE_ADDR>.
4375 * linux-low.c (install_software_single_step_breakpoints):
4376 Likewise.
4377 * linux-low.h (install_software_single_step_breakpoints):
4378 Likewise.
4379
be628ab8
SDJ
43802017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4381
4382 * remote-utils.c: Include "gdb_termios.h" instead of
4383 "terminal.h".
4384 * terminal.h: Delete file.
4385
7c5ded6a
SDJ
43862017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4387
4388 * server.c: Include <vector>.
4389 <program_argv, wrapper_argv>: Convert to std::vector.
4390 (start_inferior): Rewrite function to use C++.
4391 (handle_v_run): Likewise. Update code that calculates the argv
4392 based on the vRun packet; use C++.
4393 (captured_main): Likewise.
4394
436252de
SM
43952017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4396
4397 * server.c (handle_v_cont): Initialize thread_resume::thread
4398 with null_ptid.
4399
9bf2a700
PA
44002017-04-05 Pedro Alves <palves@redhat.com>
4401
4402 * configure: Regenerate.
4403
a121b7c1
PA
44042017-04-05 Pedro Alves <palves@redhat.com>
4405
4406 * gdbreplay.c (sync_error): Constify.
4407 * linux-x86-low.c (push_opcode): Constify.
4408
21c8a587
PA
44092017-04-05 Pedro Alves <palves@redhat.com>
4410
4411 * win32-low.c (get_child_debug_event)
4412 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4413 Report TARGET_WAITKIND_SPURIOUS instead.
4414
fb32b4f7
PA
44152017-04-05 Pedro Alves <palves@redhat.com>
4416
e79be6e5
SM
4417 * remote-utils.c (remote_prepare, remote_open): Constify.
4418 * remote-utils.h (remote_prepare, remote_open): Constify.
4419 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 4420
65dd1e59
SM
44212017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4422
4423 * Makefile.in (clean): Clear .deps.
4424
8fa5b777
SM
44252017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4426
4427 * .gitignore: Remove generated files, replace with wildcard.
4428 * (clean): Replace removal of generated files with wildcard.
4429 (version.c): Replace with...
4430 (version-generated.c): ...this.
4431 (xml-builtin.c): Replace with...
4432 (xml-builtin-generated.c): ...this.
4433 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4434 (%.c: *regformats*): Replace with...
4435 (%-generated.c: *regformats*): ...this.
4436
a12e714b
MF
44372017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4438
4439 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4440 (xtensa_fill_gregset): Call collect_register_by_name for
4441 threadptr register.
4442 (xtensa_store_gregset): Call supply_register_by_name for
4443 threadptr register.
4444
1a09b50a
MF
44452017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4446
4447 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4448 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4449 (xtensa_store_gregset): Call supply_register for all registers in
4450 a0_regnum..a0_regnum + C0_NREGS range.
4451
1a01e7c6
SM
44522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4453
4454 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4455 (ax-ipa.o: ax.c): Remove.
4456 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4457 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4458 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4459 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4460 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4461
36bc18a8
SM
44622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4463
4464 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4465 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4466 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4467 (errors-ipa.o: ../common/errors.c): Remove.
4468 (format-ipa.o: ../common/format.c): Remove.
4469 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4470
a8ebe3d5
SM
44712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4472
4473 * Makefile.in (%-ipa.o: %.c): New rule.
4474 (tracepoint-ipa.o: tracepoint.c): Remove.
4475 (utils-ipa.o: utils.c): Remove.
4476 (remote-utils-ipa.o: remote-utils.c): Remove.
4477 (regcache-ipa.o: regcache.c): Remove.
4478 (i386-linux-ipa.o: i386-linux.c): Remove.
4479 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4480 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4481 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4482 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4483 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4484 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4485 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4486 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4487 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4488 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4489 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4490 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4491 (aarch64-ipa.o: aarch64.c): Remove.
4492 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4493 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4494 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4495 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4496 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4497 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4498 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4499 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4500 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4501 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4502 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4503 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4504 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4505 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4506 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4507 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4508 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4509 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4510 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4511 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4512 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4513 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4514 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4515 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4516 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4517 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4518 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4519 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4520 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4521 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4522 (tdesc-ipa.o: tdesc.c): Remove.
4523 (x32-linux-ipa.o: x32-linux.c): Remove.
4524 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4525 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4526
50cfacb7
SM
45272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4528
4529 * Makefile.in (%.o: ../arch/%.c): New rule.
4530 (arm.o: ../arch/arm.c): Remove.
4531 (arm-linux.o: ../arch/arm-linux.c): Remove.
4532 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4533 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4534
c5a22423
SM
45352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4536
4537 * Makefile.in (%.o: ../nat/%.c): New rule.
4538 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4539 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4540 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4541 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4542 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4543 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4544 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4545 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4546 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4547 (linux-personality.o: ../nat/linux-personality.c): Remove.
4548 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4549 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4550 (x86-linux.o: ../nat/x86-linux.c): Remove.
4551 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4552 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4553
6bda016b
SM
45542017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4555
4556 * Makefile.in (%.o: ../common/%.c): New rule.
4557 (signals.o: ../common/signals.c): Remove.
4558 (print-utils.o: ../common/print-utils.c): Remove.
4559 (rsp-low.o: ../common/rsp-low.c): Remove.
4560 (common-utils.o: ../common/common-utils.c): Remove.
4561 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4562 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4563 (vec.o: ../common/vec.c): Remove.
4564 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4565 (xml-utils.o: ../common/xml-utils.c): Remove.
4566 (ptid.o: ../common/ptid.c): Remove.
4567 (buffer.o: ../common/buffer.c): Remove.
4568 (format.o: ../common/format.c): Remove.
4569 (filestuff.o: ../common/filestuff.c): Remove.
4570 (agent.o: ../common/agent.c): Remove.
4571 (errors.o: ../common/errors.c): Remove.
4572 (environ.o: ../common/environ.c): Remove.
4573 (common-debug.o: ../common/common-debug.c): Remove.
4574 (cleanups.o: ../common/cleanups.c): Remove.
4575 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4576 (fileio.o: ../common/fileio.c): Remove.
4577 (common-regcache.o: ../common/common-regcache.c): Remove.
4578 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4579 (new-op.o: ../common/new-op.c): Remove.
4580 (btrace-common.o: ../common/btrace-common.c): Remove.
4581
21122961
SM
45822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4583
4584 * Makefile.in (%.o: ../target/%.c): New rule.
4585 (waitstatus.o: ../target/waitstatus.c): Remove.
4586
c362e621
SM
45872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4588
4589 * Makefile.in
4590 (%.c: ../regformats/%.dat,
4591 (%.c: ../regformats/arm/%.dat,
4592 (%.c: ../regformats/i386/%.dat,
4593 (%.c: ../regformats/rs6000/%.dat): New rules.
4594 (aarch64.c): Remove.
4595 (reg-arm.c): Remove.
4596 (arm-with-iwmmxt.c): Remove.
4597 (arm-with-vfpv2.c): Remove.
4598 (arm-with-vfpv3.c): Remove.
4599 (arm-with-neon.c): Remove.
4600 (reg-bfin.c): Remove.
4601 (reg-cris.c): Remove.
4602 (reg-crisv32.c): Remove.
4603 (i386.c): Remove.
4604 (i386-linux.c): Remove.
4605 (i386-avx.c): Remove.
4606 (i386-avx-linux.c): Remove.
4607 (i386-avx-avx512.c): Remove.
4608 (i386-avx-avx512-linux.c): Remove.
4609 (i386-mpx.c): Remove.
4610 (i386-mpx-linux.c): Remove.
4611 (i386-avx-mpx-avx512-pku.c): Remove.
4612 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4613 (i386-avx-mpx.c): Remove.
4614 (i386-avx-mpx-linux.c): Remove.
4615 (i386-mmx.c): Remove.
4616 (i386-mmx-linux.c): Remove.
4617 (reg-ia64.c): Remove.
4618 (reg-m32r.c): Remove.
4619 (reg-m68k.c): Remove.
4620 (reg-cf.c): Remove.
4621 (mips-linux.c): Remove.
4622 (mips-dsp-linux.c): Remove.
4623 (mips64-linux.c): Remove.
4624 (mips64-dsp-linux.c): Remove.
4625 (nios2-linux.c): Remove.
4626 (powerpc-32.c): Remove.
4627 (powerpc-32l.c): Remove.
4628 (powerpc-altivec32l.c): Remove.
4629 (powerpc-cell32l.c): Remove.
4630 (powerpc-vsx32l.c): Remove.
4631 (powerpc-isa205-32l.c): Remove.
4632 (powerpc-isa205-altivec32l.c): Remove.
4633 (powerpc-isa205-vsx32l.c): Remove.
4634 (powerpc-e500l.c): Remove.
4635 (powerpc-64l.c): Remove.
4636 (powerpc-altivec64l.c): Remove.
4637 (powerpc-cell64l.c): Remove.
4638 (powerpc-vsx64l.c): Remove.
4639 (powerpc-isa205-64l.c): Remove.
4640 (powerpc-isa205-altivec64l.c): Remove.
4641 (powerpc-isa205-vsx64l.c): Remove.
4642 (s390-linux32.c): Remove.
4643 (s390-linux32v1.c): Remove.
4644 (s390-linux32v2.c): Remove.
4645 (s390-linux64.c): Remove.
4646 (s390-linux64v1.c): Remove.
4647 (s390-linux64v2.c): Remove.
4648 (s390-te-linux64.c): Remove.
4649 (s390-vx-linux64.c): Remove.
4650 (s390-tevx-linux64.c): Remove.
4651 (s390x-linux64.c): Remove.
4652 (s390x-linux64v1.c): Remove.
4653 (s390x-linux64v2.c): Remove.
4654 (s390x-te-linux64.c): Remove.
4655 (s390x-vx-linux64.c): Remove.
4656 (s390x-tevx-linux64.c): Remove.
4657 (tic6x-c64xp-linux.c): Remove.
4658 (tic6x-c64x-linux.c): Remove.
4659 (tic6x-c62x-linux.c): Remove.
4660 (reg-sh.c): Remove.
4661 (reg-sparc64.c): Remove.
4662 (reg-spu.c): Remove.
4663 (amd64.c): Remove.
4664 (amd64-linux.c): Remove.
4665 (amd64-avx.c): Remove.
4666 (amd64-avx-linux.c): Remove.
4667 (amd64-avx-avx512.c): Remove.
4668 (amd64-avx-avx512-linux.c): Remove.
4669 (amd64-mpx.c): Remove.
4670 (amd64-mpx-linux.c): Remove.
4671 (amd64-avx-mpx-avx512-pku.c): Remove.
4672 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4673 (amd64-avx-mpx.c): Remove.
4674 (amd64-avx-mpx-linux.c): Remove.
4675 (x32.c): Remove.
4676 (x32-linux.c): Remove.
4677 (x32-avx.c): Remove.
4678 (x32-avx-linux.c): Remove.
4679 (x32-avx-avx512.c): Remove.
4680 (x32-avx-avx512-linux.c): Remove.
4681 (reg-xtensa.c): Remove.
4682 (reg-tilegx.c): Remove.
4683 (reg-tilegx32.c): Remove.
4684
1672e0d9
SDJ
46852017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4686
4687 * Makefile.in (SFILES): Add "common/environ.c".
4688 (OBJS): Add "common/environ.h".
4689
239b6d10
WT
46902017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4691
4692 * configure.ac: Check if the fs_base and gs_base members of
4693 `struct user_regs_struct' exist.
4694 * config.in: Regenerated.
4695 * configure: Likewise.
4696
694b382c
AT
46972017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4698
4699 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4700 target_read_memory.
4701 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4702 (get_next_pcs_syscall_next_pc): Likewise.
4703
7dc53023
LM
47042016-12-23 Luis Machado <lgustavo@codesourcery.com>
4705
4706 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4707 * nto-x86-low.c: Likewise.
4708
ad02e4fe
SM
47092016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4710
4711 * Makefile.in: Include disable-implicit-rules.mk.
4712
dcb07cfa
PA
47132016-11-23 Pedro Alves <palves@redhat.com>
4714
4715 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4716 (debug_vprintf): Use std::chrono::steady_clock instead of
4717 gettimeofday. Use '.' instead of ':'.
4718 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4719 (get_timestamp): Use std::chrono::steady_clock instead of
4720 gettimeofday.
4721
8629c02c
SM
47222016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4723
4724 * Makefile.in: Fix whitespace formatting.
4725
b593ecca
SM
47262016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4727
4728 * Makefile.in (SFILES, OBS): Flatten list and order
4729 alphabetically.
4730
9986ba08
PA
47312016-11-23 Pedro Alves <palves@redhat.com>
4732
4733 * event-loop.c (handle_file_event): Use warning.
4734 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4735 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4736 Use warning.
4737
4eefa7bc
PA
47382016-11-23 Pedro Alves <palves@redhat.com>
4739
4740 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4741 output.
4742 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4743 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4744 debug_printf and debug_flush for debug output.
4745 * server.c (handle_general_set): Likewise.
4746 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4747 output.
4748
5443506e
SM
47492016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4750
4751 * Makefile.in (.c.o): Replace rule with ...
4752 (%.o: %.c): ... this one.
4753
3b165252
SM
47542016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4755
4756 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4757 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4758 make.
4759 * configure.ac: Remove checks for the make program.
4760 * configure: Re-generate.
4761
0bcda685
PA
47622016-10-28 Pedro Alves <palves@redhat.com>
4763
4764 * Makefile.in (CXX_DIALECT): Get from configure.
4765 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4766 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4767 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4768 * config.in: Regenerate.
4769 * configure: Regenerate.
4770
c3805894
YQ
47712016-10-27 Yao Qi <yao.qi@linaro.org>
4772
4773 * linux-low.c (linux_supports_range_stepping): Return true if
4774 can_software_single_step return true.
4775
89342618
YQ
47762016-10-27 Yao Qi <yao.qi@linaro.org>
4777
4778 * inferiors.c (find_inferior_in_random): New function.
4779 * inferiors.h (find_inferior_in_random): Declare.
4780 * linux-low.c (linux_wait_for_event_filtered): Call
4781 find_inferior_in_random instead of find_inferior.
4782
e3652c84
YQ
47832016-10-27 Yao Qi <yao.qi@linaro.org>
4784
4785 * linux-low.c (linux_wait_1): If single-step breakpoints are
4786 inserted, remove them.
4787
5a04c4cf
PA
47882016-10-26 Pedro Alves <palves@redhat.com>
4789
4790 * linux-low.c (handle_extended_wait): Link parent/child fork
4791 threads.
4792 (linux_wait_1): Unlink them.
4793 (linux_set_resume_request): Ignore resume requests for
4794 already-resumed and unhandled fork child threads.
4795 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4796 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4797 New functions.
4798 (handle_v_requests) <vCont>: Don't call require_running.
4799 * server.h (in_queued_stop_replies): New declaration.
4800
cb93dc7f
YQ
48012016-10-24 Yao Qi <yao.qi@linaro.org>
4802
4803 PR server/20733
4804 * linux-aarch64-low.c (append_insns): Cast the return value to
4805 'uint32_t *'.
4806
a1078bea
YQ
48072016-10-10 Yao Qi <yao.qi@linaro.org>
4808
4809 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4810
1fb77080
SDJ
48112016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4812
4813 * target.c (target_supports_multi_process): New function, moved
4814 from...
4815 * target.h (target_supports_multi_process): ... here. Remove
4816 macro.
4817
39b5a3b9
TT
48182016-10-05 Tom Tromey <tom@tromey.com>
4819
4820 PR remote/20655:
4821 * tracepoint.c (handle_tracepoint_bkpts): Check
4822 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4823
c1d0b70a
YQ
48242016-10-05 Yao Qi <yao.qi@linaro.org>
4825
4826 * configure.srv: Update the path of arm-*.xml files.
4827
0a69eedb
YQ
48282016-10-05 Terry Guo <terry.guo@arm.com>
4829 Yao Qi <yao.qi@linaro.org>
4830
4831 * Makefile.in: Adjust the path of rules.
4832 * configure.srv: Update the path of xml files.
4833 * regformats/arm-with-iwmmxt.dat: Regenerated.
4834 * regformats/arm-with-neon.dat: Likewise.
4835 * regformats/arm-with-vfpv2.dat: Likewise.
4836 * regformats/arm-with-vfpv3.dat Likewise.
4837
17e16485
YQ
48382016-09-30 Yao Qi <yao.qi@linaro.org>
4839
4840 PR gdbserver/20627
4841 * target.c (target_stop_and_wait): Don't call
4842 target_continue_no_signal, use resume_stop instead.
4843
edeeb602
YQ
48442016-09-26 Yao Qi <yao.qi@linaro.org>
4845
4846 * linux-low.c (linux_wait_1): Call debug_exit.
4847
503b1c39
PA
48482016-09-23 Pedro Alves <palves@redhat.com>
4849
4850 * Makefile.in (SFILES): Add common/new-op.c.
4851 (OBS): Add common/new-op.o.
4852 (new-op.o): New rule.
4853
74172ecf
SM
48542016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4855
4856 * .gitinore: Ignore more files.
4857
fc6cda2e
YQ
48582016-09-21 Yao Qi <yao.qi@linaro.org>
4859
4860 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4861 23.
4862
bc1e6c81
SDJ
48632016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4864
4865 * server.c (start_inferior): Call target_mourn_inferior instead of
4866 mourn_inferior; pass ptid_t argument to it.
4867 (resume): Likewise.
4868 (handle_target_event): Likewise.
4869 * target.c (target_mourn_inferior): New function.
4870 * target.h (mourn_inferior): Delete macro.
4871
0e00e962
AA
48722016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4873
4874 * linux-low.c (lwp_is_stepping): New function.
4875
1d8cb77d
CL
48762016-09-06 Carl Love <cel@us.ibm.com>
4877
4878 * server.c (start_inferior): Fixed comment, requested comment change
4879 didn't get updated correctly. Removed reference to ptrace () call as
4880 it is only true on Linux systems.
4881
7313bced
CL
48822016-09-06 Carl Love <cel@us.ibm.com>
4883
4884 * server.c (start_inferior): Do not call
4885 function target_post_create_inferior () if the
4886 inferior process has already exited.
4887
cf6de44d
PA
48882016-09-05 Pedro Alves <palves@redhat.com>
4889
4890 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4891 (COMPILE.pre, CC_LD): Use CXX directly.
4892 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4893 * acinclude.m4: Don't include build-with-cxx.m4.
4894 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4895 * configure: Regenerate.
4896
c1da6748
AT
48972016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4898
4899 PR gdb/19495
4900 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4901 call writing data to own_buf.
4902
f2b9e3df
SDJ
49032016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4904
4905 * target.c (mywait): Call target_wait instead of
4906 the_target->wait.
4907 (target_wait): New function.
4908
049a8570
SDJ
49092016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4910
4911 * server.c (start_inferior): New variable 'ptid'. Replace calls
4912 to the_target->resume by target_continue{,_no_signal}, depending
4913 on the case.
4914 * target.c (target_stop_and_wait): Call target_continue_no_signal
4915 instead of the_target->resume.
4916 (target_continue): New function.
4917
3aa5cfa0
AT
49182016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4919
4920 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4921
754653a7
AZ
49222016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4923
4924 PR server/20491
4925 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4926 ps_prochandle.
4927 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4928 * linux-arm-low.c (ps_get_thread_area): Likewise.
4929 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4930 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4931 * linux-mips-low.c (ps_get_thread_area): Likewise.
4932 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4933 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4934 * linux-x86-low.c (ps_get_thread_area): Likewise.
4935 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4936
ed036b40
PA
49372016-08-19 Pedro Alves <palves@redhat.com>
4938
4939 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4940
c8ef42ee
PA
49412016-08-19 Pedro Alves <palves@redhat.com>
4942
4943 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4944 comment. Use memcpy instead of casting through unsigned long.
4945
9c235a72
PA
49462016-08-19 Pedro Alves <palves@redhat.com>
4947
4948 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4949 allocating around 0x80000000.
4950
201506da
PA
49512016-08-19 Pedro Alves <palves@redhat.com>
4952
4953 PR gdb/20415
4954 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4955 (x32-avx512-linux-ipa.o): New rules.
4956 * configure.ac (x86_64-*-linux*): New x32 check.
4957 * configure.srv (ipa_x32_linux_regobj): New.
4958 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4959 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4960 descriptions.
4961 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4962 descriptions.
4963 * configure: Regenerate.
4964
f348d89a
PA
49652016-08-09 Pedro Alves <palves@redhat.com>
4966
4967 PR gdb/18653
4968 * Makefile.in (OBS): Add signals-state-save-restore.o.
4969 (signals-state-save-restore.o): New rule.
4970 * config.in: Regenerate.
4971 * configure: Regenerate.
4972 * linux-low.c: Include "signals-state-save-restore.h".
4973 (linux_create_inferior): Call
4974 restore_original_signals_state.
4975 * server.c: Include "dispositions-save-restore.h".
4976 (captured_main): Call save_original_signals_state.
4977
1baf5149
PA
49782016-08-05 Pedro Alves <palves@redhat.com>
4979
4980 * configure: Regenerate.
4981
fcd4a73d
YQ
49822016-08-04 Yao Qi <yao.qi@linaro.org>
4983
4984 * linux-low.c (regsets_fetch_inferior_registers): Check
4985 errno is ESRCH or not.
4986
979659d0
YQ
49872016-08-02 Yao Qi <yao.qi@linaro.org>
4988
4989 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4990 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4991 (thread_db_load_search): Update.
4992 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4993 td_ta_set_event and td_ta_event_getmsg.
4994
6598661d
PA
49952016-07-26 Pedro Alves <palves@redhat.com>
4996
4997 PR server/20414
4998 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4999 of unsigned long for 64-bit registers and use uint32_t instead of
5000 unsigned int for 32-bit registers.
5001
9cf12d57
PA
50022016-07-26 Pedro Alves <palves@redhat.com>
5003
5004 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5005 to 'ptrace'.
5006
305450ed
TT
50072016-07-21 Tom Tromey <tom@tromey.com>
5008
5009 * configure: Rebuild.
5010
2583da7c
YQ
50112016-07-21 Yao Qi <yao.qi@linaro.org>
5012
5013 * mem-break.c (find_gdb_breakpoint): Cast bp to
5014 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5015
21536b36
YQ
50162016-07-21 Yao Qi <yao.qi@linaro.org>
5017
5018 * server.c (handle_v_requests): Support s and S actions
5019 if target_supports_software_single_step return true.
5020
8901d193
YQ
50212016-07-21 Yao Qi <yao.qi@linaro.org>
5022
5023 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5024 is resume_step, call maybe_hw_step.
5025 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5026 and unstop them.
5027 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5028 breakpoints or not.
5029 (proceed_one_lwp): If resume request is resume_step, install
5030 reinsert breakpoints and call maybe_hw_step.
5031
0e9a339e
YQ
50322016-07-21 Yao Qi <yao.qi@linaro.org>
5033
5034 * linux-low.c (proceed_one_lwp): Declare.
5035 (linux_resume_one_thread): Remove local variable 'step'.
5036 Lift code enqueue signal. Call proceed_one_lwp instead of
5037 linux_resume_one_lwp.
5038
4281b351
YQ
50392016-07-21 Yao Qi <yao.qi@linaro.org>
5040
5041 * linux-low.c (linux_resume_one_thread): Call
5042 enqueue_pending_signal.
5043
984a2c04
YQ
50442016-07-21 Yao Qi <yao.qi@linaro.org>
5045
5046 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5047 * inferiors.c (do_restore_current_thread_cleanup): New function.
5048 (make_cleanup_restore_current_thread): Likewise.
5049 * linux-low.c (install_software_single_step_breakpoints): Call
5050 make_cleanup_restore_current_thread. Switch current_thread to
5051 thread.
5052
bec903c9
YQ
50532016-07-21 Yao Qi <yao.qi@linaro.org>
5054
5055 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5056 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5057 (clone_one_breakpoint): Likewise.
5058 (delete_reinsert_breakpoints): Change parameter to thread.
5059 Callers updated.
5060 (has_reinsert_breakpoints): Likewise.
5061 (uninsert_reinsert_breakpoints): Likewise.
5062 (reinsert_reinsert_breakpoints): Likewise.
5063 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5064 (delete_reinsert_breakpoints): Likewise.
5065 (reinsert_reinsert_breakpoints): Likewise.
5066 (uninsert_reinsert_breakpoints): Likewise.
5067 (has_reinsert_breakpoints): Likewise.
5068
63c40ec7
YQ
50692016-07-21 Yao Qi <yao.qi@linaro.org>
5070
5071 * inferiors.c (get_thread_process): Make parameter const.
5072 * inferiors.h (get_thread_process): Update declaration.
5073 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5074 Add new parameters child_thread and parent_thread. Callers
5075 updated.
5076 * mem-break.h (clone_all_breakpoints): Update declaration.
5077
9aa76cd0
YQ
50782016-07-21 Yao Qi <yao.qi@linaro.org>
5079
5080 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5081 <command_list, handler>: Remove.
5082 (struct gdb_breakpoint): New.
5083 (struct other_breakpoint): New.
5084 (struct reinsert_breakpoint): New.
5085 (is_gdb_breakpoint): New function.
5086 (any_persistent_commands): Update command_list if
5087 is_gdb_breakpoint returns true.
5088 (set_breakpoint): Create breakpoints according to their types.
5089 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5090 (set_gdb_breakpoint_1): Likewise.
5091 (set_gdb_breakpoint): Likewise.
5092 (clear_breakpoint_conditions): Change parameter type to
5093 'struct gdb_breakpoint *'.
5094 (clear_breakpoint_commands): Likewise.
5095 (clear_breakpoint_conditions_and_commands): Likewise.
5096 (add_condition_to_breakpoint): Likewise.
5097 (add_breakpoint_condition): Likewise.
5098 (add_commands_to_breakpoint): Likewise.
5099 (check_breakpoints): Check other_breakpoint.
5100 (clone_one_breakpoint): Clone breakpopint according to its type.
5101 * mem-break.h (struct gdb_breakpoint): Declare.
5102 (set_gdb_breakpoint): Update declaration.
5103 (clear_breakpoint_conditions_and_commands): Likewise.
5104 (add_breakpoint_condition): Likewise.
5105 (add_breakpoint_commands): Likewise.
5106 * server.c (process_point_options): Change parameter type to
5107 'struct gdb_breakpoint *'.
5108
811f8301
YQ
51092016-07-21 Yao Qi <yao.qi@linaro.org>
5110
5111 * mem-break.c (set_breakpoint_at): Rename it to ...
5112 (set_breakpoint_type_at): ... it.
5113 (set_breakpoint_at): Call set_breakpoint_type_at.
5114 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5115 * mem-break.h (set_breakpoint_at): Update comments.
5116
b1c51e36
CLT
51172016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5118
5119 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5120 to buf parameter.
5121 (nios2_store_gregset): Likewise.
5122
ced2dffb
PA
51232016-07-01 Pedro Alves <palves@redhat.com>
5124 Antoine Tremblay <antoine.tremblay@ericsson.com>
5125
5126 * linux-low.c: Change interface to take the target lwp_info
5127 pointer directly and return void. Handle detaching from a zombie
5128 thread.
5129 (linux_detach_lwp_callback): New function.
5130 (linux_detach): Detach from the leader thread after detaching from
5131 the clone threads.
5132
2ac09a5b
YQ
51332016-06-28 Yao Qi <yao.qi@linaro.org>
5134
5135 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5136 for variable new_offset.
5137 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5138 (aarch64_ftrace_insn_reloc_cb): Likewise.
5139 (aarch64_ftrace_insn_reloc_tb): Likewise.
5140 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5141 PRIx64 instead of PRIx32.
5142
79e7fd4f
YQ
51432016-06-28 Yao Qi <yao.qi@linaro.org>
5144
5145 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5146 (the_low_target): Install arm_get_syscall_trapinfo.
5147
061fc021
YQ
51482016-06-28 Yao Qi <yao.qi@linaro.org>
5149
5150 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5151 function.
5152 (the_low_target): Install aarch64_get_syscall_trapinfo.
5153
4cc32bec
YQ
51542016-06-28 Yao Qi <yao.qi@linaro.org>
5155
5156 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5157 Callers updated.
5158 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5159 Remove parameter sysno.
5160 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5161 sysret.
5162
782c1122
AA
51632016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5164
5165 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5166 (s390_emit_ne_goto): Likewise.
5167 (s390_emit_lt_goto): Likewise.
5168 (s390_emit_le_goto): Likewise.
5169 (s390_emit_gt_goto): Likewise.
5170 (s390_emit_ge_goto): Likewise.
5171 (s390x_emit_eq_goto): Likewise.
5172 (s390x_emit_ne_goto): Likewise.
5173 (s390x_emit_lt_goto): Likewise.
5174 (s390x_emit_le_goto): Likewise.
5175 (s390x_emit_gt_goto): Likewise.
5176 (s390x_emit_ge_goto): Likewise.
5177 (s390_emit_ops_impl): Mark variable static.
5178 (s390x_emit_ops): Likewise.
5179
2e7b624b
YQ
51802016-06-17 Yao Qi <yao.qi@linaro.org>
5181
5182 * linux-low.c (handle_extended_wait): Call
5183 uninsert_reinsert_breakpoints for the parent process. Remove
5184 reinsert breakpoints from the child process. Reinsert them to
5185 the parent process when vfork is done.
5186 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5187 (reinsert_reinsert_breakpoints): New function.
5188 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5189 (reinsert_reinsert_breakpoints): Declare.
5190
8a81c5d7
YQ
51912016-06-17 Yao Qi <yao.qi@linaro.org>
5192
5193 * linux-low.c (handle_extended_wait): If the parent is doing
5194 step-over, remove the reinsert breakpoints from the forked child.
5195
f50bf8e5
YQ
51962016-06-17 Yao Qi <yao.qi@linaro.org>
5197
5198 * linux-low.c (unsuspend_all_lwps): Declare.
5199 (linux_low_filter_event): If thread exited, call finish_step_over.
5200 If step-over is finished, unsuspend other threads.
5201
8376a3cb
YQ
52022016-06-17 Yao Qi <yao.qi@linaro.org>
5203
5204 * linux-low.c (linux_resume_one_lwp_throw): Assert
5205 has_reinsert_breakpoints returns false.
5206 * mem-break.c (delete_disabled_breakpoints): Assert
5207 bp type isn't reinsert_breakpoint.
5208
f79b145d
YQ
52092016-06-17 Yao Qi <yao.qi@linaro.org>
5210
5211 * linux-low.c (maybe_hw_step): New function.
5212 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5213 (finish_step_over): Switch current_thread to lwp temporarily,
5214 and assert has_reinsert_breakpoints returns true.
5215 (proceed_one_lwp): Call maybe_hw_step.
5216 * mem-break.c (has_reinsert_breakpoints): New function.
5217 * mem-break.h (has_reinsert_breakpoints): Declare.
5218
0ae534d2
JT
52192016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5220
5221 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5222
fcdad592
YQ
52232016-05-17 Yao Qi <yao.qi@linaro.org>
5224
5225 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5226 instead of find_inferior.
5227
9e784964
YQ
52282016-05-05 Yao Qi <yao.qi@linaro.org>
5229
5230 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5231 Initialize res to zero.
5232
cf2ebb6e
YQ
52332016-05-05 Yao Qi <yao.qi@linaro.org>
5234
5235 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5236 to uint32_t.
5237
c1aebf87
UW
52382016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5239
5240 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5241 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5242 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5243
35fd2deb 52442016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 5245 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
5246
5247 * tracepoint.c (write_inferior_int8): New function.
5248 (cmd_qtenable_disable): Write enable flag using
5249 write_inferior_int8.
5250
484b3c32
YQ
52512016-04-25 Yao Qi <yao.qi@linaro.org>
5252
5253 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5254 (need_step_over_p): Return zero if the LWP has pending signals
5255 can be delivered on software single step target.
5256
85ba7d86
YQ
52572016-04-25 Yao Qi <yao.qi@linaro.org>
5258
5259 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5260 return instead of error.
5261
3539aa13
YQ
52622016-04-22 Yao Qi <yao.qi@linaro.org>
5263
5264 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5265 to 23.
5266
5b061e98
YQ
52672016-04-22 Yao Qi <yao.qi@linaro.org>
5268
5269 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5270 signal when stepping over breakpoint with software single
5271 step.
5272
3451269c
PA
52732016-04-21 Pedro Alves <palves@redhat.com>
5274
5275 * linux-s390-low.c (s390_collect_ptrace_register)
5276 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5277 add casts.
5278 (s390_check_regset): Use void * instead of gdb_byte *.
5279
a2358508
PA
52802016-04-20 Pedro Alves <palves@redhat.com>
5281
5282 * configure: Renegerate.
5283
6885166d
YQ
52842016-04-20 Yao Qi <yao.qi@linaro.org>
5285
5286 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5287 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5288 number 16.
5289 (arm_store_gregset): Likewise.
5290
2b863f51
WT
52912016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5292
5293 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5294 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5295 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5296 (amd64-avx-mpx-linux.c): New rules.
5297 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5298 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5299 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5300 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5301 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5302 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5303 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5304 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5305 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5306 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5307 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5308 * linux-x86-low.c (x86_linux_read_description): Add case for
5309 X86_XSTATE_AVX_MPX_MASK.
5310 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5311 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5312 init_registers_i386_avx_mpx_linux.
5313 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5314 (initialize_low_tracepoint): Call
5315 init_registers_i386_avx_mpx_linux.
5316 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5317 (initialize_low_tracepoint): Call
5318 init_registers_amd64_avx_mpx_linux.
5319 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5320 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5321 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5322 declarations.
5323
9b30624b
PA
53242016-04-18 Pedro Alves <palves@redhat.com>
5325
5326 * configure: Regenerate.
5327
45e3745e
AT
53282016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5329
5330 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5331 (aarch64_emit_sub): Likewise.
5332
2afc13ff
PA
53332016-04-12 Pedro Alves <palves@redhat.com>
5334
5335 * utils.c (prepare_to_throw_exception): Delete.
5336
6e774b13
SM
53372016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5338
5339 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5340
4dca19f8
MK
53412016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5342
5343 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5344
d0a9981f
MK
53452016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5346
5347 * linux-aarch64-ipa.c: Add <elf.h> include.
5348 * linux-ppc-ipa.c: Add <elf.h> include.
5349 * linux-s390-ipa.c: Add <elf.h> include.
5350
252db07e
MK
53512016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5352
5353 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5354 (get_raw_reg_ptr): Likewise.
5355 (get_trace_state_variable_value_ptr): Likewise.
5356 (set_trace_state_variable_value_ptr): Likewise.
5357 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5358 char *.
5359
14e2b6d9
MK
53602016-03-31 Wei-cheng Wang <cole945@gmail.com>
5361 Marcin Kościelnicki <koriakin@0x04.net>
5362
5363 PR/17221
5364 * linux-ppc-low.c (emit_insns): New function.
5365 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5366 (ppc_emit_prologue): New function.
5367 (ppc_emit_epilogue): New function.
5368 (ppc_emit_add): New function.
5369 (ppc_emit_sub): New function.
5370 (ppc_emit_mul): New function.
5371 (ppc_emit_lsh): New function.
5372 (ppc_emit_rsh_signed): New function.
5373 (ppc_emit_rsh_unsigned): New function.
5374 (ppc_emit_ext): New function.
5375 (ppc_emit_zero_ext): New function.
5376 (ppc_emit_log_not): New function.
5377 (ppc_emit_bit_and): New function.
5378 (ppc_emit_bit_or): New function.
5379 (ppc_emit_bit_xor): New function.
5380 (ppc_emit_bit_not): New function.
5381 (ppc_emit_equal): New function.
5382 (ppc_emit_less_signed): New function.
5383 (ppc_emit_less_unsigned): New function.
5384 (ppc_emit_ref): New function.
5385 (ppc_emit_const): New function.
5386 (ppc_emit_reg): New function.
5387 (ppc_emit_pop): New function.
5388 (ppc_emit_stack_flush): New function.
5389 (ppc_emit_swap): New function.
5390 (ppc_emit_stack_adjust): New function.
5391 (ppc_emit_call): New function.
5392 (ppc_emit_int_call_1): New function.
5393 (ppc_emit_void_call_2): New function.
5394 (ppc_emit_if_goto): New function.
5395 (ppc_emit_goto): New function.
5396 (ppc_emit_eq_goto): New function.
5397 (ppc_emit_ne_goto): New function.
5398 (ppc_emit_lt_goto): New function.
5399 (ppc_emit_le_goto): New function.
5400 (ppc_emit_gt_goto): New function.
5401 (ppc_emit_ge_goto): New function.
5402 (ppc_write_goto_address): New function.
5403 (ppc_emit_ops_impl): New static variable.
5404 (ppc64v1_emit_prologue): New function.
5405 (ppc64v2_emit_prologue): New function.
5406 (ppc64_emit_epilogue): New function.
5407 (ppc64_emit_add): New function.
5408 (ppc64_emit_sub): New function.
5409 (ppc64_emit_mul): New function.
5410 (ppc64_emit_lsh): New function.
5411 (ppc64_emit_rsh_signed): New function.
5412 (ppc64_emit_rsh_unsigned): New function.
5413 (ppc64_emit_ext): New function.
5414 (ppc64_emit_zero_ext): New function.
5415 (ppc64_emit_log_not): New function.
5416 (ppc64_emit_bit_and): New function.
5417 (ppc64_emit_bit_or): New function.
5418 (ppc64_emit_bit_xor): New function.
5419 (ppc64_emit_bit_not): New function.
5420 (ppc64_emit_equal): New function.
5421 (ppc64_emit_less_signed): New function.
5422 (ppc64_emit_less_unsigned): New function.
5423 (ppc64_emit_ref): New function.
5424 (ppc64_emit_const): New function.
5425 (ppc64v1_emit_reg): New function.
5426 (ppc64v2_emit_reg): New function.
5427 (ppc64_emit_pop): New function.
5428 (ppc64_emit_stack_flush): New function.
5429 (ppc64_emit_swap): New function.
5430 (ppc64v1_emit_call): New function.
5431 (ppc64v2_emit_call): New function.
5432 (ppc64v1_emit_int_call_1): New function.
5433 (ppc64v2_emit_int_call_1): New function.
5434 (ppc64v1_emit_void_call_2): New function.
5435 (ppc64v2_emit_void_call_2): New function.
5436 (ppc64_emit_if_goto): New function.
5437 (ppc64_emit_eq_goto): New function.
5438 (ppc64_emit_ne_goto): New function.
5439 (ppc64_emit_lt_goto): New function.
5440 (ppc64_emit_le_goto): New function.
5441 (ppc64_emit_gt_goto): New function.
5442 (ppc64_emit_ge_goto): New function.
5443 (ppc64v1_emit_ops_impl): New static variable.
5444 (ppc64v2_emit_ops_impl): New static variable.
5445 (ppc_emit_ops): New function.
5446 (linux_low_target): Wire in ppc_emit_ops.
5447
a2174ba4
MK
54482016-03-31 Wei-cheng Wang <cole945@gmail.com>
5449 Marcin Kościelnicki <koriakin@0x04.net>
5450
5451 PR/17221
5452 * Makefile.in: Add powerpc-*-ipa.o
5453 * configure.srv: Add ipa_obj for powerpc*-linux.
5454 * linux-ppc-ipa.c: New file.
5455 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5456 includes.
5457 (PPC_FIELD): New macro.
5458 (PPC_SEXT): New macro.
5459 (PPC_OP6): New macro.
5460 (PPC_BO): New macro.
5461 (PPC_LI): New macro.
5462 (PPC_BD): New macro.
5463 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5464 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5465 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5466 (ppc_get_thread_area): New function.
5467 (is_elfv2_inferior): New function.
5468 (gen_ds_form): New function.
5469 (GEN_STD): New macro.
5470 (GEN_STDU): New macro.
5471 (GEN_LD): New macro.
5472 (GEN_LDU): New macro.
5473 (gen_d_form): New function.
5474 (GEN_ADDI): New macro.
5475 (GEN_ADDIS): New macro.
5476 (GEN_LI): New macro.
5477 (GEN_LIS): New macro.
5478 (GEN_ORI): New macro.
5479 (GEN_ORIS): New macro.
5480 (GEN_LWZ): New macro.
5481 (GEN_STW): New macro.
5482 (GEN_STWU): New macro.
5483 (gen_xfx_form): New function.
5484 (GEN_MFSPR): New macro.
5485 (GEN_MTSPR): New macro.
5486 (GEN_MFCR): New macro.
5487 (GEN_MTCR): New macro.
5488 (GEN_SYNC): New macro.
5489 (GEN_LWSYNC): New macro.
5490 (gen_x_form): New function.
5491 (GEN_OR): New macro.
5492 (GEN_MR): New macro.
5493 (GEN_LWARX): New macro.
5494 (GEN_STWCX): New macro.
5495 (GEN_CMPW): New macro.
5496 (gen_md_form): New function.
5497 (GEN_RLDICL): New macro.
5498 (GEN_RLDICR): New macro.
5499 (gen_i_form): New function.
5500 (GEN_B): New macro.
5501 (GEN_BL): New macro.
5502 (gen_b_form): New function.
5503 (GEN_BNE): New macro.
5504 (GEN_LOAD): New macro.
5505 (GEN_STORE): New macro.
5506 (gen_limm): New function.
5507 (gen_atomic_xchg): New function.
5508 (gen_call): New function.
5509 (ppc_relocate_instruction): New function.
5510 (ppc_install_fast_tracepoint_jump_pad): New function.
5511 (ppc_get_min_fast_tracepoint_insn_len): New function.
5512 (ppc_get_ipa_tdesc_idx): New function.
5513 (the_low_target): Wire in the new functions.
5514 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5515 tdescs.
5516 * linux-ppc-tdesc.h: New file.
5517
a13c4696
MK
55182016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5519
5520 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5521 (alloc_jump_pad_buffer): New function.
5522 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5523 (alloc_jump_pad_buffer): New function.
5524 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5525 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5526 (alloc_jump_pad_buffer): New function.
5527 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5528 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5529 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5530 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5531
1cda1512
MK
55322016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5533
5534 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5535 * linux-amd64-ipa.c: Likewise.
5536 * linux-i386-ipa.c: Likewise.
5537 * linux-s390-ipa.c: Likewise.
5538 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5539 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5540 set_trace_state_variable_value_ptr.
5541 (struct ipa_sym_addresses): Likewise.
5542 (symbol_list): Likewise.
5543 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5544 accessing gdb_collect directly.
5545 (gdb_collect_ptr_type): New typedef.
5546 (get_raw_reg_ptr_type): New typedef.
5547 (get_trace_state_variable_value_ptr_type): New typedef.
5548 (set_trace_state_variable_value_ptr_type): New typedef.
5549 (gdb_collect_ptr): New global.
5550 (get_raw_reg_ptr): New global.
5551 (get_trace_state_variable_value_ptr): New global.
5552 (set_trace_state_variable_value_ptr): New global.
5553 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5554 accessing get_raw_reg directly.
5555 (get_get_tsv_func_addr): Likewise for
5556 get_trace_state_variable_value_ptr.
5557 (get_set_tsv_func_addr): Likewise for
5558 set_trace_state_variable_value_ptr.
5559 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5560
72fb5488
SM
55612016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5562
5563 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5564
28170b88
MK
55652016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5566
5567 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5568 packets.
5569 (relocate_instruction): Remove own_buf.
5570 * server.c (own_buf): Make global.
5571 (handle_v_requests): Make global.
5572 * server.h (own_buf): New declaration.
5573 (handle_v_requests): New prototype.
5574
f39e8743
MK
55752016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5576
5577 PR 18377
5578 * linux-s390-low.c (add_insns): New function.
5579 (s390_emit_prologue): New function.
5580 (s390_emit_epilogue): New function.
5581 (s390_emit_add): New function.
5582 (s390_emit_sub): New function.
5583 (s390_emit_mul): New function.
5584 (s390_emit_lsh): New function.
5585 (s390_emit_rsh_signed): New function.
5586 (s390_emit_rsh_unsigned): New function.
5587 (s390_emit_ext): New function.
5588 (s390_emit_log_not): New function.
5589 (s390_emit_bit_and): New function.
5590 (s390_emit_bit_or): New function.
5591 (s390_emit_bit_xor): New function.
5592 (s390_emit_bit_not): New function.
5593 (s390_emit_equal): New function.
5594 (s390_emit_less_signed): New function.
5595 (s390_emit_less_unsigned): New function.
5596 (s390_emit_ref): New function.
5597 (s390_emit_if_goto): New function.
5598 (s390_emit_goto): New function.
5599 (s390_write_goto_address): New function.
5600 (s390_emit_litpool): New function.
5601 (s390_emit_const): New function.
5602 (s390_emit_call): New function.
5603 (s390_emit_reg): New function.
5604 (s390_emit_pop): New function.
5605 (s390_emit_stack_flush): New function.
5606 (s390_emit_zero_ext): New function.
5607 (s390_emit_swap): New function.
5608 (s390_emit_stack_adjust): New function.
5609 (s390_emit_set_r2): New function.
5610 (s390_emit_int_call_1): New function.
5611 (s390_emit_void_call_2): New function.
5612 (s390_emit_eq_goto): New function.
5613 (s390_emit_ne_goto): New function.
5614 (s390_emit_lt_goto): New function.
5615 (s390_emit_le_goto): New function.
5616 (s390_emit_gt_goto): New function.
5617 (s390_emit_ge_goto): New function.
5618 (s390x_emit_prologue): New function.
5619 (s390x_emit_epilogue): New function.
5620 (s390x_emit_add): New function.
5621 (s390x_emit_sub): New function.
5622 (s390x_emit_mul): New function.
5623 (s390x_emit_lsh): New function.
5624 (s390x_emit_rsh_signed): New function.
5625 (s390x_emit_rsh_unsigned): New function.
5626 (s390x_emit_ext): New function.
5627 (s390x_emit_log_not): New function.
5628 (s390x_emit_bit_and): New function.
5629 (s390x_emit_bit_or): New function.
5630 (s390x_emit_bit_xor): New function.
5631 (s390x_emit_bit_not): New function.
5632 (s390x_emit_equal): New function.
5633 (s390x_emit_less_signed): New function.
5634 (s390x_emit_less_unsigned): New function.
5635 (s390x_emit_ref): New function.
5636 (s390x_emit_if_goto): New function.
5637 (s390x_emit_const): New function.
5638 (s390x_emit_call): New function.
5639 (s390x_emit_reg): New function.
5640 (s390x_emit_pop): New function.
5641 (s390x_emit_stack_flush): New function.
5642 (s390x_emit_zero_ext): New function.
5643 (s390x_emit_swap): New function.
5644 (s390x_emit_stack_adjust): New function.
5645 (s390x_emit_int_call_1): New function.
5646 (s390x_emit_void_call_2): New function.
5647 (s390x_emit_eq_goto): New function.
5648 (s390x_emit_ne_goto): New function.
5649 (s390x_emit_lt_goto): New function.
5650 (s390x_emit_le_goto): New function.
5651 (s390x_emit_gt_goto): New function.
5652 (s390x_emit_ge_goto): New function.
5653 (s390_emit_ops): New function.
5654 (struct linux_target_ops): Fill in emit_ops hook.
5655
abd9baf9
MK
56562016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5657
5658 PR 18377
5659 * Makefile.in: Add s390 IPA files.
5660 * configure.srv: Build IPA for s390.
5661 * linux-s390-ipa.c: New file.
5662 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5663 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5664 (tdesc_s390_linux32): Likewise.
5665 (init_registers_s390_linux32v1): Likewise.
5666 (tdesc_s390_linux32v1): Likewise.
5667 (init_registers_s390_linux32v2): Likewise.
5668 (tdesc_s390_linux32v2): Likewise.
5669 (init_registers_s390_linux64): Likewise.
5670 (tdesc_s390_linux64): Likewise.
5671 (init_registers_s390_linux64v1): Likewise.
5672 (tdesc_s390_linux64v1): Likewise.
5673 (init_registers_s390_linux64v2): Likewise.
5674 (tdesc_s390_linux64v2): Likewise.
5675 (init_registers_s390_te_linux64): Likewise.
5676 (tdesc_s390_te_linux64): Likewise.
5677 (init_registers_s390_vx_linux64): Likewise.
5678 (tdesc_s390_vx_linux64): Likewise.
5679 (init_registers_s390_tevx_linux64): Likewise.
5680 (tdesc_s390_tevx_linux64): Likewise.
5681 (init_registers_s390x_linux64): Likewise.
5682 (tdesc_s390x_linux64): Likewise.
5683 (init_registers_s390x_linux64v1): Likewise.
5684 (tdesc_s390x_linux64v1): Likewise.
5685 (init_registers_s390x_linux64v2): Likewise.
5686 (tdesc_s390x_linux64v2): Likewise.
5687 (init_registers_s390x_te_linux64): Likewise.
5688 (tdesc_s390x_te_linux64): Likewise.
5689 (init_registers_s390x_vx_linux64): Likewise.
5690 (tdesc_s390x_vx_linux64): Likewise.
5691 (init_registers_s390x_tevx_linux64): Likewise.
5692 (tdesc_s390x_tevx_linux64): Likewise.
5693 (have_hwcap_s390_vx): New static variable.
5694 (s390_arch_setup): Fill have_hwcap_s390_vx.
5695 (s390_get_thread_area): New function.
5696 (s390_ft_entry_gpr_esa): New const.
5697 (s390_ft_entry_gpr_zarch): New const.
5698 (s390_ft_entry_misc): New const.
5699 (s390_ft_entry_fr): New const.
5700 (s390_ft_entry_vr): New const.
5701 (s390_ft_main_31): New const.
5702 (s390_ft_main_64): New const.
5703 (s390_ft_exit_fr): New const.
5704 (s390_ft_exit_vr): New const.
5705 (s390_ft_exit_misc): New const.
5706 (s390_ft_exit_gpr_esa): New const.
5707 (s390_ft_exit_gpr_zarch): New const.
5708 (append_insns): New function.
5709 (s390_relocate_instruction): New function.
5710 (s390_install_fast_tracepoint_jump_pad): New function.
5711 (s390_get_min_fast_tracepoint_insn_len): New function.
5712 (s390_get_ipa_tdesc_idx): New function.
5713 (struct linux_target_ops): Wire in the above functions.
5714 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5715 * linux-s390-tdesc.h: New file.
5716
a4105d04
MK
57172016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5718
5719 * linux-s390-low.c (s390_supports_tracepoints): New function.
5720 (struct linux_target_ops): Fill supports_tracepoints hook.
5721
35ac8b3e
YQ
57222016-03-18 Yao Qi <yao.qi@linaro.org>
5723
5724 * linux-low.c (lwp_signal_can_be_delivered): New function.
5725 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5726
94610ec4
YQ
57272016-03-18 Yao Qi <yao.qi@linaro.org>
5728
5729 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5730 0 if signal is enqueued. Remove 'signal' from one debugging
5731 message. Move one debugging message to some lines below.
5732 Remove code setting 'signal' to 0.
5733
80aea927
YQ
57342016-03-18 Yao Qi <yao.qi@linaro.org>
5735
5736 * linux-low.c (linux_low_filter_event): Remove redundant
5737 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5738
b04fd3be
MK
57392016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5740
5741 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5742 (struct linux_target_ops): Wire in the above.
5743
c40c8d4b
YQ
57442016-03-03 Yao Qi <yao.qi@linaro.org>
5745
5746 * linux-low.c: Update comments to start_step_over.
5747
0f8288ae
YQ
57482016-03-03 Yao Qi <yao.qi@linaro.org>
5749
5750 PR server/19736
5751 * linux-low.c (handle_extended_wait): Set child suspended
5752 if event_lwp->bp_reinsert isn't zero.
5753
fdbd04a8
YQ
57542016-03-02 Yao Qi <yao.qi@linaro.org>
5755
5756 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5757 enqueue_pending_signal.
5758
6896a8fa
MK
57592016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5760
5761 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5762 is actually loaded.
5763
ab503087
MK
57642016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5765
5766 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5767 (s390_regmap_3264) [!__s390x__]: New global.
5768 (s390_collect_ptrace_register): Skip map entries containing -1.
5769 (s390_supply_ptrace_register): Ditto.
5770 (s390_fill_gprs_high): New function.
5771 (s390_store_gprs_high): New function.
5772 (s390_regsets): Add NT_S390_HIGH_GPRS.
5773 (s390_get_hwcap): Enable on 31-bit.
5774 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5775 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5776 Detect NT_S390_HIGH_GPRS.
5777 (s390_usrregs_info_3264): Enable on 31-bit.
5778 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5779 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5780
ae91f625
MK
57812016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5782
5783 PR gdb/13808
5784 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5785 * configure.srv: Ditto.
5786 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5787 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5788 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5789 (init_registers_amd64_linux): Remove prototype.
5790 (tdesc_amd64_linux): Remove declaration.
5791 (get_ipa_tdesc): New function.
5792 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5793 initialize remaining tdescs.
5794 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5795 (init_registers_i386_linux): Remove prototype.
5796 (tdesc_i386_linux): Remove declaration.
5797 (get_ipa_tdesc): New function.
5798 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5799 initialize remaining tdescs.
5800 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5801 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5802 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5803 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5804 (x86_get_ipa_tdesc_idx): New function.
5805 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5806 * linux-x86-tdesc.h: New file.
5807 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5808 (target_get_ipa_tdesc_idx): New macro.
5809 * tracepoint.c (ipa_tdesc_idx): New macro.
5810 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5811 (symbol_list): Add ipa_tdesc_idx.
5812 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5813 (ipa_tdesc): Remove.
5814 (ipa_tdesc_idx): New variable.
5815 (get_context_regcache): Use get_ipa_tdesc.
5816 (gdb_collect): Ditto.
5817 (gdb_probe): Ditto.
5818 * tracepoint.h (get_ipa_tdesc): New prototype.
5819 (ipa_tdesc): Remove.
5820
e7ad2f14
PA
58212016-02-24 Pedro Alves <palves@redhat.com>
5822
5823 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5824 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5825 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5826 Factor out common code between the USE_SIGTRAP_SIGINFO and
5827 !USE_SIGTRAP_SIGINFO blocks.
5828 (linux_low_filter_event): Call save_stop_reason instead of
5829 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5830 Update comments.
5831 (linux_wait_1): Update comments.
5832
657f9cde
WW
58332016-02-24 Wei-cheng Wang <cole945@gmail.com>
5834
5835 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5836 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5837 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5838 ppc_insert_point, ppc_remove_point.
5839
b00b61e1
MK
58402016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5841
5842 * linux-s390-low.c (s390_supports_z_point_type): New function.
5843 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5844
553cb527
YQ
58452016-02-16 Yao Qi <yao.qi@linaro.org>
5846
5847 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5848 PC. Get pc from regcache_read_pc.
5849
a5652c21
YQ
58502016-02-12 Yao Qi <yao.qi@linaro.org>
5851
5852 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5853 or linux_get_pc_32bit.
5854 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5855
ed443b61
YQ
58562016-02-12 Yao Qi <yao.qi@linaro.org>
5857
5858 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5859 arm_linux_get_next_pcs_fixup.
5860
020ecd38
MK
58612016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5862
5863 * tracepoint.c (x_tracepoint_action_download): Change
5864 write_inferior_data_ptr to write_inferior_data_pointer.
5865 (cmd_qtstart): Likewise.
5866 (write_inferior_data_ptr): Remove.
5867 (download_agent_expr): Change write_inferior_data_ptr to
5868 write_inferior_data_pointer.
5869 (download_tracepoint_1): Likewise.
5870 (download_tracepoint): Likewise.
5871 (download_trace_state_variables): Likewise.
5872
7cae9051
WW
58732016-02-11 Wei-cheng Wang <cole945@gmail.com>
5874 Marcin Kościelnicki <koriakin@0x04.net>
5875
5876 * tracepoint.c (struct tracepoint_action_ops): Remove.
5877 (struct tracepoint_action): Remove ops.
5878 (m_tracepoint_action_download, r_tracepoint_action_download)
5879 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5880 size and offset accordingly.
5881 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5882 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5883 (tracepoint_action_send, tracepoint_action_download): New functions.
5884 Helpers for trace action handlers.
5885 (add_tracepoint_action): Remove setup actions ops.
5886 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5887
9f6a71b4
YQ
58882016-02-10 Yao Qi <yao.qi@linaro.org>
5889
5890 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5891
1e94266c
SM
58922016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5893
5894 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5895 to AC_OUTPUT.
5896 * configure: Regenerate.
5897
8adce034
SM
58982016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5899
5900 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5901 void * to gdb_byte *.
5902 * linux-low.c (siginfo_fixup): Likewise.
5903 (linux_xfer_siginfo): Likewise.
5904 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5905 Likewise.
5906 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5907
93813b37
WT
59082016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5909
5910 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5911 to srv_tgtobj.
5912 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5913 to srv_tgtobj.
5914 * linux-x86-low.c [__x86_64__]: Include
5915 "nat/amd64-linux-siginfo.h".
5916 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5917 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5918 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5919 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5920 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5921 (cpt_si_fd, si_timerid, si_overrun): Move from
5922 nat/amd64-linux-siginfo.c.
5923 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5924
8424cc97
SM
59252016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5926
5927 * server.c (skip_to_semicolon): Remove.
5928 (process_point_options): Use strchrnul instead of
5929 skip_to_semicolon.
5930
4d18591b
YQ
59312016-01-26 Yao Qi <yao.qi@linaro.org>
5932
5933 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5934 * linux-low.c (install_software_single_step_breakpoints): Don't
5935 call regcache_read_pc.
5936 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5937 argument pc.
5938
d8020970
YQ
59392016-01-26 Yao Qi <yao.qi@linaro.org>
5940
5941 * linux-low.c (install_software_single_step_breakpoints): Call
5942 regcache_read_pc instead of get_pc.
5943
8b207339
YQ
59442016-01-26 Yao Qi <yao.qi@linaro.org>
5945
5946 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5947 (unblock_async_io): Rename to ...
5948 (block_unblock_async_io): ... it. New function.
5949 (enable_async_io): Don't install SIGIO handler. Unblock it
5950 instead.
5951 (disable_async_io): Don't ignore SIGIO. Block it instead.
5952 (initialize_async_io): Install SIGIO handler. Don't call
5953 unblock_async_io.
5954
18879fef
YQ
59552016-01-26 Yao Qi <yao.qi@linaro.org>
5956
5957 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5958 first character is '\003', call *the_target->request_interrupt.
5959
a0f8e08a
YQ
59602016-01-25 Yao Qi <yao.qi@linaro.org>
5961
5962 * remote-utils.c (new_thread_notify): Remove.
5963 (dead_thread_notify): Likewise.
5964 * remote-utils.h (new_thread_notify): Remove declaration.
5965 (dead_thread_notify): Likewise.
5966
cc5fd9ab
MK
59672016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5968
5969 * gdb.trace/pending.exp: Fix expected message on continue.
5970
99e8eb11
MK
59712016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5972
5973 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5974 it works properly on big-endian machines where sizeof (CORE_ADDR)
5975 != sizeof (void *).
5976
a994041d
PA
59772016-01-21 Pedro Alves <palves@redhat.com>
5978
5979 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5980 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5981 * configure: Regenerate.
5982
f7a6a40d
YQ
59832016-01-21 Yao Qi <yao.qi@linaro.org>
5984
5985 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5986 is_thumb and set it according to CPSR saved on the stack.
5987 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5988 arm_sigreturn_next_pc.
5989
6f69e520
YQ
59902016-01-18 Yao Qi <yao.qi@linaro.org>
5991
5992 * linux-low.c (linux_set_pc_64bit): New function.
5993 (linux_get_pc_64bit): New function.
5994 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5995 Declare.
5996 * linux-sparc-low.c (debug_threads): Remove declaration.
5997 (sparc_get_pc): Remove.
5998 (the_low_target): Use linux_get_pc_64bit instead of
5999 sparc_get_pc.
6000 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6001 (the_low_target): Use linux_get_pc_64bit and
6002 linux_set_pc_64bit.
6003
276d4552
YQ
60042016-01-18 Yao Qi <yao.qi@linaro.org>
6005
6006 * linux-arm-low.c (debug_threads): Remove declaration.
6007 (arm_get_pc, arm_set_pc): Remove.
6008 (the_low_target): Use linux_get_pc_32bit and
6009 linux_set_pc_32bit.
6010 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6011 (the_low_target): Use linux_get_pc_32bit and
6012 linux_set_pc_32bit.
6013 * linux-cris-low.c (debug_threads): Remove declaration.
6014 (cris_get_pc, cris_set_pc,): Remove.
6015 (the_low_target): Use linux_get_pc_32bit and
6016 linux_set_pc_32bit.
6017 * linux-crisv32-low.c (debug_threads): Remove declaration.
6018 (cris_get_pc, cris_set_pc): Remove.
6019 (the_low_target): Use linux_get_pc_32bit and
6020 linux_set_pc_32bit.
6021 * linux-low.c: Include inttypes.h.
6022 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6023 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6024 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6025 (the_low_target): Use linux_get_pc_32bit and
6026 linux_set_pc_32bit.
6027 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6028 (the_low_target): Use linux_get_pc_32bit and
6029 linux_set_pc_32bit.
6030 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6031 (the_low_target): Use linux_get_pc_32bit and
6032 linux_set_pc_32bit.
6033 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6034 (the_low_target): Use linux_get_pc_32bit and
6035 linux_set_pc_32bit.
6036 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6037 (the_low_target): Use linux_get_pc_32bit and
6038 linux_set_pc_32bit.
6039
eb0edac8
GB
60402016-01-18 Gary Benson <gbenson@redhat.com>
6041
6042 * configure.ac (AC_FUNC_FORK): New check.
6043 * config.in: Regenerate.
6044 * configure: Likewise.
6045
1b451dda
YQ
60462016-01-14 Yao Qi <yao.qi@linaro.org>
6047
6048 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6049 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6050 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6051 arm_get_next_pcs_ctor.
6052
82075af2
JS
60532016-01-12 Josh Stone <jistone@redhat.com>
6054 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6055
6056 * inferiors.h: Include "gdb_vecs.h".
6057 (struct process_info): Add syscalls_to_catch.
6058 * inferiors.c (remove_process): Free syscalls_to_catch.
6059 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6060 syscall_return stops.
6061 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6062 * server.c (handle_general_set): Handle QCatchSyscalls.
6063 (handle_query): Report support for QCatchSyscalls.
6064 * target.h (struct target_ops): Add supports_catch_syscall.
6065 (target_supports_catch_syscall): New macro.
6066 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6067 (struct lwp_info): Add syscall_state.
6068 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6069 Maintain syscall_state and syscalls_to_catch across exec.
6070 (get_syscall_trapinfo): New function, proxy to the_low_target.
6071 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6072 (linux_low_filter_event): Toggle syscall_state entry/return for
6073 syscall traps, and set it ignored for all others.
6074 (gdb_catching_syscalls_p): New function.
6075 (gdb_catch_this_syscall_p): New function.
6076 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6077 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6078 (linux_supports_catch_syscall): New function.
6079 (linux_target_ops): Install it.
6080 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6081 (the_low_target): Install it.
6082
8f13a3ce
MF
60832016-01-12 Mike Frysinger <vapier@gentoo.org>
6084
6085 * acinclude.m4: Include new ../warning.m4 file.
6086 * configure: Regenerated.
6087 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6088
5b3da067
MF
60892016-01-12 Mike Frysinger <vapier@gentoo.org>
6090
6091 * ax.c (is_goto_target): Mark static.
6092 * linux-low.c (register_addr): Likewise.
6093 (linux_fetch_registers, linux_store_registers): Likewise.
6094 * mem-break.c (any_persistent_commands): Fix old prototype.
6095 (add_commands_to_breakpoint): Mark static.
6096 * regcache.c (find_register_by_name): Delete unused func.
6097 * remote-utils.c (hex_or_minus_one): Mark static.
6098 * server.c (monitor_show_help): Mark static.
6099 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6100 handle_v_requests): Likewise.
6101
bc504a31
PA
61022016-01-12 Pedro Alves <palves@redhat.com>
6103
6104 Remove use of the registered trademark symbol throughout.
6105
5a0dd67a
YQ
61062016-01-08 Yao Qi <yao.qi@linaro.org>
6107
6108 * remote-utils.c (getpkt): If c is '\003', call target hook
6109 request_interrupt.
6110
b2ca446f
YQ
61112016-01-06 Yao Qi <yao.qi@linaro.org>
6112
6113 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6114 linux-aarch32-low.c.
6115 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6116 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6117 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6118 (thumb2_breakpoint): Declare.
6119 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6120 linux-aarch32-low.h.
6121 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6122 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6123 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6124
edd88788
JB
61252016-01-01 Joel Brobecker <brobecker@adacore.com>
6126
6127 * gdbreplay.c (gdbreplay_version): Change copyright year in
6128 version message.
6129 * server.c (gdbserver_version): Likewise.
6130
65da7f14
PP
61312015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6132
6133 * server.c (crc32_table): Delete.
6134 (crc32): Use libiberty's xcrc32 function.
6135
4abd5ed2
JB
61362015-12-22 Joel Brobecker <brobecker@adacore.com>
6137
6138 * lynx-low.c (lynx_delete_thread_callback): New function.
6139 (lynx_mourn): Properly delete our process and all of its
6140 threads. Remove call to clear_inferiors.
6141
0e50fe5c
JB
61422015-12-22 Joel Brobecker <brobecker@adacore.com>
6143
6144 * target.c (thread_search_callback): Add check that
6145 the thread_stopped target callback is not NULL before
6146 calling it.
6147
35adc03f
YQ
61482015-12-21 Yao Qi <yao.qi@linaro.org>
6149
6150 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6151 arm breakpoint.
6152
bd2b2909
AT
61532015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6154
6155 * server.c (handle_query): Call target_supports_software_single_step.
6156
7fe5e27e
AT
61572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6158
6159 * linux-low.c (single_step): New function.
6160 (linux_resume_one_lwp_throw): Call single_step.
6161 (start_step_over): Likewise.
6162
d9311bfa
AT
61632015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6164
6165 * Makefile.in (SFILES): Append arch/arm-linux.c,
6166 arch/arm-get-next-pcs.c.
6167 (arm-linux.o): New rule.
6168 (arm-get-next-pcs.o): New rule.
6169 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6170 arm-linux.o.
6171 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6172 to linux-aarch32-low.c.
6173 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6174 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6175 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6176 (thumb2_breakpoint_len): Likewise.
6177 (arm_is_thumb_mode): Make non-static.
6178 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6179 from linux-aarch32-low.c.
6180 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6181 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6182 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6183 (thumb2_breakpoint_len): Likewise.
6184 (arm_is_thumb_mode): New declaration.
6185 * linux-arm-low.c: Include arch/arm-linux.h
6186 aarch/arm-get-next-pcs.h, sys/syscall.h.
6187 (get_next_pcs_ops): New struct.
6188 (get_next_pcs_addr_bits_remove): New function.
6189 (get_next_pcs_is_thumb): New function.
6190 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6191 (arm_sigreturn_next_pc): Likewise.
6192 (get_next_pcs_syscall_next_pc): Likewise.
6193 (arm_gdbserver_get_next_pcs): Likewise.
6194 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6195 Initialize.
6196 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6197 * server.h: Include gdb_vecs.h.
6198
68ce2059
AT
61992015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6200
6201 * Makefile.in (SFILES): Append common/common-regcache.c.
6202 (OBS): Append common-regcache.o.
6203 (common-regcache.o): New rule.
6204 * regcache.c (init_register_cache): Initialize cache to
6205 REG_UNAVAILABLE.
6206 (regcache_raw_read_unsigned): New function.
6207 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6208 register_status enum.
6209
fa5308bd
AT
62102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6211
6212 * linux-aarch64-low.c (the_low_targets): Rename
6213 breakpoint_reinsert_addr to get_next_pcs.
6214 * linux-arm-low.c (the_low_targets): Likewise.
6215 * linux-bfin-low.c (the_low_targets): Likewise.
6216 * linux-cris-low.c (the_low_targets): Likewise.
6217 * linux-crisv32-low.c (the_low_targets): Likewise.
6218 * linux-low.c (can_software_single_step): Likewise.
6219 (install_software_single_step_breakpoints): New function.
6220 (start_step_over): Use install_software_single_step_breakpoints.
6221 * linux-low.h: New CORE_ADDR vector.
6222 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6223 get_next_pcs.
6224 * linux-mips-low.c (the_low_targets): Likewise.
6225 * linux-nios2-low.c (the_low_targets): Likewise.
6226 * linux-sparc-low.c (the_low_targets): Likewise.
6227
4a6ed09b
PA
62282015-12-17 Pedro Alves <palves@redhat.com>
6229
6230 * linux-low.c (linux_kill_one_lwp): Remove references to
6231 LinuxThreads.
6232 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6233 to 'kill'.
6234 (linux_init_signals): Delete.
6235 (initialize_low): Adjust.
6236 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6237
7544db95
PA
62382015-12-16 Pedro Alves <palves@redhat.com>
6239
6240 * configure.ac (compiler warning flags): When testing a
6241 -Wno-foo option, check whether -Wfoo works instead.
6242 * configure: Regenerate.
6243
8020350c
DB
62442015-12-11 Don Breazeal <donb@codesourcery.com>
6245
6246 * server.c (process_serial_event): Don't exit from gdbserver
6247 in remote mode if there are still active inferiors.
6248
db91f502
YQ
62492015-12-11 Yao Qi <yao.qi@linaro.org>
6250
6251 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6252 arm_breakpoint_at if the process is 32-bit.
6253
b37a6290
YQ
62542015-12-11 Yao Qi <yao.qi@linaro.org>
6255
6256 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6257 arm breakpoint.
6258
17b1509a
YQ
62592015-12-07 Yao Qi <yao.qi@linaro.org>
6260
6261 * configure.srv: Append arm.o to srv_tgtobj for
6262 aarch64*-*-linux* target.
6263 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6264 from linux-arm-low.c.
6265 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6266 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6267 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6268 (thumb2_breakpoint_len): Likewise.
6269 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6270 (arm_breakpoint_kinds): Likewise.
6271 (arm_breakpoint_kind_from_pc): Likewise.
6272 (arm_sw_breakpoint_from_kind): Likewise.
6273 (arm_breakpoint_kind_from_current_state): Likewise.
6274 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6275 (arm_sw_breakpoint_from_kind): Declare.
6276 (arm_breakpoint_kind_from_current_state): Declare.
6277 (arm_breakpoint_at): Declare.
6278 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6279 arm_sw_breakpoint_from_kind if process is 32-bit.
6280 (aarch64_breakpoint_kind_from_pc): New function.
6281 (aarch64_breakpoint_kind_from_current_state): New function.
6282 (the_low_target): Initialize fields breakpoint_kind_from_pc
6283 and breakpoint_kind_from_current_state.
6284 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6285 linux-aarch32-low.c.
6286 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6287 (arm_breakpoint, arm_breakpoint_len): Likewise.
6288 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6289 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6290 (arm_is_thumb_mode): Likewise.
6291 (arm_breakpoint_at): Likewise.
6292 (arm_breakpoint_kind_from_pc): Likewise.
6293 (arm_sw_breakpoint_from_kind): Likewise.
6294 (arm_breakpoint_kind_from_current_state): Likewise.
6295
6296 Revert:
6297 2015-08-04 Yao Qi <yao.qi@linaro.org>
6298
6299 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6300 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6301 * server.c (extended_protocol): Remove "static".
6302 * server.h (extended_protocol): Declare it.
6303
ece66d65
JS
63042015-12-04 Josh Stone <jistone@redhat.com>
6305
6306 * target.h (struct target_ops) <arch_setup>: Rename to ...
6307 (struct target_ops) <post_create_inferior>: ... this.
6308 (target_arch_setup): Rename to ...
6309 (target_post_create_inferior): ... this, calling post_create_inferior.
6310 * server.c (start_inferior): Update target_arch_setup calls to
6311 target_post_create_inferior.
6312 * linux-low.c (linux_low_ptrace_options): Forward declare.
6313 (linux_arch_setup): Update its comment for general use.
6314 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6315 (struct linux_target_ops): Use linux_post_create_inferior.
6316 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6317 to post_create_inferior.
6318 * nto-low.c (struct nto_target_ops): Likewise.
6319 * spu-low.c (struct spu_target_ops): Likewise.
6320 * win32-low.c (struct win32_target_ops): Likewise.
6321
e58c48b4
AT
63222015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6323
6324 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6325
fbec8956
AT
63262015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6327
6328 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6329 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6330 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6331 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6332 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6333 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6334 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6335 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6336 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6337 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6338 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6339 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6340
9b4c5f87
AT
63412015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6342
6343 * linux-low.c (linux_look_up_symbols): Don't call
6344 linux_supports_traceclone.
6345 * linux-low.h (thread_db_init): Remove use_events argument.
6346 * thread-db.c (thread_db_use_event): Remove global variable.
6347 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6348 (struct thread_db) <td_create_bp>: Remove field.
6349 (thread_db_create_event): Remove function.
6350 (thread_db_enable_reporting): Likewise.
6351 (find_one_thread): Don't check for thread_db_use_events.
6352 (attach_thread): Likewise.
6353 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6354 (try_thread_db_load_1): Don't check for thread_db_use_events.
6355 (thread_db_init): Remove use_events argument and thread events
6356 handling.
6357 (remove_thread_event_breakpoints): Remove function.
6358 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6359
7d00775e
AT
63602015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6361
6362 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6363 New function.
6364 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6365 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6366 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6367 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6368 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6369 Initialize.
6370 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6371 New function.
6372 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6373 * linux-low.c (can_hardware_single_step): Use
6374 supports_hardware_single_step.
6375 (can_software_single_step): New function.
6376 (start_step_over): Call can_software_single_step.
6377 (linux_supports_hardware_single_step): New function.
6378 (struct target_ops) <supports_software_single_step>: Initialize.
6379 * linux-low.h (struct linux_target_ops)
6380 <supports_hardware_single_step>: Initialize.
6381 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6382 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6383 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6384 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6385 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6386 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6387 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6388 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6389 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6390 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6391 Initialize.
6392 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6393 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6394 Initialize.
6395 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6396 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6397 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6398 New function.
6399 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6400 * target.h (struct target_ops): <supports_software_single_step>:
6401 New field.
6402 (target_supports_software_single_step): New macro.
6403
2d97cd35
AT
64042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6405
6406 * linux-low.c (linux_wait_1): Fix pc advance condition.
6407 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6408 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6409
769ef81f
AT
64102015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6411
6412 * linux-arm-low.c (arm_is_thumb_mode): New function.
6413 (arm_breakpoint_at): Use arm_is_thumb_mode.
6414 (arm_breakpoint_kind_from_current_state): New function.
6415 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6416 Initialize.
6417 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6418 (linux_breakpoint_kind_from_current_state): New function.
6419 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6420 * linux-low.h (struct linux_target_ops)
6421 <breakpoint_kind_from_current_state>: New field.
6422 * target.h (struct target_ops): Likewise.
6423 (target_breakpoint_kind_from_current_state): New macro.
6424
1bebeeca
PA
64252015-11-30 Pedro Alves <palves@redhat.com>
6426
6427 * linux-low.c (linux_resume): Wake up the event loop before
6428 returning.
6429
a67a9fae
PA
64302015-11-30 Pedro Alves <palves@redhat.com>
6431
6432 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6433 check.
6434 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6435 to -1.
6436 * target.c (struct thread_search): New structure.
6437 (thread_search_callback): New function.
6438 (prev_general_thread): New global.
6439 (prepare_to_access_memory, done_accessing_memory): New functions.
6440 * target.h (prepare_to_access_memory, done_accessing_memory):
6441 Replace macros with function declarations.
6442
f2faf941
PA
64432015-11-30 Pedro Alves <palves@redhat.com>
6444
6445 PR 14618
6446 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6447 report TARGET_WAITKIND_NO_RESUMED.
6448 * remote-utils.c (prepare_resume_reply): Handle
6449 TARGET_WAITKIND_NO_RESUMED.
6450 * server.c (report_no_resumed): New global.
6451 (handle_query) <qSupported>: Handle "no-resumed+". Report
6452 "no-resumed+" support.
6453 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6454 return error if the client doesn't support no-resumed events.
6455 (push_stop_notification): New function.
6456 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6457 events if the client supports them.
6458
a681f9c9
PA
64592015-11-30 Pedro Alves <palves@redhat.com>
6460
6461 * linux-low.c (thread_still_has_status_pending_p): Don't check
6462 vCont;t here.
6463 (lwp_resumed): New function.
6464 (status_pending_p_callback): Return early if the LWP is not
6465 supposed to be resumed.
6466
65706a29
PA
64672015-11-30 Pedro Alves <palves@redhat.com>
6468
6469 * linux-low.c (handle_extended_wait): Assert that the LWP's
6470 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6471 thread create events, leave the new child's status pending.
6472 (linux_low_filter_event): If GDB wants to hear about thread exit
6473 events, leave the LWP marked dead and don't delete it.
6474 (linux_wait_for_event_filtered): Don't check for thread exit.
6475 (filter_exit_event): New function.
6476 (linux_wait_1): Use it, when returning an exit event.
6477 (linux_resume_one_lwp_throw): Assert that the LWP's
6478 waitstatus is TARGET_WAITKIND_IGNORE.
6479 * remote-utils.c (prepare_resume_reply): Handle
6480 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6481 * server.c (report_thread_events): New global.
6482 (handle_general_set): Handle QThreadEvents.
6483 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6484 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6485 TARGET_WAITKIND_THREAD_EXITED.
6486 * server.h (report_thread_events): Declare.
6487
56cf4bed
PA
64882015-11-30 Pedro Alves <palves@redhat.com>
6489
6490 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6491 the thread's last_resume_kind was resume_stop.
6492
500c1d85
PA
64932015-11-30 Pedro Alves <palves@redhat.com>
6494
6495 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6496 before returning.
6497
de979965
PA
64982015-11-30 Pedro Alves <palves@redhat.com>
6499
6500 * server.c (handle_v_requests): Handle vCtrlC.
6501
34c65914
PA
65022015-11-30 Pedro Alves <palves@redhat.com>
6503
6504 * gdbthread.h (find_any_thread_of_pid): Declare.
6505 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6506 functions.
6507 * server.c (handle_query): If current_thread is NULL, look for
6508 another thread of the selected process.
6509
79efa585 65102015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 6511 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
6512
6513 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6514 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6515 name in reply.
6516 * target.h (struct target_ops) <thread_name>: New field.
6517 (target_thread_name): New macro.
6518
80d82c19
JB
65192015-11-23 Joel Brobecker <brobecker@adacore.com>
6520
6521 * regcache.h (regcache_invalidate_pid): Add declaration.
6522 * regcache.c (regcache_invalidate_pid): New function, extracted
6523 from regcache_invalidate.
6524 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6525 Add trivial documentation comment.
6526 * lynx-low.c: Use regcache_invalidate_pid instead of
6527 regcache_invalidate.
6528
64da5dd5
JB
65292015-11-23 Joel Brobecker <brobecker@adacore.com>
6530
6531 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6532 and Elf64_auxv_t if the target is Android.
6533
37ce4055
DE
65342015-11-22 Doug Evans <xdje42@gmail.com>
6535
6536 * target.h: #include <sys/types.h>.
6537
06e03fff
PA
65382015-11-19 Pedro Alves <palves@redhat.com>
6539
6540 * linux-low.c (linux_process_qsupported): Change prototype.
6541 Adjust.
6542 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6543 Change prototype.
6544 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6545 and adjust to loop over all features.
6546 * server.c (handle_query) <qSupported>: Adjust to call
6547 target_process_qsupported once, passing it a vector of unprocessed
6548 features.
6549 * target.h (struct target_ops) <process_qsupported>: Change
6550 prototype.
6551 (target_process_qsupported): Adjust.
6552
9a084706
PA
65532015-11-19 Pedro Alves <palves@redhat.com>
6554
6555 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6556 mode.
6557 * configure: Regenerate.
6558
dad44a1f
PA
65592015-11-19 Pedro Alves <palves@redhat.com>
6560
6561 * configure: Regenerate.
6562
231c0592
YQ
65632015-11-19 Yao Qi <yao.qi@linaro.org>
6564
6565 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6566 type to uint32_t.
6567
6c1c9a8b
YQ
65682015-11-19 Yao Qi <yao.qi@linaro.org>
6569
6570 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6571 (struct aarch64_operand): Move enum out.
6572
9caa3311
YQ
65732015-11-19 Yao Qi <yao.qi@linaro.org>
6574
6575 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6576 struct user_fpsimd_state *.
6577 (aarch64_store_fpregset): Likewise.
6578
6a69a054
YQ
65792015-11-19 Yao Qi <yao.qi@linaro.org>
6580
6581 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6582 struct user_pt_regs *.
6583 (aarch64_store_gregset): Likewise.
6584
1798301e
PA
65852015-11-18 Pedro Alves <palves@redhat.com>
6586
6587 * Makefile.in (all_object_files): Add $IPA_OBJS.
6588
ce7715e2
PA
65892015-11-17 Pedro Alves <palves@redhat.com>
6590
6591 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6592 GDB_SIGNAL_0 and gdb_signal_to_string.
6593
c0879059
PA
65942015-11-17 Pedro Alves <palves@redhat.com>
6595
6596 * win32-low.c (handle_output_debug_string): Remove parameter.
6597 (win32_kill): Remove our_status local and adjust call to
6598 handle_output_debug_string.
6599 (get_child_debug_event): Adjust call to
6600 handle_output_debug_string.
6601
1996e237
SM
66022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6603
6604 * linux-mips-low.c (mips_fill_gregset): Add cast.
6605 (mips_store_gregset): Likewise.
6606 (mips_fill_fpregset): Likewise.
6607 (mips_store_fpregset): Likewise.
6608
cbec665b
SM
66092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6610
6611 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6612 priv.
6613
eb3e3c67
SM
66142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6615
6616 * linux-mips-low.c (mips_linux_new_thread): Change type of
6617 watch_type to enum target_hw_bp_type.
6618
171de4b8
SM
66192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6620
6621 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6622 Change return type to arm_hwbp_type.
6623
04248ead
SM
66242015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6625
6626 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6627 (arm_store_gregset): Likewise.
6628 * linux-arm-low.c (arm_get_hwcap): Likewise.
6629 (arm_read_description): Likewise.
6630
04b3479c
SM
66312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6632
6633 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6634
2bc84e8a
SM
66352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6636
6637 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6638 (ppc_fill_vsxregset): Likewise.
6639 (ppc_store_vsxregset): Likewise.
6640 (ppc_fill_vrregset): Likewise.
6641 (ppc_store_vrregset): Likewise.
6642 (ppc_fill_evrregset): Likewise.
6643 (ppc_store_evrregset): Likewise.
6644
e6c5bb05
SM
66452015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6646
6647 * linux-ppc-low.c (ppc_usrregs_info): Remove
6648 forward-declaration.
6649 (ppc_arch_setup): Move lower in file.
6650
7ea45d72
SM
66512015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6652
6653 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6654 (ps_pdwrite): Likewise.
6655
69291610
HW
66562015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6657
6658 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6659 to after assert checks.
6660
b42945fd
SM
66612015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6662
6663 * proc-service.c (ps_pdread): Add/adjust casts.
6664 (ps_pdwrite): Add/adjust casts.
6665
d6f85c84
SM
66662015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6667
6668 * server.c (handle_search_memory_1): Cast return value of
6669 memmem.
6670
f98cd059
SM
66712015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6672
6673 * server.c (write_qxfer_response): Change type of data to
6674 gdb_byte *.
6675
d2412fa5
PA
66762015-10-29 Pedro Alves <palves@redhat.com>
6677
6678 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6679
c17414a2
PA
66802015-10-29 Pedro Alves <palves@redhat.com>
6681
6682 * tracepoint.c (clear_installed_tracepoints): Add casts.
6683
e053fbc4
PA
66842015-10-29 Pedro Alves <palves@redhat.com>
6685
6686 * server.c (handle_v_cont, process_serial_event): Add enum
6687 gdb_signal casts to signal parsing code.
6688
add67df8
PA
66892015-10-29 Pedro Alves <palves@redhat.com>
6690
6691 * linux-low.h (NULL_REGSET): Define.
6692 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6693 * linux-arm-low.c (arm_regsets): Likewise.
6694 * linux-crisv32-low.c (cris_regsets): Likewise.
6695 * linux-m68k-low.c (m68k_regsets): Likewise.
6696 * linux-mips-low.c (mips_regsets): Likewise.
6697 * linux-nios2-low.c (nios2_regsets): Likewise.
6698 * linux-ppc-low.c (ppc_regsets): Likewise.
6699 * linux-s390-low.c (s390_regsets): Likewise.
6700 * linux-sh-low.c (sh_regsets): Likewise.
6701 * linux-sparc-low.c (sparc_regsets): Likewise.
6702 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6703 * linux-tile-low.c (tile_regsets): Likewise.
6704 * linux-x86-low.c (x86_regsets): Likewise.
6705 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6706
50bc912a
PA
67072015-10-29 Pedro Alves <palves@redhat.com>
6708
6709 * linux-low.h (NULL_REGSET): Define.
6710 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6711 * linux-arm-low.c (arm_regsets): Likewise.
6712 * linux-crisv32-low.c (cris_regsets): Likewise.
6713 * linux-m68k-low.c (m68k_regsets): Likewise.
6714 * linux-mips-low.c (mips_regsets): Likewise.
6715 * linux-nios2-low.c (nios2_regsets): Likewise.
6716 * linux-ppc-low.c (ppc_regsets): Likewise.
6717 * linux-s390-low.c (s390_regsets): Likewise.
6718 * linux-sh-low.c (sh_regsets): Likewise.
6719 * linux-sparc-low.c (sparc_regsets): Likewise.
6720 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6721 * linux-tile-low.c (tile_regsets): Likewise.
6722 * linux-x86-low.c (x86_regsets): Likewise.
6723 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6724
682b2546
DE
67252015-10-26 Doug Evans <dje@google.com>
6726
6727 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6728
963843d4
DE
67292015-10-26 Doug Evans <dje@google.com>
6730
6731 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6732
d41401ac
DE
67332015-10-26 Doug Evans <dje@google.com>
6734
6735 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6736 for debug_printf.
6737 (attach_thread, find_new_threads_callback): Ditto.
6738
3db28855
AT
67392015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6740
6741 * mem-break.h (set_breakpoint_data): Remove.
6742
fb78e89c
AT
67432015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6744
6745 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6746 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6747 (initialize_low): Remove set_breakpoint_data call.
6748 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6749 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6750 (initialize_low): Remove set_breakpoint_data call.
6751 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6752 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6753 (initialize_low): Remove set_breakpoint_data call.
6754
2e6ee069
AT
67552015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6756
6757 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6758 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6759 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6760 * target.h (target_breakpoint_kind_from_pc): New macro.
6761
1652a986
AT
67622015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6763
6764 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6765 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6766 the default breakpoint kind.
6767
abeead09
AT
67682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6769
6770 * linux-arm-low.c (arm_supports_z_point_type): Add software
6771 breakpoint support.
6772
b0b4b501
AT
67732015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6774
6775 * linux-arm-low.c: Refactor breakpoint definitions.
6776 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6777 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6778
8689682c
AT
67792015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6780
6781 * Makefile.in: Add arm.c/o.
6782 * configure.srv: Likewise.
6783 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6784 (arm_breakpoint_kind_from_pc): New function.
6785 (arm_sw_breakpoint_from_kind): Return proper kind.
6786 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6787
27165294
AT
67882015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6789
6790 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6791 removal.
6792 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6793 (struct raw_breakpoint) <size>: Remove.
6794 (struct raw_breakpoint) <kind>: Add.
6795 (bp_size): New function.
6796 (bp_opcode): Likewise.
6797 (find_raw_breakpoint_at): Adjust for kind.
6798 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6799 (remove_memory_breakpoint): Adjust for kind call bp_size.
6800 (set_raw_breakpoint_at): Adjust for kind.
6801 (set_breakpoint): Likewise.
6802 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6803 (delete_raw_breakpoint): Adjust for kind.
6804 (delete_breakpoint): Likewise.
6805 (find_gdb_breakpoint): Likewise.
6806 (set_gdb_breakpoint_1): Likewise.
6807 (set_gdb_breakpoint): Likewise.
6808 (delete_gdb_breakpoint_1): Likewise.
6809 (delete_gdb_breakpoint): Likewise.
6810 (uninsert_raw_breakpoint): Likewise.
6811 (reinsert_raw_breakpoint): Likewise.
6812 (set_breakpoint_data): Remove.
6813 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6814 (check_mem_read): Adjust for kind call bp_size.
6815 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6816 (clone_one_breakpoint): Adjust for kind.
6817 * mem-break.h (set_gdb_breakpoint): Likewise.
6818 (delete_gdb_breakpoint): Likewise.
6819 * server.c (process_serial_event): Likewise.
6820
dd373349
AT
68212015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6822
6823 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6824 (struct linux_target_ops) <breakpoint>: Remove.
6825 (struct linux_target_ops) <breakpoint_len>: Remove.
6826 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6827 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6828 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6829 (arm_sw_breakpoint_from_kind): New function.
6830 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6831 (struct linux_target_ops) <breakpoint>: Remove.
6832 (struct linux_target_ops) <breakpoint_len>: Remove.
6833 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6834 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6835 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6836 (struct linux_target_ops) <breakpoint>: Remove.
6837 (struct linux_target_ops) <breakpoint_len>: Remove.
6838 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6839 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6840 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6841 (struct linux_target_ops) <breakpoint>: Remove.
6842 (struct linux_target_ops) <breakpoint_len>: Remove.
6843 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6844 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6845 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6846 and sw_breakpoint_from_kind to increment the pc.
6847 (linux_breakpoint_kind_from_pc): New function.
6848 (linux_sw_breakpoint_from_kind): New function.
6849 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6850 (initialize_low): Call breakpoint_kind_from_pc and
6851 sw_breakpoint_from_kind to replace breakpoint_data/len.
6852 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6853 New field.
6854 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6855 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6856 (struct linux_target_ops) <breakpoint>: Remove.
6857 (struct linux_target_ops) <breakpoint_len>: Remove.
6858 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6859 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6860 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6861 (struct linux_target_ops) <breakpoint>: Remove.
6862 (struct linux_target_ops) <breakpoint_len>: Remove.
6863 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6864 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6865 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6866 (struct linux_target_ops) <breakpoint>: Remove.
6867 (struct linux_target_ops) <breakpoint_len>: Remove.
6868 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6869 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6870 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6871 (struct linux_target_ops) <breakpoint>: Remove.
6872 (struct linux_target_ops) <breakpoint_len>: Remove.
6873 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6874 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6875 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6876 (struct linux_target_ops) <breakpoint>: Remove.
6877 (struct linux_target_ops) <breakpoint_len>: Remove.
6878 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6879 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6880 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6881 (struct linux_target_ops) <breakpoint>: Remove.
6882 (struct linux_target_ops) <breakpoint_len>: Remove.
6883 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6884 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6885 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6886 (struct linux_target_ops) <breakpoint>: Remove.
6887 (struct linux_target_ops) <breakpoint_len>: Remove.
6888 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6889 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6890 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6891 (struct linux_target_ops) <breakpoint>: Remove.
6892 (struct linux_target_ops) <breakpoint_len>: Remove.
6893 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6894 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6895 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6896 (struct linux_target_ops) <breakpoint>: Remove.
6897 (struct linux_target_ops) <breakpoint_len>: Remove.
6898 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6899 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6900 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6901 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6902 (struct linux_target_ops) <breakpoint>: Remove.
6903 (struct linux_target_ops) <breakpoint_len>: Remove.
6904 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6905 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6906 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6907 (struct linux_target_ops) <breakpoint>: Remove.
6908 (struct linux_target_ops) <breakpoint_len>: Remove.
6909 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6910 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6911
4cd98a19
AT
69122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6913
6914 * linux-cris-low.c (cris_get_pc): Remove void arg.
6915
774ee6d2
AR
69162015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6917
6918 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6919 variable name.
6920
833dcd29
AR
69212015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6922
6923 * inferiors.c (thread_pid_matches_callback): New function.
6924 (find_thread_process): New function.
6925 (remove_thread): Reset current_thread.
6926 (remove_process): Assert threads have been removed first.
6927
8d689ee5
YQ
69282015-10-15 Yao Qi <yao.qi@linaro.org>
6929
6930 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6931 if it is 3.
6932 (aarch64_remove_point): Likewise.
6933 * regcache.c (regcache_register_size): New function.
6934
1c2e1515
YQ
69352015-10-12 Yao Qi <yao.qi@linaro.org>
6936
6937 * linux-aarch64-low.c: Update all callers as emit_load_store
6938 is renamed to aarch64_emit_load_store.
6939
e1c587c3
YQ
69402015-10-12 Yao Qi <yao.qi@linaro.org>
6941
6942 * linux-aarch64-low.c: Update all callers of function renaming
6943 from emit_insn to aarch64_emit_insn.
6944
b6542f81
YQ
69452015-10-12 Yao Qi <yao.qi@linaro.org>
6946
6947 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6948 arch/aarch64-insn.h.
6949 (struct aarch64_memory_operand): Likewise.
6950 (ENCODE): Likewise.
6951 (emit_insn): Move to arch/aarch64-insn.c.
6952 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6953 (emit_load_store): Move to arch/aarch64-insn.c.
6954 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6955 (can_encode_int32): Remove.
6956
246994ce
YQ
69572015-10-12 Yao Qi <yao.qi@linaro.org>
6958
6959 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6960 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6961 (aarch64_relocate_instruction): Likewise.
6962 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6963 (struct aarch64_insn_visitor): Likewise.
6964
0badd99f
YQ
69652015-10-12 Yao Qi <yao.qi@linaro.org>
6966
6967 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6968 (struct aarch64_insn_visitor): New.
6969 (struct aarch64_insn_relocation_data): New.
6970 (aarch64_ftrace_insn_reloc_b): New function.
6971 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6972 (aarch64_ftrace_insn_reloc_cb): Likewise.
6973 (aarch64_ftrace_insn_reloc_tb): Likewise.
6974 (aarch64_ftrace_insn_reloc_adr): Likewise.
6975 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6976 (aarch64_ftrace_insn_reloc_others): Likewise.
6977 (visitor): New.
6978 (aarch64_relocate_instruction): Use visitor.
6979
dfaffe9d
YQ
69802015-10-12 Yao Qi <yao.qi@linaro.org>
6981
6982 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6983 int. Add argument buf.
6984 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6985 aarch64_relocate_instruction.
6986
70b439f0
YQ
69872015-10-12 Yao Qi <yao.qi@linaro.org>
6988
6989 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6990 argument insn. Remove local variable insn. Don't call
6991 target_read_uint32.
6992 (aarch64_install_fast_tracepoint_jump_pad): Call
6993 target_read_uint32.
6994
7781c06f
YQ
69952015-09-30 Yao Qi <yao.qi@linaro.org>
6996
6997 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6998 (emit_load_store_pair): Likewise.
6999
9a3c8263
SM
70002015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7001
7002 * dll.c (match_dll): Add cast(s).
7003 (unloaded_dll): Likewise.
7004 * linux-low.c (second_thread_of_pid_p): Likewise.
7005 (delete_lwp_callback): Likewise.
7006 (count_events_callback): Likewise.
7007 (select_event_lwp_callback): Likewise.
7008 (linux_set_resume_request): Likewise.
7009 * server.c (accumulate_file_name_length): Likewise.
7010 (emit_dll_description): Likewise.
7011 (handle_qxfer_threads_worker): Likewise.
7012 (visit_actioned_threads): Likewise.
7013 * thread-db.c (any_thread_of): Likewise.
7014 * tracepoint.c (same_process_p): Likewise.
7015 (match_blocktype): Likewise.
7016 (build_traceframe_info_xml): Likewise.
7017
224c3ddb
SM
70182015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7019
7020 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7021 assignment.
7022 (gdb_unparse_agent_expr): Likewise.
7023 * hostio.c (require_data): Likewise.
7024 (handle_pread): Likewise.
7025 * linux-low.c (disable_regset): Likewise.
7026 (fetch_register): Likewise.
7027 (store_register): Likewise.
7028 (get_dynamic): Likewise.
7029 (linux_qxfer_libraries_svr4): Likewise.
7030 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7031 (set_fast_tracepoint_jump): Likewise.
7032 (uninsert_fast_tracepoint_jumps_at): Likewise.
7033 (reinsert_fast_tracepoint_jumps_at): Likewise.
7034 (validate_inserted_breakpoint): Likewise.
7035 (clone_agent_expr): Likewise.
7036 * regcache.c (init_register_cache): Likewise.
7037 * remote-utils.c (putpkt_binary_1): Likewise.
7038 (decode_M_packet): Likewise.
7039 (decode_X_packet): Likewise.
7040 (look_up_one_symbol): Likewise.
7041 (relocate_instruction): Likewise.
7042 (monitor_output): Likewise.
7043 * server.c (handle_search_memory): Likewise.
7044 (handle_qxfer_exec_file): Likewise.
7045 (handle_qxfer_libraries): Likewise.
7046 (handle_qxfer): Likewise.
7047 (handle_query): Likewise.
7048 (handle_v_cont): Likewise.
7049 (handle_v_run): Likewise.
7050 (captured_main): Likewise.
7051 * target.c (write_inferior_memory): Likewise.
7052 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7053 * tracepoint.c (init_trace_buffer): Likewise.
7054 (add_tracepoint_action): Likewise.
7055 (add_traceframe): Likewise.
7056 (add_traceframe_block): Likewise.
7057 (cmd_qtdpsrc): Likewise.
7058 (cmd_qtdv): Likewise.
7059 (cmd_qtstatus): Likewise.
7060 (response_source): Likewise.
7061 (response_tsv): Likewise.
7062 (cmd_qtnotes): Likewise.
7063 (gdb_collect): Likewise.
7064 (initialize_tracepoint): Likewise.
7065
afbe19f8
PL
70662015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7067
7068 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7069 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7070 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7071 <NOP>: New.
7072 (enum aarch64_condition_codes): New enum.
7073 (w0): New static global.
7074 (fp): Likewise.
7075 (lr): Likewise.
7076 (struct aarch64_memory_operand) <type>: New
7077 MEMORY_OPERAND_POSTINDEX type.
7078 (postindex_memory_operand): New helper function.
7079 (emit_ret): New function.
7080 (emit_load_store_pair): New function, factored out of emit_stp
7081 with support for MEMORY_OPERAND_POSTINDEX.
7082 (emit_stp): Rewrite using emit_load_store_pair.
7083 (emit_ldp): New function.
7084 (emit_load_store): Likewise.
7085 (emit_ldr): Mention post-index instruction in comment.
7086 (emit_ldrh): New function.
7087 (emit_ldrb): New function.
7088 (emit_ldrsw): Mention post-index instruction in comment.
7089 (emit_str): Likewise.
7090 (emit_subs): New function.
7091 (emit_cmp): Likewise.
7092 (emit_and): Likewise.
7093 (emit_orr): Likewise.
7094 (emit_orn): Likewise.
7095 (emit_eor): Likewise.
7096 (emit_mvn): Likewise.
7097 (emit_lslv): Likewise.
7098 (emit_lsrv): Likewise.
7099 (emit_asrv): Likewise.
7100 (emit_mul): Likewise.
7101 (emit_sbfm): Likewise.
7102 (emit_sbfx): Likewise.
7103 (emit_ubfm): Likewise.
7104 (emit_ubfx): Likewise.
7105 (emit_csinc): Likewise.
7106 (emit_cset): Likewise.
7107 (emit_nop): Likewise.
7108 (emit_ops_insns): New helper function.
7109 (emit_pop): Likewise.
7110 (emit_push): Likewise.
7111 (aarch64_emit_prologue): New function.
7112 (aarch64_emit_epilogue): Likewise.
7113 (aarch64_emit_add): Likewise.
7114 (aarch64_emit_sub): Likewise.
7115 (aarch64_emit_mul): Likewise.
7116 (aarch64_emit_lsh): Likewise.
7117 (aarch64_emit_rsh_signed): Likewise.
7118 (aarch64_emit_rsh_unsigned): Likewise.
7119 (aarch64_emit_ext): Likewise.
7120 (aarch64_emit_log_not): Likewise.
7121 (aarch64_emit_bit_and): Likewise.
7122 (aarch64_emit_bit_or): Likewise.
7123 (aarch64_emit_bit_xor): Likewise.
7124 (aarch64_emit_bit_not): Likewise.
7125 (aarch64_emit_equal): Likewise.
7126 (aarch64_emit_less_signed): Likewise.
7127 (aarch64_emit_less_unsigned): Likewise.
7128 (aarch64_emit_ref): Likewise.
7129 (aarch64_emit_if_goto): Likewise.
7130 (aarch64_emit_goto): Likewise.
7131 (aarch64_write_goto_address): Likewise.
7132 (aarch64_emit_const): Likewise.
7133 (aarch64_emit_call): Likewise.
7134 (aarch64_emit_reg): Likewise.
7135 (aarch64_emit_pop): Likewise.
7136 (aarch64_emit_stack_flush): Likewise.
7137 (aarch64_emit_zero_ext): Likewise.
7138 (aarch64_emit_swap): Likewise.
7139 (aarch64_emit_stack_adjust): Likewise.
7140 (aarch64_emit_int_call_1): Likewise.
7141 (aarch64_emit_void_call_2): Likewise.
7142 (aarch64_emit_eq_goto): Likewise.
7143 (aarch64_emit_ne_goto): Likewise.
7144 (aarch64_emit_lt_goto): Likewise.
7145 (aarch64_emit_le_goto): Likewise.
7146 (aarch64_emit_gt_goto): Likewise.
7147 (aarch64_emit_ge_got): Likewise.
7148 (aarch64_emit_ops_impl): New static global variable.
7149 (aarch64_emit_ops): New target function, return
7150 &aarch64_emit_ops_impl.
7151 (struct linux_target_ops): Install it.
7152
bb903df0
PL
71532015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7154
7155 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7156 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7157 aarch64-ipa.o.
7158 * linux-aarch64-ipa.c: New file.
7159 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7160 and endian.h.
7161 (aarch64_get_thread_area): New target method.
7162 (extract_signed_bitfield): New helper function.
7163 (aarch64_decode_ldr_literal): New function.
7164 (enum aarch64_opcodes): New enum.
7165 (struct aarch64_register): New struct.
7166 (struct aarch64_operand): New struct.
7167 (x0): New static global.
7168 (x1): Likewise.
7169 (x2): Likewise.
7170 (x3): Likewise.
7171 (x4): Likewise.
7172 (w2): Likewise.
7173 (ip0): Likewise.
7174 (sp): Likewise.
7175 (xzr): Likewise.
7176 (aarch64_register): New helper function.
7177 (register_operand): Likewise.
7178 (immediate_operand): Likewise.
7179 (struct aarch64_memory_operand): New struct.
7180 (offset_memory_operand): New helper function.
7181 (preindex_memory_operand): Likewise.
7182 (enum aarch64_system_control_registers): New enum.
7183 (ENCODE): New macro.
7184 (emit_insn): New helper function.
7185 (emit_b): New function.
7186 (emit_bcond): Likewise.
7187 (emit_cb): Likewise.
7188 (emit_tb): Likewise.
7189 (emit_blr): Likewise.
7190 (emit_stp): Likewise.
7191 (emit_ldp_q_offset): Likewise.
7192 (emit_stp_q_offset): Likewise.
7193 (emit_load_store): Likewise.
7194 (emit_ldr): Likewise.
7195 (emit_ldrsw): Likewise.
7196 (emit_str): Likewise.
7197 (emit_ldaxr): Likewise.
7198 (emit_stxr): Likewise.
7199 (emit_stlr): Likewise.
7200 (emit_data_processing_reg): Likewise.
7201 (emit_data_processing): Likewise.
7202 (emit_add): Likewise.
7203 (emit_sub): Likewise.
7204 (emit_mov): Likewise.
7205 (emit_movk): Likewise.
7206 (emit_mov_addr): Likewise.
7207 (emit_mrs): Likewise.
7208 (emit_msr): Likewise.
7209 (emit_sevl): Likewise.
7210 (emit_wfe): Likewise.
7211 (append_insns): Likewise.
7212 (can_encode_int32_in): New helper function.
7213 (aarch64_relocate_instruction): New function.
7214 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7215 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7216 (struct linux_target_ops): Install aarch64_get_thread_area,
7217 aarch64_install_fast_tracepoint_jump_pad and
7218 aarch64_get_min_fast_tracepoint_insn_len.
7219
787749ea
PL
72202015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7221
7222 * Makefile.in (aarch64-insn.o): New rule.
7223 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7224
9812b2e6
YQ
72252015-09-21 Yao Qi <yao.qi@linaro.org>
7226
7227 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7228
18fe412b
YQ
72292015-09-21 Yao Qi <yao.qi@linaro.org>
7230
7231 * tracepoint.c (max_jump_pad_size): Remove.
7232
a0cc84cd
YQ
72332015-09-18 Yao Qi <yao.qi@linaro.org>
7234
7235 * linux-aarch64-low.c: Don't include sys/uio.h.
7236 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7237
d78908cf
WW
72382015-09-16 Wei-cheng Wang <cole945@gmail.com>
7239
7240 * tracepoint.c (eval_result_type): Change prototype.
7241 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7242
d57e0d50
PA
72432015-09-15 Pedro Alves <palves@redhat.com>
7244
7245 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7246 Check whether to report exec events instead of checking whether
7247 multiprocess is enabled.
7248
5a676acc
PA
72492015-09-15 Pedro Alves <palves@redhat.com>
7250
7251 PR remote/18965
7252 * remote-utils.c (prepare_resume_reply): Merge
7253 TARGET_WAITKIND_VFORK_DONE switch case with the
7254 TARGET_WAITKIND_FORKED case.
7255
7c5d0fad
YQ
72562015-09-15 Yao Qi <yao.qi@linaro.org>
7257
7258 * server.c (handle_query): Check string comparison using
7259 "else if" instead of "if".
7260
750ce8d1
YQ
72612015-09-15 Yao Qi <yao.qi@linaro.org>
7262
7263 * server.c (vCont_supported): New global variable.
7264 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7265 matches. Append ";vContSupported+" to own_buf.
7266 (handle_v_requests): Append ";s;S" to own_buf if target supports
7267 hardware single step or vCont_supported is false.
7268 (capture_main): Set vCont_supported to zero.
7269
70b90b91
YQ
72702015-09-15 Yao Qi <yao.qi@linaro.org>
7271
7272 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7273 it to ...
7274 (linux_supports_hardware_single_step): ... New function.
7275 (linux_target_ops): Update.
7276 * lynx-low.c (lynx_target_ops): Set field
7277 supports_hardware_single_step to target_can_do_hardware_single_step.
7278 * nto-low.c (nto_target_ops): Likewise.
7279 * spu-low.c (spu_target_ops): Likewise.
7280 * win32-low.c (win32_target_ops): Likewise.
7281 * target.c (target_can_do_hardware_single_step): New function.
7282 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7283 Remove. <supports_hardware_single_step>: New field.
7284 (target_supports_conditional_breakpoints): Remove.
7285 (target_supports_hardware_single_step): New macro.
7286 (target_can_do_hardware_single_step): Declare.
7287 * server.c (handle_query): Use target_supports_hardware_single_step
7288 instead of target_supports_conditional_breakpoints.
7289
ade90bde
YQ
72902015-09-15 Yao Qi <yao.qi@linaro.org>
7291
7292 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7293 function.
7294 (struct linux_target_ops the_low_target): Install
7295 aarch64_linux_siginfo_fixup.
7296
94585166
DB
72972015-09-11 Don Breazeal <donb@codesourcery.com>
7298 Luis Machado <lgustavo@codesourcery.com>
7299
7300 * linux-low.c (linux_mourn): Static declaration.
7301 (linux_arch_setup): Move in front of
7302 handle_extended_wait.
7303 (linux_arch_setup_thread): New function.
7304 (handle_extended_wait): Handle exec events. Call
7305 linux_arch_setup_thread. Make event_lwp argument a
7306 pointer-to-a-pointer.
7307 (check_zombie_leaders): Do not check stopped threads.
7308 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7309 (linux_low_filter_event): Add lwp and thread for exec'ing
7310 non-leader thread if leader thread has been deleted.
7311 Refactor code into linux_arch_setup_thread and call it.
7312 Pass child lwp pointer by reference to handle_extended_wait.
7313 (linux_wait_for_event_filtered): Update comment.
7314 (linux_wait_1): Prevent clobbering exec event status.
7315 (linux_supports_exec_events): New function.
7316 (linux_target_ops) <supports_exec_events>: Initialize new member.
7317 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7318 new member.
7319 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7320 * server.c (report_exec_events): New global variable.
7321 (handle_query): Handle qSupported query for exec-events feature.
7322 (captured_main): Initialize report_exec_events.
7323 * server.h (report_exec_events): Declare new global variable.
7324 * target.h (struct target_ops) <supports_exec_events>: New
7325 member.
7326 (target_supports_exec_events): New macro.
7327 * win32-low.c (win32_target_ops) <supports_exec_events>:
7328 Initialize new member.
7329
0568462b
MM
73302015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7331
7332 * linux-low.c (linux_low_enable_btrace): Remove.
7333 (linux_target_ops): Replace linux_low_enable_btrace with
7334 linux_enable_btrace.
7335
39edd165
YQ
73362015-09-03 Yao Qi <yao.qi@linaro.org>
7337
7338 * linux-aarch64-low.c (aarch64_insert_point): Call
7339 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7340 returns true.
7341
1db33b5a
UW
73422015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7343
7344 * linux-low.c (check_stopped_by_breakpoint): Use
7345 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7346
ab290430
PA
73472015-08-27 Pedro Alves <palves@redhat.com>
7348
7349 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7350
8d749320
SM
73512015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7352
6711b7f8
SM
7353 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7354 the XNEW-family equivalent.
8d749320
SM
7355 (compile_bytecodes): Likewise.
7356 * dll.c (loaded_dll): Likewise.
7357 * event-loop.c (append_callback_event): Likewise.
7358 (create_file_handler): Likewise.
7359 (create_file_event): Likewise.
7360 * hostio.c (handle_open): Likewise.
7361 * inferiors.c (add_thread): Likewise.
7362 (add_process): Likewise.
7363 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7364 * linux-arm-low.c (arm_new_process): Likewise.
7365 (arm_new_thread): Likewise.
7366 * linux-low.c (add_to_pid_list): Likewise.
7367 (linux_add_process): Likewise.
7368 (handle_extended_wait): Likewise.
7369 (add_lwp): Likewise.
7370 (enqueue_one_deferred_signal): Likewise.
7371 (enqueue_pending_signal): Likewise.
7372 (linux_resume_one_lwp_throw): Likewise.
7373 (linux_resume_one_thread): Likewise.
7374 (linux_read_memory): Likewise.
7375 (linux_write_memory): Likewise.
7376 * linux-mips-low.c (mips_linux_new_process): Likewise.
7377 (mips_linux_new_thread): Likewise.
7378 (mips_add_watchpoint): Likewise.
7379 * linux-x86-low.c (initialize_low_arch): Likewise.
7380 * lynx-low.c (lynx_add_process): Likewise.
7381 * mem-break.c (set_raw_breakpoint_at): Likewise.
7382 (set_breakpoint): Likewise.
7383 (add_condition_to_breakpoint): Likewise.
7384 (add_commands_to_breakpoint): Likewise.
7385 (clone_agent_expr): Likewise.
7386 (clone_one_breakpoint): Likewise.
7387 * regcache.c (new_register_cache): Likewise.
7388 * remote-utils.c (look_up_one_symbol): Likewise.
7389 * server.c (queue_stop_reply): Likewise.
7390 (start_inferior): Likewise.
7391 (queue_stop_reply_callback): Likewise.
7392 (handle_target_event): Likewise.
7393 * spu-low.c (fetch_ppc_memory): Likewise.
7394 (store_ppc_memory): Likewise.
7395 * target.c (set_target_ops): Likewise.
7396 * thread-db.c (thread_db_load_search): Likewise.
7397 (try_thread_db_load_1): Likewise.
7398 * tracepoint.c (add_tracepoint): Likewise.
7399 (add_tracepoint_action): Likewise.
7400 (create_trace_state_variable): Likewise.
7401 (cmd_qtdpsrc): Likewise.
7402 (cmd_qtro): Likewise.
7403 (add_while_stepping_state): Likewise.
7404 * win32-low.c (child_add_thread): Likewise.
7405 (get_image_name): Likewise.
7406
ed8b7b42
YQ
74072015-08-25 Yao Qi <yao.qi@linaro.org>
7408
7409 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7410
db3cb7cb
YQ
74112015-08-25 Yao Qi <yao.qi@linaro.org>
7412
7413 * Makefile.in (aarch64-linux.o): New rule.
7414 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7415 srv_tgtobj.
7416 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7417 (aarch64_init_debug_reg_state): Make it extern.
7418 (aarch64_linux_prepare_to_resume): Remove.
7419
f6011a1c
YQ
74202015-08-25 Yao Qi <yao.qi@linaro.org>
7421
7422 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7423 lwp_arch_private_info and ptid_of_lwp.
7424
88e2cf7e
YQ
74252015-08-25 Yao Qi <yao.qi@linaro.org>
7426
7427 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7428 Find proc_info by find_process_pid. All callers updated.
7429
5e35436e
YQ
74302015-08-25 Yao Qi <yao.qi@linaro.org>
7431
7432 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7433 Remove.
7434 (debug_reg_change_callback): Remove.
7435 (aarch64_notify_debug_reg_change): Remove.
7436
4a8a7965
YQ
74372015-08-25 Yao Qi <yao.qi@linaro.org>
7438
7439 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7440 Call current_lwp_ptid.
7441
32a271ee
YQ
74422015-08-25 Yao Qi <yao.qi@linaro.org>
7443
7444 * linux-aarch64-low.c (debug_reg_change_callback): Use
7445 debug_printf.
7446
0d51c8d7
YQ
74472015-08-25 Yao Qi <yao.qi@linaro.org>
7448
7449 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7450
31a43dd5
YQ
74512015-08-25 Yao Qi <yao.qi@linaro.org>
7452
7453 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7454
8ee52567
YQ
74552015-08-25 Yao Qi <yao.qi@linaro.org>
7456
7457 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7458 the code.
7459
ff3f0f45
YQ
74602015-08-25 Yao Qi <yao.qi@linaro.org>
7461
7462 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7463 Remove.
7464 (debug_reg_change_callback): Remove argument entry and add argument
7465 lwp. Remove local variable thread. Don't print thread id in the
7466 debugging output. Don't check whether pid of thread equals to pid.
7467 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7468 iterate_over_lwps instead find_inferior.
7469
3d40fbb5
PA
74702015-08-24 Pedro Alves <palves@redhat.com>
7471
7472 * inferiors.c (get_first_process): New function.
7473 * inferiors.h (get_first_process): New declaration.
7474 * remote-utils.c (read_ptid): Default to the first process in the
7475 list, instead of to the current thread's process.
7476
438e1e42
PA
74772015-08-24 Pedro Alves <palves@redhat.com>
7478
7479 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7480 * event-loop.c: Likewise.
7481 * remote-utils.c: Likewise.
7482 * tracepoint.c: Likewise.
7483
a8c6d4fc
PA
74842015-08-24 Pedro Alves <palves@redhat.com>
7485
7486 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7487 ptid_get_lwp.
7488
99b0bb12
PA
74892015-08-21 Pedro Alves <palves@redhat.com>
7490
7491 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7492 instead of literal 1.
7493
f8904751
PA
74942015-08-21 Pedro Alves <palves@redhat.com>
7495
7496 * tdesc.c (default_description): Explicitly zero-initialize.
7497
465a859e
PA
74982015-08-21 Pedro Alves <palves@redhat.com>
7499
7500 PR gdb/18749
7501 * inferiors.c (remove_thread): Discard any pending stop reply for
7502 this thread.
7503 * server.c (remove_all_on_match_pid): Rename to ...
7504 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7505 instead of a pid.
7506 (discard_queued_stop_replies): Change parameter to a ptid. Now
7507 extern.
7508 (handle_v_kill, kill_inferior_callback, captured_main)
7509 (process_serial_event): Adjust.
7510 * server.h (discard_queued_stop_replies): Declare.
7511
f0db101d
PA
75122015-08-21 Pedro Alves <palves@redhat.com>
7513
7514 * linux-low.c (wait_for_sigstop): Always switch to no thread
7515 selected if the previously current thread dies.
7516 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7517 process instead of the current thread's.
7518 * remote-utils.c (input_interrupt): Don't check if there's no
7519 current thread.
7520 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7521 current thread to the general thread fails, error out.
7522 (handle_qxfer_auxv, handle_qxfer_libraries)
7523 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7524 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7525 (handle_query): Check if there's a thread selected instead of
7526 checking whether there's any thread in the thread list.
7527 (handle_qxfer_threads, handle_qxfer_btrace)
7528 (handle_qxfer_btrace_conf): Don't error out early if there's no
7529 thread in the thread list.
7530 (handle_v_cont, myresume): Don't set the current thread to the
7531 continue thread.
7532 (process_serial_event) <Hg handling>: Also set thread_id if the
7533 previous general thread is still alive.
7534 (process_serial_event) <g/G handling>: If setting the current
7535 thread to the general thread fails, error out.
7536 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7537 thread's lwp instead of the current thread's.
7538 * target.c (set_desired_thread): If the desired thread was not
7539 found, leave the current thread pointing to NULL. Return an int
7540 (boolean) indicating success.
7541 * target.h (set_desired_thread): Change return type to int.
7542
40045d91
MF
75432015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7544
7545 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7546 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7547 #includes.
7548 (ps_get_thread_area): New function.
7549
45face3b
GB
75502015-08-19 Gary Benson <gbenson@redhat.com>
7551
7552 * hostio.c (handle_pread): Do not attempt to read more data
7553 than hostio_reply_with_data can fit in a packet.
7554
16d5f642
JB
75552015-08-18 Joel Brobecker <brobecker@adacore.com>
7556
7557 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7558
a738da3a
MF
75592015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7560
7561 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7562
33ebda9d
PA
75632015-08-06 Pedro Alves <palves@redhat.com>
7564
7565 * tracepoint.c (expr_eval_result): Now an int.
7566
a44892be
PA
75672015-08-06 Pedro Alves <palves@redhat.com>
7568
7569 * gdbthread.h (struct regcache): Forward declare.
7570 (struct thread_info) <regcache_data>: Now a struct regcache
7571 pointer.
7572 * inferiors.c (inferior_regcache_data)
7573 (set_inferior_regcache_data): Now work with struct regcache
7574 pointers.
7575 * inferiors.h (struct regcache): Forward declare.
7576 (inferior_regcache_data, set_inferior_regcache_data): Now work
7577 with struct regcache pointers.
7578 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7579 (free_register_cache_thread): Remove struct regcache pointer
7580 casts.
7581
608a1e46
PA
75822015-08-06 Pedro Alves <palves@redhat.com>
7583
7584 * server.c (captured_main): On error, print the exception message
7585 to stderr, and if run_once is set, throw a quit.
7586
f0ce0d3a
PA
75872015-08-06 Pedro Alves <palves@redhat.com>
7588
7589 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7590 the current thread.
7591
bf47e248
PA
75922015-08-06 Pedro Alves <palves@redhat.com>
7593
7594 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7595 reading beyond the passed in buffer length.
7596
b6b9ffcc
PL
75972015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7598
7599 * tracepoint.c (symbol_list) <required>: Remove.
7600
863d01bd
PA
76012015-08-06 Pedro Alves <palves@redhat.com>
7602
7603 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7604 count if stopping and suspending threads.
7605 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7606 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7607 (linux_detach): Complete an ongoing step-over.
7608 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7609 throughout.
7610 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7611 (linux_wait_1): If passing a signal to the inferior after
7612 finishing a step-over, unsuspend and re-resume all lwps. If we
7613 see a single-step event but the thread should be continuing, don't
7614 pass the trap to gdb.
7615 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7616 internal_error instead of gdb_assert.
7617 (enqueue_pending_signal): New function.
7618 (check_ptrace_stopped_lwp_gone): Add debug output.
7619 (start_step_over): Use internal_error instead of gdb_assert.
7620 (complete_ongoing_step_over): New function.
7621 (linux_resume_one_thread): Don't resume a suspended thread.
7622 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7623 it stepping.
7624
00db26fa
PA
76252015-08-06 Pedro Alves <palves@redhat.com>
7626
7627 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7628 (linux_thread_alive): Use lwp_is_marked_dead.
7629 (extended_event_reported): Delete.
7630 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7631 instead of extended_event_reported.
7632 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7633 as well.
7634 (lwp_is_marked_dead): New function.
7635 (lwp_running): Use lwp_is_marked_dead.
7636 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7637 comment.
7638
ad071a30
PA
76392015-08-06 Pedro Alves <palves@redhat.com>
7640
7641 * linux-low.c (linux_wait_1): Move fork event output out of the
7642 !report_to_gdb check. Pass event_child->waitstatus to
7643 target_waitstatus_to_string instead of ourstatus.
7644
524b57e6
YQ
76452015-08-04 Yao Qi <yao.qi@linaro.org>
7646
7647 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7648 if current_thread is 32 bit.
7649
6085d6f6
YQ
76502015-08-04 Yao Qi <yao.qi@linaro.org>
7651
7652 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7653 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7654 * server.c (extended_protocol): Remove "static".
7655 * server.h (extended_protocol): Declare it.
7656
8a7e4587
YQ
76572015-08-04 Yao Qi <yao.qi@linaro.org>
7658
7659 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7660 both aarch64 and aarch32.
7661 (aarch64_set_pc): Likewise.
7662
3b53ae99
YQ
76632015-08-04 Yao Qi <yao.qi@linaro.org>
7664
7665 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7666 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7667 arm-with-neon.xml to srv_xmlfiles.
7668 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7669 (is_64bit_tdesc): New function.
7670 (aarch64_linux_read_description): New function.
7671 (aarch64_arch_setup): Call aarch64_linux_read_description.
7672 (regs_info): Rename to regs_info_aarch64.
7673 (aarch64_regs_info): Return right regs_info.
7674 (initialize_low_arch): Call initialize_low_arch_aarch32.
7675
bd9e6534
YQ
76762015-08-04 Yao Qi <yao.qi@linaro.org>
7677
7678 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7679 * linux-aarch32-low.c: New file.
7680 * linux-aarch32-low.h: New file.
7681 * linux-arm-low.c (arm_fill_gregset): Move it to
7682 linux-aarch32-low.c.
7683 (arm_store_gregset): Likewise.
7684 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7685 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7686 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7687 (regs_info): Rename to regs_info_arm.
7688 (arm_regs_info): Return regs_info_aarch32 if
7689 have_ptrace_getregset is 1 and target description is
7690 arm_with_neon or arm_with_vfpv3.
7691 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7692 Call initialize_low_arch_aarch32 instead.
7693
ded48a5e
YQ
76942015-08-04 Yao Qi <yao.qi@linaro.org>
7695
7696 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7697 * linux-low.c: ... here.
7698 * linux-low.h (have_ptrace_getregset): Declare it.
7699
96e9210f
PA
77002015-08-04 Pedro Alves <palves@redhat.com>
7701
7702 * thread-db.c (struct thread_db): Use new typedefs.
7703 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7704 CHK calls.
7705 (disable_thread_event_reporting): Cast result of dlsym to
7706 destination function pointer type.
7707 (thread_db_mourn): Use td_ta_delete_ftype.
7708
af60a1ef
SL
77092015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7710
7711 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7712 arch variant.
7713 (CDX_BREAKPOINT): Define for R2.
7714 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7715 (the_low_target): Add comments.
7716
e8b41681
YQ
77172015-07-30 Yao Qi <yao.qi@linaro.org>
7718
7719 * linux-arm-low.c (arm_hwcap): Remove it.
7720 (arm_read_description): New local variable arm_hwcap. Don't
7721 set arm_hwcap to zero.
7722
89abb039
YQ
77232015-07-30 Yao Qi <yao.qi@linaro.org>
7724
7725 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7726 Use regcache->tdesc instead.
7727 (arm_store_wmmxregset): Likewise.
7728 (arm_fill_vfpregset): Likewise.
7729 (arm_store_vfpregset): Likewise.
7730
deca266c
YQ
77312015-07-30 Yao Qi <yao.qi@linaro.org>
7732
7733 * linux-arm-low.c: Include arch/arm.h.
7734 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7735 (arm_store_gregset): Likewise.
7736
aa58a496
SM
77372015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7738
7739 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7740 ptrace's 4th parameter.
7741
50904b25
YQ
77422015-07-27 Yao Qi <yao.qi@linaro.org>
7743
7744 * configure.srv (case aarch64*-*-linux*): Don't set
7745 srv_linux_usrregs.
7746
5826e159
PA
77472015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7748
7749 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7750 sys/ptrace.h.
7751 * linux-arm-low.c: Likewise.
7752 * linux-cris-low.c: Likewise.
7753 * linux-crisv32-low.c: Likewise.
7754 * linux-low.c: Likewise.
7755 * linux-m68k-low.c: Likewise.
7756 * linux-mips-low.c: Likewise.
7757 * linux-nios2-low.c: Likewise.
7758 * linux-s390-low.c: Likewise.
7759 * linux-sparc-low.c: Likewise.
7760 * linux-tic6x-low.c: Likewise.
7761 * linux-tile-low.c: Likewise.
7762 * linux-x86-low.c: Likewise.
7763
54019719
PA
77642015-07-24 Pedro Alves <palves@redhat.com>
7765
7766 * config.in: Regenerate.
7767 * configure: Regenerate.
7768
eb7aa561
PA
77692015-07-24 Pedro Alves <palves@redhat.com>
7770
7771 * acinclude.m4: Include ../ptrace.m4.
7772 * configure.ac: Call GDB_AC_PTRACE.
7773 * config.in, configure: Regenerate.
7774
55d7b841
YQ
77752015-07-24 Yao Qi <yao.qi@linaro.org>
7776
7777 * linux-low.c (linux_create_inferior): Remove setting to
7778 proc->priv->new_inferior.
7779 (linux_attach): Likewise.
7780 (linux_low_filter_event): Likewise.
7781 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7782
c06cbd92
YQ
77832015-07-24 Yao Qi <yao.qi@linaro.org>
7784
7785 * linux-low.c (linux_arch_setup): New function.
7786 (linux_low_filter_event): If proc->tdesc is NULL and
7787 proc->attached is true, call the_low_target.arch_setup.
7788 Otherwise, keep status pending, and return.
7789 (linux_resume_one_lwp_throw): Don't call get_pc if
7790 thread->while_stepping isn't NULL. Don't call
7791 get_thread_regcache if proc->tdesc is NULL.
7792 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7793 (linux_target_ops): Install arch_setup.
7794 * server.c (start_inferior): Call the_target->arch_setup.
7795 * target.h (struct target_ops) <arch_setup>: New field.
7796 (target_arch_setup): New marco.
7797 * lynx-low.c (lynx_target_ops): Update.
7798 * nto-low.c (nto_target_ops): Update.
7799 * spu-low.c (spu_target_ops): Update.
7800 * win32-low.c (win32_target_ops): Update.
7801
5ae3ebba
YQ
78022015-07-24 Yao Qi <yao.qi@linaro.org>
7803
7804 * linux-low.c (linux_add_process): Don't set
7805 proc->priv->new_inferior.
7806 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7807 (linux_attach): Likewise.
7808
eb97750b
YQ
78092015-07-24 Yao Qi <yao.qi@linaro.org>
7810
7811 * server.c (start_inferior): Code refactor.
7812
51aee833
YQ
78132015-07-24 Yao Qi <yao.qi@linaro.org>
7814
7815 * server.c (process_serial_event): Set general_thread.
7816
af1b22f3
YQ
78172015-07-21 Yao Qi <yao.qi@linaro.org>
7818
7819 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7820 aarch64_linux_get_debug_reg_capacity.
7821
554717a3
YQ
78222015-07-17 Yao Qi <yao.qi@linaro.org>
7823
7824 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7825 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7826 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7827 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7828 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7829 (AARCH64_HWP_ALIGNMENT): Likewise.
7830 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7831 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7832 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7833 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7834 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7835 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7836 (struct aarch64_debug_reg_state): Likewise.
7837 (struct arch_lwp_info): Likewise.
7838 (aarch64_align_watchpoint): Likewise.
7839 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7840 (aarch64_watchpoint_length): Likewise.
7841 (aarch64_point_encode_ctrl_reg): Likewise
7842 (aarch64_point_is_aligned): Likewise.
7843 (aarch64_align_watchpoint): Likewise.
7844 (aarch64_linux_set_debug_regs):
7845 (aarch64_dr_state_insert_one_point): Likewise.
7846 (aarch64_dr_state_remove_one_point): Likewise.
7847 (aarch64_handle_breakpoint): Likewise.
7848 (aarch64_handle_aligned_watchpoint): Likewise.
7849 (aarch64_handle_unaligned_watchpoint): Likewise.
7850 (aarch64_handle_watchpoint): Likewise.
7851
c67ca4de
YQ
78522015-07-17 Yao Qi <yao.qi@linaro.org>
7853
7854 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7855 and don't aarch64_get_debug_reg_state. All callers update.
7856 (aarch64_handle_aligned_watchpoint): Likewise.
7857 (aarch64_handle_unaligned_watchpoint): Likewise.
7858 (aarch64_handle_watchpoint): Likewise.
7859 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7860 (aarch64_remove_point): Likewise.
7861
25abf979
YQ
78622015-07-17 Yao Qi <yao.qi@linaro.org>
7863
7864 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7865 debug_printf.
7866 (aarch64_handle_unaligned_watchpoint): Likewise.
7867
db1ff28b
JK
78682015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7869
7870 Revert the previous 3 commits:
7871 Move gdb_regex* to common/
7872 Move linux_find_memory_regions_full & co.
7873 gdbserver build-id attribute generator
7874
700ca40f
JK
78752015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7876 Jan Kratochvil <jan.kratochvil@redhat.com>
7877
7878 gdbserver build-id attribute generator.
7879 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7880 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7881 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7882 (find_phdr): New.
7883 (get_dynamic): Use find_pdhr to traverse program headers.
7884 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7885 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7886 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7887 (get_hex_build_id): New.
7888 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7889 to reply XML document.
7890
9904185c
JK
78912015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7892 Jan Kratochvil <jan.kratochvil@redhat.com>
7893
7894 * target.c: Include target/target-utils.h and fcntl.h.
7895 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7896 (target_fileio_read_stralloc): New functions.
7897
6e5b4429
JK
78982015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7899
7900 * Makefile.in (OBS): Add gdb_regex.o.
7901 (gdb_regex.o): New.
7902 * config.in: Rebuilt.
7903 * configure: Rebuilt.
7904
ddc98fbf
JK
79052015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7906 Jan Kratochvil <jan.kratochvil@redhat.com>
7907
7908 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7909 * Makefile.in (OBS): Add target-utils.o.
7910 (linux-maps.o, target-utils.o): New.
7911 * configure.srv (srv_linux_obj): Add linux-maps.o.
7912
e57bb7a0
PL
79132015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7914
7915 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7916 function, return 1.
7917 (the_low_target): Install it.
7918
586b02a9
PA
79192015-07-14 Pedro Alves <palves@redhat.com>
7920
7921 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7922 Instead, ignore ECHILD, and throw an error for other errnos.
7923
58c1b36c
PA
79242015-07-10 Pedro Alves <palves@redhat.com>
7925
7926 * event-loop.c (struct callback_event) <data>: Change type to
7927 gdb_client_data instance instead of gdb_client_data pointer.
7928 (append_callback_event): Adjust.
7929
421530db
PL
79302015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7931
7932 * linux-aarch64-low.c: Add comments for each linux_target_ops
7933 method. Remove comments already covered in target_ops and
7934 linux_target_ops definitions.
7935 (the_low_target): Add comments for each unimplemented method.
7936
c2d65f38
YQ
79372015-07-09 Yao Qi <yao.qi@linaro.org>
7938
7939 * linux-aarch64-low.c (aarch64_regmap): Remove.
7940 (aarch64_usrregs_info): Remove.
7941 (regs_info): Set field usrregs to NULL.
7942
b20a6524
MM
79432015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7944
7945 * linux-low.c: Include "rsp-low.h"
7946 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7947 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7948 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7949 (handle_btrace_enable_pt): New.
7950 (handle_btrace_general_set): Support "pt".
7951 (handle_btrace_conf_general_set): Support "pt:size".
7952
96c97461
PL
79532015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7954
7955 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7956 Z_PACKET_SW_BP.
7957
37d66942
PL
79582015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7959
7960 * linux-aarch64-low.c: Remove comment about endianness.
7961 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7962 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7963 memcmp.
7964
dc06243f
GB
79652015-06-24 Gary Benson <gbenson@redhat.com>
7966
7967 * linux-i386-ipa.c (stdint.h): Do not include.
7968 * lynx-i386-low.c (stdint.h): Likewise.
7969 * lynx-ppc-low.c (stdint.h): Likewise.
7970 * mem-break.c (stdint.h): Likewise.
7971 * thread-db.c (stdint.h): Likewise.
7972 * tracepoint.c (stdint.h): Likewise.
7973 * win32-low.c (stdint.h): Likewise.
7974
124e13d9
SM
79752015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7976
7977 * server.c (write_qxfer_response): Update call to
7978 remote_escape_output.
7979
909c2cda
JK
79802015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7981 Jan Kratochvil <jan.kratochvil@redhat.com>
7982
7983 Merge multiple hex conversions.
7984 * gdbreplay.c (tohex): Rename to 'fromhex'.
7985 (logchar): Use fromhex.
7986
24c05f46
JK
79872015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7988
7989 * server.c (handle_qxfer_libraries): Set `version' attribute for
7990 <library-list>.
7991
14d2069a
GB
79922015-06-10 Gary Benson <gbenson@redhat.com>
7993
7994 * target.h (struct target_ops) <multifs_open>: New field.
7995 <multifs_unlink>: Likewise.
7996 <multifs_readlink>: Likewise.
7997 * linux-low.c (nat/linux-namespaces.h): New include.
7998 (linux_target_ops): Initialize the_target->multifs_open,
7999 the_target->multifs_unlink and the_target->multifs_readlink.
8000 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8001 * hostio.c (hostio_fs_pid): New static variable.
8002 (hostio_handle_new_gdb_connection): New function.
8003 (handle_setfs): Likewise.
8004 (handle_open): Use the_target->multifs_open as appropriate.
8005 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8006 (handle_readlink): Use the_target->multifs_readlink as
8007 appropriate.
8008 (handle_vFile): Handle vFile:setfs packets.
8009 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8010 after target_handle_new_gdb_connection.
8011
4b8b5e72
GB
80122015-06-10 Gary Benson <gbenson@redhat.com>
8013
8014 * configure.ac (AC_CHECK_FUNCS): Add setns.
8015 * config.in: Regenerate.
8016 * configure: Likewise.
8017 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8018 (linux-namespaces.o): New rule.
8019 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8020
3ac2e371
GB
80212015-06-09 Gary Benson <gbenson@redhat.com>
8022
8023 * hostio.c (handle_open): Process mode argument with
8024 fileio_to_host_mode.
8025
ca9b78ce
YQ
80262015-06-01 Yao Qi <yao.qi@linaro.org>
8027
8028 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8029 * linux-x86-low.c: Likewise.
8030
bfacd19d
DB
80312015-05-28 Don Breazeal <donb@codesourcery.com>
8032
8033 * linux-low.c (handle_extended_wait): Initialize
8034 thread_info.last_resume_kind for new fork children.
8035
452003ef
PA
80362015-05-15 Pedro Alves <palves@redhat.com>
8037
8038 * target.h (target_handle_new_gdb_connection): Rewrite using if
8039 wrapped in do/while.
8040
1041a03c
JB
80412015-05-14 Joel Brobecker <brobecker@adacore.com>
8042
8043 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8044 * configure, config.in: Regenerate.
8045 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8046 Declare typedef.
8047
c269dbdb
DB
80482015-05-12 Don Breazeal <donb@codesourcery.com>
8049
8050 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8051 PTRACE_EVENT_VFORK_DONE.
8052 (linux_low_ptrace_options, extended_event_reported): Add vfork
8053 events.
8054 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8055 and "vforkdone" for RSP 'T' Stop Reply Packet.
8056 * server.h (report_vfork_events): Declare
8057 global variable.
8058
3a8a0396
DB
80592015-05-12 Don Breazeal <donb@codesourcery.com>
8060
8061 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8062 (the_low_target) <new_fork>: Initialize new member.
8063 * linux-arm-low.c (arm_new_fork): New function.
8064 (the_low_target) <new_fork>: Initialize new member.
8065 * linux-low.c (handle_extended_wait): Call new target function
8066 new_fork.
8067 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8068 * linux-mips-low.c (mips_add_watchpoint): New function
8069 extracted from mips_insert_point.
8070 (the_low_target) <new_fork>: Initialize new member.
8071 (mips_linux_new_fork): New function.
8072 (mips_insert_point): Call mips_add_watchpoint.
8073 * linux-x86-low.c (x86_linux_new_fork): New function.
8074 (the_low_target) <new_fork>: Initialize new member.
8075
de0d863e
DB
80762015-05-12 Don Breazeal <donb@codesourcery.com>
8077
8078 * linux-low.c (handle_extended_wait): Implement return value,
8079 rename argument 'event_child' to 'event_lwp', handle
8080 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8081 (linux_low_ptrace_options): New function.
8082 (linux_low_filter_event): Call linux_low_ptrace_options,
8083 use different argument fo linux_enable_event_reporting,
8084 use return value from handle_extended_wait.
8085 (extended_event_reported): New function.
8086 (linux_wait_1): Call extended_event_reported and set
8087 status to report fork events.
8088 (linux_write_memory): Add pid to debug message.
8089 (reset_lwp_ptrace_options_callback): New function.
8090 (linux_handle_new_gdb_connection): New function.
8091 (linux_target_ops): Initialize new structure member.
8092 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8093 * lynx-low.c: Initialize new structure member.
8094 * remote-utils.c (prepare_resume_reply): Implement stop reason
8095 "fork" for "T" stop message.
8096 * server.c (handle_query): Call handle_new_gdb_connection.
8097 * server.h (report_fork_events): Declare global flag.
8098 * target.h (struct target_ops) <handle_new_gdb_connection>:
8099 New member.
8100 (target_handle_new_gdb_connection): New macro.
8101 * win32-low.c: Initialize new structure member.
8102
ddcbc397
DB
81032015-05-12 Don Breazeal <donb@codesourcery.com>
8104
8105 * mem-break.c (APPEND_TO_LIST): Define macro.
8106 (clone_agent_expr): New function.
8107 (clone_one_breakpoint): New function.
8108 (clone_all_breakpoints): New function.
8109 * mem-break.h: Declare new functions.
8110
89245bc0
DB
81112015-05-12 Don Breazeal <donb@codesourcery.com>
8112
8113 * linux-low.c (linux_supports_fork_events): New function.
8114 (linux_supports_vfork_events): New function.
8115 (linux_target_ops): Initialize new structure members.
8116 (initialize_low): Call linux_check_ptrace_features.
8117 * lynx-low.c (lynx_target_ops): Initialize new structure
8118 members.
8119 * server.c (report_fork_events, report_vfork_events):
8120 New global flags.
8121 (handle_query): Add new features to qSupported packet and
8122 response.
8123 (captured_main): Initialize new global variables.
8124 * target.h (struct target_ops) <supports_fork_events>:
8125 New member.
8126 <supports_vfork_events>: New member.
8127 (target_supports_fork_events): New macro.
8128 (target_supports_vfork_events): New macro.
8129 * win32-low.c (win32_target_ops): Initialize new structure
8130 members.
8131
835205d0
GB
81322015-05-12 Gary Benson <gbenson@redhat.com>
8133
8134 * server.c (handle_qxfer_exec_file): Use current process
8135 if annex is empty.
8136
21e94bd9
SL
81372015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8138
8139 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8140 Remove HAVE_PTRACE_GETREGS conditionals.
8141 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8142 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8143
45614f15
YQ
81442015-05-08 Yao Qi <yao.qi@linaro.org>
8145
8146 * linux-low.c (linux_supports_conditional_breakpoints): New
8147 function.
8148 (linux_target_ops): Install new target method.
8149 * lynx-low.c (lynx_target_ops): Install NULL hook for
8150 supports_conditional_breakpoints.
8151 * nto-low.c (nto_target_ops): Likewise.
8152 * spu-low.c (spu_target_ops): Likewise.
8153 * win32-low.c (win32_target_ops): Likewise.
8154 * server.c (handle_query): Check
8155 target_supports_conditional_breakpoints.
8156 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8157 New field.
8158 (target_supports_conditional_breakpoints): New macro.
8159
80ad801e
PA
81602015-05-06 Pedro Alves <palves@redhat.com>
8161
8162 PR server/18081
8163 * server.c (start_inferior): If the process exits, mourn it.
8164
819843c7
GB
81652015-04-21 Gary Benson <gbenson@redhat.com>
8166
8167 * hostio.c (fileio_open_flags_to_host): Factored out to
8168 fileio_to_host_openflags in common/fileio.c. Single use
8169 updated.
8170
a2d5a9d7
MF
81712015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8172
8173 * linux-xtensa-low.c (xtensa_fill_gregset)
8174 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8175 XCHAL_HAVE_LOOP.
8176
deb44829
MF
81772015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8178
8179 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8180 (regs_info): Replace usrregs pointer with NULL.
8181
e57f1de3
GB
81822015-04-17 Gary Benson <gbenson@redhat.com>
8183
8184 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8185 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8186 * server.c (handle_qxfer_exec_file): New function.
8187 (qxfer_packets): Add exec-file entry.
8188 (handle_query): Report qXfer:exec-file:read as supported packet.
8189
62828379
RN
81902015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8191
8192 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8193
b88bb450
GB
81942015-04-09 Gary Benson <gbenson@redhat.com>
8195
8196 * hostio-errno.c (errno_to_fileio_error): Remove function.
8197 Update caller to use remote_fileio_to_fio_error.
8198
c8f4bfdd
YQ
81992015-04-09 Yao Qi <yao.qi@linaro.org>
8200
8201 * linux-low.c (linux_insert_point): Call
8202 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8203 (linux_remove_point): Call remove_memory_breakpoint if type is
8204 raw_bkpt_type_sw.
8205 * linux-x86-low.c (x86_insert_point): Don't call
8206 insert_memory_breakpoint.
8207 (x86_remove_point): Don't call remove_memory_breakpoint.
8208
41f98f02
PA
82092015-04-01 Pedro Alves <palves@redhat.com>
8210 Cleber Rosa <crosa@redhat.com>
8211
8212 * server.c (gdbserver_usage): Reorganize and extend the usage
8213 message.
8214
2bf6fb9d
PA
82152015-03-24 Pedro Alves <palves@redhat.com>
8216
8217 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8218 output. Also dump TRAP_TRACE.
8219 (linux_low_filter_event): In debug output, distinguish a
8220 resume_stop SIGSTOP from a delayed SIGSTOP.
8221
369f6daa
GB
82222015-03-24 Gary Benson <gbenson@redhat.com>
8223
8224 * linux-x86-low.c (x86_linux_new_thread): Moved to
8225 nat/x86-linux.c.
8226 (x86_linux_prepare_to_resume): Likewise.
8227
8e5d4070
GB
82282015-03-24 Gary Benson <gbenson@redhat.com>
8229
8230 * Makefile.in (x86-linux-dregs.o): New rule.
8231 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8232 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8233 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8234 (x86_linux_dr_get): Likewise.
8235 (x86_linux_dr_set): Likewise.
8236 (update_debug_registers_callback): Likewise.
8237 (x86_linux_dr_set_addr): Likewise.
8238 (x86_linux_dr_get_addr): Likewise.
8239 (x86_linux_dr_set_control): Likewise.
8240 (x86_linux_dr_get_control): Likewise.
8241 (x86_linux_dr_get_status): Likewise.
8242 (x86_linux_update_debug_registers): Likewise.
8243
2b95d440
GB
82442015-03-24 Gary Benson <gbenson@redhat.com>
8245
8246 * linux-x86-low.c (x86_linux_update_debug_registers):
8247 New function, factored out from...
8248 (x86_linux_prepare_to_resume): ...this.
8249
14b0bc68
GB
82502015-03-24 Gary Benson <gbenson@redhat.com>
8251
8252 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8253 (x86_linux_dr_set): Likewise.
8254 (update_debug_registers_callback): Likewise.
8255 (x86_linux_dr_set_addr): Likewise.
8256 (x86_linux_dr_get_addr): Likewise.
8257 (x86_linux_dr_set_control): Likewise.
8258 (x86_linux_dr_get_control): Likewise.
8259 (x86_linux_dr_get_status): Likewise.
8260 (x86_linux_prepare_to_resume): Likewise.
8261
5dfe6ca8
GB
82622015-03-24 Gary Benson <gbenson@redhat.com>
8263
8264 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8265 Use perror_with_name. Pass string through gettext.
8266 (x86_linux_dr_set): Likewise.
8267
d33472ad
GB
82682015-03-24 Gary Benson <gbenson@redhat.com>
8269
8270 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8271 (x86_linux_dr_set_addr): ...this.
8272 (x86_dr_low_get_addr): Rename to...
8273 (x86_linux_dr_get_addr): ...this.
8274 (x86_dr_low_set_control): Rename to...
8275 (x86_linux_dr_set_control): ...this.
8276 (x86_dr_low_get_control): Rename to...
8277 (x86_linux_dr_get_control): ...this.
8278 (x86_dr_low_get_status): Rename to...
8279 (x86_linux_dr_get_status): ...this.
8280 (x86_dr_low): Update with new function names.
8281
4b134ca1
GB
82822015-03-24 Gary Benson <gbenson@redhat.com>
8283
8284 * Makefile.in (x86-linux.o): New rule.
8285 * configure.srv: Add x86-linux.o to relevant targets.
8286 * linux-low.c (lwp_set_arch_private_info): New function.
8287 (lwp_arch_private_info): Likewise.
8288 * linux-x86-low.c: Include nat/x86-linux.h.
8289 (arch_lwp_info): Removed structure.
8290 (update_debug_registers_callback):
8291 Use lwp_set_debug_registers_changed.
8292 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8293 and lwp_set_debug_registers_changed.
8294 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8295
34c703da
GB
82962015-03-24 Gary Benson <gbenson@redhat.com>
8297
8298 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8299 * linux-arm-low.c (arm_new_thread): Likewise.
8300 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8301 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8302 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8303 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8304
cff068da
GB
83052015-03-24 Gary Benson <gbenson@redhat.com>
8306
8307 * linux-low.c (ptid_of_lwp): New function.
8308 (lwp_is_stopped): Likewise.
8309 (lwp_stop_reason): Likewise.
8310 * linux-x86-low.c (update_debug_registers_callback):
8311 Use lwp_is_stopped.
8312 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8313 lwp_stop_reason.
8314
b2f7c7e8
GB
83152015-03-24 Gary Benson <gbenson@redhat.com>
8316
8317 * linux-low.h (linux_stop_lwp): Remove declaration.
8318
6d4ee8c6
GB
83192015-03-24 Gary Benson <gbenson@redhat.com>
8320
8321 * linux-low.h: Include nat/linux-nat.h.
8322 * linux-low.c (iterate_over_lwps_args): New structure.
8323 (iterate_over_lwps_filter): New function.
8324 (iterate_over_lwps): Likewise.
8325 * linux-x86-low.c (update_debug_registers_callback):
8326 Update signature to what iterate_over_lwps expects.
8327 Remove PID check that iterate_over_lwps now performs.
8328 (x86_dr_low_set_addr): Use iterate_over_lwps.
8329 (x86_dr_low_set_control): Likewise.
8330
70a0bb6b
GB
83312015-03-24 Gary Benson <gbenson@redhat.com>
8332
8333 * linux-x86-low.c (x86_debug_reg_state): New function.
8334 (x86_linux_prepare_to_resume): Use the above.
8335
7b669087
GB
83362015-03-24 Gary Benson <gbenson@redhat.com>
8337
8338 * linux-low.c (current_lwp_ptid): New function.
8339 * linux-x86-low.c: Include nat/linux-nat.h.
8340 (x86_dr_low_get_addr): Use current_lwp_ptid.
8341 (x86_dr_low_get_control): Likewise.
8342 (x86_dr_low_get_status): Likewise.
8343
eef49a3d
PA
83442015-03-20 Pedro Alves <palves@redhat.com>
8345
8346 * tracepoint.c (cmd_qtstatus): Make "str" const.
8347
b2333d22
PA
83482015-03-20 Pedro Alves <palves@redhat.com>
8349
8350 * server.c (handle_general_set): Make "req_str" const.
8351
23f238d3
PA
83522015-03-19 Pedro Alves <palves@redhat.com>
8353
8354 * linux-low.c (linux_resume_one_lwp): Rename to ...
8355 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8356 instead call perror_with_name.
8357 (check_ptrace_stopped_lwp_gone): New function.
8358 (linux_resume_one_lwp): Reimplement as wrapper around
8359 linux_resume_one_lwp_throw that swallows errors if the LWP is
8360 gone.
8361
91baf43f
PA
83622015-03-19 Pedro Alves <palves@redhat.com>
8363
8364 * linux-low.c (count_events_callback, select_event_lwp_callback):
8365 No longer check whether the thread has resume_stop as last resume
8366 kind.
8367
8bf3b159
PA
83682015-03-19 Pedro Alves <palves@redhat.com>
8369
8370 * linux-low.c (count_events_callback, select_event_lwp_callback):
8371 Use the lwp's status_pending_p field, not the thread's.
8372
b90fc188
PA
83732015-03-19 Pedro Alves <palves@redhat.com>
8374
8375 * linux-low.c (select_event_lwp_callback): Update comments to
8376 no longer mention SIGTRAP.
8377
464b0089
GB
83782015-03-18 Gary Benson <gbenson@redhat.com>
8379
8380 * server.c (handle_query): Do not report vFile:fstat as supported.
8381
aa9e327f
GB
83822015-03-11 Gary Benson <gbenson@redhat.com>
8383
8384 * hostio.c (sys/types.h): New include.
8385 (sys/stat.h): Likewise.
8386 (common-remote-fileio.h): Likewise.
8387 (handle_fstat): New function.
8388 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 8389
791c0056
GB
83902015-03-11 Gary Benson <gbenson@redhat.com>
8391
8392 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8393 struct stat.st_blocks and struct stat.st_blksize.
8394 * configure: Regenerate.
8395 * config.in: Likewise.
8396 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8397 (OBS): Add common-remote-fileio.o.
8398 (common-remote-fileio.o): New rule.
8399
9a9df970
PA
84002015-03-09 Pedro Alves <palves@redhat.com>
8401
8402 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8403 'struct sockaddr' pointer in 'accept' call.
8404
9eb1356e
PA
84052015-03-09 Pedro Alves <palves@redhat.com>
8406
8407 Revert:
8408 2015-03-07 Pedro Alves <palves@redhat.com>
8409 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8410 or <winsock2.h> here. Instead include "gdb_socket.h".
8411 (remote_open): Use union gdb_sockaddr_u.
8412 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8413 or <winsock2.h> here. Instead include "gdb_socket.h".
8414 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8415 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8416 or <sys/un.h>.
8417 (init_named_socket, gdb_agent_helper_thread): Use union
8418 gdb_sockaddr_u.
8419
aac331e4
PA
84202015-03-07 Pedro Alves <palves@redhat.com>
8421
8422 * configure.ac (build_warnings): Move
8423 -Wdeclaration-after-statement to the C-specific set.
8424 * configure: Regenerate.
8425
366c75fc
PA
84262015-03-07 Pedro Alves <palves@redhat.com>
8427
8428 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8429 or <winsock2.h> here. Instead include "gdb_socket.h".
8430 (remote_open): Use union gdb_sockaddr_u.
8431 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8432 or <winsock2.h> here. Instead include "gdb_socket.h".
8433 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8434 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8435 or <sys/un.h>.
8436 (init_named_socket, gdb_agent_helper_thread): Use union
8437 gdb_sockaddr_u.
8438
492d29ea
PA
84392015-03-07 Pedro Alves <palves@redhat.com>
8440
8441 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8442 instead.
8443
60a191ed
YQ
84442015-03-06 Yao Qi <yao.qi@linaro.org>
8445
8446 * linux-aarch64-low.c (aarch64_insert_point): Use
8447 show_debug_regs as a boolean.
8448 (aarch64_remove_point): Likewise.
8449
f5771b1d
PA
84502015-03-05 Pedro Alves <palves@redhat.com>
8451
8452 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8453 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8454 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8455 * nto-low.c (nto_target_ops): Likewise.
8456 * spu-low.c (spu_target_ops): Likewise.
8457 * win32-low.c (win32_target_ops): Likewise.
8458
3e572f71
PA
84592015-03-04 Pedro Alves <palves@redhat.com>
8460
72f4393d 8461 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
8462 Decide whether a breakpoint triggered based on the SIGTRAP's
8463 siginfo.si_code.
72f4393d
L
8464 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8465 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
8466 (linux_low_filter_event): Check for breakpoints before checking
8467 watchpoints.
8468 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8469 siginfo.si_code.
72f4393d
L
8470 (linux_stopped_by_sw_breakpoint)
8471 (linux_supports_stopped_by_sw_breakpoint)
8472 (linux_stopped_by_hw_breakpoint)
8473 (linux_supports_stopped_by_hw_breakpoint): New functions.
8474 (linux_target_ops): Install new target methods.
3e572f71 8475
1ec68e26
PA
84762015-03-04 Pedro Alves <palves@redhat.com>
8477
8478 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8479 * server.c (swbreak_feature, hwbreak_feature): New globals.
8480 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8481 (captured_main): Clear swbreak_feature and hwbreak_feature.
8482 * server.h (swbreak_feature, hwbreak_feature): Declare.
8483 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8484 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8485 supports_stopped_by_hw_breakpoint>: New fields.
8486 (target_supports_stopped_by_sw_breakpoint)
8487 (target_stopped_by_sw_breakpoint)
8488 (target_supports_stopped_by_hw_breakpoint)
8489 (target_stopped_by_hw_breakpoint): Declare.
8490
15c66dd6
PA
84912015-03-04 Pedro Alves <palves@redhat.com>
8492
8493 enum lwp_stop_reason -> enum target_stop_reason
8494 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8495 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8496 (linux_wait_1, stuck_in_jump_pad_callback)
8497 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8498 (linux_stopped_by_watchpoint):
8499 * linux-low.h (enum lwp_stop_reason): Delete.
8500 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8501 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8502
98fc70d6
YQ
85032015-03-04 Yao Qi <yao.qi@linaro.org>
8504
8505 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8506
dd2ac174
GB
85072015-03-03 Gary Benson <gbenson@redhat.com>
8508
8509 * hostio.c (handle_vFile): Fix prefix lengths.
8510
d68e53f4
MM
85112015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8512
8513 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8514 ptr_bits.
8515
bf2d68ab
AA
85162015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8517
8518 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8519 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8520 (clean): Add "rm -f" for above C files.
8521 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8522 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8523 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8524 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8525 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8526 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8527 (init_registers_s390x_vx_linux64)
8528 (init_registers_s390x_tevx_linux64)
8529 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8530 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8531 declarations.
8532 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8533 (s390_store_vxrs_high): New functions.
8534 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8535 NT_S390_VXRS_HIGH.
8536 (s390_arch_setup): Add logic for selecting one of the new target
8537 descriptions. Activate the new vector regsets if applicable.
8538 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8539 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8540 and init_registers_s390x_tevx_linux64.
8541
c966a859
PA
85422015-03-01 Pedro Alves <palves@redhat.com>
8543
8544 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8545 parameter.
8546
4180215b
PA
85472015-02-27 Pedro Alves <palves@redhat.com>
8548
8549 * linux-x86-low.c (u_debugreg_offset): New function.
8550 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8551
749bab01
PA
85522015-02-27 Pedro Alves <palves@redhat.com>
8553
8554 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8555 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8556 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8557 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8558 (ps_lsetfpregs, ps_getpid)
8559 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8560 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8561 (ps_lsetxregs, ps_plog): Declare.
8562
3c14e5a3
PA
85632015-02-27 Pedro Alves <palves@redhat.com>
8564
8565 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8566 IP_AGENT_EXPORT_FUNC.
8567 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8568 IP_AGENT_EXPORT_FUNC.
8569 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8570 (IP_AGENT_EXPORT): Delete.
8571 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8572 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8573 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8574 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8575 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8576 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8577 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8578 (traceframe_read_count, traceframe_write_count)
8579 (traceframes_created, trace_state_variables, get_raw_reg)
8580 (get_trace_state_variable_value, set_trace_state_variable_value)
8581 (ust_loaded, helper_thread_id, cmd_buf): Use
8582 IPA_SYM_EXPORTED_NAME.
8583 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8584 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8585 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8586 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8587 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8588 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8589 EXTERN_C_PUSH/EXTERN_C_POP.
8590 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8591 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8592 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8593 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8594 (traceframe_write_count, traceframe_read_count)
8595 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8596 (about_to_request_buffer_space, get_trace_state_variable_value)
8597 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8598 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8599 EXTERN_C_PUSH/EXTERN_C_POP.
8600 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8601 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8602 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8603 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8604 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8605 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8606 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8607 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8608 Define.
8609 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8610 (IP_AGENT_EXPORT_VAR_DECL): Define.
8611 (tracing): Declare.
8612 (gdb_agent_get_raw_reg): Declare.
8613
fe978cb0
PA
86142015-02-27 Tom Tromey <tromey@redhat.com>
8615 Pedro Alves <palves@redhat.com>
8616
8617 Rename symbols whose names are reserved C++ keywords throughout.
8618
3bc3d82a
PA
86192015-02-27 Pedro Alves <palves@redhat.com>
8620
8621 * Makefile.in (COMPILER): New, get it from autoconf.
8622 (CXX): Get from autoconf instead.
8623 (COMPILE.pre): Use COMPILER.
8624 (CC-LD): Rename to ...
8625 (CC_LD): ... this. Use COMPILER.
8626 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8627 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8628 * acinclude.m4: Include build-with-cxx.m4.
8629 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8630 Disable -Werror by default if building in C++ mode.
8631 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8632 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8633 the C++ compiler. Save/restore CXXFLAGS too.
8634 * configure: Regenerate.
8635
07697489
PA
86362015-02-27 Pedro Alves <palves@redhat.com>
8637
8638 * acinclude.m4: Include libiberty.m4.
8639 * configure.ac: Call libiberty_INIT.
8640 * config.in, configure: Regenerate.
8641
9beb7c4e
PA
86422015-02-26 Pedro Alves <palves@redhat.com>
8643
8644 * linux-low.c (linux_wait_1): When incrementing the PC past a
8645 program breakpoint always use the_low_target.breakpoint_len as
8646 increment, rather than the maximum between that and
8647 the_low_target.decr_pc_after_break.
8648
8090aef2
PA
86492015-02-23 Pedro Alves <palves@redhat.com>
8650
8651 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8652 thread was doing a step-over; always adjust the PC if
8653 we stepped over a permanent breakpoint.
8654 (linux_wait_1): If we stepped over breakpoint that was on top of a
8655 permanent breakpoint, manually advance the PC past it.
8656
bc9540e8
PA
86572015-02-23 Pedro Alves <palves@redhat.com>
8658
8659 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8660 modes.
8661 (x86_fill_gregset, x86_store_gregset): Use it when handling
8662 $orig_eax.
8663
2db9a427
PA
86642015-02-20 Pedro Alves <palves@redhat.com>
8665
8666 * thread-db.c: Include "nat/linux-procfs.h".
8667 (thread_db_init): Skip listing new threads if the kernel supports
8668 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8669
afa8d396
PA
86702015-02-20 Pedro Alves <palves@redhat.com>
8671
8672 * linux-low.c (status_pending_p_callback): Use ptid_match.
8673
c9587f88
AT
86742015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8675
8676 PR breakpoints/16812
8677 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8678 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8679 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8680
b05ec7a5
AT
86812015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8682
8683 PR breakpoints/15956
8684 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8685
d33501a5
MM
86862015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8687
8688 * linux-low.c (linux_low_btrace_conf): Print size.
8689 * server.c (handle_btrace_conf_general_set): New.
8690 (hanle_general_set): Call handle_btrace_conf_general_set.
8691 (handle_query): Report Qbtrace-conf:bts:size as supported.
8692
f4abbc16
MM
86932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8694
8695 * linux-low.c (linux_low_enable_btrace): Update parameters.
8696 (linux_low_btrace_conf): New.
8697 (linux_target_ops)<to_btrace_conf>: Initialize.
8698 * server.c (current_btrace_conf): New.
8699 (handle_btrace_enable): Rename to ...
8700 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8701 to target_enable_btrace. Update comment. Update users.
8702 (handle_qxfer_btrace_conf): New.
8703 (qxfer_packets): Add btrace-conf entry.
8704 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8705 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8706 (target_ops)<read_btrace_conf>: New.
8707 (target_enable_btrace): Update parameters.
8708 (target_read_btrace_conf): New.
8709
043c3577
MM
87102015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8711
8712 * server.c (handle_btrace_general_set): Remove call to
8713 target_supports_btrace.
8714 (supported_btrace_packets): New.
8715 (handle_query): Call supported_btrace_packets.
8716 * target.h: include btrace-common.h.
8717 (btrace_target_info): Removed.
8718 (supports_btrace, target_supports_btrace): Update parameters.
8719
734b0e4b
MM
87202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8721
8722 * Makefile.in (SFILES): Add common/btrace-common.c.
8723 (OBS): Add common/btrace-common.o.
8724 (btrace-common.o): Add build rules.
8725 * linux-low: Include btrace-common.h.
8726 (linux_low_read_btrace): Use struct btrace_data. Call
8727 btrace_data_init and btrace_data_fini.
8728
d6c146e9
PA
87292015-02-06 Pedro Alves <palves@redhat.com>
8730
8731 * thread-db.c (find_new_threads_callback): Add debug output.
8732
20ba1ce6
PA
87332015-02-04 Pedro Alves <palves@redhat.com>
8734
8735 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8736 (resume_stopped_resumed_lwps): New function.
8737 (linux_wait_for_event_filtered): Use it.
8738
8cc73a39
SDJ
87392015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8740
8741 * Makefile.in (SFILES): Add linux-personality.c.
8742 (linux-personality.o): New rule.
8743 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8744 list of objects to be built.
8745 * linux-low.c: Include nat/linux-personality.h.
8746 (linux_create_inferior): Remove code to disable address space
8747 randomization (moved to ../nat/linux-personality.c). Create
8748 cleanup to disable address space randomization.
8749
fb23d554
SDJ
87502015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8751
8752 * Makefile.in (posix-strerror.o): New rule.
8753 (mingw-strerror.o): Likewise.
8754 * configure: Regenerated.
8755 * configure.ac: Source file ../common/common.host. Initialize new
8756 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8757
cdf43629
YQ
87582015-01-14 Yao Qi <yao@codesourcery.com>
8759
8760 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8761 (ppc-linux.o): New rule.
8762 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8763 * configure.ac: AC_CHECK_FUNCS(getauxval).
8764 * config.in: Re-generated.
8765 * configure: Re-generated.
8766 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8767 ppc64_64bit_inferior_p
8768
514c5338
YQ
87692015-01-14 Yao Qi <yao@codesourcery.com>
8770
8771 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8772 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8773 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8774 (PT_ORIG_R3, PT_TRAP): Likewise.
8775 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8776 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8777 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8778
3368c1e5
JB
87792015-01-10 Joel Brobecker <brobecker@adacore.com>
8780
8781 * i387-fp.c (i387_cache_to_xsave): In look over
8782 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8783 zmmh_low_space field by use of zmmh_high_space.
8784
582511be
PA
87852015-01-09 Pedro Alves <palves@redhat.com>
8786
8787 * linux-low.c (step_over_bkpt): Move higher up in the file.
8788 (handle_extended_wait): Don't store the stop_pc here.
8789 (get_stop_pc): Adjust comments and rename to ...
8790 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8791 stopped for a software breakpoint or hardware breakpoint.
8792 (thread_still_has_status_pending_p): New function.
8793 (status_pending_p_callback): Use
8794 thread_still_has_status_pending_p. If the event is no longer
8795 interesting, resume the LWP.
8796 (handle_tracepoints): Add assert.
8797 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8798 (wstatus_maybe_breakpoint): New function.
8799 (cancel_breakpoint): Delete function.
8800 (check_stopped_by_watchpoint): New function, factored out from
8801 linux_low_filter_event.
8802 (lp_status_maybe_breakpoint): Delete function.
8803 (linux_low_filter_event): Remove filter_ptid argument.
8804 Leave thread group exits pending here. Store the LWP's stop PC.
8805 Always leave events pending.
8806 (linux_wait_for_event_filtered): Pull all events out of the
8807 kernel, and leave them all pending.
8808 (count_events_callback, select_event_lwp_callback): Consider all
8809 events.
8810 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8811 (select_event_lwp): Only give preference to the stepping LWP in
8812 all-stop mode. Adjust comments.
8813 (ignore_event): New function.
8814 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8815 references to cancel_breakpoints. Adjust to renames. Also give
8816 equal priority to all LWPs that have had events in non-stop mode.
8817 If reporting a software breakpoint event, unadjust the LWP's PC.
8818 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8819 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8820 Adjust.
8821 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8822 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8823 (linux_stopped_by_watchpoint): Adjust.
8824 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8825 * linux-low.h (enum lwp_stop_reason): New.
8826 (struct lwp_info) <stop_pc>: Adjust comment.
8827 <stopped_by_watchpoint>: Delete field.
8828 <stop_reason>: New field.
8829 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8830 * mem-break.c (software_breakpoint_inserted_here)
8831 (hardware_breakpoint_inserted_here): New function.
8832 * mem-break.h (software_breakpoint_inserted_here)
8833 (hardware_breakpoint_inserted_here): Declare.
8834 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8835 (cancel_breakpoints): Delete.
8836 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8837 (upload_fast_traceframes): Remove references to
8838 cancel_breakpoints.
8839
a33e3959
PA
88402015-01-09 Pedro Alves <palves@redhat.com>
8841
8842 * thread-db.c (find_new_threads_callback): Ignore thread if the
8843 kernel thread ID is -1.
8844
8784d563
PA
88452015-01-09 Pedro Alves <palves@redhat.com>
8846
8847 * linux-low.c (linux_attach_fail_reason_string): Move to
8848 nat/linux-ptrace.c, and rename.
8849 (linux_attach_lwp): Update comment.
8850 (attach_proc_task_lwp_callback): New function.
8851 (linux_attach): Adjust to rename and use
8852 linux_proc_attach_tgid_threads.
8853 (linux_attach_fail_reason_string): Delete declaration.
8854
76f2b779
JB
88552015-01-01 Joel Brobecker <brobecker@adacore.com>
8856
8857 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8858 * server.c (gdbserver_version): Likewise.
8859
fafcc06a
SDJ
88602014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8861
8862 * remote-utils.c: Include ctype.h.
8863 (input_interrupt): Explicitly handle the case when the char
8864 received is the NUL byte. Improve the printing of non-ASCII
8865 characters.
8866
beed38b8
JB
88672014-12-16 Joel Brobecker <brobecker@adacore.com>
8868
8869 * linux-low.c (linux_low_filter_event): Update call to
8870 linux_enable_event_reporting following the addition of
8871 a new parameter to that function.
8872
bf330350
CU
88732014-12-16 Catalin Udma <catalin.udma@freescale.com>
8874
8875 PR server/17457
8876 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8877 (AARCH64_FPCR_REGNO): Likewise.
8878 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8879 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8880 (aarch64_store_fpregset): Likewise.
8881
5227d625
JB
88822014-12-15 Joel Brobecker <brobecker@adacore.com>
8883
8884 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8885 Remove FIXME comment about assumption about N.
8886
f93b65a0
JB
88872014-12-13 Joel Brobecker <brobecker@adacore.com>
8888
8889 * configure.ac: If large-file support is disabled in GDBserver,
8890 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8891 * configure: Regenerate.
8892
e5a9158d
AA
88932014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8894
8895 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8896 warning upon ENODATA from ptrace.
8897 * linux-s390-low.c (s390_store_tdb): New.
8898 (s390_regsets): Add regset for NT_S390_TDB.
8899
feea5f36
AA
89002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8901
8902 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8903 without a fill_function.
8904 * linux-s390-low.c (s390_fill_last_break): Remove.
8905 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8906 (s390_arch_setup): Use regset's size instead of fill_function for
8907 loop end condition.
8908
098dbe61
AA
89092014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8910
8911 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8912 the regset's store function when ptrace returned an error.
8913 * regcache.c (get_thread_regcache): Invalidate register cache
8914 before fetching inferior's registers.
8915
28eef672
AA
89162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8917
8918 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8919 while-loop as for-loop.
8920 (regsets_store_inferior_registers): Likewise.
8921
bdca27a2
YQ
89222014-11-28 Yao Qi <yao@codesourcery.com>
8923
8924 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8925 * config.in, configure: Re-generate.
8926 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8927 is defined.
8928
9c232dda
YQ
89292014-11-21 Yao Qi <yao@codesourcery.com>
8930
8931 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8932 (AC_CHECK_HEADERS): Remove malloc.h.
8933 * configure: Re-generated.
8934 * config.in: Re-generated.
8935 * server.h: Don't include alloca.h and malloc.h.
8936 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8937 Don't include malloc.h.
8938
43968415
JB
89392014-11-17 Joel Brobecker <brobecker@adacore.com>
8940
8941 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8942 corresponding ERRNO check in same block.
8943
40e91bc7
PA
89442014-11-12 Pedro Alves <palves@redhat.com>
8945
8946 * server.c (cont_thread): Update comment.
8947 (start_inferior, attach_inferior): No longer clear cont_thread.
8948 (handle_v_cont): No longer set cont_thread.
8949 (captured_main): Clear cont_thread each time a GDB connects.
8950
c2c118cf
PA
89512014-11-12 Pedro Alves <palves@redhat.com>
8952
8953 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8954 thread, and don't resume all threads if the Hc thread has exited.
8955
78708b7c
PA
89562014-11-12 Pedro Alves <palves@redhat.com>
8957
8958 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8959 the process group instead of to a specific LWP.
8960
a2abc7de
PA
89612014-10-15 Pedro Alves <palves@redhat.com>
8962
8963 PR server/17487
8964 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8965 parameter.
8966 (arm_set_thread_context): Delete.
8967 (the_low_target): Adjust.
8968 * win32-i386-low.c (debug_registers_changed)
8969 (debug_registers_used): Delete.
8970 (update_debug_registers_callback): New function.
8971 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8972 needing to update their debug registers.
8973 (win32_get_current_dr): New function.
8974 (x86_dr_low_get_addr, x86_dr_low_get_control)
8975 (x86_dr_low_get_status): Fetch the debug register from the thread
8976 record's context.
8977 (i386_initial_stuff): Adjust.
8978 (i386_get_thread_context): Remove current_event parameter. Don't
8979 clear debug_registers_changed nor copy DR values to
8980 debug_reg_state.
8981 (i386_set_thread_context): Delete.
8982 (i386_prepare_to_resume): New function.
8983 (i386_thread_added): Mark the thread as needing to update irs
8984 debug registers.
8985 (the_low_target): Remove i386_set_thread_context and install
8986 i386_prepare_to_resume.
8987 * win32-low.c (win32_get_thread_context): Adjust.
8988 (win32_set_thread_context): Use SetThreadContext
8989 directly.
8990 (win32_prepare_to_resume): New function.
8991 (win32_require_context): New function, factored out from ...
8992 (thread_rec): ... this.
8993 (continue_one_thread): Call win32_prepare_to_resume on each thread
8994 we're about to continue.
8995 (win32_resume): Call win32_prepare_to_resume on the event thread.
8996 * win32-low.h (struct win32_thread_info)
8997 <debug_registers_changed>: New field.
8998 (struct win32_target_ops): Change prototype of set_thread_context,
8999 delete set_thread_context and add prepare_to_resume.
9000 (win32_require_context): New declaration.
9001
a442d071
GB
90022014-10-08 Gary Benson <gbenson@redhat.com>
9003
9004 * server.h: Do not include common-exceptions.h.
9005
6f1947e8
GB
90062014-10-08 Gary Benson <gbenson@redhat.com>
9007
9008 * server.h: Do not include cleanups.h.
9009
63b434a4
JH
90102014-09-30 James Hogan <james.hogan@imgtec.com>
9011
9012 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9013 mips64-dsp-linux.c.
9014
c4d9ceb6
YQ
90152014-09-23 Yao Qi <yao@codesourcery.com>
9016
9017 * linux-low.c (lp_status_maybe_breakpoint): New function.
9018 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9019 (count_events_callback): Likewise.
9020 (select_event_lwp_callback): Likewise.
9021 (cancel_breakpoints_callback): Likewise.
9022
89a5711c
DB
90232014-09-19 Don Breazeal <donb@codesourcery.com>
9024
9025 * linux-low.c (handle_extended_wait): Call
9026 linux_ptrace_get_extended_event.
9027 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9028 linux_is_extended_waitstatus.
9029
bffc0964
JB
90302014-09-16 Joel Brobecker <brobecker@adacore.com>
9031
9032 * Makefile.in (CPPFLAGS): Define.
9033 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9034 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9035
0bfdf32f
GB
90362014-09-16 Gary Benson <gbenson@redhat.com>
9037
9038 * inferiors.h (current_inferior): Renamed as...
9039 (current_thread): New variable. All uses updated.
9040 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9041 (maybe_move_out_of_jump_pad): Likewise.
9042 (cancel_breakpoint): Likewise.
9043 (linux_low_filter_event): Likewise.
9044 (wait_for_sigstop): Likewise.
9045 (linux_resume_one_lwp): Likewise.
9046 (need_step_over_p): Likewise.
9047 (start_step_over): Likewise.
9048 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9049 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9050 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9051 and save_inferior as saved_thread.
9052 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9053 saved_thread.
9054 (regcache_invalidate_thread): Likewise.
9055 * remote-utils.c (prepare_resume_reply): Likewise.
9056 * thread-db.c (thread_db_get_tls_address): Likewise.
9057 (disable_thread_event_reporting): Likewise.
9058 (remove_thread_event_breakpoints): Likewise.
9059 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9060 as saved_thread.
9061 * target.h (set_desired_inferior): Renamed as...
9062 (set_desired_thread): New declaration. All uses updated.
9063 * server.c (myresume): Updated comment to reference thread instead
9064 of inferior.
9065 (handle_serial_event): Likewise.
9066 (handle_target_event): Likewise.
9067
361c8ade
GB
90682014-09-12 Tom Tromey <tromey@redhat.com>
9069 Gary Benson <gbenson@redhat.com>
9070
9071 * regcache.h: Include common-regcache.h.
9072 (regcache_read_pc): Don't declare.
9073 * regcache.c (get_thread_regcache_for_ptid): New function.
9074
bd9269f7
GB
90752014-09-11 Tom Tromey <tromey@redhat.com>
9076 Gary Benson <gbenson@redhat.com>
9077
9078 * symbol.c: New file.
9079 * Makefile.in (SFILES): Add symbol.c.
9080 (OBS): Add symbol.o.
9081
f8c1d06b
GB
90822014-09-11 Gary Benson <gbenson@redhat.com>
9083
9084 * target.c (target_stop_ptid, target_continue_ptid): New
9085 functions.
9086
721ec300
GB
90872014-09-11 Tom Tromey <tromey@redhat.com>
9088 Gary Benson <gbenson@redhat.com>
9089
9090 * target.h: Include target/target.h.
9091 * target.c (target_read_memory, target_read_uint32)
9092 (target_write_memory): New functions.
9093
c5e92cca
GB
90942014-09-11 Gary Benson <gbenson@redhat.com>
9095
9096 * server.h (debug_hw_points): Don't declare.
9097 * server.c (debug_hw_points): Don't define. Replace all uses
9098 with show_debug_regs.
9099 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9100 all uses with show_debug_regs.
9101
2e4bb98a
EBM
91022014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9103
9104 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9105 endianness into account.
9106 (ppc_supply_ptrace_register): Likewise.
9107
ac740bc7
JH
91082014-09-03 James Hogan <james.hogan@imgtec.com>
9109
9110 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9111 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9112
97ea6506
GB
91132014-09-03 Gary Benson <gbenson@redhat.com>
9114
9115 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9116 ALL_DEBUG_ADDRESS_REGISTERS.
9117
df7e5265
GB
91182014-09-02 Gary Benson <gbenson@redhat.com>
9119
9120 * i386-low.h: Renamed as...
9121 * x86-low.h: New file. All type, function and variable name
9122 prefixes changed from "i386_" to "x86_". All references updated.
9123 * i386-low.c: Renamed as...
9124 * x86-low.c: New file. All type, function and variable name
9125 prefixes changed from "i386_" to "x86_". All references updated.
9126
ed859da7
GB
91272014-09-02 Gary Benson <gbenson@redhat.com>
9128
9129 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9130 (x86_linux_new_thread): Likewise.
9131
860789c7
GB
91322014-08-29 Gary Benson <gbenson@redhat.com>
9133
9134 * server.h (setjmp.h): Do not include.
9135 (toplevel): Do not declare.
9136 (common-exceptions.h): Include.
9137 (cleanups.h): Likewise.
9138 * server.c (toplevel): Do not define.
9139 (exit_code): New static global.
9140 (detach_or_kill_for_exit_cleanup): New function.
9141 (main): New function. Original main renamed to...
9142 (captured_main): New function.
9143 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9144
ff55e1b5
GB
91452014-08-29 Gary Benson <gbenson@redhat.com>
9146
9147 * Makefile.in (SFILES): Add common/common-exceptions.c.
9148 (OBS): Add common-exceptions.o.
9149 (common-exceptions.o): New rule.
9150 * utils.c (prepare_to_throw_exception): New function.
9151
e9bcb658
GB
91522014-08-29 Gary Benson <gbenson@redhat.com>
9153
9154 * config.in: Regenerate.
9155 * configure: Likewise.
9156
e3180625
GB
91572014-08-29 Gary Benson <gbenson@redhat.com>
9158
9159 * Makefile.in (SFILES): Add common/cleanups.c.
9160 (OBS): cleanups.o.
9161 (cleanups.o): New rule.
9162
e3d6ba5d
GB
91632014-08-29 Gary Benson <gbenson@redhat.com>
9164
9165 * utils.c (internal_vwarning): New function.
9166
7096e886
GB
91672014-08-28 Gary Benson <gbenson@redhat.com>
9168
9169 * utils.h (fatal): Remove declaration.
9170 * utils.c (fatal): Remove function.
9171
14ce3192
GB
91722014-08-28 Gary Benson <gbenson@redhat.com>
9173
9174 * tracepoint.c (gdb_agent_init): Replace fatal with
9175 perror_with_name.
9176 (initialize_tracepoint): Likewise.
9177
50278d59
GB
91782014-08-28 Gary Benson <gbenson@redhat.com>
9179
9180 * remote-utils.c (remote_prepare): Replace fatal with error.
9181
aa96c426
GB
91822014-08-28 Gary Benson <gbenson@redhat.com>
9183
9184 * linux-low.c (linux_async): Replace fatal with warning.
9185 Tidy up and return.
9186 (linux_start_non_stop): Return -1 if linux_async failed.
9187
f7160e97
GB
91882014-08-28 Gary Benson <gbenson@redhat.com>
9189
9190 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9191 gdb_assert.
9192 (i386_dr_low_get_addr): Remove vague comment.
9193 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9194 gdb_assert.
9195
38e08fca
GB
91962014-08-28 Gary Benson <gbenson@redhat.com>
9197
9198 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9199 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9200 internal_error.
9201 (linux_resume_one_lwp): Likewise.
9202 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9203 gdb_assert.
9204 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9205 with internal_error.
9206 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9207 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9208 (find_register_by_name): Replace fatal with internal_error.
9209 (find_regno): Likewise.
9210 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9211 * thread-db.c (thread_db_create_event): Likewise.
9212 (thread_db_load_search): Likewise.
9213 (try_thread_db_load_1): Likewise.
9214 * tracepoint.c (get_jump_space_head): Replace fatal with
9215 internal_error.
9216 (claim_trampoline_space): Likewise.
9217 (have_fast_tracepoint_trampoline_buffer): Likewise.
9218 (cmd_qtstart): Likewise.
9219 (stop_tracing): Likewise.
9220 (fast_tracepoint_collecting): Likewise.
9221 (target_malloc): Likewise.
9222 (download_tracepoint): Likewise.
9223 (download_trace_state_variables): Replace check with gdb_assert.
9224 (upload_fast_traceframes): Replace fatal with internal_error.
9225
34abf635
GB
92262014-08-19 Tom Tromey <tromey@redhat.com>
9227 Gary Benson <gbenson@redhat.com>
9228
9229 * Makefile.in (SFILES): Add common/common-debug.c.
9230 (OBS): Add common-debug.o.
9231 (common-debug.o): New rule.
9232 * debug.h (debug_printf): Don't declare.
9233 * debug.c (debug_printf): Renamed and rewritten as...
9234 (debug_vprintf): New function.
9235
f6e94d78
GB
92362014-08-19 Gary Benson <gbenson@redhat.com>
9237
9238 * utils.h: Do not include print-utils.h.
9239
9239eeab
GB
92402014-08-19 Tom Tromey <tromey@redhat.com>
9241 Gary Benson <gbenson@redhat.com>
9242
9243 * server.h: Add static assertion.
9244 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9245
ef87c8bb
GB
92462014-08-19 Tom Tromey <tromey@redhat.com>
9247 Gary Benson <gbenson@redhat.com>
9248
9249 * Makefile.in (SFILES): Add common/errors.c.
9250 (OBS): Add errors.o.
9251 (IPA_OBS): Add errors-ipa.o.
9252 (errors.o): New rule.
9253 (errors-ipa.o): Likewise.
9254 * utils.h (perror_with_name, error, warning): Don't declare.
9255 * utils.c (warning): Renamed and rewritten as...
9256 (vwarning): New function.
9257 (error): Renamed and rewritten as...
9258 (verror): New function.
9259 (internal_error): Renamed and rewritten as...
9260 (internal_verror): New function.
9261
bb974a24
GB
92622014-08-07 Gary Benson <gbenson@redhat.com>
9263
9264 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9265 * configure: Regenerate.
9266 * config.in: Likewise.
9267 * server.h: Do not include errno.h.
9268 * event-loop.c: Likewise.
9269 * hostio-errno.c: Likewise.
9270 * linux-low.c: Likewise.
9271 * remote-utils.c: Likewise.
9272 * spu-low.c: Likewise.
9273 * utils.c: Likewise.
9274 * gdbreplay.c: Unconditionally include errno.h.
9275
6d3d12eb
GB
92762014-08-07 Gary Benson <gbenson@redhat.com>
9277
9278 * server.h: Do not include string.h.
9279 * event-loop.c: Likewise.
9280 * linux-low.c: Likewise.
9281 * regcache.c: Likewise.
9282 * remote-utils.c: Likewise.
9283 * spu-low.c: Likewise.
9284 * utils.c: Likewise.
9285
dccbb609
GB
92862014-08-07 Gary Benson <gbenson@redhat.com>
9287
9288 * server.h: Do not include gdb_assert.h.
9289
e76df0d0
GB
92902014-08-07 Gary Benson <gbenson@redhat.com>
9291
9292 * server.h: Do not include common-utils.h.
9293
4cb9c816
GB
92942014-08-07 Gary Benson <gbenson@redhat.com>
9295
9296 * server.h: Do not include ptid.h.
9297 * notif.h: Likewise.
9298
3995eeee
GB
92992014-08-07 Gary Benson <gbenson@redhat.com>
9300
9301 * server.h: Do not include gdb_locale.h.
9302
cb9f1a9b
GB
93032014-08-07 Gary Benson <gbenson@redhat.com>
9304
9305 * server.h: Do not include gdb/signals.h.
9306 * win32-low.c: Likewise.
9307
a5fceff8
GB
93082014-08-07 Gary Benson <gbenson@redhat.com>
9309
9310 * server.h: Do not include pathmax.h.
9311
b9391142
GB
93122014-08-07 Gary Benson <gbenson@redhat.com>
9313
9314 * server.h: Do not include libiberty.h.
9315 * linux-bfin-low.c: Likewise.
9316
0e443c87
GB
93172014-08-07 Gary Benson <gbenson@redhat.com>
9318
9319 * server.h: Do not include ansidecl.h.
9320
8ebb3f56
GB
93212014-08-07 Gary Benson <gbenson@redhat.com>
9322
9323 * linux-x86-low.c: Do not include stddef.h.
9324 * lynx-ppc-low.c: Likewise.
9325 * tracepoint.c: Likewise.
9326
8980bdf6
GB
93272014-08-07 Gary Benson <gbenson@redhat.com>
9328
9329 * server.h: Do not include stdarg.h.
9330 * nto-low.c: Likewise.
9331
d7096f71
GB
93322014-08-07 Gary Benson <gbenson@redhat.com>
9333
9334 * server.h: Do not include stdlib.h.
9335 * inferiors.c: Likewise.
9336 * linux-low.c: Likewise.
9337 * regcache.c: Likewise.
9338 * spu-low.c: Likewise.
9339 * tracepoint.c: Likewise.
9340 * utils.c: Likewise.
9341
d02f550d
GB
93422014-08-07 Gary Benson <gbenson@redhat.com>
9343
9344 * server.h: Do not include stdio.h.
9345 * linux-low.c: Likewise.
9346 * remote-utils.c: Likewise.
9347 * spu-low.c: Likewise.
9348 * utils.c: Likewise.
9349 * wincecompat.c: Likewise.
9350
87f6c4e3
GB
93512014-08-06 Gary Benson <gbenson@redhat.com>
9352
9353 * regcache.c (init_register_cache): Move conditionals inside if.
9354
7089dca4
GB
93552014-08-06 Gary Benson <gbenson@redhat.com>
9356
9357 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9358
462f517e
GB
93592014-07-31 Gary Benson <gbenson@redhat.com>
9360
9361 * ax.h: Do not include server.h.
9362 * gdbthread.h: Likewise.
9363 * lynx-low.h: Likewise.
9364 * notif.h: Likewise.
9365
976411d6
GB
93662014-07-30 Gary Benson <gbenson@redhat.com>
9367
9368 * server.h: Include common-defs.h.
9369 Do not include config.h or build-gnulib-gdbserver/config.h.
9370
d41f6d8e
GB
93712014-07-30 Gary Benson <gbenson@redhat.com>
9372
9373 * hostio-errno.c: Move server.h to top of includes list.
9374 * inferiors.c: Likewise.
9375 * linux-x86-low.c: Likewise.
9376 * notif.c: Include server.h.
9377
314c6a35
TT
93782014-07-24 Tom Tromey <tromey@redhat.com>
9379 Gary Benson <gbenson@redhat.com>
9380
9381 * server.h (CORE_ADDR): Now unsigned.
9382
69ff6be5
PA
93832014-07-16 Pedro Alves <palves@redhat.com>
9384
9385 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9386
ce9e3fe7
PA
93872014-07-15 Pedro Alves <palves@redhat.com>
9388
9389 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9390 copy.
9391
e76126e8
PA
93922014-07-11 Pedro Alves <palves@redhat.com>
9393
9394 * linux-low.c (kill_wait_lwp): New function, based on
9395 kill_one_lwp_callback, but use my_waitpid directly.
9396 (kill_one_lwp_callback, linux_kill): Use it.
9397
8e9db26e
PA
93982014-06-23 Pedro Alves <palves@redhat.com>
9399
9400 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9401 before setting DR0..DR3.
9402
698b3e08
GB
94032014-06-20 Gary Benson <gbenson@redhat.com>
9404
9405 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9406 * configure: Regenerated.
9407 * config.in: Likewise.
9408
125f8a3d
GB
94092014-06-20 Gary Benson <gbenson@redhat.com>
9410
9411 * Makefile.in (SFILES): Update locations for files moved
9412 from common to nat.
9413 (object file files): Reordered.
9414
42995dbd
GB
94152014-06-20 Gary Benson <gbenson@redhat.com>
9416
9417 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9418 (i386_dr_low_set_addr): Likewise.
9419 (i386_dr_low_get_addr): Likewise.
9420 (i386_dr_low_can_set_control): Likewise.
9421 (i386_dr_low_set_control): Likewise.
9422 (i386_dr_low_get_control): Likewise.
9423 (i386_dr_low_get_status): Likewise.
9424 (i386_get_debug_register_length): Likewise.
9425 * linux-x86-low.c (i386_dr_low_set_addr):
9426 Changed signature. Made static.
9427 (i386_dr_low_get_addr): Likewise.
9428 (i386_dr_low_set_control): Likewise.
9429 (i386_dr_low_get_control): Likewise.
9430 (i386_dr_low_get_status): Likewise.
9431 (i386_dr_low): New global variable.
9432 * win32-i386-low.c (i386_dr_low_set_addr):
9433 Changed signature. Made static.
9434 (i386_dr_low_get_addr): Likewise.
9435 (i386_dr_low_set_control): Likewise.
9436 (i386_dr_low_get_control): Likewise.
9437 (i386_dr_low_get_status): Likewise.
9438 (i386_dr_low): New global variable.
9439
e1d2394b
MS
94402014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9441
9442 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9443 * Makefile.in (AR, AR_FLAGS): Define.
9444 * configure: Regenerate.
9445
3a8ee006
GB
94462014-06-19 Gary Benson <gbenson@redhat.com>
9447
9448 * Makefile.in (i386-dregs.o): New rule.
9449 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9450 * i386-low.c (target.h): Remove include.
9451 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9452 (DR_CONTROL_SHIFT): Likewise.
9453 (DR_CONTROL_SIZE): Likewise.
9454 (DR_RW_EXECUTE): Likewise.
9455 (DR_RW_WRITE): Likewise.
9456 (DR_RW_READ): Likewise.
9457 (DR_RW_IORW): Likewise.
9458 (DR_LEN_1): Likewise.
9459 (DR_LEN_2): Likewise.
9460 (DR_LEN_4): Likewise.
9461 (DR_LEN_8): Likewise.
9462 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9463 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9464 (DR_ENABLE_SIZE): Likewise.
9465 (DR_LOCAL_SLOWDOWN): Likewise.
9466 (DR_GLOBAL_SLOWDOWN): Likewise.
9467 (DR_CONTROL_RESERVED): Likewise.
9468 (I386_DR_CONTROL_MASK): Likewise.
9469 (I386_DR_VACANT): Likewise.
9470 (I386_DR_LOCAL_ENABLE): Likewise.
9471 (I386_DR_GLOBAL_ENABLE): Likewise.
9472 (I386_DR_DISABLE): Likewise.
9473 (I386_DR_SET_RW_LEN): Likewise.
9474 (I386_DR_GET_RW_LEN): Likewise.
9475 (I386_DR_WATCH_HIT): Likewise.
9476 (i386_wp_op_t): Likewise.
9477 (i386_show_dr): Likewise.
9478 (i386_length_and_rw_bits): Likewise.
9479 (i386_insert_aligned_watchpoint): Likewise.
9480 (i386_remove_aligned_watchpoint): Likewise.
9481 (i386_handle_nonaligned_watchpoint): Likewise.
9482 i386_update_inferior_debug_regs(): Likewise.
9483 (i386_dr_insert_watchpoint): Likewise.
9484 (i386_dr_remove_watchpoint): Likewise.
9485 (i386_dr_region_ok_for_watchpoint): Likewise.
9486 (i386_dr_stopped_data_address): Likewise.
9487 (i386_dr_stopped_by_watchpoint): Likewise.
9488
8f26655c
GB
94892014-06-19 Gary Benson <gbenson@redhat.com>
9490
9491 * i386-low.c (i386_dr_show): Renamed to
9492 i386_show_dr and made static. All uses updated.
9493 (i386_dr_length_and_rw_bits): Renamed to
9494 i386_length_and_rw_bits and made static.
9495 All uses updated.
9496 (i386_dr_insert_aligned_watchpoint): Renamed to
9497 i386_insert_aligned_watchpoint and made static.
9498 All uses updated.
9499 (i386_dr_remove_aligned_watchpoint): Renamed to
9500 i386_remove_aligned_watchpoint and made static.
9501 All uses updated.
9502 (i386_dr_update_inferior_debug_regs): Renamed to
9503 i386_update_inferior_debug_regs and made static.
9504 All uses updated.
9505
b9228891
GB
95062014-06-18 Gary Benson <gbenson@redhat.com>
9507
5171def3
GB
9508 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9509 (i386_dr_low_can_set_control): Likewise.
9510 (i386_get_debug_register_length): Likewise.
9511 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9512 (i386_dr_low_can_set_control): Likewise.
9513 (i386_get_debug_register_length): Likewise.
9514
95152014-06-17 Gary Benson <gbenson@redhat.com>
9516
b9228891
GB
9517 * i386-low.h (i386-dregs.h): New include.
9518 (DR_FIRSTADDR): Now in i386-dregs.h.
9519 (DR_LASTADDR): Likewise.
9520 (DR_NADDR): Likewise.
9521 (DR_STATUS): Likewise.
9522 (DR_CONTROL): Likewise.
9523 (i386_debug_reg_state): Likewise.
9524 (i386_dr_insert_watchpoint): Likewise.
9525 (i386_dr_remove_watchpoint): Likewise.
9526 (i386_dr_region_ok_for_watchpoint): Likewise.
9527 (i386_dr_stopped_data_address): Likewise.
9528 (i386_dr_stopped_by_watchpoint): Likewise.
9529 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9530
4be83cc2
GB
95312014-06-18 Gary Benson <gbenson@redhat.com>
9532
9533 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9534 i386_dr_insert_watchpoint.
9535 (i386_low_remove_watchpoint): Renamed to
9536 i386_dr_remove_watchpoint.
9537 (i386_low_region_ok_for_watchpoint): Renamed to
9538 i386_dr_region_ok_for_watchpoint.
9539 (i386_low_stopped_data_address): Renamed to
9540 i386_dr_stopped_data_address.
9541 (i386_low_stopped_by_watchpoint): Renamed to
9542 i386_dr_stopped_by_watchpoint.
9543 * i386-low.c (i386_show_dr): Renamed to
9544 i386_dr_show and made nonstatic. All uses updated.
9545 (i386_length_and_rw_bits): Renamed to
9546 i386_dr_length_and_rw_bits and made nonstatic.
9547 All uses updated.
9548 (i386_insert_aligned_watchpoint): Renamed to
9549 i386_dr_insert_aligned_watchpoint and made nonstatic.
9550 All uses updated.
9551 (i386_remove_aligned_watchpoint): Renamed to
9552 i386_dr_remove_aligned_watchpoint and made nonstatic.
9553 All uses updated.
9554 (i386_update_inferior_debug_regs): Renamed to
9555 i386_dr_update_inferior_debug_regs and made nonstatic.
9556 All uses updated.
9557 (i386_low_insert_watchpoint): Renamed to
9558 i386_dr_insert_watchpoint. All uses updated.
9559 (i386_low_remove_watchpoint): Renamed to
9560 i386_dr_remove_watchpoint. All uses updated.
9561 (i386_low_region_ok_for_watchpoint): Renamed to
9562 i386_dr_region_ok_for_watchpoint. All uses updated.
9563 (i386_low_stopped_data_address): Renamed to
9564 i386_dr_stopped_data_address. All uses updated.
9565 (i386_low_stopped_by_watchpoint): Renamed to
9566 i386_dr_stopped_by_watchpoint. All uses updated.
9567
131aa0d4
GB
95682014-06-18 Gary Benson <gbenson@redhat.com>
9569
9570 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9571 (i386_dr_low_can_set_control): Likewise.
9572 (i386_insert_aligned_watchpoint): New check.
9573
d9305f7f
GB
95742014-06-18 Gary Benson <gbenson@redhat.com>
9575
9576 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9577 Renamed to state.
9578
e927c9fc
GB
95792014-06-18 Gary Benson <gbenson@redhat.com>
9580
9581 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9582 instead of fatal and error.
9583 (i386_handle_nonaligned_watchpoint): Likewise.
9584
1b6d4134
GB
95852014-06-18 Gary Benson <gbenson@redhat.com>
9586
9587 * i386-low.c (i386_get_debug_register_length): New macro.
9588 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9589 (i386_show_dr): Use debug_printf instead of fprintf. Use
9590 phex to format values.
9591
6e62758f
GB
95922014-06-18 Gary Benson <gbenson@redhat.com>
9593
9594 * i386-low.h: Comment changes.
9595 * i386-low.c: Likewise.
9596
fc6e2f03
GB
95972014-06-18 Gary Benson <gbenson@redhat.com>
9598
9599 * i386-low.c: Whitespace changes.
9600
f9d1eeed
TT
96012014-06-12 Tom Tromey <tromey@redhat.com>
9602
9603 * utils.c (freeargv): Remove.
9604
0b04e523
TT
96052014-06-12 Tom Tromey <tromey@redhat.com>
9606
9607 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9608 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9609 (parse_debug_format_options): Likewise.
9610 (gdbserver_usage): Likewise.
9611 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9612 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9613 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9614 against libiberty.
9615 ($(LIBGNU)): Depend on libiberty.
9616 (all-lib): Recurse into all subdirs.
9617 (install-only): Invoke "install" target in subdirs.
9618 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9619 targets.
9620 * configure: Rebuild.
9621 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9622 for vasprintf, vsnprintf, or gettimeofday.
9623 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9624 srv_tgtobj.
9625
270c9937
JB
96262014-06-05 Joel Brobecker <brobecker@adacore.com>
9627
9628 * development.sh: Delete.
9629 * Makefile.in (config.status): Adjust dependency on development.sh.
9630 * configure.ac: Adjust development.sh source call.
9631 * configure: Regenerate.
9632
0a261ed8
PA
96332014-06-02 Pedro Alves <palves@redhat.com>
9634
9635 * ax.c (gdb_free_agent_expr): New function.
9636 * ax.h (gdb_free_agent_expr): New declaration.
9637 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9638 list.
9639 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9640 static.
9641 (clear_breakpoint_conditions_and_commands): New function.
9642 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9643 (clear_breakpoint_conditions_and_commands): New declaration.
9644
e9dae05e
RR
96452014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9646
9647 * linux-aarch64-low.c (asm/ptrace.h): Include.
9648
5876f503
JK
96492014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9650
9651 Fix TLS access for -static -pthread.
9652 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9653 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9654 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9655
802e8e6d
PA
96562014-05-20 Pedro Alves <palves@redhat.com>
9657
9658 * linux-aarch64-low.c (aarch64_insert_point)
9659 (aarch64_remove_point): No longer check whether the type is
9660 supported here. Adjust to new interface.
9661 (the_low_target): Install aarch64_supports_z_point_type as
9662 supports_z_point_type method.
9663 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9664 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9665 instead of a Z packet char. Adjust.
9666 (arm_supports_z_point_type): New function.
9667 (arm_insert_point, arm_remove_point): Adjust to new interface.
9668 (the_low_target): Install arm_supports_z_point_type.
9669 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9670 (cris_insert_point, cris_remove_point): Adjust to new interface.
9671 Don't check whether the type is supported here.
9672 (the_low_target): Install cris_supports_z_point_type.
9673 * linux-low.c (linux_supports_z_point_type): New function.
9674 (linux_insert_point, linux_remove_point): Adjust to new interface.
9675 * linux-low.h (struct linux_target_ops) <insert_point,
9676 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9677 raw_breakpoint pointer parameter.
9678 <supports_z_point_type>: New method.
9679 * linux-mips-low.c (mips_supports_z_point_type): New function.
9680 (mips_insert_point, mips_remove_point): Adjust to new interface.
9681 Use mips_supports_z_point_type.
9682 (the_low_target): Install mips_supports_z_point_type.
9683 * linux-ppc-low.c (the_low_target): Install NULL as
9684 supports_z_point_type method.
9685 * linux-s390-low.c (the_low_target): Install NULL as
9686 supports_z_point_type method.
9687 * linux-sparc-low.c (the_low_target): Install NULL as
9688 supports_z_point_type method.
9689 * linux-x86-low.c (x86_supports_z_point_type): New function.
9690 (x86_insert_point): Adjust to new insert_point interface. Use
9691 insert_memory_breakpoint. Adjust to new
9692 i386_low_insert_watchpoint interface.
9693 (x86_remove_point): Adjust to remove_point interface. Use
9694 remove_memory_breakpoint. Adjust to new
9695 i386_low_remove_watchpoint interface.
9696 (the_low_target): Install x86_supports_z_point_type.
9697 * lynx-low.c (lynx_target_ops): Install NULL as
9698 supports_z_point_type callback.
9699 * nto-low.c (nto_supports_z_point_type): New.
9700 (nto_insert_point, nto_remove_point): Adjust to new interface.
9701 (nto_target_ops): Install nto_supports_z_point_type.
9702 * mem-break.c: Adjust intro comment.
9703 (struct raw_breakpoint) <raw_type, size>: New fields.
9704 <inserted>: Update comment.
9705 <shlib_disabled>: Delete field.
9706 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9707 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9708 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9709 (raw_bkpt_type_to_target_hw_bp_type): New function.
9710 (find_enabled_raw_code_breakpoint_at): New function.
9711 (find_raw_breakpoint_at): New type and size parameters. Use them.
9712 (insert_memory_breakpoint): New function, based off
9713 set_raw_breakpoint_at.
9714 (remove_memory_breakpoint): New function.
9715 (set_raw_breakpoint_at): Reimplement.
9716 (set_breakpoint): New, based on set_breakpoint_at.
9717 (set_breakpoint_at): Reimplement.
9718 (delete_raw_breakpoint): Go through the_target->remove_point
9719 instead of assuming memory breakpoints.
9720 (find_gdb_breakpoint_at): Delete.
9721 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9722 (find_gdb_breakpoint): New function.
9723 (set_gdb_breakpoint_at): Delete.
9724 (z_type_supported): New function.
9725 (set_gdb_breakpoint_1): New function, loosely based off
9726 set_gdb_breakpoint_at.
9727 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9728 (delete_gdb_breakpoint_at): Delete.
9729 (delete_gdb_breakpoint_1): New function, loosely based off
9730 delete_gdb_breakpoint_at.
9731 (delete_gdb_breakpoint): New function.
9732 (clear_gdb_breakpoint_conditions): Rename to ...
9733 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9734 breakpoint.
9735 (add_condition_to_breakpoint): Make static.
9736 (add_breakpoint_condition): Take a struct breakpoint pointer
9737 instead of an address. Adjust.
9738 (gdb_condition_true_at_breakpoint): Rename to ...
9739 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9740 z_type parameter.
9741 (gdb_condition_true_at_breakpoint): Reimplement.
9742 (add_breakpoint_commands): Take a struct breakpoint pointer
9743 instead of an address. Adjust.
9744 (gdb_no_commands_at_breakpoint): Rename to ...
9745 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9746 parameter. Return true if no breakpoint was found. Change debug
9747 output.
9748 (gdb_no_commands_at_breakpoint): Reimplement.
9749 (run_breakpoint_commands): Rename to ...
9750 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9751 and change return type to boolean.
9752 (run_breakpoint_commands): New function.
9753 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9754 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9755 breakpoint. Go through the_target->remove_point instead of
9756 assuming memory breakpoint.
9757 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9758 software and hardware breakpoints.
9759 (reinsert_raw_breakpoint): Go through the_target->insert_point
9760 instead of assuming memory breakpoint.
9761 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9762 software and hardware breakpoints.
9763 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9764 Check both software and hardware breakpoints.
9765 (validate_inserted_breakpoint): Assert the breakpoint is a
9766 software breakpoint. Set the inserted flag to -1 instead of
9767 setting shlib_disabled.
9768 (delete_disabled_breakpoints): Adjust.
9769 (validate_breakpoints): Only validate software breakpoints.
9770 Adjust to inserted flag change.
9771 (check_mem_read, check_mem_write): Skip breakpoint types other
9772 than software breakpoints. Adjust to inserted flag change.
9773 * mem-break.h (enum raw_bkpt_type): New enum.
9774 (raw_breakpoint, struct process_info): Forward declare.
9775 (Z_packet_to_target_hw_bp_type): Delete declaration.
9776 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9777 (set_gdb_breakpoint, delete_gdb_breakpoint)
9778 (clear_breakpoint_conditions): New declarations.
9779 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9780 (breakpoint_inserted_here): Update comment.
9781 (add_breakpoint_condition, add_breakpoint_commands): Replace
9782 address parameter with a breakpoint pointer parameter.
9783 (gdb_breakpoint_here): Update comment.
9784 (delete_gdb_breakpoint_at): Delete.
9785 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9786 * server.c (process_point_options): Take a struct breakpoint
9787 pointer instead of an address. Adjust.
9788 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9789 delete_gdb_breakpoint.
9790 * spu-low.c (spu_target_ops): Install NULL as
9791 supports_z_point_type method.
9792 * target.h: Include mem-break.h.
9793 (struct target_ops) <prepare_to_access_memory>: Update comment.
9794 <supports_z_point_type>: New field.
9795 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9796 instead of a char. Also take a raw breakpoint pointer.
9797 * win32-arm-low.c (the_low_target): Install NULL as
9798 supports_z_point_type.
9799 * win32-i386-low.c (i386_supports_z_point_type): New function.
9800 (i386_insert_point, i386_remove_point): Adjust to new interface.
9801 (the_low_target): Install i386_supports_z_point_type.
9802 * win32-low.c (win32_supports_z_point_type): New function.
9803 (win32_insert_point, win32_remove_point): Adjust to new interface.
9804 (win32_target_ops): Install win32_supports_z_point_type.
9805 * win32-low.h (struct win32_target_ops):
9806 <supports_z_point_type>: New method.
9807 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9808 instead of a char. Also take a raw breakpoint pointer.
9809
932539e3
PA
98102014-05-20 Pedro Alves <palves@redhat.com>
9811
9812 * mem-break.h: Include break-common.h.
9813 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9814 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9815 (Z_packet_to_target_hw_bp_type): New declaration.
9816 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9817 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9818 (Z_PACKET_ACCESS_WP): Delete macros.
9819 (Z_packet_to_hw_type): Delete function.
9820 * i386-low.h: Don't include break-common.h here.
9821 (Z_packet_to_hw_type): Delete declaration.
9822 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9823 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9824 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9825 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9826 * linux-aarch64-low.c: Don't include break-common.h here.
9827 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9828 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9829 (Z_packet_to_target_hw_bp_type): Delete function.
9830 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9831 function.
9832 (mips_insert_point, mips_remove_point): Use
9833 Z_packet_to_target_hw_bp_type.
9834
4ff0d3d8
PA
98352014-05-20 Pedro Alves <palves@redhat.com>
9836
9837 * linux-aarch64-low.c: Include break-common.h.
9838 (enum target_point_type): Delete.
9839 (Z_packet_to_point_type): Rename to ...
9840 (Z_packet_to_target_hw_bp_type): ... this, and return a
9841 target_hw_bp_type instead.
9842 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9843 instead of an enum target_point_type.
9844 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9845 breakpoint type.
9846 (aarch64_dr_state_insert_one_point)
9847 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9848 (aarch64_handle_aligned_watchpoint)
9849 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9850 Take an enum target_hw_bp_type instead of an enum
9851 target_point_type.
9852 (aarch64_supports_z_point_type): New function.
9853 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9854 use Z_packet_to_target_hw_bp_type.
9855
786dc519
JB
98562014-05-20 Joel Brobecker <brobecker@adacore.com>
9857
9858 * configure.ac: Only use -Werror by default when DEVELOPMENT
9859 is true.
9860 * configure: Regenerate.
9861
9e0aa64f
JK
98622014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9863
9864 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9865 * linux-x86-low.c (X86_64_USER_REGS): New.
9866 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9867
2b577b92
YQ
98682014-04-28 Yao Qi <yao@codesourcery.com>
9869
9870 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9871 name.
9872
94611da2
PA
98732014-04-25 Pedro Alves <palves@redhat.com>
9874
9875 PR server/16255
9876 * linux-low.c (linux_attach_fail_reason_string): New function.
9877 (linux_attach_lwp): Delete.
9878 (linux_attach_lwp_1): Rename to ...
9879 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9880 argument. Remove "initial" parameter. Return int instead of
9881 void. Don't error or warn here.
9882 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9883 failure to attach to the tgid. Call warning when failing to
9884 attach to an lwp.
9885 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9886 argument. Remove "initial" parameter. Return int instead of
9887 void. Don't error or warn here.
9888 (linux_attach_fail_reason_string): New declaration.
9889 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9890 interface change. Use linux_attach_fail_reason_string.
9891
01f9f808
MS
98922014-04-24 Michael Sturm <michael.sturm@mintel.com>
9893 Walfred Tedeschi <walfred.tedeschi@intel.com>
9894
9895 * Makefile.in: Added rules to handle new files
9896 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9897 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9898 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9899 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9900 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9901 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9902 x32-avx512-linux.o.
9903 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9904 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9905 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9906 i386/x32-avx512.xml.
9907 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9908 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9909 i386/x32-avx512-linux.xml.
9910 * i387-fp.c (num_avx512_k_registers): New constant for number
9911 of K registers.
9912 (num_avx512_zmmh_low_registers): New constant for number of
9913 lower ZMM registers (0-15).
9914 (num_avx512_zmmh_high_registers): New constant for number of
9915 higher ZMM registers (16-31).
9916 (num_avx512_ymmh_registers): New contant for number of higher
9917 YMM registers (ymm16-31 added by avx521 on x86_64).
9918 (num_avx512_xmm_registers): New constant for number of higher
9919 XMM registers (xmm16-31 added by AVX512 on x86_64).
9920 (struct i387_xsave): Add space for AVX512 registers.
9921 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9922 Add code to handle AVX512 registers.
9923 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9924 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9925 prototypei from generated file.
9926 (tdesc_amd64_avx512_linux): Likewise.
9927 (init_registers_x32_avx512_linux): Likewise.
9928 (tdesc_x32_avx512_linux): Likewise.
9929 (init_registers_i386_avx512_linux): Likewise.
9930 (tdesc_i386_avx512_linux): Likewise.
9931 (x86_64_regmap): Add AVX512 registers.
9932 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9933 mask.
9934 (initialize_low_arch): Add code to initialize AVX512 registers.
9935
51aa91f9
PA
99362014-04-23 Pedro Alves <palves@redhat.com>
9937
9938 * mem-break.c (find_gdb_breakpoint_at): Make static.
9939 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9940
a4165e94
PA
99412014-04-23 Pedro Alves <palves@redhat.com>
9942
9943 * i386-low.c: Don't include break-common.h here.
9944 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9945 prototype to take target_hw_bp_type as argument instead of a Z
9946 packet char.
9947 * i386-low.h: Include break-common.h here.
9948 (Z_packet_to_hw_type): Declare.
9949 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9950 prototypes.
9951 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9952 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9953 (x86_remove_point): Convert the packet number to a
9954 target_hw_bp_type before calling i386_low_remove_watchpoint.
9955 * win32-i386-low.c (i386_insert_point): Convert the packet number
9956 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9957 (i386_remove_point): Convert the packet number to a
9958 target_hw_bp_type before calling i386_low_remove_watchpoint.
9959
b8acf843
PA
99602014-04-23 Pedro Alves <palves@redhat.com>
9961
9962 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9963
d708bcd1
PA
99642014-04-10 Pedro Alves <palves@redhat.com>
9965
9966 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9967 Check if the condition or command is NULL before checking if the
9968 breakpoint is known. On success, return true.
9969 * mem-break.h (add_breakpoint_condition): Document return.
9970 (add_breakpoint_commands): Add describing comment.
9971 * server.c (skip_to_semicolon): New function.
9972 (process_point_options): Use it.
9973
2eec7d5b
PA
99742014-04-09 Pedro Alves <palves@redhat.com>
9975
9976 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9977 to lwpid_of.
9978
fa96cb38
PA
99792014-02-27 Pedro Alves <palves@redhat.com>
9980
9981 PR 12702
9982 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9983 macros.
9984 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9985 output.
9986 (last_thread_of_process_p): Take a PID argument instead of a
9987 thread pointer.
9988 (linux_wait_for_lwp): Delete.
9989 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9990 functions.
9991 (linux_low_filter_event): New function, party factored out from
9992 linux_wait_for_event.
9993 (linux_wait_for_event): Rename to ...
9994 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9995 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9996 sigsuspend. Check for zombie leaders.
9997 (linux_wait_for_event): Reimplement as wrapper around
9998 linux_wait_for_event_filtered.
9999 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10000 a normal or signal exit is seen, it's the whole process exiting.
10001 (wait_for_sigstop): No longer a for_each_inferior callback.
10002 Rewrite on top of linux_wait_for_event_filtered.
10003 (stop_all_lwps): Call wait_for_sigstop directly.
10004 * server.c (resume, handle_target_event): Handle
10005 TARGET_WAITKIND_NO_RESUMED.
10006
d763de10
JB
100072014-02-26 Joel Brobecker <brobecker@adacore.com>
10008
10009 * win32-low.c (psapi_get_dll_name,
10010 * win32_CreateToolhelp32Snapshot): Delete.
10011 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10012 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10013 Delete.
10014 (handle_load_dll): Add function description.
10015 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10016
850a0f76
JB
100172014-02-26 Joel Brobecker <brobecker@adacore.com>
10018
10019 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10020 Add comment.
10021 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10022 base address when calling win32_add_one_solib.
10023 (handle_load_dll): Delete local variable load_addr.
10024 Remove 0x1000 offset applied to DLL base address when calling
10025 win32_add_one_solib.
10026 (handle_unload_dll): Add comment.
10027
f25b3fc3
JB
100282014-02-26 Joel Brobecker <brobecker@adacore.com>
10029
10030 * win32-low.c (win32_add_all_dlls): Renames
10031 win32_ensure_ntdll_loaded. Rewrite function documentation.
10032 Adjust implementation to always load all DLLs.
10033 Add 0x1000 offset to DLL base address when calling
10034 win32_add_one_solib.
10035 (child_initialization_done): New static global.
10036 (do_initial_child_stuff): Set child_initialization_done to
10037 zero during child initialization, and 1 after. Replace call
10038 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10039 Add comment.
10040 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10041 (handle_unload_dll): Add function documentation.
10042 (get_child_debug_event): Ignore load and unload DLL events
10043 during child initialization.
10044
d86d4aaf
DE
100452014-02-20 Doug Evans <dje@google.com>
10046
3bc32da3 10047 Remove global all_lwps.
d86d4aaf
DE
10048 * inferiors.h (ptid_of): Move here from linux-low.h.
10049 (pid_of, lwpid_of): Ditto.
10050 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10051 parameter is a struct thread_info * now.
10052 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10053 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10054 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10055 directly.
10056 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10057 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10058 * linux-arm-low.c (update_registers_callback): Update, "entry"
10059 parameter is a struct thread_info * now.
10060 Fetch lwpid from current_inferior directly.
10061 (arm_insert_point): Pass &all_threads to find_inferior instead of
10062 &all_lwps.
10063 (arm_remove_point): Ditto.
10064 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10065 (arm_prepare_to_resume): Fetch pid from thread.
10066 (arm_read_description): Fetch lwpid from current_inferior directly.
10067 * linux-low.c (all_lwps): Delete.
10068 (delete_lwp): Delete call to remove_inferior.
10069 (handle_extended_wait): Fetch lwpid from thread.
10070 (add_lwp): Don't set lwp->entry.id. Remove call to
10071 add_inferior_to_list.
10072 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10073 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10074 (kill_one_lwp_callback): Ditto.
10075 (linux_kill): Don't dereference NULL pointer.
10076 Fetch ptid,lwpid from thread.
10077 (get_detach_signal): Fetch ptid from thread.
10078 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10079 Simplify call to regcache_invalidate_thread.
10080 (delete_lwp_callback): Update, "entry" parameter is a
10081 struct thread_info * now. Fetch pid from thread.
10082 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10083 (status_pending_p_callback): Update, "entry" parameter is a
10084 struct thread_info * now. Fetch ptid from thread.
10085 (find_lwp_pid): Update, "entry" parameter is a
10086 struct thread_info * now.
10087 (linux_wait_for_lwp): Fetch pid from thread.
10088 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10089 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10090 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10091 (dequeue_one_deferred_signal): Ditto.
10092 (cancel_breakpoint): Fetch ptid from current_inferior.
10093 (linux_wait_for_event): Pass &all_threads to find_inferior,
10094 not &all_lwps. Fetch ptid, lwpid from thread.
10095 (count_events_callback): Update, "entry" parameter is a
10096 struct thread_info * now.
10097 (select_singlestep_lwp_callback): Ditto.
10098 (select_event_lwp_callback): Ditto.
10099 (cancel_breakpoints_callback): Ditto.
10100 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10101 not &all_lwps.
10102 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10103 (unsuspend_one_lwp): Update, "entry" parameter is a
10104 struct thread_info * now.
10105 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10106 not &all_lwps.
10107 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10108 Fetch lwpid from thread, not lwp.
10109 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10110 Pass &all_threads to find_inferior, not &all_lwps.
10111 (send_sigstop): Fetch lwpid from thread, not lwp.
10112 (send_sigstop_callback): Update, "entry" parameter is a
10113 struct thread_info * now.
10114 (suspend_and_send_sigstop_callback): Ditto.
10115 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10116 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10117 struct thread_info * now.
10118 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10119 from thread, lwp.
10120 (lwp_running): Update, "entry" parameter is a
10121 struct thread_info * now.
10122 (stop_all_lwps): Fetch ptid from thread.
10123 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10124 (linux_resume_one_lwp): Fetch lwpid from thread.
10125 (linux_set_resume_request): Update, "entry" parameter is a
10126 struct thread_info * now. Fetch pid, lwpid from thread.
10127 (resume_status_pending_p): Update, "entry" parameter is a
10128 struct thread_info * now.
10129 (need_step_over_p): Ditto. Fetch lwpid from thread.
10130 (start_step_over): Fetch lwpid from thread.
10131 (linux_resume_one_thread): Update, "entry" parameter is a
10132 struct thread_info * now. Fetch lwpid from thread.
10133 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10134 (proceed_one_lwp): Update, "entry" parameter is a
10135 struct thread_info * now. Fetch lwpid from thread.
10136 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10137 struct thread_info * now.
10138 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10139 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10140 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10141 directly.
10142 (regsets_store_inferior_registers): Ditto.
10143 (fetch_register, store_register): Ditto.
10144 (linux_read_memory, linux_write_memory): Ditto.
10145 (linux_request_interrupt): Ditto.
10146 (linux_read_auxv): Ditto.
10147 (linux_xfer_siginfo): Ditto.
10148 (linux_qxfer_spu): Ditto.
10149 (linux_qxfer_libraries_svr4): Ditto.
10150 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10151 moved to inferiors.h.
10152 (get_lwp): Delete.
10153 (get_thread_lwp): Update.
10154 (struct lwp_info): Delete member "entry". Simplify comment for
10155 member "thread".
10156 (all_lwps): Delete.
10157 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10158 current_inferior directly.
10159 (update_watch_registers_callback): Update, "entry" parameter is a
10160 struct thread_info * now. Fetch pid from thread.
10161 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10162 (mips_insert_point): Fetch lwpid from current_inferior.
10163 Pass &all_threads to find_inferior, not &all_lwps.
10164 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10165 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10166 directly.
10167 (mips_stopped_data_address): Ditto.
10168 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10169 directly.
10170 * linux-tile-low.c (tile_arch_setup): Ditto.
10171 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10172 (update_debug_registers_callback): Update, "entry" parameter is a
10173 struct thread_info * now. Fetch pid from thread.
10174 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10175 Pass &all_threads to find_inferior, not &all_lwps.
10176 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10177 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10178 Pass &all_threads to find_inferior, not &all_lwps.
10179 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10180 (i386_dr_low_get_status): Ditto.
10181 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10182 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10183 (x86_linux_read_description): Ditto.
10184 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10185
3b8361aa
DE
101862014-02-20 Doug Evans <dje@google.com>
10187
10188 * inferiors.c (get_first_inferior): Fix buglet.
10189
f7667f0d
DE
101902014-02-19 Doug Evans <dje@google.com>
10191
10192 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10193 * inferiors.c (add_thread): Change result type to struct thread_info *.
10194 All callers updated.
10195 (add_lwp): Call add_thread here instead of in callers.
10196 All callers updated.
10197 * linux-low.h (get_lwp_thread): Rewrite.
10198 (struct lwp_info): New member "thread".
10199
b3312d80
DE
102002014-02-19 Doug Evans <dje@google.com>
10201
10202 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10203 All callers updated.
10204
ecc6f45c
DE
102052014-02-19 Doug Evans <dje@google.com>
10206
10207 * inferiors.c (add_thread): Fix whitespace.
10208
649ebbca
DE
102092014-02-19 Doug Evans <dje@google.com>
10210
10211 * dll.c (clear_dlls): Replace accessing list implemention details
10212 with API function.
10213 * gdbthread.h (get_first_thread): Declare.
10214 * inferiors.c (for_each_inferior_with_data): New function.
10215 (get_first_thread): New function.
10216 (find_thread_ptid): Simplify.
10217 (get_first_inferior): New function.
10218 (clear_list): Delete.
10219 (one_inferior_p): New function.
10220 (clear_inferior_list): New function.
10221 (clear_inferiors): Update.
10222 * inferiors.h (for_each_inferior_with_data): Declare.
10223 (clear_inferior_list): Declare.
10224 (one_inferior_p): Declare.
10225 (get_first_inferior): Declare.
10226 * linux-low.c (linux_wait_for_event): Replace accessing list
10227 implemention details with API function.
10228 * server.c (target_running): Ditto.
10229 (accumulate_file_name_length): New function.
10230 (emit_dll_description): New function.
10231 (handle_qxfer_libraries): Replace accessing list implemention
10232 details with API function.
10233 (handle_qxfer_threads_worker): New function.
10234 (handle_qxfer_threads_proper): Replace accessing list implemention
10235 details with API function.
10236 (handle_query): Ditto.
10237 (visit_actioned_threads_callback_ftype): New typedef.
10238 (visit_actioned_threads_data): New struct.
10239 (visit_actioned_threads): Rewrite to be find_inferior callback.
10240 (resume): Call find_inferior.
10241 (handle_status): Replace accessing list implemention
10242 details with API function.
10243 (process_serial_event): Replace accessing list implemention details
10244 with API function.
10245 * target.c (set_desired_inferior): Replace accessing list implemention
10246 details with API function.
10247 * tracepoint.c (same_process_p): New function.
10248 (gdb_agent_about_to_close): Replace accessing list implemention
10249 details with API function.
10250 * win32-low.c (child_delete_thread): Replace accessing list
10251 implemention details with API function.
10252 (match_dll_by_basename): New function.
10253 (dll_is_loaded_by_basename): New function.
10254 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10255 details call to dll_is_loaded_by_basename.
10256
80894984
DE
102572014-02-19 Doug Evans <dje@google.com>
10258
10259 * dll.h (struct dll_info): Add comment.
10260 * gdbthread.h (struct thread_info): Add comment.
10261 (current_ptid): Simplify.
10262 * inferiors.c (add_process): Update.
10263 (remove_process): Update.
10264 * inferiors.h (struct process_info): Rename member "head" to "entry".
10265 * linux-low.c (delete_lwp): Update.
10266 (add_lwp): Update.
10267 (last_thread_of_process_p): Update.
10268 (kill_one_lwp_callback, linux_kill): Update.
10269 (status_pending_p_callback): Update.
10270 (wait_for_sigstop): Update. Simplify read of ptid.
10271 (start_step_over): Update.
10272 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10273 (get_lwp_thread): Update.
10274 (struct lwp_info): Rename member "head" to "entry".
10275 * regcache.h (inferior_list_entry): Delete.
10276 * server.c (kill_inferior_callback): Update.
10277 (detach_or_kill_inferior_callback): Update.
10278 (print_started_pid): Update.
10279 (print_attached_pid): Update.
10280 (process_serial_event): Simplify read of ptid.
10281 * thread-db.c (thread_db_create_event): Update.
10282 (thread_db_get_tls_address): Update.
10283 * win32-low.c (current_inferior_ptid): Simplify.
10284
46917d26
TT
102852014-02-19 Tom Tromey <tromey@redhat.com>
10286
10287 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10288 argument.
10289 (target_supports_btrace): Update.
10290
0759a81e
YQ
102912014-02-14 Yao Qi <yao@codesourcery.com>
10292
10293 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10294 (rsp-low-ipa.o): New target.
10295
a7191e8b
TT
102962014-02-12 Tom Tromey <tromey@redhat.com>
10297
10298 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10299 convert_ascii_to_int.
10300 * regcache.c (registers_to_string): Likewise.
10301 * remote-utils.c (decode_M_packet): Likewise.
10302 * server.c (process_serial_event): Likewise.
10303
ff0e980e
TT
103042014-02-12 Tom Tromey <tromey@redhat.com>
10305
10306 * server.c (handle_query, handle_v_run): Use hex2bin, not
10307 unhexify.
10308 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10309
e9371aff
TT
103102014-02-12 Tom Tromey <tromey@redhat.com>
10311
10312 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10313 convert_int_to_ascii.
10314 * regcache.c (registers_to_string, collect_register_as_string):
10315 Likewise.
10316 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10317 Likewise.
10318 * server.c (process_serial_event): Likewise.
10319 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10320 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10321
971dc0b8
TT
103222014-02-12 Tom Tromey <tromey@redhat.com>
10323
10324 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10325 bin2hex, not hexify.
10326 * tracepoint.c (cmd_qtstatus): Likewise.
10327
0a822afb
TT
103282014-02-12 Tom Tromey <tromey@redhat.com>
10329
10330 * remote-utils.c (monitor_output): Pass explicit length to
10331 hexify.
10332
9c3d6531
TT
103332014-02-12 Tom Tromey <tromey@redhat.com>
10334
10335 * tracepoint.c: Include rsp-low.h.
10336 * server.c: Include rsp-low.h.
10337 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10338 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10339 declare.
10340 * remote-utils.c: Include rsp-low.h.
10341 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10342 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10343 (convert_int_to_ascii, convert_ascii_to_int): Move to
10344 common/rsp-low.c.
10345 * regcache.c: Include rsp-low.h.
10346 * ax.c: Include rsp-low.h.
10347 * Makefile.in (SFILES): Add common/rsp-low.c.
10348 (OBS): Add rsp-low.o.
10349 (rsp-low.o): New target.
10350
01fd3ea5
TT
103512014-02-12 Tom Tromey <tromey@redhat.com>
10352
10353 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10354 Include print-utils.h.
10355 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10356 (plongest, thirty_two, phex_nz): Remove.
10357 * Makefile.in (SFILES): Add common/print-utils.c.
10358 (OBS): Add print-utils.o.
10359 (print-utils-ipa.o): New target.
10360 (print-utils.o): New target.
10361 (IPA_OBJS): Add print-utils-ipa.o.
10362
e99dc820
TT
103632014-02-06 Tom Tromey <tromey@redhat.com>
10364
10365 * Makefile.in (SFILES): Fix indentation.
10366
ee1e2d4f
DE
103672014-02-05 Doug Evans <dje@google.com>
10368
10369 * linux-low.c (linux_wait_for_event): Improve comment.
10370 (linux_wait_1): Keep current_inferior in sync with event_child.
10371
f5a02773
DE
103722014-01-22 Doug Evans <dje@google.com>
10373
10374 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10375
87ce2a04
DE
103762014-01-22 Doug Evans <dje@google.com>
10377
10378 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10379 * configure: Regenerate.
10380 * config.in: Regenerate.
10381 * Makefile.in (SFILES): Add debug.c.
10382 (OBS): Add debug.o.
10383 * debug.c: New file.
10384 * debug.h: New file.
10385 * linux-aarch64-low.c (*): Update all debugging printfs to use
10386 debug_printf instead of fprintf.
10387 * linux-arm-low.c (*): Ditto.
10388 * linux-cris-low.c (*): Ditto.
10389 * linux-crisv32-low.c (*): Ditto.
10390 * linux-m32r-low.c (*): Ditto.
10391 * linux-sparc-low.c (*): Ditto.
10392 * linux-x86.c (*): Ditto.
10393 * linux-low.c (*): Ditto.
10394 (linux_wait_1): Add calls to debug_enter, debug_exit.
10395 (linux_wait): Remove redundant debugging printf.
10396 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10397 (linux_resume, unstop_all_lwps): Ditto.
10398 * mem-break.c (*): Update all debugging printfs to use
10399 debug_printf instead of fprintf.
10400 * remote-utils.c (*): Ditto.
10401 * thread-db.c (*): Ditto.
10402 * server.c #include <ctype.h>, "gdb_vecs.h".
10403 (debug_threads): Moved to debug.c.
10404 (*): Update all debugging printfs to use debug_printf instead of
10405 fprintf.
10406 (start_inferior): Replace call to fflush with call to debug_flush.
10407 (monitor_show_help): Mention set debug-format.
10408 (parse_debug_format_options): New function.
10409 (handle_monitor_command): Handle "monitor set debug-format".
10410 (gdbserver_usage): Mention --debug-format.
10411 (main): Parse --debug-format.
10412 * server.h (debug_threads): Declaration moved to debug.h.
10413 #include "debug.h".
10414 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10415 trace_debug_1 that uses debug_printf.
10416 (tracepoint_look_up_symbols): Update all debugging printfs to use
10417 debug_printf instead of fprintf.
10418
e671835b
BS
104192014-01-20 Baruch Siach <baruch@tkos.co.il>
10420
10421 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10422 sys/ptrace.h.
10423
b5737fa9
PA
104242014-01-17 Pedro Alves <palves@redhat.com>
10425
ea38d2a9 10426 PR build/16445
c7faa97a
PA
10427 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10428 defined after including gdb_proc_service.h.
b5737fa9 10429
40ed484e
DE
104302014-01-16 Doug Evans <dje@google.com>
10431
10432 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10433 (match_dll): Use it.
10434
969c39fb
MM
104352014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10436
10437 * target.h (target_ops) <read_btrace>: Change parameters and
10438 return type to allow error reporting.
10439 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10440 trace reading errors on.
10441 * linux-low.c (linux_low_read_btrace): Pass trace reading
10442 errors on.
10443 (linux_low_disable_btrace): New.
10444
ab7f45ba
DE
104452014-01-15 Doug Evans <dje@google.com>
10446
10447 * inferiors.c (thread_id_to_gdb_id): Delete.
10448 * inferiors.h (thread_id_to_gdb_id): Delete.
10449
66af0f44
EZ
104502014-01-13 Eli Zaretskii <eliz@gnu.org>
10451
10452 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10453 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10454 versions.
10455
9939e131
PA
104562014-01-08 Pedro Alves <palves@redhat.com>
10457
10458 * server.c (handle_status): Don't discard previous queued stop
10459 replies or thread's pending status here.
10460 (main) <disconnection>: Do it here instead.
10461
b7ea362b
PA
104622014-01-08 Pedro Alves <palves@redhat.com>
10463
10464 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10465 * server.c (visit_actioned_threads, handle_pending_status): New
10466 function.
10467 (handle_v_cont): Factor out parts to ...
10468 (resume): ... this new function. If in all-stop, and a thread
10469 being resumed has a pending status, report it without actually
10470 resuming.
10471 (myresume): Adjust to use the new 'resume' function.
10472 (clear_pending_status_callback, set_pending_status_callback)
10473 (find_status_pending_thread_callback): New functions.
10474 (handle_status): Handle the case of multiple threads having
10475 interesting statuses to report. Report threads' real last signal
10476 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10477 with an interesting thread to report the status for, instead of
10478 always reporting the status of the first thread.
10479
28498c42
JB
104802014-01-01 Joel Brobecker <brobecker@adacore.com>
10481
10482 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10483 * gdbreplay.c (gdbreplay_version): Likewise.
10484
f45c82da
YZ
104852013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10486
10487 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10488 iov.iov_len with the real length in use.
10489
379a5e2d
JB
104902013-12-13 Joel Brobecker <brobecker@adacore.com>
10491
10492 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10493 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10494 for all targets that use win32-low.c.
10495 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10496 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10497
4210d83e
PA
104982013-12-13 Pedro Alves <palves@redhat.com>
10499
10500 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10501 if equal to TARGET_WAITKIND_LOADED.
10502 * win32-low.c (cached_status): New static global.
10503 (win32_wait): Add declaration.
10504 (do_initial_child_stuff): Flush all initial pending debug events
10505 up to the initial breakpoint.
10506 (win32_wait): If CACHED_STATUS was set, return that instead
10507 of doing a real wait. Remove the code resuming the execution
10508 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10509 during the initial phase. Also remove the code changing
10510 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10511 TARGET_WAITKIND_STOPPED.
10512
e7f0d979
YQ
105132013-12-11 Yao Qi <yao@codesourcery.com>
10514
10515 * notif.c (handle_notif_ack): Return 0 if no notification
10516 matches.
10517
ebcf782c
DE
105182013-11-20 Doug Evans <dje@google.com>
10519
10520 * linux-low.c (linux_set_resume_request): Fix comment.
10521
20ad9378
DE
105222013-11-20 Doug Evans <dje@google.com>
10523
10524 * linux-low.c (resume_status_pending_p): Tweak comment.
10525
a196ebeb
WT
105262013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10527
10528 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10529 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10530 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10531 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10532 (srv_amd64_regobj): Add amd64-mpx.o.
10533 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10534 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10535 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10536 * i387-fp.c (num_pl_bnd_register) Added constant.
10537 (num_pl_bnd_cfg_registers) Added constant.
10538 (struct i387_xsave) Added reserved area and MPX fields.
10539 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10540 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10541 function.
10542 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10543 (init_registers_amd64_mpx_linux): Declare new function.
10544 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10545 (x86_64_regmap): Add MPX registers.
10546 (x86_linux_read_description): Add MPX case.
10547 (initialize_low_arch): Initialize MPX targets.
10548
0080a2f6
TT
105492013-11-18 Tom Tromey <tromey@redhat.com>
10550
10551 * configure: Rebuild.
10552 * configure.ac: Don't check for stdlib.h.
10553 * gdbreplay.c: Unconditionally include stdlib.h.
10554
2978b111
TT
105552013-11-18 Tom Tromey <tromey@redhat.com>
10556
10557 * config.in: Rebuild.
10558 * configure: Rebuild.
10559 * configure.ac: Don't use AC_HEADER_DIRENT.
10560
a3d08894
TT
105612013-11-18 Tom Tromey <tromey@redhat.com>
10562
10563 * server.h: Don't check HAVE_STRING_H.
10564 * gdbreplay.c: Don't check HAVE_STRING_H.
10565 * configure: Rebuild.
10566
0a5dd17d
TT
105672013-11-18 Tom Tromey <tromey@redhat.com>
10568
10569 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10570 LIBGNU.
10571
1bd2f0ba
TT
105722013-11-08 Tom Tromey <tromey@redhat.com>
10573
10574 * configure, config.in: Rebuild.
10575 * configure.ac: Remove unused configury.
10576
3266f10b
TT
105772013-11-08 Tom Tromey <tromey@redhat.com>
10578
10579 * acinclude.m4: Include common.m4, codeset.m4.
10580 * configure, config.in: Rebuild.
10581 * configure.ac: Use GDB_AC_COMMON.
10582
6682d959
AA
105832013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10584
10585 * linux-s390-low.c (HWCAP_S390_TE): New define.
10586 (s390_arch_setup): Consider the TE field in the HWCAP for
10587 determining 'have_regset_tdb'.
10588
fd0a4d76
SDJ
105892013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10590
10591 PR gdb/16014
10592 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10593 call to sizeof.
10594
1a3d890b
PA
105952013-10-02 Pedro Alves <palves@redhat.com>
10596
10597 * server.c (process_serial_event): Don't output "GDBserver
10598 exiting" if GDB is connected through stdio.
10599 * target.c (mywait): Likewise, be silent if GDB is connected
10600 through stdio.
10601
97ad4581
JB
106022013-10-01 Joel Brobecker <brobecker@adacore.com>
10603
10604 * lynx-low.c (lynx_add_threads_after_attach): New function.
10605 (lynx_attach): Remove call to add_thread. Add call to
10606 lynx_add_threads_after_attach instead.
10607
5b4e221c
MF
106082013-09-28 Mike Frysinger <vapier@gentoo.org>
10609
10610 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10611 * config.in, configure: Regenerated.
10612
ee47b2f8
YQ
106132013-09-18 Yao Qi <yao@codesourcery.com>
10614
10615 PR server/15959
10616 * server.c (start_inferior): Clear 'resume_info'.
10617
d6707650 106182013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10619
d6707650
JW
10620 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10621 for each register.
10622
9243dd0e 106232013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 10624
9243dd0e
JW
10625 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10626 linux-tile-low.o to srv_tgtobj.
10627
c623a6ef
WN
106282013-09-16 Will Newton <will.newton@linaro.org>
10629
10630 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10631 out regs.
10632
fb71d39e
PA
106332013-09-06 Pedro Alves <palves@redhat.com>
10634
10635 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10636 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10637 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10638 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10639 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10640 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10641
8e7e9910
PA
106422013-09-06 Pedro Alves <palves@redhat.com>
10643
10644 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10645 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10646
7c3a12ca
PA
106472013-09-06 Pedro Alves <palves@redhat.com>
10648
10649 * linux-amd64-ipa.c: Include tracepoint.h.
10650 * linux-i386-ipa.c: Include tracepoint.h.
10651
8eb3d7b6
RW
106522013-09-06 Ricard Wanderlof <ricardw@axis.com>
10653
10654 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10655 (ps_get_thread_area): New function.
10656
eddddb9d
RW
106572013-09-06 Ricard Wanderlof <ricardw@axis.com>
10658
10659 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10660 (initialize_low_arch): Call init_registers_crisv32 rather than
10661 init_register_crisv32.
10662
533b0600
PA
106632013-09-05 Pedro Alves <palves@redhat.com>
10664
10665 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10666 to ...
10667 * hostio.h: ... this new file.
10668 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10669 win32-low.c: Include hostio.h.
10670
0ce3d3b5
PA
106712013-09-05 Pedro Alves <palves@redhat.com>
10672
10673 * server.h (gdb_client_data, handler_func, callback_handler_func)
10674 (delete_file_handler, add_file_handler, append_callback_event)
10675 (delete_callback_event, start_event_loop, initialize_event_loop):
10676 Move to event-loop.h and include it.
10677 * event-loop.h: New file.
10678
799cdc37
PA
106792013-09-05 Pedro Alves <palves@redhat.com>
10680
10681 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10682 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10683 (loaded_dll, unloaded_dll): Move to ...
10684 * dll.h: ... this new file.
10685 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10686
6a6bbd9d
PA
106872013-09-05 Pedro Alves <palves@redhat.com>
10688
10689 * server.h (current_process, get_thread_process, all_processes)
10690 (add_inferior_to_list, for_each_inferior, current_inferior)
10691 (remove_inferior, add_process, remove_process, find_process_pid)
10692 (have_started_inferiors_p, have_attached_inferiors_p)
10693 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10694 (clear_inferiors, find_inferior, find_inferior_id)
10695 (inferior_target_data, set_inferior_target_data)
10696 (inferior_regcache_data, set_inferior_regcache_data): Move to
10697 inferiors.h, and include it.
10698 * inferiors.h: New file.
10699
f699aaba
PA
107002013-09-05 Pedro Alves <palves@redhat.com>
10701
10702 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10703 Move ...
72f4393d 10704 * ax.h: ... here.
f699aaba 10705
c144c7a0
PA
107062013-09-05 Pedro Alves <palves@redhat.com>
10707
10708 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10709 tracepoint.h.
10710 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10711 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10712 (handle_tracepoint_general_set, handle_tracepoint_query)
10713 (tracepoint_finished_step, tracepoint_was_hit)
10714 (release_while_stepping_state_list, current_traceframe)
10715 (in_readonly_region, traceframe_read_mem)
10716 (fetch_traceframe_registers, traceframe_read_sdata)
10717 (traceframe_read_info, struct fast_tpoint_collect_status)
10718 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10719 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10720 (supply_fast_tracepoint_registers)
10721 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10722 (ipa_tdesc, claim_trampoline_space)
10723 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10724 (agent_mem_read, agent_get_trace_state_variable_value)
10725 (agent_set_trace_state_variable_value, agent_tsv_read)
10726 (agent_mem_read_string, get_raw_reg_func_addr)
10727 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10728 * tracepoint.h: ... this new file.
10729
ff42e6ab
PA
107302013-09-05 Pedro Alves <palves@redhat.com>
10731
10732 * server.h (perror_with_name, error, fatal, warning, paddress)
10733 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10734 include it.
10735 * utils.h: New file.
10736
541af0f4
PA
107372013-09-05 Pedro Alves <palves@redhat.com>
10738
10739 * server.h (remote_debug, noack_mode, transport_is_reliable)
10740 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10741 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10742 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10743 (write_enn, initialize_async_io, enable_async_io)
10744 (disable_async_io, check_remote_input_interrupt_request)
10745 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10746 (dead_thread_notify, prepare_resume_reply)
10747 (decode_address_to_semicolon, decode_address, decode_m_packet)
10748 (decode_M_packet, decode_X_packet, decode_xfer_write)
10749 (decode_search_memory_packet, unhexify, hexify)
10750 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10751 (look_up_one_symbol, relocate_instruction)
10752 (monitor_output): Move to remote-utils.h, and include it.
10753 * remote-utils.h: New file.
10754
eebdf26b
PA
107552013-09-05 Pedro Alves <palves@redhat.com>
10756
10757 * server.h (_): Delete.
10758
3aafd2ff
PA
107592013-09-02 Pedro Alves <palves@redhat.com>
10760
10761 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10762 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10763 allocated.
10764 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10765
cee83bcb
PM
107662013-09-02 Pierre Muller <muller@sourceware.org>
10767
10768 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10769 or WriteProcessMemory complete successfully and handle
10770 ERROR_PARTIAL_COPY error.
10771
9a13b2fa
PA
107722013-09-02 Pedro Alves <palves@redhat.com>
10773
10774 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10775 error instead of EIO.
10776
602e3198
JK
107772013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10778
10779 PR server/15604
10780 * linux-low.c: Include filestuff.h.
10781 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10782 * lynx-low.c: Include filestuff.h.
10783 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10784 * server.c: Include filestuff.h.
10785 (main): Call notice_open_fds.
10786 * spu-low.c: Include filestuff.h.
10787 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10788
96d7229d
LM
107892013-08-22 Luis Machado <lgustavo@codesourcery.com>
10790
10791 * Makefile.in: Explain why ../target and ../nat are not
10792 listed as include file search paths.
10793 (linux-waitpid.o): New object file rule.
10794 * configure.srv (srv_native_linux_obj): New variable.
10795 Replace all occurrences of linux native object files with
10796 $srv_native_linux_obj.
10797 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10798 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10799 (linux_enable_event_reporting): Remove declaration.
10800 (my_waitpid): Moved to common/linux-waitpid.c.
10801 (linux_wait_for_event): Pass ptid when calling
10802 linux_enable_event_reporting.
10803 (linux_supports_tracefork_flag): Remove.
10804 (linux_enable_event_reporting): Likewise.
10805 (linux_tracefork_grandchild): Remove.
10806 (STACK_SIZE): Moved to common/linux-ptrace.c.
10807 (linux_tracefork_child): Remove.
10808 (linux_test_for_tracefork): Remove.
10809 (linux_look_up_symbols): Call linux_supports_traceclone.
10810 (initialize_low): Remove call to linux_test_for_tracefork.
10811 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10812 common/linux-ptrace.h.
10813 (PTRACE_TYPE_ARG4): Likewise.
10814 Include linux-ptrace.h.
10815
32940073
PA
108162013-08-21 Pedro Alves <palves@redhat.com>
10817
10818 * config.in: Renegerate.
10819
33b60d58 108202013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 10821
33b60d58
LM
10822 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10823 (SFILES): Remove $(srcdir)/common/target-common.c and
10824 add $(srcdir)/target/waitstatus.c.
10825 (OBS): Remove target-common.o and add waitstatus.o.
10826 (server_h): Remove $(srcdir)/../common/target-common.h and
10827 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10828 and $(srcdir)/../target/waitstatus.h.
10829 (target-common.o): Remove.
10830 (waitstatus.o): New target object file.
10831 * target.h: Do not include target-common.h and
10832 include target/resume.h, target/wait.h and
10833 target/waitstatus.h.
10834
b8e1b30e
LM
108352013-08-13 Luis Machado <lgustavo@codesourcery.com>
10836
10837 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10838 to PTRACE_TYPE_ARG3.
10839 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10840 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10841 PTRACE_TYPE_ARG4.
10842 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10843 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10844
7a60ad40
YQ
108452013-07-27 Jie Zhang <jie@codesourcery.com>
10846 Daniel Jacobowitz <dan@codesourcery.com>
10847 Yao Qi <yao@codesourcery.com>
10848
10849 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10850 (mips-linux-watch.o): New rule.
10851 (mips_linux_watch_h): New variable.
10852 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10853 srv_tgtobj.
10854 * linux-mips-low.c: Include mips-linux-watch.h.
10855 (struct arch_process_info, struct arch_lwp_info): New.
10856 (update_watch_registers_callback): New function.
10857 (mips_linux_new_process, mips_linux_new_thread) New functions.
10858 (mips_linux_prepare_to_resume, mips_insert_point): New
10859 functions.
10860 (mips_remove_point, mips_stopped_by_watchpoint): New
10861 functions.
10862 (rsp_bp_type_to_target_hw_bp_type): New function.
10863 (mips_stopped_data_address): New function.
10864 (the_low_target): Add watchpoint support functions.
10865
de6f69ad
YQ
108662013-07-27 Yao Qi <yao@codesourcery.com>
10867
10868 * i386-low.c: Include break-common.h.
10869 (enum target_hw_bp_type): Remove.
10870
3360c0bf
LM
108712013-07-24 Luis Machado <lgustavo@codesourcery.com>
10872
10873 * Makefile.in (SFILES): /common/target-common.c.
10874 (OBS): Add target-common.o.
10875 (server_h): Add $(srcdir)/../common/target-common.h.
10876 (target-common.o): New target.
10877 * server.c (queue_stop_reply_callback): Free
10878 status string after use.
10879 * target.c (target_waitstatus_to_string): Remove.
10880 * target.h: Include target-common.h.
10881 (resume_kind): Likewise.
10882 (target_waitkind): Likewise.
10883 (target_waitstatus): Likewise.
10884 (TARGET_WNOHANG): Likewise.
10885
bd885420
YQ
108862013-07-04 Yao Qi <yao@codesourcery.com>
10887
10888 * Makefile.in (host_alias): Use @host_noncanonical@.
10889 (target_alias): Use @target_noncanonical@.
10890 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10891 ACX_NONCANONICAL_HOST.
10892 * configure: Regenerated.
10893
10894 Revert:
10895 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10896
10897 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10898 * configure: Rebuild.
10899 * Makefile.in (version_host, version_target): Get from configure.
10900 (version.c): Use $(version_host) and $(version_target).
10901
17ef446e
PA
109022013-07-03 Pedro Alves <palves@redhat.com>
10903
10904 * Makefile.in (config.status): Depend on development.sh.
10905 * acinclude.m4: Include libmcheck.m4.
10906 * configure: Regenerate.
10907
7a9a7487
MG
109082013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10909
10910 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10911 attribute inside the parentheses.
10912 (winapi_DebugSetProcessKillOnExit): Ditto.
10913 (winapi_DebugBreakProcess): Ditto.
10914 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 10915
49b64de6
MG
109162013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10917
10918 * notif.h (notif_event): Add a dummy member to avoid compiler
10919 errors.
10920
d5749ee7
PA
109212013-07-01 Pedro Alves <palves@redhat.com>
10922
10923 * hostio.c (HOSTIO_PATH_MAX): Define.
10924 (require_filename, handle_open, handle_unlink, handle_readlink):
10925 Use it.
10926
d8d2a3ee
PA
109272013-07-01 Pedro Alves <palves@redhat.com>
10928
10929 * server.h: Include "pathmax.h".
10930 * linux-low.c: Don't include sys/param.h.
10931 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10932 MAXPATHLEN.
10933 * win32-low.c: Don't include sys/param.h.
10934 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10935
bc7dea8d
PA
109362013-07-01 Pedro Alves <palves@redhat.com>
10937
10938 * event-loop.c: Don't check HAVE_UNISTD_H before including
10939 <unistd.h>.
10940 * gdbreplay.c: Likewise.
10941 * remote-utils.c: Likewise.
10942 * server.c: Likewise.
10943 * configure.ac: Don't check for unistd.h.
10944 * configure: Regenerate.
10945
d6c2da54
TT
109462013-06-28 Tom Tromey <tromey@redhat.com>
10947
10948 * Makefile.in (version.c): Use version.in, not
10949 common/version.in.
10950
257b6bec
MG
109512013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10952
10953 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10954 * configure: Rebuild.
10955 * Makefile.in (version_host, version_target): Get from configure.
10956 (version.c): Use $(version_host) and $(version_target).
10957
86ebe149
DK
109582013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10959
10960 Fix trace-status to output user name without trailing colon.
10961 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10962
f30aa5af
DK
109632013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10964
10965 Fix trace-status to output proper start-time and stop-time.
10966 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10967 output start time and stop time in hex as gdb expects.
10968
28a93511
YQ
109692013-06-26 Pedro Alves <pedro@codesourcery.com>
10970
10971 * tracepoint.c (build_traceframe_info_xml): Output trace state
10972 variables present in the trace buffer.
10973
01208463
TT
109742013-06-24 Tom Tromey <tromey@redhat.com>
10975
10976 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10977 create-version.sh.
10978 (version.o): Remove.
10979 * gdbreplay.c: Include version.h.
10980 (version, host_name): Don't declare.
10981 * server.h: Include version.h.
10982 (version, host_name): Don't declare.
10983
760256f9
PA
109842013-06-12 Pedro Alves <palves@redhat.com>
10985
10986 * linux-x86-low.c (linux_is_elf64): Delete global.
10987 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10988 with local linux_pid_exe_is_elf_64_file use.
10989
030031ee
PA
109902013-06-11 Pedro Alves <palves@redhat.com>
10991
10992 * linux-low.c (regset_disabled, disable_regset): New functions.
10993 (regsets_fetch_inferior_registers)
10994 (regsets_store_inferior_registers): Use them.
10995 (initialize_regsets_info); Don't allocate the disabled_regsets
10996 array here.
10997 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10998 comment.
10999
5da6eb0a
PA
110002013-06-11 Pedro Alves <palves@redhat.com>
11001
11002 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11003 xmalloc.
11004
7e5aaa09
PA
110052013-06-11 Pedro Alves <palves@redhat.com>
11006
11007 * linux-x86-low.c (initialize_low_arch): Call
11008 init_registers_x32_avx_linux.
11009
d878444c
JK
110102013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11011
11012 Fix compatibility with Android Bionic.
11013 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11014 it is not empty.
11015
3aee8918
PA
110162013-06-07 Pedro Alves <palves@redhat.com>
11017
5f2b57b5 11018 PR server/14823
3aee8918
PA
11019 * Makefile.in (OBS): Add tdesc.o.
11020 (IPA_OBJS): Add tdesc-ipa.o.
11021 (tdesc-ipa.o): New rule.
11022 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11023 interface.
11024 * linux-low.c (new_inferior): Delete.
11025 (disabled_regsets, num_regsets): Delete.
11026 (linux_add_process): Adjust to set the new per-process
11027 new_inferior flag.
11028 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11029 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11030 was a stop. When calling arch_setup, switch the current inferior
11031 to the thread that got an event.
11032 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11033 (regsets_fetch_inferior_registers)
11034 (regsets_store_inferior_registers): New regsets_info parameter.
11035 Adjust to use it.
11036 (linux_register_in_regsets): New regs_info parameter. Adjust to
11037 use it.
11038 (register_addr, fetch_register, store_register): New usrregs_info
11039 parameter. Adjust to use it.
11040 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11041 parameter regs_info. Adjust to use it.
11042 (linux_fetch_registers): Get the current inferior's regs_info, and
11043 adjust to use it.
11044 (linux_store_registers): Ditto.
11045 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11046 (initialize_low): Don't initialize the target_regsets here. Call
11047 initialize_low_arch.
11048 * linux-low.h (target_regsets): Delete declaration.
11049 (struct regsets_info): New.
11050 (struct usrregs_info): New.
11051 (struct regs_info): New.
11052 (struct process_info_private) <new_inferior>: New field.
11053 (struct linux_target_ops): Delete the num_regs, regmap, and
11054 regset_bitmap fields. New field regs_info.
11055 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11056 * i387-fp.c (num_xmm_registers): Delete.
11057 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11058 calls to new interface.
11059 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11060 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11061 Infer the number of xmm registers from the regcache's target
11062 description.
11063 * i387-fp.h (num_xmm_registers): Delete.
11064 * inferiors.c (add_thread): Don't install the thread's regcache
11065 here.
11066 * proc-service.c (gregset_info): Fetch the current inferior's
11067 regs_info. Adjust to use it.
11068 * regcache.c: Include tdesc.h.
11069 (register_bytes, reg_defs, num_registers)
11070 (gdbserver_expedite_regs): Delete.
11071 (get_thread_regcache): If the thread doesn't have a regcache yet,
11072 create one, instead of aborting gdbserver.
11073 (regcache_invalidate_one): Rename to ...
11074 (regcache_invalidate_thread): ... this.
11075 (regcache_invalidate_one): New.
11076 (regcache_invalidate): Only invalidate registers of the current
11077 process.
11078 (init_register_cache): Add target_desc parameter, and use it.
11079 (new_register_cache): Ditto. Assert the target description has a
11080 non zero registers_size.
11081 (regcache_cpy): Add assertions. Adjust.
11082 (realloc_register_cache, set_register_cache): Delete.
11083 (registers_to_string, registers_from_string): Adjust.
11084 (find_register_by_name, find_regno, find_register_by_number)
11085 (register_cache_size): Add target_desc parameter, and use it.
11086 (free_register_cache_thread, free_register_cache_thread_one)
11087 (regcache_release, register_cache_size): New.
11088 (register_size): Add target_desc parameter, and use it.
11089 (register_data, supply_register, supply_register_zeroed)
11090 (supply_regblock, supply_register_by_name, collect_register)
11091 (collect_register_as_string, collect_register_by_name): Adjust.
11092 * regcache.h (struct target_desc): Forward declare.
11093 (struct regcache) <tdesc>: New field.
11094 (init_register_cache, new_register_cache): Add target_desc
11095 parameter.
11096 (regcache_invalidate_thread): Declare.
11097 (regcache_invalidate_one): Delete declaration.
11098 (regcache_release): Declare.
11099 (find_register_by_number, register_cache_size, register_size)
11100 (find_regno): Add target_desc parameter.
11101 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11102 declarations.
11103 * remote-utils.c: Include tdesc.h.
11104 (outreg, prepare_resume_reply): Adjust.
11105 * server.c: Include tdesc.h.
11106 (gdbserver_xmltarget): Delete declaration.
11107 (get_features_xml, process_serial_event): Adjust.
11108 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11109 declare.
11110 (struct process_info) <tdesc>: New field.
11111 (ipa_tdesc): Declare.
11112 * tdesc.c: New file.
11113 * tdesc.h: New file.
11114 * tracepoint.c: Include tdesc.h.
11115 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11116 (get_context_regcache): Adjust to pass ipa_tdesc down.
11117 (do_action_at_tracepoint): Adjust to get the register cache size
11118 from the context regcache's description.
11119 (traceframe_walk_blocks): Adjust to get the register cache size
11120 from the current trace frame's description.
11121 (traceframe_get_pc): Adjust to get current trace frame's
11122 description and pass it down.
11123 (gdb_collect): Adjust to get the register cache size from the
11124 IPA's description.
11125 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11126 (gdbserver_xmltarget): Delete.
11127 (initialize_low_tracepoint): Set the ipa's target description.
11128 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11129 (initialize_low_tracepoint): Set the ipa's target description.
11130 * linux-x86-low.c: Include tdesc.h.
11131 [__x86_64__] (is_64bit_tdesc): New.
11132 (ps_get_thread_area, x86_get_thread_area): Use it.
11133 (i386_cannot_store_register): Rename to ...
11134 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11135 (i386_cannot_fetch_register): Rename to ...
11136 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11137 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11138 to new interface.
11139 (target_regsets): Rename to ...
11140 (x86_regsets): ... this.
11141 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11142 interface.
11143 (x86_siginfo_fixup): Use is_64bit_tdesc.
11144 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11145 (tdesc_x32_avx_linux, tdesc_x32_linux)
11146 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11147 Declare.
11148 (x86_linux_update_xmltarget): Delete.
11149 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11150 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11151 (AMD64_LINUX_USER64_CS): New.
11152 (x86_linux_read_description): New, based on
11153 x86_linux_update_xmltarget.
11154 (same_process_callback): New.
11155 (x86_arch_setup_process_callback): New.
11156 (x86_linux_update_xmltarget): New.
11157 (x86_regsets_info): New.
11158 (amd64_linux_regs_info): New.
11159 (i386_linux_usrregs_info): New.
11160 (i386_linux_regs_info): New.
11161 (x86_linux_regs_info): New.
11162 (x86_arch_setup): Reimplement.
11163 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11164 (x86_emit_ops): Ditto.
11165 (the_low_target): Adjust. Install x86_linux_regs_info,
11166 x86_cannot_fetch_register, and x86_cannot_store_register.
11167 (initialize_low_arch): New.
11168 * linux-ia64-low.c (tdesc_ia64): Declare.
11169 (ia64_fetch_register): Adjust.
11170 (ia64_usrregs_info, regs_info): New globals.
11171 (ia64_regs_info): New function.
11172 (the_low_target): Adjust.
11173 (initialize_low_arch): New function.
11174 * linux-sparc-low.c (tdesc_sparc64): Declare.
11175 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11176 Adjust.
11177 (sparc_arch_setup): New function.
11178 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11179 (the_low_target): Adjust.
11180 (initialize_low_arch): New function.
11181 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11182 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11183 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11184 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11185 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11186 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11187 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11188 (tdesc_powerpc_isa205_vsx64l): Declare.
11189 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11190 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11191 (ppc_set_pc, ppc_get_hwcap): Adjust.
11192 (ppc_usrregs_info): Forward declare.
11193 (!__powerpc64__) ppc_regmap_adjusted: New global.
11194 (ppc_arch_setup): Adjust to the current process'es target
11195 description.
11196 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11197 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11198 (ppc_store_evrregset): Adjust.
11199 (target_regsets): Rename to ...
11200 (ppc_regsets): ... this, and make static.
11201 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11202 (ppc_regs_info): New function.
11203 (the_low_target): Adjust.
11204 (initialize_low_arch): New function.
11205 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11206 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11207 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11208 (tdesc_s390x_linux64v2): Declare.
11209 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11210 (s390_fill_gregset, s390_store_last_break): Adjust.
11211 (target_regsets): Rename to ...
11212 (s390_regsets): ... this, and make static.
11213 (s390_get_pc, s390_set_pc): Adjust.
11214 (s390_get_hwcap): New target_desc parameter, and use it.
11215 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11216 (s390_arch_setup): Adjust to set the current process'es target
11217 description. Don't adjust the regmap.
11218 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11219 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11220 (regs_info_3264): New globals.
11221 (s390_regs_info): New function.
11222 (the_low_target): Adjust.
11223 (initialize_low_arch): New function.
11224 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11225 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11226 [__mips64] (init_registers_mips_linux)
11227 (init_registers_mips_dsp_linux): Delete defines.
11228 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11229 (have_dsp): New global.
11230 (mips_read_description): New, based on mips_arch_setup.
11231 (mips_arch_setup): Reimplement.
11232 (get_usrregs_info): New function.
11233 (mips_cannot_fetch_register, mips_cannot_store_register)
11234 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11235 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11236 (target_regsets): Rename to ...
11237 (mips_regsets): ... this, and make static.
11238 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11239 (dsp_regs_info, regs_info): New globals.
11240 (mips_regs_info): New function.
11241 (the_low_target): Adjust.
11242 (initialize_low_arch): New function.
11243 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11244 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11245 Declare.
11246 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11247 (arm_read_description): New, with bits factored from
11248 arm_arch_setup.
11249 (arm_arch_setup): Reimplement.
11250 (target_regsets): Rename to ...
11251 (arm_regsets): ... this, and make static.
11252 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11253 (arm_regs_info): New function.
11254 (the_low_target): Adjust.
11255 (initialize_low_arch): New function.
11256 * linux-m68k-low.c (tdesc_m68k): Declare.
11257 (target_regsets): Rename to ...
11258 (m68k_regsets): ... this, and make static.
11259 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11260 (m68k_regs_info): New function.
11261 (m68k_arch_setup): New function.
11262 (the_low_target): Adjust.
11263 (initialize_low_arch): New function.
11264 * linux-sh-low.c (tdesc_sharch): Declare.
11265 (target_regsets): Rename to ...
11266 (sh_regsets): ... this, and make static.
11267 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11268 (sh_regs_info, sh_arch_setup): New functions.
11269 (the_low_target): Adjust.
11270 (initialize_low_arch): New function.
11271 * linux-bfin-low.c (tdesc_bfin): Declare.
11272 (bfin_arch_setup): New function.
11273 (bfin_usrregs_info, regs_info): New globals.
11274 (bfin_regs_info): New function.
11275 (the_low_target): Adjust.
11276 (initialize_low_arch): New function.
11277 * linux-cris-low.c (tdesc_cris): Declare.
11278 (cris_arch_setup): New function.
11279 (cris_usrregs_info, regs_info): New globals.
11280 (cris_regs_info): New function.
11281 (the_low_target): Adjust.
11282 (initialize_low_arch): New function.
11283 * linux-cris-low.c (tdesc_crisv32): Declare.
11284 (cris_arch_setup): New function.
11285 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11286 (cris_regs_info): New function.
11287 (the_low_target): Adjust.
11288 (initialize_low_arch): New function.
11289 * linux-m32r-low.c (tdesc_m32r): Declare.
11290 (m32r_arch_setup): New function.
11291 (m32r_usrregs_info, regs_info): New globals.
11292 (m32r_regs_info): Adjust.
11293 (initialize_low_arch): New function.
11294 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11295 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11296 (tic6x_usrregs_info): Forward declare.
11297 (tic6x_read_description): New function, based on ...
11298 (tic6x_arch_setup): ... this. Reimplement.
11299 (target_regsets): Rename to ...
11300 (tic6x_regsets): ... this, and make static.
11301 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11302 (tic6x_regs_info): New function.
11303 (the_low_target): Adjust.
11304 (initialize_low_arch): New function.
11305 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11306 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11307 (target_regsets): Rename to ...
11308 (xtensa_regsets): ... this, and make static.
11309 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11310 globals.
11311 (xtensa_arch_setup, xtensa_regs_info): New functions.
11312 (the_low_target): Adjust.
11313 (initialize_low_arch): New function.
11314 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11315 (nios2_arch_setup): Set the current process'es tdesc.
11316 (target_regsets): Rename to ...
11317 (nios2_regsets): ... this.
11318 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11319 (nios2_regs_info): New function.
11320 (the_low_target): Adjust.
11321 (initialize_low_arch): New function.
a261b8f5
PA
11322 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11323 (aarch64_arch_setup): Set the current process'es tdesc.
11324 (target_regsets): Rename to ...
11325 (aarch64_regsets): ... this.
11326 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11327 (aarch64_regs_info): New function.
11328 (the_low_target): Adjust.
11329 (initialize_low_arch): New function.
3aee8918
PA
11330 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11331 globals.
11332 (target_regsets): Rename to ...
11333 (tile_regsets): ... this.
11334 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11335 (tile_regs_info): New function.
11336 (tile_arch_setup): Set the current process'es tdesc.
11337 (the_low_target): Adjust.
11338 (initialize_low_arch): New function.
11339 * spu-low.c (tdesc_spu): Declare.
11340 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11341 * win32-arm-low.c (tdesc_arm): Declare.
11342 (arm_arch_setup): New function.
11343 (the_low_target): Install arm_arch_setup instead of
11344 init_registers_arm.
11345 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11346 (init_windows_x86): Rename to ...
11347 (i386_arch_setup): ... this. Set `win32_tdesc'.
11348 (the_low_target): Adjust.
11349 * win32-low.c (win32_tdesc): New global.
11350 (child_add_thread): Don't create the thread cache here.
11351 (do_initial_child_stuff): Set the new process'es tdesc.
11352 * win32-low.h (struct target_desc): Forward declare.
11353 (win32_tdesc): Declare.
11354 * lynx-i386-low.c (tdesc_i386): Declare global.
11355 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11356 * lynx-low.c (lynx_tdesc): New global.
11357 (lynx_add_process): Set the new process'es tdesc.
11358 * lynx-low.h (struct target_desc): Forward declare.
11359 (lynx_tdesc): Declare global.
11360 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11361 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11362 * nto-low.c (nto_tdesc): New global.
11363 (do_attach): Set the new process'es tdesc.
11364 * nto-low.h (struct target_desc): Forward declare.
11365 (nto_tdesc): Declare.
11366 * nto-x86-low.c (tdesc_i386): Declare.
11367 (nto_x86_arch_setup): Set `nto_tdesc'.
11368
b1fbec62
GB
113692013-06-04 Gary Benson <gbenson@redhat.com>
11370
11371 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11372 to qSupported response when appropriate.
11373 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11374 with nonzero-length annex.
11375 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11376 arguments supplied in annex.
11377
d1ec4ce7
DE
113782013-05-31 Doug Evans <dje@google.com>
11379
ac44adcb 11380 PR server/15594
d1ec4ce7
DE
11381 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11382 64 bits in 64-cross-32 environment.
11383
9b25f2d3
PA
113842013-05-28 Pedro Alves <palves@redhat.com>
11385
11386 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11387 (aarch64-without-fpu.c): Delete rule.
11388 * configure.srv (aarch64*-*-linux*): Remove references to
11389 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11390 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11391 declaration.
11392
6740dc9c
PA
113932013-05-24 Pedro Alves <palves@redhat.com>
11394
11395 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11396 instead of strchr/decode_address. Error if the range isn't split
11397 with a ','. Don't assume there's be a ':' in the action.
11398
c2d6af84
PA
113992013-05-23 Yao Qi <yao@codesourcery.com>
11400 Pedro Alves <palves@redhat.com>
11401
11402 * linux-low.c (lwp_in_step_range): New function.
11403 (linux_wait_1): If the thread was range stepping and stopped
11404 outside the stepping range, report the stop to GDB. Otherwise,
11405 continue stepping. Add range stepping debug output.
11406 (linux_set_resume_request): Copy the step range from the resume
11407 request to the lwp.
11408 (linux_supports_range_stepping): New.
11409 (linux_target_ops) <supports_range_stepping>: Set to
11410 linux_supports_range_stepping.
11411 * linux-low.h (struct linux_target_ops)
11412 <supports_range_stepping>: New field.
11413 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11414 * linux-x86-low.c (x86_supports_range_stepping): New.
11415 (the_low_target) <supports_range_stepping>: Set to
11416 x86_supports_range_stepping.
11417 * server.c (handle_v_cont): Handle 'r' action.
11418 (handle_v_requests): Append ";r" if the target supports range
11419 stepping.
11420 * target.h (struct thread_resume) <step_range_start,
11421 step_range_end>: New fields.
11422 (struct target_ops) <supports_range_stepping>:
11423 New field.
11424 (target_supports_range_stepping): New macro.
11425
58794e1a
JB
114262013-05-17 Joel Brobecker <brobecker@adacore.com>
11427
11428 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11429 confusion in comment.
11430
d631c5a7
JB
114312013-05-17 Joel Brobecker <brobecker@adacore.com>
11432
11433 * lynx-low.c (struct process_info_private): New type.
11434 (lynx_add_process): New function.
11435 (lynx_create_inferior, lynx_attach): Replace calls to
11436 add_process by calls to lynx_add_process.
11437 (lynx_resume): If PTID is null, then try using
11438 current_process()->private->last_wait_event_ptid.
11439 Add comments.
11440 (lynx_clear_inferiors): Delete. The contents of that function
11441 has been inlined in lynx_mourn;
11442 (lynx_wait_1): Save the ptid in the process's private data.
11443 (lynx_mourn): Free the process' private data. Replace call
11444 to lynx_clear_inferiors by call to clear_inferiors.
11445
96f7a20f
YQ
114462013-05-17 Yao Qi <yao@codesourcery.com>
11447
11448 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11449 the right place.
11450
db0dfaa0
LM
114512013-05-16 Luis Machado <lgustavo@codesourcery.com>
11452
11453 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11454 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11455 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11456 PT_TEXT_END_ADDR guards. Update comments.
11457 (linux_target_op) <read_offsets>: Conditionally define to
11458 linux_read_offsets if the target is UCLIBC and if it defines
11459 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11460
68f5f838
SL
114612013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11462 Andrew Jenner <andrew@codesourcery.com>
11463
11464 * Makefile.in (SFILES): Add linux-nios2-low.c.
11465 (clean): Add action to delete nios2-linux.c.
11466 (nios2-linux.c): New rule.
11467 * configure.srv: Add nios2*-*-linux*.
11468 * linux-nios2-low.c: New.
11469
1ebff1fd
HAQ
114702013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11471
11472 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11473
f6150862
HZ
114742013-04-25 Hui Zhu <hui@codesourcery.com>
11475
11476 PR gdb/15186
f6150862
HZ
11477 * ax.c (ax_printf): Add fflush.
11478
614c279d
TT
114792013-04-22 Tom Tromey <tromey@redhat.com>
11480
11481 * Makefile.in (SFILES): Add filestuff.c.
11482 (OBS): Add filestuff.o.
11483 (filestuff.o): New target.
11484 * config.in, configure: Rebuild.
11485 * configure.ac: Check for fdwalk, pipe2.
11486
7d4e5717
PA
114872013-04-17 Pedro Alves <palves@redhat.com>
11488
11489 * configure.ac (USE_THREAD_DB): Delete variable.
11490 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11491 Don't AC_SUBST USE_THREAD_DB.
11492 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11493 * config.in, configure: Regenerate.
11494
d5c93e41
PA
114952013-04-16 Pedro Alves <palves@redhat.com>
11496
11497 * linux-low.h (struct lwp_info) <thread_known>: Move under
11498 the USE_THREAD_DB #ifdef.
11499
04f5fe89
PA
115002013-04-16 Pedro Alves <palves@redhat.com>
11501
11502 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11503 (linux-low.o): Delete rule.
11504 * linux-low.h: Always include "gdb_thread_db.h" instead of
11505 conditionally including thread_db.h.
11506 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11507 HAVE_THREAD_DB_H.
11508
480b27bf
JK
115092013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11510
11511 * Makefile.in (install-only): Fix make install regression.
11512
43662968
JK
115132013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11514
11515 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11516 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11517 installation.
11518 * gdbserver.1: Remove.
11519
3e74e146
PA
115202013-03-22 Pedro Alves <palves@redhat.com>
11521
11522 * linux-low.c (handle_extended_wait): Don't call
11523 linux_enable_event_reporting.
11524
a8347a2a
TT
115252013-03-15 Tony Theodore <tonyt@logyst.com>
11526
11527 PR build/9098:
11528 * Makefile.in (SHELL): Use @SHELL@.
11529
eeb56fa7
SDJ
115302013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11531
11532 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11533 compiler warning.
11534
4fa7e2ff
JB
115352013-03-13 Joel Brobecker <brobecker@adacore.com>
11536
11537 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11538 Remove extraneous NULL element.
11539
8ddb1965
YQ
115402013-03-13 Yao Qi <yao@codesourcery.com>
11541
11542 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11543 'V' block in trace frame.
11544
9accd112
MM
115452013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11546
11547 * target.h (struct target_ops): Add btrace ops.
11548 (target_supports_btrace): New macro.
11549 (target_enable_btrace): New macro.
11550 (target_disable_btrace): New macro.
11551 (target_read_btrace): New macro.
11552 * gdbthread.h (struct thread_info): Add btrace field.
11553 * server.c: Include btrace-common.h.
11554 (handle_btrace_general_set): New function.
11555 (handle_btrace_enable): New function.
11556 (handle_btrace_disable): New function.
11557 (handle_general_set): Call handle_btrace_general_set.
11558 (handle_qxfer_btrace): New function.
11559 (struct qxfer qxfer_packets[]): Add btrace entry.
11560 * inferiors.c (remove_thread): Disable btrace.
11561 * linux-low: Include linux-btrace.h.
11562 (linux_low_enable_btrace): New function.
11563 (linux_low_read_btrace): New function.
11564 (linux_target_ops): Add btrace ops.
11565 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11566 Add srv_linux_btrace=yes.
11567 (x86_64-*-linux*): Add linux-btrace.o.
11568 Add srv_linux_btrace=yes.
11569 * configure.ac: Define HAVE_LINUX_BTRACE.
11570 * config.in: Regenerated.
11571 * configure: Regenerated.
11572
5cc22e4c
MM
115732013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11574
11575 * server.c (handle_qxfer): Preserve error message if -3 is
11576 returned.
11577 (qxfer): Document the -3 return value.
11578
7c97f91e
MM
115792013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11580
11581 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11582 (linux_btrace_h): New variable.
11583 (linux-btrace.o): New rule.
11584
be9a119c 115852013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
11586 Hafiz Abid Qadeer <abidh@codesourcery.com>
11587
11588 * tracepoint.c (trace_buffer_size): New global.
11589 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11590 (init_trace_buffer): Change to one-argument function. Allocate
11591 trace buffer memory.
11592 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11593 handle QTBuffer:size packet.
11594 (cmd_bigqtbuffer_size): New function.
11595 (initialize_tracepoint): Call init_trace_buffer with
11596 DEFAULT_TRACE_BUFFER_SIZE.
11597 * server.c (handle_query): Add QTBuffer:size in the
11598 supported packets.
11599
e64f7499
YQ
116002013-03-07 Yao Qi <yao@codesourcery.com>
11601
11602 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11603 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11604 of -1.
11605 (cmd_qtsp): Adjust condition. Do post increment.
11606 Set cur_action and cur_step_action back to 0.
11607
f0ae6fc3
PA
116082013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11609
11610 PR server/15236
11611 * linux-low.c (linux_write_memory): Return early success if LEN is
11612 zero.
11613
b5b0b0af
CV
116142013-03-05 Corinna Vinschen <vinschen@redhat.de>
11615
334ad4a8 11616 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 11617
589bc927
TT
116182013-02-28 Tom Tromey <tromey@redhat.com>
11619
11620 * configure.ac: Invoke AC_SYS_LARGEFILE.
11621 * configure, config.in: Rebuild.
11622
dfe07582
CV
116232013-02-28 Corinna Vinschen <vinschen@redhat.com>
11624
11625 * win32-low.c: Throughout, fix format strings and casts of
11626 printf-like functions to avoid type related warnings on all
11627 platforms.
11628 (get_child_debug_event): Print dwDebugEventCode as hex since
11629 that's how it's usually documented.
11630
736cd585
YQ
116312013-02-28 Yao Qi <yao@codesourcery.com>
11632
11633 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11634 pulongest.
11635
e1f58301
JW
116362013-02-27 Jiong Wang <jiwang@tilera.com>
11637
11638 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11639 (reg-tilegx32.c): New rule.
11640 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11641 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11642 different register info initializer according to elf class.
11643 (init_registers_tilgx32): New function. The tilegx32 register info
11644 initializer.
11645 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11646 (tile_store_gregset): Likewise.
11647
d171ca78
YQ
116482013-02-27 Yao Qi <yao@codesourcery.com>
11649
11650 * server.c (process_point_options): Print debug message when
11651 debug_threads is true.
11652
282bbdf3
YQ
116532013-02-26 Yao Qi <yao@codesourcery.com>
11654
11655 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11656
aca22551
PA
116572013-02-19 Pedro Alves <palves@redhat.com>
11658 Kai Tietz <ktietz@redhat.com>
11659
11660 PR gdb/15161
11661
11662 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11663 instead of strtoul to extract address from packet.
11664 (process_serial_event) <'z'>: Likewise.
11665
4f3cee1c
YQ
116662013-02-18 Yao Qi <yao@codesourcery.com>
11667
11668 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11669
8e1d55a3
PA
116702013-02-14 Pedro Alves <palves@redhat.com>
11671
11672 Plug memory leak.
11673
11674 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11675 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11676
458820da
PA
116772013-02-14 Pedro Alves <palves@redhat.com>
11678
11679 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11680
baea0dae
PA
116812013-02-14 Pedro Alves <palves@redhat.com>
11682
11683 * tracepoint.c (save_string): Delete.
11684 (add_tracepoint_action): Use savestring instead of save_string.
11685
0b1afbb3
PA
116862013-02-12 Pedro Alves <palves@redhat.com>
11687
11688 * linux-xtensa-low.c: Ditto.
11689 * xtensa-xtregs.c: Ditto.
11690
8a4ac37e
PA
116912013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11692
11693 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11694 thread_db.
11695
148de6bb
MS
116962013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11697
11698 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11699 aarch64_num_wp_regs and aarch64_num_bp_regs to
11700 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11701
55fac6e0
MS
117022013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11703
11704 * linux-aarch64-low.c (ps_get_thread_area): Replace
11705 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11706
176eb98c
MS
117072013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11708 Marcus Shawcroft <marcus.shawcroft@arm.com>
11709 Nigel Stephens <nigel.stephens@arm.com>
11710 Yufeng Zhang <yufeng.zhang@arm.com>
11711
11712 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11713 (aarch64.c, aarch64-without-fpu.c): New targets.
11714 * configure.srv (aarch64*-*-linux*): New.
11715 * linux-aarch64-low.c: New file.
11716
56f7af9c
MS
117172013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11718
43aaf8b6 11719 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
11720 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11721 (dequeue_one_deferred_signal, linux_resume_one_thread)
11722 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11723 (linux_tracefork_grandchild, linux_test_for_tracefork)
11724 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11725 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11726 where the argument is 0.
11727
60f662b0
YQ
117282013-01-25 Yao Qi <yao@codesourcery.com>
11729
11730 * event-loop.c: Include "queue.h".
11731 (gdb_event_p): New typedef.
11732 (struct gdb_event) <next_event>: Remove.
11733 (event_queue): Change to QUEUE(gdb_event_p).
11734 (async_queue_event): Remove.
11735 (gdb_event_xfree): New.
11736 (initialize_event_loop): New.
11737 (process_event): Use API from QUEUE.
11738 (wait_for_event): Likewise.
11739 * server.c (main): Call initialize_event_loop.
11740 * server.h (initialize_event_loop): Declare.
11741
5ae4861a
YQ
117422013-01-18 Yao Qi <yao@codesourcery.com>
11743
11744 * ax.h (struct eval_agent_expr_context): New.
11745 (gdb_eval_agent_expr): Update declaration.
11746 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11747 TFRAME. Add new argument CTX.
11748 * server.h (struct eval_agent_expr_context): Declare.
11749 (agent_mem_read, agent_tsv_read): Update declaration.
11750 (agent_mem_read_string): Likewise.
11751 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11752 (add_traceframe_block): Add new argument TPOINT.
11753 Increase TPOINT->traceframe_usage.
11754 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11755 eval_tracepoint_agent_expr.
11756 (condition_true_at_tracepoint): Likewise.
11757 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11758 (agent_mem_read_string, agent_tsv_read): Likewise.
11759
85e00e85
YQ
117602013-01-16 Yao Qi <yao@codesourcery.com>
11761
11762 * linux-low.c (linux_resume_one_lwp): Don't check
11763 'lwp->bp_reinsert != 0'.
11764
4039cf45
JB
117652013-01-07 Joel Brobecker <brobecker@adacore.com>
11766 Pedro Alves <palves@redhat.com>
11767
11768 * lynx-low.c (ptrace_request_to_str): Define a temporary
11769 macro and use it to simplify this function's implementation.
11770
9044dee2
JB
117712013-01-07 Joel Brobecker <brobecker@adacore.com>
11772
11773 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11774 sets errno.
11775
e6352c8f
JB
117762013-01-07 Joel Brobecker <brobecker@adacore.com>
11777
11778 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11779
50681a27
JB
117802013-01-07 Joel Brobecker <brobecker@adacore.com>
11781
11782 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11783
3f6e77ef
JB
117842013-01-07 Joel Brobecker <brobecker@adacore.com>
11785
11786 * lynx-low.c (lynx_resume): Use the resume_info parameter
11787 to determine the ptid for the lynx_ptrace call, unless
11788 it is equal to minus_one_ptid, in which case we use the
11789 ptid of the current_inferior.
11790 (lynx_wait_1): After having received a thread create/exit
11791 event, resume the inferior's execution using the signaling
11792 thread's ptid, rather than the old ptid.
11793
7fda33ae
JB
117942013-01-07 Joel Brobecker <brobecker@adacore.com>
11795
11796 * lynx-low.c (lynx_resume): Delete variable ret.
11797
b9786c74
JB
117982013-01-01 Joel Brobecker <brobecker@adacore.com>
11799
11800 * gdbreplay.c (gdbreplay_version): Update copyright year.
11801 * server.c (gdbserver_version): Likewise.
11802
8b93d60f
JB
118032012-12-17 Joel Brobecker <brobecker@adacore.com>
11804
11805 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11806 new thread.
11807
037335a7
JB
118082012-12-17 Joel Brobecker <brobecker@adacore.com>
11809
11810 * lynx-low.c (ptrace_request_to_str): Add handling for
11811 PTRACE_GETTRACESIG.
11812
52d4cbd8
JB
118132012-12-17 Joel Brobecker <brobecker@adacore.com>
11814
11815 * lynx-low.c (lynx_attach): Delete variable new_process.
11816
ab8f6ca9
JB
118172012-12-17 Joel Brobecker <brobecker@adacore.com>
11818
11819 * lynx-low.c (lynx_create_inferior): Delete variable
11820 new_process.
11821
78cbc024
JB
118222012-12-17 Joel Brobecker <brobecker@adacore.com>
11823
11824 * lynx-low.c (ptrace_request_to_str): Do not handle
11825 PTRACE_GETTHREADLIST if this macro does not exist.
11826
14a00470
YQ
118272012-12-15 Yao Qi <yao@codesourcery.com>
11828
11829 * Makefile.in (OBS): Add notif.o.
11830 * notif.c, notif.h: New.
11831 * server.c: Include "notif.h".
11832 (struct vstop_notif) <next>: Remove.
11833 <base>: New field.
11834 (queue_stop_reply): Update.
11835 (push_event, send_next_stop_reply): Remove.
11836 (discard_queued_stop_replies): Update.
11837 (notif_stop): New variable.
11838 (handle_v_stopped): Remove.
11839 (handle_v_requests): Don't call handle_v_stopped. Call
11840 handle_ack_notif instead.
11841 (queue_stop_reply_callback): Call notif_event_enque instead
11842 of queue_stop_reply.
11843 (handle_status): Don't call send_next_stop_reply, call
11844 notif_write_event instead.
11845 (kill_inferior_callback): Likewise.
11846 (detach_or_kill_inferior_callback): Likewise.
11847 (main): Call initialize_notif.
11848 (process_serial_event): Call QUEUE_is_empty.
11849 (handle_target_event): Call notif_push instead of push event.
11850 * server.h (push_event): Remove declaration.
11851
61c125b9
TT
118522012-12-10 Tom Tromey <tromey@redhat.com>
11853
11854 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11855 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11856 macros.
11857 (.c.o): Rewrite.
11858 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11859 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11860 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11861 (amd64-linux-ipa.o, ax.o): Rewrite.
11862 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11863 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11864 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11865 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11866 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11867 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11868 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11869 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11870 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11871 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11872 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11873 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11874 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11875 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11876 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11877 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11878 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11879 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11880 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11881 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11882 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11883 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11884 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11885 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11886 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11887 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11888 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11889 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11890 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11891 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11892 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11893 (reg-tilegx.o): Remove.
11894 (all_object_files): New macro.
11895 Include .deps files.
11896 * aclocal.m4, configure: Rebuild.
11897 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11898 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11899 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11900
e90e9ad9
TT
119012012-12-05 Tom Tromey <tromey@redhat.com>
11902
11903 PR gdb/14917:
11904 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11905
02d403bf 119062012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
11907
11908 * configure.ac: Check for linux/perf_event.h.
11909 * config.in: Regenerated.
11910 * configure: Regenerated.
11911
0270a750
PA
119122012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11913
11914 * hostio.c (handle_readlink): Decrease buffer size
11915 parameter passed to readlink by one byte.
11916
8c29b58e
YQ
119172012-11-26 Yao Qi <yao@codesourcery.com>
11918
11919 * configure.ac (build_warnings): Append '-Wempty-body'.
11920 * configure: Regenerated.
11921 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11922 body.
11923
8bdce1ff
PM
119242012-11-15 Pierre Muller <muller@sourceware.org>
11925
11926 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11927 * config.in: Regenerate.
11928 * configure: Regenerate.
11929 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11930 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11931 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11932 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11933 header.
11934 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11935 instead of <sys/wait.h> header.
11936 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11937
02d403bf 119382012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
11939
11940 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11941 (various make rules): Remove -DGDBSERVER
11942
fbd5db48
YQ
119432012-11-09 Yao Qi <yao@codesourcery.com>
11944
11945 * spu-low.c (current_ptid): Move it to ..
11946 * gdbthread.h: ... here. New.
11947 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11948 * server.c (myresume, process_serial_event): Likewise.
11949 * thread-db.c (thread_db_find_new_threads): Likewise.
11950 * tracepoint.c (run_inferior_command): Likewise.
11951
b3dc46ff
AB
119522012-10-01 Andrew Burgess <aburgess@broadcom.com>
11953
11954 * server.c (handle_search_memory_1): Include access length in
11955 warning message.
11956
07c04788
HPN
119572012-09-05 Michael Brandt <michael.brandt@axis.com>
11958
11959 * linux-crisv32-low.c: Fix compile errors.
11960
918d227b
YQ
119612012-09-04 Yao Qi <yao@codesourcery.com>
11962
11963 * tracepoint.c (cmd_qtsv): Adjust debug message.
11964 Don't check CUR_TPOINT.
11965
18c1b81a
YQ
119662012-08-28 Yao Qi <yao@codesourcery.com>
11967
11968 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11969 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11970 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11971 Remove declarations of xmalloc, xreallloc, xstrdup and
11972 freeargv.
11973 * Makefile.in (libiberty_h): New.
11974 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11975 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11976
dc82f37b
YQ
119772012-08-23 Yao Qi <yao@codesourcery.com>
11978
11979 * server.h: Remove declaration of 'xsnprintf'.
11980
406b1477
KS
119812012-08-22 Keith Seitz <keiths@redhat.com>
11982
11983 * server.h: Include build-gnulib-gbserver/config.h.
11984 * gdbreplay.c: Likewise.
11985
e6712ff1
DE
119862012-08-08 Doug Evans <dje@google.com>
11987
11988 * Makefile.in (SFILES): Add gdb_vecs.c.
11989 (OBS): Add gdb_vecs.o.
11990 (gdb_vecs_h, host_defs_h): New variables.
11991 (thread-db.o): Add $(gdb_vecs_h) dependency.
11992 (gdb_vecs.o): New rule.
11993 * thread-db.c: #include "gdb_vecs.h".
11994 (thread_db_load_search): Use a vector to iterate over path elements.
11995 Handle text appearing after "$pdir".
11996
11997 * configure.ac: Add check for strstr.
11998 * config.in: Regenerate.
11999 * configure: Regenerate.
12000
7c3270ae
UW
120012012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12002
12003 * hostio.c (handle_pread): If pread fails, fall back to attempting
12004 lseek/read.
12005 (handle_pwrite): Likewise for pwrite.
12006
b62e2b27
UW
120072012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12008
12009 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12010 between unsupported TYPE and unimplementable ADDR/LEN combination.
12011 (arm_insert_point): Act on new return value.
12012
78a99e91
PA
120132012-07-31 Pedro Alves <palves@redhat.com>
12014
12015 * server.c (process_point_options): Only skip tokens if we find
12016 one that is unrecognized. Don't treat 'X' specially while
12017 skipping unrecognized tokens.
12018
fcf303ab
UW
120192012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12020
12021 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12022 to 4-byte-align HW breakpoint addresses for Thumb.
12023
7255706c
YQ
120242012-07-27 Yao Qi <yao@codesourcery.com>
12025
12026 PR remote/14161.
12027
12028 * server.h: Declare gdb_agent_about_to_close.
12029 * target.c (kill_inferior): Include "agent.h".
12030 New. Send command 'kill'.
12031 * target.h (kill_inferior): Removed macro.
12032 * tracepoint.c (gdb_agent_about_to_close): New.
12033 (gdb_agent_helper_thread): Handle command 'close'.
12034 Wait endlessly until the inferior stops.
12035 Install gdb_agent_remove_socket to atexit hook.
12036 (agent_socket_name): New static variable.
12037 (gdb_agent_socket_init): Replace local variable 'name' with
12038 'agent_socket_name'.
12039 (gdb_agent_remove_socket): New.
12040
5a3f286f
YQ
120412012-07-27 Yao Qi <yao@codesourcery.com>
12042
12043 * server.c (process_point_options): Stop at 'X' when parsing.
12044
961bd387
ME
120452012-07-19 Michael Eager <eager@eagercon.com>
12046
a261b8f5 12047 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
12048 to hw_execute.
12049 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12050 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12051 hardware breakpoint.
12052
aa7c7447
JK
120532012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12054
12055 * gdbserver/linux-low.c (initialize_low): Call
12056 linux_ptrace_init_warnings.
12057
7f216e7c
DE
120582012-07-02 Doug Evans <dje@google.com>
12059
12060 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12061 pointer to int.
12062
d3ce09f5
SS
120632012-07-02 Stan Shebs <stan@codesourcery.com>
12064
12065 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12066 (ax.o): Add it to build rule.
12067 (ax-ipa.o): Ditto.
12068 (OBS): Add format.o.
12069 (IPA_OBS): Add format.o.
12070 * server.c (handle_query): Claim support for breakpoint commands.
12071 (process_point_options): Add command case.
12072 (process_serial_event): Leave running if there are printfs in
12073 effect.
12074 * mem-break.h (any_persistent_commands): Declare.
12075 (add_breakpoint_commands): Declare.
12076 (gdb_no_commands_at_breakpoint): Declare.
12077 (run_breakpoint_commands): Declare.
12078 * mem-break.c (struct point_command_list): New struct.
12079 (struct breakpoint): New field command_list.
12080 (any_persistent_commands): New function.
12081 (add_commands_to_breakpoint): New function.
12082 (add_breakpoint_commands): New function.
12083 (gdb_no_commands_at_breakpoint): New function.
12084 (run_breakpoint_commands): New function.
12085 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12086 locally.
12087 * ax.c: Include format.h.
12088 (ax_printf): New function.
12089 (gdb_eval_agent_expr): Add printf opcode.
12090
2f8f6aed
YQ
120912012-06-13 Yao Qi <yao@codesourcery.com>
12092
12093 * server.c (start_inferior): Remove duplicated writes to fields
12094 'last_resume_kind' and 'last_status' of 'current_inferior'.
12095
0c9070b3
YQ
120962012-06-12 Yao Qi <yao@codesourcery.com>
12097 Pedro Alves <palves@redhat.com>
12098
12099 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12100 comment.
12101 * server.c (handle_v_cont): Extend comment.
12102
c52daf70
YQ
121032012-06-11 Yao Qi <yao@codesourcery.com>
12104
12105 * linux-low.c (linux_attach): Add 'static'.
12106
d38bbb0a
YQ
121072012-06-06 Yao Qi <yao@codesourcery.com>
12108
12109 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12110
89dc0afd
JK
121112012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12112
12113 Fix gcc -flto compilation warning.
12114 * server.c (main): Make variable multi_mode and attach volatile.
12115
75f62ce7
TJB
121162012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12117
12118 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12119 if the platform doesn't know about it.
12120
65f479b6
PA
121212012-05-30 Jeff Kenton <jkenton@tilera.com>
12122
12123 * Makefile.in (SFILES): Add linux-tile-low.c.
12124 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12125 * configure.srv: Handle tilegx-*-linux*.
12126 * linux-tile-low.c: New file.
12127
0c5bf5a9
JK
121282012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12129
12130 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12131
a493e3e2
PA
121322012-05-24 Pedro Alves <palves@redhat.com>
12133
12134 PR gdb/7205
12135
43aaf8b6 12136 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 12137
2ea28649
PA
121382012-05-24 Pedro Alves <palves@redhat.com>
12139
12140 PR gdb/7205
12141
12142 Replace target_signal with gdb_signal throughout.
12143
8d409d16
MR
121442012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12145
12146 * linux-low.c (linux_store_registers): Avoid the copying sequence
12147 when no data has been retrieved by ptrace.
12148
23512c01
MGD
121492012-05-22 Will Deacon <will.deacon@arm.com>
12150
12151 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12152 Include asm/ptrace.h.
12153 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12154 already defined.
12155
4934b29e
MR
121562012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12157
12158 * linux-low.c (linux_store_registers): Don't re-retrieve data
12159 with ptrace that has already been obtained from /proc. Always
12160 copy any data retrieved with ptrace to the buffer supplied.
12161
bde24c0a
PA
121622012-05-11 Yao Qi <yao@codesourcery.com>
12163 Pedro Alves <palves@redhat.com>
12164
12165 * linux-low.c (enum stopping_threads_kind): New.
12166 (stopping_threads): Change type to `enum stopping_threads_kind'.
12167 (handle_extended_wait): If stopping and suspending threads, leave
12168 the new_lwp suspended too.
12169 (linux_wait_for_event): Adjust.
12170 (stop_all_lwps): Set `stopping_threads' to
12171 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12172 whether we're suspending threads or just stopping them. Assert no
12173 recursion happens.
12174
623b6bdf
YQ
121752012-04-29 Yao Qi <yao@codesourcery.com>
12176
12177 * server.h: Move some code to ...
12178 * gdbthread.h: ... here. New.
12179 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12180 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12181 (nto-low.o, win32-low.o): Likewise.
12182 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12183 * regcache.c, remote-utils.c, server.c: Likewise.
12184 * target.c, tracepoint.c, win32-low.c: Likewise.
12185
f15f9948
TJB
121862012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12187
12188 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12189 (PTRACE_ARG4_TYPE): Likewise.
12190 (PTRACE_XFER_TYPE): Likewise.
12191 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12192 ptrace to PTRACE_ARG3_TYPE.
12193 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12194 (PTRACE_ARG4_TYPE): Likewise.
12195 (PTRACE_XFER_TYPE): Likewise.
12196 (linux_detach_one_lwp): Cast fourth argument of
12197 ptrace to long then PTRACE_ARG4_TYPE.
12198 (regsets_fetch_inferior_registers): Cast third argument of
12199 ptrace to long then PTRACE_ARG3_TYPE.
12200 (regsets_store_inferior_registers): Likewise.
12201
38ea300a
PA
122022012-04-20 Pedro Alves <palves@redhat.com>
12203
12204 * configure: Regenerate.
12205
c971b7fa
PA
122062012-04-19 Pedro Alves <palves@redhat.com>
12207
43aaf8b6 12208 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 12209 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
12210 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12211 (all, install-only, uninstall, clean-info, all-lib, clean): No
12212 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12213 (maintainer-clean realclean distclean): Use subdir_do.
12214 (subdir_do): New.
12215 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 12216 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
12217 * acinclude.m4: Include acx_configure_dir.m4.
12218 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12219 calls. Call AC_PROG_RANLIB. Configure gnulib using
12220 ACX_CONFIGURE_DIR.
12221 (GNULIB): New.
12222 (GNULIB_STDINT_H): Adjust.
12223 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12224 * gdbreplay.c: Include build-gnulib/config.h.
12225 * server.h: Likewise.
12226 * aclocal.m4: Regenerate.
12227 * config.in: Regenerate.
12228 * configure: Regenerate.
c971b7fa 12229
809277f8
PA
122302012-04-19 Pedro Alves <palves@redhat.com>
12231
12232 * Makefile.in (LIBGNU, INCGNU): Adjust.
12233 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12234 (all, install-only, uninstall, clean-info, all-lib, clean)
12235 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12236 * configure.ac: Adjust AC_OUTPUT output.
12237 * aclocal.m4: Regenerate.
12238 * configure: Regenerate.
12239
fd9bb8b8
PA
122402012-04-19 Pedro Alves <palves@redhat.com>
12241
12242 * Makefile.in (generated_files): New.
12243 (server_h): Remove the explicit dependency on config.h, and depend
12244 on $generated_files.
12245
1c298c66
PA
122462012-04-19 Pedro Alves <palves@redhat.com>
12247
12248 * Makefile.in (INCGNU): Add -Ignulib.
12249
57c4b50b
PA
122502012-04-19 Pedro Alves <palves@redhat.com>
12251
12252 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12253 (INCGNU): ... this, and spell out -I here.
12254 (GNULIB_LIB): Rename to ...
12255 (LIBGNU): ... this.
12256 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12257
1030e047
PA
122582012-04-19 Pedro Alves <palves@redhat.com>
12259
12260 * config.in: Regenerate.
12261
447d4319
PA
122622012-04-19 Pedro Alves <palves@redhat.com>
12263
12264 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12265 * server.h (memmem): Remove declaration.
12266 * config.in: Regenerate.
12267 * configure: Regenerate.
12268
aad9eab9
YQ
122692012-04-19 Yao Qi <yao@codesourcery.com>
12270
12271 * Makefile.in (SFILES): Add common/vec.c.
12272 (OBS): Add vec.o.
12273 (vec.o): New rule.
12274
3e10640f
YQ
122752012-04-19 Yao Qi <yao@codesourcery.com>
12276
12277 * remote-utils.c (prepare_resume_reply): Replace with macro
12278 target_core_of_thread.
12279 * server.c (handle_qxfer_threads_proper): Likewise.
12280 * target.h (traget_core_of_thread): New macro.
12281
71622373
PA
122822012-04-18 Pedro Alves <palves@redhat.com>
12283
12284 * aclocal.m4: Regenerate.
12285 * configure: Regenerate.
12286
80d26939
YQ
122872012-04-16 Yao Qi <yao@codesourcery.com>
12288
12289 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12290 duplicated on address.
12291
42476b70
YQ
122922012-04-16 Yao Qi <yao@codesourcery.com>
12293
12294 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12295 (struct tracepoint_action_ops) <send>: New field.
12296 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12297 (agent_expr_send, x_tracepoint_action_send): New.
12298 (l_tracepoint_action_send): New.
12299 (cmd_qtdp): Download and install tracepoint
12300 according to `use_agent'.
12301 (run_inferior_command): Add one more parameter `len'.
12302 Update callers.
12303 (tracepoint_send_agent): New.
12304 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12305
7bc83639
YQ
123062012-04-16 Yao Qi <yao@codesourcery.com>
12307
12308 * tracepoint.c (download_tracepoints): Moved to ...
12309 (cmd_qtstart): ... here.
12310
5f18041e
YQ
123112012-04-14 Yao Qi <yao@codesourcery.com>
12312
12313 * tracepoint.c: Include inttypes.h.
12314 (struct collect_memory_action): Use sized types.
12315 (struct tracepoint): Likewise.
12316 (cmd_qtdp, stop_tracing): Update print specifiers.
12317 (cmd_qtp, response_tracepoint): Likewise.
12318 (collect_data_at_tracepoint): Likewise.
12319 (collect_data_at_step): Likewise.
12320
55a8c076
YQ
123212012-04-14 Yao Qi <yao@codesourcery.com>
12322
12323 Import gnulib module inttypes.
12324 * aclocal.m4, config.in, configure: Regenerated.
12325
dc750257
YQ
123262012-04-14 Yao Qi <yao@codesourcery.com>
12327
12328 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12329 Makefile and config.status at last.
12330
0ab5faf9
YQ
123312012-04-13 Yao Qi <yao@codesourcery.com>
12332
12333 * tracepoint.c: Include stdint.h unconditionally.
12334
18f5fd81
TJB
123352012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12336
12337 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12338 on BFD_HAVE_SYS_PROCFS_TYPE.
12339 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12340 * configure: Regenerate.
12341 * config.in: Likewise.
12342
4d47af5c
L
123432012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12344
12345 * Makefile.in (clean): Also remove x32.c x32-linux.c
12346 x32-avx.c x32-avx-linux.c.
12347 (x32.o): New target.
12348 (x32.c): Likewise.
12349 (x32-linux.o): Likewise.
12350 (x32-linux.c): Likewise.
12351 (x32-avx.o): Likewise.
12352 (x32-avx.c): Likewise.
12353 (x32-avx-linux.o): Likewise.
12354 (x32-avx-linux.c): Likewise.
12355
12356 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12357 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12358 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12359 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12360 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12361 i386/x32-avx-linux.xml.
12362
12363 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12364 (init_registers_x32_avx_linux): Likwise.
12365 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12366 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12367
ecedbe58
PA
123682012-04-13 Pedro Alves <palves@redhat.com>
12369
12370 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12371 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12372 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12373 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12374 the sub-make.
12375
c92b5177
L
123762012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12377
12378 * linux-x86-low.c (compat_x32_clock_t): New.
12379 (compat_x32_siginfo_t): Likewise.
12380 (compat_x32_siginfo_from_siginfo): Likewise.
12381 (siginfo_from_compat_x32_siginfo): Likewise.
12382 (linux_is_elf64): Likewise.
12383 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12384 and siginfo_from_compat_x32_siginfo for x32.
12385 (x86_arch_setup): Set linux_is_elf64.
12386
214d508e
L
123872012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12388
12389 PR gdb/13969
12390 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12391 e_machine field.
12392 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12393 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12394 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12395 compatible with process.
12396
c9a1864a
YQ
123972012-04-12 Yao Qi <yao@codesourcery.com>
12398
12399 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12400 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12401 (install-only, install-info, clean): Handle sub dir gnulib.
12402 (all-lib, am--refresh): New targets.
12403 (memmem.o): Remove target.
12404 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12405 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12406 (AC_REPLACE_FUNCS): Remove memmem.
12407 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12408 (AC_OUTPUT): Generate Makefile in gnulib/.
12409 * aclocal.m4, config.in, configure: Regenerated.
12410
367ba2c2
MR
124112012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12412
12413 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12414
9d236627
PA
124152012-04-05 Pedro Alves <palves@redhat.com>
12416
12417 -Werror=strict-aliasing
12418
12419 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12420 pointer.
12421
111217b3
PA
124222012-04-04 Pedro Alves <palves@redhat.com>
12423
12424 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12425 (sparc_store_gregset_from_stack, sparc_store_gregset)
12426 (sparc_breakpoint_at): Fix formatting.
12427
8365dcf5
TJB
124282012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12429
12430 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12431 are available.
12432 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12433 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12434 * config.in: Regenerate.
12435 * configure: Likewise.
12436
689cc2ae
PA
124372012-03-29 Pedro Alves <palves@redhat.com>
12438
12439 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12440 Correct ptrace arguments.
12441
c14dfd32
PA
124422012-03-28 Pedro Alves <palves@redhat.com>
12443
12444 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12445 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12446 (IA64_FR1_REGNUM): New defines.
12447 (ia64_fetch_register): New.
12448 (the_low_target): Install it.
12449 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12450 field.
12451 * linux-low.c (linux_fetch_registers): Try the
12452 the_low_target.fetch_register hook first.
12453
12454 * linux-arm-low.c (the_low_target): Adjust.
12455 * linux-bfin-low.c (the_low_target): Adjust.
12456 * linux-cris-low.c (the_low_target): Adjust.
12457 * linux-crisv32-low.c (the_low_target): Adjust.
12458 * linux-m32r-low.c (the_low_target): Adjust.
12459 * linux-m68k-low.c (the_low_target): Adjust.
12460 * linux-mips-low.c (the_low_target): Adjust.
12461 * linux-ppc-low.c (the_low_target): Adjust.
12462 * linux-s390-low.c (the_low_target): Adjust.
12463 * linux-sh-low.c (the_low_target): Adjust.
12464 * linux-sparc-low.c (the_low_target): Adjust.
12465 * linux-tic6x-low.c (the_low_target): Adjust.
12466 * linux-x86-low.c (the_low_target): Adjust.
12467 * linux-xtensa-low.c (the_low_target): Adjust.
12468
63c88e13
PA
124692012-03-26 Pedro Alves <palves@redhat.com>
12470
12471 * server.c (handle_qxfer_libraries): Don't bail early if
12472 the_target->qxfer_libraries_svr4 is not NULL.
12473
fb723180
PA
124742012-03-26 Pedro Alves <palves@redhat.com>
12475
12476 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12477
0afae3cf
PA
124782012-03-23 Pedro Alves <palves@redhat.com>
12479
12480 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12481 "library-list-svr4" element's start tag when the the DSO list is
12482 empty.
12483
485f1ee4
PA
124842012-03-23 Pedro Alves <palves@redhat.com>
12485
12486 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12487 a variable whose type size is the same as the inferior's pointer
12488 size.
12489
a5362b9a
TS
124902012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12491
12492 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12493 struct siginfo.
12494 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12495 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12496 * linux-low.h: Include <signal.h>.
12497 (struct siginfo): Remove forward declaration.
12498 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12499 struct siginfo.
12500
d226c142
MF
125012012-03-21 Mike Frysinger <vapier@gentoo.org>
12502
12503 * .gitignore: Ignore more files.
12504
122f36ef
PA
125052012-03-19 Pedro Alves <palves@redhat.com>
12506 Jan Kratochvil <jan.kratochvil@redhat.com>
12507
12508 * server.c (cont_thread, general_thread): Add describing comments.
12509 (start_inferior): Clear `cont_thread'.
12510 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12511 of a process.
12512
fc3e5175
YQ
125132012-03-15 Yao Qi <yao@codesourcery.com>
12514
12515 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12516 handling to ...
12517 (cmd_qtdp): ... here.
12518
8d0d92cd
YQ
125192012-03-15 Yao Qi <yao@codesourcery.com>
12520
12521 * tracepoint.c (struct tracepoint_action_ops): New.
12522 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12523 (m_tracepoint_action_download): New.
12524 (r_tracepoint_action_download): New.
12525 (x_tracepoint_action_download): New.
12526 (l_tracepoint_action_download): New.
12527 (add_tracepoint_action): Install `action->ops' according type.
12528 (download_tracepoint_1): Move code `download' function pointer
12529 of various tracepoint_action_ops.
12530
87b0bb13
JK
125312012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12532
12533 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12534 linux_ptrace_attach_warnings.
12535
5f572dec
JK
125362012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12537
12538 * Makefile.in (linux-ptrace.o): New.
12539 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12540 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12541 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12542 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12543 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12544 of these targets.
12545 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12546
f4647387
YQ
125472012-03-08 Yao Qi <yao@codesourcery.com>
12548 Pedro Alves <palves@redhat.com>
12549
12550 Fix PR server/13392.
12551 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12552 offset of JMP insn.
12553 * tracepoint.c (remove_tracepoint): New.
12554 (cmd_qtdp): Call remove_tracepoint when failed to install.
12555
9b224c5e
PA
125562012-03-07 Pedro Alves <palves@redhat.com>
12557
12558 * linux-low.c (get_detach_signal): New.
12559 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12560 Pass on pending signals to PTRACE_DETACH. Check the result of the
12561 ptrace call.
12562 * server.c (program_signals, program_signals_p): New.
12563 (handle_general_set): Handle QProgramSignals.
12564 * server.h (program_signals, program_signals_p): Declare.
12565
e237a7e2
JK
125662012-03-05 Pedro Alves <palves@redhat.com>
12567 Jan Kratochvil <jan.kratochvil@redhat.com>
12568
12569 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12570 New comment why.
12571
5808517f
YQ
125722012-03-03 Yao Qi <yao@codesourcery.com>
12573
12574 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12575 agent_look_up_symbols.
12576
58b4daa5
YQ
125772012-03-03 Yao Qi <yao@codesourcery.com>
12578
12579 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12580 (linux-x86-low.o): Likewise.
12581 * server.h: Remove in_process_agent_loaded.
12582 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12583 common/agent.c.
12584 Update callers.
12585
8ffcbaaf
YQ
125862012-03-03 Yao Qi <yao@codesourcery.com>
12587
12588 * tracepoint.c (gdb_agent_capability): New global.
12589 (in_process_agent_loaded_ust): Renamed to
12590 `in_process_agent_supports_ust'.
12591 Update callers.
12592 (in_process_agent_supports_ust): Call agent_capability_check.
12593 (clear_installed_tracepoints): Assert that agent supports
12594 agent.
12595
d1feda86
YQ
125962012-03-03 Yao Qi <yao@codesourcery.com>
12597
12598 * linux-low.c (linux_supports_agent): New.
12599 (linux_target_ops): Initialize field `supports_agent' with
12600 linux_supports_agent.
12601 * target.h (struct target_ops) <supports_agent>: New.
12602 (target_supports_agent): New macro.
12603 * server.c (handle_general_set): Handle packet 'QAgent'.
12604 (handle_query): Send `QAgent+'.
12605 * Makefile.in (server.o): Depends on agent.h.
12606
2fa291ac
YQ
126072012-03-03 Yao Qi <yao@codesourcery.com>
12608
12609 * Makefile.in (OBS): Add agent.o.
12610 Add new rule for agent.o.
12611 Track dependence of tracepoint.c on agent.h.
12612 * tracepoint.c (run_inferior_command_1):
12613 (run_inferior_command): Call agent_run_command.
12614 (gdb_ust_connect_sync_socket): Deleted. Move it to
12615 common/agent.c.
12616 (resume_thread, stop_thread): Likewise.
12617 (gdb_ust_socket_init): Renamed to ...
12618 (gdb_agent_socket_init): ... New.
12619 (gdb_ust_thread): Renamed to ...
12620 (gdb_agent_helper_thread): ... New.
12621 (gdb_ust_init): Move some code to ...
12622 (gdb_agent_init): ... here. New.
12623 [HAVE_UST]: Call gdb_ust_init.
12624 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12625 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12626 * config.in, configure: Regenerated.
12627
05044653
PA
126282012-03-02 Pedro Alves <palves@redhat.com>
12629
12630 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12631 * linux-low.c (struct simple_pid_list): New.
12632 (stopped_pids): New a struct simple_pid_list pointer.
12633 (add_to_pid_list, pull_pid_from_list): New.
12634 (handle_extended_wait): Don't assume the first signal new children
12635 report is SIGSTOP. Adjust call to pull_pid_from_list.
12636 (linux_wait_for_lwp): Adjust.
12637
8d00225b
YQ
126382012-03-02 Yao Qi <yao@codesourcery.com>
12639
12640 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12641 debug log.
12642
19560ba5
YQ
126432012-03-02 Yao Qi <yao@codesourcery.com>
12644
12645 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12646 `stop_pc' and `tpoint'. Update caller.
12647
1faeff08
MR
126482012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12649
12650 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12651 * linux-low.c (use_linux_regsets): New macro.
12652 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12653 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12654 (linux_register_in_regsets): New function.
12655 (usr_fetch_inferior_registers): Skip registers covered by
12656 regsets.
12657 (usr_store_inferior_registers): Likewise.
12658 (usr_fetch_inferior_registers): New macro.
12659 (usr_store_inferior_registers): Likewise.
12660 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12661 (linux_store_registers): Likewise.
12662 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12663 prototype.
12664 (init_registers_mips64_dsp_linux): Likewise.
12665 (init_registers_mips_linux): New macro.
12666 (init_registers_mips_dsp_linux): Likewise.
12667 (mips_dsp_num_regs): Likewise.
12668 (DSP_BASE, DSP_CONTROL): New fallback macros.
12669 (mips_base_regs): New macro.
12670 (mips_regmap): Use it. Fix the size.
12671 (mips_dsp_regmap): New variable.
12672 (mips_dsp_regset_bitmap): Likewise.
12673 (mips_arch_setup): New function.
12674 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12675 than mips_regmap.
12676 (mips_cannot_store_register): Likewise.
12677 (the_low_target): Update .arch_setup, .num_regs and .regmap
12678 initializers. Add .regset_bitmap initializer.
12679 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12680 initializer.
12681 * linux-bfin-low.c (the_low_target): Likewise.
12682 * linux-cris-low.c (the_low_target): Likewise.
12683 * linux-crisv32-low.c (the_low_target): Likewise.
12684 * linux-ia64-low.c (the_low_target): Likewise.
12685 * linux-m32r-low.c (the_low_target): Likewise.
12686 * linux-m68k-low.c (the_low_target): Likewise.
12687 * linux-ppc-low.c (the_low_target): Likewise.
12688 * linux-s390-low.c (the_low_target): Likewise.
12689 * linux-sh-low.c (the_low_target): Likewise.
12690 * linux-sparc-low.c (the_low_target): Likewise.
12691 * linux-tic6x-low.c (the_low_target): Likewise.
12692 * linux-x86-low.c (the_low_target): Likewise.
12693 * linux-xtensa-low.c (the_low_target): Likewise.
12694 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12695 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12696 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12697 srv_xmlfiles.
12698 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12699 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12700
c03e6ccc
YQ
127012012-02-29 Yao Qi <yao@codesourcery.com>
12702 Pedro Alves <palves@redhat.com>
12703
12704 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12705 `step_over_finished' is true.
12706
644cebc9
PA
127072012-02-27 Pedro Alves <palves@redhat.com>
12708
12709 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12710 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12711
c14d7ab2
PA
127122012-02-27 Pedro Alves <palves@redhat.com>
12713
12714 PR server/9684
12715 * linux-low.c (pid_is_stopped): New.
12716 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12717
412c89dd
LM
127182012-02-25 Luis Machado <lgustavo@codesourcery.com>
12719
12720 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12721 of conditions.
12722
b745defe
MR
127232012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12724
12725 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12726
9f3a5c85
LM
127272012-02-24 Luis Machado <lgustavo@codesourcery>
12728
12729 * server.c (handle_query): Advertise support for target-side
12730 breakpoint condition evaluation.
12731 (process_point_options): New function.
12732 (process_serial_event): When inserting a breakpoint, check for
12733 a target-side condition that should be evaluated.
12734
12735 * mem-break.c: Include regcache.h and ax.h.
12736 (point_cond_list_t): New data structure.
12737 (breakpoint) <cond_list>: New field.
12738 (find_gdb_breakpoint_at): Make non-static.
12739 (delete_gdb_breakpoint_at): Clear any target-side
12740 conditions.
12741 (clear_gdb_breakpoint_conditions): New function.
12742 (add_condition_to_breakpoint): Likewise.
12743 (add_breakpoint_condition): Likewise.
12744 (gdb_condition_true_at_breakpoint): Likewise.
12745 (gdb_breakpoint_here): Return result directly instead
12746 of going through a local variable.
12747
12748 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12749 (clear_gdb_breakpoint_conditions): Likewise.
12750 (add_breakpoint_condition): Likewise.
12751 (gdb_condition_true_at_breakpoint): Likewise.
12752
12753 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12754 (need_step_over_p): Take target-side breakpoint condition into
12755 consideration.
12756
5e1dc496
LM
127572012-02-24 Luis Machado <lgustavo@codesourcery>
12758
12759 * server.h: Include tracepoint.h.
12760 (agent_mem_read, agent_get_trace_state_variable_value,
12761 agent_set_trace_state_variable_value,
12762 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12763 get_set_tsv_func_addr): New prototypes.
12764
12765 * ax.h: New include file.
12766 * ax.c: New source file.
12767
12768 * tracepoint.c: Include ax.h.
12769 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12770 agent_expr, eval_result_type): Move to ax.h.
12771 (parse_agent_expr): Rename to ...
12772 (gdb_parse_agent_expr): ... this, make it non-static and move
12773 to ax.h.
12774 (unparse_agent_expr) Rename to ...
12775 (gdb_unparse_agent_expr): ... this, make it non-static and move
12776 to ax.h.
12777 (eval_agent_expr): Rename to ...
12778 (eval_tracepoint_agent_expr): ... this.
12779 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12780 forward declarations.
12781 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12782 (agent_get_trace_state_variable_value): New function.
12783 (agent_set_trace_state_variable_value): New function.
12784 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12785 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12786 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12787 (condition_true_at_tracepoint): Likewise.
12788 (parse_agent_expr): Rename to ...
12789 (gdb_parse_agent_expr): ... this and move to ax.c.
12790 (unparse_agent_expr): Rename to ...
12791 (gdb_unparse_agent_expr): ... this and move to ax.c.
12792 (gdb_agent_op_name): Move to ax.c.
12793 (eval_agent_expr): Rename to ...
12794 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12795 and move to ax.c.
12796 (eval_tracepoint_agent_expr): New function.
12797 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 12798 non-static.
5e1dc496
LM
12799 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12800 ax.c.
12801 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12802 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12803 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12804 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12805 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12806 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12807 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12808 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12809 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12810 (compile_bytecodes): Remove forward declaration.
12811 (is_goto_target): Move to ax.c.
12812 (compile_bytecodes): Move to ax.c and call
12813 agent_get_trace_state_variable_value (...) and
12814 agent_set_trace_state_variable_value (...).
12815
12816 * Makefile.in: Update ax.c and IPA dependencies.
12817
277e4e52
PA
128182012-02-24 Pedro Alves <palves@redhat.com>
12819
12820 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12821 (cmd_bigqtbuffer_circular): ... this. Only handle
12822 'QTBuffer:circular:'.
12823 (handle_tracepoint_general_set): Adjust.
12824
bf4c19f7
YQ
128252012-02-16 Yao Qi <yao@codesourcery.com>
12826
12827 * inferiors.c: Move code to ...
12828 * dll.c: .... here. New.
12829 * server.h: Declare clear_dlls.
12830 * Makefile.in (SFILES): Add dll.c.
12831 (OBS): Add dll.o
12832 (dll.o): New rule.
12833
d73f2619
YQ
128342012-02-11 Yao Qi <yao@codesourcery.com>
12835
12836 * server.c: (handle_monitor_command): Add a new parameter
12837 `own_buf'.
12838 (handle_query): Update caller.
12839
f8255c2a
JB
128402012-02-09 Joel Brobecker <brobecker@adacore.com>
12841
12842 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12843 * configure, config.in: Regenerate.
12844 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12845 is not defined.
12846
da84f473
PA
128472012-02-02 Pedro Alves <palves@redhat.com>
12848
12849 Try SIGKILL first, then PTRACE_KILL.
12850 * linux-low.c (linux_kill_one_lwp): New.
12851 (linux_kill_one_lwp): Rename to ...
12852 (kill_one_lwp_callback): ... this. Use the new
12853 linux_kill_one_lwp.
12854
e886a173
PA
128552012-02-02 Pedro Alves <palves@redhat.com>
12856
12857 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12858 inferior.
12859
be07f1a2
PA
128602012-01-27 Pedro Alves <palves@redhat.com>
12861
12862 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12863 (elf_64_file_p): Make static.
12864 (linux_pid_exe_is_elf_64_file): New.
12865 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12866 Delete declarations.
12867 (linux_pid_exe_is_elf_64_file): Declare.
12868 * linux-x86-low.c (x86_arch_setup): Use
12869 linux_pid_exe_is_elf_64_file.
12870
d8301ad1
JK
128712012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12872
12873 * linux-low.c (linux_wait_for_event_1): Rename to ...
12874 (linux_wait_for_event): ... here and merge it with former
12875 linux_wait_for_event - new variable wait_ptid, use it.
12876 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12877
01b17894
PA
128782012-01-23 Pedro Alves <palves@redhat.com>
12879
12880 * server.c (main): Avoid yet another case of infinite loop while
12881 detaching/killing after a longjmp.
12882
e825046f
JK
128832012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12884
12885 Code cleanup.
12886 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12887
b9e7b9c3
UW
128882012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12889
12890 * hostio.c (handle_readlink): New function.
12891 (handle_vFile): Call it to handle "vFile:readlink" packets.
12892
901f9912
UW
128932012-01-20 Pedro Alves <palves@redhat.com>
12894 Ulrich Weigand <ulrich.weigand@linaro.org>
12895
12896 * server.c (handle_v_requests): Only support vAttach and vRun to
12897 start multiple processes when in extended protocol mode.
12898
fc1ab1a0
PA
128992012-01-17 Pedro Alves <palves@redhat.com>
12900
12901 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12902 memalign plus mprotect to allocate the scratch buffer.
12903
7d5d4e98
PA
129042012-01-13 Pedro Alves <palves@redhat.com>
12905
12906 * server.c (attach_inferior): Clear `cont_thread'.
12907
f128d5e9
PA
129082012-01-13 Pedro Alves <palves@redhat.com>
12909
12910 * server.c (main): Avoid infinite loop while detaching/killing
12911 after a longjmp.
12912
06db92f0
DE
129132012-01-09 Doug Evans <dje@google.com>
12914
12915 * server.c (start_inferior): Set last_ptid in --wrapper case.
12916
32d92999
YQ
129172012-01-06 Yao Qi <yao@codesourcery.com>
12918
12919 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12920 defined.
12921 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12922
5e0a92a9
YQ
129232012-01-04 Yao Qi <yao@codesourcery.com>
12924
12925 * tracepoint.c (cmd_qtdp): Print debug message
12926 for static tracepoint.
12927
ae639e8c
YQ
129282012-01-04 Yao Qi <yao@codesourcery.com>
12929
12930 * tracepoint.c (trace_vdebug): Differentiate debug message
12931 between gdbserver and IPA.
12932
f72429c5
YQ
129332012-01-03 Yao Qi <yao@codesourcery.com>
12934
12935 * tracepoint.c (tracepoint_was_hit): Don't collect for
12936 static tracepoint.
12937
12c3e59c
JB
129382012-01-02 Joel Brobecker <brobecker@adacore.com>
12939
12940 * terminal.h: Reformat copyright header.
12941
67827812
JB
129422012-01-02 Joel Brobecker <brobecker@adacore.com>
12943
12944 * server.c (gdbserver_version): Update copyright year.
12945 * gdbreplay.c (gdbreplay_version): Likewise.
12946
3e52c33d
JK
129472011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12948
12949 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12950
12951 Revert:
12952 2011-12-18 Hui Zhu <teawater@gmail.com>
12953 * linux-low.c (linux_create_inferior): Save return value to ret.
12954
66f1260e
HZ
129552011-12-18 Hui Zhu <teawater@gmail.com>
12956
12957 * linux-low.c (linux_create_inferior): Save return value to ret.
12958
e77616d7
DE
129592011-12-16 Doug Evans <dje@google.com>
12960
e7b06c57
DE
12961 * linux-low.c (linux_create_inferior): If stdio connection,
12962 redirect stdin from /dev/null, stdout to stderr.
12963 * remote-utils.c (remote_is_stdio): New static global.
12964 (remote_connection_is_stdio): New function.
12965 (remote_prepare): Handle stdio connection.
12966 (remote_open): Ditto.
12967 (remote_close): Don't close stdin for stdio connections.
12968 (read_prim,write_prim): New functions. Replace all calls to
12969 read/write to these.
12970 * server.c (main): Watch for "-" argument. Move call to
12971 remote_prepare before start_inferior.
12972 * server.h (STDIO_CONNECTION_NAME): New macro.
12973 (remote_connection_is_stdio): Declare.
12974
e77616d7
DE
12975 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12976 in debugging output.
12977
82067193
YQ
129782011-12-15 Yao Qi <yao@codesourcery.com>
12979
12980 * tracepoint.c: Include sys/syscall.h.
12981 (gdb_ust_thread): Remove preprocessor conditional.
12982
82bfbe7e
PA
129832011-12-14 Pedro Alves <pedro@codesourcery.com>
12984
12985 * linux-low.c (linux_detach_one_lwp): Call
12986 the_low_target.prepare_to_resume before detaching.
12987
712c6575
YQ
129882011-12-14 Yao Qi <yao@codesourcery.com>
12989
12990 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12991 of write.
12992
d54d1edf
YQ
129932011-12-14 Yao Qi <yao@codesourcery.com>
12994
12995 * i386-low.c (i386_low_stopped_data_address): Initialize local
12996 variable `control'.
12997
6210a125
PA
129982011-12-13 Pedro Alves <pedro@codesourcery.com>
12999
13000 PR remote/13492
13001
13002 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13003 DR_CONTROL unless necessary. Extend comments.
13004 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13005 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13006
2ece8244
YQ
130072011-12-13 Yao Qi <yao@codesourcery.com>
13008
13009 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13010 macros.
13011 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13012
784867a5
JK
130132011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13014
13015 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13016 Print new debug message for such case.
13017
6bf36717
JK
130182011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13019
13020 Fix overlapping memcpy.
13021 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13022 the read_inferior_memory transfer.
13023 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13024 write_inferior_memory transfer.
13025 (set_fast_tracepoint_jump): New variable buf. Use it for the
13026 read_inferior_memory and write_inferior_memory transfers.
13027 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13028 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13029 Use it for the write_inferior_memory transfer.
13030 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13031 buffers.
13032
50275556
MR
130332011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13034
13035 * linux-low.c (fetch_register, store_register): Make code
13036 consistent, fix formatting.
13037
7325beb4
MR
130382011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13039
13040 * linux-low.c (usr_store_inferior_registers): Factor out code
13041 to handle individual registers into...
13042 (store_register): ... this new function.
13043
c642a434
UW
130442011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13045
13046 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13047 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13048 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13049 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13050 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13051 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13052 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13053 (srv_xmlfiles): Add new XML files.
13054
13055 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13056 and <sys/uio.h>.
13057 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13058 (init_registers_s390_linux32v1): Add prototype.
13059 (init_registers_s390_linux32v2): Likewise.
13060 (init_registers_s390_linux64v1): Likewise.
13061 (init_registers_s390_linux64v2): Likewise.
13062 (init_registers_s390x_linux64v1): Likewise.
13063 (init_registers_s390x_linux64v2): Likewise.
13064 (s390_num_regs): Increment to 52.
13065 (s390_regmap): Add orig_r2 register.
13066 (s390_num_regs_3264): Increment to 68.
13067 (s390_regmap_3264): Add orig_r2 register.
13068 (s390_collect_ptrace_register): Handle orig_r2 register.
13069 (s390_supply_ptrace_register): Likewise.
13070 (s390_fill_last_break): New function.
13071 (s390_store_last_break): Likewise.
13072 (s390_fill_system_call): New function.
13073 (s390_store_system_call): Likewise.
13074 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13075 register sets.
13076 (s390_check_regset): New function.
13077 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13078 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13079 Update target_regsets for available register sets.
13080
2268b414
JK
130812011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13082 Jan Kratochvil <jan.kratochvil@redhat.com>
13083
13084 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13085 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13086 New.
13087 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13088 * linux-low.h (struct process_info_private): New member r_debug.
13089 * server.c (handle_qxfer_libraries): Call
13090 the_target->qxfer_libraries_svr4.
13091 (handle_qxfer_libraries_svr4): New function.
13092 (qxfer_packets): New entry "libraries-svr4".
13093 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13094 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13095 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13096 PACKET_qXfer_libraries_svr4.
13097
d6db1fab
UW
130982011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13099
13100 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13101 PSW address/mask between 8-byte and 16-byte formats.
13102 (s390_supply_ptrace_register): Likewise.
13103 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13104 basic addressing mode bit.
13105
242f5f1c
SS
131062011-11-24 Stan Shebs <stan@codesourcery.com>
13107
13108 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13109
f196051f
SS
131102011-11-17 Stan Shebs <stan@codesourcery.com>
13111
13112 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13113 (tracing_start_time): New global.
13114 (tracing_stop_time): New global.
13115 (tracing_user_name): New global.
13116 (tracing_notes): New global.
13117 (tracing_stop_note): New global.
13118 (cmd_qtstart): Set traceframe_usage, start_time.
13119 (stop_tracing): Set stop_time.
13120 (cmd_qtstatus): Report additional status.
13121 (cmd_qtp): New function.
13122 (handle_tracepoint_query): Call it.
13123 (cmd_qtnotes): New function.
13124 (handle_tracepoint_general_set): Call it.
13125 (get_timestamp): Rename from tsv_get_timestamp.
13126
405f8e94
SS
131272011-11-14 Stan Shebs <stan@codesourcery.com>
13128 Kwok Cheung Yeung <kcy@codesourcery.com>
13129
13130 * linux-x86-low.c (small_jump_insn): New.
13131 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13132 trampoline and error message, build a trampoline and issue a small
13133 jump instruction to it.
13134 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13135 trampoline and error message.
13136 (x86_get_min_fast_tracepoint_insn_len): New.
13137 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13138 * linux-low.h (struct linux_target_ops): Add arguments to
13139 install_fast_tracepoint_jump_pad operation, add new operation.
13140 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13141 arguments.
13142 (linux_get_min_fast_tracepoint_insn_len): New function.
13143 (linux_target_op): Add new operation.
13144 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13145 (gdb_trampoline_buffer_end): Ditto.
13146 (gdb_trampoline_buffer_error): Ditto.
13147 (struct ipa_sym_addresses): Add fields for new IPA variables.
13148 (symbol_list): Add entries for new IPA variables.
13149 (struct tracepoint): Add fields to hold the address range of the
13150 trampoline used by the tracepoint.
13151 (trampoline_buffer_head): New static variable.
13152 (trampoline_buffer_tail): Ditto.
13153 (claim_trampoline_space): New function.
13154 (have_fast_tracepoint_trampoline_buffer): New function.
13155 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13156 structure.
13157 (install_fast_tracepoint): Ditto, also add error buffer argument.
13158 (cmd_qtminftpilen): New function.
13159 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13160 (fast_tracepoint_from_trampoline_address): New function.
13161 (fast_tracepoint_collecting): Handle trampoline as part of jump
13162 pad space.
13163 (set_trampoline_buffer_space): New function.
13164 (initialize_tracepoint): Initialize new IPA variables.
13165 * target.h (struct target_ops): Add arguments to
13166 install_fast_tracepoint_jump_pad operation, add new
13167 get_min_fast_tracepoint_insn_len operation.
13168 (target_get_min_fast_tracepoint_insn_len): New.
13169 (install_fast_tracepoint_jump_pad): Add arguments.
13170 * server.h (IPA_BUFSIZ): Define.
13171 * linux-i386-ipa.c: Include extra header files.
13172 (initialize_fast_tracepoint_trampoline_buffer): New function.
13173 (initialize_low_tracepoint): Call it.
13174 * server.h (set_trampoline_buffer_space): Declare.
13175 (claim_trampoline_space): Ditto.
13176 (have_fast_tracepoint_trampoline_buffer): Ditto.
13177
1e4d1764
YQ
131782011-11-14 Yao Qi <yao@codesourcery.com>
13179
13180 * server.c (handle_query): Handle InstallInTrace for qSupported.
13181 * tracepoint.c (add_tracepoint): Sort list.
13182 (install_tracepoint, download_tracepoint): New.
13183 (cmd_qtdp): Call them to install and download tracepoints.
13184 (sort_tracepoints): Removed.
13185 (cmd_qtstart): Update.
13186
5c73ff4e
YQ
131872011-11-14 Yao Qi <yao@codesourcery.com>
13188
13189 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13190 * mem-break.h: Declare.
13191 * tracepoint.c (cmd_qtstart): Move some code to ...
13192 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13193 New.
13194 (download_tracepoints): Move some code to ...
13195 (download_tracepoint_1): ... here. New.
13196
86a30030
YQ
131972011-11-08 Yao Qi <yao@codesourcery.com>
13198
13199 * remote-utils.c (relocate_instruction): A comment fix.
13200
8d26e50c
JB
132012011-11-07 Joel Brobecker <brobecker@adacore.com>
13202
13203 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13204 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13205 dr_status_mirror and dr_control_mirror from debug_reg_state.
13206 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13207 (i386_initial_stuff): Remove use of deleted globals.
13208 (i386_get_thread_context, i386_set_thread_context,
13209 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13210 from debug_reg_state.
13211
a59306a3
YQ
132122011-11-05 Yao Qi <yao@codesourcery.com>
13213
13214 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13215 address as TPOINT's.
13216
3065dfb6
SS
132172011-11-02 Stan Shebs <stan@codesourcery.com>
13218
13219 * tracepoint.c (agent_mem_read_string): New function.
13220 (eval_agent_expr): Call it for tracenz.
13221 * server.c (handle_query): Report support for tracenz.
13222
fd0d8c7c
YQ
132232011-11-02 Yao Qi <yao@codesourcery.com>
13224
13225 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13226
609086b1
YQ
132272011-11-02 Yao Qi <yao@codesourcery.com>
13228
13229 * target.h: Fix a typo in comment.
13230
b9fd1791
PA
132312011-10-31 Pedro Alves <pedro@codesourcery.com>
13232
13233 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13234 clobber the breakpoints' shadows with fast tracepoint jumps.
13235 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13236 * target.c (write_inferior_memory): Also pass MYADDR down to
13237 check_mem_write.
13238
03583c20
UW
132392011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13240
13241 * configure.ac: Check support for personality routine.
13242 * configure: Regenerate.
13243 * config.in: Likewise.
13244 * linux-low.c: Include <sys/personality.h>.
13245 Define ADDR_NO_RANDOMIZE if necessary.
13246 (linux_create_inferior): Disable address space randomization when
13247 forking inferior, if requested.
13248 (linux_supports_disable_randomization): New function.
13249 (linux_target_ops): Install it.
13250 * server.h (disable_randomization): Declare.
13251 * server.c (disable_randomization): New global variable.
13252 (handle_general_set): Handle QDisableRandomization.
13253 (handle_query): Likewise for qSupported.
13254 (main): Support --disable-randomization and --no-disable-randomization
13255 command line arguments.
13256 * target.h (struct target_ops): Add supports_disable_randomization.
13257 (target_supports_disable_randomization): New macro.
13258
723b724b
MF
132592011-09-29 Mike Frysinger <vapier@gentoo.org>
13260
13261 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13262 ifdef check.
13263 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13264 [!PT_GETDSBT] (target_loadmap): New definition.
13265 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13266 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13267 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13268 and PT_GETDSBT to LINUX_LOADMAP.
13269 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13270 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13271
55329a5c 132722011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
13273
13274 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13275 (arm_linux_hwbp_cap): New static variable.
13276 (arm_linux_get_hwbp_cap): Replace by ...
13277 (arm_linux_init_hwbp_cap): ... this new function.
13278 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13279 (arm_linux_get_hw_watchpoint_count): Likewise.
13280 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13281 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13282 (arm_prepare_to_resume): Use perror_with_name instead of error.
13283
55329a5c 132842011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
13285
13286 * linux-arm-low.c: Include <signal.h>.
13287 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13288 (struct arm_linux_hwbp_cap): New data type.
13289 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13290 (struct arm_linux_hw_breakpoint): New data type.
13291 (MAX_BPTS, MAX_WPTS): Define.
13292 (struct arch_process_info, struct arch_lwp_info): New data types.
13293 (arm_linux_get_hwbp_cap): New function.
13294 (arm_linux_get_hw_breakpoint_count): Likewise.
13295 (arm_linux_get_hw_watchpoint_count): Likewise.
13296 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13297 (arm_hwbp_control_initialize): Likewise.
13298 (arm_hwbp_control_is_enabled): Likewise.
13299 (arm_hwbp_control_is_initialized): Likewise.
13300 (arm_hwbp_control_disable): Likewise.
13301 (arm_linux_hw_breakpoint_equal): Likewise.
13302 (arm_linux_hw_point_initialize): Likewise.
13303 (struct update_registers_data): New data structure.
13304 (update_registers_callback: New function.
13305 (arm_insert_point): Likewise.
13306 (arm_remove_point): Likewise.
13307 (arm_stopped_by_watchpoint): Likewise.
13308 (arm_stopped_data_address): Likewise.
13309 (arm_new_process): Likewise.
13310 (arm_new_thread): Likewise.
13311 (arm_prepare_to_resume): Likewise.
13312 (the_low_target): Register arm_insert_point, arm_remove_point,
13313 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13314 arm_new_thread, and arm_prepare_to_resume.
13315
6b9801d4
SS
133162011-09-15 Stan Shebs <stan@codesourcery.com>
13317
13318 * server.h (struct emit_ops): Add compare-goto fields.
13319 * tracepoint.c (gdb_agent_op_sizes): New table.
13320 (emit_eq_goto): New function.
13321 (emit_ne_goto): New function.
13322 (emit_lt_goto): New function.
13323 (emit_le_goto): New function.
13324 (emit_gt_goto): New function.
13325 (emit_ge_goto): New function.
13326 (is_goto_target): New function.
13327 (compile_bytecodes): Recognize special cases of compare-goto
13328 combinations and call specialized emitters for them.
13329 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13330 (amd64_emit_ne_goto): New function.
13331 (amd64_emit_lt_goto): New function.
13332 (amd64_emit_le_goto): New function.
13333 (amd64_emit_gt_goto): New function.
13334 (amd64_emit_ge_goto): New function.
13335 (amd64_emit_ops): Add the new functions.
13336 (i386_emit_eq_goto): New function.
13337 (i386_emit_ne_goto): New function.
13338 (i386_emit_lt_goto): New function.
13339 (i386_emit_le_goto): New function.
13340 (i386_emit_gt_goto): New function.
13341 (i386_emit_ge_goto): New function.
13342 (i386_emit_ops): Add the new functions.
13343
bf15cbda
SS
133442011-09-08 Stan Shebs <stan@codesourcery.com>
13345
13346 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13347 (i386_emit_epilogue): Restore %ebx.
13348
943ca1dd
JZ
133492011-08-31 Jie Zhang <jzhang918@gmail.com>
13350
13351 * server.c (step_thread): Remove definition.
13352 (process_serial_event): Don't handle Hs.
13353 * server.h (step_thread): Remove declaration.
13354 * target.c (set_desired_inferior): Remove use of step_thread.
13355
e3deef73
LM
133562011-08-24 Luis Machado <lgustavo@codesourcery.com>
13357
13358 * linux-low.c: Include linux-procfs.h.
13359 (linux_attach_lwp_1): Update comments.
13360 (linux_attach): Scan for existing threads when attaching to a
13361 process that is the tgid.
13362 * Makefile.in: Update dependencies.
13363
13da1c97
LM
133642011-08-24 Luis Machado <lgustavo@codesourcery.com>
13365
13366 * configure.srv: Add linux-procfs.o dependencies.
13367
881127c9
YQ
133682011-08-14 Yao Qi <yao@codesourcery.com>
13369
13370 * target.h (struct target_ops): Fix indent.
13371 * win32-low.c (win32_target_ops): Fix comment.
13372
58dbd541
YQ
133732011-08-14 Andrew Jenner <andrew@codesourcery.com>
13374 Yao Qi <yao@codesourcery.com>
13375
13376 * Makefile.in (clean): Remove tic6x-*.c files.
13377 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13378 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13379 (tic6x-c64xp-linux.c): Likewise.
13380 * configure.srv: Add support for tic6x-*-uclinux.
13381 * linux-tic6x-low.c: New.
13382 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13383
78d85199
YQ
133842011-08-14 Andrew Stubbs <ams@codesourcery.com>
13385 Yao Qi <yao@codesourcery.com>
13386
13387 * target.h (struct target_ops): Add read_loadmap.
13388 * linux-low.c (struct target_loadseg): New type.
13389 (struct target_loadmap): New type.
13390 (linux_read_loadmap): New function.
13391 (linux_target_ops): Add linux_read_loadmap.
13392 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
13393 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13394 to NULL.
78d85199 13395
a959a88d
EZ
133962011-08-05 Eli Zaretskii <eliz@gnu.org>
13397
13398 * win32-low.c: Include <stdint.h>.
13399
1ced966e
PA
134002011-07-22 Pedro Alves <pedro@codesourcery.com>
13401
13402 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13403 to the inferior here.
13404 (i386_remove_aligned_watchpoint): Ditto.
13405 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13406 fit part of the watchpoint in the debug registers.
13407 (i386_update_inferior_debug_regs): New.
13408 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13409 registers, and only update the inferior on success.
13410 (i386_low_remove_watchpoint): Ditto.
13411
d26e3629
KY
134122011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13413
13414 * linux-low.c (compare_ints, unique, list_threads, show_process,
13415 linux_core_of_thread): Delete.
13416 (linux_target_ops): Change linux_core_of_thread to
13417 linux_common_core_of_thread.
13418 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13419 * utils.c (malloc_failure): Change type of argument.
13420 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13421 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13422 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13423 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13424 (IPA_OBJS): Add common-utils-ipa.o.
13425 (ptid_h, linux_osdata_h): New macros.
13426 (server_h): Add common/common-utils.h, common/xml-utils.h,
13427 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13428 common/ptid.h.
13429 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13430 ptid.o, buffer.o): New rules.
13431 (linux-low.o): Add common/linux-osdata.h as a dependency.
13432 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13433 * configure.ac: Add AC_HEADER_DIRENT check.
13434 * config.in: Regenerate.
13435 * configure: Regenerate.
13436 * remote-utils.c (xml_escape_text): Delete.
13437 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13438 buffer_xml_printf): Move to common/buffer.c.
13439 * server.c (main): Remove call to initialize_inferiors.
13440 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13441 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13442 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13443 internal_error, gdb_assert, gdb_assert_fail): Delete.
13444 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13445 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13446 common/buffer.h.
13447 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13448 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13449 initialize_inferiors): Delete.
13450
2275a1a7
PA
134512011-07-20 Pedro Alves <pedro@codesourcery.com>
13452
13453 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13454 symbol error.
13455
0a5b1e09
PA
134562011-05-31 Pedro Alves <pedro@codesourcery.com>
13457
13458 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13459 assertion.
13460 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13461
6938fd34
YQ
134622011-05-26 Yao Qi <yao@codesourcery.com>
13463
13464 * Makefile.in (thread-db.o): Track dependence to
13465 common/gdb_thread_db.h.
13466 * thread-db.c: include gdb_thread_db.h from right place.
13467
b481f9e0
TT
134682011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13469
13470 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13471 __FILE__ and __LINE__ to internal_error.
13472
98a5dd13
DE
134732011-05-13 Doug Evans <dje@google.com>
13474
13475 * thread-db.c (try_thread_db_load_from_sdir): New function.
13476 (try_thread_db_load_from_dir): New function.
13477 (thread_db_load_search): Handle $sdir, ignore $pdir.
13478 Remove trying of system directories if search of
13479 libthread-db-search-path fails, that is now done via $sdir.
13480
d248b706
KY
134812011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13482
13483 * server.c (handle_query): Add EnableDisableTracepoints to the list
13484 of supported features.
43aaf8b6 13485 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 13486 tracepoints.
43aaf8b6
PA
13487 (cmd_qtenable_disable): New.
13488 (cmd_qtstart): Install tracepoints even if disabled.
13489 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13490 receiving a QTEnable or QTDisable packet.
13491 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13492 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13493 tracepoints.
13494 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 13495
84e578fb
DE
134962011-05-10 Doug Evans <dje@google.com>
13497
13498 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13499
71f55dd8
DE
135002011-05-04 Doug Evans <dje@google.com>
13501
13502 * linux-low.c (linux_join): Skip process lookup.
13503 * spu-low.c (spu_join): Ditto.
13504 * server.c (join_inferiors_callback): Delete.
13505 (process_serial_event): For 'D' packet (detach) call join_inferior
13506 directly.
13507
4d393d60
JM
135082011-05-04 Joseph Myers <joseph@codesourcery.com>
13509
13510 * README: Don't mention xscale*-*-linux*.
13511 * configure.srv (xscale*-*-linux*): Don't handle target.
13512
b00ad6ff
NF
135132011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13514
13515 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13516 casting pointers.
13517 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13518 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13519 (i386_emit_void_call_2): Likewise.
13520
af96c192
YQ
135212011-04-26 Yao Qi <yao@codesourcery.com>
13522
43aaf8b6
PA
13523 * linux-low.c: Move common macros to linux-ptrace.h.
13524 Include linux-ptrace.h.
af96c192
YQ
13525 * Makefile.in (linux_ptrace_h): New.
13526 (linux-low.o): Depends on linux-ptrace.h.
13527
03f2bd59
JK
135282011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13529
13530 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13531 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13532 (remote_prepare): New function with most of the TCP code from ...
13533 (remote_open): ... here. Detect PORT here unconditionally. Move also
13534 setting transport_is_reliable.
13535 * server.c (run_once): New variable.
13536 (gdbserver_usage): Document it.
13537 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13538 the first run if RUN_ONCE.
13539 * server.h (run_once, remote_prepare): New declarations.
13540
7a9dd1b2
TT
135412011-04-19 Tom Tromey <tromey@redhat.com>
13542
13543 * win32-low.c (handle_load_dll): Remove duplicate "the".
13544
81239425
PM
135452011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13546
13547 Remove support for old Cygwin 1.5 versions.
13548 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13549 function to avoid warning.
13550 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13551 warning.
13552
9e0627f1
PM
135532011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13554
13555 * gdbserver/server.h (Macro _): Define it if not available.
13556
588eebee
MS
135572011-03-14 Michael Snyder <msnyder@vmware.com>
13558
348af9f7 13559 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 13560
43f70d4c
JB
135612011-03-10 Joel Brobecker <brobecker@adacore.com>
13562
13563 * Makefile.in (maintainer-clean realclean distclean): Remove
13564 "make ... subdir_do" command.
13565
348af9f7
MS
135662011-03-10 Michael Snyder <msnyder@vmware.com>
13567
13568 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13569
13570 * server.c (handle_v_run): Free alloced buffer on early return.
13571
e637a4f5
YQ
135722011-03-09 Yao Qi <yao@codesourcery.com>
13573
13574 Revert:
13575 2011-03-04 Yao Qi <yao@codesourcery.com>
13576
13577 * Makefile.in: Remove GNU make feature --directory.
13578
13579 2011-03-05 Yao Qi <yao@codesourcery.com>
13580
13581 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13582 (subdir_do): New make target. Copied from gdb/Makefile.
13583 (maintainer-clean, realclean, distclean, clean): Call corresponding
13584 make targets in common/Makefile.
13585
13586 2011-02-11 Yao Qi <yao@codesourcery.com>
13587
13588 * configure.ac: Call AC_PROG_RANLIB.
13589 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13590 * configure: Regenerate.
13591
e6edda56
JK
135922011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13593
13594 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13595
e5141119
JB
135962011-03-06 Yao Qi <yao@codesourcery.com>
13597
13598 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13599
64794aa4
JB
136002011-03-05 Yao Qi <yao@codesourcery.com>
13601
13602 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13603 (subdir_do): New make target. Copied from gdb/Makefile.
13604 (maintainer-clean, realclean, distclean, clean): Call corresponding
13605 make targets in common/Makefile.
13606
7a762829
YQ
136072011-03-04 Yao Qi <yao@codesourcery.com>
13608
13609 * Makefile.in: Remove GNU make feature --directory.
13610
348af9f7
MS
136112011-03-04 Michael Snyder <msnyder@vmware.com>
13612
13613 * server.c (queue_stop_reply): Call xmalloc not malloc.
13614
136152011-03-02 Michael Snyder <msnyder@vmware.com>
13616
13617 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13618
9f72fee2
MS
136192011-02-28 Michael Snyder <msnyder@vmware.com>
13620
588eebee
MS
13621 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13622 (cmd_qtframe): Ditto.
13623 (cmd_qtbuffer): Ditto.
13624 (cmd_bigqtbuffer): Ditto.
13625
9f72fee2
MS
13626 * utils.c (decimal2str): Initialize 'width' to nine, then
13627 don't mess with it.
13628
8040bd49
UW
136292011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13630
13631 * hostio.c (require_data): Free *data, not data.
13632
7e52cbd0
JK
136332011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13634
13635 * hostio.c (require_data): Use free, not xfree.
13636
9130f83e
MS
136372011-02-27 Michael Snyder <msnyder@vmware.com>
13638
4b812f4e
MS
13639 * server.c (handle_query): Discard unused value.
13640
9130f83e
MS
13641 * hostio.c (require_data): Free malloc memory before returning
13642 error.
13643
69d37113
MS
136442011-02-26 Michael Snyder <msnyder@vmware.com>
13645
13646 * linux-low.c (list_threads): Call closedir for dirent.
13647
35f5825a
MS
136482011-02-27 Michael Snyder <msnyder@vmware.com>
13649
2a589cef
MS
13650 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13651 a case statement falls through.
13652
0adea5f7
MS
13653 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13654
35f5825a
MS
13655 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13656 in comparison.
13657
238f1c74
MS
136582011-02-26 Michael Snyder <msnyder@vmware.com>
13659
13660 * utils.c (decimal2str): Eliminate dead code and dead param.
13661 (pulongest): Drop dead param from call to decimal2str.
13662 (plongest): Ditto.
13663
633ff500
JB
136642011-02-24 Joel Brobecker <brobecker@adacore.com>
13665
13666 Revert the following patch (not approved yet):
13667 2011-02-21 Hui Zhu <teawater@gmail.com>
13668 * tracepoint.c (tp_printf): New function.
13669 (eval_agent_expr): Handle gdb_agent_op_printf.
13670
f9c6ff72
HZ
136712011-02-21 Hui Zhu <teawater@gmail.com>
13672
13673 * tracepoint.c (tp_printf): New function.
13674 (eval_agent_expr): Handle gdb_agent_op_printf.
13675
94d5e490
TT
136762011-02-18 Tom Tromey <tromey@redhat.com>
13677
13678 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13679 (tracepoint.o): Likewise.
13680 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13681 (gdb_agent_op_names): Likewise.
13682
c7f96d2b
TT
136832011-02-18 Tom Tromey <tromey@redhat.com>
13684
13685 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13686 gdb_agent_op_rot>: New constants.
13687 (gdb_agent_op_names): Add pick and roll.
13688 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13689 cases.
13690
0feedb2c
JK
136912011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13692
13693 * aclocal.m4: Regenerated with aclocal-1.11.1.
13694
b3b9301e
PA
136952011-02-14 Pedro Alves <pedro@codesourcery.com>
13696
13697 * server.c (handle_qxfer_traceframe_info): New.
13698 (qxfer_packets): Register "traceframe-info".
13699 (handle_query): Report support for qXfer:traceframe-info:read+.
13700 * tracepoint.c (match_blocktype): New.
13701 (traceframe_find_block_type): Rename to ...
13702 (traceframe_walk_blocks): ... this. Add callback filter argument,
13703 and use it.
13704 (traceframe_find_block_type): New, reimplemented on top of
13705 traceframe_walk_blocks.
13706 (build_traceframe_info_xml): New.
13707 (traceframe_read_info): New.
13708 * server.h (traceframe_read_info): Declare.
13709
4f3e6fb7
YQ
137102011-02-11 Yao Qi <yao@codesourcery.com>
13711
13712 * configure.ac: Call AC_PROG_RANLIB.
13713 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13714 * configure: Regenerate.
13715
764880b7
PA
137162011-02-07 Pedro Alves <pedro@codesourcery.com>
13717
13718 * server.c (gdb_read_memory): Change return semantics to allow
13719 partial transfers.
13720 (handle_search_memory_1): Adjust.
13721 (process_serial_event) <'m' packet>: Handle partial transfers.
13722 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13723
1c79eb8a
PA
137242011-01-28 Pedro Alves <pedro@codesourcery.com>
13725
13726 * regcache.c (init_register_cache): Initialize
13727 regcache->register_status.
13728 (free_register_cache): Release regcache->register_status.
13729 (regcache_cpy): Copy register_status.
13730 (registers_to_string): Print 'x's for unavailable registers.
13731 (supply_register): Mark the register's status valid or
13732 unavailable, depending on whether a buffer was passed in or not.
13733 (supply_register_zeroed): New.
13734 (supply_regblock): Mark the registers' status valid or
13735 unavailable, depending on whether a buffer was passed in or not.
13736 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13737 (struct regcache): New `register_status' field.
13738 (supply_register_zeroed): Declare.
13739 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13740 supply_register_zeroed, rather than passing a NULL buffer to
13741 supply_register.
13742 * tracepoint.c (fetch_traceframe_registers): Update comment.
13743
85724a0e
PA
137442011-01-28 Pedro Alves <pedro@codesourcery.com>
13745
13746 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13747 buffer explicit.
13748
d08aafef
PA
137492011-01-25 Pedro Alves <pedro@codesourcery.com>
13750
13751 * server.h (decode_xfer_write): Change prototype.
13752 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13753 and don't extract the annex here.
13754 * server.c (decode_xfer_read): Remove `annex' parameter,
13755 and don't extract the annex here.
13756 (decode_xfer): New.
13757 (struct qxfer): New.
13758 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13759 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13760 (handle_qxfer_statictrace): New functions, abstracted out from
13761 handle_query, and made to use the struct qxfer interface.
13762 (handle_threads_qxfer_proper): Rename to ...
13763 (handle_qxfer_threads_proper): ... this.
13764 (handle_threads_qxfer): Rename to ...
13765 (handle_qxfer_threads): ... this. Adjust.
13766 (qxfer_packets): New array.
13767 (handle_qxfer): New function.
13768 (handle_query): Use handle_qxfer.
13769
493e2a69
MS
137702011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13771
13772 * gdbreplay.c: Shorten lines of >= 80 columns.
13773 * linux-low.c: Ditto.
13774 * linux-ppc-low.c: Ditto.
13775 * linux-s390-low.c: Ditto.
13776 * linux-sparc-low.c: Ditto.
13777 * linux-x86-low.c: Ditto.
13778 * linux-xtensa-low.c: Ditto.
13779 * mem-break.c: Ditto.
13780 * nto-low.c: Ditto.
13781 * regcache.h: Ditto.
13782 * remote-utils.c: Ditto.
13783 * server.c: Ditto.
13784 * server.h: Ditto.
13785 * thread-db.c: Ditto.
13786 * tracepoint.c: Ditto.
13787 * utils.c: Ditto.
13788 * win32-low.h: Ditto.
13789
44944448
JB
137902011-01-05 Joel Brobecker <brobecker@adacore.com>
13791
13792 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13793 update.
13794
71ce852c
JB
137952011-01-01 Joel Brobecker <brobecker@adacore.com>
13796
13797 * server.c (gdbserver_version): Update copyright year in version
13798 output.
13799 * gdbreplay.c (gdbreplay_version): Ditto.
13800
eb826dc6
MF
138012010-12-29 Jie Zhang <jie.zhang@analog.com>
13802
13803 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13804 * linux-bfin-low.c: New file.
13805 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13806 PT_DATA_ADDR for BFIN targets.
13807 * Makefile.in (SFILES): Add linux-bfin-low.c.
13808 (clean): Remove reg-bfin.c.
13809 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13810 * README: Mention supported Blackfin targets.
13811
39ab222a
MF
138122010-12-23 Mike Frysinger <vapier@gentoo.org>
13813
13814 * .gitignore: New file.
13815
a1f2ce7d
MF
138162010-11-16 Mike Frysinger <vapier@gentoo.org>
13817
13818 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13819
f474844c
JZ
138202010-10-22 Jie Zhang <jie@codesourcery.com>
13821
13822 * Makefile.in: Add FLAGS_TO_PASS variable.
13823 (install): Remove dependency of install-only and recursively
13824 invoke make for install-only.
13825
f1048712
DE
138262010-10-04 Doug Evans <dje@google.com>
13827
13828 * Makefile.in (uninstall): Use $(DESTDIR).
13829
b53a1623
PA
138302010-09-24 Pedro Alves <pedro@codesourcery.com>
13831
e6ee044d
PA
13832 PR gdb/11842
13833
b53a1623
PA
13834 * linux-x86-low.c (compat_siginfo_from_siginfo)
13835 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13836 si_code is < 0. Check for si_code == SI_TIMER before checking for
13837 si_code < 0.
13838
fa1bd1e4
JB
138392010-09-13 Joel Brobecker <brobecker@adacore.com>
13840
13841 * lynx-i386-low.c: New file.
13842 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13843
47fac8f8
JB
138442010-09-13 Joel Brobecker <brobecker@adacore.com>
13845
13846 * lynx-low.c (ptrace_request_to_str): Remove handling for
13847 request values that have been removed in LynxOS 5.x.
13848
1adfc54d
JB
138492010-09-13 Joel Brobecker <brobecker@adacore.com>
13850
13851 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13852 <ptrace.h>
13853
c2a66c29
NS
138542010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13855
13856 * configure.ac: Add --enable-inprocess-agent option.
13857 * configure: Rebuilt.
13858
32fcada3
YQ
138592010-09-06 Yao Qi <yao@codesourcery.com>
13860
13861 * linux-low.c (linux_kill): Remove unused variable.
13862 (linux_stabilize_threads): Likewise.
13863 * server.c (start_inferior): Likewise.
13864 (queue_stop_reply_callback): Likewise.
13865 * tracepoint.c (do_action_at_tracepoint): Likewise.
13866
0cccb683
YQ
138672010-09-06 Yao Qi <yao@codesourcery.com>
13868
13869 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13870 on return.
13871
423ec54c
JK
138722010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13873
13874 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13875
12ac6819
PA
138762010-09-06 Pedro Alves <pedro@codesourcery.com>
13877
13878 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13879 "$(IPA_DEPFILES)".
13880
8ed54b31
JB
138812010-09-01 Joel Brobecker <brobecker@adacore.com>
13882
13883 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13884 gdbserver/lynx-ppc-low.c: New files.
13885 * Makefile.in (lynx_low_h): New variable.
13886 (lynx-low.o, lynx-ppc-low.o): New rules.
13887 * configure.ac: On LynxOS, link with -lnetinet.
13888 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13889 * configure: regenerate.
13890
bb0116a4
JB
138912010-09-01 Joel Brobecker <brobecker@adacore.com>
13892
13893 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13894 * configure.ac: Add check for vasprintf and vsnprintf.
13895 * configure, config.in: Regenerate.
13896 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13897
a778ab81 138982010-09-01 Joel Brobecker <brobecker@adacore.com>
13899
13900 * gdbreplay.c: Move include of alloca.h up, next to include of
13901 malloc.h.
13902 * server.h: Add include of malloc.h.
13903 * mem-break.c: Remove include of malloc.h.
13904 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13905
8b034a19 139062010-09-01 Joel Brobecker <brobecker@adacore.com>
13907
13908 * Makefile.in (memmem.o): Build with -Wno-error.
13909
139102010-09-01 Joel Brobecker <brobecker@adacore.com>
13911
13912 * utils.c (xsnprintf): Make non-static.
13913 * server.h: Add xsnprintf declaration.
13914 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13915 replace calls to snprintf by calls to xsnprintf throughout.
13916
139172010-09-01 Joel Brobecker <brobecker@adacore.com>
13918
13919 * configure.ac: Add configure check for alloca.
13920 * configure, config.in: Regenerate.
13921 * server.h: Include alloca.h if it exists.
13922 * gdbreplay.c: Include alloca.h if it exists.
13923
1a981360
PA
139242010-08-28 Pedro Alves <pedro@codesourcery.com>
13925
13926 * linux-low.c (__SIGRTMIN): Define if not already defined.
13927 (linux_create_inferior): Check for __ANDROID__ rather than
13928 __SIGRTMIN.
13929 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13930 are already deferred.
13931 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13932 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13933 stopped and already has a pending signal to report.
13934 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13935 a pending signal to report or is moving out of a jump pad.
13936 (linux_init_signals): Check for __ANDROID__ rather than
13937 __SIGRTMIN.
13938
b4d51a55
PA
139392010-08-28 Pedro Alves <pedro@codesourcery.com>
13940
13941 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13942 debug_threads check. Avoid a linear search when not doing debug
13943 output.
13944
ec48365d
PA
139452010-08-27 Pedro Alves <pedro@codesourcery.com>
13946
13947 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13948 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13949 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13950 (process_event): Change local fd's type to gdb_fildes_t.
13951 (create_file_handler): Adjust prototype.
13952 (delete_file_handler): Adjust prototype.
13953 (handle_file_event): Adjust prototype. Use pfildes.
13954 (create_file_event): Adjsut prototype.
13955 * remote-utils.c (remote_desc, listen_desc): Change type to
13956 gdb_fildes_t.
13957 * server.h: New gdb_fildes_t typedef.
13958 [USE_WIN32API]: Include winsock2.h.
13959 (delete_file_handler, add_file_handler): Adjust prototypes.
13960 (pfildes): Declare.
13961 * utils.c (pfildes): New.
13962
854d88f0
PA
139632010-08-27 Pedro Alves <pedro@codesourcery.com>
13964
13965 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13966 * configure: Regenerate.
13967
0146f85b
PA
139682010-08-27 Pedro Alves <pedro@codesourcery.com>
13969
13970 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13971 (linux_done_accessing_memory): ... this.
13972 (linux_target_ops): Adjust.
13973 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13974 * nto-low.c (nto_target_ops): Adjust comment.
13975 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13976 * spu-low.c (spu_target_ops): Adjust comment.
13977 * target.h (target_ops): Rename unprepare_to_access_memory field
13978 to done_accessing_memory.
13979 (unprepare_to_access_memory): Rename to ...
13980 (done_accessing_memory): ... this.
13981
90d74c30
PA
139822010-08-26 Pedro Alves <pedro@codesourcery.com>
13983
13984 * linux-low.c (linux_prepare_to_access_memory): New.
13985 (linux_unprepare_to_access_memory): New.
13986 (linux_target_ops): Install them.
13987 * server.c (read_memory): Rename to ...
13988 (gdb_read_memory): ... this. Use
13989 prepare_to_access_memory/prepare_to_access_memory.
13990 (write_memory): Rename to ...
13991 (gdb_write_memory): ... this. Use
13992 prepare_to_access_memory/prepare_to_access_memory.
13993 (handle_search_memory_1): Adjust.
13994 (process_serial_event): Adjust.
13995 * target.h (struct target_ops): New fields
13996 prepare_to_access_memory and unprepare_to_access_memory.
13997 (prepare_to_access_memory, unprepare_to_access_memory): New.
13998 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13999 prepare_to_access_memory/prepare_to_access_memory.
14000 * nto-low.c (nto_target_ops): Adjust.
14001 * spu-low.c (spu_target_ops): Adjust.
14002 * win32-low.c (win32_target_ops): Adjust.
14003
fd467969
PA
140042010-08-26 Pedro Alves <pedro@codesourcery.com>
14005
14006 * Makefile.in (WARN_CFLAGS): Get it from configure.
14007 (WERROR_CFLAGS): New.
14008 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14009 * configure.ac: Introduce --enable-werror, which adds -Werror to
14010 the compiler command line. Enabled by default. Disable with
14011 --disable-werror. Add -Wdeclaration-after-statement
14012 Wpointer-arith and -Wformat-nonliteral to warning flags.
14013 * configure: Regenerate.
14014
331e2f5f
PA
140152010-08-26 Pedro Alves <pedro@codesourcery.com>
14016
14017 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14018
e581f2b4
PA
140192010-08-26 Pedro Alves <pedro@codesourcery.com>
14020
14021 * gdbreplay.c (remote_error): New.
14022 (gdbchar): New.
14023 (expect): Use gdbchar. Check for error reading from GDB.
14024 Clarify sync error output.
14025 (play): Check for errors writing to GDB.
14026 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14027 * remote-utils.c (getpkt): Check for errors writing to the remote
14028 descriptor.
14029
3c11dd79
PA
140302010-08-25 Pedro Alves <pedro@codesourcery.com>
14031
14032 * linux-low.c (linux_wait_1): Move non-debugging code out of
14033 `debug_threads' control.
14034
d20a8ad9
PA
140352010-08-25 Pedro Alves <pedro@codesourcery.com>
14036
14037 * linux-low.c (linux_wait_1): Don't set last_status here.
14038 * server.c (push_event, queue_stop_reply_callback): Assert we're
14039 not pushing a TARGET_WAITKIND_IGNORE event.
14040 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14041 (myresume, handle_target_event): Set the thread's last_resume_kind
14042 and last_status from the target returned status.
14043
964e4306
PA
140442010-08-25 Pedro Alves <pedro@codesourcery.com>
14045
14046 PR threads/10729
14047
14048 * linux-x86-low.c (update_debug_registers_callback): New.
14049 (i386_dr_low_set_addr): Use it.
14050 (i386_dr_low_get_addr): New.
14051 (i386_dr_low_set_control): Use update_debug_registers_callback.
14052 (i386_dr_low_get_control): New.
14053 (i386_dr_low_get_status): Adjust.
14054 * linux-low.c (linux_stop_lwp): New.
14055 * linux-low.h (linux_stop_lwp): Declare.
14056
14057 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14058 argument instead of a i386_debug_reg_state.
14059 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14060 a i386_debug_reg_state.
14061 (i386_insert_aligned_watchpoint): Adjust.
14062 (i386_remove_aligned_watchpoint): Adjust.
14063 (i386_low_stopped_data_address): Read the debug registers from the
14064 inferior instead of from the mirrors.
14065 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14066 (i386_dr_low_get_addr): Declare.
14067 (i386_dr_low_get_control): Declare.
14068 (i386_dr_low_get_status): Change prototype.
14069
14070 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14071 (i386_dr_low_get_addr): New.
14072 (i386_dr_low_get_control): New.
14073 (i386_dr_low_get_status): Adjust prototype. Return
14074 dr_status_mirror.
14075 (i386_initial_stuff): Clear dr_status_mirror and
14076 dr_control_mirror.
14077 (i386_get_thread_context): Adjust.
14078 (i386_set_thread_context): Adjust.
14079 (i386_thread_added): Adjust.
14080
5f21a75b
PA
140812010-08-24 Pedro Alves <pedro@codesourcery.com>
14082
14083 * linux-low.h (linux_thread_area): Delete declaration.
14084
3e4c1235
TS
140852010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14086
14087 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14088 after its termination.
14089
1971b033
PA
140902010-08-09 Pedro Alves <pedro@codesourcery.com>
14091
14092 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14093 (gdb_wants_all_stopped): Delete.
14094 (linux_wait_1): Don't call them.
14095 * server.c (handle_v_cont): Tag all threads as want-stopped.
14096 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14097 stopped as "client-wants-stopped".
14098
310444ac
PA
140992010-07-31 Pedro Alves <pedro@codesourcery.com>
14100
14101 * Makefile.in (signals_h): New.
14102 (server_h): Depend on it.
14103 (server.o): Don't depend on $(signals_def).
14104 (signals.o): Depend on $(signals_def).
14105
a19cae16
JK
141062010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14107
14108 * Makefile.in (signals_def): New.
14109 (server_h): Append include/gdb/signals.h and signals_def.
14110 (server.o): Append signals_def.
14111
30d50328
JK
141122010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14113
14114 * server.c (handle_target_event): Use target_signal_to_host for
14115 resume_info.sig initialization.
14116 * target.h (struct thread_resume) <sig>: New comment.
14117
5c3216e2
OS
141182010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14119
c6f46ca0
OS
14120 * server.c (handle_query): strcpy() the returned string from paddress()
14121 instead of sprintf().
5c3216e2
OS
14122 * utils.c (paddress): Return phex_nz().
14123
6bd31874
JB
141242010-07-07 Joel Brobecker <brobecker@adacore.com>
14125
14126 * server.c (handle_v_cont): Call mourn_inferior if process
14127 just exited.
14128 (myresume): Likewise.
14129
0fb4aa4b
PA
141302010-07-01 Pedro Alves <pedro@codesourcery.com>
14131
14132 Static tracepoints, and integration with UST.
14133
14134 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14135 * mem-break.c (uninsert_all_breakpoints)
14136 (reinsert_all_breakpoints): New.
14137 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14138 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14139 (gdb_agent_ust_loaded, helper_thread_id)
14140 (gdb_agent_helper_thread_id): New macros.
14141 (struct ipa_sym_addresses): Add addr_ust_loaded,
14142 addr_helper_thread_id, addr_cmd_buf.
14143 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14144 (in_process_agent_loaded_ust): New.
14145 (write_e_ust_not_loaded): New.
14146 (maybe_write_ipa_ust_not_loaded): New.
14147 (struct collect_static_trace_data_action): New.
14148 (enum tracepoint_type) <static_tracepoint>: New.
14149 (struct tracepoint) <handle>: Mention static tracepoints.
14150 (struct static_tracepoint_ctx): New.
14151 (CMD_BUF_SIZE): New.
14152 (add_tracepoint_action): Handle static tracepoint actions.
14153 (unprobe_marker_at): New.
14154 (clear_installed_tracepoints): Handle static tracepoints.
14155 (cmd_qtdp): Handle static tracepoints.
14156 (probe_marker_at): New.
14157 (cmd_qtstart): Handle static tracepoints.
14158 (response_tracepoint): Handle static tracepoints.
14159 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14160 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14161 (get_context_regcache): Handle static tracepoints.
14162 (do_action_at_tracepoint): Handle static tracepoint actions.
14163 (traceframe_find_block_type): Handle static trace data blocks.
14164 (traceframe_read_sdata): New.
14165 (download_tracepoints): Download static tracepoint actions.
14166 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14167 (GDB_PROBE_NAME): New.
14168 (ust_ops): New.
14169 (GET_UST_SYM): New.
14170 (USTF): New.
14171 (dlsym_ust): New.
14172 (ust_marker_to_static_tracepoint): New.
14173 (gdb_probe): New.
14174 (collect_ust_data_at_tracepoint): New.
14175 (gdb_ust_probe): New.
14176 (UNIX_PATH_MAX, SOCK_DIR): New.
14177 (gdb_ust_connect_sync_socket): New.
14178 (resume_thread, stop_thread): New.
14179 (run_inferior_command): New.
14180 (init_named_socket): New.
14181 (gdb_ust_socket_init): New.
14182 (cstr_to_hexstr): New.
14183 (next_st): New.
14184 (first_marker, next_marker): New.
14185 (response_ust_marker): New.
14186 (cmd_qtfstm, cmd_qtsstm): New.
14187 (unprobe_marker_at, probe_marker_at): New.
14188 (cmd_qtstmat, gdb_ust_thread): New.
14189 (gdb_ust_init): New.
14190 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14191 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14192 (ST_REGENTRY): New.
14193 (x86_64_st_collect_regmap): New.
14194 (X86_64_NUM_ST_COLLECT_GREGS): New.
14195 (AMD64_RIP_REGNUM): New.
14196 (supply_static_tracepoint_registers): New.
14197 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14198 (ST_REGENTRY): New.
14199 (i386_st_collect_regmap): New.
14200 (i386_NUM_ST_COLLECT_GREGS): New.
14201 (supply_static_tracepoint_registers): New.
14202 * server.c (handle_query): Handle qXfer:statictrace:read.
14203 <qSupported>: Report support for StaticTracepoints, and
14204 qXfer:statictrace:read features.
14205 * server.h (traceframe_read_sdata)
14206 (supply_static_tracepoint_registers): Declare.
14207 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14208 (unpack_varlen_hex): Include in IPA build.
14209 * Makefile.in (ustlibs, ustinc): New.
14210 (IPA_OBJS): Add remote-utils-ipa.o.
14211 ($(IPA_LIB)): Link -ldl and -lpthread.
14212 (UST_CFLAGS): New.
14213 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14214 * config.in, configure: Regenerate.
14215
9e4344e5
PA
142162010-06-20 Ian Lance Taylor <iant@google.com>
14217 Pedro Alves <pedro@codesourcery.com>
14218
14219 * linux-x86-low.c (always_true): Delete.
14220 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14221 trying to fool the compiler with always_true.
14222
c6beb2cb
PA
142232010-06-20 Pedro Alves <pedro@codesourcery.com>
14224
14225 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14226 conditions in gdbserver.
14227
d2ed6730
UW
142282010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14229
14230 * spu-low.c (spu_read_memory): Wrap around local store limit.
14231 (spu_write_memory): Likewise.
14232
4e29fb54
PA
142332010-06-15 Pedro Alves <pedro@codesourcery.com>
14234
14235 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14236 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14237 LONGEST uses.
14238 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14239 uses.
14240 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14241 uses with LONGEST uses.
14242
6a271cae
PA
142432010-06-14 Stan Shebs <stan@codesourcery.com>
14244 Pedro Alves <pedro@codesourcery.com>
14245
14246 Bytecode compiler.
14247
14248 * linux-x86-low.c: Include limits.h.
14249 (add_insns): New.
14250 (always_true): New.
14251 (EMIT_ASM): New.
14252 (EMIT_ASM32): New.
14253 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14254 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14255 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14256 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14257 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14258 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14259 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14260 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14261 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14262 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14263 (amd64_emit_void_call_2): New.
14264 (amd64_emit_ops): New.
14265 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14266 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14267 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14268 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14269 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14270 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14271 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14272 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14273 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14274 (i386_emit_stack_adjust, i386_emit_int_call_1)
14275 (i386_emit_void_call_2): New.
14276 (i386_emit_ops): New.
14277 (x86_emit_ops): New.
14278 (the_low_target): Install x86_emit_ops.
14279 * server.h (struct emit_ops): New.
14280 (get_raw_reg_func_addr): Declare.
14281 (current_insn_ptr, emit_error): Declare.
14282 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14283 (set_trace_state_variable_value): New defines.
14284 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14285 addr_get_trace_state_variable_value and
14286 addr_set_trace_state_variable_value.
14287 (symbol_list): New fields for get_raw_reg,
14288 get_trace_state_variable_value and set_trace_state_variable_value.
14289 (condfn): New typedef.
14290 (struct tracepoint): New field `compiled_cond'.
14291 (do_action_at_tracepoint): Clear compiled_cond.
14292 (get_trace_state_variable_value, set_trace_state_variable_value):
14293 Export in the IPA.
14294 (condition_true_at_tracepoint): If there's a compiled condition,
14295 run that.
14296 (current_insn_ptr, emit_error): New globals.
14297 (struct bytecode_address): New.
14298 (get_raw_reg_func_addr): New.
14299 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14300 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14301 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14302 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14303 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14304 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14305 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14306 (compile_tracepoint_condition, compile_bytecodes): New.
14307 * target.h (emit_ops): Forward declare.
14308 (struct target_ops): New field emit_ops.
14309 (target_emit_ops): New.
14310 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14311 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14312 * linux-low.c (linux_emit_ops): New.
14313 (linux_target_ops): Install it.
14314 * linux-low.h (struct linux_target_ops): New field emit_ops.
14315
92b72907
UW
143162010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14317
14318 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14319 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14320
fa593d66
PA
143212010-06-01 Pedro Alves <pedro@codesourcery.com>
14322 Stan Shebs <stan@codesourcery.com>
14323
14324 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14325 (all): Depend on $(extra_libraries).
14326 (install-only): Install the IPA.
14327 (IPA_OBJS, IPA_LIB): New.
14328 (clean): Remove the IPA lib.
14329 (IPAGENT_CFLAGS): New.
14330 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14331 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14332 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14333 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14334 * configure.ac: Check for atomic builtins support in the compiler.
14335 (IPA_DEPFILES, extra_libraries): Define.
14336 * configure.srv (ipa_obj): Add description.
14337 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14338 (i[34567]86-*-linux*): Set ipa_obj.
14339 (x86_64-*-linux*): Set ipa_obj.
14340 * linux-low.c (stabilizing_threads): New.
14341 (supports_fast_tracepoints): New.
14342 (linux_detach): Stabilize threads before detaching.
14343 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14344 the lwp is either not stabilizing, or is moving out of a jump pad.
14345 (linux_fast_tracepoint_collecting): New.
14346 (maybe_move_out_of_jump_pad): New.
14347 (enqueue_one_deferred_signal): New.
14348 (dequeue_one_deferred_signal): New.
14349 (linux_wait_for_event_1): If moving out of a jump pad, defer
14350 pending signals to later.
14351 (linux_stabilize_threads): New.
14352 (linux_wait_1): Check if threads need moving out of jump pads, and
14353 do it if so.
14354 (stuck_in_jump_pad_callback): New.
14355 (move_out_of_jump_pad_callback): New.
14356 (lwp_running): New.
14357 (linux_resume_one_lwp): Handle moving out of jump pads.
14358 (linux_set_resume_request): Dequeue deferred signals.
14359 (need_step_over_p): Also step over fast tracepoint jumps.
14360 (start_step_over): Also uninsert fast tracepoint jumps.
14361 (finish_step_over): Also reinsert fast tracepoint jumps.
14362 (linux_install_fast_tracepoint_jump): New.
14363 (linux_target_ops): Install linux_stabilize_threads and
14364 linux_install_fast_tracepoint_jump_pad.
14365 * linux-low.h (linux_target_ops) <get_thread_area,
14366 install_fast_tracepoint_jump_pad>: New fields.
14367 (struct lwp_info) <collecting_fast_tracepoint,
14368 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14369 (linux_get_thread_area): Declare.
14370 * linux-x86-low.c (jump_insn): New.
14371 (x86_get_thread_area): New.
14372 (append_insns): New.
14373 (push_opcode): New.
14374 (amd64_install_fast_tracepoint_jump_pad): New.
14375 (i386_install_fast_tracepoint_jump_pad): New.
14376 (x86_install_fast_tracepoint_jump_pad): New.
14377 (the_low_target): Install x86_get_thread_area and
14378 x86_install_fast_tracepoint_jump_pad.
14379 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14380 (struct fast_tracepoint_jump): New.
14381 (fast_tracepoint_jump_insn): New.
14382 (fast_tracepoint_jump_shadow): New.
14383 (find_fast_tracepoint_jump_at): New.
14384 (fast_tracepoint_jump_here): New.
14385 (delete_fast_tracepoint_jump): New.
14386 (set_fast_tracepoint_jump): New.
14387 (uninsert_fast_tracepoint_jumps_at): New.
14388 (reinsert_fast_tracepoint_jumps_at): New.
14389 (set_breakpoint_at): Use write_inferior_memory.
14390 (uninsert_raw_breakpoint): Use write_inferior_memory.
14391 (check_mem_read): Mask out fast tracepoint jumps.
14392 (check_mem_write): Mask out fast tracepoint jumps.
14393 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14394 (set_fast_tracepoint_jump): Declare.
14395 (delete_fast_tracepoint_jump)
14396 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14397 (reinsert_fast_tracepoint_jumps_at): Declare.
14398 * regcache.c: Don't compile many functions when building the
14399 in-process agent library.
14400 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14401 the register buffer in the heap.
14402 (free_register_cache): If the register buffer isn't owned by the
14403 regcache, don't free it.
14404 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14405 pre-existing register caches.
14406 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14407 type.
14408 (convert_ascii_to_int): : Constify `from' parameter type.
14409 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14410 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14411 the needed buffer in-place.
14412 (relocate_instruction): New.
14413 * server.c (handle_query) <qSymbols>: If the target supports
14414 tracepoints, give it a chance of looking up symbols. Report
14415 support for fast tracepoints.
14416 (handle_status): Stabilize threads.
14417 (process_serial_event): Adjust.
14418 * server.h (struct fast_tracepoint_jump): Forward declare.
14419 (struct process_info) <fast_tracepoint_jumps>: New field.
14420 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14421 (decode_X_packet, decode_M_packet): Adjust.
14422 (relocate_instruction): Declare.
14423 (in_process_agent_loaded): Declare.
14424 (tracepoint_look_up_symbols): Declare.
14425 (struct fast_tpoint_collect_status): Declare.
14426 (fast_tracepoint_collecting): Declare.
14427 (force_unlock_trace_buffer): Declare.
14428 (handle_tracepoint_bkpts): Declare.
14429 (initialize_low_tracepoint)
14430 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14431 * target.h (struct target_ops) <stabilize_threads,
14432 install_fast_tracepoint_jump_pad>: New fields.
14433 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14434 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14435 [HAVE_STDINT_H]: Include stdint.h.
14436 (trace_debug_1): Rename to ...
14437 (trace_vdebug): ... this.
14438 (trace_debug): Rename to ...
14439 (trace_debug_1): ... this. Add `level' parameter.
14440 (trace_debug): New.
14441 (ATTR_USED, ATTR_NOINLINE): New.
14442 (IP_AGENT_EXPORT): New.
14443 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14444 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14445 (about_to_request_buffer_space, trace_buffer_is_full)
14446 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14447 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14448 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14449 (traceframe_write_count, traceframes_created)
14450 (trace_state_variables)
14451 New renaming defines.
14452 (struct ipa_sym_addresses): New.
14453 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14454 (symbol_list): New.
14455 (ipa_sym_addrs): New.
14456 (all_tracepoint_symbols_looked_up): New.
14457 (in_process_agent_loaded): New.
14458 (write_e_ipa_not_loaded): New.
14459 (maybe_write_ipa_not_loaded): New.
14460 (tracepoint_look_up_symbols): New.
14461 (debug_threads) [IN_PROCESS_AGENT]: New.
14462 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14463 (UNKNOWN_SIDE_EFFECTS): New.
14464 (stop_tracing): New.
14465 (flush_trace_buffer): New.
14466 (stop_tracing_bkpt): New.
14467 (flush_trace_buffer_bkpt): New.
14468 (read_inferior_integer): New.
14469 (read_inferior_uinteger): New.
14470 (read_inferior_data_pointer): New.
14471 (write_inferior_data_pointer): New.
14472 (write_inferior_integer): New.
14473 (write_inferior_uinteger): New.
14474 (struct collect_static_trace_data_action): Delete.
14475 (enum tracepoint_type): New.
14476 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
14477 <actions_str, step_actions, step_actions_str>: Only include in
14478 GDBserver.
fa593d66
PA
14479 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14480 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14481 (tracepoints): Use IP_AGENT_EXPORT.
14482 (last_tracepoint): Don't include in the IPA.
14483 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14484 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14485 (alloced_trace_state_variables): New.
14486 (trace_state_variables): Use IP_AGENT_EXPORT.
14487 (traceframe_t): Delete unused variable.
14488 (circular_trace_buffer): Don't include in the IPA.
14489 (trace_buffer_start): Delete.
14490 (struct trace_buffer_control): New.
14491 (trace_buffer_free): Delete.
14492 (struct ipa_trace_buffer_control): New.
14493 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14494 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14495 New.
14496 (trace_buffer_ctrl): New.
14497 (TRACE_BUFFER_CTRL_CURR): New.
14498 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14499 Reimplement as macros.
14500 (trace_buffer_wrap): Delete.
14501 (traceframe_write_count, traceframe_read_count)
14502 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14503 (struct tracepoint_hit_ctx) <type>: New field.
14504 (struct fast_tracepoint_ctx): New.
14505 (memory_barrier): New.
14506 (cmpxchg): New.
14507 (record_tracepoint_error): Update atomically in the IPA.
14508 (clear_inferior_trace_buffer): New.
14509 (about_to_request_buffer_space): New.
14510 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14511 updating the same buffer.
14512 (add_tracepoint): Default the tracepoint's type to trap
14513 tracepoint, and orig_size to -1.
14514 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14515 internal variables.
14516 (create_trace_state_variable): New parameter `gdb'. Handle it.
14517 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14518 (cmd_qtdp): Handle fast tracepoints.
14519 (cmd_qtdv): Adjust.
14520 (max_jump_pad_size): New.
14521 (gdb_jump_pad_head): New.
14522 (get_jump_space_head): New.
14523 (claim_jump_space): New.
14524 (sort_tracepoints): New.
14525 (MAX_JUMP_SIZE): New.
14526 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14527 IPA.
14528 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14529 support. Upload fast traceframes, and delete internal IPA
14530 breakpoints.
14531 (stop_tracing_handler): New.
14532 (flush_trace_buffer_handler): New.
14533 (cmd_qtstop): Upload fast tracepoints.
14534 (response_tracepoint): Handle fast tracepoints.
14535 (tracepoint_finished_step): Upload fast traceframes. Set the
14536 tracepoint hit context's tracepoint type.
14537 (handle_tracepoint_bkpts): New.
14538 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14539 type. Add comment about fast tracepoints.
14540 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14541 non-existing action_str field.
14542 (get_context_regcache): Handle fast tracepoints.
14543 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14544 to the regcache.
14545 (fast_tracepoint_from_jump_pad_address): New.
14546 (fast_tracepoint_from_ipa_tpoint_address): New.
14547 (collecting_t): New.
14548 (force_unlock_trace_buffer): New.
14549 (fast_tracepoint_collecting): New.
14550 (collecting): New.
14551 (gdb_collect): New.
14552 (write_inferior_data_ptr): New.
14553 (target_tp_heap): New.
14554 (target_malloc): New.
14555 (download_agent_expr): New.
14556 (UALIGN): New.
14557 (download_tracepoints): New.
14558 (download_trace_state_variables): New.
14559 (upload_fast_traceframes): New.
14560 (IPA_FIRST_TRACEFRAME): New.
14561 (IPA_NEXT_TRACEFRAME_1): New.
14562 (IPA_NEXT_TRACEFRAME): New.
14563 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14564 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14565 (gdb_jump_pad_buffer_end): New.
14566 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14567 (initialize_tracepoint): Adjust.
14568 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14569 buffer. Initialize the low module.
14570 * utils.c (PREFIX, TOOLNAME): New.
14571 (malloc_failure): Use PREFIX.
14572 (error): In the IPA, an error causes an exit.
14573 (fatal, warning): Use PREFIX.
14574 (internal_error): Use TOOLNAME.
14575 (NUMCELLS): Increase to 10.
14576 * configure, config.in: Regenerate.
14577
d149dd1d
PA
145782010-06-01 Pedro Alves <pedro@codesourcery.com>
14579
14580 * server.c (handle_query) <qSupported>: Do two passes over the
14581 qSupported string to avoid nesting strtok.
14582
f6528abd
JK
145832010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14584
14585 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14586 (CDEPS): New.
14587 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14588 -Wl,--dynamic-list.
14589 * configure: Regenerate.
14590 * proc-service.list: New.
14591
ca2a87a0
JK
145922010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14593
14594 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14595 New comment.
14596
363a6e9f
OS
145972010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14598
14599 * gdbreplay.c (remote_open): Check error return from socket() call by
14600 its equality to -1 not by it being negative.
14601 * remote-utils.c (remote_open): Likewise.
14602
d23b6cb1
PA
146032010-05-23 Pedro Alves <pedro@codesourcery.com>
14604
14605 * config.h: Regenerate.
14606
28d3cf85
MK
146072010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14608
14609 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14610 doesn't provide PTRACE_GET_THREAD_AREA.
14611
fea36a59
MK
146122010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14613
14614 * linux-m68k-low.c: Include <asm/ptrace.h>
14615 (ps_get_thread_area): Implement.
14616
24b066ba
DE
146172010-05-03 Doug Evans <dje@google.com>
14618
14619 * event-loop.c (struct callback_event): New struct.
14620 (callback_list): New global.
14621 (append_callback_event, delete_callback_event): New functions.
14622 (process_callback): New function.
14623 (start_event_loop): Call it.
14624 * remote-utils.c (NOT_SCHEDULED): Define.
14625 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14626 moved out of readchar.
14627 (readchar): Rewrite. Call reschedule before returning.
14628 (reset_readchar): New function.
14629 (remote_close): Call it.
14630 (process_remaining, reschedule): New functions.
14631 * server.h (callback_handler_func): New typedef.
14632 (append_callback_event, delete_callback_event): Declare.
14633
9836d6ea
PA
146342010-05-03 Pedro Alves <pedro@codesourcery.com>
14635
14636 * proc-service.c (ps_pglobal_lookup): Use
14637 thread_db_look_up_one_symbol.
14638 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14639 parameter. Use it instead of all_symbols_looked_up.
14640 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14641 field.
14642 (all_symbols_looked_up): Don't declare.
14643 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14644 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14645 field.
14646 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14647 Set all_symbols_looked_up here.
14648 (thread_db_look_up_one_symbol): New.
14649 (thread_db_get_tls_address): Adjust.
14650 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14651 thread_db object on the heap, and tentatively set it in the
14652 process structure.
14653 (thread_db_init): Don't set all_symbols_looked_up here.
14654 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14655
7984d532
PA
146562010-05-03 Pedro Alves <pedro@codesourcery.com>
14657
14658 * linux-low.c (linux_kill, linux_detach): Adjust.
14659 (status_pending_p_callback): Remove redundant statement. Check
14660 for !TARGET_WAITIKIND_IGNORE, instead of
14661 TARGET_WAITKIND_STOPPED.
14662 (handle_tracepoints): Make sure LWP is locked. Adjust.
14663 (linux_wait_for_event_1): Adjust.
14664 (linux_cancel_breakpoints): New.
14665 (unsuspend_one_lwp): New.
14666 (unsuspend_all_lwps): New.
14667 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14668 (send_sigstop_callback): Change return type to int, add new
14669 `except' parameter and handle it.
14670 (suspend_and_send_sigstop_callback): New.
14671 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14672 pass them down. If SUSPEND, also increment the lwp's suspend
14673 count.
14674 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14675 (need_step_over_p): Don't consider suspended LWPs.
14676 (start_step_over): Adjust.
14677 (proceed_one_lwp): Change return type to int, add new `except'
14678 parameter and handle it.
14679 (unsuspend_and_proceed_one_lwp): New.
14680 (proceed_all_lwps): Use find_inferior instead of
14681 for_each_inferior.
14682 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14683 also decrement the suspend count of LWPs. Pass `except' down,
14684 instead of hacking its suspend count.
14685 (linux_pause_all): Add `freeze' parameter. Adjust.
14686 (linux_unpause_all): New.
14687 (linux_target_ops): Install linux_unpause_all.
14688 * server.c (handle_status): Adjust.
14689 * target.h (struct target_ops): New fields `unpause_all' and
14690 `cancel_breakpoints'. Add new parameter to `pause_all'.
14691 (pause_all): Add new `freeze' parameter.
14692 (unpause_all): New.
14693 (cancel_breakpoints): New.
14694 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14695 cancel breakpoints.
14696 (cmd_qtstart): Pause threads.
14697 (stop_tracing): Pause threads, and cancel breakpoints.
14698 * win32-low.c (win32_target_ops): Adjust.
14699
e471f25b
PA
147002010-05-03 Pedro Alves <pedro@codesourcery.com>
14701
14702 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14703 the inferior right away from here...
14704 (linux_wait_1): ... to here, and adjust to check the thread's
14705 last_resume_kind instead of the lwp's step or stop_expected flags.
14706
1915ef4f
PA
147072010-05-02 Pedro Alves <pedro@codesourcery.com>
14708
14709 * README: Use consistent `GDB' and `GDBserver' spellings.
14710
f9e39928
PA
147112010-05-02 Pedro Alves <pedro@codesourcery.com>
14712
14713 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14714 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14715 (linux_detach_one_lwp): Assume the lwp is stopped.
14716 (any_thread_of): Delete.
14717 (linux_detach): Stop all lwps here. Don't blindly delete all
14718 breakpoints.
14719 (delete_lwp_callback): New.
14720 (linux_mourn): Delete all lwps of the process that is gone.
14721 (linux_wait_1): Don't delete the last lwp of the process here.
14722 * mem-break.h (mark_breakpoints_out): Declare.
14723 * mem-break.c (mark_breakpoints_out): New.
14724 (free_all_breakpoints): Use it.
14725 * server.c (handle_target_event): If the process is gone, mark
14726 breakpoints out.
14727 * thread-db.c (struct thread_db) <create_bp>: New field.
14728 (thread_db_enable_reporting): Fix prototype. Store a thread event
14729 breakpoint reference in the thread_db struct.
14730 (thread_db_load_search): Clear the thread_db object.
14731 (try_thread_db_load_1): Ditto.
14732 (switch_to_process): New.
14733 (disable_thread_event_reporting): Use it.
14734 (remove_thread_event_breakpoints): New.
14735 (thread_db_detach, thread_db_mourn): Use it.
14736
1e7fc18c
PA
147372010-05-01 Pedro Alves <pedro@codesourcery.com>
14738
14739 * linux-low.c (linux_enable_event_reporting): New.
14740 (linux_wait_for_event_1, handle_extended_wait): Use it.
14741
02fc4de7
PA
147422010-04-30 Pedro Alves <pedro@codesourcery.com>
14743
14744 * linux-low.c (linux_kill_one_lwp, linux_kill)
14745 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14746 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14747 SIGSTOP even if the LWP is stopped.
14748 (send_sigstop_callback): New.
14749 (stop_all_lwps): Use send_sigstop_callback instead.
14750 (linux_resume_one_thread): Adjust.
14751 (proceed_one_lwp): Still proceed an LWP that the client has
14752 requested to stop, if we haven't reported it as stopped yet. Make
14753 sure that LWPs the client want stopped, have a pending SIGSTOP.
14754
bc3b5632
DE
147552010-04-26 Doug Evans <dje@google.com>
14756
ae1ada35
DE
14757 * server.c (handle_general_set): Make static.
14758
bc3b5632
DE
14759 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14760 Print received char after testing for error/eof instead of before.
14761 (input_interrupt): Tweak comment.
14762
65730243
DE
147632010-04-23 Doug Evans <dje@google.com>
14764
14765 * server.c (start_inferior): Print inferior argv if --debug.
14766
a8ae7dc0
AR
147672010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14768
14769 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14770 * nto-x86-low.c: Include server.h
14771
1c07cc19
PM
147722010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14773
14774 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14775 be consistent with other sources of this directory.
14776 (init_registers_amd64): Correct name of source file of this function
14777 in the comment.
14778
e0a61e09
PM
147792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14780
14781 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14782 64-bit executables.
14783
54709339
PM
147842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14785
14786 * win32-i386-low.c: Add 64-bit support.
14787 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14788 (init_registers_amd64): Declare.
14789 (mappings): Add 64-bit version of array.
14790 (init_windows_x86): New function.
14791 (the_low_target): Change init_arch field to init_windows_x86.
14792
e8f0053d
PM
147932010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14794
14795 * win32-low.c: Adapt to support also 64-bit architecture.
14796 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14797 (get_image_name): Use SIZE_T type for local variable `done'.
14798 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14799 (toolhelp_get_dll_name): Idem.
14800 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14801 Use uintptr_t typecast to avoid warning.
14802 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14803 (handle_exception): Use phex_nz to avoid warning.
14804 (win32_wait): Remove unused local variable `process'.
14805
c481e77e
PM
148062010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14807
14808 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14809 `amd64-avx.o'.
14810
12ea4b69
PM
148112010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14812
14813 * configure.ac: Use `ws2_32' library for srv_mingw.
14814 * configure: Regenerate.
14815 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14816 * remote-utils.c: Likewise.
14817
f6d1620c
L
148182010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14819
14820 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14821 if __x86_64__ is defined.
14822
8e642873
PM
148232010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14824
14825 * configure: Regenerate.
14826
711e434b
PM
148272010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14828
14829 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14830 * target.h (target_ops): New get_tib_address field.
14831 * win32-low.h (win32_thread_info): Add thread_local_base field.
14832 * win32-low.c (child_add_thread): Add tlb argument.
14833 Set thread_local_base field to TLB.
14834 (get_child_debug_event): Adapt to child_add_thread change.
14835 (win32_get_tib_address): New function.
14836 (win32_target_ops): Set get_tib_address field to
14837 win32_get_tib_address.
14838 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14839
505106cd
PA
148402010-04-12 Pedro Alves <pedro@codesourcery.com>
14841
505106cd
PA
14842 * linux-low.c (linux_mourn): Also remove the process.
14843 * server.c (handle_target_event): Don't remove the process here.
14844 * nto-low.c (nto_mourn): New.
14845 (nto_target_ops): Install it.
14846 * spu-low.c (spu_mourn): New.
14847 (spu_target_ops): Install it.
14848 * win32-low.c (win32_mourn): New.
14849 (win32_target_ops): Install it.
14850
e8470a06
PA
148512010-04-12 Pedro Alves <pedro@codesourcery.com>
14852
14853 * server.h (buffer_xml_printf): Remove redundant `;'.
14854
45ba0d02
PA
148552010-04-12 Pedro Alves <pedro@codesourcery.com>
14856
14857 * regcache.c (set_register_cache): Invalidate regcaches before
14858 changing the register cache layout.
14859 (regcache_invalidate_one): Allow a NULL regcache.
14860 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14861 regcaches before changing the register cache layout or the target
14862 regsets.
14863
59e04013
L
148642010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14865
14866 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14867 variable warning on Linux/x86-64.
14868
8336d594
PA
148692010-04-11 Pedro Alves <pedro@codesourcery.com>
14870
14871 GDBserver disconnected tracing support.
14872
14873 * linux-low.c (linux_remove_process): Delete.
14874 (add_lwp): Don't set last_resume_kind here.
14875 (linux_kill): Use `mourn'.
14876 (linux_detach): Use `thread_db_detach', and `mourn'.
14877 (linux_mourn): New.
14878 (linux_attach_lwp_1): Adjust comment.
14879 (linux_attach): last_resume_kind moved the thread_info; adjust.
14880 (status_pending_p_callback): Adjust.
14881 (linux_wait_for_event_1): Adjust.
14882 (count_events_callback, select_singlestep_lwp_callback)
14883 (select_event_lwp_callback, cancel_breakpoints_callback)
14884 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14885 (proceed_one_lwp): Adjust.
14886 (linux_async): Add debug output.
14887 (linux_thread_stopped): New.
14888 (linux_pause_all): New.
14889 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14890 linux_pause_all.
14891 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14892 (thread_db_free): Delete declaration.
14893 (thread_db_detach, thread_db_mourn): Declare.
14894 * thread-db.c (thread_db_init): Use thread_db_mourn.
14895 (thread_db_free): Delete, split in two.
14896 (disable_thread_event_reporting): New.
14897 (thread_db_detach): New.
14898 (thread_db_mourn): New.
14899
14900 * server.h (struct thread_info) <last_resume_kind>: New field.
14901 <attached>: Add comment.
14902 <gdb_detached>: New field.
14903 (handler_func): Change return type to int.
14904 (handle_serial_event, handle_target_event): Ditto.
14905 (gdb_connected): Declare.
14906 (tracing): Delete.
14907 (disconnected_tracing): Declare.
14908 (stop_tracing): Declare.
14909
14910 * server.c (handle_query) <qSupported>: Report support for
14911 disconnected tracing.
14912 (queue_stop_reply_callback): Account for running threads.
14913 (gdb_wants_thread_stopped): New.
14914 (gdb_wants_all_threads_stopped): New.
14915 (gdb_reattached_process): New.
14916 (handle_status): Clear the `gdb_detached' flag of all processes.
14917 In all-stop, stop all threads.
14918 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14919 (process_serial_event): If the remote connection breaks, or if an
14920 exit was forced with "monitor exit", force an event loop exit.
14921 Handle disconnected tracing on detach.
14922 (handle_serial_event): Adjust.
14923 (handle_target_event): If GDB isn't connected, forward events back
14924 to the inferior, unless the last process exited, in which case,
14925 exit gdbserver. Adjust interface.
14926
14927 * remote-utils.c (remote_open): Don't block in accept. Instead
14928 register an event loop source on the listen socket file
14929 descriptor. Refactor bits into ...
14930 (listen_desc): ... this new global.
14931 (gdb_connected): ... this new function.
14932 (enable_async_notification): ... this new function.
14933 (handle_accept_event): ... this new function.
14934 (remote_close): Clear remote_desc.
14935
14936 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14937
14938 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14939 New fields.
14940 (mourn_inferior): Define.
14941 (target_process_qsupported): Avoid the dangling else problem.
14942 (thread_stopped): Define.
14943 (pause_all): Define.
14944 (target_waitstatus_to_string): Declare.
14945 * target.c (target_waitstatus_to_string): New.
14946
14947 * tracepoint.c (tracing): Make extern.
14948 (disconnected_tracing): New.
14949 (stop_tracing): Make extern. Handle tracing stops due to GDB
14950 disconnecting.
14951 (cmd_qtdisconnected): New.
14952 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14953 (handle_tracepoint_general_set): Handle QTDisconnected.
14954
14955 * event-loop.c (event_handler_func): Change return type to int.
14956 (process_event): Bail out if the event handler wants the event
14957 loop to stop.
14958 (handle_file_event): Ditto.
14959 (start_event_loop): Bail out if the event handler wants the event
14960 loop to stop.
14961
14962 * nto-low.c (nto_target_ops): Adjust.
14963 * spu-low.c (spu_wait): Don't remove the process here.
14964 (spu_target_ops): Adjust.
14965 * win32-low.c (win32_wait): Don't remove the process here.
14966 (win32_target_ops): Adjust.
14967
5d267c4c
PA
149682010-04-11 Pedro Alves <pedro@codesourcery.com>
14969
14970 * regcache.c (realloc_register_cache): Invalidate inferior's
14971 regcache before recreating it.
14972
623ccd72
PA
149732010-04-09 Pedro Alves <pedro@codesourcery.com>
14974
14975 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14976
219f2f23
PA
149772010-04-09 Stan Shebs <stan@codesourcery.com>
14978 Pedro Alves <pedro@codesourcery.com>
14979
14980 * server.h (LONGEST): New.
14981 (struct thread_info) <while_stepping>: New field.
14982 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14983 Declare.
14984 (initialize_tracepoint, handle_tracepoint_general_set)
14985 (handle_tracepoint_query, tracepoint_finished_step)
14986 (tracepoint_was_hit, release_while_stepping_state_list):
14987 (current_traceframe): Declare.
14988 * server.c (handle_general_set): Handle tracepoint packets.
14989 (read_memory): New.
14990 (write_memory): New.
14991 (handle_search_memory_1): Use read_memory.
14992 (handle_query): Report support for conditional tracepoints, trace
14993 state variables, and tracepoint sources. Handle tracepoint
14994 queries.
14995 (main): Initialize the tracepoints module.
14996 (process_serial_event): Handle traceframe reads/writes.
14997
14998 * linux-low.c (handle_tracepoints): New.
14999 (linux_wait_1): Call it.
15000 (linux_resume_one_lwp): Handle while-stepping.
15001 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15002 (linux_target_ops): Install them.
15003 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15004 New field.
15005 * linux-x86-low.c (x86_supports_tracepoints): New.
15006 (the_low_target). Install it.
15007
15008 * mem-break.h (delete_breakpoint): Declare.
15009 * mem-break.c (delete_breakpoint): Make external.
15010
15011 * target.h (struct target_ops): Add `supports_tracepoints',
15012 `read_pc', and `write_pc' fields.
15013 (target_supports_tracepoints): Define.
15014 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15015 (phex_nz): New.
15016
15017 * regcache.h (struct regcache) <registers_owned>: New field.
15018 (init_register_cache, regcache_cpy): Declare.
15019 (regcache_read_pc, regcache_write_pc): Declare.
15020 (register_cache_size): Declare.
15021 (supply_regblock): Declare.
15022 * regcache.c (init_register_cache): New.
15023 (new_register_cache): Use it.
15024 (regcache_cpy): New.
15025 (register_cache_size): New.
15026 (supply_regblock): New.
15027 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 15028
219f2f23
PA
15029 * tracepoint.c: New.
15030
15031 * Makefile.in (OBS): Add tracepoint.o.
15032 (tracepoint.o): New rule.
15033
3a13a53b
L
150342010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15035
15036 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15037 (i386-mmx.o): New.
15038 (i386-mmx.c): Likewise.
15039 (i386-mmx-linux.o): Likewise.
15040 (i386-mmx-linux.c): Likewise.
15041
15042 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15043 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15044 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15045 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15046
15047 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15048 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15049 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15050
1570b33e
L
150512010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15052
15053 * Makefile.in (clean): Updated.
15054 (i386-avx.o): New.
15055 (i386-avx.c): Likewise.
15056 (i386-avx-linux.o): Likewise.
15057 (i386-avx-linux.c): Likewise.
15058 (amd64-avx.o): Likewise.
15059 (amd64-avx.c): Likewise.
15060 (amd64-avx-linux.o): Likewise.
15061 (amd64-avx-linux.c): Likewise.
15062
15063 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15064 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15065 (srv_amd64_regobj): Add amd64-avx.o.
15066 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15067 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15068 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15069 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15070 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15071 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15072 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15073
15074 * i387-fp.c: Include "i386-xstate.h".
15075 (i387_xsave): New.
15076 (i387_cache_to_xsave): Likewise.
15077 (i387_xsave_to_cache): Likewise.
15078 (x86_xcr0): Likewise.
15079
15080 * i387-fp.h (i387_cache_to_xsave): Likewise.
15081 (i387_xsave_to_cache): Likewise.
15082 (x86_xcr0): Likewise.
15083
15084 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15085 * linux-crisv32-low.c (target_regsets): Likewise.
15086 * linux-m68k-low.c (target_regsets): Likewise.
15087 * linux-mips-low.c (target_regsets): Likewise.
15088 * linux-ppc-low.c (target_regsets): Likewise.
15089 * linux-s390-low.c (target_regsets): Likewise.
15090 * linux-sh-low.c (target_regsets): Likewise.
15091 * linux-sparc-low.c (target_regsets): Likewise.
15092 * linux-xtensa-low.c (target_regsets): Likewise.
15093
15094 * linux-low.c: Include <sys/uio.h>.
15095 (regsets_fetch_inferior_registers): Support nt_type.
15096 (regsets_store_inferior_registers): Likewise.
15097 (linux_process_qsupported): New.
15098 (linux_target_ops): Add linux_process_qsupported.
15099
15100 * linux-low.h (regset_info): Add nt_type.
15101 (linux_target_ops): Add process_qsupported.
15102
15103 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15104 and <sys/uio.h>.
15105 (init_registers_i386_avx_linux): New.
15106 (init_registers_amd64_avx_linux): Likewise.
15107 (xmltarget_i386_linux_no_xml): Likewise.
15108 (xmltarget_amd64_linux_no_xml): Likewise.
15109 (PTRACE_GETREGSET): Likewise.
15110 (PTRACE_SETREGSET): Likewise.
15111 (x86_fill_xstateregset): Likewise.
15112 (x86_store_xstateregset): Likewise.
15113 (use_xml): Likewise.
15114 (x86_linux_update_xmltarget): Likewise.
15115 (x86_linux_process_qsupported): Likewise.
15116 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15117 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15118 init_registers_i386_linux here. Call
15119 x86_linux_update_xmltarget.
15120 (the_low_target): Add x86_linux_process_qsupported.
15121
15122 * server.c (handle_query): Call target_process_qsupported.
15123
15124 * target.h (target_ops): Add process_qsupported.
15125 (target_process_qsupported): New.
15126
fc7238bb
PA
151272010-04-03 Pedro Alves <pedro@codesourcery.com>
15128
15129 * inferiors.c (add_thread): Set last_status kind to
15130 TARGET_WAITKIND_IGNORE.
15131 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15132 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15133 (linux_wait_1): Move `thread' local definition to block that uses
15134 it. Don't NULL initialize `event_child'.
15135 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15136 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15137 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15138
bdabb078
PA
151392010-04-01 Pedro Alves <pedro@codesourcery.com>
15140
15141 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15142 an extended waitstatus, or by a watchpoint.
15143 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15144 thread was stepping or has been stopped by a watchpoint.
15145
d3bbe7a0
PA
151462010-04-01 Pedro Alves <pedro@codesourcery.com>
15147
15148 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15149 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15150 of another, then delete the previous, and validate all
15151 breakpoints.
15152 (validate_inserted_breakpoint): New.
15153 (delete_disabled_breakpoints): New.
15154 (validate_breakpoints): New.
15155 (check_mem_read): Validate breakpoints before trusting their
15156 shadow. Delete disabled breakpoints.
15157 (check_mem_write): Validate breakpoints before trusting they
15158 should be inserted. Delete disabled breakpoints.
15159 * mem-break.h (validate_breakpoints):
15160 * server.c (handle_query): Validate breakpoints when we see a
15161 qSymbol query.
15162
8b07ae33
PA
151632010-04-01 Pedro Alves <pedro@codesourcery.com>
15164
15165 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15166 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15167 if we could tell there's a GDB breakpoint at stop_pc.
15168 (need_step_over_p): Don't do a step over if we find a GDB
15169 breakpoint at the resume PC.
15170
15171 * mem-break.c (struct raw_breakpoint): New.
15172 (enum bkpt_type): New type `gdb_breakpoint'.
15173 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15174 fields. New field `raw'.
15175 (find_raw_breakpoint_at): New.
15176 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15177 breakpoint instead.
15178 (set_breakpoint_at): Adjust.
15179 (delete_raw_breakpoint): New.
15180 (release_breakpoint): New.
15181 (delete_breakpoint): Rename to...
15182 (delete_breakpoint_1): ... this. Add proc parameter. Use
15183 release_breakpoint. Return ENOENT.
15184 (delete_breakpoint): Reimplement.
15185 (find_breakpoint_at): Delete.
15186 (find_gdb_breakpoint_at): New.
15187 (delete_breakpoint_at): Delete.
15188 (set_gdb_breakpoint_at): New.
15189 (delete_gdb_breakpoint_at): New.
15190 (gdb_breakpoint_here): New.
15191 (set_reinsert_breakpoint): Use release_breakpoint.
15192 (uninsert_breakpoint): Rename to ...
15193 (uninsert_raw_breakpoint): ... this.
15194 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15195 (reinsert_raw_breakpoint): Change parameter type to
15196 raw_breakpoint.
15197 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15198 instead.
15199 (check_breakpoints): Adjust. Use release_breakpoint.
15200 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15201 (breakpoint_inserted_here): Ditto.
15202 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15203 Don't trust the breakpoint's shadow if it is not inserted.
15204 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15205 (delete_all_breakpoints): Adjust.
15206 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15207 use delete_breakpoint_1.
15208
15209 * mem-break.h (breakpoints_supported): Delete declaration.
15210 (set_gdb_breakpoint_at): Declare.
15211 (gdb_breakpoint_here): Declare.
15212 (delete_breakpoint_at): Delete.
15213 (delete_gdb_breakpoint_at): Declare.
15214
15215 * server.h (struct raw_breakpoint): Forward declare.
15216 (struct process_info): New field `raw_breakpoints'.
15217
15218 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15219 breakpoints.
15220
6bf5e0ba
PA
152212010-03-24 Pedro Alves <pedro@codesourcery.com>
15222
15223 * linux-low.c (status_pending_p_callback): Fix comment.
15224 (linux_wait_for_event_1): Move most of the internal breakpoint
15225 handling from here...
15226 (linux_wait_1): ... to here.
15227 (count_events_callback): New.
15228 (select_singlestep_lwp_callback): New.
15229 (select_event_lwp_callback): New.
15230 (cancel_breakpoints_callback): New.
15231 (select_event_lwp): New.
15232 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15233 priority to all LWPs that have had events that should be reported
15234 to the client. Cancel breakpoints when about to reporting the
15235 event to the client, not while stopping lwps. No longer cancel
15236 finished single-steps here.
15237 (cancel_finished_single_step): Delete.
15238 (cancel_finished_single_steps): Delete.
15239
414a389f
PA
152402010-03-24 Pedro Alves <pedro@codesourcery.com>
15241
15242 * mem-break.c (enum bkpt_type): New.
15243 (struct breakpoint): New field `type'.
15244 (set_breakpoint_at): Change return type to struct breakpoint
15245 pointer. Set type to `other_breakpoint' by default.
15246 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15247 in the breakpoint list.
15248 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15249 (reinsert_breakpoint): Rename to ...
15250 (reinsert_raw_breakpoint): ... this.
15251 (reinsert_breakpoints_at): Adjust.
15252 * mem-break.h (struct breakpoint): Declare.
15253 (set_breakpoint_at): Change return type to struct breakpoint
15254 pointer.
15255
2280c721
PA
152562010-03-24 Pedro Alves <pedro@codesourcery.com>
15257
15258 * server.c (handle_query): Assign, not compare.
15259
d50171e4
PA
152602010-03-24 Pedro Alves <pedro@codesourcery.com>
15261
15262 Teach linux gdbserver to step-over-breakpoints.
15263
15264 * linux-low.c (can_hardware_single_step): New.
15265 (supports_breakpoints): New.
15266 (handle_extended_wait): If stopping threads, read the stop pc of
15267 the new cloned LWP.
15268 (get_pc): New.
15269 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15270 low target doesn't support retrieving the PC.
15271 (add_lwp): Set last_resume_kind to resume_continue.
15272 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15273 (linux_attach): Don't clear stop_expected. Set the lwp's
15274 last_resume_kind to resume_stop.
15275 (linux_detach_one_lwp): Don't check for removed breakpoints.
15276 (check_removed_breakpoint): Delete.
15277 (status_pending_p): Rename to ...
15278 (status_pending_p_callback): ... this. Don't check for removed
15279 breakpoints. Don't consider threads that are stopped from GDB's
15280 perspective.
15281 (linux_wait_for_lwp): Always read the stop_pc here.
15282 (cancel_breakpoint): New.
15283 (step_over_bkpt): New global.
15284 (linux_wait_for_event_1): Implement stepping over breakpoints.
15285 (gdb_wants_lwp_stopped): New.
15286 (gdb_wants_all_stopped): New.
15287 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15288 single-step traps here. Store the thread's last reported target
15289 wait status.
15290 (send_sigstop): Don't clear stop_expected. Always set it,
15291 instead.
15292 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15293 (cancel_finished_single_step): New.
15294 (cancel_finished_single_steps): New.
15295 (wait_for_sigstop): Don't cancel finished single-step traps here.
15296 (linux_resume_one_lwp): Don't check for removed breakpoints.
15297 Don't set `step' on non-hardware step archs.
15298 (linux_set_resume_request): Ignore resume_stop requests if already
15299 stopping or stopped. Set the lwp's last_resume_kind.
15300 (resume_status_pending_p): Don't check for removed breakpoints.
15301 (need_step_over_p): New.
15302 (start_step_over): New.
15303 (finish_step_over): New.
15304 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15305 requests. Clear the thread's last reported target waitstatus.
15306 Don't use the `suspended' flag. Don't consider pending breakpoints.
15307 (linux_resume): Start a step-over if necessary.
15308 (proceed_one_lwp): New.
15309 (proceed_all_lwps): New.
15310 (unstop_all_lwps): New.
15311 * linux-low.h (struct lwp_info): Rewrite comment for the
15312 `suspended' flag. Add the `stop_pc' field. Delete the
15313 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15314 Add `'last_resume_kind' and `need_step_over' fields.
15315 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15316 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15317 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15318 (set_raw_breakpoint_at): New.
15319 (set_breakpoint_at): Rewrite to use it.
15320 (reinsert_breakpoint_handler): Delete.
15321 (set_reinsert_breakpoint): New.
15322 (reinsert_breakpoint_by_bp): Delete.
15323 (delete_reinsert_breakpoints): New.
15324 (uninsert_breakpoint): Rewrite.
15325 (uninsert_breakpoints_at): New.
15326 (reinsert_breakpoint): Rewrite.
15327 (reinsert_breakpoints_at): New.
15328 (check_breakpoints): Rewrite.
15329 (breakpoint_here): New.
15330 (breakpoint_inserted_here): New.
15331 (check_mem_read): Adjust.
15332 * mem-break.h (breakpoints_supported, breakpoint_here)
15333 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15334 (reinsert_breakpoint_by_bp): Delete declaration.
15335 (delete_reinsert_breakpoints): Declare.
15336 (reinsert_breakpoint): Delete declaration.
15337 (reinsert_breakpoints_at): Declare.
15338 (uninsert_breakpoint): Delete declaration.
15339 (uninsert_breakpoints_at): Declare.
15340 (check_breakpoints): Adjust prototype.
15341 * server.h: Adjust include order.
15342 (struct thread_info): Declare here. Add a `last_status' field.
15343
30ba68cb
MS
153442010-03-23 Michael Snyder <msnyder@vmware.com>
15345
15346 * server.c (crc32): New function.
15347 (handle_query): Add handling for 'qCRC:' request.
15348
b9a881c2
PA
153492010-03-23 Pedro Alves <pedro@codesourcery.com>
15350
15351 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15352 lwp had been stopped by a watchpoint.
15353
e92d13d5
PA
153542010-03-16 Pedro Alves <pedro@codesourcery.com>
15355
15356 * server.h (internal_error): Declare.
15357 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15358 * utils.c (internal_error): New function.
15359
64daa791
AS
153602010-03-15 Andreas Schwab <schwab@redhat.com>
15361
15362 * configure.srv: Fix typo setting srv_regobj.
15363
f52cd8cd
PA
153642010-03-15 Pedro Alves <pedro@codesourcery.com>
15365
15366 * linux-low.c (fetch_register): Avoid passing a non string literal
15367 format to `error'.
15368 (usr_store_inferior_registers): Ditto.
15369
93ae6fdc
PA
153702010-03-14 Pedro Alves <pedro@codesourcery.com>
15371
15372 * linux-low.c (linux_write_memory): Bail out early if peeking
15373 memory failed.
15374
c3adc08c
PA
153752010-03-14 Pedro Alves <pedro@codesourcery.com>
15376
15377 * linux-low.h (struct lwp_info): New fields
15378 `stopped_by_watchpoint' and `stopped_data_address'.
15379 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15380 here, and cache them in the lwp object.
15381 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15382 directly.
15383 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15384 field.
15385 (linux_stopped_by_watchpoint): Rewrite.
15386 (linux_stopped_data_address): Rewrite.
15387
bce522a2
PA
153882010-03-06 Simo Melenius <simo.melenius@iki.fi>
15389
15390 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15391 switching the current inferior, not before.
15392
90884b2b
L
153932010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15394
15395 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15396 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15397 i386-linux.c and amd64-linux.c.
15398 (reg-i386.o): Removed.
15399 (reg-i386.c): Likewise.
15400 (reg-i386-linux.o): Likewise.
15401 (reg-i386-linux.c): Likewise.
15402 (reg-x86-64.o): Likewise.
15403 (reg-x86-64.c): Likewise.
15404 (reg-x86-64-linux.o): Likewise.
15405 (reg-x86-64-linux.c): Likewise.
15406 (i386.o): New.
15407 (i386.c): Likewise.
15408 (i386-linux.o): Likewise.
15409 (i386-linux.c): Likewise.
15410 (amd64.o): Likewise.
15411 (amd64.c): Likewise.
15412 (amd64-linux.o): Likewise.
15413 (amd64-linux.c): Likewise.
15414
15415 * configure.srv (srv_i386_regobj): New.
15416 (srv_i386_linux_regobj): Likewise.
15417 (srv_amd64_regobj): Likewise.
15418 (srv_amd64_linux_regobj): Likewise.
15419 (srv_i386_32bit_xmlfiles): Likewise.
15420 (srv_i386_64bit_xmlfiles): Likewise.
15421 (srv_i386_xmlfiles): Likewise.
15422 (srv_amd64_xmlfiles): Likewise.
15423 (srv_i386_linux_xmlfiles): Likewise.
15424 (srv_amd64_linux_xmlfiles): Likewise.
15425 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15426 srv_xmlfiles to $srv_i386_xmlfiles.
15427 (i[34567]86-*-mingw32ce*): Likewise.
15428 (i[34567]86-*-mingw*): Likewise.
15429 (i[34567]86-*-nto*): Likewise.
15430 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15431 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15432 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15433 (x86_64-*-linux*): Likewise.
15434
15435 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15436 (init_registers_amd64_linux): New.
15437 (x86_arch_setup): Replace init_registers_x86_64_linux with
15438 init_registers_amd64_linux.
15439
193f13e6
MK
154402010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15441
15442 * configure.ac: Check for libdl. If it is not available link against
15443 static libthread_db.
15444 * configure: Regenerate.
15445
85d721b8
PA
154462010-02-22 Pedro Alves <pedro@codesourcery.com>
15447
15448 PR9605
15449
15450 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15451 handing a read watchpoint.
15452 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15453
6076632b
DE
154542010-02-12 Doug Evans <dje@google.com>
15455
15456 * linux-low.c (linux_supports_tracefork_flag): Document.
15457 (linux_look_up_symbols): Add comment.
15458
3327ccf7
L
154592010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15460
15461 * regcache.c (supply_register): Clear regcache if buf is NULL.
15462
0718675c 154632010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 15464 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
15465
15466 * inferiors.c (find_inferior): Add function documentation.
15467 (unloaded_dll): Handle the case where the unloaded dll has not
15468 been previously registered in the dll list.
15469
177321bd
DJ
154702010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15471
15472 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15473 (thumb2_breakpoint): New.
15474 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15475
2b009048
DJ
154762010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15477
15478 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15479 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15480 breakpoints.
15481
3be029c7
PA
154822010-01-21 Pedro Alves <pedro@codesourcery.com>
15483
15484 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15485
18f5de3b
JK
154862010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15487
15488 * linux-s390-low.c (s390_collect_ptrace_register)
15489 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15490
3743bb4f
DE
154912010-01-21 Doug Evans <dje@google.com>
15492
14ce3065
DE
15493 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15494 (PTRACE_ARG4_TYPE): New macro.
15495 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15496 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15497 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15498 (usr_store_inferior_registers): Ditto.
15499 (linux_read_memory, linux_write_memory): Ditto.
15500 (linux_test_for_tracefork): Ditto.
15501
3743bb4f
DE
15502 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15503 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15504
8b315be5
PA
155052010-01-21 Pedro Alves <pedro@codesourcery.com>
15506
15507 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15508 target.
15509
85492558
PA
155102010-01-21 Pedro Alves <pedro@codesourcery.com>
15511
15512 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15513 prototype to take a regcache. Adjust.
15514
442ea881
PA
155152010-01-20 Pedro Alves <pedro@codesourcery.com>
15516
15517 * regcache.h (struct thread_info): Forward declare.
15518 (struct regcache): New.
15519 (new_register_cache): Adjust prototype.
15520 (get_thread_regcache): Declare.
15521 (free_register_cache): Adjust prototype.
15522 (registers_to_string, registers_from_string): Ditto.
15523 (supply_register, supply_register_by_name, collect_register)
15524 (collect_register_as_string, collect_register_by_name): Ditto.
15525 * regcache.c (struct inferior_regcache_data): Delete.
15526 (get_regcache): Rename to ...
15527 (get_thread_regcache): ... this. Adjust. Switch inferior before
15528 fetching registers.
15529 (regcache_invalidate_one): Adjust.
15530 (regcache_invalidate): Fix prototype.
15531 (new_register_cache): Return the new register cache.
15532 (free_register_cache): Change prototype.
15533 (realloc_register_cache): Adjust.
15534 (registers_to_string): Change prototype to take a regcache. Adjust.
15535 (registers_from_string): Ditto.
15536 (register_data): Ditto.
15537 (supply_register): Ditto.
15538 (supply_register_by_name): Ditto.
15539 (collect_register): Ditto.
15540 (collect_register_as_string): Ditto.
15541 (collect_register_by_name): Ditto.
15542 * server.c (process_serial_event): Adjust.
15543 * linux-low.h (regset_fill_func, regset_store_func): Change
15544 prototype.
15545 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15546 Change prototype.
15547 * linux-low.c (get_stop_pc): Adjust.
15548 (check_removed_breakpoint): Adjust.
15549 (linux_wait_for_event): Adjust.
15550 (linux_resume_one_lwp): Adjust.
15551 (fetch_register): Add regcache parameter. Adjust.
15552 (usr_store_inferior_registers): Ditto.
15553 (regsets_fetch_inferior_registers): Ditto.
15554 (regsets_store_inferior_registers): Ditto.
15555 (linux_fetch_registers, linux_store_registers): Ditto.
15556 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15557 regcache. Adjust.
43aaf8b6
PA
15558 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15559 Ditto.
442ea881
PA
15560 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15561 prototype to take a regcache.
15562 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15563 * remote-utils.c (convert_ascii_to_int, outreg)
15564 (prepare_resume_reply): Change prototype to take a regcache.
15565 Adjust.
15566 * target.h (struct target_ops) <fetch_registers, store_registers>:
15567 Change prototype to take a regcache.
15568 (fetch_inferior_registers, store_inferior_registers): Change
15569 prototype to take a regcache. Adjust.
15570 * proc-service.c (ps_lgetregs): Adjust.
15571 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15572 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15573 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15574 take a regcache. Adjust.
15575 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15576 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15577 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15578 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15579 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15580 (cris_cannot_fetch_register):
15581 (cris_breakpoint_at): Change prototype to take a regcache.
15582 Adjust.
15583 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15584 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15585 to take a regcache. Adjust.
15586 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15587 Adjust.
15588 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15589 take a regcache. Adjust.
15590 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15591 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15592 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15593 * linux-mips-low.c (mips_get_pc):
15594 (mips_set_pc): Change prototype to take a regcache. Adjust.
15595 (mips_reinsert_addr): Adjust.
15596 (mips_collect_register): Change prototype to take a regcache.
15597 Adjust.
15598 (mips_supply_register):
15599 (mips_collect_register_32bit, mips_supply_register_32bit)
15600 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15601 (mips_store_fpregset): Ditto.
43aaf8b6
PA
15602 * linux-ppc-low.c (ppc_supply_ptrace_register)
15603 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
15604 (parse_spufs_run): Adjust.
15605 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15606 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15607 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15608 take a regcache. Adjust.
15609 * linux-s390-low.c (s390_collect_ptrace_register)
15610 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15611 (s390_set_pc): Change prototype to take a regcache. Adjust.
15612 (s390_arch_setup): Adjust.
15613 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15614 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15615 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15616 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15617 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15618 regcache. Adjust.
15619 (sparc_breakpoint_at): Adjust.
15620 * linux-xtensa-low.c (xtensa_fill_gregset):
15621 (xtensa_store_gregset):
15622 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15623 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15624 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15625 prototype to take a regcache. Adjust.
15626 * win32-arm-low.c (arm_fetch_inferior_register)
15627 (arm_store_inferior_register): Change prototype to take a
15628 regcache. Adjust.
15629 * win32-i386-low.c (i386_fetch_inferior_register)
15630 (i386_store_inferior_register): Change prototype to take a
15631 regcache. Adjust.
15632 * win32-low.c (child_fetch_inferior_registers)
15633 (child_store_inferior_registers): Change prototype to take a
15634 regcache. Adjust.
15635 (win32_wait): Adjust.
15636 (win32_fetch_inferior_registers): Change prototype to take a
15637 regcache. Adjust.
15638 (win32_store_inferior_registers): Adjust.
15639 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15640 store_inferior_register>: Change prototype to take a regcache.
15641
60c3d7b0
DE
156422010-01-20 Doug Evans <dje@google.com>
15643
15644 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15645 #ifdef.
15646 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 15647 (W_STOPCODE): Provide definition if missing.
60c3d7b0 15648
dc146f7c
VP
156492010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15650
15651 * linux-low.c (linux_core_of_thread): New.
15652 (compare_ints, show_process, list_threads): New.
15653 (linux_qxfer_osdata): Report threads and cores.
15654 (linux_target_op): Register linux_core_of_thread.
15655 * remote-utils.c (prepare_resume_reply): Report the core.
15656 (buffer_xml_printf): Support %d specifier.
15657 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15658 New.
15659 (handle_query): Handle qXfer:threads. Announce availability
15660 thereof.
15661 * target.h (struct target_ops): New field core_of_thread.
15662
7803799a
UW
156632010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15664
15665 * Makefile.in (clean): Remove new generated files.
15666 (reg-s390.o, reg-s390.c): Remove rules.
15667 (reg-s390x.o, reg-s390x.c): Likewise.
15668 (s390-linux32.o, s390-linux32.c): Add rules.
15669 (s390-linux64.o, s390-linux64.c): Likewise.
15670 (s390x-linux64.o, s390x-linux64.c): Likewise.
15671 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15672 * linux-s390-low.c: Include <elf.h>.
15673 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15674 (init_registers_s390): Remove prototype.
15675 (init_registers_s390x): Likewise.
15676 (init_registers_s390_linux32): Add prototype.
15677 (init_registers_s390_linux64): Likewise.
15678 (init_registers_s390x_linux64): Likewise.
15679 (s390_num_regs_3264): New define.
15680 (s390_regmap_3264): New global variable.
15681 (s390_cannot_fetch_register): Remove obsolete check.
15682 (s390_cannot_store_register): Likewise.
15683 (s390_collect_ptrace_register): Handle upper/lower register halves.
15684 (s390_supply_ptrace_register): Likewise.
15685 (s390_fill_gregset): Update to register number changes.
15686 (s390_get_hwcap): New routine.
15687 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15688 Install appropriate regmap and register set.
15689
6e7ffa39
JB
156902010-01-01 Joel Brobecker <brobecker@adacore.com>
15691
15692 * server.c (gdbserver_version): Update copyright year to 2010.
15693 * gdbreplay.c (gdbreplay_version): Likewise.
15694
957f3f49
DE
156952009-12-28 Doug Evans <dje@google.com>
15696
15697 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15698 elf/external.h. Include <elf.h> instead but only if necessary.
15699
ca5c370d
PA
157002009-12-28 Pedro Alves <pedro@codesourcery.com>
15701
15702 * linux-low.c (linux_remove_process): Remove `detaching'
15703 parameter. Don't release/detach from thread_db here.
15704 (linux_kill): Release/detach from thread_db here, ...
15705 (linux_detach): ... and here, before actually detaching.
15706 (linux_wait_1): ... and here, when a process exits.
15707 * thread-db.c (any_thread_of): New.
15708 (thread_db_free): Switch the current inferior to a thread of the
15709 passed in process.
15710
4ee62156
DE
157112009-12-21 Doug Evans <dje@google.com>
15712
d90e6a88
DE
15713 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15714
c5f62d5f
DE
15715 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15716 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15717 warning ifndef __NR_tkill. Move setting of errno there too.
15718 Delete unnecessary resetting of errno after syscall.
15719 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15720
10e86dd7
DE
15721 * configure.ac: Check for dladdr.
15722 * config.in: Regenerate.
15723 * configure: Regenerate.
15724 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15725 (try_thread_db_load): Update.
15726
4ee62156
DE
15727 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15728
00f515da
DE
157292009-12-18 Doug Evans <dje@google.com>
15730
e9464885
DE
15731 * event-loop.c: Include unistd.h if it exists.
15732
07d4f67e
DE
15733 * linux-low.c (my_waitpid): Move definition away from being in
15734 between linux_tracefork_child/linux_test_for_tracefork.
15735
00f515da
DE
15736 * gdb_proc_service.h (psaddr_t): Fix type.
15737 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15738 signature to match glibc.
15739
1de1badb
DE
157402009-12-16 Doug Evans <dje@google.com>
15741
15742 * linux-low.c (linux_read_memory): Fix argument to read.
15743
aeeb81d1
PA
157442009-11-26 Pedro Alves <pedro@codesourcery.com>
15745
15746 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15747 events, don't leave current_inferior pointing at null.
15748
10357975
PA
157492009-11-26 Pedro Alves <pedro@codesourcery.com>
15750
15751 * win32-low.c (LOG): Delete.
15752 (OUTMSG): Output to stderr.
15753 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15754 on compile time LOG macro.
15755 (win32_wait): Fix debug output.
15756
cf6e3471
PA
157572009-11-26 Pedro Alves <pedro@codesourcery.com>
15758
15759 * win32-low.c (win32_add_one_solib): If the dll name is
15760 "ntdll.dll", prepend the system directory to the dll path.
15761
0c85e18e
MK
157622009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15763
15764 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15765
9ac544ce 157662009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 15767 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
15768
15769 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15770 * configure.ac: Check for __mcoldfire__ and set
15771 gdb_cv_m68k_is_coldfire.
15772 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15773 reg-cf.o and reg-m68k.o.
15774 * configure: Regenerated.
15775
fd7dd3e6
PA
157762009-11-16 Pedro Alves <pedro@codesourcery.com>
15777
15778 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15779 Pass it to thread_db_free.
15780 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15781 proper `detaching' argument to linux_remove_process.
15782 * linux-low.h (thread_db_free): Add `detaching' parameter.
15783 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15784 to thread_db_free.
15785 (thread_db_free): Add `detaching' parameter. Only
15786 call td_ta_clear_event if detaching from process.
15787
75aa492e
MK
157882009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15789
15790 * thread-db.c (thread_db_free): Fix typo.
15791
21e1bee4
PP
157922009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15793
15794 PR gdb/10838
15795 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15796
8838b45e
NS
157972009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15798
15799 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15800 with an i686 compiler.
15801 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15802 needed.
15803 * configure: Rebuilt.
15804
8a35fb51
SL
158052009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15806
15807 PR gdb/10783
15808
15809 * server.c (handle_search_memory_1): Correct read_addr initialization
15810 in loop for searching subsequent chunks.
15811
96f15937
PP
158122009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15813
15814 * configure.ac: New --with-libthread-db option.
15815 * thread-db.c: Allow direct dependence on libthread_db.
15816 (thread_db_free): Adjust.
15817 * config.in: Regenerate.
15818 * configure: Likewise.
889bf7c5 15819
5f7d1694
PP
158202009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15821
15822 PR gdb/10757
15823 * thread-db.c (attach_thread): New function.
15824 (maybe_attach_thread): Return success/failure.
15825 (find_new_threads_callback): Adjust.
889bf7c5
PA
15826 (thread_db_find_new_threads): Loop until no new threads.
15827
88e3b899
PA
158282009-10-13 Pedro Alves <pedro@codesourcery.com>
15829
15830 * proc-service.c (ps_lgetregs): Formatting.
15831
cdbfd419
PP
158322009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15833
15834 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15835 * configure.ac: Adjust.
15836 * linux-low.h (struct process_info_private): Move members to struct
15837 thread_db.
15838 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15839 * linux-low.c (linux_remove_process): Adjust.
15840 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15841 * server.c (handle_query): Move code ...
15842 (handle_monitor_command): ... here. New function.
15843 * target.h (struct target_ops): New member.
15844 * thread-db.c (struct thread_db): New.
15845 (libthread_db_search_path): New variable.
15846 (thread_db_create_event, thread_db_enable_reporting)
15847 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15848 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15849 (try_thread_db_load_1, dladdr_to_soname): New functions.
15850 (try_thread_db_load, thread_db_load_search): New functions.
15851 (thread_db_init): Search for libthread_db.
15852 (thread_db_free): New function.
15853 (thread_db_handle_monitor_command): Likewise.
15854 * config.in: Regenerate.
15855 * configure: Regenerate.
889bf7c5 15856
4168d2d6
UW
158572009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15858
15859 * spu-low.c (spu_kill): Wait for inferior to terminate.
15860 Call clear_inferiors.
15861 (spu_detach): Call clear_inferiors.
15862
81ecdfbb
RW
158632009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15864
15865 * aclocal.m4: Regenerate.
15866 * config.in: Likewise.
15867 * configure: Likewise.
15868
0b9ff2c0
UW
158692009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15870
15871 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15872 (parse_spufs_run): New function.
15873 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15874 (ppc_breakpoint_at): Handle SPU breakpoints.
15875
efcbbd14
UW
158762009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15877
15878 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15879 (SPUFS_MAGIC): Define.
15880 (spu_enumerate_spu_ids): New function.
15881 (linux_qxfer_spu): New function.
15882 (linux_target_ops): Install linux_qxfer_spu.
15883
f4d9bade
UW
158842009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15885
15886 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15887 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15888 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15889 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15890 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15891 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15892 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15893 (init_registers_powerpc_cell32l): Add prototype.
15894 (init_registers_powerpc_cell64l): Likewise.
15895 (ppc_arch_setup): Detect Cell/B.E. architecture.
15896
96e946ca
RW
158972009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15898
15899 * Makefile.in (datarootdir): New variable.
15900
58d6951d
DJ
159012009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15902
15903 * linux-low.c (linux_write_memory): Update debugging output.
15904 * Makefile.in (clean): Add new descriptions.
15905 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15906 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15907 * configure.srv: Add new files for arm*-*-linux*.
15908 * linux-arm-low.c: Add new declarations.
15909 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15910 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15911 (HWCAP_VFPv3D16): New.
15912 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15913 instead of __IWMMXT__.
15914 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15915 (arm_arch_setup): New.
15916 (target_regsets): Remove #ifdef. Add VFP regset.
15917 (the_low_target): Use arm_arch_setup.
15918
12b42a12
DJ
159192009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15920
15921 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15922 the main thread again.
15923
ac8c974e
AR
159242009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15925
15926 Adding Neutrino gdbserver.
15927 * configure: Regenerated.
15928 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15929 * configure.srv (i[34567]86-*-nto*): New target.
15930 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15931 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15932 (nto_comctrl) [__QNX__]: New function.
15933 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15934
4424e0c3 159352009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
15936
15937 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15938 srv_tgtobj.
15939
912cf4ba
PA
159402009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15941 Pedro Alves <pedro@codesourcery.com>
15942
15943 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15944 don't support CONTEXT_EXTENDED_REGISTERS.
15945 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15946 (the_low_target): Install them.
15947 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15948 failing with ERROR_PIPE_NOT_CONNECTED.
15949
aa5ca48f
DE
159502009-06-30 Doug Evans <dje@google.com>
15951 Pierre Muller <muller@ics.u-strasbg.fr>
15952
15953 Add h/w watchpoint support to x86-linux, win32-i386.
15954 * Makefile.in (SFILES): Add i386-low.c
15955 (i386_low_h): Define.
15956 (i386-low.o): Add dependencies.
15957 (linux-x86-low.o): Add i386-low.h dependency.
15958 (win32-i386-low.o): Ditto.
15959 * i386-low.c: New file.
15960 * i386-low.h: New file.
15961 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15962 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15963 * linux-low.c (linux_add_process): Initialize arch_private.
15964 (linux_remove_process): Free arch_private.
15965 (add_lwp): Initialize arch_private.
15966 (delete_lwp): Free arch_private.
15967 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15968 provided.
15969 * linux-low.h (process_info_private): New member arch_private.
15970 (lwp_info): New member arch_private.
15971 (linux_target_ops): New members new_process, new_thread,
15972 prepare_to_resume.
15973 (ptid_of): New macro.
15974 * linux-x86-low.c: Include stddef.h, i386-low.h.
15975 (arch_process_info): New struct.
15976 (arch_lwp_info): New struct.
15977 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15978 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15979 (i386_dr_low_get_status): New function.
15980 (x86_insert_point, x86_remove_point): New functions.
15981 (x86_stopped_by_watchpoint): New function.
15982 (x86_stopped_data_address): New function.
15983 (x86_linux_new_process, x86_linux_new_thread): New functions.
15984 (x86_linux_prepare_to_resume): New function.
15985 (the_low_target): Add entries for insert_point, remove_point,
15986 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15987 prepare_to_resume.
15988 * server.c (debug_hw_points): New global.
15989 (monitor_show_help): Document set debug-hw-points.
15990 (handle_query): Process "set debug-hw-points".
15991 * server.h (debug_hw_points): Declare.
15992 (paddress): Declare.
15993 * utils.c (NUMCELLS, CELLSIZE): New macros.
15994 (get_sell, xsnprintf, paddress): New functions.
15995 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15996 remove_point, stopped_by_watchpoint, stopped_data_address.
15997 * win32-i386-low.c: Include i386-low.h.
15998 (debug_reg_state): Replaces dr.
15999 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16000 (i386_dr_low_get_status): New function.
16001 (i386_insert_point, i386_remove_point): New functions.
16002 (i386_stopped_by_watchpoint): New function.
16003 (i386_stopped_data_address): New function.
16004 (i386_initial_stuff): Update.
16005 (get_thread_context,set_thread_context,i386_thread_added): Update.
16006 (the_low_target): Add entries for insert_point,
16007 remove_point, stopped_by_watchpoint, stopped_data_address.
16008 * win32-low.c (win32_insert_watchpoint): New function.
16009 (win32_remove_watchpoint): New function.
16010 (win32_stopped_by_watchpoint): New function.
16011 (win32_stopped_data_address): New function.
16012 (win32_target_ops): Add entries for insert_watchpoint,
16013 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16014 * win32-low.h (win32_target_ops): New members insert_point,
16015 remove_point, stopped_by_watchpoint, stopped_data_address.
16016
d993e290
PA
160172009-06-25 Pedro Alves <pedro@codesourcery.com>
16018
16019 * server.c (process_serial_event): Re-return unsupported, not
16020 error, if the type isn't recognized. Re-allow supporting only
16021 insert or remove packets. Also call require_running for
16022 breakpoints. Add missing break statement to default case. Tidy.
16023 * target.h (struct target_ops): Rename insert_watchpoint to
16024 insert_point, and remove_watchpoint to remove_point.
16025
16026 * linux-low.h (struct linux_target_ops): Likewise.
16027 * linux-low.c (linux_insert_watchpoint): Rename to ...
16028 (linux_insert_point): ... this. Adjust.
16029 (linux_remove_watchpoint): Rename to ...
16030 (linux_remove_point): ... this. Adjust.
16031 (linux_target_ops): Adjust.
16032 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16033 (cris_insert_point): ... this.
16034 (cris_remove_watchpoint): Rename to ...
16035 (cris_remove_point): ... this.
16036 (the_low_target): Adjust.
16037
0f54c268
PM
160382009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16039
16040 * server.c (handle_v_kill): Pass signal_pid to
16041 kill_inferior if multi_process is zero.
16042
c6314022
AR
160432009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16044
16045 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16046 * target.h (target_ops): Comment for *_watchpoint to make it clear
16047 the functions can get types '0' and '1'.
16048
4463ce24
AR
160492009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16050
16051 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16052 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16053 * regcache.c (get_regcache): Likewise.
16054 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16055 * win32-low.c (child_fetch_inferior_registers): Remove check for
16056 regno 0.
16057
cf8fd78b
PA
160582009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16059 Pedro Alves <pedro@codesourcery.com>
16060
16061 * target.h (struct target_ops) <supports_multi_process>: New
16062 callback.
16063 (target_supports_multi_process): New.
16064 * server.c (handle_query): Even if GDB reports support, only
16065 enable multi-process if the target also supports it. Report
16066 multi-process support only if the target backend supports it.
16067 * linux-low.c (linux_supports_multi_process): New function.
16068 (linux_target_ops): Install it as target_supports_multi_process
16069 callback.
16070
47c0c975
DE
160712009-05-24 Doug Evans <dje@google.com>
16072
e09875d4
DE
16073 Global renaming of find_thread_pid to find_thread_ptid.
16074 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16075 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16076 All callers updated.
16077
e27d73f6
DE
16078 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16079 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16080 directly.
16081
47c0c975
DE
16082 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16083 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16084 (linux_resume_one_lwp): Ditto.
16085
2acc282a
DE
160862009-05-23 Doug Evans <dje@google.com>
16087
16088 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16089 from struct inferior_list_entry * to struct lwp_info *.
16090 All callers updated.
16091
9f1036c1
DE
160922009-05-13 Doug Evans <dje@google.com>
16093
16094 * linux-x86-low.c: Don't include assert.h.
16095 (x86_siginfo_fixup): Use fatal, not assert.
16096 (x86_arch_setup): Fix comment.
16097
d0722149
DE
160982009-05-12 Doug Evans <dje@google.com>
16099
16100 Biarch support for i386/amd64 gdbserver.
16101 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16102 Add linux-x86-low.c.
16103 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16104 (linux-x86-low.o): Add.
16105 * linux-x86-64-low.c: Delete.
16106 * linux-i386-low.c: Delete.
16107 * linux-x86-low.c: New file.
16108 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16109 linux-x86-low.o.
16110 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16111 linux-x86-low.o.
16112 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16113 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16114 (linux_child_pid_to_exec_file): New function.
16115 (elf_64_header_p, elf_64_file_p): New functions.
16116 (siginfo_fixup): New function.
16117 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16118 give target a chance to convert layout.
16119 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16120 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16121
fdeb2a12
DE
161222009-05-07 Doug Evans <dje@google.com>
16123
16124 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16125 (regsets_store_inferior_registers): Ditto.
16126
a6dbe5df
PA
161272009-05-06 Pedro Alves <pedro@codesourcery.com>
16128
16129 PR server/10048
16130
16131 * linux-low.c (must_set_ptrace_flags): Delete.
16132 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16133 of the global.
16134 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16135 `lwp->must_set_ptrace_flags' instead.
ba42693b 16136 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
16137 (linux_wait_1): ... not here.
16138
5091eb23
DE
161392009-04-30 Doug Evans <dje@google.com>
16140
9f767825
DE
16141 * inferiors.c (started_inferior_callback): New function.
16142 (attached_inferior_callback): New function.
16143 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16144 * server.c (print_started_pid, print_attached_pid): New functions.
16145 (detach_or_kill_for_exit): New function.
16146 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16147 * server.h (have_started_inferiors_p): Declare.
16148 (have_attached_inferiors_p): Declare.
16149
5091eb23
DE
16150 * inferiors.c (remove_process): Fix memory leak, free process.
16151 * linux-low.c (linux_remove_process): New function.
16152 (linux_kill): Call it instead of remove_process.
16153 (linux_detach, linux_wait_1): Ditto.
16154
155c8968
PA
161552009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16156
16157 * configure.srv: Add x86 Windows CE target.
16158
7fe519cb
UW
161592009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16160
16161 * inferiors.c (get_thread_process): Make global.
16162 * server.h (get_thread_process): Add prototype.
16163 * thread-db.c (find_one_thread): Use get_thread_process
16164 instead of current_process.
16165 (thread_db_get_tls_address): Do not crash if called when
16166 thread layer is not yet initialized.
16167
5472f405
UW
161682009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16169
16170 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16171 * spu-low.c (current_tid): Rename to ...
16172 (current_ptid): ... this.
16173 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16174 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16175 ptid_get_lwp (current_ptid) instead of current_tid.
16176 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16177 instead of current_tid. Use find_process_pid to verify pid
16178 argument is valid. Pass proper argument to remove_process.
16179 (spu_thread_alive): Compare current_ptid instead of current_tid.
16180 (spu_resume): Likewise.
16181
55ac2b99
PA
161822009-04-02 Pedro Alves <pedro@codesourcery.com>
16183
16184 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16185 variable.
16186
95954743
PA
161872009-04-01 Pedro Alves <pedro@codesourcery.com>
16188
16189 Implement the multiprocess extensions, and add linux multiprocess
16190 support.
16191
16192 * server.h (ULONGEST): Declare.
16193 (struct ptid, ptid_t): New.
16194 (minus_one_ptid, null_ptid): Declare.
16195 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16196 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16197 (struct inferior_list_entry): Change `id' type from unsigned from
16198 to ptid_t.
16199 (struct sym_cache, struct breakpoint, struct
16200 process_info_private): Forward declare.
16201 (struct process_info): Declare.
16202 (current_process): Declare.
16203 (all_processes): Declare.
16204 (initialize_inferiors): Declare.
16205 (add_thread): Adjust to use ptid_t.
16206 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16207 (add_process, remove_process, find_thread_pid): Declare.
16208 (find_inferior_id): Adjust to use ptid_t.
16209 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16210 (multi_process): Declare.
16211 (push_event): Adjust to use ptid_t.
16212 (read_ptid, write_ptid): Declare.
16213 (prepare_resume_reply): Adjust to use ptid_t.
16214 (clear_symbol_cache): Declare.
16215 * inferiors.c (all_processes): New.
16216 (null_ptid, minus_one_ptid): New.
16217 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16218 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16219 (add_thread): Change unsigned long to ptid. Remove gdb_id
16220 parameter. Adjust.
16221 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16222 (gdb_id_to_thread): Rename to ...
16223 (find_thread_pid): ... this. Change unsigned long to ptid.
16224 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16225 (loaded_dll, pull_pid_from_list): Adjust.
16226 (add_process, remove_process, find_process_pid)
16227 (get_thread_process, current_process, initialize_inferiors): New.
16228 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16229 (struct target_waitstatus) <related_pid>: Ditto.
16230 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16231 return type to int.
16232 (struct target_ops) <join>: Add `pid' argument.
16233 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16234 (struct target_ops) <wait>: Add `ptid' field. Change return type
16235 to ptid.
16236 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16237 (mywait): Add `ptid' argument. Change return type to ptid_t.
16238 (target_pid_to_str): Declare.
16239 * target.c (set_desired_inferior): Adjust to use ptids.
16240 (mywait): Add new `ptid' argument. Adjust.
16241 (target_pid_to_str): New.
16242 * mem-break.h (free_all_breakpoints): Declare.
16243 * mem-break.c (breakpoints): Delelete.
16244 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16245 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16246 to use per-process breakpoint list.
16247 (free_all_breakpoints): New.
16248 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16249 (symbol_cache, all_symbols_looked_up): Delete.
16250 (hexchars): New.
16251 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16252 read_ptid): New.
16253 (prepare_resume_reply): Change ptid argument's type from unsigned
16254 long to ptid_t. Adjust. Implement W;process and X;process.
16255 (free_sym_cache, clear_symbol_cache): New.
16256 (look_up_one_symbol): Adjust to per-process symbol cache. *
16257 * server.c (cont_thread, general_thread, step_thread): Change type
16258 to ptid_t.
16259 (attached): Delete.
16260 (multi_process): New.
16261 (last_ptid): Change type to ptid_t.
16262 (struct vstop_notif) <ptid>: Change type to ptid_t.
16263 (queue_stop_reply, push_event): Change `ptid' argument's type to
16264 ptid_t.
16265 (discard_queued_stop_replies): Add `pid' argument.
16266 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16267 changes. Don't reference the `attached' global.
16268 (attach_inferior): Adjust to mywait interface changes.
16269 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16270 features. Handle and report "multiprocess+". Handle
16271 "qAttached:PID".
16272 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16273 changes.
16274 (handle_v_kill): New.
16275 (handle_v_stopped): Adjust to use target_pid_to_str.
16276 (handle_v_requests): Allow multiple attaches and runs when
16277 multiprocess extensions are in effect. Handle "vKill".
16278 (myresume): Adjust to use ptids.
16279 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16280 (handle_status): Adjust to discard_queued_stop_replies interface
16281 change.
16282 (first_thread_of, kill_inferior_callback)
16283 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16284 (main): Call initialize_inferiors. Adjust to use ptids, killing
16285 and detaching from all inferiors. Handle multiprocess packet
16286 variants.
16287 * linux-low.h: Include gdb_proc_service.h.
16288 (struct process_info_private): New.
16289 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16290 <lwpid_of>: Use ptid_get_lwp.
16291 (get_lwp_thread): Adjust.
16292 (struct lwp_info): Add `dead' member.
16293 (find_lwp_pid): Declare.
16294 * linux-low.c (thread_db_active): Delete.
16295 (new_inferior): Adjust comment.
16296 (inferior_pid): Delete.
16297 (linux_add_process): New.
16298 (handle_extended_wait): Adjust.
16299 (add_lwp): Change unsigned long to ptid.
16300 (linux_create_inferior): Add process to processes table. Adjust
16301 to use ptids. Don't set new_inferior here.
16302 (linux_attach_lwp): Rename to ...
16303 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16304 it. Adjust to use ptids.
16305 (linux_attach_lwp): New.
16306 (linux_attach): Add process to processes table. Don't set
16307 new_inferior here.
16308 (struct counter): New.
16309 (second_thread_of_pid_p, last_thread_of_process_p): New.
16310 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16311 multiple processes.
16312 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16313 processes. Remove process from process table.
16314 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16315 to multiple processes.
16316 (any_thread_of): New.
16317 (linux_detach): Add `pid' argument, and handle it. Remove process
16318 from processes table.
16319 (linux_join): Add `pid' argument. Handle it.
16320 (linux_thread_alive): Change unsighed long argument to ptid_t.
16321 Consider dead lwps as not being alive.
16322 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16323 threads we're not interested in.
16324 (same_lwp, find_lwp_pid): New.
16325 (linux_wait_for_lwp): Change `pid' argument's type from int to
16326 ptid_t. Adjust.
16327 (linux_wait_for_event): Rename to ...
16328 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16329 from int to ptid_t. Adjust.
16330 (linux_wait_for_event): New.
16331 (linux_wait_1): Add `ptid' argument. Change return type to
16332 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16333 that exit from the process table.
16334 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16335 Adjust.
16336 (mark_lwp_dead): New.
16337 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16338 stopping all threads, mark its main lwp as dead.
16339 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16340 ptids.
16341 (fetch_register, usr_store_inferior_registers)
16342 (regsets_fetch_inferior_registers)
16343 (regsets_store_inferior_registers, linux_read_memory)
16344 (linux_write_memory): Inline `inferior_pid'.
16345 (linux_look_up_symbols): Adjust to use per-process
16346 `thread_db_active'.
16347 (linux_request_interrupt): Adjust to use ptids.
16348 (linux_read_auxv): Inline `inferior_pid'.
16349 (initialize_low): Don't reference thread_db_active.
16350 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16351 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16352 (ps_getpid): Return the pid of the current inferior.
16353 * thread-db.c (proc_handle, thread_agent): Delete.
16354 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16355 per-process data.
16356 (find_one_thread): Change argument type to ptid_t. Adjust to
16357 per-process data.
16358 (maybe_attach_thread): Adjust to per-process data and ptids.
16359 (thread_db_find_new_threads): Ditto.
16360 (thread_db_init): Ditto.
16361 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16362 processes table. Adjust to use ptids.
16363 (spu_kill, spu_detach): Adjust interface. Remove process from
16364 processes table.
16365 (spu_join, spu_thread_alive): Adjust interface.
16366 (spu_wait): Adjust interface. Remove process from processes
16367 table. Adjust to use ptids.
16368 * win32-low.c (current_inferior_tid): Delete.
16369 (current_inferior_ptid): New.
16370 (debug_event_ptid): New.
16371 (thread_rec): Take a ptid. Adjust.
16372 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16373 (child_delete_thread): Ditto.
16374 (do_initial_child_stuff): Add `attached' argument. Add process to
16375 processes table.
16376 (child_fetch_inferior_registers, child_store_inferior_registers):
16377 Adjust.
16378 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16379 (win32_attach): Pass 1 to do_initial_child_stuff.
16380 (win32_kill): Adjust interface. Remove process from processes
16381 table.
16382 (win32_detach): Ditto.
16383 (win32_join): Adjust interface.
16384 (win32_thread_alive): Take a ptid.
16385 (win32_resume): Adjust to use ptids.
16386 (get_child_debug_event): Ditto.
16387 (win32_wait): Adjust interface. Remove exiting process from
16388 processes table.
16389
bd99dc85
PA
163902009-04-01 Pedro Alves <pedro@codesourcery.com>
16391
16392 Non-stop mode support.
16393
16394 * server.h (non_stop): Declare.
16395 (gdb_client_data, handler_func): Declare.
16396 (delete_file_handler, add_file_handler, start_event_loop):
16397 Declare.
16398 (handle_serial_event, handle_target_event, push_event)
16399 (putpkt_notif): Declare.
16400 * target.h (enum resume_kind): New.
16401 (struct thread_resume): Replace `step' field by `kind' field.
16402 (TARGET_WNOHANG): Define.
16403 (struct target_ops) <wait>: Add `options' argument.
16404 <supports_non_stop, async, start_non_stop>: New fields.
16405 (target_supports_non_stop, target_async): New.
16406 (start_non_stop): Declare.
16407 (mywait): Add `options' argument.
16408 * target.c (mywait): Add `options' argument. Print child exit
16409 notifications here.
16410 (start_non_stop): New.
16411 * server.c (non_stop, own_buf, mem_buf): New globals.
16412 (struct vstop_notif): New.
16413 (notif_queue): New global.
16414 (queue_stop_reply, push_event, discard_queued_stop_replies)
16415 (send_next_stop_reply): New.
16416 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16417 interface changes.
16418 (attach_inferior): In non-stop mode, don't wait for the target
16419 here.
16420 (handle_general_set): Handle QNonStop.
16421 (handle_query): When handling qC, return the current general
16422 thread, instead of the first thread of the list.
16423 (handle_query): If the backend supports non-stop mode, include
16424 QNonStop+ in the qSupported query response.
16425 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16426 and non-stop mode.
16427 (handle_v_attach, handle_v_run): Handle non-stop mode.
16428 (handle_v_stopped): New.
16429 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16430 (myresume): Adjust to use resume_kind. Handle non-stop.
16431 (queue_stop_reply_callback): New.
16432 (handle_status): Handle non-stop mode.
16433 (main): Clear non_stop flag on reconnection. Use the event-loop.
16434 Refactor serial protocol handling from here ...
16435 (process_serial_event): ... to this new function. When GDB
16436 selects any thread, select one here. In non-stop mode, wait until
16437 GDB acks all pending events before exiting.
16438 (handle_serial_event, handle_target_event): New.
16439 * remote-utils.c (remote_open): Install remote_desc in the event
16440 loop.
16441 (remote_close): Remove remote_desc from the event loop.
16442 (putpkt_binary): Rename to...
16443 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16444 (putpkt_binary): New as wrapper around putpkt_binary_1.
16445 (putpkt_notif): New.
16446 (prepare_resume_reply): In non-stop mode, don't change the
16447 general_thread.
16448 * event-loop.c: New.
16449 * Makefile.in (OBJ): Add event-loop.o.
16450 (event-loop.o): New rule.
16451
16452 * linux-low.h (pid_of): Moved here.
16453 (lwpid_of): New.
16454 (get_lwp_thread): Use lwpid_of.
16455 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16456 * linux-low.c (pid_of): Delete.
16457 (inferior_pid): Use lwpid_of.
16458 (linux_event_pipe): New.
16459 (target_is_async_p): New.
16460 (delete_lwp): New.
16461 (handle_extended_wait): Use lwpid_of.
16462 (add_lwp): Don't set lwpid field.
16463 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16464 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16465 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16466 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16467 first. Adjust to linux_wait_for_event interface changes. Use
16468 lwpid_of.
16469 (linux_detach): Don't delete the main lwp here.
16470 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16471 (status_pending_p): Don't consider explicitly suspended lwps.
16472 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16473 pointer. Add OPTIONS argument. Change return type to int. Use
16474 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16475 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16476 pointer. Add status pointer argument. Return a pid instead of a
16477 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16478 changes. In non-stop mode, don't switch to a random thread.
16479 (linux_wait): Rename to...
16480 (linux_wait_1): ... this. Add target_options argument, and handle
16481 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16482 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16483 clean exit and signal exit code. Don't stop all threads in
16484 non-stop mode. In all-stop mode, only stop all threads when
16485 reporting a stop to GDB. Handle explicit thread stop requests.
16486 (async_file_flush, async_file_mark): New.
16487 (linux_wait): New.
16488 (send_sigstop): Use lwpid_of.
16489 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16490 interface changes. In non-stop mode, don't switch to a random
16491 thread.
16492 (linux_resume_one_lwp): Use lwpid_of.
16493 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16494 (linux_resume_one_thread): ... this. Handle resume_stop. In
16495 non-stop mode, don't look for pending flag in all threads.
16496 (resume_status_pending_p): Don't consider explicitly suspended
16497 threads.
16498 (my_waitpid): Reimplement. Emulate __WALL.
16499 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16500 Use lwpid_of.
16501 (sigchld_handler, linux_supports_non_stop, linux_async)
16502 (linux_start_non_stop): New.
16503 (linux_target_ops): Register linux_supports_non_stop, linux_async
16504 and linux_start_non_stop.
16505 (initialize_low): Install SIGCHLD handler.
16506 * thread-db.c (thread_db_create_event, find_one_thread)
16507 (thread_db_get_tls_address): Use lwpid_of.
16508 * win32-low.c (win32_detach): Adjust to use resume_kind.
16509 (win32_wait): Add `options' argument.
16510 * spu-low.c (spu_resume): Adjust to use resume_kind.
16511 (spu_wait): Add `options' argument.
16512
5b1c542e
PA
165132009-04-01 Pedro Alves <pedro@codesourcery.com>
16514
16515 Decouple target code from remote protocol.
16516
16517 * target.h (enum target_waitkind): New.
16518 (struct target_waitstatus): New.
16519 (struct target_ops) <wait>: Return an unsigned long. Take a
16520 target_waitstatus pointer instead of a char pointer.
16521 (mywait): Likewise.
16522 * target.c (mywait): Change prototype to return an unsigned long.
16523 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16524 * server.h (thread_from_wait, old_thread_from_wait): Delete
16525 declarations.
16526 (prepare_resume_reply): Change prototype to take a
16527 target_waitstatus.
16528 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16529 (last_status, last_ptid): New.
16530 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16531 pid instead of a signal.
16532 (attach_inferior): Remove "status" and "signal" parameters.
16533 Adjust.
16534 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16535 not as an address.
16536 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16537 (handle_v_requests, myresume): Remove "status" and "signal"
16538 parameters. Adjust.
16539 (handle_status): New.
16540 (main): Delete local `status'. Adjust.
16541 * remote-utils.c: Include target.h.
16542 (prepare_resume_reply): Change prototype to take a
16543 target_waitstatus. Adjust.
16544
16545 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16546 interface.
16547 * spu-low.c (spu_wait): Adjust.
16548 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16549 Delete.
16550 (win32_wait): Adjust.
16551
2bd7c093
PA
165522009-04-01 Pedro Alves <pedro@codesourcery.com>
16553
16554 * target.h (struct thread_resume): Delete leave_stopped member.
16555 (struct target_ops): Add a `n' argument to the `resume' callback.
16556 * server.c (start_inferior): Adjust.
16557 (handle_v_cont, myresume): Adjust.
16558 * linux-low.c (check_removed_breakpoint): Adjust to resume
16559 interface change, and to removed leave_stopped field.
16560 (resume_ptr): Delete.
16561 (struct thread_resume_array): New.
16562 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16563 resume interface change.
16564 (linux_continue_one_thread, linux_queue_one_thread)
16565 (resume_status_pending_p): Check if the resume field is NULL
16566 instead of checking the leave_stopped member.
16567 (linux_resume): Adjust to the target resume interface change.
16568 * spu-low.c (spu_resume): Adjust to the target resume interface
16569 change.
16570 * win32-low.c (win32_detach, win32_resume): Ditto.
16571
c35fafde
PA
165722009-04-01 Pedro Alves <pedro@codesourcery.com>
16573
16574 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16575 flag.
16576 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16577 pending.
16578 (linux_continue_one_thread): Only preserve the stepping flag if
16579 there's a pending breakpoint.
16580
0a59d50b
PA
165812009-03-31 Pedro Alves <pedro@codesourcery.com>
16582
16583 * server.c (main): After the inferior having exited, call
16584 remote_close before exiting gdbserver.
16585
f04c6d38
TJB
165862009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16587
16588 Fix size of FPSCR in Power 7 processors.
16589 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16590 (PPC_FEATURE_HAS_DFP): New #define.
16591 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16592 size of the FPSCR.
16593
78e5cee6
PA
165942009-03-23 Pedro Alves <pedro@codesourcery.com>
16595
16596 * server.c (handle_query) Whitespace and formatting.
16597
1b3f6016
PA
165982009-03-22 Pedro Alves <pedro@codesourcery.com>
16599
16600 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16601 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16602 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16603 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16604 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16605 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16606 Makefile.in, configure.ac: Fix whitespace throughout.
16607 * configure: Regenerate.
16608
a07b2135
PA
166092009-03-22 Pedro Alves <pedro@codesourcery.com>
16610
16611 * inferiors.c (find_inferior): Make it safe for the callback
16612 function to delete the currently iterated inferior.
16613
67cc2626
PA
166142009-03-22 Pedro Alves <pedro@codesourcery.com>
16615
16616 * Makefile.in (linuw_low_h): Move higher.
16617 (thread-db.o): Depend on $(linux_low_h).
16618
54a0b537
PA
166192009-03-17 Pedro Alves <pedro@codesourcery.com>
16620
16621 Rename "process" to "lwp" throughout.
16622
16623 * linux-low.c (all_processes): Rename to...
16624 (all_lwps): ... this.
16625 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16626 (add_process): Rename to ...
16627 (add_lwp): ... this. Adjust.
16628 (linux_create_inferior): Adjust.
16629 (linux_attach_lwp): Adjust.
16630 (linux_attach): Adjust.
16631 (linux_kill_one_process): Rename to ...
16632 (linux_kill_one_lwp): ... this. Adjust.
16633 (linux_kill): Adjust.
16634 (linux_detach_one_process): Rename to ...
16635 (linux_detach_one_lwp): ... this. Adjust.
16636 (linux_detach): Adjust.
16637 (check_removed_breakpoint): Adjust.
16638 (status_pending_p): Adjust.
16639 (linux_wait_for_process): Rename to ...
16640 (linux_wait_for_lwp): ... this. Adjust.
16641 (linux_wait_for_event): Adjust.
16642 (send_sigstop): Adjust.
16643 (wait_for_sigstop): Adjust.
16644 (stop_all_processes): Rename to ...
16645 (stop_all_lwps): ... this.
16646 (linux_resume_one_process): Rename to ...
16647 (linux_resume_one_lwp): ... this. Adjust.
16648 (linux_set_resume_request, linux_continue_one_thread)
16649 (linux_queue_one_thread, resume_status_pending_p)
16650 (usr_store_inferior_registers, regsets_store_inferior_registers)
16651 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16652 Adjust.
16653 * linux-low.h (get_process): Rename to ...
16654 (get_lwp): ... this. Adjust.
16655 (get_thread_process): Rename to ...
16656 (get_thread_lwp): ... this. Adjust.
16657 (get_process_thread): Rename to ...
16658 (get_lwp_thread): ... this. Adjust.
16659 (struct process_info): Rename to ...
16660 (struct lwp_info): ... this.
16661 (all_processes): Rename to ...
16662 (all_lwps): ... this.
16663 * proc-service.c (ps_lgetregs): Adjust.
16664 * thread-db.c (thread_db_create_event, find_one_thread)
16665 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16666
0b16c5cf
PA
166672009-03-14 Pedro Alves <pedro@codesourcery.com>
16668
16669 * server.c (handle_query): Handle "qAttached".
16670
32de4b9d
NS
166712009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16672
16673 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16674 GPLv3, update license URL.
16675
2aecd87f
DE
166762009-03-01 Doug Evans <dje@google.com>
16677
93efd302 16678 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
16679 (server_h): Add gdb_signals.h.
16680 (signals.o): Update.
16681 * server.h (target_signal_from_host,target_signal_to_host_p)
16682 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16683
86b1f9c5
PM
166842009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16685
16686 * remote-utils.c (getpkt): Also generate remote-debug
16687 information if noack_mode is set.
16688
4aa995e1
PA
166892009-02-06 Pedro Alves <pedro@codesourcery.com>
16690
16691 * server.c (handle_query): Report qXfer:siginfo:read and
16692 qXfer:siginfo:write as supported and handle them.
16693 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16694 * linux-low.c (linux_xfer_siginfo): New.
16695 (linux_target_ops): Set it.
16696
62709adf
PA
166972009-01-26 Pedro Alves <pedro@codesourcery.com>
16698
16699 * server.c (gdbserver_usage): Mention --remote-debug.
16700 (main): Accept '--remote-debug' switch.
16701
aef93bd7
DE
167022009-01-18 Doug Evans <dje@google.com>
16703
16704 * regcache.c (new_register_cache): No need to check result of xcalloc.
16705 * server.c (handle_search_memory): Back out calls to xmalloc,
16706 result is checked and error is returned to user upon failure.
16707 (handle_query): Ditto. Add more checks for result of malloc.
16708 (handle_v_cont): Check result of malloc, report error back to
16709 user upon failure.
16710 (handle_v_run): Ditto. Call freeargv.
16711 * server.h (freeargv): Declare.
16712 * utils.c (freeargv): New fn.
16713
54363045
DE
167142009-01-15 Doug Evans <dje@google.com>
16715
f626972c
DE
16716 * gdbreplay.c (perror_with_name): Make arg const char *.
16717 * server.h (target_signal_to_name): Make return type const char *.
0842e787 16718 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 16719 * utils.c (perror_with_name): Make arg const char *.
54363045 16720
18aae699
PA
167212009-01-14 Pedro Alves <pedro@codesourcery.com>
16722
16723 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16724 when handling a EXIT_PROCESS_DEBUG_EVENT.
16725
ff703abe
JB
167262009-01-06 Joel Brobecker <brobecker@adacore.com>
16727
16728 * gdbreplay.c (gdbreplay_version): Update copyright year.
16729 * server.c (gdbserver_version): Likewise.
16730
f21cc1a2 167312009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
16732
16733 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 16734 (handle_extended_wait): Improve comment.
0e21c1ec 16735
bca929d3
DE
167362008-12-13 Doug Evans <dje@google.com>
16737
16738 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16739 * server.h (ATTR_MALLOC): New macro.
16740 (xmalloc,xcalloc,xstrdup): Declare.
16741 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16742 * inferiors.c: Ditto.
16743 * linux-low.c: Ditto.
16744 * mem-break.c: Ditto.
16745 * regcache.c: Ditto.
16746 * remote-utils.c: Ditto.
16747 * server.c: Ditto.
16748 * target.c: Ditto.
16749 * win32-low.c: Ditto.
16750
97438e3f
DE
167512008-12-12 Doug Evans <dje@google.com>
16752
896c7fbb
DE
16753 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16754 in debugging printf.
16755
97438e3f
DE
16756 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16757
e3b886f8
DE
167582008-12-09 Doug Evans <dje@google.com>
16759
16760 * linux-low.h (struct process_info): Delete member tid, unused.
16761 * thread-db.c (find_one_thread): Update.
16762 (maybe_attach_thread): Update.
16763
07e059b5
VP
167642008-12-02 Pedro Alves <pedro@codesourcery.com>
16765
889bf7c5
PA
16766 * target.h (struct target_ops): Add qxfer_osdata member.
16767 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16768 and dirent.h.
16769 (linux_qxfer_osdata): New functions.
16770 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16771 callback.
16772 * server.c (handle_query): Handle "qXfer:osdata:read:".
16773 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16774 (buffer_xml_printf): New functions.
16775 * server.h (struct buffer): New.
16776 (buffer_grow_str, buffer_grow_str0): New macros.
16777 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16778 (buffer_xml_printf): Declare.
07e059b5 16779
4cab47ab
DE
167802008-11-24 Doug Evans <dje@google.com>
16781
16782 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16783
f142445f
DJ
167842008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16785
16786 * server.c (handle_v_run): Always use the supplied argument list.
16787
d0107bb6 167882008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 16789
d0107bb6
BW
16790 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16791 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 16792
2c4ad781
TJB
167932008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16794
16795 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16796 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16797 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16798 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16799 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16800 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16801 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16802 XML target descriptions.
16803 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16804 when inferior is running on an ISA 2.05 or later processor. Add
16805 special case to return offset for full 64-bit slot of FPSCR when
16806 in 32-bits.
16807
dfb64f85
DJ
168082008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16809
16810 * Makefile.in (SFILES, clean): Added sparc64 files.
16811 (reg-sparc64.o, reg-sparc64.c): New.
16812 * configure.srv (sparc*-*-linux*): New configuration.
16813 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16814 syscall arguments for SPARC.
16815 (regsets_store_inferior_registers): Likewise.
16816 * linux-sparc-low.c: New file.
16817
66b6e1dd
DE
168182008-10-21 Doug Evans <dje@google.com>
16819
16820 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16821 (READLINE_DIR,READLINE_DEP): Delete.
16822 (INTERNAL_CFLAGS): Update.
16823 (LINTFLAGS): Update.
16824
9b710a42
PA
168252008-10-10 Pedro Alves <pedro@codesourcery.com>
16826
16827 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16828 whole argv from the last run, not just argv[0].
16829
5822d809
PA
168302008-09-08 Pedro Alves <pedro@codesourcery.com>
16831
16832 * regcache.c (new_register_cache): Return NULL if the register
16833 cache size isn't known yet.
16834 (free_register_cache): Avoid dereferencing a NULL regcache.
16835
74aac56f
DJ
168362008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16837
16838 * configure.srv: Merge MIPS and MIPS64.
16839
400b20f5
MR
168402008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16841
16842 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16843
677c5bb1
LM
168442008-08-18 Luis Machado <luisgpm@br.ibm.com>
16845
16846 * Makefile.in: Add required vsx dependencies.
16847
16848 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16849 Declare init_registers_powerpc_vsx32l.
16850 Declare init_registers_powerpc_vsx64l.
16851 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16852 (ppc_arch_setup): Check for VSX in hwcap.
16853 (ppc_fill_vsxregset): New function.
16854 (ppc_store_vsxregset): New function.
16855 Add new VSX entry in regset_info target_regsets.
16856
16857 * configure.srv: Add new VSX dependencies.
16858
a6f3e723
SL
168592008-08-12 Pedro Alves <pedro@codesourcery.com>
16860
16861 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16862 (remote_open): Set or clear transport_is_reliable.
16863 (putpkt_binary): Don't expect acks in noack mode.
16864 (getpkt): Don't send ack/nac in noack mode.
16865 * server.c (handle_general_set): Handle QStartNoAckMode.
16866 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16867 qSupported.
16868 (main): Reset noack_mode on every connection.
16869 * server.h (noack_mode): Declare.
16870
a417dc56
RW
168712008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16872
16873 * Makefile.in (GDBREPLAY_OBS): New variable.
16874 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16875
3221518c
UW
168762008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16877 Daniel Jacobowitz <dan@codesourcery.com>
16878
16879 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16880 (usr_store_inferior_registers): Likewise.
16881 (regsets_store_inferior_registers): Likewise.
16882
ec56be1b
PA
168832008-07-31 Rolf Jansen <rj@surtec.com>
16884 Pedro Alves <pedro@codesourcery.com>
16885
16886 * configure.ac: Check for memmem declaration.
16887 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16888 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16889 (disable_packet_qfThreadInfo): Unconditionally compile.
16890 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16891 * configure, config.in: Regenerate.
16892
2fe5e3ff
DE
168932008-07-28 Doug Kwan <dougkwan@google.com>
16894
16895 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16896 (linux_write_memory): Remove declaration of errno.
16897
836acd6d
UW
168982008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16899
16900 * linux-low.c (handle_extended_wait): Do not use "status"
16901 variable uninitialized.
16902
aeba519e
PA
169032008-07-07 Pedro Alves <pedro@codesourcery.com>
16904
16905 * server.c (handle_v_attach): Inhibit reporting dll changes.
16906
db42f210
PA
169072008-06-27 Pedro Alves <pedro@codesourcery.com>
16908
16909 * remote-utils.c (prepare_resume_reply): If requested, don't
16910 output "thread:TID" in the T stop reply.
16911
16912 * server.c (disable_packet_vCont, disable_packet_Tthread)
16913 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16914 (handle_query): If requested, disable support for qC, qfThreadInfo
16915 and qsThreadInfo.
16916 (handle_v_requests): If requested, disable support for vCont.
16917 (gdbserver_show_disableable): New.
16918 (main): Handle --disable-packet and --disable-packet=LIST.
16919
16920 * server.h (disable_packet_vCont, disable_packet_Tthread)
16921 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16922
8e4c5421
CD
169232008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16924
16925 * server.c (gdbserver_usage): Mention --version.
16926
6e23a804
DJ
169272008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16928
16929 * Makefile.in (gdbreplay.o): New rule.
16930
90aa6a40
JM
169312008-06-06 Joseph Myers <joseph@codesourcery.com>
16932
16933 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16934 message, not gdbserver.
16935
c16158bc 169362008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
16937 Nathan Sidwell <nathan@codesourcery.com>
16938 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
16939
16940 * acinclude.m4: Include ../../config/acx.m4.
16941 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16942 * configure, config.in: Regenerate.
16943 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16944 * server.c (gdbserver_version): Print PKGVERSION.
16945 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16946 (main): Adjust gdbserver_usage calls.
16947 * gdbreplay.c (version, host_name): Add declarations.
16948 (gdbreplay_version, gdbreplay_usage): New.
16949 (main): Accept --version and --help options.
16950
aeb75bf5
DJ
169512008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16952
16953 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16954 (arm_breakpoint_at): Handle Thumb.
16955 (the_low_target): Add comment.
16956
76b233dd
UW
169572008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16958
16959 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16960
08388c79
DE
169612008-05-09 Doug Evans <dje@google.com>
16962
a3c83fae
DE
16963 * server.h (decode_search_memory_packet): Declare.
16964 * remote-utils.c (decode_search_memory_packet): New fn.
16965 * server.c (handle_search_memory_1): New fn.
08388c79
DE
16966 (handle_search_memory): New fn.
16967 (handle_query): Process qSearch:memory packets.
16968
bb9c3d36
UW
169692008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16970
16971 * regcache.c (registers_length): Remove.
16972 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16973 full register packet.
16974 * regcache.h (registers_length): Remove prototype.
16975 * server.h (PBUFSIZ): Define to 16384.
16976
7284e1be
UW
169772008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16978
16979 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16980 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16981 powerpc-64l.o, and powerpc-altivec64l.o.
16982 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16983 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16984 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16985 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16986 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16987 to srv_xmlfiles.
16988
16989 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16990 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16991 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16992 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16993 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16994 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16995 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16996 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16997 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16998 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16999 (clean): Update.
17000
17001 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17002 (init_registers_powerpc_32l): ... this new prototype.
17003 (init_registers_powerpc_32): Remove, replace by ...
17004 (init_registers_powerpc_altivec32l): ... this new prototype.
17005 (init_registers_powerpc_e500): Remove, replace by ...
17006 (init_registers_powerpc_e500l): ... this new prototype.
17007 (init_registers_ppc64): Remove, replace by ...
17008 (init_registers_powerpc_64l): ... this new prototype.
17009 (init_registers_powerpc_64): Remove, replace by ...
17010 (init_registers_powerpc_altivec64l): ... this new prototype.
17011 (ppc_num_regs): Set to 73.
17012 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17013 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17014 (ppc_cannot_store_register): Handle orig_r3 and trap.
17015 (ppc_arch_setup): Update init_registers_... calls.
17016 (ppc_fill_gregset): Handle orig_r3 and trap.
17017
17018 * inferiors.c (clear_inferiors): Reset current_inferior.
17019
fdc59709
PB
170202008-04-23 Paolo Bonzini <bonzini@gnu.org>
17021
889bf7c5
PA
17022 * acinclude.m4: Add override.m4.
17023 * configure: Regenerate.
fdc59709 17024
c9b2f845
UW
170252008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17026
17027 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17028 initial call to init_register_ppc64.
17029
550512b8
UW
170302008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17031
43aaf8b6
PA
17032 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17033 single powerpc*-*-linux* case.
550512b8
UW
17034 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17035
b6430ec3
UW
170362008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17037
17038 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 17039 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
17040 from reg_xmlfiles.
17041 * linux-ppc-low.c: Include <elf.h>.
17042 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17043 (ppc_hwcap): New global variable.
17044 (ppc_regmap): Remove __SPE__ #ifdef sections.
17045 (ppc_regmap_e500): New global variable.
17046 (ppc_cannot_store_register): Update __SPE__ special case.
17047 (ppc_get_hwcap): New function.
17048 (ppc_arch_setup): Use it to determine whether inferior supports
17049 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17050 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17051 Do not access registers if target does not support AltiVec.
17052 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17053 Do not access registers if target does not support SPE.
17054 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17055
52fa2412
UW
170562008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17057
17058 * linux-low.c (disabled_regsets, num_regsets): New.
17059 (use_regsets_p): Delete.
17060 (linux_wait_for_process): Clear disabled_regsets.
17061 (regsets_fetch_inferior_registers): Check and set it.
17062 (regsets_store_inferior_registers): Likewise.
17063 (linux_fetch_registers, linux_store_registers): Do not use
17064 use_regsets_p.
17065 (initialize_low): Allocate disabled_regsets.
17066
e28b3332
DJ
170672008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17068
17069 * Makefile.in (LIBOBJS): New.
17070 (OBS): Use LIBOBJS.
17071 (memmem.o): New rule.
17072 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17073 * configure: Regenerated.
17074
4536995d
UW
170752008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17076
17077 * server.c (handle_query): Never return "unsupported" for
17078 qXfer:features:read queries.
17079
221c031f
UW
170802008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17081
17082 * server.c (get_features_xml): Fix inverted condition.
17083 (handle_query): Always support qXfer:feature:read.
17084
ccd213ac
DJ
170852008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17086
17087 * server.c (wrapper_argv): New.
17088 (start_inferior): Handle wrapper_argv. If set, expect an extra
17089 trap.
17090 (gdbserver_usage): Document --wrapper.
17091 (main): Parse --wrapper.
17092
6fe305f7
UW
170932008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17094
17095 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17096 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17097 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17098 (ppc_set_pc): Likewise.
17099 (ppc_arch_setup): New function.
17100 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17101 of collect_register.
889bf7c5 17102 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 17103
5b0a002e
UW
171042008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17105
17106 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17107 instead of linux-ppc64-low.o.
17108 * linux-ppc64-low.c: Remove file.
17109 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17110 (linux-ppc64-low.o): Remove rule.
17111
17112 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17113 (init_registers_powerpc_64): Likewise.
17114 (ppc_regmap): Conditionally define depending on __powerpc64__.
17115 (ppc_cannot_store_register): Do not special-case "fpscr" when
17116 compiled on __powerpc64__.
17117 (ppc_collect_ptrace_register): New function.
17118 (ppc_supply_ptrace_register): New function.
17119 (ppc_breakpoint): Change type to "unsigned int".
17120 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17121 (the_low_target): Conditionally provide initializers for the
889bf7c5 17122 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
17123 collect_ptrace_register and supply_ptrace_register members.
17124
9b4b61c8
UW
171252008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17126
17127 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17128 * server.c (gdbserver_xmltarget): Define.
17129 (get_features_xml): Use it to replace "target.xml" and arch_string.
17130
17131 * configure.srv: Remove srv_xmltarget. Add XML files that were
17132 mentioned there to srv_xmlfiles instead. Remove conditional tests
17133 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17134 srv_xmlfiles and srv_regobj to include all possible choices.
17135 * configure.ac (srv_xmltarget): Remove.
17136 (srv_xmlfiles): Do not add "target.xml".
17137 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17138 checks for supplementary target information.
17139 * configure: Regenerate.
17140 * Makefile.in (XML_TARGET): Remove.
17141 (target.xml): Remove rule.
17142 (clean): Do not clean up target.xml.
17143 (.PRECIOUS): Do not mention target.xml.
17144
17145 * target.h (struct target_ops): Remove arch_string member.
17146 * linux-low.c (linux_arch_string): Remove.
17147 (linux_target_ops): Remove arch_string initializer.
17148 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17149 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17150 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17151 * spu-low.c (spu_arch_string): Remove.
17152 (spu_target_ops): Remove arch_string initializer.
17153 * win32-low.c (win32_arch_string): Remove.
17154 (win32_target_ops): Remove arch_string initializer.
17155 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17156 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17157 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17158
ee1a7ae4
UW
171592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17160
17161 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17162 by collect_ptrace_register and supply_ptrace_register hooks.
17163 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17164 instead of checking for the_low_target.left_pad_xfer.
17165 (usr_store_inferior_registers): Use collect_ptrace_register callback
17166 instead of checking for the_low_target.left_pad_xfer.
17167
17168 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17169 (s390_supply_ptrace_register): Likewise.
17170 (s390_fill_gregset): Call s390_collect_ptrace_register.
17171 (the_low_target): Update.
17172
17173 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17174 (ppc_supply_ptrace_register): Likewise.
17175 (the_low_target): Update.
17176
17177 * linux-i386-low.c (the_low_target): Update.
17178 * linux-x86-64-low.c (the_low_target): Update.
17179
d61ddec4
UW
171802008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17181
17182 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17183 reg-s390.o and reg-s390x.o.
17184
17185 * linux-low.c (new_inferior): New global variable.
17186 (linux_create_inferior, linux_attach): Set it.
17187 (linux_wait_for_process): Call the_low_target.arch_setup after the
17188 target has stopped for the first time.
17189 (initialize_low): Do not call the_low_target.arch_setup.
17190
17191 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17192 (s390_set_pc): Likewise.
17193 (s390_arch_setup): New function.
17194 (the_low_target): Use s390_arch_setup as arch_setup routine.
17195
17196 * regcache.c (realloc_register_cache): New function.
17197 (set_register_cache): Call it for each existing regcache.
17198
d05b4ac3
UW
171992008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17200
17201 * server.h (init_registers): Remove prototype.
17202
17203 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17204 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17205 instead of init_registers ().
17206 * linux-arm-low.c (init_registers_arm): Add prototype.
17207 (init_registers_arm_with_iwmmxt): Likewise.
17208 (the_low_target): Add initializer for arch_setup field.
17209 * linux-cris-low.c (init_registers_cris): Add prototype.
17210 (the_low_target): Add initializer for arch_setup field.
17211 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17212 (the_low_target): Add initializer for arch_setup field.
17213 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17214 (the_low_target): Add initializer for arch_setup field.
17215 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17216 (the_low_target): Add initializer for arch_setup field.
17217 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17218 (the_low_target): Add initializer for arch_setup field.
17219 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17220 (the_low_target): Add initializer for arch_setup field.
17221 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17222 (init_registers_mips64_linux): Likewise.
17223 (the_low_target): Add initializer for arch_setup field.
17224 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17225 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17226 (the_low_target): Add initializer for arch_setup field.
17227 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17228 (init_registers_powerpc_64): Likewise.
17229 (the_low_target): Add initializer for arch_setup field.
17230 * linux-s390-low.c (init_registers_s390): Add prototype.
17231 (init_registers_s390x): Likewise.
17232 (the_low_target): Add initializer for arch_setup field.
17233 * linux-sh-low.c (init_registers_sh): Add prototype.
17234 (the_low_target): Add initializer for arch_setup field.
17235 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17236 (the_low_target): Add initializer for arch_setup field.
17237 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17238 (the_low_target): Add initializer for arch_setup field.
17239
17240 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17241 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17242 instead of init_registers ().
17243 * win32-arm-low.c (init_registers_arm): Add prototype.
17244 (the_low_target): Add initializer for arch_setup field.
17245 * win32-i386-low.c (init_registers_i386): Add prototype.
17246 (the_low_target): Add initializer for arch_setup field.
17247
17248 * spu-low.c (init_registers_spu): Add prototype.
17249 (initialize_low): Call initialie_registers_spu () instead of
17250 initialize_registers ().
17251
fd96d250
PA
172522008-02-19 Pedro Alves <pedro@codesourcery.com>
17253
17254 * server.c (handle_v_requests): When handling the vRun and vAttach
17255 packets, if already debugging a process, don't kill it. Return an
17256 error instead.
17257
d41b6bb4
DJ
172582008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17259
17260 * server.c (handle_query): Correct length check.
17261
5ac588cf
PA
172622008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17263
17264 * win32-low.c (do_initial_child_stuff): Add process handle
17265 parameter. Set current_process_handle and current_process_id from the
17266 parameters. Clear globals.
17267 (win32_create_inferior): Don't set current_process_handle and
17268 current_process_id here. Instead pass them on the call to
17269 do_initial_child_stuff.
17270 (win32_attach): Likewise.
17271 (win32_clear_inferiors): New.
17272 (win32_kill): Don't close the current process handle or the
17273 current thread handle here. Instead call win32_clear_inferiors.
17274 (win32_detach): Don't open a new handle to the process. Call
17275 win32_clear_inferiors.
17276 (win32_join): Don't rely on current_process_handle; open a new
17277 handle using the process id.
17278 (win32_wait): Call win32_clear_inferiors when the inferior process
17279 has exited.
17280
ecd7ecbc
DJ
172812008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17282
17283 * server.c (monitor_show_help): Add "exit".
17284
1525d545
MG
172852008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17286
ecd7ecbc 17287 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
17288 (clean): Add reg-xtensa.c.
17289 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
17290 * configure.srv (xtensa*-*-linux*) New target.
17291 * linux-xtensa-low.c: New.
17292 * xtensa-xtregs.c: New.
1525d545 17293
59a016f0
PA
172942008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17295
17296 * hostio.c: Don't include errno.h.
17297 (errno_to_fileio_errno): Move to hostio-errno.
17298 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17299 error number outputting to the target->hostio_last_error callback.
17300 (hostio_packet_error): Use FILEIO_EINVAL directly.
17301 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17302 calls to hostio_error.
17303 * hostio-errno.c: New.
17304 * server.h (hostio_last_error_from_errno): Declare.
17305 * target.h (target_ops): Add hostio_last_error member.
17306 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17307 as hostio_last_error handler.
889bf7c5 17308 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
17309 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17310 (wince_hostio_last_error): New functions.
17311 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17312 as hostio_last_error handler.
17313 (win32_target_ops) [!_WIN32_WCE]: Register
17314 hostio_last_error_from_errno as hostio_last_error handler.
17315 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17316 (hostio-errno.o): New rule.
17317 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17318 * configure.srv (srv_hostio_err_objs): New variable. Default to
17319 hostio-errno.o.
17320 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17321 * configure: Regenerate.
17322
2d717e4f
DJ
173232008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17324
17325 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17326 (linux_kill, linux_detach): Clean up the process list.
17327 * remote-utils.c (remote_open): Improve port number parsing.
17328 (putpkt_binary, input_interrupt): Only send interrupts if the target
17329 is running.
17330 * server.c (extended_protocol): Make static.
17331 (attached): Define earlier.
17332 (exit_requested, response_needed, program_argv): New variables.
17333 (target_running): New.
17334 (start_inferior): Clear attached here.
17335 (attach_inferior): Set attached here.
17336 (require_running): Define.
17337 (handle_query): Use require_running and target_running. Implement
17338 "monitor exit".
17339 (handle_v_attach, handle_v_run): New.
17340 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17341 (gdbserver_usage): Update.
17342 (main): Redo argument parsing. Handle --debug and --multi. Handle
17343 --attach along with other options or after the port. Save
17344 program_argv. Support no initial program. Resynchronize
17345 communication with GDB after an error. Handle "monitor exit".
17346 Use require_running and target_running. Always allow the extended
17347 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17348 restart in extended mode.
17349 * README: Refer to the GDB manual. Update --attach usage.
17350
7407e2de
AS
173512007-12-20 Andreas Schwab <schwab@suse.de>
17352
17353 * linux-low.c (STACK_SIZE): Define.
17354 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17355 (linux_test_for_tracefork): Likewise.
17356
b65d95c5
DJ
173572007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17358
17359 * linux-low.c (linux_wait_for_event): Update messages. Do not
17360 reinsert auto-delete breakpoints.
17361 * mem-break.c (struct breakpoint): Change return type of handler to
17362 int.
17363 (set_breakpoint_at): Update handler type.
17364 (reinsert_breakpoint_handler): Return 1 instead of calling
17365 delete_breakpoint.
17366 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17367 setting a new one.
17368 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17369 * mem-break.h (set_breakpoint_at): Update handler type.
17370 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17371 * win32-low.c (auto_delete_breakpoint): New.
17372 (get_child_debug_event): Use it.
17373
4e799345
DJ
173742007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17375
17376 * configure.ac: Check for pread and pwrite.
17377 * hostio.c (handle_pread): Fall back to lseek and read.
17378 (handle_pwrite): Fall back to lseek and write.
17379 * config.in, configure: Regenerated.
17380
27524b67
DJ
173812007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17382
17383 * server.c (myresume): Add own_buf argument.
17384 (main): Update calls.
17385
a20d5e98
DJ
173862007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17387
17388 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17389 * remote-utils.c (remote_open): Do not call disable_async_io.
17390 (block_async_io): Delete.
17391 (unblock_async_io): Make static.
17392 (initialize_async_io): New.
17393 * server.c (handle_v_cont): Handle async I/O here.
17394 (myresume): Likewise. Move other common resume tasks here...
17395 (main): ... from here. Call initialize_async_io. Disable async
17396 I/O before the main loop.
17397 * server.h (initialize_async_io): Declare.
17398 (block_async_io, unblock_async_io): Delete prototypes.
17399 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17400
b79d787e
DJ
174012007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17402
17403 * remote-utils.c (readchar): Allow binary data in received messages.
17404
d97903b2
PA
174052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17406
17407 * win32-low.c (attaching): New global.
17408 (win32_create_inferior): Clear the `attaching' global.
17409 (win32_attach): Set the `attaching' global.
17410 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17411 attaching. Only set a breakpoint at the entry point if not
17412 attaching.
17413
311de423
PA
174142007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17415
17416 * server.c (main): Don't report dll events on the initial
17417 connection on attaches.
17418
6c2d16d2
PA
174192007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17420
17421 * server.c (main): Relax numerical bases supported for the pid of
17422 the --attach command line argument.
17423
5ca906e6
PA
174242007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17425
17426 * win32-low.c (win32_attach): Call OpenProcess before
17427 DebugActiveProcess, not after. Add last error output to error
17428 call.
17429
9c6c8194
PA
174302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17431
17432 * win32-low.c (win32_get_thread_context)
17433 (win32_set_thread_context): New functions.
17434 (thread_rec): Use win32_get_thread_context.
17435 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17436 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17437 field.
17438
4d5d1aaa
PA
174392007-12-03 Leo Zayas
17440 Pedro Alves <pedro_alves@portugalmail.pt>
17441
17442 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17443 global variables.
17444 (child_add_thread): Minor cleanup.
17445 (child_continue): Resume artificially suspended threads before
17446 calling ContinueDebugEvent.
17447 (suspend_one_thread): New.
17448 (fake_breakpoint_event): New.
17449 (get_child_debug_event): Change return type to int. Check here if
17450 gdb sent an interrupt request. If a soft interrupt was requested,
17451 fake a breakpoint event. Return 0 if there is no event to handle,
17452 and 1 otherwise.
17453 (win32_wait): Don't check here if gdb sent an interrupt request.
17454 Ensure there is a valid event to handle.
17455 (win32_request_interrupt): Add soft interruption method as last
17456 resort.
17457
c436e841
PA
174582007-12-03 Leo Zayas
17459 Pedro Alves <pedro_alves@portugalmail.pt>
17460
17461 * win32-low.h (win32_thread_info): Add descriptions to the
17462 structure members. Replace `suspend_count' counter by a
17463 `suspended' flag.
17464 * win32-low.c (thread_rec): Update condition of when to get the
17465 context from the inferior. Rely on ContextFlags being set if it
17466 has already been retrieved. Only suspend the inferior thread if
17467 we haven't already. Warn if that fails.
17468 (continue_one_thread): s/suspend_count/suspended/. Only call
17469 ResumeThread once. Warn if that fails.
17470
e7b5fa67
PA
174712007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17472
17473 * win32-low.c (win32_wait): Don't read from the inferior when it
17474 has already exited.
17475
a385171d
PA
174762007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17477
17478 * Makefile.in (win32_low_h): New variable.
17479 (win32-low.o): Add dependency on $(win32_low_h).
17480 (win32-arm-low.o, win32-i386-low.o): New rules.
17481
f80c84b3
DJ
174822007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17483
17484 * hostio.c: Correct copyright year.
17485
a6b151f1
DJ
174862007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17487
17488 * Makefile.in (OBS): Add hostio.o.
17489 (hostio.o): New rule.
17490 * server.h (handle_vFile): Declare.
17491 * hostio.c: New file.
17492 * server.c (handle_v_requests): Take packet_len and new_packet_len
17493 for binary packets. Call handle_vFile.
17494 (main): Update call to handle_v_requests.
17495
f9387fc3
DJ
174962007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17497
17498 * linux-low.c: Include <sched.h>.
17499
51c2684e
DJ
175002007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17501
17502 * linux-low.c (linux_tracefork_grandchild): New.
17503 (linux_tracefork_child): Use clone.
17504 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17505
75f83163
JB
175062007-10-31 Joel Brobecker <brobecker@adacore.com>
17507
17508 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17509
da5898ce
DJ
175102007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17511
17512 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17513
24a09b5f
DJ
175142007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17515
17516 * inferiors.c (change_inferior_id): Delete.
17517 (add_pid_to_list, pull_pid_from_list): New.
17518 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17519 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17520 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17521 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17522 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17523 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17524 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17525 (using_threads): Always set to 1.
17526 (handle_extended_wait): New.
17527 (add_process): Do not set TID.
17528 (linux_create_inferior): Set must_set_ptrace_flags.
17529 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17530 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17531 (linux_thread_alive): Rename TID argument to LWPID.
17532 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17533 (linux_wait_for_event): Do not use TID or check using_threads. Update
17534 call to dead_thread_notify. Call handle_extended_wait.
17535 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17536 (send_sigstop): Delete sigstop_sent.
17537 (wait_for_sigstop): Avoid TID.
17538 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17539 (linux_test_for_tracefork): New.
17540 (linux_lookup_signals): Use thread_db_active and
17541 linux_supports_tracefork_flag.
17542 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17543 * linux-low.h (get_process_thread): Avoid TID.
17544 (struct process_ifo): Move thread_known and tid to the end. Remove
17545 sigstop_sent.
17546 (linux_attach_lwp, thread_db_init): Update prototypes.
17547 * server.h (change_inferior_id): Delete prototype.
17548 (add_pid_to_list, pull_pid_from_list): New prototypes.
17549 * thread-db.c (thread_db_use_events): New.
17550 (find_first_thread): Rename to...
17551 (find_one_thread): ...this. Update callers and messages. Do not
17552 call fatal. Check thread_db_use_events. Do not call
17553 change_inferior_id or new_thread_notify.
17554 (maybe_attach_thread): Update. Do not call new_thread_notify.
17555 (thread_db_init): Set thread_db_use_events. Check use_events.
17556 * utils.c (fatal, warning): Correct message prefix.
17557
30ed0a8f
DJ
175582007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17559
17560 * Makefile.in (clean): Remove new files.
17561 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17562 (powerpc-64.o, powerpc-64.c): New rules.
17563 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17564 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17565 with SPE.
17566 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17567 SPE targets.
17568 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17569 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17570 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17571 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17572 (target_regsets): Add AltiVec and SPE register sets.
17573 * configure.ac: Check for AltiVec and SPE.
17574 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17575 (ppc_fill_vrregset, ppc_store_vrregset): New.
17576 (target_regsets): Add AltiVec register set.
17577 * configure: Regenerated.
17578
fd462a61
DJ
175792007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17580
17581 * linux-low.c (O_LARGEFILE): Define.
17582 (linux_read_memory): Use /proc/PID/mem.
17583 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17584 * configure, config.in: Regenerated.
17585
69f223ed
DJ
175862007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17587
17588 * linux-low.c (linux_wait_for_event): Do not pass signals while
17589 single-stepping.
17590
aec18585
PA
175912007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17592
17593 * win32-low.c (create_process): New.
17594 (win32_create_inferior): Use create_process instead of
17595 CreateProcess. If create_process failed retry appending an ".exe"
17596 suffix. Store the GetLastError result immediatelly after
17597 create_process calls and use it on the call to error.
17598
34d86ddd
PA
175992007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17600
17601 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17602
5a0e3bd0
JB
176032007-08-23 Joel Brobecker <brobecker@adacore.com>
17604
17605 * configure.ac: Switch license to GPLv3.
17606
f88c79e6
MS
176072007-08-01 Michael Snyder <msnyder@access-company.com>
17608
17609 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17610
6b3d9b83
PA
176112007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17612
17613 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17614 typedef.
17615 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17616 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17617 CloseToolhelp32Snapshot.
17618 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17619 CloseToolhelp32Snapshot.
17620
c588c53c
MS
176212007-07-27 Michael Snyder <michael.snyder@access-company.com>
17622
17623 * server.c (main): Check for inferior exit before main loop.
17624
aa0403d9
PA
176252007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17626
17627 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17628 instead of on tmp_desc.
17629
255e7678
DJ
176302007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17631 Daniel Jacobowitz <dan@codesourcery.com>
17632
17633 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17634 (add_thread): Minor cleanups.
17635 (clear_inferiors): Move lower in the file. Clear the DLL
17636 list.
17637 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17638 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17639 (xml_escape_text): New.
17640 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17641 for qSupported.
17642 (handle_v_cont): Report errors.
17643 (gdbserver_version): Update.
17644 (main): Correct size of own_buf. Do not report initial DLL events.
17645 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17646 (unloaded_dll, xml_escape_text): New.
17647 * win32-low.c (enum target_waitkind): Update comments.
17648 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17649 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17650 (win32_EnumProcessModules, win32_GetModuleInformation)
17651 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17652 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17653 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17654 (win32_Module32First, win32_Module32Next, load_toolhelp)
17655 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17656 (get_child_debug_event): Handle DLL events.
17657 (win32_wait): Likewise.
17658
0d37add9
DJ
176592007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17660
17661 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17662 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17663
45e2715e
PA
176642007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17665
17666 * win32-low.c (handle_output_debug_string): Ignore event if not
17667 waiting.
17668
c5674cf1
PA
176692007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17670
17671 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17672
2bbe3cc1
DJ
176732007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17674
17675 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17676
ae13219e
DJ
176772007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17678
17679 * inferiors.c (change_inferior_id): Add comment.
17680 * linux-low.c (check_removed_breakpoint): Add an early
17681 prototype. Improve debug output.
17682 (linux_attach): Doc update.
17683 (linux_detach_one_process, linux_detach): Clean up before releasing
17684 each process.
17685 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17686 * linux-low.h (struct process_info): Doc improvement.
17687 * mem-break.c (delete_all_breakpoints): New.
17688 * mem-break.h (delete_all_breakpoints): New prototype.
17689 * thread-db.c (find_first_thread): New.
17690 (thread_db_create_event): Call it instead of
17691 thread_db_find_new_threads. Clean up unused variables.
17692 (maybe_attach_thread): Remove first thread handling.
17693 (thread_db_find_new_threads): Use find_first_thread.
17694 (thread_db_get_tls_address): Likewise.
17695
4105de34
DJ
176962007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17697
17698 * thread-db.c (thread_db_find_new_threads): Add prototype.
17699 (thread_db_create_event): Check for the main thread before adding
17700 a new thread.
17701 (maybe_attach_thread): Only enable event reporting if TID == 0.
17702 (thread_db_get_tls_address): Check for new threads.
17703
2b876972
DJ
177042007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17705
17706 * linux-low.c (linux_create_inferior): Try execv before execvp.
17707 * spu-low.c (spu_create_inferior): Likewise.
17708
7a245884
DJ
177092007-06-13 Mike Frysinger <vapier@gentoo.org>
17710
17711 * linux-low.c (linux_create_inferior): Change execv to execvp.
17712 * spu-low.c (spu_create_inferior): Likewies.
17713
117ce543
DJ
177142007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17715
17716 * Makefile.in (clean): Clean new files instead of deleted ones.
17717 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17718 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17719 rules.
17720 * configure.srv: Specify XML files and new regformats for MIPS and
17721 MIPS64 GNU/Linux.
17722 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17723 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17724 an entry for the restart register.
17725 (mips_cannot_fetch_register, mips_cannot_store_register)
17726 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17727 register names to match the XML descriptions.
17728 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17729 restart register instead of $0.
17730
0e7f50da
UW
177312007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17732 Markus Deuling <deuling@de.ibm.com>
17733
17734 * remote-utils.c (decode_xfer_write): New function.
17735 * server.h (decode_xfer_write): Add prototype.
17736 * server.c (handle_query): Add PACKET_LEN argument. Support
17737 qXfer:spu:read and qXfer:spu:write packets.
17738 (main): Pass packet_len to handle_query.
17739 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17740 * target.h (target_ops): Add qxfer_spu.
17741
374c1d38
UW
177422007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17743
17744 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17745 accessing non-seekable spufs files.
17746
bb63802a
UW
177472007-05-16 Markus Deuling <deuling@de.ibm.com>
17748
889bf7c5 17749 * server.c (handle_query): Add reply for qC packet.
bb63802a 17750
7390519e
PA
177512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17752 Leo Zayas <lerele@champenstudios@com>
17753
17754 * server.h (check_remote_input_interrupt_request): New function.
17755 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17756 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17757 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17758 (check_remote_input_interrupt_request): New function.
17759 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 17760 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
17761 winapi_GenerateConsoleCtrlEvent): New typedefs.
17762 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17763 to 250 ms.
17764 (win32_wait): Check for remote interrupt request
17765 with check_remote_input_interrupt_request.
17766 (win32_request_interrupt): New function.
17767 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17768
34b34921
PA
177692007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17770
17771 * win32-low.c (debug_registers_changed,
17772 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17773 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17774 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17775 (thread_rec): Get context using the low target.
17776 (child_add_thread): Call thread_added on the low target,
17777 which does the same thing.
17778 (regptr): Delete.
17779 (do_initial_child_stuff): Remove debug registers references.
17780 Set context using the low target. Resume threads after
17781 setting the contexts.
17782 (child_continue): Remove dead variable. Remove debug
17783 registers references.
17784 (child_fetch_inferior_registers): Go through the low target.
17785 (do_child_store_inferior_registers): Remove.
17786 (child_store_inferior_registers): Go through the low target.
17787 (win32_resume): Remove debug registers references.
17788 Set context using the low target.
17789 (handle_exception): Change return type to void. Don't record
17790 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17791 first chance exception.
889bf7c5 17792 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
17793 goto loop. Always return after waiting for debug event.
17794 (win32_wait): Convert to switch statement. Handle spurious
17795 events.
17796
17797 * win32-i386-low.c (debug_registers_changed,
17798 debug_registers_used): New.
17799 (initial_stuff): Rename to ...
17800 (i386_initial_stuff): ... this. Clear debug registers
17801 state variables.
17802 (store_debug_registers): Delete.
17803 (i386_get_thread_context): New.
17804 (load_debug_registers): Delete.
17805 (i386_set_thread_context): New.
17806 (i386_thread_added): New.
17807 (single_step): Rename to ...
17808 (i386_single_step): ... this.
17809 (do_fetch_inferior_registers): Rename to ...
17810 (i386_fetch_inferior_register): ... this.
17811 (i386_store_inferior_register): New.
17812 (the_low_target): Adapt to new interface.
17813
17814 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17815 (arm_get_thread_context): New.
17816 (arm_set_thread_context): New.
17817 (regptr): New.
17818 (do_fetch_inferior_registers): Rename to ...
17819 (arm_fetch_inferior_register): ... this.
17820 (arm_store_inferior_register): New.
17821 (arm_wince_breakpoint): Reimplement as unsigned long.
17822 (arm_wince_breakpoint_len): Define.
17823 (the_low_target): Adapt to new interface.
17824
17825 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17826 load_debug_registers. Add get_thread_context, set_thread_context,
17827 thread_added and store_inferior_register. Rename
17828 fetch_inferior_registers to fetch_inferior_register.
17829 (regptr): Remove declaration.
17830
dd6953e1
PA
178312007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17832
17833 * linux-low.c (linux_detach): Change return type to int. Return 0.
17834 * spu-low.c (spu_detach): Likewise.
17835
444d6139
PA
178362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17837
17838 * target.h (target_ops): Change return type of detach to int.
17839 Add join.
17840 (join_inferior): New.
17841 * server.c (main): Don't skip detach support on mingw32.
17842 If the inferior doesn't support detaching return error.
17843 Call join_inferior instead of using waitpid.
17844 * linux-low.c (linux_join): New.
17845 (linux_target_op): Add linux_join.
17846 * spu-low.c (spu_join): New.
17847 (spu_target_ops): Add spu_join.
17848 * win32-low.c (win32_detach): Adapt to new interface.
17849 Reopen current_process_handle before detaching. Issue a child
17850 resume before detaching.
17851 (win32_join): New.
17852 (win32_target_op): Add win32_join.
17853
1d5315fe
PA
178542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17855
17856 * win32-low.c (win32-attach): Fix return value.
17857 * target.h (target_ops): Describe ATTACH return values.
17858
bf914831
PA
178592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17860
17861 * win32-low.c (GETPROCADDRESS): Define.
17862 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17863 (winapi_DebugSetProcessKillOnExit): Likewise.
17864 (win32_create_inferior): Force usage of ansi CreateProcessA.
17865 (win32_attach): Use GETPROCADDRESS.
17866 (win32_detach): Likewise.
17867
f72f3e60
PA
178682007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17869
17870 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17871
ed50f18f
PA
178722007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17873
17874 * win32-low.c: Commit leftover changes from 2007-03-29.
17875
0c2ead7e
DJ
178762007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17877
17878 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17879 fields short instead of int. Add explicit padding.
17880 (i387_cache_to_fsave): Remove unnecessary casts.
17881 (i387_fsave_to_cache): Doc fix.
17882 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17883
73725ff3
DJ
178842007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17885
17886 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17887 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17888
d99f33d8
PA
178892007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17890
17891 * configure.srv (arm*-*-mingw32ce*): Move near the other
17892 arm targets.
17893
68070c10
PA
178942007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17895
2482afc6 17896 * configure.ac: Add errno checking.
68070c10
PA
17897 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17898 sys/file.h and malloc.h.
17899 (AC_CHECK_DECLS): Add perror.
17900 (srv_mingwce): Handle.
2482afc6 17901 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
17902 win32-i386-low.o to srv_tgtobj.
17903 (i[34567]86-*-mingw*): Likewise.
17904 (arm*-*-mingw32ce*): Add case.
17905 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17906 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17907 [__MINGW32CE__] (strerror): New function.
17908 [__MINGW32CE__] (errno): Define to GetLastError.
17909 [__MINGW32CE__] (COUNTOF): New macro.
17910 (remote_open): Remove extra close call.
17911 * mem-break.c (delete_breakpoint_at): New function.
17912 * mem-break.h (delete_breakpoint_at): Declare.
17913 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17914 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17915 [USE_WIN32API] (read, write): Add char* casts.
17916 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17917 * server.h: Include wincecompat.h on Windows CE.
17918 [HAVE_ERRNO_H]: Check.
17919 (perror): Declare if not declared.
17920 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17921 (perror_with_name): Remove errno declaration.
17922 * wincecompat.h: New.
17923 * wincecompat.c: New.
17924 * win32-low.h: New.
17925 * win32-arm-low.c: New.
17926 * win32-i386-low.c: New.
17927 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17928 (OUTMSG2): Make it safe.
17929 (_T): New macro.
17930 (COUNTOF): New macro.
17931 (NUM_REGS): Get it from the low target.
17932 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17933 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17934 (thread_rec): Let low target handle debug registers.
17935 (child_add_thread): Likewise.
17936 (child_init_thread_list): Likewise.
17937 (continue_one_thread): Likewise.
17938 (regptr): New.
17939 (do_child_fetch_inferior_registers): Move to ...
17940 * win32-i386-low.c: ... here, and rename to ...
17941 (do_fetch_inferior_registers): ... this.
889bf7c5 17942 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
17943 Go through the low target.
17944 (do_child_store_inferior_registers): Use regptr.
17945 (strwinerror): New function.
17946 (win32_create_inferior): Handle Windows CE.
17947 Use strwinerror instead of strerror on Windows error
17948 codes. Add program to the error output.
17949 Don't close the main thread handle on Windows CE.
17950 (win32_attach): Use coredll.dll on Windows CE.
17951 (win32_kill): Close current process and current
17952 thread handles.
17953 (win32_detach): Use coredll.dll on Windows CE.
17954 (win32_resume): Let low target handle debug registers, and
17955 step request.
17956 (handle_exception): Add/Remove initial breakpoint. Avoid
17957 non-existant WSTOPSIG on Windows CE.
17958 (win32_read_inferior_memory): Cast to remove warning.
17959 (win32_arch_string): Go through the low target.
17960 (initialize_low): Call set_breakpoint_data with the low
17961 target's breakpoint.
17962 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17963 FOP_REGNUM, mappings): Move to ...
17964 * win32-i386-low.c: ... here.
17965 * win32-low.c (win32_thread_info): Move to ...
17966 * win32-low.h: ... here.
17967 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17968 win32-arm-low.c and wincecompat.c.
17969 (all:): Add $EXEEXT.
17970 (install-only:): Likewise.
17971 (gdbserver:): Likewise.
17972 (gdbreplay:): Likewise.
17973 * config.in: Regenerate.
17974 * configure: Regenerate.
17975
41093d81
PA
179762007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17977
17978 * win32-low.c: Rename typedef thread_info to
17979 win32_thread_info throughout.
17980
544afa54
PA
179812007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17982
17983 * win32-i386-low.c: Rename to ...
17984 * win32-low.c: ... this.
17985 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17986 * Makefile.in: Likewise.
17987
bce7165d
PA
179882007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17989
17990 * remote-utils.c (monitor_output): Constify msg parameter.
17991 * server.h (monitor_output): Likewise.
17992 * win32-i386-low.c (handle_output_debug_string): New.
17993 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17994 handle_output_debug_string.
17995 (get_child_debug_event): Likewise.
17996
506c7aa0
DJ
179972007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17998
17999 * server.c (main): Correct strtoul check.
18000
42c81e2a
DJ
180012007-03-27 Jon Ringle <jon@ringle.org>
18002
18003 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18004
9453113a
DJ
180052007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18006
18007 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18008
64a69107
DJ
180092007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18010
18011 * terminal.h: Check HAVE_SGTTY_H.
18012
180132007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
18014
18015 * remote-utils.c (remote_open): Print out the assigned port number.
18016
c74d0ad8
DJ
180172007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18018
18019 * remote-utils.c (monitor_output): New function.
18020 * server.c (debug_threads): Define here.
18021 (monitor_show_help): New function.
18022 (handle_query): Handle qRcmd.
18023 (main): Do not handle 'd' packet.
18024 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18025 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18026 of debug_threads.
18027
de7c3b4a
PA
180282007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18029
18030 * Makefile.in (EXEEXT): New.
18031 (clean): Use $(EXEEXT).
18032
ef57601b
PA
180332007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18034
18035 * target.h (target_ops): Rename send_signal to request_interrupt,
18036 and remove enum target_signal parameter.
18037 * linux-low.c (linux_request_interrupt): Rename from
18038 linux_send_signal, and always send SIGINT.
18039 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18040 and always send SIGINT.
18041 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18042 of send_signal.
18043 (input_interrupt): Likewise.
18044
820f2bda
PA
180452007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18046
18047 * server.c (get_features_xml): Check if target implemented
18048 arch_string.
18049 * win32-i386-low.c (win32_arch_string): New.
18050 (win32_target_ops): Add win32_arch_string as arch_string member.
18051
ab39bf24
UW
180522007-02-22 Markus Deuling <deuling@de.ibm.com>
18053
18054 * spu-low.c (spu_arch_string): New.
18055 (spu_target_ops): Add spu_arch_string.
18056
61ff6e04
DJ
180572007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18058
18059 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18060 * configure.ac: Do not check for terminal.h.
18061 * configure, config.in: Regenerated.
18062
fb1e4ffc
DJ
180632007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18064
18065 * Makefile.in (OBS): Add $(XML_BUILTIN).
18066 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18067 (clean): Update.
18068 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18069 (arm-with-iwmmxt.c): New.
18070 * config.in, configure: Regenerate.
18071 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18072 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18073 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18074 (arm*-*-linux*): Add iWMMXt and regset support.
18075 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18076 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18077 (arm_store_wmmxregset, target_regsets): New.
18078 * server.c (get_features_xml): Take annex argument. Check builtin
18079 XML documents.
18080 (handle_query): Handle multiple annexes.
18081
0f48aa01
DJ
180822007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18083
18084 * remote-utils.c [USE_WIN32API] (read, write): Define.
18085 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18086 write.
18087
23181151
DJ
180882007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18089
18090 * linux-i386-low.c (the_low_target): Set arch_string.
18091 * linux-x86-64-low.c (the_low_target): Likewise.
18092 * linux-low.c (linux_arch_string): New.
18093 (linux_target_ops): Add it.
18094 * linux-low.h (struct linux_target_ops): Add arch_string.
18095 * server.c (write_qxfer_response): Use const void * for DATA.
18096 (get_features_xml): New.
18097 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18098 * target.h (struct target_ops): Add arch_string method.
18099
9d606399
DJ
181002007-01-03 Denis Pilat <denis.pilat@st.com>
18101 Daniel Jacobowitz <dan@codesourcery.com>
18102
18103 * linux-low.c (linux_kill): Handle being called with no threads.
18104 * win32-i386-low.c (win32_kill): Likewise.
18105 (get_child_debug_event): Clear current_process_handle.
18106
181072006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
18108 Daniel Jacobowitz <dan@codesourcery.com>
18109
18110 * remote-utils.c (remote_open): Check the type of specified
18111 serial port devices before opening them.
18112 * server.c (main): Kill the inferior if an error occurs during
18113 the first remote_open.
18114
a5e13d24
DJ
181152006-12-05 Markus Deuling <deuling@de.ibm.com>
18116
18117 * README: Update supported targets.
18118
186947f7
DJ
181192006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18120
18121 * Makefile.in (clean): Remove reg-mips64.c.
18122 (reg-mips64.c, reg-mips64.o): New rules.
18123 * configure.srv: Handle mips64. Include regset support for mips.
18124 * linux-mips-low.c (union mips_register): New.
18125 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18126 (mips_breakpoint, mips_breakpoint_at): Use int.
18127 (mips_collect_register, mips_supply_register)
18128 (mips_collect_register_32bit, mips_supply_register_32bit)
18129 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18130 (mips_store_fpregset, target_regsets): New.
18131 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18132
a13e2c95
UW
181332006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18134
18135 * configure.srv: Add target "spu*-*-*".
18136 * Makefile.in (clean): Remove reg-spu.c.
18137 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18138 * spu-low.c: New file.
18139
cb7283db
DJ
181402006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18141
18142 * configure.ac: Correct td_thr_tls_get_addr test.
18143 * configure: Regenerated.
18144
89be2091
DJ
181452006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18146
18147 * linux-low.c (linux_wait_for_event): Reformat. Use the
18148 pass_signals array.
18149 * remote-utils.c (decode_address_to_semicolon): New.
18150 * server.c (pass_signals, handle_general_set): New.
18151 (handle_query): Mention QPassSignals for qSupported.
18152 (main): Call handle_general_set.
18153 * server.h (pass_signals, decode_address_to_semicolon): New.
18154
000ef4f0
DJ
181552006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18156
18157 * server.c (handle_query): Correct error handling for read_auxv.
18158
b7149293
UW
181592005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18160
18161 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18162 and srv_linux_thread_db to yes.
18163 * linux-s390-low.c (s390_fill_gregset): New function.
18164 (target_regsets): Define data structure.
18165
dae5f5cf
DJ
181662006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18167
18168 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18169 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18170 * config.in, configure: Regenerated.
18171 * inferiors.c (gdb_id_to_thread): New function.
18172 (gdb_id_to_thread_id): Use it.
18173 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18174 * linux-low.h (struct process_info): Add th member.
18175 (thread_db_get_tls_address): New prototype.
18176 * remote-utils.c (decode_address): Make non-static.
18177 * server.c (handle_query): Handle qGetTLSAddr.
18178 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18179 * target.h (struct target_ops): Add get_tls_address.
18180 * thread-db.c (maybe_attach_thread): Save the thread handle.
18181 (thread_db_get_tls_address): New.
18182
32ca6d61
DJ
181832006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18184
18185 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18186 (linux_resume_one_process): Take a siginfo_t *. Update all
18187 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18188 (struct pending_signals): Add a siginfo_t.
18189 (linux_wait_for_process): Always set last_status.
18190 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18191 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18192 * linux-low.h (struct process_info): Add last_status.
18193
5ffff7c1
DJ
181942006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18195
18196 * remote-utils.c (try_rle): New function.
18197 (putpkt_binary): Use it.
18198
8695c747
DJ
181992006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18200
18201 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18202 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18203 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18204 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18205 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18206 point registers.
18207
290fadea
RS
182082006-08-08 Richard Sandiford <richard@codesourcery.com>
18209
18210 * server.c (terminal_fd): New variable.
18211 (old_foreground_pgrp): Likewise.
18212 (restore_old_foreground_pgrp): New function.
18213 (start_inferior): Record the terminal file descriptor in terminal_fd
18214 and its original foreground group in old_foreground_pgrp. Register
18215 restore_old_foreground_pgrp with atexit().
18216
9f2e1e63
DJ
182172006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18218
18219 * server.c (handle_query): Correct qPart to qXfer.
18220
b80864fb
DJ
182212006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18222
18223 * configure.ac: Check for more headers which are missing on
18224 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18225 * configure.srv: Add Cygwin and mingw32.
18226 * remote-utils.c: Don't include headers unconditionally which
18227 are missing on mingw32. Include <winsock.h> for mingw32.
18228 (remote_open): Adjust for mingw32 support. Flush
18229 standard error after writing to it.
18230 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18231 (unblock_async_io, enable_async_io, disable_async_io)
18232 (readchar, getpkt): Update for Winsock support.
18233 (prepare_resume_reply): Expect a protocol signal number.
18234 * server.c: Disable <sys/wait.h> on mingw32.
18235 (start_inferior): Adjust for mingw32 support. Flush
18236 standard error after writing to it.
18237 (attach_inferior): Likewise. Use protocol signal
18238 numbers.
18239 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18240 and names.
18241 * win32-i386-low.c: New file.
18242 * Makefile.in (XM_CLIBS): Set.
18243 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18244 (win32-i386-low.o): New dependency rule.
18245 * linux-low.c (linux_wait): Use target signal numbers.
18246 * target.h (struct target_ops): Doc fix.
18247 * server.h (target_signal_to_name): New prototype.
18248 * gdbreplay.c: Don't include headers unconditionally which
18249 are missing on mingw32. Include <winsock.h> for mingw32.
18250 (remote_close, remote_open): Adjust for Winsock support.
18251 * configure, config.in: Regenerated.
18252
0876f84a
DJ
182532006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18254
18255 * server.c (decode_xfer_read, write_qxfer_response): New.
18256 (handle_query): Take a packet length argument. Handle
18257 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18258 the qSupported response.
18259 (main): Update call to handle_query.
18260
01f9e8fa
DJ
182612006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18262
18263 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18264 (putpkt_binary): Renamed from putpkt and adjusted for binary
18265 data.
18266 (putpkt): New wrapper for putpkt_binary.
18267 (readchar): Don't mask off the high bit.
18268 (decode_X_packet): New function.
18269 * server.c (main): Call putpkt_binary if a handler sets the packet
18270 length. Save the length of the incoming packet. Handle 'X'.
18271 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18272
be2a5f71
DJ
182732006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18274
18275 * server.c (handle_query): Handle qSupported.
18276
ea025f5f
DJ
182772006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18278
18279 * remote-utils.c (all_symbols_looked_up): New variable.
18280 (look_up_one_symbol): Check it.
18281 * server.h (look_up_one_symbol): New declaration.
18282 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18283
9308fc88
DJ
182842006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18285
18286 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 18287 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
18288 (PTRACE_GET_THREAD_AREA): Define.
18289 (ps_get_thread_area): New function.
18290
52fb6437
NS
182912006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18292
18293 * configure.srv (m68k*-*-uclinux*): New target.
18294 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18295 (linux_resume_one_process): Remove extraneous cast.
18296 (linux_read_offsets): New.
18297 (linux_target_op): Add linux_read_offsets on mmuless systems.
18298 * server.c (handle_query): Add qOffsets logic.
18299 * target.h (struct target_ops): Add read_offsets.
18300
21b0f40c
DJ
183012006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18302
18303 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18304 (PTRACE_GET_THREAD_AREA): Define.
18305 (ps_get_thread_area): New function.
18306 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18307 (linux-x86-64-low.o): Update.
18308
0050a760
DJ
183092006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18310
18311 * configure.ac: Remove checks for prfpregset_t.
18312 * gdb_proc_service.h: New file.
18313 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18314 new "gdb_proc_service.h".
18315 * proc-service.c: Likewise.
18316 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18317 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18318 * Makefile.in (gdb_proc_service_h): Updated.
18319 * configure, config.in: Regenerated.
18320
b92a518e
DJ
183212006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18322
18323 * remote-utils.c (prepare_resume_reply): Move declaration
18324 of gdb_id_from_wait to the top of the block.
18325
545587ee
DJ
183262006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18327
18328 * linux-low.c (regsets_store_inferior_registers): Read the regset
18329 from the target before filling it.
18330
9db87ebd
DJ
183312006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18332
18333 * server.c (attach_inferior): Return SIGTRAP for a successful
18334 attach.
18335
dd24457d
DJ
183362006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18337
18338 * Makefile.in (OBS): Add version.o.
18339 (STAGESTUFF): Delete.
18340 (version.o): Add dependencies.
18341 (version.c): Replace rule.
18342 (clean): Remove version.c.
18343 * server.c (gdbserver_version): New.
18344 (gdbserver_usage): Use printf.
18345 (main): Handle --version and --help.
18346 * server.h (version, host_name): Add declarations.
18347
6f0f660e
EZ
183482005-12-23 Eli Zaretskii <eliz@gnu.org>
18349
889bf7c5
PA
18350 * linux-arm-low.c:
18351 * linux-arm-low.c:
18352 * inferiors.c:
18353 * i387-fp.h:
18354 * i387-fp.c:
18355 * gdbreplay.c:
18356 * regcache.c:
18357 * proc-service.c:
18358 * mem-break.h:
18359 * mem-break.c:
18360 * linux-x86-64-low.c:
18361 * linux-sh-low.c:
18362 * linux-s390-low.c:
18363 * linux-ppc64-low.c:
18364 * linux-ppc-low.c:
18365 * linux-mips-low.c:
18366 * linux-m68k-low.c:
18367 * linux-m32r-low.c:
18368 * linux-low.h:
18369 * linux-low.c:
18370 * linux-ia64-low.c:
18371 * linux-i386-low.c:
18372 * linux-crisv32-low.c:
18373 * thread-db.c:
18374 * terminal.h:
18375 * target.h:
18376 * target.c:
18377 * server.h:
18378 * server.c:
18379 * remote-utils.c:
18380 * regcache.h:
18381 * utils.c:
18382 * Makefile.in:
18383 * configure.ac:
6f0f660e
EZ
18384 * gdbserver.1: Add (C) after Copyright. Update the FSF
18385 address.
18386
9d1fb177
DJ
183872005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18388
18389 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18390 (arm_breakpoint_at): Recognize both breakpoints.
18391 (the_low_target): Use the correct breakpoint instruction.
18392
011a70c2
DJ
183932005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18394
18395 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18396 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18397 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18398 (the_low_target): Update.
18399
7fb85e41
AS
184002005-10-25 Andreas Schwab <schwab@suse.de>
18401
18402 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18403
18404 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18405 (ia64_num_regs): Reduce to 462.
18406
3db0444b
DJ
184072005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18408
18409 * acinclude.m4: Correct quoting.
18410 * aclocal.m4: Regenerated.
18411
18412 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18413 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18414 (thread_db_init): Call thread_db_err_str.
18415 * configure.ac: Check for TD_VERSION.
18416 * config.in, configure: Regenerated.
18417
bee0189a
DJ
184182005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18419
18420 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18421
e9d25b98
DJ
184222005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18423
18424 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18425 is not available. Define HAVE_PTRACE_GETREGS if it is.
18426 * config.in, configure: Regenerated.
18427 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18428 * linux-i386-low.c, linux-m68k-low.c: Update to use
18429 HAVE_PTRACE_GETREGS.
18430 * linux-low.c (regsets_fetch_inferior_registers)
18431 (regsets_store_inferior_registers): Only return 0 if we processed
18432 GENERAL_REGS.
18433 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18434 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18435
a06660f7
DJ
184362005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18437
18438 * inferiors.c (struct thread_info): Add gdb_id.
18439 (add_thread): Add gdb_id argument.
18440 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18441 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18442 calls to add_thread.
18443 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18444 * server.c (handle_query): Use thread_to_gdb_id.
18445 (handle_v_cont, main): Use gdb_id_to_thread_id.
18446 * server.h (add_thread): Update prototype.
18447 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18448 prototypes.
18449
5a1f5858
DJ
184502005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18451
18452 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18453 left-padded registers.
18454 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18455 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18456
e122f1f5
SE
184572005-07-01 Steve Ellcey <sje@cup.hp.com>
18458
18459 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18460 * configure: Regenerate.
18461 * config.in: Regenerate.
18462 * server.h (NEED_DECLARATION_STRERROR):
18463 Replace with !HAVE_DECL_STRERROR.
18464
d592fa2f
DJ
184652005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18466
18467 * linux-low.c (linux_wait, linux_send_signal): Don't test
18468 an unsigned long variable for > 0 if it could be MAX_ULONG.
18469 * server.c (myresume): Likewise.
18470 * target.c (set_desired_inferior): Likewise.
18471
ccbd4912
MK
184722005-06-13 Mark Kettenis <kettenis@gnu.org>
18473
18474 * configure.ac: Simplify and improve check for socklen_t.
18475 * configure, config.in: Regenerate.
18476
f450004a
DJ
184772005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18478
18479 * acconfig.h: Remove.
18480 * configure.ac: Add a test for socklen_t. Use three-argument
18481 AC_DEFINE throughout.
18482 * config.in: Regenerated using autoheader 2.59.
18483 * configure: Regenerated.
18484
18485 * gdbreplay.c (socklen_t): Provide a default.
18486 (remote_open): Use socklen_t.
18487 * remote-utils.c (socklen_t): Provide a default.
18488 (remote_open): Use socklen_t.
18489 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18490 unsigned char.
18491
18492 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18493 char for buffers.
18494 * linux-low.c (linux_read_memory, linux_write_memory)
18495 (linux_read_auxv): Likewise.
18496 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18497 (check_mem_write): Likewise.
18498 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18499 Likewise.
18500 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18501 (registers_from_string, register_data): Likewise.
18502 * server.c (handle_query, main): Likewise.
18503 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18504 (decode_M_packet): Likewise.
18505 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18506 * target.h (struct target_ops): Update read_memory, write_memory,
18507 and read_auxv.
18508 (read_inferior_memory, write_inferior_memory): Update.
18509 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18510 to unsigned char *.
18511 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18512 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18513 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18514 linux-s390-low.c, linux-sh-low.c: Update for changes in
18515 read_inferior_memory and the_low_target->breakpoint.
18516
eee84df1
DJ
185172005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18518
18519 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18520 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18521 * configure.srv: Add powerpc64-*-linux*.
18522 * linux-ppc64-low.c: New file.
18523
45b134e5
OF
185242005-05-23 Orjan Friberg <orjanf@axis.com>
18525
18526 * linux-cris-low.c: New file with support for CRIS.
18527 * linux-crisv32-low.c: Ditto for CRISv32.
18528 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18529 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 18530 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
18531 reg-crisv32.o, and reg-crisv32.c to make rules.
18532 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18533 recognized targets.
18534
48d93c75
UW
185352005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18536
18537 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18538 of sizeof (PTRACE_XFER_TYPE).
18539 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18540
e013ee27
OF
185412005-05-12 Orjan Friberg <orjanf@axis.com>
18542
889bf7c5 18543 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
18544 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18545 pointers for hardware watchpoint support.
18546 * linux-low.h (struct linux_target_ops): Ditto.
18547 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18548 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18549 to linux_target_ops.
18550 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18551 reply packet.
18552 * server.c (main): Recognize 'Z' and 'z' packets.
18553
b0ded00b
UW
185542005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18555
18556 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18557 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18558 (the_low_target): Add new members.
18559
8643e2ad
DJ
185602005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18561
18562 * proc-service.c (ps_lgetregs): Search all_processes instead of
18563 all_threads.
18564
fc620387
DJ
185652005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18566
18567 * server.c (start_inferior): Change return type to int.
18568 (attach_inferior): Change sigptr to int *.
18569 (handle_v_cont, handle_v_requests): Change signal to int *.
18570 (main): Change signal to int.
18571
185722005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
18573
18574 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18575 * configure.srv: Add m32r*-*-linux*.
18576 * linux-m32r-low.c: New file.
18577
e0e76420
DJ
185782005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18579
18580 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18581
a1928bad
DJ
185822005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18583
18584 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18585 Take unsigned long arguments for PIDs.
18586 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18587 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18588 (wait_for_sigstop, linux_resume_one_process)
18589 (regsets_fetch_inferior_registers, linux_send_signal)
18590 (linux_read_auxv): Likewise. Update the types of variables holding
18591 PIDs. Update format string specifiers.
18592 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18593 * remote-utils.c (prepare_resume_reply): Likewise.
18594 * server.c (cont_thread, general_thread, step_thread)
18595 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18596 unsigned long.
18597 (handle_query): Update format specifiers.
18598 (handle_v_cont, main): Use strtoul for thread IDs.
18599 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18600 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18601 (general_thread, step_thread, thread_from_wait)
18602 (old_thread_from_wait): Update.
18603 * target.h (struct thread_resume): Use unsigned long for THREAD.
18604 (struct target_ops): Use unsigned long for arguments to attach and
18605 thread_alive.
18606
dcdb98d2
DJ
186072005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18608
18609 * acinclude.m4: Include bfd/bfd.m4 directly.
18610 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18611 <agriffis@toolchain.org>.
18612 * aclocal.m4, configure: Regenerated.
18613
bec39cab
AC
186142005-01-07 Andrew Cagney <cagney@gnu.org>
18615
18616 * configure.ac: Rename configure.in, require autoconf 2.59.
18617 * configure: Re-generate.
18618
434c4c77
DJ
186192004-12-08 Daniel Jacobowitz <dan@debian.org>
18620
18621 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18622 LIBS when finished.
18623 * aclocal.m4: Regenerated.
18624 * configure: Regenerated.
18625
db1d3e1b
AS
186262004-11-21 Andreas Schwab <schwab@suse.de>
18627
18628 * linux-m68k-low.c (m68k_num_gregs): Define.
18629 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18630 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18631 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18632 (m68k_breakpoint_at): New. Add to the_low_target.
18633
18634 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18635 srv_linux_thread_db to yes.
18636
43360365
JB
186372004-10-20 Joel Brobecker <brobecker@gnat.com>
18638
18639 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18640 (ARCH_SET_FS): Likewise.
18641 (ARCH_GET_FS): Likewise.
18642 (ARCH_GET_GS): Likewise.
18643
fd500816
DJ
186442004-10-16 Daniel Jacobowitz <dan@debian.org>
18645
18646 * linux-i386-low.c (ps_get_thread_area): New.
18647 * linux-x86-64-low.c (ps_get_thread_area): New.
18648 * linux-low.c: Include <sys/syscall.h>.
18649 (linux_kill_one_process): Don't kill the first thread here.
18650 (linux_kill): Kill the first thread here.
18651 (kill_lwp): New function.
18652 (send_sigstop, linux_send_signal): Use it.
18653 * proc-service.c: Clean up #ifdefs.
18654 (fpregset_info): Delete.
18655 (ps_lgetregs): Update and enable implementation.
18656 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18657 implementations.
18658 * remote-utils.c (struct sym_cache, symbol_cache): New.
18659 (input_interrupt): Print a clearer message.
18660 (async_io_enabled): New variable.
18661 (enable_async_io, disable_async_io): Use it. Update comments.
18662 (look_up_one_symbol): Use the symbol cache.
18663 * thread-db.c (thread_db_look_up_symbols): New function.
18664 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18665
f6de3c42
DJ
186662004-10-16 Daniel Jacobowitz <dan@debian.org>
18667
18668 * configure.in: Test for -rdynamic.
18669 * configure: Regenerated.
18670 * Makefile (INTERNAL_LDFLAGS): New.
18671 (gdbserver, gdbreplay): Use it.
18672
2c0fc042
AC
186732004-09-02 Andrew Cagney <cagney@gnu.org>
18674
18675 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18676
075b3282
DJ
186772004-03-23 Daniel Jacobowitz <drow@mvista.com>
18678
18679 * linux-low.c (linux_wait): Clear all_processes list also.
18680
fa6a77dc
DJ
186812004-03-12 Daniel Jacobowitz <drow@mvista.com>
18682
18683 * linux-low.c: Include <errno.h>. Remove extern declaration of
18684 errno.
18685
6d782a97
DJ
186862004-03-12 Daniel Jacobowitz <drow@mvista.com>
18687
18688 * gdbreplay.c, server.h, utils.c: Update copyright years.
18689
3a7fb99b
DJ
186902004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18691
18692 * server.c (main): Print child status or termination signal from
18693 variable 'signal', not 'sig'.
18694
c3e735a6
DJ
186952004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18696
18697 * linux-low.c (linux_read_memory): Change return type to
18698 int. Check for and return error from ptrace().
18699 * target.c (read_inferior_memory): Change return type to int. Pass
18700 back return status from the_target->read_memory().
18701 * target.h (struct target_ops): Adapt *read_memory() prototype.
18702 Update comment.
18703 (read_inferior_memory): Adapt prototype.
18704 * server.c (main): Return an error packet if
18705 read_inferior_memory() returns an error.
18706
a59d1c82
DJ
187072004-03-04 Daniel Jacobowitz <drow@mvista.com>
18708
18709 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18710 Unify with other clean targets.
18711
dc3f8883
DJ
187122004-02-29 Daniel Jacobowitz <drow@mvista.com>
18713
18714 * server.c (handle_v_cont): Call set_desired_inferior.
18715
89a208da
DJ
187162004-02-29 Daniel Jacobowitz <drow@mvista.com>
18717
18718 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18719
62ea82f5
DJ
187202004-02-29 Daniel Jacobowitz <drow@mvista.com>
18721
18722 * linux-low.c (linux_wait): Unblock async I/O.
18723 (linux_resume): Block and enable async I/O.
18724 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18725 * server.h (block_async_io, unblock_async_io): Add prototypes.
18726
6910d122
DJ
187272004-02-29 Daniel Jacobowitz <drow@mvista.com>
18728
18729 * remote-utils.c (remote_open): Print a status notice after
18730 opening a TCP port.
18731 * server.c (attach_inferior): Print a status notice after
18732 attaching.
18733
187342004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
18735
18736 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18737
c89dc5d4
DJ
187382004-02-26 Daniel Jacobowitz <drow@mvista.com>
18739
18740 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18741 error packet.
18742 * server.c, target.h: Update copyright years.
18743
4b8dad4a
RM
187442004-02-25 Roland McGrath <roland@redhat.com>
18745
18746 * target.h (struct target_ops): New member `read_auxv'.
18747 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18748 * linux-low.c (linux_read_auxv): New function.
18749 (linux_target_ops): Initialize `read_auxv' member to that.
18750
d7446758
JB
187512004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18752
18753 Committed by Jim Blandy <jimb@redhat.com>.
18754
18755 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 18756 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
18757 instead of GPR_SIZE to distiguish s390 and s390x targets.
18758
5544ad89
DJ
187592004-01-31 Daniel Jacobowitz <drow@mvista.com>
18760
18761 * linux-low.c: Update copyright year.
18762 (check_removed_breakpoint): Clear pending_is_breakpoint.
18763 (linux_set_resume_request, linux_queue_one_thread)
18764 (resume_status_pending_p): New functions.
18765 (linux_continue_one_thread): Use process->resume.
18766 (linux_resume): Only resume threads if there are no pending events.
18767 * linux-low.h (struct process_info): Add resume request
18768 pointer.
18769
2a68b70e
DJ
187702004-01-30 Daniel Jacobowitz <drow@mvista.com>
18771
18772 * regcache.c (new_register_cache): Clear the allocated register
18773 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18774
64386c31
DJ
187752003-10-13 Daniel Jacobowitz <drow@mvista.com>
18776
18777 * linux-low.c (linux_resume): Take a struct thread_resume *
18778 argument.
18779 (linux_wait): Update call.
18780 (resume_ptr): New static variable.
18781 (linux_continue_one_thread): Renamed from
18782 linux_continue_one_process. Use resume_ptr.
18783 (linux_resume): Use linux_continue_one_thread.
18784 * server.c (handle_v_cont, handle_v_requests): New functions.
18785 (myresume): New function.
18786 (main): Handle 'v' case.
18787 * target.h (struct thread_resume): New type.
18788 (struct target_ops): Change argument of "resume" to struct
18789 thread_resume *.
18790 (myresume): Delete macro.
18791
c938e9b0
L
187922003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18793
18794 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18795 (uninstall): Support DESTDIR.
18796
7f313d07
BC
18797Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18798
18799 * configure.srv: Add xscale*linux copy of arm*linux entry.
18800
3b2fc2ea
DJ
188012003-07-24 Daniel Jacobowitz <drow@mvista.com>
18802
18803 * linux-arm-low.c (arm_reinsert_addr): New function.
18804 (the_low_target): Add arm_reinsert_addr.
18805
1c0a559e
MK
188062003-07-08 Mark Kettenis <kettenis@gnu.org>
18807
18808 * mem-break.c: Remove whitespace at end of file.
18809
43d5792c
DJ
188102003-06-28 Daniel Jacobowitz <drow@mvista.com>
18811
18812 * configure.in: Check whether we need to prototype strerror.
18813 * server.h: Optionally prototype strerror.
18814 * gdbreplay.c (perror_with_name): Use strerror.
18815 * linux-low.c (linux_attach_lwp): Use strerror.
18816 * utils.c (perror_with_name): Use strerror.
18817 * config.in, configure: Regenerated.
18818
c8a86edf
DJ
188192003-06-28 Daniel Jacobowitz <drow@mvista.com>
18820
18821 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18822 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18823
73d37363
DJ
188242003-06-20 Daniel Jacobowitz <drow@mvista.com>
18825
18826 * Makefile.in (SFILES): Update.
18827 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18828 low-sun3.c: Remove files.
18829
6ad8ae5c
DJ
188302003-06-17 Daniel Jacobowitz <drow@mvista.com>
18831
18832 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18833 (linux_detach_one_process, linux_detach): New functions.
18834 (linux_target_ops): Add linux_detach.
18835 * server.c (main): Handle 'D' packet.
18836 * target.h (struct target_ops): Add "detach" member.
18837 (detach_inferior): Define.
18838
1581182a
MK
188392003-06-13 Mark Kettenis <kettenis@gnu.org>
18840
18841 From Kelley Cook <kelleycook@wideopenwest.com>:
18842 * configure.srv: Accept i[34567]86 variants.
18843
e5379b03
DJ
188442003-06-05 Daniel Jacobowitz <drow@mvista.com>
18845
18846 * linux-low.c (linux_wait_for_event): Correct comment typos.
18847 (linux_resume_one_process): Call check_removed_breakpoint.
18848 (linux_send_signal): New function.
18849 (linux_target_ops): Add linux_send_signal.
18850 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18851 of kill.
18852 * target.h (struct target_ops): Add send_signal.
18853
2ff29de4
JB
188542003-05-29 Jim Blandy <jimb@redhat.com>
18855
18856 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18857 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18858 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18859 away part of the register's value.
18860
254787d4
DJ
188612003-03-26 Daniel Jacobowitz <drow@mvista.com>
18862
18863 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18864 (linux_wait_for_event, linux_init_signals): Likewise.
18865
94e10508
DJ
188662003-03-17 Daniel Jacobowitz <drow@mvista.com>
18867
18868 * configure.in: Check for stdlib.h.
18869 * configure: Regenerated.
18870 * config.in: Regenerated.
18871
4c0711e0
DJ
188722003-01-04 Andreas Schwab <schwab@suse.de>
18873
18874 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18875
ef66e766
AC
188762003-01-02 Andrew Cagney <ac131313@redhat.com>
18877
18878 * Makefile.in: Remove obsolete code.
18879
a1358604
DJ
188802002-11-20 Daniel Jacobowitz <drow@mvista.com>
18881
18882 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18883 defined(PT_FPR0_HI).
18884
23ce3b1c
DJ
188852002-11-17 Stuart Hughes <seh@zee2.com>
18886
18887 * linux-arm-low.c (arm_num_regs): Increase.
18888 (arm_regmap): Include status register.
18889
188902002-11-17 Daniel Jacobowitz <drow@mvista.com>
18891
18892 * linux-low.c (register_addr): Remove incorrect -1 check.
18893
a9fa9f7d
DJ
188942002-08-29 Daniel Jacobowitz <drow@mvista.com>
18895
18896 * linux-low.c (linux_create_inferior): Call setpgid. Return
18897 the new PID.
18898 (unstopped_p, linux_signal_pid): Remove.
18899 (linux_target_ops): Remove linux_signal_pid.
18900 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18901 global instead of target method.
18902 * target.h (struct target_ops): Remove signal_pid. Update comment
18903 for create_inferior.
18904 * server.c (signal_pid): New variable.
18905 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 18906 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
18907 (attach_inferior): Set signal_pid.
18908
17574093
DJ
189092002-08-23 Daniel Jacobowitz <drow@mvista.com>
18910
18911 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18912
189132002-08-20 Jim Blandy <jimb@redhat.com>
18914
18915 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18916 default for this.
18917
189182002-08-01 Andrew Cagney <cagney@redhat.com>
18919
18920 * Makefile.in: Make chill references obsolete.
18921
189222002-07-24 Kevin Buettner <kevinb@redhat.com>
18923
18924 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18925 * configure: Regenerate.
18926 * config.in: Regenerate.
18927
189282002-07-09 David O'Brien <obrien@FreeBSD.org>
18929
18930 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18931 (perror_with_name, remote_close, remote_open, expect, play): Static.
18932
189332002-07-04 Michal Ludvig <mludvig@suse.cz>
18934
4b8dad4a 18935 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
18936 byte offsets instead of an array of indexes.
18937 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18938
189392002-06-13 Daniel Jacobowitz <drow@mvista.com>
18940
18941 * regcache.c: Add comment.
18942
189432002-06-11 Daniel Jacobowitz <drow@mvista.com>
18944
18945 * thread-db.c: New file.
18946 * proc-service.c: New file.
18947 * acinclude.m4: New file.
18948 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18949 proc-service.o, and thread-db.o.
18950 (linux-low.o): Add USE_THREAD_DB.
18951 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18952 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18953 * aclocal.m4: Regenerated.
18954 * config.in: Regenerated.
18955 * configure: Regenerated.
18956 * configure.in: Check for proc_service.h, sys/procfs.h,
18957 thread_db.h, and linux/elf.h headrs.
18958 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18959 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18960 Check for -lthread_db and thread support.
18961 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18962 PowerPC, and SuperH.
18963 * i387-fp.c: Constify arguments.
18964 * i387-fp.h: Likewise.
18965 * inferiors.c: (struct thread_info): Renamed from
18966 `struct inferior_info'. Remove PID member. Use generic inferior
18967 list header. All uses updated.
18968 (inferiors, signal_pid): Removed.
18969 (all_threads): New variable.
18970 (get_thread): Define.
18971 (add_inferior_to_list): New function.
18972 (for_each_inferior): New function.
18973 (change_inferior_id): New function.
18974 (add_inferior): Removed.
18975 (remove_inferior): New function.
18976 (add_thread): New function.
18977 (free_one_thread): New function.
18978 (remove_thread): New function.
18979 (clear_inferiors): Use for_each_inferior and free_one_thread.
18980 (find_inferior): New function.
18981 (find_inferior_id): New function.
18982 (inferior_target_data): Update argument type.
18983 (set_inferior_target_data): Likewise.
18984 (inferior_regcache_data): Likewise.
18985 (set_inferior_regcache_data): Likewise.
18986 * linux-low.c (linux_bp_reinsert): Remove.
18987 (all_processes, stopping_threads, using_thrads)
18988 (struct pending_signals, debug_threads, pid_of): New.
18989 (inferior_pid): Replace with macro.
18990 (struct inferior_linux_data): Remove.
18991 (get_stop_pc, add_process): New functions.
18992 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18993 Use add_process and add_thread.
18994 (linux_attach_lwp): New function, based on old linux_attach. Use
18995 add_process and add_thread. Set stop_expected for new threads.
18996 (linux_attach): New function.
18997 (linux_kill_one_process): New function.
18998 (linux_kill): Kill all LWPs.
18999 (linux_thread_alive): Use find_inferior_id.
19000 (check_removed_breakpoints, status_pending_p): New functions.
19001 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19002 Update. Use WNOHANG. Wait for cloned processes also. Update process
19003 struct for the found process.
19004 (linux_wait_for_event): New function.
19005 (linux_wait): Use it. Support LWPs.
19006 (send_sigstop, wait_for_sigstop, stop_all_processes)
19007 (linux_resume_one_process, linux_continue_one_process): New functions.
19008 (linux_resume): Support LWPs.
19009 (REGISTER_RAW_SIZE): Remove.
19010 (fetch_register): Use register_size instead. Call supply_register.
19011 (usr_store_inferior_registers): Likewise. Call collect_register.
19012 Fix recursive case.
19013 (regsets_fetch_inferior_registers): Improve error message.
19014 (regsets_store_inferior_registers): Add debugging.
19015 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19016 (unstopped_p, linux_signal_pid): New functions.
19017 (linux_target_ops): Add linux_signal_pid.
19018 (linux_init_signals): New function.
19019 (initialize_low): Call it. Initialize using_threads.
19020 * regcache.c (inferior_regcache_data): Add valid
19021 flag.
19022 (get_regcache): Fetch registers lazily. Add fetch argument
19023 and update all callers.
19024 (regcache_invalidate_one, regcache_invalidate): New
19025 functions.
19026 (new_register_cache): Renamed from create_register_cache.
19027 Return the new regcache.
19028 (free_register_cache): Change argument to a void *.
19029 (registers_to_string, registers_from_string): Call get_regcache
19030 with fetch flag set.
19031 (register_data): Make static. Pass fetch flag to get_regcache.
19032 (supply_register): Call get_regcache with fetch flag clear.
19033 (collect_register): Call get_regcache with fetch flag set.
19034 (collect_register_as_string): New function.
19035 * regcache.h: Update.
19036 * remote-utils.c (putpkt): Flush after debug output and use
19037 stderr.
19038 Handle input interrupts while waiting for an ACK.
19039 (input_interrupt): Use signal_pid method.
19040 (getpkt): Flush after debug output and use stderr.
19041 (outreg): Use collect_register_as_string.
19042 (new_thread_notify, dead_thread_notify): New functions.
19043 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19044 and general_thread.
19045 (look_up_one_symbol): Flush after debug output.
19046 * server.c (step_thread, server_waiting): New variables.
19047 (start_inferior): Don't use signal_pid. Update call to mywait.
19048 (attach_inferior): Update call to mywait.
19049 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19050 (main): Don't fetch/store registers explicitly. Use
19051 set_desired_inferior. Support proposed ``Hs'' packet. Update
19052 calls to mywait.
19053 * server.h: Update.
19054 (struct inferior_list, struct_inferior_list_entry): New.
19055 * target.c (set_desired_inferior): New.
19056 (write_inferior_memory): Constify.
19057 (mywait): New function.
19058 * target.h: Update.
19059 (struct target_ops): New signal_pid method.
19060 (mywait): Removed macro, added prototype.
19061
19062 * linux-low.h (regset_func): Removed.
19063 (regset_fill_func, regset_store_func): New.
19064 (enum regset_type): New.
19065 (struct regset_info): Add type field. Use new operation types.
19066 (struct linux_target_ops): stop_pc renamed to get_pc.
19067 Add decr_pc_after_break and breakpoint_at.
19068 (get_process, get_thread_proess, get_process_thread)
19069 (strut process_info, all_processes, linux_attach_lwp)
19070 (thread_db_init): New.
19071
19072 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19073 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19074 (the_low_target): Add new members.
19075 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19076 (i386_store_fpxregset): Constify.
19077 (target_regsets): Add new kind identifier.
19078 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19079 (i386_set_pc): Add debugging.
19080 (i386_breakpoint_at): New function.
19081 (the_low_target): Add new members.
19082 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19083 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19084 (mips_breakpoint_at): New.
19085 (the_low_target): Add new members.
19086 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19087 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19088 (the_low_target): Add new members.
19089 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19090 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19091 (the_low_target): Add new members.
19092 * linux-x86-64-low.c (target_regsets): Add new kind
19093 identifier.
19094
190952002-05-15 Daniel Jacobowitz <drow@mvista.com>
19096
19097 From Martin Pool <mbp@samba.org>:
19098 * server.c (gdbserver_usage): New function.
19099 (main): Call it.
19100
191012002-05-14 Daniel Jacobowitz <drow@mvista.com>
19102
19103 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19104 stop_at -> stop_pc.
19105
191062002-05-04 Andrew Cagney <ac131313@redhat.com>
19107
19108 * Makefile.in: Remove obsolete code.
19109
191102002-04-24 Michal Ludvig <mludvig@suse.cz>
19111
19112 * linux-low.c (regsets_fetch_inferior_registers),
19113 (regsets_store_inferior_registers): Removed cast to int from
19114 ptrace() calls.
19115 * regcache.h: Added declaration of struct inferior_info.
19116
191172002-04-20 Daniel Jacobowitz <drow@mvista.com>
19118
19119 * inferiors.c (struct inferior_info): Add regcache_data.
19120 (add_inferior): Call create_register_cache.
19121 (clear_inferiors): Call free_register_cache.
19122 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19123 * regcache.c (struct inferior_regcache_data): New.
19124 (registers): Remove.
19125 (get_regcache): New function.
19126 (create_register_cache, free_register_cache): New functions.
19127 (set_register_cache): Don't initialize the register cache here.
19128 (registers_to_string, registers_from_string, register_data): Call
19129 get_regcache.
19130 * regcache.h: Add prototypes.
19131 * server.h: Likewise.
19132
191332002-04-20 Daniel Jacobowitz <drow@mvista.com>
19134
19135 * mem-break.c: New file.
19136 * mem-break.h: New file.
19137 * Makefile.in: Add mem-break.o rule; update server.h
19138 dependencies.
19139 * inferiors.c (struct inferior_info): Add target_data
19140 member.
19141 (clear_inferiors): Free target_data member if set.
19142 (inferior_target_data, set_inferior_target_data): New functions.
19143 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19144 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19145 * linux-low.c (linux_bp_reinsert): New variable.
19146 (struct inferior_linux_data): New.
19147 (linux_create_inferior): Use set_inferior_target_data.
19148 (linux_attach): Likewise. Call add_inferior.
19149 (linux_wait_for_one_inferior): New function.
19150 (linux_wait): Call it.
19151 (linux_write_memory): Add const.
19152 (initialize_low): Call set_breakpoint_data.
19153 * linux-low.h (struct linux_target_ops): Add breakpoint
19154 handling members.
19155 * server.c (attach_inferior): Remove extra add_inferior
19156 call.
19157 * server.h: Include mem-break.h. Update inferior.c
19158 prototypes.
19159 * target.c (read_inferior_memory)
19160 (write_inferior_memory): New functions.
19161 * target.h (read_inferior_memory)
19162 (write_inferior_memory): Change macros to prototypes.
19163 (struct target_ops): Update comments. Add const to write_memory
19164 definition.
19165
191662002-04-11 Daniel Jacobowitz <drow@mvista.com>
19167
19168 * linux-low.c (usr_store_inferior_registers): Support
19169 registers which are allowed to fail to store.
19170 * linux-low.h (linux_target_ops): Likewise.
19171 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19172 (ppc_cannot_store_register): FPSCR may not be storable.
19173
191742002-04-09 Daniel Jacobowitz <drow@mvista.com>
19175
19176 * server.h: Include <string.h> if HAVE_STRING_H.
19177 * ChangeLog: Correct paths in last ChangeLog entry.
19178
191792002-04-09 Daniel Jacobowitz <drow@mvista.com>
19180
19181 * linux-low.h: Remove obsolete prototypes.
19182 (struct linux_target_ops): New.
19183 (extern the_low_target): New.
19184 * linux-low.c (num_regs, regmap): Remove declarations.
19185 (register_addr): Use the_low_target explicitly.
19186 (fetch_register): Likewise.
19187 (usr_fetch_inferior_registers): Likewise.
19188 (usr_store_inferior_registers): Likewise.
19189 * linux-arm-low.c (num_regs): Remove.
19190 (arm_num_regs): Define.
19191 (arm_regmap): Renamed from regmap, made static.
19192 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19193 made static.
19194 (arm_cannot_store_register): Renamed from cannot_store_register,
19195 made static.
19196 (the_low_target): New.
19197 * linux-i386-low.c (num_regs): Remove.
19198 (i386_num_regs): Define.
19199 (i386_regmap): Renamed from regmap, made static.
19200 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19201 made static.
19202 (i386_cannot_store_register): Renamed from cannot_store_register,
19203 made static.
19204 (the_low_target): New.
19205 * linux-ia64-low.c (num_regs): Remove.
19206 (ia64_num_regs): Define.
19207 (ia64_regmap): Renamed from regmap, made static.
19208 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19209 made static.
19210 (ia64_cannot_store_register): Renamed from cannot_store_register,
19211 made static.
19212 (the_low_target): New.
19213 * linux-m68k-low.c (num_regs): Remove.
19214 (m68k_num_regs): Define.
19215 (m68k_regmap): Renamed from regmap, made static.
19216 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19217 made static.
19218 (m68k_cannot_store_register): Renamed from cannot_store_register,
19219 made static.
19220 (the_low_target): New.
19221 * linux-mips-low.c (num_regs): Remove.
19222 (mips_num_regs): Define.
19223 (mips_regmap): Renamed from regmap, made static.
19224 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19225 made static.
19226 (mips_cannot_store_register): Renamed from cannot_store_register,
19227 made static.
19228 (the_low_target): New.
19229 * linux-ppc-low.c (num_regs): Remove.
19230 (ppc_num_regs): Define.
19231 (ppc_regmap): Renamed from regmap, made static.
19232 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19233 made static.
19234 (ppc_cannot_store_register): Renamed from cannot_store_register,
19235 made static.
19236 (the_low_target): New.
19237 * linux-s390-low.c (num_regs): Remove.
19238 (s390_num_regs): Define.
19239 (s390_regmap): Renamed from regmap, made static.
19240 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19241 made static.
19242 (s390_cannot_store_register): Renamed from cannot_store_register,
19243 made static.
19244 (the_low_target): New.
19245 * linux-sh-low.c (num_regs): Remove.
19246 (sh_num_regs): Define.
19247 (sh_regmap): Renamed from regmap, made static.
19248 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19249 made static.
19250 (sh_cannot_store_register): Renamed from cannot_store_register,
19251 made static.
19252 (the_low_target): New.
19253 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19254 (the_low_target): New.
19255
192562002-04-09 Daniel Jacobowitz <drow@mvista.com>
19257
19258 * Makefile.in: Add stamp-h target.
19259 * configure.in: Create stamp-h.
19260 * configure: Regenerated.
19261
192622002-04-09 Daniel Jacobowitz <drow@mvista.com>
19263
19264 * inferiors.c: New file.
19265 * target.c: New file.
19266 * target.h: New file.
19267 * Makefile.in: Add target.o and inferiors.o. Update
19268 dependencies.
19269 * linux-low.c (inferior_pid): New static variable,
19270 moved from server.c.
19271 (linux_create_inferior): Renamed from create_inferior.
19272 Call add_inferior. Return 0 on success instead of a PID.
19273 (linux_attach): Renamed from myattach.
19274 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19275 (linux_thread_alive): Renamed from mythread_alive.
19276 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19277 child dies.
19278 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19279 (regsets_store_inferior_registers): Correct error message.
19280 Add missing ``return 0''.
19281 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19282 (linux_store_registers): Renamed from store_inferior_registers.
19283 (linux_read_memory): Renamed from read_inferior_memory.
19284 (linux_write_memory): Renamed from write_inferior_memory.
19285 (linux_target_ops): New structure.
19286 (initialize_low): Call set_target_ops ().
19287 * remote-utils.c (unhexify): New function.
19288 (hexify): New function.
19289 (input_interrupt): Send signals to ``signal_pid''.
19290 * server.c (inferior_pid): Remove.
19291 (start_inferior): Update create_inferior call.
19292 (attach_inferior): Call add_inferior.
19293 (handle_query): New function.
19294 (main): Call handle_query for `q' packets.
19295 * server.h: Include "target.h". Remove obsolete prototypes.
19296 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19297
192982002-04-09 Daniel Jacobowitz <drow@mvista.com>
19299
19300 * Makefile.in: Add WARN_CFLAGS. Update configury
19301 dependencies.
19302 * configure.in: Check for <string.h>
19303 * configure: Regenerate.
19304 * config.in: Regenerate.
19305 * gdbreplay.c: Include needed system headers.
19306 (remote_open): Remove strchr prototype.
19307 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19308 * regcache.c (supply_register): Change buf argument to const void *.
19309 (supply_register_by_name): Likewise.
19310 (collect_register): Change buf argument to void *.
19311 (collect_register_by_name): Likewise.
19312 * regcache.h: Add missing prototypes.
19313 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19314 * server.c (handle_query): New function.
19315 (attached): New static variable, moved out of main.
19316 (main): Quiet longjmp clobber warnings.
19317 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19318 * utils.c (error): Remove NORETURN.
19319 (fatal): Likewise.