d138fb70282c42ba602a2305a089100d96560399
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2
3 Turn process_stratum_target's supports_disable_randomization op
4 into a method of 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_disable_randomization): Update the macro.
9 * target.cc (process_target::supports_disable_randomization): Define.
10
11 Update the derived classes and callers below.
12
13 * linux-low.cc (linux_target_ops): Update.
14 (linux_supports_disable_randomization): Turn into ...
15 (linux_process_target::supports_disable_randomization): ... this.
16 * linux-low.h (class linux_process_target): Update.
17 * lynx-low.cc (lynx_target_ops): Update.
18 * nto-low.cc (nto_target_ops): Update.
19 * win32-low.cc (win32_target_ops): Update.
20
21 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
22
23 Turn process_stratum_target's emit_ops op into a method of
24 process_target.
25
26 * target.h (struct process_stratum_target): Remove the target op.
27 (class process_target): Add the target op.
28 (target_emit_ops): Update the macro.
29 * target.cc (process_target::emit_ops): Define.
30
31 Update the derived classes and callers below.
32
33 * linux-low.cc (linux_target_ops): Update.
34 (linux_emit_ops): Turn into ...
35 (linux_process_target::emit_ops): ... this.
36 * linux-low.h (class linux_process_target): Update.
37 * lynx-low.cc (lynx_target_ops): Update.
38 * nto-low.cc (nto_target_ops): Update.
39 * win32-low.cc (win32_target_ops): Update.
40
41 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
42
43 Turn process_stratum_target's install_fast_tracepoint_jump_pad
44 and get_min_fast_tracepoint_insn_len ops into methods of
45 process_target.
46
47 * target.h (struct process_stratum_target): Remove the target ops.
48 (class process_target): Add the target ops. Also add
49 'supports_fast_tracepoints'.
50 (target_supports_fast_tracepoints): Update the macro.
51 (target_get_min_fast_tracepoint_insn_len): Update the macro.
52 (install_fast_tracepoint_jump_pad): Update and rename the macro
53 to ...
54 (target_install_fast_tracepoint_jump_pad): ... this.
55 * target.cc (process_target::supports_fast_tracepoints): Define.
56 (process_target::install_fast_tracepoint_jump_pad): Define.
57 (process_target::get_min_fast_tracepoint_insn_len): Define.
58
59 Update the derived classes and callers below.
60
61 * tracepoint.cc (install_fast_tracepoint): Update.
62 * linux-low.cc (linux_target_ops): Update.
63 (linux_process_target::supports_fast_tracepoints): Define.
64 (linux_install_fast_tracepoint_jump_pad): Turn into ...
65 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
66 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
67 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
68 * linux-low.h (class linux_process_target): Update.
69 * lynx-low.cc (lynx_target_ops): Update.
70 * nto-low.cc (nto_target_ops): Update.
71 * win32-low.cc (win32_target_ops): Update.
72
73 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
74
75 Turn process_stratum_target's stabilize_threads op into a
76 method of process_target.
77
78 * target.h (struct process_stratum_target): Remove the target op.
79 (class process_target): Add the target op.
80 (target_stabilize_threads): Update the macro.
81 * target.cc (process_target::stabilize_threads): Define.
82
83 Update the derived classes and callers below.
84
85 * server.cc (handle_status): Update.
86 * tracepoint.cc (cmd_qtdp): Update.
87 (cmd_qtstart): Update.
88 * linux-low.cc (linux_target_ops): Update.
89 (linux_stabilize_threads): Turn into ...
90 (linux_process_target::stabilize_threads): ... this.
91 (linux_wait_1): Update.
92 * linux-low.h (class linux_process_target): Update.
93 * lynx-low.cc (lynx_target_ops): Update.
94 * nto-low.cc (nto_target_ops): Update.
95 * win32-low.cc (win32_target_ops): Update.
96
97 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
98
99 Turn process_stratum_target's pause_all and unpause_all ops
100 into methods of process_target.
101
102 * target.h (struct process_stratum_target): Remove the target ops.
103 (class process_target): Add the target ops.
104 (pause_all): Update the macro and rename to...
105 (target_pause_all): ... this.
106 (unpause_all): Update the macro and rename to...
107 (target_unpause_all): ... this.
108 * target.cc (process_target::pause_all): Define.
109 (process_target::unpause_all): Define.
110
111 Update the derived classes and callers below.
112
113 * server.cc (handle_status): Update.
114 * tracepoint.cc (clear_installed_tracepoints): Update.
115 (cmd_qtdp): Update.
116 (cmd_qtstart): Update.
117 (stop_tracing): Update.
118 (cmd_qtstatus): Update.
119 (upload_fast_traceframes): Update.
120 (run_inferior_command): Update.
121 * linux-low.cc (linux_target_ops): Update.
122 (linux_pause_all): Turn into ...
123 (linux_process_target::pause_all): ... this.
124 (linux_unpause_all): Turn into ...
125 (linux_process_target::unpause_all): ... this.
126 (linux_process_target::prepare_to_access_memory): Update.
127 (linux_process_target::done_accessing_memory): Update.
128 * linux-low.h (class linux_process_target): Update.
129 * lynx-low.cc (lynx_target_ops): Update.
130 * nto-low.cc (nto_target_ops): Update.
131 * win32-low.cc (win32_target_ops): Update.
132
133 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
134
135 Turn process_stratum_target's get_tib_address op into a method of
136 process_target.
137
138 * target.h (struct process_stratum_target): Remove the target op.
139 (class process_target): Add the target op. Also add
140 'supports_get_tib_address'.
141 * target.cc (process_target::get_tib_address): Define.
142 (process_target::supports_get_tib_address): Define.
143
144 Update the derived classes and callers below.
145
146 * server.cc (handle_query): Update.
147 * linux-low.cc (win32_target_ops): Update.
148 * lynx-low.cc (lynx_target_ops): Update.
149 * nto-low.cc (nto_target_ops): Update.
150 * win32-low.cc (win32_target_ops): Update.
151 (win32_process_target::supports_get_tib_address): Define.
152 (win32_get_tib_address): Turn into ...
153 (win32_process_target::get_tib_address): ... this.
154 * win32-low.h (class win32_process_target): Update.
155
156 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
157
158 Turn process_stratum_target's thread_stopped op into a method of
159 process_target.
160
161 * target.h (struct process_stratum_target): Remove the target op.
162 (class process_target): Add the target op. Also add
163 'supports_thread_stopped'.
164 (target_thread_stopped): Update the macro.
165 * target.cc (process_target::thread_stopped): Define.
166 (process_target::supports_thread_stopped): Define.
167 (prepare_to_access_memory): Update.
168
169 Update the derived classes and callers below.
170
171 * server.cc (queue_stop_reply_callback): Update.
172 * linux-low.cc (linux_target_ops): Update.
173 (linux_process_target::supports_thread_stopped): Define.
174 (linux_thread_stopped): Turn into ...
175 (linux_process_target::thread_stopped): ... this.
176 * linux-low.h (class linux_process_target): Update.
177 * lynx-low.cc (lynx_target_ops): Update.
178 * nto-low.cc (nto_target_ops): Update.
179 * win32-low.cc (win32_target_ops): Update.
180
181 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
182
183 Turn process_stratum_target's read_pc and write_pc ops into
184 methods of process_target.
185
186 * target.h (struct process_stratum_target): Remove the target ops.
187 (class process_target): Add the target ops.
188 * target.cc (process_target::read_pc): Define.
189 (process_target::write_pc): Define.
190
191 Update the derived classes and callers below.
192
193 * regcache.cc (regcache_read_pc): Update.
194 (regcache_write_pc): Update.
195 * linux-low.cc (linux_target_ops): Update.
196 (linux_read_pc): Turn into ...
197 (linux_process_target::read_pc): ... this.
198 (linux_write_pc): Turn into ...
199 (linux_process_target::write_pc): ... this.
200 * linux-low.h (class linux_process_target): Update.
201 * lynx-low.cc (lynx_target_ops): Update.
202 * nto-low.cc (nto_target_ops): Update.
203 * win32-low.cc (win32_target_ops): Update.
204
205 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
206
207 Turn process_stratum_target's supports_tracepoints op into a
208 method of process_target.
209
210 * target.h (struct process_stratum_target): Remove the target op.
211 (class process_target): Add the target op.
212 (target_supports_tracepoints): Update the macro.
213 * target.cc (process_target::supports_tracepoints): Define.
214
215 Update the derived classes and callers below.
216
217 * linux-low.cc (linux_target_ops): Update.
218 (linux_supports_tracepoints): Turn into ...
219 (linux_process_target::supports_tracepoints): ... this.
220 * linux-low.h (class linux_process_target): Update.
221 * lynx-low.cc (lynx_target_ops): Update.
222 * nto-low.cc (nto_target_ops): Update.
223 * win32-low.cc (win32_target_ops): Update.
224
225 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
226
227 Turn process_stratum_target's process_qsupported op into a method
228 of process_target.
229
230 * target.h (struct process_stratum_target): Remove the target op.
231 (class process_target): Add the target op.
232 (target_process_qsupported): Update the macro.
233 * target.cc (process_target::process_qsupported): Define.
234
235 Update the derived classes and callers below.
236
237 * linux-low.cc (linux_target_ops): Update.
238 (linux_process_qsupported): Turn into ...
239 (linux_process_target::process_qsupported): ... this.
240 * linux-low.h (class linux_process_target): Update.
241 * lynx-low.cc (lynx_target_ops): Update.
242 * nto-low.cc (nto_target_ops): Update.
243 * win32-low.cc (win32_target_ops): Update.
244
245 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
246
247 Turn process_stratum_target's read_loadmap op into a method of
248 process_target.
249
250 * target.h (struct process_stratum_target): Remove the target op.
251 (class process_target): Add the target op. Also add
252 'supports_read_loadmap'.
253 * target.cc (process_target::read_loadmap): Define.
254 (process_target::supports_read_loadmap): Define.
255
256 Update the derived classes and callers below.
257
258 * server.cc (handle_qxfer_fdpic): Update.
259 (handle_query): Update.
260 * linux-low.cc (linux_target_ops): Update.
261 (linux_process_target::supports_read_loadmap): Define.
262 (linux_read_loadmap): Turn into ...
263 (linux_process_target::read_loadmap): ... 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
269 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
270
271 Turn process_stratum_target's core_of_thread op into a method of
272 process_target.
273
274 * target.h (struct process_stratum_target): Remove the target op.
275 (class process_target): Add the target op.
276 (target_core_of_thread): Update the macro.
277 * target.cc (process_target::core_of_thread): Define.
278
279 Update the derived classes and callers below.
280
281 * linux-low.cc (linux_target_ops): Update.
282 (linux_process_target::core_of_thread): Define.
283 * linux-low.h (class linux_process_target): Update.
284 * lynx-low.cc (lynx_target_ops): Update.
285 * nto-low.cc (nto_target_ops): Update.
286 * win32-low.cc (win32_target_ops): Update.
287
288 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
289
290 Turn process_stratum_target's handle_monitor_command op into a
291 method of process_target.
292
293 * target.h (struct process_stratum_target): Remove the target op.
294 (class process_target): Add the target op.
295 (target_handle_monitor_command): Update the macro.
296 * target.cc (process_target::handle_monitor_command): Define.
297
298 Update the derived classes and callers below.
299
300 * server.cc (handle_query): Update.
301 * linux-low.cc (linux_target_ops): Update.
302 (linux_process_target::handle_monitor_command): Define.
303 * linux-low.h (class linux_process_target): Update.
304 * lynx-low.cc (lynx_target_ops): Update.
305 * nto-low.cc (nto_target_ops): Update.
306 * win32-low.cc (win32_target_ops): Update.
307
308 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
309
310 Turn process_stratum_target's handle_new_gdb_connection op into a
311 method of process_target.
312
313 * target.h (struct process_stratum_target): Remove the target op.
314 (class process_target): Add the target op.
315 (target_handle_new_gdb_connection): Update the macro.
316 * target.cc (process_target::handle_new_gdb_connection): Define.
317
318 Update the derived classes and callers below.
319
320 * linux-low.cc (linux_target_ops): Update.
321 (linux_handle_new_gdb_connection): Turn into ...
322 (linux_process_target::handle_new_gdb_connection): ... this.
323 * linux-low.h (class linux_process_target): Update.
324 * lynx-low.cc (lynx_target_ops): Update.
325 * nto-low.cc (nto_target_ops): Update.
326 * win32-low.cc (win32_target_ops): Update.
327
328 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
329
330 Turn process_stratum_target's supports_fork_events,
331 supports_vfork_events, and supports_exec_events ops into methods
332 of process_target.
333
334 * target.h (struct process_stratum_target): Remove the target ops.
335 (class process_target): Add the target ops.
336 (target_supports_fork_events): Update the macro.
337 (target_supports_vfork_events): Update the macro.
338 (target_supports_exec_events): Update the macro.
339 * target.cc (process_target::supports_fork_events): Define.
340 (process_target::supports_vfork_events): Define.
341 (process_target::supports_exec_events): Define.
342
343 Update the derived classes and callers below.
344
345 * linux-low.cc (linux_target_ops): Update.
346 (linux_supports_fork_events): Turn into ...
347 (linux_process_target::supports_fork_events): ... this.
348 (linux_supports_vfork_events): Turn into ...
349 (linux_process_target::supports_vfork_events): ... this.
350 (linux_supports_exec_events): Turn into ...
351 (linux_process_target::supports_exec_events): ... this.
352 * linux-low.h (class linux_process_target): Update.
353 * lynx-low.cc (lynx_target_ops): Update.
354 * nto-low.cc (nto_target_ops): Update.
355 * win32-low.cc (win32_target_ops): Update.
356
357 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
358
359 Turn process_stratum_target's supports_multi_process op into a
360 method of process_target.
361
362 * target.h (struct process_stratum_target): Remove the target op.
363 (class process_target): Add the target op.
364 * target.cc (process_target::supports_multi_process): Define.
365 (target_supports_multi_process): Update.
366
367 Update the derived classes and callers below.
368
369 * linux-low.cc (linux_target_ops): Update.
370 (linux_supports_multi_process): Turn into ...
371 (linux_process_target::supports_multi_process): ... this.
372 * linux-low.h (class linux_process_target): Update.
373 * lynx-low.cc (lynx_target_ops): Update.
374 * nto-low.cc (nto_target_ops): Update.
375 * win32-low.cc (win32_target_ops): Update.
376
377 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
378
379 Turn process_stratum_target's supports_non_stop, async, and
380 start_non_stop ops into methods of process_target.
381
382 * target.h (struct process_stratum_target): Remove the target ops.
383 (class process_target): Add the target ops.
384 (target_supports_non_stop): Update the macro.
385 (target_async): Update the macro.
386 (start_non_stop): Remove declaration.
387 * target.cc (process_target::supports_non_stop): Define.
388 (process_target::async): Define.
389 (process_target::start_non_stop): Define.
390 (start_non_stop): Remove.
391
392 Update the derived classes and callers below.
393
394 * server.cc (handle_qxfer_siginfo): Update.
395 (handle_query): Update.
396 * linux-low.cc (linux_target_ops): Update.
397 (linux_supports_non_stop): Turn into ...
398 (linux_process_target::supports_non_stop): ... this.
399 (linux_async): Turn into ...
400 (linux_process_target::async): ... this.
401 (linux_start_non_stop): Turn into ...
402 (linux_process_target::start_non_stop): ... this.
403 * linux-low.h (class linux_process_target): Update.
404 * lynx-low.cc (lynx_target_ops): Update.
405 * nto-low.cc (nto_target_ops): Update.
406 (nto_supports_non_stop): Remove; rely on the default behavior
407 instead.
408 * win32-low.cc (win32_target_ops): Update.
409
410 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
411
412 Turn process_stratum_target's qxfer_siginfo op into a method of
413 process_target.
414
415 * target.h (struct process_stratum_target): Remove the target op.
416 (class process_target): Add the target op. Also add
417 'supports_qxfer_siginfo'.
418 * target.cc (process_target::qxfer_siginfo): Define.
419 (process_target::supports_qxfer_siginfo): Define.
420
421 Update the derived classes and callers below.
422
423 * server.cc (handle_qxfer_siginfo): Update.
424 (handle_query): Update.
425 * linux-low.cc (linux_target_ops): Update.
426 (linux_process_target::supports_qxfer_siginfo): Define.
427 (linux_xfer_siginfo): Turn into ...
428 (linux_process_target::qxfer_siginfo): ... this.
429 * linux-low.h (class linux_process_target): Update.
430 * lynx-low.cc (lynx_target_ops): Update.
431 * nto-low.cc (nto_target_ops): Update.
432 * win32-low.cc (win32_target_ops): Update.
433
434 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
435
436 Turn process_stratum_target's qxfer_osdata op into a method of
437 process_target.
438
439 * target.h (struct process_stratum_target): Remove the target op.
440 (class process_target): Add the target op. Also add
441 'supports_qxfer_osdata'.
442 * target.cc (process_target::qxfer_osdata): Define.
443 (process_target::supports_qxfer_osdata): Define.
444
445 Update the derived classes and callers below.
446
447 * server.cc (handle_qxfer_osdata): Update.
448 (handle_query): Update.
449 * linux-low.cc (linux_target_ops): Update.
450 (linux_process_target::supports_qxfer_osdata): Define.
451 (linux_qxfer_osdata): Turn into ...
452 (linux_process_target::qxfer_osdata): ... this.
453 * linux-low.h (class linux_process_target): Update.
454 * lynx-low.cc (lynx_target_ops): Update.
455 * nto-low.cc (nto_target_ops): Update.
456 * win32-low.cc (win32_target_ops): Update.
457
458 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
459
460 Turn process_stratum_target's hostio_last_error op into a
461 method of process_target.
462
463 * target.h (struct process_stratum_target): Remove the target op.
464 (class process_target): Add the target op.
465 * target.cc: Add "hostio.h" to includes.
466 (process_target::hostio_last_error): Define.
467
468 Update the derived classes and callers below.
469
470 * hostio.cc (hostio_error): Update.
471 * linux-low.cc: Remove "hostio.h" from includes.
472 (linux_target_ops): Update.
473 * lynx-low.cc (lynx_target_ops): Update.
474 * nto-low.cc (nto_target_ops): Update.
475 * win32-low.h (class win32_process_target): Update.
476 * win32-low.cc (win32_target_ops): Update.
477 (wince_hostio_last_error): Turn into ...
478 (win32_process_target::hostio_last_error): ... this.
479
480 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
481
482 Turn process_stratum_target's get_tls_address op into a method of
483 process_target.
484
485 * target.h (struct process_stratum_target): Remove the target op.
486 (class process_target): Add the target op. Also add
487 'supports_get_tls_address'.
488 * target.cc (process_target::get_tls_address): Define.
489 (process_target::supports_get_tls_address): Define.
490
491 Update the derived classes and callers below.
492
493 * server.cc (handle_query): Update.
494 * linux-low.cc (linux_target_ops): Update.
495 (linux_process_target::supports_get_tls_address): Define.
496 (linux_process_target::get_tls_address): Define.
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
502 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
503
504 Turn process_stratum_target's read_offsets op into a method of
505 process_target.
506
507 * target.h (struct process_stratum_target): Remove the target op.
508 (class process_target): Add the target op. Also add
509 'supports_read_offsets'.
510 * target.cc (process_target::read_offsets): Define.
511 (process_target::supports_read_offsets): Define.
512
513 Update the derived classes and callers below.
514
515 * server.cc (handle_query): Update.
516 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
517 (linux_target_ops): Update.
518 (linux_process_target::supports_read_offsets): Define.
519 (linux_read_offsets): Turn into ...
520 (linux_process_target::read_offsets): ... this.
521 * linux-low.h (class linux_process_target): Update.
522 * lynx-low.cc (lynx_target_ops): Update.
523 * nto-low.cc (nto_target_ops): Update.
524 * win32-low.cc (win32_target_ops): Update.
525
526 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
527
528 Turn process_stratum_target's stopped_by_watchpoint and
529 stopped_data_address ops into methods of process_target.
530
531 * target.h (struct process_stratum_target): Remove the target ops.
532 (class process_target): Add the target ops.
533 * target.cc (process_target::stopped_by_watchpoint): Define.
534 (process_target::stopped_data_address): Define.
535
536 Update the derived classes and callers below.
537
538 * remote-utils.cc (prepare_resume_reply): Update.
539 * linux-low.cc (linux_target_ops): Update.
540 (linux_stopped_by_watchpoint): Turn into ...
541 (linux_process_target::stopped_by_watchpoint): ... this.
542 (linux_stopped_data_address): Turn into ...
543 (linux_process_target::stopped_data_address): ... this.
544 * linux-low.h (class linux_process_target): Update.
545 * lynx-low.cc (lynx_target_ops): Update.
546 * nto-low.cc (nto_target_ops): Update.
547 (nto_stopped_by_watchpoint): Turn into ...
548 (nto_process_target::stopped_by_watchpoint): ... this.
549 (nto_stopped_data_address): Turn into ...
550 (nto_process_target::stopped_data_address): ... this.
551 * nto-low.h (class nto_process_target): Update.
552 * win32-low.cc (win32_target_ops): Update.
553 (win32_stopped_by_watchpoint): Turn into ...
554 (win32_process_target::stopped_by_watchpoint): ... this.
555 (win32_stopped_data_address): Turn into ...
556 (win32_process_target::stopped_data_address): ... this.
557 * win32-low.h (class win32_process_target): Update.
558
559 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
560
561 Turn process_stratum_target's supports_hardware_single_step op into
562 a method of process_target.
563
564 * target.h (struct process_stratum_target): Remove the target op.
565 (class process_target): Add the target op.
566 (target_supports_hardware_single_step): Update the macro.
567 (target_can_do_hardware_single_step): Remove declaration.
568 * target.cc (process_target::supports_hardware_single_step): Define.
569 (target_can_do_hardware_single_step): Remove.
570
571 Update the derived classes and callers below.
572
573 * linux-low.h (class linux_process_target): Update.
574 * linux-low.cc (linux_target_ops): Update.
575 (linux_supports_hardware_single_step): Turn into ...
576 (linux_process_target::supports_hardware_single_step): ... this.
577 * lynx-low.h (class lynx_process_target): Update.
578 * lynx-low.cc (lynx_target_ops): Update.
579 (lynx_process_target::supports_hardware_single_step): Define.
580 * nto-low.h (class nto_process_target): Update.
581 * nto-low.cc (nto_target_ops): Update.
582 (nto_process_target::supports_hardware_single_step): Define.
583 * win32-low.h (class win32_process_target): Update.
584 * win32-low.cc (win32_target_ops): Update.
585 (win32_process_target::supports_hardware_single_step): Define.
586
587 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
588
589 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
590 ops into methods of process_target.
591
592 * target.h (struct process_stratum_target): Remove the target ops.
593 (class process_target): Add the target ops.
594 (target_stopped_by_hw_breakpoint): Update the macro.
595 (target_supports_stopped_by_hw_breakpoint): Update the macro.
596 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
597 (process_target::supports_stopped_by_hw_breakpoint): Define.
598
599 Update the derived classes and callers below.
600
601 * linux-low.cc (linux_target_ops): Update.
602 (linux_stopped_by_hw_breakpoint): Turn into ...
603 (linux_process_target::stopped_by_hw_breakpoint): ... this.
604 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
605 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
606 * linux-low.h (class linux_process_target): Update.
607 * lynx-low.cc (lynx_target_ops): Update.
608 * nto-low.cc (nto_target_ops): Update.
609 * win32-low.cc (win32_target_ops): Update.
610
611 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
612
613 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
614 ops into methods of process_target.
615
616 * target.h (struct process_stratum_target): Remove the target ops.
617 (class process_target): Add the target ops.
618 (target_stopped_by_sw_breakpoint): Update the macro.
619 (target_supports_stopped_by_sw_breakpoint): Update the macro.
620 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
621 (process_target::supports_stopped_by_sw_breakpoint): Define.
622
623 Update the derived classes and callers below.
624
625 * linux-low.cc (linux_target_ops): Update.
626 (linux_stopped_by_sw_breakpoint): Turn into ...
627 (linux_process_target::stopped_by_sw_breakpoint): ... this.
628 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
629 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
630 * linux-low.h (class linux_process_target): Update.
631 * lynx-low.cc (lynx_target_ops): Update.
632 * nto-low.cc (nto_target_ops): Update.
633 * win32-low.cc (win32_target_ops): Update.
634
635 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
636
637 Turn process_stratum_target's insert_point and remove_point ops
638 into methods of process_target.
639
640 * target.h (struct process_stratum_target): Remove the target ops.
641 (class process_target): Add the target ops.
642 * target.cc (process_target::insert_point): Define.
643 (process_target::remove_point): Define.
644
645 Update the derived classes and callers below.
646
647 * mem-break.cc (set_raw_breakpoint_at): Update.
648 (delete_raw_breakpoint): Update.
649 (uninsert_raw_breakpoint): Update.
650 (reinsert_raw_breakpoint): Update.
651 * linux-low.cc (linux_target_ops): Update.
652 (linux_insert_point): Turn into ...
653 (linux_process_target::insert_point): ... this.
654 (linux_remove_point): Turn into ...
655 (linux_process_target::remove_point): ... this.
656 * linux-low.h (class linux_process_target): Update.
657 * lynx-low.cc (lynx_target_ops): Update.
658 * nto-low.cc (nto_target_ops): Update.
659 (nto_insert_point): Turn into ...
660 (nto_process_target::insert_point): ... this.
661 (nto_remove_point): Turn into ...
662 (nto_process_target::remove_point): ... this.
663 * nto-low.h (class nto_process_target): Update.
664 * win32-low.cc (win32_target_ops): Update.
665 (win32_insert_point): Turn into ...
666 (win32_process_target::insert_point): ... this.
667 (win32_remove_point): Turn into ...
668 (win32_process_target::remove_point): ... this.
669 * win32-low.h (class win32_process_target): Update.
670
671 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
672
673 Turn process_stratum_target's supports_z_point_type op into a
674 method of process_target.
675
676 * target.h (struct process_stratum_target): Remove the target op.
677 (class process_target): Add the target op.
678 * target.cc (process_target::supports_z_point_type): Define.
679
680 Update the derived classes and callers below.
681
682 * mem-break.cc (z_type_supported): Update.
683 * linux-low.cc (linux_target_ops): Update.
684 (linux_supports_z_point_type): Turn into ...
685 (linux_process_target::supports_z_point_type): ... this.
686 * linux-low.h (class linux_process_target): Update.
687 * lynx-low.cc (lynx_target_ops): Update.
688 * nto-low.cc (nto_target_ops): Update.
689 (nto_supports_z_point_type): Turn into ...
690 (nto_process_target::supports_z_point_type): ... this.
691 * nto-low.h (class nto_process_target): Update.
692 * win32-low.cc (win32_target_ops): Update.
693 (win32_supports_z_point_type): Turn into ...
694 (win32_process_target::supports_z_point_type): ... this.
695 * win32-low.h (class win32_process_target): Update.
696
697 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
698
699 Turn process_stratum_target's read_auxv op into a method of
700 process_target.
701
702 * target.h (class process_stratum_target): Remove the target op.
703 (struct process_target): Add the target op. Also add
704 'supports_read_auxv'.
705 * target.cc (process_target::read_auxv): Define.
706 (process_target::supports_read_auxv): Define.
707
708 Update the derived classes and callers below.
709
710 * server.cc (handle_qxfer_auxv): Update.
711 (handle_query): Update.
712 * linux-low.cc (linux_target_ops): Update.
713 (linux_process_target::supports_read_auxv): Define.
714 (linux_read_auxv): Turn into ...
715 (linux_process_target::read_auxv): ... this.
716 * linux-low.h (class linux_process_target): Update.
717 * lynx-low.cc (lynx_target_ops): Update.
718 * nto-low.cc (nto_target_ops): Update.
719 (nto_process_target::supports_read_auxv): Define.
720 (nto_read_auxv): Turn into ...
721 (nto_process_target::read_auxv): ... this.
722 * nto-low.h (class nto_process_target): Update.
723 * win32-low.cc (win32_target_ops): Update.
724
725 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
726
727 Turn process_stratum_target's request_interrupt op into a method of
728 process_target.
729
730 * target.h (struct process_stratum_target): Remove the target op.
731 (class process_target): Add the target op.
732
733 Update the derived classes and callers below.
734
735 * remote-utils.cc (putpkt_binary_1): Update.
736 (input_interrupt): Update.
737 (getpkt): Update.
738 * server.cc (handle_v_requests): Update.
739 * linux-low.cc (linux_target_ops): Update.
740 (linux_request_interrupt): Turn into ...
741 (linux_process_target::request_interrupt): ... this.
742 * linux-low.h (class linux_process_target): Update.
743 * lynx-low.cc (lynx_target_ops): Update.
744 (lynx_request_interrupt): Turn into ...
745 (lynx_process_target::request_interrupt): ... this.
746 * lynx-low.h (class lynx_process_target): Update.
747 * nto-low.cc (nto_target_ops): Update.
748 (nto_request_interrupt): Turn into ...
749 (nto_process_target::request_interrupt): ... this.
750 * nto-low.h (class nto_process_target): Update.
751 * win32-low.cc (win32_target_ops): Update.
752 (win32_request_interrupt): Turn into ...
753 (win32_process_target::request_interrupt): ... this.
754 * win32-low.h (class win32_process_target): Update.
755
756 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
757
758 Turn process_stratum_target's look_up_symbols op into a method of
759 process_target.
760
761 * target.h (struct process_stratum_target): Remove the target op.
762 (class process_target): Add the target op.
763 * target.cc (process_target::look_up_symbols): Define.
764
765 Update the derived classes and callers below.
766
767 * server.cc (handle_query): Update.
768 * linux-low.cc (linux_target_ops): Update.
769 (linux_look_up_symbols): Turn into ...
770 (linux_process_target::look_up_symbols): ... this.
771 * linux-low.h (class linux_process_target): Update.
772 * lynx-low.cc (lynx_target_ops): Update.
773 * nto-low.cc (nto_target_ops): Update.
774 * win32-low.cc (win32_target_ops): Update.
775
776 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
777
778 Turn process_stratum_target's read_memory and write_memory
779 ops into methods of process_target.
780
781 * target.h (struct process_stratum_target): Remove the target ops.
782 (class process_target): Add the target ops.
783
784 Update the derived classes and callers below.
785
786 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
787 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
788 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
789 (arm_get_syscall_trapinfo): Update.
790 * linux-cris-low.cc (cris_breakpoint_at): Update.
791 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
792 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
793 * linux-mips-low.cc (mips_breakpoint_at): Update.
794 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
795 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
796 * linux-sh-low.cc (sh_breakpoint_at): Update.
797 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
798 (sparc_store_gregset_from_stack): Update.
799 (sparc_breakpoint_at): Update.
800 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
801 * linux-tile-low.cc (tile_breakpoint_at): Update.
802 * linux-x86-low.cc (x86_breakpoint_at): Update.
803 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
804 * mem-brea.cc (insert_memory_breakpoint): Update.
805 (validate_inserted_breakpoint): Update.
806 * target.cc (read_inferior_memory): Update.
807 (target_write_memory): Update.
808 * linux-low.cc (linux_target_ops): Update.
809 (linux_read_memory): Make a wrapper around the read_memory target
810 op call.
811 (linux_process_target::read_memory): Rename from linux_read_memory.
812 (linux_write_memory): Turn into ...
813 (linux_process_target::write_memory): ... this.
814 * linux-low.h (class linux_process_target): Update.
815 * lynx-low.cc (lynx_target_ops): Update.
816 (lynx_read_memory): Turn into ...
817 (lynx_process_target::read_memory): ... this.
818 (lynx_write_memory): Turn into ...
819 (lynx_process_target::write_memory): ... this.
820 * lynx-low.h (class lynx_process_target): Update.
821 * nto-low.cc (nto_target_ops): Update.
822 (nto_read_memory): Turn into ...
823 (nto_process_target::read_memory): ... this.
824 (nto_write_memory): Turn into ...
825 (nto_process_target::write_memory): ... this.
826 * nto-low.h (class nto_process_target): Update.
827 * win32-low.cc (win32_target_ops): Update.
828 (win32_read_inferior_memory): Turn into ...
829 (win32_process_target::read_memory): ... this.
830 (win32_write_inferior_memory): Turn into ...
831 (win32_process_target::write_memory): ... this.
832 * win32-low.h (class win32_process_target): Update.
833
834 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
835
836 Turn process_stratum_target's prepare_to_access_memory and
837 done_accessing_memory ops into methods of process_target.
838
839 * target.h (struct process_stratum_target): Remove the target ops.
840 (class process_target): Add the target ops.
841 * target.cc (process_target::prepare_to_access_memory): Define.
842 (process_target::done_accessing_memory): Define.
843 (prepare_to_access_memory): Update.
844 (done_accessing_memory): Update.
845
846 Update the derived classes and callers below.
847
848 * linux-low.cc (linux_target_ops): Update.
849 (linux_prepare_to_access_memory): Turn into ...
850 (linux_process_target::prepare_to_access_memory): ... this.
851 (linux_done_accessing_memory): Turn into ...
852 (linux_process_target::done_accessing_memory): ... this.
853 * linux-low.h (class linux_process_target): Update.
854 * lynx-low.cc (lynx_target_ops): Update.
855 * nto-low.cc (nto_target_ops): Update.
856 * win32-low.cc (win32_target_ops): Update.
857
858 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
859
860 Turn process_stratum_target's fetch_registers and store_registers
861 ops into methods of process_target.
862
863 * target.h (struct process_stratum_target): Remove the target ops.
864 (class process_target): Add the target ops.
865 (fetch_inferior_registers): Update the macro.
866 (store_inferior_registers): Update the macro.
867
868 Update the derived classes and callers below.
869
870 * linux-low.cc (linux_target_ops): Update.
871 (linux_fetch_registers): Turn into ...
872 (linux_process_target::fetch_registers): ... this.
873 (linux_store_registers): Turn into ...
874 (linux_process_target::store_registers): ... this.
875 * linux-low.h (class linux_process_target): Update.
876 * lynx-low.cc (lynx_target_ops): Update.
877 (lynx_fetch_registers): Turn into ...
878 (lynx_process_target::fetch_registers): ... this.
879 (lynx_store_registers): Turn into ...
880 (lynx_process_target::store_registers): ... this.
881 * lynx-low.h (class lynx_process_target): Update.
882 * nto-low.cc (nto_target_ops): Update.
883 (nto_fetch_registers): Turn into ...
884 (nto_process_target::fetch_registers): ... this.
885 (nto_store_registers): Turn into ...
886 (nto_process_target::store_registers): ... this.
887 * nto-low.h (class nto_process_target): Update.
888 * win32-low.cc (win32_target_ops): Update.
889 (win32_fetch_inferior_registers): Turn into ...
890 (win32_process_target::fetch_registers): ... this.
891 (win32_store_inferior_registers): Turn into ...
892 (win32_process_target::store_registers): ... this.
893 * win32-low.h (class win32_process_target): Update.
894
895 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
896
897 Turn process_stratum_target's wait op into a method of
898 process_target.
899
900 * target.h (struct process_stratum_target): Remove the target op.
901 (class process_target): Add the target op.
902
903 Update the derived classes and callers below.
904
905 * target.cc (target_wait): Update.
906 * linux-low.cc (linux_target_ops): Update.
907 (linux_wait): Turn into ...
908 (linux_process_target::wait): ... this.
909 * linux-low.h (class linux_process_target): Update.
910 * lynx-low.cc (lynx_target_ops): Update.
911 (lynx_wait): Turn into ...
912 (lynx_process_target::wait): ... this.
913 * lynx-low.h (class lynx_process_target): Update.
914 * nto-low.cc (nto_target_ops): Update.
915 (nto_wait): Turn into ...
916 (nto_process_target::wait): ... this.
917 * nto-low.h (class nto_process_target): Update.
918 * win32-low.cc (win32_target_ops): Update.
919 (win32_wait): Turn into ...
920 (win32_process_target::wait): ... this.
921 (do_initial_child_stuff): Update.
922 * win32-low.h (class win32_process_target): Update.
923
924 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
925
926 Turn process_stratum_target's resume op into a method of
927 process_target.
928
929 * target.h (struct process_stratum_target): Remove the target op.
930 (class process_target): Add the target op.
931
932 Update the derived classes and callers below.
933
934 * server.cc (resume): Update.
935 * target.cc (target_stop_and_wait): Update.
936 (target_continue_no_signal): Update.
937 (target_continue): Update.
938 * linux-low.cc (linux_target_ops): Update.
939 (linux_resume): Turn into ...
940 (linux_process_target::resume): ... this.
941 * linux-low.h (class linux_process_target): Update.
942 * lynx-low.cc (lynx_target_ops): Update.
943 (lynx_resume): Turn into ...
944 (lynx_process_target::resume): ... this.
945 * lynx-low.h (class lynx_process_target): Update.
946 * nto-low.cc (nto_target_ops): Update.
947 (nto_resume): Turn into ...
948 (nto_process_target::resume): ... this.
949 * nto-low.h (class nto_process_target): Update.
950 * win32-low.cc (win32_target_ops): Update.
951 (win32_resume): Turn into ...
952 (win32_process_target::resume): ... this.
953 (win32_process_target::detach): Update.
954 (do_initial_child_stuff): Update.
955 * win32-low.h (class win32_process_target): Update.
956
957 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
958
959 Turn process_stratum_target's thread_alive op into a method of
960 process_target.
961
962 * target.h (struct process_stratum_target): Remove the target op.
963 (class process_target): Add the target op.
964 (mythread_alive): Update the macro.
965
966 Update the derived classes and callers below.
967
968 * linux-low.cc (linux_target_ops): Update.
969 (linux_thread_alive): Turn into ...
970 (linux_process_target::thread_alive): ... this.
971 (wait_for_sigstop): Update.
972 * linux-low.h (class linux_process_target): Update.
973 * lynx-low.cc (lynx_target_ops): Update.
974 (lynx_thread_alive): Turn into ...
975 (lynx_process_target::thread_alive): ... this.
976 * lynx-low.h (class lynx_process_target): Update.
977 * nto-low.cc (nto_target_ops): Update.
978 (nto_thread_alive): Turn into ...
979 (nto_process_target::thread_alive): ... this.
980 * nto-low.h (class nto_process_target): Update.
981 * win32-low.cc (win32_target_ops): Update.
982 (win32_thread_alive): Turn into ...
983 (win32_process_target::thread_alive): ... this.
984 * win32-low.h (class win32_process_target): Update.
985
986 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
987
988 Turn process_stratum_target's join op into a method of
989 process_target.
990
991 * target.h (struct process_stratum_target): Remove the target op.
992 (class process_target): Add the target op.
993 (join_inferior): Update the macro.
994
995 Update the derived classes and callers below.
996
997 * linux-low.cc (linux_target_ops): Update.
998 (linux_join): Turn into ...
999 (linux_process_target::join): ... this.
1000 * linux-low.h (class linux_process_target): Update.
1001 * lynx-low.cc (lynx_target_ops): Update.
1002 (lynx_join): Turn into ...
1003 (lynx_process_target::join): ... this.
1004 * lynx-low.h (class lynx_process_target): Update.
1005 * nto-low.cc (nto_target_ops): Update.
1006 (nto_process_target::join): Define.
1007 * nto-low.h (class nto_process_target): Update.
1008 * win32-low.cc (win32_target_ops): Update.
1009 (win32_join): Turn into ...
1010 (win32_process_target::join): ... this.
1011 * win32-low.h (class win32_process_target): Update.
1012
1013 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1014
1015 Turn process_stratum_target's mourn op into a method of
1016 process_target.
1017
1018 * target.h (struct process_stratum_target): Remove the target op.
1019 (class process_target): Add the target op.
1020
1021 Update the derived classes and callers below.
1022
1023 * target.cc (target_mourn_inferior): Update.
1024 * linux-low.cc (linux_target_ops): Update.
1025 (linux_mourn): Turn into ...
1026 (linux_process_target::mourn): ... this.
1027 (handle_extended_wait): Update.
1028 (linux_process_target::kill): Update.
1029 (linux_process_target::detach): Update.
1030 * linux-low.h (class linux_process_target): Update.
1031 * lynx-low.cc (lynx_target_ops): Update.
1032 (lynx_mourn): Turn into ...
1033 (lynx_process_target::mourn): ... this.
1034 * lynx-low.h (class lynx_process_target): Update.
1035 * nto-low.cc (nto_target_ops): Update.
1036 (nto_mourn): Turn into ...
1037 (nto_process_target::mourn): ... this.
1038 * nto-low.h (class nto_process_target): Update.
1039 * win32-low.cc (win32_target_ops): Update.
1040 (win32_mourn): Turn into ...
1041 (win32_process_target::mourn): ... this.
1042 * win32-low.h (class win32_process_target): Update.
1043
1044 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1045
1046 Turn process_stratum_target's detach op into a method of
1047 process_target.
1048
1049 * target.h (struct process_stratum_target): Remove the target op.
1050 (class process_target): Add the target op.
1051 (detach_inferior): Update the macro.
1052
1053 Update the derived classes and callers below.
1054
1055 * linux-low.cc (linux_target_ops): Update.
1056 (linux_detach): Turn into ...
1057 (linux_process_target::detach): ... this.
1058 * linux-low.h (class linux_process_target): Update.
1059 * lynx-low.cc (lynx_target_ops): Update.
1060 (lynx_detach): Turn into ...
1061 (lynx_process_target::detach): ... this.
1062 * lynx-low.h (class lynx_process_target): Update.
1063 * nto-low.cc (nto_target_ops): Update.
1064 (nto_detach): Turn into ...
1065 (nto_process_target::detach): ... this.
1066 * nto-low.h (class nto_process_target): Update.
1067 * win32-low.cc (win32_target_ops): Update.
1068 (win32_detach): Turn into ...
1069 (win32_process_target::detach): ... this.
1070 * win32-low.h (class win32_process_target): Update.
1071
1072 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1073
1074 Turn process_stratum_target's kill op into a method of
1075 process_target.
1076
1077 * target.h (struct process_stratum_target): Remove the target op.
1078 (class process_target): Add the target op.
1079
1080 Update the derived classes and callers below.
1081
1082 * target.cc (kill_inferior): Update.
1083 * linux-low.cc (linux_target_ops): Update.
1084 (linux_kill): Turn into ...
1085 (linux_process_target::kill): ... this.
1086 * linux-low.h (class linux_process_target): Update.
1087 * lynx-low.cc (lynx_target_ops): Update.
1088 (lynx_kill): Turn into ...
1089 (lynx_process_target::kill): ... this.
1090 * lynx-low.h (class lynx_process_target): Update.
1091 * nto-low.cc (nto_target_ops): Update.
1092 (nto_kill): Turn into ...
1093 (nto_process_target::kill): ... this.
1094 * nto-low.h (class nto_process_target): Update.
1095 * win32-low.cc (win32_target_ops): Update.
1096 (win32_kill): Turn into ...
1097 (win32_process_target::kill): ... this.
1098 * win32-low.h (class win32_process_target): Update.
1099
1100 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1101
1102 Turn process_stratum_target's attach op into a method of
1103 process_target.
1104
1105 * target.h (struct process_stratum_target): Remove the target op.
1106 (class process_target): Add the target op.
1107 (myattach): Update the macro.
1108
1109 Update the derived classes and callers below.
1110
1111 * linux-low.cc (linux_target_ops): Update.
1112 (linux_attach): Turn into ...
1113 (linux_process_target::attach): ... this.
1114 * linux-low.h (class linux_process_target): Update.
1115 * lynx-low.cc (lynx_target_ops): Update.
1116 (lynx_attach): Turn into ...
1117 (lynx_process_target::attach): ... this.
1118 * lynx-low.h (class lynx_process_target): Update.
1119 * nto-low.cc (nto_target_ops): Update.
1120 (nto_attach): Turn into ...
1121 (nto_process_target::attach): ... this.
1122 * nto-low.h (class nto_process_target): Update.
1123 * win32-low.cc (win32_target_ops): Update.
1124 (win32_attach): Turn into ...
1125 (win32_process_target::attach): ... this.
1126 * win32-low.h (class win32_process_target): Update.
1127
1128 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1129
1130 Turn process_stratum_target's post_create_inferior op into a method
1131 of process_target.
1132
1133 * target.h (struct process_stratum_target): Remove the target op.
1134 (class process_target): Add the target op.
1135 (target_post_create_inferior): Update the macro.
1136 * target.cc (process_target::post_create_inferior): Define.
1137
1138 Update the derived classes and callers below.
1139
1140 * linux-low.cc (linux_target_ops): Update.
1141 (linux_post_create_inferior): Turn into ...
1142 (linux_process_target::post_create_inferior): ... this.
1143 * linux-low.h (class linux_process_target): Update.
1144 * lynx-low.cc (lynx_target_ops): Update.
1145 * nto-low.cc (nto_target_ops): Update.
1146 * win32-low.cc (win32_target_ops): Update.
1147
1148 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1149
1150 Turn process_stratum_target's create_inferior op into a method of
1151 process_target.
1152
1153 * target.h (struct process_stratum_target): Remove the target op.
1154 (class process_target): Add the target op.
1155 (create_inferior): Rename the macro to ...
1156 (target_create_inferior): ... this.
1157
1158 Update the derived classes and callers below.
1159
1160 * server.cc (handle_v_run): Update.
1161 (captured_main): Update.
1162 (process_serial_event): Update.
1163 * linux-low.cc (linux_target_ops): Update.
1164 (linux_create_inferior): Turn into ...
1165 (linux_process_target::create_inferior): ... this.
1166 * linux-low.h (class linux_process_target): Update.
1167 * lynx-low.cc (lynx_target_ops): Update.
1168 (lynx_create_inferior): Turn into ...
1169 (lynx_process_target::create_inferior): ... this.
1170 * lynx-low.h (class lynx_process_target): Update.
1171 * nto-low.cc (nto_target_ops): Update.
1172 (nto_create_inferior): Turn into ...
1173 (nto_process_target::create_inferior): ... this.
1174 * nto-low.h (class nto_process_target): Update.
1175 * win32-low.cc (win32_target_ops): Update.
1176 (win32_create_inferior): Turn into ...
1177 (win32_process_target::create_inferior): ... this.
1178 * win32-low.h (class win32_process_target): Update.
1179
1180 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1181
1182 * target.h (class process_target): New class definition.
1183 (struct process_stratum_target) <pt>: New field with type
1184 'process_target*'.
1185 * linux-low.h (class linux_process_target): Define as a derived
1186 class of 'process_target'.
1187 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1188 as the 'pt' field.
1189 * lynx-low.h (class lynx_process_target): Define as a derived
1190 class of 'process_target'.
1191 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1192 as the 'pt' field.
1193 * nto-low.h (class nto_process_target): Define as a derived
1194 class of 'process_target'.
1195 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1196 as the 'pt' field.
1197 * win32-low.h (class win32_process_target): Define as a derived
1198 class of 'process_target'.
1199 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1200 as the 'pt' field.
1201
1202 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1203
1204 * configure: Regenerate.
1205
1206 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1207 Andrew Burgess <andrew.burgess@embecosm.com>
1208
1209 * linux-riscv-low.cc: New file.
1210 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1211 and nat/riscv-linux-tdesc.c.
1212 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1213 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1214 Define.
1215
1216 2020-02-14 Tom Tromey <tom@tromey.com>
1217
1218 * acinclude.m4: Don't include acx_configure_dir.m4.
1219 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1220 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1221 (all, install-only, uninstall, clean-info, clean)
1222 (maintainer-clean): Don't recurse.
1223 (subdir_do, all-lib): Remove.
1224 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1225 (GNULIB_H): Remove.
1226 (generated_files): Update.
1227 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1228 * configure: Rebuild.
1229 * configure.ac: Don't configure gnulib or libiberty.
1230 (GNULIB): Update.
1231
1232 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1233
1234 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1235 preparing the command line for CreateProcess.
1236 (win32_create_inferior): Reflect the program name in debugging
1237 output that shows the process and its command line.
1238
1239 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1240
1241 * Makefile.in: Rename source files from .c to .cc.
1242 * %.c: Rename to %.cc.
1243 * configure.ac: Rename server.c to server.cc.
1244 * configure: Re-generate.
1245
1246 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1247
1248 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1249
1250 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1251
1252 * win32-low.c (win32_create_inferior): Set signal_pid.
1253
1254 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1255 Pedro Alves <palves@redhat.com>
1256
1257 Skip building gdbserver in a cross-configuration.
1258 * configure.srv: Set $gdbserver_host depending on whether $target
1259 is $host. Use $gdbserver_host instead of $host.
1260
1261 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1262
1263 * configure: Re-generate.
1264
1265 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1266
1267 * configure: Re-generate.
1268
1269 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1270
1271 * acinclude.m4: Update warning.m4 path.
1272
1273 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1274
1275 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1276 (handle_exception): Set siginfo_er.
1277 (win32_xfer_siginfo): New function.
1278
1279 2020-02-07 Tom Tromey <tom@tromey.com>
1280 Pedro Alves <palves@redhat.com>
1281
1282 * README: Update build documentation.
1283 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1284 host, not target.
1285 * configure.ac: Update paths.
1286 * configure: Rebuild.
1287 * acinclude.m4: Update paths.
1288 * Makefile.in: Update include paths.
1289 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1290 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1291 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1292 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1293 (%-generated.c): Update paths.
1294 * Move entire directory from ../gdb/gdbserver.
1295
1296 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1297
1298 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1299
1300 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1301
1302 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1303 assignment instead of srv_linux_obj.
1304
1305 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1306
1307 * server.c (handle_qxfer_libraries): Write segment-address with
1308 paddress.
1309
1310 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1311
1312 * Makefile.in (install-strip): New target.
1313 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1314 * aclocal.m4: Regenerate.
1315 * configure: Regenerate.
1316 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1317
1318 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1319
1320 * Makefile.in (SFILES): Adjust paths to point to real files.
1321 (OBS): Move waitstatus.o to target/waitstatus.o.
1322 (TAGS): Transform paths appropriately.
1323 (%.o): Rename to...
1324 (nat/%.o): ... this pattern rule.
1325 (%.o): Rename to...
1326 (target/%.o): ... this pattern rule.
1327 * configure.srv: Adjust paths throughout to include nat/ prefix
1328 with the revant files.
1329 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1330 * configure: Regenerate.
1331
1332 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1333
1334 * Makefile.in (TAGS): Remove config files from the recipe.
1335
1336 2020-01-14 Tom Tromey <tom@tromey.com>
1337
1338 * configure: Rebuild.
1339 * configure.ac: Remove any checks that were added to common.m4.
1340 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1341 lib-link.m4.
1342
1343 2020-01-14 Tom Tromey <tom@tromey.com>
1344
1345 * server.h: Include config.h.
1346 * gdbreplay.c: Include config.h.
1347 * configure: Rebuild.
1348 * configure.ac: Don't source common.host.
1349 * acinclude.m4: Update path.
1350 * Makefile.in (INCSUPPORT): New variable.
1351 (INCLUDE_CFLAGS): Add INCSUPPORT.
1352 (SFILES): Update paths.
1353 (version-generated.c): Update path to create-version.sh.
1354 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1355
1356 2020-01-14 Tom Tromey <tom@tromey.com>
1357
1358 * configure.ac (LIBS): Use WIN32APILIBS.
1359 (USE_WIN32API): Don't define.
1360 * configure: Rebuild.
1361
1362 2020-01-14 Tom Tromey <tom@tromey.com>
1363
1364 * configure: Rebuild.
1365
1366 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1367
1368 * Makefile.in (%-generated.c): Remove rule for files from
1369 regformats/i386.
1370
1371 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1372
1373 * configure: Re-generate.
1374
1375 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1376
1377 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1378 Define to static.
1379 * tracepoint.c (stop_tracing, flush_trace_buffer,
1380 about_to_request_buffer_space, get_trace_state_variable_value,
1381 set_trace_state_variable_value, gdb_collect): Add declaration.
1382
1383 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1384
1385 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1386 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1387 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1388 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1389 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1390 static.
1391
1392 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1393
1394 * inferiors.c: Include gdbsupport/common-inferior.h.
1395
1396 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1397
1398 * hostio-errno.c: Include hostio.h.
1399
1400 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1401
1402 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1403 prerequisite.
1404
1405 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1406
1407 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1408 * linux-arm-tdesc.h: Include arch/arm.h.
1409
1410 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1413
1414 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1415
1416 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1417 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1418
1419 2020-01-10 Pedro Alves <palves@redhat.com>
1420
1421 * fork-child.c (post_fork_inferior): Pass target down to
1422 startup_inferior.
1423 * inferiors.c (switch_to_thread): Add process_stratum_target
1424 parameter.
1425 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1426 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1427 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1428 * remote-utils.c (prepare_resume_reply): Pass the target to
1429 switch_to_thread.
1430 * target.c (the_target): Now a process_stratum_target.
1431 (done_accessing_memory): Pass the target to switch_to_thread.
1432 (set_target_ops): Ajust to use process_stratum_target.
1433 * target.h (struct target_ops): Rename to ...
1434 (struct process_stratum_target): ... this.
1435 (the_target, set_target_ops): Adjust.
1436 (prepare_to_access_memory): Adjust comment.
1437 * win32-low.c (child_xfer_memory): Adjust to use
1438 process_stratum_target.
1439 (win32_target_ops): Now a process_stratum_target.
1440
1441 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1442 Pedro Alves <palves@redhat.com>
1443
1444 * win32-low.c (get_child_debug_event): Extract the fatal exception
1445 from the exit status and convert to the equivalent Posix signal
1446 number.
1447 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1448 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1449
1450 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1451
1452 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1453
1454 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1455
1456 * server.c (gdbserver_version): Change copyright year to 2020.
1457 * gdbreplay.c (gdbreplay_version): Likewise.
1458
1459 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1460
1461 * configure: Regenerate.
1462 * configure.ac: Quote variable arguments of test.
1463
1464 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1465
1466 * Makefile.in: Fix build with GNU Make 3.81
1467
1468 2019-12-16 Tom Tromey <tromey@adacore.com>
1469
1470 * server.c (get_exec_file): Constify result.
1471
1472 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1473
1474 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1475 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1476 * config.in: Regenerate.
1477 * configure: Regenerate.
1478 * configure.ac: Don't check for strerror.
1479 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1480 Call safe_strerror instead of strerror.
1481 * server.h (strerror): Remove this now-unnecessary declaration.
1482 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1483 strerror.
1484 (gdb_agent_helper_thread): Likewise.
1485 * utils.c (perror_with_name): Likewise.
1486
1487 2019-11-26 Tom Tromey <tom@tromey.com>
1488
1489 * configure, config.in: Rebuild.
1490
1491 2019-11-26 Tom Tromey <tom@tromey.com>
1492
1493 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1494 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1495 gdb_sigmask.
1496 * configure, config.in: Rebuild.
1497
1498 2019-11-26 Tom Tromey <tom@tromey.com>
1499
1500 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1501 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1502 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1503 * acinclude.m4: Include ax_pthread.m4.
1504 * config.in, configure: Rebuild.
1505
1506 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1507
1508 * debug.c (debug_set_output): Call safe_strerror instead of
1509 strerror.
1510 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1511 (linux_kill_one_lwp): Likewise.
1512 (linux_detach_one_lwp): Likewise.
1513 (linux_wait_for_event_filtered): Likewise.
1514 (store_register): Likewise.
1515 * lynx-low.c (lynx_attach): Likewise.
1516 * mem-break.c (insert_memory_breakpoint): Likewise.
1517 (remove_memory_breakpoint): Likewise.
1518 (delete_fast_tracepoint_jump): Likewise.
1519 (set_fast_tracepoint_jump): Likewise.
1520 (uninsert_fast_tracepoint_jumps_at): Likewise.
1521 (reinsert_fast_tracepoint_jumps_at): Likewise.
1522 * nto-low.c (nto_xfer_memory): Likewise.
1523 (nto_resume): Likewise.
1524
1525 2019-11-20 Luis Machado <luis.machado@linaro.org>
1526
1527 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1528 instead of register count.
1529 * tdesc.c (tdesc_contains_feature): New function.
1530 * tdesc.h (tdesc_contains_feature): New prototype.
1531
1532 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1533
1534 * Makefile.in: Add safe-strerror.c.
1535 * configure: Regenerate.
1536 * configure.ac: Don't source common.host.
1537
1538 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1539
1540 * config.in: Regenerate.
1541 * configure: Regenerate.
1542
1543 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1544
1545 * ax.c (ax_printf): Handle size_t_arg.
1546
1547 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1548
1549 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1550 * mi/mi-main.c (output_cores): Likewise.
1551 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1552 (linux_xfer_osdata_modules): Likewise.
1553 * remote.c (register_remote_support_xml): Likewise.
1554 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1555 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1556
1557 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1558
1559 * configure: Regenerate.
1560 * configure.ac: Remove check for strerror_r.
1561
1562 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1563
1564 * config.in: Regenerate.
1565 * configure: Regenerate.
1566 * configure.ac: Also check for strerror_r.
1567
1568 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1569
1570 * ax.h (debug_agent): Remove duplicate declaration.
1571
1572 2019-10-26 Tom de Vries <tdevries@suse.de>
1573
1574 * linux-aarch64-low.c: Fix typos in comments.
1575 * linux-arm-low.c: Same.
1576 * linux-low.c: Same.
1577 * linux-ppc-low.c: Same.
1578 * proc-service.c: Same.
1579 * regcache.h: Same.
1580 * server.c: Same.
1581 * tracepoint.c: Same.
1582 * win32-low.c: Same.
1583
1584 2019-10-25 Tom Tromey <tromey@adacore.com>
1585
1586 * utils.c (xstrdup): Remove.
1587
1588 2019-10-23 Tom Tromey <tom@tromey.com>
1589
1590 * configure, config.in: Rebuild.
1591
1592 2019-10-23 Tom Tromey <tom@tromey.com>
1593
1594 * configure: Rebuild.
1595 * acinclude.m4: Use m4_include, not sinclude.
1596
1597 2019-10-17 Tom Tromey <tromey@adacore.com>
1598
1599 * configure: Rebuild.
1600 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1601 in AC_CONFIG_FILES invocation.
1602 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1603 invocation.
1604
1605 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1606
1607 * server.c: Include xml-builtin.h.
1608 (get_xml_features): Don't declare xml_builtins here.
1609
1610 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1611
1612 * Makefile.in: Remove references to vec-ipa.o.
1613
1614 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1615
1616 * Makefile.in: Remove references to vec.c.
1617
1618 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1619
1620 * server.c (server_waiting): Change to bool.
1621 (extended_protocol): Likewise.
1622 (response_needed): Likewise.
1623 (exit_requested): Likewise.
1624 (run_once): Likewise.
1625 (report_no_resumed): Likewise.
1626 (non_stop): Likewise.
1627 (disable_packet_vCont): Likewise.
1628 (disable_packet_Tthread): Likewise.
1629 (disable_packet_qC): Likewise.
1630 (disable_packet_qfThreadInfo): Likewise.
1631 (handle_general_set): Update.
1632 (handle_detach): Update.
1633 (handle_monitor_command): Update.
1634 (handle_query): Update.
1635 (captured_main): Update.
1636 (process_serial_event): Update.
1637 * server.h (server_waiting): Change to bool.
1638 (disable_packet_vCont): Likewise.
1639 (disable_packet_Tthread): Likewise.
1640 (disable_packet_qC): Likewise.
1641 (disable_packet_qfThreadInfo): Likewise.
1642 (run_once): Likewise.
1643 (non_stop): Likewise.
1644 * target.c (target_stop_and_wait): Update.
1645
1646 2019-10-02 Tom Tromey <tromey@adacore.com>
1647
1648 * Makefile.in (SFILES): Add common-inferior.c.
1649 (OBS): Add common-inferior.o.
1650 * server.c (startup_with_shell): Don't define.
1651
1652 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1653
1654 * linux-low.c (linux_low_read_btrace): Update for change to
1655 std::vector.
1656
1657 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1658
1659 * debug.c (debug_threads): Remove comment in favor of the header.
1660 * debug.h (using_threads): Add declaration.
1661 (debug_threads): Add comment.
1662 * linux-aarch64-low.c: Include debug.h and remove declaration of
1663 debug_threads.
1664 * nto-low.c: Likewise.
1665 * remote-utils.c: Likewise.
1666 * thread-db.c: Likewise.
1667
1668 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1669
1670 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1671 and powerpc-cell64l-ipa.o.
1672 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1673 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1674 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1675 (spu*-*-*): Remove.
1676
1677 * spu-low.c: Remove file.
1678
1679 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1680 (parse_spufs_run): Remove.
1681 (ppc_get_pc): Remove Cell/B.E. support.
1682 (ppc_set_pc): Likewise.
1683 (ppc_breakpoint_at): Likewise.
1684 (ppc_arch_setup): Likewise.
1685 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1686 tdesc_powerpc_cell32l.
1687 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1688 or init_registers_powerpc_cell32l.
1689 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1690 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1691 or init_registers_powerpc_cell32l.
1692 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1693 (init_registers_powerpc_cell32l): Remove prototype.
1694 (init_registers_powerpc_cell64l): Likewise.
1695
1696 * target.h (struct target_ops): Remove qxfer_spu member.
1697 * server.c (handle_qxfer_spu): Remove.
1698 (qxfer_packets): Remove entry for "spu".
1699 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1700 * linux-low.c (SPUFS_MAGIC): Remove.
1701 (spu_enumerate_spu_ids): Remove.
1702 (linux_qxfer_spu): Remove.
1703 (linux_target_ops): Remove qxfer_spu member.
1704 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1705 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1706 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1707
1708 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1709
1710 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1711 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1712 * config.in: Regenerate.
1713 * configure: Regenerate.
1714
1715 2019-08-15 Tom Tromey <tromey@adacore.com>
1716
1717 * target.c (target_write_memory): Use gdb::byte_vector.
1718
1719 2019-08-15 Tom Tromey <tromey@adacore.com>
1720
1721 * tracepoint.c (write_inferior_data_pointer)
1722 (write_inferior_integer, write_inferior_int8)
1723 (write_inferior_uinteger, m_tracepoint_action_download)
1724 (r_tracepoint_action_download, x_tracepoint_action_download)
1725 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1726 (download_agent_expr, download_tracepoint_1)
1727 (download_trace_state_variables, upload_fast_traceframes): Update.
1728 * server.c (gdb_write_memory): Update.
1729 * remote-utils.c (relocate_instruction): Update.
1730 * proc-service.c (ps_pdwrite): Update.
1731 * mem-break.c (remove_memory_breakpoint)
1732 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1733 (uninsert_fast_tracepoint_jumps_at)
1734 (reinsert_fast_tracepoint_jumps_at): Update.
1735 * linux-x86-low.c (append_insns)
1736 (i386_install_fast_tracepoint_jump_pad)
1737 (amd64_write_goto_address, i386_write_goto_address): Update.
1738 * linux-s390-low.c (append_insns, s390_write_goto_address):
1739 Update.
1740 * linux-ppc-low.c (ppc_relocate_instruction)
1741 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1742 (ppc_write_goto_address): Update.
1743 * linux-aarch64-low.c (append_insns): Update.
1744 * target.h (struct target_ops): Update.
1745 (write_inferior_memory): Don't declare.
1746 * target.c (target_write_memory): Rename from
1747 write_inferior_memory. Remove old target_write_memory.
1748
1749 2019-08-15 Tom Tromey <tromey@adacore.com>
1750
1751 * target.c (write_inferior_memory): Use std::vector.
1752
1753 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1754
1755 PR build/24886
1756 * configure.ac: Drop enable-libmcheck support.
1757 * configure, config.in: Rebuild.
1758 * acinclude.m4: Don't include it.
1759
1760 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1761
1762 * configure.srv: Remove Arm xml files.
1763
1764 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1765
1766 * configure.srv: Add new files. Remove xml generated files.
1767 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1768 registers.
1769 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1770 * linux-aarch32-tdesc.c: New file.
1771 * linux-aarch32-tdesc.h: New file.
1772 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1773 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1774 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1775 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1776 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1777 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1778 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1779 (arm_read_description): Call arm_linux_read_description.
1780 (initialize_low_arch): Don't init registers.
1781 * linux-arm-tdesc.c: New file.
1782 * linux-arm-tdesc.h: New file.
1783
1784 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1785
1786 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1787 Move counter inside for.
1788 (arm_read_description): Check ptrace earlier.
1789 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1790
1791 2019-07-09 Tom Tromey <tom@tromey.com>
1792
1793 * configure: Rebuild.
1794 * configure.ac: Change common to gdbsupport.
1795 * acinclude.m4: Change common to gdbsupport.
1796 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1797 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1798 common to gdbsupport.
1799 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1800 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1801 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1802 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1803 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1804 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1805 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1806 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1807 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1808 common to gdbsupport.
1809
1810 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1811
1812 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1813 defines.
1814 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1815
1816 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1817
1818 * configure.srv: Remove legacy xml.
1819 * linux-aarch64-low.c (initialize_low_arch): Remove
1820 initialize_low_tdesc call.
1821 * linux-aarch64-tdesc-selftest.c: Remove file.
1822 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1823 * linux-x86-low.c (initialize_low_arch): Remove
1824 initialize_low_tdesc call.
1825 * linux-x86-tdesc-selftest.c: Remove file.
1826 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1827
1828 2019-06-20 Tom de Vries <tdevries@suse.de>
1829
1830 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1831 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1832
1833 2019-06-19 Tom de Vries <tdevries@suse.de>
1834
1835 * debug.h (debug_write): Change return type to ssize_t.
1836 * debug.c (debug_write): Same.
1837
1838 2019-06-14 Tom Tromey <tom@tromey.com>
1839
1840 * configure.ac: Use new path to gnulib.
1841 * configure: Rebuild.
1842 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1843 to gnulib.
1844
1845 2019-06-11 Tom Tromey <tom@tromey.com>
1846
1847 * Makefile.in (SFILES): Add alloc.c.
1848 (OBS): Add alloc.o.
1849 (IPA_OBJS): Add alloc-ipa.o.
1850 (alloc-ipa.o): New target.
1851 (%.o: ../%.c): New pattern rule.
1852
1853 2019-06-10 Tom Tromey <tromey@adacore.com>
1854
1855 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1856 end warning with a newline.
1857 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1858 newline.
1859 * thread-db.c (attach_thread): Don't end warning with a newline.
1860 (thread_db_notice_clone): Likewise.
1861 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1862 newline.
1863 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1864 end warning with a newline.
1865
1866 2019-06-04 Pedro Alves <palves@redhat.com>
1867
1868 * server.c (captured_main): Use make_unique_xstrdup.
1869
1870 2019-06-02 Tom Tromey <tom@tromey.com>
1871
1872 * gdbreplay.c (fromhex): Remove.
1873 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1874
1875 2019-05-29 Tom Tromey <tromey@adacore.com>
1876
1877 * configure: Rebuild.
1878
1879 2019-05-06 Kevin Buettner <kevinb@redhat.com>
1880
1881 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
1882 sign extension code on 32-bit builds.
1883
1884 2019-05-03 Eli Zaretskii <eliz@gnu.org>
1885
1886 * remote-utils.c:
1887 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
1888
1889 2019-04-19 Tom Tromey <tom@tromey.com>
1890
1891 * server.c (struct vstop_notif): Derive from notif_event.
1892 <base>: Remove.
1893 (queue_stop_reply): Update.
1894 (remove_all_on_match_ptid): Change type. Rewrite.
1895 (discard_queued_stop_replies): Rewrite.
1896 (in_queued_stop_replies_ptid): Change type.
1897 (in_queued_stop_replies): Rewrite.
1898 (notif_stop): Update.
1899 (queue_stop_reply_callback): Update.
1900 (captured_main): Don't call initialize_notif.
1901 (push_stop_notification): Update.
1902 * notif.c (notif_write_event, handle_notif_ack)
1903 (notif_event_enque, notif_push): Update.
1904 (notif_event_xfree, initialize_notif): Remove.
1905 * notif.h (struct notif_event): Include <list>, not
1906 "common/queue.h".
1907 (struct notif_server) <queue>: Now a std::list.
1908 (notif_event_p): Remove typedef.
1909 (initialize_notif): Don't declare.
1910 (struct notif_event): Add virtual destructor.
1911
1912 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1913
1914 * ax.c (ax_vdebug): Call debug_printf.
1915 * debug.c (debug_write): New function.
1916 * debug.h (debug_write): New declaration.
1917 * linux-low.c (sigchld_handler): Call debug_write.
1918
1919 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1920
1921 * debug.c (debug_set_output): New function.
1922 (debug_vprintf): Send output to debug_file.
1923 (debug_flush): Likewise.
1924 * debug.h (debug_set_output): New declaration.
1925 * server.c (handle_monitor_command): Add debug-file option.
1926 (captured_main): Likewise.
1927
1928 2019-04-17 Alan Hayward <alan.hayward@arm.com>
1929
1930 * debug.c (remote_debug): Add definition.
1931 * debug.h (remote_debug): Add declaration.
1932 * hostio.c (remote_debug): Remove declaration.
1933 * remote-utils.c (struct ui_file): Likewise.
1934 (remote_debug): Likewise.
1935 * remote-utils.h (remote_debug): Likewise,
1936 * server.c (remote_debug): Remove definition.
1937
1938 2019-04-10 Kevin Buettner <kevinb@redhat.com>
1939
1940 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
1941 when using a 64-bit gdbserver.
1942
1943 2019-04-09 Tom Tromey <tromey@adacore.com>
1944
1945 * linux-low.c (select_event_lwp): Use find_thread_in_random.
1946
1947 2019-04-08 Tom Tromey <tom@tromey.com>
1948
1949 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
1950 throw.
1951 (linux_resume_one_lwp): Likewise.
1952
1953 2019-04-08 Tom Tromey <tom@tromey.com>
1954
1955 * gdbreplay.c: Update.
1956 * linux-low.c: Update.
1957 * server.c: Update.
1958
1959 2019-04-08 Tom Tromey <tom@tromey.com>
1960
1961 * server.c: Use C++ exception handling.
1962 * linux-low.c: Use C++ exception handling.
1963 * gdbreplay.c: Use C++ exception handling.
1964
1965 2019-04-08 Tom Tromey <tom@tromey.com>
1966
1967 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
1968 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
1969 (captured_main, main): Update.
1970 * gdbreplay.c (main): Update.
1971
1972 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1973
1974 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
1975 value in argument pointer, return 1 if the entry is found and 0
1976 otherwise. Move comment.
1977 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
1978 * linux-low.h (linux_get_auxv): Declare.
1979 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
1980
1981 2019-04-05 Tom Tromey <tromey@adacore.com>
1982
1983 * server.c (gdbserver_usage): Use upper-case for metasyntactic
1984 variables.
1985
1986 2019-03-28 Alan Hayward <alan.hayward@arm.com>
1987
1988 * linux-low.c (AT_HWCAP2): Add define if not already included.
1989
1990 2019-03-26 Alan Hayward <alan.hayward@arm.com>
1991
1992 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
1993 (aarch64_arch_setup): Call linux_get_hwcap.
1994 * linux-arm-low.c (arm_get_hwcap): Remove function.
1995 (arm_read_description): Call linux_get_hwcap.
1996 * linux-low.c (linux_get_auxv): New function.
1997 (linux_get_hwcap): Likewise.
1998 (linux_get_hwcap2): Likewise.
1999 * linux-low.h (linux_get_hwcap): New declaration.
2000 (linux_get_hwcap2): Likewise.
2001 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2002 (ppc_arch_setup): Call linux_get_hwcap.
2003 * linux-s390-low.c (s390_get_hwcap): Remove function.
2004 (s390_arch_setup): Call linux_get_hwcap.
2005
2006 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2007 Jiong Wang <jiong.wang@arm.com>
2008
2009 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2010 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2011 to fail.
2012 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2013
2014 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2015 Jiong Wang <jiong.wang@arm.com>
2016
2017 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2018 (aarch64_get_hwcap): New function.
2019 (aarch64_arch_setup): Read APIA hwcap.
2020
2021 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2022 Jiong Wang <jiong.wang@arm.com>
2023
2024 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2025 (initialize_low_tracepoint): Likewise.
2026 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2027 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2028 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2029 (aarch64_linux_read_description): Likewise.
2030 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2031
2032 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2033
2034 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2035 i386_create_target_description for 'segments' parameter.
2036 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2037 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2038 * win32-i386-low.c (i386_arch_setup): Likewise.
2039
2040 2019-03-12 Tom Tromey <tromey@adacore.com>
2041
2042 * linux-low.c (iterate_over_lwps): Update.
2043
2044 2019-03-06 Tom Tromey <tom@tromey.com>
2045
2046 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2047 (captured_main): Use SCOPE_EXIT.
2048
2049 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2050
2051 * configure.srv: Use '$enable_unittest' instead of '$development'
2052 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2053 case.
2054
2055 2019-02-27 Tom Tromey <tromey@adacore.com>
2056
2057 * gdbreplay.c (logchar): Handle \r\n.
2058
2059 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2060
2061 * linux-low.c (linux_attach): Add process before lwp.
2062 * server.c (attach_inferior): Check if already attached.
2063
2064 2019-02-07 Tom Tromey <tom@tromey.com>
2065
2066 * x86-tdesc.h: Rename include guard.
2067 * x86-low.h: Add include guard.
2068 * wincecompat.h: Rename include guard.
2069 * win32-low.h: Add include guard.
2070 * utils.h: Rename include guard.
2071 * tracepoint.h: Rename include guard.
2072 * tdesc.h: Rename include guard.
2073 * target.h: Rename include guard.
2074 * server.h: Rename include guard.
2075 * remote-utils.h: Rename include guard.
2076 * regcache.h: Rename include guard.
2077 * nto-low.h: Rename include guard.
2078 * notif.h: Add include guard.
2079 * mem-break.h: Rename include guard.
2080 * lynx-low.h: Add include guard.
2081 * linux-x86-tdesc.h: Add include guard.
2082 * linux-s390-tdesc.h: Add include guard.
2083 * linux-ppc-tdesc-init.h: Add include guard.
2084 * linux-low.h: Add include guard.
2085 * linux-aarch64-tdesc.h: Add include guard.
2086 * linux-aarch32-low.h: Add include guard.
2087 * inferiors.h: Rename include guard.
2088 * i387-fp.h: Rename include guard.
2089 * hostio.h: Rename include guard.
2090 * gdbthread.h: Rename include guard.
2091 * gdb_proc_service.h: Rename include guard.
2092 * event-loop.h: Rename include guard.
2093 * dll.h: Rename include guard.
2094 * debug.h: Rename include guard.
2095 * ax.h: Rename include guard.
2096
2097 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2098
2099 PR gdb/23985
2100 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2101 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2102
2103 2019-01-25 Tom Tromey <tom@tromey.com>
2104
2105 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2106
2107 2019-01-25 Tom Tromey <tom@tromey.com>
2108
2109 * win32-low.c: Fix common/ includes.
2110 * win32-i386-low.c: Fix common/ includes.
2111 * tracepoint.c: Fix common/ includes.
2112 * thread-db.c: Fix common/ includes.
2113 * target.h: Fix common/ includes.
2114 * symbol.c: Fix common/ includes.
2115 * spu-low.c: Fix common/ includes.
2116 * server.h: Fix common/ includes.
2117 * server.c: Fix common/ includes.
2118 * remote-utils.c: Fix common/ includes.
2119 * regcache.h: Fix common/ includes.
2120 * regcache.c: Fix common/ includes.
2121 * nto-x86-low.c: Fix common/ includes.
2122 * notif.h: Fix common/ includes.
2123 * mem-break.h: Fix common/ includes.
2124 * lynx-low.c: Fix common/ includes.
2125 * lynx-i386-low.c: Fix common/ includes.
2126 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2127 * linux-x86-low.c: Fix common/ includes.
2128 * linux-low.c: Fix common/ includes.
2129 * inferiors.h: Fix common/ includes.
2130 * i387-fp.c: Fix common/ includes.
2131 * hostio.c: Fix common/ includes.
2132 * hostio-errno.c: Fix common/ includes.
2133 * gdbthread.h: Fix common/ includes.
2134 * gdbreplay.c: Fix common/ includes.
2135 * fork-child.c: Fix common/ includes.
2136 * event-loop.c: Fix common/ includes.
2137 * ax.c:
2138 (enum gdb_agent_op): Fix common/ includes.
2139
2140 2019-01-21 Tom Tromey <tom@tromey.com>
2141
2142 * tracepoint.c: Fix includes.
2143 * remote-utils.c: Fix includes.
2144 * linux-x86-low.c: Fix includes.
2145
2146 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2147
2148 * gdbreplay.c (gdbreplay_version): Update copyright year in
2149 version message.
2150 * server.c (gdbserver_version): Likewise.
2151
2152 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2153
2154 * linux-low.c (add_lwp): Switch ordering.
2155
2156 2018-11-29 Tom Tromey <tom@tromey.com>
2157
2158 * win32-low.c (win32_join): Take pid, not process.
2159 * target.h (struct target_ops) <join>: Change argument type.
2160 (join_inferior): Change argument name.
2161 * spu-low.c (spu_join): Take pid, not process.
2162 * server.c (handle_detach): Preserve pid before destroying
2163 process.
2164 * lynx-low.c (lynx_join): Take pid, not process.
2165 * linux-low.c (linux_join): Take pid, not process.
2166
2167 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2168
2169 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2170 (aarch64_cannot_fetch_register): Likewise.
2171 (struct linux_target_ops): Update references.
2172
2173 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2174
2175 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2176
2177 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2178
2179 * configure.srv (ipa_ppc_linux_regobj): Add
2180 powerpc-isa207-htm-vsx32l-ipa.o and
2181 powerpc-isa207-htm-vsx64l-ipa.o.
2182 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2183 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2184 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2185 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2186 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2187 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2188 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2189 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2190 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2191 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2192 (init_registers_powerpc_isa207_htm_vsx32l)
2193 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2194 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2195 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2196 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2197 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2198 (ppc_store_tm_ctarregset): New functions.
2199 (ppc_regsets): Add entries for HTM regsets.
2200 (ppc_arch_setup): Set htm in features struct when needed. Set
2201 sizes for the HTM regsets.
2202 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2203 (initialize_low_arch): Call
2204 init_registers_powerpc_isa207_htm_vsx32l and
2205 init_registers_powerpc_isa207_htm_vsx64l.
2206 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2207 PPC_TDESC_ISA207_HTM_VSX.
2208 (initialize_low_tracepoint): Call
2209 init_registers_powerpc_isa207_htm_vsx32l and
2210 init_registers_powerpc_isa207_htm_vsx64l.
2211
2212 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2213
2214 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2215 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2216 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2217 (ppc_store_pmuregset): New functions.
2218 (ppc_regsets): Add entries for ebb and pmu regsets.
2219 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2220 pmu regsets are available. Set sizes for these regsets.
2221
2222 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2223
2224 * configure.srv (ipa_ppc_linux_regobj): Add
2225 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2226 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2227 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2228 rs6000/powerpc-isa207-vsx32l.xml, and
2229 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2230 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2231 <PPC_TDESC_ISA207_VSX>: New enum value.
2232 (init_registers_powerpc_isa207_vsx32l): Declare.
2233 (init_registers_powerpc_isa207_vsx64l): Declare.
2234 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2235 (ppc_store_tarregset): New function.
2236 (ppc_regsets): Add entry for the TAR regset.
2237 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2238 size for the TAR regsets.
2239 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2240 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2241 and init_registers_powerpc_isa207_vsx64l.
2242 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2243 (initialize_low_tracepoint): Call
2244 init_registers_powerpc_isa207_vsx32l and
2245 init_registers_powerpc_isa207_vsx64l.
2246
2247 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2248 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2249
2250 * configure.srv (ipa_ppc_linux_regobj): Add
2251 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2252 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2253 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2254 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2255 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2256 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2257 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2258 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2259 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2260 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2261 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2262 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2263 (ppc_hwcap): Add comment.
2264 (ppc_hwcap2): New global.
2265 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2266 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2267 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2268 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2269 when needed. Set sizes for the the DSCR and PPR regsets.
2270 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2271 (initialize_low_arch): Call
2272 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2273 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2274 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2275 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2276 (initialize_low_tracepoint): Call
2277 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2278 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2279
2280 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2281
2282 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2283
2284 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2285 Simon Marchi <simark@simark.ca>
2286
2287 * acinclude.m4: Include "../selftest.m4".
2288 * configure: Regenerate.
2289 * configure.ac: Use "GDB_AC_SELFTEST".
2290 * configure.srv: Use "$enable_unittests" instead of
2291 "$development" when checking whether unit tests have been
2292 enabled.
2293 * server.c (captured_main): Update message informing that
2294 selftests have been disabled.
2295
2296 2018-10-04 Tom Tromey <tom@tromey.com>
2297
2298 * configure: Rebuild.
2299
2300 2018-10-04 Tom Tromey <tom@tromey.com>
2301
2302 * server.c (handle_status): Rename inner "thread".
2303 (process_serial_event): Declare "res" in 'm' case.
2304 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2305 (iterate_over_lwps): Rename inner "thread".
2306 (linux_qxfer_libraries_svr4): Rename inner "len".
2307 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2308
2309 2018-10-01 Gary Benson <gbenson@redhat.com>
2310
2311 * gdb_proc_service.h: Moved common code to
2312 common/gdb_proc_service.h.
2313
2314 2018-10-01 Gary Benson <gbenson@redhat.com>
2315
2316 * gdb_proc_service.h: Synchronize comments and whitespace with
2317 GDB's version of this file.
2318
2319 2018-09-25 Tom Tromey <tom@tromey.com>
2320
2321 * configure: Rebuild.
2322 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2323
2324 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2325
2326 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2327 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2328 ($(IPA_LIB)): Sort IPA_OBJS.
2329
2330 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2331
2332 * Makefile.in: Remove references to $(ADD_DEPS).
2333
2334 2018-09-16 Tom Tromey <tom@tromey.com>
2335
2336 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2337 variables.
2338 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2339 variables.
2340
2341 2018-09-05 Tom Tromey <tom@tromey.com>
2342
2343 * configure: Rebuild.
2344
2345 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2346
2347 PR build/23399
2348 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2349
2350 2018-08-27 Tom Tromey <tom@tromey.com>
2351
2352 PR build/23087:
2353 * configure: Rebuild.
2354
2355 2018-08-27 Tom Tromey <tom@tromey.com>
2356
2357 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2358 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2359 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2360 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2361 (s390x_emit_stack_adjust): Add casts to unsigned char.
2362
2363 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2364
2365 PR gdb/23374
2366 PR gdb/23375
2367 * server.h (struct client_state) <disable_randomization>:
2368 Initialize to 1.
2369
2370 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2371
2372 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2373 variable.
2374 (mips_supply_ptrace_register): Likewise.
2375
2376 2018-07-22 Tom Tromey <tom@tromey.com>
2377
2378 * configure: Rebuild.
2379
2380 2018-07-22 Tom Tromey <tom@tromey.com>
2381
2382 * win32-low.c (win32_create_inferior): Remove unused variables.
2383 * gdbreplay.c (remote_open): Remove unused variable.
2384 * remote-utils.c (remote_prepare): Remove unused variable.
2385 * x86-tdesc.h (X86_TDESC_H): Define.
2386 (amd64_expedite_regs): Define conditionally.
2387 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2388 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2389 * remote-utils.c (readchar): Remove unused variable.
2390
2391 2018-07-13 Pedro Alves <palves@redhat.com>
2392
2393 * linux-low.c (linux_kill): Change parameter to process_info
2394 pointer instead of pid. Adjust.
2395 * lynx-low.c (lynx_kill): Likewise.
2396 * nto-low.c (nto_kill): Likewise.
2397 * spu-low.c (spu_kill): Likewise.
2398 * win32-low.c (win32_kill): Likewise.
2399 * server.c (handle_v_kill, kill_inferior_callback)
2400 (detach_or_kill_for_exit): Adjust.
2401 * target.c (kill_inferior): Change parameter to process_info
2402 pointer instead of pid. Adjust.
2403 * target.h (struct target_ops) <kill>: Change parameter to
2404 process_info pointer instead of pid. Adjust all implementations
2405 and callers.
2406 (kill_inferior): Likewise.
2407
2408 2018-07-13 Pedro Alves <palves@redhat.com>
2409
2410 * linux-low.c (linux_detach, linux_join): Change parameter to
2411 process_info pointer instead of pid. Adjust.
2412 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2413 * nto-low.c (nto_detach): Likewise.
2414 * spu-low.c (spu_detach, spu_join): Likewise.
2415 * win32-low.c (win32_detach, win32_join): Likewise.
2416 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2417 * target.h (struct target_ops) <detach, join>: Change parameter to
2418 process_info pointer instead of pid. Adjust all implementations
2419 and callers.
2420 (detach_inferior, join_inferior): Rename 'pid' parameter to
2421 'proc'.
2422
2423 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2424 Jan Kratochvil <jan.kratochvil@redhat.com>
2425 Paul Fertser <fercerpav@gmail.com>
2426 Tsutomu Seki <sekiriki@gmail.com>
2427
2428 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2429 (OBS): Add 'common/netstuff.o'.
2430 (GDBREPLAY_OBS): Likewise.
2431 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2432 (remote_open): Implement support for IPv6
2433 connections.
2434 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2435 and 'wspiapi.h'.
2436 (handle_accept_event): Accept connections from IPv6 sources.
2437 (remote_prepare): Handle IPv6-style hostnames; implement
2438 support for IPv6 connections.
2439 (remote_open): Implement support for printing connections from
2440 IPv6 sources.
2441
2442 2018-07-11 Pedro Alves <palves@redhat.com>
2443
2444 PR gdb/23377
2445 * mem-break.c (any_persistent_commands): Add process_info
2446 parameter and use it instead of relying on the current process.
2447 Change return type to bool.
2448 * mem-break.h (any_persistent_commands): Add process_info
2449 parameter and change return type to bool.
2450 * server.c (handle_detach): Remove require_running_or_return call.
2451 Look up the process_info for the process we're about to detach.
2452 If not found, return back error to GDB. Adjust
2453 any_persistent_commands call to pass down a process pointer.
2454
2455 2018-07-11 Pedro Alves <palves@redhat.com>
2456
2457 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2458 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2459 instead of collect_register_by_name.
2460 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2461 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2462
2463 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2464 Pedro Alves <palves@redhat.com>
2465
2466 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2467
2468 2018-07-03 Tom Tromey <tom@tromey.com>
2469
2470 * linux-low.c: Update.
2471 * lynx-low.c: Update.
2472 * mem-break.c: Update.
2473 * nto-low.c: Update.
2474 * remote-utils.c: Update.
2475 * server.c: Update.
2476 * spu-low.c: Update.
2477 * target.c: Update.
2478 * win32-low.c: Update.
2479
2480 2018-07-03 Tom Tromey <tom@tromey.com>
2481
2482 * server.c: Update.
2483
2484 2018-07-03 Tom Tromey <tom@tromey.com>
2485
2486 * linux-low.c: Update.
2487
2488 2018-07-03 Tom Tromey <tom@tromey.com>
2489
2490 * target.c: Update.
2491
2492 2018-07-03 Tom Tromey <tom@tromey.com>
2493
2494 * linux-low.c: Update.
2495 * linux-mips-low.c: Update.
2496 * lynx-low.c: Update.
2497 * nto-low.c: Update.
2498 * remote-utils.c: Update.
2499 * server.c: Update.
2500 * spu-low.c: Update.
2501 * target.c: Update.
2502 * thread-db.c: Update.
2503
2504 2018-07-03 Tom Tromey <tom@tromey.com>
2505
2506 * linux-low.c: Update.
2507 * linux-mips-low.c: Update.
2508 * lynx-low.c: Update.
2509 * mem-break.c: Update.
2510 * nto-low.c: Update.
2511 * remote-utils.c: Update.
2512 * server.c: Update.
2513 * spu-low.c: Update.
2514 * target.c: Update.
2515 * tracepoint.c: Update.
2516
2517 2018-07-03 Tom Tromey <tom@tromey.com>
2518
2519 * linux-low.c: Update.
2520 * linux-ppc-low.c: Update.
2521 * linux-x86-low.c: Update.
2522 * proc-service.c: Update.
2523 * server.c: Update.
2524 * spu-low.c: Update.
2525 * thread-db.c: Update.
2526 * win32-low.c: Update.
2527
2528 2018-07-03 Tom Tromey <tom@tromey.com>
2529
2530 * linux-low.c: Update.
2531 * lynx-low.c: Update.
2532 * nto-low.c: Update.
2533 * remote-utils.c: Update.
2534 * spu-low.c: Update.
2535 * thread-db.c: Update.
2536 * win32-low.c: Update.
2537
2538 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2539
2540 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2541 parameter in call to 'amd64_create_target_description'.
2542
2543 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2544
2545 * x86-tdesc.h: Remove executable permission flag.
2546
2547 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2548
2549 * configure.ac: Remove AC_PREREQ, add missing quoting.
2550 * configure: Re-generate.
2551 * config.in: Re-generate.
2552 * aclocal.m4: Re-generate.
2553
2554 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2555
2556 * tracepoint.h (current_traceframe): Remove declaration.
2557
2558 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2559
2560 * linux-aarch64-low.c (is_sve_tdesc): New function.
2561 (aarch64_sve_regs_copy_to_regcache): Likewise.
2562 (aarch64_sve_regs_copy_from_regcache): Likewise.
2563 (aarch64_regs_info): Add SVE checks.
2564 (initialize_low_arch): Initialize SVE.
2565
2566 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2567
2568 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2569
2570 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2571
2572 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2573 (initialize_low_tracepoint): Likewise
2574 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2575 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2576 param.
2577 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2578 checks.
2579 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2580
2581 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2582
2583 * server.h (PBUFSIZ): Increase size
2584
2585 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2586
2587 * regcache.c (regcache::raw_compare): New function.
2588 * regcache.h (regcache::raw_compare): New declaration.
2589
2590 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2591
2592 * regcache.c (new_register_cache): Use new.
2593 (free_register_cache): Use delete.
2594 (register_data): Use const.
2595 (supply_register): Move body inside regcache.
2596 (regcache::raw_supply): New override function.
2597 (collect_register): Move body inside regcache.
2598 (regcache::raw_collect): New override function.
2599 (regcache::get_register_status): New override function.
2600 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2601
2602 2018-06-09 Tom Tromey <tom@tromey.com>
2603
2604 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2605 declare queue.
2606 (event_queue): Use std::queue.
2607 (gdb_event_xfree): Remove.
2608 (initialize_event_loop, process_event, wait_for_event): Update.
2609
2610 2018-06-08 Stan Cox <scox@redhat.com>
2611
2612 * win32-low.c (win32_create_inferior): last_ptid and last_status
2613 moved to client_state.
2614
2615 2018-06-08 Pedro Alves <palves@redhat.com>
2616
2617 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2618 common/common-exceptions.o, common/common-utils.o,
2619 common/errors.o, common/print-utils.o and utils.o.
2620 * gdbreplay.c: Include "common-defs.h" instead of the two
2621 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2622 string.h or alloca.h.
2623 (perror_with_name): Delete.
2624 (remote_open): Use xstrdup instead of strdup.
2625 (main): Rename to ...
2626 (captured_main): ... this.
2627 (main): New.
2628
2629 2018-06-08 Tom Tromey <tom@tromey.com>
2630
2631 * linux-low.c (linux_low_read_btrace): Update.
2632
2633 2018-06-04 Stan Cox <scox@redhat.com>
2634
2635 * server.h (struct client_state): New.
2636 * server.c (cont_thread, general_thread, multi_process)
2637 (report_fork_events, report_vfork_events, report_exec_events)
2638 (report_thread_events, swbreak_feature, hwbreak_feature)
2639 (vCont_supported, disable_randomization, pass_signals)
2640 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2641 Moved to client_state.
2642 * remote-utils.c (remote_debug, noack_mode)
2643 (transport_is_reliable): Moved to client_state.
2644 * tracepoint.c (current_traceframe): Moved to client_state.
2645
2646 Update all callers.
2647 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2648 linux-low.c, remote-utils.h, target.c: Use client_state.
2649
2650 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2651
2652 * configure.srv: Add new c/h file.
2653
2654 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2655
2656 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2657 null VQ.
2658
2659 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2660
2661 * gdb.arch/mips-fpregset-core.exp: New test.
2662 * gdb.arch/mips-fpregset-core.c: New test source.
2663
2664 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2665
2666 PR server/23198
2667 * hostio.c (require_int): Do not report overflow for integers
2668 between 0xfffffff and 0x7fffffff.
2669
2670 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2671
2672 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2673 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2674 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2675 functions.
2676 (the_low_target): Wire them.
2677
2678 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2679
2680 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2681 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2682 mode. Call collect_register_by_name with vscr using
2683 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2684 (ppc_store_vrregset): Add and set vscr_offset variable as in
2685 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2686 vscr_offset.
2687
2688 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2689
2690 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2691 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2692 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2693
2694 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2695
2696 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2697 (ppc_store_vsxregset): Likewise.
2698 (ppc_fill_vrregset): Likewise.
2699 (ppc_store_vrregset): Likewise.
2700 (ppc_fill_evrregset): Likewise.
2701 (ppc_store_evrregset): Likewise.
2702 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2703 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2704 needed.
2705
2706 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2707
2708 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2709 wordsize of the inferior. Call ppc_linux_target_wordsize.
2710
2711 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2712
2713 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2714 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2715 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2716 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2717 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2718 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2719 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2720 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2721 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2722 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2723 (tdesc_powerpc_e500l): Remove.
2724 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2725 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2726 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2727 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2728 linux-ppc-tdesc.h.
2729 (ppc_arch_setup): Remove target description matching code. Fill a
2730 ppc_linux_features struct and call ppc_linux_match_description
2731 with it.
2732
2733 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2734
2735 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2736 width of the requested register exceeds the width of the
2737 `ptrace' data type.
2738 (mips_cannot_store_register): Likewise.
2739
2740 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2741
2742 * linux-mips-low.c (mips_fetch_register): New function. Update
2743 preceding comment.
2744 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2745 (the_low_target): Wire `mips_fetch_register'.
2746
2747 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2748
2749 * lynx-i386-low.c (LYNXOS_178): New macro.
2750 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2751 the layout on LynxOS-178.
2752 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2753 handle floating point registers that are not supported by
2754 LynxOS-178.
2755
2756 2018-05-10 Tom Tromey <tom@tromey.com>
2757
2758 * configure: Rebuild.
2759
2760 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2761
2762 PR server/23158:
2763 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2764 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2765 Use it to set the expedite_regs field in the given tdesc.
2766 * x86-tdesc.h: New file.
2767 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2768 Adjust following the addition of the new expedite_regs parameter
2769 to init_target_desc.
2770 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2771 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2772 (i386_linux_read_description, amd64_linux_read_description):
2773 Adjust following the addition of the new expedite_regs parameter
2774 to init_target_desc.
2775 * lynx-i386-low.c: #include "x86-tdesc.h".
2776 (lynx_i386_arch_setup): Adjust following the addition of the new
2777 expedite_regs parameter to init_target_desc.
2778 * nto-x86-low.c: #include "x86-tdesc.h".
2779 (nto_x86_arch_setup): Adjust following the addition of the new
2780 expedite_regs parameter to init_target_desc.
2781 * win32-i386-low.c: #include "x86-tdesc.h".
2782 (i386_arch_setup): Adjust following the addition of the new
2783 expedite_regs parameter to init_target_desc.
2784
2785 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2786
2787 PR server/23158:
2788 * win32-low.c (win32_create_inferior): Add call to my_wait
2789 setting last_status global.
2790
2791 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2792
2793 PR server/23158:
2794 * win32-low.c (create_process): Only call gdb_tilde_expand if
2795 inferior_cwd is not NULL.
2796
2797 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2798
2799 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2800 registers to the cache if their values have changed.
2801 (i387_xsave_to_cache): Provide default values for x87 control
2802 registers when these features are available, but disabled.
2803 * regcache.c (supply_register_by_name_zeroed): New function.
2804 * regcache.h (supply_register_by_name_zeroed): Declare new
2805 function.
2806
2807 2018-05-07 Tom Tromey <tom@tromey.com>
2808
2809 * configure: Rebuild.
2810
2811 2018-05-04 Tom Tromey <tom@tromey.com>
2812
2813 * configure: Rebuild.
2814
2815 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2816 Pedro Alves <palves@redhat.com>
2817
2818 * linux-aarch64-low.c (aarch64_stopped_data_address):
2819 Likewise.
2820
2821 2018-04-27 Tom Tromey <tom@tromey.com>
2822
2823 * configure: Rebuild.
2824
2825 2018-04-23 Tom Tromey <tom@tromey.com>
2826
2827 * configure: Rebuild.
2828
2829 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2830
2831 * Makefile.in (depcomp): Add "..".
2832 (all_deps_files): New and use it.
2833
2834 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2835
2836 * configure.srv (aarch64*-*-linux*): Don't include xml.
2837 (i[34567]86-*-cygwin*): Likewise.
2838 (i[34567]86-*-linux*): Likewise.
2839 (i[34567]86-*-lynxos*): Likewise.
2840 (i[34567]86-*-mingw32ce*): Likewise.
2841 (i[34567]86-*-mingw*): Likewise.
2842 (i[34567]86-*-nto*): Likewise.
2843 (tic6x-*-uclinux): Likewise.
2844 (x86_64-*-linux*): Likewise.
2845 (x86_64-*-mingw*): Likewise.
2846 (x86_64-*-cygwin*): Likewise.
2847
2848 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2849
2850 * tdesc.c: Remove xml parameter.
2851
2852 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2853
2854 * server.c (get_features_xml): Remove cast.
2855 * tdesc.c (void target_desc::accept): Fill in function.
2856 (tdesc_get_features_xml): Remove old xml creation.
2857 (print_xml_feature::visit_pre): Add xml vistor.
2858 * tdesc.h (struct target_desc): Make xmltarget mutable.
2859 (tdesc_get_features_xml): Remove declaration.
2860
2861 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2862
2863 * tdesc.c (tdesc_architecture_name): Add new function.
2864 (tdesc_osabi_name): Likewise.
2865 (tdesc_get_features_xml): Use new functions.
2866
2867 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2868
2869 * tdesc.c (tdesc_create_flags): Remove.
2870 (tdesc_add_flag): Likewise.
2871 (tdesc_named_type): Likewise.
2872 (tdesc_create_union): Likewise.
2873 (tdesc_create_struct): Likewise.
2874 (tdesc_create_vector): Likewise.
2875 (tdesc_add_bitfield): Likewise.
2876 (tdesc_add_field): Likewise.
2877 (tdesc_set_struct_size): Likewise.
2878
2879 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2880
2881 * tdesc.c (~target_desc): Remove implictly deleted items.
2882 (init_target_desc): Iterate all features.
2883 (tdesc_get_features_xml): Use vector.
2884 (tdesc_create_feature): Create feature.
2885 * tdesc.h (tdesc_feature) Remove
2886 (target_desc): Add features.
2887
2888 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2889
2890 * Makefile.in: Add common/tdesc.c
2891 * tdesc.c (init_target_desc): init all reg_defs from register
2892 vector.
2893 (tdesc_create_reg): Create tdesc_reg.
2894 * tdesc.h (tdesc_feature): Add register vector.
2895
2896 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
2897
2898 * tdesc.h (struct target_desc) <features>: Change type to
2899 std::vector<std::string>.
2900 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
2901 changes.
2902 (tdesc_get_features_xml): Likewise.
2903 (tdesc_create_feature): Likewise.
2904
2905 2018-03-26 Alan Hayward <alan.hayward@arm.com>
2906
2907 * regcache.c (find_register_by_number): Return a ref.
2908 (find_regno): Use references.
2909 (register_size): Likewise.
2910 (register_data): Likewise.
2911 * tdesc.c (target_desc::~target_desc): Remove free calls.
2912 (target_desc::operator==): Use std::vector compare.
2913 (init_target_desc): Use reference.
2914 (tdesc_create_reg): Use reg constructors.
2915 * tdesc.h (struct target_desc): Replace pointer with object.
2916
2917 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2918
2919 * regcache.c (find_register_by_number): Make static.
2920 (find_regno): Use find_register_by_number
2921 * regcache.h (struct reg): Remove declaration.
2922
2923 2018-03-23 Alan Hayward <alan.hayward@arm.com>
2924
2925 * tdesc.c (target_desc::~target_desc): Move to here.
2926 (target_desc::operator==): Likewise.
2927 * tdesc.h (target_desc::~target_desc): Move from here.
2928 (target_desc::operator==): Likewise.
2929
2930 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
2931
2932 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
2933
2934 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2935
2936 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
2937 S390_TDESC_GS.
2938 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
2939 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
2940 and init_registers_s390_gs_linux64.
2941
2942 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2943
2944 * linux-s390-low.c (s390_fill_gs): Remove function.
2945 (s390_fill_gsbc): Remove function.
2946 (s390_regsets): Set fill functions for the guarded storage regsets
2947 to NULL.
2948
2949 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2950
2951 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
2952 the word size. Add comment.
2953 (s390_get_wordsize): New function.
2954 (s390_arch_setup): No longer select a temporary tdesc to fetch the
2955 pswm with it. Instead, use s390_get_wordsize to determine the
2956 word size first and derive the correct tdesc from that directly.
2957
2958 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
2959
2960 * Makefile.in: Include silent-rules.mk.
2961 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
2962 (COMPILE): Add ECHO_CXX.
2963 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2964 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
2965 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
2966 (version-generated.c): Add ECHO_GEN.
2967 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
2968 (IPAGENT_COMPILE): Add ECHO_CXX.
2969 (%-generated.c): Add ECHO_REGDAT.
2970
2971 2018-03-14 Tom Tromey <tom@tromey.com>
2972
2973 PR cli/14977:
2974 * ax.c (ax_printf): Special case for NULL.
2975
2976 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2977
2978 * linux-low.c (linux_qxfer_libraries_svr4): Use
2979 xml_escape_text_append.
2980
2981 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
2982
2983 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
2984
2985 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2986
2987 * server.c (handle_general_set): Remove unnecessary xstrdup.
2988
2989 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
2990
2991 * server.c (parse_debug_format_options): Adjust to
2992 delim_string_to_char_ptr_vec changes.
2993 * thread-db.c (thread_db_load_search): Adjust to
2994 dirnames_to_char_ptr_vec changes.
2995
2996 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
2997
2998 * target.h (target_enable_btrace, target_disable_btrace)
2999 (target_read_btrace, target_read_btrace_conf): Turn macro into
3000 inline function. Throw error if target method is not defined.
3001 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3002 check for btrace target method. Be prepared to handle exceptions
3003 from btrace target methods.
3004
3005 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3006
3007 * server.c (captured_main): Change order of error message printed
3008 when the current working directory cannot be found.
3009
3010 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3011
3012 * server.c: Include "filenames.h" and "pathstuff.h".
3013 (program_name): Delete variable.
3014 (program_path): New anonymous class.
3015 (get_exec_wrapper): Use "program_path" instead of
3016 "program_name".
3017 (handle_v_run): Likewise.
3018 (captured_main): Likewise.
3019 (process_serial_event): Likewise.
3020
3021 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3022
3023 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3024 (OBJS): Add "pathstuff.o".
3025 * server.c (current_directory): New global variable.
3026 (captured_main): Initialize "current_directory".
3027
3028 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3029
3030 * tdesc.c: Use common/tdesc.h.
3031 * tdesc.h: Likewise.
3032
3033 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3034 Simon Marchi <simon.marchi@ericsson.com>
3035
3036 * Makefile.in: Switch order of make rules.
3037
3038 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3039
3040 * Makefile.in: Add common directory in build.
3041 * configure.ac: Add common reference.
3042 * configure: Regenerate.
3043
3044 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3045
3046 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3047 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3048 * spu-low.c (spu_target_ops): Likewise.
3049 * win32-low.c (win32_target_ops): Likewise.
3050 * server.c (supported_btrace_packets): Report packets unconditionally.
3051 * target.h (target_ops) <supports_btrace>: Remove.
3052 (target_supports_btrace): Remove.
3053
3054 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3055
3056 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3057 (handle_btrace_disable): Change return type to void. Use exceptions
3058 to report errors.
3059 (handle_btrace_general_set): Catch exception and copy message to
3060 return message.
3061
3062 2018-02-08 Tom Tromey <tom@tromey.com>
3063
3064 * linux-low.c (install_software_single_step_breakpoints): Use
3065 make_scoped_restore.
3066 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3067 (do_restore_current_thread_cleanup): Remove.
3068 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3069 declare.
3070
3071 2018-02-08 Tom Tromey <tom@tromey.com>
3072
3073 * mem-break.c (set_raw_breakpoint_at): Use
3074 gdb::unique_xmalloc_ptr.
3075
3076 2018-01-30 Pedro Alves <palves@redhat.com>
3077
3078 PR gdb/13211
3079 * target.c (target_terminal::terminal_state): Rename to ...
3080 (target_terminal::m_terminal_state): ... this.
3081
3082 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3083
3084 * linux-low.c (handle_extended_wait): Surround call to
3085 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3086
3087 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3088
3089 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3090 linux_ptrace_attach_fail_reason_string now returning an
3091 std::string.
3092 (linux_attach): Likewise.
3093 * thread-db.c (attach_thread): Likewise.
3094
3095 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3096
3097 PR gdb/21559
3098 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3099 checking for fs_base/gs_base fields in struct user_regs_struct.
3100 * configure: Regenerate.
3101
3102 2018-01-16 Yao Qi <yao.qi@linaro.org>
3103
3104 PR gdb/18749
3105 * linux-low.c (fetch_register): Call supply_register instead of
3106 error.
3107
3108 2018-01-08 Yao Qi <yao.qi@linaro.org>
3109 Simon Marchi <simon.marchi@ericsson.com>
3110
3111 * Makefile.in (OBS): Remove selftest.o.
3112 * configure.ac: Set srv_selftest_objs if $development is true.
3113 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3114 * configure: Re-generated.
3115 * server.c (captured_main): Wrap variable selftest_filter with
3116 GDB_SELF_TEST.
3117
3118 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3119
3120 * server.c (parse_debug_format_options): Return std::string.
3121 (handle_monitor_command, captured_main): Adjust.
3122
3123 2018-01-05 Pedro Alves <palves@redhat.com>
3124
3125 PR gdb/18653
3126 * server.c (captured_main): Pass quiet=false to
3127 save_original_signals_state.
3128
3129 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3130
3131 * gdbreplay.c (gdbreplay_version): Update copyright year in
3132 version message.
3133 * server.c (gdbserver_version): Likewise.
3134
3135 2017-12-08 Tom Tromey <tom@tromey.com>
3136
3137 * ax.c (ax_printf): Update.
3138
3139 2017-12-07 Yao Qi <yao.qi@linaro.org>
3140
3141 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3142 aarch64_linux_read_description.
3143 * linux-amd64-ipa.c (idx2mask): New array.
3144 (get_ipa_tdesc): Move idx2mask out.
3145 (initialize_low_tracepoint): Initialize target descriptions.
3146 * linux-i386-ipa.c (idx2mask): New array.
3147 (get_ipa_tdesc): Move idx2mask out.
3148 (initialize_low_tracepoint): Initialize target descriptions.
3149
3150 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3151
3152 * tdesc.c (struct tdesc_type): Change return type.
3153 (tdesc_add_flag): Change parameter type.
3154 (tdesc_add_bitfield): Likewise.
3155 (tdesc_add_field): Likewise.
3156 (tdesc_set_struct_size): Likewise.
3157
3158 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3159
3160 * regcache.c (registers_to_string): Remove unused variable.
3161
3162 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3163
3164 * inferiors.c (for_each_inferior_with_data): Remove.
3165 * inferiors.h (for_each_inferior_with_data): Remove.
3166 * server.c (handle_qxfer_threads_worker): Change parameter type.
3167 (handle_qxfer_threads_proper): Use for_each_thread.
3168
3169 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3170
3171 * inferiors.c (for_each_inferior): Remove.
3172 (clear_inferiors): Use for_each_thread.
3173 * inferiors.h (for_each_inferior): Remove.
3174 * linux-low.c (linux_wait_for_event_filtered): Use
3175 for_each_thread.
3176 (linux_stabilize_threads): Likewise.
3177 * regcache.c (regcache_release): Likewise.
3178 * server.c (gdb_wants_all_threads_stopped): Likewise.
3179 (clear_pending_status_callback): Remove.
3180 (handle_status): Use for_each_thread.
3181 (captured_main): Likewise.
3182 * win32-low.c (child_init_thread_list): Likewise.
3183 (win32_clear_inferiors): Likewise.
3184 (fake_breakpoint_event): Likewise.
3185
3186 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3187
3188 * inferiors.h (find_inferior): Remove.
3189 * inferiors.c (find_inferior): Remove.
3190
3191 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3192
3193 * linux-low.c (resume_status_pending_p): Update comment.
3194 (need_step_over_p): Update comment.
3195
3196 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3197
3198 * linux-low.c (proceed_one_lwp): Return void, change parameter
3199 type.
3200 (unsuspend_and_proceed_one_lwp): Likewise.
3201 (proceed_all_lwps): Use for_each_thread.
3202 (unstop_all_lwps): Likewise.
3203
3204 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3205
3206 * linux-low.c (linux_resume_one_thread): Return void, take
3207 parameter directly.
3208 (linux_resume): Use for_each_thread.
3209
3210 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3211
3212 * linux-low.c (send_sigstop_callback): Return void, change
3213 parameter type. Rename to...
3214 (send_sigstop): ... this.
3215 (suspend_and_send_sigstop_callback): Return void, change parameter
3216 type. Rename to...
3217 (suspend_and_send_sigstop): ... this.
3218 (stop_all_lwps): Use for_each_thread.
3219
3220 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3221
3222 * linux-low.c (lwp_running): Return bool, remove unused
3223 argument.
3224 (linux_stabilize_threads): Use find_thread.
3225
3226 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3227
3228 * linux-low.c (select_singlestep_lwp_callback): Remove.
3229 (count_events_callback): Remove.
3230 (select_event_lwp_callback): Remove.
3231 (select_event_lwp): Use find_thread/for_each_thread.
3232
3233 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3234
3235 * linux-low.c (not_stopped_callback): Return bool, take filter
3236 argument directly.
3237 (linux_wait_for_event_filtered): Use find_thread.
3238 (linux_wait_1): Likewise.
3239
3240 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3241
3242 * linux-low.c (same_lwp): Remove.
3243 (find_lwp_pid): Use find_thread.
3244
3245 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3246
3247 * linux-low.c (delete_lwp_callback): Remove.
3248 (linux_mourn): Use for_each_thread.
3249
3250 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3251
3252 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3253 args parameter, don't check for pid.
3254 (linux_detach): Use for_each_thread.
3255
3256 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3257
3258 * linux-low.c (struct counter): Remove.
3259 (second_thread_of_pid_p): Remove.
3260 (last_thread_of_process_p): Use find_thread.
3261
3262 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3263
3264 * inferiors.c (find_inferior_in_random): Remove.
3265 * inferiors.h (find_inferior_in_random): Remove.
3266 * linux-low.c (status_pending_p_callback): Return bool, accept
3267 parameter ptid directly.
3268 (linux_wait_for_event_filtered): Use find_thread_in_random.
3269 (linux_wait_1): Likewise.
3270
3271 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3272
3273 * inferiors.c (find_inferior_id): Remove.
3274 (find_thread_ptid): Move implemention from find_inferior_id to
3275 here.
3276 * inferiors.h (find_inferior_id): Remove.
3277 * server.c (handle_status): Use find_thread_ptid.
3278 (process_serial_event): Likewise.
3279 * thread-db.c (find_one_thread): Likewise.
3280 (thread_db_thread_handle): Likewise.
3281 * win32-low.c (thread_rec): Likewise.
3282 (child_delete_thread): Likewise.
3283 (win32_thread_alive): Likewise.
3284 (get_child_debug_event): Likewise.
3285
3286 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3287
3288 * linux-mips-low.c (update_watch_registers_callback): Return
3289 void, remove pid_p parameter, don't check for pid.
3290 (mips_insert_point, mips_remove_point): Use for_each_thread.
3291
3292 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3293
3294 * lynx.low (lynx_delete_thread_callback): Remove.
3295 (lynx_mourn): Use for_each_thread.
3296
3297 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3298
3299 * regcache.c (regcache_invalidate_one): Remove.
3300 (regcache_invalidate_pid): use for_each_thread.
3301
3302 2017-11-26 Tom Tromey <tom@tromey.com>
3303
3304 * linux-low.c (linux_create_inferior): Update.
3305
3306 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3307
3308 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3309
3310 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3311
3312 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3313 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3314 * linux-aarch64-tdesc-selftest.c: New file.
3315 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3316
3317 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3318
3319 * configure.srv: Add new file.
3320 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3321 * linux-aarch64-tdesc-selftest.c: New file.
3322 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3323
3324 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3325
3326 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3327 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3328 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3329
3330 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3331
3332 * configure.srv: Add new files.
3333 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3334 aarch64_linux_read_description.
3335 * linux-aarch64-low.c (aarch64_linux_read_description):
3336 Merge with aarch64_arch_setup.
3337 (aarch64_arch_setup): Call aarch64_linux_read_description.
3338 * linux-aarch64-tdesc.c: New file.
3339 * linux-aarch64-tdesc.h: New file.
3340
3341 2017-11-24 Yao Qi <yao.qi@linaro.org>
3342
3343 * configure.srv: Set $srv_regobj for tic6x-linux.
3344 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3345 (tic6x_read_description): Move some code to tic6x_arch_setup.
3346 (tic6x_tdesc_test): New function.
3347 (initialize_low_arch): Call selftests::register_test.
3348
3349 2017-11-22 Yao Qi <yao.qi@linaro.org>
3350
3351 * remote-utils.c (prepare_resume_reply): Use memcpy.
3352
3353 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3354
3355 * linux-low.c (kill_one_lwp_callback): Return void, take
3356 argument directly, don't filter on pid.
3357 (linux_kill): Use for_each_thread.
3358
3359 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3360
3361 * linux-low.c (need_step_over_p): Return bool, remove dummy
3362 argument.
3363 (linux_resume, proceed_all_lwps): Use find_thread.
3364
3365 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3366
3367 * linux-low.c (resume_status_pending_p): Return bool, remove
3368 flag_p argument.
3369 (linux_resume): Use find_thread.
3370
3371 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3372
3373 * linux-low.c (struct thread_resume_array): Remove.
3374 (linux_set_resume_request): Return void, take arguments
3375 directly.
3376 (linux_resume): Use for_each_thread.
3377
3378 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3379
3380 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3381 return bool, remove data argument.
3382 (linux_stabilize_threads): Use find_thread.
3383
3384 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3385
3386 * linux-low.c (unsuspend_one_lwp): Remove.
3387 (unsuspend_all_lwps): Use for_each_thread, inline code from
3388 unsuspend_one_lwp.
3389
3390 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3391
3392 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3393 * linux-low.c (struct iterate_over_lwps_args): Remove.
3394 (iterate_over_lwps_filter): Remove.
3395 (iterate_over_lwps): Use find_thread.
3396
3397 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3398
3399 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3400 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3401 code from reset_lwp_ptrace_options_callback.
3402
3403 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3404
3405 * linux-arm-low.c (struct update_registers_data): Remove.
3406 (update_registers_callback): Return void, take arguments
3407 directly, don't check thread's pid.
3408 (arm_insert_point, arm_remove_point): Use for_each_thread.
3409
3410 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3411
3412 * win32-low.c (continue_one_thread): Return void, take argument
3413 directly.
3414 (child_continue): Use for_each_thread.
3415
3416 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3417
3418 * win32-i386-low.c (update_debug_registers_callback): Rename
3419 to ...
3420 (update_debug_registers): ... this, return void, remove pid_p arg.
3421 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3422
3423 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3424
3425 * inferiors.h (struct process_info): Add constructor, initialize
3426 fields..
3427 <syscalls_to_catch>: Change type to std::vector<int>.
3428 * inferiors.c (add_process): Allocate process_info with new.
3429 (remove_process): Free process_info with delete.
3430 * linux-low.c (handle_extended_wait): Adjust.
3431 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3432 * server.c (handle_general_set): Adjust.
3433
3434 2017-11-16 Pedro Alves <palves@redhat.com>
3435
3436 * remote-utils.c (remote_close): Block SIGIO signals instead of
3437 uninstalling the SIGIO handler.
3438
3439 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3440
3441 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3442
3443 2017-11-16 Yao Qi <yao.qi@linaro.org>
3444
3445 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3446 (tic6x_store_gregset): Likewise.
3447 (tic6x_usrregs_info): Move it up.
3448
3449 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3450
3451 * Makefile.in: Update arch rules.
3452 * configure.srv: Explicitly mark arch/ files.
3453
3454 2017-11-13 Andreas Schwab <schwab@suse.de>
3455
3456 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3457 function.
3458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3459
3460 2017-11-06 Pedro Alves <palves@redhat.com>
3461
3462 * config.in, configure: Regenerate.
3463
3464 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3465
3466 * target.c (struct thread_search): Remove.
3467 (thread_search_callback): Remove.
3468 (prepare_to_access_memory): Use for_each_thread instead of
3469 find_inferior. Inline code from thread_search_callback.
3470
3471 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3472
3473 * server.c (struct visit_actioned_threads_data): Remove.
3474 (visit_actioned_threads): Change prototype to take arguments
3475 directly.
3476 (resume): Use find_thread instead of find_inferior.
3477
3478 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3479
3480 * server.c (queue_stop_reply_callback): Change prototype, return
3481 void.
3482 (find_status_pending_thread_callback): Remove.
3483 (handle_status): Replace find_inferior with find_thread and
3484 for_each_thread.
3485
3486 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3487
3488 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3489 with REGNO.
3490 (aarch64_store_gregset): Likewise.
3491 (aarch64_fill_fpregset): Likewise.
3492 (aarch64_store_fpregset): Likewise.
3493
3494 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3495
3496 * gdbthread.h (find_thread, for_each_thread): New functions.
3497 * inferiors.c (thread_of_pid): Remove.
3498 (find_any_thread_of_pid): Use find_thread.
3499 * linux-low.c (num_lwps): Use for_each_thread.
3500
3501 2017-10-17 Yao Qi <yao.qi@linaro.org>
3502
3503 * Makefile.in: Remove one rule.
3504 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3505
3506 2017-10-17 Yao Qi <yao.qi@linaro.org>
3507
3508 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3509 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3510
3511 2017-10-17 Yao Qi <yao.qi@linaro.org>
3512
3513 * configure.srv: Rename arm.o with arch/arm.o.
3514
3515 2017-10-17 Yao Qi <yao.qi@linaro.org>
3516
3517 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3518 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3519 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3520 (arch-i386.o, arch-amd64.o): Remove rules.
3521 (arch/%.o): New rule.
3522 Update POSTCOMPILE and COMPILE.pre.
3523 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3524 * configure: Re-generated.
3525 * configure.srv: Replace arch-i386.o with arch/i386.o.
3526 Replace arch-amd64.o with arch/amd64.o.
3527
3528 2017-10-16 Yao Qi <yao.qi@linaro.org>
3529
3530 * configure: Regenerated.
3531
3532 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3533
3534 * inferiors.h: (struct inferior_list): Remove.
3535 (struct inferior_list_entry); Remove.
3536 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3537 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3538 get_first_inferior): Remove.
3539 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3540 find_inferior_id, find_inferior_in_random): Change signature.
3541 * inferiors.c (all_threads): Change type to
3542 std::list<thread_info *>.
3543 (get_thread): Remove macro.
3544 (find_inferior, find_inferior_id): Change signature, implement
3545 using find_thread.
3546 (find_inferior_in_random): Change signature, implement using
3547 find_thread_in_random.
3548 (for_each_inferior, for_each_inferior_with_data): Change
3549 signature, implement using for_each_thread.
3550 (add_inferior_to_list, remove_inferior): Remove.
3551 (add_thread, get_first_thread, thread_of_pid,
3552 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3553 (get_first_inferior, one_inferior_p, clear_inferior_list):
3554 Remove.
3555 (clear_inferiors, get_thread_process): Update.
3556 * gdbthread.h: Include <list>.
3557 (struct thread_info) <entry>: Remove field.
3558 <id>: New field.
3559 (all_threads): Change type to std::list<thread_info *>.
3560 (get_first_inferior): Add doc.
3561 (find_thread, for_each_thread, find_thread_in_random): New
3562 functions.
3563 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3564 * linux-arm-low.c (update_registers_callback): Update.
3565 * linux-low.c (second_thread_of_pid_p): Update.
3566 (kill_one_lwp_callback, linux_detach_lwp_callback,
3567 delete_lwp_callback, status_pending_p_callback, same_lwp,
3568 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3569 iterate_over_lwps, not_stopped_callback,
3570 resume_stopped_resumed_lwps, count_events_callback,
3571 select_singlestep_lwp_callback, select_event_lwp_callback,
3572 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3573 suspend_and_send_sigstop_callback, wait_for_sigstop,
3574 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3575 lwp_running, linux_set_resume_request, resume_status_pending_p,
3576 need_step_over_p, start_step_over, linux_resume_one_thread,
3577 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3578 reset_lwp_ptrace_options_callback): Update.
3579 * linux-mips-low.c (update_watch_registers_callback): Update.
3580 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3581 Update.
3582 (free_register_cache_thread_one): Remove.
3583 (regcache_release): Update.
3584 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3585 handle_qxfer_threads_worker): Update.
3586 (handle_query): Update, use list iterator.
3587 (visit_actioned_threads, handle_pending_status,
3588 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3589 clear_pending_status_callback, set_pending_status_callback,
3590 find_status_pending_thread_callback, handle_status,
3591 process_serial_event): Update.
3592 * target.c (thread_search_callback): Update.
3593 * thread-db.c (thread_db_get_tls_address): Update.
3594 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3595 Update.
3596 * win32-i386-low.c (update_debug_registers_callback): Update.
3597 * win32-low.c (delete_thread_info, child_delete_thread,
3598 continue_one_thread, suspend_one_thread,
3599 get_child_debug_event): Adjust.
3600
3601 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3602
3603 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3604 * inferiors.h: Include <list>.
3605 (struct process_info) <entry>: Remove field.
3606 <pid>: New field.
3607 (pid_of): Change macro to function.
3608 (ptid_of, lwpid_of): Remove macro.
3609 (all_processes): Change type to std::list<process_info *>.
3610 (ALL_PROCESSES): Remove macro.
3611 (for_each_process, find_process): New function.
3612 * inferiors.c (all_processes): Change type to
3613 std::list<process_info *>.
3614 (find_thread_process): Adjust.
3615 (add_process): Likewise.
3616 (remove_process): Likewise.
3617 (find_process_pid): Likewise.
3618 (get_first_process): Likewise.
3619 (started_inferior_callback): Remove.
3620 (have_started_inferiors_p): Adjust.
3621 (attached_inferior_callback): Remove.
3622 (have_attached_inferiors_p): Adjust.
3623 * linux-low.c (check_zombie_leaders): Likewise.
3624 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3625 (x86_linux_update_xmltarget): Adjust.
3626 * server.c (handle_query): Likewise.
3627 (gdb_reattached_process): Remove.
3628 (handle_status): Adjust.
3629 (kill_inferior_callback): Likewise.
3630 (detach_or_kill_inferior): Remove.
3631 (print_started_pid): Likewise.
3632 (print_attached_pid): Likewise.
3633 (detach_or_kill_for_exit): Update.
3634 (process_serial_event): Likewise.
3635 * linux-arm-low.c (arm_new_fork): Likewise.
3636
3637 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3638
3639 * dll.h: Include <list>.
3640 (struct dll_info): Add constructor.
3641 <entry>: Remove field.
3642 (all_dlls): Change type to std::list<dll_info>.
3643 * dll.c: Include <algorithm>.
3644 (get_dll): Remove macro.
3645 (all_dlls): Change type to std::list<dll_info *>.
3646 (free_one_dll): Remove.
3647 (match_dll): Likewise.
3648 (loaded_dll): Adjust.
3649 (unloaded_dll): Adjust to all_dlls type change, use
3650 std::find_if. Inline code from match_dll.
3651 (clear_dlls): Adjust to all_dlls type change.
3652 * server.c (emit_dll_description): Remove.
3653 (handle_qxfer_libraries): Adjust to all_dlls type change,
3654 integrate emit_dll_description's functionality.
3655
3656 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3657
3658 * linux-low.h (struct linux_target_ops) <delete_process>: New
3659 field.
3660 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3661 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3662 (struct linux_target_ops): Add delete_process callback.
3663 * linux-arm-low.c (arm_delete_process): New.
3664 (struct linux_target_ops): Add delete_process callback.
3665 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3666 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3667 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3668 * linux-mips-low.c (mips_linux_delete_process): New.
3669 (struct linux_target_ops): Add delete_process callback.
3670 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3671 * linux-s390-low.c (struct linux_target_ops): Likewise.
3672 * linux-sh-low.c (struct linux_target_ops): Likewise.
3673 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3674 * linux-tile-low.c (struct linux_target_ops): Likewise.
3675 * linux-x86-low.c (x86_linux_delete_process): New.
3676 (struct linux_target_ops): Add delete_process callback.
3677 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3678
3679 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3680
3681 * linux-aarch64-low.c (the_low_target): Add thread delete
3682 callback.
3683 * linux-arm-low.c (arm_delete_thread): New function.
3684 (the_low_target): Add thread delete callback.
3685 * linux-bfin-low.c (the_low_target): Likewise.
3686 * linux-crisv32-low.c (the_low_target): Likewise.
3687 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3688 set.
3689 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3690 field.
3691 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3692 * linux-mips-low.c (mips_linux_delete_thread): New function.
3693 (the_low_target): Add thread delete callback.
3694 * linux-ppc-low.c (the_low_target): Likewise.
3695 * linux-s390-low.c (the_low_target): Likewise.
3696 * linux-sh-low.c (the_low_target): Likewise.
3697 * linux-tic6x-low.c (the_low_target): Likewise.
3698 * linux-tile-low.c (the_low_target): Likewise.
3699 * linux-x86-low.c (the_low_target): Likewise.
3700 * linux-xtensa-low.c (the_low_target): Likewise.
3701
3702 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3703
3704 * win32-low.c: Include "common-inferior.h".
3705
3706 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3707
3708 * inferiors.c (set_inferior_cwd): New function.
3709 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3710 (handle_query): Inform that QSetWorkingDir is supported.
3711 * win32-low.c (create_process): Pass the inferior's cwd to
3712 CreateProcess.
3713
3714 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3715
3716 * inferiors.c (current_inferior_cwd): New global variable.
3717 (get_inferior_cwd): New function.
3718 * inferiors.h (struct process_info) <cwd>: New field.
3719
3720 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3721
3722 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3723 (OBS): Add gdb_tilde_expand.o.
3724
3725 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3726
3727 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3728 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3729
3730 2017-09-29 Pedro Alves <palves@redhat.com>
3731
3732 * ax.c (gdb_parse_agent_expr): Constify.
3733 * ax.h (gdb_parse_agent_expr): Constify.
3734 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3735 Constify.
3736 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3737 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3738 * remote-utils.h (read_ptid): Constify.
3739 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3740 (process_point_options, process_serial_event): Constify.
3741 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3742 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3743 (cmd_qtbuffer): Constify.
3744
3745 2017-09-29 Pedro Alves <palves@redhat.com>
3746
3747 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3748 fails.
3749
3750 2017-09-29 Pedro Alves <palves@redhat.com>
3751
3752 * linux-low.c (handle_extended_wait): Pass parent thread instead
3753 of process to thread_db_notice_clone.
3754 * linux-low.h (thread_db_notice_clone): Replace parent process
3755 parameter with parent thread parameter.
3756 * thread-db.c (find_one_thread): Add comment.
3757 (thread_db_notice_clone): Replace parent process parameter with
3758 parent thread parameter. Temporarily switch to the parent thread.
3759
3760 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3761
3762 * gdbthread.h: Include "common-gdbthread.h".
3763 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3764 "if" when validating the ptid.
3765 * remote-utils.c: Include "gdbthread.h".
3766 (prepare_resume_reply): Use "switch_to_thread".
3767 * target.c (done_accessing_memory): Likewise.
3768
3769 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3770
3771 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3772 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3773 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3774 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3775 s390x-gs-linux64-ipa.o to ipa_obj.
3776 * linux-s390-low.c (HWCAP_S390_GS): New define.
3777 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3778 New functions.
3779 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3780 (s390_arch_setup): Check for guarded-storage support and choose
3781 appropriate tdesc.
3782 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3783 init_registers_s390x_gs_linux64.
3784 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3785 enum value.
3786 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3787 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3788
3789 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3790
3791 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3792
3793 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3794
3795 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3796 (thread_db_thread_handle): Declare.
3797 * linux-low.c (linux_target_ops): Initialize thread_handle.
3798 * server.c (handle_qxfer_threads_worker): Add support for
3799 "handle" attribute.
3800 * target.h (struct target_ops): Add new function pointer,
3801 thread_handle.
3802 (target_thread_handle): Define.
3803 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3804 field in lwp.
3805 (thread_db_thread_handle): New function.
3806
3807 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3808
3809 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3810 * linux-low.h (thread_db_notice_clone): Declare.
3811 * thread-db.c (thread_db_notice_clone): New function.
3812
3813 2017-09-21 Pedro Alves <palves@redhat.com>
3814
3815 * server.c (gdb_read_memory, handle_status, process_serial_event)
3816 (handle_serial_event, handle_target_event): Adjust to
3817 set_desired_thread prototype change.
3818 * target.c (set_desired_thread): Remove 'use_general' parameter
3819 and adjust.
3820 * target.h (set_desired_thread): Remove 'use_general' parameter.
3821
3822 2017-09-20 Tom Tromey <tom@tromey.com>
3823
3824 * target.c (target_terminal::terminal_state): Define.
3825 (target_terminal::init): Rename from target_terminal_init.
3826 (target_terminal::inferior): Rename from
3827 target_terminal_inferior.
3828 (target_terminal::ours): Rename from target_terminal_ours.
3829 (target_terminal::ours_for_output, target_terminal::info): New.
3830
3831 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3832
3833 * server.c (accumulate_file_name_length): Remove.
3834 (emit_dll_description): Adjust to std::string change.
3835 (handle_qxfer_libraries): Use std::string to hold document.
3836
3837 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3838
3839 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3840 return type of xml_escape_text.
3841 * server.c (emit_dll_description): Likewise.
3842
3843 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3844
3845 * server.c (captured_main): Accept argument for --selftest.
3846 Update run_tests call.
3847 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3848 when registering selftests.
3849
3850 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3851
3852 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3853 instead of "VEC" for "target_desc.reg_defs".
3854 (regcache_cpy): Likewise.
3855 (registers_to_string): Likewise.
3856 (registers_from_string): Likewise.
3857 (find_regno): Likewise.
3858 (supply_regblock): Likewise.
3859 (regcache_raw_read_unsigned): Likewise.
3860 * tdesc.c (init_target_desc): Likewise.
3861 (tdesc_create_reg): Likewise.
3862 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3863 (struct target_desc) <reg_defs>: Convert to "std::vector".
3864 (target_desc): Do not initialize "reg_defs".
3865 (~target_desc): Update code to use "std::vector" instead of "VEC"
3866 for "target_desc.reg_defs".
3867 (operator==): Likewise.
3868
3869 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3870
3871 * inferiors.h (thread_to_gdb_id): Remove.
3872 * inferiors.c (thread_to_gdb_id): Remove.
3873 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3874 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3875 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3876 Likewise.
3877 * nto-low.c (nto_fetch_registers, nto_store_registers,
3878 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3879
3880 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3881
3882 * inferiors.h (gdb_id_to_thread_id): Remove.
3883 * inferiors.c (gdb_id_to_thread_id): Remove.
3884 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
3885 removal. Move pid declaration closer to where it's used.
3886
3887 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3888
3889 * server.c (handle_detach): New function.
3890 (process_serial_event): Move code out, call handle_detach.
3891
3892 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3893
3894 * server.c (require_running): Rename to ...
3895 (require_running_or_return): ... this ...
3896 (require_running_or_break): ... and this.
3897 (handle_query, process_serial_event): Adjust.
3898
3899 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3900
3901 * linux-low.c (linux_set_resume_request): Remove unused
3902 variables.
3903
3904 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3905
3906 * server.c (first_thread_of): Remove.
3907 (process_serial_event): Replace usage of first_thread_of with
3908 find_any_thread_of_pid.
3909 * tracepoint.c (same_process_p): Remove.
3910 (gdb_agent_about_to_close): Replace usage of same_process_p with
3911 find_any_thread_of_pid.
3912 * linux-x86-low.c (same_process_callback): Remove.
3913 (x86_arch_setup_process_callback): Replace usage of
3914 same_process_callback with find_any_thread_of_pid.
3915 * thread-db.c (any_thread_of): Remove.
3916 (switch_to_process): Replace usage of any_thread_of with
3917 find_any_thread_of_pid.
3918 * inferiors.c (thread_pid_matches_callback): Remove.
3919 (find_thread_process): Adjust to use find_any_thread_of_pid.
3920
3921 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3922
3923 * regcache.c (get_thread_regcache): Guard calls to "memset"
3924 with "!VEC_empty".
3925
3926 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
3927
3928 * linux-low.c (handle_extended_wait): Use
3929 "allocate_target_description" instead of "XNEW".
3930 * linux-x86-low.c (initialize_low_arch): Likewise.
3931
3932 2017-09-05 Yao Qi <yao.qi@linaro.org>
3933
3934 * configure.srv (srv_i386_regobj): Remove.
3935 (srv_amd64_regobj): Remove.
3936 (srv_regobj): Set it to "" for x86 non-linux targets.
3937 * linux-x86-tdesc.c (i386_linux_read_description):
3938 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
3939 (init_registers_i386): Remove the declaration.
3940 (tdesc_i386): Remove the declaration.
3941 (lynx_i386_arch_setup): Call i386_create_target_description.
3942 * nto-x86-low.c: Likewise.
3943 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
3944 [!__x86_64__]: include arch/i386.h.
3945 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
3946
3947 2017-09-05 Yao Qi <yao.qi@linaro.org>
3948
3949 * configure.srv (srv_amd64_linux_xmlfiles): Remove
3950 i386/amd64-XXX-linux from it.
3951
3952 2017-09-05 Yao Qi <yao.qi@linaro.org>
3953
3954 * configure.srv: Empty srv_amd64_linux_regobj if $development is
3955 false.
3956 (ipa_amd64_linux_regobj): Remove.
3957 (ipa_x32_linux_regobj): Remove.
3958
3959 2017-09-05 Yao Qi <yao.qi@linaro.org>
3960
3961 * Makefile.in (arch-amd64.o): New rule.
3962 * configure.srv: Append arch-amd64.o.
3963 * linux-amd64-ipa.c: Include common/x86-xstate.h.
3964 (get_ipa_tdesc): Call amd64_linux_read_description.
3965 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
3966 and init_registers_amd64_XXX.
3967 * linux-x86-low.c (x86_linux_read_description): Call
3968 amd64_linux_read_description.
3969 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
3970 (initialize_low_arch): Don't call init_registers_x32_XXX and
3971 init_registers_amd64_XXX.
3972 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
3973 and tdesc_amd64_XXX.
3974 [__x86_64__] (amd64_tdesc_test): New function.
3975 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
3976 and init_registers_amd64_XXX.
3977 * linux-x86-tdesc.c: Include arch/amd64.h.
3978 (xcr0_to_tdesc_idx): New function.
3979 (i386_linux_read_description): New function.
3980 (amd64_get_ipa_tdesc_idx): New function.
3981 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
3982 (amd64_get_ipa_tdesc): Declare.
3983
3984 2017-09-05 Yao Qi <yao.qi@linaro.org>
3985
3986 * configure.srv (srv_i386_linux_xmlfiles): Remove
3987 i386/i386-XXX-linux.xml from it.
3988
3989 2017-09-05 Yao Qi <yao.qi@linaro.org>
3990
3991 * configure.srv: Set srv_i386_linux_regobj empty if $development
3992 is false.
3993 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
3994 initialize_low_tdesc.
3995 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
3996 with #if initialize_low_tdesc.
3997 * linux-x86-tdesc-selftest.c: New file.
3998 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
3999
4000 2017-09-05 Yao Qi <yao.qi@linaro.org>
4001
4002 * Makefile.in (arch-i386.o): New rule.
4003 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4004 (x86_64-*-linux*): Likewise.
4005 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4006 include arch/i386.h.
4007 (i386_linux_read_description): Remove code and call
4008 i386_create_target_description.
4009 * tdesc.c (allocate_target_description): New function.
4010 * tdesc.h (set_tdesc_architecture): Remove declaration.
4011 (set_tdesc_osabi): Likewise.
4012
4013 2017-09-05 Yao Qi <yao.qi@linaro.org>
4014
4015 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4016 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4017 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4018 .xmltarget.
4019 * server.c (get_features_xml): Call tdesc_get_features_xml.
4020 * tdesc.c (set_tdesc_architecture): New function.
4021 (set_tdesc_osabi): New function.
4022 (tdesc_get_features_xml): New function.
4023 (tdesc_create_feature): Add an argument.
4024 * tdesc.h (struct target_desc) <features>: New field.
4025 <arch, osabi>: New field.
4026 (~target_desc): xfree features, arch, and osabi.
4027 (target_desc::oerator==): Don't compare .xmltarget.
4028 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4029 (set_tdesc_osabi): Likewise.
4030 (tdesc_get_features_xml): Likewise.
4031
4032 2017-09-05 Yao Qi <yao.qi@linaro.org>
4033
4034 * linux-x86-tdesc.c: Include selftest.h.
4035 (i386_tdesc_test): New function.
4036 (initialize_low_tdesc): Call selftests::register_test.
4037 * tdesc.h: Include regdef.h.
4038 (target_desc): Override operator == and !=.
4039
4040 2017-09-05 Yao Qi <yao.qi@linaro.org>
4041
4042 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4043 (ipa_obj): Likewise.
4044 * linux-i386-ipa.c: Include common/x86-xstate.h
4045 (get_ipa_tdesc): Call i386_linux_read_description.
4046 (initialize_low_tracepoint): Don't call init_registers_XXX
4047 functions, call initialize_low_tdesc instead.
4048 * linux-x86-low.c (x86_linux_read_description): Call
4049 i386_linux_read_description.
4050 (initialize_low_arch): Don't call init_registers_i386_XXX
4051 functions, call initialize_low_tdesc.
4052 * linux-x86-tdesc.c: New file.
4053 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4054 (i386_get_ipa_tdesc_idx): Declare.
4055 (i386_get_ipa_tdesc): Declare.
4056 (initialize_low_tdesc): Declare.
4057
4058 2017-09-05 Yao Qi <yao.qi@linaro.org>
4059
4060 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4061 instead of 0.
4062
4063 2017-09-05 Yao Qi <yao.qi@linaro.org>
4064
4065 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4066 * regcache.c (get_thread_regcache): Use VEC_length.
4067 (init_register_cache): Likewise.
4068 (regcache_cpy): Likewise.
4069 (registers_to_string): Iterate reg_defs via VEC_iterate.
4070 (find_regno): Likewise.
4071 (find_register_by_number): Use VEC_index.
4072 (register_size): Call find_register_by_number.
4073 (register_data): Call find_register_by_number.
4074 (supply_regblock): Use VEC_length.
4075 (regcache_raw_read_unsigned): Likewise.
4076 * tdesc.c (init_target_desc): Iterate reg_defs via
4077 VEC_iterate.
4078 (default_description): Update initializer.
4079 (copy_target_description): Don't update field num_registers.
4080 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4081 <num_registers>: Remove.
4082
4083 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4084
4085 * Makefile.in (.SECONDARY): Define target.
4086
4087 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4088
4089 * linux-low.c (linux_wait_1): Adjust.
4090 * server.c (queue_stop_reply_callback): Adjust.
4091
4092 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4093
4094 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4095 QEnvironmentUnset and QEnvironmentReset packets.
4096 (handle_query): Inform remote that QEnvironmentHexEncoded,
4097 QEnvironmentUnset and QEnvironmentReset are supported.
4098
4099 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4100
4101 * inferiors.h (inferior_target_data): Rename to ...
4102 (thread_target_data): ... this.
4103 (inferior_regcache_data): Rename to ...
4104 (thread_regcache_data): ... this.
4105 (set_inferior_regcache_data): Rename to ...
4106 (set_thread_regcache_data): ... this.
4107 * inferiors.c (inferior_target_data): Rename to ...
4108 (thread_target_data): ... this.
4109 (inferior_regcache_data): Rename to ...
4110 (thread_regcache_data): ... this.
4111 (set_inferior_regcache_data): Rename to ...
4112 (set_thread_regcache_data): ... this.
4113 (free_one_thread): Update.
4114 * linux-low.h (get_thread_lwp): Update.
4115 * regcache.c (get_thread_regcache): Update.
4116 (regcache_invalidate_thread): Update.
4117 (free_register_cache_thread): Update.
4118 * win32-i386-low.c (update_debug_registers_callback): Update.
4119 (win32_get_current_dr): Update.
4120 * win32-low.c (thread_rec): Update.
4121 (delete_thread_info): Update.
4122 (continue_one_thread): Update.
4123 (suspend_one_thread): Update.
4124
4125 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4126
4127 * inferiors.c (set_inferior_target_data): Remove.
4128 * inferiors.h (set_inferior_target_data): Remove.
4129
4130 2017-08-18 Yao Qi <yao.qi@linaro.org>
4131
4132 * Makefile.in (OBS): Add selftest.o.
4133 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4134 * configure, config.in: Re-generated.
4135 * server.c: Include common/sefltest.h.
4136 (captured_main): Handle option --selftest.
4137
4138 2017-08-09 Yao Qi <yao.qi@linaro.org>
4139
4140 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4141 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4142 i386-avx-mpx.o and i386-mmx.o.
4143 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4144 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4145 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4146 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4147 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4148 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4149 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4150 i386/amd64-avx-mpx.xml.
4151
4152 2017-08-09 Yao Qi <yao.qi@linaro.org>
4153
4154 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4155 and x32-avx-avx512.o.
4156 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4157 i386/x32-avx-avx512.xml.
4158
4159 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4160
4161 * tracepoint.h (enum class fast_tpoint_collect_result): New
4162 enumeration.
4163 (fast_tracepoint_collecting): Change return type to
4164 fast_tpoint_collect_result.
4165 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4166 * linux-low.h: Include tracepoint.h.
4167 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4168 fast_tpoint_collect_result.
4169 * linux-low.c (handle_tracepoints): Adjust.
4170 (linux_fast_tracepoint_collecting): Change return type to
4171 fast_tpoint_collect_result.
4172 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4173 linux_wait_1, stuck_in_jump_pad_callback,
4174 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4175 proceed_one_lwp): Adjust to type change.
4176
4177 2017-07-10 Yao Qi <yao.qi@linaro.org>
4178
4179 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4180
4181 2017-06-29 Yao Qi <yao.qi@linaro.org>
4182
4183 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4184 Remove.
4185 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4186
4187 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4188
4189 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4190
4191 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4192
4193 * linux-low.c (linux_create_inferior): Adjust code to access the
4194 environment information via 'gdb_environ' class.
4195 * lynx-low.c (lynx_create_inferior): Likewise.
4196 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4197 (get_environ): Return a pointer to 'our_environ'.
4198 (captured_main): Initialize 'our_environ'.
4199 * server.h (get_environ): Adjust prototype.
4200 * spu-low.c (spu_create_inferior): Adjust code to access the
4201 environment information via 'gdb_environ' class.
4202
4203 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4204
4205 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4206 usage of "register" keyword.
4207
4208 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4209
4210 * configure: Re-generate.
4211
4212 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4213
4214 * configure: Re-generate.
4215
4216 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4217
4218 * Makefile.in (COMPILE.pre): Add "-x c++".
4219
4220 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4221
4222 * fork-child.c: Conditionally include <signal.h>.
4223
4224 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4225
4226 * server.c (handle_general_set): Handle new packet
4227 "QStartupWithShell".
4228 (handle_query): Add "QStartupWithShell" to the list of supported
4229 packets.
4230 (gdbserver_usage): Add help text explaining the
4231 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4232 options.
4233 (captured_main): Recognize and act upon the presence of the new
4234 CLI options.
4235
4236 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4237 Pedro Alves <palves@redhat.com>
4238
4239 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4240 * configure: Regenerate.
4241 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4242 "fork-inferior.o".
4243 (i[34567]86-*-lynxos*): Likewise.
4244 (spu*-*-*): Likewise.
4245 * fork-child.c: New file.
4246 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4247 and "environ.h".
4248 (linux_ptrace_fun): New function.
4249 (linux_create_inferior): Adjust function prototype to reflect
4250 change on "target.h". Adjust function code to use
4251 "fork_inferior".
4252 (linux_request_interrupt): Delete "signal_pid".
4253 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4254 (lynx_ptrace_fun): New function.
4255 (lynx_create_inferior): Adjust function prototype to reflect
4256 change on "target.h". Adjust function code to use
4257 "fork_inferior".
4258 * nto-low.c (nto_create_inferior): Adjust function prototype and
4259 code to reflect change on "target.h". Update comments.
4260 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4261 "common-terminal.h" and "environ.h".
4262 (terminal_fd): Moved to fork-child.c.
4263 (old_foreground_pgrp): Likewise.
4264 (restore_old_foreground_pgrp): Likewise.
4265 (last_status): Make it global.
4266 (last_ptid): Likewise.
4267 (our_environ): New variable.
4268 (startup_with_shell): Likewise.
4269 (program_name): Likewise.
4270 (program_argv): Rename to...
4271 (program_args): ...this.
4272 (wrapper_argv): New variable.
4273 (start_inferior): Delete function.
4274 (get_exec_wrapper): New function.
4275 (get_exec_file): Likewise.
4276 (get_environ): Likewise.
4277 (prefork_hook): Likewise.
4278 (post_fork_inferior): Likewise.
4279 (postfork_hook): Likewise.
4280 (postfork_child_hook): Likewise.
4281 (handle_v_run): Update code to deal with arguments coming from the
4282 remote host. Update calls from "start_inferior" to
4283 "create_inferior".
4284 (captured_main): Likewise. Initialize environment variable. Call
4285 "have_job_control".
4286 * server.h (post_fork_inferior): New prototype.
4287 (get_environ): Likewise.
4288 (last_status): Declare.
4289 (last_ptid): Likewise.
4290 (signal_pid): Likewise.
4291 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4292 (spu_ptrace_fun): New function.
4293 (spu_create_inferior): Adjust function prototype to reflect change
4294 on "target.h". Adjust function code to use "fork_inferior".
4295 * target.c (target_terminal_init): New function.
4296 (target_terminal_inferior): Likewise.
4297 (target_terminal_ours): Likewise.
4298 * target.h: Include <vector>.
4299 (struct target_ops) <create_inferior>: Update prototype.
4300 (create_inferior): Update macro.
4301 * utils.c (gdb_flush_out_err): New function.
4302 * win32-low.c (win32_create_inferior): Adjust function prototype
4303 and code to reflect change on "target.h".
4304
4305 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4306
4307 * inferiors.c (switch_to_thread): New function.
4308
4309 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4310
4311 * Makefile.in (SFILE): Add "common/job-control.c".
4312 (OBS): Add "job-control.o".
4313
4314 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4315
4316 * Makefile: Remove "@host_makefile_frag@".
4317
4318 2017-05-05 Pedro Alves <palves@redhat.com>
4319
4320 * configure: Regenerate.
4321
4322 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4323
4324 * configure: Regenerate.
4325
4326 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4327
4328 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4329 software_single_step change of return type to
4330 std::vector<CORE_ADDR>.
4331 * linux-low.c (install_software_single_step_breakpoints):
4332 Likewise.
4333 * linux-low.h (install_software_single_step_breakpoints):
4334 Likewise.
4335
4336 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4337
4338 * remote-utils.c: Include "gdb_termios.h" instead of
4339 "terminal.h".
4340 * terminal.h: Delete file.
4341
4342 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4343
4344 * server.c: Include <vector>.
4345 <program_argv, wrapper_argv>: Convert to std::vector.
4346 (start_inferior): Rewrite function to use C++.
4347 (handle_v_run): Likewise. Update code that calculates the argv
4348 based on the vRun packet; use C++.
4349 (captured_main): Likewise.
4350
4351 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4352
4353 * server.c (handle_v_cont): Initialize thread_resume::thread
4354 with null_ptid.
4355
4356 2017-04-05 Pedro Alves <palves@redhat.com>
4357
4358 * configure: Regenerate.
4359
4360 2017-04-05 Pedro Alves <palves@redhat.com>
4361
4362 * gdbreplay.c (sync_error): Constify.
4363 * linux-x86-low.c (push_opcode): Constify.
4364
4365 2017-04-05 Pedro Alves <palves@redhat.com>
4366
4367 * win32-low.c (get_child_debug_event)
4368 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4369 Report TARGET_WAITKIND_SPURIOUS instead.
4370
4371 2017-04-05 Pedro Alves <palves@redhat.com>
4372
4373 * remote-utils.c (remote_prepare, remote_open): Constify.
4374 * remote-utils.h (remote_prepare, remote_open): Constify.
4375 * server.c (captured_main): Constify 'port' handling.
4376
4377 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4378
4379 * Makefile.in (clean): Clear .deps.
4380
4381 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4382
4383 * .gitignore: Remove generated files, replace with wildcard.
4384 * (clean): Replace removal of generated files with wildcard.
4385 (version.c): Replace with...
4386 (version-generated.c): ...this.
4387 (xml-builtin.c): Replace with...
4388 (xml-builtin-generated.c): ...this.
4389 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4390 (%.c: *regformats*): Replace with...
4391 (%-generated.c: *regformats*): ...this.
4392
4393 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4394
4395 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4396 (xtensa_fill_gregset): Call collect_register_by_name for
4397 threadptr register.
4398 (xtensa_store_gregset): Call supply_register_by_name for
4399 threadptr register.
4400
4401 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4402
4403 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4404 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4405 (xtensa_store_gregset): Call supply_register for all registers in
4406 a0_regnum..a0_regnum + C0_NREGS range.
4407
4408 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4409
4410 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4411 (ax-ipa.o: ax.c): Remove.
4412 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4413 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4414 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4415 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4416 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4417
4418 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4419
4420 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4421 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4422 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4423 (errors-ipa.o: ../common/errors.c): Remove.
4424 (format-ipa.o: ../common/format.c): Remove.
4425 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4426
4427 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4428
4429 * Makefile.in (%-ipa.o: %.c): New rule.
4430 (tracepoint-ipa.o: tracepoint.c): Remove.
4431 (utils-ipa.o: utils.c): Remove.
4432 (remote-utils-ipa.o: remote-utils.c): Remove.
4433 (regcache-ipa.o: regcache.c): Remove.
4434 (i386-linux-ipa.o: i386-linux.c): Remove.
4435 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4436 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4437 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4438 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4439 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4440 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4441 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4442 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4443 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4444 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4445 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4446 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4447 (aarch64-ipa.o: aarch64.c): Remove.
4448 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4449 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4450 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4451 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4452 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4453 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4454 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4455 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4456 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4457 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4458 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4459 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4460 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4461 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4462 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4463 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4464 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4465 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4466 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4467 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4468 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4469 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4470 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4471 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4472 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4473 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4474 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4475 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4476 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4477 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4478 (tdesc-ipa.o: tdesc.c): Remove.
4479 (x32-linux-ipa.o: x32-linux.c): Remove.
4480 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4481 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4482
4483 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4484
4485 * Makefile.in (%.o: ../arch/%.c): New rule.
4486 (arm.o: ../arch/arm.c): Remove.
4487 (arm-linux.o: ../arch/arm-linux.c): Remove.
4488 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4489 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4490
4491 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4492
4493 * Makefile.in (%.o: ../nat/%.c): New rule.
4494 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4495 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4496 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4497 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4498 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4499 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4500 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4501 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4502 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4503 (linux-personality.o: ../nat/linux-personality.c): Remove.
4504 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4505 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4506 (x86-linux.o: ../nat/x86-linux.c): Remove.
4507 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4508 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4509
4510 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4511
4512 * Makefile.in (%.o: ../common/%.c): New rule.
4513 (signals.o: ../common/signals.c): Remove.
4514 (print-utils.o: ../common/print-utils.c): Remove.
4515 (rsp-low.o: ../common/rsp-low.c): Remove.
4516 (common-utils.o: ../common/common-utils.c): Remove.
4517 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4518 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4519 (vec.o: ../common/vec.c): Remove.
4520 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4521 (xml-utils.o: ../common/xml-utils.c): Remove.
4522 (ptid.o: ../common/ptid.c): Remove.
4523 (buffer.o: ../common/buffer.c): Remove.
4524 (format.o: ../common/format.c): Remove.
4525 (filestuff.o: ../common/filestuff.c): Remove.
4526 (agent.o: ../common/agent.c): Remove.
4527 (errors.o: ../common/errors.c): Remove.
4528 (environ.o: ../common/environ.c): Remove.
4529 (common-debug.o: ../common/common-debug.c): Remove.
4530 (cleanups.o: ../common/cleanups.c): Remove.
4531 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4532 (fileio.o: ../common/fileio.c): Remove.
4533 (common-regcache.o: ../common/common-regcache.c): Remove.
4534 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4535 (new-op.o: ../common/new-op.c): Remove.
4536 (btrace-common.o: ../common/btrace-common.c): Remove.
4537
4538 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4539
4540 * Makefile.in (%.o: ../target/%.c): New rule.
4541 (waitstatus.o: ../target/waitstatus.c): Remove.
4542
4543 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4544
4545 * Makefile.in
4546 (%.c: ../regformats/%.dat,
4547 (%.c: ../regformats/arm/%.dat,
4548 (%.c: ../regformats/i386/%.dat,
4549 (%.c: ../regformats/rs6000/%.dat): New rules.
4550 (aarch64.c): Remove.
4551 (reg-arm.c): Remove.
4552 (arm-with-iwmmxt.c): Remove.
4553 (arm-with-vfpv2.c): Remove.
4554 (arm-with-vfpv3.c): Remove.
4555 (arm-with-neon.c): Remove.
4556 (reg-bfin.c): Remove.
4557 (reg-cris.c): Remove.
4558 (reg-crisv32.c): Remove.
4559 (i386.c): Remove.
4560 (i386-linux.c): Remove.
4561 (i386-avx.c): Remove.
4562 (i386-avx-linux.c): Remove.
4563 (i386-avx-avx512.c): Remove.
4564 (i386-avx-avx512-linux.c): Remove.
4565 (i386-mpx.c): Remove.
4566 (i386-mpx-linux.c): Remove.
4567 (i386-avx-mpx-avx512-pku.c): Remove.
4568 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4569 (i386-avx-mpx.c): Remove.
4570 (i386-avx-mpx-linux.c): Remove.
4571 (i386-mmx.c): Remove.
4572 (i386-mmx-linux.c): Remove.
4573 (reg-ia64.c): Remove.
4574 (reg-m32r.c): Remove.
4575 (reg-m68k.c): Remove.
4576 (reg-cf.c): Remove.
4577 (mips-linux.c): Remove.
4578 (mips-dsp-linux.c): Remove.
4579 (mips64-linux.c): Remove.
4580 (mips64-dsp-linux.c): Remove.
4581 (nios2-linux.c): Remove.
4582 (powerpc-32.c): Remove.
4583 (powerpc-32l.c): Remove.
4584 (powerpc-altivec32l.c): Remove.
4585 (powerpc-cell32l.c): Remove.
4586 (powerpc-vsx32l.c): Remove.
4587 (powerpc-isa205-32l.c): Remove.
4588 (powerpc-isa205-altivec32l.c): Remove.
4589 (powerpc-isa205-vsx32l.c): Remove.
4590 (powerpc-e500l.c): Remove.
4591 (powerpc-64l.c): Remove.
4592 (powerpc-altivec64l.c): Remove.
4593 (powerpc-cell64l.c): Remove.
4594 (powerpc-vsx64l.c): Remove.
4595 (powerpc-isa205-64l.c): Remove.
4596 (powerpc-isa205-altivec64l.c): Remove.
4597 (powerpc-isa205-vsx64l.c): Remove.
4598 (s390-linux32.c): Remove.
4599 (s390-linux32v1.c): Remove.
4600 (s390-linux32v2.c): Remove.
4601 (s390-linux64.c): Remove.
4602 (s390-linux64v1.c): Remove.
4603 (s390-linux64v2.c): Remove.
4604 (s390-te-linux64.c): Remove.
4605 (s390-vx-linux64.c): Remove.
4606 (s390-tevx-linux64.c): Remove.
4607 (s390x-linux64.c): Remove.
4608 (s390x-linux64v1.c): Remove.
4609 (s390x-linux64v2.c): Remove.
4610 (s390x-te-linux64.c): Remove.
4611 (s390x-vx-linux64.c): Remove.
4612 (s390x-tevx-linux64.c): Remove.
4613 (tic6x-c64xp-linux.c): Remove.
4614 (tic6x-c64x-linux.c): Remove.
4615 (tic6x-c62x-linux.c): Remove.
4616 (reg-sh.c): Remove.
4617 (reg-sparc64.c): Remove.
4618 (reg-spu.c): Remove.
4619 (amd64.c): Remove.
4620 (amd64-linux.c): Remove.
4621 (amd64-avx.c): Remove.
4622 (amd64-avx-linux.c): Remove.
4623 (amd64-avx-avx512.c): Remove.
4624 (amd64-avx-avx512-linux.c): Remove.
4625 (amd64-mpx.c): Remove.
4626 (amd64-mpx-linux.c): Remove.
4627 (amd64-avx-mpx-avx512-pku.c): Remove.
4628 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4629 (amd64-avx-mpx.c): Remove.
4630 (amd64-avx-mpx-linux.c): Remove.
4631 (x32.c): Remove.
4632 (x32-linux.c): Remove.
4633 (x32-avx.c): Remove.
4634 (x32-avx-linux.c): Remove.
4635 (x32-avx-avx512.c): Remove.
4636 (x32-avx-avx512-linux.c): Remove.
4637 (reg-xtensa.c): Remove.
4638 (reg-tilegx.c): Remove.
4639 (reg-tilegx32.c): Remove.
4640
4641 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4642
4643 * Makefile.in (SFILES): Add "common/environ.c".
4644 (OBJS): Add "common/environ.h".
4645
4646 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4647
4648 * configure.ac: Check if the fs_base and gs_base members of
4649 `struct user_regs_struct' exist.
4650 * config.in: Regenerated.
4651 * configure: Likewise.
4652
4653 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4654
4655 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4656 target_read_memory.
4657 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4658 (get_next_pcs_syscall_next_pc): Likewise.
4659
4660 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4661
4662 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4663 * nto-x86-low.c: Likewise.
4664
4665 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4666
4667 * Makefile.in: Include disable-implicit-rules.mk.
4668
4669 2016-11-23 Pedro Alves <palves@redhat.com>
4670
4671 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4672 (debug_vprintf): Use std::chrono::steady_clock instead of
4673 gettimeofday. Use '.' instead of ':'.
4674 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4675 (get_timestamp): Use std::chrono::steady_clock instead of
4676 gettimeofday.
4677
4678 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4679
4680 * Makefile.in: Fix whitespace formatting.
4681
4682 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4683
4684 * Makefile.in (SFILES, OBS): Flatten list and order
4685 alphabetically.
4686
4687 2016-11-23 Pedro Alves <palves@redhat.com>
4688
4689 * event-loop.c (handle_file_event): Use warning.
4690 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4691 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4692 Use warning.
4693
4694 2016-11-23 Pedro Alves <palves@redhat.com>
4695
4696 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4697 output.
4698 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4699 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4700 debug_printf and debug_flush for debug output.
4701 * server.c (handle_general_set): Likewise.
4702 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4703 output.
4704
4705 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4706
4707 * Makefile.in (.c.o): Replace rule with ...
4708 (%.o: %.c): ... this one.
4709
4710 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4711
4712 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4713 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4714 make.
4715 * configure.ac: Remove checks for the make program.
4716 * configure: Re-generate.
4717
4718 2016-10-28 Pedro Alves <palves@redhat.com>
4719
4720 * Makefile.in (CXX_DIALECT): Get from configure.
4721 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4722 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4723 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4724 * config.in: Regenerate.
4725 * configure: Regenerate.
4726
4727 2016-10-27 Yao Qi <yao.qi@linaro.org>
4728
4729 * linux-low.c (linux_supports_range_stepping): Return true if
4730 can_software_single_step return true.
4731
4732 2016-10-27 Yao Qi <yao.qi@linaro.org>
4733
4734 * inferiors.c (find_inferior_in_random): New function.
4735 * inferiors.h (find_inferior_in_random): Declare.
4736 * linux-low.c (linux_wait_for_event_filtered): Call
4737 find_inferior_in_random instead of find_inferior.
4738
4739 2016-10-27 Yao Qi <yao.qi@linaro.org>
4740
4741 * linux-low.c (linux_wait_1): If single-step breakpoints are
4742 inserted, remove them.
4743
4744 2016-10-26 Pedro Alves <palves@redhat.com>
4745
4746 * linux-low.c (handle_extended_wait): Link parent/child fork
4747 threads.
4748 (linux_wait_1): Unlink them.
4749 (linux_set_resume_request): Ignore resume requests for
4750 already-resumed and unhandled fork child threads.
4751 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4752 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4753 New functions.
4754 (handle_v_requests) <vCont>: Don't call require_running.
4755 * server.h (in_queued_stop_replies): New declaration.
4756
4757 2016-10-24 Yao Qi <yao.qi@linaro.org>
4758
4759 PR server/20733
4760 * linux-aarch64-low.c (append_insns): Cast the return value to
4761 'uint32_t *'.
4762
4763 2016-10-10 Yao Qi <yao.qi@linaro.org>
4764
4765 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4766
4767 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4768
4769 * target.c (target_supports_multi_process): New function, moved
4770 from...
4771 * target.h (target_supports_multi_process): ... here. Remove
4772 macro.
4773
4774 2016-10-05 Tom Tromey <tom@tromey.com>
4775
4776 PR remote/20655:
4777 * tracepoint.c (handle_tracepoint_bkpts): Check
4778 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4779
4780 2016-10-05 Yao Qi <yao.qi@linaro.org>
4781
4782 * configure.srv: Update the path of arm-*.xml files.
4783
4784 2016-10-05 Terry Guo <terry.guo@arm.com>
4785 Yao Qi <yao.qi@linaro.org>
4786
4787 * Makefile.in: Adjust the path of rules.
4788 * configure.srv: Update the path of xml files.
4789 * regformats/arm-with-iwmmxt.dat: Regenerated.
4790 * regformats/arm-with-neon.dat: Likewise.
4791 * regformats/arm-with-vfpv2.dat: Likewise.
4792 * regformats/arm-with-vfpv3.dat Likewise.
4793
4794 2016-09-30 Yao Qi <yao.qi@linaro.org>
4795
4796 PR gdbserver/20627
4797 * target.c (target_stop_and_wait): Don't call
4798 target_continue_no_signal, use resume_stop instead.
4799
4800 2016-09-26 Yao Qi <yao.qi@linaro.org>
4801
4802 * linux-low.c (linux_wait_1): Call debug_exit.
4803
4804 2016-09-23 Pedro Alves <palves@redhat.com>
4805
4806 * Makefile.in (SFILES): Add common/new-op.c.
4807 (OBS): Add common/new-op.o.
4808 (new-op.o): New rule.
4809
4810 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4811
4812 * .gitinore: Ignore more files.
4813
4814 2016-09-21 Yao Qi <yao.qi@linaro.org>
4815
4816 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4817 23.
4818
4819 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4820
4821 * server.c (start_inferior): Call target_mourn_inferior instead of
4822 mourn_inferior; pass ptid_t argument to it.
4823 (resume): Likewise.
4824 (handle_target_event): Likewise.
4825 * target.c (target_mourn_inferior): New function.
4826 * target.h (mourn_inferior): Delete macro.
4827
4828 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4829
4830 * linux-low.c (lwp_is_stepping): New function.
4831
4832 2016-09-06 Carl Love <cel@us.ibm.com>
4833
4834 * server.c (start_inferior): Fixed comment, requested comment change
4835 didn't get updated correctly. Removed reference to ptrace () call as
4836 it is only true on Linux systems.
4837
4838 2016-09-06 Carl Love <cel@us.ibm.com>
4839
4840 * server.c (start_inferior): Do not call
4841 function target_post_create_inferior () if the
4842 inferior process has already exited.
4843
4844 2016-09-05 Pedro Alves <palves@redhat.com>
4845
4846 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4847 (COMPILE.pre, CC_LD): Use CXX directly.
4848 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4849 * acinclude.m4: Don't include build-with-cxx.m4.
4850 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4851 * configure: Regenerate.
4852
4853 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4854
4855 PR gdb/19495
4856 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4857 call writing data to own_buf.
4858
4859 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4860
4861 * target.c (mywait): Call target_wait instead of
4862 the_target->wait.
4863 (target_wait): New function.
4864
4865 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4866
4867 * server.c (start_inferior): New variable 'ptid'. Replace calls
4868 to the_target->resume by target_continue{,_no_signal}, depending
4869 on the case.
4870 * target.c (target_stop_and_wait): Call target_continue_no_signal
4871 instead of the_target->resume.
4872 (target_continue): New function.
4873
4874 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4875
4876 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4877
4878 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4879
4880 PR server/20491
4881 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
4882 ps_prochandle.
4883 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
4884 * linux-arm-low.c (ps_get_thread_area): Likewise.
4885 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
4886 * linux-m68k-low.c (ps_get_thread_area): Likewise.
4887 * linux-mips-low.c (ps_get_thread_area): Likewise.
4888 * linux-nios2-low.c (ps_get_thread_area): Likewise.
4889 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
4890 * linux-x86-low.c (ps_get_thread_area): Likewise.
4891 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
4892
4893 2016-08-19 Pedro Alves <palves@redhat.com>
4894
4895 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
4896
4897 2016-08-19 Pedro Alves <palves@redhat.com>
4898
4899 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
4900 comment. Use memcpy instead of casting through unsigned long.
4901
4902 2016-08-19 Pedro Alves <palves@redhat.com>
4903
4904 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
4905 allocating around 0x80000000.
4906
4907 2016-08-19 Pedro Alves <palves@redhat.com>
4908
4909 PR gdb/20415
4910 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
4911 (x32-avx512-linux-ipa.o): New rules.
4912 * configure.ac (x86_64-*-linux*): New x32 check.
4913 * configure.srv (ipa_x32_linux_regobj): New.
4914 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
4915 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
4916 descriptions.
4917 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
4918 descriptions.
4919 * configure: Regenerate.
4920
4921 2016-08-09 Pedro Alves <palves@redhat.com>
4922
4923 PR gdb/18653
4924 * Makefile.in (OBS): Add signals-state-save-restore.o.
4925 (signals-state-save-restore.o): New rule.
4926 * config.in: Regenerate.
4927 * configure: Regenerate.
4928 * linux-low.c: Include "signals-state-save-restore.h".
4929 (linux_create_inferior): Call
4930 restore_original_signals_state.
4931 * server.c: Include "dispositions-save-restore.h".
4932 (captured_main): Call save_original_signals_state.
4933
4934 2016-08-05 Pedro Alves <palves@redhat.com>
4935
4936 * configure: Regenerate.
4937
4938 2016-08-04 Yao Qi <yao.qi@linaro.org>
4939
4940 * linux-low.c (regsets_fetch_inferior_registers): Check
4941 errno is ESRCH or not.
4942
4943 2016-08-02 Yao Qi <yao.qi@linaro.org>
4944
4945 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
4946 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
4947 (thread_db_load_search): Update.
4948 (try_thread_db_load_1): Don't look for td_ta_event_addr,
4949 td_ta_set_event and td_ta_event_getmsg.
4950
4951 2016-07-26 Pedro Alves <palves@redhat.com>
4952
4953 PR server/20414
4954 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
4955 of unsigned long for 64-bit registers and use uint32_t instead of
4956 unsigned int for 32-bit registers.
4957
4958 2016-07-26 Pedro Alves <palves@redhat.com>
4959
4960 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
4961 to 'ptrace'.
4962
4963 2016-07-21 Tom Tromey <tom@tromey.com>
4964
4965 * configure: Rebuild.
4966
4967 2016-07-21 Yao Qi <yao.qi@linaro.org>
4968
4969 * mem-break.c (find_gdb_breakpoint): Cast bp to
4970 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
4971
4972 2016-07-21 Yao Qi <yao.qi@linaro.org>
4973
4974 * server.c (handle_v_requests): Support s and S actions
4975 if target_supports_software_single_step return true.
4976
4977 2016-07-21 Yao Qi <yao.qi@linaro.org>
4978
4979 * linux-low.c (resume_stopped_resumed_lwps): If resume request
4980 is resume_step, call maybe_hw_step.
4981 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
4982 and unstop them.
4983 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
4984 breakpoints or not.
4985 (proceed_one_lwp): If resume request is resume_step, install
4986 reinsert breakpoints and call maybe_hw_step.
4987
4988 2016-07-21 Yao Qi <yao.qi@linaro.org>
4989
4990 * linux-low.c (proceed_one_lwp): Declare.
4991 (linux_resume_one_thread): Remove local variable 'step'.
4992 Lift code enqueue signal. Call proceed_one_lwp instead of
4993 linux_resume_one_lwp.
4994
4995 2016-07-21 Yao Qi <yao.qi@linaro.org>
4996
4997 * linux-low.c (linux_resume_one_thread): Call
4998 enqueue_pending_signal.
4999
5000 2016-07-21 Yao Qi <yao.qi@linaro.org>
5001
5002 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5003 * inferiors.c (do_restore_current_thread_cleanup): New function.
5004 (make_cleanup_restore_current_thread): Likewise.
5005 * linux-low.c (install_software_single_step_breakpoints): Call
5006 make_cleanup_restore_current_thread. Switch current_thread to
5007 thread.
5008
5009 2016-07-21 Yao Qi <yao.qi@linaro.org>
5010
5011 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5012 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5013 (clone_one_breakpoint): Likewise.
5014 (delete_reinsert_breakpoints): Change parameter to thread.
5015 Callers updated.
5016 (has_reinsert_breakpoints): Likewise.
5017 (uninsert_reinsert_breakpoints): Likewise.
5018 (reinsert_reinsert_breakpoints): Likewise.
5019 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5020 (delete_reinsert_breakpoints): Likewise.
5021 (reinsert_reinsert_breakpoints): Likewise.
5022 (uninsert_reinsert_breakpoints): Likewise.
5023 (has_reinsert_breakpoints): Likewise.
5024
5025 2016-07-21 Yao Qi <yao.qi@linaro.org>
5026
5027 * inferiors.c (get_thread_process): Make parameter const.
5028 * inferiors.h (get_thread_process): Update declaration.
5029 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5030 Add new parameters child_thread and parent_thread. Callers
5031 updated.
5032 * mem-break.h (clone_all_breakpoints): Update declaration.
5033
5034 2016-07-21 Yao Qi <yao.qi@linaro.org>
5035
5036 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5037 <command_list, handler>: Remove.
5038 (struct gdb_breakpoint): New.
5039 (struct other_breakpoint): New.
5040 (struct reinsert_breakpoint): New.
5041 (is_gdb_breakpoint): New function.
5042 (any_persistent_commands): Update command_list if
5043 is_gdb_breakpoint returns true.
5044 (set_breakpoint): Create breakpoints according to their types.
5045 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5046 (set_gdb_breakpoint_1): Likewise.
5047 (set_gdb_breakpoint): Likewise.
5048 (clear_breakpoint_conditions): Change parameter type to
5049 'struct gdb_breakpoint *'.
5050 (clear_breakpoint_commands): Likewise.
5051 (clear_breakpoint_conditions_and_commands): Likewise.
5052 (add_condition_to_breakpoint): Likewise.
5053 (add_breakpoint_condition): Likewise.
5054 (add_commands_to_breakpoint): Likewise.
5055 (check_breakpoints): Check other_breakpoint.
5056 (clone_one_breakpoint): Clone breakpopint according to its type.
5057 * mem-break.h (struct gdb_breakpoint): Declare.
5058 (set_gdb_breakpoint): Update declaration.
5059 (clear_breakpoint_conditions_and_commands): Likewise.
5060 (add_breakpoint_condition): Likewise.
5061 (add_breakpoint_commands): Likewise.
5062 * server.c (process_point_options): Change parameter type to
5063 'struct gdb_breakpoint *'.
5064
5065 2016-07-21 Yao Qi <yao.qi@linaro.org>
5066
5067 * mem-break.c (set_breakpoint_at): Rename it to ...
5068 (set_breakpoint_type_at): ... it.
5069 (set_breakpoint_at): Call set_breakpoint_type_at.
5070 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5071 * mem-break.h (set_breakpoint_at): Update comments.
5072
5073 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5074
5075 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5076 to buf parameter.
5077 (nios2_store_gregset): Likewise.
5078
5079 2016-07-01 Pedro Alves <palves@redhat.com>
5080 Antoine Tremblay <antoine.tremblay@ericsson.com>
5081
5082 * linux-low.c: Change interface to take the target lwp_info
5083 pointer directly and return void. Handle detaching from a zombie
5084 thread.
5085 (linux_detach_lwp_callback): New function.
5086 (linux_detach): Detach from the leader thread after detaching from
5087 the clone threads.
5088
5089 2016-06-28 Yao Qi <yao.qi@linaro.org>
5090
5091 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5092 for variable new_offset.
5093 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5094 (aarch64_ftrace_insn_reloc_cb): Likewise.
5095 (aarch64_ftrace_insn_reloc_tb): Likewise.
5096 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5097 PRIx64 instead of PRIx32.
5098
5099 2016-06-28 Yao Qi <yao.qi@linaro.org>
5100
5101 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5102 (the_low_target): Install arm_get_syscall_trapinfo.
5103
5104 2016-06-28 Yao Qi <yao.qi@linaro.org>
5105
5106 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5107 function.
5108 (the_low_target): Install aarch64_get_syscall_trapinfo.
5109
5110 2016-06-28 Yao Qi <yao.qi@linaro.org>
5111
5112 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5113 Callers updated.
5114 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5115 Remove parameter sysno.
5116 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5117 sysret.
5118
5119 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5120
5121 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5122 (s390_emit_ne_goto): Likewise.
5123 (s390_emit_lt_goto): Likewise.
5124 (s390_emit_le_goto): Likewise.
5125 (s390_emit_gt_goto): Likewise.
5126 (s390_emit_ge_goto): Likewise.
5127 (s390x_emit_eq_goto): Likewise.
5128 (s390x_emit_ne_goto): Likewise.
5129 (s390x_emit_lt_goto): Likewise.
5130 (s390x_emit_le_goto): Likewise.
5131 (s390x_emit_gt_goto): Likewise.
5132 (s390x_emit_ge_goto): Likewise.
5133 (s390_emit_ops_impl): Mark variable static.
5134 (s390x_emit_ops): Likewise.
5135
5136 2016-06-17 Yao Qi <yao.qi@linaro.org>
5137
5138 * linux-low.c (handle_extended_wait): Call
5139 uninsert_reinsert_breakpoints for the parent process. Remove
5140 reinsert breakpoints from the child process. Reinsert them to
5141 the parent process when vfork is done.
5142 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5143 (reinsert_reinsert_breakpoints): New function.
5144 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5145 (reinsert_reinsert_breakpoints): Declare.
5146
5147 2016-06-17 Yao Qi <yao.qi@linaro.org>
5148
5149 * linux-low.c (handle_extended_wait): If the parent is doing
5150 step-over, remove the reinsert breakpoints from the forked child.
5151
5152 2016-06-17 Yao Qi <yao.qi@linaro.org>
5153
5154 * linux-low.c (unsuspend_all_lwps): Declare.
5155 (linux_low_filter_event): If thread exited, call finish_step_over.
5156 If step-over is finished, unsuspend other threads.
5157
5158 2016-06-17 Yao Qi <yao.qi@linaro.org>
5159
5160 * linux-low.c (linux_resume_one_lwp_throw): Assert
5161 has_reinsert_breakpoints returns false.
5162 * mem-break.c (delete_disabled_breakpoints): Assert
5163 bp type isn't reinsert_breakpoint.
5164
5165 2016-06-17 Yao Qi <yao.qi@linaro.org>
5166
5167 * linux-low.c (maybe_hw_step): New function.
5168 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5169 (finish_step_over): Switch current_thread to lwp temporarily,
5170 and assert has_reinsert_breakpoints returns true.
5171 (proceed_one_lwp): Call maybe_hw_step.
5172 * mem-break.c (has_reinsert_breakpoints): New function.
5173 * mem-break.h (has_reinsert_breakpoints): Declare.
5174
5175 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5176
5177 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5178
5179 2016-05-17 Yao Qi <yao.qi@linaro.org>
5180
5181 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5182 instead of find_inferior.
5183
5184 2016-05-05 Yao Qi <yao.qi@linaro.org>
5185
5186 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5187 Initialize res to zero.
5188
5189 2016-05-05 Yao Qi <yao.qi@linaro.org>
5190
5191 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5192 to uint32_t.
5193
5194 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5195
5196 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5197 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5198 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5199
5200 2016-04-28 Par Olsson <par.olsson@windriver.com>
5201 Simon Marchi <simon.marchi@ericsson.com>
5202
5203 * tracepoint.c (write_inferior_int8): New function.
5204 (cmd_qtenable_disable): Write enable flag using
5205 write_inferior_int8.
5206
5207 2016-04-25 Yao Qi <yao.qi@linaro.org>
5208
5209 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5210 (need_step_over_p): Return zero if the LWP has pending signals
5211 can be delivered on software single step target.
5212
5213 2016-04-25 Yao Qi <yao.qi@linaro.org>
5214
5215 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5216 return instead of error.
5217
5218 2016-04-22 Yao Qi <yao.qi@linaro.org>
5219
5220 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5221 to 23.
5222
5223 2016-04-22 Yao Qi <yao.qi@linaro.org>
5224
5225 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5226 signal when stepping over breakpoint with software single
5227 step.
5228
5229 2016-04-21 Pedro Alves <palves@redhat.com>
5230
5231 * linux-s390-low.c (s390_collect_ptrace_register)
5232 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5233 add casts.
5234 (s390_check_regset): Use void * instead of gdb_byte *.
5235
5236 2016-04-20 Pedro Alves <palves@redhat.com>
5237
5238 * configure: Renegerate.
5239
5240 2016-04-20 Yao Qi <yao.qi@linaro.org>
5241
5242 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5243 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5244 number 16.
5245 (arm_store_gregset): Likewise.
5246
5247 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5248
5249 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5250 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5251 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5252 (amd64-avx-mpx-linux.c): New rules.
5253 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5254 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5255 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5256 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5257 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5258 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5259 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5260 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5261 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5262 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5263 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5264 * linux-x86-low.c (x86_linux_read_description): Add case for
5265 X86_XSTATE_AVX_MPX_MASK.
5266 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5267 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5268 init_registers_i386_avx_mpx_linux.
5269 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5270 (initialize_low_tracepoint): Call
5271 init_registers_i386_avx_mpx_linux.
5272 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5273 (initialize_low_tracepoint): Call
5274 init_registers_amd64_avx_mpx_linux.
5275 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5276 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5277 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5278 declarations.
5279
5280 2016-04-18 Pedro Alves <palves@redhat.com>
5281
5282 * configure: Regenerate.
5283
5284 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5285
5286 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5287 (aarch64_emit_sub): Likewise.
5288
5289 2016-04-12 Pedro Alves <palves@redhat.com>
5290
5291 * utils.c (prepare_to_throw_exception): Delete.
5292
5293 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5294
5295 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5296
5297 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5298
5299 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5300
5301 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5302
5303 * linux-aarch64-ipa.c: Add <elf.h> include.
5304 * linux-ppc-ipa.c: Add <elf.h> include.
5305 * linux-s390-ipa.c: Add <elf.h> include.
5306
5307 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5308
5309 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5310 (get_raw_reg_ptr): Likewise.
5311 (get_trace_state_variable_value_ptr): Likewise.
5312 (set_trace_state_variable_value_ptr): Likewise.
5313 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5314 char *.
5315
5316 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5317 Marcin Kościelnicki <koriakin@0x04.net>
5318
5319 PR/17221
5320 * linux-ppc-low.c (emit_insns): New function.
5321 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5322 (ppc_emit_prologue): New function.
5323 (ppc_emit_epilogue): New function.
5324 (ppc_emit_add): New function.
5325 (ppc_emit_sub): New function.
5326 (ppc_emit_mul): New function.
5327 (ppc_emit_lsh): New function.
5328 (ppc_emit_rsh_signed): New function.
5329 (ppc_emit_rsh_unsigned): New function.
5330 (ppc_emit_ext): New function.
5331 (ppc_emit_zero_ext): New function.
5332 (ppc_emit_log_not): New function.
5333 (ppc_emit_bit_and): New function.
5334 (ppc_emit_bit_or): New function.
5335 (ppc_emit_bit_xor): New function.
5336 (ppc_emit_bit_not): New function.
5337 (ppc_emit_equal): New function.
5338 (ppc_emit_less_signed): New function.
5339 (ppc_emit_less_unsigned): New function.
5340 (ppc_emit_ref): New function.
5341 (ppc_emit_const): New function.
5342 (ppc_emit_reg): New function.
5343 (ppc_emit_pop): New function.
5344 (ppc_emit_stack_flush): New function.
5345 (ppc_emit_swap): New function.
5346 (ppc_emit_stack_adjust): New function.
5347 (ppc_emit_call): New function.
5348 (ppc_emit_int_call_1): New function.
5349 (ppc_emit_void_call_2): New function.
5350 (ppc_emit_if_goto): New function.
5351 (ppc_emit_goto): New function.
5352 (ppc_emit_eq_goto): New function.
5353 (ppc_emit_ne_goto): New function.
5354 (ppc_emit_lt_goto): New function.
5355 (ppc_emit_le_goto): New function.
5356 (ppc_emit_gt_goto): New function.
5357 (ppc_emit_ge_goto): New function.
5358 (ppc_write_goto_address): New function.
5359 (ppc_emit_ops_impl): New static variable.
5360 (ppc64v1_emit_prologue): New function.
5361 (ppc64v2_emit_prologue): New function.
5362 (ppc64_emit_epilogue): New function.
5363 (ppc64_emit_add): New function.
5364 (ppc64_emit_sub): New function.
5365 (ppc64_emit_mul): New function.
5366 (ppc64_emit_lsh): New function.
5367 (ppc64_emit_rsh_signed): New function.
5368 (ppc64_emit_rsh_unsigned): New function.
5369 (ppc64_emit_ext): New function.
5370 (ppc64_emit_zero_ext): New function.
5371 (ppc64_emit_log_not): New function.
5372 (ppc64_emit_bit_and): New function.
5373 (ppc64_emit_bit_or): New function.
5374 (ppc64_emit_bit_xor): New function.
5375 (ppc64_emit_bit_not): New function.
5376 (ppc64_emit_equal): New function.
5377 (ppc64_emit_less_signed): New function.
5378 (ppc64_emit_less_unsigned): New function.
5379 (ppc64_emit_ref): New function.
5380 (ppc64_emit_const): New function.
5381 (ppc64v1_emit_reg): New function.
5382 (ppc64v2_emit_reg): New function.
5383 (ppc64_emit_pop): New function.
5384 (ppc64_emit_stack_flush): New function.
5385 (ppc64_emit_swap): New function.
5386 (ppc64v1_emit_call): New function.
5387 (ppc64v2_emit_call): New function.
5388 (ppc64v1_emit_int_call_1): New function.
5389 (ppc64v2_emit_int_call_1): New function.
5390 (ppc64v1_emit_void_call_2): New function.
5391 (ppc64v2_emit_void_call_2): New function.
5392 (ppc64_emit_if_goto): New function.
5393 (ppc64_emit_eq_goto): New function.
5394 (ppc64_emit_ne_goto): New function.
5395 (ppc64_emit_lt_goto): New function.
5396 (ppc64_emit_le_goto): New function.
5397 (ppc64_emit_gt_goto): New function.
5398 (ppc64_emit_ge_goto): New function.
5399 (ppc64v1_emit_ops_impl): New static variable.
5400 (ppc64v2_emit_ops_impl): New static variable.
5401 (ppc_emit_ops): New function.
5402 (linux_low_target): Wire in ppc_emit_ops.
5403
5404 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5405 Marcin Kościelnicki <koriakin@0x04.net>
5406
5407 PR/17221
5408 * Makefile.in: Add powerpc-*-ipa.o
5409 * configure.srv: Add ipa_obj for powerpc*-linux.
5410 * linux-ppc-ipa.c: New file.
5411 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5412 includes.
5413 (PPC_FIELD): New macro.
5414 (PPC_SEXT): New macro.
5415 (PPC_OP6): New macro.
5416 (PPC_BO): New macro.
5417 (PPC_LI): New macro.
5418 (PPC_BD): New macro.
5419 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5420 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5421 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5422 (ppc_get_thread_area): New function.
5423 (is_elfv2_inferior): New function.
5424 (gen_ds_form): New function.
5425 (GEN_STD): New macro.
5426 (GEN_STDU): New macro.
5427 (GEN_LD): New macro.
5428 (GEN_LDU): New macro.
5429 (gen_d_form): New function.
5430 (GEN_ADDI): New macro.
5431 (GEN_ADDIS): New macro.
5432 (GEN_LI): New macro.
5433 (GEN_LIS): New macro.
5434 (GEN_ORI): New macro.
5435 (GEN_ORIS): New macro.
5436 (GEN_LWZ): New macro.
5437 (GEN_STW): New macro.
5438 (GEN_STWU): New macro.
5439 (gen_xfx_form): New function.
5440 (GEN_MFSPR): New macro.
5441 (GEN_MTSPR): New macro.
5442 (GEN_MFCR): New macro.
5443 (GEN_MTCR): New macro.
5444 (GEN_SYNC): New macro.
5445 (GEN_LWSYNC): New macro.
5446 (gen_x_form): New function.
5447 (GEN_OR): New macro.
5448 (GEN_MR): New macro.
5449 (GEN_LWARX): New macro.
5450 (GEN_STWCX): New macro.
5451 (GEN_CMPW): New macro.
5452 (gen_md_form): New function.
5453 (GEN_RLDICL): New macro.
5454 (GEN_RLDICR): New macro.
5455 (gen_i_form): New function.
5456 (GEN_B): New macro.
5457 (GEN_BL): New macro.
5458 (gen_b_form): New function.
5459 (GEN_BNE): New macro.
5460 (GEN_LOAD): New macro.
5461 (GEN_STORE): New macro.
5462 (gen_limm): New function.
5463 (gen_atomic_xchg): New function.
5464 (gen_call): New function.
5465 (ppc_relocate_instruction): New function.
5466 (ppc_install_fast_tracepoint_jump_pad): New function.
5467 (ppc_get_min_fast_tracepoint_insn_len): New function.
5468 (ppc_get_ipa_tdesc_idx): New function.
5469 (the_low_target): Wire in the new functions.
5470 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5471 tdescs.
5472 * linux-ppc-tdesc.h: New file.
5473
5474 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5475
5476 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5477 (alloc_jump_pad_buffer): New function.
5478 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5479 (alloc_jump_pad_buffer): New function.
5480 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5481 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5482 (alloc_jump_pad_buffer): New function.
5483 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5484 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5485 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5486 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5487
5488 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5489
5490 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5491 * linux-amd64-ipa.c: Likewise.
5492 * linux-i386-ipa.c: Likewise.
5493 * linux-s390-ipa.c: Likewise.
5494 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5495 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5496 set_trace_state_variable_value_ptr.
5497 (struct ipa_sym_addresses): Likewise.
5498 (symbol_list): Likewise.
5499 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5500 accessing gdb_collect directly.
5501 (gdb_collect_ptr_type): New typedef.
5502 (get_raw_reg_ptr_type): New typedef.
5503 (get_trace_state_variable_value_ptr_type): New typedef.
5504 (set_trace_state_variable_value_ptr_type): New typedef.
5505 (gdb_collect_ptr): New global.
5506 (get_raw_reg_ptr): New global.
5507 (get_trace_state_variable_value_ptr): New global.
5508 (set_trace_state_variable_value_ptr): New global.
5509 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5510 accessing get_raw_reg directly.
5511 (get_get_tsv_func_addr): Likewise for
5512 get_trace_state_variable_value_ptr.
5513 (get_set_tsv_func_addr): Likewise for
5514 set_trace_state_variable_value_ptr.
5515 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5516
5517 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5518
5519 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5520
5521 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5522
5523 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5524 packets.
5525 (relocate_instruction): Remove own_buf.
5526 * server.c (own_buf): Make global.
5527 (handle_v_requests): Make global.
5528 * server.h (own_buf): New declaration.
5529 (handle_v_requests): New prototype.
5530
5531 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5532
5533 PR 18377
5534 * linux-s390-low.c (add_insns): New function.
5535 (s390_emit_prologue): New function.
5536 (s390_emit_epilogue): New function.
5537 (s390_emit_add): New function.
5538 (s390_emit_sub): New function.
5539 (s390_emit_mul): New function.
5540 (s390_emit_lsh): New function.
5541 (s390_emit_rsh_signed): New function.
5542 (s390_emit_rsh_unsigned): New function.
5543 (s390_emit_ext): New function.
5544 (s390_emit_log_not): New function.
5545 (s390_emit_bit_and): New function.
5546 (s390_emit_bit_or): New function.
5547 (s390_emit_bit_xor): New function.
5548 (s390_emit_bit_not): New function.
5549 (s390_emit_equal): New function.
5550 (s390_emit_less_signed): New function.
5551 (s390_emit_less_unsigned): New function.
5552 (s390_emit_ref): New function.
5553 (s390_emit_if_goto): New function.
5554 (s390_emit_goto): New function.
5555 (s390_write_goto_address): New function.
5556 (s390_emit_litpool): New function.
5557 (s390_emit_const): New function.
5558 (s390_emit_call): New function.
5559 (s390_emit_reg): New function.
5560 (s390_emit_pop): New function.
5561 (s390_emit_stack_flush): New function.
5562 (s390_emit_zero_ext): New function.
5563 (s390_emit_swap): New function.
5564 (s390_emit_stack_adjust): New function.
5565 (s390_emit_set_r2): New function.
5566 (s390_emit_int_call_1): New function.
5567 (s390_emit_void_call_2): New function.
5568 (s390_emit_eq_goto): New function.
5569 (s390_emit_ne_goto): New function.
5570 (s390_emit_lt_goto): New function.
5571 (s390_emit_le_goto): New function.
5572 (s390_emit_gt_goto): New function.
5573 (s390_emit_ge_goto): New function.
5574 (s390x_emit_prologue): New function.
5575 (s390x_emit_epilogue): New function.
5576 (s390x_emit_add): New function.
5577 (s390x_emit_sub): New function.
5578 (s390x_emit_mul): New function.
5579 (s390x_emit_lsh): New function.
5580 (s390x_emit_rsh_signed): New function.
5581 (s390x_emit_rsh_unsigned): New function.
5582 (s390x_emit_ext): New function.
5583 (s390x_emit_log_not): New function.
5584 (s390x_emit_bit_and): New function.
5585 (s390x_emit_bit_or): New function.
5586 (s390x_emit_bit_xor): New function.
5587 (s390x_emit_bit_not): New function.
5588 (s390x_emit_equal): New function.
5589 (s390x_emit_less_signed): New function.
5590 (s390x_emit_less_unsigned): New function.
5591 (s390x_emit_ref): New function.
5592 (s390x_emit_if_goto): New function.
5593 (s390x_emit_const): New function.
5594 (s390x_emit_call): New function.
5595 (s390x_emit_reg): New function.
5596 (s390x_emit_pop): New function.
5597 (s390x_emit_stack_flush): New function.
5598 (s390x_emit_zero_ext): New function.
5599 (s390x_emit_swap): New function.
5600 (s390x_emit_stack_adjust): New function.
5601 (s390x_emit_int_call_1): New function.
5602 (s390x_emit_void_call_2): New function.
5603 (s390x_emit_eq_goto): New function.
5604 (s390x_emit_ne_goto): New function.
5605 (s390x_emit_lt_goto): New function.
5606 (s390x_emit_le_goto): New function.
5607 (s390x_emit_gt_goto): New function.
5608 (s390x_emit_ge_goto): New function.
5609 (s390_emit_ops): New function.
5610 (struct linux_target_ops): Fill in emit_ops hook.
5611
5612 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5613
5614 PR 18377
5615 * Makefile.in: Add s390 IPA files.
5616 * configure.srv: Build IPA for s390.
5617 * linux-s390-ipa.c: New file.
5618 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5619 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5620 (tdesc_s390_linux32): Likewise.
5621 (init_registers_s390_linux32v1): Likewise.
5622 (tdesc_s390_linux32v1): Likewise.
5623 (init_registers_s390_linux32v2): Likewise.
5624 (tdesc_s390_linux32v2): Likewise.
5625 (init_registers_s390_linux64): Likewise.
5626 (tdesc_s390_linux64): Likewise.
5627 (init_registers_s390_linux64v1): Likewise.
5628 (tdesc_s390_linux64v1): Likewise.
5629 (init_registers_s390_linux64v2): Likewise.
5630 (tdesc_s390_linux64v2): Likewise.
5631 (init_registers_s390_te_linux64): Likewise.
5632 (tdesc_s390_te_linux64): Likewise.
5633 (init_registers_s390_vx_linux64): Likewise.
5634 (tdesc_s390_vx_linux64): Likewise.
5635 (init_registers_s390_tevx_linux64): Likewise.
5636 (tdesc_s390_tevx_linux64): Likewise.
5637 (init_registers_s390x_linux64): Likewise.
5638 (tdesc_s390x_linux64): Likewise.
5639 (init_registers_s390x_linux64v1): Likewise.
5640 (tdesc_s390x_linux64v1): Likewise.
5641 (init_registers_s390x_linux64v2): Likewise.
5642 (tdesc_s390x_linux64v2): Likewise.
5643 (init_registers_s390x_te_linux64): Likewise.
5644 (tdesc_s390x_te_linux64): Likewise.
5645 (init_registers_s390x_vx_linux64): Likewise.
5646 (tdesc_s390x_vx_linux64): Likewise.
5647 (init_registers_s390x_tevx_linux64): Likewise.
5648 (tdesc_s390x_tevx_linux64): Likewise.
5649 (have_hwcap_s390_vx): New static variable.
5650 (s390_arch_setup): Fill have_hwcap_s390_vx.
5651 (s390_get_thread_area): New function.
5652 (s390_ft_entry_gpr_esa): New const.
5653 (s390_ft_entry_gpr_zarch): New const.
5654 (s390_ft_entry_misc): New const.
5655 (s390_ft_entry_fr): New const.
5656 (s390_ft_entry_vr): New const.
5657 (s390_ft_main_31): New const.
5658 (s390_ft_main_64): New const.
5659 (s390_ft_exit_fr): New const.
5660 (s390_ft_exit_vr): New const.
5661 (s390_ft_exit_misc): New const.
5662 (s390_ft_exit_gpr_esa): New const.
5663 (s390_ft_exit_gpr_zarch): New const.
5664 (append_insns): New function.
5665 (s390_relocate_instruction): New function.
5666 (s390_install_fast_tracepoint_jump_pad): New function.
5667 (s390_get_min_fast_tracepoint_insn_len): New function.
5668 (s390_get_ipa_tdesc_idx): New function.
5669 (struct linux_target_ops): Wire in the above functions.
5670 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5671 * linux-s390-tdesc.h: New file.
5672
5673 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5674
5675 * linux-s390-low.c (s390_supports_tracepoints): New function.
5676 (struct linux_target_ops): Fill supports_tracepoints hook.
5677
5678 2016-03-18 Yao Qi <yao.qi@linaro.org>
5679
5680 * linux-low.c (lwp_signal_can_be_delivered): New function.
5681 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5682
5683 2016-03-18 Yao Qi <yao.qi@linaro.org>
5684
5685 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5686 0 if signal is enqueued. Remove 'signal' from one debugging
5687 message. Move one debugging message to some lines below.
5688 Remove code setting 'signal' to 0.
5689
5690 2016-03-18 Yao Qi <yao.qi@linaro.org>
5691
5692 * linux-low.c (linux_low_filter_event): Remove redundant
5693 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5694
5695 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5696
5697 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5698 (struct linux_target_ops): Wire in the above.
5699
5700 2016-03-03 Yao Qi <yao.qi@linaro.org>
5701
5702 * linux-low.c: Update comments to start_step_over.
5703
5704 2016-03-03 Yao Qi <yao.qi@linaro.org>
5705
5706 PR server/19736
5707 * linux-low.c (handle_extended_wait): Set child suspended
5708 if event_lwp->bp_reinsert isn't zero.
5709
5710 2016-03-02 Yao Qi <yao.qi@linaro.org>
5711
5712 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5713 enqueue_pending_signal.
5714
5715 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5716
5717 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5718 is actually loaded.
5719
5720 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5721
5722 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5723 (s390_regmap_3264) [!__s390x__]: New global.
5724 (s390_collect_ptrace_register): Skip map entries containing -1.
5725 (s390_supply_ptrace_register): Ditto.
5726 (s390_fill_gprs_high): New function.
5727 (s390_store_gprs_high): New function.
5728 (s390_regsets): Add NT_S390_HIGH_GPRS.
5729 (s390_get_hwcap): Enable on 31-bit.
5730 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5731 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5732 Detect NT_S390_HIGH_GPRS.
5733 (s390_usrregs_info_3264): Enable on 31-bit.
5734 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5735 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5736
5737 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5738
5739 PR gdb/13808
5740 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5741 * configure.srv: Ditto.
5742 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5743 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5744 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5745 (init_registers_amd64_linux): Remove prototype.
5746 (tdesc_amd64_linux): Remove declaration.
5747 (get_ipa_tdesc): New function.
5748 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5749 initialize remaining tdescs.
5750 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5751 (init_registers_i386_linux): Remove prototype.
5752 (tdesc_i386_linux): Remove declaration.
5753 (get_ipa_tdesc): New function.
5754 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5755 initialize remaining tdescs.
5756 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5757 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5758 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5759 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5760 (x86_get_ipa_tdesc_idx): New function.
5761 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5762 * linux-x86-tdesc.h: New file.
5763 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5764 (target_get_ipa_tdesc_idx): New macro.
5765 * tracepoint.c (ipa_tdesc_idx): New macro.
5766 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5767 (symbol_list): Add ipa_tdesc_idx.
5768 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5769 (ipa_tdesc): Remove.
5770 (ipa_tdesc_idx): New variable.
5771 (get_context_regcache): Use get_ipa_tdesc.
5772 (gdb_collect): Ditto.
5773 (gdb_probe): Ditto.
5774 * tracepoint.h (get_ipa_tdesc): New prototype.
5775 (ipa_tdesc): Remove.
5776
5777 2016-02-24 Pedro Alves <palves@redhat.com>
5778
5779 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5780 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5781 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5782 Factor out common code between the USE_SIGTRAP_SIGINFO and
5783 !USE_SIGTRAP_SIGINFO blocks.
5784 (linux_low_filter_event): Call save_stop_reason instead of
5785 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5786 Update comments.
5787 (linux_wait_1): Update comments.
5788
5789 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5790
5791 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5792 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5793 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5794 ppc_insert_point, ppc_remove_point.
5795
5796 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5797
5798 * linux-s390-low.c (s390_supports_z_point_type): New function.
5799 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5800
5801 2016-02-16 Yao Qi <yao.qi@linaro.org>
5802
5803 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5804 PC. Get pc from regcache_read_pc.
5805
5806 2016-02-12 Yao Qi <yao.qi@linaro.org>
5807
5808 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5809 or linux_get_pc_32bit.
5810 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5811
5812 2016-02-12 Yao Qi <yao.qi@linaro.org>
5813
5814 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5815 arm_linux_get_next_pcs_fixup.
5816
5817 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5818
5819 * tracepoint.c (x_tracepoint_action_download): Change
5820 write_inferior_data_ptr to write_inferior_data_pointer.
5821 (cmd_qtstart): Likewise.
5822 (write_inferior_data_ptr): Remove.
5823 (download_agent_expr): Change write_inferior_data_ptr to
5824 write_inferior_data_pointer.
5825 (download_tracepoint_1): Likewise.
5826 (download_tracepoint): Likewise.
5827 (download_trace_state_variables): Likewise.
5828
5829 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5830 Marcin Kościelnicki <koriakin@0x04.net>
5831
5832 * tracepoint.c (struct tracepoint_action_ops): Remove.
5833 (struct tracepoint_action): Remove ops.
5834 (m_tracepoint_action_download, r_tracepoint_action_download)
5835 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5836 size and offset accordingly.
5837 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5838 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5839 (tracepoint_action_send, tracepoint_action_download): New functions.
5840 Helpers for trace action handlers.
5841 (add_tracepoint_action): Remove setup actions ops.
5842 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5843
5844 2016-02-10 Yao Qi <yao.qi@linaro.org>
5845
5846 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5847
5848 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5849
5850 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5851 to AC_OUTPUT.
5852 * configure: Regenerate.
5853
5854 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5855
5856 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5857 void * to gdb_byte *.
5858 * linux-low.c (siginfo_fixup): Likewise.
5859 (linux_xfer_siginfo): Likewise.
5860 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5861 Likewise.
5862 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5863
5864 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5865
5866 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5867 to srv_tgtobj.
5868 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5869 to srv_tgtobj.
5870 * linux-x86-low.c [__x86_64__]: Include
5871 "nat/amd64-linux-siginfo.h".
5872 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5873 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5874 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5875 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5876 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5877 (cpt_si_fd, si_timerid, si_overrun): Move from
5878 nat/amd64-linux-siginfo.c.
5879 * Makefile.in (amd64-linux-siginfo.o:): New rule.
5880
5881 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
5882
5883 * server.c (skip_to_semicolon): Remove.
5884 (process_point_options): Use strchrnul instead of
5885 skip_to_semicolon.
5886
5887 2016-01-26 Yao Qi <yao.qi@linaro.org>
5888
5889 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
5890 * linux-low.c (install_software_single_step_breakpoints): Don't
5891 call regcache_read_pc.
5892 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
5893 argument pc.
5894
5895 2016-01-26 Yao Qi <yao.qi@linaro.org>
5896
5897 * linux-low.c (install_software_single_step_breakpoints): Call
5898 regcache_read_pc instead of get_pc.
5899
5900 2016-01-26 Yao Qi <yao.qi@linaro.org>
5901
5902 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
5903 (unblock_async_io): Rename to ...
5904 (block_unblock_async_io): ... it. New function.
5905 (enable_async_io): Don't install SIGIO handler. Unblock it
5906 instead.
5907 (disable_async_io): Don't ignore SIGIO. Block it instead.
5908 (initialize_async_io): Install SIGIO handler. Don't call
5909 unblock_async_io.
5910
5911 2016-01-26 Yao Qi <yao.qi@linaro.org>
5912
5913 * remote-utils.c (getpkt): If the buffer isn't empty, and the
5914 first character is '\003', call *the_target->request_interrupt.
5915
5916 2016-01-25 Yao Qi <yao.qi@linaro.org>
5917
5918 * remote-utils.c (new_thread_notify): Remove.
5919 (dead_thread_notify): Likewise.
5920 * remote-utils.h (new_thread_notify): Remove declaration.
5921 (dead_thread_notify): Likewise.
5922
5923 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
5924
5925 * gdb.trace/pending.exp: Fix expected message on continue.
5926
5927 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
5928
5929 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
5930 it works properly on big-endian machines where sizeof (CORE_ADDR)
5931 != sizeof (void *).
5932
5933 2016-01-21 Pedro Alves <palves@redhat.com>
5934
5935 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
5936 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
5937 * configure: Regenerate.
5938
5939 2016-01-21 Yao Qi <yao.qi@linaro.org>
5940
5941 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
5942 is_thumb and set it according to CPSR saved on the stack.
5943 (get_next_pcs_syscall_next_pc): Pass is_thumb to
5944 arm_sigreturn_next_pc.
5945
5946 2016-01-18 Yao Qi <yao.qi@linaro.org>
5947
5948 * linux-low.c (linux_set_pc_64bit): New function.
5949 (linux_get_pc_64bit): New function.
5950 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
5951 Declare.
5952 * linux-sparc-low.c (debug_threads): Remove declaration.
5953 (sparc_get_pc): Remove.
5954 (the_low_target): Use linux_get_pc_64bit instead of
5955 sparc_get_pc.
5956 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
5957 (the_low_target): Use linux_get_pc_64bit and
5958 linux_set_pc_64bit.
5959
5960 2016-01-18 Yao Qi <yao.qi@linaro.org>
5961
5962 * linux-arm-low.c (debug_threads): Remove declaration.
5963 (arm_get_pc, arm_set_pc): Remove.
5964 (the_low_target): Use linux_get_pc_32bit and
5965 linux_set_pc_32bit.
5966 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
5967 (the_low_target): Use linux_get_pc_32bit and
5968 linux_set_pc_32bit.
5969 * linux-cris-low.c (debug_threads): Remove declaration.
5970 (cris_get_pc, cris_set_pc,): Remove.
5971 (the_low_target): Use linux_get_pc_32bit and
5972 linux_set_pc_32bit.
5973 * linux-crisv32-low.c (debug_threads): Remove declaration.
5974 (cris_get_pc, cris_set_pc): Remove.
5975 (the_low_target): Use linux_get_pc_32bit and
5976 linux_set_pc_32bit.
5977 * linux-low.c: Include inttypes.h.
5978 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
5979 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
5980 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
5981 (the_low_target): Use linux_get_pc_32bit and
5982 linux_set_pc_32bit.
5983 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
5984 (the_low_target): Use linux_get_pc_32bit and
5985 linux_set_pc_32bit.
5986 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
5987 (the_low_target): Use linux_get_pc_32bit and
5988 linux_set_pc_32bit.
5989 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
5990 (the_low_target): Use linux_get_pc_32bit and
5991 linux_set_pc_32bit.
5992 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
5993 (the_low_target): Use linux_get_pc_32bit and
5994 linux_set_pc_32bit.
5995
5996 2016-01-18 Gary Benson <gbenson@redhat.com>
5997
5998 * configure.ac (AC_FUNC_FORK): New check.
5999 * config.in: Regenerate.
6000 * configure: Likewise.
6001
6002 2016-01-14 Yao Qi <yao.qi@linaro.org>
6003
6004 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6005 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6006 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6007 arm_get_next_pcs_ctor.
6008
6009 2016-01-12 Josh Stone <jistone@redhat.com>
6010 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6011
6012 * inferiors.h: Include "gdb_vecs.h".
6013 (struct process_info): Add syscalls_to_catch.
6014 * inferiors.c (remove_process): Free syscalls_to_catch.
6015 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6016 syscall_return stops.
6017 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6018 * server.c (handle_general_set): Handle QCatchSyscalls.
6019 (handle_query): Report support for QCatchSyscalls.
6020 * target.h (struct target_ops): Add supports_catch_syscall.
6021 (target_supports_catch_syscall): New macro.
6022 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6023 (struct lwp_info): Add syscall_state.
6024 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6025 Maintain syscall_state and syscalls_to_catch across exec.
6026 (get_syscall_trapinfo): New function, proxy to the_low_target.
6027 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6028 (linux_low_filter_event): Toggle syscall_state entry/return for
6029 syscall traps, and set it ignored for all others.
6030 (gdb_catching_syscalls_p): New function.
6031 (gdb_catch_this_syscall_p): New function.
6032 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6033 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6034 (linux_supports_catch_syscall): New function.
6035 (linux_target_ops): Install it.
6036 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6037 (the_low_target): Install it.
6038
6039 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6040
6041 * acinclude.m4: Include new ../warning.m4 file.
6042 * configure: Regenerated.
6043 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6044
6045 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6046
6047 * ax.c (is_goto_target): Mark static.
6048 * linux-low.c (register_addr): Likewise.
6049 (linux_fetch_registers, linux_store_registers): Likewise.
6050 * mem-break.c (any_persistent_commands): Fix old prototype.
6051 (add_commands_to_breakpoint): Mark static.
6052 * regcache.c (find_register_by_name): Delete unused func.
6053 * remote-utils.c (hex_or_minus_one): Mark static.
6054 * server.c (monitor_show_help): Mark static.
6055 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6056 handle_v_requests): Likewise.
6057
6058 2016-01-12 Pedro Alves <palves@redhat.com>
6059
6060 Remove use of the registered trademark symbol throughout.
6061
6062 2016-01-08 Yao Qi <yao.qi@linaro.org>
6063
6064 * remote-utils.c (getpkt): If c is '\003', call target hook
6065 request_interrupt.
6066
6067 2016-01-06 Yao Qi <yao.qi@linaro.org>
6068
6069 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6070 linux-aarch32-low.c.
6071 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6072 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6073 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6074 (thumb2_breakpoint): Declare.
6075 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6076 linux-aarch32-low.h.
6077 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6078 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6079 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6080
6081 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6082
6083 * gdbreplay.c (gdbreplay_version): Change copyright year in
6084 version message.
6085 * server.c (gdbserver_version): Likewise.
6086
6087 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6088
6089 * server.c (crc32_table): Delete.
6090 (crc32): Use libiberty's xcrc32 function.
6091
6092 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6093
6094 * lynx-low.c (lynx_delete_thread_callback): New function.
6095 (lynx_mourn): Properly delete our process and all of its
6096 threads. Remove call to clear_inferiors.
6097
6098 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6099
6100 * target.c (thread_search_callback): Add check that
6101 the thread_stopped target callback is not NULL before
6102 calling it.
6103
6104 2015-12-21 Yao Qi <yao.qi@linaro.org>
6105
6106 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6107 arm breakpoint.
6108
6109 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6110
6111 * server.c (handle_query): Call target_supports_software_single_step.
6112
6113 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6114
6115 * linux-low.c (single_step): New function.
6116 (linux_resume_one_lwp_throw): Call single_step.
6117 (start_step_over): Likewise.
6118
6119 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6120
6121 * Makefile.in (SFILES): Append arch/arm-linux.c,
6122 arch/arm-get-next-pcs.c.
6123 (arm-linux.o): New rule.
6124 (arm-get-next-pcs.o): New rule.
6125 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6126 arm-linux.o.
6127 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6128 to linux-aarch32-low.c.
6129 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6130 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6131 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6132 (thumb2_breakpoint_len): Likewise.
6133 (arm_is_thumb_mode): Make non-static.
6134 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6135 from linux-aarch32-low.c.
6136 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6137 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6138 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6139 (thumb2_breakpoint_len): Likewise.
6140 (arm_is_thumb_mode): New declaration.
6141 * linux-arm-low.c: Include arch/arm-linux.h
6142 aarch/arm-get-next-pcs.h, sys/syscall.h.
6143 (get_next_pcs_ops): New struct.
6144 (get_next_pcs_addr_bits_remove): New function.
6145 (get_next_pcs_is_thumb): New function.
6146 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6147 (arm_sigreturn_next_pc): Likewise.
6148 (get_next_pcs_syscall_next_pc): Likewise.
6149 (arm_gdbserver_get_next_pcs): Likewise.
6150 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6151 Initialize.
6152 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6153 * server.h: Include gdb_vecs.h.
6154
6155 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6156
6157 * Makefile.in (SFILES): Append common/common-regcache.c.
6158 (OBS): Append common-regcache.o.
6159 (common-regcache.o): New rule.
6160 * regcache.c (init_register_cache): Initialize cache to
6161 REG_UNAVAILABLE.
6162 (regcache_raw_read_unsigned): New function.
6163 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6164 register_status enum.
6165
6166 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6167
6168 * linux-aarch64-low.c (the_low_targets): Rename
6169 breakpoint_reinsert_addr to get_next_pcs.
6170 * linux-arm-low.c (the_low_targets): Likewise.
6171 * linux-bfin-low.c (the_low_targets): Likewise.
6172 * linux-cris-low.c (the_low_targets): Likewise.
6173 * linux-crisv32-low.c (the_low_targets): Likewise.
6174 * linux-low.c (can_software_single_step): Likewise.
6175 (install_software_single_step_breakpoints): New function.
6176 (start_step_over): Use install_software_single_step_breakpoints.
6177 * linux-low.h: New CORE_ADDR vector.
6178 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6179 get_next_pcs.
6180 * linux-mips-low.c (the_low_targets): Likewise.
6181 * linux-nios2-low.c (the_low_targets): Likewise.
6182 * linux-sparc-low.c (the_low_targets): Likewise.
6183
6184 2015-12-17 Pedro Alves <palves@redhat.com>
6185
6186 * linux-low.c (linux_kill_one_lwp): Remove references to
6187 LinuxThreads.
6188 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6189 to 'kill'.
6190 (linux_init_signals): Delete.
6191 (initialize_low): Adjust.
6192 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6193
6194 2015-12-16 Pedro Alves <palves@redhat.com>
6195
6196 * configure.ac (compiler warning flags): When testing a
6197 -Wno-foo option, check whether -Wfoo works instead.
6198 * configure: Regenerate.
6199
6200 2015-12-11 Don Breazeal <donb@codesourcery.com>
6201
6202 * server.c (process_serial_event): Don't exit from gdbserver
6203 in remote mode if there are still active inferiors.
6204
6205 2015-12-11 Yao Qi <yao.qi@linaro.org>
6206
6207 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6208 arm_breakpoint_at if the process is 32-bit.
6209
6210 2015-12-11 Yao Qi <yao.qi@linaro.org>
6211
6212 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6213 arm breakpoint.
6214
6215 2015-12-07 Yao Qi <yao.qi@linaro.org>
6216
6217 * configure.srv: Append arm.o to srv_tgtobj for
6218 aarch64*-*-linux* target.
6219 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6220 from linux-arm-low.c.
6221 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6222 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6223 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6224 (thumb2_breakpoint_len): Likewise.
6225 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6226 (arm_breakpoint_kinds): Likewise.
6227 (arm_breakpoint_kind_from_pc): Likewise.
6228 (arm_sw_breakpoint_from_kind): Likewise.
6229 (arm_breakpoint_kind_from_current_state): Likewise.
6230 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6231 (arm_sw_breakpoint_from_kind): Declare.
6232 (arm_breakpoint_kind_from_current_state): Declare.
6233 (arm_breakpoint_at): Declare.
6234 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6235 arm_sw_breakpoint_from_kind if process is 32-bit.
6236 (aarch64_breakpoint_kind_from_pc): New function.
6237 (aarch64_breakpoint_kind_from_current_state): New function.
6238 (the_low_target): Initialize fields breakpoint_kind_from_pc
6239 and breakpoint_kind_from_current_state.
6240 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6241 linux-aarch32-low.c.
6242 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6243 (arm_breakpoint, arm_breakpoint_len): Likewise.
6244 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6245 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6246 (arm_is_thumb_mode): Likewise.
6247 (arm_breakpoint_at): Likewise.
6248 (arm_breakpoint_kind_from_pc): Likewise.
6249 (arm_sw_breakpoint_from_kind): Likewise.
6250 (arm_breakpoint_kind_from_current_state): Likewise.
6251
6252 Revert:
6253 2015-08-04 Yao Qi <yao.qi@linaro.org>
6254
6255 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6256 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6257 * server.c (extended_protocol): Remove "static".
6258 * server.h (extended_protocol): Declare it.
6259
6260 2015-12-04 Josh Stone <jistone@redhat.com>
6261
6262 * target.h (struct target_ops) <arch_setup>: Rename to ...
6263 (struct target_ops) <post_create_inferior>: ... this.
6264 (target_arch_setup): Rename to ...
6265 (target_post_create_inferior): ... this, calling post_create_inferior.
6266 * server.c (start_inferior): Update target_arch_setup calls to
6267 target_post_create_inferior.
6268 * linux-low.c (linux_low_ptrace_options): Forward declare.
6269 (linux_arch_setup): Update its comment for general use.
6270 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6271 (struct linux_target_ops): Use linux_post_create_inferior.
6272 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6273 to post_create_inferior.
6274 * nto-low.c (struct nto_target_ops): Likewise.
6275 * spu-low.c (struct spu_target_ops): Likewise.
6276 * win32-low.c (struct win32_target_ops): Likewise.
6277
6278 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6279
6280 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6281
6282 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6283
6284 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6285 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6286 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6287 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6288 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6289 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6290 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6291 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6292 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6293 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6294 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6295 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6296
6297 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6298
6299 * linux-low.c (linux_look_up_symbols): Don't call
6300 linux_supports_traceclone.
6301 * linux-low.h (thread_db_init): Remove use_events argument.
6302 * thread-db.c (thread_db_use_event): Remove global variable.
6303 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6304 (struct thread_db) <td_create_bp>: Remove field.
6305 (thread_db_create_event): Remove function.
6306 (thread_db_enable_reporting): Likewise.
6307 (find_one_thread): Don't check for thread_db_use_events.
6308 (attach_thread): Likewise.
6309 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6310 (try_thread_db_load_1): Don't check for thread_db_use_events.
6311 (thread_db_init): Remove use_events argument and thread events
6312 handling.
6313 (remove_thread_event_breakpoints): Remove function.
6314 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6315
6316 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6317
6318 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6319 New function.
6320 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6321 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6322 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6323 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6324 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6325 Initialize.
6326 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6327 New function.
6328 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6329 * linux-low.c (can_hardware_single_step): Use
6330 supports_hardware_single_step.
6331 (can_software_single_step): New function.
6332 (start_step_over): Call can_software_single_step.
6333 (linux_supports_hardware_single_step): New function.
6334 (struct target_ops) <supports_software_single_step>: Initialize.
6335 * linux-low.h (struct linux_target_ops)
6336 <supports_hardware_single_step>: Initialize.
6337 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6338 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6339 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6340 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6341 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6342 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6343 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6344 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6345 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6346 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6347 Initialize.
6348 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6349 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6350 Initialize.
6351 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6352 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6353 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6354 New function.
6355 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6356 * target.h (struct target_ops): <supports_software_single_step>:
6357 New field.
6358 (target_supports_software_single_step): New macro.
6359
6360 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6361
6362 * linux-low.c (linux_wait_1): Fix pc advance condition.
6363 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6364 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6365
6366 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6367
6368 * linux-arm-low.c (arm_is_thumb_mode): New function.
6369 (arm_breakpoint_at): Use arm_is_thumb_mode.
6370 (arm_breakpoint_kind_from_current_state): New function.
6371 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6372 Initialize.
6373 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6374 (linux_breakpoint_kind_from_current_state): New function.
6375 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6376 * linux-low.h (struct linux_target_ops)
6377 <breakpoint_kind_from_current_state>: New field.
6378 * target.h (struct target_ops): Likewise.
6379 (target_breakpoint_kind_from_current_state): New macro.
6380
6381 2015-11-30 Pedro Alves <palves@redhat.com>
6382
6383 * linux-low.c (linux_resume): Wake up the event loop before
6384 returning.
6385
6386 2015-11-30 Pedro Alves <palves@redhat.com>
6387
6388 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6389 check.
6390 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6391 to -1.
6392 * target.c (struct thread_search): New structure.
6393 (thread_search_callback): New function.
6394 (prev_general_thread): New global.
6395 (prepare_to_access_memory, done_accessing_memory): New functions.
6396 * target.h (prepare_to_access_memory, done_accessing_memory):
6397 Replace macros with function declarations.
6398
6399 2015-11-30 Pedro Alves <palves@redhat.com>
6400
6401 PR 14618
6402 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6403 report TARGET_WAITKIND_NO_RESUMED.
6404 * remote-utils.c (prepare_resume_reply): Handle
6405 TARGET_WAITKIND_NO_RESUMED.
6406 * server.c (report_no_resumed): New global.
6407 (handle_query) <qSupported>: Handle "no-resumed+". Report
6408 "no-resumed+" support.
6409 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6410 return error if the client doesn't support no-resumed events.
6411 (push_stop_notification): New function.
6412 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6413 events if the client supports them.
6414
6415 2015-11-30 Pedro Alves <palves@redhat.com>
6416
6417 * linux-low.c (thread_still_has_status_pending_p): Don't check
6418 vCont;t here.
6419 (lwp_resumed): New function.
6420 (status_pending_p_callback): Return early if the LWP is not
6421 supposed to be resumed.
6422
6423 2015-11-30 Pedro Alves <palves@redhat.com>
6424
6425 * linux-low.c (handle_extended_wait): Assert that the LWP's
6426 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6427 thread create events, leave the new child's status pending.
6428 (linux_low_filter_event): If GDB wants to hear about thread exit
6429 events, leave the LWP marked dead and don't delete it.
6430 (linux_wait_for_event_filtered): Don't check for thread exit.
6431 (filter_exit_event): New function.
6432 (linux_wait_1): Use it, when returning an exit event.
6433 (linux_resume_one_lwp_throw): Assert that the LWP's
6434 waitstatus is TARGET_WAITKIND_IGNORE.
6435 * remote-utils.c (prepare_resume_reply): Handle
6436 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6437 * server.c (report_thread_events): New global.
6438 (handle_general_set): Handle QThreadEvents.
6439 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6440 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6441 TARGET_WAITKIND_THREAD_EXITED.
6442 * server.h (report_thread_events): Declare.
6443
6444 2015-11-30 Pedro Alves <palves@redhat.com>
6445
6446 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6447 the thread's last_resume_kind was resume_stop.
6448
6449 2015-11-30 Pedro Alves <palves@redhat.com>
6450
6451 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6452 before returning.
6453
6454 2015-11-30 Pedro Alves <palves@redhat.com>
6455
6456 * server.c (handle_v_requests): Handle vCtrlC.
6457
6458 2015-11-30 Pedro Alves <palves@redhat.com>
6459
6460 * gdbthread.h (find_any_thread_of_pid): Declare.
6461 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6462 functions.
6463 * server.c (handle_query): If current_thread is NULL, look for
6464 another thread of the selected process.
6465
6466 2015-11-26 Daniel Colascione <dancol@dancol.org>
6467 Simon Marchi <simon.marchi@ericsson.com>
6468
6469 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6470 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6471 name in reply.
6472 * target.h (struct target_ops) <thread_name>: New field.
6473 (target_thread_name): New macro.
6474
6475 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6476
6477 * regcache.h (regcache_invalidate_pid): Add declaration.
6478 * regcache.c (regcache_invalidate_pid): New function, extracted
6479 from regcache_invalidate.
6480 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6481 Add trivial documentation comment.
6482 * lynx-low.c: Use regcache_invalidate_pid instead of
6483 regcache_invalidate.
6484
6485 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6486
6487 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6488 and Elf64_auxv_t if the target is Android.
6489
6490 2015-11-22 Doug Evans <xdje42@gmail.com>
6491
6492 * target.h: #include <sys/types.h>.
6493
6494 2015-11-19 Pedro Alves <palves@redhat.com>
6495
6496 * linux-low.c (linux_process_qsupported): Change prototype.
6497 Adjust.
6498 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6499 Change prototype.
6500 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6501 and adjust to loop over all features.
6502 * server.c (handle_query) <qSupported>: Adjust to call
6503 target_process_qsupported once, passing it a vector of unprocessed
6504 features.
6505 * target.h (struct target_ops) <process_qsupported>: Change
6506 prototype.
6507 (target_process_qsupported): Adjust.
6508
6509 2015-11-19 Pedro Alves <palves@redhat.com>
6510
6511 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6512 mode.
6513 * configure: Regenerate.
6514
6515 2015-11-19 Pedro Alves <palves@redhat.com>
6516
6517 * configure: Regenerate.
6518
6519 2015-11-19 Yao Qi <yao.qi@linaro.org>
6520
6521 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6522 type to uint32_t.
6523
6524 2015-11-19 Yao Qi <yao.qi@linaro.org>
6525
6526 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6527 (struct aarch64_operand): Move enum out.
6528
6529 2015-11-19 Yao Qi <yao.qi@linaro.org>
6530
6531 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6532 struct user_fpsimd_state *.
6533 (aarch64_store_fpregset): Likewise.
6534
6535 2015-11-19 Yao Qi <yao.qi@linaro.org>
6536
6537 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6538 struct user_pt_regs *.
6539 (aarch64_store_gregset): Likewise.
6540
6541 2015-11-18 Pedro Alves <palves@redhat.com>
6542
6543 * Makefile.in (all_object_files): Add $IPA_OBJS.
6544
6545 2015-11-17 Pedro Alves <palves@redhat.com>
6546
6547 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6548 GDB_SIGNAL_0 and gdb_signal_to_string.
6549
6550 2015-11-17 Pedro Alves <palves@redhat.com>
6551
6552 * win32-low.c (handle_output_debug_string): Remove parameter.
6553 (win32_kill): Remove our_status local and adjust call to
6554 handle_output_debug_string.
6555 (get_child_debug_event): Adjust call to
6556 handle_output_debug_string.
6557
6558 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6559
6560 * linux-mips-low.c (mips_fill_gregset): Add cast.
6561 (mips_store_gregset): Likewise.
6562 (mips_fill_fpregset): Likewise.
6563 (mips_store_fpregset): Likewise.
6564
6565 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6566
6567 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6568 priv.
6569
6570 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6571
6572 * linux-mips-low.c (mips_linux_new_thread): Change type of
6573 watch_type to enum target_hw_bp_type.
6574
6575 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6576
6577 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6578 Change return type to arm_hwbp_type.
6579
6580 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6581
6582 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6583 (arm_store_gregset): Likewise.
6584 * linux-arm-low.c (arm_get_hwcap): Likewise.
6585 (arm_read_description): Likewise.
6586
6587 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6588
6589 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6590
6591 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6592
6593 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6594 (ppc_fill_vsxregset): Likewise.
6595 (ppc_store_vsxregset): Likewise.
6596 (ppc_fill_vrregset): Likewise.
6597 (ppc_store_vrregset): Likewise.
6598 (ppc_fill_evrregset): Likewise.
6599 (ppc_store_evrregset): Likewise.
6600
6601 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6602
6603 * linux-ppc-low.c (ppc_usrregs_info): Remove
6604 forward-declaration.
6605 (ppc_arch_setup): Move lower in file.
6606
6607 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6608
6609 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6610 (ps_pdwrite): Likewise.
6611
6612 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6613
6614 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6615 to after assert checks.
6616
6617 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6618
6619 * proc-service.c (ps_pdread): Add/adjust casts.
6620 (ps_pdwrite): Add/adjust casts.
6621
6622 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6623
6624 * server.c (handle_search_memory_1): Cast return value of
6625 memmem.
6626
6627 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6628
6629 * server.c (write_qxfer_response): Change type of data to
6630 gdb_byte *.
6631
6632 2015-10-29 Pedro Alves <palves@redhat.com>
6633
6634 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6635
6636 2015-10-29 Pedro Alves <palves@redhat.com>
6637
6638 * tracepoint.c (clear_installed_tracepoints): Add casts.
6639
6640 2015-10-29 Pedro Alves <palves@redhat.com>
6641
6642 * server.c (handle_v_cont, process_serial_event): Add enum
6643 gdb_signal casts to signal parsing code.
6644
6645 2015-10-29 Pedro Alves <palves@redhat.com>
6646
6647 * linux-low.h (NULL_REGSET): Define.
6648 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6649 * linux-arm-low.c (arm_regsets): Likewise.
6650 * linux-crisv32-low.c (cris_regsets): Likewise.
6651 * linux-m68k-low.c (m68k_regsets): Likewise.
6652 * linux-mips-low.c (mips_regsets): Likewise.
6653 * linux-nios2-low.c (nios2_regsets): Likewise.
6654 * linux-ppc-low.c (ppc_regsets): Likewise.
6655 * linux-s390-low.c (s390_regsets): Likewise.
6656 * linux-sh-low.c (sh_regsets): Likewise.
6657 * linux-sparc-low.c (sparc_regsets): Likewise.
6658 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6659 * linux-tile-low.c (tile_regsets): Likewise.
6660 * linux-x86-low.c (x86_regsets): Likewise.
6661 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6662
6663 2015-10-29 Pedro Alves <palves@redhat.com>
6664
6665 * linux-low.h (NULL_REGSET): Define.
6666 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6667 * linux-arm-low.c (arm_regsets): Likewise.
6668 * linux-crisv32-low.c (cris_regsets): Likewise.
6669 * linux-m68k-low.c (m68k_regsets): Likewise.
6670 * linux-mips-low.c (mips_regsets): Likewise.
6671 * linux-nios2-low.c (nios2_regsets): Likewise.
6672 * linux-ppc-low.c (ppc_regsets): Likewise.
6673 * linux-s390-low.c (s390_regsets): Likewise.
6674 * linux-sh-low.c (sh_regsets): Likewise.
6675 * linux-sparc-low.c (sparc_regsets): Likewise.
6676 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6677 * linux-tile-low.c (tile_regsets): Likewise.
6678 * linux-x86-low.c (x86_regsets): Likewise.
6679 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6680
6681 2015-10-26 Doug Evans <dje@google.com>
6682
6683 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6684
6685 2015-10-26 Doug Evans <dje@google.com>
6686
6687 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6688
6689 2015-10-26 Doug Evans <dje@google.com>
6690
6691 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6692 for debug_printf.
6693 (attach_thread, find_new_threads_callback): Ditto.
6694
6695 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6696
6697 * mem-break.h (set_breakpoint_data): Remove.
6698
6699 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6700
6701 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6702 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6703 (initialize_low): Remove set_breakpoint_data call.
6704 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6705 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6706 (initialize_low): Remove set_breakpoint_data call.
6707 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6708 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6709 (initialize_low): Remove set_breakpoint_data call.
6710
6711 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6712
6713 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6714 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6715 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6716 * target.h (target_breakpoint_kind_from_pc): New macro.
6717
6718 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6719
6720 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6721 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6722 the default breakpoint kind.
6723
6724 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6725
6726 * linux-arm-low.c (arm_supports_z_point_type): Add software
6727 breakpoint support.
6728
6729 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6730
6731 * linux-arm-low.c: Refactor breakpoint definitions.
6732 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6733 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6734
6735 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6736
6737 * Makefile.in: Add arm.c/o.
6738 * configure.srv: Likewise.
6739 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6740 (arm_breakpoint_kind_from_pc): New function.
6741 (arm_sw_breakpoint_from_kind): Return proper kind.
6742 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6743
6744 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6745
6746 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6747 removal.
6748 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6749 (struct raw_breakpoint) <size>: Remove.
6750 (struct raw_breakpoint) <kind>: Add.
6751 (bp_size): New function.
6752 (bp_opcode): Likewise.
6753 (find_raw_breakpoint_at): Adjust for kind.
6754 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6755 (remove_memory_breakpoint): Adjust for kind call bp_size.
6756 (set_raw_breakpoint_at): Adjust for kind.
6757 (set_breakpoint): Likewise.
6758 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6759 (delete_raw_breakpoint): Adjust for kind.
6760 (delete_breakpoint): Likewise.
6761 (find_gdb_breakpoint): Likewise.
6762 (set_gdb_breakpoint_1): Likewise.
6763 (set_gdb_breakpoint): Likewise.
6764 (delete_gdb_breakpoint_1): Likewise.
6765 (delete_gdb_breakpoint): Likewise.
6766 (uninsert_raw_breakpoint): Likewise.
6767 (reinsert_raw_breakpoint): Likewise.
6768 (set_breakpoint_data): Remove.
6769 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6770 (check_mem_read): Adjust for kind call bp_size.
6771 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6772 (clone_one_breakpoint): Adjust for kind.
6773 * mem-break.h (set_gdb_breakpoint): Likewise.
6774 (delete_gdb_breakpoint): Likewise.
6775 * server.c (process_serial_event): Likewise.
6776
6777 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6778
6779 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6780 (struct linux_target_ops) <breakpoint>: Remove.
6781 (struct linux_target_ops) <breakpoint_len>: Remove.
6782 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6783 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6784 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6785 (arm_sw_breakpoint_from_kind): New function.
6786 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6787 (struct linux_target_ops) <breakpoint>: Remove.
6788 (struct linux_target_ops) <breakpoint_len>: Remove.
6789 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6790 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6791 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6792 (struct linux_target_ops) <breakpoint>: Remove.
6793 (struct linux_target_ops) <breakpoint_len>: Remove.
6794 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6795 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6796 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6797 (struct linux_target_ops) <breakpoint>: Remove.
6798 (struct linux_target_ops) <breakpoint_len>: Remove.
6799 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6800 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6801 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6802 and sw_breakpoint_from_kind to increment the pc.
6803 (linux_breakpoint_kind_from_pc): New function.
6804 (linux_sw_breakpoint_from_kind): New function.
6805 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6806 (initialize_low): Call breakpoint_kind_from_pc and
6807 sw_breakpoint_from_kind to replace breakpoint_data/len.
6808 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6809 New field.
6810 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6811 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6812 (struct linux_target_ops) <breakpoint>: Remove.
6813 (struct linux_target_ops) <breakpoint_len>: Remove.
6814 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6815 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6816 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6817 (struct linux_target_ops) <breakpoint>: Remove.
6818 (struct linux_target_ops) <breakpoint_len>: Remove.
6819 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6820 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6821 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6822 (struct linux_target_ops) <breakpoint>: Remove.
6823 (struct linux_target_ops) <breakpoint_len>: Remove.
6824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6826 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6827 (struct linux_target_ops) <breakpoint>: Remove.
6828 (struct linux_target_ops) <breakpoint_len>: Remove.
6829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6831 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6832 (struct linux_target_ops) <breakpoint>: Remove.
6833 (struct linux_target_ops) <breakpoint_len>: Remove.
6834 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6835 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6836 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6837 (struct linux_target_ops) <breakpoint>: Remove.
6838 (struct linux_target_ops) <breakpoint_len>: Remove.
6839 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6840 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6841 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6842 (struct linux_target_ops) <breakpoint>: Remove.
6843 (struct linux_target_ops) <breakpoint_len>: Remove.
6844 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6845 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6846 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6847 (struct linux_target_ops) <breakpoint>: Remove.
6848 (struct linux_target_ops) <breakpoint_len>: Remove.
6849 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6850 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6851 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6852 (struct linux_target_ops) <breakpoint>: Remove.
6853 (struct linux_target_ops) <breakpoint_len>: Remove.
6854 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6855 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6856 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6857 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6858 (struct linux_target_ops) <breakpoint>: Remove.
6859 (struct linux_target_ops) <breakpoint_len>: Remove.
6860 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6861 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6862 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6863 (struct linux_target_ops) <breakpoint>: Remove.
6864 (struct linux_target_ops) <breakpoint_len>: Remove.
6865 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6866 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6867
6868 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6869
6870 * linux-cris-low.c (cris_get_pc): Remove void arg.
6871
6872 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6873
6874 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6875 variable name.
6876
6877 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6878
6879 * inferiors.c (thread_pid_matches_callback): New function.
6880 (find_thread_process): New function.
6881 (remove_thread): Reset current_thread.
6882 (remove_process): Assert threads have been removed first.
6883
6884 2015-10-15 Yao Qi <yao.qi@linaro.org>
6885
6886 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
6887 if it is 3.
6888 (aarch64_remove_point): Likewise.
6889 * regcache.c (regcache_register_size): New function.
6890
6891 2015-10-12 Yao Qi <yao.qi@linaro.org>
6892
6893 * linux-aarch64-low.c: Update all callers as emit_load_store
6894 is renamed to aarch64_emit_load_store.
6895
6896 2015-10-12 Yao Qi <yao.qi@linaro.org>
6897
6898 * linux-aarch64-low.c: Update all callers of function renaming
6899 from emit_insn to aarch64_emit_insn.
6900
6901 2015-10-12 Yao Qi <yao.qi@linaro.org>
6902
6903 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
6904 arch/aarch64-insn.h.
6905 (struct aarch64_memory_operand): Likewise.
6906 (ENCODE): Likewise.
6907 (emit_insn): Move to arch/aarch64-insn.c.
6908 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
6909 (emit_load_store): Move to arch/aarch64-insn.c.
6910 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
6911 (can_encode_int32): Remove.
6912
6913 2015-10-12 Yao Qi <yao.qi@linaro.org>
6914
6915 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
6916 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
6917 (aarch64_relocate_instruction): Likewise.
6918 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
6919 (struct aarch64_insn_visitor): Likewise.
6920
6921 2015-10-12 Yao Qi <yao.qi@linaro.org>
6922
6923 * linux-aarch64-low.c (struct aarch64_insn_data): New.
6924 (struct aarch64_insn_visitor): New.
6925 (struct aarch64_insn_relocation_data): New.
6926 (aarch64_ftrace_insn_reloc_b): New function.
6927 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
6928 (aarch64_ftrace_insn_reloc_cb): Likewise.
6929 (aarch64_ftrace_insn_reloc_tb): Likewise.
6930 (aarch64_ftrace_insn_reloc_adr): Likewise.
6931 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
6932 (aarch64_ftrace_insn_reloc_others): Likewise.
6933 (visitor): New.
6934 (aarch64_relocate_instruction): Use visitor.
6935
6936 2015-10-12 Yao Qi <yao.qi@linaro.org>
6937
6938 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
6939 int. Add argument buf.
6940 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
6941 aarch64_relocate_instruction.
6942
6943 2015-10-12 Yao Qi <yao.qi@linaro.org>
6944
6945 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
6946 argument insn. Remove local variable insn. Don't call
6947 target_read_uint32.
6948 (aarch64_install_fast_tracepoint_jump_pad): Call
6949 target_read_uint32.
6950
6951 2015-09-30 Yao Qi <yao.qi@linaro.org>
6952
6953 * linux-aarch64-low.c (emit_movk): Shorten a long line.
6954 (emit_load_store_pair): Likewise.
6955
6956 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6957
6958 * dll.c (match_dll): Add cast(s).
6959 (unloaded_dll): Likewise.
6960 * linux-low.c (second_thread_of_pid_p): Likewise.
6961 (delete_lwp_callback): Likewise.
6962 (count_events_callback): Likewise.
6963 (select_event_lwp_callback): Likewise.
6964 (linux_set_resume_request): Likewise.
6965 * server.c (accumulate_file_name_length): Likewise.
6966 (emit_dll_description): Likewise.
6967 (handle_qxfer_threads_worker): Likewise.
6968 (visit_actioned_threads): Likewise.
6969 * thread-db.c (any_thread_of): Likewise.
6970 * tracepoint.c (same_process_p): Likewise.
6971 (match_blocktype): Likewise.
6972 (build_traceframe_info_xml): Likewise.
6973
6974 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
6975
6976 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
6977 assignment.
6978 (gdb_unparse_agent_expr): Likewise.
6979 * hostio.c (require_data): Likewise.
6980 (handle_pread): Likewise.
6981 * linux-low.c (disable_regset): Likewise.
6982 (fetch_register): Likewise.
6983 (store_register): Likewise.
6984 (get_dynamic): Likewise.
6985 (linux_qxfer_libraries_svr4): Likewise.
6986 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
6987 (set_fast_tracepoint_jump): Likewise.
6988 (uninsert_fast_tracepoint_jumps_at): Likewise.
6989 (reinsert_fast_tracepoint_jumps_at): Likewise.
6990 (validate_inserted_breakpoint): Likewise.
6991 (clone_agent_expr): Likewise.
6992 * regcache.c (init_register_cache): Likewise.
6993 * remote-utils.c (putpkt_binary_1): Likewise.
6994 (decode_M_packet): Likewise.
6995 (decode_X_packet): Likewise.
6996 (look_up_one_symbol): Likewise.
6997 (relocate_instruction): Likewise.
6998 (monitor_output): Likewise.
6999 * server.c (handle_search_memory): Likewise.
7000 (handle_qxfer_exec_file): Likewise.
7001 (handle_qxfer_libraries): Likewise.
7002 (handle_qxfer): Likewise.
7003 (handle_query): Likewise.
7004 (handle_v_cont): Likewise.
7005 (handle_v_run): Likewise.
7006 (captured_main): Likewise.
7007 * target.c (write_inferior_memory): Likewise.
7008 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7009 * tracepoint.c (init_trace_buffer): Likewise.
7010 (add_tracepoint_action): Likewise.
7011 (add_traceframe): Likewise.
7012 (add_traceframe_block): Likewise.
7013 (cmd_qtdpsrc): Likewise.
7014 (cmd_qtdv): Likewise.
7015 (cmd_qtstatus): Likewise.
7016 (response_source): Likewise.
7017 (response_tsv): Likewise.
7018 (cmd_qtnotes): Likewise.
7019 (gdb_collect): Likewise.
7020 (initialize_tracepoint): Likewise.
7021
7022 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7023
7024 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7025 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7026 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7027 <NOP>: New.
7028 (enum aarch64_condition_codes): New enum.
7029 (w0): New static global.
7030 (fp): Likewise.
7031 (lr): Likewise.
7032 (struct aarch64_memory_operand) <type>: New
7033 MEMORY_OPERAND_POSTINDEX type.
7034 (postindex_memory_operand): New helper function.
7035 (emit_ret): New function.
7036 (emit_load_store_pair): New function, factored out of emit_stp
7037 with support for MEMORY_OPERAND_POSTINDEX.
7038 (emit_stp): Rewrite using emit_load_store_pair.
7039 (emit_ldp): New function.
7040 (emit_load_store): Likewise.
7041 (emit_ldr): Mention post-index instruction in comment.
7042 (emit_ldrh): New function.
7043 (emit_ldrb): New function.
7044 (emit_ldrsw): Mention post-index instruction in comment.
7045 (emit_str): Likewise.
7046 (emit_subs): New function.
7047 (emit_cmp): Likewise.
7048 (emit_and): Likewise.
7049 (emit_orr): Likewise.
7050 (emit_orn): Likewise.
7051 (emit_eor): Likewise.
7052 (emit_mvn): Likewise.
7053 (emit_lslv): Likewise.
7054 (emit_lsrv): Likewise.
7055 (emit_asrv): Likewise.
7056 (emit_mul): Likewise.
7057 (emit_sbfm): Likewise.
7058 (emit_sbfx): Likewise.
7059 (emit_ubfm): Likewise.
7060 (emit_ubfx): Likewise.
7061 (emit_csinc): Likewise.
7062 (emit_cset): Likewise.
7063 (emit_nop): Likewise.
7064 (emit_ops_insns): New helper function.
7065 (emit_pop): Likewise.
7066 (emit_push): Likewise.
7067 (aarch64_emit_prologue): New function.
7068 (aarch64_emit_epilogue): Likewise.
7069 (aarch64_emit_add): Likewise.
7070 (aarch64_emit_sub): Likewise.
7071 (aarch64_emit_mul): Likewise.
7072 (aarch64_emit_lsh): Likewise.
7073 (aarch64_emit_rsh_signed): Likewise.
7074 (aarch64_emit_rsh_unsigned): Likewise.
7075 (aarch64_emit_ext): Likewise.
7076 (aarch64_emit_log_not): Likewise.
7077 (aarch64_emit_bit_and): Likewise.
7078 (aarch64_emit_bit_or): Likewise.
7079 (aarch64_emit_bit_xor): Likewise.
7080 (aarch64_emit_bit_not): Likewise.
7081 (aarch64_emit_equal): Likewise.
7082 (aarch64_emit_less_signed): Likewise.
7083 (aarch64_emit_less_unsigned): Likewise.
7084 (aarch64_emit_ref): Likewise.
7085 (aarch64_emit_if_goto): Likewise.
7086 (aarch64_emit_goto): Likewise.
7087 (aarch64_write_goto_address): Likewise.
7088 (aarch64_emit_const): Likewise.
7089 (aarch64_emit_call): Likewise.
7090 (aarch64_emit_reg): Likewise.
7091 (aarch64_emit_pop): Likewise.
7092 (aarch64_emit_stack_flush): Likewise.
7093 (aarch64_emit_zero_ext): Likewise.
7094 (aarch64_emit_swap): Likewise.
7095 (aarch64_emit_stack_adjust): Likewise.
7096 (aarch64_emit_int_call_1): Likewise.
7097 (aarch64_emit_void_call_2): Likewise.
7098 (aarch64_emit_eq_goto): Likewise.
7099 (aarch64_emit_ne_goto): Likewise.
7100 (aarch64_emit_lt_goto): Likewise.
7101 (aarch64_emit_le_goto): Likewise.
7102 (aarch64_emit_gt_goto): Likewise.
7103 (aarch64_emit_ge_got): Likewise.
7104 (aarch64_emit_ops_impl): New static global variable.
7105 (aarch64_emit_ops): New target function, return
7106 &aarch64_emit_ops_impl.
7107 (struct linux_target_ops): Install it.
7108
7109 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7110
7111 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7112 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7113 aarch64-ipa.o.
7114 * linux-aarch64-ipa.c: New file.
7115 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7116 and endian.h.
7117 (aarch64_get_thread_area): New target method.
7118 (extract_signed_bitfield): New helper function.
7119 (aarch64_decode_ldr_literal): New function.
7120 (enum aarch64_opcodes): New enum.
7121 (struct aarch64_register): New struct.
7122 (struct aarch64_operand): New struct.
7123 (x0): New static global.
7124 (x1): Likewise.
7125 (x2): Likewise.
7126 (x3): Likewise.
7127 (x4): Likewise.
7128 (w2): Likewise.
7129 (ip0): Likewise.
7130 (sp): Likewise.
7131 (xzr): Likewise.
7132 (aarch64_register): New helper function.
7133 (register_operand): Likewise.
7134 (immediate_operand): Likewise.
7135 (struct aarch64_memory_operand): New struct.
7136 (offset_memory_operand): New helper function.
7137 (preindex_memory_operand): Likewise.
7138 (enum aarch64_system_control_registers): New enum.
7139 (ENCODE): New macro.
7140 (emit_insn): New helper function.
7141 (emit_b): New function.
7142 (emit_bcond): Likewise.
7143 (emit_cb): Likewise.
7144 (emit_tb): Likewise.
7145 (emit_blr): Likewise.
7146 (emit_stp): Likewise.
7147 (emit_ldp_q_offset): Likewise.
7148 (emit_stp_q_offset): Likewise.
7149 (emit_load_store): Likewise.
7150 (emit_ldr): Likewise.
7151 (emit_ldrsw): Likewise.
7152 (emit_str): Likewise.
7153 (emit_ldaxr): Likewise.
7154 (emit_stxr): Likewise.
7155 (emit_stlr): Likewise.
7156 (emit_data_processing_reg): Likewise.
7157 (emit_data_processing): Likewise.
7158 (emit_add): Likewise.
7159 (emit_sub): Likewise.
7160 (emit_mov): Likewise.
7161 (emit_movk): Likewise.
7162 (emit_mov_addr): Likewise.
7163 (emit_mrs): Likewise.
7164 (emit_msr): Likewise.
7165 (emit_sevl): Likewise.
7166 (emit_wfe): Likewise.
7167 (append_insns): Likewise.
7168 (can_encode_int32_in): New helper function.
7169 (aarch64_relocate_instruction): New function.
7170 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7171 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7172 (struct linux_target_ops): Install aarch64_get_thread_area,
7173 aarch64_install_fast_tracepoint_jump_pad and
7174 aarch64_get_min_fast_tracepoint_insn_len.
7175
7176 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7177
7178 * Makefile.in (aarch64-insn.o): New rule.
7179 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7180
7181 2015-09-21 Yao Qi <yao.qi@linaro.org>
7182
7183 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7184
7185 2015-09-21 Yao Qi <yao.qi@linaro.org>
7186
7187 * tracepoint.c (max_jump_pad_size): Remove.
7188
7189 2015-09-18 Yao Qi <yao.qi@linaro.org>
7190
7191 * linux-aarch64-low.c: Don't include sys/uio.h.
7192 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7193
7194 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7195
7196 * tracepoint.c (eval_result_type): Change prototype.
7197 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7198
7199 2015-09-15 Pedro Alves <palves@redhat.com>
7200
7201 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7202 Check whether to report exec events instead of checking whether
7203 multiprocess is enabled.
7204
7205 2015-09-15 Pedro Alves <palves@redhat.com>
7206
7207 PR remote/18965
7208 * remote-utils.c (prepare_resume_reply): Merge
7209 TARGET_WAITKIND_VFORK_DONE switch case with the
7210 TARGET_WAITKIND_FORKED case.
7211
7212 2015-09-15 Yao Qi <yao.qi@linaro.org>
7213
7214 * server.c (handle_query): Check string comparison using
7215 "else if" instead of "if".
7216
7217 2015-09-15 Yao Qi <yao.qi@linaro.org>
7218
7219 * server.c (vCont_supported): New global variable.
7220 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7221 matches. Append ";vContSupported+" to own_buf.
7222 (handle_v_requests): Append ";s;S" to own_buf if target supports
7223 hardware single step or vCont_supported is false.
7224 (capture_main): Set vCont_supported to zero.
7225
7226 2015-09-15 Yao Qi <yao.qi@linaro.org>
7227
7228 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7229 it to ...
7230 (linux_supports_hardware_single_step): ... New function.
7231 (linux_target_ops): Update.
7232 * lynx-low.c (lynx_target_ops): Set field
7233 supports_hardware_single_step to target_can_do_hardware_single_step.
7234 * nto-low.c (nto_target_ops): Likewise.
7235 * spu-low.c (spu_target_ops): Likewise.
7236 * win32-low.c (win32_target_ops): Likewise.
7237 * target.c (target_can_do_hardware_single_step): New function.
7238 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7239 Remove. <supports_hardware_single_step>: New field.
7240 (target_supports_conditional_breakpoints): Remove.
7241 (target_supports_hardware_single_step): New macro.
7242 (target_can_do_hardware_single_step): Declare.
7243 * server.c (handle_query): Use target_supports_hardware_single_step
7244 instead of target_supports_conditional_breakpoints.
7245
7246 2015-09-15 Yao Qi <yao.qi@linaro.org>
7247
7248 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7249 function.
7250 (struct linux_target_ops the_low_target): Install
7251 aarch64_linux_siginfo_fixup.
7252
7253 2015-09-11 Don Breazeal <donb@codesourcery.com>
7254 Luis Machado <lgustavo@codesourcery.com>
7255
7256 * linux-low.c (linux_mourn): Static declaration.
7257 (linux_arch_setup): Move in front of
7258 handle_extended_wait.
7259 (linux_arch_setup_thread): New function.
7260 (handle_extended_wait): Handle exec events. Call
7261 linux_arch_setup_thread. Make event_lwp argument a
7262 pointer-to-a-pointer.
7263 (check_zombie_leaders): Do not check stopped threads.
7264 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7265 (linux_low_filter_event): Add lwp and thread for exec'ing
7266 non-leader thread if leader thread has been deleted.
7267 Refactor code into linux_arch_setup_thread and call it.
7268 Pass child lwp pointer by reference to handle_extended_wait.
7269 (linux_wait_for_event_filtered): Update comment.
7270 (linux_wait_1): Prevent clobbering exec event status.
7271 (linux_supports_exec_events): New function.
7272 (linux_target_ops) <supports_exec_events>: Initialize new member.
7273 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7274 new member.
7275 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7276 * server.c (report_exec_events): New global variable.
7277 (handle_query): Handle qSupported query for exec-events feature.
7278 (captured_main): Initialize report_exec_events.
7279 * server.h (report_exec_events): Declare new global variable.
7280 * target.h (struct target_ops) <supports_exec_events>: New
7281 member.
7282 (target_supports_exec_events): New macro.
7283 * win32-low.c (win32_target_ops) <supports_exec_events>:
7284 Initialize new member.
7285
7286 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7287
7288 * linux-low.c (linux_low_enable_btrace): Remove.
7289 (linux_target_ops): Replace linux_low_enable_btrace with
7290 linux_enable_btrace.
7291
7292 2015-09-03 Yao Qi <yao.qi@linaro.org>
7293
7294 * linux-aarch64-low.c (aarch64_insert_point): Call
7295 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7296 returns true.
7297
7298 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7299
7300 * linux-low.c (check_stopped_by_breakpoint): Use
7301 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7302
7303 2015-08-27 Pedro Alves <palves@redhat.com>
7304
7305 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7306
7307 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7308
7309 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7310 the XNEW-family equivalent.
7311 (compile_bytecodes): Likewise.
7312 * dll.c (loaded_dll): Likewise.
7313 * event-loop.c (append_callback_event): Likewise.
7314 (create_file_handler): Likewise.
7315 (create_file_event): Likewise.
7316 * hostio.c (handle_open): Likewise.
7317 * inferiors.c (add_thread): Likewise.
7318 (add_process): Likewise.
7319 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7320 * linux-arm-low.c (arm_new_process): Likewise.
7321 (arm_new_thread): Likewise.
7322 * linux-low.c (add_to_pid_list): Likewise.
7323 (linux_add_process): Likewise.
7324 (handle_extended_wait): Likewise.
7325 (add_lwp): Likewise.
7326 (enqueue_one_deferred_signal): Likewise.
7327 (enqueue_pending_signal): Likewise.
7328 (linux_resume_one_lwp_throw): Likewise.
7329 (linux_resume_one_thread): Likewise.
7330 (linux_read_memory): Likewise.
7331 (linux_write_memory): Likewise.
7332 * linux-mips-low.c (mips_linux_new_process): Likewise.
7333 (mips_linux_new_thread): Likewise.
7334 (mips_add_watchpoint): Likewise.
7335 * linux-x86-low.c (initialize_low_arch): Likewise.
7336 * lynx-low.c (lynx_add_process): Likewise.
7337 * mem-break.c (set_raw_breakpoint_at): Likewise.
7338 (set_breakpoint): Likewise.
7339 (add_condition_to_breakpoint): Likewise.
7340 (add_commands_to_breakpoint): Likewise.
7341 (clone_agent_expr): Likewise.
7342 (clone_one_breakpoint): Likewise.
7343 * regcache.c (new_register_cache): Likewise.
7344 * remote-utils.c (look_up_one_symbol): Likewise.
7345 * server.c (queue_stop_reply): Likewise.
7346 (start_inferior): Likewise.
7347 (queue_stop_reply_callback): Likewise.
7348 (handle_target_event): Likewise.
7349 * spu-low.c (fetch_ppc_memory): Likewise.
7350 (store_ppc_memory): Likewise.
7351 * target.c (set_target_ops): Likewise.
7352 * thread-db.c (thread_db_load_search): Likewise.
7353 (try_thread_db_load_1): Likewise.
7354 * tracepoint.c (add_tracepoint): Likewise.
7355 (add_tracepoint_action): Likewise.
7356 (create_trace_state_variable): Likewise.
7357 (cmd_qtdpsrc): Likewise.
7358 (cmd_qtro): Likewise.
7359 (add_while_stepping_state): Likewise.
7360 * win32-low.c (child_add_thread): Likewise.
7361 (get_image_name): Likewise.
7362
7363 2015-08-25 Yao Qi <yao.qi@linaro.org>
7364
7365 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7366
7367 2015-08-25 Yao Qi <yao.qi@linaro.org>
7368
7369 * Makefile.in (aarch64-linux.o): New rule.
7370 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7371 srv_tgtobj.
7372 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7373 (aarch64_init_debug_reg_state): Make it extern.
7374 (aarch64_linux_prepare_to_resume): Remove.
7375
7376 2015-08-25 Yao Qi <yao.qi@linaro.org>
7377
7378 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7379 lwp_arch_private_info and ptid_of_lwp.
7380
7381 2015-08-25 Yao Qi <yao.qi@linaro.org>
7382
7383 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7384 Find proc_info by find_process_pid. All callers updated.
7385
7386 2015-08-25 Yao Qi <yao.qi@linaro.org>
7387
7388 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7389 Remove.
7390 (debug_reg_change_callback): Remove.
7391 (aarch64_notify_debug_reg_change): Remove.
7392
7393 2015-08-25 Yao Qi <yao.qi@linaro.org>
7394
7395 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7396 Call current_lwp_ptid.
7397
7398 2015-08-25 Yao Qi <yao.qi@linaro.org>
7399
7400 * linux-aarch64-low.c (debug_reg_change_callback): Use
7401 debug_printf.
7402
7403 2015-08-25 Yao Qi <yao.qi@linaro.org>
7404
7405 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7406
7407 2015-08-25 Yao Qi <yao.qi@linaro.org>
7408
7409 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7410
7411 2015-08-25 Yao Qi <yao.qi@linaro.org>
7412
7413 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7414 the code.
7415
7416 2015-08-25 Yao Qi <yao.qi@linaro.org>
7417
7418 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7419 Remove.
7420 (debug_reg_change_callback): Remove argument entry and add argument
7421 lwp. Remove local variable thread. Don't print thread id in the
7422 debugging output. Don't check whether pid of thread equals to pid.
7423 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7424 iterate_over_lwps instead find_inferior.
7425
7426 2015-08-24 Pedro Alves <palves@redhat.com>
7427
7428 * inferiors.c (get_first_process): New function.
7429 * inferiors.h (get_first_process): New declaration.
7430 * remote-utils.c (read_ptid): Default to the first process in the
7431 list, instead of to the current thread's process.
7432
7433 2015-08-24 Pedro Alves <palves@redhat.com>
7434
7435 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7436 * event-loop.c: Likewise.
7437 * remote-utils.c: Likewise.
7438 * tracepoint.c: Likewise.
7439
7440 2015-08-24 Pedro Alves <palves@redhat.com>
7441
7442 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7443 ptid_get_lwp.
7444
7445 2015-08-21 Pedro Alves <palves@redhat.com>
7446
7447 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7448 instead of literal 1.
7449
7450 2015-08-21 Pedro Alves <palves@redhat.com>
7451
7452 * tdesc.c (default_description): Explicitly zero-initialize.
7453
7454 2015-08-21 Pedro Alves <palves@redhat.com>
7455
7456 PR gdb/18749
7457 * inferiors.c (remove_thread): Discard any pending stop reply for
7458 this thread.
7459 * server.c (remove_all_on_match_pid): Rename to ...
7460 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7461 instead of a pid.
7462 (discard_queued_stop_replies): Change parameter to a ptid. Now
7463 extern.
7464 (handle_v_kill, kill_inferior_callback, captured_main)
7465 (process_serial_event): Adjust.
7466 * server.h (discard_queued_stop_replies): Declare.
7467
7468 2015-08-21 Pedro Alves <palves@redhat.com>
7469
7470 * linux-low.c (wait_for_sigstop): Always switch to no thread
7471 selected if the previously current thread dies.
7472 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7473 process instead of the current thread's.
7474 * remote-utils.c (input_interrupt): Don't check if there's no
7475 current thread.
7476 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7477 current thread to the general thread fails, error out.
7478 (handle_qxfer_auxv, handle_qxfer_libraries)
7479 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7480 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7481 (handle_query): Check if there's a thread selected instead of
7482 checking whether there's any thread in the thread list.
7483 (handle_qxfer_threads, handle_qxfer_btrace)
7484 (handle_qxfer_btrace_conf): Don't error out early if there's no
7485 thread in the thread list.
7486 (handle_v_cont, myresume): Don't set the current thread to the
7487 continue thread.
7488 (process_serial_event) <Hg handling>: Also set thread_id if the
7489 previous general thread is still alive.
7490 (process_serial_event) <g/G handling>: If setting the current
7491 thread to the general thread fails, error out.
7492 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7493 thread's lwp instead of the current thread's.
7494 * target.c (set_desired_thread): If the desired thread was not
7495 found, leave the current thread pointing to NULL. Return an int
7496 (boolean) indicating success.
7497 * target.h (set_desired_thread): Change return type to int.
7498
7499 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7500
7501 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7502 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7503 #includes.
7504 (ps_get_thread_area): New function.
7505
7506 2015-08-19 Gary Benson <gbenson@redhat.com>
7507
7508 * hostio.c (handle_pread): Do not attempt to read more data
7509 than hostio_reply_with_data can fit in a packet.
7510
7511 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7512
7513 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7514
7515 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7516
7517 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7518
7519 2015-08-06 Pedro Alves <palves@redhat.com>
7520
7521 * tracepoint.c (expr_eval_result): Now an int.
7522
7523 2015-08-06 Pedro Alves <palves@redhat.com>
7524
7525 * gdbthread.h (struct regcache): Forward declare.
7526 (struct thread_info) <regcache_data>: Now a struct regcache
7527 pointer.
7528 * inferiors.c (inferior_regcache_data)
7529 (set_inferior_regcache_data): Now work with struct regcache
7530 pointers.
7531 * inferiors.h (struct regcache): Forward declare.
7532 (inferior_regcache_data, set_inferior_regcache_data): Now work
7533 with struct regcache pointers.
7534 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7535 (free_register_cache_thread): Remove struct regcache pointer
7536 casts.
7537
7538 2015-08-06 Pedro Alves <palves@redhat.com>
7539
7540 * server.c (captured_main): On error, print the exception message
7541 to stderr, and if run_once is set, throw a quit.
7542
7543 2015-08-06 Pedro Alves <palves@redhat.com>
7544
7545 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7546 the current thread.
7547
7548 2015-08-06 Pedro Alves <palves@redhat.com>
7549
7550 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7551 reading beyond the passed in buffer length.
7552
7553 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7554
7555 * tracepoint.c (symbol_list) <required>: Remove.
7556
7557 2015-08-06 Pedro Alves <palves@redhat.com>
7558
7559 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7560 count if stopping and suspending threads.
7561 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7562 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7563 (linux_detach): Complete an ongoing step-over.
7564 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7565 throughout.
7566 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7567 (linux_wait_1): If passing a signal to the inferior after
7568 finishing a step-over, unsuspend and re-resume all lwps. If we
7569 see a single-step event but the thread should be continuing, don't
7570 pass the trap to gdb.
7571 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7572 internal_error instead of gdb_assert.
7573 (enqueue_pending_signal): New function.
7574 (check_ptrace_stopped_lwp_gone): Add debug output.
7575 (start_step_over): Use internal_error instead of gdb_assert.
7576 (complete_ongoing_step_over): New function.
7577 (linux_resume_one_thread): Don't resume a suspended thread.
7578 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7579 it stepping.
7580
7581 2015-08-06 Pedro Alves <palves@redhat.com>
7582
7583 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7584 (linux_thread_alive): Use lwp_is_marked_dead.
7585 (extended_event_reported): Delete.
7586 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7587 instead of extended_event_reported.
7588 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7589 as well.
7590 (lwp_is_marked_dead): New function.
7591 (lwp_running): Use lwp_is_marked_dead.
7592 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7593 comment.
7594
7595 2015-08-06 Pedro Alves <palves@redhat.com>
7596
7597 * linux-low.c (linux_wait_1): Move fork event output out of the
7598 !report_to_gdb check. Pass event_child->waitstatus to
7599 target_waitstatus_to_string instead of ourstatus.
7600
7601 2015-08-04 Yao Qi <yao.qi@linaro.org>
7602
7603 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7604 if current_thread is 32 bit.
7605
7606 2015-08-04 Yao Qi <yao.qi@linaro.org>
7607
7608 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7609 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7610 * server.c (extended_protocol): Remove "static".
7611 * server.h (extended_protocol): Declare it.
7612
7613 2015-08-04 Yao Qi <yao.qi@linaro.org>
7614
7615 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7616 both aarch64 and aarch32.
7617 (aarch64_set_pc): Likewise.
7618
7619 2015-08-04 Yao Qi <yao.qi@linaro.org>
7620
7621 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7622 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7623 arm-with-neon.xml to srv_xmlfiles.
7624 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7625 (is_64bit_tdesc): New function.
7626 (aarch64_linux_read_description): New function.
7627 (aarch64_arch_setup): Call aarch64_linux_read_description.
7628 (regs_info): Rename to regs_info_aarch64.
7629 (aarch64_regs_info): Return right regs_info.
7630 (initialize_low_arch): Call initialize_low_arch_aarch32.
7631
7632 2015-08-04 Yao Qi <yao.qi@linaro.org>
7633
7634 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7635 * linux-aarch32-low.c: New file.
7636 * linux-aarch32-low.h: New file.
7637 * linux-arm-low.c (arm_fill_gregset): Move it to
7638 linux-aarch32-low.c.
7639 (arm_store_gregset): Likewise.
7640 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7641 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7642 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7643 (regs_info): Rename to regs_info_arm.
7644 (arm_regs_info): Return regs_info_aarch32 if
7645 have_ptrace_getregset is 1 and target description is
7646 arm_with_neon or arm_with_vfpv3.
7647 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7648 Call initialize_low_arch_aarch32 instead.
7649
7650 2015-08-04 Yao Qi <yao.qi@linaro.org>
7651
7652 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7653 * linux-low.c: ... here.
7654 * linux-low.h (have_ptrace_getregset): Declare it.
7655
7656 2015-08-04 Pedro Alves <palves@redhat.com>
7657
7658 * thread-db.c (struct thread_db): Use new typedefs.
7659 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7660 CHK calls.
7661 (disable_thread_event_reporting): Cast result of dlsym to
7662 destination function pointer type.
7663 (thread_db_mourn): Use td_ta_delete_ftype.
7664
7665 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7666
7667 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7668 arch variant.
7669 (CDX_BREAKPOINT): Define for R2.
7670 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7671 (the_low_target): Add comments.
7672
7673 2015-07-30 Yao Qi <yao.qi@linaro.org>
7674
7675 * linux-arm-low.c (arm_hwcap): Remove it.
7676 (arm_read_description): New local variable arm_hwcap. Don't
7677 set arm_hwcap to zero.
7678
7679 2015-07-30 Yao Qi <yao.qi@linaro.org>
7680
7681 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7682 Use regcache->tdesc instead.
7683 (arm_store_wmmxregset): Likewise.
7684 (arm_fill_vfpregset): Likewise.
7685 (arm_store_vfpregset): Likewise.
7686
7687 2015-07-30 Yao Qi <yao.qi@linaro.org>
7688
7689 * linux-arm-low.c: Include arch/arm.h.
7690 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7691 (arm_store_gregset): Likewise.
7692
7693 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7694
7695 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7696 ptrace's 4th parameter.
7697
7698 2015-07-27 Yao Qi <yao.qi@linaro.org>
7699
7700 * configure.srv (case aarch64*-*-linux*): Don't set
7701 srv_linux_usrregs.
7702
7703 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7704
7705 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7706 sys/ptrace.h.
7707 * linux-arm-low.c: Likewise.
7708 * linux-cris-low.c: Likewise.
7709 * linux-crisv32-low.c: Likewise.
7710 * linux-low.c: Likewise.
7711 * linux-m68k-low.c: Likewise.
7712 * linux-mips-low.c: Likewise.
7713 * linux-nios2-low.c: Likewise.
7714 * linux-s390-low.c: Likewise.
7715 * linux-sparc-low.c: Likewise.
7716 * linux-tic6x-low.c: Likewise.
7717 * linux-tile-low.c: Likewise.
7718 * linux-x86-low.c: Likewise.
7719
7720 2015-07-24 Pedro Alves <palves@redhat.com>
7721
7722 * config.in: Regenerate.
7723 * configure: Regenerate.
7724
7725 2015-07-24 Pedro Alves <palves@redhat.com>
7726
7727 * acinclude.m4: Include ../ptrace.m4.
7728 * configure.ac: Call GDB_AC_PTRACE.
7729 * config.in, configure: Regenerate.
7730
7731 2015-07-24 Yao Qi <yao.qi@linaro.org>
7732
7733 * linux-low.c (linux_create_inferior): Remove setting to
7734 proc->priv->new_inferior.
7735 (linux_attach): Likewise.
7736 (linux_low_filter_event): Likewise.
7737 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7738
7739 2015-07-24 Yao Qi <yao.qi@linaro.org>
7740
7741 * linux-low.c (linux_arch_setup): New function.
7742 (linux_low_filter_event): If proc->tdesc is NULL and
7743 proc->attached is true, call the_low_target.arch_setup.
7744 Otherwise, keep status pending, and return.
7745 (linux_resume_one_lwp_throw): Don't call get_pc if
7746 thread->while_stepping isn't NULL. Don't call
7747 get_thread_regcache if proc->tdesc is NULL.
7748 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7749 (linux_target_ops): Install arch_setup.
7750 * server.c (start_inferior): Call the_target->arch_setup.
7751 * target.h (struct target_ops) <arch_setup>: New field.
7752 (target_arch_setup): New marco.
7753 * lynx-low.c (lynx_target_ops): Update.
7754 * nto-low.c (nto_target_ops): Update.
7755 * spu-low.c (spu_target_ops): Update.
7756 * win32-low.c (win32_target_ops): Update.
7757
7758 2015-07-24 Yao Qi <yao.qi@linaro.org>
7759
7760 * linux-low.c (linux_add_process): Don't set
7761 proc->priv->new_inferior.
7762 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7763 (linux_attach): Likewise.
7764
7765 2015-07-24 Yao Qi <yao.qi@linaro.org>
7766
7767 * server.c (start_inferior): Code refactor.
7768
7769 2015-07-24 Yao Qi <yao.qi@linaro.org>
7770
7771 * server.c (process_serial_event): Set general_thread.
7772
7773 2015-07-21 Yao Qi <yao.qi@linaro.org>
7774
7775 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7776 aarch64_linux_get_debug_reg_capacity.
7777
7778 2015-07-17 Yao Qi <yao.qi@linaro.org>
7779
7780 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7781 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7782 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7783 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7784 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7785 (AARCH64_HWP_ALIGNMENT): Likewise.
7786 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7787 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7788 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7789 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7790 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7791 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7792 (struct aarch64_debug_reg_state): Likewise.
7793 (struct arch_lwp_info): Likewise.
7794 (aarch64_align_watchpoint): Likewise.
7795 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7796 (aarch64_watchpoint_length): Likewise.
7797 (aarch64_point_encode_ctrl_reg): Likewise
7798 (aarch64_point_is_aligned): Likewise.
7799 (aarch64_align_watchpoint): Likewise.
7800 (aarch64_linux_set_debug_regs):
7801 (aarch64_dr_state_insert_one_point): Likewise.
7802 (aarch64_dr_state_remove_one_point): Likewise.
7803 (aarch64_handle_breakpoint): Likewise.
7804 (aarch64_handle_aligned_watchpoint): Likewise.
7805 (aarch64_handle_unaligned_watchpoint): Likewise.
7806 (aarch64_handle_watchpoint): Likewise.
7807
7808 2015-07-17 Yao Qi <yao.qi@linaro.org>
7809
7810 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7811 and don't aarch64_get_debug_reg_state. All callers update.
7812 (aarch64_handle_aligned_watchpoint): Likewise.
7813 (aarch64_handle_unaligned_watchpoint): Likewise.
7814 (aarch64_handle_watchpoint): Likewise.
7815 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7816 (aarch64_remove_point): Likewise.
7817
7818 2015-07-17 Yao Qi <yao.qi@linaro.org>
7819
7820 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7821 debug_printf.
7822 (aarch64_handle_unaligned_watchpoint): Likewise.
7823
7824 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7825
7826 Revert the previous 3 commits:
7827 Move gdb_regex* to common/
7828 Move linux_find_memory_regions_full & co.
7829 gdbserver build-id attribute generator
7830
7831 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7832 Jan Kratochvil <jan.kratochvil@redhat.com>
7833
7834 gdbserver build-id attribute generator.
7835 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7836 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7837 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7838 (find_phdr): New.
7839 (get_dynamic): Use find_pdhr to traverse program headers.
7840 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7841 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7842 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7843 (get_hex_build_id): New.
7844 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7845 to reply XML document.
7846
7847 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7848 Jan Kratochvil <jan.kratochvil@redhat.com>
7849
7850 * target.c: Include target/target-utils.h and fcntl.h.
7851 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7852 (target_fileio_read_stralloc): New functions.
7853
7854 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7855
7856 * Makefile.in (OBS): Add gdb_regex.o.
7857 (gdb_regex.o): New.
7858 * config.in: Rebuilt.
7859 * configure: Rebuilt.
7860
7861 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7862 Jan Kratochvil <jan.kratochvil@redhat.com>
7863
7864 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7865 * Makefile.in (OBS): Add target-utils.o.
7866 (linux-maps.o, target-utils.o): New.
7867 * configure.srv (srv_linux_obj): Add linux-maps.o.
7868
7869 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7870
7871 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7872 function, return 1.
7873 (the_low_target): Install it.
7874
7875 2015-07-14 Pedro Alves <palves@redhat.com>
7876
7877 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7878 Instead, ignore ECHILD, and throw an error for other errnos.
7879
7880 2015-07-10 Pedro Alves <palves@redhat.com>
7881
7882 * event-loop.c (struct callback_event) <data>: Change type to
7883 gdb_client_data instance instead of gdb_client_data pointer.
7884 (append_callback_event): Adjust.
7885
7886 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
7887
7888 * linux-aarch64-low.c: Add comments for each linux_target_ops
7889 method. Remove comments already covered in target_ops and
7890 linux_target_ops definitions.
7891 (the_low_target): Add comments for each unimplemented method.
7892
7893 2015-07-09 Yao Qi <yao.qi@linaro.org>
7894
7895 * linux-aarch64-low.c (aarch64_regmap): Remove.
7896 (aarch64_usrregs_info): Remove.
7897 (regs_info): Set field usrregs to NULL.
7898
7899 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
7900
7901 * linux-low.c: Include "rsp-low.h"
7902 (linux_low_encode_pt_config, linux_low_encode_raw): New.
7903 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
7904 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
7905 (handle_btrace_enable_pt): New.
7906 (handle_btrace_general_set): Support "pt".
7907 (handle_btrace_conf_general_set): Support "pt:size".
7908
7909 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7910
7911 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
7912 Z_PACKET_SW_BP.
7913
7914 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
7915
7916 * linux-aarch64-low.c: Remove comment about endianness.
7917 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
7918 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
7919 memcmp.
7920
7921 2015-06-24 Gary Benson <gbenson@redhat.com>
7922
7923 * linux-i386-ipa.c (stdint.h): Do not include.
7924 * lynx-i386-low.c (stdint.h): Likewise.
7925 * lynx-ppc-low.c (stdint.h): Likewise.
7926 * mem-break.c (stdint.h): Likewise.
7927 * thread-db.c (stdint.h): Likewise.
7928 * tracepoint.c (stdint.h): Likewise.
7929 * win32-low.c (stdint.h): Likewise.
7930
7931 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
7932
7933 * server.c (write_qxfer_response): Update call to
7934 remote_escape_output.
7935
7936 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
7937 Jan Kratochvil <jan.kratochvil@redhat.com>
7938
7939 Merge multiple hex conversions.
7940 * gdbreplay.c (tohex): Rename to 'fromhex'.
7941 (logchar): Use fromhex.
7942
7943 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
7944
7945 * server.c (handle_qxfer_libraries): Set `version' attribute for
7946 <library-list>.
7947
7948 2015-06-10 Gary Benson <gbenson@redhat.com>
7949
7950 * target.h (struct target_ops) <multifs_open>: New field.
7951 <multifs_unlink>: Likewise.
7952 <multifs_readlink>: Likewise.
7953 * linux-low.c (nat/linux-namespaces.h): New include.
7954 (linux_target_ops): Initialize the_target->multifs_open,
7955 the_target->multifs_unlink and the_target->multifs_readlink.
7956 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
7957 * hostio.c (hostio_fs_pid): New static variable.
7958 (hostio_handle_new_gdb_connection): New function.
7959 (handle_setfs): Likewise.
7960 (handle_open): Use the_target->multifs_open as appropriate.
7961 (handle_unlink): Use the_target->multifs_unlink as appropriate.
7962 (handle_readlink): Use the_target->multifs_readlink as
7963 appropriate.
7964 (handle_vFile): Handle vFile:setfs packets.
7965 * server.c (handle_query): Call hostio_handle_new_gdb_connection
7966 after target_handle_new_gdb_connection.
7967
7968 2015-06-10 Gary Benson <gbenson@redhat.com>
7969
7970 * configure.ac (AC_CHECK_FUNCS): Add setns.
7971 * config.in: Regenerate.
7972 * configure: Likewise.
7973 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
7974 (linux-namespaces.o): New rule.
7975 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
7976
7977 2015-06-09 Gary Benson <gbenson@redhat.com>
7978
7979 * hostio.c (handle_open): Process mode argument with
7980 fileio_to_host_mode.
7981
7982 2015-06-01 Yao Qi <yao.qi@linaro.org>
7983
7984 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
7985 * linux-x86-low.c: Likewise.
7986
7987 2015-05-28 Don Breazeal <donb@codesourcery.com>
7988
7989 * linux-low.c (handle_extended_wait): Initialize
7990 thread_info.last_resume_kind for new fork children.
7991
7992 2015-05-15 Pedro Alves <palves@redhat.com>
7993
7994 * target.h (target_handle_new_gdb_connection): Rewrite using if
7995 wrapped in do/while.
7996
7997 2015-05-14 Joel Brobecker <brobecker@adacore.com>
7998
7999 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8000 * configure, config.in: Regenerate.
8001 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8002 Declare typedef.
8003
8004 2015-05-12 Don Breazeal <donb@codesourcery.com>
8005
8006 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8007 PTRACE_EVENT_VFORK_DONE.
8008 (linux_low_ptrace_options, extended_event_reported): Add vfork
8009 events.
8010 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8011 and "vforkdone" for RSP 'T' Stop Reply Packet.
8012 * server.h (report_vfork_events): Declare
8013 global variable.
8014
8015 2015-05-12 Don Breazeal <donb@codesourcery.com>
8016
8017 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8018 (the_low_target) <new_fork>: Initialize new member.
8019 * linux-arm-low.c (arm_new_fork): New function.
8020 (the_low_target) <new_fork>: Initialize new member.
8021 * linux-low.c (handle_extended_wait): Call new target function
8022 new_fork.
8023 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8024 * linux-mips-low.c (mips_add_watchpoint): New function
8025 extracted from mips_insert_point.
8026 (the_low_target) <new_fork>: Initialize new member.
8027 (mips_linux_new_fork): New function.
8028 (mips_insert_point): Call mips_add_watchpoint.
8029 * linux-x86-low.c (x86_linux_new_fork): New function.
8030 (the_low_target) <new_fork>: Initialize new member.
8031
8032 2015-05-12 Don Breazeal <donb@codesourcery.com>
8033
8034 * linux-low.c (handle_extended_wait): Implement return value,
8035 rename argument 'event_child' to 'event_lwp', handle
8036 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8037 (linux_low_ptrace_options): New function.
8038 (linux_low_filter_event): Call linux_low_ptrace_options,
8039 use different argument fo linux_enable_event_reporting,
8040 use return value from handle_extended_wait.
8041 (extended_event_reported): New function.
8042 (linux_wait_1): Call extended_event_reported and set
8043 status to report fork events.
8044 (linux_write_memory): Add pid to debug message.
8045 (reset_lwp_ptrace_options_callback): New function.
8046 (linux_handle_new_gdb_connection): New function.
8047 (linux_target_ops): Initialize new structure member.
8048 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8049 * lynx-low.c: Initialize new structure member.
8050 * remote-utils.c (prepare_resume_reply): Implement stop reason
8051 "fork" for "T" stop message.
8052 * server.c (handle_query): Call handle_new_gdb_connection.
8053 * server.h (report_fork_events): Declare global flag.
8054 * target.h (struct target_ops) <handle_new_gdb_connection>:
8055 New member.
8056 (target_handle_new_gdb_connection): New macro.
8057 * win32-low.c: Initialize new structure member.
8058
8059 2015-05-12 Don Breazeal <donb@codesourcery.com>
8060
8061 * mem-break.c (APPEND_TO_LIST): Define macro.
8062 (clone_agent_expr): New function.
8063 (clone_one_breakpoint): New function.
8064 (clone_all_breakpoints): New function.
8065 * mem-break.h: Declare new functions.
8066
8067 2015-05-12 Don Breazeal <donb@codesourcery.com>
8068
8069 * linux-low.c (linux_supports_fork_events): New function.
8070 (linux_supports_vfork_events): New function.
8071 (linux_target_ops): Initialize new structure members.
8072 (initialize_low): Call linux_check_ptrace_features.
8073 * lynx-low.c (lynx_target_ops): Initialize new structure
8074 members.
8075 * server.c (report_fork_events, report_vfork_events):
8076 New global flags.
8077 (handle_query): Add new features to qSupported packet and
8078 response.
8079 (captured_main): Initialize new global variables.
8080 * target.h (struct target_ops) <supports_fork_events>:
8081 New member.
8082 <supports_vfork_events>: New member.
8083 (target_supports_fork_events): New macro.
8084 (target_supports_vfork_events): New macro.
8085 * win32-low.c (win32_target_ops): Initialize new structure
8086 members.
8087
8088 2015-05-12 Gary Benson <gbenson@redhat.com>
8089
8090 * server.c (handle_qxfer_exec_file): Use current process
8091 if annex is empty.
8092
8093 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8094
8095 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8096 Remove HAVE_PTRACE_GETREGS conditionals.
8097 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8098 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8099
8100 2015-05-08 Yao Qi <yao.qi@linaro.org>
8101
8102 * linux-low.c (linux_supports_conditional_breakpoints): New
8103 function.
8104 (linux_target_ops): Install new target method.
8105 * lynx-low.c (lynx_target_ops): Install NULL hook for
8106 supports_conditional_breakpoints.
8107 * nto-low.c (nto_target_ops): Likewise.
8108 * spu-low.c (spu_target_ops): Likewise.
8109 * win32-low.c (win32_target_ops): Likewise.
8110 * server.c (handle_query): Check
8111 target_supports_conditional_breakpoints.
8112 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8113 New field.
8114 (target_supports_conditional_breakpoints): New macro.
8115
8116 2015-05-06 Pedro Alves <palves@redhat.com>
8117
8118 PR server/18081
8119 * server.c (start_inferior): If the process exits, mourn it.
8120
8121 2015-04-21 Gary Benson <gbenson@redhat.com>
8122
8123 * hostio.c (fileio_open_flags_to_host): Factored out to
8124 fileio_to_host_openflags in common/fileio.c. Single use
8125 updated.
8126
8127 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8128
8129 * linux-xtensa-low.c (xtensa_fill_gregset)
8130 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8131 XCHAL_HAVE_LOOP.
8132
8133 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8134
8135 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8136 (regs_info): Replace usrregs pointer with NULL.
8137
8138 2015-04-17 Gary Benson <gbenson@redhat.com>
8139
8140 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8141 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8142 * server.c (handle_qxfer_exec_file): New function.
8143 (qxfer_packets): Add exec-file entry.
8144 (handle_query): Report qXfer:exec-file:read as supported packet.
8145
8146 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8147
8148 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8149
8150 2015-04-09 Gary Benson <gbenson@redhat.com>
8151
8152 * hostio-errno.c (errno_to_fileio_error): Remove function.
8153 Update caller to use remote_fileio_to_fio_error.
8154
8155 2015-04-09 Yao Qi <yao.qi@linaro.org>
8156
8157 * linux-low.c (linux_insert_point): Call
8158 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8159 (linux_remove_point): Call remove_memory_breakpoint if type is
8160 raw_bkpt_type_sw.
8161 * linux-x86-low.c (x86_insert_point): Don't call
8162 insert_memory_breakpoint.
8163 (x86_remove_point): Don't call remove_memory_breakpoint.
8164
8165 2015-04-01 Pedro Alves <palves@redhat.com>
8166 Cleber Rosa <crosa@redhat.com>
8167
8168 * server.c (gdbserver_usage): Reorganize and extend the usage
8169 message.
8170
8171 2015-03-24 Pedro Alves <palves@redhat.com>
8172
8173 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8174 output. Also dump TRAP_TRACE.
8175 (linux_low_filter_event): In debug output, distinguish a
8176 resume_stop SIGSTOP from a delayed SIGSTOP.
8177
8178 2015-03-24 Gary Benson <gbenson@redhat.com>
8179
8180 * linux-x86-low.c (x86_linux_new_thread): Moved to
8181 nat/x86-linux.c.
8182 (x86_linux_prepare_to_resume): Likewise.
8183
8184 2015-03-24 Gary Benson <gbenson@redhat.com>
8185
8186 * Makefile.in (x86-linux-dregs.o): New rule.
8187 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8188 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8189 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8190 (x86_linux_dr_get): Likewise.
8191 (x86_linux_dr_set): Likewise.
8192 (update_debug_registers_callback): Likewise.
8193 (x86_linux_dr_set_addr): Likewise.
8194 (x86_linux_dr_get_addr): Likewise.
8195 (x86_linux_dr_set_control): Likewise.
8196 (x86_linux_dr_get_control): Likewise.
8197 (x86_linux_dr_get_status): Likewise.
8198 (x86_linux_update_debug_registers): Likewise.
8199
8200 2015-03-24 Gary Benson <gbenson@redhat.com>
8201
8202 * linux-x86-low.c (x86_linux_update_debug_registers):
8203 New function, factored out from...
8204 (x86_linux_prepare_to_resume): ...this.
8205
8206 2015-03-24 Gary Benson <gbenson@redhat.com>
8207
8208 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8209 (x86_linux_dr_set): Likewise.
8210 (update_debug_registers_callback): Likewise.
8211 (x86_linux_dr_set_addr): Likewise.
8212 (x86_linux_dr_get_addr): Likewise.
8213 (x86_linux_dr_set_control): Likewise.
8214 (x86_linux_dr_get_control): Likewise.
8215 (x86_linux_dr_get_status): Likewise.
8216 (x86_linux_prepare_to_resume): Likewise.
8217
8218 2015-03-24 Gary Benson <gbenson@redhat.com>
8219
8220 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8221 Use perror_with_name. Pass string through gettext.
8222 (x86_linux_dr_set): Likewise.
8223
8224 2015-03-24 Gary Benson <gbenson@redhat.com>
8225
8226 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8227 (x86_linux_dr_set_addr): ...this.
8228 (x86_dr_low_get_addr): Rename to...
8229 (x86_linux_dr_get_addr): ...this.
8230 (x86_dr_low_set_control): Rename to...
8231 (x86_linux_dr_set_control): ...this.
8232 (x86_dr_low_get_control): Rename to...
8233 (x86_linux_dr_get_control): ...this.
8234 (x86_dr_low_get_status): Rename to...
8235 (x86_linux_dr_get_status): ...this.
8236 (x86_dr_low): Update with new function names.
8237
8238 2015-03-24 Gary Benson <gbenson@redhat.com>
8239
8240 * Makefile.in (x86-linux.o): New rule.
8241 * configure.srv: Add x86-linux.o to relevant targets.
8242 * linux-low.c (lwp_set_arch_private_info): New function.
8243 (lwp_arch_private_info): Likewise.
8244 * linux-x86-low.c: Include nat/x86-linux.h.
8245 (arch_lwp_info): Removed structure.
8246 (update_debug_registers_callback):
8247 Use lwp_set_debug_registers_changed.
8248 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8249 and lwp_set_debug_registers_changed.
8250 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8251
8252 2015-03-24 Gary Benson <gbenson@redhat.com>
8253
8254 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8255 * linux-arm-low.c (arm_new_thread): Likewise.
8256 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8257 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8258 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8259 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8260
8261 2015-03-24 Gary Benson <gbenson@redhat.com>
8262
8263 * linux-low.c (ptid_of_lwp): New function.
8264 (lwp_is_stopped): Likewise.
8265 (lwp_stop_reason): Likewise.
8266 * linux-x86-low.c (update_debug_registers_callback):
8267 Use lwp_is_stopped.
8268 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8269 lwp_stop_reason.
8270
8271 2015-03-24 Gary Benson <gbenson@redhat.com>
8272
8273 * linux-low.h (linux_stop_lwp): Remove declaration.
8274
8275 2015-03-24 Gary Benson <gbenson@redhat.com>
8276
8277 * linux-low.h: Include nat/linux-nat.h.
8278 * linux-low.c (iterate_over_lwps_args): New structure.
8279 (iterate_over_lwps_filter): New function.
8280 (iterate_over_lwps): Likewise.
8281 * linux-x86-low.c (update_debug_registers_callback):
8282 Update signature to what iterate_over_lwps expects.
8283 Remove PID check that iterate_over_lwps now performs.
8284 (x86_dr_low_set_addr): Use iterate_over_lwps.
8285 (x86_dr_low_set_control): Likewise.
8286
8287 2015-03-24 Gary Benson <gbenson@redhat.com>
8288
8289 * linux-x86-low.c (x86_debug_reg_state): New function.
8290 (x86_linux_prepare_to_resume): Use the above.
8291
8292 2015-03-24 Gary Benson <gbenson@redhat.com>
8293
8294 * linux-low.c (current_lwp_ptid): New function.
8295 * linux-x86-low.c: Include nat/linux-nat.h.
8296 (x86_dr_low_get_addr): Use current_lwp_ptid.
8297 (x86_dr_low_get_control): Likewise.
8298 (x86_dr_low_get_status): Likewise.
8299
8300 2015-03-20 Pedro Alves <palves@redhat.com>
8301
8302 * tracepoint.c (cmd_qtstatus): Make "str" const.
8303
8304 2015-03-20 Pedro Alves <palves@redhat.com>
8305
8306 * server.c (handle_general_set): Make "req_str" const.
8307
8308 2015-03-19 Pedro Alves <palves@redhat.com>
8309
8310 * linux-low.c (linux_resume_one_lwp): Rename to ...
8311 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8312 instead call perror_with_name.
8313 (check_ptrace_stopped_lwp_gone): New function.
8314 (linux_resume_one_lwp): Reimplement as wrapper around
8315 linux_resume_one_lwp_throw that swallows errors if the LWP is
8316 gone.
8317
8318 2015-03-19 Pedro Alves <palves@redhat.com>
8319
8320 * linux-low.c (count_events_callback, select_event_lwp_callback):
8321 No longer check whether the thread has resume_stop as last resume
8322 kind.
8323
8324 2015-03-19 Pedro Alves <palves@redhat.com>
8325
8326 * linux-low.c (count_events_callback, select_event_lwp_callback):
8327 Use the lwp's status_pending_p field, not the thread's.
8328
8329 2015-03-19 Pedro Alves <palves@redhat.com>
8330
8331 * linux-low.c (select_event_lwp_callback): Update comments to
8332 no longer mention SIGTRAP.
8333
8334 2015-03-18 Gary Benson <gbenson@redhat.com>
8335
8336 * server.c (handle_query): Do not report vFile:fstat as supported.
8337
8338 2015-03-11 Gary Benson <gbenson@redhat.com>
8339
8340 * hostio.c (sys/types.h): New include.
8341 (sys/stat.h): Likewise.
8342 (common-remote-fileio.h): Likewise.
8343 (handle_fstat): New function.
8344 (handle_vFile): Handle vFile:fstat packets.
8345
8346 2015-03-11 Gary Benson <gbenson@redhat.com>
8347
8348 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8349 struct stat.st_blocks and struct stat.st_blksize.
8350 * configure: Regenerate.
8351 * config.in: Likewise.
8352 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8353 (OBS): Add common-remote-fileio.o.
8354 (common-remote-fileio.o): New rule.
8355
8356 2015-03-09 Pedro Alves <palves@redhat.com>
8357
8358 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8359 'struct sockaddr' pointer in 'accept' call.
8360
8361 2015-03-09 Pedro Alves <palves@redhat.com>
8362
8363 Revert:
8364 2015-03-07 Pedro Alves <palves@redhat.com>
8365 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8366 or <winsock2.h> here. Instead include "gdb_socket.h".
8367 (remote_open): Use union gdb_sockaddr_u.
8368 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8369 or <winsock2.h> here. Instead include "gdb_socket.h".
8370 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8371 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8372 or <sys/un.h>.
8373 (init_named_socket, gdb_agent_helper_thread): Use union
8374 gdb_sockaddr_u.
8375
8376 2015-03-07 Pedro Alves <palves@redhat.com>
8377
8378 * configure.ac (build_warnings): Move
8379 -Wdeclaration-after-statement to the C-specific set.
8380 * configure: Regenerate.
8381
8382 2015-03-07 Pedro Alves <palves@redhat.com>
8383
8384 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8385 or <winsock2.h> here. Instead include "gdb_socket.h".
8386 (remote_open): Use union gdb_sockaddr_u.
8387 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8388 or <winsock2.h> here. Instead include "gdb_socket.h".
8389 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8390 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8391 or <sys/un.h>.
8392 (init_named_socket, gdb_agent_helper_thread): Use union
8393 gdb_sockaddr_u.
8394
8395 2015-03-07 Pedro Alves <palves@redhat.com>
8396
8397 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8398 instead.
8399
8400 2015-03-06 Yao Qi <yao.qi@linaro.org>
8401
8402 * linux-aarch64-low.c (aarch64_insert_point): Use
8403 show_debug_regs as a boolean.
8404 (aarch64_remove_point): Likewise.
8405
8406 2015-03-05 Pedro Alves <palves@redhat.com>
8407
8408 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8409 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8410 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8411 * nto-low.c (nto_target_ops): Likewise.
8412 * spu-low.c (spu_target_ops): Likewise.
8413 * win32-low.c (win32_target_ops): Likewise.
8414
8415 2015-03-04 Pedro Alves <palves@redhat.com>
8416
8417 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8418 Decide whether a breakpoint triggered based on the SIGTRAP's
8419 siginfo.si_code.
8420 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8421 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8422 (linux_low_filter_event): Check for breakpoints before checking
8423 watchpoints.
8424 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8425 siginfo.si_code.
8426 (linux_stopped_by_sw_breakpoint)
8427 (linux_supports_stopped_by_sw_breakpoint)
8428 (linux_stopped_by_hw_breakpoint)
8429 (linux_supports_stopped_by_hw_breakpoint): New functions.
8430 (linux_target_ops): Install new target methods.
8431
8432 2015-03-04 Pedro Alves <palves@redhat.com>
8433
8434 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8435 * server.c (swbreak_feature, hwbreak_feature): New globals.
8436 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8437 (captured_main): Clear swbreak_feature and hwbreak_feature.
8438 * server.h (swbreak_feature, hwbreak_feature): Declare.
8439 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8440 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8441 supports_stopped_by_hw_breakpoint>: New fields.
8442 (target_supports_stopped_by_sw_breakpoint)
8443 (target_stopped_by_sw_breakpoint)
8444 (target_supports_stopped_by_hw_breakpoint)
8445 (target_stopped_by_hw_breakpoint): Declare.
8446
8447 2015-03-04 Pedro Alves <palves@redhat.com>
8448
8449 enum lwp_stop_reason -> enum target_stop_reason
8450 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8451 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8452 (linux_wait_1, stuck_in_jump_pad_callback)
8453 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8454 (linux_stopped_by_watchpoint):
8455 * linux-low.h (enum lwp_stop_reason): Delete.
8456 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8457 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8458
8459 2015-03-04 Yao Qi <yao.qi@linaro.org>
8460
8461 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8462
8463 2015-03-03 Gary Benson <gbenson@redhat.com>
8464
8465 * hostio.c (handle_vFile): Fix prefix lengths.
8466
8467 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8468
8469 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8470 ptr_bits.
8471
8472 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8473
8474 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8475 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8476 (clean): Add "rm -f" for above C files.
8477 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8478 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8479 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8480 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8481 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8482 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8483 (init_registers_s390x_vx_linux64)
8484 (init_registers_s390x_tevx_linux64)
8485 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8486 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8487 declarations.
8488 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8489 (s390_store_vxrs_high): New functions.
8490 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8491 NT_S390_VXRS_HIGH.
8492 (s390_arch_setup): Add logic for selecting one of the new target
8493 descriptions. Activate the new vector regsets if applicable.
8494 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8495 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8496 and init_registers_s390x_tevx_linux64.
8497
8498 2015-03-01 Pedro Alves <palves@redhat.com>
8499
8500 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8501 parameter.
8502
8503 2015-02-27 Pedro Alves <palves@redhat.com>
8504
8505 * linux-x86-low.c (u_debugreg_offset): New function.
8506 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8507
8508 2015-02-27 Pedro Alves <palves@redhat.com>
8509
8510 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8511 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8512 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8513 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8514 (ps_lsetfpregs, ps_getpid)
8515 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8516 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8517 (ps_lsetxregs, ps_plog): Declare.
8518
8519 2015-02-27 Pedro Alves <palves@redhat.com>
8520
8521 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8522 IP_AGENT_EXPORT_FUNC.
8523 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8524 IP_AGENT_EXPORT_FUNC.
8525 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8526 (IP_AGENT_EXPORT): Delete.
8527 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8528 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8529 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8530 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8531 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8532 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8533 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8534 (traceframe_read_count, traceframe_write_count)
8535 (traceframes_created, trace_state_variables, get_raw_reg)
8536 (get_trace_state_variable_value, set_trace_state_variable_value)
8537 (ust_loaded, helper_thread_id, cmd_buf): Use
8538 IPA_SYM_EXPORTED_NAME.
8539 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8540 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8541 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8542 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8543 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8544 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8545 EXTERN_C_PUSH/EXTERN_C_POP.
8546 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8547 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8548 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8549 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8550 (traceframe_write_count, traceframe_read_count)
8551 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8552 (about_to_request_buffer_space, get_trace_state_variable_value)
8553 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8554 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8555 EXTERN_C_PUSH/EXTERN_C_POP.
8556 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8557 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8558 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8559 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8560 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8561 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8562 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8563 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8564 Define.
8565 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8566 (IP_AGENT_EXPORT_VAR_DECL): Define.
8567 (tracing): Declare.
8568 (gdb_agent_get_raw_reg): Declare.
8569
8570 2015-02-27 Tom Tromey <tromey@redhat.com>
8571 Pedro Alves <palves@redhat.com>
8572
8573 Rename symbols whose names are reserved C++ keywords throughout.
8574
8575 2015-02-27 Pedro Alves <palves@redhat.com>
8576
8577 * Makefile.in (COMPILER): New, get it from autoconf.
8578 (CXX): Get from autoconf instead.
8579 (COMPILE.pre): Use COMPILER.
8580 (CC-LD): Rename to ...
8581 (CC_LD): ... this. Use COMPILER.
8582 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8583 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8584 * acinclude.m4: Include build-with-cxx.m4.
8585 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8586 Disable -Werror by default if building in C++ mode.
8587 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8588 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8589 the C++ compiler. Save/restore CXXFLAGS too.
8590 * configure: Regenerate.
8591
8592 2015-02-27 Pedro Alves <palves@redhat.com>
8593
8594 * acinclude.m4: Include libiberty.m4.
8595 * configure.ac: Call libiberty_INIT.
8596 * config.in, configure: Regenerate.
8597
8598 2015-02-26 Pedro Alves <palves@redhat.com>
8599
8600 * linux-low.c (linux_wait_1): When incrementing the PC past a
8601 program breakpoint always use the_low_target.breakpoint_len as
8602 increment, rather than the maximum between that and
8603 the_low_target.decr_pc_after_break.
8604
8605 2015-02-23 Pedro Alves <palves@redhat.com>
8606
8607 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8608 thread was doing a step-over; always adjust the PC if
8609 we stepped over a permanent breakpoint.
8610 (linux_wait_1): If we stepped over breakpoint that was on top of a
8611 permanent breakpoint, manually advance the PC past it.
8612
8613 2015-02-23 Pedro Alves <palves@redhat.com>
8614
8615 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8616 modes.
8617 (x86_fill_gregset, x86_store_gregset): Use it when handling
8618 $orig_eax.
8619
8620 2015-02-20 Pedro Alves <palves@redhat.com>
8621
8622 * thread-db.c: Include "nat/linux-procfs.h".
8623 (thread_db_init): Skip listing new threads if the kernel supports
8624 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8625
8626 2015-02-20 Pedro Alves <palves@redhat.com>
8627
8628 * linux-low.c (status_pending_p_callback): Use ptid_match.
8629
8630 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8631
8632 PR breakpoints/16812
8633 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8634 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8635 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8636
8637 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8638
8639 PR breakpoints/15956
8640 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8641
8642 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8643
8644 * linux-low.c (linux_low_btrace_conf): Print size.
8645 * server.c (handle_btrace_conf_general_set): New.
8646 (hanle_general_set): Call handle_btrace_conf_general_set.
8647 (handle_query): Report Qbtrace-conf:bts:size as supported.
8648
8649 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8650
8651 * linux-low.c (linux_low_enable_btrace): Update parameters.
8652 (linux_low_btrace_conf): New.
8653 (linux_target_ops)<to_btrace_conf>: Initialize.
8654 * server.c (current_btrace_conf): New.
8655 (handle_btrace_enable): Rename to ...
8656 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8657 to target_enable_btrace. Update comment. Update users.
8658 (handle_qxfer_btrace_conf): New.
8659 (qxfer_packets): Add btrace-conf entry.
8660 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8661 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8662 (target_ops)<read_btrace_conf>: New.
8663 (target_enable_btrace): Update parameters.
8664 (target_read_btrace_conf): New.
8665
8666 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8667
8668 * server.c (handle_btrace_general_set): Remove call to
8669 target_supports_btrace.
8670 (supported_btrace_packets): New.
8671 (handle_query): Call supported_btrace_packets.
8672 * target.h: include btrace-common.h.
8673 (btrace_target_info): Removed.
8674 (supports_btrace, target_supports_btrace): Update parameters.
8675
8676 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8677
8678 * Makefile.in (SFILES): Add common/btrace-common.c.
8679 (OBS): Add common/btrace-common.o.
8680 (btrace-common.o): Add build rules.
8681 * linux-low: Include btrace-common.h.
8682 (linux_low_read_btrace): Use struct btrace_data. Call
8683 btrace_data_init and btrace_data_fini.
8684
8685 2015-02-06 Pedro Alves <palves@redhat.com>
8686
8687 * thread-db.c (find_new_threads_callback): Add debug output.
8688
8689 2015-02-04 Pedro Alves <palves@redhat.com>
8690
8691 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8692 (resume_stopped_resumed_lwps): New function.
8693 (linux_wait_for_event_filtered): Use it.
8694
8695 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8696
8697 * Makefile.in (SFILES): Add linux-personality.c.
8698 (linux-personality.o): New rule.
8699 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8700 list of objects to be built.
8701 * linux-low.c: Include nat/linux-personality.h.
8702 (linux_create_inferior): Remove code to disable address space
8703 randomization (moved to ../nat/linux-personality.c). Create
8704 cleanup to disable address space randomization.
8705
8706 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8707
8708 * Makefile.in (posix-strerror.o): New rule.
8709 (mingw-strerror.o): Likewise.
8710 * configure: Regenerated.
8711 * configure.ac: Source file ../common/common.host. Initialize new
8712 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8713
8714 2015-01-14 Yao Qi <yao@codesourcery.com>
8715
8716 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8717 (ppc-linux.o): New rule.
8718 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8719 * configure.ac: AC_CHECK_FUNCS(getauxval).
8720 * config.in: Re-generated.
8721 * configure: Re-generated.
8722 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8723 ppc64_64bit_inferior_p
8724
8725 2015-01-14 Yao Qi <yao@codesourcery.com>
8726
8727 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8728 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8729 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8730 (PT_ORIG_R3, PT_TRAP): Likewise.
8731 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8732 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8733 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8734
8735 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8736
8737 * i387-fp.c (i387_cache_to_xsave): In look over
8738 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8739 zmmh_low_space field by use of zmmh_high_space.
8740
8741 2015-01-09 Pedro Alves <palves@redhat.com>
8742
8743 * linux-low.c (step_over_bkpt): Move higher up in the file.
8744 (handle_extended_wait): Don't store the stop_pc here.
8745 (get_stop_pc): Adjust comments and rename to ...
8746 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8747 stopped for a software breakpoint or hardware breakpoint.
8748 (thread_still_has_status_pending_p): New function.
8749 (status_pending_p_callback): Use
8750 thread_still_has_status_pending_p. If the event is no longer
8751 interesting, resume the LWP.
8752 (handle_tracepoints): Add assert.
8753 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8754 (wstatus_maybe_breakpoint): New function.
8755 (cancel_breakpoint): Delete function.
8756 (check_stopped_by_watchpoint): New function, factored out from
8757 linux_low_filter_event.
8758 (lp_status_maybe_breakpoint): Delete function.
8759 (linux_low_filter_event): Remove filter_ptid argument.
8760 Leave thread group exits pending here. Store the LWP's stop PC.
8761 Always leave events pending.
8762 (linux_wait_for_event_filtered): Pull all events out of the
8763 kernel, and leave them all pending.
8764 (count_events_callback, select_event_lwp_callback): Consider all
8765 events.
8766 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8767 (select_event_lwp): Only give preference to the stepping LWP in
8768 all-stop mode. Adjust comments.
8769 (ignore_event): New function.
8770 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8771 references to cancel_breakpoints. Adjust to renames. Also give
8772 equal priority to all LWPs that have had events in non-stop mode.
8773 If reporting a software breakpoint event, unadjust the LWP's PC.
8774 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8775 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8776 Adjust.
8777 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8778 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8779 (linux_stopped_by_watchpoint): Adjust.
8780 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8781 * linux-low.h (enum lwp_stop_reason): New.
8782 (struct lwp_info) <stop_pc>: Adjust comment.
8783 <stopped_by_watchpoint>: Delete field.
8784 <stop_reason>: New field.
8785 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8786 * mem-break.c (software_breakpoint_inserted_here)
8787 (hardware_breakpoint_inserted_here): New function.
8788 * mem-break.h (software_breakpoint_inserted_here)
8789 (hardware_breakpoint_inserted_here): Declare.
8790 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8791 (cancel_breakpoints): Delete.
8792 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8793 (upload_fast_traceframes): Remove references to
8794 cancel_breakpoints.
8795
8796 2015-01-09 Pedro Alves <palves@redhat.com>
8797
8798 * thread-db.c (find_new_threads_callback): Ignore thread if the
8799 kernel thread ID is -1.
8800
8801 2015-01-09 Pedro Alves <palves@redhat.com>
8802
8803 * linux-low.c (linux_attach_fail_reason_string): Move to
8804 nat/linux-ptrace.c, and rename.
8805 (linux_attach_lwp): Update comment.
8806 (attach_proc_task_lwp_callback): New function.
8807 (linux_attach): Adjust to rename and use
8808 linux_proc_attach_tgid_threads.
8809 (linux_attach_fail_reason_string): Delete declaration.
8810
8811 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8812
8813 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8814 * server.c (gdbserver_version): Likewise.
8815
8816 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8817
8818 * remote-utils.c: Include ctype.h.
8819 (input_interrupt): Explicitly handle the case when the char
8820 received is the NUL byte. Improve the printing of non-ASCII
8821 characters.
8822
8823 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8824
8825 * linux-low.c (linux_low_filter_event): Update call to
8826 linux_enable_event_reporting following the addition of
8827 a new parameter to that function.
8828
8829 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8830
8831 PR server/17457
8832 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8833 (AARCH64_FPCR_REGNO): Likewise.
8834 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8835 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8836 (aarch64_store_fpregset): Likewise.
8837
8838 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8839
8840 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8841 Remove FIXME comment about assumption about N.
8842
8843 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8844
8845 * configure.ac: If large-file support is disabled in GDBserver,
8846 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8847 * configure: Regenerate.
8848
8849 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8850
8851 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8852 warning upon ENODATA from ptrace.
8853 * linux-s390-low.c (s390_store_tdb): New.
8854 (s390_regsets): Add regset for NT_S390_TDB.
8855
8856 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8857
8858 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8859 without a fill_function.
8860 * linux-s390-low.c (s390_fill_last_break): Remove.
8861 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8862 (s390_arch_setup): Use regset's size instead of fill_function for
8863 loop end condition.
8864
8865 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8866
8867 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8868 the regset's store function when ptrace returned an error.
8869 * regcache.c (get_thread_regcache): Invalidate register cache
8870 before fetching inferior's registers.
8871
8872 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8873
8874 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8875 while-loop as for-loop.
8876 (regsets_store_inferior_registers): Likewise.
8877
8878 2014-11-28 Yao Qi <yao@codesourcery.com>
8879
8880 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
8881 * config.in, configure: Re-generate.
8882 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
8883 is defined.
8884
8885 2014-11-21 Yao Qi <yao@codesourcery.com>
8886
8887 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
8888 (AC_CHECK_HEADERS): Remove malloc.h.
8889 * configure: Re-generated.
8890 * config.in: Re-generated.
8891 * server.h: Don't include alloca.h and malloc.h.
8892 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
8893 Don't include malloc.h.
8894
8895 2014-11-17 Joel Brobecker <brobecker@adacore.com>
8896
8897 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
8898 corresponding ERRNO check in same block.
8899
8900 2014-11-12 Pedro Alves <palves@redhat.com>
8901
8902 * server.c (cont_thread): Update comment.
8903 (start_inferior, attach_inferior): No longer clear cont_thread.
8904 (handle_v_cont): No longer set cont_thread.
8905 (captured_main): Clear cont_thread each time a GDB connects.
8906
8907 2014-11-12 Pedro Alves <palves@redhat.com>
8908
8909 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
8910 thread, and don't resume all threads if the Hc thread has exited.
8911
8912 2014-11-12 Pedro Alves <palves@redhat.com>
8913
8914 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
8915 the process group instead of to a specific LWP.
8916
8917 2014-10-15 Pedro Alves <palves@redhat.com>
8918
8919 PR server/17487
8920 * win32-arm-low.c (arm_set_thread_context): Remove current_event
8921 parameter.
8922 (arm_set_thread_context): Delete.
8923 (the_low_target): Adjust.
8924 * win32-i386-low.c (debug_registers_changed)
8925 (debug_registers_used): Delete.
8926 (update_debug_registers_callback): New function.
8927 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
8928 needing to update their debug registers.
8929 (win32_get_current_dr): New function.
8930 (x86_dr_low_get_addr, x86_dr_low_get_control)
8931 (x86_dr_low_get_status): Fetch the debug register from the thread
8932 record's context.
8933 (i386_initial_stuff): Adjust.
8934 (i386_get_thread_context): Remove current_event parameter. Don't
8935 clear debug_registers_changed nor copy DR values to
8936 debug_reg_state.
8937 (i386_set_thread_context): Delete.
8938 (i386_prepare_to_resume): New function.
8939 (i386_thread_added): Mark the thread as needing to update irs
8940 debug registers.
8941 (the_low_target): Remove i386_set_thread_context and install
8942 i386_prepare_to_resume.
8943 * win32-low.c (win32_get_thread_context): Adjust.
8944 (win32_set_thread_context): Use SetThreadContext
8945 directly.
8946 (win32_prepare_to_resume): New function.
8947 (win32_require_context): New function, factored out from ...
8948 (thread_rec): ... this.
8949 (continue_one_thread): Call win32_prepare_to_resume on each thread
8950 we're about to continue.
8951 (win32_resume): Call win32_prepare_to_resume on the event thread.
8952 * win32-low.h (struct win32_thread_info)
8953 <debug_registers_changed>: New field.
8954 (struct win32_target_ops): Change prototype of set_thread_context,
8955 delete set_thread_context and add prepare_to_resume.
8956 (win32_require_context): New declaration.
8957
8958 2014-10-08 Gary Benson <gbenson@redhat.com>
8959
8960 * server.h: Do not include common-exceptions.h.
8961
8962 2014-10-08 Gary Benson <gbenson@redhat.com>
8963
8964 * server.h: Do not include cleanups.h.
8965
8966 2014-09-30 James Hogan <james.hogan@imgtec.com>
8967
8968 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
8969 mips64-dsp-linux.c.
8970
8971 2014-09-23 Yao Qi <yao@codesourcery.com>
8972
8973 * linux-low.c (lp_status_maybe_breakpoint): New function.
8974 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
8975 (count_events_callback): Likewise.
8976 (select_event_lwp_callback): Likewise.
8977 (cancel_breakpoints_callback): Likewise.
8978
8979 2014-09-19 Don Breazeal <donb@codesourcery.com>
8980
8981 * linux-low.c (handle_extended_wait): Call
8982 linux_ptrace_get_extended_event.
8983 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
8984 linux_is_extended_waitstatus.
8985
8986 2014-09-16 Joel Brobecker <brobecker@adacore.com>
8987
8988 * Makefile.in (CPPFLAGS): Define.
8989 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
8990 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
8991
8992 2014-09-16 Gary Benson <gbenson@redhat.com>
8993
8994 * inferiors.h (current_inferior): Renamed as...
8995 (current_thread): New variable. All uses updated.
8996 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
8997 (maybe_move_out_of_jump_pad): Likewise.
8998 (cancel_breakpoint): Likewise.
8999 (linux_low_filter_event): Likewise.
9000 (wait_for_sigstop): Likewise.
9001 (linux_resume_one_lwp): Likewise.
9002 (need_step_over_p): Likewise.
9003 (start_step_over): Likewise.
9004 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9005 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9006 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9007 and save_inferior as saved_thread.
9008 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9009 saved_thread.
9010 (regcache_invalidate_thread): Likewise.
9011 * remote-utils.c (prepare_resume_reply): Likewise.
9012 * thread-db.c (thread_db_get_tls_address): Likewise.
9013 (disable_thread_event_reporting): Likewise.
9014 (remove_thread_event_breakpoints): Likewise.
9015 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9016 as saved_thread.
9017 * target.h (set_desired_inferior): Renamed as...
9018 (set_desired_thread): New declaration. All uses updated.
9019 * server.c (myresume): Updated comment to reference thread instead
9020 of inferior.
9021 (handle_serial_event): Likewise.
9022 (handle_target_event): Likewise.
9023
9024 2014-09-12 Tom Tromey <tromey@redhat.com>
9025 Gary Benson <gbenson@redhat.com>
9026
9027 * regcache.h: Include common-regcache.h.
9028 (regcache_read_pc): Don't declare.
9029 * regcache.c (get_thread_regcache_for_ptid): New function.
9030
9031 2014-09-11 Tom Tromey <tromey@redhat.com>
9032 Gary Benson <gbenson@redhat.com>
9033
9034 * symbol.c: New file.
9035 * Makefile.in (SFILES): Add symbol.c.
9036 (OBS): Add symbol.o.
9037
9038 2014-09-11 Gary Benson <gbenson@redhat.com>
9039
9040 * target.c (target_stop_ptid, target_continue_ptid): New
9041 functions.
9042
9043 2014-09-11 Tom Tromey <tromey@redhat.com>
9044 Gary Benson <gbenson@redhat.com>
9045
9046 * target.h: Include target/target.h.
9047 * target.c (target_read_memory, target_read_uint32)
9048 (target_write_memory): New functions.
9049
9050 2014-09-11 Gary Benson <gbenson@redhat.com>
9051
9052 * server.h (debug_hw_points): Don't declare.
9053 * server.c (debug_hw_points): Don't define. Replace all uses
9054 with show_debug_regs.
9055 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9056 all uses with show_debug_regs.
9057
9058 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9059
9060 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9061 endianness into account.
9062 (ppc_supply_ptrace_register): Likewise.
9063
9064 2014-09-03 James Hogan <james.hogan@imgtec.com>
9065
9066 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9067 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9068
9069 2014-09-03 Gary Benson <gbenson@redhat.com>
9070
9071 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9072 ALL_DEBUG_ADDRESS_REGISTERS.
9073
9074 2014-09-02 Gary Benson <gbenson@redhat.com>
9075
9076 * i386-low.h: Renamed as...
9077 * x86-low.h: New file. All type, function and variable name
9078 prefixes changed from "i386_" to "x86_". All references updated.
9079 * i386-low.c: Renamed as...
9080 * x86-low.c: New file. All type, function and variable name
9081 prefixes changed from "i386_" to "x86_". All references updated.
9082
9083 2014-09-02 Gary Benson <gbenson@redhat.com>
9084
9085 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9086 (x86_linux_new_thread): Likewise.
9087
9088 2014-08-29 Gary Benson <gbenson@redhat.com>
9089
9090 * server.h (setjmp.h): Do not include.
9091 (toplevel): Do not declare.
9092 (common-exceptions.h): Include.
9093 (cleanups.h): Likewise.
9094 * server.c (toplevel): Do not define.
9095 (exit_code): New static global.
9096 (detach_or_kill_for_exit_cleanup): New function.
9097 (main): New function. Original main renamed to...
9098 (captured_main): New function.
9099 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9100
9101 2014-08-29 Gary Benson <gbenson@redhat.com>
9102
9103 * Makefile.in (SFILES): Add common/common-exceptions.c.
9104 (OBS): Add common-exceptions.o.
9105 (common-exceptions.o): New rule.
9106 * utils.c (prepare_to_throw_exception): New function.
9107
9108 2014-08-29 Gary Benson <gbenson@redhat.com>
9109
9110 * config.in: Regenerate.
9111 * configure: Likewise.
9112
9113 2014-08-29 Gary Benson <gbenson@redhat.com>
9114
9115 * Makefile.in (SFILES): Add common/cleanups.c.
9116 (OBS): cleanups.o.
9117 (cleanups.o): New rule.
9118
9119 2014-08-29 Gary Benson <gbenson@redhat.com>
9120
9121 * utils.c (internal_vwarning): New function.
9122
9123 2014-08-28 Gary Benson <gbenson@redhat.com>
9124
9125 * utils.h (fatal): Remove declaration.
9126 * utils.c (fatal): Remove function.
9127
9128 2014-08-28 Gary Benson <gbenson@redhat.com>
9129
9130 * tracepoint.c (gdb_agent_init): Replace fatal with
9131 perror_with_name.
9132 (initialize_tracepoint): Likewise.
9133
9134 2014-08-28 Gary Benson <gbenson@redhat.com>
9135
9136 * remote-utils.c (remote_prepare): Replace fatal with error.
9137
9138 2014-08-28 Gary Benson <gbenson@redhat.com>
9139
9140 * linux-low.c (linux_async): Replace fatal with warning.
9141 Tidy up and return.
9142 (linux_start_non_stop): Return -1 if linux_async failed.
9143
9144 2014-08-28 Gary Benson <gbenson@redhat.com>
9145
9146 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9147 gdb_assert.
9148 (i386_dr_low_get_addr): Remove vague comment.
9149 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9150 gdb_assert.
9151
9152 2014-08-28 Gary Benson <gbenson@redhat.com>
9153
9154 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9155 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9156 internal_error.
9157 (linux_resume_one_lwp): Likewise.
9158 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9159 gdb_assert.
9160 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9161 with internal_error.
9162 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9163 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9164 (find_register_by_name): Replace fatal with internal_error.
9165 (find_regno): Likewise.
9166 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9167 * thread-db.c (thread_db_create_event): Likewise.
9168 (thread_db_load_search): Likewise.
9169 (try_thread_db_load_1): Likewise.
9170 * tracepoint.c (get_jump_space_head): Replace fatal with
9171 internal_error.
9172 (claim_trampoline_space): Likewise.
9173 (have_fast_tracepoint_trampoline_buffer): Likewise.
9174 (cmd_qtstart): Likewise.
9175 (stop_tracing): Likewise.
9176 (fast_tracepoint_collecting): Likewise.
9177 (target_malloc): Likewise.
9178 (download_tracepoint): Likewise.
9179 (download_trace_state_variables): Replace check with gdb_assert.
9180 (upload_fast_traceframes): Replace fatal with internal_error.
9181
9182 2014-08-19 Tom Tromey <tromey@redhat.com>
9183 Gary Benson <gbenson@redhat.com>
9184
9185 * Makefile.in (SFILES): Add common/common-debug.c.
9186 (OBS): Add common-debug.o.
9187 (common-debug.o): New rule.
9188 * debug.h (debug_printf): Don't declare.
9189 * debug.c (debug_printf): Renamed and rewritten as...
9190 (debug_vprintf): New function.
9191
9192 2014-08-19 Gary Benson <gbenson@redhat.com>
9193
9194 * utils.h: Do not include print-utils.h.
9195
9196 2014-08-19 Tom Tromey <tromey@redhat.com>
9197 Gary Benson <gbenson@redhat.com>
9198
9199 * server.h: Add static assertion.
9200 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9201
9202 2014-08-19 Tom Tromey <tromey@redhat.com>
9203 Gary Benson <gbenson@redhat.com>
9204
9205 * Makefile.in (SFILES): Add common/errors.c.
9206 (OBS): Add errors.o.
9207 (IPA_OBS): Add errors-ipa.o.
9208 (errors.o): New rule.
9209 (errors-ipa.o): Likewise.
9210 * utils.h (perror_with_name, error, warning): Don't declare.
9211 * utils.c (warning): Renamed and rewritten as...
9212 (vwarning): New function.
9213 (error): Renamed and rewritten as...
9214 (verror): New function.
9215 (internal_error): Renamed and rewritten as...
9216 (internal_verror): New function.
9217
9218 2014-08-07 Gary Benson <gbenson@redhat.com>
9219
9220 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9221 * configure: Regenerate.
9222 * config.in: Likewise.
9223 * server.h: Do not include errno.h.
9224 * event-loop.c: Likewise.
9225 * hostio-errno.c: Likewise.
9226 * linux-low.c: Likewise.
9227 * remote-utils.c: Likewise.
9228 * spu-low.c: Likewise.
9229 * utils.c: Likewise.
9230 * gdbreplay.c: Unconditionally include errno.h.
9231
9232 2014-08-07 Gary Benson <gbenson@redhat.com>
9233
9234 * server.h: Do not include string.h.
9235 * event-loop.c: Likewise.
9236 * linux-low.c: Likewise.
9237 * regcache.c: Likewise.
9238 * remote-utils.c: Likewise.
9239 * spu-low.c: Likewise.
9240 * utils.c: Likewise.
9241
9242 2014-08-07 Gary Benson <gbenson@redhat.com>
9243
9244 * server.h: Do not include gdb_assert.h.
9245
9246 2014-08-07 Gary Benson <gbenson@redhat.com>
9247
9248 * server.h: Do not include common-utils.h.
9249
9250 2014-08-07 Gary Benson <gbenson@redhat.com>
9251
9252 * server.h: Do not include ptid.h.
9253 * notif.h: Likewise.
9254
9255 2014-08-07 Gary Benson <gbenson@redhat.com>
9256
9257 * server.h: Do not include gdb_locale.h.
9258
9259 2014-08-07 Gary Benson <gbenson@redhat.com>
9260
9261 * server.h: Do not include gdb/signals.h.
9262 * win32-low.c: Likewise.
9263
9264 2014-08-07 Gary Benson <gbenson@redhat.com>
9265
9266 * server.h: Do not include pathmax.h.
9267
9268 2014-08-07 Gary Benson <gbenson@redhat.com>
9269
9270 * server.h: Do not include libiberty.h.
9271 * linux-bfin-low.c: Likewise.
9272
9273 2014-08-07 Gary Benson <gbenson@redhat.com>
9274
9275 * server.h: Do not include ansidecl.h.
9276
9277 2014-08-07 Gary Benson <gbenson@redhat.com>
9278
9279 * linux-x86-low.c: Do not include stddef.h.
9280 * lynx-ppc-low.c: Likewise.
9281 * tracepoint.c: Likewise.
9282
9283 2014-08-07 Gary Benson <gbenson@redhat.com>
9284
9285 * server.h: Do not include stdarg.h.
9286 * nto-low.c: Likewise.
9287
9288 2014-08-07 Gary Benson <gbenson@redhat.com>
9289
9290 * server.h: Do not include stdlib.h.
9291 * inferiors.c: Likewise.
9292 * linux-low.c: Likewise.
9293 * regcache.c: Likewise.
9294 * spu-low.c: Likewise.
9295 * tracepoint.c: Likewise.
9296 * utils.c: Likewise.
9297
9298 2014-08-07 Gary Benson <gbenson@redhat.com>
9299
9300 * server.h: Do not include stdio.h.
9301 * linux-low.c: Likewise.
9302 * remote-utils.c: Likewise.
9303 * spu-low.c: Likewise.
9304 * utils.c: Likewise.
9305 * wincecompat.c: Likewise.
9306
9307 2014-08-06 Gary Benson <gbenson@redhat.com>
9308
9309 * regcache.c (init_register_cache): Move conditionals inside if.
9310
9311 2014-08-06 Gary Benson <gbenson@redhat.com>
9312
9313 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9314
9315 2014-07-31 Gary Benson <gbenson@redhat.com>
9316
9317 * ax.h: Do not include server.h.
9318 * gdbthread.h: Likewise.
9319 * lynx-low.h: Likewise.
9320 * notif.h: Likewise.
9321
9322 2014-07-30 Gary Benson <gbenson@redhat.com>
9323
9324 * server.h: Include common-defs.h.
9325 Do not include config.h or build-gnulib-gdbserver/config.h.
9326
9327 2014-07-30 Gary Benson <gbenson@redhat.com>
9328
9329 * hostio-errno.c: Move server.h to top of includes list.
9330 * inferiors.c: Likewise.
9331 * linux-x86-low.c: Likewise.
9332 * notif.c: Include server.h.
9333
9334 2014-07-24 Tom Tromey <tromey@redhat.com>
9335 Gary Benson <gbenson@redhat.com>
9336
9337 * server.h (CORE_ADDR): Now unsigned.
9338
9339 2014-07-16 Pedro Alves <palves@redhat.com>
9340
9341 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9342
9343 2014-07-15 Pedro Alves <palves@redhat.com>
9344
9345 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9346 copy.
9347
9348 2014-07-11 Pedro Alves <palves@redhat.com>
9349
9350 * linux-low.c (kill_wait_lwp): New function, based on
9351 kill_one_lwp_callback, but use my_waitpid directly.
9352 (kill_one_lwp_callback, linux_kill): Use it.
9353
9354 2014-06-23 Pedro Alves <palves@redhat.com>
9355
9356 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9357 before setting DR0..DR3.
9358
9359 2014-06-20 Gary Benson <gbenson@redhat.com>
9360
9361 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9362 * configure: Regenerated.
9363 * config.in: Likewise.
9364
9365 2014-06-20 Gary Benson <gbenson@redhat.com>
9366
9367 * Makefile.in (SFILES): Update locations for files moved
9368 from common to nat.
9369 (object file files): Reordered.
9370
9371 2014-06-20 Gary Benson <gbenson@redhat.com>
9372
9373 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9374 (i386_dr_low_set_addr): Likewise.
9375 (i386_dr_low_get_addr): Likewise.
9376 (i386_dr_low_can_set_control): Likewise.
9377 (i386_dr_low_set_control): Likewise.
9378 (i386_dr_low_get_control): Likewise.
9379 (i386_dr_low_get_status): Likewise.
9380 (i386_get_debug_register_length): Likewise.
9381 * linux-x86-low.c (i386_dr_low_set_addr):
9382 Changed signature. Made static.
9383 (i386_dr_low_get_addr): Likewise.
9384 (i386_dr_low_set_control): Likewise.
9385 (i386_dr_low_get_control): Likewise.
9386 (i386_dr_low_get_status): Likewise.
9387 (i386_dr_low): New global variable.
9388 * win32-i386-low.c (i386_dr_low_set_addr):
9389 Changed signature. Made static.
9390 (i386_dr_low_get_addr): Likewise.
9391 (i386_dr_low_set_control): Likewise.
9392 (i386_dr_low_get_control): Likewise.
9393 (i386_dr_low_get_status): Likewise.
9394 (i386_dr_low): New global variable.
9395
9396 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9397
9398 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9399 * Makefile.in (AR, AR_FLAGS): Define.
9400 * configure: Regenerate.
9401
9402 2014-06-19 Gary Benson <gbenson@redhat.com>
9403
9404 * Makefile.in (i386-dregs.o): New rule.
9405 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9406 * i386-low.c (target.h): Remove include.
9407 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9408 (DR_CONTROL_SHIFT): Likewise.
9409 (DR_CONTROL_SIZE): Likewise.
9410 (DR_RW_EXECUTE): Likewise.
9411 (DR_RW_WRITE): Likewise.
9412 (DR_RW_READ): Likewise.
9413 (DR_RW_IORW): Likewise.
9414 (DR_LEN_1): Likewise.
9415 (DR_LEN_2): Likewise.
9416 (DR_LEN_4): Likewise.
9417 (DR_LEN_8): Likewise.
9418 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9419 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9420 (DR_ENABLE_SIZE): Likewise.
9421 (DR_LOCAL_SLOWDOWN): Likewise.
9422 (DR_GLOBAL_SLOWDOWN): Likewise.
9423 (DR_CONTROL_RESERVED): Likewise.
9424 (I386_DR_CONTROL_MASK): Likewise.
9425 (I386_DR_VACANT): Likewise.
9426 (I386_DR_LOCAL_ENABLE): Likewise.
9427 (I386_DR_GLOBAL_ENABLE): Likewise.
9428 (I386_DR_DISABLE): Likewise.
9429 (I386_DR_SET_RW_LEN): Likewise.
9430 (I386_DR_GET_RW_LEN): Likewise.
9431 (I386_DR_WATCH_HIT): Likewise.
9432 (i386_wp_op_t): Likewise.
9433 (i386_show_dr): Likewise.
9434 (i386_length_and_rw_bits): Likewise.
9435 (i386_insert_aligned_watchpoint): Likewise.
9436 (i386_remove_aligned_watchpoint): Likewise.
9437 (i386_handle_nonaligned_watchpoint): Likewise.
9438 i386_update_inferior_debug_regs(): Likewise.
9439 (i386_dr_insert_watchpoint): Likewise.
9440 (i386_dr_remove_watchpoint): Likewise.
9441 (i386_dr_region_ok_for_watchpoint): Likewise.
9442 (i386_dr_stopped_data_address): Likewise.
9443 (i386_dr_stopped_by_watchpoint): Likewise.
9444
9445 2014-06-19 Gary Benson <gbenson@redhat.com>
9446
9447 * i386-low.c (i386_dr_show): Renamed to
9448 i386_show_dr and made static. All uses updated.
9449 (i386_dr_length_and_rw_bits): Renamed to
9450 i386_length_and_rw_bits and made static.
9451 All uses updated.
9452 (i386_dr_insert_aligned_watchpoint): Renamed to
9453 i386_insert_aligned_watchpoint and made static.
9454 All uses updated.
9455 (i386_dr_remove_aligned_watchpoint): Renamed to
9456 i386_remove_aligned_watchpoint and made static.
9457 All uses updated.
9458 (i386_dr_update_inferior_debug_regs): Renamed to
9459 i386_update_inferior_debug_regs and made static.
9460 All uses updated.
9461
9462 2014-06-18 Gary Benson <gbenson@redhat.com>
9463
9464 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9465 (i386_dr_low_can_set_control): Likewise.
9466 (i386_get_debug_register_length): Likewise.
9467 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9468 (i386_dr_low_can_set_control): Likewise.
9469 (i386_get_debug_register_length): Likewise.
9470
9471 2014-06-17 Gary Benson <gbenson@redhat.com>
9472
9473 * i386-low.h (i386-dregs.h): New include.
9474 (DR_FIRSTADDR): Now in i386-dregs.h.
9475 (DR_LASTADDR): Likewise.
9476 (DR_NADDR): Likewise.
9477 (DR_STATUS): Likewise.
9478 (DR_CONTROL): Likewise.
9479 (i386_debug_reg_state): Likewise.
9480 (i386_dr_insert_watchpoint): Likewise.
9481 (i386_dr_remove_watchpoint): Likewise.
9482 (i386_dr_region_ok_for_watchpoint): Likewise.
9483 (i386_dr_stopped_data_address): Likewise.
9484 (i386_dr_stopped_by_watchpoint): Likewise.
9485 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9486
9487 2014-06-18 Gary Benson <gbenson@redhat.com>
9488
9489 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9490 i386_dr_insert_watchpoint.
9491 (i386_low_remove_watchpoint): Renamed to
9492 i386_dr_remove_watchpoint.
9493 (i386_low_region_ok_for_watchpoint): Renamed to
9494 i386_dr_region_ok_for_watchpoint.
9495 (i386_low_stopped_data_address): Renamed to
9496 i386_dr_stopped_data_address.
9497 (i386_low_stopped_by_watchpoint): Renamed to
9498 i386_dr_stopped_by_watchpoint.
9499 * i386-low.c (i386_show_dr): Renamed to
9500 i386_dr_show and made nonstatic. All uses updated.
9501 (i386_length_and_rw_bits): Renamed to
9502 i386_dr_length_and_rw_bits and made nonstatic.
9503 All uses updated.
9504 (i386_insert_aligned_watchpoint): Renamed to
9505 i386_dr_insert_aligned_watchpoint and made nonstatic.
9506 All uses updated.
9507 (i386_remove_aligned_watchpoint): Renamed to
9508 i386_dr_remove_aligned_watchpoint and made nonstatic.
9509 All uses updated.
9510 (i386_update_inferior_debug_regs): Renamed to
9511 i386_dr_update_inferior_debug_regs and made nonstatic.
9512 All uses updated.
9513 (i386_low_insert_watchpoint): Renamed to
9514 i386_dr_insert_watchpoint. All uses updated.
9515 (i386_low_remove_watchpoint): Renamed to
9516 i386_dr_remove_watchpoint. All uses updated.
9517 (i386_low_region_ok_for_watchpoint): Renamed to
9518 i386_dr_region_ok_for_watchpoint. All uses updated.
9519 (i386_low_stopped_data_address): Renamed to
9520 i386_dr_stopped_data_address. All uses updated.
9521 (i386_low_stopped_by_watchpoint): Renamed to
9522 i386_dr_stopped_by_watchpoint. All uses updated.
9523
9524 2014-06-18 Gary Benson <gbenson@redhat.com>
9525
9526 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9527 (i386_dr_low_can_set_control): Likewise.
9528 (i386_insert_aligned_watchpoint): New check.
9529
9530 2014-06-18 Gary Benson <gbenson@redhat.com>
9531
9532 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9533 Renamed to state.
9534
9535 2014-06-18 Gary Benson <gbenson@redhat.com>
9536
9537 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9538 instead of fatal and error.
9539 (i386_handle_nonaligned_watchpoint): Likewise.
9540
9541 2014-06-18 Gary Benson <gbenson@redhat.com>
9542
9543 * i386-low.c (i386_get_debug_register_length): New macro.
9544 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9545 (i386_show_dr): Use debug_printf instead of fprintf. Use
9546 phex to format values.
9547
9548 2014-06-18 Gary Benson <gbenson@redhat.com>
9549
9550 * i386-low.h: Comment changes.
9551 * i386-low.c: Likewise.
9552
9553 2014-06-18 Gary Benson <gbenson@redhat.com>
9554
9555 * i386-low.c: Whitespace changes.
9556
9557 2014-06-12 Tom Tromey <tromey@redhat.com>
9558
9559 * utils.c (freeargv): Remove.
9560
9561 2014-06-12 Tom Tromey <tromey@redhat.com>
9562
9563 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9564 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9565 (parse_debug_format_options): Likewise.
9566 (gdbserver_usage): Likewise.
9567 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9568 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9569 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9570 against libiberty.
9571 ($(LIBGNU)): Depend on libiberty.
9572 (all-lib): Recurse into all subdirs.
9573 (install-only): Invoke "install" target in subdirs.
9574 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9575 targets.
9576 * configure: Rebuild.
9577 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9578 for vasprintf, vsnprintf, or gettimeofday.
9579 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9580 srv_tgtobj.
9581
9582 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9583
9584 * development.sh: Delete.
9585 * Makefile.in (config.status): Adjust dependency on development.sh.
9586 * configure.ac: Adjust development.sh source call.
9587 * configure: Regenerate.
9588
9589 2014-06-02 Pedro Alves <palves@redhat.com>
9590
9591 * ax.c (gdb_free_agent_expr): New function.
9592 * ax.h (gdb_free_agent_expr): New declaration.
9593 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9594 list.
9595 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9596 static.
9597 (clear_breakpoint_conditions_and_commands): New function.
9598 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9599 (clear_breakpoint_conditions_and_commands): New declaration.
9600
9601 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9602
9603 * linux-aarch64-low.c (asm/ptrace.h): Include.
9604
9605 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9606
9607 Fix TLS access for -static -pthread.
9608 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9609 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9610 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9611
9612 2014-05-20 Pedro Alves <palves@redhat.com>
9613
9614 * linux-aarch64-low.c (aarch64_insert_point)
9615 (aarch64_remove_point): No longer check whether the type is
9616 supported here. Adjust to new interface.
9617 (the_low_target): Install aarch64_supports_z_point_type as
9618 supports_z_point_type method.
9619 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9620 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9621 instead of a Z packet char. Adjust.
9622 (arm_supports_z_point_type): New function.
9623 (arm_insert_point, arm_remove_point): Adjust to new interface.
9624 (the_low_target): Install arm_supports_z_point_type.
9625 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9626 (cris_insert_point, cris_remove_point): Adjust to new interface.
9627 Don't check whether the type is supported here.
9628 (the_low_target): Install cris_supports_z_point_type.
9629 * linux-low.c (linux_supports_z_point_type): New function.
9630 (linux_insert_point, linux_remove_point): Adjust to new interface.
9631 * linux-low.h (struct linux_target_ops) <insert_point,
9632 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9633 raw_breakpoint pointer parameter.
9634 <supports_z_point_type>: New method.
9635 * linux-mips-low.c (mips_supports_z_point_type): New function.
9636 (mips_insert_point, mips_remove_point): Adjust to new interface.
9637 Use mips_supports_z_point_type.
9638 (the_low_target): Install mips_supports_z_point_type.
9639 * linux-ppc-low.c (the_low_target): Install NULL as
9640 supports_z_point_type method.
9641 * linux-s390-low.c (the_low_target): Install NULL as
9642 supports_z_point_type method.
9643 * linux-sparc-low.c (the_low_target): Install NULL as
9644 supports_z_point_type method.
9645 * linux-x86-low.c (x86_supports_z_point_type): New function.
9646 (x86_insert_point): Adjust to new insert_point interface. Use
9647 insert_memory_breakpoint. Adjust to new
9648 i386_low_insert_watchpoint interface.
9649 (x86_remove_point): Adjust to remove_point interface. Use
9650 remove_memory_breakpoint. Adjust to new
9651 i386_low_remove_watchpoint interface.
9652 (the_low_target): Install x86_supports_z_point_type.
9653 * lynx-low.c (lynx_target_ops): Install NULL as
9654 supports_z_point_type callback.
9655 * nto-low.c (nto_supports_z_point_type): New.
9656 (nto_insert_point, nto_remove_point): Adjust to new interface.
9657 (nto_target_ops): Install nto_supports_z_point_type.
9658 * mem-break.c: Adjust intro comment.
9659 (struct raw_breakpoint) <raw_type, size>: New fields.
9660 <inserted>: Update comment.
9661 <shlib_disabled>: Delete field.
9662 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9663 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9664 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9665 (raw_bkpt_type_to_target_hw_bp_type): New function.
9666 (find_enabled_raw_code_breakpoint_at): New function.
9667 (find_raw_breakpoint_at): New type and size parameters. Use them.
9668 (insert_memory_breakpoint): New function, based off
9669 set_raw_breakpoint_at.
9670 (remove_memory_breakpoint): New function.
9671 (set_raw_breakpoint_at): Reimplement.
9672 (set_breakpoint): New, based on set_breakpoint_at.
9673 (set_breakpoint_at): Reimplement.
9674 (delete_raw_breakpoint): Go through the_target->remove_point
9675 instead of assuming memory breakpoints.
9676 (find_gdb_breakpoint_at): Delete.
9677 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9678 (find_gdb_breakpoint): New function.
9679 (set_gdb_breakpoint_at): Delete.
9680 (z_type_supported): New function.
9681 (set_gdb_breakpoint_1): New function, loosely based off
9682 set_gdb_breakpoint_at.
9683 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9684 (delete_gdb_breakpoint_at): Delete.
9685 (delete_gdb_breakpoint_1): New function, loosely based off
9686 delete_gdb_breakpoint_at.
9687 (delete_gdb_breakpoint): New function.
9688 (clear_gdb_breakpoint_conditions): Rename to ...
9689 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9690 breakpoint.
9691 (add_condition_to_breakpoint): Make static.
9692 (add_breakpoint_condition): Take a struct breakpoint pointer
9693 instead of an address. Adjust.
9694 (gdb_condition_true_at_breakpoint): Rename to ...
9695 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9696 z_type parameter.
9697 (gdb_condition_true_at_breakpoint): Reimplement.
9698 (add_breakpoint_commands): Take a struct breakpoint pointer
9699 instead of an address. Adjust.
9700 (gdb_no_commands_at_breakpoint): Rename to ...
9701 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9702 parameter. Return true if no breakpoint was found. Change debug
9703 output.
9704 (gdb_no_commands_at_breakpoint): Reimplement.
9705 (run_breakpoint_commands): Rename to ...
9706 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9707 and change return type to boolean.
9708 (run_breakpoint_commands): New function.
9709 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9710 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9711 breakpoint. Go through the_target->remove_point instead of
9712 assuming memory breakpoint.
9713 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9714 software and hardware breakpoints.
9715 (reinsert_raw_breakpoint): Go through the_target->insert_point
9716 instead of assuming memory breakpoint.
9717 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9718 software and hardware breakpoints.
9719 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9720 Check both software and hardware breakpoints.
9721 (validate_inserted_breakpoint): Assert the breakpoint is a
9722 software breakpoint. Set the inserted flag to -1 instead of
9723 setting shlib_disabled.
9724 (delete_disabled_breakpoints): Adjust.
9725 (validate_breakpoints): Only validate software breakpoints.
9726 Adjust to inserted flag change.
9727 (check_mem_read, check_mem_write): Skip breakpoint types other
9728 than software breakpoints. Adjust to inserted flag change.
9729 * mem-break.h (enum raw_bkpt_type): New enum.
9730 (raw_breakpoint, struct process_info): Forward declare.
9731 (Z_packet_to_target_hw_bp_type): Delete declaration.
9732 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9733 (set_gdb_breakpoint, delete_gdb_breakpoint)
9734 (clear_breakpoint_conditions): New declarations.
9735 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9736 (breakpoint_inserted_here): Update comment.
9737 (add_breakpoint_condition, add_breakpoint_commands): Replace
9738 address parameter with a breakpoint pointer parameter.
9739 (gdb_breakpoint_here): Update comment.
9740 (delete_gdb_breakpoint_at): Delete.
9741 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9742 * server.c (process_point_options): Take a struct breakpoint
9743 pointer instead of an address. Adjust.
9744 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9745 delete_gdb_breakpoint.
9746 * spu-low.c (spu_target_ops): Install NULL as
9747 supports_z_point_type method.
9748 * target.h: Include mem-break.h.
9749 (struct target_ops) <prepare_to_access_memory>: Update comment.
9750 <supports_z_point_type>: New field.
9751 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9752 instead of a char. Also take a raw breakpoint pointer.
9753 * win32-arm-low.c (the_low_target): Install NULL as
9754 supports_z_point_type.
9755 * win32-i386-low.c (i386_supports_z_point_type): New function.
9756 (i386_insert_point, i386_remove_point): Adjust to new interface.
9757 (the_low_target): Install i386_supports_z_point_type.
9758 * win32-low.c (win32_supports_z_point_type): New function.
9759 (win32_insert_point, win32_remove_point): Adjust to new interface.
9760 (win32_target_ops): Install win32_supports_z_point_type.
9761 * win32-low.h (struct win32_target_ops):
9762 <supports_z_point_type>: New method.
9763 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9764 instead of a char. Also take a raw breakpoint pointer.
9765
9766 2014-05-20 Pedro Alves <palves@redhat.com>
9767
9768 * mem-break.h: Include break-common.h.
9769 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9770 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9771 (Z_packet_to_target_hw_bp_type): New declaration.
9772 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9773 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9774 (Z_PACKET_ACCESS_WP): Delete macros.
9775 (Z_packet_to_hw_type): Delete function.
9776 * i386-low.h: Don't include break-common.h here.
9777 (Z_packet_to_hw_type): Delete declaration.
9778 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9779 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9780 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9781 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9782 * linux-aarch64-low.c: Don't include break-common.h here.
9783 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9784 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9785 (Z_packet_to_target_hw_bp_type): Delete function.
9786 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9787 function.
9788 (mips_insert_point, mips_remove_point): Use
9789 Z_packet_to_target_hw_bp_type.
9790
9791 2014-05-20 Pedro Alves <palves@redhat.com>
9792
9793 * linux-aarch64-low.c: Include break-common.h.
9794 (enum target_point_type): Delete.
9795 (Z_packet_to_point_type): Rename to ...
9796 (Z_packet_to_target_hw_bp_type): ... this, and return a
9797 target_hw_bp_type instead.
9798 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9799 instead of an enum target_point_type.
9800 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9801 breakpoint type.
9802 (aarch64_dr_state_insert_one_point)
9803 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9804 (aarch64_handle_aligned_watchpoint)
9805 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9806 Take an enum target_hw_bp_type instead of an enum
9807 target_point_type.
9808 (aarch64_supports_z_point_type): New function.
9809 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9810 use Z_packet_to_target_hw_bp_type.
9811
9812 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9813
9814 * configure.ac: Only use -Werror by default when DEVELOPMENT
9815 is true.
9816 * configure: Regenerate.
9817
9818 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9819
9820 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9821 * linux-x86-low.c (X86_64_USER_REGS): New.
9822 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9823
9824 2014-04-28 Yao Qi <yao@codesourcery.com>
9825
9826 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9827 name.
9828
9829 2014-04-25 Pedro Alves <palves@redhat.com>
9830
9831 PR server/16255
9832 * linux-low.c (linux_attach_fail_reason_string): New function.
9833 (linux_attach_lwp): Delete.
9834 (linux_attach_lwp_1): Rename to ...
9835 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9836 argument. Remove "initial" parameter. Return int instead of
9837 void. Don't error or warn here.
9838 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9839 failure to attach to the tgid. Call warning when failing to
9840 attach to an lwp.
9841 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9842 argument. Remove "initial" parameter. Return int instead of
9843 void. Don't error or warn here.
9844 (linux_attach_fail_reason_string): New declaration.
9845 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9846 interface change. Use linux_attach_fail_reason_string.
9847
9848 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9849 Walfred Tedeschi <walfred.tedeschi@intel.com>
9850
9851 * Makefile.in: Added rules to handle new files
9852 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9853 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9854 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9855 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9856 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9857 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9858 x32-avx512-linux.o.
9859 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9860 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9861 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9862 i386/x32-avx512.xml.
9863 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9864 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9865 i386/x32-avx512-linux.xml.
9866 * i387-fp.c (num_avx512_k_registers): New constant for number
9867 of K registers.
9868 (num_avx512_zmmh_low_registers): New constant for number of
9869 lower ZMM registers (0-15).
9870 (num_avx512_zmmh_high_registers): New constant for number of
9871 higher ZMM registers (16-31).
9872 (num_avx512_ymmh_registers): New contant for number of higher
9873 YMM registers (ymm16-31 added by avx521 on x86_64).
9874 (num_avx512_xmm_registers): New constant for number of higher
9875 XMM registers (xmm16-31 added by AVX512 on x86_64).
9876 (struct i387_xsave): Add space for AVX512 registers.
9877 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9878 Add code to handle AVX512 registers.
9879 (i387_xsave_to_cache): Add code to handle AVX512 registers.
9880 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
9881 prototypei from generated file.
9882 (tdesc_amd64_avx512_linux): Likewise.
9883 (init_registers_x32_avx512_linux): Likewise.
9884 (tdesc_x32_avx512_linux): Likewise.
9885 (init_registers_i386_avx512_linux): Likewise.
9886 (tdesc_i386_avx512_linux): Likewise.
9887 (x86_64_regmap): Add AVX512 registers.
9888 (x86_linux_read_description): Add code to handle AVX512 XSTATE
9889 mask.
9890 (initialize_low_arch): Add code to initialize AVX512 registers.
9891
9892 2014-04-23 Pedro Alves <palves@redhat.com>
9893
9894 * mem-break.c (find_gdb_breakpoint_at): Make static.
9895 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
9896
9897 2014-04-23 Pedro Alves <palves@redhat.com>
9898
9899 * i386-low.c: Don't include break-common.h here.
9900 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9901 prototype to take target_hw_bp_type as argument instead of a Z
9902 packet char.
9903 * i386-low.h: Include break-common.h here.
9904 (Z_packet_to_hw_type): Declare.
9905 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
9906 prototypes.
9907 * linux-x86-low.c (x86_insert_point): Convert the packet number to
9908 a target_hw_bp_type before calling i386_low_insert_watchpoint.
9909 (x86_remove_point): Convert the packet number to a
9910 target_hw_bp_type before calling i386_low_remove_watchpoint.
9911 * win32-i386-low.c (i386_insert_point): Convert the packet number
9912 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
9913 (i386_remove_point): Convert the packet number to a
9914 target_hw_bp_type before calling i386_low_remove_watchpoint.
9915
9916 2014-04-23 Pedro Alves <palves@redhat.com>
9917
9918 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
9919
9920 2014-04-10 Pedro Alves <palves@redhat.com>
9921
9922 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
9923 Check if the condition or command is NULL before checking if the
9924 breakpoint is known. On success, return true.
9925 * mem-break.h (add_breakpoint_condition): Document return.
9926 (add_breakpoint_commands): Add describing comment.
9927 * server.c (skip_to_semicolon): New function.
9928 (process_point_options): Use it.
9929
9930 2014-04-09 Pedro Alves <palves@redhat.com>
9931
9932 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
9933 to lwpid_of.
9934
9935 2014-02-27 Pedro Alves <palves@redhat.com>
9936
9937 PR 12702
9938 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
9939 macros.
9940 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
9941 output.
9942 (last_thread_of_process_p): Take a PID argument instead of a
9943 thread pointer.
9944 (linux_wait_for_lwp): Delete.
9945 (num_lwps, check_zombie_leaders, not_stopped_callback): New
9946 functions.
9947 (linux_low_filter_event): New function, party factored out from
9948 linux_wait_for_event.
9949 (linux_wait_for_event): Rename to ...
9950 (linux_wait_for_event_filtered): ... this. Add new filter ptid
9951 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
9952 sigsuspend. Check for zombie leaders.
9953 (linux_wait_for_event): Reimplement as wrapper around
9954 linux_wait_for_event_filtered.
9955 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
9956 a normal or signal exit is seen, it's the whole process exiting.
9957 (wait_for_sigstop): No longer a for_each_inferior callback.
9958 Rewrite on top of linux_wait_for_event_filtered.
9959 (stop_all_lwps): Call wait_for_sigstop directly.
9960 * server.c (resume, handle_target_event): Handle
9961 TARGET_WAITKIND_NO_RESUMED.
9962
9963 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9964
9965 * win32-low.c (psapi_get_dll_name,
9966 * win32_CreateToolhelp32Snapshot): Delete.
9967 (win32_CreateToolhelp32Snapshot, win32_Module32First)
9968 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
9969 Delete.
9970 (handle_load_dll): Add function description.
9971 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
9972
9973 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9974
9975 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
9976 Add comment.
9977 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
9978 base address when calling win32_add_one_solib.
9979 (handle_load_dll): Delete local variable load_addr.
9980 Remove 0x1000 offset applied to DLL base address when calling
9981 win32_add_one_solib.
9982 (handle_unload_dll): Add comment.
9983
9984 2014-02-26 Joel Brobecker <brobecker@adacore.com>
9985
9986 * win32-low.c (win32_add_all_dlls): Renames
9987 win32_ensure_ntdll_loaded. Rewrite function documentation.
9988 Adjust implementation to always load all DLLs.
9989 Add 0x1000 offset to DLL base address when calling
9990 win32_add_one_solib.
9991 (child_initialization_done): New static global.
9992 (do_initial_child_stuff): Set child_initialization_done to
9993 zero during child initialization, and 1 after. Replace call
9994 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
9995 Add comment.
9996 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
9997 (handle_unload_dll): Add function documentation.
9998 (get_child_debug_event): Ignore load and unload DLL events
9999 during child initialization.
10000
10001 2014-02-20 Doug Evans <dje@google.com>
10002
10003 Remove global all_lwps.
10004 * inferiors.h (ptid_of): Move here from linux-low.h.
10005 (pid_of, lwpid_of): Ditto.
10006 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10007 parameter is a struct thread_info * now.
10008 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10009 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10010 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10011 directly.
10012 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10013 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10014 * linux-arm-low.c (update_registers_callback): Update, "entry"
10015 parameter is a struct thread_info * now.
10016 Fetch lwpid from current_inferior directly.
10017 (arm_insert_point): Pass &all_threads to find_inferior instead of
10018 &all_lwps.
10019 (arm_remove_point): Ditto.
10020 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10021 (arm_prepare_to_resume): Fetch pid from thread.
10022 (arm_read_description): Fetch lwpid from current_inferior directly.
10023 * linux-low.c (all_lwps): Delete.
10024 (delete_lwp): Delete call to remove_inferior.
10025 (handle_extended_wait): Fetch lwpid from thread.
10026 (add_lwp): Don't set lwp->entry.id. Remove call to
10027 add_inferior_to_list.
10028 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10029 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10030 (kill_one_lwp_callback): Ditto.
10031 (linux_kill): Don't dereference NULL pointer.
10032 Fetch ptid,lwpid from thread.
10033 (get_detach_signal): Fetch ptid from thread.
10034 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10035 Simplify call to regcache_invalidate_thread.
10036 (delete_lwp_callback): Update, "entry" parameter is a
10037 struct thread_info * now. Fetch pid from thread.
10038 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10039 (status_pending_p_callback): Update, "entry" parameter is a
10040 struct thread_info * now. Fetch ptid from thread.
10041 (find_lwp_pid): Update, "entry" parameter is a
10042 struct thread_info * now.
10043 (linux_wait_for_lwp): Fetch pid from thread.
10044 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10045 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10046 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10047 (dequeue_one_deferred_signal): Ditto.
10048 (cancel_breakpoint): Fetch ptid from current_inferior.
10049 (linux_wait_for_event): Pass &all_threads to find_inferior,
10050 not &all_lwps. Fetch ptid, lwpid from thread.
10051 (count_events_callback): Update, "entry" parameter is a
10052 struct thread_info * now.
10053 (select_singlestep_lwp_callback): Ditto.
10054 (select_event_lwp_callback): Ditto.
10055 (cancel_breakpoints_callback): Ditto.
10056 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10057 not &all_lwps.
10058 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10059 (unsuspend_one_lwp): Update, "entry" parameter is a
10060 struct thread_info * now.
10061 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10062 not &all_lwps.
10063 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10064 Fetch lwpid from thread, not lwp.
10065 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10066 Pass &all_threads to find_inferior, not &all_lwps.
10067 (send_sigstop): Fetch lwpid from thread, not lwp.
10068 (send_sigstop_callback): Update, "entry" parameter is a
10069 struct thread_info * now.
10070 (suspend_and_send_sigstop_callback): Ditto.
10071 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10072 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10073 struct thread_info * now.
10074 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10075 from thread, lwp.
10076 (lwp_running): Update, "entry" parameter is a
10077 struct thread_info * now.
10078 (stop_all_lwps): Fetch ptid from thread.
10079 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10080 (linux_resume_one_lwp): Fetch lwpid from thread.
10081 (linux_set_resume_request): Update, "entry" parameter is a
10082 struct thread_info * now. Fetch pid, lwpid from thread.
10083 (resume_status_pending_p): Update, "entry" parameter is a
10084 struct thread_info * now.
10085 (need_step_over_p): Ditto. Fetch lwpid from thread.
10086 (start_step_over): Fetch lwpid from thread.
10087 (linux_resume_one_thread): Update, "entry" parameter is a
10088 struct thread_info * now. Fetch lwpid from thread.
10089 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10090 (proceed_one_lwp): Update, "entry" parameter is a
10091 struct thread_info * now. Fetch lwpid from thread.
10092 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10093 struct thread_info * now.
10094 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10095 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10096 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10097 directly.
10098 (regsets_store_inferior_registers): Ditto.
10099 (fetch_register, store_register): Ditto.
10100 (linux_read_memory, linux_write_memory): Ditto.
10101 (linux_request_interrupt): Ditto.
10102 (linux_read_auxv): Ditto.
10103 (linux_xfer_siginfo): Ditto.
10104 (linux_qxfer_spu): Ditto.
10105 (linux_qxfer_libraries_svr4): Ditto.
10106 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10107 moved to inferiors.h.
10108 (get_lwp): Delete.
10109 (get_thread_lwp): Update.
10110 (struct lwp_info): Delete member "entry". Simplify comment for
10111 member "thread".
10112 (all_lwps): Delete.
10113 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10114 current_inferior directly.
10115 (update_watch_registers_callback): Update, "entry" parameter is a
10116 struct thread_info * now. Fetch pid from thread.
10117 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10118 (mips_insert_point): Fetch lwpid from current_inferior.
10119 Pass &all_threads to find_inferior, not &all_lwps.
10120 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10121 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10122 directly.
10123 (mips_stopped_data_address): Ditto.
10124 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10125 directly.
10126 * linux-tile-low.c (tile_arch_setup): Ditto.
10127 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10128 (update_debug_registers_callback): Update, "entry" parameter is a
10129 struct thread_info * now. Fetch pid from thread.
10130 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10131 Pass &all_threads to find_inferior, not &all_lwps.
10132 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10133 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10134 Pass &all_threads to find_inferior, not &all_lwps.
10135 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10136 (i386_dr_low_get_status): Ditto.
10137 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10138 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10139 (x86_linux_read_description): Ditto.
10140 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10141
10142 2014-02-20 Doug Evans <dje@google.com>
10143
10144 * inferiors.c (get_first_inferior): Fix buglet.
10145
10146 2014-02-19 Doug Evans <dje@google.com>
10147
10148 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10149 * inferiors.c (add_thread): Change result type to struct thread_info *.
10150 All callers updated.
10151 (add_lwp): Call add_thread here instead of in callers.
10152 All callers updated.
10153 * linux-low.h (get_lwp_thread): Rewrite.
10154 (struct lwp_info): New member "thread".
10155
10156 2014-02-19 Doug Evans <dje@google.com>
10157
10158 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10159 All callers updated.
10160
10161 2014-02-19 Doug Evans <dje@google.com>
10162
10163 * inferiors.c (add_thread): Fix whitespace.
10164
10165 2014-02-19 Doug Evans <dje@google.com>
10166
10167 * dll.c (clear_dlls): Replace accessing list implemention details
10168 with API function.
10169 * gdbthread.h (get_first_thread): Declare.
10170 * inferiors.c (for_each_inferior_with_data): New function.
10171 (get_first_thread): New function.
10172 (find_thread_ptid): Simplify.
10173 (get_first_inferior): New function.
10174 (clear_list): Delete.
10175 (one_inferior_p): New function.
10176 (clear_inferior_list): New function.
10177 (clear_inferiors): Update.
10178 * inferiors.h (for_each_inferior_with_data): Declare.
10179 (clear_inferior_list): Declare.
10180 (one_inferior_p): Declare.
10181 (get_first_inferior): Declare.
10182 * linux-low.c (linux_wait_for_event): Replace accessing list
10183 implemention details with API function.
10184 * server.c (target_running): Ditto.
10185 (accumulate_file_name_length): New function.
10186 (emit_dll_description): New function.
10187 (handle_qxfer_libraries): Replace accessing list implemention
10188 details with API function.
10189 (handle_qxfer_threads_worker): New function.
10190 (handle_qxfer_threads_proper): Replace accessing list implemention
10191 details with API function.
10192 (handle_query): Ditto.
10193 (visit_actioned_threads_callback_ftype): New typedef.
10194 (visit_actioned_threads_data): New struct.
10195 (visit_actioned_threads): Rewrite to be find_inferior callback.
10196 (resume): Call find_inferior.
10197 (handle_status): Replace accessing list implemention
10198 details with API function.
10199 (process_serial_event): Replace accessing list implemention details
10200 with API function.
10201 * target.c (set_desired_inferior): Replace accessing list implemention
10202 details with API function.
10203 * tracepoint.c (same_process_p): New function.
10204 (gdb_agent_about_to_close): Replace accessing list implemention
10205 details with API function.
10206 * win32-low.c (child_delete_thread): Replace accessing list
10207 implemention details with API function.
10208 (match_dll_by_basename): New function.
10209 (dll_is_loaded_by_basename): New function.
10210 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10211 details call to dll_is_loaded_by_basename.
10212
10213 2014-02-19 Doug Evans <dje@google.com>
10214
10215 * dll.h (struct dll_info): Add comment.
10216 * gdbthread.h (struct thread_info): Add comment.
10217 (current_ptid): Simplify.
10218 * inferiors.c (add_process): Update.
10219 (remove_process): Update.
10220 * inferiors.h (struct process_info): Rename member "head" to "entry".
10221 * linux-low.c (delete_lwp): Update.
10222 (add_lwp): Update.
10223 (last_thread_of_process_p): Update.
10224 (kill_one_lwp_callback, linux_kill): Update.
10225 (status_pending_p_callback): Update.
10226 (wait_for_sigstop): Update. Simplify read of ptid.
10227 (start_step_over): Update.
10228 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10229 (get_lwp_thread): Update.
10230 (struct lwp_info): Rename member "head" to "entry".
10231 * regcache.h (inferior_list_entry): Delete.
10232 * server.c (kill_inferior_callback): Update.
10233 (detach_or_kill_inferior_callback): Update.
10234 (print_started_pid): Update.
10235 (print_attached_pid): Update.
10236 (process_serial_event): Simplify read of ptid.
10237 * thread-db.c (thread_db_create_event): Update.
10238 (thread_db_get_tls_address): Update.
10239 * win32-low.c (current_inferior_ptid): Simplify.
10240
10241 2014-02-19 Tom Tromey <tromey@redhat.com>
10242
10243 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10244 argument.
10245 (target_supports_btrace): Update.
10246
10247 2014-02-14 Yao Qi <yao@codesourcery.com>
10248
10249 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10250 (rsp-low-ipa.o): New target.
10251
10252 2014-02-12 Tom Tromey <tromey@redhat.com>
10253
10254 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10255 convert_ascii_to_int.
10256 * regcache.c (registers_to_string): Likewise.
10257 * remote-utils.c (decode_M_packet): Likewise.
10258 * server.c (process_serial_event): Likewise.
10259
10260 2014-02-12 Tom Tromey <tromey@redhat.com>
10261
10262 * server.c (handle_query, handle_v_run): Use hex2bin, not
10263 unhexify.
10264 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10265
10266 2014-02-12 Tom Tromey <tromey@redhat.com>
10267
10268 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10269 convert_int_to_ascii.
10270 * regcache.c (registers_to_string, collect_register_as_string):
10271 Likewise.
10272 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10273 Likewise.
10274 * server.c (process_serial_event): Likewise.
10275 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10276 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10277
10278 2014-02-12 Tom Tromey <tromey@redhat.com>
10279
10280 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10281 bin2hex, not hexify.
10282 * tracepoint.c (cmd_qtstatus): Likewise.
10283
10284 2014-02-12 Tom Tromey <tromey@redhat.com>
10285
10286 * remote-utils.c (monitor_output): Pass explicit length to
10287 hexify.
10288
10289 2014-02-12 Tom Tromey <tromey@redhat.com>
10290
10291 * tracepoint.c: Include rsp-low.h.
10292 * server.c: Include rsp-low.h.
10293 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10294 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10295 declare.
10296 * remote-utils.c: Include rsp-low.h.
10297 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10298 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10299 (convert_int_to_ascii, convert_ascii_to_int): Move to
10300 common/rsp-low.c.
10301 * regcache.c: Include rsp-low.h.
10302 * ax.c: Include rsp-low.h.
10303 * Makefile.in (SFILES): Add common/rsp-low.c.
10304 (OBS): Add rsp-low.o.
10305 (rsp-low.o): New target.
10306
10307 2014-02-12 Tom Tromey <tromey@redhat.com>
10308
10309 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10310 Include print-utils.h.
10311 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10312 (plongest, thirty_two, phex_nz): Remove.
10313 * Makefile.in (SFILES): Add common/print-utils.c.
10314 (OBS): Add print-utils.o.
10315 (print-utils-ipa.o): New target.
10316 (print-utils.o): New target.
10317 (IPA_OBJS): Add print-utils-ipa.o.
10318
10319 2014-02-06 Tom Tromey <tromey@redhat.com>
10320
10321 * Makefile.in (SFILES): Fix indentation.
10322
10323 2014-02-05 Doug Evans <dje@google.com>
10324
10325 * linux-low.c (linux_wait_for_event): Improve comment.
10326 (linux_wait_1): Keep current_inferior in sync with event_child.
10327
10328 2014-01-22 Doug Evans <dje@google.com>
10329
10330 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10331
10332 2014-01-22 Doug Evans <dje@google.com>
10333
10334 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10335 * configure: Regenerate.
10336 * config.in: Regenerate.
10337 * Makefile.in (SFILES): Add debug.c.
10338 (OBS): Add debug.o.
10339 * debug.c: New file.
10340 * debug.h: New file.
10341 * linux-aarch64-low.c (*): Update all debugging printfs to use
10342 debug_printf instead of fprintf.
10343 * linux-arm-low.c (*): Ditto.
10344 * linux-cris-low.c (*): Ditto.
10345 * linux-crisv32-low.c (*): Ditto.
10346 * linux-m32r-low.c (*): Ditto.
10347 * linux-sparc-low.c (*): Ditto.
10348 * linux-x86.c (*): Ditto.
10349 * linux-low.c (*): Ditto.
10350 (linux_wait_1): Add calls to debug_enter, debug_exit.
10351 (linux_wait): Remove redundant debugging printf.
10352 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10353 (linux_resume, unstop_all_lwps): Ditto.
10354 * mem-break.c (*): Update all debugging printfs to use
10355 debug_printf instead of fprintf.
10356 * remote-utils.c (*): Ditto.
10357 * thread-db.c (*): Ditto.
10358 * server.c #include <ctype.h>, "gdb_vecs.h".
10359 (debug_threads): Moved to debug.c.
10360 (*): Update all debugging printfs to use debug_printf instead of
10361 fprintf.
10362 (start_inferior): Replace call to fflush with call to debug_flush.
10363 (monitor_show_help): Mention set debug-format.
10364 (parse_debug_format_options): New function.
10365 (handle_monitor_command): Handle "monitor set debug-format".
10366 (gdbserver_usage): Mention --debug-format.
10367 (main): Parse --debug-format.
10368 * server.h (debug_threads): Declaration moved to debug.h.
10369 #include "debug.h".
10370 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10371 trace_debug_1 that uses debug_printf.
10372 (tracepoint_look_up_symbols): Update all debugging printfs to use
10373 debug_printf instead of fprintf.
10374
10375 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10376
10377 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10378 sys/ptrace.h.
10379
10380 2014-01-17 Pedro Alves <palves@redhat.com>
10381
10382 PR build/16445
10383 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10384 defined after including gdb_proc_service.h.
10385
10386 2014-01-16 Doug Evans <dje@google.com>
10387
10388 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10389 (match_dll): Use it.
10390
10391 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10392
10393 * target.h (target_ops) <read_btrace>: Change parameters and
10394 return type to allow error reporting.
10395 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10396 trace reading errors on.
10397 * linux-low.c (linux_low_read_btrace): Pass trace reading
10398 errors on.
10399 (linux_low_disable_btrace): New.
10400
10401 2014-01-15 Doug Evans <dje@google.com>
10402
10403 * inferiors.c (thread_id_to_gdb_id): Delete.
10404 * inferiors.h (thread_id_to_gdb_id): Delete.
10405
10406 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10407
10408 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10409 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10410 versions.
10411
10412 2014-01-08 Pedro Alves <palves@redhat.com>
10413
10414 * server.c (handle_status): Don't discard previous queued stop
10415 replies or thread's pending status here.
10416 (main) <disconnection>: Do it here instead.
10417
10418 2014-01-08 Pedro Alves <palves@redhat.com>
10419
10420 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10421 * server.c (visit_actioned_threads, handle_pending_status): New
10422 function.
10423 (handle_v_cont): Factor out parts to ...
10424 (resume): ... this new function. If in all-stop, and a thread
10425 being resumed has a pending status, report it without actually
10426 resuming.
10427 (myresume): Adjust to use the new 'resume' function.
10428 (clear_pending_status_callback, set_pending_status_callback)
10429 (find_status_pending_thread_callback): New functions.
10430 (handle_status): Handle the case of multiple threads having
10431 interesting statuses to report. Report threads' real last signal
10432 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10433 with an interesting thread to report the status for, instead of
10434 always reporting the status of the first thread.
10435
10436 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10437
10438 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10439 * gdbreplay.c (gdbreplay_version): Likewise.
10440
10441 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10442
10443 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10444 iov.iov_len with the real length in use.
10445
10446 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10447
10448 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10449 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10450 for all targets that use win32-low.c.
10451 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10452 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10453
10454 2013-12-13 Pedro Alves <palves@redhat.com>
10455
10456 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10457 if equal to TARGET_WAITKIND_LOADED.
10458 * win32-low.c (cached_status): New static global.
10459 (win32_wait): Add declaration.
10460 (do_initial_child_stuff): Flush all initial pending debug events
10461 up to the initial breakpoint.
10462 (win32_wait): If CACHED_STATUS was set, return that instead
10463 of doing a real wait. Remove the code resuming the execution
10464 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10465 during the initial phase. Also remove the code changing
10466 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10467 TARGET_WAITKIND_STOPPED.
10468
10469 2013-12-11 Yao Qi <yao@codesourcery.com>
10470
10471 * notif.c (handle_notif_ack): Return 0 if no notification
10472 matches.
10473
10474 2013-11-20 Doug Evans <dje@google.com>
10475
10476 * linux-low.c (linux_set_resume_request): Fix comment.
10477
10478 2013-11-20 Doug Evans <dje@google.com>
10479
10480 * linux-low.c (resume_status_pending_p): Tweak comment.
10481
10482 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10483
10484 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10485 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10486 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10487 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10488 (srv_amd64_regobj): Add amd64-mpx.o.
10489 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10490 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10491 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10492 * i387-fp.c (num_pl_bnd_register) Added constant.
10493 (num_pl_bnd_cfg_registers) Added constant.
10494 (struct i387_xsave) Added reserved area and MPX fields.
10495 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10496 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10497 function.
10498 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10499 (init_registers_amd64_mpx_linux): Declare new function.
10500 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10501 (x86_64_regmap): Add MPX registers.
10502 (x86_linux_read_description): Add MPX case.
10503 (initialize_low_arch): Initialize MPX targets.
10504
10505 2013-11-18 Tom Tromey <tromey@redhat.com>
10506
10507 * configure: Rebuild.
10508 * configure.ac: Don't check for stdlib.h.
10509 * gdbreplay.c: Unconditionally include stdlib.h.
10510
10511 2013-11-18 Tom Tromey <tromey@redhat.com>
10512
10513 * config.in: Rebuild.
10514 * configure: Rebuild.
10515 * configure.ac: Don't use AC_HEADER_DIRENT.
10516
10517 2013-11-18 Tom Tromey <tromey@redhat.com>
10518
10519 * server.h: Don't check HAVE_STRING_H.
10520 * gdbreplay.c: Don't check HAVE_STRING_H.
10521 * configure: Rebuild.
10522
10523 2013-11-18 Tom Tromey <tromey@redhat.com>
10524
10525 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10526 LIBGNU.
10527
10528 2013-11-08 Tom Tromey <tromey@redhat.com>
10529
10530 * configure, config.in: Rebuild.
10531 * configure.ac: Remove unused configury.
10532
10533 2013-11-08 Tom Tromey <tromey@redhat.com>
10534
10535 * acinclude.m4: Include common.m4, codeset.m4.
10536 * configure, config.in: Rebuild.
10537 * configure.ac: Use GDB_AC_COMMON.
10538
10539 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10540
10541 * linux-s390-low.c (HWCAP_S390_TE): New define.
10542 (s390_arch_setup): Consider the TE field in the HWCAP for
10543 determining 'have_regset_tdb'.
10544
10545 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10546
10547 PR gdb/16014
10548 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10549 call to sizeof.
10550
10551 2013-10-02 Pedro Alves <palves@redhat.com>
10552
10553 * server.c (process_serial_event): Don't output "GDBserver
10554 exiting" if GDB is connected through stdio.
10555 * target.c (mywait): Likewise, be silent if GDB is connected
10556 through stdio.
10557
10558 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10559
10560 * lynx-low.c (lynx_add_threads_after_attach): New function.
10561 (lynx_attach): Remove call to add_thread. Add call to
10562 lynx_add_threads_after_attach instead.
10563
10564 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10565
10566 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10567 * config.in, configure: Regenerated.
10568
10569 2013-09-18 Yao Qi <yao@codesourcery.com>
10570
10571 PR server/15959
10572 * server.c (start_inferior): Clear 'resume_info'.
10573
10574 2013-09-16 Jiong Wang <jiwang@tilera.com>
10575
10576 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10577 for each register.
10578
10579 2013-09-16 Jiong Wang <jiwang@tilera.com>
10580
10581 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10582 linux-tile-low.o to srv_tgtobj.
10583
10584 2013-09-16 Will Newton <will.newton@linaro.org>
10585
10586 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10587 out regs.
10588
10589 2013-09-06 Pedro Alves <palves@redhat.com>
10590
10591 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10592 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10593 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10594 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10595 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10596 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10597
10598 2013-09-06 Pedro Alves <palves@redhat.com>
10599
10600 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10601 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10602
10603 2013-09-06 Pedro Alves <palves@redhat.com>
10604
10605 * linux-amd64-ipa.c: Include tracepoint.h.
10606 * linux-i386-ipa.c: Include tracepoint.h.
10607
10608 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10609
10610 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10611 (ps_get_thread_area): New function.
10612
10613 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10614
10615 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10616 (initialize_low_arch): Call init_registers_crisv32 rather than
10617 init_register_crisv32.
10618
10619 2013-09-05 Pedro Alves <palves@redhat.com>
10620
10621 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10622 to ...
10623 * hostio.h: ... this new file.
10624 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10625 win32-low.c: Include hostio.h.
10626
10627 2013-09-05 Pedro Alves <palves@redhat.com>
10628
10629 * server.h (gdb_client_data, handler_func, callback_handler_func)
10630 (delete_file_handler, add_file_handler, append_callback_event)
10631 (delete_callback_event, start_event_loop, initialize_event_loop):
10632 Move to event-loop.h and include it.
10633 * event-loop.h: New file.
10634
10635 2013-09-05 Pedro Alves <palves@redhat.com>
10636
10637 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10638 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10639 (loaded_dll, unloaded_dll): Move to ...
10640 * dll.h: ... this new file.
10641 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10642
10643 2013-09-05 Pedro Alves <palves@redhat.com>
10644
10645 * server.h (current_process, get_thread_process, all_processes)
10646 (add_inferior_to_list, for_each_inferior, current_inferior)
10647 (remove_inferior, add_process, remove_process, find_process_pid)
10648 (have_started_inferiors_p, have_attached_inferiors_p)
10649 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10650 (clear_inferiors, find_inferior, find_inferior_id)
10651 (inferior_target_data, set_inferior_target_data)
10652 (inferior_regcache_data, set_inferior_regcache_data): Move to
10653 inferiors.h, and include it.
10654 * inferiors.h: New file.
10655
10656 2013-09-05 Pedro Alves <palves@redhat.com>
10657
10658 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10659 Move ...
10660 * ax.h: ... here.
10661
10662 2013-09-05 Pedro Alves <palves@redhat.com>
10663
10664 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10665 tracepoint.h.
10666 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10667 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10668 (handle_tracepoint_general_set, handle_tracepoint_query)
10669 (tracepoint_finished_step, tracepoint_was_hit)
10670 (release_while_stepping_state_list, current_traceframe)
10671 (in_readonly_region, traceframe_read_mem)
10672 (fetch_traceframe_registers, traceframe_read_sdata)
10673 (traceframe_read_info, struct fast_tpoint_collect_status)
10674 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10675 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10676 (supply_fast_tracepoint_registers)
10677 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10678 (ipa_tdesc, claim_trampoline_space)
10679 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10680 (agent_mem_read, agent_get_trace_state_variable_value)
10681 (agent_set_trace_state_variable_value, agent_tsv_read)
10682 (agent_mem_read_string, get_raw_reg_func_addr)
10683 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10684 * tracepoint.h: ... this new file.
10685
10686 2013-09-05 Pedro Alves <palves@redhat.com>
10687
10688 * server.h (perror_with_name, error, fatal, warning, paddress)
10689 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10690 include it.
10691 * utils.h: New file.
10692
10693 2013-09-05 Pedro Alves <palves@redhat.com>
10694
10695 * server.h (remote_debug, noack_mode, transport_is_reliable)
10696 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10697 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10698 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10699 (write_enn, initialize_async_io, enable_async_io)
10700 (disable_async_io, check_remote_input_interrupt_request)
10701 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10702 (dead_thread_notify, prepare_resume_reply)
10703 (decode_address_to_semicolon, decode_address, decode_m_packet)
10704 (decode_M_packet, decode_X_packet, decode_xfer_write)
10705 (decode_search_memory_packet, unhexify, hexify)
10706 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10707 (look_up_one_symbol, relocate_instruction)
10708 (monitor_output): Move to remote-utils.h, and include it.
10709 * remote-utils.h: New file.
10710
10711 2013-09-05 Pedro Alves <palves@redhat.com>
10712
10713 * server.h (_): Delete.
10714
10715 2013-09-02 Pedro Alves <palves@redhat.com>
10716
10717 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10718 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10719 allocated.
10720 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10721
10722 2013-09-02 Pierre Muller <muller@sourceware.org>
10723
10724 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10725 or WriteProcessMemory complete successfully and handle
10726 ERROR_PARTIAL_COPY error.
10727
10728 2013-09-02 Pedro Alves <palves@redhat.com>
10729
10730 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10731 error instead of EIO.
10732
10733 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10734
10735 PR server/15604
10736 * linux-low.c: Include filestuff.h.
10737 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10738 * lynx-low.c: Include filestuff.h.
10739 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10740 * server.c: Include filestuff.h.
10741 (main): Call notice_open_fds.
10742 * spu-low.c: Include filestuff.h.
10743 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10744
10745 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10746
10747 * Makefile.in: Explain why ../target and ../nat are not
10748 listed as include file search paths.
10749 (linux-waitpid.o): New object file rule.
10750 * configure.srv (srv_native_linux_obj): New variable.
10751 Replace all occurrences of linux native object files with
10752 $srv_native_linux_obj.
10753 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10754 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10755 (linux_enable_event_reporting): Remove declaration.
10756 (my_waitpid): Moved to common/linux-waitpid.c.
10757 (linux_wait_for_event): Pass ptid when calling
10758 linux_enable_event_reporting.
10759 (linux_supports_tracefork_flag): Remove.
10760 (linux_enable_event_reporting): Likewise.
10761 (linux_tracefork_grandchild): Remove.
10762 (STACK_SIZE): Moved to common/linux-ptrace.c.
10763 (linux_tracefork_child): Remove.
10764 (linux_test_for_tracefork): Remove.
10765 (linux_look_up_symbols): Call linux_supports_traceclone.
10766 (initialize_low): Remove call to linux_test_for_tracefork.
10767 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10768 common/linux-ptrace.h.
10769 (PTRACE_TYPE_ARG4): Likewise.
10770 Include linux-ptrace.h.
10771
10772 2013-08-21 Pedro Alves <palves@redhat.com>
10773
10774 * config.in: Renegerate.
10775
10776 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10777
10778 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10779 (SFILES): Remove $(srcdir)/common/target-common.c and
10780 add $(srcdir)/target/waitstatus.c.
10781 (OBS): Remove target-common.o and add waitstatus.o.
10782 (server_h): Remove $(srcdir)/../common/target-common.h and
10783 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10784 and $(srcdir)/../target/waitstatus.h.
10785 (target-common.o): Remove.
10786 (waitstatus.o): New target object file.
10787 * target.h: Do not include target-common.h and
10788 include target/resume.h, target/wait.h and
10789 target/waitstatus.h.
10790
10791 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10792
10793 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10794 to PTRACE_TYPE_ARG3.
10795 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10796 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10797 PTRACE_TYPE_ARG4.
10798 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10799 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10800
10801 2013-07-27 Jie Zhang <jie@codesourcery.com>
10802 Daniel Jacobowitz <dan@codesourcery.com>
10803 Yao Qi <yao@codesourcery.com>
10804
10805 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10806 (mips-linux-watch.o): New rule.
10807 (mips_linux_watch_h): New variable.
10808 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10809 srv_tgtobj.
10810 * linux-mips-low.c: Include mips-linux-watch.h.
10811 (struct arch_process_info, struct arch_lwp_info): New.
10812 (update_watch_registers_callback): New function.
10813 (mips_linux_new_process, mips_linux_new_thread) New functions.
10814 (mips_linux_prepare_to_resume, mips_insert_point): New
10815 functions.
10816 (mips_remove_point, mips_stopped_by_watchpoint): New
10817 functions.
10818 (rsp_bp_type_to_target_hw_bp_type): New function.
10819 (mips_stopped_data_address): New function.
10820 (the_low_target): Add watchpoint support functions.
10821
10822 2013-07-27 Yao Qi <yao@codesourcery.com>
10823
10824 * i386-low.c: Include break-common.h.
10825 (enum target_hw_bp_type): Remove.
10826
10827 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10828
10829 * Makefile.in (SFILES): /common/target-common.c.
10830 (OBS): Add target-common.o.
10831 (server_h): Add $(srcdir)/../common/target-common.h.
10832 (target-common.o): New target.
10833 * server.c (queue_stop_reply_callback): Free
10834 status string after use.
10835 * target.c (target_waitstatus_to_string): Remove.
10836 * target.h: Include target-common.h.
10837 (resume_kind): Likewise.
10838 (target_waitkind): Likewise.
10839 (target_waitstatus): Likewise.
10840 (TARGET_WNOHANG): Likewise.
10841
10842 2013-07-04 Yao Qi <yao@codesourcery.com>
10843
10844 * Makefile.in (host_alias): Use @host_noncanonical@.
10845 (target_alias): Use @target_noncanonical@.
10846 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10847 ACX_NONCANONICAL_HOST.
10848 * configure: Regenerated.
10849
10850 Revert:
10851 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10852
10853 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10854 * configure: Rebuild.
10855 * Makefile.in (version_host, version_target): Get from configure.
10856 (version.c): Use $(version_host) and $(version_target).
10857
10858 2013-07-03 Pedro Alves <palves@redhat.com>
10859
10860 * Makefile.in (config.status): Depend on development.sh.
10861 * acinclude.m4: Include libmcheck.m4.
10862 * configure: Regenerate.
10863
10864 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10865
10866 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10867 attribute inside the parentheses.
10868 (winapi_DebugSetProcessKillOnExit): Ditto.
10869 (winapi_DebugBreakProcess): Ditto.
10870 (winapi_GenerateConsoleCtrlEvent): Ditto.
10871
10872 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10873
10874 * notif.h (notif_event): Add a dummy member to avoid compiler
10875 errors.
10876
10877 2013-07-01 Pedro Alves <palves@redhat.com>
10878
10879 * hostio.c (HOSTIO_PATH_MAX): Define.
10880 (require_filename, handle_open, handle_unlink, handle_readlink):
10881 Use it.
10882
10883 2013-07-01 Pedro Alves <palves@redhat.com>
10884
10885 * server.h: Include "pathmax.h".
10886 * linux-low.c: Don't include sys/param.h.
10887 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
10888 MAXPATHLEN.
10889 * win32-low.c: Don't include sys/param.h.
10890 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
10891
10892 2013-07-01 Pedro Alves <palves@redhat.com>
10893
10894 * event-loop.c: Don't check HAVE_UNISTD_H before including
10895 <unistd.h>.
10896 * gdbreplay.c: Likewise.
10897 * remote-utils.c: Likewise.
10898 * server.c: Likewise.
10899 * configure.ac: Don't check for unistd.h.
10900 * configure: Regenerate.
10901
10902 2013-06-28 Tom Tromey <tromey@redhat.com>
10903
10904 * Makefile.in (version.c): Use version.in, not
10905 common/version.in.
10906
10907 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10908
10909 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10910 * configure: Rebuild.
10911 * Makefile.in (version_host, version_target): Get from configure.
10912 (version.c): Use $(version_host) and $(version_target).
10913
10914 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10915
10916 Fix trace-status to output user name without trailing colon.
10917 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
10918
10919 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
10920
10921 Fix trace-status to output proper start-time and stop-time.
10922 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
10923 output start time and stop time in hex as gdb expects.
10924
10925 2013-06-26 Pedro Alves <pedro@codesourcery.com>
10926
10927 * tracepoint.c (build_traceframe_info_xml): Output trace state
10928 variables present in the trace buffer.
10929
10930 2013-06-24 Tom Tromey <tromey@redhat.com>
10931
10932 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
10933 create-version.sh.
10934 (version.o): Remove.
10935 * gdbreplay.c: Include version.h.
10936 (version, host_name): Don't declare.
10937 * server.h: Include version.h.
10938 (version, host_name): Don't declare.
10939
10940 2013-06-12 Pedro Alves <palves@redhat.com>
10941
10942 * linux-x86-low.c (linux_is_elf64): Delete global.
10943 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
10944 with local linux_pid_exe_is_elf_64_file use.
10945
10946 2013-06-11 Pedro Alves <palves@redhat.com>
10947
10948 * linux-low.c (regset_disabled, disable_regset): New functions.
10949 (regsets_fetch_inferior_registers)
10950 (regsets_store_inferior_registers): Use them.
10951 (initialize_regsets_info); Don't allocate the disabled_regsets
10952 array here.
10953 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
10954 comment.
10955
10956 2013-06-11 Pedro Alves <palves@redhat.com>
10957
10958 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
10959 xmalloc.
10960
10961 2013-06-11 Pedro Alves <palves@redhat.com>
10962
10963 * linux-x86-low.c (initialize_low_arch): Call
10964 init_registers_x32_avx_linux.
10965
10966 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
10967
10968 Fix compatibility with Android Bionic.
10969 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
10970 it is not empty.
10971
10972 2013-06-07 Pedro Alves <palves@redhat.com>
10973
10974 PR server/14823
10975 * Makefile.in (OBS): Add tdesc.o.
10976 (IPA_OBJS): Add tdesc-ipa.o.
10977 (tdesc-ipa.o): New rule.
10978 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
10979 interface.
10980 * linux-low.c (new_inferior): Delete.
10981 (disabled_regsets, num_regsets): Delete.
10982 (linux_add_process): Adjust to set the new per-process
10983 new_inferior flag.
10984 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
10985 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
10986 was a stop. When calling arch_setup, switch the current inferior
10987 to the thread that got an event.
10988 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
10989 (regsets_fetch_inferior_registers)
10990 (regsets_store_inferior_registers): New regsets_info parameter.
10991 Adjust to use it.
10992 (linux_register_in_regsets): New regs_info parameter. Adjust to
10993 use it.
10994 (register_addr, fetch_register, store_register): New usrregs_info
10995 parameter. Adjust to use it.
10996 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
10997 parameter regs_info. Adjust to use it.
10998 (linux_fetch_registers): Get the current inferior's regs_info, and
10999 adjust to use it.
11000 (linux_store_registers): Ditto.
11001 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11002 (initialize_low): Don't initialize the target_regsets here. Call
11003 initialize_low_arch.
11004 * linux-low.h (target_regsets): Delete declaration.
11005 (struct regsets_info): New.
11006 (struct usrregs_info): New.
11007 (struct regs_info): New.
11008 (struct process_info_private) <new_inferior>: New field.
11009 (struct linux_target_ops): Delete the num_regs, regmap, and
11010 regset_bitmap fields. New field regs_info.
11011 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11012 * i387-fp.c (num_xmm_registers): Delete.
11013 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11014 calls to new interface.
11015 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11016 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11017 Infer the number of xmm registers from the regcache's target
11018 description.
11019 * i387-fp.h (num_xmm_registers): Delete.
11020 * inferiors.c (add_thread): Don't install the thread's regcache
11021 here.
11022 * proc-service.c (gregset_info): Fetch the current inferior's
11023 regs_info. Adjust to use it.
11024 * regcache.c: Include tdesc.h.
11025 (register_bytes, reg_defs, num_registers)
11026 (gdbserver_expedite_regs): Delete.
11027 (get_thread_regcache): If the thread doesn't have a regcache yet,
11028 create one, instead of aborting gdbserver.
11029 (regcache_invalidate_one): Rename to ...
11030 (regcache_invalidate_thread): ... this.
11031 (regcache_invalidate_one): New.
11032 (regcache_invalidate): Only invalidate registers of the current
11033 process.
11034 (init_register_cache): Add target_desc parameter, and use it.
11035 (new_register_cache): Ditto. Assert the target description has a
11036 non zero registers_size.
11037 (regcache_cpy): Add assertions. Adjust.
11038 (realloc_register_cache, set_register_cache): Delete.
11039 (registers_to_string, registers_from_string): Adjust.
11040 (find_register_by_name, find_regno, find_register_by_number)
11041 (register_cache_size): Add target_desc parameter, and use it.
11042 (free_register_cache_thread, free_register_cache_thread_one)
11043 (regcache_release, register_cache_size): New.
11044 (register_size): Add target_desc parameter, and use it.
11045 (register_data, supply_register, supply_register_zeroed)
11046 (supply_regblock, supply_register_by_name, collect_register)
11047 (collect_register_as_string, collect_register_by_name): Adjust.
11048 * regcache.h (struct target_desc): Forward declare.
11049 (struct regcache) <tdesc>: New field.
11050 (init_register_cache, new_register_cache): Add target_desc
11051 parameter.
11052 (regcache_invalidate_thread): Declare.
11053 (regcache_invalidate_one): Delete declaration.
11054 (regcache_release): Declare.
11055 (find_register_by_number, register_cache_size, register_size)
11056 (find_regno): Add target_desc parameter.
11057 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11058 declarations.
11059 * remote-utils.c: Include tdesc.h.
11060 (outreg, prepare_resume_reply): Adjust.
11061 * server.c: Include tdesc.h.
11062 (gdbserver_xmltarget): Delete declaration.
11063 (get_features_xml, process_serial_event): Adjust.
11064 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11065 declare.
11066 (struct process_info) <tdesc>: New field.
11067 (ipa_tdesc): Declare.
11068 * tdesc.c: New file.
11069 * tdesc.h: New file.
11070 * tracepoint.c: Include tdesc.h.
11071 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11072 (get_context_regcache): Adjust to pass ipa_tdesc down.
11073 (do_action_at_tracepoint): Adjust to get the register cache size
11074 from the context regcache's description.
11075 (traceframe_walk_blocks): Adjust to get the register cache size
11076 from the current trace frame's description.
11077 (traceframe_get_pc): Adjust to get current trace frame's
11078 description and pass it down.
11079 (gdb_collect): Adjust to get the register cache size from the
11080 IPA's description.
11081 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11082 (gdbserver_xmltarget): Delete.
11083 (initialize_low_tracepoint): Set the ipa's target description.
11084 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11085 (initialize_low_tracepoint): Set the ipa's target description.
11086 * linux-x86-low.c: Include tdesc.h.
11087 [__x86_64__] (is_64bit_tdesc): New.
11088 (ps_get_thread_area, x86_get_thread_area): Use it.
11089 (i386_cannot_store_register): Rename to ...
11090 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11091 (i386_cannot_fetch_register): Rename to ...
11092 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11093 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11094 to new interface.
11095 (target_regsets): Rename to ...
11096 (x86_regsets): ... this.
11097 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11098 interface.
11099 (x86_siginfo_fixup): Use is_64bit_tdesc.
11100 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11101 (tdesc_x32_avx_linux, tdesc_x32_linux)
11102 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11103 Declare.
11104 (x86_linux_update_xmltarget): Delete.
11105 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11106 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11107 (AMD64_LINUX_USER64_CS): New.
11108 (x86_linux_read_description): New, based on
11109 x86_linux_update_xmltarget.
11110 (same_process_callback): New.
11111 (x86_arch_setup_process_callback): New.
11112 (x86_linux_update_xmltarget): New.
11113 (x86_regsets_info): New.
11114 (amd64_linux_regs_info): New.
11115 (i386_linux_usrregs_info): New.
11116 (i386_linux_regs_info): New.
11117 (x86_linux_regs_info): New.
11118 (x86_arch_setup): Reimplement.
11119 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11120 (x86_emit_ops): Ditto.
11121 (the_low_target): Adjust. Install x86_linux_regs_info,
11122 x86_cannot_fetch_register, and x86_cannot_store_register.
11123 (initialize_low_arch): New.
11124 * linux-ia64-low.c (tdesc_ia64): Declare.
11125 (ia64_fetch_register): Adjust.
11126 (ia64_usrregs_info, regs_info): New globals.
11127 (ia64_regs_info): New function.
11128 (the_low_target): Adjust.
11129 (initialize_low_arch): New function.
11130 * linux-sparc-low.c (tdesc_sparc64): Declare.
11131 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11132 Adjust.
11133 (sparc_arch_setup): New function.
11134 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11135 (the_low_target): Adjust.
11136 (initialize_low_arch): New function.
11137 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11138 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11139 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11140 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11141 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11142 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11143 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11144 (tdesc_powerpc_isa205_vsx64l): Declare.
11145 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11146 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11147 (ppc_set_pc, ppc_get_hwcap): Adjust.
11148 (ppc_usrregs_info): Forward declare.
11149 (!__powerpc64__) ppc_regmap_adjusted: New global.
11150 (ppc_arch_setup): Adjust to the current process'es target
11151 description.
11152 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11153 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11154 (ppc_store_evrregset): Adjust.
11155 (target_regsets): Rename to ...
11156 (ppc_regsets): ... this, and make static.
11157 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11158 (ppc_regs_info): New function.
11159 (the_low_target): Adjust.
11160 (initialize_low_arch): New function.
11161 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11162 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11163 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11164 (tdesc_s390x_linux64v2): Declare.
11165 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11166 (s390_fill_gregset, s390_store_last_break): Adjust.
11167 (target_regsets): Rename to ...
11168 (s390_regsets): ... this, and make static.
11169 (s390_get_pc, s390_set_pc): Adjust.
11170 (s390_get_hwcap): New target_desc parameter, and use it.
11171 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11172 (s390_arch_setup): Adjust to set the current process'es target
11173 description. Don't adjust the regmap.
11174 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11175 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11176 (regs_info_3264): New globals.
11177 (s390_regs_info): New function.
11178 (the_low_target): Adjust.
11179 (initialize_low_arch): New function.
11180 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11181 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11182 [__mips64] (init_registers_mips_linux)
11183 (init_registers_mips_dsp_linux): Delete defines.
11184 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11185 (have_dsp): New global.
11186 (mips_read_description): New, based on mips_arch_setup.
11187 (mips_arch_setup): Reimplement.
11188 (get_usrregs_info): New function.
11189 (mips_cannot_fetch_register, mips_cannot_store_register)
11190 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11191 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11192 (target_regsets): Rename to ...
11193 (mips_regsets): ... this, and make static.
11194 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11195 (dsp_regs_info, regs_info): New globals.
11196 (mips_regs_info): New function.
11197 (the_low_target): Adjust.
11198 (initialize_low_arch): New function.
11199 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11200 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11201 Declare.
11202 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11203 (arm_read_description): New, with bits factored from
11204 arm_arch_setup.
11205 (arm_arch_setup): Reimplement.
11206 (target_regsets): Rename to ...
11207 (arm_regsets): ... this, and make static.
11208 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11209 (arm_regs_info): New function.
11210 (the_low_target): Adjust.
11211 (initialize_low_arch): New function.
11212 * linux-m68k-low.c (tdesc_m68k): Declare.
11213 (target_regsets): Rename to ...
11214 (m68k_regsets): ... this, and make static.
11215 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11216 (m68k_regs_info): New function.
11217 (m68k_arch_setup): New function.
11218 (the_low_target): Adjust.
11219 (initialize_low_arch): New function.
11220 * linux-sh-low.c (tdesc_sharch): Declare.
11221 (target_regsets): Rename to ...
11222 (sh_regsets): ... this, and make static.
11223 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11224 (sh_regs_info, sh_arch_setup): New functions.
11225 (the_low_target): Adjust.
11226 (initialize_low_arch): New function.
11227 * linux-bfin-low.c (tdesc_bfin): Declare.
11228 (bfin_arch_setup): New function.
11229 (bfin_usrregs_info, regs_info): New globals.
11230 (bfin_regs_info): New function.
11231 (the_low_target): Adjust.
11232 (initialize_low_arch): New function.
11233 * linux-cris-low.c (tdesc_cris): Declare.
11234 (cris_arch_setup): New function.
11235 (cris_usrregs_info, regs_info): New globals.
11236 (cris_regs_info): New function.
11237 (the_low_target): Adjust.
11238 (initialize_low_arch): New function.
11239 * linux-cris-low.c (tdesc_crisv32): Declare.
11240 (cris_arch_setup): New function.
11241 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11242 (cris_regs_info): New function.
11243 (the_low_target): Adjust.
11244 (initialize_low_arch): New function.
11245 * linux-m32r-low.c (tdesc_m32r): Declare.
11246 (m32r_arch_setup): New function.
11247 (m32r_usrregs_info, regs_info): New globals.
11248 (m32r_regs_info): Adjust.
11249 (initialize_low_arch): New function.
11250 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11251 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11252 (tic6x_usrregs_info): Forward declare.
11253 (tic6x_read_description): New function, based on ...
11254 (tic6x_arch_setup): ... this. Reimplement.
11255 (target_regsets): Rename to ...
11256 (tic6x_regsets): ... this, and make static.
11257 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11258 (tic6x_regs_info): New function.
11259 (the_low_target): Adjust.
11260 (initialize_low_arch): New function.
11261 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11262 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11263 (target_regsets): Rename to ...
11264 (xtensa_regsets): ... this, and make static.
11265 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11266 globals.
11267 (xtensa_arch_setup, xtensa_regs_info): New functions.
11268 (the_low_target): Adjust.
11269 (initialize_low_arch): New function.
11270 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11271 (nios2_arch_setup): Set the current process'es tdesc.
11272 (target_regsets): Rename to ...
11273 (nios2_regsets): ... this.
11274 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11275 (nios2_regs_info): New function.
11276 (the_low_target): Adjust.
11277 (initialize_low_arch): New function.
11278 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11279 (aarch64_arch_setup): Set the current process'es tdesc.
11280 (target_regsets): Rename to ...
11281 (aarch64_regsets): ... this.
11282 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11283 (aarch64_regs_info): New function.
11284 (the_low_target): Adjust.
11285 (initialize_low_arch): New function.
11286 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11287 globals.
11288 (target_regsets): Rename to ...
11289 (tile_regsets): ... this.
11290 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11291 (tile_regs_info): New function.
11292 (tile_arch_setup): Set the current process'es tdesc.
11293 (the_low_target): Adjust.
11294 (initialize_low_arch): New function.
11295 * spu-low.c (tdesc_spu): Declare.
11296 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11297 * win32-arm-low.c (tdesc_arm): Declare.
11298 (arm_arch_setup): New function.
11299 (the_low_target): Install arm_arch_setup instead of
11300 init_registers_arm.
11301 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11302 (init_windows_x86): Rename to ...
11303 (i386_arch_setup): ... this. Set `win32_tdesc'.
11304 (the_low_target): Adjust.
11305 * win32-low.c (win32_tdesc): New global.
11306 (child_add_thread): Don't create the thread cache here.
11307 (do_initial_child_stuff): Set the new process'es tdesc.
11308 * win32-low.h (struct target_desc): Forward declare.
11309 (win32_tdesc): Declare.
11310 * lynx-i386-low.c (tdesc_i386): Declare global.
11311 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11312 * lynx-low.c (lynx_tdesc): New global.
11313 (lynx_add_process): Set the new process'es tdesc.
11314 * lynx-low.h (struct target_desc): Forward declare.
11315 (lynx_tdesc): Declare global.
11316 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11317 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11318 * nto-low.c (nto_tdesc): New global.
11319 (do_attach): Set the new process'es tdesc.
11320 * nto-low.h (struct target_desc): Forward declare.
11321 (nto_tdesc): Declare.
11322 * nto-x86-low.c (tdesc_i386): Declare.
11323 (nto_x86_arch_setup): Set `nto_tdesc'.
11324
11325 2013-06-04 Gary Benson <gbenson@redhat.com>
11326
11327 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11328 to qSupported response when appropriate.
11329 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11330 with nonzero-length annex.
11331 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11332 arguments supplied in annex.
11333
11334 2013-05-31 Doug Evans <dje@google.com>
11335
11336 PR server/15594
11337 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11338 64 bits in 64-cross-32 environment.
11339
11340 2013-05-28 Pedro Alves <palves@redhat.com>
11341
11342 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11343 (aarch64-without-fpu.c): Delete rule.
11344 * configure.srv (aarch64*-*-linux*): Remove references to
11345 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11346 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11347 declaration.
11348
11349 2013-05-24 Pedro Alves <palves@redhat.com>
11350
11351 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11352 instead of strchr/decode_address. Error if the range isn't split
11353 with a ','. Don't assume there's be a ':' in the action.
11354
11355 2013-05-23 Yao Qi <yao@codesourcery.com>
11356 Pedro Alves <palves@redhat.com>
11357
11358 * linux-low.c (lwp_in_step_range): New function.
11359 (linux_wait_1): If the thread was range stepping and stopped
11360 outside the stepping range, report the stop to GDB. Otherwise,
11361 continue stepping. Add range stepping debug output.
11362 (linux_set_resume_request): Copy the step range from the resume
11363 request to the lwp.
11364 (linux_supports_range_stepping): New.
11365 (linux_target_ops) <supports_range_stepping>: Set to
11366 linux_supports_range_stepping.
11367 * linux-low.h (struct linux_target_ops)
11368 <supports_range_stepping>: New field.
11369 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11370 * linux-x86-low.c (x86_supports_range_stepping): New.
11371 (the_low_target) <supports_range_stepping>: Set to
11372 x86_supports_range_stepping.
11373 * server.c (handle_v_cont): Handle 'r' action.
11374 (handle_v_requests): Append ";r" if the target supports range
11375 stepping.
11376 * target.h (struct thread_resume) <step_range_start,
11377 step_range_end>: New fields.
11378 (struct target_ops) <supports_range_stepping>:
11379 New field.
11380 (target_supports_range_stepping): New macro.
11381
11382 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11383
11384 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11385 confusion in comment.
11386
11387 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11388
11389 * lynx-low.c (struct process_info_private): New type.
11390 (lynx_add_process): New function.
11391 (lynx_create_inferior, lynx_attach): Replace calls to
11392 add_process by calls to lynx_add_process.
11393 (lynx_resume): If PTID is null, then try using
11394 current_process()->private->last_wait_event_ptid.
11395 Add comments.
11396 (lynx_clear_inferiors): Delete. The contents of that function
11397 has been inlined in lynx_mourn;
11398 (lynx_wait_1): Save the ptid in the process's private data.
11399 (lynx_mourn): Free the process' private data. Replace call
11400 to lynx_clear_inferiors by call to clear_inferiors.
11401
11402 2013-05-17 Yao Qi <yao@codesourcery.com>
11403
11404 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11405 the right place.
11406
11407 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11408
11409 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11410 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11411 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11412 PT_TEXT_END_ADDR guards. Update comments.
11413 (linux_target_op) <read_offsets>: Conditionally define to
11414 linux_read_offsets if the target is UCLIBC and if it defines
11415 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11416
11417 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11418 Andrew Jenner <andrew@codesourcery.com>
11419
11420 * Makefile.in (SFILES): Add linux-nios2-low.c.
11421 (clean): Add action to delete nios2-linux.c.
11422 (nios2-linux.c): New rule.
11423 * configure.srv: Add nios2*-*-linux*.
11424 * linux-nios2-low.c: New.
11425
11426 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11427
11428 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11429
11430 2013-04-25 Hui Zhu <hui@codesourcery.com>
11431
11432 PR gdb/15186
11433 * ax.c (ax_printf): Add fflush.
11434
11435 2013-04-22 Tom Tromey <tromey@redhat.com>
11436
11437 * Makefile.in (SFILES): Add filestuff.c.
11438 (OBS): Add filestuff.o.
11439 (filestuff.o): New target.
11440 * config.in, configure: Rebuild.
11441 * configure.ac: Check for fdwalk, pipe2.
11442
11443 2013-04-17 Pedro Alves <palves@redhat.com>
11444
11445 * configure.ac (USE_THREAD_DB): Delete variable.
11446 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11447 Don't AC_SUBST USE_THREAD_DB.
11448 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11449 * config.in, configure: Regenerate.
11450
11451 2013-04-16 Pedro Alves <palves@redhat.com>
11452
11453 * linux-low.h (struct lwp_info) <thread_known>: Move under
11454 the USE_THREAD_DB #ifdef.
11455
11456 2013-04-16 Pedro Alves <palves@redhat.com>
11457
11458 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11459 (linux-low.o): Delete rule.
11460 * linux-low.h: Always include "gdb_thread_db.h" instead of
11461 conditionally including thread_db.h.
11462 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11463 HAVE_THREAD_DB_H.
11464
11465 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11466
11467 * Makefile.in (install-only): Fix make install regression.
11468
11469 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11470
11471 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11472 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11473 installation.
11474 * gdbserver.1: Remove.
11475
11476 2013-03-22 Pedro Alves <palves@redhat.com>
11477
11478 * linux-low.c (handle_extended_wait): Don't call
11479 linux_enable_event_reporting.
11480
11481 2013-03-15 Tony Theodore <tonyt@logyst.com>
11482
11483 PR build/9098:
11484 * Makefile.in (SHELL): Use @SHELL@.
11485
11486 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11487
11488 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11489 compiler warning.
11490
11491 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11492
11493 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11494 Remove extraneous NULL element.
11495
11496 2013-03-13 Yao Qi <yao@codesourcery.com>
11497
11498 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11499 'V' block in trace frame.
11500
11501 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11502
11503 * target.h (struct target_ops): Add btrace ops.
11504 (target_supports_btrace): New macro.
11505 (target_enable_btrace): New macro.
11506 (target_disable_btrace): New macro.
11507 (target_read_btrace): New macro.
11508 * gdbthread.h (struct thread_info): Add btrace field.
11509 * server.c: Include btrace-common.h.
11510 (handle_btrace_general_set): New function.
11511 (handle_btrace_enable): New function.
11512 (handle_btrace_disable): New function.
11513 (handle_general_set): Call handle_btrace_general_set.
11514 (handle_qxfer_btrace): New function.
11515 (struct qxfer qxfer_packets[]): Add btrace entry.
11516 * inferiors.c (remove_thread): Disable btrace.
11517 * linux-low: Include linux-btrace.h.
11518 (linux_low_enable_btrace): New function.
11519 (linux_low_read_btrace): New function.
11520 (linux_target_ops): Add btrace ops.
11521 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11522 Add srv_linux_btrace=yes.
11523 (x86_64-*-linux*): Add linux-btrace.o.
11524 Add srv_linux_btrace=yes.
11525 * configure.ac: Define HAVE_LINUX_BTRACE.
11526 * config.in: Regenerated.
11527 * configure: Regenerated.
11528
11529 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11530
11531 * server.c (handle_qxfer): Preserve error message if -3 is
11532 returned.
11533 (qxfer): Document the -3 return value.
11534
11535 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11536
11537 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11538 (linux_btrace_h): New variable.
11539 (linux-btrace.o): New rule.
11540
11541 2013-03-08 Stan Shebs <stan@codesourcery.com>
11542 Hafiz Abid Qadeer <abidh@codesourcery.com>
11543
11544 * tracepoint.c (trace_buffer_size): New global.
11545 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11546 (init_trace_buffer): Change to one-argument function. Allocate
11547 trace buffer memory.
11548 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11549 handle QTBuffer:size packet.
11550 (cmd_bigqtbuffer_size): New function.
11551 (initialize_tracepoint): Call init_trace_buffer with
11552 DEFAULT_TRACE_BUFFER_SIZE.
11553 * server.c (handle_query): Add QTBuffer:size in the
11554 supported packets.
11555
11556 2013-03-07 Yao Qi <yao@codesourcery.com>
11557
11558 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11559 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11560 of -1.
11561 (cmd_qtsp): Adjust condition. Do post increment.
11562 Set cur_action and cur_step_action back to 0.
11563
11564 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11565
11566 PR server/15236
11567 * linux-low.c (linux_write_memory): Return early success if LEN is
11568 zero.
11569
11570 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11571
11572 * configure.srv: Add x86_64-*-cygwin* as target.
11573
11574 2013-02-28 Tom Tromey <tromey@redhat.com>
11575
11576 * configure.ac: Invoke AC_SYS_LARGEFILE.
11577 * configure, config.in: Rebuild.
11578
11579 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11580
11581 * win32-low.c: Throughout, fix format strings and casts of
11582 printf-like functions to avoid type related warnings on all
11583 platforms.
11584 (get_child_debug_event): Print dwDebugEventCode as hex since
11585 that's how it's usually documented.
11586
11587 2013-02-28 Yao Qi <yao@codesourcery.com>
11588
11589 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11590 pulongest.
11591
11592 2013-02-27 Jiong Wang <jiwang@tilera.com>
11593
11594 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11595 (reg-tilegx32.c): New rule.
11596 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11597 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11598 different register info initializer according to elf class.
11599 (init_registers_tilgx32): New function. The tilegx32 register info
11600 initializer.
11601 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11602 (tile_store_gregset): Likewise.
11603
11604 2013-02-27 Yao Qi <yao@codesourcery.com>
11605
11606 * server.c (process_point_options): Print debug message when
11607 debug_threads is true.
11608
11609 2013-02-26 Yao Qi <yao@codesourcery.com>
11610
11611 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11612
11613 2013-02-19 Pedro Alves <palves@redhat.com>
11614 Kai Tietz <ktietz@redhat.com>
11615
11616 PR gdb/15161
11617
11618 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11619 instead of strtoul to extract address from packet.
11620 (process_serial_event) <'z'>: Likewise.
11621
11622 2013-02-18 Yao Qi <yao@codesourcery.com>
11623
11624 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11625
11626 2013-02-14 Pedro Alves <palves@redhat.com>
11627
11628 Plug memory leak.
11629
11630 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11631 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11632
11633 2013-02-14 Pedro Alves <palves@redhat.com>
11634
11635 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11636
11637 2013-02-14 Pedro Alves <palves@redhat.com>
11638
11639 * tracepoint.c (save_string): Delete.
11640 (add_tracepoint_action): Use savestring instead of save_string.
11641
11642 2013-02-12 Pedro Alves <palves@redhat.com>
11643
11644 * linux-xtensa-low.c: Ditto.
11645 * xtensa-xtregs.c: Ditto.
11646
11647 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11648
11649 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11650 thread_db.
11651
11652 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11653
11654 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11655 aarch64_num_wp_regs and aarch64_num_bp_regs to
11656 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11657
11658 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11659
11660 * linux-aarch64-low.c (ps_get_thread_area): Replace
11661 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11662
11663 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11664 Marcus Shawcroft <marcus.shawcroft@arm.com>
11665 Nigel Stephens <nigel.stephens@arm.com>
11666 Yufeng Zhang <yufeng.zhang@arm.com>
11667
11668 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11669 (aarch64.c, aarch64-without-fpu.c): New targets.
11670 * configure.srv (aarch64*-*-linux*): New.
11671 * linux-aarch64-low.c: New file.
11672
11673 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11674
11675 * linux-low.c (handle_extended_wait, linux_create_inferior)
11676 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11677 (dequeue_one_deferred_signal, linux_resume_one_thread)
11678 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11679 (linux_tracefork_grandchild, linux_test_for_tracefork)
11680 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11681 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11682 where the argument is 0.
11683
11684 2013-01-25 Yao Qi <yao@codesourcery.com>
11685
11686 * event-loop.c: Include "queue.h".
11687 (gdb_event_p): New typedef.
11688 (struct gdb_event) <next_event>: Remove.
11689 (event_queue): Change to QUEUE(gdb_event_p).
11690 (async_queue_event): Remove.
11691 (gdb_event_xfree): New.
11692 (initialize_event_loop): New.
11693 (process_event): Use API from QUEUE.
11694 (wait_for_event): Likewise.
11695 * server.c (main): Call initialize_event_loop.
11696 * server.h (initialize_event_loop): Declare.
11697
11698 2013-01-18 Yao Qi <yao@codesourcery.com>
11699
11700 * ax.h (struct eval_agent_expr_context): New.
11701 (gdb_eval_agent_expr): Update declaration.
11702 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11703 TFRAME. Add new argument CTX.
11704 * server.h (struct eval_agent_expr_context): Declare.
11705 (agent_mem_read, agent_tsv_read): Update declaration.
11706 (agent_mem_read_string): Likewise.
11707 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11708 (add_traceframe_block): Add new argument TPOINT.
11709 Increase TPOINT->traceframe_usage.
11710 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11711 eval_tracepoint_agent_expr.
11712 (condition_true_at_tracepoint): Likewise.
11713 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11714 (agent_mem_read_string, agent_tsv_read): Likewise.
11715
11716 2013-01-16 Yao Qi <yao@codesourcery.com>
11717
11718 * linux-low.c (linux_resume_one_lwp): Don't check
11719 'lwp->bp_reinsert != 0'.
11720
11721 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11722 Pedro Alves <palves@redhat.com>
11723
11724 * lynx-low.c (ptrace_request_to_str): Define a temporary
11725 macro and use it to simplify this function's implementation.
11726
11727 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11728
11729 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11730 sets errno.
11731
11732 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11733
11734 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11735
11736 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11737
11738 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11739
11740 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11741
11742 * lynx-low.c (lynx_resume): Use the resume_info parameter
11743 to determine the ptid for the lynx_ptrace call, unless
11744 it is equal to minus_one_ptid, in which case we use the
11745 ptid of the current_inferior.
11746 (lynx_wait_1): After having received a thread create/exit
11747 event, resume the inferior's execution using the signaling
11748 thread's ptid, rather than the old ptid.
11749
11750 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11751
11752 * lynx-low.c (lynx_resume): Delete variable ret.
11753
11754 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11755
11756 * gdbreplay.c (gdbreplay_version): Update copyright year.
11757 * server.c (gdbserver_version): Likewise.
11758
11759 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11760
11761 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11762 new thread.
11763
11764 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11765
11766 * lynx-low.c (ptrace_request_to_str): Add handling for
11767 PTRACE_GETTRACESIG.
11768
11769 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11770
11771 * lynx-low.c (lynx_attach): Delete variable new_process.
11772
11773 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11774
11775 * lynx-low.c (lynx_create_inferior): Delete variable
11776 new_process.
11777
11778 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11779
11780 * lynx-low.c (ptrace_request_to_str): Do not handle
11781 PTRACE_GETTHREADLIST if this macro does not exist.
11782
11783 2012-12-15 Yao Qi <yao@codesourcery.com>
11784
11785 * Makefile.in (OBS): Add notif.o.
11786 * notif.c, notif.h: New.
11787 * server.c: Include "notif.h".
11788 (struct vstop_notif) <next>: Remove.
11789 <base>: New field.
11790 (queue_stop_reply): Update.
11791 (push_event, send_next_stop_reply): Remove.
11792 (discard_queued_stop_replies): Update.
11793 (notif_stop): New variable.
11794 (handle_v_stopped): Remove.
11795 (handle_v_requests): Don't call handle_v_stopped. Call
11796 handle_ack_notif instead.
11797 (queue_stop_reply_callback): Call notif_event_enque instead
11798 of queue_stop_reply.
11799 (handle_status): Don't call send_next_stop_reply, call
11800 notif_write_event instead.
11801 (kill_inferior_callback): Likewise.
11802 (detach_or_kill_inferior_callback): Likewise.
11803 (main): Call initialize_notif.
11804 (process_serial_event): Call QUEUE_is_empty.
11805 (handle_target_event): Call notif_push instead of push event.
11806 * server.h (push_event): Remove declaration.
11807
11808 2012-12-10 Tom Tromey <tromey@redhat.com>
11809
11810 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11811 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11812 macros.
11813 (.c.o): Rewrite.
11814 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11815 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11816 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11817 (amd64-linux-ipa.o, ax.o): Rewrite.
11818 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11819 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11820 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11821 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11822 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11823 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11824 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11825 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11826 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11827 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11828 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11829 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11830 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11831 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11832 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11833 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11834 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11835 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11836 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11837 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11838 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11839 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11840 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11841 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11842 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11843 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11844 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11845 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11846 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11847 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11848 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11849 (reg-tilegx.o): Remove.
11850 (all_object_files): New macro.
11851 Include .deps files.
11852 * aclocal.m4, configure: Rebuild.
11853 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11854 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11855 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11856
11857 2012-12-05 Tom Tromey <tromey@redhat.com>
11858
11859 PR gdb/14917:
11860 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11861
11862 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11863
11864 * configure.ac: Check for linux/perf_event.h.
11865 * config.in: Regenerated.
11866 * configure: Regenerated.
11867
11868 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11869
11870 * hostio.c (handle_readlink): Decrease buffer size
11871 parameter passed to readlink by one byte.
11872
11873 2012-11-26 Yao Qi <yao@codesourcery.com>
11874
11875 * configure.ac (build_warnings): Append '-Wempty-body'.
11876 * configure: Regenerated.
11877 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11878 body.
11879
11880 2012-11-15 Pierre Muller <muller@sourceware.org>
11881
11882 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
11883 * config.in: Regenerate.
11884 * configure: Regenerate.
11885 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
11886 Use "gdb_wait.h" header instead of <sys/wait.h> header.
11887 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11888 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
11889 header.
11890 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
11891 instead of <sys/wait.h> header.
11892 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
11893
11894 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
11895
11896 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
11897 (various make rules): Remove -DGDBSERVER
11898
11899 2012-11-09 Yao Qi <yao@codesourcery.com>
11900
11901 * spu-low.c (current_ptid): Move it to ..
11902 * gdbthread.h: ... here. New.
11903 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
11904 * server.c (myresume, process_serial_event): Likewise.
11905 * thread-db.c (thread_db_find_new_threads): Likewise.
11906 * tracepoint.c (run_inferior_command): Likewise.
11907
11908 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
11909
11910 * server.c (handle_search_memory_1): Include access length in
11911 warning message.
11912
11913 2012-09-05 Michael Brandt <michael.brandt@axis.com>
11914
11915 * linux-crisv32-low.c: Fix compile errors.
11916
11917 2012-09-04 Yao Qi <yao@codesourcery.com>
11918
11919 * tracepoint.c (cmd_qtsv): Adjust debug message.
11920 Don't check CUR_TPOINT.
11921
11922 2012-08-28 Yao Qi <yao@codesourcery.com>
11923
11924 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
11925 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
11926 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
11927 Remove declarations of xmalloc, xreallloc, xstrdup and
11928 freeargv.
11929 * Makefile.in (libiberty_h): New.
11930 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
11931 (linux-bfin-low.o): Append dependency 'libiberty.h'.
11932
11933 2012-08-23 Yao Qi <yao@codesourcery.com>
11934
11935 * server.h: Remove declaration of 'xsnprintf'.
11936
11937 2012-08-22 Keith Seitz <keiths@redhat.com>
11938
11939 * server.h: Include build-gnulib-gbserver/config.h.
11940 * gdbreplay.c: Likewise.
11941
11942 2012-08-08 Doug Evans <dje@google.com>
11943
11944 * Makefile.in (SFILES): Add gdb_vecs.c.
11945 (OBS): Add gdb_vecs.o.
11946 (gdb_vecs_h, host_defs_h): New variables.
11947 (thread-db.o): Add $(gdb_vecs_h) dependency.
11948 (gdb_vecs.o): New rule.
11949 * thread-db.c: #include "gdb_vecs.h".
11950 (thread_db_load_search): Use a vector to iterate over path elements.
11951 Handle text appearing after "$pdir".
11952
11953 * configure.ac: Add check for strstr.
11954 * config.in: Regenerate.
11955 * configure: Regenerate.
11956
11957 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
11958
11959 * hostio.c (handle_pread): If pread fails, fall back to attempting
11960 lseek/read.
11961 (handle_pwrite): Likewise for pwrite.
11962
11963 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
11964
11965 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
11966 between unsupported TYPE and unimplementable ADDR/LEN combination.
11967 (arm_insert_point): Act on new return value.
11968
11969 2012-07-31 Pedro Alves <palves@redhat.com>
11970
11971 * server.c (process_point_options): Only skip tokens if we find
11972 one that is unrecognized. Don't treat 'X' specially while
11973 skipping unrecognized tokens.
11974
11975 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
11976
11977 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
11978 to 4-byte-align HW breakpoint addresses for Thumb.
11979
11980 2012-07-27 Yao Qi <yao@codesourcery.com>
11981
11982 PR remote/14161.
11983
11984 * server.h: Declare gdb_agent_about_to_close.
11985 * target.c (kill_inferior): Include "agent.h".
11986 New. Send command 'kill'.
11987 * target.h (kill_inferior): Removed macro.
11988 * tracepoint.c (gdb_agent_about_to_close): New.
11989 (gdb_agent_helper_thread): Handle command 'close'.
11990 Wait endlessly until the inferior stops.
11991 Install gdb_agent_remove_socket to atexit hook.
11992 (agent_socket_name): New static variable.
11993 (gdb_agent_socket_init): Replace local variable 'name' with
11994 'agent_socket_name'.
11995 (gdb_agent_remove_socket): New.
11996
11997 2012-07-27 Yao Qi <yao@codesourcery.com>
11998
11999 * server.c (process_point_options): Stop at 'X' when parsing.
12000
12001 2012-07-19 Michael Eager <eager@eagercon.com>
12002
12003 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12004 to hw_execute.
12005 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12006 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12007 hardware breakpoint.
12008
12009 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12010
12011 * gdbserver/linux-low.c (initialize_low): Call
12012 linux_ptrace_init_warnings.
12013
12014 2012-07-02 Doug Evans <dje@google.com>
12015
12016 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12017 pointer to int.
12018
12019 2012-07-02 Stan Shebs <stan@codesourcery.com>
12020
12021 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12022 (ax.o): Add it to build rule.
12023 (ax-ipa.o): Ditto.
12024 (OBS): Add format.o.
12025 (IPA_OBS): Add format.o.
12026 * server.c (handle_query): Claim support for breakpoint commands.
12027 (process_point_options): Add command case.
12028 (process_serial_event): Leave running if there are printfs in
12029 effect.
12030 * mem-break.h (any_persistent_commands): Declare.
12031 (add_breakpoint_commands): Declare.
12032 (gdb_no_commands_at_breakpoint): Declare.
12033 (run_breakpoint_commands): Declare.
12034 * mem-break.c (struct point_command_list): New struct.
12035 (struct breakpoint): New field command_list.
12036 (any_persistent_commands): New function.
12037 (add_commands_to_breakpoint): New function.
12038 (add_breakpoint_commands): New function.
12039 (gdb_no_commands_at_breakpoint): New function.
12040 (run_breakpoint_commands): New function.
12041 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12042 locally.
12043 * ax.c: Include format.h.
12044 (ax_printf): New function.
12045 (gdb_eval_agent_expr): Add printf opcode.
12046
12047 2012-06-13 Yao Qi <yao@codesourcery.com>
12048
12049 * server.c (start_inferior): Remove duplicated writes to fields
12050 'last_resume_kind' and 'last_status' of 'current_inferior'.
12051
12052 2012-06-12 Yao Qi <yao@codesourcery.com>
12053 Pedro Alves <palves@redhat.com>
12054
12055 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12056 comment.
12057 * server.c (handle_v_cont): Extend comment.
12058
12059 2012-06-11 Yao Qi <yao@codesourcery.com>
12060
12061 * linux-low.c (linux_attach): Add 'static'.
12062
12063 2012-06-06 Yao Qi <yao@codesourcery.com>
12064
12065 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12066
12067 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12068
12069 Fix gcc -flto compilation warning.
12070 * server.c (main): Make variable multi_mode and attach volatile.
12071
12072 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12073
12074 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12075 if the platform doesn't know about it.
12076
12077 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12078
12079 * Makefile.in (SFILES): Add linux-tile-low.c.
12080 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12081 * configure.srv: Handle tilegx-*-linux*.
12082 * linux-tile-low.c: New file.
12083
12084 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12085
12086 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12087
12088 2012-05-24 Pedro Alves <palves@redhat.com>
12089
12090 PR gdb/7205
12091
12092 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12093
12094 2012-05-24 Pedro Alves <palves@redhat.com>
12095
12096 PR gdb/7205
12097
12098 Replace target_signal with gdb_signal throughout.
12099
12100 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12101
12102 * linux-low.c (linux_store_registers): Avoid the copying sequence
12103 when no data has been retrieved by ptrace.
12104
12105 2012-05-22 Will Deacon <will.deacon@arm.com>
12106
12107 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12108 Include asm/ptrace.h.
12109 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12110 already defined.
12111
12112 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12113
12114 * linux-low.c (linux_store_registers): Don't re-retrieve data
12115 with ptrace that has already been obtained from /proc. Always
12116 copy any data retrieved with ptrace to the buffer supplied.
12117
12118 2012-05-11 Yao Qi <yao@codesourcery.com>
12119 Pedro Alves <palves@redhat.com>
12120
12121 * linux-low.c (enum stopping_threads_kind): New.
12122 (stopping_threads): Change type to `enum stopping_threads_kind'.
12123 (handle_extended_wait): If stopping and suspending threads, leave
12124 the new_lwp suspended too.
12125 (linux_wait_for_event): Adjust.
12126 (stop_all_lwps): Set `stopping_threads' to
12127 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12128 whether we're suspending threads or just stopping them. Assert no
12129 recursion happens.
12130
12131 2012-04-29 Yao Qi <yao@codesourcery.com>
12132
12133 * server.h: Move some code to ...
12134 * gdbthread.h: ... here. New.
12135 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12136 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12137 (nto-low.o, win32-low.o): Likewise.
12138 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12139 * regcache.c, remote-utils.c, server.c: Likewise.
12140 * target.c, tracepoint.c, win32-low.c: Likewise.
12141
12142 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12143
12144 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12145 (PTRACE_ARG4_TYPE): Likewise.
12146 (PTRACE_XFER_TYPE): Likewise.
12147 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12148 ptrace to PTRACE_ARG3_TYPE.
12149 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12150 (PTRACE_ARG4_TYPE): Likewise.
12151 (PTRACE_XFER_TYPE): Likewise.
12152 (linux_detach_one_lwp): Cast fourth argument of
12153 ptrace to long then PTRACE_ARG4_TYPE.
12154 (regsets_fetch_inferior_registers): Cast third argument of
12155 ptrace to long then PTRACE_ARG3_TYPE.
12156 (regsets_store_inferior_registers): Likewise.
12157
12158 2012-04-20 Pedro Alves <palves@redhat.com>
12159
12160 * configure: Regenerate.
12161
12162 2012-04-19 Pedro Alves <palves@redhat.com>
12163
12164 * Makefile.in (GNULIB_BUILDDIR): New.
12165 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12166 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12167 (all, install-only, uninstall, clean-info, all-lib, clean): No
12168 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12169 (maintainer-clean realclean distclean): Use subdir_do.
12170 (subdir_do): New.
12171 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12172 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12173 * acinclude.m4: Include acx_configure_dir.m4.
12174 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12175 calls. Call AC_PROG_RANLIB. Configure gnulib using
12176 ACX_CONFIGURE_DIR.
12177 (GNULIB): New.
12178 (GNULIB_STDINT_H): Adjust.
12179 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12180 * gdbreplay.c: Include build-gnulib/config.h.
12181 * server.h: Likewise.
12182 * aclocal.m4: Regenerate.
12183 * config.in: Regenerate.
12184 * configure: Regenerate.
12185
12186 2012-04-19 Pedro Alves <palves@redhat.com>
12187
12188 * Makefile.in (LIBGNU, INCGNU): Adjust.
12189 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12190 (all, install-only, uninstall, clean-info, all-lib, clean)
12191 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12192 * configure.ac: Adjust AC_OUTPUT output.
12193 * aclocal.m4: Regenerate.
12194 * configure: Regenerate.
12195
12196 2012-04-19 Pedro Alves <palves@redhat.com>
12197
12198 * Makefile.in (generated_files): New.
12199 (server_h): Remove the explicit dependency on config.h, and depend
12200 on $generated_files.
12201
12202 2012-04-19 Pedro Alves <palves@redhat.com>
12203
12204 * Makefile.in (INCGNU): Add -Ignulib.
12205
12206 2012-04-19 Pedro Alves <palves@redhat.com>
12207
12208 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12209 (INCGNU): ... this, and spell out -I here.
12210 (GNULIB_LIB): Rename to ...
12211 (LIBGNU): ... this.
12212 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12213
12214 2012-04-19 Pedro Alves <palves@redhat.com>
12215
12216 * config.in: Regenerate.
12217
12218 2012-04-19 Pedro Alves <palves@redhat.com>
12219
12220 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12221 * server.h (memmem): Remove declaration.
12222 * config.in: Regenerate.
12223 * configure: Regenerate.
12224
12225 2012-04-19 Yao Qi <yao@codesourcery.com>
12226
12227 * Makefile.in (SFILES): Add common/vec.c.
12228 (OBS): Add vec.o.
12229 (vec.o): New rule.
12230
12231 2012-04-19 Yao Qi <yao@codesourcery.com>
12232
12233 * remote-utils.c (prepare_resume_reply): Replace with macro
12234 target_core_of_thread.
12235 * server.c (handle_qxfer_threads_proper): Likewise.
12236 * target.h (traget_core_of_thread): New macro.
12237
12238 2012-04-18 Pedro Alves <palves@redhat.com>
12239
12240 * aclocal.m4: Regenerate.
12241 * configure: Regenerate.
12242
12243 2012-04-16 Yao Qi <yao@codesourcery.com>
12244
12245 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12246 duplicated on address.
12247
12248 2012-04-16 Yao Qi <yao@codesourcery.com>
12249
12250 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12251 (struct tracepoint_action_ops) <send>: New field.
12252 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12253 (agent_expr_send, x_tracepoint_action_send): New.
12254 (l_tracepoint_action_send): New.
12255 (cmd_qtdp): Download and install tracepoint
12256 according to `use_agent'.
12257 (run_inferior_command): Add one more parameter `len'.
12258 Update callers.
12259 (tracepoint_send_agent): New.
12260 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12261
12262 2012-04-16 Yao Qi <yao@codesourcery.com>
12263
12264 * tracepoint.c (download_tracepoints): Moved to ...
12265 (cmd_qtstart): ... here.
12266
12267 2012-04-14 Yao Qi <yao@codesourcery.com>
12268
12269 * tracepoint.c: Include inttypes.h.
12270 (struct collect_memory_action): Use sized types.
12271 (struct tracepoint): Likewise.
12272 (cmd_qtdp, stop_tracing): Update print specifiers.
12273 (cmd_qtp, response_tracepoint): Likewise.
12274 (collect_data_at_tracepoint): Likewise.
12275 (collect_data_at_step): Likewise.
12276
12277 2012-04-14 Yao Qi <yao@codesourcery.com>
12278
12279 Import gnulib module inttypes.
12280 * aclocal.m4, config.in, configure: Regenerated.
12281
12282 2012-04-14 Yao Qi <yao@codesourcery.com>
12283
12284 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12285 Makefile and config.status at last.
12286
12287 2012-04-13 Yao Qi <yao@codesourcery.com>
12288
12289 * tracepoint.c: Include stdint.h unconditionally.
12290
12291 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12292
12293 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12294 on BFD_HAVE_SYS_PROCFS_TYPE.
12295 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12296 * configure: Regenerate.
12297 * config.in: Likewise.
12298
12299 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12300
12301 * Makefile.in (clean): Also remove x32.c x32-linux.c
12302 x32-avx.c x32-avx-linux.c.
12303 (x32.o): New target.
12304 (x32.c): Likewise.
12305 (x32-linux.o): Likewise.
12306 (x32-linux.c): Likewise.
12307 (x32-avx.o): Likewise.
12308 (x32-avx.c): Likewise.
12309 (x32-avx-linux.o): Likewise.
12310 (x32-avx-linux.c): Likewise.
12311
12312 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12313 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12314 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12315 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12316 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12317 i386/x32-avx-linux.xml.
12318
12319 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12320 (init_registers_x32_avx_linux): Likwise.
12321 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12322 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12323
12324 2012-04-13 Pedro Alves <palves@redhat.com>
12325
12326 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12327 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12328 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12329 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12330 the sub-make.
12331
12332 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12333
12334 * linux-x86-low.c (compat_x32_clock_t): New.
12335 (compat_x32_siginfo_t): Likewise.
12336 (compat_x32_siginfo_from_siginfo): Likewise.
12337 (siginfo_from_compat_x32_siginfo): Likewise.
12338 (linux_is_elf64): Likewise.
12339 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12340 and siginfo_from_compat_x32_siginfo for x32.
12341 (x86_arch_setup): Set linux_is_elf64.
12342
12343 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12344
12345 PR gdb/13969
12346 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12347 e_machine field.
12348 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12349 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12350 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12351 compatible with process.
12352
12353 2012-04-12 Yao Qi <yao@codesourcery.com>
12354
12355 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12356 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12357 (install-only, install-info, clean): Handle sub dir gnulib.
12358 (all-lib, am--refresh): New targets.
12359 (memmem.o): Remove target.
12360 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12361 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12362 (AC_REPLACE_FUNCS): Remove memmem.
12363 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12364 (AC_OUTPUT): Generate Makefile in gnulib/.
12365 * aclocal.m4, config.in, configure: Regenerated.
12366
12367 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12368
12369 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12370
12371 2012-04-05 Pedro Alves <palves@redhat.com>
12372
12373 -Werror=strict-aliasing
12374
12375 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12376 pointer.
12377
12378 2012-04-04 Pedro Alves <palves@redhat.com>
12379
12380 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12381 (sparc_store_gregset_from_stack, sparc_store_gregset)
12382 (sparc_breakpoint_at): Fix formatting.
12383
12384 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12385
12386 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12387 are available.
12388 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12389 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12390 * config.in: Regenerate.
12391 * configure: Likewise.
12392
12393 2012-03-29 Pedro Alves <palves@redhat.com>
12394
12395 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12396 Correct ptrace arguments.
12397
12398 2012-03-28 Pedro Alves <palves@redhat.com>
12399
12400 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12401 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12402 (IA64_FR1_REGNUM): New defines.
12403 (ia64_fetch_register): New.
12404 (the_low_target): Install it.
12405 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12406 field.
12407 * linux-low.c (linux_fetch_registers): Try the
12408 the_low_target.fetch_register hook first.
12409
12410 * linux-arm-low.c (the_low_target): Adjust.
12411 * linux-bfin-low.c (the_low_target): Adjust.
12412 * linux-cris-low.c (the_low_target): Adjust.
12413 * linux-crisv32-low.c (the_low_target): Adjust.
12414 * linux-m32r-low.c (the_low_target): Adjust.
12415 * linux-m68k-low.c (the_low_target): Adjust.
12416 * linux-mips-low.c (the_low_target): Adjust.
12417 * linux-ppc-low.c (the_low_target): Adjust.
12418 * linux-s390-low.c (the_low_target): Adjust.
12419 * linux-sh-low.c (the_low_target): Adjust.
12420 * linux-sparc-low.c (the_low_target): Adjust.
12421 * linux-tic6x-low.c (the_low_target): Adjust.
12422 * linux-x86-low.c (the_low_target): Adjust.
12423 * linux-xtensa-low.c (the_low_target): Adjust.
12424
12425 2012-03-26 Pedro Alves <palves@redhat.com>
12426
12427 * server.c (handle_qxfer_libraries): Don't bail early if
12428 the_target->qxfer_libraries_svr4 is not NULL.
12429
12430 2012-03-26 Pedro Alves <palves@redhat.com>
12431
12432 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12433
12434 2012-03-23 Pedro Alves <palves@redhat.com>
12435
12436 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12437 "library-list-svr4" element's start tag when the the DSO list is
12438 empty.
12439
12440 2012-03-23 Pedro Alves <palves@redhat.com>
12441
12442 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12443 a variable whose type size is the same as the inferior's pointer
12444 size.
12445
12446 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12447
12448 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12449 struct siginfo.
12450 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12451 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12452 * linux-low.h: Include <signal.h>.
12453 (struct siginfo): Remove forward declaration.
12454 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12455 struct siginfo.
12456
12457 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12458
12459 * .gitignore: Ignore more files.
12460
12461 2012-03-19 Pedro Alves <palves@redhat.com>
12462 Jan Kratochvil <jan.kratochvil@redhat.com>
12463
12464 * server.c (cont_thread, general_thread): Add describing comments.
12465 (start_inferior): Clear `cont_thread'.
12466 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12467 of a process.
12468
12469 2012-03-15 Yao Qi <yao@codesourcery.com>
12470
12471 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12472 handling to ...
12473 (cmd_qtdp): ... here.
12474
12475 2012-03-15 Yao Qi <yao@codesourcery.com>
12476
12477 * tracepoint.c (struct tracepoint_action_ops): New.
12478 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12479 (m_tracepoint_action_download): New.
12480 (r_tracepoint_action_download): New.
12481 (x_tracepoint_action_download): New.
12482 (l_tracepoint_action_download): New.
12483 (add_tracepoint_action): Install `action->ops' according type.
12484 (download_tracepoint_1): Move code `download' function pointer
12485 of various tracepoint_action_ops.
12486
12487 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12488
12489 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12490 linux_ptrace_attach_warnings.
12491
12492 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12493
12494 * Makefile.in (linux-ptrace.o): New.
12495 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12496 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12497 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12498 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12499 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12500 of these targets.
12501 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12502
12503 2012-03-08 Yao Qi <yao@codesourcery.com>
12504 Pedro Alves <palves@redhat.com>
12505
12506 Fix PR server/13392.
12507 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12508 offset of JMP insn.
12509 * tracepoint.c (remove_tracepoint): New.
12510 (cmd_qtdp): Call remove_tracepoint when failed to install.
12511
12512 2012-03-07 Pedro Alves <palves@redhat.com>
12513
12514 * linux-low.c (get_detach_signal): New.
12515 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12516 Pass on pending signals to PTRACE_DETACH. Check the result of the
12517 ptrace call.
12518 * server.c (program_signals, program_signals_p): New.
12519 (handle_general_set): Handle QProgramSignals.
12520 * server.h (program_signals, program_signals_p): Declare.
12521
12522 2012-03-05 Pedro Alves <palves@redhat.com>
12523 Jan Kratochvil <jan.kratochvil@redhat.com>
12524
12525 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12526 New comment why.
12527
12528 2012-03-03 Yao Qi <yao@codesourcery.com>
12529
12530 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12531 agent_look_up_symbols.
12532
12533 2012-03-03 Yao Qi <yao@codesourcery.com>
12534
12535 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12536 (linux-x86-low.o): Likewise.
12537 * server.h: Remove in_process_agent_loaded.
12538 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12539 common/agent.c.
12540 Update callers.
12541
12542 2012-03-03 Yao Qi <yao@codesourcery.com>
12543
12544 * tracepoint.c (gdb_agent_capability): New global.
12545 (in_process_agent_loaded_ust): Renamed to
12546 `in_process_agent_supports_ust'.
12547 Update callers.
12548 (in_process_agent_supports_ust): Call agent_capability_check.
12549 (clear_installed_tracepoints): Assert that agent supports
12550 agent.
12551
12552 2012-03-03 Yao Qi <yao@codesourcery.com>
12553
12554 * linux-low.c (linux_supports_agent): New.
12555 (linux_target_ops): Initialize field `supports_agent' with
12556 linux_supports_agent.
12557 * target.h (struct target_ops) <supports_agent>: New.
12558 (target_supports_agent): New macro.
12559 * server.c (handle_general_set): Handle packet 'QAgent'.
12560 (handle_query): Send `QAgent+'.
12561 * Makefile.in (server.o): Depends on agent.h.
12562
12563 2012-03-03 Yao Qi <yao@codesourcery.com>
12564
12565 * Makefile.in (OBS): Add agent.o.
12566 Add new rule for agent.o.
12567 Track dependence of tracepoint.c on agent.h.
12568 * tracepoint.c (run_inferior_command_1):
12569 (run_inferior_command): Call agent_run_command.
12570 (gdb_ust_connect_sync_socket): Deleted. Move it to
12571 common/agent.c.
12572 (resume_thread, stop_thread): Likewise.
12573 (gdb_ust_socket_init): Renamed to ...
12574 (gdb_agent_socket_init): ... New.
12575 (gdb_ust_thread): Renamed to ...
12576 (gdb_agent_helper_thread): ... New.
12577 (gdb_ust_init): Move some code to ...
12578 (gdb_agent_init): ... here. New.
12579 [HAVE_UST]: Call gdb_ust_init.
12580 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12581 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12582 * config.in, configure: Regenerated.
12583
12584 2012-03-02 Pedro Alves <palves@redhat.com>
12585
12586 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12587 * linux-low.c (struct simple_pid_list): New.
12588 (stopped_pids): New a struct simple_pid_list pointer.
12589 (add_to_pid_list, pull_pid_from_list): New.
12590 (handle_extended_wait): Don't assume the first signal new children
12591 report is SIGSTOP. Adjust call to pull_pid_from_list.
12592 (linux_wait_for_lwp): Adjust.
12593
12594 2012-03-02 Yao Qi <yao@codesourcery.com>
12595
12596 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12597 debug log.
12598
12599 2012-03-02 Yao Qi <yao@codesourcery.com>
12600
12601 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12602 `stop_pc' and `tpoint'. Update caller.
12603
12604 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12605
12606 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12607 * linux-low.c (use_linux_regsets): New macro.
12608 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12609 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12610 (linux_register_in_regsets): New function.
12611 (usr_fetch_inferior_registers): Skip registers covered by
12612 regsets.
12613 (usr_store_inferior_registers): Likewise.
12614 (usr_fetch_inferior_registers): New macro.
12615 (usr_store_inferior_registers): Likewise.
12616 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12617 (linux_store_registers): Likewise.
12618 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12619 prototype.
12620 (init_registers_mips64_dsp_linux): Likewise.
12621 (init_registers_mips_linux): New macro.
12622 (init_registers_mips_dsp_linux): Likewise.
12623 (mips_dsp_num_regs): Likewise.
12624 (DSP_BASE, DSP_CONTROL): New fallback macros.
12625 (mips_base_regs): New macro.
12626 (mips_regmap): Use it. Fix the size.
12627 (mips_dsp_regmap): New variable.
12628 (mips_dsp_regset_bitmap): Likewise.
12629 (mips_arch_setup): New function.
12630 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12631 than mips_regmap.
12632 (mips_cannot_store_register): Likewise.
12633 (the_low_target): Update .arch_setup, .num_regs and .regmap
12634 initializers. Add .regset_bitmap initializer.
12635 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12636 initializer.
12637 * linux-bfin-low.c (the_low_target): Likewise.
12638 * linux-cris-low.c (the_low_target): Likewise.
12639 * linux-crisv32-low.c (the_low_target): Likewise.
12640 * linux-ia64-low.c (the_low_target): Likewise.
12641 * linux-m32r-low.c (the_low_target): Likewise.
12642 * linux-m68k-low.c (the_low_target): Likewise.
12643 * linux-ppc-low.c (the_low_target): Likewise.
12644 * linux-s390-low.c (the_low_target): Likewise.
12645 * linux-sh-low.c (the_low_target): Likewise.
12646 * linux-sparc-low.c (the_low_target): Likewise.
12647 * linux-tic6x-low.c (the_low_target): Likewise.
12648 * linux-x86-low.c (the_low_target): Likewise.
12649 * linux-xtensa-low.c (the_low_target): Likewise.
12650 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12651 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12652 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12653 srv_xmlfiles.
12654 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12655 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12656
12657 2012-02-29 Yao Qi <yao@codesourcery.com>
12658 Pedro Alves <palves@redhat.com>
12659
12660 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12661 `step_over_finished' is true.
12662
12663 2012-02-27 Pedro Alves <palves@redhat.com>
12664
12665 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12666 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12667
12668 2012-02-27 Pedro Alves <palves@redhat.com>
12669
12670 PR server/9684
12671 * linux-low.c (pid_is_stopped): New.
12672 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12673
12674 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12675
12676 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12677 of conditions.
12678
12679 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12680
12681 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12682
12683 2012-02-24 Luis Machado <lgustavo@codesourcery>
12684
12685 * server.c (handle_query): Advertise support for target-side
12686 breakpoint condition evaluation.
12687 (process_point_options): New function.
12688 (process_serial_event): When inserting a breakpoint, check for
12689 a target-side condition that should be evaluated.
12690
12691 * mem-break.c: Include regcache.h and ax.h.
12692 (point_cond_list_t): New data structure.
12693 (breakpoint) <cond_list>: New field.
12694 (find_gdb_breakpoint_at): Make non-static.
12695 (delete_gdb_breakpoint_at): Clear any target-side
12696 conditions.
12697 (clear_gdb_breakpoint_conditions): New function.
12698 (add_condition_to_breakpoint): Likewise.
12699 (add_breakpoint_condition): Likewise.
12700 (gdb_condition_true_at_breakpoint): Likewise.
12701 (gdb_breakpoint_here): Return result directly instead
12702 of going through a local variable.
12703
12704 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12705 (clear_gdb_breakpoint_conditions): Likewise.
12706 (add_breakpoint_condition): Likewise.
12707 (gdb_condition_true_at_breakpoint): Likewise.
12708
12709 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12710 (need_step_over_p): Take target-side breakpoint condition into
12711 consideration.
12712
12713 2012-02-24 Luis Machado <lgustavo@codesourcery>
12714
12715 * server.h: Include tracepoint.h.
12716 (agent_mem_read, agent_get_trace_state_variable_value,
12717 agent_set_trace_state_variable_value,
12718 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12719 get_set_tsv_func_addr): New prototypes.
12720
12721 * ax.h: New include file.
12722 * ax.c: New source file.
12723
12724 * tracepoint.c: Include ax.h.
12725 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12726 agent_expr, eval_result_type): Move to ax.h.
12727 (parse_agent_expr): Rename to ...
12728 (gdb_parse_agent_expr): ... this, make it non-static and move
12729 to ax.h.
12730 (unparse_agent_expr) Rename to ...
12731 (gdb_unparse_agent_expr): ... this, make it non-static and move
12732 to ax.h.
12733 (eval_agent_expr): Rename to ...
12734 (eval_tracepoint_agent_expr): ... this.
12735 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12736 forward declarations.
12737 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12738 (agent_get_trace_state_variable_value): New function.
12739 (agent_set_trace_state_variable_value): New function.
12740 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12741 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12742 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12743 (condition_true_at_tracepoint): Likewise.
12744 (parse_agent_expr): Rename to ...
12745 (gdb_parse_agent_expr): ... this and move to ax.c.
12746 (unparse_agent_expr): Rename to ...
12747 (gdb_unparse_agent_expr): ... this and move to ax.c.
12748 (gdb_agent_op_name): Move to ax.c.
12749 (eval_agent_expr): Rename to ...
12750 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12751 and move to ax.c.
12752 (eval_tracepoint_agent_expr): New function.
12753 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12754 non-static.
12755 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12756 ax.c.
12757 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12758 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12759 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12760 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12761 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12762 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12763 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12764 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12765 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12766 (compile_bytecodes): Remove forward declaration.
12767 (is_goto_target): Move to ax.c.
12768 (compile_bytecodes): Move to ax.c and call
12769 agent_get_trace_state_variable_value (...) and
12770 agent_set_trace_state_variable_value (...).
12771
12772 * Makefile.in: Update ax.c and IPA dependencies.
12773
12774 2012-02-24 Pedro Alves <palves@redhat.com>
12775
12776 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12777 (cmd_bigqtbuffer_circular): ... this. Only handle
12778 'QTBuffer:circular:'.
12779 (handle_tracepoint_general_set): Adjust.
12780
12781 2012-02-16 Yao Qi <yao@codesourcery.com>
12782
12783 * inferiors.c: Move code to ...
12784 * dll.c: .... here. New.
12785 * server.h: Declare clear_dlls.
12786 * Makefile.in (SFILES): Add dll.c.
12787 (OBS): Add dll.o
12788 (dll.o): New rule.
12789
12790 2012-02-11 Yao Qi <yao@codesourcery.com>
12791
12792 * server.c: (handle_monitor_command): Add a new parameter
12793 `own_buf'.
12794 (handle_query): Update caller.
12795
12796 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12797
12798 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12799 * configure, config.in: Regenerate.
12800 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12801 is not defined.
12802
12803 2012-02-02 Pedro Alves <palves@redhat.com>
12804
12805 Try SIGKILL first, then PTRACE_KILL.
12806 * linux-low.c (linux_kill_one_lwp): New.
12807 (linux_kill_one_lwp): Rename to ...
12808 (kill_one_lwp_callback): ... this. Use the new
12809 linux_kill_one_lwp.
12810
12811 2012-02-02 Pedro Alves <palves@redhat.com>
12812
12813 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12814 inferior.
12815
12816 2012-01-27 Pedro Alves <palves@redhat.com>
12817
12818 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12819 (elf_64_file_p): Make static.
12820 (linux_pid_exe_is_elf_64_file): New.
12821 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12822 Delete declarations.
12823 (linux_pid_exe_is_elf_64_file): Declare.
12824 * linux-x86-low.c (x86_arch_setup): Use
12825 linux_pid_exe_is_elf_64_file.
12826
12827 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12828
12829 * linux-low.c (linux_wait_for_event_1): Rename to ...
12830 (linux_wait_for_event): ... here and merge it with former
12831 linux_wait_for_event - new variable wait_ptid, use it.
12832 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12833
12834 2012-01-23 Pedro Alves <palves@redhat.com>
12835
12836 * server.c (main): Avoid yet another case of infinite loop while
12837 detaching/killing after a longjmp.
12838
12839 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12840
12841 Code cleanup.
12842 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12843
12844 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12845
12846 * hostio.c (handle_readlink): New function.
12847 (handle_vFile): Call it to handle "vFile:readlink" packets.
12848
12849 2012-01-20 Pedro Alves <palves@redhat.com>
12850 Ulrich Weigand <ulrich.weigand@linaro.org>
12851
12852 * server.c (handle_v_requests): Only support vAttach and vRun to
12853 start multiple processes when in extended protocol mode.
12854
12855 2012-01-17 Pedro Alves <palves@redhat.com>
12856
12857 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12858 memalign plus mprotect to allocate the scratch buffer.
12859
12860 2012-01-13 Pedro Alves <palves@redhat.com>
12861
12862 * server.c (attach_inferior): Clear `cont_thread'.
12863
12864 2012-01-13 Pedro Alves <palves@redhat.com>
12865
12866 * server.c (main): Avoid infinite loop while detaching/killing
12867 after a longjmp.
12868
12869 2012-01-09 Doug Evans <dje@google.com>
12870
12871 * server.c (start_inferior): Set last_ptid in --wrapper case.
12872
12873 2012-01-06 Yao Qi <yao@codesourcery.com>
12874
12875 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12876 defined.
12877 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12878
12879 2012-01-04 Yao Qi <yao@codesourcery.com>
12880
12881 * tracepoint.c (cmd_qtdp): Print debug message
12882 for static tracepoint.
12883
12884 2012-01-04 Yao Qi <yao@codesourcery.com>
12885
12886 * tracepoint.c (trace_vdebug): Differentiate debug message
12887 between gdbserver and IPA.
12888
12889 2012-01-03 Yao Qi <yao@codesourcery.com>
12890
12891 * tracepoint.c (tracepoint_was_hit): Don't collect for
12892 static tracepoint.
12893
12894 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12895
12896 * terminal.h: Reformat copyright header.
12897
12898 2012-01-02 Joel Brobecker <brobecker@adacore.com>
12899
12900 * server.c (gdbserver_version): Update copyright year.
12901 * gdbreplay.c (gdbreplay_version): Likewise.
12902
12903 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
12904
12905 * linux-low.c (linux_create_inferior): Put empty if clause for write.
12906
12907 Revert:
12908 2011-12-18 Hui Zhu <teawater@gmail.com>
12909 * linux-low.c (linux_create_inferior): Save return value to ret.
12910
12911 2011-12-18 Hui Zhu <teawater@gmail.com>
12912
12913 * linux-low.c (linux_create_inferior): Save return value to ret.
12914
12915 2011-12-16 Doug Evans <dje@google.com>
12916
12917 * linux-low.c (linux_create_inferior): If stdio connection,
12918 redirect stdin from /dev/null, stdout to stderr.
12919 * remote-utils.c (remote_is_stdio): New static global.
12920 (remote_connection_is_stdio): New function.
12921 (remote_prepare): Handle stdio connection.
12922 (remote_open): Ditto.
12923 (remote_close): Don't close stdin for stdio connections.
12924 (read_prim,write_prim): New functions. Replace all calls to
12925 read/write to these.
12926 * server.c (main): Watch for "-" argument. Move call to
12927 remote_prepare before start_inferior.
12928 * server.h (STDIO_CONNECTION_NAME): New macro.
12929 (remote_connection_is_stdio): Declare.
12930
12931 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
12932 in debugging output.
12933
12934 2011-12-15 Yao Qi <yao@codesourcery.com>
12935
12936 * tracepoint.c: Include sys/syscall.h.
12937 (gdb_ust_thread): Remove preprocessor conditional.
12938
12939 2011-12-14 Pedro Alves <pedro@codesourcery.com>
12940
12941 * linux-low.c (linux_detach_one_lwp): Call
12942 the_low_target.prepare_to_resume before detaching.
12943
12944 2011-12-14 Yao Qi <yao@codesourcery.com>
12945
12946 * tracepoint.c (gdb_ust_thread): Don't ignore return value
12947 of write.
12948
12949 2011-12-14 Yao Qi <yao@codesourcery.com>
12950
12951 * i386-low.c (i386_low_stopped_data_address): Initialize local
12952 variable `control'.
12953
12954 2011-12-13 Pedro Alves <pedro@codesourcery.com>
12955
12956 PR remote/13492
12957
12958 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
12959 DR_CONTROL unless necessary. Extend comments.
12960 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
12961 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
12962
12963 2011-12-13 Yao Qi <yao@codesourcery.com>
12964
12965 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
12966 macros.
12967 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
12968
12969 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
12970
12971 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
12972 Print new debug message for such case.
12973
12974 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12975
12976 Fix overlapping memcpy.
12977 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
12978 the read_inferior_memory transfer.
12979 (delete_fast_tracepoint_jump): New variable buf. Use it for the
12980 write_inferior_memory transfer.
12981 (set_fast_tracepoint_jump): New variable buf. Use it for the
12982 read_inferior_memory and write_inferior_memory transfers.
12983 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
12984 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
12985 Use it for the write_inferior_memory transfer.
12986 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
12987 buffers.
12988
12989 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12990
12991 * linux-low.c (fetch_register, store_register): Make code
12992 consistent, fix formatting.
12993
12994 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
12995
12996 * linux-low.c (usr_store_inferior_registers): Factor out code
12997 to handle individual registers into...
12998 (store_register): ... this new function.
12999
13000 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13001
13002 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13003 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13004 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13005 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13006 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13007 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13008 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13009 (srv_xmlfiles): Add new XML files.
13010
13011 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13012 and <sys/uio.h>.
13013 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13014 (init_registers_s390_linux32v1): Add prototype.
13015 (init_registers_s390_linux32v2): Likewise.
13016 (init_registers_s390_linux64v1): Likewise.
13017 (init_registers_s390_linux64v2): Likewise.
13018 (init_registers_s390x_linux64v1): Likewise.
13019 (init_registers_s390x_linux64v2): Likewise.
13020 (s390_num_regs): Increment to 52.
13021 (s390_regmap): Add orig_r2 register.
13022 (s390_num_regs_3264): Increment to 68.
13023 (s390_regmap_3264): Add orig_r2 register.
13024 (s390_collect_ptrace_register): Handle orig_r2 register.
13025 (s390_supply_ptrace_register): Likewise.
13026 (s390_fill_last_break): New function.
13027 (s390_store_last_break): Likewise.
13028 (s390_fill_system_call): New function.
13029 (s390_store_system_call): Likewise.
13030 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13031 register sets.
13032 (s390_check_regset): New function.
13033 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13034 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13035 Update target_regsets for available register sets.
13036
13037 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13038 Jan Kratochvil <jan.kratochvil@redhat.com>
13039
13040 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13041 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13042 New.
13043 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13044 * linux-low.h (struct process_info_private): New member r_debug.
13045 * server.c (handle_qxfer_libraries): Call
13046 the_target->qxfer_libraries_svr4.
13047 (handle_qxfer_libraries_svr4): New function.
13048 (qxfer_packets): New entry "libraries-svr4".
13049 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13050 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13051 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13052 PACKET_qXfer_libraries_svr4.
13053
13054 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13055
13056 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13057 PSW address/mask between 8-byte and 16-byte formats.
13058 (s390_supply_ptrace_register): Likewise.
13059 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13060 basic addressing mode bit.
13061
13062 2011-11-24 Stan Shebs <stan@codesourcery.com>
13063
13064 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13065
13066 2011-11-17 Stan Shebs <stan@codesourcery.com>
13067
13068 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13069 (tracing_start_time): New global.
13070 (tracing_stop_time): New global.
13071 (tracing_user_name): New global.
13072 (tracing_notes): New global.
13073 (tracing_stop_note): New global.
13074 (cmd_qtstart): Set traceframe_usage, start_time.
13075 (stop_tracing): Set stop_time.
13076 (cmd_qtstatus): Report additional status.
13077 (cmd_qtp): New function.
13078 (handle_tracepoint_query): Call it.
13079 (cmd_qtnotes): New function.
13080 (handle_tracepoint_general_set): Call it.
13081 (get_timestamp): Rename from tsv_get_timestamp.
13082
13083 2011-11-14 Stan Shebs <stan@codesourcery.com>
13084 Kwok Cheung Yeung <kcy@codesourcery.com>
13085
13086 * linux-x86-low.c (small_jump_insn): New.
13087 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13088 trampoline and error message, build a trampoline and issue a small
13089 jump instruction to it.
13090 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13091 trampoline and error message.
13092 (x86_get_min_fast_tracepoint_insn_len): New.
13093 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13094 * linux-low.h (struct linux_target_ops): Add arguments to
13095 install_fast_tracepoint_jump_pad operation, add new operation.
13096 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13097 arguments.
13098 (linux_get_min_fast_tracepoint_insn_len): New function.
13099 (linux_target_op): Add new operation.
13100 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13101 (gdb_trampoline_buffer_end): Ditto.
13102 (gdb_trampoline_buffer_error): Ditto.
13103 (struct ipa_sym_addresses): Add fields for new IPA variables.
13104 (symbol_list): Add entries for new IPA variables.
13105 (struct tracepoint): Add fields to hold the address range of the
13106 trampoline used by the tracepoint.
13107 (trampoline_buffer_head): New static variable.
13108 (trampoline_buffer_tail): Ditto.
13109 (claim_trampoline_space): New function.
13110 (have_fast_tracepoint_trampoline_buffer): New function.
13111 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13112 structure.
13113 (install_fast_tracepoint): Ditto, also add error buffer argument.
13114 (cmd_qtminftpilen): New function.
13115 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13116 (fast_tracepoint_from_trampoline_address): New function.
13117 (fast_tracepoint_collecting): Handle trampoline as part of jump
13118 pad space.
13119 (set_trampoline_buffer_space): New function.
13120 (initialize_tracepoint): Initialize new IPA variables.
13121 * target.h (struct target_ops): Add arguments to
13122 install_fast_tracepoint_jump_pad operation, add new
13123 get_min_fast_tracepoint_insn_len operation.
13124 (target_get_min_fast_tracepoint_insn_len): New.
13125 (install_fast_tracepoint_jump_pad): Add arguments.
13126 * server.h (IPA_BUFSIZ): Define.
13127 * linux-i386-ipa.c: Include extra header files.
13128 (initialize_fast_tracepoint_trampoline_buffer): New function.
13129 (initialize_low_tracepoint): Call it.
13130 * server.h (set_trampoline_buffer_space): Declare.
13131 (claim_trampoline_space): Ditto.
13132 (have_fast_tracepoint_trampoline_buffer): Ditto.
13133
13134 2011-11-14 Yao Qi <yao@codesourcery.com>
13135
13136 * server.c (handle_query): Handle InstallInTrace for qSupported.
13137 * tracepoint.c (add_tracepoint): Sort list.
13138 (install_tracepoint, download_tracepoint): New.
13139 (cmd_qtdp): Call them to install and download tracepoints.
13140 (sort_tracepoints): Removed.
13141 (cmd_qtstart): Update.
13142
13143 2011-11-14 Yao Qi <yao@codesourcery.com>
13144
13145 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13146 * mem-break.h: Declare.
13147 * tracepoint.c (cmd_qtstart): Move some code to ...
13148 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13149 New.
13150 (download_tracepoints): Move some code to ...
13151 (download_tracepoint_1): ... here. New.
13152
13153 2011-11-08 Yao Qi <yao@codesourcery.com>
13154
13155 * remote-utils.c (relocate_instruction): A comment fix.
13156
13157 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13158
13159 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13160 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13161 dr_status_mirror and dr_control_mirror from debug_reg_state.
13162 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13163 (i386_initial_stuff): Remove use of deleted globals.
13164 (i386_get_thread_context, i386_set_thread_context,
13165 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13166 from debug_reg_state.
13167
13168 2011-11-05 Yao Qi <yao@codesourcery.com>
13169
13170 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13171 address as TPOINT's.
13172
13173 2011-11-02 Stan Shebs <stan@codesourcery.com>
13174
13175 * tracepoint.c (agent_mem_read_string): New function.
13176 (eval_agent_expr): Call it for tracenz.
13177 * server.c (handle_query): Report support for tracenz.
13178
13179 2011-11-02 Yao Qi <yao@codesourcery.com>
13180
13181 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13182
13183 2011-11-02 Yao Qi <yao@codesourcery.com>
13184
13185 * target.h: Fix a typo in comment.
13186
13187 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13188
13189 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13190 clobber the breakpoints' shadows with fast tracepoint jumps.
13191 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13192 * target.c (write_inferior_memory): Also pass MYADDR down to
13193 check_mem_write.
13194
13195 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13196
13197 * configure.ac: Check support for personality routine.
13198 * configure: Regenerate.
13199 * config.in: Likewise.
13200 * linux-low.c: Include <sys/personality.h>.
13201 Define ADDR_NO_RANDOMIZE if necessary.
13202 (linux_create_inferior): Disable address space randomization when
13203 forking inferior, if requested.
13204 (linux_supports_disable_randomization): New function.
13205 (linux_target_ops): Install it.
13206 * server.h (disable_randomization): Declare.
13207 * server.c (disable_randomization): New global variable.
13208 (handle_general_set): Handle QDisableRandomization.
13209 (handle_query): Likewise for qSupported.
13210 (main): Support --disable-randomization and --no-disable-randomization
13211 command line arguments.
13212 * target.h (struct target_ops): Add supports_disable_randomization.
13213 (target_supports_disable_randomization): New macro.
13214
13215 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13216
13217 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13218 ifdef check.
13219 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13220 [!PT_GETDSBT] (target_loadmap): New definition.
13221 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13222 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13223 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13224 and PT_GETDSBT to LINUX_LOADMAP.
13225 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13226 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13227
13228 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13229
13230 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13231 (arm_linux_hwbp_cap): New static variable.
13232 (arm_linux_get_hwbp_cap): Replace by ...
13233 (arm_linux_init_hwbp_cap): ... this new function.
13234 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13235 (arm_linux_get_hw_watchpoint_count): Likewise.
13236 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13237 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13238 (arm_prepare_to_resume): Use perror_with_name instead of error.
13239
13240 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13241
13242 * linux-arm-low.c: Include <signal.h>.
13243 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13244 (struct arm_linux_hwbp_cap): New data type.
13245 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13246 (struct arm_linux_hw_breakpoint): New data type.
13247 (MAX_BPTS, MAX_WPTS): Define.
13248 (struct arch_process_info, struct arch_lwp_info): New data types.
13249 (arm_linux_get_hwbp_cap): New function.
13250 (arm_linux_get_hw_breakpoint_count): Likewise.
13251 (arm_linux_get_hw_watchpoint_count): Likewise.
13252 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13253 (arm_hwbp_control_initialize): Likewise.
13254 (arm_hwbp_control_is_enabled): Likewise.
13255 (arm_hwbp_control_is_initialized): Likewise.
13256 (arm_hwbp_control_disable): Likewise.
13257 (arm_linux_hw_breakpoint_equal): Likewise.
13258 (arm_linux_hw_point_initialize): Likewise.
13259 (struct update_registers_data): New data structure.
13260 (update_registers_callback: New function.
13261 (arm_insert_point): Likewise.
13262 (arm_remove_point): Likewise.
13263 (arm_stopped_by_watchpoint): Likewise.
13264 (arm_stopped_data_address): Likewise.
13265 (arm_new_process): Likewise.
13266 (arm_new_thread): Likewise.
13267 (arm_prepare_to_resume): Likewise.
13268 (the_low_target): Register arm_insert_point, arm_remove_point,
13269 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13270 arm_new_thread, and arm_prepare_to_resume.
13271
13272 2011-09-15 Stan Shebs <stan@codesourcery.com>
13273
13274 * server.h (struct emit_ops): Add compare-goto fields.
13275 * tracepoint.c (gdb_agent_op_sizes): New table.
13276 (emit_eq_goto): New function.
13277 (emit_ne_goto): New function.
13278 (emit_lt_goto): New function.
13279 (emit_le_goto): New function.
13280 (emit_gt_goto): New function.
13281 (emit_ge_goto): New function.
13282 (is_goto_target): New function.
13283 (compile_bytecodes): Recognize special cases of compare-goto
13284 combinations and call specialized emitters for them.
13285 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13286 (amd64_emit_ne_goto): New function.
13287 (amd64_emit_lt_goto): New function.
13288 (amd64_emit_le_goto): New function.
13289 (amd64_emit_gt_goto): New function.
13290 (amd64_emit_ge_goto): New function.
13291 (amd64_emit_ops): Add the new functions.
13292 (i386_emit_eq_goto): New function.
13293 (i386_emit_ne_goto): New function.
13294 (i386_emit_lt_goto): New function.
13295 (i386_emit_le_goto): New function.
13296 (i386_emit_gt_goto): New function.
13297 (i386_emit_ge_goto): New function.
13298 (i386_emit_ops): Add the new functions.
13299
13300 2011-09-08 Stan Shebs <stan@codesourcery.com>
13301
13302 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13303 (i386_emit_epilogue): Restore %ebx.
13304
13305 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13306
13307 * server.c (step_thread): Remove definition.
13308 (process_serial_event): Don't handle Hs.
13309 * server.h (step_thread): Remove declaration.
13310 * target.c (set_desired_inferior): Remove use of step_thread.
13311
13312 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13313
13314 * linux-low.c: Include linux-procfs.h.
13315 (linux_attach_lwp_1): Update comments.
13316 (linux_attach): Scan for existing threads when attaching to a
13317 process that is the tgid.
13318 * Makefile.in: Update dependencies.
13319
13320 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13321
13322 * configure.srv: Add linux-procfs.o dependencies.
13323
13324 2011-08-14 Yao Qi <yao@codesourcery.com>
13325
13326 * target.h (struct target_ops): Fix indent.
13327 * win32-low.c (win32_target_ops): Fix comment.
13328
13329 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13330 Yao Qi <yao@codesourcery.com>
13331
13332 * Makefile.in (clean): Remove tic6x-*.c files.
13333 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13334 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13335 (tic6x-c64xp-linux.c): Likewise.
13336 * configure.srv: Add support for tic6x-*-uclinux.
13337 * linux-tic6x-low.c: New.
13338 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13339
13340 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13341 Yao Qi <yao@codesourcery.com>
13342
13343 * target.h (struct target_ops): Add read_loadmap.
13344 * linux-low.c (struct target_loadseg): New type.
13345 (struct target_loadmap): New type.
13346 (linux_read_loadmap): New function.
13347 (linux_target_ops): Add linux_read_loadmap.
13348 * server.c (handle_query): Support qXfer:fdpic:read packet.
13349 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13350 to NULL.
13351
13352 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13353
13354 * win32-low.c: Include <stdint.h>.
13355
13356 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13357
13358 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13359 to the inferior here.
13360 (i386_remove_aligned_watchpoint): Ditto.
13361 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13362 fit part of the watchpoint in the debug registers.
13363 (i386_update_inferior_debug_regs): New.
13364 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13365 registers, and only update the inferior on success.
13366 (i386_low_remove_watchpoint): Ditto.
13367
13368 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13369
13370 * linux-low.c (compare_ints, unique, list_threads, show_process,
13371 linux_core_of_thread): Delete.
13372 (linux_target_ops): Change linux_core_of_thread to
13373 linux_common_core_of_thread.
13374 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13375 * utils.c (malloc_failure): Change type of argument.
13376 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13377 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13378 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13379 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13380 (IPA_OBJS): Add common-utils-ipa.o.
13381 (ptid_h, linux_osdata_h): New macros.
13382 (server_h): Add common/common-utils.h, common/xml-utils.h,
13383 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13384 common/ptid.h.
13385 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13386 ptid.o, buffer.o): New rules.
13387 (linux-low.o): Add common/linux-osdata.h as a dependency.
13388 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13389 * configure.ac: Add AC_HEADER_DIRENT check.
13390 * config.in: Regenerate.
13391 * configure: Regenerate.
13392 * remote-utils.c (xml_escape_text): Delete.
13393 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13394 buffer_xml_printf): Move to common/buffer.c.
13395 * server.c (main): Remove call to initialize_inferiors.
13396 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13397 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13398 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13399 internal_error, gdb_assert, gdb_assert_fail): Delete.
13400 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13401 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13402 common/buffer.h.
13403 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13404 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13405 initialize_inferiors): Delete.
13406
13407 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13408
13409 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13410 symbol error.
13411
13412 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13413
13414 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13415 assertion.
13416 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13417
13418 2011-05-26 Yao Qi <yao@codesourcery.com>
13419
13420 * Makefile.in (thread-db.o): Track dependence to
13421 common/gdb_thread_db.h.
13422 * thread-db.c: include gdb_thread_db.h from right place.
13423
13424 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13425
13426 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13427 __FILE__ and __LINE__ to internal_error.
13428
13429 2011-05-13 Doug Evans <dje@google.com>
13430
13431 * thread-db.c (try_thread_db_load_from_sdir): New function.
13432 (try_thread_db_load_from_dir): New function.
13433 (thread_db_load_search): Handle $sdir, ignore $pdir.
13434 Remove trying of system directories if search of
13435 libthread-db-search-path fails, that is now done via $sdir.
13436
13437 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13438
13439 * server.c (handle_query): Add EnableDisableTracepoints to the list
13440 of supported features.
13441 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13442 tracepoints.
13443 (cmd_qtenable_disable): New.
13444 (cmd_qtstart): Install tracepoints even if disabled.
13445 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13446 receiving a QTEnable or QTDisable packet.
13447 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13448 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13449 tracepoints.
13450 (gdb_probe): Skip data collection if static tracepoint is disabled.
13451
13452 2011-05-10 Doug Evans <dje@google.com>
13453
13454 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13455
13456 2011-05-04 Doug Evans <dje@google.com>
13457
13458 * linux-low.c (linux_join): Skip process lookup.
13459 * spu-low.c (spu_join): Ditto.
13460 * server.c (join_inferiors_callback): Delete.
13461 (process_serial_event): For 'D' packet (detach) call join_inferior
13462 directly.
13463
13464 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13465
13466 * README: Don't mention xscale*-*-linux*.
13467 * configure.srv (xscale*-*-linux*): Don't handle target.
13468
13469 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13470
13471 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13472 casting pointers.
13473 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13474 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13475 (i386_emit_void_call_2): Likewise.
13476
13477 2011-04-26 Yao Qi <yao@codesourcery.com>
13478
13479 * linux-low.c: Move common macros to linux-ptrace.h.
13480 Include linux-ptrace.h.
13481 * Makefile.in (linux_ptrace_h): New.
13482 (linux-low.o): Depends on linux-ptrace.h.
13483
13484 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13485
13486 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13487 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13488 (remote_prepare): New function with most of the TCP code from ...
13489 (remote_open): ... here. Detect PORT here unconditionally. Move also
13490 setting transport_is_reliable.
13491 * server.c (run_once): New variable.
13492 (gdbserver_usage): Document it.
13493 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13494 the first run if RUN_ONCE.
13495 * server.h (run_once, remote_prepare): New declarations.
13496
13497 2011-04-19 Tom Tromey <tromey@redhat.com>
13498
13499 * win32-low.c (handle_load_dll): Remove duplicate "the".
13500
13501 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13502
13503 Remove support for old Cygwin 1.5 versions.
13504 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13505 function to avoid warning.
13506 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13507 warning.
13508
13509 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13510
13511 * gdbserver/server.h (Macro _): Define it if not available.
13512
13513 2011-03-14 Michael Snyder <msnyder@vmware.com>
13514
13515 * hostio.c (handle_close): Remove unnecessary null test.
13516
13517 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13518
13519 * Makefile.in (maintainer-clean realclean distclean): Remove
13520 "make ... subdir_do" command.
13521
13522 2011-03-10 Michael Snyder <msnyder@vmware.com>
13523
13524 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13525
13526 * server.c (handle_v_run): Free alloced buffer on early return.
13527
13528 2011-03-09 Yao Qi <yao@codesourcery.com>
13529
13530 Revert:
13531 2011-03-04 Yao Qi <yao@codesourcery.com>
13532
13533 * Makefile.in: Remove GNU make feature --directory.
13534
13535 2011-03-05 Yao Qi <yao@codesourcery.com>
13536
13537 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13538 (subdir_do): New make target. Copied from gdb/Makefile.
13539 (maintainer-clean, realclean, distclean, clean): Call corresponding
13540 make targets in common/Makefile.
13541
13542 2011-02-11 Yao Qi <yao@codesourcery.com>
13543
13544 * configure.ac: Call AC_PROG_RANLIB.
13545 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13546 * configure: Regenerate.
13547
13548 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13549
13550 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13551
13552 2011-03-06 Yao Qi <yao@codesourcery.com>
13553
13554 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13555
13556 2011-03-05 Yao Qi <yao@codesourcery.com>
13557
13558 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13559 (subdir_do): New make target. Copied from gdb/Makefile.
13560 (maintainer-clean, realclean, distclean, clean): Call corresponding
13561 make targets in common/Makefile.
13562
13563 2011-03-04 Yao Qi <yao@codesourcery.com>
13564
13565 * Makefile.in: Remove GNU make feature --directory.
13566
13567 2011-03-04 Michael Snyder <msnyder@vmware.com>
13568
13569 * server.c (queue_stop_reply): Call xmalloc not malloc.
13570
13571 2011-03-02 Michael Snyder <msnyder@vmware.com>
13572
13573 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13574
13575 2011-02-28 Michael Snyder <msnyder@vmware.com>
13576
13577 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13578 (cmd_qtframe): Ditto.
13579 (cmd_qtbuffer): Ditto.
13580 (cmd_bigqtbuffer): Ditto.
13581
13582 * utils.c (decimal2str): Initialize 'width' to nine, then
13583 don't mess with it.
13584
13585 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13586
13587 * hostio.c (require_data): Free *data, not data.
13588
13589 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13590
13591 * hostio.c (require_data): Use free, not xfree.
13592
13593 2011-02-27 Michael Snyder <msnyder@vmware.com>
13594
13595 * server.c (handle_query): Discard unused value.
13596
13597 * hostio.c (require_data): Free malloc memory before returning
13598 error.
13599
13600 2011-02-26 Michael Snyder <msnyder@vmware.com>
13601
13602 * linux-low.c (list_threads): Call closedir for dirent.
13603
13604 2011-02-27 Michael Snyder <msnyder@vmware.com>
13605
13606 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13607 a case statement falls through.
13608
13609 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13610
13611 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13612 in comparison.
13613
13614 2011-02-26 Michael Snyder <msnyder@vmware.com>
13615
13616 * utils.c (decimal2str): Eliminate dead code and dead param.
13617 (pulongest): Drop dead param from call to decimal2str.
13618 (plongest): Ditto.
13619
13620 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13621
13622 Revert the following patch (not approved yet):
13623 2011-02-21 Hui Zhu <teawater@gmail.com>
13624 * tracepoint.c (tp_printf): New function.
13625 (eval_agent_expr): Handle gdb_agent_op_printf.
13626
13627 2011-02-21 Hui Zhu <teawater@gmail.com>
13628
13629 * tracepoint.c (tp_printf): New function.
13630 (eval_agent_expr): Handle gdb_agent_op_printf.
13631
13632 2011-02-18 Tom Tromey <tromey@redhat.com>
13633
13634 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13635 (tracepoint.o): Likewise.
13636 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13637 (gdb_agent_op_names): Likewise.
13638
13639 2011-02-18 Tom Tromey <tromey@redhat.com>
13640
13641 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13642 gdb_agent_op_rot>: New constants.
13643 (gdb_agent_op_names): Add pick and roll.
13644 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13645 cases.
13646
13647 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13648
13649 * aclocal.m4: Regenerated with aclocal-1.11.1.
13650
13651 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13652
13653 * server.c (handle_qxfer_traceframe_info): New.
13654 (qxfer_packets): Register "traceframe-info".
13655 (handle_query): Report support for qXfer:traceframe-info:read+.
13656 * tracepoint.c (match_blocktype): New.
13657 (traceframe_find_block_type): Rename to ...
13658 (traceframe_walk_blocks): ... this. Add callback filter argument,
13659 and use it.
13660 (traceframe_find_block_type): New, reimplemented on top of
13661 traceframe_walk_blocks.
13662 (build_traceframe_info_xml): New.
13663 (traceframe_read_info): New.
13664 * server.h (traceframe_read_info): Declare.
13665
13666 2011-02-11 Yao Qi <yao@codesourcery.com>
13667
13668 * configure.ac: Call AC_PROG_RANLIB.
13669 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13670 * configure: Regenerate.
13671
13672 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13673
13674 * server.c (gdb_read_memory): Change return semantics to allow
13675 partial transfers.
13676 (handle_search_memory_1): Adjust.
13677 (process_serial_event) <'m' packet>: Handle partial transfers.
13678 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13679
13680 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13681
13682 * regcache.c (init_register_cache): Initialize
13683 regcache->register_status.
13684 (free_register_cache): Release regcache->register_status.
13685 (regcache_cpy): Copy register_status.
13686 (registers_to_string): Print 'x's for unavailable registers.
13687 (supply_register): Mark the register's status valid or
13688 unavailable, depending on whether a buffer was passed in or not.
13689 (supply_register_zeroed): New.
13690 (supply_regblock): Mark the registers' status valid or
13691 unavailable, depending on whether a buffer was passed in or not.
13692 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13693 (struct regcache): New `register_status' field.
13694 (supply_register_zeroed): Declare.
13695 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13696 supply_register_zeroed, rather than passing a NULL buffer to
13697 supply_register.
13698 * tracepoint.c (fetch_traceframe_registers): Update comment.
13699
13700 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13701
13702 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13703 buffer explicit.
13704
13705 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13706
13707 * server.h (decode_xfer_write): Change prototype.
13708 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13709 and don't extract the annex here.
13710 * server.c (decode_xfer_read): Remove `annex' parameter,
13711 and don't extract the annex here.
13712 (decode_xfer): New.
13713 (struct qxfer): New.
13714 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13715 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13716 (handle_qxfer_statictrace): New functions, abstracted out from
13717 handle_query, and made to use the struct qxfer interface.
13718 (handle_threads_qxfer_proper): Rename to ...
13719 (handle_qxfer_threads_proper): ... this.
13720 (handle_threads_qxfer): Rename to ...
13721 (handle_qxfer_threads): ... this. Adjust.
13722 (qxfer_packets): New array.
13723 (handle_qxfer): New function.
13724 (handle_query): Use handle_qxfer.
13725
13726 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13727
13728 * gdbreplay.c: Shorten lines of >= 80 columns.
13729 * linux-low.c: Ditto.
13730 * linux-ppc-low.c: Ditto.
13731 * linux-s390-low.c: Ditto.
13732 * linux-sparc-low.c: Ditto.
13733 * linux-x86-low.c: Ditto.
13734 * linux-xtensa-low.c: Ditto.
13735 * mem-break.c: Ditto.
13736 * nto-low.c: Ditto.
13737 * regcache.h: Ditto.
13738 * remote-utils.c: Ditto.
13739 * server.c: Ditto.
13740 * server.h: Ditto.
13741 * thread-db.c: Ditto.
13742 * tracepoint.c: Ditto.
13743 * utils.c: Ditto.
13744 * win32-low.h: Ditto.
13745
13746 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13747
13748 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13749 update.
13750
13751 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13752
13753 * server.c (gdbserver_version): Update copyright year in version
13754 output.
13755 * gdbreplay.c (gdbreplay_version): Ditto.
13756
13757 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13758
13759 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13760 * linux-bfin-low.c: New file.
13761 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13762 PT_DATA_ADDR for BFIN targets.
13763 * Makefile.in (SFILES): Add linux-bfin-low.c.
13764 (clean): Remove reg-bfin.c.
13765 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13766 * README: Mention supported Blackfin targets.
13767
13768 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13769
13770 * .gitignore: New file.
13771
13772 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13773
13774 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13775
13776 2010-10-22 Jie Zhang <jie@codesourcery.com>
13777
13778 * Makefile.in: Add FLAGS_TO_PASS variable.
13779 (install): Remove dependency of install-only and recursively
13780 invoke make for install-only.
13781
13782 2010-10-04 Doug Evans <dje@google.com>
13783
13784 * Makefile.in (uninstall): Use $(DESTDIR).
13785
13786 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13787
13788 PR gdb/11842
13789
13790 * linux-x86-low.c (compat_siginfo_from_siginfo)
13791 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13792 si_code is < 0. Check for si_code == SI_TIMER before checking for
13793 si_code < 0.
13794
13795 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13796
13797 * lynx-i386-low.c: New file.
13798 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13799
13800 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13801
13802 * lynx-low.c (ptrace_request_to_str): Remove handling for
13803 request values that have been removed in LynxOS 5.x.
13804
13805 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13806
13807 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13808 <ptrace.h>
13809
13810 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13811
13812 * configure.ac: Add --enable-inprocess-agent option.
13813 * configure: Rebuilt.
13814
13815 2010-09-06 Yao Qi <yao@codesourcery.com>
13816
13817 * linux-low.c (linux_kill): Remove unused variable.
13818 (linux_stabilize_threads): Likewise.
13819 * server.c (start_inferior): Likewise.
13820 (queue_stop_reply_callback): Likewise.
13821 * tracepoint.c (do_action_at_tracepoint): Likewise.
13822
13823 2010-09-06 Yao Qi <yao@codesourcery.com>
13824
13825 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13826 on return.
13827
13828 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13829
13830 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13831
13832 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13833
13834 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13835 "$(IPA_DEPFILES)".
13836
13837 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13838
13839 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13840 gdbserver/lynx-ppc-low.c: New files.
13841 * Makefile.in (lynx_low_h): New variable.
13842 (lynx-low.o, lynx-ppc-low.o): New rules.
13843 * configure.ac: On LynxOS, link with -lnetinet.
13844 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13845 * configure: regenerate.
13846
13847 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13848
13849 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13850 * configure.ac: Add check for vasprintf and vsnprintf.
13851 * configure, config.in: Regenerate.
13852 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13853
13854 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13855
13856 * gdbreplay.c: Move include of alloca.h up, next to include of
13857 malloc.h.
13858 * server.h: Add include of malloc.h.
13859 * mem-break.c: Remove include of malloc.h.
13860 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13861
13862 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13863
13864 * Makefile.in (memmem.o): Build with -Wno-error.
13865
13866 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13867
13868 * utils.c (xsnprintf): Make non-static.
13869 * server.h: Add xsnprintf declaration.
13870 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13871 replace calls to snprintf by calls to xsnprintf throughout.
13872
13873 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13874
13875 * configure.ac: Add configure check for alloca.
13876 * configure, config.in: Regenerate.
13877 * server.h: Include alloca.h if it exists.
13878 * gdbreplay.c: Include alloca.h if it exists.
13879
13880 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13881
13882 * linux-low.c (__SIGRTMIN): Define if not already defined.
13883 (linux_create_inferior): Check for __ANDROID__ rather than
13884 __SIGRTMIN.
13885 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
13886 are already deferred.
13887 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
13888 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
13889 stopped and already has a pending signal to report.
13890 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
13891 a pending signal to report or is moving out of a jump pad.
13892 (linux_init_signals): Check for __ANDROID__ rather than
13893 __SIGRTMIN.
13894
13895 2010-08-28 Pedro Alves <pedro@codesourcery.com>
13896
13897 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
13898 debug_threads check. Avoid a linear search when not doing debug
13899 output.
13900
13901 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13902
13903 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
13904 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
13905 (struct file_handler) <fd>: Change type to gdb_fildes_t.
13906 (process_event): Change local fd's type to gdb_fildes_t.
13907 (create_file_handler): Adjust prototype.
13908 (delete_file_handler): Adjust prototype.
13909 (handle_file_event): Adjust prototype. Use pfildes.
13910 (create_file_event): Adjsut prototype.
13911 * remote-utils.c (remote_desc, listen_desc): Change type to
13912 gdb_fildes_t.
13913 * server.h: New gdb_fildes_t typedef.
13914 [USE_WIN32API]: Include winsock2.h.
13915 (delete_file_handler, add_file_handler): Adjust prototypes.
13916 (pfildes): Declare.
13917 * utils.c (pfildes): New.
13918
13919 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13920
13921 * configure.ac (build_warnings): Add -Wno-char-subscripts.
13922 * configure: Regenerate.
13923
13924 2010-08-27 Pedro Alves <pedro@codesourcery.com>
13925
13926 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
13927 (linux_done_accessing_memory): ... this.
13928 (linux_target_ops): Adjust.
13929 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
13930 * nto-low.c (nto_target_ops): Adjust comment.
13931 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
13932 * spu-low.c (spu_target_ops): Adjust comment.
13933 * target.h (target_ops): Rename unprepare_to_access_memory field
13934 to done_accessing_memory.
13935 (unprepare_to_access_memory): Rename to ...
13936 (done_accessing_memory): ... this.
13937
13938 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13939
13940 * linux-low.c (linux_prepare_to_access_memory): New.
13941 (linux_unprepare_to_access_memory): New.
13942 (linux_target_ops): Install them.
13943 * server.c (read_memory): Rename to ...
13944 (gdb_read_memory): ... this. Use
13945 prepare_to_access_memory/prepare_to_access_memory.
13946 (write_memory): Rename to ...
13947 (gdb_write_memory): ... this. Use
13948 prepare_to_access_memory/prepare_to_access_memory.
13949 (handle_search_memory_1): Adjust.
13950 (process_serial_event): Adjust.
13951 * target.h (struct target_ops): New fields
13952 prepare_to_access_memory and unprepare_to_access_memory.
13953 (prepare_to_access_memory, unprepare_to_access_memory): New.
13954 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
13955 prepare_to_access_memory/prepare_to_access_memory.
13956 * nto-low.c (nto_target_ops): Adjust.
13957 * spu-low.c (spu_target_ops): Adjust.
13958 * win32-low.c (win32_target_ops): Adjust.
13959
13960 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13961
13962 * Makefile.in (WARN_CFLAGS): Get it from configure.
13963 (WERROR_CFLAGS): New.
13964 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
13965 * configure.ac: Introduce --enable-werror, which adds -Werror to
13966 the compiler command line. Enabled by default. Disable with
13967 --disable-werror. Add -Wdeclaration-after-statement
13968 Wpointer-arith and -Wformat-nonliteral to warning flags.
13969 * configure: Regenerate.
13970
13971 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13972
13973 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
13974
13975 2010-08-26 Pedro Alves <pedro@codesourcery.com>
13976
13977 * gdbreplay.c (remote_error): New.
13978 (gdbchar): New.
13979 (expect): Use gdbchar. Check for error reading from GDB.
13980 Clarify sync error output.
13981 (play): Check for errors writing to GDB.
13982 * linux-low.c (sigchld_handler): Really ignore `write' errors.
13983 * remote-utils.c (getpkt): Check for errors writing to the remote
13984 descriptor.
13985
13986 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13987
13988 * linux-low.c (linux_wait_1): Move non-debugging code out of
13989 `debug_threads' control.
13990
13991 2010-08-25 Pedro Alves <pedro@codesourcery.com>
13992
13993 * linux-low.c (linux_wait_1): Don't set last_status here.
13994 * server.c (push_event, queue_stop_reply_callback): Assert we're
13995 not pushing a TARGET_WAITKIND_IGNORE event.
13996 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
13997 (myresume, handle_target_event): Set the thread's last_resume_kind
13998 and last_status from the target returned status.
13999
14000 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14001
14002 PR threads/10729
14003
14004 * linux-x86-low.c (update_debug_registers_callback): New.
14005 (i386_dr_low_set_addr): Use it.
14006 (i386_dr_low_get_addr): New.
14007 (i386_dr_low_set_control): Use update_debug_registers_callback.
14008 (i386_dr_low_get_control): New.
14009 (i386_dr_low_get_status): Adjust.
14010 * linux-low.c (linux_stop_lwp): New.
14011 * linux-low.h (linux_stop_lwp): Declare.
14012
14013 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14014 argument instead of a i386_debug_reg_state.
14015 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14016 a i386_debug_reg_state.
14017 (i386_insert_aligned_watchpoint): Adjust.
14018 (i386_remove_aligned_watchpoint): Adjust.
14019 (i386_low_stopped_data_address): Read the debug registers from the
14020 inferior instead of from the mirrors.
14021 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14022 (i386_dr_low_get_addr): Declare.
14023 (i386_dr_low_get_control): Declare.
14024 (i386_dr_low_get_status): Change prototype.
14025
14026 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14027 (i386_dr_low_get_addr): New.
14028 (i386_dr_low_get_control): New.
14029 (i386_dr_low_get_status): Adjust prototype. Return
14030 dr_status_mirror.
14031 (i386_initial_stuff): Clear dr_status_mirror and
14032 dr_control_mirror.
14033 (i386_get_thread_context): Adjust.
14034 (i386_set_thread_context): Adjust.
14035 (i386_thread_added): Adjust.
14036
14037 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14038
14039 * linux-low.h (linux_thread_area): Delete declaration.
14040
14041 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14042
14043 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14044 after its termination.
14045
14046 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14047
14048 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14049 (gdb_wants_all_stopped): Delete.
14050 (linux_wait_1): Don't call them.
14051 * server.c (handle_v_cont): Tag all threads as want-stopped.
14052 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14053 stopped as "client-wants-stopped".
14054
14055 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14056
14057 * Makefile.in (signals_h): New.
14058 (server_h): Depend on it.
14059 (server.o): Don't depend on $(signals_def).
14060 (signals.o): Depend on $(signals_def).
14061
14062 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14063
14064 * Makefile.in (signals_def): New.
14065 (server_h): Append include/gdb/signals.h and signals_def.
14066 (server.o): Append signals_def.
14067
14068 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14069
14070 * server.c (handle_target_event): Use target_signal_to_host for
14071 resume_info.sig initialization.
14072 * target.h (struct thread_resume) <sig>: New comment.
14073
14074 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14075
14076 * server.c (handle_query): strcpy() the returned string from paddress()
14077 instead of sprintf().
14078 * utils.c (paddress): Return phex_nz().
14079
14080 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14081
14082 * server.c (handle_v_cont): Call mourn_inferior if process
14083 just exited.
14084 (myresume): Likewise.
14085
14086 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14087
14088 Static tracepoints, and integration with UST.
14089
14090 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14091 * mem-break.c (uninsert_all_breakpoints)
14092 (reinsert_all_breakpoints): New.
14093 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14094 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14095 (gdb_agent_ust_loaded, helper_thread_id)
14096 (gdb_agent_helper_thread_id): New macros.
14097 (struct ipa_sym_addresses): Add addr_ust_loaded,
14098 addr_helper_thread_id, addr_cmd_buf.
14099 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14100 (in_process_agent_loaded_ust): New.
14101 (write_e_ust_not_loaded): New.
14102 (maybe_write_ipa_ust_not_loaded): New.
14103 (struct collect_static_trace_data_action): New.
14104 (enum tracepoint_type) <static_tracepoint>: New.
14105 (struct tracepoint) <handle>: Mention static tracepoints.
14106 (struct static_tracepoint_ctx): New.
14107 (CMD_BUF_SIZE): New.
14108 (add_tracepoint_action): Handle static tracepoint actions.
14109 (unprobe_marker_at): New.
14110 (clear_installed_tracepoints): Handle static tracepoints.
14111 (cmd_qtdp): Handle static tracepoints.
14112 (probe_marker_at): New.
14113 (cmd_qtstart): Handle static tracepoints.
14114 (response_tracepoint): Handle static tracepoints.
14115 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14116 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14117 (get_context_regcache): Handle static tracepoints.
14118 (do_action_at_tracepoint): Handle static tracepoint actions.
14119 (traceframe_find_block_type): Handle static trace data blocks.
14120 (traceframe_read_sdata): New.
14121 (download_tracepoints): Download static tracepoint actions.
14122 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14123 (GDB_PROBE_NAME): New.
14124 (ust_ops): New.
14125 (GET_UST_SYM): New.
14126 (USTF): New.
14127 (dlsym_ust): New.
14128 (ust_marker_to_static_tracepoint): New.
14129 (gdb_probe): New.
14130 (collect_ust_data_at_tracepoint): New.
14131 (gdb_ust_probe): New.
14132 (UNIX_PATH_MAX, SOCK_DIR): New.
14133 (gdb_ust_connect_sync_socket): New.
14134 (resume_thread, stop_thread): New.
14135 (run_inferior_command): New.
14136 (init_named_socket): New.
14137 (gdb_ust_socket_init): New.
14138 (cstr_to_hexstr): New.
14139 (next_st): New.
14140 (first_marker, next_marker): New.
14141 (response_ust_marker): New.
14142 (cmd_qtfstm, cmd_qtsstm): New.
14143 (unprobe_marker_at, probe_marker_at): New.
14144 (cmd_qtstmat, gdb_ust_thread): New.
14145 (gdb_ust_init): New.
14146 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14147 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14148 (ST_REGENTRY): New.
14149 (x86_64_st_collect_regmap): New.
14150 (X86_64_NUM_ST_COLLECT_GREGS): New.
14151 (AMD64_RIP_REGNUM): New.
14152 (supply_static_tracepoint_registers): New.
14153 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14154 (ST_REGENTRY): New.
14155 (i386_st_collect_regmap): New.
14156 (i386_NUM_ST_COLLECT_GREGS): New.
14157 (supply_static_tracepoint_registers): New.
14158 * server.c (handle_query): Handle qXfer:statictrace:read.
14159 <qSupported>: Report support for StaticTracepoints, and
14160 qXfer:statictrace:read features.
14161 * server.h (traceframe_read_sdata)
14162 (supply_static_tracepoint_registers): Declare.
14163 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14164 (unpack_varlen_hex): Include in IPA build.
14165 * Makefile.in (ustlibs, ustinc): New.
14166 (IPA_OBJS): Add remote-utils-ipa.o.
14167 ($(IPA_LIB)): Link -ldl and -lpthread.
14168 (UST_CFLAGS): New.
14169 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14170 * config.in, configure: Regenerate.
14171
14172 2010-06-20 Ian Lance Taylor <iant@google.com>
14173 Pedro Alves <pedro@codesourcery.com>
14174
14175 * linux-x86-low.c (always_true): Delete.
14176 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14177 trying to fool the compiler with always_true.
14178
14179 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14180
14181 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14182 conditions in gdbserver.
14183
14184 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14185
14186 * spu-low.c (spu_read_memory): Wrap around local store limit.
14187 (spu_write_memory): Likewise.
14188
14189 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14190
14191 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14192 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14193 LONGEST uses.
14194 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14195 uses.
14196 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14197 uses with LONGEST uses.
14198
14199 2010-06-14 Stan Shebs <stan@codesourcery.com>
14200 Pedro Alves <pedro@codesourcery.com>
14201
14202 Bytecode compiler.
14203
14204 * linux-x86-low.c: Include limits.h.
14205 (add_insns): New.
14206 (always_true): New.
14207 (EMIT_ASM): New.
14208 (EMIT_ASM32): New.
14209 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14210 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14211 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14212 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14213 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14214 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14215 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14216 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14217 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14218 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14219 (amd64_emit_void_call_2): New.
14220 (amd64_emit_ops): New.
14221 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14222 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14223 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14224 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14225 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14226 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14227 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14228 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14229 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14230 (i386_emit_stack_adjust, i386_emit_int_call_1)
14231 (i386_emit_void_call_2): New.
14232 (i386_emit_ops): New.
14233 (x86_emit_ops): New.
14234 (the_low_target): Install x86_emit_ops.
14235 * server.h (struct emit_ops): New.
14236 (get_raw_reg_func_addr): Declare.
14237 (current_insn_ptr, emit_error): Declare.
14238 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14239 (set_trace_state_variable_value): New defines.
14240 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14241 addr_get_trace_state_variable_value and
14242 addr_set_trace_state_variable_value.
14243 (symbol_list): New fields for get_raw_reg,
14244 get_trace_state_variable_value and set_trace_state_variable_value.
14245 (condfn): New typedef.
14246 (struct tracepoint): New field `compiled_cond'.
14247 (do_action_at_tracepoint): Clear compiled_cond.
14248 (get_trace_state_variable_value, set_trace_state_variable_value):
14249 Export in the IPA.
14250 (condition_true_at_tracepoint): If there's a compiled condition,
14251 run that.
14252 (current_insn_ptr, emit_error): New globals.
14253 (struct bytecode_address): New.
14254 (get_raw_reg_func_addr): New.
14255 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14256 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14257 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14258 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14259 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14260 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14261 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14262 (compile_tracepoint_condition, compile_bytecodes): New.
14263 * target.h (emit_ops): Forward declare.
14264 (struct target_ops): New field emit_ops.
14265 (target_emit_ops): New.
14266 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14267 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14268 * linux-low.c (linux_emit_ops): New.
14269 (linux_target_ops): Install it.
14270 * linux-low.h (struct linux_target_ops): New field emit_ops.
14271
14272 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14273
14274 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14275 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14276
14277 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14278 Stan Shebs <stan@codesourcery.com>
14279
14280 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14281 (all): Depend on $(extra_libraries).
14282 (install-only): Install the IPA.
14283 (IPA_OBJS, IPA_LIB): New.
14284 (clean): Remove the IPA lib.
14285 (IPAGENT_CFLAGS): New.
14286 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14287 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14288 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14289 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14290 * configure.ac: Check for atomic builtins support in the compiler.
14291 (IPA_DEPFILES, extra_libraries): Define.
14292 * configure.srv (ipa_obj): Add description.
14293 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14294 (i[34567]86-*-linux*): Set ipa_obj.
14295 (x86_64-*-linux*): Set ipa_obj.
14296 * linux-low.c (stabilizing_threads): New.
14297 (supports_fast_tracepoints): New.
14298 (linux_detach): Stabilize threads before detaching.
14299 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14300 the lwp is either not stabilizing, or is moving out of a jump pad.
14301 (linux_fast_tracepoint_collecting): New.
14302 (maybe_move_out_of_jump_pad): New.
14303 (enqueue_one_deferred_signal): New.
14304 (dequeue_one_deferred_signal): New.
14305 (linux_wait_for_event_1): If moving out of a jump pad, defer
14306 pending signals to later.
14307 (linux_stabilize_threads): New.
14308 (linux_wait_1): Check if threads need moving out of jump pads, and
14309 do it if so.
14310 (stuck_in_jump_pad_callback): New.
14311 (move_out_of_jump_pad_callback): New.
14312 (lwp_running): New.
14313 (linux_resume_one_lwp): Handle moving out of jump pads.
14314 (linux_set_resume_request): Dequeue deferred signals.
14315 (need_step_over_p): Also step over fast tracepoint jumps.
14316 (start_step_over): Also uninsert fast tracepoint jumps.
14317 (finish_step_over): Also reinsert fast tracepoint jumps.
14318 (linux_install_fast_tracepoint_jump): New.
14319 (linux_target_ops): Install linux_stabilize_threads and
14320 linux_install_fast_tracepoint_jump_pad.
14321 * linux-low.h (linux_target_ops) <get_thread_area,
14322 install_fast_tracepoint_jump_pad>: New fields.
14323 (struct lwp_info) <collecting_fast_tracepoint,
14324 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14325 (linux_get_thread_area): Declare.
14326 * linux-x86-low.c (jump_insn): New.
14327 (x86_get_thread_area): New.
14328 (append_insns): New.
14329 (push_opcode): New.
14330 (amd64_install_fast_tracepoint_jump_pad): New.
14331 (i386_install_fast_tracepoint_jump_pad): New.
14332 (x86_install_fast_tracepoint_jump_pad): New.
14333 (the_low_target): Install x86_get_thread_area and
14334 x86_install_fast_tracepoint_jump_pad.
14335 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14336 (struct fast_tracepoint_jump): New.
14337 (fast_tracepoint_jump_insn): New.
14338 (fast_tracepoint_jump_shadow): New.
14339 (find_fast_tracepoint_jump_at): New.
14340 (fast_tracepoint_jump_here): New.
14341 (delete_fast_tracepoint_jump): New.
14342 (set_fast_tracepoint_jump): New.
14343 (uninsert_fast_tracepoint_jumps_at): New.
14344 (reinsert_fast_tracepoint_jumps_at): New.
14345 (set_breakpoint_at): Use write_inferior_memory.
14346 (uninsert_raw_breakpoint): Use write_inferior_memory.
14347 (check_mem_read): Mask out fast tracepoint jumps.
14348 (check_mem_write): Mask out fast tracepoint jumps.
14349 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14350 (set_fast_tracepoint_jump): Declare.
14351 (delete_fast_tracepoint_jump)
14352 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14353 (reinsert_fast_tracepoint_jumps_at): Declare.
14354 * regcache.c: Don't compile many functions when building the
14355 in-process agent library.
14356 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14357 the register buffer in the heap.
14358 (free_register_cache): If the register buffer isn't owned by the
14359 regcache, don't free it.
14360 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14361 pre-existing register caches.
14362 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14363 type.
14364 (convert_ascii_to_int): : Constify `from' parameter type.
14365 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14366 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14367 the needed buffer in-place.
14368 (relocate_instruction): New.
14369 * server.c (handle_query) <qSymbols>: If the target supports
14370 tracepoints, give it a chance of looking up symbols. Report
14371 support for fast tracepoints.
14372 (handle_status): Stabilize threads.
14373 (process_serial_event): Adjust.
14374 * server.h (struct fast_tracepoint_jump): Forward declare.
14375 (struct process_info) <fast_tracepoint_jumps>: New field.
14376 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14377 (decode_X_packet, decode_M_packet): Adjust.
14378 (relocate_instruction): Declare.
14379 (in_process_agent_loaded): Declare.
14380 (tracepoint_look_up_symbols): Declare.
14381 (struct fast_tpoint_collect_status): Declare.
14382 (fast_tracepoint_collecting): Declare.
14383 (force_unlock_trace_buffer): Declare.
14384 (handle_tracepoint_bkpts): Declare.
14385 (initialize_low_tracepoint)
14386 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14387 * target.h (struct target_ops) <stabilize_threads,
14388 install_fast_tracepoint_jump_pad>: New fields.
14389 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14390 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14391 [HAVE_STDINT_H]: Include stdint.h.
14392 (trace_debug_1): Rename to ...
14393 (trace_vdebug): ... this.
14394 (trace_debug): Rename to ...
14395 (trace_debug_1): ... this. Add `level' parameter.
14396 (trace_debug): New.
14397 (ATTR_USED, ATTR_NOINLINE): New.
14398 (IP_AGENT_EXPORT): New.
14399 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14400 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14401 (about_to_request_buffer_space, trace_buffer_is_full)
14402 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14403 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14404 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14405 (traceframe_write_count, traceframes_created)
14406 (trace_state_variables)
14407 New renaming defines.
14408 (struct ipa_sym_addresses): New.
14409 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14410 (symbol_list): New.
14411 (ipa_sym_addrs): New.
14412 (all_tracepoint_symbols_looked_up): New.
14413 (in_process_agent_loaded): New.
14414 (write_e_ipa_not_loaded): New.
14415 (maybe_write_ipa_not_loaded): New.
14416 (tracepoint_look_up_symbols): New.
14417 (debug_threads) [IN_PROCESS_AGENT]: New.
14418 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14419 (UNKNOWN_SIDE_EFFECTS): New.
14420 (stop_tracing): New.
14421 (flush_trace_buffer): New.
14422 (stop_tracing_bkpt): New.
14423 (flush_trace_buffer_bkpt): New.
14424 (read_inferior_integer): New.
14425 (read_inferior_uinteger): New.
14426 (read_inferior_data_pointer): New.
14427 (write_inferior_data_pointer): New.
14428 (write_inferior_integer): New.
14429 (write_inferior_uinteger): New.
14430 (struct collect_static_trace_data_action): Delete.
14431 (enum tracepoint_type): New.
14432 (struct tracepoint) <type>: New field `type'.
14433 <actions_str, step_actions, step_actions_str>: Only include in
14434 GDBserver.
14435 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14436 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14437 (tracepoints): Use IP_AGENT_EXPORT.
14438 (last_tracepoint): Don't include in the IPA.
14439 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14440 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14441 (alloced_trace_state_variables): New.
14442 (trace_state_variables): Use IP_AGENT_EXPORT.
14443 (traceframe_t): Delete unused variable.
14444 (circular_trace_buffer): Don't include in the IPA.
14445 (trace_buffer_start): Delete.
14446 (struct trace_buffer_control): New.
14447 (trace_buffer_free): Delete.
14448 (struct ipa_trace_buffer_control): New.
14449 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14450 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14451 New.
14452 (trace_buffer_ctrl): New.
14453 (TRACE_BUFFER_CTRL_CURR): New.
14454 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14455 Reimplement as macros.
14456 (trace_buffer_wrap): Delete.
14457 (traceframe_write_count, traceframe_read_count)
14458 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14459 (struct tracepoint_hit_ctx) <type>: New field.
14460 (struct fast_tracepoint_ctx): New.
14461 (memory_barrier): New.
14462 (cmpxchg): New.
14463 (record_tracepoint_error): Update atomically in the IPA.
14464 (clear_inferior_trace_buffer): New.
14465 (about_to_request_buffer_space): New.
14466 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14467 updating the same buffer.
14468 (add_tracepoint): Default the tracepoint's type to trap
14469 tracepoint, and orig_size to -1.
14470 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14471 internal variables.
14472 (create_trace_state_variable): New parameter `gdb'. Handle it.
14473 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14474 (cmd_qtdp): Handle fast tracepoints.
14475 (cmd_qtdv): Adjust.
14476 (max_jump_pad_size): New.
14477 (gdb_jump_pad_head): New.
14478 (get_jump_space_head): New.
14479 (claim_jump_space): New.
14480 (sort_tracepoints): New.
14481 (MAX_JUMP_SIZE): New.
14482 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14483 IPA.
14484 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14485 support. Upload fast traceframes, and delete internal IPA
14486 breakpoints.
14487 (stop_tracing_handler): New.
14488 (flush_trace_buffer_handler): New.
14489 (cmd_qtstop): Upload fast tracepoints.
14490 (response_tracepoint): Handle fast tracepoints.
14491 (tracepoint_finished_step): Upload fast traceframes. Set the
14492 tracepoint hit context's tracepoint type.
14493 (handle_tracepoint_bkpts): New.
14494 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14495 type. Add comment about fast tracepoints.
14496 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14497 non-existing action_str field.
14498 (get_context_regcache): Handle fast tracepoints.
14499 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14500 to the regcache.
14501 (fast_tracepoint_from_jump_pad_address): New.
14502 (fast_tracepoint_from_ipa_tpoint_address): New.
14503 (collecting_t): New.
14504 (force_unlock_trace_buffer): New.
14505 (fast_tracepoint_collecting): New.
14506 (collecting): New.
14507 (gdb_collect): New.
14508 (write_inferior_data_ptr): New.
14509 (target_tp_heap): New.
14510 (target_malloc): New.
14511 (download_agent_expr): New.
14512 (UALIGN): New.
14513 (download_tracepoints): New.
14514 (download_trace_state_variables): New.
14515 (upload_fast_traceframes): New.
14516 (IPA_FIRST_TRACEFRAME): New.
14517 (IPA_NEXT_TRACEFRAME_1): New.
14518 (IPA_NEXT_TRACEFRAME): New.
14519 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14520 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14521 (gdb_jump_pad_buffer_end): New.
14522 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14523 (initialize_tracepoint): Adjust.
14524 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14525 buffer. Initialize the low module.
14526 * utils.c (PREFIX, TOOLNAME): New.
14527 (malloc_failure): Use PREFIX.
14528 (error): In the IPA, an error causes an exit.
14529 (fatal, warning): Use PREFIX.
14530 (internal_error): Use TOOLNAME.
14531 (NUMCELLS): Increase to 10.
14532 * configure, config.in: Regenerate.
14533
14534 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14535
14536 * server.c (handle_query) <qSupported>: Do two passes over the
14537 qSupported string to avoid nesting strtok.
14538
14539 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14540
14541 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14542 (CDEPS): New.
14543 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14544 -Wl,--dynamic-list.
14545 * configure: Regenerate.
14546 * proc-service.list: New.
14547
14548 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14549
14550 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14551 New comment.
14552
14553 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14554
14555 * gdbreplay.c (remote_open): Check error return from socket() call by
14556 its equality to -1 not by it being negative.
14557 * remote-utils.c (remote_open): Likewise.
14558
14559 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14560
14561 * config.h: Regenerate.
14562
14563 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14564
14565 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14566 doesn't provide PTRACE_GET_THREAD_AREA.
14567
14568 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14569
14570 * linux-m68k-low.c: Include <asm/ptrace.h>
14571 (ps_get_thread_area): Implement.
14572
14573 2010-05-03 Doug Evans <dje@google.com>
14574
14575 * event-loop.c (struct callback_event): New struct.
14576 (callback_list): New global.
14577 (append_callback_event, delete_callback_event): New functions.
14578 (process_callback): New function.
14579 (start_event_loop): Call it.
14580 * remote-utils.c (NOT_SCHEDULED): Define.
14581 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14582 moved out of readchar.
14583 (readchar): Rewrite. Call reschedule before returning.
14584 (reset_readchar): New function.
14585 (remote_close): Call it.
14586 (process_remaining, reschedule): New functions.
14587 * server.h (callback_handler_func): New typedef.
14588 (append_callback_event, delete_callback_event): Declare.
14589
14590 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14591
14592 * proc-service.c (ps_pglobal_lookup): Use
14593 thread_db_look_up_one_symbol.
14594 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14595 parameter. Use it instead of all_symbols_looked_up.
14596 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14597 field.
14598 (all_symbols_looked_up): Don't declare.
14599 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14600 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14601 field.
14602 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14603 Set all_symbols_looked_up here.
14604 (thread_db_look_up_one_symbol): New.
14605 (thread_db_get_tls_address): Adjust.
14606 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14607 thread_db object on the heap, and tentatively set it in the
14608 process structure.
14609 (thread_db_init): Don't set all_symbols_looked_up here.
14610 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14611
14612 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14613
14614 * linux-low.c (linux_kill, linux_detach): Adjust.
14615 (status_pending_p_callback): Remove redundant statement. Check
14616 for !TARGET_WAITIKIND_IGNORE, instead of
14617 TARGET_WAITKIND_STOPPED.
14618 (handle_tracepoints): Make sure LWP is locked. Adjust.
14619 (linux_wait_for_event_1): Adjust.
14620 (linux_cancel_breakpoints): New.
14621 (unsuspend_one_lwp): New.
14622 (unsuspend_all_lwps): New.
14623 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14624 (send_sigstop_callback): Change return type to int, add new
14625 `except' parameter and handle it.
14626 (suspend_and_send_sigstop_callback): New.
14627 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14628 pass them down. If SUSPEND, also increment the lwp's suspend
14629 count.
14630 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14631 (need_step_over_p): Don't consider suspended LWPs.
14632 (start_step_over): Adjust.
14633 (proceed_one_lwp): Change return type to int, add new `except'
14634 parameter and handle it.
14635 (unsuspend_and_proceed_one_lwp): New.
14636 (proceed_all_lwps): Use find_inferior instead of
14637 for_each_inferior.
14638 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14639 also decrement the suspend count of LWPs. Pass `except' down,
14640 instead of hacking its suspend count.
14641 (linux_pause_all): Add `freeze' parameter. Adjust.
14642 (linux_unpause_all): New.
14643 (linux_target_ops): Install linux_unpause_all.
14644 * server.c (handle_status): Adjust.
14645 * target.h (struct target_ops): New fields `unpause_all' and
14646 `cancel_breakpoints'. Add new parameter to `pause_all'.
14647 (pause_all): Add new `freeze' parameter.
14648 (unpause_all): New.
14649 (cancel_breakpoints): New.
14650 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14651 cancel breakpoints.
14652 (cmd_qtstart): Pause threads.
14653 (stop_tracing): Pause threads, and cancel breakpoints.
14654 * win32-low.c (win32_target_ops): Adjust.
14655
14656 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14657
14658 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14659 the inferior right away from here...
14660 (linux_wait_1): ... to here, and adjust to check the thread's
14661 last_resume_kind instead of the lwp's step or stop_expected flags.
14662
14663 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14664
14665 * README: Use consistent `GDB' and `GDBserver' spellings.
14666
14667 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14668
14669 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14670 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14671 (linux_detach_one_lwp): Assume the lwp is stopped.
14672 (any_thread_of): Delete.
14673 (linux_detach): Stop all lwps here. Don't blindly delete all
14674 breakpoints.
14675 (delete_lwp_callback): New.
14676 (linux_mourn): Delete all lwps of the process that is gone.
14677 (linux_wait_1): Don't delete the last lwp of the process here.
14678 * mem-break.h (mark_breakpoints_out): Declare.
14679 * mem-break.c (mark_breakpoints_out): New.
14680 (free_all_breakpoints): Use it.
14681 * server.c (handle_target_event): If the process is gone, mark
14682 breakpoints out.
14683 * thread-db.c (struct thread_db) <create_bp>: New field.
14684 (thread_db_enable_reporting): Fix prototype. Store a thread event
14685 breakpoint reference in the thread_db struct.
14686 (thread_db_load_search): Clear the thread_db object.
14687 (try_thread_db_load_1): Ditto.
14688 (switch_to_process): New.
14689 (disable_thread_event_reporting): Use it.
14690 (remove_thread_event_breakpoints): New.
14691 (thread_db_detach, thread_db_mourn): Use it.
14692
14693 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14694
14695 * linux-low.c (linux_enable_event_reporting): New.
14696 (linux_wait_for_event_1, handle_extended_wait): Use it.
14697
14698 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14699
14700 * linux-low.c (linux_kill_one_lwp, linux_kill)
14701 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14702 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14703 SIGSTOP even if the LWP is stopped.
14704 (send_sigstop_callback): New.
14705 (stop_all_lwps): Use send_sigstop_callback instead.
14706 (linux_resume_one_thread): Adjust.
14707 (proceed_one_lwp): Still proceed an LWP that the client has
14708 requested to stop, if we haven't reported it as stopped yet. Make
14709 sure that LWPs the client want stopped, have a pending SIGSTOP.
14710
14711 2010-04-26 Doug Evans <dje@google.com>
14712
14713 * server.c (handle_general_set): Make static.
14714
14715 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14716 Print received char after testing for error/eof instead of before.
14717 (input_interrupt): Tweak comment.
14718
14719 2010-04-23 Doug Evans <dje@google.com>
14720
14721 * server.c (start_inferior): Print inferior argv if --debug.
14722
14723 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14724
14725 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14726 * nto-x86-low.c: Include server.h
14727
14728 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14729
14730 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14731 be consistent with other sources of this directory.
14732 (init_registers_amd64): Correct name of source file of this function
14733 in the comment.
14734
14735 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14736
14737 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14738 64-bit executables.
14739
14740 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14741
14742 * win32-i386-low.c: Add 64-bit support.
14743 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14744 (init_registers_amd64): Declare.
14745 (mappings): Add 64-bit version of array.
14746 (init_windows_x86): New function.
14747 (the_low_target): Change init_arch field to init_windows_x86.
14748
14749 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14750
14751 * win32-low.c: Adapt to support also 64-bit architecture.
14752 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14753 (get_image_name): Use SIZE_T type for local variable `done'.
14754 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14755 (toolhelp_get_dll_name): Idem.
14756 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14757 Use uintptr_t typecast to avoid warning.
14758 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14759 (handle_exception): Use phex_nz to avoid warning.
14760 (win32_wait): Remove unused local variable `process'.
14761
14762 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14763
14764 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14765 `amd64-avx.o'.
14766
14767 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14768
14769 * configure.ac: Use `ws2_32' library for srv_mingw.
14770 * configure: Regenerate.
14771 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14772 * remote-utils.c: Likewise.
14773
14774 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14775
14776 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14777 if __x86_64__ is defined.
14778
14779 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14780
14781 * configure: Regenerate.
14782
14783 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14784
14785 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14786 * target.h (target_ops): New get_tib_address field.
14787 * win32-low.h (win32_thread_info): Add thread_local_base field.
14788 * win32-low.c (child_add_thread): Add tlb argument.
14789 Set thread_local_base field to TLB.
14790 (get_child_debug_event): Adapt to child_add_thread change.
14791 (win32_get_tib_address): New function.
14792 (win32_target_ops): Set get_tib_address field to
14793 win32_get_tib_address.
14794 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14795
14796 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14797
14798 * linux-low.c (linux_mourn): Also remove the process.
14799 * server.c (handle_target_event): Don't remove the process here.
14800 * nto-low.c (nto_mourn): New.
14801 (nto_target_ops): Install it.
14802 * spu-low.c (spu_mourn): New.
14803 (spu_target_ops): Install it.
14804 * win32-low.c (win32_mourn): New.
14805 (win32_target_ops): Install it.
14806
14807 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14808
14809 * server.h (buffer_xml_printf): Remove redundant `;'.
14810
14811 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14812
14813 * regcache.c (set_register_cache): Invalidate regcaches before
14814 changing the register cache layout.
14815 (regcache_invalidate_one): Allow a NULL regcache.
14816 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14817 regcaches before changing the register cache layout or the target
14818 regsets.
14819
14820 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14821
14822 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14823 variable warning on Linux/x86-64.
14824
14825 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14826
14827 GDBserver disconnected tracing support.
14828
14829 * linux-low.c (linux_remove_process): Delete.
14830 (add_lwp): Don't set last_resume_kind here.
14831 (linux_kill): Use `mourn'.
14832 (linux_detach): Use `thread_db_detach', and `mourn'.
14833 (linux_mourn): New.
14834 (linux_attach_lwp_1): Adjust comment.
14835 (linux_attach): last_resume_kind moved the thread_info; adjust.
14836 (status_pending_p_callback): Adjust.
14837 (linux_wait_for_event_1): Adjust.
14838 (count_events_callback, select_singlestep_lwp_callback)
14839 (select_event_lwp_callback, cancel_breakpoints_callback)
14840 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14841 (proceed_one_lwp): Adjust.
14842 (linux_async): Add debug output.
14843 (linux_thread_stopped): New.
14844 (linux_pause_all): New.
14845 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14846 linux_pause_all.
14847 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14848 (thread_db_free): Delete declaration.
14849 (thread_db_detach, thread_db_mourn): Declare.
14850 * thread-db.c (thread_db_init): Use thread_db_mourn.
14851 (thread_db_free): Delete, split in two.
14852 (disable_thread_event_reporting): New.
14853 (thread_db_detach): New.
14854 (thread_db_mourn): New.
14855
14856 * server.h (struct thread_info) <last_resume_kind>: New field.
14857 <attached>: Add comment.
14858 <gdb_detached>: New field.
14859 (handler_func): Change return type to int.
14860 (handle_serial_event, handle_target_event): Ditto.
14861 (gdb_connected): Declare.
14862 (tracing): Delete.
14863 (disconnected_tracing): Declare.
14864 (stop_tracing): Declare.
14865
14866 * server.c (handle_query) <qSupported>: Report support for
14867 disconnected tracing.
14868 (queue_stop_reply_callback): Account for running threads.
14869 (gdb_wants_thread_stopped): New.
14870 (gdb_wants_all_threads_stopped): New.
14871 (gdb_reattached_process): New.
14872 (handle_status): Clear the `gdb_detached' flag of all processes.
14873 In all-stop, stop all threads.
14874 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14875 (process_serial_event): If the remote connection breaks, or if an
14876 exit was forced with "monitor exit", force an event loop exit.
14877 Handle disconnected tracing on detach.
14878 (handle_serial_event): Adjust.
14879 (handle_target_event): If GDB isn't connected, forward events back
14880 to the inferior, unless the last process exited, in which case,
14881 exit gdbserver. Adjust interface.
14882
14883 * remote-utils.c (remote_open): Don't block in accept. Instead
14884 register an event loop source on the listen socket file
14885 descriptor. Refactor bits into ...
14886 (listen_desc): ... this new global.
14887 (gdb_connected): ... this new function.
14888 (enable_async_notification): ... this new function.
14889 (handle_accept_event): ... this new function.
14890 (remote_close): Clear remote_desc.
14891
14892 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
14893
14894 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
14895 New fields.
14896 (mourn_inferior): Define.
14897 (target_process_qsupported): Avoid the dangling else problem.
14898 (thread_stopped): Define.
14899 (pause_all): Define.
14900 (target_waitstatus_to_string): Declare.
14901 * target.c (target_waitstatus_to_string): New.
14902
14903 * tracepoint.c (tracing): Make extern.
14904 (disconnected_tracing): New.
14905 (stop_tracing): Make extern. Handle tracing stops due to GDB
14906 disconnecting.
14907 (cmd_qtdisconnected): New.
14908 (cmd_qtstatus): Report disconnected tracing status in trace reply.
14909 (handle_tracepoint_general_set): Handle QTDisconnected.
14910
14911 * event-loop.c (event_handler_func): Change return type to int.
14912 (process_event): Bail out if the event handler wants the event
14913 loop to stop.
14914 (handle_file_event): Ditto.
14915 (start_event_loop): Bail out if the event handler wants the event
14916 loop to stop.
14917
14918 * nto-low.c (nto_target_ops): Adjust.
14919 * spu-low.c (spu_wait): Don't remove the process here.
14920 (spu_target_ops): Adjust.
14921 * win32-low.c (win32_wait): Don't remove the process here.
14922 (win32_target_ops): Adjust.
14923
14924 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14925
14926 * regcache.c (realloc_register_cache): Invalidate inferior's
14927 regcache before recreating it.
14928
14929 2010-04-09 Pedro Alves <pedro@codesourcery.com>
14930
14931 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
14932
14933 2010-04-09 Stan Shebs <stan@codesourcery.com>
14934 Pedro Alves <pedro@codesourcery.com>
14935
14936 * server.h (LONGEST): New.
14937 (struct thread_info) <while_stepping>: New field.
14938 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
14939 Declare.
14940 (initialize_tracepoint, handle_tracepoint_general_set)
14941 (handle_tracepoint_query, tracepoint_finished_step)
14942 (tracepoint_was_hit, release_while_stepping_state_list):
14943 (current_traceframe): Declare.
14944 * server.c (handle_general_set): Handle tracepoint packets.
14945 (read_memory): New.
14946 (write_memory): New.
14947 (handle_search_memory_1): Use read_memory.
14948 (handle_query): Report support for conditional tracepoints, trace
14949 state variables, and tracepoint sources. Handle tracepoint
14950 queries.
14951 (main): Initialize the tracepoints module.
14952 (process_serial_event): Handle traceframe reads/writes.
14953
14954 * linux-low.c (handle_tracepoints): New.
14955 (linux_wait_1): Call it.
14956 (linux_resume_one_lwp): Handle while-stepping.
14957 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
14958 (linux_target_ops): Install them.
14959 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
14960 New field.
14961 * linux-x86-low.c (x86_supports_tracepoints): New.
14962 (the_low_target). Install it.
14963
14964 * mem-break.h (delete_breakpoint): Declare.
14965 * mem-break.c (delete_breakpoint): Make external.
14966
14967 * target.h (struct target_ops): Add `supports_tracepoints',
14968 `read_pc', and `write_pc' fields.
14969 (target_supports_tracepoints): Define.
14970 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
14971 (phex_nz): New.
14972
14973 * regcache.h (struct regcache) <registers_owned>: New field.
14974 (init_register_cache, regcache_cpy): Declare.
14975 (regcache_read_pc, regcache_write_pc): Declare.
14976 (register_cache_size): Declare.
14977 (supply_regblock): Declare.
14978 * regcache.c (init_register_cache): New.
14979 (new_register_cache): Use it.
14980 (regcache_cpy): New.
14981 (register_cache_size): New.
14982 (supply_regblock): New.
14983 (regcache_read_pc, regcache_write_pc): New.
14984
14985 * tracepoint.c: New.
14986
14987 * Makefile.in (OBS): Add tracepoint.o.
14988 (tracepoint.o): New rule.
14989
14990 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
14991
14992 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
14993 (i386-mmx.o): New.
14994 (i386-mmx.c): Likewise.
14995 (i386-mmx-linux.o): Likewise.
14996 (i386-mmx-linux.c): Likewise.
14997
14998 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
14999 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15000 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15001 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15002
15003 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15004 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15005 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15006
15007 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15008
15009 * Makefile.in (clean): Updated.
15010 (i386-avx.o): New.
15011 (i386-avx.c): Likewise.
15012 (i386-avx-linux.o): Likewise.
15013 (i386-avx-linux.c): Likewise.
15014 (amd64-avx.o): Likewise.
15015 (amd64-avx.c): Likewise.
15016 (amd64-avx-linux.o): Likewise.
15017 (amd64-avx-linux.c): Likewise.
15018
15019 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15020 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15021 (srv_amd64_regobj): Add amd64-avx.o.
15022 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15023 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15024 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15025 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15026 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15027 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15028 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15029
15030 * i387-fp.c: Include "i386-xstate.h".
15031 (i387_xsave): New.
15032 (i387_cache_to_xsave): Likewise.
15033 (i387_xsave_to_cache): Likewise.
15034 (x86_xcr0): Likewise.
15035
15036 * i387-fp.h (i387_cache_to_xsave): Likewise.
15037 (i387_xsave_to_cache): Likewise.
15038 (x86_xcr0): Likewise.
15039
15040 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15041 * linux-crisv32-low.c (target_regsets): Likewise.
15042 * linux-m68k-low.c (target_regsets): Likewise.
15043 * linux-mips-low.c (target_regsets): Likewise.
15044 * linux-ppc-low.c (target_regsets): Likewise.
15045 * linux-s390-low.c (target_regsets): Likewise.
15046 * linux-sh-low.c (target_regsets): Likewise.
15047 * linux-sparc-low.c (target_regsets): Likewise.
15048 * linux-xtensa-low.c (target_regsets): Likewise.
15049
15050 * linux-low.c: Include <sys/uio.h>.
15051 (regsets_fetch_inferior_registers): Support nt_type.
15052 (regsets_store_inferior_registers): Likewise.
15053 (linux_process_qsupported): New.
15054 (linux_target_ops): Add linux_process_qsupported.
15055
15056 * linux-low.h (regset_info): Add nt_type.
15057 (linux_target_ops): Add process_qsupported.
15058
15059 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15060 and <sys/uio.h>.
15061 (init_registers_i386_avx_linux): New.
15062 (init_registers_amd64_avx_linux): Likewise.
15063 (xmltarget_i386_linux_no_xml): Likewise.
15064 (xmltarget_amd64_linux_no_xml): Likewise.
15065 (PTRACE_GETREGSET): Likewise.
15066 (PTRACE_SETREGSET): Likewise.
15067 (x86_fill_xstateregset): Likewise.
15068 (x86_store_xstateregset): Likewise.
15069 (use_xml): Likewise.
15070 (x86_linux_update_xmltarget): Likewise.
15071 (x86_linux_process_qsupported): Likewise.
15072 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15073 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15074 init_registers_i386_linux here. Call
15075 x86_linux_update_xmltarget.
15076 (the_low_target): Add x86_linux_process_qsupported.
15077
15078 * server.c (handle_query): Call target_process_qsupported.
15079
15080 * target.h (target_ops): Add process_qsupported.
15081 (target_process_qsupported): New.
15082
15083 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15084
15085 * inferiors.c (add_thread): Set last_status kind to
15086 TARGET_WAITKIND_IGNORE.
15087 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15088 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15089 (linux_wait_1): Move `thread' local definition to block that uses
15090 it. Don't NULL initialize `event_child'.
15091 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15092 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15093 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15094
15095 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15096
15097 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15098 an extended waitstatus, or by a watchpoint.
15099 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15100 thread was stepping or has been stopped by a watchpoint.
15101
15102 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15103
15104 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15105 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15106 of another, then delete the previous, and validate all
15107 breakpoints.
15108 (validate_inserted_breakpoint): New.
15109 (delete_disabled_breakpoints): New.
15110 (validate_breakpoints): New.
15111 (check_mem_read): Validate breakpoints before trusting their
15112 shadow. Delete disabled breakpoints.
15113 (check_mem_write): Validate breakpoints before trusting they
15114 should be inserted. Delete disabled breakpoints.
15115 * mem-break.h (validate_breakpoints):
15116 * server.c (handle_query): Validate breakpoints when we see a
15117 qSymbol query.
15118
15119 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15120
15121 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15122 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15123 if we could tell there's a GDB breakpoint at stop_pc.
15124 (need_step_over_p): Don't do a step over if we find a GDB
15125 breakpoint at the resume PC.
15126
15127 * mem-break.c (struct raw_breakpoint): New.
15128 (enum bkpt_type): New type `gdb_breakpoint'.
15129 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15130 fields. New field `raw'.
15131 (find_raw_breakpoint_at): New.
15132 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15133 breakpoint instead.
15134 (set_breakpoint_at): Adjust.
15135 (delete_raw_breakpoint): New.
15136 (release_breakpoint): New.
15137 (delete_breakpoint): Rename to...
15138 (delete_breakpoint_1): ... this. Add proc parameter. Use
15139 release_breakpoint. Return ENOENT.
15140 (delete_breakpoint): Reimplement.
15141 (find_breakpoint_at): Delete.
15142 (find_gdb_breakpoint_at): New.
15143 (delete_breakpoint_at): Delete.
15144 (set_gdb_breakpoint_at): New.
15145 (delete_gdb_breakpoint_at): New.
15146 (gdb_breakpoint_here): New.
15147 (set_reinsert_breakpoint): Use release_breakpoint.
15148 (uninsert_breakpoint): Rename to ...
15149 (uninsert_raw_breakpoint): ... this.
15150 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15151 (reinsert_raw_breakpoint): Change parameter type to
15152 raw_breakpoint.
15153 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15154 instead.
15155 (check_breakpoints): Adjust. Use release_breakpoint.
15156 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15157 (breakpoint_inserted_here): Ditto.
15158 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15159 Don't trust the breakpoint's shadow if it is not inserted.
15160 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15161 (delete_all_breakpoints): Adjust.
15162 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15163 use delete_breakpoint_1.
15164
15165 * mem-break.h (breakpoints_supported): Delete declaration.
15166 (set_gdb_breakpoint_at): Declare.
15167 (gdb_breakpoint_here): Declare.
15168 (delete_breakpoint_at): Delete.
15169 (delete_gdb_breakpoint_at): Declare.
15170
15171 * server.h (struct raw_breakpoint): Forward declare.
15172 (struct process_info): New field `raw_breakpoints'.
15173
15174 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15175 breakpoints.
15176
15177 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15178
15179 * linux-low.c (status_pending_p_callback): Fix comment.
15180 (linux_wait_for_event_1): Move most of the internal breakpoint
15181 handling from here...
15182 (linux_wait_1): ... to here.
15183 (count_events_callback): New.
15184 (select_singlestep_lwp_callback): New.
15185 (select_event_lwp_callback): New.
15186 (cancel_breakpoints_callback): New.
15187 (select_event_lwp): New.
15188 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15189 priority to all LWPs that have had events that should be reported
15190 to the client. Cancel breakpoints when about to reporting the
15191 event to the client, not while stopping lwps. No longer cancel
15192 finished single-steps here.
15193 (cancel_finished_single_step): Delete.
15194 (cancel_finished_single_steps): Delete.
15195
15196 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15197
15198 * mem-break.c (enum bkpt_type): New.
15199 (struct breakpoint): New field `type'.
15200 (set_breakpoint_at): Change return type to struct breakpoint
15201 pointer. Set type to `other_breakpoint' by default.
15202 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15203 in the breakpoint list.
15204 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15205 (reinsert_breakpoint): Rename to ...
15206 (reinsert_raw_breakpoint): ... this.
15207 (reinsert_breakpoints_at): Adjust.
15208 * mem-break.h (struct breakpoint): Declare.
15209 (set_breakpoint_at): Change return type to struct breakpoint
15210 pointer.
15211
15212 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15213
15214 * server.c (handle_query): Assign, not compare.
15215
15216 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15217
15218 Teach linux gdbserver to step-over-breakpoints.
15219
15220 * linux-low.c (can_hardware_single_step): New.
15221 (supports_breakpoints): New.
15222 (handle_extended_wait): If stopping threads, read the stop pc of
15223 the new cloned LWP.
15224 (get_pc): New.
15225 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15226 low target doesn't support retrieving the PC.
15227 (add_lwp): Set last_resume_kind to resume_continue.
15228 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15229 (linux_attach): Don't clear stop_expected. Set the lwp's
15230 last_resume_kind to resume_stop.
15231 (linux_detach_one_lwp): Don't check for removed breakpoints.
15232 (check_removed_breakpoint): Delete.
15233 (status_pending_p): Rename to ...
15234 (status_pending_p_callback): ... this. Don't check for removed
15235 breakpoints. Don't consider threads that are stopped from GDB's
15236 perspective.
15237 (linux_wait_for_lwp): Always read the stop_pc here.
15238 (cancel_breakpoint): New.
15239 (step_over_bkpt): New global.
15240 (linux_wait_for_event_1): Implement stepping over breakpoints.
15241 (gdb_wants_lwp_stopped): New.
15242 (gdb_wants_all_stopped): New.
15243 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15244 single-step traps here. Store the thread's last reported target
15245 wait status.
15246 (send_sigstop): Don't clear stop_expected. Always set it,
15247 instead.
15248 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15249 (cancel_finished_single_step): New.
15250 (cancel_finished_single_steps): New.
15251 (wait_for_sigstop): Don't cancel finished single-step traps here.
15252 (linux_resume_one_lwp): Don't check for removed breakpoints.
15253 Don't set `step' on non-hardware step archs.
15254 (linux_set_resume_request): Ignore resume_stop requests if already
15255 stopping or stopped. Set the lwp's last_resume_kind.
15256 (resume_status_pending_p): Don't check for removed breakpoints.
15257 (need_step_over_p): New.
15258 (start_step_over): New.
15259 (finish_step_over): New.
15260 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15261 requests. Clear the thread's last reported target waitstatus.
15262 Don't use the `suspended' flag. Don't consider pending breakpoints.
15263 (linux_resume): Start a step-over if necessary.
15264 (proceed_one_lwp): New.
15265 (proceed_all_lwps): New.
15266 (unstop_all_lwps): New.
15267 * linux-low.h (struct lwp_info): Rewrite comment for the
15268 `suspended' flag. Add the `stop_pc' field. Delete the
15269 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15270 Add `'last_resume_kind' and `need_step_over' fields.
15271 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15272 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15273 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15274 (set_raw_breakpoint_at): New.
15275 (set_breakpoint_at): Rewrite to use it.
15276 (reinsert_breakpoint_handler): Delete.
15277 (set_reinsert_breakpoint): New.
15278 (reinsert_breakpoint_by_bp): Delete.
15279 (delete_reinsert_breakpoints): New.
15280 (uninsert_breakpoint): Rewrite.
15281 (uninsert_breakpoints_at): New.
15282 (reinsert_breakpoint): Rewrite.
15283 (reinsert_breakpoints_at): New.
15284 (check_breakpoints): Rewrite.
15285 (breakpoint_here): New.
15286 (breakpoint_inserted_here): New.
15287 (check_mem_read): Adjust.
15288 * mem-break.h (breakpoints_supported, breakpoint_here)
15289 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15290 (reinsert_breakpoint_by_bp): Delete declaration.
15291 (delete_reinsert_breakpoints): Declare.
15292 (reinsert_breakpoint): Delete declaration.
15293 (reinsert_breakpoints_at): Declare.
15294 (uninsert_breakpoint): Delete declaration.
15295 (uninsert_breakpoints_at): Declare.
15296 (check_breakpoints): Adjust prototype.
15297 * server.h: Adjust include order.
15298 (struct thread_info): Declare here. Add a `last_status' field.
15299
15300 2010-03-23 Michael Snyder <msnyder@vmware.com>
15301
15302 * server.c (crc32): New function.
15303 (handle_query): Add handling for 'qCRC:' request.
15304
15305 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15306
15307 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15308 lwp had been stopped by a watchpoint.
15309
15310 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15311
15312 * server.h (internal_error): Declare.
15313 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15314 * utils.c (internal_error): New function.
15315
15316 2010-03-15 Andreas Schwab <schwab@redhat.com>
15317
15318 * configure.srv: Fix typo setting srv_regobj.
15319
15320 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15321
15322 * linux-low.c (fetch_register): Avoid passing a non string literal
15323 format to `error'.
15324 (usr_store_inferior_registers): Ditto.
15325
15326 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15327
15328 * linux-low.c (linux_write_memory): Bail out early if peeking
15329 memory failed.
15330
15331 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15332
15333 * linux-low.h (struct lwp_info): New fields
15334 `stopped_by_watchpoint' and `stopped_data_address'.
15335 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15336 here, and cache them in the lwp object.
15337 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15338 directly.
15339 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15340 field.
15341 (linux_stopped_by_watchpoint): Rewrite.
15342 (linux_stopped_data_address): Rewrite.
15343
15344 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15345
15346 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15347 switching the current inferior, not before.
15348
15349 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15350
15351 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15352 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15353 i386-linux.c and amd64-linux.c.
15354 (reg-i386.o): Removed.
15355 (reg-i386.c): Likewise.
15356 (reg-i386-linux.o): Likewise.
15357 (reg-i386-linux.c): Likewise.
15358 (reg-x86-64.o): Likewise.
15359 (reg-x86-64.c): Likewise.
15360 (reg-x86-64-linux.o): Likewise.
15361 (reg-x86-64-linux.c): Likewise.
15362 (i386.o): New.
15363 (i386.c): Likewise.
15364 (i386-linux.o): Likewise.
15365 (i386-linux.c): Likewise.
15366 (amd64.o): Likewise.
15367 (amd64.c): Likewise.
15368 (amd64-linux.o): Likewise.
15369 (amd64-linux.c): Likewise.
15370
15371 * configure.srv (srv_i386_regobj): New.
15372 (srv_i386_linux_regobj): Likewise.
15373 (srv_amd64_regobj): Likewise.
15374 (srv_amd64_linux_regobj): Likewise.
15375 (srv_i386_32bit_xmlfiles): Likewise.
15376 (srv_i386_64bit_xmlfiles): Likewise.
15377 (srv_i386_xmlfiles): Likewise.
15378 (srv_amd64_xmlfiles): Likewise.
15379 (srv_i386_linux_xmlfiles): Likewise.
15380 (srv_amd64_linux_xmlfiles): Likewise.
15381 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15382 srv_xmlfiles to $srv_i386_xmlfiles.
15383 (i[34567]86-*-mingw32ce*): Likewise.
15384 (i[34567]86-*-mingw*): Likewise.
15385 (i[34567]86-*-nto*): Likewise.
15386 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15387 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15388 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15389 (x86_64-*-linux*): Likewise.
15390
15391 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15392 (init_registers_amd64_linux): New.
15393 (x86_arch_setup): Replace init_registers_x86_64_linux with
15394 init_registers_amd64_linux.
15395
15396 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15397
15398 * configure.ac: Check for libdl. If it is not available link against
15399 static libthread_db.
15400 * configure: Regenerate.
15401
15402 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15403
15404 PR9605
15405
15406 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15407 handing a read watchpoint.
15408 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15409
15410 2010-02-12 Doug Evans <dje@google.com>
15411
15412 * linux-low.c (linux_supports_tracefork_flag): Document.
15413 (linux_look_up_symbols): Add comment.
15414
15415 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15416
15417 * regcache.c (supply_register): Clear regcache if buf is NULL.
15418
15419 2010-02-02 Nicolas Roche <roche@sourceware.org>
15420 Joel Brobecker <brobecker@adacore.com>
15421
15422 * inferiors.c (find_inferior): Add function documentation.
15423 (unloaded_dll): Handle the case where the unloaded dll has not
15424 been previously registered in the dll list.
15425
15426 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15427
15428 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15429 (thumb2_breakpoint): New.
15430 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15431
15432 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15433
15434 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15435 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15436 breakpoints.
15437
15438 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15439
15440 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15441
15442 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15443
15444 * linux-s390-low.c (s390_collect_ptrace_register)
15445 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15446
15447 2010-01-21 Doug Evans <dje@google.com>
15448
15449 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15450 (PTRACE_ARG4_TYPE): New macro.
15451 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15452 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15453 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15454 (usr_store_inferior_registers): Ditto.
15455 (linux_read_memory, linux_write_memory): Ditto.
15456 (linux_test_for_tracefork): Ditto.
15457
15458 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15459 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15460
15461 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15462
15463 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15464 target.
15465
15466 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15467
15468 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15469 prototype to take a regcache. Adjust.
15470
15471 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15472
15473 * regcache.h (struct thread_info): Forward declare.
15474 (struct regcache): New.
15475 (new_register_cache): Adjust prototype.
15476 (get_thread_regcache): Declare.
15477 (free_register_cache): Adjust prototype.
15478 (registers_to_string, registers_from_string): Ditto.
15479 (supply_register, supply_register_by_name, collect_register)
15480 (collect_register_as_string, collect_register_by_name): Ditto.
15481 * regcache.c (struct inferior_regcache_data): Delete.
15482 (get_regcache): Rename to ...
15483 (get_thread_regcache): ... this. Adjust. Switch inferior before
15484 fetching registers.
15485 (regcache_invalidate_one): Adjust.
15486 (regcache_invalidate): Fix prototype.
15487 (new_register_cache): Return the new register cache.
15488 (free_register_cache): Change prototype.
15489 (realloc_register_cache): Adjust.
15490 (registers_to_string): Change prototype to take a regcache. Adjust.
15491 (registers_from_string): Ditto.
15492 (register_data): Ditto.
15493 (supply_register): Ditto.
15494 (supply_register_by_name): Ditto.
15495 (collect_register): Ditto.
15496 (collect_register_as_string): Ditto.
15497 (collect_register_by_name): Ditto.
15498 * server.c (process_serial_event): Adjust.
15499 * linux-low.h (regset_fill_func, regset_store_func): Change
15500 prototype.
15501 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15502 Change prototype.
15503 * linux-low.c (get_stop_pc): Adjust.
15504 (check_removed_breakpoint): Adjust.
15505 (linux_wait_for_event): Adjust.
15506 (linux_resume_one_lwp): Adjust.
15507 (fetch_register): Add regcache parameter. Adjust.
15508 (usr_store_inferior_registers): Ditto.
15509 (regsets_fetch_inferior_registers): Ditto.
15510 (regsets_store_inferior_registers): Ditto.
15511 (linux_fetch_registers, linux_store_registers): Ditto.
15512 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15513 regcache. Adjust.
15514 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15515 Ditto.
15516 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15517 prototype to take a regcache.
15518 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15519 * remote-utils.c (convert_ascii_to_int, outreg)
15520 (prepare_resume_reply): Change prototype to take a regcache.
15521 Adjust.
15522 * target.h (struct target_ops) <fetch_registers, store_registers>:
15523 Change prototype to take a regcache.
15524 (fetch_inferior_registers, store_inferior_registers): Change
15525 prototype to take a regcache. Adjust.
15526 * proc-service.c (ps_lgetregs): Adjust.
15527 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15528 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15529 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15530 take a regcache. Adjust.
15531 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15532 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15533 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15534 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15535 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15536 (cris_cannot_fetch_register):
15537 (cris_breakpoint_at): Change prototype to take a regcache.
15538 Adjust.
15539 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15540 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15541 to take a regcache. Adjust.
15542 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15543 Adjust.
15544 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15545 take a regcache. Adjust.
15546 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15547 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15548 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15549 * linux-mips-low.c (mips_get_pc):
15550 (mips_set_pc): Change prototype to take a regcache. Adjust.
15551 (mips_reinsert_addr): Adjust.
15552 (mips_collect_register): Change prototype to take a regcache.
15553 Adjust.
15554 (mips_supply_register):
15555 (mips_collect_register_32bit, mips_supply_register_32bit)
15556 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15557 (mips_store_fpregset): Ditto.
15558 * linux-ppc-low.c (ppc_supply_ptrace_register)
15559 (ppc_supply_ptrace_register): Ditto.
15560 (parse_spufs_run): Adjust.
15561 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15562 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15563 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15564 take a regcache. Adjust.
15565 * linux-s390-low.c (s390_collect_ptrace_register)
15566 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15567 (s390_set_pc): Change prototype to take a regcache. Adjust.
15568 (s390_arch_setup): Adjust.
15569 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15570 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15571 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15572 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15573 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15574 regcache. Adjust.
15575 (sparc_breakpoint_at): Adjust.
15576 * linux-xtensa-low.c (xtensa_fill_gregset):
15577 (xtensa_store_gregset):
15578 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15579 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15580 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15581 prototype to take a regcache. Adjust.
15582 * win32-arm-low.c (arm_fetch_inferior_register)
15583 (arm_store_inferior_register): Change prototype to take a
15584 regcache. Adjust.
15585 * win32-i386-low.c (i386_fetch_inferior_register)
15586 (i386_store_inferior_register): Change prototype to take a
15587 regcache. Adjust.
15588 * win32-low.c (child_fetch_inferior_registers)
15589 (child_store_inferior_registers): Change prototype to take a
15590 regcache. Adjust.
15591 (win32_wait): Adjust.
15592 (win32_fetch_inferior_registers): Change prototype to take a
15593 regcache. Adjust.
15594 (win32_store_inferior_registers): Adjust.
15595 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15596 store_inferior_register>: Change prototype to take a regcache.
15597
15598 2010-01-20 Doug Evans <dje@google.com>
15599
15600 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15601 #ifdef.
15602 (linux_wait_for_event1, linux_init_signals): Ditto.
15603 (W_STOPCODE): Provide definition if missing.
15604
15605 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15606
15607 * linux-low.c (linux_core_of_thread): New.
15608 (compare_ints, show_process, list_threads): New.
15609 (linux_qxfer_osdata): Report threads and cores.
15610 (linux_target_op): Register linux_core_of_thread.
15611 * remote-utils.c (prepare_resume_reply): Report the core.
15612 (buffer_xml_printf): Support %d specifier.
15613 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15614 New.
15615 (handle_query): Handle qXfer:threads. Announce availability
15616 thereof.
15617 * target.h (struct target_ops): New field core_of_thread.
15618
15619 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15620
15621 * Makefile.in (clean): Remove new generated files.
15622 (reg-s390.o, reg-s390.c): Remove rules.
15623 (reg-s390x.o, reg-s390x.c): Likewise.
15624 (s390-linux32.o, s390-linux32.c): Add rules.
15625 (s390-linux64.o, s390-linux64.c): Likewise.
15626 (s390x-linux64.o, s390x-linux64.c): Likewise.
15627 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15628 * linux-s390-low.c: Include <elf.h>.
15629 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15630 (init_registers_s390): Remove prototype.
15631 (init_registers_s390x): Likewise.
15632 (init_registers_s390_linux32): Add prototype.
15633 (init_registers_s390_linux64): Likewise.
15634 (init_registers_s390x_linux64): Likewise.
15635 (s390_num_regs_3264): New define.
15636 (s390_regmap_3264): New global variable.
15637 (s390_cannot_fetch_register): Remove obsolete check.
15638 (s390_cannot_store_register): Likewise.
15639 (s390_collect_ptrace_register): Handle upper/lower register halves.
15640 (s390_supply_ptrace_register): Likewise.
15641 (s390_fill_gregset): Update to register number changes.
15642 (s390_get_hwcap): New routine.
15643 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15644 Install appropriate regmap and register set.
15645
15646 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15647
15648 * server.c (gdbserver_version): Update copyright year to 2010.
15649 * gdbreplay.c (gdbreplay_version): Likewise.
15650
15651 2009-12-28 Doug Evans <dje@google.com>
15652
15653 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15654 elf/external.h. Include <elf.h> instead but only if necessary.
15655
15656 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15657
15658 * linux-low.c (linux_remove_process): Remove `detaching'
15659 parameter. Don't release/detach from thread_db here.
15660 (linux_kill): Release/detach from thread_db here, ...
15661 (linux_detach): ... and here, before actually detaching.
15662 (linux_wait_1): ... and here, when a process exits.
15663 * thread-db.c (any_thread_of): New.
15664 (thread_db_free): Switch the current inferior to a thread of the
15665 passed in process.
15666
15667 2009-12-21 Doug Evans <dje@google.com>
15668
15669 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15670
15671 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15672 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15673 warning ifndef __NR_tkill. Move setting of errno there too.
15674 Delete unnecessary resetting of errno after syscall.
15675 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15676
15677 * configure.ac: Check for dladdr.
15678 * config.in: Regenerate.
15679 * configure: Regenerate.
15680 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15681 (try_thread_db_load): Update.
15682
15683 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15684
15685 2009-12-18 Doug Evans <dje@google.com>
15686
15687 * event-loop.c: Include unistd.h if it exists.
15688
15689 * linux-low.c (my_waitpid): Move definition away from being in
15690 between linux_tracefork_child/linux_test_for_tracefork.
15691
15692 * gdb_proc_service.h (psaddr_t): Fix type.
15693 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15694 signature to match glibc.
15695
15696 2009-12-16 Doug Evans <dje@google.com>
15697
15698 * linux-low.c (linux_read_memory): Fix argument to read.
15699
15700 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15701
15702 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15703 events, don't leave current_inferior pointing at null.
15704
15705 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15706
15707 * win32-low.c (LOG): Delete.
15708 (OUTMSG): Output to stderr.
15709 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15710 on compile time LOG macro.
15711 (win32_wait): Fix debug output.
15712
15713 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15714
15715 * win32-low.c (win32_add_one_solib): If the dll name is
15716 "ntdll.dll", prepend the system directory to the dll path.
15717
15718 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15719
15720 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15721
15722 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15723 Vladimir Prus <vladimir@codesourcery.com>
15724
15725 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15726 * configure.ac: Check for __mcoldfire__ and set
15727 gdb_cv_m68k_is_coldfire.
15728 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15729 reg-cf.o and reg-m68k.o.
15730 * configure: Regenerated.
15731
15732 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15733
15734 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15735 Pass it to thread_db_free.
15736 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15737 proper `detaching' argument to linux_remove_process.
15738 * linux-low.h (thread_db_free): Add `detaching' parameter.
15739 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15740 to thread_db_free.
15741 (thread_db_free): Add `detaching' parameter. Only
15742 call td_ta_clear_event if detaching from process.
15743
15744 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15745
15746 * thread-db.c (thread_db_free): Fix typo.
15747
15748 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15749
15750 PR gdb/10838
15751 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15752
15753 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15754
15755 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15756 with an i686 compiler.
15757 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15758 needed.
15759 * configure: Rebuilt.
15760
15761 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15762
15763 PR gdb/10783
15764
15765 * server.c (handle_search_memory_1): Correct read_addr initialization
15766 in loop for searching subsequent chunks.
15767
15768 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15769
15770 * configure.ac: New --with-libthread-db option.
15771 * thread-db.c: Allow direct dependence on libthread_db.
15772 (thread_db_free): Adjust.
15773 * config.in: Regenerate.
15774 * configure: Likewise.
15775
15776 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15777
15778 PR gdb/10757
15779 * thread-db.c (attach_thread): New function.
15780 (maybe_attach_thread): Return success/failure.
15781 (find_new_threads_callback): Adjust.
15782 (thread_db_find_new_threads): Loop until no new threads.
15783
15784 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15785
15786 * proc-service.c (ps_lgetregs): Formatting.
15787
15788 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15789
15790 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15791 * configure.ac: Adjust.
15792 * linux-low.h (struct process_info_private): Move members to struct
15793 thread_db.
15794 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15795 * linux-low.c (linux_remove_process): Adjust.
15796 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15797 * server.c (handle_query): Move code ...
15798 (handle_monitor_command): ... here. New function.
15799 * target.h (struct target_ops): New member.
15800 * thread-db.c (struct thread_db): New.
15801 (libthread_db_search_path): New variable.
15802 (thread_db_create_event, thread_db_enable_reporting)
15803 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15804 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15805 (try_thread_db_load_1, dladdr_to_soname): New functions.
15806 (try_thread_db_load, thread_db_load_search): New functions.
15807 (thread_db_init): Search for libthread_db.
15808 (thread_db_free): New function.
15809 (thread_db_handle_monitor_command): Likewise.
15810 * config.in: Regenerate.
15811 * configure: Regenerate.
15812
15813 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15814
15815 * spu-low.c (spu_kill): Wait for inferior to terminate.
15816 Call clear_inferiors.
15817 (spu_detach): Call clear_inferiors.
15818
15819 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15820
15821 * aclocal.m4: Regenerate.
15822 * config.in: Likewise.
15823 * configure: Likewise.
15824
15825 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15826
15827 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15828 (parse_spufs_run): New function.
15829 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15830 (ppc_breakpoint_at): Handle SPU breakpoints.
15831
15832 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15833
15834 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15835 (SPUFS_MAGIC): Define.
15836 (spu_enumerate_spu_ids): New function.
15837 (linux_qxfer_spu): New function.
15838 (linux_target_ops): Install linux_qxfer_spu.
15839
15840 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15841
15842 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15843 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15844 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15845 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15846 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15847 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15848 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15849 (init_registers_powerpc_cell32l): Add prototype.
15850 (init_registers_powerpc_cell64l): Likewise.
15851 (ppc_arch_setup): Detect Cell/B.E. architecture.
15852
15853 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15854
15855 * Makefile.in (datarootdir): New variable.
15856
15857 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15858
15859 * linux-low.c (linux_write_memory): Update debugging output.
15860 * Makefile.in (clean): Add new descriptions.
15861 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15862 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15863 * configure.srv: Add new files for arm*-*-linux*.
15864 * linux-arm-low.c: Add new declarations.
15865 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15866 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15867 (HWCAP_VFPv3D16): New.
15868 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15869 instead of __IWMMXT__.
15870 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15871 (arm_arch_setup): New.
15872 (target_regsets): Remove #ifdef. Add VFP regset.
15873 (the_low_target): Use arm_arch_setup.
15874
15875 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15876
15877 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15878 the main thread again.
15879
15880 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
15881
15882 Adding Neutrino gdbserver.
15883 * configure: Regenerated.
15884 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
15885 * configure.srv (i[34567]86-*-nto*): New target.
15886 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
15887 * remote-utils.c [__QNX__]: Include sys/iomgr.h
15888 (nto_comctrl) [__QNX__]: New function.
15889 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
15890
15891 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
15892
15893 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
15894 srv_tgtobj.
15895
15896 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
15897 Pedro Alves <pedro@codesourcery.com>
15898
15899 * win32-i386-low.c (i386_get_thread_context): Handle systems that
15900 don't support CONTEXT_EXTENDED_REGISTERS.
15901 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
15902 (the_low_target): Install them.
15903 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
15904 failing with ERROR_PIPE_NOT_CONNECTED.
15905
15906 2009-06-30 Doug Evans <dje@google.com>
15907 Pierre Muller <muller@ics.u-strasbg.fr>
15908
15909 Add h/w watchpoint support to x86-linux, win32-i386.
15910 * Makefile.in (SFILES): Add i386-low.c
15911 (i386_low_h): Define.
15912 (i386-low.o): Add dependencies.
15913 (linux-x86-low.o): Add i386-low.h dependency.
15914 (win32-i386-low.o): Ditto.
15915 * i386-low.c: New file.
15916 * i386-low.h: New file.
15917 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
15918 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
15919 * linux-low.c (linux_add_process): Initialize arch_private.
15920 (linux_remove_process): Free arch_private.
15921 (add_lwp): Initialize arch_private.
15922 (delete_lwp): Free arch_private.
15923 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
15924 provided.
15925 * linux-low.h (process_info_private): New member arch_private.
15926 (lwp_info): New member arch_private.
15927 (linux_target_ops): New members new_process, new_thread,
15928 prepare_to_resume.
15929 (ptid_of): New macro.
15930 * linux-x86-low.c: Include stddef.h, i386-low.h.
15931 (arch_process_info): New struct.
15932 (arch_lwp_info): New struct.
15933 (x86_linux_dr_get, x86_linux_dr_set): New functions.
15934 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15935 (i386_dr_low_get_status): New function.
15936 (x86_insert_point, x86_remove_point): New functions.
15937 (x86_stopped_by_watchpoint): New function.
15938 (x86_stopped_data_address): New function.
15939 (x86_linux_new_process, x86_linux_new_thread): New functions.
15940 (x86_linux_prepare_to_resume): New function.
15941 (the_low_target): Add entries for insert_point, remove_point,
15942 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
15943 prepare_to_resume.
15944 * server.c (debug_hw_points): New global.
15945 (monitor_show_help): Document set debug-hw-points.
15946 (handle_query): Process "set debug-hw-points".
15947 * server.h (debug_hw_points): Declare.
15948 (paddress): Declare.
15949 * utils.c (NUMCELLS, CELLSIZE): New macros.
15950 (get_sell, xsnprintf, paddress): New functions.
15951 * win32-arm-low.c (the_low_target): Add entries for insert_point,
15952 remove_point, stopped_by_watchpoint, stopped_data_address.
15953 * win32-i386-low.c: Include i386-low.h.
15954 (debug_reg_state): Replaces dr.
15955 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
15956 (i386_dr_low_get_status): New function.
15957 (i386_insert_point, i386_remove_point): New functions.
15958 (i386_stopped_by_watchpoint): New function.
15959 (i386_stopped_data_address): New function.
15960 (i386_initial_stuff): Update.
15961 (get_thread_context,set_thread_context,i386_thread_added): Update.
15962 (the_low_target): Add entries for insert_point,
15963 remove_point, stopped_by_watchpoint, stopped_data_address.
15964 * win32-low.c (win32_insert_watchpoint): New function.
15965 (win32_remove_watchpoint): New function.
15966 (win32_stopped_by_watchpoint): New function.
15967 (win32_stopped_data_address): New function.
15968 (win32_target_ops): Add entries for insert_watchpoint,
15969 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
15970 * win32-low.h (win32_target_ops): New members insert_point,
15971 remove_point, stopped_by_watchpoint, stopped_data_address.
15972
15973 2009-06-25 Pedro Alves <pedro@codesourcery.com>
15974
15975 * server.c (process_serial_event): Re-return unsupported, not
15976 error, if the type isn't recognized. Re-allow supporting only
15977 insert or remove packets. Also call require_running for
15978 breakpoints. Add missing break statement to default case. Tidy.
15979 * target.h (struct target_ops): Rename insert_watchpoint to
15980 insert_point, and remove_watchpoint to remove_point.
15981
15982 * linux-low.h (struct linux_target_ops): Likewise.
15983 * linux-low.c (linux_insert_watchpoint): Rename to ...
15984 (linux_insert_point): ... this. Adjust.
15985 (linux_remove_watchpoint): Rename to ...
15986 (linux_remove_point): ... this. Adjust.
15987 (linux_target_ops): Adjust.
15988 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
15989 (cris_insert_point): ... this.
15990 (cris_remove_watchpoint): Rename to ...
15991 (cris_remove_point): ... this.
15992 (the_low_target): Adjust.
15993
15994 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
15995
15996 * server.c (handle_v_kill): Pass signal_pid to
15997 kill_inferior if multi_process is zero.
15998
15999 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16000
16001 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16002 * target.h (target_ops): Comment for *_watchpoint to make it clear
16003 the functions can get types '0' and '1'.
16004
16005 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16006
16007 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16008 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16009 * regcache.c (get_regcache): Likewise.
16010 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16011 * win32-low.c (child_fetch_inferior_registers): Remove check for
16012 regno 0.
16013
16014 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16015 Pedro Alves <pedro@codesourcery.com>
16016
16017 * target.h (struct target_ops) <supports_multi_process>: New
16018 callback.
16019 (target_supports_multi_process): New.
16020 * server.c (handle_query): Even if GDB reports support, only
16021 enable multi-process if the target also supports it. Report
16022 multi-process support only if the target backend supports it.
16023 * linux-low.c (linux_supports_multi_process): New function.
16024 (linux_target_ops): Install it as target_supports_multi_process
16025 callback.
16026
16027 2009-05-24 Doug Evans <dje@google.com>
16028
16029 Global renaming of find_thread_pid to find_thread_ptid.
16030 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16031 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16032 All callers updated.
16033
16034 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16035 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16036 directly.
16037
16038 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16039 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16040 (linux_resume_one_lwp): Ditto.
16041
16042 2009-05-23 Doug Evans <dje@google.com>
16043
16044 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16045 from struct inferior_list_entry * to struct lwp_info *.
16046 All callers updated.
16047
16048 2009-05-13 Doug Evans <dje@google.com>
16049
16050 * linux-x86-low.c: Don't include assert.h.
16051 (x86_siginfo_fixup): Use fatal, not assert.
16052 (x86_arch_setup): Fix comment.
16053
16054 2009-05-12 Doug Evans <dje@google.com>
16055
16056 Biarch support for i386/amd64 gdbserver.
16057 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16058 Add linux-x86-low.c.
16059 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16060 (linux-x86-low.o): Add.
16061 * linux-x86-64-low.c: Delete.
16062 * linux-i386-low.c: Delete.
16063 * linux-x86-low.c: New file.
16064 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16065 linux-x86-low.o.
16066 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16067 linux-x86-low.o.
16068 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16069 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16070 (linux_child_pid_to_exec_file): New function.
16071 (elf_64_header_p, elf_64_file_p): New functions.
16072 (siginfo_fixup): New function.
16073 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16074 give target a chance to convert layout.
16075 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16076 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16077
16078 2009-05-07 Doug Evans <dje@google.com>
16079
16080 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16081 (regsets_store_inferior_registers): Ditto.
16082
16083 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16084
16085 PR server/10048
16086
16087 * linux-low.c (must_set_ptrace_flags): Delete.
16088 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16089 of the global.
16090 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16091 `lwp->must_set_ptrace_flags' instead.
16092 (linux_wait_for_event_1): Set ptrace options here.
16093 (linux_wait_1): ... not here.
16094
16095 2009-04-30 Doug Evans <dje@google.com>
16096
16097 * inferiors.c (started_inferior_callback): New function.
16098 (attached_inferior_callback): New function.
16099 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16100 * server.c (print_started_pid, print_attached_pid): New functions.
16101 (detach_or_kill_for_exit): New function.
16102 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16103 * server.h (have_started_inferiors_p): Declare.
16104 (have_attached_inferiors_p): Declare.
16105
16106 * inferiors.c (remove_process): Fix memory leak, free process.
16107 * linux-low.c (linux_remove_process): New function.
16108 (linux_kill): Call it instead of remove_process.
16109 (linux_detach, linux_wait_1): Ditto.
16110
16111 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16112
16113 * configure.srv: Add x86 Windows CE target.
16114
16115 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16116
16117 * inferiors.c (get_thread_process): Make global.
16118 * server.h (get_thread_process): Add prototype.
16119 * thread-db.c (find_one_thread): Use get_thread_process
16120 instead of current_process.
16121 (thread_db_get_tls_address): Do not crash if called when
16122 thread layer is not yet initialized.
16123
16124 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16125
16126 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16127 * spu-low.c (current_tid): Rename to ...
16128 (current_ptid): ... this.
16129 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16130 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16131 ptid_get_lwp (current_ptid) instead of current_tid.
16132 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16133 instead of current_tid. Use find_process_pid to verify pid
16134 argument is valid. Pass proper argument to remove_process.
16135 (spu_thread_alive): Compare current_ptid instead of current_tid.
16136 (spu_resume): Likewise.
16137
16138 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16139
16140 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16141 variable.
16142
16143 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16144
16145 Implement the multiprocess extensions, and add linux multiprocess
16146 support.
16147
16148 * server.h (ULONGEST): Declare.
16149 (struct ptid, ptid_t): New.
16150 (minus_one_ptid, null_ptid): Declare.
16151 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16152 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16153 (struct inferior_list_entry): Change `id' type from unsigned from
16154 to ptid_t.
16155 (struct sym_cache, struct breakpoint, struct
16156 process_info_private): Forward declare.
16157 (struct process_info): Declare.
16158 (current_process): Declare.
16159 (all_processes): Declare.
16160 (initialize_inferiors): Declare.
16161 (add_thread): Adjust to use ptid_t.
16162 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16163 (add_process, remove_process, find_thread_pid): Declare.
16164 (find_inferior_id): Adjust to use ptid_t.
16165 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16166 (multi_process): Declare.
16167 (push_event): Adjust to use ptid_t.
16168 (read_ptid, write_ptid): Declare.
16169 (prepare_resume_reply): Adjust to use ptid_t.
16170 (clear_symbol_cache): Declare.
16171 * inferiors.c (all_processes): New.
16172 (null_ptid, minus_one_ptid): New.
16173 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16174 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16175 (add_thread): Change unsigned long to ptid. Remove gdb_id
16176 parameter. Adjust.
16177 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16178 (gdb_id_to_thread): Rename to ...
16179 (find_thread_pid): ... this. Change unsigned long to ptid.
16180 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16181 (loaded_dll, pull_pid_from_list): Adjust.
16182 (add_process, remove_process, find_process_pid)
16183 (get_thread_process, current_process, initialize_inferiors): New.
16184 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16185 (struct target_waitstatus) <related_pid>: Ditto.
16186 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16187 return type to int.
16188 (struct target_ops) <join>: Add `pid' argument.
16189 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16190 (struct target_ops) <wait>: Add `ptid' field. Change return type
16191 to ptid.
16192 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16193 (mywait): Add `ptid' argument. Change return type to ptid_t.
16194 (target_pid_to_str): Declare.
16195 * target.c (set_desired_inferior): Adjust to use ptids.
16196 (mywait): Add new `ptid' argument. Adjust.
16197 (target_pid_to_str): New.
16198 * mem-break.h (free_all_breakpoints): Declare.
16199 * mem-break.c (breakpoints): Delelete.
16200 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16201 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16202 to use per-process breakpoint list.
16203 (free_all_breakpoints): New.
16204 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16205 (symbol_cache, all_symbols_looked_up): Delete.
16206 (hexchars): New.
16207 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16208 read_ptid): New.
16209 (prepare_resume_reply): Change ptid argument's type from unsigned
16210 long to ptid_t. Adjust. Implement W;process and X;process.
16211 (free_sym_cache, clear_symbol_cache): New.
16212 (look_up_one_symbol): Adjust to per-process symbol cache. *
16213 * server.c (cont_thread, general_thread, step_thread): Change type
16214 to ptid_t.
16215 (attached): Delete.
16216 (multi_process): New.
16217 (last_ptid): Change type to ptid_t.
16218 (struct vstop_notif) <ptid>: Change type to ptid_t.
16219 (queue_stop_reply, push_event): Change `ptid' argument's type to
16220 ptid_t.
16221 (discard_queued_stop_replies): Add `pid' argument.
16222 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16223 changes. Don't reference the `attached' global.
16224 (attach_inferior): Adjust to mywait interface changes.
16225 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16226 features. Handle and report "multiprocess+". Handle
16227 "qAttached:PID".
16228 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16229 changes.
16230 (handle_v_kill): New.
16231 (handle_v_stopped): Adjust to use target_pid_to_str.
16232 (handle_v_requests): Allow multiple attaches and runs when
16233 multiprocess extensions are in effect. Handle "vKill".
16234 (myresume): Adjust to use ptids.
16235 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16236 (handle_status): Adjust to discard_queued_stop_replies interface
16237 change.
16238 (first_thread_of, kill_inferior_callback)
16239 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16240 (main): Call initialize_inferiors. Adjust to use ptids, killing
16241 and detaching from all inferiors. Handle multiprocess packet
16242 variants.
16243 * linux-low.h: Include gdb_proc_service.h.
16244 (struct process_info_private): New.
16245 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16246 <lwpid_of>: Use ptid_get_lwp.
16247 (get_lwp_thread): Adjust.
16248 (struct lwp_info): Add `dead' member.
16249 (find_lwp_pid): Declare.
16250 * linux-low.c (thread_db_active): Delete.
16251 (new_inferior): Adjust comment.
16252 (inferior_pid): Delete.
16253 (linux_add_process): New.
16254 (handle_extended_wait): Adjust.
16255 (add_lwp): Change unsigned long to ptid.
16256 (linux_create_inferior): Add process to processes table. Adjust
16257 to use ptids. Don't set new_inferior here.
16258 (linux_attach_lwp): Rename to ...
16259 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16260 it. Adjust to use ptids.
16261 (linux_attach_lwp): New.
16262 (linux_attach): Add process to processes table. Don't set
16263 new_inferior here.
16264 (struct counter): New.
16265 (second_thread_of_pid_p, last_thread_of_process_p): New.
16266 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16267 multiple processes.
16268 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16269 processes. Remove process from process table.
16270 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16271 to multiple processes.
16272 (any_thread_of): New.
16273 (linux_detach): Add `pid' argument, and handle it. Remove process
16274 from processes table.
16275 (linux_join): Add `pid' argument. Handle it.
16276 (linux_thread_alive): Change unsighed long argument to ptid_t.
16277 Consider dead lwps as not being alive.
16278 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16279 threads we're not interested in.
16280 (same_lwp, find_lwp_pid): New.
16281 (linux_wait_for_lwp): Change `pid' argument's type from int to
16282 ptid_t. Adjust.
16283 (linux_wait_for_event): Rename to ...
16284 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16285 from int to ptid_t. Adjust.
16286 (linux_wait_for_event): New.
16287 (linux_wait_1): Add `ptid' argument. Change return type to
16288 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16289 that exit from the process table.
16290 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16291 Adjust.
16292 (mark_lwp_dead): New.
16293 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16294 stopping all threads, mark its main lwp as dead.
16295 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16296 ptids.
16297 (fetch_register, usr_store_inferior_registers)
16298 (regsets_fetch_inferior_registers)
16299 (regsets_store_inferior_registers, linux_read_memory)
16300 (linux_write_memory): Inline `inferior_pid'.
16301 (linux_look_up_symbols): Adjust to use per-process
16302 `thread_db_active'.
16303 (linux_request_interrupt): Adjust to use ptids.
16304 (linux_read_auxv): Inline `inferior_pid'.
16305 (initialize_low): Don't reference thread_db_active.
16306 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16307 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16308 (ps_getpid): Return the pid of the current inferior.
16309 * thread-db.c (proc_handle, thread_agent): Delete.
16310 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16311 per-process data.
16312 (find_one_thread): Change argument type to ptid_t. Adjust to
16313 per-process data.
16314 (maybe_attach_thread): Adjust to per-process data and ptids.
16315 (thread_db_find_new_threads): Ditto.
16316 (thread_db_init): Ditto.
16317 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16318 processes table. Adjust to use ptids.
16319 (spu_kill, spu_detach): Adjust interface. Remove process from
16320 processes table.
16321 (spu_join, spu_thread_alive): Adjust interface.
16322 (spu_wait): Adjust interface. Remove process from processes
16323 table. Adjust to use ptids.
16324 * win32-low.c (current_inferior_tid): Delete.
16325 (current_inferior_ptid): New.
16326 (debug_event_ptid): New.
16327 (thread_rec): Take a ptid. Adjust.
16328 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16329 (child_delete_thread): Ditto.
16330 (do_initial_child_stuff): Add `attached' argument. Add process to
16331 processes table.
16332 (child_fetch_inferior_registers, child_store_inferior_registers):
16333 Adjust.
16334 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16335 (win32_attach): Pass 1 to do_initial_child_stuff.
16336 (win32_kill): Adjust interface. Remove process from processes
16337 table.
16338 (win32_detach): Ditto.
16339 (win32_join): Adjust interface.
16340 (win32_thread_alive): Take a ptid.
16341 (win32_resume): Adjust to use ptids.
16342 (get_child_debug_event): Ditto.
16343 (win32_wait): Adjust interface. Remove exiting process from
16344 processes table.
16345
16346 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16347
16348 Non-stop mode support.
16349
16350 * server.h (non_stop): Declare.
16351 (gdb_client_data, handler_func): Declare.
16352 (delete_file_handler, add_file_handler, start_event_loop):
16353 Declare.
16354 (handle_serial_event, handle_target_event, push_event)
16355 (putpkt_notif): Declare.
16356 * target.h (enum resume_kind): New.
16357 (struct thread_resume): Replace `step' field by `kind' field.
16358 (TARGET_WNOHANG): Define.
16359 (struct target_ops) <wait>: Add `options' argument.
16360 <supports_non_stop, async, start_non_stop>: New fields.
16361 (target_supports_non_stop, target_async): New.
16362 (start_non_stop): Declare.
16363 (mywait): Add `options' argument.
16364 * target.c (mywait): Add `options' argument. Print child exit
16365 notifications here.
16366 (start_non_stop): New.
16367 * server.c (non_stop, own_buf, mem_buf): New globals.
16368 (struct vstop_notif): New.
16369 (notif_queue): New global.
16370 (queue_stop_reply, push_event, discard_queued_stop_replies)
16371 (send_next_stop_reply): New.
16372 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16373 interface changes.
16374 (attach_inferior): In non-stop mode, don't wait for the target
16375 here.
16376 (handle_general_set): Handle QNonStop.
16377 (handle_query): When handling qC, return the current general
16378 thread, instead of the first thread of the list.
16379 (handle_query): If the backend supports non-stop mode, include
16380 QNonStop+ in the qSupported query response.
16381 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16382 and non-stop mode.
16383 (handle_v_attach, handle_v_run): Handle non-stop mode.
16384 (handle_v_stopped): New.
16385 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16386 (myresume): Adjust to use resume_kind. Handle non-stop.
16387 (queue_stop_reply_callback): New.
16388 (handle_status): Handle non-stop mode.
16389 (main): Clear non_stop flag on reconnection. Use the event-loop.
16390 Refactor serial protocol handling from here ...
16391 (process_serial_event): ... to this new function. When GDB
16392 selects any thread, select one here. In non-stop mode, wait until
16393 GDB acks all pending events before exiting.
16394 (handle_serial_event, handle_target_event): New.
16395 * remote-utils.c (remote_open): Install remote_desc in the event
16396 loop.
16397 (remote_close): Remove remote_desc from the event loop.
16398 (putpkt_binary): Rename to...
16399 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16400 (putpkt_binary): New as wrapper around putpkt_binary_1.
16401 (putpkt_notif): New.
16402 (prepare_resume_reply): In non-stop mode, don't change the
16403 general_thread.
16404 * event-loop.c: New.
16405 * Makefile.in (OBJ): Add event-loop.o.
16406 (event-loop.o): New rule.
16407
16408 * linux-low.h (pid_of): Moved here.
16409 (lwpid_of): New.
16410 (get_lwp_thread): Use lwpid_of.
16411 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16412 * linux-low.c (pid_of): Delete.
16413 (inferior_pid): Use lwpid_of.
16414 (linux_event_pipe): New.
16415 (target_is_async_p): New.
16416 (delete_lwp): New.
16417 (handle_extended_wait): Use lwpid_of.
16418 (add_lwp): Don't set lwpid field.
16419 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16420 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16421 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16422 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16423 first. Adjust to linux_wait_for_event interface changes. Use
16424 lwpid_of.
16425 (linux_detach): Don't delete the main lwp here.
16426 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16427 (status_pending_p): Don't consider explicitly suspended lwps.
16428 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16429 pointer. Add OPTIONS argument. Change return type to int. Use
16430 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16431 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16432 pointer. Add status pointer argument. Return a pid instead of a
16433 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16434 changes. In non-stop mode, don't switch to a random thread.
16435 (linux_wait): Rename to...
16436 (linux_wait_1): ... this. Add target_options argument, and handle
16437 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16438 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16439 clean exit and signal exit code. Don't stop all threads in
16440 non-stop mode. In all-stop mode, only stop all threads when
16441 reporting a stop to GDB. Handle explicit thread stop requests.
16442 (async_file_flush, async_file_mark): New.
16443 (linux_wait): New.
16444 (send_sigstop): Use lwpid_of.
16445 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16446 interface changes. In non-stop mode, don't switch to a random
16447 thread.
16448 (linux_resume_one_lwp): Use lwpid_of.
16449 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16450 (linux_resume_one_thread): ... this. Handle resume_stop. In
16451 non-stop mode, don't look for pending flag in all threads.
16452 (resume_status_pending_p): Don't consider explicitly suspended
16453 threads.
16454 (my_waitpid): Reimplement. Emulate __WALL.
16455 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16456 Use lwpid_of.
16457 (sigchld_handler, linux_supports_non_stop, linux_async)
16458 (linux_start_non_stop): New.
16459 (linux_target_ops): Register linux_supports_non_stop, linux_async
16460 and linux_start_non_stop.
16461 (initialize_low): Install SIGCHLD handler.
16462 * thread-db.c (thread_db_create_event, find_one_thread)
16463 (thread_db_get_tls_address): Use lwpid_of.
16464 * win32-low.c (win32_detach): Adjust to use resume_kind.
16465 (win32_wait): Add `options' argument.
16466 * spu-low.c (spu_resume): Adjust to use resume_kind.
16467 (spu_wait): Add `options' argument.
16468
16469 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16470
16471 Decouple target code from remote protocol.
16472
16473 * target.h (enum target_waitkind): New.
16474 (struct target_waitstatus): New.
16475 (struct target_ops) <wait>: Return an unsigned long. Take a
16476 target_waitstatus pointer instead of a char pointer.
16477 (mywait): Likewise.
16478 * target.c (mywait): Change prototype to return an unsigned long.
16479 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16480 * server.h (thread_from_wait, old_thread_from_wait): Delete
16481 declarations.
16482 (prepare_resume_reply): Change prototype to take a
16483 target_waitstatus.
16484 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16485 (last_status, last_ptid): New.
16486 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16487 pid instead of a signal.
16488 (attach_inferior): Remove "status" and "signal" parameters.
16489 Adjust.
16490 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16491 not as an address.
16492 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16493 (handle_v_requests, myresume): Remove "status" and "signal"
16494 parameters. Adjust.
16495 (handle_status): New.
16496 (main): Delete local `status'. Adjust.
16497 * remote-utils.c: Include target.h.
16498 (prepare_resume_reply): Change prototype to take a
16499 target_waitstatus. Adjust.
16500
16501 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16502 interface.
16503 * spu-low.c (spu_wait): Adjust.
16504 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16505 Delete.
16506 (win32_wait): Adjust.
16507
16508 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16509
16510 * target.h (struct thread_resume): Delete leave_stopped member.
16511 (struct target_ops): Add a `n' argument to the `resume' callback.
16512 * server.c (start_inferior): Adjust.
16513 (handle_v_cont, myresume): Adjust.
16514 * linux-low.c (check_removed_breakpoint): Adjust to resume
16515 interface change, and to removed leave_stopped field.
16516 (resume_ptr): Delete.
16517 (struct thread_resume_array): New.
16518 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16519 resume interface change.
16520 (linux_continue_one_thread, linux_queue_one_thread)
16521 (resume_status_pending_p): Check if the resume field is NULL
16522 instead of checking the leave_stopped member.
16523 (linux_resume): Adjust to the target resume interface change.
16524 * spu-low.c (spu_resume): Adjust to the target resume interface
16525 change.
16526 * win32-low.c (win32_detach, win32_resume): Ditto.
16527
16528 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16529
16530 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16531 flag.
16532 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16533 pending.
16534 (linux_continue_one_thread): Only preserve the stepping flag if
16535 there's a pending breakpoint.
16536
16537 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16538
16539 * server.c (main): After the inferior having exited, call
16540 remote_close before exiting gdbserver.
16541
16542 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16543
16544 Fix size of FPSCR in Power 7 processors.
16545 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16546 (PPC_FEATURE_HAS_DFP): New #define.
16547 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16548 size of the FPSCR.
16549
16550 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16551
16552 * server.c (handle_query) Whitespace and formatting.
16553
16554 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16555
16556 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16557 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16558 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16559 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16560 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16561 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16562 Makefile.in, configure.ac: Fix whitespace throughout.
16563 * configure: Regenerate.
16564
16565 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16566
16567 * inferiors.c (find_inferior): Make it safe for the callback
16568 function to delete the currently iterated inferior.
16569
16570 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16571
16572 * Makefile.in (linuw_low_h): Move higher.
16573 (thread-db.o): Depend on $(linux_low_h).
16574
16575 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16576
16577 Rename "process" to "lwp" throughout.
16578
16579 * linux-low.c (all_processes): Rename to...
16580 (all_lwps): ... this.
16581 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16582 (add_process): Rename to ...
16583 (add_lwp): ... this. Adjust.
16584 (linux_create_inferior): Adjust.
16585 (linux_attach_lwp): Adjust.
16586 (linux_attach): Adjust.
16587 (linux_kill_one_process): Rename to ...
16588 (linux_kill_one_lwp): ... this. Adjust.
16589 (linux_kill): Adjust.
16590 (linux_detach_one_process): Rename to ...
16591 (linux_detach_one_lwp): ... this. Adjust.
16592 (linux_detach): Adjust.
16593 (check_removed_breakpoint): Adjust.
16594 (status_pending_p): Adjust.
16595 (linux_wait_for_process): Rename to ...
16596 (linux_wait_for_lwp): ... this. Adjust.
16597 (linux_wait_for_event): Adjust.
16598 (send_sigstop): Adjust.
16599 (wait_for_sigstop): Adjust.
16600 (stop_all_processes): Rename to ...
16601 (stop_all_lwps): ... this.
16602 (linux_resume_one_process): Rename to ...
16603 (linux_resume_one_lwp): ... this. Adjust.
16604 (linux_set_resume_request, linux_continue_one_thread)
16605 (linux_queue_one_thread, resume_status_pending_p)
16606 (usr_store_inferior_registers, regsets_store_inferior_registers)
16607 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16608 Adjust.
16609 * linux-low.h (get_process): Rename to ...
16610 (get_lwp): ... this. Adjust.
16611 (get_thread_process): Rename to ...
16612 (get_thread_lwp): ... this. Adjust.
16613 (get_process_thread): Rename to ...
16614 (get_lwp_thread): ... this. Adjust.
16615 (struct process_info): Rename to ...
16616 (struct lwp_info): ... this.
16617 (all_processes): Rename to ...
16618 (all_lwps): ... this.
16619 * proc-service.c (ps_lgetregs): Adjust.
16620 * thread-db.c (thread_db_create_event, find_one_thread)
16621 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16622
16623 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16624
16625 * server.c (handle_query): Handle "qAttached".
16626
16627 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16628
16629 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16630 GPLv3, update license URL.
16631
16632 2009-03-01 Doug Evans <dje@google.com>
16633
16634 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16635 (server_h): Add gdb_signals.h.
16636 (signals.o): Update.
16637 * server.h (target_signal_from_host,target_signal_to_host_p)
16638 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16639
16640 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16641
16642 * remote-utils.c (getpkt): Also generate remote-debug
16643 information if noack_mode is set.
16644
16645 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16646
16647 * server.c (handle_query): Report qXfer:siginfo:read and
16648 qXfer:siginfo:write as supported and handle them.
16649 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16650 * linux-low.c (linux_xfer_siginfo): New.
16651 (linux_target_ops): Set it.
16652
16653 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16654
16655 * server.c (gdbserver_usage): Mention --remote-debug.
16656 (main): Accept '--remote-debug' switch.
16657
16658 2009-01-18 Doug Evans <dje@google.com>
16659
16660 * regcache.c (new_register_cache): No need to check result of xcalloc.
16661 * server.c (handle_search_memory): Back out calls to xmalloc,
16662 result is checked and error is returned to user upon failure.
16663 (handle_query): Ditto. Add more checks for result of malloc.
16664 (handle_v_cont): Check result of malloc, report error back to
16665 user upon failure.
16666 (handle_v_run): Ditto. Call freeargv.
16667 * server.h (freeargv): Declare.
16668 * utils.c (freeargv): New fn.
16669
16670 2009-01-15 Doug Evans <dje@google.com>
16671
16672 * gdbreplay.c (perror_with_name): Make arg const char *.
16673 * server.h (target_signal_to_name): Make return type const char *.
16674 * thread-db.c (thread_db_err_str): Make return type const char *.
16675 * utils.c (perror_with_name): Make arg const char *.
16676
16677 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16678
16679 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16680 when handling a EXIT_PROCESS_DEBUG_EVENT.
16681
16682 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16683
16684 * gdbreplay.c (gdbreplay_version): Update copyright year.
16685 * server.c (gdbserver_version): Likewise.
16686
16687 2009-01-05 Doug Evans <dje@google.com>
16688
16689 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16690 (handle_extended_wait): Improve comment.
16691
16692 2008-12-13 Doug Evans <dje@google.com>
16693
16694 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16695 * server.h (ATTR_MALLOC): New macro.
16696 (xmalloc,xcalloc,xstrdup): Declare.
16697 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16698 * inferiors.c: Ditto.
16699 * linux-low.c: Ditto.
16700 * mem-break.c: Ditto.
16701 * regcache.c: Ditto.
16702 * remote-utils.c: Ditto.
16703 * server.c: Ditto.
16704 * target.c: Ditto.
16705 * win32-low.c: Ditto.
16706
16707 2008-12-12 Doug Evans <dje@google.com>
16708
16709 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16710 in debugging printf.
16711
16712 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16713
16714 2008-12-09 Doug Evans <dje@google.com>
16715
16716 * linux-low.h (struct process_info): Delete member tid, unused.
16717 * thread-db.c (find_one_thread): Update.
16718 (maybe_attach_thread): Update.
16719
16720 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16721
16722 * target.h (struct target_ops): Add qxfer_osdata member.
16723 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16724 and dirent.h.
16725 (linux_qxfer_osdata): New functions.
16726 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16727 callback.
16728 * server.c (handle_query): Handle "qXfer:osdata:read:".
16729 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16730 (buffer_xml_printf): New functions.
16731 * server.h (struct buffer): New.
16732 (buffer_grow_str, buffer_grow_str0): New macros.
16733 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16734 (buffer_xml_printf): Declare.
16735
16736 2008-11-24 Doug Evans <dje@google.com>
16737
16738 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16739
16740 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16741
16742 * server.c (handle_v_run): Always use the supplied argument list.
16743
16744 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16745
16746 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16747 (xtensa_regmap_table): Add entry for scompare1.
16748
16749 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16750
16751 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16752 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16753 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16754 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16755 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16756 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16757 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16758 XML target descriptions.
16759 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16760 when inferior is running on an ISA 2.05 or later processor. Add
16761 special case to return offset for full 64-bit slot of FPSCR when
16762 in 32-bits.
16763
16764 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16765
16766 * Makefile.in (SFILES, clean): Added sparc64 files.
16767 (reg-sparc64.o, reg-sparc64.c): New.
16768 * configure.srv (sparc*-*-linux*): New configuration.
16769 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16770 syscall arguments for SPARC.
16771 (regsets_store_inferior_registers): Likewise.
16772 * linux-sparc-low.c: New file.
16773
16774 2008-10-21 Doug Evans <dje@google.com>
16775
16776 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16777 (READLINE_DIR,READLINE_DEP): Delete.
16778 (INTERNAL_CFLAGS): Update.
16779 (LINTFLAGS): Update.
16780
16781 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16782
16783 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16784 whole argv from the last run, not just argv[0].
16785
16786 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16787
16788 * regcache.c (new_register_cache): Return NULL if the register
16789 cache size isn't known yet.
16790 (free_register_cache): Avoid dereferencing a NULL regcache.
16791
16792 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16793
16794 * configure.srv: Merge MIPS and MIPS64.
16795
16796 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16797
16798 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16799
16800 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16801
16802 * Makefile.in: Add required vsx dependencies.
16803
16804 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16805 Declare init_registers_powerpc_vsx32l.
16806 Declare init_registers_powerpc_vsx64l.
16807 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16808 (ppc_arch_setup): Check for VSX in hwcap.
16809 (ppc_fill_vsxregset): New function.
16810 (ppc_store_vsxregset): New function.
16811 Add new VSX entry in regset_info target_regsets.
16812
16813 * configure.srv: Add new VSX dependencies.
16814
16815 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16816
16817 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16818 (remote_open): Set or clear transport_is_reliable.
16819 (putpkt_binary): Don't expect acks in noack mode.
16820 (getpkt): Don't send ack/nac in noack mode.
16821 * server.c (handle_general_set): Handle QStartNoAckMode.
16822 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16823 qSupported.
16824 (main): Reset noack_mode on every connection.
16825 * server.h (noack_mode): Declare.
16826
16827 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16828
16829 * Makefile.in (GDBREPLAY_OBS): New variable.
16830 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16831
16832 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16833 Daniel Jacobowitz <dan@codesourcery.com>
16834
16835 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16836 (usr_store_inferior_registers): Likewise.
16837 (regsets_store_inferior_registers): Likewise.
16838
16839 2008-07-31 Rolf Jansen <rj@surtec.com>
16840 Pedro Alves <pedro@codesourcery.com>
16841
16842 * configure.ac: Check for memmem declaration.
16843 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16844 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16845 (disable_packet_qfThreadInfo): Unconditionally compile.
16846 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16847 * configure, config.in: Regenerate.
16848
16849 2008-07-28 Doug Kwan <dougkwan@google.com>
16850
16851 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16852 (linux_write_memory): Remove declaration of errno.
16853
16854 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16855
16856 * linux-low.c (handle_extended_wait): Do not use "status"
16857 variable uninitialized.
16858
16859 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16860
16861 * server.c (handle_v_attach): Inhibit reporting dll changes.
16862
16863 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16864
16865 * remote-utils.c (prepare_resume_reply): If requested, don't
16866 output "thread:TID" in the T stop reply.
16867
16868 * server.c (disable_packet_vCont, disable_packet_Tthread)
16869 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16870 (handle_query): If requested, disable support for qC, qfThreadInfo
16871 and qsThreadInfo.
16872 (handle_v_requests): If requested, disable support for vCont.
16873 (gdbserver_show_disableable): New.
16874 (main): Handle --disable-packet and --disable-packet=LIST.
16875
16876 * server.h (disable_packet_vCont, disable_packet_Tthread)
16877 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16878
16879 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
16880
16881 * server.c (gdbserver_usage): Mention --version.
16882
16883 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
16884
16885 * Makefile.in (gdbreplay.o): New rule.
16886
16887 2008-06-06 Joseph Myers <joseph@codesourcery.com>
16888
16889 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
16890 message, not gdbserver.
16891
16892 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
16893 Nathan Sidwell <nathan@codesourcery.com>
16894 Joseph Myers <joseph@codesourcery.com>
16895
16896 * acinclude.m4: Include ../../config/acx.m4.
16897 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
16898 * configure, config.in: Regenerate.
16899 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
16900 * server.c (gdbserver_version): Print PKGVERSION.
16901 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
16902 (main): Adjust gdbserver_usage calls.
16903 * gdbreplay.c (version, host_name): Add declarations.
16904 (gdbreplay_version, gdbreplay_usage): New.
16905 (main): Accept --version and --help options.
16906
16907 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
16908
16909 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
16910 (arm_breakpoint_at): Handle Thumb.
16911 (the_low_target): Add comment.
16912
16913 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
16914
16915 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
16916
16917 2008-05-09 Doug Evans <dje@google.com>
16918
16919 * server.h (decode_search_memory_packet): Declare.
16920 * remote-utils.c (decode_search_memory_packet): New fn.
16921 * server.c (handle_search_memory_1): New fn.
16922 (handle_search_memory): New fn.
16923 (handle_query): Process qSearch:memory packets.
16924
16925 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
16926
16927 * regcache.c (registers_length): Remove.
16928 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
16929 full register packet.
16930 * regcache.h (registers_length): Remove prototype.
16931 * server.h (PBUFSIZ): Define to 16384.
16932
16933 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
16934
16935 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
16936 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
16937 powerpc-64l.o, and powerpc-altivec64l.o.
16938 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
16939 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
16940 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
16941 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
16942 rs6000/power-linux.xml, and rs6000/power64-linux.xml
16943 to srv_xmlfiles.
16944
16945 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
16946 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
16947 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
16948 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
16949 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
16950 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
16951 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
16952 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
16953 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
16954 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
16955 (clean): Update.
16956
16957 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
16958 (init_registers_powerpc_32l): ... this new prototype.
16959 (init_registers_powerpc_32): Remove, replace by ...
16960 (init_registers_powerpc_altivec32l): ... this new prototype.
16961 (init_registers_powerpc_e500): Remove, replace by ...
16962 (init_registers_powerpc_e500l): ... this new prototype.
16963 (init_registers_ppc64): Remove, replace by ...
16964 (init_registers_powerpc_64l): ... this new prototype.
16965 (init_registers_powerpc_64): Remove, replace by ...
16966 (init_registers_powerpc_altivec64l): ... this new prototype.
16967 (ppc_num_regs): Set to 73.
16968 (PT_ORIG_R3, PT_TRAP): Define if necessary.
16969 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
16970 (ppc_cannot_store_register): Handle orig_r3 and trap.
16971 (ppc_arch_setup): Update init_registers_... calls.
16972 (ppc_fill_gregset): Handle orig_r3 and trap.
16973
16974 * inferiors.c (clear_inferiors): Reset current_inferior.
16975
16976 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
16977
16978 * acinclude.m4: Add override.m4.
16979 * configure: Regenerate.
16980
16981 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16982
16983 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
16984 initial call to init_register_ppc64.
16985
16986 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
16987
16988 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
16989 single powerpc*-*-linux* case.
16990 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
16991
16992 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
16993
16994 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
16995 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
16996 from reg_xmlfiles.
16997 * linux-ppc-low.c: Include <elf.h>.
16998 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
16999 (ppc_hwcap): New global variable.
17000 (ppc_regmap): Remove __SPE__ #ifdef sections.
17001 (ppc_regmap_e500): New global variable.
17002 (ppc_cannot_store_register): Update __SPE__ special case.
17003 (ppc_get_hwcap): New function.
17004 (ppc_arch_setup): Use it to determine whether inferior supports
17005 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17006 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17007 Do not access registers if target does not support AltiVec.
17008 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17009 Do not access registers if target does not support SPE.
17010 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17011
17012 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17013
17014 * linux-low.c (disabled_regsets, num_regsets): New.
17015 (use_regsets_p): Delete.
17016 (linux_wait_for_process): Clear disabled_regsets.
17017 (regsets_fetch_inferior_registers): Check and set it.
17018 (regsets_store_inferior_registers): Likewise.
17019 (linux_fetch_registers, linux_store_registers): Do not use
17020 use_regsets_p.
17021 (initialize_low): Allocate disabled_regsets.
17022
17023 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17024
17025 * Makefile.in (LIBOBJS): New.
17026 (OBS): Use LIBOBJS.
17027 (memmem.o): New rule.
17028 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17029 * configure: Regenerated.
17030
17031 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17032
17033 * server.c (handle_query): Never return "unsupported" for
17034 qXfer:features:read queries.
17035
17036 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17037
17038 * server.c (get_features_xml): Fix inverted condition.
17039 (handle_query): Always support qXfer:feature:read.
17040
17041 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17042
17043 * server.c (wrapper_argv): New.
17044 (start_inferior): Handle wrapper_argv. If set, expect an extra
17045 trap.
17046 (gdbserver_usage): Document --wrapper.
17047 (main): Parse --wrapper.
17048
17049 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17050
17051 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17052 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17053 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17054 (ppc_set_pc): Likewise.
17055 (ppc_arch_setup): New function.
17056 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17057 of collect_register.
17058 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17059
17060 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17061
17062 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17063 instead of linux-ppc64-low.o.
17064 * linux-ppc64-low.c: Remove file.
17065 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17066 (linux-ppc64-low.o): Remove rule.
17067
17068 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17069 (init_registers_powerpc_64): Likewise.
17070 (ppc_regmap): Conditionally define depending on __powerpc64__.
17071 (ppc_cannot_store_register): Do not special-case "fpscr" when
17072 compiled on __powerpc64__.
17073 (ppc_collect_ptrace_register): New function.
17074 (ppc_supply_ptrace_register): New function.
17075 (ppc_breakpoint): Change type to "unsigned int".
17076 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17077 (the_low_target): Conditionally provide initializers for the
17078 arch_setup member depending on __powerpc64__. Install
17079 collect_ptrace_register and supply_ptrace_register members.
17080
17081 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17082
17083 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17084 * server.c (gdbserver_xmltarget): Define.
17085 (get_features_xml): Use it to replace "target.xml" and arch_string.
17086
17087 * configure.srv: Remove srv_xmltarget. Add XML files that were
17088 mentioned there to srv_xmlfiles instead. Remove conditional tests
17089 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17090 srv_xmlfiles and srv_regobj to include all possible choices.
17091 * configure.ac (srv_xmltarget): Remove.
17092 (srv_xmlfiles): Do not add "target.xml".
17093 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17094 checks for supplementary target information.
17095 * configure: Regenerate.
17096 * Makefile.in (XML_TARGET): Remove.
17097 (target.xml): Remove rule.
17098 (clean): Do not clean up target.xml.
17099 (.PRECIOUS): Do not mention target.xml.
17100
17101 * target.h (struct target_ops): Remove arch_string member.
17102 * linux-low.c (linux_arch_string): Remove.
17103 (linux_target_ops): Remove arch_string initializer.
17104 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17105 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17106 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17107 * spu-low.c (spu_arch_string): Remove.
17108 (spu_target_ops): Remove arch_string initializer.
17109 * win32-low.c (win32_arch_string): Remove.
17110 (win32_target_ops): Remove arch_string initializer.
17111 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17112 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17113 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17114
17115 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17116
17117 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17118 by collect_ptrace_register and supply_ptrace_register hooks.
17119 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17120 instead of checking for the_low_target.left_pad_xfer.
17121 (usr_store_inferior_registers): Use collect_ptrace_register callback
17122 instead of checking for the_low_target.left_pad_xfer.
17123
17124 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17125 (s390_supply_ptrace_register): Likewise.
17126 (s390_fill_gregset): Call s390_collect_ptrace_register.
17127 (the_low_target): Update.
17128
17129 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17130 (ppc_supply_ptrace_register): Likewise.
17131 (the_low_target): Update.
17132
17133 * linux-i386-low.c (the_low_target): Update.
17134 * linux-x86-64-low.c (the_low_target): Update.
17135
17136 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17137
17138 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17139 reg-s390.o and reg-s390x.o.
17140
17141 * linux-low.c (new_inferior): New global variable.
17142 (linux_create_inferior, linux_attach): Set it.
17143 (linux_wait_for_process): Call the_low_target.arch_setup after the
17144 target has stopped for the first time.
17145 (initialize_low): Do not call the_low_target.arch_setup.
17146
17147 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17148 (s390_set_pc): Likewise.
17149 (s390_arch_setup): New function.
17150 (the_low_target): Use s390_arch_setup as arch_setup routine.
17151
17152 * regcache.c (realloc_register_cache): New function.
17153 (set_register_cache): Call it for each existing regcache.
17154
17155 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17156
17157 * server.h (init_registers): Remove prototype.
17158
17159 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17160 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17161 instead of init_registers ().
17162 * linux-arm-low.c (init_registers_arm): Add prototype.
17163 (init_registers_arm_with_iwmmxt): Likewise.
17164 (the_low_target): Add initializer for arch_setup field.
17165 * linux-cris-low.c (init_registers_cris): Add prototype.
17166 (the_low_target): Add initializer for arch_setup field.
17167 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17168 (the_low_target): Add initializer for arch_setup field.
17169 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17170 (the_low_target): Add initializer for arch_setup field.
17171 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17172 (the_low_target): Add initializer for arch_setup field.
17173 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17174 (the_low_target): Add initializer for arch_setup field.
17175 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17176 (the_low_target): Add initializer for arch_setup field.
17177 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17178 (init_registers_mips64_linux): Likewise.
17179 (the_low_target): Add initializer for arch_setup field.
17180 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17181 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17182 (the_low_target): Add initializer for arch_setup field.
17183 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17184 (init_registers_powerpc_64): Likewise.
17185 (the_low_target): Add initializer for arch_setup field.
17186 * linux-s390-low.c (init_registers_s390): Add prototype.
17187 (init_registers_s390x): Likewise.
17188 (the_low_target): Add initializer for arch_setup field.
17189 * linux-sh-low.c (init_registers_sh): Add prototype.
17190 (the_low_target): Add initializer for arch_setup field.
17191 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17192 (the_low_target): Add initializer for arch_setup field.
17193 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17194 (the_low_target): Add initializer for arch_setup field.
17195
17196 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17197 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17198 instead of init_registers ().
17199 * win32-arm-low.c (init_registers_arm): Add prototype.
17200 (the_low_target): Add initializer for arch_setup field.
17201 * win32-i386-low.c (init_registers_i386): Add prototype.
17202 (the_low_target): Add initializer for arch_setup field.
17203
17204 * spu-low.c (init_registers_spu): Add prototype.
17205 (initialize_low): Call initialie_registers_spu () instead of
17206 initialize_registers ().
17207
17208 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17209
17210 * server.c (handle_v_requests): When handling the vRun and vAttach
17211 packets, if already debugging a process, don't kill it. Return an
17212 error instead.
17213
17214 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17215
17216 * server.c (handle_query): Correct length check.
17217
17218 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17219
17220 * win32-low.c (do_initial_child_stuff): Add process handle
17221 parameter. Set current_process_handle and current_process_id from the
17222 parameters. Clear globals.
17223 (win32_create_inferior): Don't set current_process_handle and
17224 current_process_id here. Instead pass them on the call to
17225 do_initial_child_stuff.
17226 (win32_attach): Likewise.
17227 (win32_clear_inferiors): New.
17228 (win32_kill): Don't close the current process handle or the
17229 current thread handle here. Instead call win32_clear_inferiors.
17230 (win32_detach): Don't open a new handle to the process. Call
17231 win32_clear_inferiors.
17232 (win32_join): Don't rely on current_process_handle; open a new
17233 handle using the process id.
17234 (win32_wait): Call win32_clear_inferiors when the inferior process
17235 has exited.
17236
17237 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17238
17239 * server.c (monitor_show_help): Add "exit".
17240
17241 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17242
17243 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17244 (clean): Add reg-xtensa.c.
17245 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17246 * configure.srv (xtensa*-*-linux*) New target.
17247 * linux-xtensa-low.c: New.
17248 * xtensa-xtregs.c: New.
17249
17250 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17251
17252 * hostio.c: Don't include errno.h.
17253 (errno_to_fileio_errno): Move to hostio-errno.
17254 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17255 error number outputting to the target->hostio_last_error callback.
17256 (hostio_packet_error): Use FILEIO_EINVAL directly.
17257 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17258 calls to hostio_error.
17259 * hostio-errno.c: New.
17260 * server.h (hostio_last_error_from_errno): Declare.
17261 * target.h (target_ops): Add hostio_last_error member.
17262 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17263 as hostio_last_error handler.
17264 * spu-low.c (spu_target_ops): Likewise.
17265 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17266 (wince_hostio_last_error): New functions.
17267 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17268 as hostio_last_error handler.
17269 (win32_target_ops) [!_WIN32_WCE]: Register
17270 hostio_last_error_from_errno as hostio_last_error handler.
17271 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17272 (hostio-errno.o): New rule.
17273 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17274 * configure.srv (srv_hostio_err_objs): New variable. Default to
17275 hostio-errno.o.
17276 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17277 * configure: Regenerate.
17278
17279 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17280
17281 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17282 (linux_kill, linux_detach): Clean up the process list.
17283 * remote-utils.c (remote_open): Improve port number parsing.
17284 (putpkt_binary, input_interrupt): Only send interrupts if the target
17285 is running.
17286 * server.c (extended_protocol): Make static.
17287 (attached): Define earlier.
17288 (exit_requested, response_needed, program_argv): New variables.
17289 (target_running): New.
17290 (start_inferior): Clear attached here.
17291 (attach_inferior): Set attached here.
17292 (require_running): Define.
17293 (handle_query): Use require_running and target_running. Implement
17294 "monitor exit".
17295 (handle_v_attach, handle_v_run): New.
17296 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17297 (gdbserver_usage): Update.
17298 (main): Redo argument parsing. Handle --debug and --multi. Handle
17299 --attach along with other options or after the port. Save
17300 program_argv. Support no initial program. Resynchronize
17301 communication with GDB after an error. Handle "monitor exit".
17302 Use require_running and target_running. Always allow the extended
17303 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17304 restart in extended mode.
17305 * README: Refer to the GDB manual. Update --attach usage.
17306
17307 2007-12-20 Andreas Schwab <schwab@suse.de>
17308
17309 * linux-low.c (STACK_SIZE): Define.
17310 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17311 (linux_test_for_tracefork): Likewise.
17312
17313 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17314
17315 * linux-low.c (linux_wait_for_event): Update messages. Do not
17316 reinsert auto-delete breakpoints.
17317 * mem-break.c (struct breakpoint): Change return type of handler to
17318 int.
17319 (set_breakpoint_at): Update handler type.
17320 (reinsert_breakpoint_handler): Return 1 instead of calling
17321 delete_breakpoint.
17322 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17323 setting a new one.
17324 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17325 * mem-break.h (set_breakpoint_at): Update handler type.
17326 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17327 * win32-low.c (auto_delete_breakpoint): New.
17328 (get_child_debug_event): Use it.
17329
17330 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17331
17332 * configure.ac: Check for pread and pwrite.
17333 * hostio.c (handle_pread): Fall back to lseek and read.
17334 (handle_pwrite): Fall back to lseek and write.
17335 * config.in, configure: Regenerated.
17336
17337 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17338
17339 * server.c (myresume): Add own_buf argument.
17340 (main): Update calls.
17341
17342 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17343
17344 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17345 * remote-utils.c (remote_open): Do not call disable_async_io.
17346 (block_async_io): Delete.
17347 (unblock_async_io): Make static.
17348 (initialize_async_io): New.
17349 * server.c (handle_v_cont): Handle async I/O here.
17350 (myresume): Likewise. Move other common resume tasks here...
17351 (main): ... from here. Call initialize_async_io. Disable async
17352 I/O before the main loop.
17353 * server.h (initialize_async_io): Declare.
17354 (block_async_io, unblock_async_io): Delete prototypes.
17355 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17356
17357 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17358
17359 * remote-utils.c (readchar): Allow binary data in received messages.
17360
17361 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17362
17363 * win32-low.c (attaching): New global.
17364 (win32_create_inferior): Clear the `attaching' global.
17365 (win32_attach): Set the `attaching' global.
17366 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17367 attaching. Only set a breakpoint at the entry point if not
17368 attaching.
17369
17370 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17371
17372 * server.c (main): Don't report dll events on the initial
17373 connection on attaches.
17374
17375 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17376
17377 * server.c (main): Relax numerical bases supported for the pid of
17378 the --attach command line argument.
17379
17380 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17381
17382 * win32-low.c (win32_attach): Call OpenProcess before
17383 DebugActiveProcess, not after. Add last error output to error
17384 call.
17385
17386 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17387
17388 * win32-low.c (win32_get_thread_context)
17389 (win32_set_thread_context): New functions.
17390 (thread_rec): Use win32_get_thread_context.
17391 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17392 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17393 field.
17394
17395 2007-12-03 Leo Zayas
17396 Pedro Alves <pedro_alves@portugalmail.pt>
17397
17398 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17399 global variables.
17400 (child_add_thread): Minor cleanup.
17401 (child_continue): Resume artificially suspended threads before
17402 calling ContinueDebugEvent.
17403 (suspend_one_thread): New.
17404 (fake_breakpoint_event): New.
17405 (get_child_debug_event): Change return type to int. Check here if
17406 gdb sent an interrupt request. If a soft interrupt was requested,
17407 fake a breakpoint event. Return 0 if there is no event to handle,
17408 and 1 otherwise.
17409 (win32_wait): Don't check here if gdb sent an interrupt request.
17410 Ensure there is a valid event to handle.
17411 (win32_request_interrupt): Add soft interruption method as last
17412 resort.
17413
17414 2007-12-03 Leo Zayas
17415 Pedro Alves <pedro_alves@portugalmail.pt>
17416
17417 * win32-low.h (win32_thread_info): Add descriptions to the
17418 structure members. Replace `suspend_count' counter by a
17419 `suspended' flag.
17420 * win32-low.c (thread_rec): Update condition of when to get the
17421 context from the inferior. Rely on ContextFlags being set if it
17422 has already been retrieved. Only suspend the inferior thread if
17423 we haven't already. Warn if that fails.
17424 (continue_one_thread): s/suspend_count/suspended/. Only call
17425 ResumeThread once. Warn if that fails.
17426
17427 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17428
17429 * win32-low.c (win32_wait): Don't read from the inferior when it
17430 has already exited.
17431
17432 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17433
17434 * Makefile.in (win32_low_h): New variable.
17435 (win32-low.o): Add dependency on $(win32_low_h).
17436 (win32-arm-low.o, win32-i386-low.o): New rules.
17437
17438 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17439
17440 * hostio.c: Correct copyright year.
17441
17442 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17443
17444 * Makefile.in (OBS): Add hostio.o.
17445 (hostio.o): New rule.
17446 * server.h (handle_vFile): Declare.
17447 * hostio.c: New file.
17448 * server.c (handle_v_requests): Take packet_len and new_packet_len
17449 for binary packets. Call handle_vFile.
17450 (main): Update call to handle_v_requests.
17451
17452 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17453
17454 * linux-low.c: Include <sched.h>.
17455
17456 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17457
17458 * linux-low.c (linux_tracefork_grandchild): New.
17459 (linux_tracefork_child): Use clone.
17460 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17461
17462 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17463
17464 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17465
17466 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17467
17468 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17469
17470 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17471
17472 * inferiors.c (change_inferior_id): Delete.
17473 (add_pid_to_list, pull_pid_from_list): New.
17474 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17475 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17476 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17477 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17478 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17479 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17480 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17481 (using_threads): Always set to 1.
17482 (handle_extended_wait): New.
17483 (add_process): Do not set TID.
17484 (linux_create_inferior): Set must_set_ptrace_flags.
17485 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17486 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17487 (linux_thread_alive): Rename TID argument to LWPID.
17488 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17489 (linux_wait_for_event): Do not use TID or check using_threads. Update
17490 call to dead_thread_notify. Call handle_extended_wait.
17491 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17492 (send_sigstop): Delete sigstop_sent.
17493 (wait_for_sigstop): Avoid TID.
17494 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17495 (linux_test_for_tracefork): New.
17496 (linux_lookup_signals): Use thread_db_active and
17497 linux_supports_tracefork_flag.
17498 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17499 * linux-low.h (get_process_thread): Avoid TID.
17500 (struct process_ifo): Move thread_known and tid to the end. Remove
17501 sigstop_sent.
17502 (linux_attach_lwp, thread_db_init): Update prototypes.
17503 * server.h (change_inferior_id): Delete prototype.
17504 (add_pid_to_list, pull_pid_from_list): New prototypes.
17505 * thread-db.c (thread_db_use_events): New.
17506 (find_first_thread): Rename to...
17507 (find_one_thread): ...this. Update callers and messages. Do not
17508 call fatal. Check thread_db_use_events. Do not call
17509 change_inferior_id or new_thread_notify.
17510 (maybe_attach_thread): Update. Do not call new_thread_notify.
17511 (thread_db_init): Set thread_db_use_events. Check use_events.
17512 * utils.c (fatal, warning): Correct message prefix.
17513
17514 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17515
17516 * Makefile.in (clean): Remove new files.
17517 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17518 (powerpc-64.o, powerpc-64.c): New rules.
17519 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17520 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17521 with SPE.
17522 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17523 SPE targets.
17524 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17525 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17526 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17527 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17528 (target_regsets): Add AltiVec and SPE register sets.
17529 * configure.ac: Check for AltiVec and SPE.
17530 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17531 (ppc_fill_vrregset, ppc_store_vrregset): New.
17532 (target_regsets): Add AltiVec register set.
17533 * configure: Regenerated.
17534
17535 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17536
17537 * linux-low.c (O_LARGEFILE): Define.
17538 (linux_read_memory): Use /proc/PID/mem.
17539 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17540 * configure, config.in: Regenerated.
17541
17542 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17543
17544 * linux-low.c (linux_wait_for_event): Do not pass signals while
17545 single-stepping.
17546
17547 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17548
17549 * win32-low.c (create_process): New.
17550 (win32_create_inferior): Use create_process instead of
17551 CreateProcess. If create_process failed retry appending an ".exe"
17552 suffix. Store the GetLastError result immediatelly after
17553 create_process calls and use it on the call to error.
17554
17555 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17556
17557 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17558
17559 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17560
17561 * configure.ac: Switch license to GPLv3.
17562
17563 2007-08-01 Michael Snyder <msnyder@access-company.com>
17564
17565 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17566
17567 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17568
17569 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17570 typedef.
17571 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17572 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17573 CloseToolhelp32Snapshot.
17574 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17575 CloseToolhelp32Snapshot.
17576
17577 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17578
17579 * server.c (main): Check for inferior exit before main loop.
17580
17581 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17582
17583 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17584 instead of on tmp_desc.
17585
17586 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17587 Daniel Jacobowitz <dan@codesourcery.com>
17588
17589 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17590 (add_thread): Minor cleanups.
17591 (clear_inferiors): Move lower in the file. Clear the DLL
17592 list.
17593 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17594 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17595 (xml_escape_text): New.
17596 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17597 for qSupported.
17598 (handle_v_cont): Report errors.
17599 (gdbserver_version): Update.
17600 (main): Correct size of own_buf. Do not report initial DLL events.
17601 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17602 (unloaded_dll, xml_escape_text): New.
17603 * win32-low.c (enum target_waitkind): Update comments.
17604 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17605 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17606 (win32_EnumProcessModules, win32_GetModuleInformation)
17607 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17608 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17609 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17610 (win32_Module32First, win32_Module32Next, load_toolhelp)
17611 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17612 (get_child_debug_event): Handle DLL events.
17613 (win32_wait): Likewise.
17614
17615 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17616
17617 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17618 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17619
17620 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17621
17622 * win32-low.c (handle_output_debug_string): Ignore event if not
17623 waiting.
17624
17625 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17626
17627 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17628
17629 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17630
17631 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17632
17633 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17634
17635 * inferiors.c (change_inferior_id): Add comment.
17636 * linux-low.c (check_removed_breakpoint): Add an early
17637 prototype. Improve debug output.
17638 (linux_attach): Doc update.
17639 (linux_detach_one_process, linux_detach): Clean up before releasing
17640 each process.
17641 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17642 * linux-low.h (struct process_info): Doc improvement.
17643 * mem-break.c (delete_all_breakpoints): New.
17644 * mem-break.h (delete_all_breakpoints): New prototype.
17645 * thread-db.c (find_first_thread): New.
17646 (thread_db_create_event): Call it instead of
17647 thread_db_find_new_threads. Clean up unused variables.
17648 (maybe_attach_thread): Remove first thread handling.
17649 (thread_db_find_new_threads): Use find_first_thread.
17650 (thread_db_get_tls_address): Likewise.
17651
17652 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17653
17654 * thread-db.c (thread_db_find_new_threads): Add prototype.
17655 (thread_db_create_event): Check for the main thread before adding
17656 a new thread.
17657 (maybe_attach_thread): Only enable event reporting if TID == 0.
17658 (thread_db_get_tls_address): Check for new threads.
17659
17660 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17661
17662 * linux-low.c (linux_create_inferior): Try execv before execvp.
17663 * spu-low.c (spu_create_inferior): Likewise.
17664
17665 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17666
17667 * linux-low.c (linux_create_inferior): Change execv to execvp.
17668 * spu-low.c (spu_create_inferior): Likewies.
17669
17670 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17671
17672 * Makefile.in (clean): Clean new files instead of deleted ones.
17673 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17674 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17675 rules.
17676 * configure.srv: Specify XML files and new regformats for MIPS and
17677 MIPS64 GNU/Linux.
17678 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17679 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17680 an entry for the restart register.
17681 (mips_cannot_fetch_register, mips_cannot_store_register)
17682 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17683 register names to match the XML descriptions.
17684 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17685 restart register instead of $0.
17686
17687 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17688 Markus Deuling <deuling@de.ibm.com>
17689
17690 * remote-utils.c (decode_xfer_write): New function.
17691 * server.h (decode_xfer_write): Add prototype.
17692 * server.c (handle_query): Add PACKET_LEN argument. Support
17693 qXfer:spu:read and qXfer:spu:write packets.
17694 (main): Pass packet_len to handle_query.
17695 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17696 * target.h (target_ops): Add qxfer_spu.
17697
17698 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17699
17700 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17701 accessing non-seekable spufs files.
17702
17703 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17704
17705 * server.c (handle_query): Add reply for qC packet.
17706
17707 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17708 Leo Zayas <lerele@champenstudios@com>
17709
17710 * server.h (check_remote_input_interrupt_request): New function.
17711 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17712 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17713 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17714 (check_remote_input_interrupt_request): New function.
17715 * server.h (check_remote_input_interrupt_request): Declare.
17716 * win32-low.c (winapi_DebugBreakProcess,
17717 winapi_GenerateConsoleCtrlEvent): New typedefs.
17718 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17719 to 250 ms.
17720 (win32_wait): Check for remote interrupt request
17721 with check_remote_input_interrupt_request.
17722 (win32_request_interrupt): New function.
17723 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17724
17725 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17726
17727 * win32-low.c (debug_registers_changed,
17728 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17729 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17730 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17731 (thread_rec): Get context using the low target.
17732 (child_add_thread): Call thread_added on the low target,
17733 which does the same thing.
17734 (regptr): Delete.
17735 (do_initial_child_stuff): Remove debug registers references.
17736 Set context using the low target. Resume threads after
17737 setting the contexts.
17738 (child_continue): Remove dead variable. Remove debug
17739 registers references.
17740 (child_fetch_inferior_registers): Go through the low target.
17741 (do_child_store_inferior_registers): Remove.
17742 (child_store_inferior_registers): Go through the low target.
17743 (win32_resume): Remove debug registers references.
17744 Set context using the low target.
17745 (handle_exception): Change return type to void. Don't record
17746 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17747 first chance exception.
17748 (get_child_debug_event): Change return type to void. Remove
17749 goto loop. Always return after waiting for debug event.
17750 (win32_wait): Convert to switch statement. Handle spurious
17751 events.
17752
17753 * win32-i386-low.c (debug_registers_changed,
17754 debug_registers_used): New.
17755 (initial_stuff): Rename to ...
17756 (i386_initial_stuff): ... this. Clear debug registers
17757 state variables.
17758 (store_debug_registers): Delete.
17759 (i386_get_thread_context): New.
17760 (load_debug_registers): Delete.
17761 (i386_set_thread_context): New.
17762 (i386_thread_added): New.
17763 (single_step): Rename to ...
17764 (i386_single_step): ... this.
17765 (do_fetch_inferior_registers): Rename to ...
17766 (i386_fetch_inferior_register): ... this.
17767 (i386_store_inferior_register): New.
17768 (the_low_target): Adapt to new interface.
17769
17770 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17771 (arm_get_thread_context): New.
17772 (arm_set_thread_context): New.
17773 (regptr): New.
17774 (do_fetch_inferior_registers): Rename to ...
17775 (arm_fetch_inferior_register): ... this.
17776 (arm_store_inferior_register): New.
17777 (arm_wince_breakpoint): Reimplement as unsigned long.
17778 (arm_wince_breakpoint_len): Define.
17779 (the_low_target): Adapt to new interface.
17780
17781 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17782 load_debug_registers. Add get_thread_context, set_thread_context,
17783 thread_added and store_inferior_register. Rename
17784 fetch_inferior_registers to fetch_inferior_register.
17785 (regptr): Remove declaration.
17786
17787 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17788
17789 * linux-low.c (linux_detach): Change return type to int. Return 0.
17790 * spu-low.c (spu_detach): Likewise.
17791
17792 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17793
17794 * target.h (target_ops): Change return type of detach to int.
17795 Add join.
17796 (join_inferior): New.
17797 * server.c (main): Don't skip detach support on mingw32.
17798 If the inferior doesn't support detaching return error.
17799 Call join_inferior instead of using waitpid.
17800 * linux-low.c (linux_join): New.
17801 (linux_target_op): Add linux_join.
17802 * spu-low.c (spu_join): New.
17803 (spu_target_ops): Add spu_join.
17804 * win32-low.c (win32_detach): Adapt to new interface.
17805 Reopen current_process_handle before detaching. Issue a child
17806 resume before detaching.
17807 (win32_join): New.
17808 (win32_target_op): Add win32_join.
17809
17810 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17811
17812 * win32-low.c (win32-attach): Fix return value.
17813 * target.h (target_ops): Describe ATTACH return values.
17814
17815 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17816
17817 * win32-low.c (GETPROCADDRESS): Define.
17818 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17819 (winapi_DebugSetProcessKillOnExit): Likewise.
17820 (win32_create_inferior): Force usage of ansi CreateProcessA.
17821 (win32_attach): Use GETPROCADDRESS.
17822 (win32_detach): Likewise.
17823
17824 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17825
17826 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17827
17828 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17829
17830 * win32-low.c: Commit leftover changes from 2007-03-29.
17831
17832 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17833
17834 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17835 fields short instead of int. Add explicit padding.
17836 (i387_cache_to_fsave): Remove unnecessary casts.
17837 (i387_fsave_to_cache): Doc fix.
17838 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17839
17840 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17841
17842 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17843 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17844
17845 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17846
17847 * configure.srv (arm*-*-mingw32ce*): Move near the other
17848 arm targets.
17849
17850 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17851
17852 * configure.ac: Add errno checking.
17853 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17854 sys/file.h and malloc.h.
17855 (AC_CHECK_DECLS): Add perror.
17856 (srv_mingwce): Handle.
17857 * configure.srv (i[34567]86-*-cygwin*): Add
17858 win32-i386-low.o to srv_tgtobj.
17859 (i[34567]86-*-mingw*): Likewise.
17860 (arm*-*-mingw32ce*): Add case.
17861 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17862 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17863 [__MINGW32CE__] (strerror): New function.
17864 [__MINGW32CE__] (errno): Define to GetLastError.
17865 [__MINGW32CE__] (COUNTOF): New macro.
17866 (remote_open): Remove extra close call.
17867 * mem-break.c (delete_breakpoint_at): New function.
17868 * mem-break.h (delete_breakpoint_at): Declare.
17869 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17870 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17871 [USE_WIN32API] (read, write): Add char* casts.
17872 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17873 * server.h: Include wincecompat.h on Windows CE.
17874 [HAVE_ERRNO_H]: Check.
17875 (perror): Declare if not declared.
17876 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17877 (perror_with_name): Remove errno declaration.
17878 * wincecompat.h: New.
17879 * wincecompat.c: New.
17880 * win32-low.h: New.
17881 * win32-arm-low.c: New.
17882 * win32-i386-low.c: New.
17883 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
17884 (OUTMSG2): Make it safe.
17885 (_T): New macro.
17886 (COUNTOF): New macro.
17887 (NUM_REGS): Get it from the low target.
17888 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
17889 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
17890 (thread_rec): Let low target handle debug registers.
17891 (child_add_thread): Likewise.
17892 (child_init_thread_list): Likewise.
17893 (continue_one_thread): Likewise.
17894 (regptr): New.
17895 (do_child_fetch_inferior_registers): Move to ...
17896 * win32-i386-low.c: ... here, and rename to ...
17897 (do_fetch_inferior_registers): ... this.
17898 * win32-low.c (child_fetch_inferior_registers):
17899 Go through the low target.
17900 (do_child_store_inferior_registers): Use regptr.
17901 (strwinerror): New function.
17902 (win32_create_inferior): Handle Windows CE.
17903 Use strwinerror instead of strerror on Windows error
17904 codes. Add program to the error output.
17905 Don't close the main thread handle on Windows CE.
17906 (win32_attach): Use coredll.dll on Windows CE.
17907 (win32_kill): Close current process and current
17908 thread handles.
17909 (win32_detach): Use coredll.dll on Windows CE.
17910 (win32_resume): Let low target handle debug registers, and
17911 step request.
17912 (handle_exception): Add/Remove initial breakpoint. Avoid
17913 non-existant WSTOPSIG on Windows CE.
17914 (win32_read_inferior_memory): Cast to remove warning.
17915 (win32_arch_string): Go through the low target.
17916 (initialize_low): Call set_breakpoint_data with the low
17917 target's breakpoint.
17918 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
17919 FOP_REGNUM, mappings): Move to ...
17920 * win32-i386-low.c: ... here.
17921 * win32-low.c (win32_thread_info): Move to ...
17922 * win32-low.h: ... here.
17923 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
17924 win32-arm-low.c and wincecompat.c.
17925 (all:): Add $EXEEXT.
17926 (install-only:): Likewise.
17927 (gdbserver:): Likewise.
17928 (gdbreplay:): Likewise.
17929 * config.in: Regenerate.
17930 * configure: Regenerate.
17931
17932 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17933
17934 * win32-low.c: Rename typedef thread_info to
17935 win32_thread_info throughout.
17936
17937 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
17938
17939 * win32-i386-low.c: Rename to ...
17940 * win32-low.c: ... this.
17941 * configure.srv: Replace win32-i386-low.o with win32-low.o.
17942 * Makefile.in: Likewise.
17943
17944 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
17945
17946 * remote-utils.c (monitor_output): Constify msg parameter.
17947 * server.h (monitor_output): Likewise.
17948 * win32-i386-low.c (handle_output_debug_string): New.
17949 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
17950 handle_output_debug_string.
17951 (get_child_debug_event): Likewise.
17952
17953 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
17954
17955 * server.c (main): Correct strtoul check.
17956
17957 2007-03-27 Jon Ringle <jon@ringle.org>
17958
17959 * linux-low.c: Check __ARCH_HAS_MMU__ also.
17960
17961 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
17962
17963 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
17964
17965 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
17966
17967 * terminal.h: Check HAVE_SGTTY_H.
17968
17969 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
17970
17971 * remote-utils.c (remote_open): Print out the assigned port number.
17972
17973 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
17974
17975 * remote-utils.c (monitor_output): New function.
17976 * server.c (debug_threads): Define here.
17977 (monitor_show_help): New function.
17978 (handle_query): Handle qRcmd.
17979 (main): Do not handle 'd' packet.
17980 * server.h (debug_threads, remote_debug, monitor_output): Declare.
17981 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
17982 of debug_threads.
17983
17984 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17985
17986 * Makefile.in (EXEEXT): New.
17987 (clean): Use $(EXEEXT).
17988
17989 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
17990
17991 * target.h (target_ops): Rename send_signal to request_interrupt,
17992 and remove enum target_signal parameter.
17993 * linux-low.c (linux_request_interrupt): Rename from
17994 linux_send_signal, and always send SIGINT.
17995 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
17996 and always send SIGINT.
17997 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
17998 of send_signal.
17999 (input_interrupt): Likewise.
18000
18001 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18002
18003 * server.c (get_features_xml): Check if target implemented
18004 arch_string.
18005 * win32-i386-low.c (win32_arch_string): New.
18006 (win32_target_ops): Add win32_arch_string as arch_string member.
18007
18008 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18009
18010 * spu-low.c (spu_arch_string): New.
18011 (spu_target_ops): Add spu_arch_string.
18012
18013 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18014
18015 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18016 * configure.ac: Do not check for terminal.h.
18017 * configure, config.in: Regenerated.
18018
18019 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18020
18021 * Makefile.in (OBS): Add $(XML_BUILTIN).
18022 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18023 (clean): Update.
18024 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18025 (arm-with-iwmmxt.c): New.
18026 * config.in, configure: Regenerate.
18027 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18028 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18029 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18030 (arm*-*-linux*): Add iWMMXt and regset support.
18031 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18032 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18033 (arm_store_wmmxregset, target_regsets): New.
18034 * server.c (get_features_xml): Take annex argument. Check builtin
18035 XML documents.
18036 (handle_query): Handle multiple annexes.
18037
18038 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18039
18040 * remote-utils.c [USE_WIN32API] (read, write): Define.
18041 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18042 write.
18043
18044 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18045
18046 * linux-i386-low.c (the_low_target): Set arch_string.
18047 * linux-x86-64-low.c (the_low_target): Likewise.
18048 * linux-low.c (linux_arch_string): New.
18049 (linux_target_ops): Add it.
18050 * linux-low.h (struct linux_target_ops): Add arch_string.
18051 * server.c (write_qxfer_response): Use const void * for DATA.
18052 (get_features_xml): New.
18053 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18054 * target.h (struct target_ops): Add arch_string method.
18055
18056 2007-01-03 Denis Pilat <denis.pilat@st.com>
18057 Daniel Jacobowitz <dan@codesourcery.com>
18058
18059 * linux-low.c (linux_kill): Handle being called with no threads.
18060 * win32-i386-low.c (win32_kill): Likewise.
18061 (get_child_debug_event): Clear current_process_handle.
18062
18063 2006-12-30 Denis PILAT <denis.pilat@st.com>
18064 Daniel Jacobowitz <dan@codesourcery.com>
18065
18066 * remote-utils.c (remote_open): Check the type of specified
18067 serial port devices before opening them.
18068 * server.c (main): Kill the inferior if an error occurs during
18069 the first remote_open.
18070
18071 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18072
18073 * README: Update supported targets.
18074
18075 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18076
18077 * Makefile.in (clean): Remove reg-mips64.c.
18078 (reg-mips64.c, reg-mips64.o): New rules.
18079 * configure.srv: Handle mips64. Include regset support for mips.
18080 * linux-mips-low.c (union mips_register): New.
18081 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18082 (mips_breakpoint, mips_breakpoint_at): Use int.
18083 (mips_collect_register, mips_supply_register)
18084 (mips_collect_register_32bit, mips_supply_register_32bit)
18085 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18086 (mips_store_fpregset, target_regsets): New.
18087 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18088
18089 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18090
18091 * configure.srv: Add target "spu*-*-*".
18092 * Makefile.in (clean): Remove reg-spu.c.
18093 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18094 * spu-low.c: New file.
18095
18096 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18097
18098 * configure.ac: Correct td_thr_tls_get_addr test.
18099 * configure: Regenerated.
18100
18101 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18102
18103 * linux-low.c (linux_wait_for_event): Reformat. Use the
18104 pass_signals array.
18105 * remote-utils.c (decode_address_to_semicolon): New.
18106 * server.c (pass_signals, handle_general_set): New.
18107 (handle_query): Mention QPassSignals for qSupported.
18108 (main): Call handle_general_set.
18109 * server.h (pass_signals, decode_address_to_semicolon): New.
18110
18111 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18112
18113 * server.c (handle_query): Correct error handling for read_auxv.
18114
18115 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18116
18117 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18118 and srv_linux_thread_db to yes.
18119 * linux-s390-low.c (s390_fill_gregset): New function.
18120 (target_regsets): Define data structure.
18121
18122 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18123
18124 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18125 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18126 * config.in, configure: Regenerated.
18127 * inferiors.c (gdb_id_to_thread): New function.
18128 (gdb_id_to_thread_id): Use it.
18129 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18130 * linux-low.h (struct process_info): Add th member.
18131 (thread_db_get_tls_address): New prototype.
18132 * remote-utils.c (decode_address): Make non-static.
18133 * server.c (handle_query): Handle qGetTLSAddr.
18134 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18135 * target.h (struct target_ops): Add get_tls_address.
18136 * thread-db.c (maybe_attach_thread): Save the thread handle.
18137 (thread_db_get_tls_address): New.
18138
18139 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18140
18141 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18142 (linux_resume_one_process): Take a siginfo_t *. Update all
18143 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18144 (struct pending_signals): Add a siginfo_t.
18145 (linux_wait_for_process): Always set last_status.
18146 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18147 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18148 * linux-low.h (struct process_info): Add last_status.
18149
18150 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18151
18152 * remote-utils.c (try_rle): New function.
18153 (putpkt_binary): Use it.
18154
18155 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18156
18157 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18158 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18159 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18160 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18161 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18162 point registers.
18163
18164 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18165
18166 * server.c (terminal_fd): New variable.
18167 (old_foreground_pgrp): Likewise.
18168 (restore_old_foreground_pgrp): New function.
18169 (start_inferior): Record the terminal file descriptor in terminal_fd
18170 and its original foreground group in old_foreground_pgrp. Register
18171 restore_old_foreground_pgrp with atexit().
18172
18173 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18174
18175 * server.c (handle_query): Correct qPart to qXfer.
18176
18177 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18178
18179 * configure.ac: Check for more headers which are missing on
18180 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18181 * configure.srv: Add Cygwin and mingw32.
18182 * remote-utils.c: Don't include headers unconditionally which
18183 are missing on mingw32. Include <winsock.h> for mingw32.
18184 (remote_open): Adjust for mingw32 support. Flush
18185 standard error after writing to it.
18186 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18187 (unblock_async_io, enable_async_io, disable_async_io)
18188 (readchar, getpkt): Update for Winsock support.
18189 (prepare_resume_reply): Expect a protocol signal number.
18190 * server.c: Disable <sys/wait.h> on mingw32.
18191 (start_inferior): Adjust for mingw32 support. Flush
18192 standard error after writing to it.
18193 (attach_inferior): Likewise. Use protocol signal
18194 numbers.
18195 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18196 and names.
18197 * win32-i386-low.c: New file.
18198 * Makefile.in (XM_CLIBS): Set.
18199 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18200 (win32-i386-low.o): New dependency rule.
18201 * linux-low.c (linux_wait): Use target signal numbers.
18202 * target.h (struct target_ops): Doc fix.
18203 * server.h (target_signal_to_name): New prototype.
18204 * gdbreplay.c: Don't include headers unconditionally which
18205 are missing on mingw32. Include <winsock.h> for mingw32.
18206 (remote_close, remote_open): Adjust for Winsock support.
18207 * configure, config.in: Regenerated.
18208
18209 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18210
18211 * server.c (decode_xfer_read, write_qxfer_response): New.
18212 (handle_query): Take a packet length argument. Handle
18213 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18214 the qSupported response.
18215 (main): Update call to handle_query.
18216
18217 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18218
18219 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18220 (putpkt_binary): Renamed from putpkt and adjusted for binary
18221 data.
18222 (putpkt): New wrapper for putpkt_binary.
18223 (readchar): Don't mask off the high bit.
18224 (decode_X_packet): New function.
18225 * server.c (main): Call putpkt_binary if a handler sets the packet
18226 length. Save the length of the incoming packet. Handle 'X'.
18227 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18228
18229 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18230
18231 * server.c (handle_query): Handle qSupported.
18232
18233 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18234
18235 * remote-utils.c (all_symbols_looked_up): New variable.
18236 (look_up_one_symbol): Check it.
18237 * server.h (look_up_one_symbol): New declaration.
18238 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18239
18240 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18241
18242 * Makefile.in (linux-arm-low.o): Update dependencies.
18243 * linux-arm-low.c: Include "gdb_proc_service.h".
18244 (PTRACE_GET_THREAD_AREA): Define.
18245 (ps_get_thread_area): New function.
18246
18247 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18248
18249 * configure.srv (m68k*-*-uclinux*): New target.
18250 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18251 (linux_resume_one_process): Remove extraneous cast.
18252 (linux_read_offsets): New.
18253 (linux_target_op): Add linux_read_offsets on mmuless systems.
18254 * server.c (handle_query): Add qOffsets logic.
18255 * target.h (struct target_ops): Add read_offsets.
18256
18257 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18258
18259 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18260 (PTRACE_GET_THREAD_AREA): Define.
18261 (ps_get_thread_area): New function.
18262 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18263 (linux-x86-64-low.o): Update.
18264
18265 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18266
18267 * configure.ac: Remove checks for prfpregset_t.
18268 * gdb_proc_service.h: New file.
18269 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18270 new "gdb_proc_service.h".
18271 * proc-service.c: Likewise.
18272 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18273 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18274 * Makefile.in (gdb_proc_service_h): Updated.
18275 * configure, config.in: Regenerated.
18276
18277 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18278
18279 * remote-utils.c (prepare_resume_reply): Move declaration
18280 of gdb_id_from_wait to the top of the block.
18281
18282 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18283
18284 * linux-low.c (regsets_store_inferior_registers): Read the regset
18285 from the target before filling it.
18286
18287 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18288
18289 * server.c (attach_inferior): Return SIGTRAP for a successful
18290 attach.
18291
18292 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18293
18294 * Makefile.in (OBS): Add version.o.
18295 (STAGESTUFF): Delete.
18296 (version.o): Add dependencies.
18297 (version.c): Replace rule.
18298 (clean): Remove version.c.
18299 * server.c (gdbserver_version): New.
18300 (gdbserver_usage): Use printf.
18301 (main): Handle --version and --help.
18302 * server.h (version, host_name): Add declarations.
18303
18304 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18305
18306 * linux-arm-low.c:
18307 * linux-arm-low.c:
18308 * inferiors.c:
18309 * i387-fp.h:
18310 * i387-fp.c:
18311 * gdbreplay.c:
18312 * regcache.c:
18313 * proc-service.c:
18314 * mem-break.h:
18315 * mem-break.c:
18316 * linux-x86-64-low.c:
18317 * linux-sh-low.c:
18318 * linux-s390-low.c:
18319 * linux-ppc64-low.c:
18320 * linux-ppc-low.c:
18321 * linux-mips-low.c:
18322 * linux-m68k-low.c:
18323 * linux-m32r-low.c:
18324 * linux-low.h:
18325 * linux-low.c:
18326 * linux-ia64-low.c:
18327 * linux-i386-low.c:
18328 * linux-crisv32-low.c:
18329 * thread-db.c:
18330 * terminal.h:
18331 * target.h:
18332 * target.c:
18333 * server.h:
18334 * server.c:
18335 * remote-utils.c:
18336 * regcache.h:
18337 * utils.c:
18338 * Makefile.in:
18339 * configure.ac:
18340 * gdbserver.1: Add (C) after Copyright. Update the FSF
18341 address.
18342
18343 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18344
18345 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18346 (arm_breakpoint_at): Recognize both breakpoints.
18347 (the_low_target): Use the correct breakpoint instruction.
18348
18349 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18350
18351 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18352 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18353 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18354 (the_low_target): Update.
18355
18356 2005-10-25 Andreas Schwab <schwab@suse.de>
18357
18358 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18359
18360 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18361 (ia64_num_regs): Reduce to 462.
18362
18363 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18364
18365 * acinclude.m4: Correct quoting.
18366 * aclocal.m4: Regenerated.
18367
18368 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18369 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18370 (thread_db_init): Call thread_db_err_str.
18371 * configure.ac: Check for TD_VERSION.
18372 * config.in, configure: Regenerated.
18373
18374 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18375
18376 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18377
18378 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18379
18380 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18381 is not available. Define HAVE_PTRACE_GETREGS if it is.
18382 * config.in, configure: Regenerated.
18383 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18384 * linux-i386-low.c, linux-m68k-low.c: Update to use
18385 HAVE_PTRACE_GETREGS.
18386 * linux-low.c (regsets_fetch_inferior_registers)
18387 (regsets_store_inferior_registers): Only return 0 if we processed
18388 GENERAL_REGS.
18389 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18390 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18391
18392 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18393
18394 * inferiors.c (struct thread_info): Add gdb_id.
18395 (add_thread): Add gdb_id argument.
18396 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18397 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18398 calls to add_thread.
18399 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18400 * server.c (handle_query): Use thread_to_gdb_id.
18401 (handle_v_cont, main): Use gdb_id_to_thread_id.
18402 * server.h (add_thread): Update prototype.
18403 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18404 prototypes.
18405
18406 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18407
18408 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18409 left-padded registers.
18410 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18411 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18412
18413 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18414
18415 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18416 * configure: Regenerate.
18417 * config.in: Regenerate.
18418 * server.h (NEED_DECLARATION_STRERROR):
18419 Replace with !HAVE_DECL_STRERROR.
18420
18421 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18422
18423 * linux-low.c (linux_wait, linux_send_signal): Don't test
18424 an unsigned long variable for > 0 if it could be MAX_ULONG.
18425 * server.c (myresume): Likewise.
18426 * target.c (set_desired_inferior): Likewise.
18427
18428 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18429
18430 * configure.ac: Simplify and improve check for socklen_t.
18431 * configure, config.in: Regenerate.
18432
18433 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18434
18435 * acconfig.h: Remove.
18436 * configure.ac: Add a test for socklen_t. Use three-argument
18437 AC_DEFINE throughout.
18438 * config.in: Regenerated using autoheader 2.59.
18439 * configure: Regenerated.
18440
18441 * gdbreplay.c (socklen_t): Provide a default.
18442 (remote_open): Use socklen_t.
18443 * remote-utils.c (socklen_t): Provide a default.
18444 (remote_open): Use socklen_t.
18445 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18446 unsigned char.
18447
18448 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18449 char for buffers.
18450 * linux-low.c (linux_read_memory, linux_write_memory)
18451 (linux_read_auxv): Likewise.
18452 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18453 (check_mem_write): Likewise.
18454 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18455 Likewise.
18456 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18457 (registers_from_string, register_data): Likewise.
18458 * server.c (handle_query, main): Likewise.
18459 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18460 (decode_M_packet): Likewise.
18461 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18462 * target.h (struct target_ops): Update read_memory, write_memory,
18463 and read_auxv.
18464 (read_inferior_memory, write_inferior_memory): Update.
18465 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18466 to unsigned char *.
18467 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18468 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18469 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18470 linux-s390-low.c, linux-sh-low.c: Update for changes in
18471 read_inferior_memory and the_low_target->breakpoint.
18472
18473 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18474
18475 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18476 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18477 * configure.srv: Add powerpc64-*-linux*.
18478 * linux-ppc64-low.c: New file.
18479
18480 2005-05-23 Orjan Friberg <orjanf@axis.com>
18481
18482 * linux-cris-low.c: New file with support for CRIS.
18483 * linux-crisv32-low.c: Ditto for CRISv32.
18484 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18485 (clean): Add reg-cris.c and reg-crisv32.c.
18486 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18487 reg-crisv32.o, and reg-crisv32.c to make rules.
18488 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18489 recognized targets.
18490
18491 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18492
18493 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18494 of sizeof (PTRACE_XFER_TYPE).
18495 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18496
18497 2005-05-12 Orjan Friberg <orjanf@axis.com>
18498
18499 * target.h (struct target_ops): Add insert_watchpoint,
18500 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18501 pointers for hardware watchpoint support.
18502 * linux-low.h (struct linux_target_ops): Ditto.
18503 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18504 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18505 to linux_target_ops.
18506 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18507 reply packet.
18508 * server.c (main): Recognize 'Z' and 'z' packets.
18509
18510 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18511
18512 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18513 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18514 (the_low_target): Add new members.
18515
18516 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18517
18518 * proc-service.c (ps_lgetregs): Search all_processes instead of
18519 all_threads.
18520
18521 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18522
18523 * server.c (start_inferior): Change return type to int.
18524 (attach_inferior): Change sigptr to int *.
18525 (handle_v_cont, handle_v_requests): Change signal to int *.
18526 (main): Change signal to int.
18527
18528 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18529
18530 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18531 * configure.srv: Add m32r*-*-linux*.
18532 * linux-m32r-low.c: New file.
18533
18534 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18535
18536 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18537
18538 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18539
18540 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18541 Take unsigned long arguments for PIDs.
18542 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18543 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18544 (wait_for_sigstop, linux_resume_one_process)
18545 (regsets_fetch_inferior_registers, linux_send_signal)
18546 (linux_read_auxv): Likewise. Update the types of variables holding
18547 PIDs. Update format string specifiers.
18548 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18549 * remote-utils.c (prepare_resume_reply): Likewise.
18550 * server.c (cont_thread, general_thread, step_thread)
18551 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18552 unsigned long.
18553 (handle_query): Update format specifiers.
18554 (handle_v_cont, main): Use strtoul for thread IDs.
18555 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18556 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18557 (general_thread, step_thread, thread_from_wait)
18558 (old_thread_from_wait): Update.
18559 * target.h (struct thread_resume): Use unsigned long for THREAD.
18560 (struct target_ops): Use unsigned long for arguments to attach and
18561 thread_alive.
18562
18563 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18564
18565 * acinclude.m4: Include bfd/bfd.m4 directly.
18566 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18567 <agriffis@toolchain.org>.
18568 * aclocal.m4, configure: Regenerated.
18569
18570 2005-01-07 Andrew Cagney <cagney@gnu.org>
18571
18572 * configure.ac: Rename configure.in, require autoconf 2.59.
18573 * configure: Re-generate.
18574
18575 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18576
18577 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18578 LIBS when finished.
18579 * aclocal.m4: Regenerated.
18580 * configure: Regenerated.
18581
18582 2004-11-21 Andreas Schwab <schwab@suse.de>
18583
18584 * linux-m68k-low.c (m68k_num_gregs): Define.
18585 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18586 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18587 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18588 (m68k_breakpoint_at): New. Add to the_low_target.
18589
18590 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18591 srv_linux_thread_db to yes.
18592
18593 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18594
18595 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18596 (ARCH_SET_FS): Likewise.
18597 (ARCH_GET_FS): Likewise.
18598 (ARCH_GET_GS): Likewise.
18599
18600 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18601
18602 * linux-i386-low.c (ps_get_thread_area): New.
18603 * linux-x86-64-low.c (ps_get_thread_area): New.
18604 * linux-low.c: Include <sys/syscall.h>.
18605 (linux_kill_one_process): Don't kill the first thread here.
18606 (linux_kill): Kill the first thread here.
18607 (kill_lwp): New function.
18608 (send_sigstop, linux_send_signal): Use it.
18609 * proc-service.c: Clean up #ifdefs.
18610 (fpregset_info): Delete.
18611 (ps_lgetregs): Update and enable implementation.
18612 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18613 implementations.
18614 * remote-utils.c (struct sym_cache, symbol_cache): New.
18615 (input_interrupt): Print a clearer message.
18616 (async_io_enabled): New variable.
18617 (enable_async_io, disable_async_io): Use it. Update comments.
18618 (look_up_one_symbol): Use the symbol cache.
18619 * thread-db.c (thread_db_look_up_symbols): New function.
18620 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18621
18622 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18623
18624 * configure.in: Test for -rdynamic.
18625 * configure: Regenerated.
18626 * Makefile (INTERNAL_LDFLAGS): New.
18627 (gdbserver, gdbreplay): Use it.
18628
18629 2004-09-02 Andrew Cagney <cagney@gnu.org>
18630
18631 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18632
18633 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18634
18635 * linux-low.c (linux_wait): Clear all_processes list also.
18636
18637 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18638
18639 * linux-low.c: Include <errno.h>. Remove extern declaration of
18640 errno.
18641
18642 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18643
18644 * gdbreplay.c, server.h, utils.c: Update copyright years.
18645
18646 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18647
18648 * server.c (main): Print child status or termination signal from
18649 variable 'signal', not 'sig'.
18650
18651 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18652
18653 * linux-low.c (linux_read_memory): Change return type to
18654 int. Check for and return error from ptrace().
18655 * target.c (read_inferior_memory): Change return type to int. Pass
18656 back return status from the_target->read_memory().
18657 * target.h (struct target_ops): Adapt *read_memory() prototype.
18658 Update comment.
18659 (read_inferior_memory): Adapt prototype.
18660 * server.c (main): Return an error packet if
18661 read_inferior_memory() returns an error.
18662
18663 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18664
18665 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18666 Unify with other clean targets.
18667
18668 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18669
18670 * server.c (handle_v_cont): Call set_desired_inferior.
18671
18672 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18673
18674 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18675
18676 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18677
18678 * linux-low.c (linux_wait): Unblock async I/O.
18679 (linux_resume): Block and enable async I/O.
18680 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18681 * server.h (block_async_io, unblock_async_io): Add prototypes.
18682
18683 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18684
18685 * remote-utils.c (remote_open): Print a status notice after
18686 opening a TCP port.
18687 * server.c (attach_inferior): Print a status notice after
18688 attaching.
18689
18690 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18691
18692 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18693
18694 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18695
18696 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18697 error packet.
18698 * server.c, target.h: Update copyright years.
18699
18700 2004-02-25 Roland McGrath <roland@redhat.com>
18701
18702 * target.h (struct target_ops): New member `read_auxv'.
18703 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18704 * linux-low.c (linux_read_auxv): New function.
18705 (linux_target_ops): Initialize `read_auxv' member to that.
18706
18707 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18708
18709 Committed by Jim Blandy <jimb@redhat.com>.
18710
18711 * linux-s390-low.c (s390_num_regs): Update.
18712 (s390_regmap): Remove control registers. Use __s390x__ predefine
18713 instead of GPR_SIZE to distiguish s390 and s390x targets.
18714
18715 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18716
18717 * linux-low.c: Update copyright year.
18718 (check_removed_breakpoint): Clear pending_is_breakpoint.
18719 (linux_set_resume_request, linux_queue_one_thread)
18720 (resume_status_pending_p): New functions.
18721 (linux_continue_one_thread): Use process->resume.
18722 (linux_resume): Only resume threads if there are no pending events.
18723 * linux-low.h (struct process_info): Add resume request
18724 pointer.
18725
18726 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18727
18728 * regcache.c (new_register_cache): Clear the allocated register
18729 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18730
18731 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18732
18733 * linux-low.c (linux_resume): Take a struct thread_resume *
18734 argument.
18735 (linux_wait): Update call.
18736 (resume_ptr): New static variable.
18737 (linux_continue_one_thread): Renamed from
18738 linux_continue_one_process. Use resume_ptr.
18739 (linux_resume): Use linux_continue_one_thread.
18740 * server.c (handle_v_cont, handle_v_requests): New functions.
18741 (myresume): New function.
18742 (main): Handle 'v' case.
18743 * target.h (struct thread_resume): New type.
18744 (struct target_ops): Change argument of "resume" to struct
18745 thread_resume *.
18746 (myresume): Delete macro.
18747
18748 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18749
18750 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18751 (uninstall): Support DESTDIR.
18752
18753 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18754
18755 * configure.srv: Add xscale*linux copy of arm*linux entry.
18756
18757 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18758
18759 * linux-arm-low.c (arm_reinsert_addr): New function.
18760 (the_low_target): Add arm_reinsert_addr.
18761
18762 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18763
18764 * mem-break.c: Remove whitespace at end of file.
18765
18766 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18767
18768 * configure.in: Check whether we need to prototype strerror.
18769 * server.h: Optionally prototype strerror.
18770 * gdbreplay.c (perror_with_name): Use strerror.
18771 * linux-low.c (linux_attach_lwp): Use strerror.
18772 * utils.c (perror_with_name): Use strerror.
18773 * config.in, configure: Regenerated.
18774
18775 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18776
18777 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18778 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18779
18780 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18781
18782 * Makefile.in (SFILES): Update.
18783 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18784 low-sun3.c: Remove files.
18785
18786 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18787
18788 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18789 (linux_detach_one_process, linux_detach): New functions.
18790 (linux_target_ops): Add linux_detach.
18791 * server.c (main): Handle 'D' packet.
18792 * target.h (struct target_ops): Add "detach" member.
18793 (detach_inferior): Define.
18794
18795 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18796
18797 From Kelley Cook <kelleycook@wideopenwest.com>:
18798 * configure.srv: Accept i[34567]86 variants.
18799
18800 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18801
18802 * linux-low.c (linux_wait_for_event): Correct comment typos.
18803 (linux_resume_one_process): Call check_removed_breakpoint.
18804 (linux_send_signal): New function.
18805 (linux_target_ops): Add linux_send_signal.
18806 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18807 of kill.
18808 * target.h (struct target_ops): Add send_signal.
18809
18810 2003-05-29 Jim Blandy <jimb@redhat.com>
18811
18812 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18813 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18814 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18815 away part of the register's value.
18816
18817 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18818
18819 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18820 (linux_wait_for_event, linux_init_signals): Likewise.
18821
18822 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18823
18824 * configure.in: Check for stdlib.h.
18825 * configure: Regenerated.
18826 * config.in: Regenerated.
18827
18828 2003-01-04 Andreas Schwab <schwab@suse.de>
18829
18830 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18831
18832 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18833
18834 * Makefile.in: Remove obsolete code.
18835
18836 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18837
18838 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18839 defined(PT_FPR0_HI).
18840
18841 2002-11-17 Stuart Hughes <seh@zee2.com>
18842
18843 * linux-arm-low.c (arm_num_regs): Increase.
18844 (arm_regmap): Include status register.
18845
18846 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18847
18848 * linux-low.c (register_addr): Remove incorrect -1 check.
18849
18850 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18851
18852 * linux-low.c (linux_create_inferior): Call setpgid. Return
18853 the new PID.
18854 (unstopped_p, linux_signal_pid): Remove.
18855 (linux_target_ops): Remove linux_signal_pid.
18856 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18857 global instead of target method.
18858 * target.h (struct target_ops): Remove signal_pid. Update comment
18859 for create_inferior.
18860 * server.c (signal_pid): New variable.
18861 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18862 gdbserver. Set the child to be the foreground process group.
18863 (attach_inferior): Set signal_pid.
18864
18865 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18866
18867 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18868
18869 2002-08-20 Jim Blandy <jimb@redhat.com>
18870
18871 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18872 default for this.
18873
18874 2002-08-01 Andrew Cagney <cagney@redhat.com>
18875
18876 * Makefile.in: Make chill references obsolete.
18877
18878 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18879
18880 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
18881 * configure: Regenerate.
18882 * config.in: Regenerate.
18883
18884 2002-07-09 David O'Brien <obrien@FreeBSD.org>
18885
18886 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
18887 (perror_with_name, remote_close, remote_open, expect, play): Static.
18888
18889 2002-07-04 Michal Ludvig <mludvig@suse.cz>
18890
18891 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
18892 byte offsets instead of an array of indexes.
18893 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
18894
18895 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
18896
18897 * regcache.c: Add comment.
18898
18899 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
18900
18901 * thread-db.c: New file.
18902 * proc-service.c: New file.
18903 * acinclude.m4: New file.
18904 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
18905 proc-service.o, and thread-db.o.
18906 (linux-low.o): Add USE_THREAD_DB.
18907 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
18908 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
18909 * aclocal.m4: Regenerated.
18910 * config.in: Regenerated.
18911 * configure: Regenerated.
18912 * configure.in: Check for proc_service.h, sys/procfs.h,
18913 thread_db.h, and linux/elf.h headrs.
18914 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
18915 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
18916 Check for -lthread_db and thread support.
18917 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
18918 PowerPC, and SuperH.
18919 * i387-fp.c: Constify arguments.
18920 * i387-fp.h: Likewise.
18921 * inferiors.c: (struct thread_info): Renamed from
18922 `struct inferior_info'. Remove PID member. Use generic inferior
18923 list header. All uses updated.
18924 (inferiors, signal_pid): Removed.
18925 (all_threads): New variable.
18926 (get_thread): Define.
18927 (add_inferior_to_list): New function.
18928 (for_each_inferior): New function.
18929 (change_inferior_id): New function.
18930 (add_inferior): Removed.
18931 (remove_inferior): New function.
18932 (add_thread): New function.
18933 (free_one_thread): New function.
18934 (remove_thread): New function.
18935 (clear_inferiors): Use for_each_inferior and free_one_thread.
18936 (find_inferior): New function.
18937 (find_inferior_id): New function.
18938 (inferior_target_data): Update argument type.
18939 (set_inferior_target_data): Likewise.
18940 (inferior_regcache_data): Likewise.
18941 (set_inferior_regcache_data): Likewise.
18942 * linux-low.c (linux_bp_reinsert): Remove.
18943 (all_processes, stopping_threads, using_thrads)
18944 (struct pending_signals, debug_threads, pid_of): New.
18945 (inferior_pid): Replace with macro.
18946 (struct inferior_linux_data): Remove.
18947 (get_stop_pc, add_process): New functions.
18948 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
18949 Use add_process and add_thread.
18950 (linux_attach_lwp): New function, based on old linux_attach. Use
18951 add_process and add_thread. Set stop_expected for new threads.
18952 (linux_attach): New function.
18953 (linux_kill_one_process): New function.
18954 (linux_kill): Kill all LWPs.
18955 (linux_thread_alive): Use find_inferior_id.
18956 (check_removed_breakpoints, status_pending_p): New functions.
18957 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
18958 Update. Use WNOHANG. Wait for cloned processes also. Update process
18959 struct for the found process.
18960 (linux_wait_for_event): New function.
18961 (linux_wait): Use it. Support LWPs.
18962 (send_sigstop, wait_for_sigstop, stop_all_processes)
18963 (linux_resume_one_process, linux_continue_one_process): New functions.
18964 (linux_resume): Support LWPs.
18965 (REGISTER_RAW_SIZE): Remove.
18966 (fetch_register): Use register_size instead. Call supply_register.
18967 (usr_store_inferior_registers): Likewise. Call collect_register.
18968 Fix recursive case.
18969 (regsets_fetch_inferior_registers): Improve error message.
18970 (regsets_store_inferior_registers): Add debugging.
18971 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
18972 (unstopped_p, linux_signal_pid): New functions.
18973 (linux_target_ops): Add linux_signal_pid.
18974 (linux_init_signals): New function.
18975 (initialize_low): Call it. Initialize using_threads.
18976 * regcache.c (inferior_regcache_data): Add valid
18977 flag.
18978 (get_regcache): Fetch registers lazily. Add fetch argument
18979 and update all callers.
18980 (regcache_invalidate_one, regcache_invalidate): New
18981 functions.
18982 (new_register_cache): Renamed from create_register_cache.
18983 Return the new regcache.
18984 (free_register_cache): Change argument to a void *.
18985 (registers_to_string, registers_from_string): Call get_regcache
18986 with fetch flag set.
18987 (register_data): Make static. Pass fetch flag to get_regcache.
18988 (supply_register): Call get_regcache with fetch flag clear.
18989 (collect_register): Call get_regcache with fetch flag set.
18990 (collect_register_as_string): New function.
18991 * regcache.h: Update.
18992 * remote-utils.c (putpkt): Flush after debug output and use
18993 stderr.
18994 Handle input interrupts while waiting for an ACK.
18995 (input_interrupt): Use signal_pid method.
18996 (getpkt): Flush after debug output and use stderr.
18997 (outreg): Use collect_register_as_string.
18998 (new_thread_notify, dead_thread_notify): New functions.
18999 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19000 and general_thread.
19001 (look_up_one_symbol): Flush after debug output.
19002 * server.c (step_thread, server_waiting): New variables.
19003 (start_inferior): Don't use signal_pid. Update call to mywait.
19004 (attach_inferior): Update call to mywait.
19005 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19006 (main): Don't fetch/store registers explicitly. Use
19007 set_desired_inferior. Support proposed ``Hs'' packet. Update
19008 calls to mywait.
19009 * server.h: Update.
19010 (struct inferior_list, struct_inferior_list_entry): New.
19011 * target.c (set_desired_inferior): New.
19012 (write_inferior_memory): Constify.
19013 (mywait): New function.
19014 * target.h: Update.
19015 (struct target_ops): New signal_pid method.
19016 (mywait): Removed macro, added prototype.
19017
19018 * linux-low.h (regset_func): Removed.
19019 (regset_fill_func, regset_store_func): New.
19020 (enum regset_type): New.
19021 (struct regset_info): Add type field. Use new operation types.
19022 (struct linux_target_ops): stop_pc renamed to get_pc.
19023 Add decr_pc_after_break and breakpoint_at.
19024 (get_process, get_thread_proess, get_process_thread)
19025 (strut process_info, all_processes, linux_attach_lwp)
19026 (thread_db_init): New.
19027
19028 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19029 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19030 (the_low_target): Add new members.
19031 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19032 (i386_store_fpxregset): Constify.
19033 (target_regsets): Add new kind identifier.
19034 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19035 (i386_set_pc): Add debugging.
19036 (i386_breakpoint_at): New function.
19037 (the_low_target): Add new members.
19038 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19039 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19040 (mips_breakpoint_at): New.
19041 (the_low_target): Add new members.
19042 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19043 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19044 (the_low_target): Add new members.
19045 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19046 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19047 (the_low_target): Add new members.
19048 * linux-x86-64-low.c (target_regsets): Add new kind
19049 identifier.
19050
19051 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19052
19053 From Martin Pool <mbp@samba.org>:
19054 * server.c (gdbserver_usage): New function.
19055 (main): Call it.
19056
19057 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19058
19059 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19060 stop_at -> stop_pc.
19061
19062 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19063
19064 * Makefile.in: Remove obsolete code.
19065
19066 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19067
19068 * linux-low.c (regsets_fetch_inferior_registers),
19069 (regsets_store_inferior_registers): Removed cast to int from
19070 ptrace() calls.
19071 * regcache.h: Added declaration of struct inferior_info.
19072
19073 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19074
19075 * inferiors.c (struct inferior_info): Add regcache_data.
19076 (add_inferior): Call create_register_cache.
19077 (clear_inferiors): Call free_register_cache.
19078 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19079 * regcache.c (struct inferior_regcache_data): New.
19080 (registers): Remove.
19081 (get_regcache): New function.
19082 (create_register_cache, free_register_cache): New functions.
19083 (set_register_cache): Don't initialize the register cache here.
19084 (registers_to_string, registers_from_string, register_data): Call
19085 get_regcache.
19086 * regcache.h: Add prototypes.
19087 * server.h: Likewise.
19088
19089 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19090
19091 * mem-break.c: New file.
19092 * mem-break.h: New file.
19093 * Makefile.in: Add mem-break.o rule; update server.h
19094 dependencies.
19095 * inferiors.c (struct inferior_info): Add target_data
19096 member.
19097 (clear_inferiors): Free target_data member if set.
19098 (inferior_target_data, set_inferior_target_data): New functions.
19099 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19100 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19101 * linux-low.c (linux_bp_reinsert): New variable.
19102 (struct inferior_linux_data): New.
19103 (linux_create_inferior): Use set_inferior_target_data.
19104 (linux_attach): Likewise. Call add_inferior.
19105 (linux_wait_for_one_inferior): New function.
19106 (linux_wait): Call it.
19107 (linux_write_memory): Add const.
19108 (initialize_low): Call set_breakpoint_data.
19109 * linux-low.h (struct linux_target_ops): Add breakpoint
19110 handling members.
19111 * server.c (attach_inferior): Remove extra add_inferior
19112 call.
19113 * server.h: Include mem-break.h. Update inferior.c
19114 prototypes.
19115 * target.c (read_inferior_memory)
19116 (write_inferior_memory): New functions.
19117 * target.h (read_inferior_memory)
19118 (write_inferior_memory): Change macros to prototypes.
19119 (struct target_ops): Update comments. Add const to write_memory
19120 definition.
19121
19122 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19123
19124 * linux-low.c (usr_store_inferior_registers): Support
19125 registers which are allowed to fail to store.
19126 * linux-low.h (linux_target_ops): Likewise.
19127 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19128 (ppc_cannot_store_register): FPSCR may not be storable.
19129
19130 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19131
19132 * server.h: Include <string.h> if HAVE_STRING_H.
19133 * ChangeLog: Correct paths in last ChangeLog entry.
19134
19135 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19136
19137 * linux-low.h: Remove obsolete prototypes.
19138 (struct linux_target_ops): New.
19139 (extern the_low_target): New.
19140 * linux-low.c (num_regs, regmap): Remove declarations.
19141 (register_addr): Use the_low_target explicitly.
19142 (fetch_register): Likewise.
19143 (usr_fetch_inferior_registers): Likewise.
19144 (usr_store_inferior_registers): Likewise.
19145 * linux-arm-low.c (num_regs): Remove.
19146 (arm_num_regs): Define.
19147 (arm_regmap): Renamed from regmap, made static.
19148 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19149 made static.
19150 (arm_cannot_store_register): Renamed from cannot_store_register,
19151 made static.
19152 (the_low_target): New.
19153 * linux-i386-low.c (num_regs): Remove.
19154 (i386_num_regs): Define.
19155 (i386_regmap): Renamed from regmap, made static.
19156 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19157 made static.
19158 (i386_cannot_store_register): Renamed from cannot_store_register,
19159 made static.
19160 (the_low_target): New.
19161 * linux-ia64-low.c (num_regs): Remove.
19162 (ia64_num_regs): Define.
19163 (ia64_regmap): Renamed from regmap, made static.
19164 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19165 made static.
19166 (ia64_cannot_store_register): Renamed from cannot_store_register,
19167 made static.
19168 (the_low_target): New.
19169 * linux-m68k-low.c (num_regs): Remove.
19170 (m68k_num_regs): Define.
19171 (m68k_regmap): Renamed from regmap, made static.
19172 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19173 made static.
19174 (m68k_cannot_store_register): Renamed from cannot_store_register,
19175 made static.
19176 (the_low_target): New.
19177 * linux-mips-low.c (num_regs): Remove.
19178 (mips_num_regs): Define.
19179 (mips_regmap): Renamed from regmap, made static.
19180 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19181 made static.
19182 (mips_cannot_store_register): Renamed from cannot_store_register,
19183 made static.
19184 (the_low_target): New.
19185 * linux-ppc-low.c (num_regs): Remove.
19186 (ppc_num_regs): Define.
19187 (ppc_regmap): Renamed from regmap, made static.
19188 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19189 made static.
19190 (ppc_cannot_store_register): Renamed from cannot_store_register,
19191 made static.
19192 (the_low_target): New.
19193 * linux-s390-low.c (num_regs): Remove.
19194 (s390_num_regs): Define.
19195 (s390_regmap): Renamed from regmap, made static.
19196 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19197 made static.
19198 (s390_cannot_store_register): Renamed from cannot_store_register,
19199 made static.
19200 (the_low_target): New.
19201 * linux-sh-low.c (num_regs): Remove.
19202 (sh_num_regs): Define.
19203 (sh_regmap): Renamed from regmap, made static.
19204 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19205 made static.
19206 (sh_cannot_store_register): Renamed from cannot_store_register,
19207 made static.
19208 (the_low_target): New.
19209 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19210 (the_low_target): New.
19211
19212 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19213
19214 * Makefile.in: Add stamp-h target.
19215 * configure.in: Create stamp-h.
19216 * configure: Regenerated.
19217
19218 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19219
19220 * inferiors.c: New file.
19221 * target.c: New file.
19222 * target.h: New file.
19223 * Makefile.in: Add target.o and inferiors.o. Update
19224 dependencies.
19225 * linux-low.c (inferior_pid): New static variable,
19226 moved from server.c.
19227 (linux_create_inferior): Renamed from create_inferior.
19228 Call add_inferior. Return 0 on success instead of a PID.
19229 (linux_attach): Renamed from myattach.
19230 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19231 (linux_thread_alive): Renamed from mythread_alive.
19232 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19233 child dies.
19234 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19235 (regsets_store_inferior_registers): Correct error message.
19236 Add missing ``return 0''.
19237 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19238 (linux_store_registers): Renamed from store_inferior_registers.
19239 (linux_read_memory): Renamed from read_inferior_memory.
19240 (linux_write_memory): Renamed from write_inferior_memory.
19241 (linux_target_ops): New structure.
19242 (initialize_low): Call set_target_ops ().
19243 * remote-utils.c (unhexify): New function.
19244 (hexify): New function.
19245 (input_interrupt): Send signals to ``signal_pid''.
19246 * server.c (inferior_pid): Remove.
19247 (start_inferior): Update create_inferior call.
19248 (attach_inferior): Call add_inferior.
19249 (handle_query): New function.
19250 (main): Call handle_query for `q' packets.
19251 * server.h: Include "target.h". Remove obsolete prototypes.
19252 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19253
19254 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19255
19256 * Makefile.in: Add WARN_CFLAGS. Update configury
19257 dependencies.
19258 * configure.in: Check for <string.h>
19259 * configure: Regenerate.
19260 * config.in: Regenerate.
19261 * gdbreplay.c: Include needed system headers.
19262 (remote_open): Remove strchr prototype.
19263 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19264 * regcache.c (supply_register): Change buf argument to const void *.
19265 (supply_register_by_name): Likewise.
19266 (collect_register): Change buf argument to void *.
19267 (collect_register_by_name): Likewise.
19268 * regcache.h: Add missing prototypes.
19269 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19270 * server.c (handle_query): New function.
19271 (attached): New static variable, moved out of main.
19272 (main): Quiet longjmp clobber warnings.
19273 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19274 * utils.c (error): Remove NORETURN.
19275 (fatal): Likewise.
This page took 0.712551 seconds and 3 git commands to generate.