fcf487142f560572ebcd519cf5e63d7b24f180e4
[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 pid_to_exec_file op into a method
4 of process_target.
5
6 * target.h (struct process_stratum_target): Remove the target op.
7 (class process_target): Add the target op. Also add
8 'supports_pid_to_exec_file'.
9 * target.cc (process_target::pid_to_exec_file): Define.
10 (process_target::supports_pid_to_exec_file): Define.
11
12 Update the derived classes and callers below.
13
14 * server.cc (handle_qxfer_exec_file): Update.
15 (handle_query): Update.
16 * linux-low.cc (linux_target_ops): Update.
17 (linux_process_target::supports_pid_to_exec_file): Define.
18 (linux_process_target::pid_to_exec_file): Define.
19 * linux-low.h (class linux_process_target): Update.
20 * lynx-low.cc (lynx_target_ops): Update.
21 * nto-low.cc (nto_target_ops): Update.
22 * win32-low.cc (win32_target_ops): Update.
23
24 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
25
26 Turn process_stratum_target's supports_range_stepping op into a
27 method of process_target.
28
29 * target.h (struct process_stratum_target): Remove the target op.
30 (class process_target): Add the target op.
31 (target_supports_range_stepping): Update the macro.
32 * target.cc (process_target::supports_range_stepping): Define.
33
34 Update the derived classes and callers below.
35
36 * linux-low.cc (linux_target_ops): Update.
37 (linux_supports_range_stepping): Turn into ...
38 (linux_process_target::supports_range_stepping): ... this.
39 * linux-low.h (class linux_process_target): Update.
40 * lynx-low.cc (lynx_target_ops): Update.
41 * nto-low.cc (nto_target_ops): Update.
42 * win32-low.cc (win32_target_ops): Update.
43
44 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
45
46 Turn process_stratum_target's btrace-related ops (enable_btrace,
47 disable_btrace, read_btrace, read_btrace_conf) into methods of
48 process_target.
49
50 * target.h (struct process_stratum_target): Remove the target ops.
51 (class process_target): Add the target ops.
52 (target_enable_btrace): Update.
53 (target_disable_btrace): Update.
54 (target_read_btrace): Update.
55 (target_read_btrace_conf): Update.
56 * target.cc (process_target::enable_btrace): Define.
57 (process_target::disable_btrace): Define.
58 (process_target::read_btrace): Define.
59 (process_target::read_btrace_conf): Define.
60
61 Update the derived classes and callers below.
62
63 * linux-low.cc (linux_target_ops): Update.
64 (linux_process_target:enable_btrace): Define as a wrapper around
65 linux_enable_btrace.
66 (linux_low_disable_btrace): Turn into ...
67 (linux_process_target::disable_btrace): ... this.
68 (linux_low_read_btrace): Turn into ...
69 (linux_process_target::read_btrace): ... this.
70 (linux_low_btrace_conf): Turn into ...
71 (linux_process_target::read_btrace_conf): ... this.
72 * linux-low.h (class linux_process_target): Update.
73 * lynx-low.cc (lynx_target_ops): Update.
74 * nto-low.cc (nto_target_ops): Update.
75 * win32-low.cc (win32_target_ops): Update.
76
77 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
78
79 Turn process_stratum_target's supports_agent op into a method of
80 process_target.
81
82 * target.h (struct process_stratum_target): Remove the target op.
83 (class process_target): Add the target op.
84 (target_supports_agent): Update the macro.
85 * target.cc (process_target::supports_agent): Define.
86
87 Update the derived classes and callers below.
88
89 * linux-low.cc (linux_target_ops): Update.
90 (linux_supports_agent): Turn into ...
91 (linux_process_target::supports_agent): ... this.
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 qxfer_libraries_svr4 op into a
100 method of process_target.
101
102 * target.h (struct process_stratum_target): Remove the target op.
103 (class process_target): Add the target op. Also add
104 'supports_qxfer_libraries_svr4'.
105 * target.cc (process_target::qxfer_libraries_svr4): Define.
106 (process_target::supports_qxfer_libraries_svr4): Define.
107
108 Update the derived classes and callers below.
109
110 * server.cc (handle_qxfer_libraries_svr4): Update.
111 (handle_query): Update.
112 * linux-low.cc (linux_target_ops): Update.
113 (linux_process_target::supports_qxfer_libraries_svr4): Define.
114 (linux_qxfer_libraries_svr4): Turn into ...
115 (linux_process_target::qxfer_libraries_svr4): ... this.
116 * linux-low.h (class linux_process_target): Update.
117 * lynx-low.cc (lynx_target_ops): Update.
118 * nto-low.cc (nto_target_ops): Update.
119 * win32-low.cc (win32_target_ops): Update.
120
121 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
122
123 Turn process_stratum_target's supports_disable_randomization op
124 into a method of process_target.
125
126 * target.h (struct process_stratum_target): Remove the target op.
127 (class process_target): Add the target op.
128 (target_supports_disable_randomization): Update the macro.
129 * target.cc (process_target::supports_disable_randomization): Define.
130
131 Update the derived classes and callers below.
132
133 * linux-low.cc (linux_target_ops): Update.
134 (linux_supports_disable_randomization): Turn into ...
135 (linux_process_target::supports_disable_randomization): ... this.
136 * linux-low.h (class linux_process_target): Update.
137 * lynx-low.cc (lynx_target_ops): Update.
138 * nto-low.cc (nto_target_ops): Update.
139 * win32-low.cc (win32_target_ops): Update.
140
141 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
142
143 Turn process_stratum_target's emit_ops op into a method of
144 process_target.
145
146 * target.h (struct process_stratum_target): Remove the target op.
147 (class process_target): Add the target op.
148 (target_emit_ops): Update the macro.
149 * target.cc (process_target::emit_ops): Define.
150
151 Update the derived classes and callers below.
152
153 * linux-low.cc (linux_target_ops): Update.
154 (linux_emit_ops): Turn into ...
155 (linux_process_target::emit_ops): ... this.
156 * linux-low.h (class linux_process_target): Update.
157 * lynx-low.cc (lynx_target_ops): Update.
158 * nto-low.cc (nto_target_ops): Update.
159 * win32-low.cc (win32_target_ops): Update.
160
161 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
162
163 Turn process_stratum_target's install_fast_tracepoint_jump_pad
164 and get_min_fast_tracepoint_insn_len ops into methods of
165 process_target.
166
167 * target.h (struct process_stratum_target): Remove the target ops.
168 (class process_target): Add the target ops. Also add
169 'supports_fast_tracepoints'.
170 (target_supports_fast_tracepoints): Update the macro.
171 (target_get_min_fast_tracepoint_insn_len): Update the macro.
172 (install_fast_tracepoint_jump_pad): Update and rename the macro
173 to ...
174 (target_install_fast_tracepoint_jump_pad): ... this.
175 * target.cc (process_target::supports_fast_tracepoints): Define.
176 (process_target::install_fast_tracepoint_jump_pad): Define.
177 (process_target::get_min_fast_tracepoint_insn_len): Define.
178
179 Update the derived classes and callers below.
180
181 * tracepoint.cc (install_fast_tracepoint): Update.
182 * linux-low.cc (linux_target_ops): Update.
183 (linux_process_target::supports_fast_tracepoints): Define.
184 (linux_install_fast_tracepoint_jump_pad): Turn into ...
185 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
186 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
187 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
188 * linux-low.h (class linux_process_target): Update.
189 * lynx-low.cc (lynx_target_ops): Update.
190 * nto-low.cc (nto_target_ops): Update.
191 * win32-low.cc (win32_target_ops): Update.
192
193 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
194
195 Turn process_stratum_target's stabilize_threads op into a
196 method of process_target.
197
198 * target.h (struct process_stratum_target): Remove the target op.
199 (class process_target): Add the target op.
200 (target_stabilize_threads): Update the macro.
201 * target.cc (process_target::stabilize_threads): Define.
202
203 Update the derived classes and callers below.
204
205 * server.cc (handle_status): Update.
206 * tracepoint.cc (cmd_qtdp): Update.
207 (cmd_qtstart): Update.
208 * linux-low.cc (linux_target_ops): Update.
209 (linux_stabilize_threads): Turn into ...
210 (linux_process_target::stabilize_threads): ... this.
211 (linux_wait_1): Update.
212 * linux-low.h (class linux_process_target): Update.
213 * lynx-low.cc (lynx_target_ops): Update.
214 * nto-low.cc (nto_target_ops): Update.
215 * win32-low.cc (win32_target_ops): Update.
216
217 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
218
219 Turn process_stratum_target's pause_all and unpause_all ops
220 into methods of process_target.
221
222 * target.h (struct process_stratum_target): Remove the target ops.
223 (class process_target): Add the target ops.
224 (pause_all): Update the macro and rename to...
225 (target_pause_all): ... this.
226 (unpause_all): Update the macro and rename to...
227 (target_unpause_all): ... this.
228 * target.cc (process_target::pause_all): Define.
229 (process_target::unpause_all): Define.
230
231 Update the derived classes and callers below.
232
233 * server.cc (handle_status): Update.
234 * tracepoint.cc (clear_installed_tracepoints): Update.
235 (cmd_qtdp): Update.
236 (cmd_qtstart): Update.
237 (stop_tracing): Update.
238 (cmd_qtstatus): Update.
239 (upload_fast_traceframes): Update.
240 (run_inferior_command): Update.
241 * linux-low.cc (linux_target_ops): Update.
242 (linux_pause_all): Turn into ...
243 (linux_process_target::pause_all): ... this.
244 (linux_unpause_all): Turn into ...
245 (linux_process_target::unpause_all): ... this.
246 (linux_process_target::prepare_to_access_memory): Update.
247 (linux_process_target::done_accessing_memory): Update.
248 * linux-low.h (class linux_process_target): Update.
249 * lynx-low.cc (lynx_target_ops): Update.
250 * nto-low.cc (nto_target_ops): Update.
251 * win32-low.cc (win32_target_ops): Update.
252
253 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
254
255 Turn process_stratum_target's get_tib_address op into a method of
256 process_target.
257
258 * target.h (struct process_stratum_target): Remove the target op.
259 (class process_target): Add the target op. Also add
260 'supports_get_tib_address'.
261 * target.cc (process_target::get_tib_address): Define.
262 (process_target::supports_get_tib_address): Define.
263
264 Update the derived classes and callers below.
265
266 * server.cc (handle_query): Update.
267 * linux-low.cc (win32_target_ops): Update.
268 * lynx-low.cc (lynx_target_ops): Update.
269 * nto-low.cc (nto_target_ops): Update.
270 * win32-low.cc (win32_target_ops): Update.
271 (win32_process_target::supports_get_tib_address): Define.
272 (win32_get_tib_address): Turn into ...
273 (win32_process_target::get_tib_address): ... this.
274 * win32-low.h (class win32_process_target): Update.
275
276 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
277
278 Turn process_stratum_target's thread_stopped op into a method of
279 process_target.
280
281 * target.h (struct process_stratum_target): Remove the target op.
282 (class process_target): Add the target op. Also add
283 'supports_thread_stopped'.
284 (target_thread_stopped): Update the macro.
285 * target.cc (process_target::thread_stopped): Define.
286 (process_target::supports_thread_stopped): Define.
287 (prepare_to_access_memory): Update.
288
289 Update the derived classes and callers below.
290
291 * server.cc (queue_stop_reply_callback): Update.
292 * linux-low.cc (linux_target_ops): Update.
293 (linux_process_target::supports_thread_stopped): Define.
294 (linux_thread_stopped): Turn into ...
295 (linux_process_target::thread_stopped): ... this.
296 * linux-low.h (class linux_process_target): Update.
297 * lynx-low.cc (lynx_target_ops): Update.
298 * nto-low.cc (nto_target_ops): Update.
299 * win32-low.cc (win32_target_ops): Update.
300
301 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
302
303 Turn process_stratum_target's read_pc and write_pc ops into
304 methods of process_target.
305
306 * target.h (struct process_stratum_target): Remove the target ops.
307 (class process_target): Add the target ops.
308 * target.cc (process_target::read_pc): Define.
309 (process_target::write_pc): Define.
310
311 Update the derived classes and callers below.
312
313 * regcache.cc (regcache_read_pc): Update.
314 (regcache_write_pc): Update.
315 * linux-low.cc (linux_target_ops): Update.
316 (linux_read_pc): Turn into ...
317 (linux_process_target::read_pc): ... this.
318 (linux_write_pc): Turn into ...
319 (linux_process_target::write_pc): ... this.
320 * linux-low.h (class linux_process_target): Update.
321 * lynx-low.cc (lynx_target_ops): Update.
322 * nto-low.cc (nto_target_ops): Update.
323 * win32-low.cc (win32_target_ops): Update.
324
325 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
326
327 Turn process_stratum_target's supports_tracepoints op into a
328 method of process_target.
329
330 * target.h (struct process_stratum_target): Remove the target op.
331 (class process_target): Add the target op.
332 (target_supports_tracepoints): Update the macro.
333 * target.cc (process_target::supports_tracepoints): Define.
334
335 Update the derived classes and callers below.
336
337 * linux-low.cc (linux_target_ops): Update.
338 (linux_supports_tracepoints): Turn into ...
339 (linux_process_target::supports_tracepoints): ... this.
340 * linux-low.h (class linux_process_target): Update.
341 * lynx-low.cc (lynx_target_ops): Update.
342 * nto-low.cc (nto_target_ops): Update.
343 * win32-low.cc (win32_target_ops): Update.
344
345 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
346
347 Turn process_stratum_target's process_qsupported op into a method
348 of process_target.
349
350 * target.h (struct process_stratum_target): Remove the target op.
351 (class process_target): Add the target op.
352 (target_process_qsupported): Update the macro.
353 * target.cc (process_target::process_qsupported): Define.
354
355 Update the derived classes and callers below.
356
357 * linux-low.cc (linux_target_ops): Update.
358 (linux_process_qsupported): Turn into ...
359 (linux_process_target::process_qsupported): ... this.
360 * linux-low.h (class linux_process_target): Update.
361 * lynx-low.cc (lynx_target_ops): Update.
362 * nto-low.cc (nto_target_ops): Update.
363 * win32-low.cc (win32_target_ops): Update.
364
365 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
366
367 Turn process_stratum_target's read_loadmap op into a method of
368 process_target.
369
370 * target.h (struct process_stratum_target): Remove the target op.
371 (class process_target): Add the target op. Also add
372 'supports_read_loadmap'.
373 * target.cc (process_target::read_loadmap): Define.
374 (process_target::supports_read_loadmap): Define.
375
376 Update the derived classes and callers below.
377
378 * server.cc (handle_qxfer_fdpic): Update.
379 (handle_query): Update.
380 * linux-low.cc (linux_target_ops): Update.
381 (linux_process_target::supports_read_loadmap): Define.
382 (linux_read_loadmap): Turn into ...
383 (linux_process_target::read_loadmap): ... this.
384 * linux-low.h (class linux_process_target): Update.
385 * lynx-low.cc (lynx_target_ops): Update.
386 * nto-low.cc (nto_target_ops): Update.
387 * win32-low.cc (win32_target_ops): Update.
388
389 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
390
391 Turn process_stratum_target's core_of_thread op into a method of
392 process_target.
393
394 * target.h (struct process_stratum_target): Remove the target op.
395 (class process_target): Add the target op.
396 (target_core_of_thread): Update the macro.
397 * target.cc (process_target::core_of_thread): Define.
398
399 Update the derived classes and callers below.
400
401 * linux-low.cc (linux_target_ops): Update.
402 (linux_process_target::core_of_thread): Define.
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 * win32-low.cc (win32_target_ops): Update.
407
408 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
409
410 Turn process_stratum_target's handle_monitor_command op into a
411 method of process_target.
412
413 * target.h (struct process_stratum_target): Remove the target op.
414 (class process_target): Add the target op.
415 (target_handle_monitor_command): Update the macro.
416 * target.cc (process_target::handle_monitor_command): Define.
417
418 Update the derived classes and callers below.
419
420 * server.cc (handle_query): Update.
421 * linux-low.cc (linux_target_ops): Update.
422 (linux_process_target::handle_monitor_command): Define.
423 * linux-low.h (class linux_process_target): Update.
424 * lynx-low.cc (lynx_target_ops): Update.
425 * nto-low.cc (nto_target_ops): Update.
426 * win32-low.cc (win32_target_ops): Update.
427
428 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
429
430 Turn process_stratum_target's handle_new_gdb_connection op into a
431 method of process_target.
432
433 * target.h (struct process_stratum_target): Remove the target op.
434 (class process_target): Add the target op.
435 (target_handle_new_gdb_connection): Update the macro.
436 * target.cc (process_target::handle_new_gdb_connection): Define.
437
438 Update the derived classes and callers below.
439
440 * linux-low.cc (linux_target_ops): Update.
441 (linux_handle_new_gdb_connection): Turn into ...
442 (linux_process_target::handle_new_gdb_connection): ... this.
443 * linux-low.h (class linux_process_target): Update.
444 * lynx-low.cc (lynx_target_ops): Update.
445 * nto-low.cc (nto_target_ops): Update.
446 * win32-low.cc (win32_target_ops): Update.
447
448 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
449
450 Turn process_stratum_target's supports_fork_events,
451 supports_vfork_events, and supports_exec_events ops into methods
452 of process_target.
453
454 * target.h (struct process_stratum_target): Remove the target ops.
455 (class process_target): Add the target ops.
456 (target_supports_fork_events): Update the macro.
457 (target_supports_vfork_events): Update the macro.
458 (target_supports_exec_events): Update the macro.
459 * target.cc (process_target::supports_fork_events): Define.
460 (process_target::supports_vfork_events): Define.
461 (process_target::supports_exec_events): Define.
462
463 Update the derived classes and callers below.
464
465 * linux-low.cc (linux_target_ops): Update.
466 (linux_supports_fork_events): Turn into ...
467 (linux_process_target::supports_fork_events): ... this.
468 (linux_supports_vfork_events): Turn into ...
469 (linux_process_target::supports_vfork_events): ... this.
470 (linux_supports_exec_events): Turn into ...
471 (linux_process_target::supports_exec_events): ... this.
472 * linux-low.h (class linux_process_target): Update.
473 * lynx-low.cc (lynx_target_ops): Update.
474 * nto-low.cc (nto_target_ops): Update.
475 * win32-low.cc (win32_target_ops): Update.
476
477 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
478
479 Turn process_stratum_target's supports_multi_process op into a
480 method of process_target.
481
482 * target.h (struct process_stratum_target): Remove the target op.
483 (class process_target): Add the target op.
484 * target.cc (process_target::supports_multi_process): Define.
485 (target_supports_multi_process): Update.
486
487 Update the derived classes and callers below.
488
489 * linux-low.cc (linux_target_ops): Update.
490 (linux_supports_multi_process): Turn into ...
491 (linux_process_target::supports_multi_process): ... this.
492 * linux-low.h (class linux_process_target): Update.
493 * lynx-low.cc (lynx_target_ops): Update.
494 * nto-low.cc (nto_target_ops): Update.
495 * win32-low.cc (win32_target_ops): Update.
496
497 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
498
499 Turn process_stratum_target's supports_non_stop, async, and
500 start_non_stop ops into methods of process_target.
501
502 * target.h (struct process_stratum_target): Remove the target ops.
503 (class process_target): Add the target ops.
504 (target_supports_non_stop): Update the macro.
505 (target_async): Update the macro.
506 (start_non_stop): Remove declaration.
507 * target.cc (process_target::supports_non_stop): Define.
508 (process_target::async): Define.
509 (process_target::start_non_stop): Define.
510 (start_non_stop): Remove.
511
512 Update the derived classes and callers below.
513
514 * server.cc (handle_qxfer_siginfo): Update.
515 (handle_query): Update.
516 * linux-low.cc (linux_target_ops): Update.
517 (linux_supports_non_stop): Turn into ...
518 (linux_process_target::supports_non_stop): ... this.
519 (linux_async): Turn into ...
520 (linux_process_target::async): ... this.
521 (linux_start_non_stop): Turn into ...
522 (linux_process_target::start_non_stop): ... this.
523 * linux-low.h (class linux_process_target): Update.
524 * lynx-low.cc (lynx_target_ops): Update.
525 * nto-low.cc (nto_target_ops): Update.
526 (nto_supports_non_stop): Remove; rely on the default behavior
527 instead.
528 * win32-low.cc (win32_target_ops): Update.
529
530 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
531
532 Turn process_stratum_target's qxfer_siginfo op into a method of
533 process_target.
534
535 * target.h (struct process_stratum_target): Remove the target op.
536 (class process_target): Add the target op. Also add
537 'supports_qxfer_siginfo'.
538 * target.cc (process_target::qxfer_siginfo): Define.
539 (process_target::supports_qxfer_siginfo): Define.
540
541 Update the derived classes and callers below.
542
543 * server.cc (handle_qxfer_siginfo): Update.
544 (handle_query): Update.
545 * linux-low.cc (linux_target_ops): Update.
546 (linux_process_target::supports_qxfer_siginfo): Define.
547 (linux_xfer_siginfo): Turn into ...
548 (linux_process_target::qxfer_siginfo): ... this.
549 * linux-low.h (class linux_process_target): Update.
550 * lynx-low.cc (lynx_target_ops): Update.
551 * nto-low.cc (nto_target_ops): Update.
552 * win32-low.cc (win32_target_ops): Update.
553
554 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
555
556 Turn process_stratum_target's qxfer_osdata op into a method of
557 process_target.
558
559 * target.h (struct process_stratum_target): Remove the target op.
560 (class process_target): Add the target op. Also add
561 'supports_qxfer_osdata'.
562 * target.cc (process_target::qxfer_osdata): Define.
563 (process_target::supports_qxfer_osdata): Define.
564
565 Update the derived classes and callers below.
566
567 * server.cc (handle_qxfer_osdata): Update.
568 (handle_query): Update.
569 * linux-low.cc (linux_target_ops): Update.
570 (linux_process_target::supports_qxfer_osdata): Define.
571 (linux_qxfer_osdata): Turn into ...
572 (linux_process_target::qxfer_osdata): ... this.
573 * linux-low.h (class linux_process_target): Update.
574 * lynx-low.cc (lynx_target_ops): Update.
575 * nto-low.cc (nto_target_ops): Update.
576 * win32-low.cc (win32_target_ops): Update.
577
578 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
579
580 Turn process_stratum_target's hostio_last_error op into a
581 method of process_target.
582
583 * target.h (struct process_stratum_target): Remove the target op.
584 (class process_target): Add the target op.
585 * target.cc: Add "hostio.h" to includes.
586 (process_target::hostio_last_error): Define.
587
588 Update the derived classes and callers below.
589
590 * hostio.cc (hostio_error): Update.
591 * linux-low.cc: Remove "hostio.h" from includes.
592 (linux_target_ops): Update.
593 * lynx-low.cc (lynx_target_ops): Update.
594 * nto-low.cc (nto_target_ops): Update.
595 * win32-low.h (class win32_process_target): Update.
596 * win32-low.cc (win32_target_ops): Update.
597 (wince_hostio_last_error): Turn into ...
598 (win32_process_target::hostio_last_error): ... this.
599
600 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
601
602 Turn process_stratum_target's get_tls_address op into a method of
603 process_target.
604
605 * target.h (struct process_stratum_target): Remove the target op.
606 (class process_target): Add the target op. Also add
607 'supports_get_tls_address'.
608 * target.cc (process_target::get_tls_address): Define.
609 (process_target::supports_get_tls_address): Define.
610
611 Update the derived classes and callers below.
612
613 * server.cc (handle_query): Update.
614 * linux-low.cc (linux_target_ops): Update.
615 (linux_process_target::supports_get_tls_address): Define.
616 (linux_process_target::get_tls_address): Define.
617 * linux-low.h (class linux_process_target): Update.
618 * lynx-low.cc (lynx_target_ops): Update.
619 * nto-low.cc (nto_target_ops): Update.
620 * win32-low.cc (win32_target_ops): Update.
621
622 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
623
624 Turn process_stratum_target's read_offsets op into a method of
625 process_target.
626
627 * target.h (struct process_stratum_target): Remove the target op.
628 (class process_target): Add the target op. Also add
629 'supports_read_offsets'.
630 * target.cc (process_target::read_offsets): Define.
631 (process_target::supports_read_offsets): Define.
632
633 Update the derived classes and callers below.
634
635 * server.cc (handle_query): Update.
636 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
637 (linux_target_ops): Update.
638 (linux_process_target::supports_read_offsets): Define.
639 (linux_read_offsets): Turn into ...
640 (linux_process_target::read_offsets): ... this.
641 * linux-low.h (class linux_process_target): Update.
642 * lynx-low.cc (lynx_target_ops): Update.
643 * nto-low.cc (nto_target_ops): Update.
644 * win32-low.cc (win32_target_ops): Update.
645
646 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
647
648 Turn process_stratum_target's stopped_by_watchpoint and
649 stopped_data_address ops into methods of process_target.
650
651 * target.h (struct process_stratum_target): Remove the target ops.
652 (class process_target): Add the target ops.
653 * target.cc (process_target::stopped_by_watchpoint): Define.
654 (process_target::stopped_data_address): Define.
655
656 Update the derived classes and callers below.
657
658 * remote-utils.cc (prepare_resume_reply): Update.
659 * linux-low.cc (linux_target_ops): Update.
660 (linux_stopped_by_watchpoint): Turn into ...
661 (linux_process_target::stopped_by_watchpoint): ... this.
662 (linux_stopped_data_address): Turn into ...
663 (linux_process_target::stopped_data_address): ... this.
664 * linux-low.h (class linux_process_target): Update.
665 * lynx-low.cc (lynx_target_ops): Update.
666 * nto-low.cc (nto_target_ops): Update.
667 (nto_stopped_by_watchpoint): Turn into ...
668 (nto_process_target::stopped_by_watchpoint): ... this.
669 (nto_stopped_data_address): Turn into ...
670 (nto_process_target::stopped_data_address): ... this.
671 * nto-low.h (class nto_process_target): Update.
672 * win32-low.cc (win32_target_ops): Update.
673 (win32_stopped_by_watchpoint): Turn into ...
674 (win32_process_target::stopped_by_watchpoint): ... this.
675 (win32_stopped_data_address): Turn into ...
676 (win32_process_target::stopped_data_address): ... this.
677 * win32-low.h (class win32_process_target): Update.
678
679 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
680
681 Turn process_stratum_target's supports_hardware_single_step op into
682 a method of process_target.
683
684 * target.h (struct process_stratum_target): Remove the target op.
685 (class process_target): Add the target op.
686 (target_supports_hardware_single_step): Update the macro.
687 (target_can_do_hardware_single_step): Remove declaration.
688 * target.cc (process_target::supports_hardware_single_step): Define.
689 (target_can_do_hardware_single_step): Remove.
690
691 Update the derived classes and callers below.
692
693 * linux-low.h (class linux_process_target): Update.
694 * linux-low.cc (linux_target_ops): Update.
695 (linux_supports_hardware_single_step): Turn into ...
696 (linux_process_target::supports_hardware_single_step): ... this.
697 * lynx-low.h (class lynx_process_target): Update.
698 * lynx-low.cc (lynx_target_ops): Update.
699 (lynx_process_target::supports_hardware_single_step): Define.
700 * nto-low.h (class nto_process_target): Update.
701 * nto-low.cc (nto_target_ops): Update.
702 (nto_process_target::supports_hardware_single_step): Define.
703 * win32-low.h (class win32_process_target): Update.
704 * win32-low.cc (win32_target_ops): Update.
705 (win32_process_target::supports_hardware_single_step): Define.
706
707 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
708
709 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
710 ops into methods of process_target.
711
712 * target.h (struct process_stratum_target): Remove the target ops.
713 (class process_target): Add the target ops.
714 (target_stopped_by_hw_breakpoint): Update the macro.
715 (target_supports_stopped_by_hw_breakpoint): Update the macro.
716 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
717 (process_target::supports_stopped_by_hw_breakpoint): Define.
718
719 Update the derived classes and callers below.
720
721 * linux-low.cc (linux_target_ops): Update.
722 (linux_stopped_by_hw_breakpoint): Turn into ...
723 (linux_process_target::stopped_by_hw_breakpoint): ... this.
724 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
725 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
726 * linux-low.h (class linux_process_target): Update.
727 * lynx-low.cc (lynx_target_ops): Update.
728 * nto-low.cc (nto_target_ops): Update.
729 * win32-low.cc (win32_target_ops): Update.
730
731 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
732
733 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
734 ops into methods of process_target.
735
736 * target.h (struct process_stratum_target): Remove the target ops.
737 (class process_target): Add the target ops.
738 (target_stopped_by_sw_breakpoint): Update the macro.
739 (target_supports_stopped_by_sw_breakpoint): Update the macro.
740 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
741 (process_target::supports_stopped_by_sw_breakpoint): Define.
742
743 Update the derived classes and callers below.
744
745 * linux-low.cc (linux_target_ops): Update.
746 (linux_stopped_by_sw_breakpoint): Turn into ...
747 (linux_process_target::stopped_by_sw_breakpoint): ... this.
748 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
749 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
750 * linux-low.h (class linux_process_target): Update.
751 * lynx-low.cc (lynx_target_ops): Update.
752 * nto-low.cc (nto_target_ops): Update.
753 * win32-low.cc (win32_target_ops): Update.
754
755 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
756
757 Turn process_stratum_target's insert_point and remove_point ops
758 into methods of process_target.
759
760 * target.h (struct process_stratum_target): Remove the target ops.
761 (class process_target): Add the target ops.
762 * target.cc (process_target::insert_point): Define.
763 (process_target::remove_point): Define.
764
765 Update the derived classes and callers below.
766
767 * mem-break.cc (set_raw_breakpoint_at): Update.
768 (delete_raw_breakpoint): Update.
769 (uninsert_raw_breakpoint): Update.
770 (reinsert_raw_breakpoint): Update.
771 * linux-low.cc (linux_target_ops): Update.
772 (linux_insert_point): Turn into ...
773 (linux_process_target::insert_point): ... this.
774 (linux_remove_point): Turn into ...
775 (linux_process_target::remove_point): ... this.
776 * linux-low.h (class linux_process_target): Update.
777 * lynx-low.cc (lynx_target_ops): Update.
778 * nto-low.cc (nto_target_ops): Update.
779 (nto_insert_point): Turn into ...
780 (nto_process_target::insert_point): ... this.
781 (nto_remove_point): Turn into ...
782 (nto_process_target::remove_point): ... this.
783 * nto-low.h (class nto_process_target): Update.
784 * win32-low.cc (win32_target_ops): Update.
785 (win32_insert_point): Turn into ...
786 (win32_process_target::insert_point): ... this.
787 (win32_remove_point): Turn into ...
788 (win32_process_target::remove_point): ... this.
789 * win32-low.h (class win32_process_target): Update.
790
791 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
792
793 Turn process_stratum_target's supports_z_point_type op into a
794 method of process_target.
795
796 * target.h (struct process_stratum_target): Remove the target op.
797 (class process_target): Add the target op.
798 * target.cc (process_target::supports_z_point_type): Define.
799
800 Update the derived classes and callers below.
801
802 * mem-break.cc (z_type_supported): Update.
803 * linux-low.cc (linux_target_ops): Update.
804 (linux_supports_z_point_type): Turn into ...
805 (linux_process_target::supports_z_point_type): ... this.
806 * linux-low.h (class linux_process_target): Update.
807 * lynx-low.cc (lynx_target_ops): Update.
808 * nto-low.cc (nto_target_ops): Update.
809 (nto_supports_z_point_type): Turn into ...
810 (nto_process_target::supports_z_point_type): ... this.
811 * nto-low.h (class nto_process_target): Update.
812 * win32-low.cc (win32_target_ops): Update.
813 (win32_supports_z_point_type): Turn into ...
814 (win32_process_target::supports_z_point_type): ... this.
815 * win32-low.h (class win32_process_target): Update.
816
817 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
818
819 Turn process_stratum_target's read_auxv op into a method of
820 process_target.
821
822 * target.h (class process_stratum_target): Remove the target op.
823 (struct process_target): Add the target op. Also add
824 'supports_read_auxv'.
825 * target.cc (process_target::read_auxv): Define.
826 (process_target::supports_read_auxv): Define.
827
828 Update the derived classes and callers below.
829
830 * server.cc (handle_qxfer_auxv): Update.
831 (handle_query): Update.
832 * linux-low.cc (linux_target_ops): Update.
833 (linux_process_target::supports_read_auxv): Define.
834 (linux_read_auxv): Turn into ...
835 (linux_process_target::read_auxv): ... this.
836 * linux-low.h (class linux_process_target): Update.
837 * lynx-low.cc (lynx_target_ops): Update.
838 * nto-low.cc (nto_target_ops): Update.
839 (nto_process_target::supports_read_auxv): Define.
840 (nto_read_auxv): Turn into ...
841 (nto_process_target::read_auxv): ... this.
842 * nto-low.h (class nto_process_target): Update.
843 * win32-low.cc (win32_target_ops): Update.
844
845 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
846
847 Turn process_stratum_target's request_interrupt op into a method of
848 process_target.
849
850 * target.h (struct process_stratum_target): Remove the target op.
851 (class process_target): Add the target op.
852
853 Update the derived classes and callers below.
854
855 * remote-utils.cc (putpkt_binary_1): Update.
856 (input_interrupt): Update.
857 (getpkt): Update.
858 * server.cc (handle_v_requests): Update.
859 * linux-low.cc (linux_target_ops): Update.
860 (linux_request_interrupt): Turn into ...
861 (linux_process_target::request_interrupt): ... this.
862 * linux-low.h (class linux_process_target): Update.
863 * lynx-low.cc (lynx_target_ops): Update.
864 (lynx_request_interrupt): Turn into ...
865 (lynx_process_target::request_interrupt): ... this.
866 * lynx-low.h (class lynx_process_target): Update.
867 * nto-low.cc (nto_target_ops): Update.
868 (nto_request_interrupt): Turn into ...
869 (nto_process_target::request_interrupt): ... this.
870 * nto-low.h (class nto_process_target): Update.
871 * win32-low.cc (win32_target_ops): Update.
872 (win32_request_interrupt): Turn into ...
873 (win32_process_target::request_interrupt): ... this.
874 * win32-low.h (class win32_process_target): Update.
875
876 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
877
878 Turn process_stratum_target's look_up_symbols op into a method of
879 process_target.
880
881 * target.h (struct process_stratum_target): Remove the target op.
882 (class process_target): Add the target op.
883 * target.cc (process_target::look_up_symbols): Define.
884
885 Update the derived classes and callers below.
886
887 * server.cc (handle_query): Update.
888 * linux-low.cc (linux_target_ops): Update.
889 (linux_look_up_symbols): Turn into ...
890 (linux_process_target::look_up_symbols): ... this.
891 * linux-low.h (class linux_process_target): Update.
892 * lynx-low.cc (lynx_target_ops): Update.
893 * nto-low.cc (nto_target_ops): Update.
894 * win32-low.cc (win32_target_ops): Update.
895
896 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
897
898 Turn process_stratum_target's read_memory and write_memory
899 ops into methods of process_target.
900
901 * target.h (struct process_stratum_target): Remove the target ops.
902 (class process_target): Add the target ops.
903
904 Update the derived classes and callers below.
905
906 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
907 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
908 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
909 (arm_get_syscall_trapinfo): Update.
910 * linux-cris-low.cc (cris_breakpoint_at): Update.
911 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
912 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
913 * linux-mips-low.cc (mips_breakpoint_at): Update.
914 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
915 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
916 * linux-sh-low.cc (sh_breakpoint_at): Update.
917 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
918 (sparc_store_gregset_from_stack): Update.
919 (sparc_breakpoint_at): Update.
920 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
921 * linux-tile-low.cc (tile_breakpoint_at): Update.
922 * linux-x86-low.cc (x86_breakpoint_at): Update.
923 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
924 * mem-brea.cc (insert_memory_breakpoint): Update.
925 (validate_inserted_breakpoint): Update.
926 * target.cc (read_inferior_memory): Update.
927 (target_write_memory): Update.
928 * linux-low.cc (linux_target_ops): Update.
929 (linux_read_memory): Make a wrapper around the read_memory target
930 op call.
931 (linux_process_target::read_memory): Rename from linux_read_memory.
932 (linux_write_memory): Turn into ...
933 (linux_process_target::write_memory): ... this.
934 * linux-low.h (class linux_process_target): Update.
935 * lynx-low.cc (lynx_target_ops): Update.
936 (lynx_read_memory): Turn into ...
937 (lynx_process_target::read_memory): ... this.
938 (lynx_write_memory): Turn into ...
939 (lynx_process_target::write_memory): ... this.
940 * lynx-low.h (class lynx_process_target): Update.
941 * nto-low.cc (nto_target_ops): Update.
942 (nto_read_memory): Turn into ...
943 (nto_process_target::read_memory): ... this.
944 (nto_write_memory): Turn into ...
945 (nto_process_target::write_memory): ... this.
946 * nto-low.h (class nto_process_target): Update.
947 * win32-low.cc (win32_target_ops): Update.
948 (win32_read_inferior_memory): Turn into ...
949 (win32_process_target::read_memory): ... this.
950 (win32_write_inferior_memory): Turn into ...
951 (win32_process_target::write_memory): ... this.
952 * win32-low.h (class win32_process_target): Update.
953
954 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
955
956 Turn process_stratum_target's prepare_to_access_memory and
957 done_accessing_memory ops into methods of process_target.
958
959 * target.h (struct process_stratum_target): Remove the target ops.
960 (class process_target): Add the target ops.
961 * target.cc (process_target::prepare_to_access_memory): Define.
962 (process_target::done_accessing_memory): Define.
963 (prepare_to_access_memory): Update.
964 (done_accessing_memory): Update.
965
966 Update the derived classes and callers below.
967
968 * linux-low.cc (linux_target_ops): Update.
969 (linux_prepare_to_access_memory): Turn into ...
970 (linux_process_target::prepare_to_access_memory): ... this.
971 (linux_done_accessing_memory): Turn into ...
972 (linux_process_target::done_accessing_memory): ... this.
973 * linux-low.h (class linux_process_target): Update.
974 * lynx-low.cc (lynx_target_ops): Update.
975 * nto-low.cc (nto_target_ops): Update.
976 * win32-low.cc (win32_target_ops): Update.
977
978 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
979
980 Turn process_stratum_target's fetch_registers and store_registers
981 ops into methods of process_target.
982
983 * target.h (struct process_stratum_target): Remove the target ops.
984 (class process_target): Add the target ops.
985 (fetch_inferior_registers): Update the macro.
986 (store_inferior_registers): Update the macro.
987
988 Update the derived classes and callers below.
989
990 * linux-low.cc (linux_target_ops): Update.
991 (linux_fetch_registers): Turn into ...
992 (linux_process_target::fetch_registers): ... this.
993 (linux_store_registers): Turn into ...
994 (linux_process_target::store_registers): ... this.
995 * linux-low.h (class linux_process_target): Update.
996 * lynx-low.cc (lynx_target_ops): Update.
997 (lynx_fetch_registers): Turn into ...
998 (lynx_process_target::fetch_registers): ... this.
999 (lynx_store_registers): Turn into ...
1000 (lynx_process_target::store_registers): ... this.
1001 * lynx-low.h (class lynx_process_target): Update.
1002 * nto-low.cc (nto_target_ops): Update.
1003 (nto_fetch_registers): Turn into ...
1004 (nto_process_target::fetch_registers): ... this.
1005 (nto_store_registers): Turn into ...
1006 (nto_process_target::store_registers): ... this.
1007 * nto-low.h (class nto_process_target): Update.
1008 * win32-low.cc (win32_target_ops): Update.
1009 (win32_fetch_inferior_registers): Turn into ...
1010 (win32_process_target::fetch_registers): ... this.
1011 (win32_store_inferior_registers): Turn into ...
1012 (win32_process_target::store_registers): ... this.
1013 * win32-low.h (class win32_process_target): Update.
1014
1015 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1016
1017 Turn process_stratum_target's wait op into a method of
1018 process_target.
1019
1020 * target.h (struct process_stratum_target): Remove the target op.
1021 (class process_target): Add the target op.
1022
1023 Update the derived classes and callers below.
1024
1025 * target.cc (target_wait): Update.
1026 * linux-low.cc (linux_target_ops): Update.
1027 (linux_wait): Turn into ...
1028 (linux_process_target::wait): ... this.
1029 * linux-low.h (class linux_process_target): Update.
1030 * lynx-low.cc (lynx_target_ops): Update.
1031 (lynx_wait): Turn into ...
1032 (lynx_process_target::wait): ... this.
1033 * lynx-low.h (class lynx_process_target): Update.
1034 * nto-low.cc (nto_target_ops): Update.
1035 (nto_wait): Turn into ...
1036 (nto_process_target::wait): ... this.
1037 * nto-low.h (class nto_process_target): Update.
1038 * win32-low.cc (win32_target_ops): Update.
1039 (win32_wait): Turn into ...
1040 (win32_process_target::wait): ... this.
1041 (do_initial_child_stuff): Update.
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 resume 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
1052 Update the derived classes and callers below.
1053
1054 * server.cc (resume): Update.
1055 * target.cc (target_stop_and_wait): Update.
1056 (target_continue_no_signal): Update.
1057 (target_continue): Update.
1058 * linux-low.cc (linux_target_ops): Update.
1059 (linux_resume): Turn into ...
1060 (linux_process_target::resume): ... this.
1061 * linux-low.h (class linux_process_target): Update.
1062 * lynx-low.cc (lynx_target_ops): Update.
1063 (lynx_resume): Turn into ...
1064 (lynx_process_target::resume): ... this.
1065 * lynx-low.h (class lynx_process_target): Update.
1066 * nto-low.cc (nto_target_ops): Update.
1067 (nto_resume): Turn into ...
1068 (nto_process_target::resume): ... this.
1069 * nto-low.h (class nto_process_target): Update.
1070 * win32-low.cc (win32_target_ops): Update.
1071 (win32_resume): Turn into ...
1072 (win32_process_target::resume): ... this.
1073 (win32_process_target::detach): Update.
1074 (do_initial_child_stuff): Update.
1075 * win32-low.h (class win32_process_target): Update.
1076
1077 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1078
1079 Turn process_stratum_target's thread_alive op into a method of
1080 process_target.
1081
1082 * target.h (struct process_stratum_target): Remove the target op.
1083 (class process_target): Add the target op.
1084 (mythread_alive): Update the macro.
1085
1086 Update the derived classes and callers below.
1087
1088 * linux-low.cc (linux_target_ops): Update.
1089 (linux_thread_alive): Turn into ...
1090 (linux_process_target::thread_alive): ... this.
1091 (wait_for_sigstop): Update.
1092 * linux-low.h (class linux_process_target): Update.
1093 * lynx-low.cc (lynx_target_ops): Update.
1094 (lynx_thread_alive): Turn into ...
1095 (lynx_process_target::thread_alive): ... this.
1096 * lynx-low.h (class lynx_process_target): Update.
1097 * nto-low.cc (nto_target_ops): Update.
1098 (nto_thread_alive): Turn into ...
1099 (nto_process_target::thread_alive): ... this.
1100 * nto-low.h (class nto_process_target): Update.
1101 * win32-low.cc (win32_target_ops): Update.
1102 (win32_thread_alive): Turn into ...
1103 (win32_process_target::thread_alive): ... this.
1104 * win32-low.h (class win32_process_target): Update.
1105
1106 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1107
1108 Turn process_stratum_target's join op into a method of
1109 process_target.
1110
1111 * target.h (struct process_stratum_target): Remove the target op.
1112 (class process_target): Add the target op.
1113 (join_inferior): Update the macro.
1114
1115 Update the derived classes and callers below.
1116
1117 * linux-low.cc (linux_target_ops): Update.
1118 (linux_join): Turn into ...
1119 (linux_process_target::join): ... this.
1120 * linux-low.h (class linux_process_target): Update.
1121 * lynx-low.cc (lynx_target_ops): Update.
1122 (lynx_join): Turn into ...
1123 (lynx_process_target::join): ... this.
1124 * lynx-low.h (class lynx_process_target): Update.
1125 * nto-low.cc (nto_target_ops): Update.
1126 (nto_process_target::join): Define.
1127 * nto-low.h (class nto_process_target): Update.
1128 * win32-low.cc (win32_target_ops): Update.
1129 (win32_join): Turn into ...
1130 (win32_process_target::join): ... this.
1131 * win32-low.h (class win32_process_target): Update.
1132
1133 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1134
1135 Turn process_stratum_target's mourn op into a method of
1136 process_target.
1137
1138 * target.h (struct process_stratum_target): Remove the target op.
1139 (class process_target): Add the target op.
1140
1141 Update the derived classes and callers below.
1142
1143 * target.cc (target_mourn_inferior): Update.
1144 * linux-low.cc (linux_target_ops): Update.
1145 (linux_mourn): Turn into ...
1146 (linux_process_target::mourn): ... this.
1147 (handle_extended_wait): Update.
1148 (linux_process_target::kill): Update.
1149 (linux_process_target::detach): Update.
1150 * linux-low.h (class linux_process_target): Update.
1151 * lynx-low.cc (lynx_target_ops): Update.
1152 (lynx_mourn): Turn into ...
1153 (lynx_process_target::mourn): ... this.
1154 * lynx-low.h (class lynx_process_target): Update.
1155 * nto-low.cc (nto_target_ops): Update.
1156 (nto_mourn): Turn into ...
1157 (nto_process_target::mourn): ... this.
1158 * nto-low.h (class nto_process_target): Update.
1159 * win32-low.cc (win32_target_ops): Update.
1160 (win32_mourn): Turn into ...
1161 (win32_process_target::mourn): ... this.
1162 * win32-low.h (class win32_process_target): Update.
1163
1164 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1165
1166 Turn process_stratum_target's detach op into a method of
1167 process_target.
1168
1169 * target.h (struct process_stratum_target): Remove the target op.
1170 (class process_target): Add the target op.
1171 (detach_inferior): Update the macro.
1172
1173 Update the derived classes and callers below.
1174
1175 * linux-low.cc (linux_target_ops): Update.
1176 (linux_detach): Turn into ...
1177 (linux_process_target::detach): ... this.
1178 * linux-low.h (class linux_process_target): Update.
1179 * lynx-low.cc (lynx_target_ops): Update.
1180 (lynx_detach): Turn into ...
1181 (lynx_process_target::detach): ... this.
1182 * lynx-low.h (class lynx_process_target): Update.
1183 * nto-low.cc (nto_target_ops): Update.
1184 (nto_detach): Turn into ...
1185 (nto_process_target::detach): ... this.
1186 * nto-low.h (class nto_process_target): Update.
1187 * win32-low.cc (win32_target_ops): Update.
1188 (win32_detach): Turn into ...
1189 (win32_process_target::detach): ... this.
1190 * win32-low.h (class win32_process_target): Update.
1191
1192 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1193
1194 Turn process_stratum_target's kill op into a method of
1195 process_target.
1196
1197 * target.h (struct process_stratum_target): Remove the target op.
1198 (class process_target): Add the target op.
1199
1200 Update the derived classes and callers below.
1201
1202 * target.cc (kill_inferior): Update.
1203 * linux-low.cc (linux_target_ops): Update.
1204 (linux_kill): Turn into ...
1205 (linux_process_target::kill): ... this.
1206 * linux-low.h (class linux_process_target): Update.
1207 * lynx-low.cc (lynx_target_ops): Update.
1208 (lynx_kill): Turn into ...
1209 (lynx_process_target::kill): ... this.
1210 * lynx-low.h (class lynx_process_target): Update.
1211 * nto-low.cc (nto_target_ops): Update.
1212 (nto_kill): Turn into ...
1213 (nto_process_target::kill): ... this.
1214 * nto-low.h (class nto_process_target): Update.
1215 * win32-low.cc (win32_target_ops): Update.
1216 (win32_kill): Turn into ...
1217 (win32_process_target::kill): ... this.
1218 * win32-low.h (class win32_process_target): Update.
1219
1220 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1221
1222 Turn process_stratum_target's attach op into a method of
1223 process_target.
1224
1225 * target.h (struct process_stratum_target): Remove the target op.
1226 (class process_target): Add the target op.
1227 (myattach): Update the macro.
1228
1229 Update the derived classes and callers below.
1230
1231 * linux-low.cc (linux_target_ops): Update.
1232 (linux_attach): Turn into ...
1233 (linux_process_target::attach): ... this.
1234 * linux-low.h (class linux_process_target): Update.
1235 * lynx-low.cc (lynx_target_ops): Update.
1236 (lynx_attach): Turn into ...
1237 (lynx_process_target::attach): ... this.
1238 * lynx-low.h (class lynx_process_target): Update.
1239 * nto-low.cc (nto_target_ops): Update.
1240 (nto_attach): Turn into ...
1241 (nto_process_target::attach): ... this.
1242 * nto-low.h (class nto_process_target): Update.
1243 * win32-low.cc (win32_target_ops): Update.
1244 (win32_attach): Turn into ...
1245 (win32_process_target::attach): ... this.
1246 * win32-low.h (class win32_process_target): Update.
1247
1248 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1249
1250 Turn process_stratum_target's post_create_inferior op into a method
1251 of process_target.
1252
1253 * target.h (struct process_stratum_target): Remove the target op.
1254 (class process_target): Add the target op.
1255 (target_post_create_inferior): Update the macro.
1256 * target.cc (process_target::post_create_inferior): Define.
1257
1258 Update the derived classes and callers below.
1259
1260 * linux-low.cc (linux_target_ops): Update.
1261 (linux_post_create_inferior): Turn into ...
1262 (linux_process_target::post_create_inferior): ... this.
1263 * linux-low.h (class linux_process_target): Update.
1264 * lynx-low.cc (lynx_target_ops): Update.
1265 * nto-low.cc (nto_target_ops): Update.
1266 * win32-low.cc (win32_target_ops): Update.
1267
1268 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1269
1270 Turn process_stratum_target's create_inferior op into a method of
1271 process_target.
1272
1273 * target.h (struct process_stratum_target): Remove the target op.
1274 (class process_target): Add the target op.
1275 (create_inferior): Rename the macro to ...
1276 (target_create_inferior): ... this.
1277
1278 Update the derived classes and callers below.
1279
1280 * server.cc (handle_v_run): Update.
1281 (captured_main): Update.
1282 (process_serial_event): Update.
1283 * linux-low.cc (linux_target_ops): Update.
1284 (linux_create_inferior): Turn into ...
1285 (linux_process_target::create_inferior): ... this.
1286 * linux-low.h (class linux_process_target): Update.
1287 * lynx-low.cc (lynx_target_ops): Update.
1288 (lynx_create_inferior): Turn into ...
1289 (lynx_process_target::create_inferior): ... this.
1290 * lynx-low.h (class lynx_process_target): Update.
1291 * nto-low.cc (nto_target_ops): Update.
1292 (nto_create_inferior): Turn into ...
1293 (nto_process_target::create_inferior): ... this.
1294 * nto-low.h (class nto_process_target): Update.
1295 * win32-low.cc (win32_target_ops): Update.
1296 (win32_create_inferior): Turn into ...
1297 (win32_process_target::create_inferior): ... this.
1298 * win32-low.h (class win32_process_target): Update.
1299
1300 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1301
1302 * target.h (class process_target): New class definition.
1303 (struct process_stratum_target) <pt>: New field with type
1304 'process_target*'.
1305 * linux-low.h (class linux_process_target): Define as a derived
1306 class of 'process_target'.
1307 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1308 as the 'pt' field.
1309 * lynx-low.h (class lynx_process_target): Define as a derived
1310 class of 'process_target'.
1311 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1312 as the 'pt' field.
1313 * nto-low.h (class nto_process_target): Define as a derived
1314 class of 'process_target'.
1315 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1316 as the 'pt' field.
1317 * win32-low.h (class win32_process_target): Define as a derived
1318 class of 'process_target'.
1319 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1320 as the 'pt' field.
1321
1322 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1323
1324 * configure: Regenerate.
1325
1326 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1327 Andrew Burgess <andrew.burgess@embecosm.com>
1328
1329 * linux-riscv-low.cc: New file.
1330 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1331 and nat/riscv-linux-tdesc.c.
1332 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1333 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1334 Define.
1335
1336 2020-02-14 Tom Tromey <tom@tromey.com>
1337
1338 * acinclude.m4: Don't include acx_configure_dir.m4.
1339 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1340 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1341 (all, install-only, uninstall, clean-info, clean)
1342 (maintainer-clean): Don't recurse.
1343 (subdir_do, all-lib): Remove.
1344 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1345 (GNULIB_H): Remove.
1346 (generated_files): Update.
1347 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1348 * configure: Rebuild.
1349 * configure.ac: Don't configure gnulib or libiberty.
1350 (GNULIB): Update.
1351
1352 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1353
1354 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1355 preparing the command line for CreateProcess.
1356 (win32_create_inferior): Reflect the program name in debugging
1357 output that shows the process and its command line.
1358
1359 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1360
1361 * Makefile.in: Rename source files from .c to .cc.
1362 * %.c: Rename to %.cc.
1363 * configure.ac: Rename server.c to server.cc.
1364 * configure: Re-generate.
1365
1366 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1367
1368 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1369
1370 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1371
1372 * win32-low.c (win32_create_inferior): Set signal_pid.
1373
1374 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1375 Pedro Alves <palves@redhat.com>
1376
1377 Skip building gdbserver in a cross-configuration.
1378 * configure.srv: Set $gdbserver_host depending on whether $target
1379 is $host. Use $gdbserver_host instead of $host.
1380
1381 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1382
1383 * configure: Re-generate.
1384
1385 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1386
1387 * configure: Re-generate.
1388
1389 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1390
1391 * acinclude.m4: Update warning.m4 path.
1392
1393 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1394
1395 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1396 (handle_exception): Set siginfo_er.
1397 (win32_xfer_siginfo): New function.
1398
1399 2020-02-07 Tom Tromey <tom@tromey.com>
1400 Pedro Alves <palves@redhat.com>
1401
1402 * README: Update build documentation.
1403 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1404 host, not target.
1405 * configure.ac: Update paths.
1406 * configure: Rebuild.
1407 * acinclude.m4: Update paths.
1408 * Makefile.in: Update include paths.
1409 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1410 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1411 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1412 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1413 (%-generated.c): Update paths.
1414 * Move entire directory from ../gdb/gdbserver.
1415
1416 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1417
1418 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1419
1420 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1421
1422 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1423 assignment instead of srv_linux_obj.
1424
1425 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1426
1427 * server.c (handle_qxfer_libraries): Write segment-address with
1428 paddress.
1429
1430 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1431
1432 * Makefile.in (install-strip): New target.
1433 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1434 * aclocal.m4: Regenerate.
1435 * configure: Regenerate.
1436 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1437
1438 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1439
1440 * Makefile.in (SFILES): Adjust paths to point to real files.
1441 (OBS): Move waitstatus.o to target/waitstatus.o.
1442 (TAGS): Transform paths appropriately.
1443 (%.o): Rename to...
1444 (nat/%.o): ... this pattern rule.
1445 (%.o): Rename to...
1446 (target/%.o): ... this pattern rule.
1447 * configure.srv: Adjust paths throughout to include nat/ prefix
1448 with the revant files.
1449 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1450 * configure: Regenerate.
1451
1452 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1453
1454 * Makefile.in (TAGS): Remove config files from the recipe.
1455
1456 2020-01-14 Tom Tromey <tom@tromey.com>
1457
1458 * configure: Rebuild.
1459 * configure.ac: Remove any checks that were added to common.m4.
1460 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1461 lib-link.m4.
1462
1463 2020-01-14 Tom Tromey <tom@tromey.com>
1464
1465 * server.h: Include config.h.
1466 * gdbreplay.c: Include config.h.
1467 * configure: Rebuild.
1468 * configure.ac: Don't source common.host.
1469 * acinclude.m4: Update path.
1470 * Makefile.in (INCSUPPORT): New variable.
1471 (INCLUDE_CFLAGS): Add INCSUPPORT.
1472 (SFILES): Update paths.
1473 (version-generated.c): Update path to create-version.sh.
1474 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1475
1476 2020-01-14 Tom Tromey <tom@tromey.com>
1477
1478 * configure.ac (LIBS): Use WIN32APILIBS.
1479 (USE_WIN32API): Don't define.
1480 * configure: Rebuild.
1481
1482 2020-01-14 Tom Tromey <tom@tromey.com>
1483
1484 * configure: Rebuild.
1485
1486 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1487
1488 * Makefile.in (%-generated.c): Remove rule for files from
1489 regformats/i386.
1490
1491 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1492
1493 * configure: Re-generate.
1494
1495 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1496
1497 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1498 Define to static.
1499 * tracepoint.c (stop_tracing, flush_trace_buffer,
1500 about_to_request_buffer_space, get_trace_state_variable_value,
1501 set_trace_state_variable_value, gdb_collect): Add declaration.
1502
1503 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1504
1505 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1506 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1507 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1508 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1509 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1510 static.
1511
1512 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1513
1514 * inferiors.c: Include gdbsupport/common-inferior.h.
1515
1516 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1517
1518 * hostio-errno.c: Include hostio.h.
1519
1520 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1521
1522 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1523 prerequisite.
1524
1525 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1526
1527 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1528 * linux-arm-tdesc.h: Include arch/arm.h.
1529
1530 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1531
1532 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1533
1534 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1535
1536 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
1537 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
1538
1539 2020-01-10 Pedro Alves <palves@redhat.com>
1540
1541 * fork-child.c (post_fork_inferior): Pass target down to
1542 startup_inferior.
1543 * inferiors.c (switch_to_thread): Add process_stratum_target
1544 parameter.
1545 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
1546 * nto-low.c (nto_target_ops): Now a process_stratum_target.
1547 * linux-low.c (linux_target_ops): Now a process_stratum_target.
1548 * remote-utils.c (prepare_resume_reply): Pass the target to
1549 switch_to_thread.
1550 * target.c (the_target): Now a process_stratum_target.
1551 (done_accessing_memory): Pass the target to switch_to_thread.
1552 (set_target_ops): Ajust to use process_stratum_target.
1553 * target.h (struct target_ops): Rename to ...
1554 (struct process_stratum_target): ... this.
1555 (the_target, set_target_ops): Adjust.
1556 (prepare_to_access_memory): Adjust comment.
1557 * win32-low.c (child_xfer_memory): Adjust to use
1558 process_stratum_target.
1559 (win32_target_ops): Now a process_stratum_target.
1560
1561 2020-01-06 Eli Zaretskii <eliz@gnu.org>
1562 Pedro Alves <palves@redhat.com>
1563
1564 * win32-low.c (get_child_debug_event): Extract the fatal exception
1565 from the exit status and convert to the equivalent Posix signal
1566 number.
1567 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
1568 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
1569
1570 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
1571
1572 * Makefile.in: Use INSTALL_PROGRAM_ENV.
1573
1574 2020-01-01 Joel Brobecker <brobecker@adacore.com>
1575
1576 * server.c (gdbserver_version): Change copyright year to 2020.
1577 * gdbreplay.c (gdbreplay_version): Likewise.
1578
1579 2019-12-19 Christian Biesinger <cbiesinger@google.com>
1580
1581 * configure: Regenerate.
1582 * configure.ac: Quote variable arguments of test.
1583
1584 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
1585
1586 * Makefile.in: Fix build with GNU Make 3.81
1587
1588 2019-12-16 Tom Tromey <tromey@adacore.com>
1589
1590 * server.c (get_exec_file): Constify result.
1591
1592 2019-12-10 Christian Biesinger <cbiesinger@google.com>
1593
1594 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
1595 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
1596 * config.in: Regenerate.
1597 * configure: Regenerate.
1598 * configure.ac: Don't check for strerror.
1599 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
1600 Call safe_strerror instead of strerror.
1601 * server.h (strerror): Remove this now-unnecessary declaration.
1602 * tracepoint.c (init_named_socket): Call safe_strerror instead of
1603 strerror.
1604 (gdb_agent_helper_thread): Likewise.
1605 * utils.c (perror_with_name): Likewise.
1606
1607 2019-11-26 Tom Tromey <tom@tromey.com>
1608
1609 * configure, config.in: Rebuild.
1610
1611 2019-11-26 Tom Tromey <tom@tromey.com>
1612
1613 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
1614 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
1615 gdb_sigmask.
1616 * configure, config.in: Rebuild.
1617
1618 2019-11-26 Tom Tromey <tom@tromey.com>
1619
1620 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
1621 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
1622 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
1623 * acinclude.m4: Include ax_pthread.m4.
1624 * config.in, configure: Rebuild.
1625
1626 2019-11-26 Christian Biesinger <cbiesinger@google.com>
1627
1628 * debug.c (debug_set_output): Call safe_strerror instead of
1629 strerror.
1630 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
1631 (linux_kill_one_lwp): Likewise.
1632 (linux_detach_one_lwp): Likewise.
1633 (linux_wait_for_event_filtered): Likewise.
1634 (store_register): Likewise.
1635 * lynx-low.c (lynx_attach): Likewise.
1636 * mem-break.c (insert_memory_breakpoint): Likewise.
1637 (remove_memory_breakpoint): Likewise.
1638 (delete_fast_tracepoint_jump): Likewise.
1639 (set_fast_tracepoint_jump): Likewise.
1640 (uninsert_fast_tracepoint_jumps_at): Likewise.
1641 (reinsert_fast_tracepoint_jumps_at): Likewise.
1642 * nto-low.c (nto_xfer_memory): Likewise.
1643 (nto_resume): Likewise.
1644
1645 2019-11-20 Luis Machado <luis.machado@linaro.org>
1646
1647 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
1648 instead of register count.
1649 * tdesc.c (tdesc_contains_feature): New function.
1650 * tdesc.h (tdesc_contains_feature): New prototype.
1651
1652 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1653
1654 * Makefile.in: Add safe-strerror.c.
1655 * configure: Regenerate.
1656 * configure.ac: Don't source common.host.
1657
1658 2019-11-15 Christian Biesinger <cbiesinger@google.com>
1659
1660 * config.in: Regenerate.
1661 * configure: Regenerate.
1662
1663 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
1664
1665 * ax.c (ax_printf): Handle size_t_arg.
1666
1667 2019-11-06 Christian Biesinger <cbiesinger@google.com>
1668
1669 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
1670 * mi/mi-main.c (output_cores): Likewise.
1671 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
1672 (linux_xfer_osdata_modules): Likewise.
1673 * remote.c (register_remote_support_xml): Likewise.
1674 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
1675 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
1676
1677 2019-11-01 Christian Biesinger <cbiesinger@google.com>
1678
1679 * configure: Regenerate.
1680 * configure.ac: Remove check for strerror_r.
1681
1682 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1683
1684 * config.in: Regenerate.
1685 * configure: Regenerate.
1686 * configure.ac: Also check for strerror_r.
1687
1688 2019-10-31 Christian Biesinger <cbiesinger@google.com>
1689
1690 * ax.h (debug_agent): Remove duplicate declaration.
1691
1692 2019-10-26 Tom de Vries <tdevries@suse.de>
1693
1694 * linux-aarch64-low.c: Fix typos in comments.
1695 * linux-arm-low.c: Same.
1696 * linux-low.c: Same.
1697 * linux-ppc-low.c: Same.
1698 * proc-service.c: Same.
1699 * regcache.h: Same.
1700 * server.c: Same.
1701 * tracepoint.c: Same.
1702 * win32-low.c: Same.
1703
1704 2019-10-25 Tom Tromey <tromey@adacore.com>
1705
1706 * utils.c (xstrdup): Remove.
1707
1708 2019-10-23 Tom Tromey <tom@tromey.com>
1709
1710 * configure, config.in: Rebuild.
1711
1712 2019-10-23 Tom Tromey <tom@tromey.com>
1713
1714 * configure: Rebuild.
1715 * acinclude.m4: Use m4_include, not sinclude.
1716
1717 2019-10-17 Tom Tromey <tromey@adacore.com>
1718
1719 * configure: Rebuild.
1720 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
1721 in AC_CONFIG_FILES invocation.
1722 * Makefile.in (stamp-h, Makefile): Use new-style config.status
1723 invocation.
1724
1725 2019-10-16 Christian Biesinger <cbiesinger@google.com>
1726
1727 * server.c: Include xml-builtin.h.
1728 (get_xml_features): Don't declare xml_builtins here.
1729
1730 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1731
1732 * Makefile.in: Remove references to vec-ipa.o.
1733
1734 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
1735
1736 * Makefile.in: Remove references to vec.c.
1737
1738 2019-10-02 Christian Biesinger <cbiesinger@google.com>
1739
1740 * server.c (server_waiting): Change to bool.
1741 (extended_protocol): Likewise.
1742 (response_needed): Likewise.
1743 (exit_requested): Likewise.
1744 (run_once): Likewise.
1745 (report_no_resumed): Likewise.
1746 (non_stop): Likewise.
1747 (disable_packet_vCont): Likewise.
1748 (disable_packet_Tthread): Likewise.
1749 (disable_packet_qC): Likewise.
1750 (disable_packet_qfThreadInfo): Likewise.
1751 (handle_general_set): Update.
1752 (handle_detach): Update.
1753 (handle_monitor_command): Update.
1754 (handle_query): Update.
1755 (captured_main): Update.
1756 (process_serial_event): Update.
1757 * server.h (server_waiting): Change to bool.
1758 (disable_packet_vCont): Likewise.
1759 (disable_packet_Tthread): Likewise.
1760 (disable_packet_qC): Likewise.
1761 (disable_packet_qfThreadInfo): Likewise.
1762 (run_once): Likewise.
1763 (non_stop): Likewise.
1764 * target.c (target_stop_and_wait): Update.
1765
1766 2019-10-02 Tom Tromey <tromey@adacore.com>
1767
1768 * Makefile.in (SFILES): Add common-inferior.c.
1769 (OBS): Add common-inferior.o.
1770 * server.c (startup_with_shell): Don't define.
1771
1772 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
1773
1774 * linux-low.c (linux_low_read_btrace): Update for change to
1775 std::vector.
1776
1777 2019-09-20 Christian Biesinger <cbiesinger@google.com>
1778
1779 * debug.c (debug_threads): Remove comment in favor of the header.
1780 * debug.h (using_threads): Add declaration.
1781 (debug_threads): Add comment.
1782 * linux-aarch64-low.c: Include debug.h and remove declaration of
1783 debug_threads.
1784 * nto-low.c: Likewise.
1785 * remote-utils.c: Likewise.
1786 * thread-db.c: Likewise.
1787
1788 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
1789
1790 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
1791 and powerpc-cell64l-ipa.o.
1792 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
1793 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
1794 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
1795 (spu*-*-*): Remove.
1796
1797 * spu-low.c: Remove file.
1798
1799 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
1800 (parse_spufs_run): Remove.
1801 (ppc_get_pc): Remove Cell/B.E. support.
1802 (ppc_set_pc): Likewise.
1803 (ppc_breakpoint_at): Likewise.
1804 (ppc_arch_setup): Likewise.
1805 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
1806 tdesc_powerpc_cell32l.
1807 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
1808 or init_registers_powerpc_cell32l.
1809 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
1810 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
1811 or init_registers_powerpc_cell32l.
1812 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
1813 (init_registers_powerpc_cell32l): Remove prototype.
1814 (init_registers_powerpc_cell64l): Likewise.
1815
1816 * target.h (struct target_ops): Remove qxfer_spu member.
1817 * server.c (handle_qxfer_spu): Remove.
1818 (qxfer_packets): Remove entry for "spu".
1819 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
1820 * linux-low.c (SPUFS_MAGIC): Remove.
1821 (spu_enumerate_spu_ids): Remove.
1822 (linux_qxfer_spu): Remove.
1823 (linux_target_ops): Remove qxfer_spu member.
1824 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
1825 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
1826 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
1827
1828 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
1829
1830 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
1831 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
1832 * config.in: Regenerate.
1833 * configure: Regenerate.
1834
1835 2019-08-15 Tom Tromey <tromey@adacore.com>
1836
1837 * target.c (target_write_memory): Use gdb::byte_vector.
1838
1839 2019-08-15 Tom Tromey <tromey@adacore.com>
1840
1841 * tracepoint.c (write_inferior_data_pointer)
1842 (write_inferior_integer, write_inferior_int8)
1843 (write_inferior_uinteger, m_tracepoint_action_download)
1844 (r_tracepoint_action_download, x_tracepoint_action_download)
1845 (l_tracepoint_action_download, clear_inferior_trace_buffer)
1846 (download_agent_expr, download_tracepoint_1)
1847 (download_trace_state_variables, upload_fast_traceframes): Update.
1848 * server.c (gdb_write_memory): Update.
1849 * remote-utils.c (relocate_instruction): Update.
1850 * proc-service.c (ps_pdwrite): Update.
1851 * mem-break.c (remove_memory_breakpoint)
1852 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
1853 (uninsert_fast_tracepoint_jumps_at)
1854 (reinsert_fast_tracepoint_jumps_at): Update.
1855 * linux-x86-low.c (append_insns)
1856 (i386_install_fast_tracepoint_jump_pad)
1857 (amd64_write_goto_address, i386_write_goto_address): Update.
1858 * linux-s390-low.c (append_insns, s390_write_goto_address):
1859 Update.
1860 * linux-ppc-low.c (ppc_relocate_instruction)
1861 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
1862 (ppc_write_goto_address): Update.
1863 * linux-aarch64-low.c (append_insns): Update.
1864 * target.h (struct target_ops): Update.
1865 (write_inferior_memory): Don't declare.
1866 * target.c (target_write_memory): Rename from
1867 write_inferior_memory. Remove old target_write_memory.
1868
1869 2019-08-15 Tom Tromey <tromey@adacore.com>
1870
1871 * target.c (write_inferior_memory): Use std::vector.
1872
1873 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
1874
1875 PR build/24886
1876 * configure.ac: Drop enable-libmcheck support.
1877 * configure, config.in: Rebuild.
1878 * acinclude.m4: Don't include it.
1879
1880 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1881
1882 * configure.srv: Remove Arm xml files.
1883
1884 2019-07-19 Alan Hayward <alan.hayward@arm.com>
1885
1886 * configure.srv: Add new files. Remove xml generated files.
1887 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
1888 registers.
1889 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
1890 * linux-aarch32-tdesc.c: New file.
1891 * linux-aarch32-tdesc.h: New file.
1892 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
1893 * linux-arm-low.c (init_registers_arm, tdesc_arm)
1894 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
1895 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
1896 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
1897 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
1898 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
1899 (arm_read_description): Call arm_linux_read_description.
1900 (initialize_low_arch): Don't init registers.
1901 * linux-arm-tdesc.c: New file.
1902 * linux-arm-tdesc.h: New file.
1903
1904 2019-07-10 Alan Hayward <alan.hayward@arm.com>
1905
1906 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
1907 Move counter inside for.
1908 (arm_read_description): Check ptrace earlier.
1909 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
1910
1911 2019-07-09 Tom Tromey <tom@tromey.com>
1912
1913 * configure: Rebuild.
1914 * configure.ac: Change common to gdbsupport.
1915 * acinclude.m4: Change common to gdbsupport.
1916 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
1917 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
1918 common to gdbsupport.
1919 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
1920 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
1921 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
1922 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
1923 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
1924 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
1925 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
1926 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
1927 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
1928 common to gdbsupport.
1929
1930 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1931
1932 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
1933 defines.
1934 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
1935
1936 2019-07-04 Alan Hayward <alan.hayward@arm.com>
1937
1938 * configure.srv: Remove legacy xml.
1939 * linux-aarch64-low.c (initialize_low_arch): Remove
1940 initialize_low_tdesc call.
1941 * linux-aarch64-tdesc-selftest.c: Remove file.
1942 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
1943 * linux-x86-low.c (initialize_low_arch): Remove
1944 initialize_low_tdesc call.
1945 * linux-x86-tdesc-selftest.c: Remove file.
1946 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
1947
1948 2019-06-20 Tom de Vries <tdevries@suse.de>
1949
1950 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
1951 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
1952
1953 2019-06-19 Tom de Vries <tdevries@suse.de>
1954
1955 * debug.h (debug_write): Change return type to ssize_t.
1956 * debug.c (debug_write): Same.
1957
1958 2019-06-14 Tom Tromey <tom@tromey.com>
1959
1960 * configure.ac: Use new path to gnulib.
1961 * configure: Rebuild.
1962 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
1963 to gnulib.
1964
1965 2019-06-11 Tom Tromey <tom@tromey.com>
1966
1967 * Makefile.in (SFILES): Add alloc.c.
1968 (OBS): Add alloc.o.
1969 (IPA_OBJS): Add alloc-ipa.o.
1970 (alloc-ipa.o): New target.
1971 (%.o: ../%.c): New pattern rule.
1972
1973 2019-06-10 Tom Tromey <tromey@adacore.com>
1974
1975 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
1976 end warning with a newline.
1977 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
1978 newline.
1979 * thread-db.c (attach_thread): Don't end warning with a newline.
1980 (thread_db_notice_clone): Likewise.
1981 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
1982 newline.
1983 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
1984 end warning with a newline.
1985
1986 2019-06-04 Pedro Alves <palves@redhat.com>
1987
1988 * server.c (captured_main): Use make_unique_xstrdup.
1989
1990 2019-06-02 Tom Tromey <tom@tromey.com>
1991
1992 * gdbreplay.c (fromhex): Remove.
1993 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
1994
1995 2019-05-29 Tom Tromey <tromey@adacore.com>
1996
1997 * configure: Rebuild.
1998
1999 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2000
2001 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2002 sign extension code on 32-bit builds.
2003
2004 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2005
2006 * remote-utils.c:
2007 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2008
2009 2019-04-19 Tom Tromey <tom@tromey.com>
2010
2011 * server.c (struct vstop_notif): Derive from notif_event.
2012 <base>: Remove.
2013 (queue_stop_reply): Update.
2014 (remove_all_on_match_ptid): Change type. Rewrite.
2015 (discard_queued_stop_replies): Rewrite.
2016 (in_queued_stop_replies_ptid): Change type.
2017 (in_queued_stop_replies): Rewrite.
2018 (notif_stop): Update.
2019 (queue_stop_reply_callback): Update.
2020 (captured_main): Don't call initialize_notif.
2021 (push_stop_notification): Update.
2022 * notif.c (notif_write_event, handle_notif_ack)
2023 (notif_event_enque, notif_push): Update.
2024 (notif_event_xfree, initialize_notif): Remove.
2025 * notif.h (struct notif_event): Include <list>, not
2026 "common/queue.h".
2027 (struct notif_server) <queue>: Now a std::list.
2028 (notif_event_p): Remove typedef.
2029 (initialize_notif): Don't declare.
2030 (struct notif_event): Add virtual destructor.
2031
2032 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2033
2034 * ax.c (ax_vdebug): Call debug_printf.
2035 * debug.c (debug_write): New function.
2036 * debug.h (debug_write): New declaration.
2037 * linux-low.c (sigchld_handler): Call debug_write.
2038
2039 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2040
2041 * debug.c (debug_set_output): New function.
2042 (debug_vprintf): Send output to debug_file.
2043 (debug_flush): Likewise.
2044 * debug.h (debug_set_output): New declaration.
2045 * server.c (handle_monitor_command): Add debug-file option.
2046 (captured_main): Likewise.
2047
2048 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2049
2050 * debug.c (remote_debug): Add definition.
2051 * debug.h (remote_debug): Add declaration.
2052 * hostio.c (remote_debug): Remove declaration.
2053 * remote-utils.c (struct ui_file): Likewise.
2054 (remote_debug): Likewise.
2055 * remote-utils.h (remote_debug): Likewise,
2056 * server.c (remote_debug): Remove definition.
2057
2058 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2059
2060 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2061 when using a 64-bit gdbserver.
2062
2063 2019-04-09 Tom Tromey <tromey@adacore.com>
2064
2065 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2066
2067 2019-04-08 Tom Tromey <tom@tromey.com>
2068
2069 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2070 throw.
2071 (linux_resume_one_lwp): Likewise.
2072
2073 2019-04-08 Tom Tromey <tom@tromey.com>
2074
2075 * gdbreplay.c: Update.
2076 * linux-low.c: Update.
2077 * server.c: Update.
2078
2079 2019-04-08 Tom Tromey <tom@tromey.com>
2080
2081 * server.c: Use C++ exception handling.
2082 * linux-low.c: Use C++ exception handling.
2083 * gdbreplay.c: Use C++ exception handling.
2084
2085 2019-04-08 Tom Tromey <tom@tromey.com>
2086
2087 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2088 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2089 (captured_main, main): Update.
2090 * gdbreplay.c (main): Update.
2091
2092 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2093
2094 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2095 value in argument pointer, return 1 if the entry is found and 0
2096 otherwise. Move comment.
2097 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2098 * linux-low.h (linux_get_auxv): Declare.
2099 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2100
2101 2019-04-05 Tom Tromey <tromey@adacore.com>
2102
2103 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2104 variables.
2105
2106 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2107
2108 * linux-low.c (AT_HWCAP2): Add define if not already included.
2109
2110 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2111
2112 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2113 (aarch64_arch_setup): Call linux_get_hwcap.
2114 * linux-arm-low.c (arm_get_hwcap): Remove function.
2115 (arm_read_description): Call linux_get_hwcap.
2116 * linux-low.c (linux_get_auxv): New function.
2117 (linux_get_hwcap): Likewise.
2118 (linux_get_hwcap2): Likewise.
2119 * linux-low.h (linux_get_hwcap): New declaration.
2120 (linux_get_hwcap2): Likewise.
2121 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2122 (ppc_arch_setup): Call linux_get_hwcap.
2123 * linux-s390-low.c (s390_get_hwcap): Remove function.
2124 (s390_arch_setup): Call linux_get_hwcap.
2125
2126 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2127 Jiong Wang <jiong.wang@arm.com>
2128
2129 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2130 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2131 to fail.
2132 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2133
2134 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2135 Jiong Wang <jiong.wang@arm.com>
2136
2137 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2138 (aarch64_get_hwcap): New function.
2139 (aarch64_arch_setup): Read APIA hwcap.
2140
2141 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2142 Jiong Wang <jiong.wang@arm.com>
2143
2144 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2145 (initialize_low_tracepoint): Likewise.
2146 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2147 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2148 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2149 (aarch64_linux_read_description): Likewise.
2150 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2151
2152 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2153
2154 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2155 i386_create_target_description for 'segments' parameter.
2156 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2157 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2158 * win32-i386-low.c (i386_arch_setup): Likewise.
2159
2160 2019-03-12 Tom Tromey <tromey@adacore.com>
2161
2162 * linux-low.c (iterate_over_lwps): Update.
2163
2164 2019-03-06 Tom Tromey <tom@tromey.com>
2165
2166 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2167 (captured_main): Use SCOPE_EXIT.
2168
2169 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2170
2171 * configure.srv: Use '$enable_unittest' instead of '$development'
2172 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2173 case.
2174
2175 2019-02-27 Tom Tromey <tromey@adacore.com>
2176
2177 * gdbreplay.c (logchar): Handle \r\n.
2178
2179 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2180
2181 * linux-low.c (linux_attach): Add process before lwp.
2182 * server.c (attach_inferior): Check if already attached.
2183
2184 2019-02-07 Tom Tromey <tom@tromey.com>
2185
2186 * x86-tdesc.h: Rename include guard.
2187 * x86-low.h: Add include guard.
2188 * wincecompat.h: Rename include guard.
2189 * win32-low.h: Add include guard.
2190 * utils.h: Rename include guard.
2191 * tracepoint.h: Rename include guard.
2192 * tdesc.h: Rename include guard.
2193 * target.h: Rename include guard.
2194 * server.h: Rename include guard.
2195 * remote-utils.h: Rename include guard.
2196 * regcache.h: Rename include guard.
2197 * nto-low.h: Rename include guard.
2198 * notif.h: Add include guard.
2199 * mem-break.h: Rename include guard.
2200 * lynx-low.h: Add include guard.
2201 * linux-x86-tdesc.h: Add include guard.
2202 * linux-s390-tdesc.h: Add include guard.
2203 * linux-ppc-tdesc-init.h: Add include guard.
2204 * linux-low.h: Add include guard.
2205 * linux-aarch64-tdesc.h: Add include guard.
2206 * linux-aarch32-low.h: Add include guard.
2207 * inferiors.h: Rename include guard.
2208 * i387-fp.h: Rename include guard.
2209 * hostio.h: Rename include guard.
2210 * gdbthread.h: Rename include guard.
2211 * gdb_proc_service.h: Rename include guard.
2212 * event-loop.h: Rename include guard.
2213 * dll.h: Rename include guard.
2214 * debug.h: Rename include guard.
2215 * ax.h: Rename include guard.
2216
2217 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2218
2219 PR gdb/23985
2220 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2221 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2222
2223 2019-01-25 Tom Tromey <tom@tromey.com>
2224
2225 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2226
2227 2019-01-25 Tom Tromey <tom@tromey.com>
2228
2229 * win32-low.c: Fix common/ includes.
2230 * win32-i386-low.c: Fix common/ includes.
2231 * tracepoint.c: Fix common/ includes.
2232 * thread-db.c: Fix common/ includes.
2233 * target.h: Fix common/ includes.
2234 * symbol.c: Fix common/ includes.
2235 * spu-low.c: Fix common/ includes.
2236 * server.h: Fix common/ includes.
2237 * server.c: Fix common/ includes.
2238 * remote-utils.c: Fix common/ includes.
2239 * regcache.h: Fix common/ includes.
2240 * regcache.c: Fix common/ includes.
2241 * nto-x86-low.c: Fix common/ includes.
2242 * notif.h: Fix common/ includes.
2243 * mem-break.h: Fix common/ includes.
2244 * lynx-low.c: Fix common/ includes.
2245 * lynx-i386-low.c: Fix common/ includes.
2246 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2247 * linux-x86-low.c: Fix common/ includes.
2248 * linux-low.c: Fix common/ includes.
2249 * inferiors.h: Fix common/ includes.
2250 * i387-fp.c: Fix common/ includes.
2251 * hostio.c: Fix common/ includes.
2252 * hostio-errno.c: Fix common/ includes.
2253 * gdbthread.h: Fix common/ includes.
2254 * gdbreplay.c: Fix common/ includes.
2255 * fork-child.c: Fix common/ includes.
2256 * event-loop.c: Fix common/ includes.
2257 * ax.c:
2258 (enum gdb_agent_op): Fix common/ includes.
2259
2260 2019-01-21 Tom Tromey <tom@tromey.com>
2261
2262 * tracepoint.c: Fix includes.
2263 * remote-utils.c: Fix includes.
2264 * linux-x86-low.c: Fix includes.
2265
2266 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2267
2268 * gdbreplay.c (gdbreplay_version): Update copyright year in
2269 version message.
2270 * server.c (gdbserver_version): Likewise.
2271
2272 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2273
2274 * linux-low.c (add_lwp): Switch ordering.
2275
2276 2018-11-29 Tom Tromey <tom@tromey.com>
2277
2278 * win32-low.c (win32_join): Take pid, not process.
2279 * target.h (struct target_ops) <join>: Change argument type.
2280 (join_inferior): Change argument name.
2281 * spu-low.c (spu_join): Take pid, not process.
2282 * server.c (handle_detach): Preserve pid before destroying
2283 process.
2284 * lynx-low.c (lynx_join): Take pid, not process.
2285 * linux-low.c (linux_join): Take pid, not process.
2286
2287 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2288
2289 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2290 (aarch64_cannot_fetch_register): Likewise.
2291 (struct linux_target_ops): Update references.
2292
2293 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2294
2295 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2296
2297 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2298
2299 * configure.srv (ipa_ppc_linux_regobj): Add
2300 powerpc-isa207-htm-vsx32l-ipa.o and
2301 powerpc-isa207-htm-vsx64l-ipa.o.
2302 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2303 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2304 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2305 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2306 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2307 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2308 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2309 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2310 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2311 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2312 (init_registers_powerpc_isa207_htm_vsx32l)
2313 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2314 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2315 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2316 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2317 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2318 (ppc_store_tm_ctarregset): New functions.
2319 (ppc_regsets): Add entries for HTM regsets.
2320 (ppc_arch_setup): Set htm in features struct when needed. Set
2321 sizes for the HTM regsets.
2322 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2323 (initialize_low_arch): Call
2324 init_registers_powerpc_isa207_htm_vsx32l and
2325 init_registers_powerpc_isa207_htm_vsx64l.
2326 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2327 PPC_TDESC_ISA207_HTM_VSX.
2328 (initialize_low_tracepoint): Call
2329 init_registers_powerpc_isa207_htm_vsx32l and
2330 init_registers_powerpc_isa207_htm_vsx64l.
2331
2332 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2333
2334 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2335 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2336 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2337 (ppc_store_pmuregset): New functions.
2338 (ppc_regsets): Add entries for ebb and pmu regsets.
2339 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2340 pmu regsets are available. Set sizes for these regsets.
2341
2342 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2343
2344 * configure.srv (ipa_ppc_linux_regobj): Add
2345 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2346 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2347 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2348 rs6000/powerpc-isa207-vsx32l.xml, and
2349 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2350 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2351 <PPC_TDESC_ISA207_VSX>: New enum value.
2352 (init_registers_powerpc_isa207_vsx32l): Declare.
2353 (init_registers_powerpc_isa207_vsx64l): Declare.
2354 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2355 (ppc_store_tarregset): New function.
2356 (ppc_regsets): Add entry for the TAR regset.
2357 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2358 size for the TAR regsets.
2359 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2360 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2361 and init_registers_powerpc_isa207_vsx64l.
2362 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2363 (initialize_low_tracepoint): Call
2364 init_registers_powerpc_isa207_vsx32l and
2365 init_registers_powerpc_isa207_vsx64l.
2366
2367 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2368 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2369
2370 * configure.srv (ipa_ppc_linux_regobj): Add
2371 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2372 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2373 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2374 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2375 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2376 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2377 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2378 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2379 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2380 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2381 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2382 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2383 (ppc_hwcap): Add comment.
2384 (ppc_hwcap2): New global.
2385 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2386 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2387 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2388 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2389 when needed. Set sizes for the the DSCR and PPR regsets.
2390 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2391 (initialize_low_arch): Call
2392 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2393 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2394 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2395 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2396 (initialize_low_tracepoint): Call
2397 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2398 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2399
2400 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2401
2402 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2403
2404 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2405 Simon Marchi <simark@simark.ca>
2406
2407 * acinclude.m4: Include "../selftest.m4".
2408 * configure: Regenerate.
2409 * configure.ac: Use "GDB_AC_SELFTEST".
2410 * configure.srv: Use "$enable_unittests" instead of
2411 "$development" when checking whether unit tests have been
2412 enabled.
2413 * server.c (captured_main): Update message informing that
2414 selftests have been disabled.
2415
2416 2018-10-04 Tom Tromey <tom@tromey.com>
2417
2418 * configure: Rebuild.
2419
2420 2018-10-04 Tom Tromey <tom@tromey.com>
2421
2422 * server.c (handle_status): Rename inner "thread".
2423 (process_serial_event): Declare "res" in 'm' case.
2424 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2425 (iterate_over_lwps): Rename inner "thread".
2426 (linux_qxfer_libraries_svr4): Rename inner "len".
2427 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2428
2429 2018-10-01 Gary Benson <gbenson@redhat.com>
2430
2431 * gdb_proc_service.h: Moved common code to
2432 common/gdb_proc_service.h.
2433
2434 2018-10-01 Gary Benson <gbenson@redhat.com>
2435
2436 * gdb_proc_service.h: Synchronize comments and whitespace with
2437 GDB's version of this file.
2438
2439 2018-09-25 Tom Tromey <tom@tromey.com>
2440
2441 * configure: Rebuild.
2442 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2443
2444 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2445
2446 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2447 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2448 ($(IPA_LIB)): Sort IPA_OBJS.
2449
2450 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2451
2452 * Makefile.in: Remove references to $(ADD_DEPS).
2453
2454 2018-09-16 Tom Tromey <tom@tromey.com>
2455
2456 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2457 variables.
2458 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2459 variables.
2460
2461 2018-09-05 Tom Tromey <tom@tromey.com>
2462
2463 * configure: Rebuild.
2464
2465 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2466
2467 PR build/23399
2468 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2469
2470 2018-08-27 Tom Tromey <tom@tromey.com>
2471
2472 PR build/23087:
2473 * configure: Rebuild.
2474
2475 2018-08-27 Tom Tromey <tom@tromey.com>
2476
2477 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2478 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2479 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2480 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2481 (s390x_emit_stack_adjust): Add casts to unsigned char.
2482
2483 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2484
2485 PR gdb/23374
2486 PR gdb/23375
2487 * server.h (struct client_state) <disable_randomization>:
2488 Initialize to 1.
2489
2490 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2491
2492 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2493 variable.
2494 (mips_supply_ptrace_register): Likewise.
2495
2496 2018-07-22 Tom Tromey <tom@tromey.com>
2497
2498 * configure: Rebuild.
2499
2500 2018-07-22 Tom Tromey <tom@tromey.com>
2501
2502 * win32-low.c (win32_create_inferior): Remove unused variables.
2503 * gdbreplay.c (remote_open): Remove unused variable.
2504 * remote-utils.c (remote_prepare): Remove unused variable.
2505 * x86-tdesc.h (X86_TDESC_H): Define.
2506 (amd64_expedite_regs): Define conditionally.
2507 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2508 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2509 * remote-utils.c (readchar): Remove unused variable.
2510
2511 2018-07-13 Pedro Alves <palves@redhat.com>
2512
2513 * linux-low.c (linux_kill): Change parameter to process_info
2514 pointer instead of pid. Adjust.
2515 * lynx-low.c (lynx_kill): Likewise.
2516 * nto-low.c (nto_kill): Likewise.
2517 * spu-low.c (spu_kill): Likewise.
2518 * win32-low.c (win32_kill): Likewise.
2519 * server.c (handle_v_kill, kill_inferior_callback)
2520 (detach_or_kill_for_exit): Adjust.
2521 * target.c (kill_inferior): Change parameter to process_info
2522 pointer instead of pid. Adjust.
2523 * target.h (struct target_ops) <kill>: Change parameter to
2524 process_info pointer instead of pid. Adjust all implementations
2525 and callers.
2526 (kill_inferior): Likewise.
2527
2528 2018-07-13 Pedro Alves <palves@redhat.com>
2529
2530 * linux-low.c (linux_detach, linux_join): Change parameter to
2531 process_info pointer instead of pid. Adjust.
2532 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2533 * nto-low.c (nto_detach): Likewise.
2534 * spu-low.c (spu_detach, spu_join): Likewise.
2535 * win32-low.c (win32_detach, win32_join): Likewise.
2536 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
2537 * target.h (struct target_ops) <detach, join>: Change parameter to
2538 process_info pointer instead of pid. Adjust all implementations
2539 and callers.
2540 (detach_inferior, join_inferior): Rename 'pid' parameter to
2541 'proc'.
2542
2543 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2544 Jan Kratochvil <jan.kratochvil@redhat.com>
2545 Paul Fertser <fercerpav@gmail.com>
2546 Tsutomu Seki <sekiriki@gmail.com>
2547
2548 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
2549 (OBS): Add 'common/netstuff.o'.
2550 (GDBREPLAY_OBS): Likewise.
2551 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
2552 (remote_open): Implement support for IPv6
2553 connections.
2554 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
2555 and 'wspiapi.h'.
2556 (handle_accept_event): Accept connections from IPv6 sources.
2557 (remote_prepare): Handle IPv6-style hostnames; implement
2558 support for IPv6 connections.
2559 (remote_open): Implement support for printing connections from
2560 IPv6 sources.
2561
2562 2018-07-11 Pedro Alves <palves@redhat.com>
2563
2564 PR gdb/23377
2565 * mem-break.c (any_persistent_commands): Add process_info
2566 parameter and use it instead of relying on the current process.
2567 Change return type to bool.
2568 * mem-break.h (any_persistent_commands): Add process_info
2569 parameter and change return type to bool.
2570 * server.c (handle_detach): Remove require_running_or_return call.
2571 Look up the process_info for the process we're about to detach.
2572 If not found, return back error to GDB. Adjust
2573 any_persistent_commands call to pass down a process pointer.
2574
2575 2018-07-11 Pedro Alves <palves@redhat.com>
2576
2577 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
2578 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
2579 instead of collect_register_by_name.
2580 * regcache.c (regcache_raw_get_unsigned_by_name): New.
2581 * regcache.h (regcache_raw_get_unsigned_by_name): New.
2582
2583 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
2584 Pedro Alves <palves@redhat.com>
2585
2586 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
2587
2588 2018-07-03 Tom Tromey <tom@tromey.com>
2589
2590 * linux-low.c: Update.
2591 * lynx-low.c: Update.
2592 * mem-break.c: Update.
2593 * nto-low.c: Update.
2594 * remote-utils.c: Update.
2595 * server.c: Update.
2596 * spu-low.c: Update.
2597 * target.c: Update.
2598 * win32-low.c: Update.
2599
2600 2018-07-03 Tom Tromey <tom@tromey.com>
2601
2602 * server.c: Update.
2603
2604 2018-07-03 Tom Tromey <tom@tromey.com>
2605
2606 * linux-low.c: Update.
2607
2608 2018-07-03 Tom Tromey <tom@tromey.com>
2609
2610 * target.c: Update.
2611
2612 2018-07-03 Tom Tromey <tom@tromey.com>
2613
2614 * linux-low.c: Update.
2615 * linux-mips-low.c: Update.
2616 * lynx-low.c: Update.
2617 * nto-low.c: Update.
2618 * remote-utils.c: Update.
2619 * server.c: Update.
2620 * spu-low.c: Update.
2621 * target.c: Update.
2622 * thread-db.c: Update.
2623
2624 2018-07-03 Tom Tromey <tom@tromey.com>
2625
2626 * linux-low.c: Update.
2627 * linux-mips-low.c: Update.
2628 * lynx-low.c: Update.
2629 * mem-break.c: Update.
2630 * nto-low.c: Update.
2631 * remote-utils.c: Update.
2632 * server.c: Update.
2633 * spu-low.c: Update.
2634 * target.c: Update.
2635 * tracepoint.c: Update.
2636
2637 2018-07-03 Tom Tromey <tom@tromey.com>
2638
2639 * linux-low.c: Update.
2640 * linux-ppc-low.c: Update.
2641 * linux-x86-low.c: Update.
2642 * proc-service.c: Update.
2643 * server.c: Update.
2644 * spu-low.c: Update.
2645 * thread-db.c: Update.
2646 * win32-low.c: Update.
2647
2648 2018-07-03 Tom Tromey <tom@tromey.com>
2649
2650 * linux-low.c: Update.
2651 * lynx-low.c: Update.
2652 * nto-low.c: Update.
2653 * remote-utils.c: Update.
2654 * spu-low.c: Update.
2655 * thread-db.c: Update.
2656 * win32-low.c: Update.
2657
2658 2018-06-29 Joel Brobecker <brobecker@adacore.com>
2659
2660 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
2661 parameter in call to 'amd64_create_target_description'.
2662
2663 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
2664
2665 * x86-tdesc.h: Remove executable permission flag.
2666
2667 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
2668
2669 * configure.ac: Remove AC_PREREQ, add missing quoting.
2670 * configure: Re-generate.
2671 * config.in: Re-generate.
2672 * aclocal.m4: Re-generate.
2673
2674 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
2675
2676 * tracepoint.h (current_traceframe): Remove declaration.
2677
2678 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2679
2680 * linux-aarch64-low.c (is_sve_tdesc): New function.
2681 (aarch64_sve_regs_copy_to_regcache): Likewise.
2682 (aarch64_sve_regs_copy_from_regcache): Likewise.
2683 (aarch64_regs_info): Add SVE checks.
2684 (initialize_low_arch): Initialize SVE.
2685
2686 2018-06-18 Alan Hayward <alan.hayward@arm.com>
2687
2688 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
2689
2690 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2691
2692 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
2693 (initialize_low_tracepoint): Likewise
2694 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
2695 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
2696 param.
2697 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
2698 checks.
2699 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
2700
2701 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2702
2703 * server.h (PBUFSIZ): Increase size
2704
2705 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2706
2707 * regcache.c (regcache::raw_compare): New function.
2708 * regcache.h (regcache::raw_compare): New declaration.
2709
2710 2018-06-11 Alan Hayward <alan.hayward@arm.com>
2711
2712 * regcache.c (new_register_cache): Use new.
2713 (free_register_cache): Use delete.
2714 (register_data): Use const.
2715 (supply_register): Move body inside regcache.
2716 (regcache::raw_supply): New override function.
2717 (collect_register): Move body inside regcache.
2718 (regcache::raw_collect): New override function.
2719 (regcache::get_register_status): New override function.
2720 * regcache.h (struct regcache): Inherit from reg_buffer_common.
2721
2722 2018-06-09 Tom Tromey <tom@tromey.com>
2723
2724 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
2725 declare queue.
2726 (event_queue): Use std::queue.
2727 (gdb_event_xfree): Remove.
2728 (initialize_event_loop, process_event, wait_for_event): Update.
2729
2730 2018-06-08 Stan Cox <scox@redhat.com>
2731
2732 * win32-low.c (win32_create_inferior): last_ptid and last_status
2733 moved to client_state.
2734
2735 2018-06-08 Pedro Alves <palves@redhat.com>
2736
2737 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
2738 common/common-exceptions.o, common/common-utils.o,
2739 common/errors.o, common/print-utils.o and utils.o.
2740 * gdbreplay.c: Include "common-defs.h" instead of the two
2741 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
2742 string.h or alloca.h.
2743 (perror_with_name): Delete.
2744 (remote_open): Use xstrdup instead of strdup.
2745 (main): Rename to ...
2746 (captured_main): ... this.
2747 (main): New.
2748
2749 2018-06-08 Tom Tromey <tom@tromey.com>
2750
2751 * linux-low.c (linux_low_read_btrace): Update.
2752
2753 2018-06-04 Stan Cox <scox@redhat.com>
2754
2755 * server.h (struct client_state): New.
2756 * server.c (cont_thread, general_thread, multi_process)
2757 (report_fork_events, report_vfork_events, report_exec_events)
2758 (report_thread_events, swbreak_feature, hwbreak_feature)
2759 (vCont_supported, disable_randomization, pass_signals)
2760 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
2761 Moved to client_state.
2762 * remote-utils.c (remote_debug, noack_mode)
2763 (transport_is_reliable): Moved to client_state.
2764 * tracepoint.c (current_traceframe): Moved to client_state.
2765
2766 Update all callers.
2767 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
2768 linux-low.c, remote-utils.h, target.c: Use client_state.
2769
2770 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2771
2772 * configure.srv: Add new c/h file.
2773
2774 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2775
2776 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
2777 null VQ.
2778
2779 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2780
2781 * gdb.arch/mips-fpregset-core.exp: New test.
2782 * gdb.arch/mips-fpregset-core.c: New test source.
2783
2784 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
2785
2786 PR server/23198
2787 * hostio.c (require_int): Do not report overflow for integers
2788 between 0xfffffff and 0x7fffffff.
2789
2790 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2791
2792 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
2793 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
2794 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
2795 functions.
2796 (the_low_target): Wire them.
2797
2798 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2799
2800 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
2801 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
2802 mode. Call collect_register_by_name with vscr using
2803 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
2804 (ppc_store_vrregset): Add and set vscr_offset variable as in
2805 ppc_fill_vrregset. Call supply_register_by_name with vscr using
2806 vscr_offset.
2807
2808 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2809
2810 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
2811 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
2812 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
2813
2814 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2815
2816 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
2817 (ppc_store_vsxregset): Likewise.
2818 (ppc_fill_vrregset): Likewise.
2819 (ppc_store_vrregset): Likewise.
2820 (ppc_fill_evrregset): Likewise.
2821 (ppc_store_evrregset): Likewise.
2822 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
2823 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
2824 needed.
2825
2826 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2827
2828 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
2829 wordsize of the inferior. Call ppc_linux_target_wordsize.
2830
2831 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2832
2833 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
2834 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
2835 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
2836 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
2837 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
2838 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
2839 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
2840 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
2841 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
2842 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
2843 (tdesc_powerpc_e500l): Remove.
2844 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
2845 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
2846 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
2847 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
2848 linux-ppc-tdesc.h.
2849 (ppc_arch_setup): Remove target description matching code. Fill a
2850 ppc_linux_features struct and call ppc_linux_match_description
2851 with it.
2852
2853 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2854
2855 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
2856 width of the requested register exceeds the width of the
2857 `ptrace' data type.
2858 (mips_cannot_store_register): Likewise.
2859
2860 2018-05-21 Maciej W. Rozycki <macro@mips.com>
2861
2862 * linux-mips-low.c (mips_fetch_register): New function. Update
2863 preceding comment.
2864 (mips_store_gregset): Supply 0 rather than $restart for $zero.
2865 (the_low_target): Wire `mips_fetch_register'.
2866
2867 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2868
2869 * lynx-i386-low.c (LYNXOS_178): New macro.
2870 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
2871 the layout on LynxOS-178.
2872 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
2873 handle floating point registers that are not supported by
2874 LynxOS-178.
2875
2876 2018-05-10 Tom Tromey <tom@tromey.com>
2877
2878 * configure: Rebuild.
2879
2880 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2881
2882 PR server/23158:
2883 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
2884 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
2885 Use it to set the expedite_regs field in the given tdesc.
2886 * x86-tdesc.h: New file.
2887 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
2888 Adjust following the addition of the new expedite_regs parameter
2889 to init_target_desc.
2890 * linux-tic6x-low.c (tic6x_read_description): Likewise.
2891 * linux-x86-tdesc.c: #include "x86-tdesc.h".
2892 (i386_linux_read_description, amd64_linux_read_description):
2893 Adjust following the addition of the new expedite_regs parameter
2894 to init_target_desc.
2895 * lynx-i386-low.c: #include "x86-tdesc.h".
2896 (lynx_i386_arch_setup): Adjust following the addition of the new
2897 expedite_regs parameter to init_target_desc.
2898 * nto-x86-low.c: #include "x86-tdesc.h".
2899 (nto_x86_arch_setup): Adjust following the addition of the new
2900 expedite_regs parameter to init_target_desc.
2901 * win32-i386-low.c: #include "x86-tdesc.h".
2902 (i386_arch_setup): Adjust following the addition of the new
2903 expedite_regs parameter to init_target_desc.
2904
2905 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2906
2907 PR server/23158:
2908 * win32-low.c (win32_create_inferior): Add call to my_wait
2909 setting last_status global.
2910
2911 2018-05-10 Joel Brobecker <brobecker@adacore.com>
2912
2913 PR server/23158:
2914 * win32-low.c (create_process): Only call gdb_tilde_expand if
2915 inferior_cwd is not NULL.
2916
2917 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
2918
2919 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
2920 registers to the cache if their values have changed.
2921 (i387_xsave_to_cache): Provide default values for x87 control
2922 registers when these features are available, but disabled.
2923 * regcache.c (supply_register_by_name_zeroed): New function.
2924 * regcache.h (supply_register_by_name_zeroed): Declare new
2925 function.
2926
2927 2018-05-07 Tom Tromey <tom@tromey.com>
2928
2929 * configure: Rebuild.
2930
2931 2018-05-04 Tom Tromey <tom@tromey.com>
2932
2933 * configure: Rebuild.
2934
2935 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2936 Pedro Alves <palves@redhat.com>
2937
2938 * linux-aarch64-low.c (aarch64_stopped_data_address):
2939 Likewise.
2940
2941 2018-04-27 Tom Tromey <tom@tromey.com>
2942
2943 * configure: Rebuild.
2944
2945 2018-04-23 Tom Tromey <tom@tromey.com>
2946
2947 * configure: Rebuild.
2948
2949 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
2950
2951 * Makefile.in (depcomp): Add "..".
2952 (all_deps_files): New and use it.
2953
2954 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2955
2956 * configure.srv (aarch64*-*-linux*): Don't include xml.
2957 (i[34567]86-*-cygwin*): Likewise.
2958 (i[34567]86-*-linux*): Likewise.
2959 (i[34567]86-*-lynxos*): Likewise.
2960 (i[34567]86-*-mingw32ce*): Likewise.
2961 (i[34567]86-*-mingw*): Likewise.
2962 (i[34567]86-*-nto*): Likewise.
2963 (tic6x-*-uclinux): Likewise.
2964 (x86_64-*-linux*): Likewise.
2965 (x86_64-*-mingw*): Likewise.
2966 (x86_64-*-cygwin*): Likewise.
2967
2968 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2969
2970 * tdesc.c: Remove xml parameter.
2971
2972 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2973
2974 * server.c (get_features_xml): Remove cast.
2975 * tdesc.c (void target_desc::accept): Fill in function.
2976 (tdesc_get_features_xml): Remove old xml creation.
2977 (print_xml_feature::visit_pre): Add xml vistor.
2978 * tdesc.h (struct target_desc): Make xmltarget mutable.
2979 (tdesc_get_features_xml): Remove declaration.
2980
2981 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2982
2983 * tdesc.c (tdesc_architecture_name): Add new function.
2984 (tdesc_osabi_name): Likewise.
2985 (tdesc_get_features_xml): Use new functions.
2986
2987 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2988
2989 * tdesc.c (tdesc_create_flags): Remove.
2990 (tdesc_add_flag): Likewise.
2991 (tdesc_named_type): Likewise.
2992 (tdesc_create_union): Likewise.
2993 (tdesc_create_struct): Likewise.
2994 (tdesc_create_vector): Likewise.
2995 (tdesc_add_bitfield): Likewise.
2996 (tdesc_add_field): Likewise.
2997 (tdesc_set_struct_size): Likewise.
2998
2999 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3000
3001 * tdesc.c (~target_desc): Remove implictly deleted items.
3002 (init_target_desc): Iterate all features.
3003 (tdesc_get_features_xml): Use vector.
3004 (tdesc_create_feature): Create feature.
3005 * tdesc.h (tdesc_feature) Remove
3006 (target_desc): Add features.
3007
3008 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3009
3010 * Makefile.in: Add common/tdesc.c
3011 * tdesc.c (init_target_desc): init all reg_defs from register
3012 vector.
3013 (tdesc_create_reg): Create tdesc_reg.
3014 * tdesc.h (tdesc_feature): Add register vector.
3015
3016 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3017
3018 * tdesc.h (struct target_desc) <features>: Change type to
3019 std::vector<std::string>.
3020 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3021 changes.
3022 (tdesc_get_features_xml): Likewise.
3023 (tdesc_create_feature): Likewise.
3024
3025 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3026
3027 * regcache.c (find_register_by_number): Return a ref.
3028 (find_regno): Use references.
3029 (register_size): Likewise.
3030 (register_data): Likewise.
3031 * tdesc.c (target_desc::~target_desc): Remove free calls.
3032 (target_desc::operator==): Use std::vector compare.
3033 (init_target_desc): Use reference.
3034 (tdesc_create_reg): Use reg constructors.
3035 * tdesc.h (struct target_desc): Replace pointer with object.
3036
3037 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3038
3039 * regcache.c (find_register_by_number): Make static.
3040 (find_regno): Use find_register_by_number
3041 * regcache.h (struct reg): Remove declaration.
3042
3043 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3044
3045 * tdesc.c (target_desc::~target_desc): Move to here.
3046 (target_desc::operator==): Likewise.
3047 * tdesc.h (target_desc::~target_desc): Move from here.
3048 (target_desc::operator==): Likewise.
3049
3050 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3051
3052 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3053
3054 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3055
3056 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3057 S390_TDESC_GS.
3058 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3059 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3060 and init_registers_s390_gs_linux64.
3061
3062 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3063
3064 * linux-s390-low.c (s390_fill_gs): Remove function.
3065 (s390_fill_gsbc): Remove function.
3066 (s390_regsets): Set fill functions for the guarded storage regsets
3067 to NULL.
3068
3069 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3070
3071 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3072 the word size. Add comment.
3073 (s390_get_wordsize): New function.
3074 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3075 pswm with it. Instead, use s390_get_wordsize to determine the
3076 word size first and derive the correct tdesc from that directly.
3077
3078 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3079
3080 * Makefile.in: Include silent-rules.mk.
3081 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3082 (COMPILE): Add ECHO_CXX.
3083 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3084 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3085 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3086 (version-generated.c): Add ECHO_GEN.
3087 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3088 (IPAGENT_COMPILE): Add ECHO_CXX.
3089 (%-generated.c): Add ECHO_REGDAT.
3090
3091 2018-03-14 Tom Tromey <tom@tromey.com>
3092
3093 PR cli/14977:
3094 * ax.c (ax_printf): Special case for NULL.
3095
3096 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3097
3098 * linux-low.c (linux_qxfer_libraries_svr4): Use
3099 xml_escape_text_append.
3100
3101 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3102
3103 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3104
3105 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3106
3107 * server.c (handle_general_set): Remove unnecessary xstrdup.
3108
3109 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3110
3111 * server.c (parse_debug_format_options): Adjust to
3112 delim_string_to_char_ptr_vec changes.
3113 * thread-db.c (thread_db_load_search): Adjust to
3114 dirnames_to_char_ptr_vec changes.
3115
3116 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3117
3118 * target.h (target_enable_btrace, target_disable_btrace)
3119 (target_read_btrace, target_read_btrace_conf): Turn macro into
3120 inline function. Throw error if target method is not defined.
3121 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3122 check for btrace target method. Be prepared to handle exceptions
3123 from btrace target methods.
3124
3125 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3126
3127 * server.c (captured_main): Change order of error message printed
3128 when the current working directory cannot be found.
3129
3130 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3131
3132 * server.c: Include "filenames.h" and "pathstuff.h".
3133 (program_name): Delete variable.
3134 (program_path): New anonymous class.
3135 (get_exec_wrapper): Use "program_path" instead of
3136 "program_name".
3137 (handle_v_run): Likewise.
3138 (captured_main): Likewise.
3139 (process_serial_event): Likewise.
3140
3141 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3142
3143 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3144 (OBJS): Add "pathstuff.o".
3145 * server.c (current_directory): New global variable.
3146 (captured_main): Initialize "current_directory".
3147
3148 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3149
3150 * tdesc.c: Use common/tdesc.h.
3151 * tdesc.h: Likewise.
3152
3153 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3154 Simon Marchi <simon.marchi@ericsson.com>
3155
3156 * Makefile.in: Switch order of make rules.
3157
3158 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3159
3160 * Makefile.in: Add common directory in build.
3161 * configure.ac: Add common reference.
3162 * configure: Regenerate.
3163
3164 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3165
3166 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3167 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3168 * spu-low.c (spu_target_ops): Likewise.
3169 * win32-low.c (win32_target_ops): Likewise.
3170 * server.c (supported_btrace_packets): Report packets unconditionally.
3171 * target.h (target_ops) <supports_btrace>: Remove.
3172 (target_supports_btrace): Remove.
3173
3174 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3175
3176 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3177 (handle_btrace_disable): Change return type to void. Use exceptions
3178 to report errors.
3179 (handle_btrace_general_set): Catch exception and copy message to
3180 return message.
3181
3182 2018-02-08 Tom Tromey <tom@tromey.com>
3183
3184 * linux-low.c (install_software_single_step_breakpoints): Use
3185 make_scoped_restore.
3186 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3187 (do_restore_current_thread_cleanup): Remove.
3188 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3189 declare.
3190
3191 2018-02-08 Tom Tromey <tom@tromey.com>
3192
3193 * mem-break.c (set_raw_breakpoint_at): Use
3194 gdb::unique_xmalloc_ptr.
3195
3196 2018-01-30 Pedro Alves <palves@redhat.com>
3197
3198 PR gdb/13211
3199 * target.c (target_terminal::terminal_state): Rename to ...
3200 (target_terminal::m_terminal_state): ... this.
3201
3202 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3203
3204 * linux-low.c (handle_extended_wait): Surround call to
3205 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3206
3207 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3208
3209 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3210 linux_ptrace_attach_fail_reason_string now returning an
3211 std::string.
3212 (linux_attach): Likewise.
3213 * thread-db.c (attach_thread): Likewise.
3214
3215 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3216
3217 PR gdb/21559
3218 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3219 checking for fs_base/gs_base fields in struct user_regs_struct.
3220 * configure: Regenerate.
3221
3222 2018-01-16 Yao Qi <yao.qi@linaro.org>
3223
3224 PR gdb/18749
3225 * linux-low.c (fetch_register): Call supply_register instead of
3226 error.
3227
3228 2018-01-08 Yao Qi <yao.qi@linaro.org>
3229 Simon Marchi <simon.marchi@ericsson.com>
3230
3231 * Makefile.in (OBS): Remove selftest.o.
3232 * configure.ac: Set srv_selftest_objs if $development is true.
3233 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3234 * configure: Re-generated.
3235 * server.c (captured_main): Wrap variable selftest_filter with
3236 GDB_SELF_TEST.
3237
3238 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3239
3240 * server.c (parse_debug_format_options): Return std::string.
3241 (handle_monitor_command, captured_main): Adjust.
3242
3243 2018-01-05 Pedro Alves <palves@redhat.com>
3244
3245 PR gdb/18653
3246 * server.c (captured_main): Pass quiet=false to
3247 save_original_signals_state.
3248
3249 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3250
3251 * gdbreplay.c (gdbreplay_version): Update copyright year in
3252 version message.
3253 * server.c (gdbserver_version): Likewise.
3254
3255 2017-12-08 Tom Tromey <tom@tromey.com>
3256
3257 * ax.c (ax_printf): Update.
3258
3259 2017-12-07 Yao Qi <yao.qi@linaro.org>
3260
3261 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3262 aarch64_linux_read_description.
3263 * linux-amd64-ipa.c (idx2mask): New array.
3264 (get_ipa_tdesc): Move idx2mask out.
3265 (initialize_low_tracepoint): Initialize target descriptions.
3266 * linux-i386-ipa.c (idx2mask): New array.
3267 (get_ipa_tdesc): Move idx2mask out.
3268 (initialize_low_tracepoint): Initialize target descriptions.
3269
3270 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3271
3272 * tdesc.c (struct tdesc_type): Change return type.
3273 (tdesc_add_flag): Change parameter type.
3274 (tdesc_add_bitfield): Likewise.
3275 (tdesc_add_field): Likewise.
3276 (tdesc_set_struct_size): Likewise.
3277
3278 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3279
3280 * regcache.c (registers_to_string): Remove unused variable.
3281
3282 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3283
3284 * inferiors.c (for_each_inferior_with_data): Remove.
3285 * inferiors.h (for_each_inferior_with_data): Remove.
3286 * server.c (handle_qxfer_threads_worker): Change parameter type.
3287 (handle_qxfer_threads_proper): Use for_each_thread.
3288
3289 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3290
3291 * inferiors.c (for_each_inferior): Remove.
3292 (clear_inferiors): Use for_each_thread.
3293 * inferiors.h (for_each_inferior): Remove.
3294 * linux-low.c (linux_wait_for_event_filtered): Use
3295 for_each_thread.
3296 (linux_stabilize_threads): Likewise.
3297 * regcache.c (regcache_release): Likewise.
3298 * server.c (gdb_wants_all_threads_stopped): Likewise.
3299 (clear_pending_status_callback): Remove.
3300 (handle_status): Use for_each_thread.
3301 (captured_main): Likewise.
3302 * win32-low.c (child_init_thread_list): Likewise.
3303 (win32_clear_inferiors): Likewise.
3304 (fake_breakpoint_event): Likewise.
3305
3306 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3307
3308 * inferiors.h (find_inferior): Remove.
3309 * inferiors.c (find_inferior): Remove.
3310
3311 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3312
3313 * linux-low.c (resume_status_pending_p): Update comment.
3314 (need_step_over_p): Update comment.
3315
3316 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3317
3318 * linux-low.c (proceed_one_lwp): Return void, change parameter
3319 type.
3320 (unsuspend_and_proceed_one_lwp): Likewise.
3321 (proceed_all_lwps): Use for_each_thread.
3322 (unstop_all_lwps): Likewise.
3323
3324 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3325
3326 * linux-low.c (linux_resume_one_thread): Return void, take
3327 parameter directly.
3328 (linux_resume): Use for_each_thread.
3329
3330 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3331
3332 * linux-low.c (send_sigstop_callback): Return void, change
3333 parameter type. Rename to...
3334 (send_sigstop): ... this.
3335 (suspend_and_send_sigstop_callback): Return void, change parameter
3336 type. Rename to...
3337 (suspend_and_send_sigstop): ... this.
3338 (stop_all_lwps): Use for_each_thread.
3339
3340 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3341
3342 * linux-low.c (lwp_running): Return bool, remove unused
3343 argument.
3344 (linux_stabilize_threads): Use find_thread.
3345
3346 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3347
3348 * linux-low.c (select_singlestep_lwp_callback): Remove.
3349 (count_events_callback): Remove.
3350 (select_event_lwp_callback): Remove.
3351 (select_event_lwp): Use find_thread/for_each_thread.
3352
3353 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3354
3355 * linux-low.c (not_stopped_callback): Return bool, take filter
3356 argument directly.
3357 (linux_wait_for_event_filtered): Use find_thread.
3358 (linux_wait_1): Likewise.
3359
3360 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3361
3362 * linux-low.c (same_lwp): Remove.
3363 (find_lwp_pid): Use find_thread.
3364
3365 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3366
3367 * linux-low.c (delete_lwp_callback): Remove.
3368 (linux_mourn): Use for_each_thread.
3369
3370 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3371
3372 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3373 args parameter, don't check for pid.
3374 (linux_detach): Use for_each_thread.
3375
3376 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3377
3378 * linux-low.c (struct counter): Remove.
3379 (second_thread_of_pid_p): Remove.
3380 (last_thread_of_process_p): Use find_thread.
3381
3382 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3383
3384 * inferiors.c (find_inferior_in_random): Remove.
3385 * inferiors.h (find_inferior_in_random): Remove.
3386 * linux-low.c (status_pending_p_callback): Return bool, accept
3387 parameter ptid directly.
3388 (linux_wait_for_event_filtered): Use find_thread_in_random.
3389 (linux_wait_1): Likewise.
3390
3391 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3392
3393 * inferiors.c (find_inferior_id): Remove.
3394 (find_thread_ptid): Move implemention from find_inferior_id to
3395 here.
3396 * inferiors.h (find_inferior_id): Remove.
3397 * server.c (handle_status): Use find_thread_ptid.
3398 (process_serial_event): Likewise.
3399 * thread-db.c (find_one_thread): Likewise.
3400 (thread_db_thread_handle): Likewise.
3401 * win32-low.c (thread_rec): Likewise.
3402 (child_delete_thread): Likewise.
3403 (win32_thread_alive): Likewise.
3404 (get_child_debug_event): Likewise.
3405
3406 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3407
3408 * linux-mips-low.c (update_watch_registers_callback): Return
3409 void, remove pid_p parameter, don't check for pid.
3410 (mips_insert_point, mips_remove_point): Use for_each_thread.
3411
3412 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3413
3414 * lynx.low (lynx_delete_thread_callback): Remove.
3415 (lynx_mourn): Use for_each_thread.
3416
3417 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3418
3419 * regcache.c (regcache_invalidate_one): Remove.
3420 (regcache_invalidate_pid): use for_each_thread.
3421
3422 2017-11-26 Tom Tromey <tom@tromey.com>
3423
3424 * linux-low.c (linux_create_inferior): Update.
3425
3426 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3427
3428 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3429
3430 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3431
3432 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3433 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3434 * linux-aarch64-tdesc-selftest.c: New file.
3435 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3436
3437 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3438
3439 * configure.srv: Add new file.
3440 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3441 * linux-aarch64-tdesc-selftest.c: New file.
3442 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3443
3444 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3445
3446 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3447 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3448 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3449
3450 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3451
3452 * configure.srv: Add new files.
3453 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3454 aarch64_linux_read_description.
3455 * linux-aarch64-low.c (aarch64_linux_read_description):
3456 Merge with aarch64_arch_setup.
3457 (aarch64_arch_setup): Call aarch64_linux_read_description.
3458 * linux-aarch64-tdesc.c: New file.
3459 * linux-aarch64-tdesc.h: New file.
3460
3461 2017-11-24 Yao Qi <yao.qi@linaro.org>
3462
3463 * configure.srv: Set $srv_regobj for tic6x-linux.
3464 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3465 (tic6x_read_description): Move some code to tic6x_arch_setup.
3466 (tic6x_tdesc_test): New function.
3467 (initialize_low_arch): Call selftests::register_test.
3468
3469 2017-11-22 Yao Qi <yao.qi@linaro.org>
3470
3471 * remote-utils.c (prepare_resume_reply): Use memcpy.
3472
3473 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3474
3475 * linux-low.c (kill_one_lwp_callback): Return void, take
3476 argument directly, don't filter on pid.
3477 (linux_kill): Use for_each_thread.
3478
3479 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3480
3481 * linux-low.c (need_step_over_p): Return bool, remove dummy
3482 argument.
3483 (linux_resume, proceed_all_lwps): Use find_thread.
3484
3485 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3486
3487 * linux-low.c (resume_status_pending_p): Return bool, remove
3488 flag_p argument.
3489 (linux_resume): Use find_thread.
3490
3491 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3492
3493 * linux-low.c (struct thread_resume_array): Remove.
3494 (linux_set_resume_request): Return void, take arguments
3495 directly.
3496 (linux_resume): Use for_each_thread.
3497
3498 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3499
3500 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3501 return bool, remove data argument.
3502 (linux_stabilize_threads): Use find_thread.
3503
3504 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3505
3506 * linux-low.c (unsuspend_one_lwp): Remove.
3507 (unsuspend_all_lwps): Use for_each_thread, inline code from
3508 unsuspend_one_lwp.
3509
3510 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3511
3512 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3513 * linux-low.c (struct iterate_over_lwps_args): Remove.
3514 (iterate_over_lwps_filter): Remove.
3515 (iterate_over_lwps): Use find_thread.
3516
3517 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3518
3519 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3520 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3521 code from reset_lwp_ptrace_options_callback.
3522
3523 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3524
3525 * linux-arm-low.c (struct update_registers_data): Remove.
3526 (update_registers_callback): Return void, take arguments
3527 directly, don't check thread's pid.
3528 (arm_insert_point, arm_remove_point): Use for_each_thread.
3529
3530 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3531
3532 * win32-low.c (continue_one_thread): Return void, take argument
3533 directly.
3534 (child_continue): Use for_each_thread.
3535
3536 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3537
3538 * win32-i386-low.c (update_debug_registers_callback): Rename
3539 to ...
3540 (update_debug_registers): ... this, return void, remove pid_p arg.
3541 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
3542
3543 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3544
3545 * inferiors.h (struct process_info): Add constructor, initialize
3546 fields..
3547 <syscalls_to_catch>: Change type to std::vector<int>.
3548 * inferiors.c (add_process): Allocate process_info with new.
3549 (remove_process): Free process_info with delete.
3550 * linux-low.c (handle_extended_wait): Adjust.
3551 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
3552 * server.c (handle_general_set): Adjust.
3553
3554 2017-11-16 Pedro Alves <palves@redhat.com>
3555
3556 * remote-utils.c (remote_close): Block SIGIO signals instead of
3557 uninstalling the SIGIO handler.
3558
3559 2017-11-16 Alan Hayward <alan.hayward@arm.com>
3560
3561 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
3562
3563 2017-11-16 Yao Qi <yao.qi@linaro.org>
3564
3565 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
3566 (tic6x_store_gregset): Likewise.
3567 (tic6x_usrregs_info): Move it up.
3568
3569 2017-11-15 Alan Hayward <alan.hayward@arm.com>
3570
3571 * Makefile.in: Update arch rules.
3572 * configure.srv: Explicitly mark arch/ files.
3573
3574 2017-11-13 Andreas Schwab <schwab@suse.de>
3575
3576 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
3577 function.
3578 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3579
3580 2017-11-06 Pedro Alves <palves@redhat.com>
3581
3582 * config.in, configure: Regenerate.
3583
3584 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3585
3586 * target.c (struct thread_search): Remove.
3587 (thread_search_callback): Remove.
3588 (prepare_to_access_memory): Use for_each_thread instead of
3589 find_inferior. Inline code from thread_search_callback.
3590
3591 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3592
3593 * server.c (struct visit_actioned_threads_data): Remove.
3594 (visit_actioned_threads): Change prototype to take arguments
3595 directly.
3596 (resume): Use find_thread instead of find_inferior.
3597
3598 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3599
3600 * server.c (queue_stop_reply_callback): Change prototype, return
3601 void.
3602 (find_status_pending_thread_callback): Remove.
3603 (handle_status): Replace find_inferior with find_thread and
3604 for_each_thread.
3605
3606 2017-10-25 Alan Hayward <alan.hayward@arm.com>
3607
3608 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
3609 with REGNO.
3610 (aarch64_store_gregset): Likewise.
3611 (aarch64_fill_fpregset): Likewise.
3612 (aarch64_store_fpregset): Likewise.
3613
3614 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
3615
3616 * gdbthread.h (find_thread, for_each_thread): New functions.
3617 * inferiors.c (thread_of_pid): Remove.
3618 (find_any_thread_of_pid): Use find_thread.
3619 * linux-low.c (num_lwps): Use for_each_thread.
3620
3621 2017-10-17 Yao Qi <yao.qi@linaro.org>
3622
3623 * Makefile.in: Remove one rule.
3624 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
3625
3626 2017-10-17 Yao Qi <yao.qi@linaro.org>
3627
3628 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
3629 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
3630
3631 2017-10-17 Yao Qi <yao.qi@linaro.org>
3632
3633 * configure.srv: Rename arm.o with arch/arm.o.
3634
3635 2017-10-17 Yao Qi <yao.qi@linaro.org>
3636
3637 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
3638 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
3639 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
3640 (arch-i386.o, arch-amd64.o): Remove rules.
3641 (arch/%.o): New rule.
3642 Update POSTCOMPILE and COMPILE.pre.
3643 * configure.ac: Invoke AC_CONFIG_COMMANDS.
3644 * configure: Re-generated.
3645 * configure.srv: Replace arch-i386.o with arch/i386.o.
3646 Replace arch-amd64.o with arch/amd64.o.
3647
3648 2017-10-16 Yao Qi <yao.qi@linaro.org>
3649
3650 * configure: Regenerated.
3651
3652 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3653
3654 * inferiors.h: (struct inferior_list): Remove.
3655 (struct inferior_list_entry); Remove.
3656 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
3657 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
3658 get_first_inferior): Remove.
3659 (for_each_inferior, for_each_inferior_with_data, find_inferior,
3660 find_inferior_id, find_inferior_in_random): Change signature.
3661 * inferiors.c (all_threads): Change type to
3662 std::list<thread_info *>.
3663 (get_thread): Remove macro.
3664 (find_inferior, find_inferior_id): Change signature, implement
3665 using find_thread.
3666 (find_inferior_in_random): Change signature, implement using
3667 find_thread_in_random.
3668 (for_each_inferior, for_each_inferior_with_data): Change
3669 signature, implement using for_each_thread.
3670 (add_inferior_to_list, remove_inferior): Remove.
3671 (add_thread, get_first_thread, thread_of_pid,
3672 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
3673 (get_first_inferior, one_inferior_p, clear_inferior_list):
3674 Remove.
3675 (clear_inferiors, get_thread_process): Update.
3676 * gdbthread.h: Include <list>.
3677 (struct thread_info) <entry>: Remove field.
3678 <id>: New field.
3679 (all_threads): Change type to std::list<thread_info *>.
3680 (get_first_inferior): Add doc.
3681 (find_thread, for_each_thread, find_thread_in_random): New
3682 functions.
3683 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
3684 * linux-arm-low.c (update_registers_callback): Update.
3685 * linux-low.c (second_thread_of_pid_p): Update.
3686 (kill_one_lwp_callback, linux_detach_lwp_callback,
3687 delete_lwp_callback, status_pending_p_callback, same_lwp,
3688 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
3689 iterate_over_lwps, not_stopped_callback,
3690 resume_stopped_resumed_lwps, count_events_callback,
3691 select_singlestep_lwp_callback, select_event_lwp_callback,
3692 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
3693 suspend_and_send_sigstop_callback, wait_for_sigstop,
3694 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
3695 lwp_running, linux_set_resume_request, resume_status_pending_p,
3696 need_step_over_p, start_step_over, linux_resume_one_thread,
3697 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
3698 reset_lwp_ptrace_options_callback): Update.
3699 * linux-mips-low.c (update_watch_registers_callback): Update.
3700 * regcache.c (regcache_invalidate_one, regcache_invalidate):
3701 Update.
3702 (free_register_cache_thread_one): Remove.
3703 (regcache_release): Update.
3704 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
3705 handle_qxfer_threads_worker): Update.
3706 (handle_query): Update, use list iterator.
3707 (visit_actioned_threads, handle_pending_status,
3708 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
3709 clear_pending_status_callback, set_pending_status_callback,
3710 find_status_pending_thread_callback, handle_status,
3711 process_serial_event): Update.
3712 * target.c (thread_search_callback): Update.
3713 * thread-db.c (thread_db_get_tls_address): Update.
3714 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
3715 Update.
3716 * win32-i386-low.c (update_debug_registers_callback): Update.
3717 * win32-low.c (delete_thread_info, child_delete_thread,
3718 continue_one_thread, suspend_one_thread,
3719 get_child_debug_event): Adjust.
3720
3721 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3722
3723 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
3724 * inferiors.h: Include <list>.
3725 (struct process_info) <entry>: Remove field.
3726 <pid>: New field.
3727 (pid_of): Change macro to function.
3728 (ptid_of, lwpid_of): Remove macro.
3729 (all_processes): Change type to std::list<process_info *>.
3730 (ALL_PROCESSES): Remove macro.
3731 (for_each_process, find_process): New function.
3732 * inferiors.c (all_processes): Change type to
3733 std::list<process_info *>.
3734 (find_thread_process): Adjust.
3735 (add_process): Likewise.
3736 (remove_process): Likewise.
3737 (find_process_pid): Likewise.
3738 (get_first_process): Likewise.
3739 (started_inferior_callback): Remove.
3740 (have_started_inferiors_p): Adjust.
3741 (attached_inferior_callback): Remove.
3742 (have_attached_inferiors_p): Adjust.
3743 * linux-low.c (check_zombie_leaders): Likewise.
3744 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
3745 (x86_linux_update_xmltarget): Adjust.
3746 * server.c (handle_query): Likewise.
3747 (gdb_reattached_process): Remove.
3748 (handle_status): Adjust.
3749 (kill_inferior_callback): Likewise.
3750 (detach_or_kill_inferior): Remove.
3751 (print_started_pid): Likewise.
3752 (print_attached_pid): Likewise.
3753 (detach_or_kill_for_exit): Update.
3754 (process_serial_event): Likewise.
3755 * linux-arm-low.c (arm_new_fork): Likewise.
3756
3757 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
3758
3759 * dll.h: Include <list>.
3760 (struct dll_info): Add constructor.
3761 <entry>: Remove field.
3762 (all_dlls): Change type to std::list<dll_info>.
3763 * dll.c: Include <algorithm>.
3764 (get_dll): Remove macro.
3765 (all_dlls): Change type to std::list<dll_info *>.
3766 (free_one_dll): Remove.
3767 (match_dll): Likewise.
3768 (loaded_dll): Adjust.
3769 (unloaded_dll): Adjust to all_dlls type change, use
3770 std::find_if. Inline code from match_dll.
3771 (clear_dlls): Adjust to all_dlls type change.
3772 * server.c (emit_dll_description): Remove.
3773 (handle_qxfer_libraries): Adjust to all_dlls type change,
3774 integrate emit_dll_description's functionality.
3775
3776 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3777
3778 * linux-low.h (struct linux_target_ops) <delete_process>: New
3779 field.
3780 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
3781 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
3782 (struct linux_target_ops): Add delete_process callback.
3783 * linux-arm-low.c (arm_delete_process): New.
3784 (struct linux_target_ops): Add delete_process callback.
3785 * linux-bfin-low.c (struct linux_target_ops): Likewise.
3786 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
3787 * linux-m32r-low.c (struct linux_target_ops): Likewise.
3788 * linux-mips-low.c (mips_linux_delete_process): New.
3789 (struct linux_target_ops): Add delete_process callback.
3790 * linux-ppc-low.c (struct linux_target_ops): Likewise.
3791 * linux-s390-low.c (struct linux_target_ops): Likewise.
3792 * linux-sh-low.c (struct linux_target_ops): Likewise.
3793 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
3794 * linux-tile-low.c (struct linux_target_ops): Likewise.
3795 * linux-x86-low.c (x86_linux_delete_process): New.
3796 (struct linux_target_ops): Add delete_process callback.
3797 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
3798
3799 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
3800
3801 * linux-aarch64-low.c (the_low_target): Add thread delete
3802 callback.
3803 * linux-arm-low.c (arm_delete_thread): New function.
3804 (the_low_target): Add thread delete callback.
3805 * linux-bfin-low.c (the_low_target): Likewise.
3806 * linux-crisv32-low.c (the_low_target): Likewise.
3807 * linux-low.c (delete_lwp): Invoke delete_thread callback if
3808 set.
3809 * linux-low.h (struct linux_target_ops) <delete_thread>: New
3810 field.
3811 * linux-m32r-low.c (the_low_target): Add thread delete callback.
3812 * linux-mips-low.c (mips_linux_delete_thread): New function.
3813 (the_low_target): Add thread delete callback.
3814 * linux-ppc-low.c (the_low_target): Likewise.
3815 * linux-s390-low.c (the_low_target): Likewise.
3816 * linux-sh-low.c (the_low_target): Likewise.
3817 * linux-tic6x-low.c (the_low_target): Likewise.
3818 * linux-tile-low.c (the_low_target): Likewise.
3819 * linux-x86-low.c (the_low_target): Likewise.
3820 * linux-xtensa-low.c (the_low_target): Likewise.
3821
3822 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
3823
3824 * win32-low.c: Include "common-inferior.h".
3825
3826 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3827
3828 * inferiors.c (set_inferior_cwd): New function.
3829 * server.c (handle_general_set): Handle QSetWorkingDir packet.
3830 (handle_query): Inform that QSetWorkingDir is supported.
3831 * win32-low.c (create_process): Pass the inferior's cwd to
3832 CreateProcess.
3833
3834 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3835
3836 * inferiors.c (current_inferior_cwd): New global variable.
3837 (get_inferior_cwd): New function.
3838 * inferiors.h (struct process_info) <cwd>: New field.
3839
3840 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
3841
3842 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
3843 (OBS): Add gdb_tilde_expand.o.
3844
3845 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
3846
3847 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
3848 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
3849
3850 2017-09-29 Pedro Alves <palves@redhat.com>
3851
3852 * ax.c (gdb_parse_agent_expr): Constify.
3853 * ax.h (gdb_parse_agent_expr): Constify.
3854 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3855 Constify.
3856 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
3857 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
3858 * remote-utils.h (read_ptid): Constify.
3859 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
3860 (process_point_options, process_serial_event): Constify.
3861 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
3862 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
3863 (cmd_qtbuffer): Constify.
3864
3865 2017-09-29 Pedro Alves <palves@redhat.com>
3866
3867 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
3868 fails.
3869
3870 2017-09-29 Pedro Alves <palves@redhat.com>
3871
3872 * linux-low.c (handle_extended_wait): Pass parent thread instead
3873 of process to thread_db_notice_clone.
3874 * linux-low.h (thread_db_notice_clone): Replace parent process
3875 parameter with parent thread parameter.
3876 * thread-db.c (find_one_thread): Add comment.
3877 (thread_db_notice_clone): Replace parent process parameter with
3878 parent thread parameter. Temporarily switch to the parent thread.
3879
3880 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
3881
3882 * gdbthread.h: Include "common-gdbthread.h".
3883 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
3884 "if" when validating the ptid.
3885 * remote-utils.c: Include "gdbthread.h".
3886 (prepare_resume_reply): Use "switch_to_thread".
3887 * target.c (done_accessing_memory): Likewise.
3888
3889 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3890
3891 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
3892 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
3893 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
3894 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
3895 s390x-gs-linux64-ipa.o to ipa_obj.
3896 * linux-s390-low.c (HWCAP_S390_GS): New define.
3897 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
3898 New functions.
3899 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
3900 (s390_arch_setup): Check for guarded-storage support and choose
3901 appropriate tdesc.
3902 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
3903 init_registers_s390x_gs_linux64.
3904 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
3905 enum value.
3906 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
3907 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
3908
3909 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
3910
3911 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
3912
3913 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3914
3915 * linux-low.h (struct lwp_info): Add new field, thread_handle.
3916 (thread_db_thread_handle): Declare.
3917 * linux-low.c (linux_target_ops): Initialize thread_handle.
3918 * server.c (handle_qxfer_threads_worker): Add support for
3919 "handle" attribute.
3920 * target.h (struct target_ops): Add new function pointer,
3921 thread_handle.
3922 (target_thread_handle): Define.
3923 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
3924 field in lwp.
3925 (thread_db_thread_handle): New function.
3926
3927 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3928
3929 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
3930 * linux-low.h (thread_db_notice_clone): Declare.
3931 * thread-db.c (thread_db_notice_clone): New function.
3932
3933 2017-09-21 Pedro Alves <palves@redhat.com>
3934
3935 * server.c (gdb_read_memory, handle_status, process_serial_event)
3936 (handle_serial_event, handle_target_event): Adjust to
3937 set_desired_thread prototype change.
3938 * target.c (set_desired_thread): Remove 'use_general' parameter
3939 and adjust.
3940 * target.h (set_desired_thread): Remove 'use_general' parameter.
3941
3942 2017-09-20 Tom Tromey <tom@tromey.com>
3943
3944 * target.c (target_terminal::terminal_state): Define.
3945 (target_terminal::init): Rename from target_terminal_init.
3946 (target_terminal::inferior): Rename from
3947 target_terminal_inferior.
3948 (target_terminal::ours): Rename from target_terminal_ours.
3949 (target_terminal::ours_for_output, target_terminal::info): New.
3950
3951 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3952
3953 * server.c (accumulate_file_name_length): Remove.
3954 (emit_dll_description): Adjust to std::string change.
3955 (handle_qxfer_libraries): Use std::string to hold document.
3956
3957 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3958
3959 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
3960 return type of xml_escape_text.
3961 * server.c (emit_dll_description): Likewise.
3962
3963 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3964
3965 * server.c (captured_main): Accept argument for --selftest.
3966 Update run_tests call.
3967 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
3968 when registering selftests.
3969
3970 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
3971
3972 * regcache.c (get_thread_regcache): Update code to use "std::vector"
3973 instead of "VEC" for "target_desc.reg_defs".
3974 (regcache_cpy): Likewise.
3975 (registers_to_string): Likewise.
3976 (registers_from_string): Likewise.
3977 (find_regno): Likewise.
3978 (supply_regblock): Likewise.
3979 (regcache_raw_read_unsigned): Likewise.
3980 * tdesc.c (init_target_desc): Likewise.
3981 (tdesc_create_reg): Likewise.
3982 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
3983 (struct target_desc) <reg_defs>: Convert to "std::vector".
3984 (target_desc): Do not initialize "reg_defs".
3985 (~target_desc): Update code to use "std::vector" instead of "VEC"
3986 for "target_desc.reg_defs".
3987 (operator==): Likewise.
3988
3989 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3990
3991 * inferiors.h (thread_to_gdb_id): Remove.
3992 * inferiors.c (thread_to_gdb_id): Remove.
3993 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
3994 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
3995 lynx_store_registers, lynx_read_memory, lynx_write_memory):
3996 Likewise.
3997 * nto-low.c (nto_fetch_registers, nto_store_registers,
3998 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
3999
4000 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4001
4002 * inferiors.h (gdb_id_to_thread_id): Remove.
4003 * inferiors.c (gdb_id_to_thread_id): Remove.
4004 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4005 removal. Move pid declaration closer to where it's used.
4006
4007 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4008
4009 * server.c (handle_detach): New function.
4010 (process_serial_event): Move code out, call handle_detach.
4011
4012 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4013
4014 * server.c (require_running): Rename to ...
4015 (require_running_or_return): ... this ...
4016 (require_running_or_break): ... and this.
4017 (handle_query, process_serial_event): Adjust.
4018
4019 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4020
4021 * linux-low.c (linux_set_resume_request): Remove unused
4022 variables.
4023
4024 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4025
4026 * server.c (first_thread_of): Remove.
4027 (process_serial_event): Replace usage of first_thread_of with
4028 find_any_thread_of_pid.
4029 * tracepoint.c (same_process_p): Remove.
4030 (gdb_agent_about_to_close): Replace usage of same_process_p with
4031 find_any_thread_of_pid.
4032 * linux-x86-low.c (same_process_callback): Remove.
4033 (x86_arch_setup_process_callback): Replace usage of
4034 same_process_callback with find_any_thread_of_pid.
4035 * thread-db.c (any_thread_of): Remove.
4036 (switch_to_process): Replace usage of any_thread_of with
4037 find_any_thread_of_pid.
4038 * inferiors.c (thread_pid_matches_callback): Remove.
4039 (find_thread_process): Adjust to use find_any_thread_of_pid.
4040
4041 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4042
4043 * regcache.c (get_thread_regcache): Guard calls to "memset"
4044 with "!VEC_empty".
4045
4046 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4047
4048 * linux-low.c (handle_extended_wait): Use
4049 "allocate_target_description" instead of "XNEW".
4050 * linux-x86-low.c (initialize_low_arch): Likewise.
4051
4052 2017-09-05 Yao Qi <yao.qi@linaro.org>
4053
4054 * configure.srv (srv_i386_regobj): Remove.
4055 (srv_amd64_regobj): Remove.
4056 (srv_regobj): Set it to "" for x86 non-linux targets.
4057 * linux-x86-tdesc.c (i386_linux_read_description):
4058 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4059 (init_registers_i386): Remove the declaration.
4060 (tdesc_i386): Remove the declaration.
4061 (lynx_i386_arch_setup): Call i386_create_target_description.
4062 * nto-x86-low.c: Likewise.
4063 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4064 [!__x86_64__]: include arch/i386.h.
4065 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4066
4067 2017-09-05 Yao Qi <yao.qi@linaro.org>
4068
4069 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4070 i386/amd64-XXX-linux from it.
4071
4072 2017-09-05 Yao Qi <yao.qi@linaro.org>
4073
4074 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4075 false.
4076 (ipa_amd64_linux_regobj): Remove.
4077 (ipa_x32_linux_regobj): Remove.
4078
4079 2017-09-05 Yao Qi <yao.qi@linaro.org>
4080
4081 * Makefile.in (arch-amd64.o): New rule.
4082 * configure.srv: Append arch-amd64.o.
4083 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4084 (get_ipa_tdesc): Call amd64_linux_read_description.
4085 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4086 and init_registers_amd64_XXX.
4087 * linux-x86-low.c (x86_linux_read_description): Call
4088 amd64_linux_read_description.
4089 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4090 (initialize_low_arch): Don't call init_registers_x32_XXX and
4091 init_registers_amd64_XXX.
4092 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4093 and tdesc_amd64_XXX.
4094 [__x86_64__] (amd64_tdesc_test): New function.
4095 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4096 and init_registers_amd64_XXX.
4097 * linux-x86-tdesc.c: Include arch/amd64.h.
4098 (xcr0_to_tdesc_idx): New function.
4099 (i386_linux_read_description): New function.
4100 (amd64_get_ipa_tdesc_idx): New function.
4101 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4102 (amd64_get_ipa_tdesc): Declare.
4103
4104 2017-09-05 Yao Qi <yao.qi@linaro.org>
4105
4106 * configure.srv (srv_i386_linux_xmlfiles): Remove
4107 i386/i386-XXX-linux.xml from it.
4108
4109 2017-09-05 Yao Qi <yao.qi@linaro.org>
4110
4111 * configure.srv: Set srv_i386_linux_regobj empty if $development
4112 is false.
4113 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4114 initialize_low_tdesc.
4115 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4116 with #if initialize_low_tdesc.
4117 * linux-x86-tdesc-selftest.c: New file.
4118 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4119
4120 2017-09-05 Yao Qi <yao.qi@linaro.org>
4121
4122 * Makefile.in (arch-i386.o): New rule.
4123 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4124 (x86_64-*-linux*): Likewise.
4125 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4126 include arch/i386.h.
4127 (i386_linux_read_description): Remove code and call
4128 i386_create_target_description.
4129 * tdesc.c (allocate_target_description): New function.
4130 * tdesc.h (set_tdesc_architecture): Remove declaration.
4131 (set_tdesc_osabi): Likewise.
4132
4133 2017-09-05 Yao Qi <yao.qi@linaro.org>
4134
4135 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4136 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4137 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4138 .xmltarget.
4139 * server.c (get_features_xml): Call tdesc_get_features_xml.
4140 * tdesc.c (set_tdesc_architecture): New function.
4141 (set_tdesc_osabi): New function.
4142 (tdesc_get_features_xml): New function.
4143 (tdesc_create_feature): Add an argument.
4144 * tdesc.h (struct target_desc) <features>: New field.
4145 <arch, osabi>: New field.
4146 (~target_desc): xfree features, arch, and osabi.
4147 (target_desc::oerator==): Don't compare .xmltarget.
4148 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4149 (set_tdesc_osabi): Likewise.
4150 (tdesc_get_features_xml): Likewise.
4151
4152 2017-09-05 Yao Qi <yao.qi@linaro.org>
4153
4154 * linux-x86-tdesc.c: Include selftest.h.
4155 (i386_tdesc_test): New function.
4156 (initialize_low_tdesc): Call selftests::register_test.
4157 * tdesc.h: Include regdef.h.
4158 (target_desc): Override operator == and !=.
4159
4160 2017-09-05 Yao Qi <yao.qi@linaro.org>
4161
4162 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4163 (ipa_obj): Likewise.
4164 * linux-i386-ipa.c: Include common/x86-xstate.h
4165 (get_ipa_tdesc): Call i386_linux_read_description.
4166 (initialize_low_tracepoint): Don't call init_registers_XXX
4167 functions, call initialize_low_tdesc instead.
4168 * linux-x86-low.c (x86_linux_read_description): Call
4169 i386_linux_read_description.
4170 (initialize_low_arch): Don't call init_registers_i386_XXX
4171 functions, call initialize_low_tdesc.
4172 * linux-x86-tdesc.c: New file.
4173 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4174 (i386_get_ipa_tdesc_idx): Declare.
4175 (i386_get_ipa_tdesc): Declare.
4176 (initialize_low_tdesc): Declare.
4177
4178 2017-09-05 Yao Qi <yao.qi@linaro.org>
4179
4180 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4181 instead of 0.
4182
4183 2017-09-05 Yao Qi <yao.qi@linaro.org>
4184
4185 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4186 * regcache.c (get_thread_regcache): Use VEC_length.
4187 (init_register_cache): Likewise.
4188 (regcache_cpy): Likewise.
4189 (registers_to_string): Iterate reg_defs via VEC_iterate.
4190 (find_regno): Likewise.
4191 (find_register_by_number): Use VEC_index.
4192 (register_size): Call find_register_by_number.
4193 (register_data): Call find_register_by_number.
4194 (supply_regblock): Use VEC_length.
4195 (regcache_raw_read_unsigned): Likewise.
4196 * tdesc.c (init_target_desc): Iterate reg_defs via
4197 VEC_iterate.
4198 (default_description): Update initializer.
4199 (copy_target_description): Don't update field num_registers.
4200 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4201 <num_registers>: Remove.
4202
4203 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4204
4205 * Makefile.in (.SECONDARY): Define target.
4206
4207 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4208
4209 * linux-low.c (linux_wait_1): Adjust.
4210 * server.c (queue_stop_reply_callback): Adjust.
4211
4212 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4213
4214 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4215 QEnvironmentUnset and QEnvironmentReset packets.
4216 (handle_query): Inform remote that QEnvironmentHexEncoded,
4217 QEnvironmentUnset and QEnvironmentReset are supported.
4218
4219 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4220
4221 * inferiors.h (inferior_target_data): Rename to ...
4222 (thread_target_data): ... this.
4223 (inferior_regcache_data): Rename to ...
4224 (thread_regcache_data): ... this.
4225 (set_inferior_regcache_data): Rename to ...
4226 (set_thread_regcache_data): ... this.
4227 * inferiors.c (inferior_target_data): Rename to ...
4228 (thread_target_data): ... this.
4229 (inferior_regcache_data): Rename to ...
4230 (thread_regcache_data): ... this.
4231 (set_inferior_regcache_data): Rename to ...
4232 (set_thread_regcache_data): ... this.
4233 (free_one_thread): Update.
4234 * linux-low.h (get_thread_lwp): Update.
4235 * regcache.c (get_thread_regcache): Update.
4236 (regcache_invalidate_thread): Update.
4237 (free_register_cache_thread): Update.
4238 * win32-i386-low.c (update_debug_registers_callback): Update.
4239 (win32_get_current_dr): Update.
4240 * win32-low.c (thread_rec): Update.
4241 (delete_thread_info): Update.
4242 (continue_one_thread): Update.
4243 (suspend_one_thread): Update.
4244
4245 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4246
4247 * inferiors.c (set_inferior_target_data): Remove.
4248 * inferiors.h (set_inferior_target_data): Remove.
4249
4250 2017-08-18 Yao Qi <yao.qi@linaro.org>
4251
4252 * Makefile.in (OBS): Add selftest.o.
4253 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4254 * configure, config.in: Re-generated.
4255 * server.c: Include common/sefltest.h.
4256 (captured_main): Handle option --selftest.
4257
4258 2017-08-09 Yao Qi <yao.qi@linaro.org>
4259
4260 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4261 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4262 i386-avx-mpx.o and i386-mmx.o.
4263 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4264 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4265 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4266 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4267 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4268 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4269 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4270 i386/amd64-avx-mpx.xml.
4271
4272 2017-08-09 Yao Qi <yao.qi@linaro.org>
4273
4274 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4275 and x32-avx-avx512.o.
4276 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4277 i386/x32-avx-avx512.xml.
4278
4279 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4280
4281 * tracepoint.h (enum class fast_tpoint_collect_result): New
4282 enumeration.
4283 (fast_tracepoint_collecting): Change return type to
4284 fast_tpoint_collect_result.
4285 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4286 * linux-low.h: Include tracepoint.h.
4287 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4288 fast_tpoint_collect_result.
4289 * linux-low.c (handle_tracepoints): Adjust.
4290 (linux_fast_tracepoint_collecting): Change return type to
4291 fast_tpoint_collect_result.
4292 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4293 linux_wait_1, stuck_in_jump_pad_callback,
4294 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4295 proceed_one_lwp): Adjust to type change.
4296
4297 2017-07-10 Yao Qi <yao.qi@linaro.org>
4298
4299 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4300
4301 2017-06-29 Yao Qi <yao.qi@linaro.org>
4302
4303 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4304 Remove.
4305 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4306
4307 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4308
4309 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4310
4311 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4312
4313 * linux-low.c (linux_create_inferior): Adjust code to access the
4314 environment information via 'gdb_environ' class.
4315 * lynx-low.c (lynx_create_inferior): Likewise.
4316 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4317 (get_environ): Return a pointer to 'our_environ'.
4318 (captured_main): Initialize 'our_environ'.
4319 * server.h (get_environ): Adjust prototype.
4320 * spu-low.c (spu_create_inferior): Adjust code to access the
4321 environment information via 'gdb_environ' class.
4322
4323 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4324
4325 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4326 usage of "register" keyword.
4327
4328 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4329
4330 * configure: Re-generate.
4331
4332 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4333
4334 * configure: Re-generate.
4335
4336 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4337
4338 * Makefile.in (COMPILE.pre): Add "-x c++".
4339
4340 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4341
4342 * fork-child.c: Conditionally include <signal.h>.
4343
4344 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4345
4346 * server.c (handle_general_set): Handle new packet
4347 "QStartupWithShell".
4348 (handle_query): Add "QStartupWithShell" to the list of supported
4349 packets.
4350 (gdbserver_usage): Add help text explaining the
4351 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4352 options.
4353 (captured_main): Recognize and act upon the presence of the new
4354 CLI options.
4355
4356 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4357 Pedro Alves <palves@redhat.com>
4358
4359 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4360 * configure: Regenerate.
4361 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4362 "fork-inferior.o".
4363 (i[34567]86-*-lynxos*): Likewise.
4364 (spu*-*-*): Likewise.
4365 * fork-child.c: New file.
4366 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4367 and "environ.h".
4368 (linux_ptrace_fun): New function.
4369 (linux_create_inferior): Adjust function prototype to reflect
4370 change on "target.h". Adjust function code to use
4371 "fork_inferior".
4372 (linux_request_interrupt): Delete "signal_pid".
4373 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4374 (lynx_ptrace_fun): New function.
4375 (lynx_create_inferior): Adjust function prototype to reflect
4376 change on "target.h". Adjust function code to use
4377 "fork_inferior".
4378 * nto-low.c (nto_create_inferior): Adjust function prototype and
4379 code to reflect change on "target.h". Update comments.
4380 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4381 "common-terminal.h" and "environ.h".
4382 (terminal_fd): Moved to fork-child.c.
4383 (old_foreground_pgrp): Likewise.
4384 (restore_old_foreground_pgrp): Likewise.
4385 (last_status): Make it global.
4386 (last_ptid): Likewise.
4387 (our_environ): New variable.
4388 (startup_with_shell): Likewise.
4389 (program_name): Likewise.
4390 (program_argv): Rename to...
4391 (program_args): ...this.
4392 (wrapper_argv): New variable.
4393 (start_inferior): Delete function.
4394 (get_exec_wrapper): New function.
4395 (get_exec_file): Likewise.
4396 (get_environ): Likewise.
4397 (prefork_hook): Likewise.
4398 (post_fork_inferior): Likewise.
4399 (postfork_hook): Likewise.
4400 (postfork_child_hook): Likewise.
4401 (handle_v_run): Update code to deal with arguments coming from the
4402 remote host. Update calls from "start_inferior" to
4403 "create_inferior".
4404 (captured_main): Likewise. Initialize environment variable. Call
4405 "have_job_control".
4406 * server.h (post_fork_inferior): New prototype.
4407 (get_environ): Likewise.
4408 (last_status): Declare.
4409 (last_ptid): Likewise.
4410 (signal_pid): Likewise.
4411 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4412 (spu_ptrace_fun): New function.
4413 (spu_create_inferior): Adjust function prototype to reflect change
4414 on "target.h". Adjust function code to use "fork_inferior".
4415 * target.c (target_terminal_init): New function.
4416 (target_terminal_inferior): Likewise.
4417 (target_terminal_ours): Likewise.
4418 * target.h: Include <vector>.
4419 (struct target_ops) <create_inferior>: Update prototype.
4420 (create_inferior): Update macro.
4421 * utils.c (gdb_flush_out_err): New function.
4422 * win32-low.c (win32_create_inferior): Adjust function prototype
4423 and code to reflect change on "target.h".
4424
4425 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4426
4427 * inferiors.c (switch_to_thread): New function.
4428
4429 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4430
4431 * Makefile.in (SFILE): Add "common/job-control.c".
4432 (OBS): Add "job-control.o".
4433
4434 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4435
4436 * Makefile: Remove "@host_makefile_frag@".
4437
4438 2017-05-05 Pedro Alves <palves@redhat.com>
4439
4440 * configure: Regenerate.
4441
4442 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4443
4444 * configure: Regenerate.
4445
4446 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4447
4448 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4449 software_single_step change of return type to
4450 std::vector<CORE_ADDR>.
4451 * linux-low.c (install_software_single_step_breakpoints):
4452 Likewise.
4453 * linux-low.h (install_software_single_step_breakpoints):
4454 Likewise.
4455
4456 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4457
4458 * remote-utils.c: Include "gdb_termios.h" instead of
4459 "terminal.h".
4460 * terminal.h: Delete file.
4461
4462 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4463
4464 * server.c: Include <vector>.
4465 <program_argv, wrapper_argv>: Convert to std::vector.
4466 (start_inferior): Rewrite function to use C++.
4467 (handle_v_run): Likewise. Update code that calculates the argv
4468 based on the vRun packet; use C++.
4469 (captured_main): Likewise.
4470
4471 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4472
4473 * server.c (handle_v_cont): Initialize thread_resume::thread
4474 with null_ptid.
4475
4476 2017-04-05 Pedro Alves <palves@redhat.com>
4477
4478 * configure: Regenerate.
4479
4480 2017-04-05 Pedro Alves <palves@redhat.com>
4481
4482 * gdbreplay.c (sync_error): Constify.
4483 * linux-x86-low.c (push_opcode): Constify.
4484
4485 2017-04-05 Pedro Alves <palves@redhat.com>
4486
4487 * win32-low.c (get_child_debug_event)
4488 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4489 Report TARGET_WAITKIND_SPURIOUS instead.
4490
4491 2017-04-05 Pedro Alves <palves@redhat.com>
4492
4493 * remote-utils.c (remote_prepare, remote_open): Constify.
4494 * remote-utils.h (remote_prepare, remote_open): Constify.
4495 * server.c (captured_main): Constify 'port' handling.
4496
4497 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4498
4499 * Makefile.in (clean): Clear .deps.
4500
4501 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4502
4503 * .gitignore: Remove generated files, replace with wildcard.
4504 * (clean): Replace removal of generated files with wildcard.
4505 (version.c): Replace with...
4506 (version-generated.c): ...this.
4507 (xml-builtin.c): Replace with...
4508 (xml-builtin-generated.c): ...this.
4509 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4510 (%.c: *regformats*): Replace with...
4511 (%-generated.c: *regformats*): ...this.
4512
4513 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4514
4515 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4516 (xtensa_fill_gregset): Call collect_register_by_name for
4517 threadptr register.
4518 (xtensa_store_gregset): Call supply_register_by_name for
4519 threadptr register.
4520
4521 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4522
4523 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4524 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4525 (xtensa_store_gregset): Call supply_register for all registers in
4526 a0_regnum..a0_regnum + C0_NREGS range.
4527
4528 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4529
4530 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4531 (ax-ipa.o: ax.c): Remove.
4532 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4533 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4534 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4535 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4536 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
4537
4538 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4539
4540 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
4541 (print-utils-ipa.o: ../common/print-utils.c): Remove.
4542 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
4543 (errors-ipa.o: ../common/errors.c): Remove.
4544 (format-ipa.o: ../common/format.c): Remove.
4545 (common-utils-ipa.o: ../common/common-utils.c): Remove.
4546
4547 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4548
4549 * Makefile.in (%-ipa.o: %.c): New rule.
4550 (tracepoint-ipa.o: tracepoint.c): Remove.
4551 (utils-ipa.o: utils.c): Remove.
4552 (remote-utils-ipa.o: remote-utils.c): Remove.
4553 (regcache-ipa.o: regcache.c): Remove.
4554 (i386-linux-ipa.o: i386-linux.c): Remove.
4555 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
4556 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
4557 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
4558 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
4559 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
4560 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
4561 (amd64-linux-ipa.o: amd64-linux.c): Remove.
4562 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
4563 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
4564 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
4565 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
4566 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
4567 (aarch64-ipa.o: aarch64.c): Remove.
4568 (s390-linux32-ipa.o: s390-linux32.c): Remove.
4569 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
4570 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
4571 (s390-linux64-ipa.o: s390-linux64.c): Remove.
4572 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
4573 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
4574 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
4575 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
4576 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
4577 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
4578 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
4579 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
4580 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
4581 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
4582 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
4583 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
4584 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
4585 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
4586 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
4587 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
4588 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
4589 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
4590 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
4591 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
4592 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
4593 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
4594 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
4595 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
4596 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
4597 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
4598 (tdesc-ipa.o: tdesc.c): Remove.
4599 (x32-linux-ipa.o: x32-linux.c): Remove.
4600 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
4601 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
4602
4603 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4604
4605 * Makefile.in (%.o: ../arch/%.c): New rule.
4606 (arm.o: ../arch/arm.c): Remove.
4607 (arm-linux.o: ../arch/arm-linux.c): Remove.
4608 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
4609 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
4610
4611 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4612
4613 * Makefile.in (%.o: ../nat/%.c): New rule.
4614 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
4615 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
4616 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
4617 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
4618 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
4619 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
4620 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
4621 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
4622 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
4623 (linux-personality.o: ../nat/linux-personality.c): Remove.
4624 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
4625 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
4626 (x86-linux.o: ../nat/x86-linux.c): Remove.
4627 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
4628 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
4629
4630 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4631
4632 * Makefile.in (%.o: ../common/%.c): New rule.
4633 (signals.o: ../common/signals.c): Remove.
4634 (print-utils.o: ../common/print-utils.c): Remove.
4635 (rsp-low.o: ../common/rsp-low.c): Remove.
4636 (common-utils.o: ../common/common-utils.c): Remove.
4637 (posix-strerror.o: ../common/posix-strerror.c): Remove.
4638 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
4639 (vec.o: ../common/vec.c): Remove.
4640 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
4641 (xml-utils.o: ../common/xml-utils.c): Remove.
4642 (ptid.o: ../common/ptid.c): Remove.
4643 (buffer.o: ../common/buffer.c): Remove.
4644 (format.o: ../common/format.c): Remove.
4645 (filestuff.o: ../common/filestuff.c): Remove.
4646 (agent.o: ../common/agent.c): Remove.
4647 (errors.o: ../common/errors.c): Remove.
4648 (environ.o: ../common/environ.c): Remove.
4649 (common-debug.o: ../common/common-debug.c): Remove.
4650 (cleanups.o: ../common/cleanups.c): Remove.
4651 (common-exceptions.o: ../common/common-exceptions.c): Remove.
4652 (fileio.o: ../common/fileio.c): Remove.
4653 (common-regcache.o: ../common/common-regcache.c): Remove.
4654 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
4655 (new-op.o: ../common/new-op.c): Remove.
4656 (btrace-common.o: ../common/btrace-common.c): Remove.
4657
4658 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4659
4660 * Makefile.in (%.o: ../target/%.c): New rule.
4661 (waitstatus.o: ../target/waitstatus.c): Remove.
4662
4663 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4664
4665 * Makefile.in
4666 (%.c: ../regformats/%.dat,
4667 (%.c: ../regformats/arm/%.dat,
4668 (%.c: ../regformats/i386/%.dat,
4669 (%.c: ../regformats/rs6000/%.dat): New rules.
4670 (aarch64.c): Remove.
4671 (reg-arm.c): Remove.
4672 (arm-with-iwmmxt.c): Remove.
4673 (arm-with-vfpv2.c): Remove.
4674 (arm-with-vfpv3.c): Remove.
4675 (arm-with-neon.c): Remove.
4676 (reg-bfin.c): Remove.
4677 (reg-cris.c): Remove.
4678 (reg-crisv32.c): Remove.
4679 (i386.c): Remove.
4680 (i386-linux.c): Remove.
4681 (i386-avx.c): Remove.
4682 (i386-avx-linux.c): Remove.
4683 (i386-avx-avx512.c): Remove.
4684 (i386-avx-avx512-linux.c): Remove.
4685 (i386-mpx.c): Remove.
4686 (i386-mpx-linux.c): Remove.
4687 (i386-avx-mpx-avx512-pku.c): Remove.
4688 (i386-avx-mpx-avx512-pku-linux.c): Remove.
4689 (i386-avx-mpx.c): Remove.
4690 (i386-avx-mpx-linux.c): Remove.
4691 (i386-mmx.c): Remove.
4692 (i386-mmx-linux.c): Remove.
4693 (reg-ia64.c): Remove.
4694 (reg-m32r.c): Remove.
4695 (reg-m68k.c): Remove.
4696 (reg-cf.c): Remove.
4697 (mips-linux.c): Remove.
4698 (mips-dsp-linux.c): Remove.
4699 (mips64-linux.c): Remove.
4700 (mips64-dsp-linux.c): Remove.
4701 (nios2-linux.c): Remove.
4702 (powerpc-32.c): Remove.
4703 (powerpc-32l.c): Remove.
4704 (powerpc-altivec32l.c): Remove.
4705 (powerpc-cell32l.c): Remove.
4706 (powerpc-vsx32l.c): Remove.
4707 (powerpc-isa205-32l.c): Remove.
4708 (powerpc-isa205-altivec32l.c): Remove.
4709 (powerpc-isa205-vsx32l.c): Remove.
4710 (powerpc-e500l.c): Remove.
4711 (powerpc-64l.c): Remove.
4712 (powerpc-altivec64l.c): Remove.
4713 (powerpc-cell64l.c): Remove.
4714 (powerpc-vsx64l.c): Remove.
4715 (powerpc-isa205-64l.c): Remove.
4716 (powerpc-isa205-altivec64l.c): Remove.
4717 (powerpc-isa205-vsx64l.c): Remove.
4718 (s390-linux32.c): Remove.
4719 (s390-linux32v1.c): Remove.
4720 (s390-linux32v2.c): Remove.
4721 (s390-linux64.c): Remove.
4722 (s390-linux64v1.c): Remove.
4723 (s390-linux64v2.c): Remove.
4724 (s390-te-linux64.c): Remove.
4725 (s390-vx-linux64.c): Remove.
4726 (s390-tevx-linux64.c): Remove.
4727 (s390x-linux64.c): Remove.
4728 (s390x-linux64v1.c): Remove.
4729 (s390x-linux64v2.c): Remove.
4730 (s390x-te-linux64.c): Remove.
4731 (s390x-vx-linux64.c): Remove.
4732 (s390x-tevx-linux64.c): Remove.
4733 (tic6x-c64xp-linux.c): Remove.
4734 (tic6x-c64x-linux.c): Remove.
4735 (tic6x-c62x-linux.c): Remove.
4736 (reg-sh.c): Remove.
4737 (reg-sparc64.c): Remove.
4738 (reg-spu.c): Remove.
4739 (amd64.c): Remove.
4740 (amd64-linux.c): Remove.
4741 (amd64-avx.c): Remove.
4742 (amd64-avx-linux.c): Remove.
4743 (amd64-avx-avx512.c): Remove.
4744 (amd64-avx-avx512-linux.c): Remove.
4745 (amd64-mpx.c): Remove.
4746 (amd64-mpx-linux.c): Remove.
4747 (amd64-avx-mpx-avx512-pku.c): Remove.
4748 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
4749 (amd64-avx-mpx.c): Remove.
4750 (amd64-avx-mpx-linux.c): Remove.
4751 (x32.c): Remove.
4752 (x32-linux.c): Remove.
4753 (x32-avx.c): Remove.
4754 (x32-avx-linux.c): Remove.
4755 (x32-avx-avx512.c): Remove.
4756 (x32-avx-avx512-linux.c): Remove.
4757 (reg-xtensa.c): Remove.
4758 (reg-tilegx.c): Remove.
4759 (reg-tilegx32.c): Remove.
4760
4761 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
4762
4763 * Makefile.in (SFILES): Add "common/environ.c".
4764 (OBJS): Add "common/environ.h".
4765
4766 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
4767
4768 * configure.ac: Check if the fs_base and gs_base members of
4769 `struct user_regs_struct' exist.
4770 * config.in: Regenerated.
4771 * configure: Likewise.
4772
4773 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
4774
4775 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
4776 target_read_memory.
4777 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
4778 (get_next_pcs_syscall_next_pc): Likewise.
4779
4780 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
4781
4782 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4783 * nto-x86-low.c: Likewise.
4784
4785 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
4786
4787 * Makefile.in: Include disable-implicit-rules.mk.
4788
4789 2016-11-23 Pedro Alves <palves@redhat.com>
4790
4791 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4792 (debug_vprintf): Use std::chrono::steady_clock instead of
4793 gettimeofday. Use '.' instead of ':'.
4794 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
4795 (get_timestamp): Use std::chrono::steady_clock instead of
4796 gettimeofday.
4797
4798 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4799
4800 * Makefile.in: Fix whitespace formatting.
4801
4802 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
4803
4804 * Makefile.in (SFILES, OBS): Flatten list and order
4805 alphabetically.
4806
4807 2016-11-23 Pedro Alves <palves@redhat.com>
4808
4809 * event-loop.c (handle_file_event): Use warning.
4810 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
4811 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4812 Use warning.
4813
4814 2016-11-23 Pedro Alves <palves@redhat.com>
4815
4816 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
4817 output.
4818 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
4819 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
4820 debug_printf and debug_flush for debug output.
4821 * server.c (handle_general_set): Likewise.
4822 * thread-db.c (try_thread_db_load): Use debug_printf for debug
4823 output.
4824
4825 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4826
4827 * Makefile.in (.c.o): Replace rule with ...
4828 (%.o: %.c): ... this one.
4829
4830 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4831
4832 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
4833 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
4834 make.
4835 * configure.ac: Remove checks for the make program.
4836 * configure: Re-generate.
4837
4838 2016-10-28 Pedro Alves <palves@redhat.com>
4839
4840 * Makefile.in (CXX_DIALECT): Get from configure.
4841 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
4842 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
4843 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
4844 * config.in: Regenerate.
4845 * configure: Regenerate.
4846
4847 2016-10-27 Yao Qi <yao.qi@linaro.org>
4848
4849 * linux-low.c (linux_supports_range_stepping): Return true if
4850 can_software_single_step return true.
4851
4852 2016-10-27 Yao Qi <yao.qi@linaro.org>
4853
4854 * inferiors.c (find_inferior_in_random): New function.
4855 * inferiors.h (find_inferior_in_random): Declare.
4856 * linux-low.c (linux_wait_for_event_filtered): Call
4857 find_inferior_in_random instead of find_inferior.
4858
4859 2016-10-27 Yao Qi <yao.qi@linaro.org>
4860
4861 * linux-low.c (linux_wait_1): If single-step breakpoints are
4862 inserted, remove them.
4863
4864 2016-10-26 Pedro Alves <palves@redhat.com>
4865
4866 * linux-low.c (handle_extended_wait): Link parent/child fork
4867 threads.
4868 (linux_wait_1): Unlink them.
4869 (linux_set_resume_request): Ignore resume requests for
4870 already-resumed and unhandled fork child threads.
4871 * linux-low.h (struct lwp_info) <fork_relative>: New field.
4872 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
4873 New functions.
4874 (handle_v_requests) <vCont>: Don't call require_running.
4875 * server.h (in_queued_stop_replies): New declaration.
4876
4877 2016-10-24 Yao Qi <yao.qi@linaro.org>
4878
4879 PR server/20733
4880 * linux-aarch64-low.c (append_insns): Cast the return value to
4881 'uint32_t *'.
4882
4883 2016-10-10 Yao Qi <yao.qi@linaro.org>
4884
4885 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
4886
4887 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
4888
4889 * target.c (target_supports_multi_process): New function, moved
4890 from...
4891 * target.h (target_supports_multi_process): ... here. Remove
4892 macro.
4893
4894 2016-10-05 Tom Tromey <tom@tromey.com>
4895
4896 PR remote/20655:
4897 * tracepoint.c (handle_tracepoint_bkpts): Check
4898 ipa_error_tracepoint, not ipa_stopping_tracepoint.
4899
4900 2016-10-05 Yao Qi <yao.qi@linaro.org>
4901
4902 * configure.srv: Update the path of arm-*.xml files.
4903
4904 2016-10-05 Terry Guo <terry.guo@arm.com>
4905 Yao Qi <yao.qi@linaro.org>
4906
4907 * Makefile.in: Adjust the path of rules.
4908 * configure.srv: Update the path of xml files.
4909 * regformats/arm-with-iwmmxt.dat: Regenerated.
4910 * regformats/arm-with-neon.dat: Likewise.
4911 * regformats/arm-with-vfpv2.dat: Likewise.
4912 * regformats/arm-with-vfpv3.dat Likewise.
4913
4914 2016-09-30 Yao Qi <yao.qi@linaro.org>
4915
4916 PR gdbserver/20627
4917 * target.c (target_stop_and_wait): Don't call
4918 target_continue_no_signal, use resume_stop instead.
4919
4920 2016-09-26 Yao Qi <yao.qi@linaro.org>
4921
4922 * linux-low.c (linux_wait_1): Call debug_exit.
4923
4924 2016-09-23 Pedro Alves <palves@redhat.com>
4925
4926 * Makefile.in (SFILES): Add common/new-op.c.
4927 (OBS): Add common/new-op.o.
4928 (new-op.o): New rule.
4929
4930 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
4931
4932 * .gitinore: Ignore more files.
4933
4934 2016-09-21 Yao Qi <yao.qi@linaro.org>
4935
4936 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
4937 23.
4938
4939 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
4940
4941 * server.c (start_inferior): Call target_mourn_inferior instead of
4942 mourn_inferior; pass ptid_t argument to it.
4943 (resume): Likewise.
4944 (handle_target_event): Likewise.
4945 * target.c (target_mourn_inferior): New function.
4946 * target.h (mourn_inferior): Delete macro.
4947
4948 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
4949
4950 * linux-low.c (lwp_is_stepping): New function.
4951
4952 2016-09-06 Carl Love <cel@us.ibm.com>
4953
4954 * server.c (start_inferior): Fixed comment, requested comment change
4955 didn't get updated correctly. Removed reference to ptrace () call as
4956 it is only true on Linux systems.
4957
4958 2016-09-06 Carl Love <cel@us.ibm.com>
4959
4960 * server.c (start_inferior): Do not call
4961 function target_post_create_inferior () if the
4962 inferior process has already exited.
4963
4964 2016-09-05 Pedro Alves <palves@redhat.com>
4965
4966 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
4967 (COMPILE.pre, CC_LD): Use CXX directly.
4968 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
4969 * acinclude.m4: Don't include build-with-cxx.m4.
4970 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
4971 * configure: Regenerate.
4972
4973 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
4974
4975 PR gdb/19495
4976 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
4977 call writing data to own_buf.
4978
4979 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4980
4981 * target.c (mywait): Call target_wait instead of
4982 the_target->wait.
4983 (target_wait): New function.
4984
4985 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
4986
4987 * server.c (start_inferior): New variable 'ptid'. Replace calls
4988 to the_target->resume by target_continue{,_no_signal}, depending
4989 on the case.
4990 * target.c (target_stop_and_wait): Call target_continue_no_signal
4991 instead of the_target->resume.
4992 (target_continue): New function.
4993
4994 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
4995
4996 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
4997
4998 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
4999
5000 PR server/20491
5001 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5002 ps_prochandle.
5003 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5004 * linux-arm-low.c (ps_get_thread_area): Likewise.
5005 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5006 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5007 * linux-mips-low.c (ps_get_thread_area): Likewise.
5008 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5009 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5010 * linux-x86-low.c (ps_get_thread_area): Likewise.
5011 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5012
5013 2016-08-19 Pedro Alves <palves@redhat.com>
5014
5015 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5016
5017 2016-08-19 Pedro Alves <palves@redhat.com>
5018
5019 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5020 comment. Use memcpy instead of casting through unsigned long.
5021
5022 2016-08-19 Pedro Alves <palves@redhat.com>
5023
5024 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5025 allocating around 0x80000000.
5026
5027 2016-08-19 Pedro Alves <palves@redhat.com>
5028
5029 PR gdb/20415
5030 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5031 (x32-avx512-linux-ipa.o): New rules.
5032 * configure.ac (x86_64-*-linux*): New x32 check.
5033 * configure.srv (ipa_x32_linux_regobj): New.
5034 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5035 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5036 descriptions.
5037 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5038 descriptions.
5039 * configure: Regenerate.
5040
5041 2016-08-09 Pedro Alves <palves@redhat.com>
5042
5043 PR gdb/18653
5044 * Makefile.in (OBS): Add signals-state-save-restore.o.
5045 (signals-state-save-restore.o): New rule.
5046 * config.in: Regenerate.
5047 * configure: Regenerate.
5048 * linux-low.c: Include "signals-state-save-restore.h".
5049 (linux_create_inferior): Call
5050 restore_original_signals_state.
5051 * server.c: Include "dispositions-save-restore.h".
5052 (captured_main): Call save_original_signals_state.
5053
5054 2016-08-05 Pedro Alves <palves@redhat.com>
5055
5056 * configure: Regenerate.
5057
5058 2016-08-04 Yao Qi <yao.qi@linaro.org>
5059
5060 * linux-low.c (regsets_fetch_inferior_registers): Check
5061 errno is ESRCH or not.
5062
5063 2016-08-02 Yao Qi <yao.qi@linaro.org>
5064
5065 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5066 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5067 (thread_db_load_search): Update.
5068 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5069 td_ta_set_event and td_ta_event_getmsg.
5070
5071 2016-07-26 Pedro Alves <palves@redhat.com>
5072
5073 PR server/20414
5074 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5075 of unsigned long for 64-bit registers and use uint32_t instead of
5076 unsigned int for 32-bit registers.
5077
5078 2016-07-26 Pedro Alves <palves@redhat.com>
5079
5080 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5081 to 'ptrace'.
5082
5083 2016-07-21 Tom Tromey <tom@tromey.com>
5084
5085 * configure: Rebuild.
5086
5087 2016-07-21 Yao Qi <yao.qi@linaro.org>
5088
5089 * mem-break.c (find_gdb_breakpoint): Cast bp to
5090 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5091
5092 2016-07-21 Yao Qi <yao.qi@linaro.org>
5093
5094 * server.c (handle_v_requests): Support s and S actions
5095 if target_supports_software_single_step return true.
5096
5097 2016-07-21 Yao Qi <yao.qi@linaro.org>
5098
5099 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5100 is resume_step, call maybe_hw_step.
5101 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5102 and unstop them.
5103 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5104 breakpoints or not.
5105 (proceed_one_lwp): If resume request is resume_step, install
5106 reinsert breakpoints and call maybe_hw_step.
5107
5108 2016-07-21 Yao Qi <yao.qi@linaro.org>
5109
5110 * linux-low.c (proceed_one_lwp): Declare.
5111 (linux_resume_one_thread): Remove local variable 'step'.
5112 Lift code enqueue signal. Call proceed_one_lwp instead of
5113 linux_resume_one_lwp.
5114
5115 2016-07-21 Yao Qi <yao.qi@linaro.org>
5116
5117 * linux-low.c (linux_resume_one_thread): Call
5118 enqueue_pending_signal.
5119
5120 2016-07-21 Yao Qi <yao.qi@linaro.org>
5121
5122 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5123 * inferiors.c (do_restore_current_thread_cleanup): New function.
5124 (make_cleanup_restore_current_thread): Likewise.
5125 * linux-low.c (install_software_single_step_breakpoints): Call
5126 make_cleanup_restore_current_thread. Switch current_thread to
5127 thread.
5128
5129 2016-07-21 Yao Qi <yao.qi@linaro.org>
5130
5131 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5132 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5133 (clone_one_breakpoint): Likewise.
5134 (delete_reinsert_breakpoints): Change parameter to thread.
5135 Callers updated.
5136 (has_reinsert_breakpoints): Likewise.
5137 (uninsert_reinsert_breakpoints): Likewise.
5138 (reinsert_reinsert_breakpoints): Likewise.
5139 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5140 (delete_reinsert_breakpoints): Likewise.
5141 (reinsert_reinsert_breakpoints): Likewise.
5142 (uninsert_reinsert_breakpoints): Likewise.
5143 (has_reinsert_breakpoints): Likewise.
5144
5145 2016-07-21 Yao Qi <yao.qi@linaro.org>
5146
5147 * inferiors.c (get_thread_process): Make parameter const.
5148 * inferiors.h (get_thread_process): Update declaration.
5149 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5150 Add new parameters child_thread and parent_thread. Callers
5151 updated.
5152 * mem-break.h (clone_all_breakpoints): Update declaration.
5153
5154 2016-07-21 Yao Qi <yao.qi@linaro.org>
5155
5156 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5157 <command_list, handler>: Remove.
5158 (struct gdb_breakpoint): New.
5159 (struct other_breakpoint): New.
5160 (struct reinsert_breakpoint): New.
5161 (is_gdb_breakpoint): New function.
5162 (any_persistent_commands): Update command_list if
5163 is_gdb_breakpoint returns true.
5164 (set_breakpoint): Create breakpoints according to their types.
5165 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5166 (set_gdb_breakpoint_1): Likewise.
5167 (set_gdb_breakpoint): Likewise.
5168 (clear_breakpoint_conditions): Change parameter type to
5169 'struct gdb_breakpoint *'.
5170 (clear_breakpoint_commands): Likewise.
5171 (clear_breakpoint_conditions_and_commands): Likewise.
5172 (add_condition_to_breakpoint): Likewise.
5173 (add_breakpoint_condition): Likewise.
5174 (add_commands_to_breakpoint): Likewise.
5175 (check_breakpoints): Check other_breakpoint.
5176 (clone_one_breakpoint): Clone breakpopint according to its type.
5177 * mem-break.h (struct gdb_breakpoint): Declare.
5178 (set_gdb_breakpoint): Update declaration.
5179 (clear_breakpoint_conditions_and_commands): Likewise.
5180 (add_breakpoint_condition): Likewise.
5181 (add_breakpoint_commands): Likewise.
5182 * server.c (process_point_options): Change parameter type to
5183 'struct gdb_breakpoint *'.
5184
5185 2016-07-21 Yao Qi <yao.qi@linaro.org>
5186
5187 * mem-break.c (set_breakpoint_at): Rename it to ...
5188 (set_breakpoint_type_at): ... it.
5189 (set_breakpoint_at): Call set_breakpoint_type_at.
5190 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5191 * mem-break.h (set_breakpoint_at): Update comments.
5192
5193 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5194
5195 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5196 to buf parameter.
5197 (nios2_store_gregset): Likewise.
5198
5199 2016-07-01 Pedro Alves <palves@redhat.com>
5200 Antoine Tremblay <antoine.tremblay@ericsson.com>
5201
5202 * linux-low.c: Change interface to take the target lwp_info
5203 pointer directly and return void. Handle detaching from a zombie
5204 thread.
5205 (linux_detach_lwp_callback): New function.
5206 (linux_detach): Detach from the leader thread after detaching from
5207 the clone threads.
5208
5209 2016-06-28 Yao Qi <yao.qi@linaro.org>
5210
5211 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5212 for variable new_offset.
5213 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5214 (aarch64_ftrace_insn_reloc_cb): Likewise.
5215 (aarch64_ftrace_insn_reloc_tb): Likewise.
5216 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5217 PRIx64 instead of PRIx32.
5218
5219 2016-06-28 Yao Qi <yao.qi@linaro.org>
5220
5221 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5222 (the_low_target): Install arm_get_syscall_trapinfo.
5223
5224 2016-06-28 Yao Qi <yao.qi@linaro.org>
5225
5226 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5227 function.
5228 (the_low_target): Install aarch64_get_syscall_trapinfo.
5229
5230 2016-06-28 Yao Qi <yao.qi@linaro.org>
5231
5232 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5233 Callers updated.
5234 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5235 Remove parameter sysno.
5236 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5237 sysret.
5238
5239 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5240
5241 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5242 (s390_emit_ne_goto): Likewise.
5243 (s390_emit_lt_goto): Likewise.
5244 (s390_emit_le_goto): Likewise.
5245 (s390_emit_gt_goto): Likewise.
5246 (s390_emit_ge_goto): Likewise.
5247 (s390x_emit_eq_goto): Likewise.
5248 (s390x_emit_ne_goto): Likewise.
5249 (s390x_emit_lt_goto): Likewise.
5250 (s390x_emit_le_goto): Likewise.
5251 (s390x_emit_gt_goto): Likewise.
5252 (s390x_emit_ge_goto): Likewise.
5253 (s390_emit_ops_impl): Mark variable static.
5254 (s390x_emit_ops): Likewise.
5255
5256 2016-06-17 Yao Qi <yao.qi@linaro.org>
5257
5258 * linux-low.c (handle_extended_wait): Call
5259 uninsert_reinsert_breakpoints for the parent process. Remove
5260 reinsert breakpoints from the child process. Reinsert them to
5261 the parent process when vfork is done.
5262 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5263 (reinsert_reinsert_breakpoints): New function.
5264 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5265 (reinsert_reinsert_breakpoints): Declare.
5266
5267 2016-06-17 Yao Qi <yao.qi@linaro.org>
5268
5269 * linux-low.c (handle_extended_wait): If the parent is doing
5270 step-over, remove the reinsert breakpoints from the forked child.
5271
5272 2016-06-17 Yao Qi <yao.qi@linaro.org>
5273
5274 * linux-low.c (unsuspend_all_lwps): Declare.
5275 (linux_low_filter_event): If thread exited, call finish_step_over.
5276 If step-over is finished, unsuspend other threads.
5277
5278 2016-06-17 Yao Qi <yao.qi@linaro.org>
5279
5280 * linux-low.c (linux_resume_one_lwp_throw): Assert
5281 has_reinsert_breakpoints returns false.
5282 * mem-break.c (delete_disabled_breakpoints): Assert
5283 bp type isn't reinsert_breakpoint.
5284
5285 2016-06-17 Yao Qi <yao.qi@linaro.org>
5286
5287 * linux-low.c (maybe_hw_step): New function.
5288 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5289 (finish_step_over): Switch current_thread to lwp temporarily,
5290 and assert has_reinsert_breakpoints returns true.
5291 (proceed_one_lwp): Call maybe_hw_step.
5292 * mem-break.c (has_reinsert_breakpoints): New function.
5293 * mem-break.h (has_reinsert_breakpoints): Declare.
5294
5295 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5296
5297 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5298
5299 2016-05-17 Yao Qi <yao.qi@linaro.org>
5300
5301 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5302 instead of find_inferior.
5303
5304 2016-05-05 Yao Qi <yao.qi@linaro.org>
5305
5306 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5307 Initialize res to zero.
5308
5309 2016-05-05 Yao Qi <yao.qi@linaro.org>
5310
5311 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5312 to uint32_t.
5313
5314 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5315
5316 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5317 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5318 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5319
5320 2016-04-28 Par Olsson <par.olsson@windriver.com>
5321 Simon Marchi <simon.marchi@ericsson.com>
5322
5323 * tracepoint.c (write_inferior_int8): New function.
5324 (cmd_qtenable_disable): Write enable flag using
5325 write_inferior_int8.
5326
5327 2016-04-25 Yao Qi <yao.qi@linaro.org>
5328
5329 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5330 (need_step_over_p): Return zero if the LWP has pending signals
5331 can be delivered on software single step target.
5332
5333 2016-04-25 Yao Qi <yao.qi@linaro.org>
5334
5335 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5336 return instead of error.
5337
5338 2016-04-22 Yao Qi <yao.qi@linaro.org>
5339
5340 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5341 to 23.
5342
5343 2016-04-22 Yao Qi <yao.qi@linaro.org>
5344
5345 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5346 signal when stepping over breakpoint with software single
5347 step.
5348
5349 2016-04-21 Pedro Alves <palves@redhat.com>
5350
5351 * linux-s390-low.c (s390_collect_ptrace_register)
5352 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5353 add casts.
5354 (s390_check_regset): Use void * instead of gdb_byte *.
5355
5356 2016-04-20 Pedro Alves <palves@redhat.com>
5357
5358 * configure: Renegerate.
5359
5360 2016-04-20 Yao Qi <yao.qi@linaro.org>
5361
5362 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5363 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5364 number 16.
5365 (arm_store_gregset): Likewise.
5366
5367 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5368
5369 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5370 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5371 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5372 (amd64-avx-mpx-linux.c): New rules.
5373 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5374 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5375 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5376 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5377 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5378 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5379 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5380 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5381 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5382 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5383 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5384 * linux-x86-low.c (x86_linux_read_description): Add case for
5385 X86_XSTATE_AVX_MPX_MASK.
5386 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5387 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5388 init_registers_i386_avx_mpx_linux.
5389 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5390 (initialize_low_tracepoint): Call
5391 init_registers_i386_avx_mpx_linux.
5392 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5393 (initialize_low_tracepoint): Call
5394 init_registers_amd64_avx_mpx_linux.
5395 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5396 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5397 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5398 declarations.
5399
5400 2016-04-18 Pedro Alves <palves@redhat.com>
5401
5402 * configure: Regenerate.
5403
5404 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5405
5406 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5407 (aarch64_emit_sub): Likewise.
5408
5409 2016-04-12 Pedro Alves <palves@redhat.com>
5410
5411 * utils.c (prepare_to_throw_exception): Delete.
5412
5413 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5414
5415 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5416
5417 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5418
5419 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5420
5421 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5422
5423 * linux-aarch64-ipa.c: Add <elf.h> include.
5424 * linux-ppc-ipa.c: Add <elf.h> include.
5425 * linux-s390-ipa.c: Add <elf.h> include.
5426
5427 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5428
5429 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5430 (get_raw_reg_ptr): Likewise.
5431 (get_trace_state_variable_value_ptr): Likewise.
5432 (set_trace_state_variable_value_ptr): Likewise.
5433 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5434 char *.
5435
5436 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5437 Marcin Kościelnicki <koriakin@0x04.net>
5438
5439 PR/17221
5440 * linux-ppc-low.c (emit_insns): New function.
5441 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5442 (ppc_emit_prologue): New function.
5443 (ppc_emit_epilogue): New function.
5444 (ppc_emit_add): New function.
5445 (ppc_emit_sub): New function.
5446 (ppc_emit_mul): New function.
5447 (ppc_emit_lsh): New function.
5448 (ppc_emit_rsh_signed): New function.
5449 (ppc_emit_rsh_unsigned): New function.
5450 (ppc_emit_ext): New function.
5451 (ppc_emit_zero_ext): New function.
5452 (ppc_emit_log_not): New function.
5453 (ppc_emit_bit_and): New function.
5454 (ppc_emit_bit_or): New function.
5455 (ppc_emit_bit_xor): New function.
5456 (ppc_emit_bit_not): New function.
5457 (ppc_emit_equal): New function.
5458 (ppc_emit_less_signed): New function.
5459 (ppc_emit_less_unsigned): New function.
5460 (ppc_emit_ref): New function.
5461 (ppc_emit_const): New function.
5462 (ppc_emit_reg): New function.
5463 (ppc_emit_pop): New function.
5464 (ppc_emit_stack_flush): New function.
5465 (ppc_emit_swap): New function.
5466 (ppc_emit_stack_adjust): New function.
5467 (ppc_emit_call): New function.
5468 (ppc_emit_int_call_1): New function.
5469 (ppc_emit_void_call_2): New function.
5470 (ppc_emit_if_goto): New function.
5471 (ppc_emit_goto): New function.
5472 (ppc_emit_eq_goto): New function.
5473 (ppc_emit_ne_goto): New function.
5474 (ppc_emit_lt_goto): New function.
5475 (ppc_emit_le_goto): New function.
5476 (ppc_emit_gt_goto): New function.
5477 (ppc_emit_ge_goto): New function.
5478 (ppc_write_goto_address): New function.
5479 (ppc_emit_ops_impl): New static variable.
5480 (ppc64v1_emit_prologue): New function.
5481 (ppc64v2_emit_prologue): New function.
5482 (ppc64_emit_epilogue): New function.
5483 (ppc64_emit_add): New function.
5484 (ppc64_emit_sub): New function.
5485 (ppc64_emit_mul): New function.
5486 (ppc64_emit_lsh): New function.
5487 (ppc64_emit_rsh_signed): New function.
5488 (ppc64_emit_rsh_unsigned): New function.
5489 (ppc64_emit_ext): New function.
5490 (ppc64_emit_zero_ext): New function.
5491 (ppc64_emit_log_not): New function.
5492 (ppc64_emit_bit_and): New function.
5493 (ppc64_emit_bit_or): New function.
5494 (ppc64_emit_bit_xor): New function.
5495 (ppc64_emit_bit_not): New function.
5496 (ppc64_emit_equal): New function.
5497 (ppc64_emit_less_signed): New function.
5498 (ppc64_emit_less_unsigned): New function.
5499 (ppc64_emit_ref): New function.
5500 (ppc64_emit_const): New function.
5501 (ppc64v1_emit_reg): New function.
5502 (ppc64v2_emit_reg): New function.
5503 (ppc64_emit_pop): New function.
5504 (ppc64_emit_stack_flush): New function.
5505 (ppc64_emit_swap): New function.
5506 (ppc64v1_emit_call): New function.
5507 (ppc64v2_emit_call): New function.
5508 (ppc64v1_emit_int_call_1): New function.
5509 (ppc64v2_emit_int_call_1): New function.
5510 (ppc64v1_emit_void_call_2): New function.
5511 (ppc64v2_emit_void_call_2): New function.
5512 (ppc64_emit_if_goto): New function.
5513 (ppc64_emit_eq_goto): New function.
5514 (ppc64_emit_ne_goto): New function.
5515 (ppc64_emit_lt_goto): New function.
5516 (ppc64_emit_le_goto): New function.
5517 (ppc64_emit_gt_goto): New function.
5518 (ppc64_emit_ge_goto): New function.
5519 (ppc64v1_emit_ops_impl): New static variable.
5520 (ppc64v2_emit_ops_impl): New static variable.
5521 (ppc_emit_ops): New function.
5522 (linux_low_target): Wire in ppc_emit_ops.
5523
5524 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5525 Marcin Kościelnicki <koriakin@0x04.net>
5526
5527 PR/17221
5528 * Makefile.in: Add powerpc-*-ipa.o
5529 * configure.srv: Add ipa_obj for powerpc*-linux.
5530 * linux-ppc-ipa.c: New file.
5531 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5532 includes.
5533 (PPC_FIELD): New macro.
5534 (PPC_SEXT): New macro.
5535 (PPC_OP6): New macro.
5536 (PPC_BO): New macro.
5537 (PPC_LI): New macro.
5538 (PPC_BD): New macro.
5539 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
5540 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
5541 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
5542 (ppc_get_thread_area): New function.
5543 (is_elfv2_inferior): New function.
5544 (gen_ds_form): New function.
5545 (GEN_STD): New macro.
5546 (GEN_STDU): New macro.
5547 (GEN_LD): New macro.
5548 (GEN_LDU): New macro.
5549 (gen_d_form): New function.
5550 (GEN_ADDI): New macro.
5551 (GEN_ADDIS): New macro.
5552 (GEN_LI): New macro.
5553 (GEN_LIS): New macro.
5554 (GEN_ORI): New macro.
5555 (GEN_ORIS): New macro.
5556 (GEN_LWZ): New macro.
5557 (GEN_STW): New macro.
5558 (GEN_STWU): New macro.
5559 (gen_xfx_form): New function.
5560 (GEN_MFSPR): New macro.
5561 (GEN_MTSPR): New macro.
5562 (GEN_MFCR): New macro.
5563 (GEN_MTCR): New macro.
5564 (GEN_SYNC): New macro.
5565 (GEN_LWSYNC): New macro.
5566 (gen_x_form): New function.
5567 (GEN_OR): New macro.
5568 (GEN_MR): New macro.
5569 (GEN_LWARX): New macro.
5570 (GEN_STWCX): New macro.
5571 (GEN_CMPW): New macro.
5572 (gen_md_form): New function.
5573 (GEN_RLDICL): New macro.
5574 (GEN_RLDICR): New macro.
5575 (gen_i_form): New function.
5576 (GEN_B): New macro.
5577 (GEN_BL): New macro.
5578 (gen_b_form): New function.
5579 (GEN_BNE): New macro.
5580 (GEN_LOAD): New macro.
5581 (GEN_STORE): New macro.
5582 (gen_limm): New function.
5583 (gen_atomic_xchg): New function.
5584 (gen_call): New function.
5585 (ppc_relocate_instruction): New function.
5586 (ppc_install_fast_tracepoint_jump_pad): New function.
5587 (ppc_get_min_fast_tracepoint_insn_len): New function.
5588 (ppc_get_ipa_tdesc_idx): New function.
5589 (the_low_target): Wire in the new functions.
5590 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
5591 tdescs.
5592 * linux-ppc-tdesc.h: New file.
5593
5594 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5595
5596 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5597 (alloc_jump_pad_buffer): New function.
5598 * linux-amd64-ipa.c: Add <sys/mman.h> include.
5599 (alloc_jump_pad_buffer): New function.
5600 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
5601 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
5602 (alloc_jump_pad_buffer): New function.
5603 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
5604 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
5605 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
5606 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
5607
5608 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5609
5610 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
5611 * linux-amd64-ipa.c: Likewise.
5612 * linux-i386-ipa.c: Likewise.
5613 * linux-s390-ipa.c: Likewise.
5614 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
5615 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
5616 set_trace_state_variable_value_ptr.
5617 (struct ipa_sym_addresses): Likewise.
5618 (symbol_list): Likewise.
5619 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
5620 accessing gdb_collect directly.
5621 (gdb_collect_ptr_type): New typedef.
5622 (get_raw_reg_ptr_type): New typedef.
5623 (get_trace_state_variable_value_ptr_type): New typedef.
5624 (set_trace_state_variable_value_ptr_type): New typedef.
5625 (gdb_collect_ptr): New global.
5626 (get_raw_reg_ptr): New global.
5627 (get_trace_state_variable_value_ptr): New global.
5628 (set_trace_state_variable_value_ptr): New global.
5629 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
5630 accessing get_raw_reg directly.
5631 (get_get_tsv_func_addr): Likewise for
5632 get_trace_state_variable_value_ptr.
5633 (get_set_tsv_func_addr): Likewise for
5634 set_trace_state_variable_value_ptr.
5635 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
5636
5637 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
5638
5639 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
5640
5641 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
5642
5643 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
5644 packets.
5645 (relocate_instruction): Remove own_buf.
5646 * server.c (own_buf): Make global.
5647 (handle_v_requests): Make global.
5648 * server.h (own_buf): New declaration.
5649 (handle_v_requests): New prototype.
5650
5651 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5652
5653 PR 18377
5654 * linux-s390-low.c (add_insns): New function.
5655 (s390_emit_prologue): New function.
5656 (s390_emit_epilogue): New function.
5657 (s390_emit_add): New function.
5658 (s390_emit_sub): New function.
5659 (s390_emit_mul): New function.
5660 (s390_emit_lsh): New function.
5661 (s390_emit_rsh_signed): New function.
5662 (s390_emit_rsh_unsigned): New function.
5663 (s390_emit_ext): New function.
5664 (s390_emit_log_not): New function.
5665 (s390_emit_bit_and): New function.
5666 (s390_emit_bit_or): New function.
5667 (s390_emit_bit_xor): New function.
5668 (s390_emit_bit_not): New function.
5669 (s390_emit_equal): New function.
5670 (s390_emit_less_signed): New function.
5671 (s390_emit_less_unsigned): New function.
5672 (s390_emit_ref): New function.
5673 (s390_emit_if_goto): New function.
5674 (s390_emit_goto): New function.
5675 (s390_write_goto_address): New function.
5676 (s390_emit_litpool): New function.
5677 (s390_emit_const): New function.
5678 (s390_emit_call): New function.
5679 (s390_emit_reg): New function.
5680 (s390_emit_pop): New function.
5681 (s390_emit_stack_flush): New function.
5682 (s390_emit_zero_ext): New function.
5683 (s390_emit_swap): New function.
5684 (s390_emit_stack_adjust): New function.
5685 (s390_emit_set_r2): New function.
5686 (s390_emit_int_call_1): New function.
5687 (s390_emit_void_call_2): New function.
5688 (s390_emit_eq_goto): New function.
5689 (s390_emit_ne_goto): New function.
5690 (s390_emit_lt_goto): New function.
5691 (s390_emit_le_goto): New function.
5692 (s390_emit_gt_goto): New function.
5693 (s390_emit_ge_goto): New function.
5694 (s390x_emit_prologue): New function.
5695 (s390x_emit_epilogue): New function.
5696 (s390x_emit_add): New function.
5697 (s390x_emit_sub): New function.
5698 (s390x_emit_mul): New function.
5699 (s390x_emit_lsh): New function.
5700 (s390x_emit_rsh_signed): New function.
5701 (s390x_emit_rsh_unsigned): New function.
5702 (s390x_emit_ext): New function.
5703 (s390x_emit_log_not): New function.
5704 (s390x_emit_bit_and): New function.
5705 (s390x_emit_bit_or): New function.
5706 (s390x_emit_bit_xor): New function.
5707 (s390x_emit_bit_not): New function.
5708 (s390x_emit_equal): New function.
5709 (s390x_emit_less_signed): New function.
5710 (s390x_emit_less_unsigned): New function.
5711 (s390x_emit_ref): New function.
5712 (s390x_emit_if_goto): New function.
5713 (s390x_emit_const): New function.
5714 (s390x_emit_call): New function.
5715 (s390x_emit_reg): New function.
5716 (s390x_emit_pop): New function.
5717 (s390x_emit_stack_flush): New function.
5718 (s390x_emit_zero_ext): New function.
5719 (s390x_emit_swap): New function.
5720 (s390x_emit_stack_adjust): New function.
5721 (s390x_emit_int_call_1): New function.
5722 (s390x_emit_void_call_2): New function.
5723 (s390x_emit_eq_goto): New function.
5724 (s390x_emit_ne_goto): New function.
5725 (s390x_emit_lt_goto): New function.
5726 (s390x_emit_le_goto): New function.
5727 (s390x_emit_gt_goto): New function.
5728 (s390x_emit_ge_goto): New function.
5729 (s390_emit_ops): New function.
5730 (struct linux_target_ops): Fill in emit_ops hook.
5731
5732 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5733
5734 PR 18377
5735 * Makefile.in: Add s390 IPA files.
5736 * configure.srv: Build IPA for s390.
5737 * linux-s390-ipa.c: New file.
5738 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
5739 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
5740 (tdesc_s390_linux32): Likewise.
5741 (init_registers_s390_linux32v1): Likewise.
5742 (tdesc_s390_linux32v1): Likewise.
5743 (init_registers_s390_linux32v2): Likewise.
5744 (tdesc_s390_linux32v2): Likewise.
5745 (init_registers_s390_linux64): Likewise.
5746 (tdesc_s390_linux64): Likewise.
5747 (init_registers_s390_linux64v1): Likewise.
5748 (tdesc_s390_linux64v1): Likewise.
5749 (init_registers_s390_linux64v2): Likewise.
5750 (tdesc_s390_linux64v2): Likewise.
5751 (init_registers_s390_te_linux64): Likewise.
5752 (tdesc_s390_te_linux64): Likewise.
5753 (init_registers_s390_vx_linux64): Likewise.
5754 (tdesc_s390_vx_linux64): Likewise.
5755 (init_registers_s390_tevx_linux64): Likewise.
5756 (tdesc_s390_tevx_linux64): Likewise.
5757 (init_registers_s390x_linux64): Likewise.
5758 (tdesc_s390x_linux64): Likewise.
5759 (init_registers_s390x_linux64v1): Likewise.
5760 (tdesc_s390x_linux64v1): Likewise.
5761 (init_registers_s390x_linux64v2): Likewise.
5762 (tdesc_s390x_linux64v2): Likewise.
5763 (init_registers_s390x_te_linux64): Likewise.
5764 (tdesc_s390x_te_linux64): Likewise.
5765 (init_registers_s390x_vx_linux64): Likewise.
5766 (tdesc_s390x_vx_linux64): Likewise.
5767 (init_registers_s390x_tevx_linux64): Likewise.
5768 (tdesc_s390x_tevx_linux64): Likewise.
5769 (have_hwcap_s390_vx): New static variable.
5770 (s390_arch_setup): Fill have_hwcap_s390_vx.
5771 (s390_get_thread_area): New function.
5772 (s390_ft_entry_gpr_esa): New const.
5773 (s390_ft_entry_gpr_zarch): New const.
5774 (s390_ft_entry_misc): New const.
5775 (s390_ft_entry_fr): New const.
5776 (s390_ft_entry_vr): New const.
5777 (s390_ft_main_31): New const.
5778 (s390_ft_main_64): New const.
5779 (s390_ft_exit_fr): New const.
5780 (s390_ft_exit_vr): New const.
5781 (s390_ft_exit_misc): New const.
5782 (s390_ft_exit_gpr_esa): New const.
5783 (s390_ft_exit_gpr_zarch): New const.
5784 (append_insns): New function.
5785 (s390_relocate_instruction): New function.
5786 (s390_install_fast_tracepoint_jump_pad): New function.
5787 (s390_get_min_fast_tracepoint_insn_len): New function.
5788 (s390_get_ipa_tdesc_idx): New function.
5789 (struct linux_target_ops): Wire in the above functions.
5790 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
5791 * linux-s390-tdesc.h: New file.
5792
5793 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
5794
5795 * linux-s390-low.c (s390_supports_tracepoints): New function.
5796 (struct linux_target_ops): Fill supports_tracepoints hook.
5797
5798 2016-03-18 Yao Qi <yao.qi@linaro.org>
5799
5800 * linux-low.c (lwp_signal_can_be_delivered): New function.
5801 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5802
5803 2016-03-18 Yao Qi <yao.qi@linaro.org>
5804
5805 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
5806 0 if signal is enqueued. Remove 'signal' from one debugging
5807 message. Move one debugging message to some lines below.
5808 Remove code setting 'signal' to 0.
5809
5810 2016-03-18 Yao Qi <yao.qi@linaro.org>
5811
5812 * linux-low.c (linux_low_filter_event): Remove redundant
5813 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
5814
5815 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
5816
5817 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
5818 (struct linux_target_ops): Wire in the above.
5819
5820 2016-03-03 Yao Qi <yao.qi@linaro.org>
5821
5822 * linux-low.c: Update comments to start_step_over.
5823
5824 2016-03-03 Yao Qi <yao.qi@linaro.org>
5825
5826 PR server/19736
5827 * linux-low.c (handle_extended_wait): Set child suspended
5828 if event_lwp->bp_reinsert isn't zero.
5829
5830 2016-03-02 Yao Qi <yao.qi@linaro.org>
5831
5832 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
5833 enqueue_pending_signal.
5834
5835 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
5836
5837 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
5838 is actually loaded.
5839
5840 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5841
5842 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
5843 (s390_regmap_3264) [!__s390x__]: New global.
5844 (s390_collect_ptrace_register): Skip map entries containing -1.
5845 (s390_supply_ptrace_register): Ditto.
5846 (s390_fill_gprs_high): New function.
5847 (s390_store_gprs_high): New function.
5848 (s390_regsets): Add NT_S390_HIGH_GPRS.
5849 (s390_get_hwcap): Enable on 31-bit.
5850 (have_hwcap_s390_high_gprs): Enable on 31-bit.
5851 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
5852 Detect NT_S390_HIGH_GPRS.
5853 (s390_usrregs_info_3264): Enable on 31-bit.
5854 (s390_regs_info): Enable regs_info_3264 on 31-bit.
5855 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
5856
5857 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
5858
5859 PR gdb/13808
5860 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
5861 * configure.srv: Ditto.
5862 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
5863 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
5864 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
5865 (init_registers_amd64_linux): Remove prototype.
5866 (tdesc_amd64_linux): Remove declaration.
5867 (get_ipa_tdesc): New function.
5868 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5869 initialize remaining tdescs.
5870 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
5871 (init_registers_i386_linux): Remove prototype.
5872 (tdesc_i386_linux): Remove declaration.
5873 (get_ipa_tdesc): New function.
5874 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
5875 initialize remaining tdescs.
5876 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
5877 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
5878 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
5879 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
5880 (x86_get_ipa_tdesc_idx): New function.
5881 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
5882 * linux-x86-tdesc.h: New file.
5883 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
5884 (target_get_ipa_tdesc_idx): New macro.
5885 * tracepoint.c (ipa_tdesc_idx): New macro.
5886 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
5887 (symbol_list): Add ipa_tdesc_idx.
5888 (cmd_qtstart): Write ipa_tdesc_idx in the target.
5889 (ipa_tdesc): Remove.
5890 (ipa_tdesc_idx): New variable.
5891 (get_context_regcache): Use get_ipa_tdesc.
5892 (gdb_collect): Ditto.
5893 (gdb_probe): Ditto.
5894 * tracepoint.h (get_ipa_tdesc): New prototype.
5895 (ipa_tdesc): Remove.
5896
5897 2016-02-24 Pedro Alves <palves@redhat.com>
5898
5899 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
5900 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
5901 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
5902 Factor out common code between the USE_SIGTRAP_SIGINFO and
5903 !USE_SIGTRAP_SIGINFO blocks.
5904 (linux_low_filter_event): Call save_stop_reason instead of
5905 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
5906 Update comments.
5907 (linux_wait_1): Update comments.
5908
5909 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
5910
5911 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
5912 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
5913 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
5914 ppc_insert_point, ppc_remove_point.
5915
5916 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
5917
5918 * linux-s390-low.c (s390_supports_z_point_type): New function.
5919 (struct linux_target_ops): Wire s390_supports_z_point_type in.
5920
5921 2016-02-16 Yao Qi <yao.qi@linaro.org>
5922
5923 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
5924 PC. Get pc from regcache_read_pc.
5925
5926 2016-02-12 Yao Qi <yao.qi@linaro.org>
5927
5928 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
5929 or linux_get_pc_32bit.
5930 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
5931
5932 2016-02-12 Yao Qi <yao.qi@linaro.org>
5933
5934 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
5935 arm_linux_get_next_pcs_fixup.
5936
5937 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
5938
5939 * tracepoint.c (x_tracepoint_action_download): Change
5940 write_inferior_data_ptr to write_inferior_data_pointer.
5941 (cmd_qtstart): Likewise.
5942 (write_inferior_data_ptr): Remove.
5943 (download_agent_expr): Change write_inferior_data_ptr to
5944 write_inferior_data_pointer.
5945 (download_tracepoint_1): Likewise.
5946 (download_tracepoint): Likewise.
5947 (download_trace_state_variables): Likewise.
5948
5949 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
5950 Marcin Kościelnicki <koriakin@0x04.net>
5951
5952 * tracepoint.c (struct tracepoint_action_ops): Remove.
5953 (struct tracepoint_action): Remove ops.
5954 (m_tracepoint_action_download, r_tracepoint_action_download)
5955 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
5956 size and offset accordingly.
5957 (m_tracepoint_action_ops, r_tracepoint_action_ops)
5958 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
5959 (tracepoint_action_send, tracepoint_action_download): New functions.
5960 Helpers for trace action handlers.
5961 (add_tracepoint_action): Remove setup actions ops.
5962 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
5963
5964 2016-02-10 Yao Qi <yao.qi@linaro.org>
5965
5966 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
5967
5968 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5969
5970 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
5971 to AC_OUTPUT.
5972 * configure: Regenerate.
5973
5974 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
5975
5976 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
5977 void * to gdb_byte *.
5978 * linux-low.c (siginfo_fixup): Likewise.
5979 (linux_xfer_siginfo): Likewise.
5980 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
5981 Likewise.
5982 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5983
5984 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
5985
5986 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
5987 to srv_tgtobj.
5988 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
5989 to srv_tgtobj.
5990 * linux-x86-low.c [__x86_64__]: Include
5991 "nat/amd64-linux-siginfo.h".
5992 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
5993 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
5994 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
5995 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
5996 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
5997 (cpt_si_fd, si_timerid, si_overrun): Move from
5998 nat/amd64-linux-siginfo.c.
5999 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6000
6001 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6002
6003 * server.c (skip_to_semicolon): Remove.
6004 (process_point_options): Use strchrnul instead of
6005 skip_to_semicolon.
6006
6007 2016-01-26 Yao Qi <yao.qi@linaro.org>
6008
6009 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6010 * linux-low.c (install_software_single_step_breakpoints): Don't
6011 call regcache_read_pc.
6012 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6013 argument pc.
6014
6015 2016-01-26 Yao Qi <yao.qi@linaro.org>
6016
6017 * linux-low.c (install_software_single_step_breakpoints): Call
6018 regcache_read_pc instead of get_pc.
6019
6020 2016-01-26 Yao Qi <yao.qi@linaro.org>
6021
6022 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6023 (unblock_async_io): Rename to ...
6024 (block_unblock_async_io): ... it. New function.
6025 (enable_async_io): Don't install SIGIO handler. Unblock it
6026 instead.
6027 (disable_async_io): Don't ignore SIGIO. Block it instead.
6028 (initialize_async_io): Install SIGIO handler. Don't call
6029 unblock_async_io.
6030
6031 2016-01-26 Yao Qi <yao.qi@linaro.org>
6032
6033 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6034 first character is '\003', call *the_target->request_interrupt.
6035
6036 2016-01-25 Yao Qi <yao.qi@linaro.org>
6037
6038 * remote-utils.c (new_thread_notify): Remove.
6039 (dead_thread_notify): Likewise.
6040 * remote-utils.h (new_thread_notify): Remove declaration.
6041 (dead_thread_notify): Likewise.
6042
6043 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6044
6045 * gdb.trace/pending.exp: Fix expected message on continue.
6046
6047 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6048
6049 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6050 it works properly on big-endian machines where sizeof (CORE_ADDR)
6051 != sizeof (void *).
6052
6053 2016-01-21 Pedro Alves <palves@redhat.com>
6054
6055 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6056 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6057 * configure: Regenerate.
6058
6059 2016-01-21 Yao Qi <yao.qi@linaro.org>
6060
6061 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6062 is_thumb and set it according to CPSR saved on the stack.
6063 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6064 arm_sigreturn_next_pc.
6065
6066 2016-01-18 Yao Qi <yao.qi@linaro.org>
6067
6068 * linux-low.c (linux_set_pc_64bit): New function.
6069 (linux_get_pc_64bit): New function.
6070 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6071 Declare.
6072 * linux-sparc-low.c (debug_threads): Remove declaration.
6073 (sparc_get_pc): Remove.
6074 (the_low_target): Use linux_get_pc_64bit instead of
6075 sparc_get_pc.
6076 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6077 (the_low_target): Use linux_get_pc_64bit and
6078 linux_set_pc_64bit.
6079
6080 2016-01-18 Yao Qi <yao.qi@linaro.org>
6081
6082 * linux-arm-low.c (debug_threads): Remove declaration.
6083 (arm_get_pc, arm_set_pc): Remove.
6084 (the_low_target): Use linux_get_pc_32bit and
6085 linux_set_pc_32bit.
6086 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6087 (the_low_target): Use linux_get_pc_32bit and
6088 linux_set_pc_32bit.
6089 * linux-cris-low.c (debug_threads): Remove declaration.
6090 (cris_get_pc, cris_set_pc,): Remove.
6091 (the_low_target): Use linux_get_pc_32bit and
6092 linux_set_pc_32bit.
6093 * linux-crisv32-low.c (debug_threads): Remove declaration.
6094 (cris_get_pc, cris_set_pc): Remove.
6095 (the_low_target): Use linux_get_pc_32bit and
6096 linux_set_pc_32bit.
6097 * linux-low.c: Include inttypes.h.
6098 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6099 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6100 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6101 (the_low_target): Use linux_get_pc_32bit and
6102 linux_set_pc_32bit.
6103 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6104 (the_low_target): Use linux_get_pc_32bit and
6105 linux_set_pc_32bit.
6106 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6107 (the_low_target): Use linux_get_pc_32bit and
6108 linux_set_pc_32bit.
6109 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6110 (the_low_target): Use linux_get_pc_32bit and
6111 linux_set_pc_32bit.
6112 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6113 (the_low_target): Use linux_get_pc_32bit and
6114 linux_set_pc_32bit.
6115
6116 2016-01-18 Gary Benson <gbenson@redhat.com>
6117
6118 * configure.ac (AC_FUNC_FORK): New check.
6119 * config.in: Regenerate.
6120 * configure: Likewise.
6121
6122 2016-01-14 Yao Qi <yao.qi@linaro.org>
6123
6124 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6125 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6126 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6127 arm_get_next_pcs_ctor.
6128
6129 2016-01-12 Josh Stone <jistone@redhat.com>
6130 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6131
6132 * inferiors.h: Include "gdb_vecs.h".
6133 (struct process_info): Add syscalls_to_catch.
6134 * inferiors.c (remove_process): Free syscalls_to_catch.
6135 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6136 syscall_return stops.
6137 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6138 * server.c (handle_general_set): Handle QCatchSyscalls.
6139 (handle_query): Report support for QCatchSyscalls.
6140 * target.h (struct target_ops): Add supports_catch_syscall.
6141 (target_supports_catch_syscall): New macro.
6142 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6143 (struct lwp_info): Add syscall_state.
6144 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6145 Maintain syscall_state and syscalls_to_catch across exec.
6146 (get_syscall_trapinfo): New function, proxy to the_low_target.
6147 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6148 (linux_low_filter_event): Toggle syscall_state entry/return for
6149 syscall traps, and set it ignored for all others.
6150 (gdb_catching_syscalls_p): New function.
6151 (gdb_catch_this_syscall_p): New function.
6152 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6153 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6154 (linux_supports_catch_syscall): New function.
6155 (linux_target_ops): Install it.
6156 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6157 (the_low_target): Install it.
6158
6159 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6160
6161 * acinclude.m4: Include new ../warning.m4 file.
6162 * configure: Regenerated.
6163 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6164
6165 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6166
6167 * ax.c (is_goto_target): Mark static.
6168 * linux-low.c (register_addr): Likewise.
6169 (linux_fetch_registers, linux_store_registers): Likewise.
6170 * mem-break.c (any_persistent_commands): Fix old prototype.
6171 (add_commands_to_breakpoint): Mark static.
6172 * regcache.c (find_register_by_name): Delete unused func.
6173 * remote-utils.c (hex_or_minus_one): Mark static.
6174 * server.c (monitor_show_help): Mark static.
6175 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6176 handle_v_requests): Likewise.
6177
6178 2016-01-12 Pedro Alves <palves@redhat.com>
6179
6180 Remove use of the registered trademark symbol throughout.
6181
6182 2016-01-08 Yao Qi <yao.qi@linaro.org>
6183
6184 * remote-utils.c (getpkt): If c is '\003', call target hook
6185 request_interrupt.
6186
6187 2016-01-06 Yao Qi <yao.qi@linaro.org>
6188
6189 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6190 linux-aarch32-low.c.
6191 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6192 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6193 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6194 (thumb2_breakpoint): Declare.
6195 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6196 linux-aarch32-low.h.
6197 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6198 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6199 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6200
6201 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6202
6203 * gdbreplay.c (gdbreplay_version): Change copyright year in
6204 version message.
6205 * server.c (gdbserver_version): Likewise.
6206
6207 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6208
6209 * server.c (crc32_table): Delete.
6210 (crc32): Use libiberty's xcrc32 function.
6211
6212 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6213
6214 * lynx-low.c (lynx_delete_thread_callback): New function.
6215 (lynx_mourn): Properly delete our process and all of its
6216 threads. Remove call to clear_inferiors.
6217
6218 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6219
6220 * target.c (thread_search_callback): Add check that
6221 the thread_stopped target callback is not NULL before
6222 calling it.
6223
6224 2015-12-21 Yao Qi <yao.qi@linaro.org>
6225
6226 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6227 arm breakpoint.
6228
6229 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6230
6231 * server.c (handle_query): Call target_supports_software_single_step.
6232
6233 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6234
6235 * linux-low.c (single_step): New function.
6236 (linux_resume_one_lwp_throw): Call single_step.
6237 (start_step_over): Likewise.
6238
6239 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6240
6241 * Makefile.in (SFILES): Append arch/arm-linux.c,
6242 arch/arm-get-next-pcs.c.
6243 (arm-linux.o): New rule.
6244 (arm-get-next-pcs.o): New rule.
6245 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6246 arm-linux.o.
6247 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6248 to linux-aarch32-low.c.
6249 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6250 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6251 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6252 (thumb2_breakpoint_len): Likewise.
6253 (arm_is_thumb_mode): Make non-static.
6254 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6255 from linux-aarch32-low.c.
6256 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6257 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6258 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6259 (thumb2_breakpoint_len): Likewise.
6260 (arm_is_thumb_mode): New declaration.
6261 * linux-arm-low.c: Include arch/arm-linux.h
6262 aarch/arm-get-next-pcs.h, sys/syscall.h.
6263 (get_next_pcs_ops): New struct.
6264 (get_next_pcs_addr_bits_remove): New function.
6265 (get_next_pcs_is_thumb): New function.
6266 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6267 (arm_sigreturn_next_pc): Likewise.
6268 (get_next_pcs_syscall_next_pc): Likewise.
6269 (arm_gdbserver_get_next_pcs): Likewise.
6270 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6271 Initialize.
6272 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6273 * server.h: Include gdb_vecs.h.
6274
6275 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6276
6277 * Makefile.in (SFILES): Append common/common-regcache.c.
6278 (OBS): Append common-regcache.o.
6279 (common-regcache.o): New rule.
6280 * regcache.c (init_register_cache): Initialize cache to
6281 REG_UNAVAILABLE.
6282 (regcache_raw_read_unsigned): New function.
6283 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6284 register_status enum.
6285
6286 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6287
6288 * linux-aarch64-low.c (the_low_targets): Rename
6289 breakpoint_reinsert_addr to get_next_pcs.
6290 * linux-arm-low.c (the_low_targets): Likewise.
6291 * linux-bfin-low.c (the_low_targets): Likewise.
6292 * linux-cris-low.c (the_low_targets): Likewise.
6293 * linux-crisv32-low.c (the_low_targets): Likewise.
6294 * linux-low.c (can_software_single_step): Likewise.
6295 (install_software_single_step_breakpoints): New function.
6296 (start_step_over): Use install_software_single_step_breakpoints.
6297 * linux-low.h: New CORE_ADDR vector.
6298 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6299 get_next_pcs.
6300 * linux-mips-low.c (the_low_targets): Likewise.
6301 * linux-nios2-low.c (the_low_targets): Likewise.
6302 * linux-sparc-low.c (the_low_targets): Likewise.
6303
6304 2015-12-17 Pedro Alves <palves@redhat.com>
6305
6306 * linux-low.c (linux_kill_one_lwp): Remove references to
6307 LinuxThreads.
6308 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6309 to 'kill'.
6310 (linux_init_signals): Delete.
6311 (initialize_low): Adjust.
6312 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6313
6314 2015-12-16 Pedro Alves <palves@redhat.com>
6315
6316 * configure.ac (compiler warning flags): When testing a
6317 -Wno-foo option, check whether -Wfoo works instead.
6318 * configure: Regenerate.
6319
6320 2015-12-11 Don Breazeal <donb@codesourcery.com>
6321
6322 * server.c (process_serial_event): Don't exit from gdbserver
6323 in remote mode if there are still active inferiors.
6324
6325 2015-12-11 Yao Qi <yao.qi@linaro.org>
6326
6327 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6328 arm_breakpoint_at if the process is 32-bit.
6329
6330 2015-12-11 Yao Qi <yao.qi@linaro.org>
6331
6332 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6333 arm breakpoint.
6334
6335 2015-12-07 Yao Qi <yao.qi@linaro.org>
6336
6337 * configure.srv: Append arm.o to srv_tgtobj for
6338 aarch64*-*-linux* target.
6339 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6340 from linux-arm-low.c.
6341 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6342 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6343 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6344 (thumb2_breakpoint_len): Likewise.
6345 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6346 (arm_breakpoint_kinds): Likewise.
6347 (arm_breakpoint_kind_from_pc): Likewise.
6348 (arm_sw_breakpoint_from_kind): Likewise.
6349 (arm_breakpoint_kind_from_current_state): Likewise.
6350 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6351 (arm_sw_breakpoint_from_kind): Declare.
6352 (arm_breakpoint_kind_from_current_state): Declare.
6353 (arm_breakpoint_at): Declare.
6354 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6355 arm_sw_breakpoint_from_kind if process is 32-bit.
6356 (aarch64_breakpoint_kind_from_pc): New function.
6357 (aarch64_breakpoint_kind_from_current_state): New function.
6358 (the_low_target): Initialize fields breakpoint_kind_from_pc
6359 and breakpoint_kind_from_current_state.
6360 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6361 linux-aarch32-low.c.
6362 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6363 (arm_breakpoint, arm_breakpoint_len): Likewise.
6364 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6365 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6366 (arm_is_thumb_mode): Likewise.
6367 (arm_breakpoint_at): Likewise.
6368 (arm_breakpoint_kind_from_pc): Likewise.
6369 (arm_sw_breakpoint_from_kind): Likewise.
6370 (arm_breakpoint_kind_from_current_state): Likewise.
6371
6372 Revert:
6373 2015-08-04 Yao Qi <yao.qi@linaro.org>
6374
6375 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6376 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6377 * server.c (extended_protocol): Remove "static".
6378 * server.h (extended_protocol): Declare it.
6379
6380 2015-12-04 Josh Stone <jistone@redhat.com>
6381
6382 * target.h (struct target_ops) <arch_setup>: Rename to ...
6383 (struct target_ops) <post_create_inferior>: ... this.
6384 (target_arch_setup): Rename to ...
6385 (target_post_create_inferior): ... this, calling post_create_inferior.
6386 * server.c (start_inferior): Update target_arch_setup calls to
6387 target_post_create_inferior.
6388 * linux-low.c (linux_low_ptrace_options): Forward declare.
6389 (linux_arch_setup): Update its comment for general use.
6390 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6391 (struct linux_target_ops): Use linux_post_create_inferior.
6392 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6393 to post_create_inferior.
6394 * nto-low.c (struct nto_target_ops): Likewise.
6395 * spu-low.c (struct spu_target_ops): Likewise.
6396 * win32-low.c (struct win32_target_ops): Likewise.
6397
6398 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6399
6400 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6401
6402 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6403
6404 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6405 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6406 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6407 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6408 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6409 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6410 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6411 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6412 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6413 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6414 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6415 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6416
6417 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6418
6419 * linux-low.c (linux_look_up_symbols): Don't call
6420 linux_supports_traceclone.
6421 * linux-low.h (thread_db_init): Remove use_events argument.
6422 * thread-db.c (thread_db_use_event): Remove global variable.
6423 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6424 (struct thread_db) <td_create_bp>: Remove field.
6425 (thread_db_create_event): Remove function.
6426 (thread_db_enable_reporting): Likewise.
6427 (find_one_thread): Don't check for thread_db_use_events.
6428 (attach_thread): Likewise.
6429 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6430 (try_thread_db_load_1): Don't check for thread_db_use_events.
6431 (thread_db_init): Remove use_events argument and thread events
6432 handling.
6433 (remove_thread_event_breakpoints): Remove function.
6434 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6435
6436 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6437
6438 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6439 New function.
6440 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6441 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6442 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6443 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6444 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6445 Initialize.
6446 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6447 New function.
6448 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6449 * linux-low.c (can_hardware_single_step): Use
6450 supports_hardware_single_step.
6451 (can_software_single_step): New function.
6452 (start_step_over): Call can_software_single_step.
6453 (linux_supports_hardware_single_step): New function.
6454 (struct target_ops) <supports_software_single_step>: Initialize.
6455 * linux-low.h (struct linux_target_ops)
6456 <supports_hardware_single_step>: Initialize.
6457 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6459 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6460 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6461 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6462 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6463 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6464 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6465 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6466 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6467 Initialize.
6468 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6469 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6470 Initialize.
6471 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6472 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6473 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6474 New function.
6475 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6476 * target.h (struct target_ops): <supports_software_single_step>:
6477 New field.
6478 (target_supports_software_single_step): New macro.
6479
6480 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6481
6482 * linux-low.c (linux_wait_1): Fix pc advance condition.
6483 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6484 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6485
6486 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6487
6488 * linux-arm-low.c (arm_is_thumb_mode): New function.
6489 (arm_breakpoint_at): Use arm_is_thumb_mode.
6490 (arm_breakpoint_kind_from_current_state): New function.
6491 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6492 Initialize.
6493 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6494 (linux_breakpoint_kind_from_current_state): New function.
6495 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6496 * linux-low.h (struct linux_target_ops)
6497 <breakpoint_kind_from_current_state>: New field.
6498 * target.h (struct target_ops): Likewise.
6499 (target_breakpoint_kind_from_current_state): New macro.
6500
6501 2015-11-30 Pedro Alves <palves@redhat.com>
6502
6503 * linux-low.c (linux_resume): Wake up the event loop before
6504 returning.
6505
6506 2015-11-30 Pedro Alves <palves@redhat.com>
6507
6508 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6509 check.
6510 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6511 to -1.
6512 * target.c (struct thread_search): New structure.
6513 (thread_search_callback): New function.
6514 (prev_general_thread): New global.
6515 (prepare_to_access_memory, done_accessing_memory): New functions.
6516 * target.h (prepare_to_access_memory, done_accessing_memory):
6517 Replace macros with function declarations.
6518
6519 2015-11-30 Pedro Alves <palves@redhat.com>
6520
6521 PR 14618
6522 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6523 report TARGET_WAITKIND_NO_RESUMED.
6524 * remote-utils.c (prepare_resume_reply): Handle
6525 TARGET_WAITKIND_NO_RESUMED.
6526 * server.c (report_no_resumed): New global.
6527 (handle_query) <qSupported>: Handle "no-resumed+". Report
6528 "no-resumed+" support.
6529 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6530 return error if the client doesn't support no-resumed events.
6531 (push_stop_notification): New function.
6532 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6533 events if the client supports them.
6534
6535 2015-11-30 Pedro Alves <palves@redhat.com>
6536
6537 * linux-low.c (thread_still_has_status_pending_p): Don't check
6538 vCont;t here.
6539 (lwp_resumed): New function.
6540 (status_pending_p_callback): Return early if the LWP is not
6541 supposed to be resumed.
6542
6543 2015-11-30 Pedro Alves <palves@redhat.com>
6544
6545 * linux-low.c (handle_extended_wait): Assert that the LWP's
6546 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
6547 thread create events, leave the new child's status pending.
6548 (linux_low_filter_event): If GDB wants to hear about thread exit
6549 events, leave the LWP marked dead and don't delete it.
6550 (linux_wait_for_event_filtered): Don't check for thread exit.
6551 (filter_exit_event): New function.
6552 (linux_wait_1): Use it, when returning an exit event.
6553 (linux_resume_one_lwp_throw): Assert that the LWP's
6554 waitstatus is TARGET_WAITKIND_IGNORE.
6555 * remote-utils.c (prepare_resume_reply): Handle
6556 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
6557 * server.c (report_thread_events): New global.
6558 (handle_general_set): Handle QThreadEvents.
6559 (handle_query) <qSupported>: Handle and report QThreadEvents+;
6560 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
6561 TARGET_WAITKIND_THREAD_EXITED.
6562 * server.h (report_thread_events): Declare.
6563
6564 2015-11-30 Pedro Alves <palves@redhat.com>
6565
6566 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
6567 the thread's last_resume_kind was resume_stop.
6568
6569 2015-11-30 Pedro Alves <palves@redhat.com>
6570
6571 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
6572 before returning.
6573
6574 2015-11-30 Pedro Alves <palves@redhat.com>
6575
6576 * server.c (handle_v_requests): Handle vCtrlC.
6577
6578 2015-11-30 Pedro Alves <palves@redhat.com>
6579
6580 * gdbthread.h (find_any_thread_of_pid): Declare.
6581 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
6582 functions.
6583 * server.c (handle_query): If current_thread is NULL, look for
6584 another thread of the selected process.
6585
6586 2015-11-26 Daniel Colascione <dancol@dancol.org>
6587 Simon Marchi <simon.marchi@ericsson.com>
6588
6589 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
6590 * server.c (handle_qxfer_threads_worker): Refactor to include thread
6591 name in reply.
6592 * target.h (struct target_ops) <thread_name>: New field.
6593 (target_thread_name): New macro.
6594
6595 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6596
6597 * regcache.h (regcache_invalidate_pid): Add declaration.
6598 * regcache.c (regcache_invalidate_pid): New function, extracted
6599 from regcache_invalidate.
6600 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
6601 Add trivial documentation comment.
6602 * lynx-low.c: Use regcache_invalidate_pid instead of
6603 regcache_invalidate.
6604
6605 2015-11-23 Joel Brobecker <brobecker@adacore.com>
6606
6607 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
6608 and Elf64_auxv_t if the target is Android.
6609
6610 2015-11-22 Doug Evans <xdje42@gmail.com>
6611
6612 * target.h: #include <sys/types.h>.
6613
6614 2015-11-19 Pedro Alves <palves@redhat.com>
6615
6616 * linux-low.c (linux_process_qsupported): Change prototype.
6617 Adjust.
6618 * linux-low.h (struct linux_target_ops) <process_qsupported>:
6619 Change prototype.
6620 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
6621 and adjust to loop over all features.
6622 * server.c (handle_query) <qSupported>: Adjust to call
6623 target_process_qsupported once, passing it a vector of unprocessed
6624 features.
6625 * target.h (struct target_ops) <process_qsupported>: Change
6626 prototype.
6627 (target_process_qsupported): Adjust.
6628
6629 2015-11-19 Pedro Alves <palves@redhat.com>
6630
6631 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
6632 mode.
6633 * configure: Regenerate.
6634
6635 2015-11-19 Pedro Alves <palves@redhat.com>
6636
6637 * configure: Regenerate.
6638
6639 2015-11-19 Yao Qi <yao.qi@linaro.org>
6640
6641 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
6642 type to uint32_t.
6643
6644 2015-11-19 Yao Qi <yao.qi@linaro.org>
6645
6646 * linux-aarch64-low.c (enum aarch64_operand_type): New.
6647 (struct aarch64_operand): Move enum out.
6648
6649 2015-11-19 Yao Qi <yao.qi@linaro.org>
6650
6651 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
6652 struct user_fpsimd_state *.
6653 (aarch64_store_fpregset): Likewise.
6654
6655 2015-11-19 Yao Qi <yao.qi@linaro.org>
6656
6657 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
6658 struct user_pt_regs *.
6659 (aarch64_store_gregset): Likewise.
6660
6661 2015-11-18 Pedro Alves <palves@redhat.com>
6662
6663 * Makefile.in (all_object_files): Add $IPA_OBJS.
6664
6665 2015-11-17 Pedro Alves <palves@redhat.com>
6666
6667 * win32-low.c (win32_resume): Use gdb_signal_from_host,
6668 GDB_SIGNAL_0 and gdb_signal_to_string.
6669
6670 2015-11-17 Pedro Alves <palves@redhat.com>
6671
6672 * win32-low.c (handle_output_debug_string): Remove parameter.
6673 (win32_kill): Remove our_status local and adjust call to
6674 handle_output_debug_string.
6675 (get_child_debug_event): Adjust call to
6676 handle_output_debug_string.
6677
6678 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6679
6680 * linux-mips-low.c (mips_fill_gregset): Add cast.
6681 (mips_store_gregset): Likewise.
6682 (mips_fill_fpregset): Likewise.
6683 (mips_store_fpregset): Likewise.
6684
6685 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6686
6687 * linux-mips-low.c (mips_add_watchpoint): Rename private to
6688 priv.
6689
6690 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6691
6692 * linux-mips-low.c (mips_linux_new_thread): Change type of
6693 watch_type to enum target_hw_bp_type.
6694
6695 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6696
6697 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
6698 Change return type to arm_hwbp_type.
6699
6700 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6701
6702 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
6703 (arm_store_gregset): Likewise.
6704 * linux-arm-low.c (arm_get_hwcap): Likewise.
6705 (arm_read_description): Likewise.
6706
6707 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6708
6709 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
6710
6711 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6712
6713 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
6714 (ppc_fill_vsxregset): Likewise.
6715 (ppc_store_vsxregset): Likewise.
6716 (ppc_fill_vrregset): Likewise.
6717 (ppc_store_vrregset): Likewise.
6718 (ppc_fill_evrregset): Likewise.
6719 (ppc_store_evrregset): Likewise.
6720
6721 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
6722
6723 * linux-ppc-low.c (ppc_usrregs_info): Remove
6724 forward-declaration.
6725 (ppc_arch_setup): Move lower in file.
6726
6727 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
6728
6729 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
6730 (ps_pdwrite): Likewise.
6731
6732 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
6733
6734 * linux-arm-low.c (arm_new_thread): Move pointer dereference
6735 to after assert checks.
6736
6737 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
6738
6739 * proc-service.c (ps_pdread): Add/adjust casts.
6740 (ps_pdwrite): Add/adjust casts.
6741
6742 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6743
6744 * server.c (handle_search_memory_1): Cast return value of
6745 memmem.
6746
6747 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
6748
6749 * server.c (write_qxfer_response): Change type of data to
6750 gdb_byte *.
6751
6752 2015-10-29 Pedro Alves <palves@redhat.com>
6753
6754 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
6755
6756 2015-10-29 Pedro Alves <palves@redhat.com>
6757
6758 * tracepoint.c (clear_installed_tracepoints): Add casts.
6759
6760 2015-10-29 Pedro Alves <palves@redhat.com>
6761
6762 * server.c (handle_v_cont, process_serial_event): Add enum
6763 gdb_signal casts to signal parsing code.
6764
6765 2015-10-29 Pedro Alves <palves@redhat.com>
6766
6767 * linux-low.h (NULL_REGSET): Define.
6768 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6769 * linux-arm-low.c (arm_regsets): Likewise.
6770 * linux-crisv32-low.c (cris_regsets): Likewise.
6771 * linux-m68k-low.c (m68k_regsets): Likewise.
6772 * linux-mips-low.c (mips_regsets): Likewise.
6773 * linux-nios2-low.c (nios2_regsets): Likewise.
6774 * linux-ppc-low.c (ppc_regsets): Likewise.
6775 * linux-s390-low.c (s390_regsets): Likewise.
6776 * linux-sh-low.c (sh_regsets): Likewise.
6777 * linux-sparc-low.c (sparc_regsets): Likewise.
6778 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6779 * linux-tile-low.c (tile_regsets): Likewise.
6780 * linux-x86-low.c (x86_regsets): Likewise.
6781 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6782
6783 2015-10-29 Pedro Alves <palves@redhat.com>
6784
6785 * linux-low.h (NULL_REGSET): Define.
6786 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
6787 * linux-arm-low.c (arm_regsets): Likewise.
6788 * linux-crisv32-low.c (cris_regsets): Likewise.
6789 * linux-m68k-low.c (m68k_regsets): Likewise.
6790 * linux-mips-low.c (mips_regsets): Likewise.
6791 * linux-nios2-low.c (nios2_regsets): Likewise.
6792 * linux-ppc-low.c (ppc_regsets): Likewise.
6793 * linux-s390-low.c (s390_regsets): Likewise.
6794 * linux-sh-low.c (sh_regsets): Likewise.
6795 * linux-sparc-low.c (sparc_regsets): Likewise.
6796 * linux-tic6x-low.c (tic6x_regsets): Likewise.
6797 * linux-tile-low.c (tile_regsets): Likewise.
6798 * linux-x86-low.c (x86_regsets): Likewise.
6799 * linux-xtensa-low.c (xtensa_regsets): Likewise.
6800
6801 2015-10-26 Doug Evans <dje@google.com>
6802
6803 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
6804
6805 2015-10-26 Doug Evans <dje@google.com>
6806
6807 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
6808
6809 2015-10-26 Doug Evans <dje@google.com>
6810
6811 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
6812 for debug_printf.
6813 (attach_thread, find_new_threads_callback): Ditto.
6814
6815 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6816
6817 * mem-break.h (set_breakpoint_data): Remove.
6818
6819 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6820
6821 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
6822 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6823 (initialize_low): Remove set_breakpoint_data call.
6824 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
6825 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
6826 (initialize_low): Remove set_breakpoint_data call.
6827 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
6828 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
6829 (initialize_low): Remove set_breakpoint_data call.
6830
6831 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
6832
6833 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
6834 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
6835 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
6836 * target.h (target_breakpoint_kind_from_pc): New macro.
6837
6838 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
6839
6840 * linux-low.c (default_breakpoint_kind_from_pc): New function.
6841 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
6842 the default breakpoint kind.
6843
6844 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6845
6846 * linux-arm-low.c (arm_supports_z_point_type): Add software
6847 breakpoint support.
6848
6849 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6850
6851 * linux-arm-low.c: Refactor breakpoint definitions.
6852 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
6853 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
6854
6855 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6856
6857 * Makefile.in: Add arm.c/o.
6858 * configure.srv: Likewise.
6859 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
6860 (arm_breakpoint_kind_from_pc): New function.
6861 (arm_sw_breakpoint_from_kind): Return proper kind.
6862 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
6863
6864 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6865
6866 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
6867 removal.
6868 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
6869 (struct raw_breakpoint) <size>: Remove.
6870 (struct raw_breakpoint) <kind>: Add.
6871 (bp_size): New function.
6872 (bp_opcode): Likewise.
6873 (find_raw_breakpoint_at): Adjust for kind.
6874 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
6875 (remove_memory_breakpoint): Adjust for kind call bp_size.
6876 (set_raw_breakpoint_at): Adjust for kind.
6877 (set_breakpoint): Likewise.
6878 (set_breakpoint_at): Call breakpoint_kind_from_pc.
6879 (delete_raw_breakpoint): Adjust for kind.
6880 (delete_breakpoint): Likewise.
6881 (find_gdb_breakpoint): Likewise.
6882 (set_gdb_breakpoint_1): Likewise.
6883 (set_gdb_breakpoint): Likewise.
6884 (delete_gdb_breakpoint_1): Likewise.
6885 (delete_gdb_breakpoint): Likewise.
6886 (uninsert_raw_breakpoint): Likewise.
6887 (reinsert_raw_breakpoint): Likewise.
6888 (set_breakpoint_data): Remove.
6889 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
6890 (check_mem_read): Adjust for kind call bp_size.
6891 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
6892 (clone_one_breakpoint): Adjust for kind.
6893 * mem-break.h (set_gdb_breakpoint): Likewise.
6894 (delete_gdb_breakpoint): Likewise.
6895 * server.c (process_serial_event): Likewise.
6896
6897 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6898
6899 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
6900 (struct linux_target_ops) <breakpoint>: Remove.
6901 (struct linux_target_ops) <breakpoint_len>: Remove.
6902 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6903 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6904 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
6905 (arm_sw_breakpoint_from_kind): New function.
6906 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
6907 (struct linux_target_ops) <breakpoint>: Remove.
6908 (struct linux_target_ops) <breakpoint_len>: Remove.
6909 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6910 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6911 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
6912 (struct linux_target_ops) <breakpoint>: Remove.
6913 (struct linux_target_ops) <breakpoint_len>: Remove.
6914 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6915 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6916 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
6917 (struct linux_target_ops) <breakpoint>: Remove.
6918 (struct linux_target_ops) <breakpoint_len>: Remove.
6919 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6920 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6921 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
6922 and sw_breakpoint_from_kind to increment the pc.
6923 (linux_breakpoint_kind_from_pc): New function.
6924 (linux_sw_breakpoint_from_kind): New function.
6925 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
6926 (initialize_low): Call breakpoint_kind_from_pc and
6927 sw_breakpoint_from_kind to replace breakpoint_data/len.
6928 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
6929 New field.
6930 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
6931 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
6932 (struct linux_target_ops) <breakpoint>: Remove.
6933 (struct linux_target_ops) <breakpoint_len>: Remove.
6934 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6935 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6936 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
6937 (struct linux_target_ops) <breakpoint>: Remove.
6938 (struct linux_target_ops) <breakpoint_len>: Remove.
6939 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6940 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6941 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
6942 (struct linux_target_ops) <breakpoint>: Remove.
6943 (struct linux_target_ops) <breakpoint_len>: Remove.
6944 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6945 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6946 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
6947 (struct linux_target_ops) <breakpoint>: Remove.
6948 (struct linux_target_ops) <breakpoint_len>: Remove.
6949 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6950 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6951 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
6952 (struct linux_target_ops) <breakpoint>: Remove.
6953 (struct linux_target_ops) <breakpoint_len>: Remove.
6954 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6955 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6956 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
6957 (struct linux_target_ops) <breakpoint>: Remove.
6958 (struct linux_target_ops) <breakpoint_len>: Remove.
6959 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6960 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6961 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
6962 (struct linux_target_ops) <breakpoint>: Remove.
6963 (struct linux_target_ops) <breakpoint_len>: Remove.
6964 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6965 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6966 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
6967 (struct linux_target_ops) <breakpoint>: Remove.
6968 (struct linux_target_ops) <breakpoint_len>: Remove.
6969 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6970 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6971 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
6972 (struct linux_target_ops) <breakpoint>: Remove.
6973 (struct linux_target_ops) <breakpoint_len>: Remove.
6974 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6975 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6976 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
6977 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
6978 (struct linux_target_ops) <breakpoint>: Remove.
6979 (struct linux_target_ops) <breakpoint_len>: Remove.
6980 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6981 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6982 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
6983 (struct linux_target_ops) <breakpoint>: Remove.
6984 (struct linux_target_ops) <breakpoint_len>: Remove.
6985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
6986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
6987
6988 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
6989
6990 * linux-cris-low.c (cris_get_pc): Remove void arg.
6991
6992 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6993
6994 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
6995 variable name.
6996
6997 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
6998
6999 * inferiors.c (thread_pid_matches_callback): New function.
7000 (find_thread_process): New function.
7001 (remove_thread): Reset current_thread.
7002 (remove_process): Assert threads have been removed first.
7003
7004 2015-10-15 Yao Qi <yao.qi@linaro.org>
7005
7006 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7007 if it is 3.
7008 (aarch64_remove_point): Likewise.
7009 * regcache.c (regcache_register_size): New function.
7010
7011 2015-10-12 Yao Qi <yao.qi@linaro.org>
7012
7013 * linux-aarch64-low.c: Update all callers as emit_load_store
7014 is renamed to aarch64_emit_load_store.
7015
7016 2015-10-12 Yao Qi <yao.qi@linaro.org>
7017
7018 * linux-aarch64-low.c: Update all callers of function renaming
7019 from emit_insn to aarch64_emit_insn.
7020
7021 2015-10-12 Yao Qi <yao.qi@linaro.org>
7022
7023 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7024 arch/aarch64-insn.h.
7025 (struct aarch64_memory_operand): Likewise.
7026 (ENCODE): Likewise.
7027 (emit_insn): Move to arch/aarch64-insn.c.
7028 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7029 (emit_load_store): Move to arch/aarch64-insn.c.
7030 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7031 (can_encode_int32): Remove.
7032
7033 2015-10-12 Yao Qi <yao.qi@linaro.org>
7034
7035 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7036 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7037 (aarch64_relocate_instruction): Likewise.
7038 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7039 (struct aarch64_insn_visitor): Likewise.
7040
7041 2015-10-12 Yao Qi <yao.qi@linaro.org>
7042
7043 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7044 (struct aarch64_insn_visitor): New.
7045 (struct aarch64_insn_relocation_data): New.
7046 (aarch64_ftrace_insn_reloc_b): New function.
7047 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7048 (aarch64_ftrace_insn_reloc_cb): Likewise.
7049 (aarch64_ftrace_insn_reloc_tb): Likewise.
7050 (aarch64_ftrace_insn_reloc_adr): Likewise.
7051 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7052 (aarch64_ftrace_insn_reloc_others): Likewise.
7053 (visitor): New.
7054 (aarch64_relocate_instruction): Use visitor.
7055
7056 2015-10-12 Yao Qi <yao.qi@linaro.org>
7057
7058 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7059 int. Add argument buf.
7060 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7061 aarch64_relocate_instruction.
7062
7063 2015-10-12 Yao Qi <yao.qi@linaro.org>
7064
7065 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7066 argument insn. Remove local variable insn. Don't call
7067 target_read_uint32.
7068 (aarch64_install_fast_tracepoint_jump_pad): Call
7069 target_read_uint32.
7070
7071 2015-09-30 Yao Qi <yao.qi@linaro.org>
7072
7073 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7074 (emit_load_store_pair): Likewise.
7075
7076 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7077
7078 * dll.c (match_dll): Add cast(s).
7079 (unloaded_dll): Likewise.
7080 * linux-low.c (second_thread_of_pid_p): Likewise.
7081 (delete_lwp_callback): Likewise.
7082 (count_events_callback): Likewise.
7083 (select_event_lwp_callback): Likewise.
7084 (linux_set_resume_request): Likewise.
7085 * server.c (accumulate_file_name_length): Likewise.
7086 (emit_dll_description): Likewise.
7087 (handle_qxfer_threads_worker): Likewise.
7088 (visit_actioned_threads): Likewise.
7089 * thread-db.c (any_thread_of): Likewise.
7090 * tracepoint.c (same_process_p): Likewise.
7091 (match_blocktype): Likewise.
7092 (build_traceframe_info_xml): Likewise.
7093
7094 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7095
7096 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7097 assignment.
7098 (gdb_unparse_agent_expr): Likewise.
7099 * hostio.c (require_data): Likewise.
7100 (handle_pread): Likewise.
7101 * linux-low.c (disable_regset): Likewise.
7102 (fetch_register): Likewise.
7103 (store_register): Likewise.
7104 (get_dynamic): Likewise.
7105 (linux_qxfer_libraries_svr4): Likewise.
7106 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7107 (set_fast_tracepoint_jump): Likewise.
7108 (uninsert_fast_tracepoint_jumps_at): Likewise.
7109 (reinsert_fast_tracepoint_jumps_at): Likewise.
7110 (validate_inserted_breakpoint): Likewise.
7111 (clone_agent_expr): Likewise.
7112 * regcache.c (init_register_cache): Likewise.
7113 * remote-utils.c (putpkt_binary_1): Likewise.
7114 (decode_M_packet): Likewise.
7115 (decode_X_packet): Likewise.
7116 (look_up_one_symbol): Likewise.
7117 (relocate_instruction): Likewise.
7118 (monitor_output): Likewise.
7119 * server.c (handle_search_memory): Likewise.
7120 (handle_qxfer_exec_file): Likewise.
7121 (handle_qxfer_libraries): Likewise.
7122 (handle_qxfer): Likewise.
7123 (handle_query): Likewise.
7124 (handle_v_cont): Likewise.
7125 (handle_v_run): Likewise.
7126 (captured_main): Likewise.
7127 * target.c (write_inferior_memory): Likewise.
7128 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7129 * tracepoint.c (init_trace_buffer): Likewise.
7130 (add_tracepoint_action): Likewise.
7131 (add_traceframe): Likewise.
7132 (add_traceframe_block): Likewise.
7133 (cmd_qtdpsrc): Likewise.
7134 (cmd_qtdv): Likewise.
7135 (cmd_qtstatus): Likewise.
7136 (response_source): Likewise.
7137 (response_tsv): Likewise.
7138 (cmd_qtnotes): Likewise.
7139 (gdb_collect): Likewise.
7140 (initialize_tracepoint): Likewise.
7141
7142 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7143
7144 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7145 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7146 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7147 <NOP>: New.
7148 (enum aarch64_condition_codes): New enum.
7149 (w0): New static global.
7150 (fp): Likewise.
7151 (lr): Likewise.
7152 (struct aarch64_memory_operand) <type>: New
7153 MEMORY_OPERAND_POSTINDEX type.
7154 (postindex_memory_operand): New helper function.
7155 (emit_ret): New function.
7156 (emit_load_store_pair): New function, factored out of emit_stp
7157 with support for MEMORY_OPERAND_POSTINDEX.
7158 (emit_stp): Rewrite using emit_load_store_pair.
7159 (emit_ldp): New function.
7160 (emit_load_store): Likewise.
7161 (emit_ldr): Mention post-index instruction in comment.
7162 (emit_ldrh): New function.
7163 (emit_ldrb): New function.
7164 (emit_ldrsw): Mention post-index instruction in comment.
7165 (emit_str): Likewise.
7166 (emit_subs): New function.
7167 (emit_cmp): Likewise.
7168 (emit_and): Likewise.
7169 (emit_orr): Likewise.
7170 (emit_orn): Likewise.
7171 (emit_eor): Likewise.
7172 (emit_mvn): Likewise.
7173 (emit_lslv): Likewise.
7174 (emit_lsrv): Likewise.
7175 (emit_asrv): Likewise.
7176 (emit_mul): Likewise.
7177 (emit_sbfm): Likewise.
7178 (emit_sbfx): Likewise.
7179 (emit_ubfm): Likewise.
7180 (emit_ubfx): Likewise.
7181 (emit_csinc): Likewise.
7182 (emit_cset): Likewise.
7183 (emit_nop): Likewise.
7184 (emit_ops_insns): New helper function.
7185 (emit_pop): Likewise.
7186 (emit_push): Likewise.
7187 (aarch64_emit_prologue): New function.
7188 (aarch64_emit_epilogue): Likewise.
7189 (aarch64_emit_add): Likewise.
7190 (aarch64_emit_sub): Likewise.
7191 (aarch64_emit_mul): Likewise.
7192 (aarch64_emit_lsh): Likewise.
7193 (aarch64_emit_rsh_signed): Likewise.
7194 (aarch64_emit_rsh_unsigned): Likewise.
7195 (aarch64_emit_ext): Likewise.
7196 (aarch64_emit_log_not): Likewise.
7197 (aarch64_emit_bit_and): Likewise.
7198 (aarch64_emit_bit_or): Likewise.
7199 (aarch64_emit_bit_xor): Likewise.
7200 (aarch64_emit_bit_not): Likewise.
7201 (aarch64_emit_equal): Likewise.
7202 (aarch64_emit_less_signed): Likewise.
7203 (aarch64_emit_less_unsigned): Likewise.
7204 (aarch64_emit_ref): Likewise.
7205 (aarch64_emit_if_goto): Likewise.
7206 (aarch64_emit_goto): Likewise.
7207 (aarch64_write_goto_address): Likewise.
7208 (aarch64_emit_const): Likewise.
7209 (aarch64_emit_call): Likewise.
7210 (aarch64_emit_reg): Likewise.
7211 (aarch64_emit_pop): Likewise.
7212 (aarch64_emit_stack_flush): Likewise.
7213 (aarch64_emit_zero_ext): Likewise.
7214 (aarch64_emit_swap): Likewise.
7215 (aarch64_emit_stack_adjust): Likewise.
7216 (aarch64_emit_int_call_1): Likewise.
7217 (aarch64_emit_void_call_2): Likewise.
7218 (aarch64_emit_eq_goto): Likewise.
7219 (aarch64_emit_ne_goto): Likewise.
7220 (aarch64_emit_lt_goto): Likewise.
7221 (aarch64_emit_le_goto): Likewise.
7222 (aarch64_emit_gt_goto): Likewise.
7223 (aarch64_emit_ge_got): Likewise.
7224 (aarch64_emit_ops_impl): New static global variable.
7225 (aarch64_emit_ops): New target function, return
7226 &aarch64_emit_ops_impl.
7227 (struct linux_target_ops): Install it.
7228
7229 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7230
7231 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7232 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7233 aarch64-ipa.o.
7234 * linux-aarch64-ipa.c: New file.
7235 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7236 and endian.h.
7237 (aarch64_get_thread_area): New target method.
7238 (extract_signed_bitfield): New helper function.
7239 (aarch64_decode_ldr_literal): New function.
7240 (enum aarch64_opcodes): New enum.
7241 (struct aarch64_register): New struct.
7242 (struct aarch64_operand): New struct.
7243 (x0): New static global.
7244 (x1): Likewise.
7245 (x2): Likewise.
7246 (x3): Likewise.
7247 (x4): Likewise.
7248 (w2): Likewise.
7249 (ip0): Likewise.
7250 (sp): Likewise.
7251 (xzr): Likewise.
7252 (aarch64_register): New helper function.
7253 (register_operand): Likewise.
7254 (immediate_operand): Likewise.
7255 (struct aarch64_memory_operand): New struct.
7256 (offset_memory_operand): New helper function.
7257 (preindex_memory_operand): Likewise.
7258 (enum aarch64_system_control_registers): New enum.
7259 (ENCODE): New macro.
7260 (emit_insn): New helper function.
7261 (emit_b): New function.
7262 (emit_bcond): Likewise.
7263 (emit_cb): Likewise.
7264 (emit_tb): Likewise.
7265 (emit_blr): Likewise.
7266 (emit_stp): Likewise.
7267 (emit_ldp_q_offset): Likewise.
7268 (emit_stp_q_offset): Likewise.
7269 (emit_load_store): Likewise.
7270 (emit_ldr): Likewise.
7271 (emit_ldrsw): Likewise.
7272 (emit_str): Likewise.
7273 (emit_ldaxr): Likewise.
7274 (emit_stxr): Likewise.
7275 (emit_stlr): Likewise.
7276 (emit_data_processing_reg): Likewise.
7277 (emit_data_processing): Likewise.
7278 (emit_add): Likewise.
7279 (emit_sub): Likewise.
7280 (emit_mov): Likewise.
7281 (emit_movk): Likewise.
7282 (emit_mov_addr): Likewise.
7283 (emit_mrs): Likewise.
7284 (emit_msr): Likewise.
7285 (emit_sevl): Likewise.
7286 (emit_wfe): Likewise.
7287 (append_insns): Likewise.
7288 (can_encode_int32_in): New helper function.
7289 (aarch64_relocate_instruction): New function.
7290 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7291 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7292 (struct linux_target_ops): Install aarch64_get_thread_area,
7293 aarch64_install_fast_tracepoint_jump_pad and
7294 aarch64_get_min_fast_tracepoint_insn_len.
7295
7296 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7297
7298 * Makefile.in (aarch64-insn.o): New rule.
7299 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7300
7301 2015-09-21 Yao Qi <yao.qi@linaro.org>
7302
7303 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7304
7305 2015-09-21 Yao Qi <yao.qi@linaro.org>
7306
7307 * tracepoint.c (max_jump_pad_size): Remove.
7308
7309 2015-09-18 Yao Qi <yao.qi@linaro.org>
7310
7311 * linux-aarch64-low.c: Don't include sys/uio.h.
7312 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7313
7314 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7315
7316 * tracepoint.c (eval_result_type): Change prototype.
7317 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7318
7319 2015-09-15 Pedro Alves <palves@redhat.com>
7320
7321 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7322 Check whether to report exec events instead of checking whether
7323 multiprocess is enabled.
7324
7325 2015-09-15 Pedro Alves <palves@redhat.com>
7326
7327 PR remote/18965
7328 * remote-utils.c (prepare_resume_reply): Merge
7329 TARGET_WAITKIND_VFORK_DONE switch case with the
7330 TARGET_WAITKIND_FORKED case.
7331
7332 2015-09-15 Yao Qi <yao.qi@linaro.org>
7333
7334 * server.c (handle_query): Check string comparison using
7335 "else if" instead of "if".
7336
7337 2015-09-15 Yao Qi <yao.qi@linaro.org>
7338
7339 * server.c (vCont_supported): New global variable.
7340 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7341 matches. Append ";vContSupported+" to own_buf.
7342 (handle_v_requests): Append ";s;S" to own_buf if target supports
7343 hardware single step or vCont_supported is false.
7344 (capture_main): Set vCont_supported to zero.
7345
7346 2015-09-15 Yao Qi <yao.qi@linaro.org>
7347
7348 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7349 it to ...
7350 (linux_supports_hardware_single_step): ... New function.
7351 (linux_target_ops): Update.
7352 * lynx-low.c (lynx_target_ops): Set field
7353 supports_hardware_single_step to target_can_do_hardware_single_step.
7354 * nto-low.c (nto_target_ops): Likewise.
7355 * spu-low.c (spu_target_ops): Likewise.
7356 * win32-low.c (win32_target_ops): Likewise.
7357 * target.c (target_can_do_hardware_single_step): New function.
7358 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7359 Remove. <supports_hardware_single_step>: New field.
7360 (target_supports_conditional_breakpoints): Remove.
7361 (target_supports_hardware_single_step): New macro.
7362 (target_can_do_hardware_single_step): Declare.
7363 * server.c (handle_query): Use target_supports_hardware_single_step
7364 instead of target_supports_conditional_breakpoints.
7365
7366 2015-09-15 Yao Qi <yao.qi@linaro.org>
7367
7368 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7369 function.
7370 (struct linux_target_ops the_low_target): Install
7371 aarch64_linux_siginfo_fixup.
7372
7373 2015-09-11 Don Breazeal <donb@codesourcery.com>
7374 Luis Machado <lgustavo@codesourcery.com>
7375
7376 * linux-low.c (linux_mourn): Static declaration.
7377 (linux_arch_setup): Move in front of
7378 handle_extended_wait.
7379 (linux_arch_setup_thread): New function.
7380 (handle_extended_wait): Handle exec events. Call
7381 linux_arch_setup_thread. Make event_lwp argument a
7382 pointer-to-a-pointer.
7383 (check_zombie_leaders): Do not check stopped threads.
7384 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7385 (linux_low_filter_event): Add lwp and thread for exec'ing
7386 non-leader thread if leader thread has been deleted.
7387 Refactor code into linux_arch_setup_thread and call it.
7388 Pass child lwp pointer by reference to handle_extended_wait.
7389 (linux_wait_for_event_filtered): Update comment.
7390 (linux_wait_1): Prevent clobbering exec event status.
7391 (linux_supports_exec_events): New function.
7392 (linux_target_ops) <supports_exec_events>: Initialize new member.
7393 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7394 new member.
7395 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7396 * server.c (report_exec_events): New global variable.
7397 (handle_query): Handle qSupported query for exec-events feature.
7398 (captured_main): Initialize report_exec_events.
7399 * server.h (report_exec_events): Declare new global variable.
7400 * target.h (struct target_ops) <supports_exec_events>: New
7401 member.
7402 (target_supports_exec_events): New macro.
7403 * win32-low.c (win32_target_ops) <supports_exec_events>:
7404 Initialize new member.
7405
7406 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7407
7408 * linux-low.c (linux_low_enable_btrace): Remove.
7409 (linux_target_ops): Replace linux_low_enable_btrace with
7410 linux_enable_btrace.
7411
7412 2015-09-03 Yao Qi <yao.qi@linaro.org>
7413
7414 * linux-aarch64-low.c (aarch64_insert_point): Call
7415 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7416 returns true.
7417
7418 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7419
7420 * linux-low.c (check_stopped_by_breakpoint): Use
7421 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7422
7423 2015-08-27 Pedro Alves <palves@redhat.com>
7424
7425 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7426
7427 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7428
7429 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7430 the XNEW-family equivalent.
7431 (compile_bytecodes): Likewise.
7432 * dll.c (loaded_dll): Likewise.
7433 * event-loop.c (append_callback_event): Likewise.
7434 (create_file_handler): Likewise.
7435 (create_file_event): Likewise.
7436 * hostio.c (handle_open): Likewise.
7437 * inferiors.c (add_thread): Likewise.
7438 (add_process): Likewise.
7439 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7440 * linux-arm-low.c (arm_new_process): Likewise.
7441 (arm_new_thread): Likewise.
7442 * linux-low.c (add_to_pid_list): Likewise.
7443 (linux_add_process): Likewise.
7444 (handle_extended_wait): Likewise.
7445 (add_lwp): Likewise.
7446 (enqueue_one_deferred_signal): Likewise.
7447 (enqueue_pending_signal): Likewise.
7448 (linux_resume_one_lwp_throw): Likewise.
7449 (linux_resume_one_thread): Likewise.
7450 (linux_read_memory): Likewise.
7451 (linux_write_memory): Likewise.
7452 * linux-mips-low.c (mips_linux_new_process): Likewise.
7453 (mips_linux_new_thread): Likewise.
7454 (mips_add_watchpoint): Likewise.
7455 * linux-x86-low.c (initialize_low_arch): Likewise.
7456 * lynx-low.c (lynx_add_process): Likewise.
7457 * mem-break.c (set_raw_breakpoint_at): Likewise.
7458 (set_breakpoint): Likewise.
7459 (add_condition_to_breakpoint): Likewise.
7460 (add_commands_to_breakpoint): Likewise.
7461 (clone_agent_expr): Likewise.
7462 (clone_one_breakpoint): Likewise.
7463 * regcache.c (new_register_cache): Likewise.
7464 * remote-utils.c (look_up_one_symbol): Likewise.
7465 * server.c (queue_stop_reply): Likewise.
7466 (start_inferior): Likewise.
7467 (queue_stop_reply_callback): Likewise.
7468 (handle_target_event): Likewise.
7469 * spu-low.c (fetch_ppc_memory): Likewise.
7470 (store_ppc_memory): Likewise.
7471 * target.c (set_target_ops): Likewise.
7472 * thread-db.c (thread_db_load_search): Likewise.
7473 (try_thread_db_load_1): Likewise.
7474 * tracepoint.c (add_tracepoint): Likewise.
7475 (add_tracepoint_action): Likewise.
7476 (create_trace_state_variable): Likewise.
7477 (cmd_qtdpsrc): Likewise.
7478 (cmd_qtro): Likewise.
7479 (add_while_stepping_state): Likewise.
7480 * win32-low.c (child_add_thread): Likewise.
7481 (get_image_name): Likewise.
7482
7483 2015-08-25 Yao Qi <yao.qi@linaro.org>
7484
7485 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7486
7487 2015-08-25 Yao Qi <yao.qi@linaro.org>
7488
7489 * Makefile.in (aarch64-linux.o): New rule.
7490 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7491 srv_tgtobj.
7492 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7493 (aarch64_init_debug_reg_state): Make it extern.
7494 (aarch64_linux_prepare_to_resume): Remove.
7495
7496 2015-08-25 Yao Qi <yao.qi@linaro.org>
7497
7498 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7499 lwp_arch_private_info and ptid_of_lwp.
7500
7501 2015-08-25 Yao Qi <yao.qi@linaro.org>
7502
7503 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7504 Find proc_info by find_process_pid. All callers updated.
7505
7506 2015-08-25 Yao Qi <yao.qi@linaro.org>
7507
7508 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7509 Remove.
7510 (debug_reg_change_callback): Remove.
7511 (aarch64_notify_debug_reg_change): Remove.
7512
7513 2015-08-25 Yao Qi <yao.qi@linaro.org>
7514
7515 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7516 Call current_lwp_ptid.
7517
7518 2015-08-25 Yao Qi <yao.qi@linaro.org>
7519
7520 * linux-aarch64-low.c (debug_reg_change_callback): Use
7521 debug_printf.
7522
7523 2015-08-25 Yao Qi <yao.qi@linaro.org>
7524
7525 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7526
7527 2015-08-25 Yao Qi <yao.qi@linaro.org>
7528
7529 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7530
7531 2015-08-25 Yao Qi <yao.qi@linaro.org>
7532
7533 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7534 the code.
7535
7536 2015-08-25 Yao Qi <yao.qi@linaro.org>
7537
7538 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
7539 Remove.
7540 (debug_reg_change_callback): Remove argument entry and add argument
7541 lwp. Remove local variable thread. Don't print thread id in the
7542 debugging output. Don't check whether pid of thread equals to pid.
7543 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
7544 iterate_over_lwps instead find_inferior.
7545
7546 2015-08-24 Pedro Alves <palves@redhat.com>
7547
7548 * inferiors.c (get_first_process): New function.
7549 * inferiors.h (get_first_process): New declaration.
7550 * remote-utils.c (read_ptid): Default to the first process in the
7551 list, instead of to the current thread's process.
7552
7553 2015-08-24 Pedro Alves <palves@redhat.com>
7554
7555 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
7556 * event-loop.c: Likewise.
7557 * remote-utils.c: Likewise.
7558 * tracepoint.c: Likewise.
7559
7560 2015-08-24 Pedro Alves <palves@redhat.com>
7561
7562 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
7563 ptid_get_lwp.
7564
7565 2015-08-21 Pedro Alves <palves@redhat.com>
7566
7567 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
7568 instead of literal 1.
7569
7570 2015-08-21 Pedro Alves <palves@redhat.com>
7571
7572 * tdesc.c (default_description): Explicitly zero-initialize.
7573
7574 2015-08-21 Pedro Alves <palves@redhat.com>
7575
7576 PR gdb/18749
7577 * inferiors.c (remove_thread): Discard any pending stop reply for
7578 this thread.
7579 * server.c (remove_all_on_match_pid): Rename to ...
7580 (remove_all_on_match_ptid): ... this. Work with a filter ptid
7581 instead of a pid.
7582 (discard_queued_stop_replies): Change parameter to a ptid. Now
7583 extern.
7584 (handle_v_kill, kill_inferior_callback, captured_main)
7585 (process_serial_event): Adjust.
7586 * server.h (discard_queued_stop_replies): Declare.
7587
7588 2015-08-21 Pedro Alves <palves@redhat.com>
7589
7590 * linux-low.c (wait_for_sigstop): Always switch to no thread
7591 selected if the previously current thread dies.
7592 * lynx-low.c (lynx_request_interrupt): Use the first thread's
7593 process instead of the current thread's.
7594 * remote-utils.c (input_interrupt): Don't check if there's no
7595 current thread.
7596 * server.c (gdb_read_memory, gdb_write_memory): If setting the
7597 current thread to the general thread fails, error out.
7598 (handle_qxfer_auxv, handle_qxfer_libraries)
7599 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
7600 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
7601 (handle_query): Check if there's a thread selected instead of
7602 checking whether there's any thread in the thread list.
7603 (handle_qxfer_threads, handle_qxfer_btrace)
7604 (handle_qxfer_btrace_conf): Don't error out early if there's no
7605 thread in the thread list.
7606 (handle_v_cont, myresume): Don't set the current thread to the
7607 continue thread.
7608 (process_serial_event) <Hg handling>: Also set thread_id if the
7609 previous general thread is still alive.
7610 (process_serial_event) <g/G handling>: If setting the current
7611 thread to the general thread fails, error out.
7612 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
7613 thread's lwp instead of the current thread's.
7614 * target.c (set_desired_thread): If the desired thread was not
7615 found, leave the current thread pointing to NULL. Return an int
7616 (boolean) indicating success.
7617 * target.h (set_desired_thread): Change return type to int.
7618
7619 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
7620
7621 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
7622 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
7623 #includes.
7624 (ps_get_thread_area): New function.
7625
7626 2015-08-19 Gary Benson <gbenson@redhat.com>
7627
7628 * hostio.c (handle_pread): Do not attempt to read more data
7629 than hostio_reply_with_data can fit in a packet.
7630
7631 2015-08-18 Joel Brobecker <brobecker@adacore.com>
7632
7633 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
7634
7635 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
7636
7637 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
7638
7639 2015-08-06 Pedro Alves <palves@redhat.com>
7640
7641 * tracepoint.c (expr_eval_result): Now an int.
7642
7643 2015-08-06 Pedro Alves <palves@redhat.com>
7644
7645 * gdbthread.h (struct regcache): Forward declare.
7646 (struct thread_info) <regcache_data>: Now a struct regcache
7647 pointer.
7648 * inferiors.c (inferior_regcache_data)
7649 (set_inferior_regcache_data): Now work with struct regcache
7650 pointers.
7651 * inferiors.h (struct regcache): Forward declare.
7652 (inferior_regcache_data, set_inferior_regcache_data): Now work
7653 with struct regcache pointers.
7654 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
7655 (free_register_cache_thread): Remove struct regcache pointer
7656 casts.
7657
7658 2015-08-06 Pedro Alves <palves@redhat.com>
7659
7660 * server.c (captured_main): On error, print the exception message
7661 to stderr, and if run_once is set, throw a quit.
7662
7663 2015-08-06 Pedro Alves <palves@redhat.com>
7664
7665 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
7666 the current thread.
7667
7668 2015-08-06 Pedro Alves <palves@redhat.com>
7669
7670 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
7671 reading beyond the passed in buffer length.
7672
7673 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
7674
7675 * tracepoint.c (symbol_list) <required>: Remove.
7676
7677 2015-08-06 Pedro Alves <palves@redhat.com>
7678
7679 * linux-low.c (handle_extended_wait): Set the fork child's suspend
7680 count if stopping and suspending threads.
7681 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
7682 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
7683 (linux_detach): Complete an ongoing step-over.
7684 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
7685 throughout.
7686 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
7687 (linux_wait_1): If passing a signal to the inferior after
7688 finishing a step-over, unsuspend and re-resume all lwps. If we
7689 see a single-step event but the thread should be continuing, don't
7690 pass the trap to gdb.
7691 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
7692 internal_error instead of gdb_assert.
7693 (enqueue_pending_signal): New function.
7694 (check_ptrace_stopped_lwp_gone): Add debug output.
7695 (start_step_over): Use internal_error instead of gdb_assert.
7696 (complete_ongoing_step_over): New function.
7697 (linux_resume_one_thread): Don't resume a suspended thread.
7698 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
7699 it stepping.
7700
7701 2015-08-06 Pedro Alves <palves@redhat.com>
7702
7703 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
7704 (linux_thread_alive): Use lwp_is_marked_dead.
7705 (extended_event_reported): Delete.
7706 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
7707 instead of extended_event_reported.
7708 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
7709 as well.
7710 (lwp_is_marked_dead): New function.
7711 (lwp_running): Use lwp_is_marked_dead.
7712 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
7713 comment.
7714
7715 2015-08-06 Pedro Alves <palves@redhat.com>
7716
7717 * linux-low.c (linux_wait_1): Move fork event output out of the
7718 !report_to_gdb check. Pass event_child->waitstatus to
7719 target_waitstatus_to_string instead of ourstatus.
7720
7721 2015-08-04 Yao Qi <yao.qi@linaro.org>
7722
7723 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
7724 if current_thread is 32 bit.
7725
7726 2015-08-04 Yao Qi <yao.qi@linaro.org>
7727
7728 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
7729 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
7730 * server.c (extended_protocol): Remove "static".
7731 * server.h (extended_protocol): Declare it.
7732
7733 2015-08-04 Yao Qi <yao.qi@linaro.org>
7734
7735 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
7736 both aarch64 and aarch32.
7737 (aarch64_set_pc): Likewise.
7738
7739 2015-08-04 Yao Qi <yao.qi@linaro.org>
7740
7741 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
7742 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
7743 arm-with-neon.xml to srv_xmlfiles.
7744 * linux-aarch64-low.c: Include linux-aarch32-low.h.
7745 (is_64bit_tdesc): New function.
7746 (aarch64_linux_read_description): New function.
7747 (aarch64_arch_setup): Call aarch64_linux_read_description.
7748 (regs_info): Rename to regs_info_aarch64.
7749 (aarch64_regs_info): Return right regs_info.
7750 (initialize_low_arch): Call initialize_low_arch_aarch32.
7751
7752 2015-08-04 Yao Qi <yao.qi@linaro.org>
7753
7754 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
7755 * linux-aarch32-low.c: New file.
7756 * linux-aarch32-low.h: New file.
7757 * linux-arm-low.c (arm_fill_gregset): Move it to
7758 linux-aarch32-low.c.
7759 (arm_store_gregset): Likewise.
7760 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
7761 (arm_store_vfpregset): Call arm_store_vfpregset_num.
7762 (arm_arch_setup): Check if PTRACE_GETREGSET works.
7763 (regs_info): Rename to regs_info_arm.
7764 (arm_regs_info): Return regs_info_aarch32 if
7765 have_ptrace_getregset is 1 and target description is
7766 arm_with_neon or arm_with_vfpv3.
7767 (initialize_low_arch): Don't call init_registers_arm_with_neon.
7768 Call initialize_low_arch_aarch32 instead.
7769
7770 2015-08-04 Yao Qi <yao.qi@linaro.org>
7771
7772 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
7773 * linux-low.c: ... here.
7774 * linux-low.h (have_ptrace_getregset): Declare it.
7775
7776 2015-08-04 Pedro Alves <palves@redhat.com>
7777
7778 * thread-db.c (struct thread_db): Use new typedefs.
7779 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
7780 CHK calls.
7781 (disable_thread_event_reporting): Cast result of dlsym to
7782 destination function pointer type.
7783 (thread_db_mourn): Use td_ta_delete_ftype.
7784
7785 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
7786
7787 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
7788 arch variant.
7789 (CDX_BREAKPOINT): Define for R2.
7790 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
7791 (the_low_target): Add comments.
7792
7793 2015-07-30 Yao Qi <yao.qi@linaro.org>
7794
7795 * linux-arm-low.c (arm_hwcap): Remove it.
7796 (arm_read_description): New local variable arm_hwcap. Don't
7797 set arm_hwcap to zero.
7798
7799 2015-07-30 Yao Qi <yao.qi@linaro.org>
7800
7801 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
7802 Use regcache->tdesc instead.
7803 (arm_store_wmmxregset): Likewise.
7804 (arm_fill_vfpregset): Likewise.
7805 (arm_store_vfpregset): Likewise.
7806
7807 2015-07-30 Yao Qi <yao.qi@linaro.org>
7808
7809 * linux-arm-low.c: Include arch/arm.h.
7810 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
7811 (arm_store_gregset): Likewise.
7812
7813 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
7814
7815 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
7816 ptrace's 4th parameter.
7817
7818 2015-07-27 Yao Qi <yao.qi@linaro.org>
7819
7820 * configure.srv (case aarch64*-*-linux*): Don't set
7821 srv_linux_usrregs.
7822
7823 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
7824
7825 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
7826 sys/ptrace.h.
7827 * linux-arm-low.c: Likewise.
7828 * linux-cris-low.c: Likewise.
7829 * linux-crisv32-low.c: Likewise.
7830 * linux-low.c: Likewise.
7831 * linux-m68k-low.c: Likewise.
7832 * linux-mips-low.c: Likewise.
7833 * linux-nios2-low.c: Likewise.
7834 * linux-s390-low.c: Likewise.
7835 * linux-sparc-low.c: Likewise.
7836 * linux-tic6x-low.c: Likewise.
7837 * linux-tile-low.c: Likewise.
7838 * linux-x86-low.c: Likewise.
7839
7840 2015-07-24 Pedro Alves <palves@redhat.com>
7841
7842 * config.in: Regenerate.
7843 * configure: Regenerate.
7844
7845 2015-07-24 Pedro Alves <palves@redhat.com>
7846
7847 * acinclude.m4: Include ../ptrace.m4.
7848 * configure.ac: Call GDB_AC_PTRACE.
7849 * config.in, configure: Regenerate.
7850
7851 2015-07-24 Yao Qi <yao.qi@linaro.org>
7852
7853 * linux-low.c (linux_create_inferior): Remove setting to
7854 proc->priv->new_inferior.
7855 (linux_attach): Likewise.
7856 (linux_low_filter_event): Likewise.
7857 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
7858
7859 2015-07-24 Yao Qi <yao.qi@linaro.org>
7860
7861 * linux-low.c (linux_arch_setup): New function.
7862 (linux_low_filter_event): If proc->tdesc is NULL and
7863 proc->attached is true, call the_low_target.arch_setup.
7864 Otherwise, keep status pending, and return.
7865 (linux_resume_one_lwp_throw): Don't call get_pc if
7866 thread->while_stepping isn't NULL. Don't call
7867 get_thread_regcache if proc->tdesc is NULL.
7868 (need_step_over_p): Return 0 if proc->tdesc is NULL.
7869 (linux_target_ops): Install arch_setup.
7870 * server.c (start_inferior): Call the_target->arch_setup.
7871 * target.h (struct target_ops) <arch_setup>: New field.
7872 (target_arch_setup): New marco.
7873 * lynx-low.c (lynx_target_ops): Update.
7874 * nto-low.c (nto_target_ops): Update.
7875 * spu-low.c (spu_target_ops): Update.
7876 * win32-low.c (win32_target_ops): Update.
7877
7878 2015-07-24 Yao Qi <yao.qi@linaro.org>
7879
7880 * linux-low.c (linux_add_process): Don't set
7881 proc->priv->new_inferior.
7882 (linux_create_inferior): Set proc->priv->new_inferior to 1.
7883 (linux_attach): Likewise.
7884
7885 2015-07-24 Yao Qi <yao.qi@linaro.org>
7886
7887 * server.c (start_inferior): Code refactor.
7888
7889 2015-07-24 Yao Qi <yao.qi@linaro.org>
7890
7891 * server.c (process_serial_event): Set general_thread.
7892
7893 2015-07-21 Yao Qi <yao.qi@linaro.org>
7894
7895 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
7896 aarch64_linux_get_debug_reg_capacity.
7897
7898 2015-07-17 Yao Qi <yao.qi@linaro.org>
7899
7900 * Makefile.in (aarch64-linux-hw-point.o): New rule.
7901 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
7902 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
7903 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
7904 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
7905 (AARCH64_HWP_ALIGNMENT): Likewise.
7906 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
7907 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
7908 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
7909 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
7910 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
7911 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
7912 (struct aarch64_debug_reg_state): Likewise.
7913 (struct arch_lwp_info): Likewise.
7914 (aarch64_align_watchpoint): Likewise.
7915 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
7916 (aarch64_watchpoint_length): Likewise.
7917 (aarch64_point_encode_ctrl_reg): Likewise
7918 (aarch64_point_is_aligned): Likewise.
7919 (aarch64_align_watchpoint): Likewise.
7920 (aarch64_linux_set_debug_regs):
7921 (aarch64_dr_state_insert_one_point): Likewise.
7922 (aarch64_dr_state_remove_one_point): Likewise.
7923 (aarch64_handle_breakpoint): Likewise.
7924 (aarch64_handle_aligned_watchpoint): Likewise.
7925 (aarch64_handle_unaligned_watchpoint): Likewise.
7926 (aarch64_handle_watchpoint): Likewise.
7927
7928 2015-07-17 Yao Qi <yao.qi@linaro.org>
7929
7930 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
7931 and don't aarch64_get_debug_reg_state. All callers update.
7932 (aarch64_handle_aligned_watchpoint): Likewise.
7933 (aarch64_handle_unaligned_watchpoint): Likewise.
7934 (aarch64_handle_watchpoint): Likewise.
7935 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
7936 (aarch64_remove_point): Likewise.
7937
7938 2015-07-17 Yao Qi <yao.qi@linaro.org>
7939
7940 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
7941 debug_printf.
7942 (aarch64_handle_unaligned_watchpoint): Likewise.
7943
7944 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7945
7946 Revert the previous 3 commits:
7947 Move gdb_regex* to common/
7948 Move linux_find_memory_regions_full & co.
7949 gdbserver build-id attribute generator
7950
7951 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7952 Jan Kratochvil <jan.kratochvil@redhat.com>
7953
7954 gdbserver build-id attribute generator.
7955 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
7956 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
7957 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
7958 (find_phdr): New.
7959 (get_dynamic): Use find_pdhr to traverse program headers.
7960 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
7961 (compare_mapping_entry_range, struct find_memory_region_callback_data)
7962 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
7963 (get_hex_build_id): New.
7964 (linux_qxfer_libraries_svr4): Add optional build-id attribute
7965 to reply XML document.
7966
7967 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7968 Jan Kratochvil <jan.kratochvil@redhat.com>
7969
7970 * target.c: Include target/target-utils.h and fcntl.h.
7971 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
7972 (target_fileio_read_stralloc): New functions.
7973
7974 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7975
7976 * Makefile.in (OBS): Add gdb_regex.o.
7977 (gdb_regex.o): New.
7978 * config.in: Rebuilt.
7979 * configure: Rebuilt.
7980
7981 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
7982 Jan Kratochvil <jan.kratochvil@redhat.com>
7983
7984 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
7985 * Makefile.in (OBS): Add target-utils.o.
7986 (linux-maps.o, target-utils.o): New.
7987 * configure.srv (srv_linux_obj): Add linux-maps.o.
7988
7989 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
7990
7991 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
7992 function, return 1.
7993 (the_low_target): Install it.
7994
7995 2015-07-14 Pedro Alves <palves@redhat.com>
7996
7997 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
7998 Instead, ignore ECHILD, and throw an error for other errnos.
7999
8000 2015-07-10 Pedro Alves <palves@redhat.com>
8001
8002 * event-loop.c (struct callback_event) <data>: Change type to
8003 gdb_client_data instance instead of gdb_client_data pointer.
8004 (append_callback_event): Adjust.
8005
8006 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8007
8008 * linux-aarch64-low.c: Add comments for each linux_target_ops
8009 method. Remove comments already covered in target_ops and
8010 linux_target_ops definitions.
8011 (the_low_target): Add comments for each unimplemented method.
8012
8013 2015-07-09 Yao Qi <yao.qi@linaro.org>
8014
8015 * linux-aarch64-low.c (aarch64_regmap): Remove.
8016 (aarch64_usrregs_info): Remove.
8017 (regs_info): Set field usrregs to NULL.
8018
8019 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8020
8021 * linux-low.c: Include "rsp-low.h"
8022 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8023 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8024 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8025 (handle_btrace_enable_pt): New.
8026 (handle_btrace_general_set): Support "pt".
8027 (handle_btrace_conf_general_set): Support "pt:size".
8028
8029 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8030
8031 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8032 Z_PACKET_SW_BP.
8033
8034 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8035
8036 * linux-aarch64-low.c: Remove comment about endianness.
8037 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8038 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8039 memcmp.
8040
8041 2015-06-24 Gary Benson <gbenson@redhat.com>
8042
8043 * linux-i386-ipa.c (stdint.h): Do not include.
8044 * lynx-i386-low.c (stdint.h): Likewise.
8045 * lynx-ppc-low.c (stdint.h): Likewise.
8046 * mem-break.c (stdint.h): Likewise.
8047 * thread-db.c (stdint.h): Likewise.
8048 * tracepoint.c (stdint.h): Likewise.
8049 * win32-low.c (stdint.h): Likewise.
8050
8051 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8052
8053 * server.c (write_qxfer_response): Update call to
8054 remote_escape_output.
8055
8056 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8057 Jan Kratochvil <jan.kratochvil@redhat.com>
8058
8059 Merge multiple hex conversions.
8060 * gdbreplay.c (tohex): Rename to 'fromhex'.
8061 (logchar): Use fromhex.
8062
8063 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8064
8065 * server.c (handle_qxfer_libraries): Set `version' attribute for
8066 <library-list>.
8067
8068 2015-06-10 Gary Benson <gbenson@redhat.com>
8069
8070 * target.h (struct target_ops) <multifs_open>: New field.
8071 <multifs_unlink>: Likewise.
8072 <multifs_readlink>: Likewise.
8073 * linux-low.c (nat/linux-namespaces.h): New include.
8074 (linux_target_ops): Initialize the_target->multifs_open,
8075 the_target->multifs_unlink and the_target->multifs_readlink.
8076 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8077 * hostio.c (hostio_fs_pid): New static variable.
8078 (hostio_handle_new_gdb_connection): New function.
8079 (handle_setfs): Likewise.
8080 (handle_open): Use the_target->multifs_open as appropriate.
8081 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8082 (handle_readlink): Use the_target->multifs_readlink as
8083 appropriate.
8084 (handle_vFile): Handle vFile:setfs packets.
8085 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8086 after target_handle_new_gdb_connection.
8087
8088 2015-06-10 Gary Benson <gbenson@redhat.com>
8089
8090 * configure.ac (AC_CHECK_FUNCS): Add setns.
8091 * config.in: Regenerate.
8092 * configure: Likewise.
8093 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8094 (linux-namespaces.o): New rule.
8095 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8096
8097 2015-06-09 Gary Benson <gbenson@redhat.com>
8098
8099 * hostio.c (handle_open): Process mode argument with
8100 fileio_to_host_mode.
8101
8102 2015-06-01 Yao Qi <yao.qi@linaro.org>
8103
8104 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8105 * linux-x86-low.c: Likewise.
8106
8107 2015-05-28 Don Breazeal <donb@codesourcery.com>
8108
8109 * linux-low.c (handle_extended_wait): Initialize
8110 thread_info.last_resume_kind for new fork children.
8111
8112 2015-05-15 Pedro Alves <palves@redhat.com>
8113
8114 * target.h (target_handle_new_gdb_connection): Rewrite using if
8115 wrapped in do/while.
8116
8117 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8118
8119 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8120 * configure, config.in: Regenerate.
8121 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8122 Declare typedef.
8123
8124 2015-05-12 Don Breazeal <donb@codesourcery.com>
8125
8126 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8127 PTRACE_EVENT_VFORK_DONE.
8128 (linux_low_ptrace_options, extended_event_reported): Add vfork
8129 events.
8130 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8131 and "vforkdone" for RSP 'T' Stop Reply Packet.
8132 * server.h (report_vfork_events): Declare
8133 global variable.
8134
8135 2015-05-12 Don Breazeal <donb@codesourcery.com>
8136
8137 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8138 (the_low_target) <new_fork>: Initialize new member.
8139 * linux-arm-low.c (arm_new_fork): New function.
8140 (the_low_target) <new_fork>: Initialize new member.
8141 * linux-low.c (handle_extended_wait): Call new target function
8142 new_fork.
8143 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8144 * linux-mips-low.c (mips_add_watchpoint): New function
8145 extracted from mips_insert_point.
8146 (the_low_target) <new_fork>: Initialize new member.
8147 (mips_linux_new_fork): New function.
8148 (mips_insert_point): Call mips_add_watchpoint.
8149 * linux-x86-low.c (x86_linux_new_fork): New function.
8150 (the_low_target) <new_fork>: Initialize new member.
8151
8152 2015-05-12 Don Breazeal <donb@codesourcery.com>
8153
8154 * linux-low.c (handle_extended_wait): Implement return value,
8155 rename argument 'event_child' to 'event_lwp', handle
8156 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8157 (linux_low_ptrace_options): New function.
8158 (linux_low_filter_event): Call linux_low_ptrace_options,
8159 use different argument fo linux_enable_event_reporting,
8160 use return value from handle_extended_wait.
8161 (extended_event_reported): New function.
8162 (linux_wait_1): Call extended_event_reported and set
8163 status to report fork events.
8164 (linux_write_memory): Add pid to debug message.
8165 (reset_lwp_ptrace_options_callback): New function.
8166 (linux_handle_new_gdb_connection): New function.
8167 (linux_target_ops): Initialize new structure member.
8168 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8169 * lynx-low.c: Initialize new structure member.
8170 * remote-utils.c (prepare_resume_reply): Implement stop reason
8171 "fork" for "T" stop message.
8172 * server.c (handle_query): Call handle_new_gdb_connection.
8173 * server.h (report_fork_events): Declare global flag.
8174 * target.h (struct target_ops) <handle_new_gdb_connection>:
8175 New member.
8176 (target_handle_new_gdb_connection): New macro.
8177 * win32-low.c: Initialize new structure member.
8178
8179 2015-05-12 Don Breazeal <donb@codesourcery.com>
8180
8181 * mem-break.c (APPEND_TO_LIST): Define macro.
8182 (clone_agent_expr): New function.
8183 (clone_one_breakpoint): New function.
8184 (clone_all_breakpoints): New function.
8185 * mem-break.h: Declare new functions.
8186
8187 2015-05-12 Don Breazeal <donb@codesourcery.com>
8188
8189 * linux-low.c (linux_supports_fork_events): New function.
8190 (linux_supports_vfork_events): New function.
8191 (linux_target_ops): Initialize new structure members.
8192 (initialize_low): Call linux_check_ptrace_features.
8193 * lynx-low.c (lynx_target_ops): Initialize new structure
8194 members.
8195 * server.c (report_fork_events, report_vfork_events):
8196 New global flags.
8197 (handle_query): Add new features to qSupported packet and
8198 response.
8199 (captured_main): Initialize new global variables.
8200 * target.h (struct target_ops) <supports_fork_events>:
8201 New member.
8202 <supports_vfork_events>: New member.
8203 (target_supports_fork_events): New macro.
8204 (target_supports_vfork_events): New macro.
8205 * win32-low.c (win32_target_ops): Initialize new structure
8206 members.
8207
8208 2015-05-12 Gary Benson <gbenson@redhat.com>
8209
8210 * server.c (handle_qxfer_exec_file): Use current process
8211 if annex is empty.
8212
8213 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8214
8215 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8216 Remove HAVE_PTRACE_GETREGS conditionals.
8217 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8218 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8219
8220 2015-05-08 Yao Qi <yao.qi@linaro.org>
8221
8222 * linux-low.c (linux_supports_conditional_breakpoints): New
8223 function.
8224 (linux_target_ops): Install new target method.
8225 * lynx-low.c (lynx_target_ops): Install NULL hook for
8226 supports_conditional_breakpoints.
8227 * nto-low.c (nto_target_ops): Likewise.
8228 * spu-low.c (spu_target_ops): Likewise.
8229 * win32-low.c (win32_target_ops): Likewise.
8230 * server.c (handle_query): Check
8231 target_supports_conditional_breakpoints.
8232 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8233 New field.
8234 (target_supports_conditional_breakpoints): New macro.
8235
8236 2015-05-06 Pedro Alves <palves@redhat.com>
8237
8238 PR server/18081
8239 * server.c (start_inferior): If the process exits, mourn it.
8240
8241 2015-04-21 Gary Benson <gbenson@redhat.com>
8242
8243 * hostio.c (fileio_open_flags_to_host): Factored out to
8244 fileio_to_host_openflags in common/fileio.c. Single use
8245 updated.
8246
8247 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8248
8249 * linux-xtensa-low.c (xtensa_fill_gregset)
8250 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8251 XCHAL_HAVE_LOOP.
8252
8253 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8254
8255 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8256 (regs_info): Replace usrregs pointer with NULL.
8257
8258 2015-04-17 Gary Benson <gbenson@redhat.com>
8259
8260 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8261 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8262 * server.c (handle_qxfer_exec_file): New function.
8263 (qxfer_packets): Add exec-file entry.
8264 (handle_query): Report qXfer:exec-file:read as supported packet.
8265
8266 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8267
8268 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8269
8270 2015-04-09 Gary Benson <gbenson@redhat.com>
8271
8272 * hostio-errno.c (errno_to_fileio_error): Remove function.
8273 Update caller to use remote_fileio_to_fio_error.
8274
8275 2015-04-09 Yao Qi <yao.qi@linaro.org>
8276
8277 * linux-low.c (linux_insert_point): Call
8278 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8279 (linux_remove_point): Call remove_memory_breakpoint if type is
8280 raw_bkpt_type_sw.
8281 * linux-x86-low.c (x86_insert_point): Don't call
8282 insert_memory_breakpoint.
8283 (x86_remove_point): Don't call remove_memory_breakpoint.
8284
8285 2015-04-01 Pedro Alves <palves@redhat.com>
8286 Cleber Rosa <crosa@redhat.com>
8287
8288 * server.c (gdbserver_usage): Reorganize and extend the usage
8289 message.
8290
8291 2015-03-24 Pedro Alves <palves@redhat.com>
8292
8293 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8294 output. Also dump TRAP_TRACE.
8295 (linux_low_filter_event): In debug output, distinguish a
8296 resume_stop SIGSTOP from a delayed SIGSTOP.
8297
8298 2015-03-24 Gary Benson <gbenson@redhat.com>
8299
8300 * linux-x86-low.c (x86_linux_new_thread): Moved to
8301 nat/x86-linux.c.
8302 (x86_linux_prepare_to_resume): Likewise.
8303
8304 2015-03-24 Gary Benson <gbenson@redhat.com>
8305
8306 * Makefile.in (x86-linux-dregs.o): New rule.
8307 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8308 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8309 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8310 (x86_linux_dr_get): Likewise.
8311 (x86_linux_dr_set): Likewise.
8312 (update_debug_registers_callback): Likewise.
8313 (x86_linux_dr_set_addr): Likewise.
8314 (x86_linux_dr_get_addr): Likewise.
8315 (x86_linux_dr_set_control): Likewise.
8316 (x86_linux_dr_get_control): Likewise.
8317 (x86_linux_dr_get_status): Likewise.
8318 (x86_linux_update_debug_registers): Likewise.
8319
8320 2015-03-24 Gary Benson <gbenson@redhat.com>
8321
8322 * linux-x86-low.c (x86_linux_update_debug_registers):
8323 New function, factored out from...
8324 (x86_linux_prepare_to_resume): ...this.
8325
8326 2015-03-24 Gary Benson <gbenson@redhat.com>
8327
8328 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8329 (x86_linux_dr_set): Likewise.
8330 (update_debug_registers_callback): Likewise.
8331 (x86_linux_dr_set_addr): Likewise.
8332 (x86_linux_dr_get_addr): Likewise.
8333 (x86_linux_dr_set_control): Likewise.
8334 (x86_linux_dr_get_control): Likewise.
8335 (x86_linux_dr_get_status): Likewise.
8336 (x86_linux_prepare_to_resume): Likewise.
8337
8338 2015-03-24 Gary Benson <gbenson@redhat.com>
8339
8340 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8341 Use perror_with_name. Pass string through gettext.
8342 (x86_linux_dr_set): Likewise.
8343
8344 2015-03-24 Gary Benson <gbenson@redhat.com>
8345
8346 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8347 (x86_linux_dr_set_addr): ...this.
8348 (x86_dr_low_get_addr): Rename to...
8349 (x86_linux_dr_get_addr): ...this.
8350 (x86_dr_low_set_control): Rename to...
8351 (x86_linux_dr_set_control): ...this.
8352 (x86_dr_low_get_control): Rename to...
8353 (x86_linux_dr_get_control): ...this.
8354 (x86_dr_low_get_status): Rename to...
8355 (x86_linux_dr_get_status): ...this.
8356 (x86_dr_low): Update with new function names.
8357
8358 2015-03-24 Gary Benson <gbenson@redhat.com>
8359
8360 * Makefile.in (x86-linux.o): New rule.
8361 * configure.srv: Add x86-linux.o to relevant targets.
8362 * linux-low.c (lwp_set_arch_private_info): New function.
8363 (lwp_arch_private_info): Likewise.
8364 * linux-x86-low.c: Include nat/x86-linux.h.
8365 (arch_lwp_info): Removed structure.
8366 (update_debug_registers_callback):
8367 Use lwp_set_debug_registers_changed.
8368 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8369 and lwp_set_debug_registers_changed.
8370 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8371
8372 2015-03-24 Gary Benson <gbenson@redhat.com>
8373
8374 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8375 * linux-arm-low.c (arm_new_thread): Likewise.
8376 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8377 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8378 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8379 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8380
8381 2015-03-24 Gary Benson <gbenson@redhat.com>
8382
8383 * linux-low.c (ptid_of_lwp): New function.
8384 (lwp_is_stopped): Likewise.
8385 (lwp_stop_reason): Likewise.
8386 * linux-x86-low.c (update_debug_registers_callback):
8387 Use lwp_is_stopped.
8388 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8389 lwp_stop_reason.
8390
8391 2015-03-24 Gary Benson <gbenson@redhat.com>
8392
8393 * linux-low.h (linux_stop_lwp): Remove declaration.
8394
8395 2015-03-24 Gary Benson <gbenson@redhat.com>
8396
8397 * linux-low.h: Include nat/linux-nat.h.
8398 * linux-low.c (iterate_over_lwps_args): New structure.
8399 (iterate_over_lwps_filter): New function.
8400 (iterate_over_lwps): Likewise.
8401 * linux-x86-low.c (update_debug_registers_callback):
8402 Update signature to what iterate_over_lwps expects.
8403 Remove PID check that iterate_over_lwps now performs.
8404 (x86_dr_low_set_addr): Use iterate_over_lwps.
8405 (x86_dr_low_set_control): Likewise.
8406
8407 2015-03-24 Gary Benson <gbenson@redhat.com>
8408
8409 * linux-x86-low.c (x86_debug_reg_state): New function.
8410 (x86_linux_prepare_to_resume): Use the above.
8411
8412 2015-03-24 Gary Benson <gbenson@redhat.com>
8413
8414 * linux-low.c (current_lwp_ptid): New function.
8415 * linux-x86-low.c: Include nat/linux-nat.h.
8416 (x86_dr_low_get_addr): Use current_lwp_ptid.
8417 (x86_dr_low_get_control): Likewise.
8418 (x86_dr_low_get_status): Likewise.
8419
8420 2015-03-20 Pedro Alves <palves@redhat.com>
8421
8422 * tracepoint.c (cmd_qtstatus): Make "str" const.
8423
8424 2015-03-20 Pedro Alves <palves@redhat.com>
8425
8426 * server.c (handle_general_set): Make "req_str" const.
8427
8428 2015-03-19 Pedro Alves <palves@redhat.com>
8429
8430 * linux-low.c (linux_resume_one_lwp): Rename to ...
8431 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8432 instead call perror_with_name.
8433 (check_ptrace_stopped_lwp_gone): New function.
8434 (linux_resume_one_lwp): Reimplement as wrapper around
8435 linux_resume_one_lwp_throw that swallows errors if the LWP is
8436 gone.
8437
8438 2015-03-19 Pedro Alves <palves@redhat.com>
8439
8440 * linux-low.c (count_events_callback, select_event_lwp_callback):
8441 No longer check whether the thread has resume_stop as last resume
8442 kind.
8443
8444 2015-03-19 Pedro Alves <palves@redhat.com>
8445
8446 * linux-low.c (count_events_callback, select_event_lwp_callback):
8447 Use the lwp's status_pending_p field, not the thread's.
8448
8449 2015-03-19 Pedro Alves <palves@redhat.com>
8450
8451 * linux-low.c (select_event_lwp_callback): Update comments to
8452 no longer mention SIGTRAP.
8453
8454 2015-03-18 Gary Benson <gbenson@redhat.com>
8455
8456 * server.c (handle_query): Do not report vFile:fstat as supported.
8457
8458 2015-03-11 Gary Benson <gbenson@redhat.com>
8459
8460 * hostio.c (sys/types.h): New include.
8461 (sys/stat.h): Likewise.
8462 (common-remote-fileio.h): Likewise.
8463 (handle_fstat): New function.
8464 (handle_vFile): Handle vFile:fstat packets.
8465
8466 2015-03-11 Gary Benson <gbenson@redhat.com>
8467
8468 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8469 struct stat.st_blocks and struct stat.st_blksize.
8470 * configure: Regenerate.
8471 * config.in: Likewise.
8472 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8473 (OBS): Add common-remote-fileio.o.
8474 (common-remote-fileio.o): New rule.
8475
8476 2015-03-09 Pedro Alves <palves@redhat.com>
8477
8478 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8479 'struct sockaddr' pointer in 'accept' call.
8480
8481 2015-03-09 Pedro Alves <palves@redhat.com>
8482
8483 Revert:
8484 2015-03-07 Pedro Alves <palves@redhat.com>
8485 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8486 or <winsock2.h> here. Instead include "gdb_socket.h".
8487 (remote_open): Use union gdb_sockaddr_u.
8488 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8489 or <winsock2.h> here. Instead include "gdb_socket.h".
8490 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8491 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8492 or <sys/un.h>.
8493 (init_named_socket, gdb_agent_helper_thread): Use union
8494 gdb_sockaddr_u.
8495
8496 2015-03-07 Pedro Alves <palves@redhat.com>
8497
8498 * configure.ac (build_warnings): Move
8499 -Wdeclaration-after-statement to the C-specific set.
8500 * configure: Regenerate.
8501
8502 2015-03-07 Pedro Alves <palves@redhat.com>
8503
8504 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8505 or <winsock2.h> here. Instead include "gdb_socket.h".
8506 (remote_open): Use union gdb_sockaddr_u.
8507 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8508 or <winsock2.h> here. Instead include "gdb_socket.h".
8509 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8510 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8511 or <sys/un.h>.
8512 (init_named_socket, gdb_agent_helper_thread): Use union
8513 gdb_sockaddr_u.
8514
8515 2015-03-07 Pedro Alves <palves@redhat.com>
8516
8517 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8518 instead.
8519
8520 2015-03-06 Yao Qi <yao.qi@linaro.org>
8521
8522 * linux-aarch64-low.c (aarch64_insert_point): Use
8523 show_debug_regs as a boolean.
8524 (aarch64_remove_point): Likewise.
8525
8526 2015-03-05 Pedro Alves <palves@redhat.com>
8527
8528 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8529 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8530 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8531 * nto-low.c (nto_target_ops): Likewise.
8532 * spu-low.c (spu_target_ops): Likewise.
8533 * win32-low.c (win32_target_ops): Likewise.
8534
8535 2015-03-04 Pedro Alves <palves@redhat.com>
8536
8537 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
8538 Decide whether a breakpoint triggered based on the SIGTRAP's
8539 siginfo.si_code.
8540 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
8541 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
8542 (linux_low_filter_event): Check for breakpoints before checking
8543 watchpoints.
8544 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
8545 siginfo.si_code.
8546 (linux_stopped_by_sw_breakpoint)
8547 (linux_supports_stopped_by_sw_breakpoint)
8548 (linux_stopped_by_hw_breakpoint)
8549 (linux_supports_stopped_by_hw_breakpoint): New functions.
8550 (linux_target_ops): Install new target methods.
8551
8552 2015-03-04 Pedro Alves <palves@redhat.com>
8553
8554 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
8555 * server.c (swbreak_feature, hwbreak_feature): New globals.
8556 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
8557 (captured_main): Clear swbreak_feature and hwbreak_feature.
8558 * server.h (swbreak_feature, hwbreak_feature): Declare.
8559 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
8560 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
8561 supports_stopped_by_hw_breakpoint>: New fields.
8562 (target_supports_stopped_by_sw_breakpoint)
8563 (target_stopped_by_sw_breakpoint)
8564 (target_supports_stopped_by_hw_breakpoint)
8565 (target_stopped_by_hw_breakpoint): Declare.
8566
8567 2015-03-04 Pedro Alves <palves@redhat.com>
8568
8569 enum lwp_stop_reason -> enum target_stop_reason
8570 * linux-low.c (check_stopped_by_breakpoint): Adjust.
8571 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
8572 (linux_wait_1, stuck_in_jump_pad_callback)
8573 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
8574 (linux_stopped_by_watchpoint):
8575 * linux-low.h (enum lwp_stop_reason): Delete.
8576 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
8577 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8578
8579 2015-03-04 Yao Qi <yao.qi@linaro.org>
8580
8581 * Makefile.in (SFILES): Add linux-aarch64-low.c.
8582
8583 2015-03-03 Gary Benson <gbenson@redhat.com>
8584
8585 * hostio.c (handle_vFile): Fix prefix lengths.
8586
8587 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
8588
8589 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
8590 ptr_bits.
8591
8592 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
8593
8594 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
8595 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
8596 (clean): Add "rm -f" for above C files.
8597 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
8598 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
8599 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
8600 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
8601 * linux-s390-low.c (HWCAP_S390_VX): New macro.
8602 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
8603 (init_registers_s390x_vx_linux64)
8604 (init_registers_s390x_tevx_linux64)
8605 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
8606 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
8607 declarations.
8608 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
8609 (s390_store_vxrs_high): New functions.
8610 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
8611 NT_S390_VXRS_HIGH.
8612 (s390_arch_setup): Add logic for selecting one of the new target
8613 descriptions. Activate the new vector regsets if applicable.
8614 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
8615 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
8616 and init_registers_s390x_tevx_linux64.
8617
8618 2015-03-01 Pedro Alves <palves@redhat.com>
8619
8620 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
8621 parameter.
8622
8623 2015-02-27 Pedro Alves <palves@redhat.com>
8624
8625 * linux-x86-low.c (u_debugreg_offset): New function.
8626 (x86_linux_dr_get, x86_linux_dr_set): Use it.
8627
8628 2015-02-27 Pedro Alves <palves@redhat.com>
8629
8630 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
8631 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
8632 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
8633 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
8634 (ps_lsetfpregs, ps_getpid)
8635 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
8636 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
8637 (ps_lsetxregs, ps_plog): Declare.
8638
8639 2015-02-27 Pedro Alves <palves@redhat.com>
8640
8641 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
8642 IP_AGENT_EXPORT_FUNC.
8643 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
8644 IP_AGENT_EXPORT_FUNC.
8645 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
8646 (IP_AGENT_EXPORT): Delete.
8647 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8648 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8649 (gdb_trampoline_buffer_error, collecting, gdb_collect)
8650 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
8651 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
8652 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
8653 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
8654 (traceframe_read_count, traceframe_write_count)
8655 (traceframes_created, trace_state_variables, get_raw_reg)
8656 (get_trace_state_variable_value, set_trace_state_variable_value)
8657 (ust_loaded, helper_thread_id, cmd_buf): Use
8658 IPA_SYM_EXPORTED_NAME.
8659 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
8660 (tracepoints) Use IP_AGENT_EXPORT_VAR.
8661 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
8662 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8663 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
8664 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
8665 EXTERN_C_PUSH/EXTERN_C_POP.
8666 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
8667 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
8668 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8669 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
8670 (traceframe_write_count, traceframe_read_count)
8671 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
8672 (about_to_request_buffer_space, get_trace_state_variable_value)
8673 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
8674 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
8675 EXTERN_C_PUSH/EXTERN_C_POP.
8676 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
8677 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
8678 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
8679 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
8680 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8681 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
8682 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
8683 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
8684 Define.
8685 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
8686 (IP_AGENT_EXPORT_VAR_DECL): Define.
8687 (tracing): Declare.
8688 (gdb_agent_get_raw_reg): Declare.
8689
8690 2015-02-27 Tom Tromey <tromey@redhat.com>
8691 Pedro Alves <palves@redhat.com>
8692
8693 Rename symbols whose names are reserved C++ keywords throughout.
8694
8695 2015-02-27 Pedro Alves <palves@redhat.com>
8696
8697 * Makefile.in (COMPILER): New, get it from autoconf.
8698 (CXX): Get from autoconf instead.
8699 (COMPILE.pre): Use COMPILER.
8700 (CC-LD): Rename to ...
8701 (CC_LD): ... this. Use COMPILER.
8702 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
8703 (CXX_FOR_TARGET): Default to g++ instead of gcc.
8704 * acinclude.m4: Include build-with-cxx.m4.
8705 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
8706 Disable -Werror by default if building in C++ mode.
8707 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
8708 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
8709 the C++ compiler. Save/restore CXXFLAGS too.
8710 * configure: Regenerate.
8711
8712 2015-02-27 Pedro Alves <palves@redhat.com>
8713
8714 * acinclude.m4: Include libiberty.m4.
8715 * configure.ac: Call libiberty_INIT.
8716 * config.in, configure: Regenerate.
8717
8718 2015-02-26 Pedro Alves <palves@redhat.com>
8719
8720 * linux-low.c (linux_wait_1): When incrementing the PC past a
8721 program breakpoint always use the_low_target.breakpoint_len as
8722 increment, rather than the maximum between that and
8723 the_low_target.decr_pc_after_break.
8724
8725 2015-02-23 Pedro Alves <palves@redhat.com>
8726
8727 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
8728 thread was doing a step-over; always adjust the PC if
8729 we stepped over a permanent breakpoint.
8730 (linux_wait_1): If we stepped over breakpoint that was on top of a
8731 permanent breakpoint, manually advance the PC past it.
8732
8733 2015-02-23 Pedro Alves <palves@redhat.com>
8734
8735 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
8736 modes.
8737 (x86_fill_gregset, x86_store_gregset): Use it when handling
8738 $orig_eax.
8739
8740 2015-02-20 Pedro Alves <palves@redhat.com>
8741
8742 * thread-db.c: Include "nat/linux-procfs.h".
8743 (thread_db_init): Skip listing new threads if the kernel supports
8744 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
8745
8746 2015-02-20 Pedro Alves <palves@redhat.com>
8747
8748 * linux-low.c (status_pending_p_callback): Use ptid_match.
8749
8750 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
8751
8752 PR breakpoints/16812
8753 * linux-low.c (wstatus_maybe_breakpoint): Remove.
8754 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
8755 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
8756
8757 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
8758
8759 PR breakpoints/15956
8760 * tracepoint.c (cmd_qtinit): Add check for current_thread.
8761
8762 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8763
8764 * linux-low.c (linux_low_btrace_conf): Print size.
8765 * server.c (handle_btrace_conf_general_set): New.
8766 (hanle_general_set): Call handle_btrace_conf_general_set.
8767 (handle_query): Report Qbtrace-conf:bts:size as supported.
8768
8769 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8770
8771 * linux-low.c (linux_low_enable_btrace): Update parameters.
8772 (linux_low_btrace_conf): New.
8773 (linux_target_ops)<to_btrace_conf>: Initialize.
8774 * server.c (current_btrace_conf): New.
8775 (handle_btrace_enable): Rename to ...
8776 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
8777 to target_enable_btrace. Update comment. Update users.
8778 (handle_qxfer_btrace_conf): New.
8779 (qxfer_packets): Add btrace-conf entry.
8780 (handle_query): Report qXfer:btrace-conf:read as supported packet.
8781 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
8782 (target_ops)<read_btrace_conf>: New.
8783 (target_enable_btrace): Update parameters.
8784 (target_read_btrace_conf): New.
8785
8786 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8787
8788 * server.c (handle_btrace_general_set): Remove call to
8789 target_supports_btrace.
8790 (supported_btrace_packets): New.
8791 (handle_query): Call supported_btrace_packets.
8792 * target.h: include btrace-common.h.
8793 (btrace_target_info): Removed.
8794 (supports_btrace, target_supports_btrace): Update parameters.
8795
8796 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
8797
8798 * Makefile.in (SFILES): Add common/btrace-common.c.
8799 (OBS): Add common/btrace-common.o.
8800 (btrace-common.o): Add build rules.
8801 * linux-low: Include btrace-common.h.
8802 (linux_low_read_btrace): Use struct btrace_data. Call
8803 btrace_data_init and btrace_data_fini.
8804
8805 2015-02-06 Pedro Alves <palves@redhat.com>
8806
8807 * thread-db.c (find_new_threads_callback): Add debug output.
8808
8809 2015-02-04 Pedro Alves <palves@redhat.com>
8810
8811 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
8812 (resume_stopped_resumed_lwps): New function.
8813 (linux_wait_for_event_filtered): Use it.
8814
8815 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8816
8817 * Makefile.in (SFILES): Add linux-personality.c.
8818 (linux-personality.o): New rule.
8819 * configure.srv (srv_linux_obj): Add linux-personality.o to the
8820 list of objects to be built.
8821 * linux-low.c: Include nat/linux-personality.h.
8822 (linux_create_inferior): Remove code to disable address space
8823 randomization (moved to ../nat/linux-personality.c). Create
8824 cleanup to disable address space randomization.
8825
8826 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
8827
8828 * Makefile.in (posix-strerror.o): New rule.
8829 (mingw-strerror.o): Likewise.
8830 * configure: Regenerated.
8831 * configure.ac: Source file ../common/common.host. Initialize new
8832 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
8833
8834 2015-01-14 Yao Qi <yao@codesourcery.com>
8835
8836 * Makefile.in (SFILES): Add nat/ppc-linux.c.
8837 (ppc-linux.o): New rule.
8838 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
8839 * configure.ac: AC_CHECK_FUNCS(getauxval).
8840 * config.in: Re-generated.
8841 * configure: Re-generated.
8842 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
8843 ppc64_64bit_inferior_p
8844
8845 2015-01-14 Yao Qi <yao@codesourcery.com>
8846
8847 * linux-ppc-low.c: Include "nat/ppc-linux.h".
8848 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
8849 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
8850 (PT_ORIG_R3, PT_TRAP): Likewise.
8851 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
8852 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
8853 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
8854
8855 2015-01-10 Joel Brobecker <brobecker@adacore.com>
8856
8857 * i387-fp.c (i387_cache_to_xsave): In look over
8858 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
8859 zmmh_low_space field by use of zmmh_high_space.
8860
8861 2015-01-09 Pedro Alves <palves@redhat.com>
8862
8863 * linux-low.c (step_over_bkpt): Move higher up in the file.
8864 (handle_extended_wait): Don't store the stop_pc here.
8865 (get_stop_pc): Adjust comments and rename to ...
8866 (check_stopped_by_breakpoint): ... this. Record whether the LWP
8867 stopped for a software breakpoint or hardware breakpoint.
8868 (thread_still_has_status_pending_p): New function.
8869 (status_pending_p_callback): Use
8870 thread_still_has_status_pending_p. If the event is no longer
8871 interesting, resume the LWP.
8872 (handle_tracepoints): Add assert.
8873 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
8874 (wstatus_maybe_breakpoint): New function.
8875 (cancel_breakpoint): Delete function.
8876 (check_stopped_by_watchpoint): New function, factored out from
8877 linux_low_filter_event.
8878 (lp_status_maybe_breakpoint): Delete function.
8879 (linux_low_filter_event): Remove filter_ptid argument.
8880 Leave thread group exits pending here. Store the LWP's stop PC.
8881 Always leave events pending.
8882 (linux_wait_for_event_filtered): Pull all events out of the
8883 kernel, and leave them all pending.
8884 (count_events_callback, select_event_lwp_callback): Consider all
8885 events.
8886 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
8887 (select_event_lwp): Only give preference to the stepping LWP in
8888 all-stop mode. Adjust comments.
8889 (ignore_event): New function.
8890 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
8891 references to cancel_breakpoints. Adjust to renames. Also give
8892 equal priority to all LWPs that have had events in non-stop mode.
8893 If reporting a software breakpoint event, unadjust the LWP's PC.
8894 (linux_wait): If linux_wait_1 returned an ignored event, retry.
8895 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
8896 Adjust.
8897 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
8898 (resume_status_pending_p): Use thread_still_has_status_pending_p.
8899 (linux_stopped_by_watchpoint): Adjust.
8900 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
8901 * linux-low.h (enum lwp_stop_reason): New.
8902 (struct lwp_info) <stop_pc>: Adjust comment.
8903 <stopped_by_watchpoint>: Delete field.
8904 <stop_reason>: New field.
8905 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
8906 * mem-break.c (software_breakpoint_inserted_here)
8907 (hardware_breakpoint_inserted_here): New function.
8908 * mem-break.h (software_breakpoint_inserted_here)
8909 (hardware_breakpoint_inserted_here): Declare.
8910 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
8911 (cancel_breakpoints): Delete.
8912 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
8913 (upload_fast_traceframes): Remove references to
8914 cancel_breakpoints.
8915
8916 2015-01-09 Pedro Alves <palves@redhat.com>
8917
8918 * thread-db.c (find_new_threads_callback): Ignore thread if the
8919 kernel thread ID is -1.
8920
8921 2015-01-09 Pedro Alves <palves@redhat.com>
8922
8923 * linux-low.c (linux_attach_fail_reason_string): Move to
8924 nat/linux-ptrace.c, and rename.
8925 (linux_attach_lwp): Update comment.
8926 (attach_proc_task_lwp_callback): New function.
8927 (linux_attach): Adjust to rename and use
8928 linux_proc_attach_tgid_threads.
8929 (linux_attach_fail_reason_string): Delete declaration.
8930
8931 2015-01-01 Joel Brobecker <brobecker@adacore.com>
8932
8933 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
8934 * server.c (gdbserver_version): Likewise.
8935
8936 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
8937
8938 * remote-utils.c: Include ctype.h.
8939 (input_interrupt): Explicitly handle the case when the char
8940 received is the NUL byte. Improve the printing of non-ASCII
8941 characters.
8942
8943 2014-12-16 Joel Brobecker <brobecker@adacore.com>
8944
8945 * linux-low.c (linux_low_filter_event): Update call to
8946 linux_enable_event_reporting following the addition of
8947 a new parameter to that function.
8948
8949 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
8950
8951 PR server/17457
8952 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
8953 (AARCH64_FPCR_REGNO): Likewise.
8954 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
8955 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
8956 (aarch64_store_fpregset): Likewise.
8957
8958 2014-12-15 Joel Brobecker <brobecker@adacore.com>
8959
8960 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
8961 Remove FIXME comment about assumption about N.
8962
8963 2014-12-13 Joel Brobecker <brobecker@adacore.com>
8964
8965 * configure.ac: If large-file support is disabled in GDBserver,
8966 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
8967 * configure: Regenerate.
8968
8969 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8970
8971 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
8972 warning upon ENODATA from ptrace.
8973 * linux-s390-low.c (s390_store_tdb): New.
8974 (s390_regsets): Add regset for NT_S390_TDB.
8975
8976 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8977
8978 * linux-low.c (regsets_store_inferior_registers): Skip regsets
8979 without a fill_function.
8980 * linux-s390-low.c (s390_fill_last_break): Remove.
8981 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
8982 (s390_arch_setup): Use regset's size instead of fill_function for
8983 loop end condition.
8984
8985 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8986
8987 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
8988 the regset's store function when ptrace returned an error.
8989 * regcache.c (get_thread_regcache): Invalidate register cache
8990 before fetching inferior's registers.
8991
8992 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
8993
8994 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
8995 while-loop as for-loop.
8996 (regsets_store_inferior_registers): Likewise.
8997
8998 2014-11-28 Yao Qi <yao@codesourcery.com>
8999
9000 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9001 * config.in, configure: Re-generate.
9002 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9003 is defined.
9004
9005 2014-11-21 Yao Qi <yao@codesourcery.com>
9006
9007 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9008 (AC_CHECK_HEADERS): Remove malloc.h.
9009 * configure: Re-generated.
9010 * config.in: Re-generated.
9011 * server.h: Don't include alloca.h and malloc.h.
9012 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9013 Don't include malloc.h.
9014
9015 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9016
9017 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9018 corresponding ERRNO check in same block.
9019
9020 2014-11-12 Pedro Alves <palves@redhat.com>
9021
9022 * server.c (cont_thread): Update comment.
9023 (start_inferior, attach_inferior): No longer clear cont_thread.
9024 (handle_v_cont): No longer set cont_thread.
9025 (captured_main): Clear cont_thread each time a GDB connects.
9026
9027 2014-11-12 Pedro Alves <palves@redhat.com>
9028
9029 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9030 thread, and don't resume all threads if the Hc thread has exited.
9031
9032 2014-11-12 Pedro Alves <palves@redhat.com>
9033
9034 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9035 the process group instead of to a specific LWP.
9036
9037 2014-10-15 Pedro Alves <palves@redhat.com>
9038
9039 PR server/17487
9040 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9041 parameter.
9042 (arm_set_thread_context): Delete.
9043 (the_low_target): Adjust.
9044 * win32-i386-low.c (debug_registers_changed)
9045 (debug_registers_used): Delete.
9046 (update_debug_registers_callback): New function.
9047 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9048 needing to update their debug registers.
9049 (win32_get_current_dr): New function.
9050 (x86_dr_low_get_addr, x86_dr_low_get_control)
9051 (x86_dr_low_get_status): Fetch the debug register from the thread
9052 record's context.
9053 (i386_initial_stuff): Adjust.
9054 (i386_get_thread_context): Remove current_event parameter. Don't
9055 clear debug_registers_changed nor copy DR values to
9056 debug_reg_state.
9057 (i386_set_thread_context): Delete.
9058 (i386_prepare_to_resume): New function.
9059 (i386_thread_added): Mark the thread as needing to update irs
9060 debug registers.
9061 (the_low_target): Remove i386_set_thread_context and install
9062 i386_prepare_to_resume.
9063 * win32-low.c (win32_get_thread_context): Adjust.
9064 (win32_set_thread_context): Use SetThreadContext
9065 directly.
9066 (win32_prepare_to_resume): New function.
9067 (win32_require_context): New function, factored out from ...
9068 (thread_rec): ... this.
9069 (continue_one_thread): Call win32_prepare_to_resume on each thread
9070 we're about to continue.
9071 (win32_resume): Call win32_prepare_to_resume on the event thread.
9072 * win32-low.h (struct win32_thread_info)
9073 <debug_registers_changed>: New field.
9074 (struct win32_target_ops): Change prototype of set_thread_context,
9075 delete set_thread_context and add prepare_to_resume.
9076 (win32_require_context): New declaration.
9077
9078 2014-10-08 Gary Benson <gbenson@redhat.com>
9079
9080 * server.h: Do not include common-exceptions.h.
9081
9082 2014-10-08 Gary Benson <gbenson@redhat.com>
9083
9084 * server.h: Do not include cleanups.h.
9085
9086 2014-09-30 James Hogan <james.hogan@imgtec.com>
9087
9088 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9089 mips64-dsp-linux.c.
9090
9091 2014-09-23 Yao Qi <yao@codesourcery.com>
9092
9093 * linux-low.c (lp_status_maybe_breakpoint): New function.
9094 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9095 (count_events_callback): Likewise.
9096 (select_event_lwp_callback): Likewise.
9097 (cancel_breakpoints_callback): Likewise.
9098
9099 2014-09-19 Don Breazeal <donb@codesourcery.com>
9100
9101 * linux-low.c (handle_extended_wait): Call
9102 linux_ptrace_get_extended_event.
9103 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9104 linux_is_extended_waitstatus.
9105
9106 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9107
9108 * Makefile.in (CPPFLAGS): Define.
9109 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9110 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9111
9112 2014-09-16 Gary Benson <gbenson@redhat.com>
9113
9114 * inferiors.h (current_inferior): Renamed as...
9115 (current_thread): New variable. All uses updated.
9116 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9117 (maybe_move_out_of_jump_pad): Likewise.
9118 (cancel_breakpoint): Likewise.
9119 (linux_low_filter_event): Likewise.
9120 (wait_for_sigstop): Likewise.
9121 (linux_resume_one_lwp): Likewise.
9122 (need_step_over_p): Likewise.
9123 (start_step_over): Likewise.
9124 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9125 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9126 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9127 and save_inferior as saved_thread.
9128 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9129 saved_thread.
9130 (regcache_invalidate_thread): Likewise.
9131 * remote-utils.c (prepare_resume_reply): Likewise.
9132 * thread-db.c (thread_db_get_tls_address): Likewise.
9133 (disable_thread_event_reporting): Likewise.
9134 (remove_thread_event_breakpoints): Likewise.
9135 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9136 as saved_thread.
9137 * target.h (set_desired_inferior): Renamed as...
9138 (set_desired_thread): New declaration. All uses updated.
9139 * server.c (myresume): Updated comment to reference thread instead
9140 of inferior.
9141 (handle_serial_event): Likewise.
9142 (handle_target_event): Likewise.
9143
9144 2014-09-12 Tom Tromey <tromey@redhat.com>
9145 Gary Benson <gbenson@redhat.com>
9146
9147 * regcache.h: Include common-regcache.h.
9148 (regcache_read_pc): Don't declare.
9149 * regcache.c (get_thread_regcache_for_ptid): New function.
9150
9151 2014-09-11 Tom Tromey <tromey@redhat.com>
9152 Gary Benson <gbenson@redhat.com>
9153
9154 * symbol.c: New file.
9155 * Makefile.in (SFILES): Add symbol.c.
9156 (OBS): Add symbol.o.
9157
9158 2014-09-11 Gary Benson <gbenson@redhat.com>
9159
9160 * target.c (target_stop_ptid, target_continue_ptid): New
9161 functions.
9162
9163 2014-09-11 Tom Tromey <tromey@redhat.com>
9164 Gary Benson <gbenson@redhat.com>
9165
9166 * target.h: Include target/target.h.
9167 * target.c (target_read_memory, target_read_uint32)
9168 (target_write_memory): New functions.
9169
9170 2014-09-11 Gary Benson <gbenson@redhat.com>
9171
9172 * server.h (debug_hw_points): Don't declare.
9173 * server.c (debug_hw_points): Don't define. Replace all uses
9174 with show_debug_regs.
9175 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9176 all uses with show_debug_regs.
9177
9178 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9179
9180 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9181 endianness into account.
9182 (ppc_supply_ptrace_register): Likewise.
9183
9184 2014-09-03 James Hogan <james.hogan@imgtec.com>
9185
9186 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9187 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9188
9189 2014-09-03 Gary Benson <gbenson@redhat.com>
9190
9191 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9192 ALL_DEBUG_ADDRESS_REGISTERS.
9193
9194 2014-09-02 Gary Benson <gbenson@redhat.com>
9195
9196 * i386-low.h: Renamed as...
9197 * x86-low.h: New file. All type, function and variable name
9198 prefixes changed from "i386_" to "x86_". All references updated.
9199 * i386-low.c: Renamed as...
9200 * x86-low.c: New file. All type, function and variable name
9201 prefixes changed from "i386_" to "x86_". All references updated.
9202
9203 2014-09-02 Gary Benson <gbenson@redhat.com>
9204
9205 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9206 (x86_linux_new_thread): Likewise.
9207
9208 2014-08-29 Gary Benson <gbenson@redhat.com>
9209
9210 * server.h (setjmp.h): Do not include.
9211 (toplevel): Do not declare.
9212 (common-exceptions.h): Include.
9213 (cleanups.h): Likewise.
9214 * server.c (toplevel): Do not define.
9215 (exit_code): New static global.
9216 (detach_or_kill_for_exit_cleanup): New function.
9217 (main): New function. Original main renamed to...
9218 (captured_main): New function.
9219 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9220
9221 2014-08-29 Gary Benson <gbenson@redhat.com>
9222
9223 * Makefile.in (SFILES): Add common/common-exceptions.c.
9224 (OBS): Add common-exceptions.o.
9225 (common-exceptions.o): New rule.
9226 * utils.c (prepare_to_throw_exception): New function.
9227
9228 2014-08-29 Gary Benson <gbenson@redhat.com>
9229
9230 * config.in: Regenerate.
9231 * configure: Likewise.
9232
9233 2014-08-29 Gary Benson <gbenson@redhat.com>
9234
9235 * Makefile.in (SFILES): Add common/cleanups.c.
9236 (OBS): cleanups.o.
9237 (cleanups.o): New rule.
9238
9239 2014-08-29 Gary Benson <gbenson@redhat.com>
9240
9241 * utils.c (internal_vwarning): New function.
9242
9243 2014-08-28 Gary Benson <gbenson@redhat.com>
9244
9245 * utils.h (fatal): Remove declaration.
9246 * utils.c (fatal): Remove function.
9247
9248 2014-08-28 Gary Benson <gbenson@redhat.com>
9249
9250 * tracepoint.c (gdb_agent_init): Replace fatal with
9251 perror_with_name.
9252 (initialize_tracepoint): Likewise.
9253
9254 2014-08-28 Gary Benson <gbenson@redhat.com>
9255
9256 * remote-utils.c (remote_prepare): Replace fatal with error.
9257
9258 2014-08-28 Gary Benson <gbenson@redhat.com>
9259
9260 * linux-low.c (linux_async): Replace fatal with warning.
9261 Tidy up and return.
9262 (linux_start_non_stop): Return -1 if linux_async failed.
9263
9264 2014-08-28 Gary Benson <gbenson@redhat.com>
9265
9266 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9267 gdb_assert.
9268 (i386_dr_low_get_addr): Remove vague comment.
9269 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9270 gdb_assert.
9271
9272 2014-08-28 Gary Benson <gbenson@redhat.com>
9273
9274 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9275 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9276 internal_error.
9277 (linux_resume_one_lwp): Likewise.
9278 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9279 gdb_assert.
9280 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9281 with internal_error.
9282 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9283 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9284 (find_register_by_name): Replace fatal with internal_error.
9285 (find_regno): Likewise.
9286 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9287 * thread-db.c (thread_db_create_event): Likewise.
9288 (thread_db_load_search): Likewise.
9289 (try_thread_db_load_1): Likewise.
9290 * tracepoint.c (get_jump_space_head): Replace fatal with
9291 internal_error.
9292 (claim_trampoline_space): Likewise.
9293 (have_fast_tracepoint_trampoline_buffer): Likewise.
9294 (cmd_qtstart): Likewise.
9295 (stop_tracing): Likewise.
9296 (fast_tracepoint_collecting): Likewise.
9297 (target_malloc): Likewise.
9298 (download_tracepoint): Likewise.
9299 (download_trace_state_variables): Replace check with gdb_assert.
9300 (upload_fast_traceframes): Replace fatal with internal_error.
9301
9302 2014-08-19 Tom Tromey <tromey@redhat.com>
9303 Gary Benson <gbenson@redhat.com>
9304
9305 * Makefile.in (SFILES): Add common/common-debug.c.
9306 (OBS): Add common-debug.o.
9307 (common-debug.o): New rule.
9308 * debug.h (debug_printf): Don't declare.
9309 * debug.c (debug_printf): Renamed and rewritten as...
9310 (debug_vprintf): New function.
9311
9312 2014-08-19 Gary Benson <gbenson@redhat.com>
9313
9314 * utils.h: Do not include print-utils.h.
9315
9316 2014-08-19 Tom Tromey <tromey@redhat.com>
9317 Gary Benson <gbenson@redhat.com>
9318
9319 * server.h: Add static assertion.
9320 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9321
9322 2014-08-19 Tom Tromey <tromey@redhat.com>
9323 Gary Benson <gbenson@redhat.com>
9324
9325 * Makefile.in (SFILES): Add common/errors.c.
9326 (OBS): Add errors.o.
9327 (IPA_OBS): Add errors-ipa.o.
9328 (errors.o): New rule.
9329 (errors-ipa.o): Likewise.
9330 * utils.h (perror_with_name, error, warning): Don't declare.
9331 * utils.c (warning): Renamed and rewritten as...
9332 (vwarning): New function.
9333 (error): Renamed and rewritten as...
9334 (verror): New function.
9335 (internal_error): Renamed and rewritten as...
9336 (internal_verror): New function.
9337
9338 2014-08-07 Gary Benson <gbenson@redhat.com>
9339
9340 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9341 * configure: Regenerate.
9342 * config.in: Likewise.
9343 * server.h: Do not include errno.h.
9344 * event-loop.c: Likewise.
9345 * hostio-errno.c: Likewise.
9346 * linux-low.c: Likewise.
9347 * remote-utils.c: Likewise.
9348 * spu-low.c: Likewise.
9349 * utils.c: Likewise.
9350 * gdbreplay.c: Unconditionally include errno.h.
9351
9352 2014-08-07 Gary Benson <gbenson@redhat.com>
9353
9354 * server.h: Do not include string.h.
9355 * event-loop.c: Likewise.
9356 * linux-low.c: Likewise.
9357 * regcache.c: Likewise.
9358 * remote-utils.c: Likewise.
9359 * spu-low.c: Likewise.
9360 * utils.c: Likewise.
9361
9362 2014-08-07 Gary Benson <gbenson@redhat.com>
9363
9364 * server.h: Do not include gdb_assert.h.
9365
9366 2014-08-07 Gary Benson <gbenson@redhat.com>
9367
9368 * server.h: Do not include common-utils.h.
9369
9370 2014-08-07 Gary Benson <gbenson@redhat.com>
9371
9372 * server.h: Do not include ptid.h.
9373 * notif.h: Likewise.
9374
9375 2014-08-07 Gary Benson <gbenson@redhat.com>
9376
9377 * server.h: Do not include gdb_locale.h.
9378
9379 2014-08-07 Gary Benson <gbenson@redhat.com>
9380
9381 * server.h: Do not include gdb/signals.h.
9382 * win32-low.c: Likewise.
9383
9384 2014-08-07 Gary Benson <gbenson@redhat.com>
9385
9386 * server.h: Do not include pathmax.h.
9387
9388 2014-08-07 Gary Benson <gbenson@redhat.com>
9389
9390 * server.h: Do not include libiberty.h.
9391 * linux-bfin-low.c: Likewise.
9392
9393 2014-08-07 Gary Benson <gbenson@redhat.com>
9394
9395 * server.h: Do not include ansidecl.h.
9396
9397 2014-08-07 Gary Benson <gbenson@redhat.com>
9398
9399 * linux-x86-low.c: Do not include stddef.h.
9400 * lynx-ppc-low.c: Likewise.
9401 * tracepoint.c: Likewise.
9402
9403 2014-08-07 Gary Benson <gbenson@redhat.com>
9404
9405 * server.h: Do not include stdarg.h.
9406 * nto-low.c: Likewise.
9407
9408 2014-08-07 Gary Benson <gbenson@redhat.com>
9409
9410 * server.h: Do not include stdlib.h.
9411 * inferiors.c: Likewise.
9412 * linux-low.c: Likewise.
9413 * regcache.c: Likewise.
9414 * spu-low.c: Likewise.
9415 * tracepoint.c: Likewise.
9416 * utils.c: Likewise.
9417
9418 2014-08-07 Gary Benson <gbenson@redhat.com>
9419
9420 * server.h: Do not include stdio.h.
9421 * linux-low.c: Likewise.
9422 * remote-utils.c: Likewise.
9423 * spu-low.c: Likewise.
9424 * utils.c: Likewise.
9425 * wincecompat.c: Likewise.
9426
9427 2014-08-06 Gary Benson <gbenson@redhat.com>
9428
9429 * regcache.c (init_register_cache): Move conditionals inside if.
9430
9431 2014-08-06 Gary Benson <gbenson@redhat.com>
9432
9433 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9434
9435 2014-07-31 Gary Benson <gbenson@redhat.com>
9436
9437 * ax.h: Do not include server.h.
9438 * gdbthread.h: Likewise.
9439 * lynx-low.h: Likewise.
9440 * notif.h: Likewise.
9441
9442 2014-07-30 Gary Benson <gbenson@redhat.com>
9443
9444 * server.h: Include common-defs.h.
9445 Do not include config.h or build-gnulib-gdbserver/config.h.
9446
9447 2014-07-30 Gary Benson <gbenson@redhat.com>
9448
9449 * hostio-errno.c: Move server.h to top of includes list.
9450 * inferiors.c: Likewise.
9451 * linux-x86-low.c: Likewise.
9452 * notif.c: Include server.h.
9453
9454 2014-07-24 Tom Tromey <tromey@redhat.com>
9455 Gary Benson <gbenson@redhat.com>
9456
9457 * server.h (CORE_ADDR): Now unsigned.
9458
9459 2014-07-16 Pedro Alves <palves@redhat.com>
9460
9461 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9462
9463 2014-07-15 Pedro Alves <palves@redhat.com>
9464
9465 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9466 copy.
9467
9468 2014-07-11 Pedro Alves <palves@redhat.com>
9469
9470 * linux-low.c (kill_wait_lwp): New function, based on
9471 kill_one_lwp_callback, but use my_waitpid directly.
9472 (kill_one_lwp_callback, linux_kill): Use it.
9473
9474 2014-06-23 Pedro Alves <palves@redhat.com>
9475
9476 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9477 before setting DR0..DR3.
9478
9479 2014-06-20 Gary Benson <gbenson@redhat.com>
9480
9481 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9482 * configure: Regenerated.
9483 * config.in: Likewise.
9484
9485 2014-06-20 Gary Benson <gbenson@redhat.com>
9486
9487 * Makefile.in (SFILES): Update locations for files moved
9488 from common to nat.
9489 (object file files): Reordered.
9490
9491 2014-06-20 Gary Benson <gbenson@redhat.com>
9492
9493 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9494 (i386_dr_low_set_addr): Likewise.
9495 (i386_dr_low_get_addr): Likewise.
9496 (i386_dr_low_can_set_control): Likewise.
9497 (i386_dr_low_set_control): Likewise.
9498 (i386_dr_low_get_control): Likewise.
9499 (i386_dr_low_get_status): Likewise.
9500 (i386_get_debug_register_length): Likewise.
9501 * linux-x86-low.c (i386_dr_low_set_addr):
9502 Changed signature. Made static.
9503 (i386_dr_low_get_addr): Likewise.
9504 (i386_dr_low_set_control): Likewise.
9505 (i386_dr_low_get_control): Likewise.
9506 (i386_dr_low_get_status): Likewise.
9507 (i386_dr_low): New global variable.
9508 * win32-i386-low.c (i386_dr_low_set_addr):
9509 Changed signature. Made static.
9510 (i386_dr_low_get_addr): Likewise.
9511 (i386_dr_low_set_control): Likewise.
9512 (i386_dr_low_get_control): Likewise.
9513 (i386_dr_low_get_status): Likewise.
9514 (i386_dr_low): New global variable.
9515
9516 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9517
9518 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9519 * Makefile.in (AR, AR_FLAGS): Define.
9520 * configure: Regenerate.
9521
9522 2014-06-19 Gary Benson <gbenson@redhat.com>
9523
9524 * Makefile.in (i386-dregs.o): New rule.
9525 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9526 * i386-low.c (target.h): Remove include.
9527 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9528 (DR_CONTROL_SHIFT): Likewise.
9529 (DR_CONTROL_SIZE): Likewise.
9530 (DR_RW_EXECUTE): Likewise.
9531 (DR_RW_WRITE): Likewise.
9532 (DR_RW_READ): Likewise.
9533 (DR_RW_IORW): Likewise.
9534 (DR_LEN_1): Likewise.
9535 (DR_LEN_2): Likewise.
9536 (DR_LEN_4): Likewise.
9537 (DR_LEN_8): Likewise.
9538 (DR_LOCAL_ENABLE_SHIFT): Likewise.
9539 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
9540 (DR_ENABLE_SIZE): Likewise.
9541 (DR_LOCAL_SLOWDOWN): Likewise.
9542 (DR_GLOBAL_SLOWDOWN): Likewise.
9543 (DR_CONTROL_RESERVED): Likewise.
9544 (I386_DR_CONTROL_MASK): Likewise.
9545 (I386_DR_VACANT): Likewise.
9546 (I386_DR_LOCAL_ENABLE): Likewise.
9547 (I386_DR_GLOBAL_ENABLE): Likewise.
9548 (I386_DR_DISABLE): Likewise.
9549 (I386_DR_SET_RW_LEN): Likewise.
9550 (I386_DR_GET_RW_LEN): Likewise.
9551 (I386_DR_WATCH_HIT): Likewise.
9552 (i386_wp_op_t): Likewise.
9553 (i386_show_dr): Likewise.
9554 (i386_length_and_rw_bits): Likewise.
9555 (i386_insert_aligned_watchpoint): Likewise.
9556 (i386_remove_aligned_watchpoint): Likewise.
9557 (i386_handle_nonaligned_watchpoint): Likewise.
9558 i386_update_inferior_debug_regs(): Likewise.
9559 (i386_dr_insert_watchpoint): Likewise.
9560 (i386_dr_remove_watchpoint): Likewise.
9561 (i386_dr_region_ok_for_watchpoint): Likewise.
9562 (i386_dr_stopped_data_address): Likewise.
9563 (i386_dr_stopped_by_watchpoint): Likewise.
9564
9565 2014-06-19 Gary Benson <gbenson@redhat.com>
9566
9567 * i386-low.c (i386_dr_show): Renamed to
9568 i386_show_dr and made static. All uses updated.
9569 (i386_dr_length_and_rw_bits): Renamed to
9570 i386_length_and_rw_bits and made static.
9571 All uses updated.
9572 (i386_dr_insert_aligned_watchpoint): Renamed to
9573 i386_insert_aligned_watchpoint and made static.
9574 All uses updated.
9575 (i386_dr_remove_aligned_watchpoint): Renamed to
9576 i386_remove_aligned_watchpoint and made static.
9577 All uses updated.
9578 (i386_dr_update_inferior_debug_regs): Renamed to
9579 i386_update_inferior_debug_regs and made static.
9580 All uses updated.
9581
9582 2014-06-18 Gary Benson <gbenson@redhat.com>
9583
9584 * i386-low.h (i386_dr_low_can_set_addr): New macro.
9585 (i386_dr_low_can_set_control): Likewise.
9586 (i386_get_debug_register_length): Likewise.
9587 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
9588 (i386_dr_low_can_set_control): Likewise.
9589 (i386_get_debug_register_length): Likewise.
9590
9591 2014-06-17 Gary Benson <gbenson@redhat.com>
9592
9593 * i386-low.h (i386-dregs.h): New include.
9594 (DR_FIRSTADDR): Now in i386-dregs.h.
9595 (DR_LASTADDR): Likewise.
9596 (DR_NADDR): Likewise.
9597 (DR_STATUS): Likewise.
9598 (DR_CONTROL): Likewise.
9599 (i386_debug_reg_state): Likewise.
9600 (i386_dr_insert_watchpoint): Likewise.
9601 (i386_dr_remove_watchpoint): Likewise.
9602 (i386_dr_region_ok_for_watchpoint): Likewise.
9603 (i386_dr_stopped_data_address): Likewise.
9604 (i386_dr_stopped_by_watchpoint): Likewise.
9605 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
9606
9607 2014-06-18 Gary Benson <gbenson@redhat.com>
9608
9609 * i386-low.h (i386_low_insert_watchpoint): Renamed to
9610 i386_dr_insert_watchpoint.
9611 (i386_low_remove_watchpoint): Renamed to
9612 i386_dr_remove_watchpoint.
9613 (i386_low_region_ok_for_watchpoint): Renamed to
9614 i386_dr_region_ok_for_watchpoint.
9615 (i386_low_stopped_data_address): Renamed to
9616 i386_dr_stopped_data_address.
9617 (i386_low_stopped_by_watchpoint): Renamed to
9618 i386_dr_stopped_by_watchpoint.
9619 * i386-low.c (i386_show_dr): Renamed to
9620 i386_dr_show and made nonstatic. All uses updated.
9621 (i386_length_and_rw_bits): Renamed to
9622 i386_dr_length_and_rw_bits and made nonstatic.
9623 All uses updated.
9624 (i386_insert_aligned_watchpoint): Renamed to
9625 i386_dr_insert_aligned_watchpoint and made nonstatic.
9626 All uses updated.
9627 (i386_remove_aligned_watchpoint): Renamed to
9628 i386_dr_remove_aligned_watchpoint and made nonstatic.
9629 All uses updated.
9630 (i386_update_inferior_debug_regs): Renamed to
9631 i386_dr_update_inferior_debug_regs and made nonstatic.
9632 All uses updated.
9633 (i386_low_insert_watchpoint): Renamed to
9634 i386_dr_insert_watchpoint. All uses updated.
9635 (i386_low_remove_watchpoint): Renamed to
9636 i386_dr_remove_watchpoint. All uses updated.
9637 (i386_low_region_ok_for_watchpoint): Renamed to
9638 i386_dr_region_ok_for_watchpoint. All uses updated.
9639 (i386_low_stopped_data_address): Renamed to
9640 i386_dr_stopped_data_address. All uses updated.
9641 (i386_low_stopped_by_watchpoint): Renamed to
9642 i386_dr_stopped_by_watchpoint. All uses updated.
9643
9644 2014-06-18 Gary Benson <gbenson@redhat.com>
9645
9646 * i386-low.c (i386_dr_low_can_set_addr): New macro.
9647 (i386_dr_low_can_set_control): Likewise.
9648 (i386_insert_aligned_watchpoint): New check.
9649
9650 2014-06-18 Gary Benson <gbenson@redhat.com>
9651
9652 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
9653 Renamed to state.
9654
9655 2014-06-18 Gary Benson <gbenson@redhat.com>
9656
9657 * i386-low.c (i386_length_and_rw_bits): Use internal_error
9658 instead of fatal and error.
9659 (i386_handle_nonaligned_watchpoint): Likewise.
9660
9661 2014-06-18 Gary Benson <gbenson@redhat.com>
9662
9663 * i386-low.c (i386_get_debug_register_length): New macro.
9664 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
9665 (i386_show_dr): Use debug_printf instead of fprintf. Use
9666 phex to format values.
9667
9668 2014-06-18 Gary Benson <gbenson@redhat.com>
9669
9670 * i386-low.h: Comment changes.
9671 * i386-low.c: Likewise.
9672
9673 2014-06-18 Gary Benson <gbenson@redhat.com>
9674
9675 * i386-low.c: Whitespace changes.
9676
9677 2014-06-12 Tom Tromey <tromey@redhat.com>
9678
9679 * utils.c (freeargv): Remove.
9680
9681 2014-06-12 Tom Tromey <tromey@redhat.com>
9682
9683 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
9684 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
9685 (parse_debug_format_options): Likewise.
9686 (gdbserver_usage): Likewise.
9687 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
9688 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
9689 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
9690 against libiberty.
9691 ($(LIBGNU)): Depend on libiberty.
9692 (all-lib): Recurse into all subdirs.
9693 (install-only): Invoke "install" target in subdirs.
9694 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
9695 targets.
9696 * configure: Rebuild.
9697 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
9698 for vasprintf, vsnprintf, or gettimeofday.
9699 * configure.srv: Don't add safe-ctype.o or lbasename.o to
9700 srv_tgtobj.
9701
9702 2014-06-05 Joel Brobecker <brobecker@adacore.com>
9703
9704 * development.sh: Delete.
9705 * Makefile.in (config.status): Adjust dependency on development.sh.
9706 * configure.ac: Adjust development.sh source call.
9707 * configure: Regenerate.
9708
9709 2014-06-02 Pedro Alves <palves@redhat.com>
9710
9711 * ax.c (gdb_free_agent_expr): New function.
9712 * ax.h (gdb_free_agent_expr): New declaration.
9713 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
9714 list.
9715 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
9716 static.
9717 (clear_breakpoint_conditions_and_commands): New function.
9718 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
9719 (clear_breakpoint_conditions_and_commands): New declaration.
9720
9721 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9722
9723 * linux-aarch64-low.c (asm/ptrace.h): Include.
9724
9725 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9726
9727 Fix TLS access for -static -pthread.
9728 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
9729 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
9730 (thread_db_load_search, try_thread_db_load_1): Initialize it.
9731
9732 2014-05-20 Pedro Alves <palves@redhat.com>
9733
9734 * linux-aarch64-low.c (aarch64_insert_point)
9735 (aarch64_remove_point): No longer check whether the type is
9736 supported here. Adjust to new interface.
9737 (the_low_target): Install aarch64_supports_z_point_type as
9738 supports_z_point_type method.
9739 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
9740 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
9741 instead of a Z packet char. Adjust.
9742 (arm_supports_z_point_type): New function.
9743 (arm_insert_point, arm_remove_point): Adjust to new interface.
9744 (the_low_target): Install arm_supports_z_point_type.
9745 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
9746 (cris_insert_point, cris_remove_point): Adjust to new interface.
9747 Don't check whether the type is supported here.
9748 (the_low_target): Install cris_supports_z_point_type.
9749 * linux-low.c (linux_supports_z_point_type): New function.
9750 (linux_insert_point, linux_remove_point): Adjust to new interface.
9751 * linux-low.h (struct linux_target_ops) <insert_point,
9752 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
9753 raw_breakpoint pointer parameter.
9754 <supports_z_point_type>: New method.
9755 * linux-mips-low.c (mips_supports_z_point_type): New function.
9756 (mips_insert_point, mips_remove_point): Adjust to new interface.
9757 Use mips_supports_z_point_type.
9758 (the_low_target): Install mips_supports_z_point_type.
9759 * linux-ppc-low.c (the_low_target): Install NULL as
9760 supports_z_point_type method.
9761 * linux-s390-low.c (the_low_target): Install NULL as
9762 supports_z_point_type method.
9763 * linux-sparc-low.c (the_low_target): Install NULL as
9764 supports_z_point_type method.
9765 * linux-x86-low.c (x86_supports_z_point_type): New function.
9766 (x86_insert_point): Adjust to new insert_point interface. Use
9767 insert_memory_breakpoint. Adjust to new
9768 i386_low_insert_watchpoint interface.
9769 (x86_remove_point): Adjust to remove_point interface. Use
9770 remove_memory_breakpoint. Adjust to new
9771 i386_low_remove_watchpoint interface.
9772 (the_low_target): Install x86_supports_z_point_type.
9773 * lynx-low.c (lynx_target_ops): Install NULL as
9774 supports_z_point_type callback.
9775 * nto-low.c (nto_supports_z_point_type): New.
9776 (nto_insert_point, nto_remove_point): Adjust to new interface.
9777 (nto_target_ops): Install nto_supports_z_point_type.
9778 * mem-break.c: Adjust intro comment.
9779 (struct raw_breakpoint) <raw_type, size>: New fields.
9780 <inserted>: Update comment.
9781 <shlib_disabled>: Delete field.
9782 (enum bkpt_type) <gdb_breakpoint>: Delete value.
9783 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
9784 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
9785 (raw_bkpt_type_to_target_hw_bp_type): New function.
9786 (find_enabled_raw_code_breakpoint_at): New function.
9787 (find_raw_breakpoint_at): New type and size parameters. Use them.
9788 (insert_memory_breakpoint): New function, based off
9789 set_raw_breakpoint_at.
9790 (remove_memory_breakpoint): New function.
9791 (set_raw_breakpoint_at): Reimplement.
9792 (set_breakpoint): New, based on set_breakpoint_at.
9793 (set_breakpoint_at): Reimplement.
9794 (delete_raw_breakpoint): Go through the_target->remove_point
9795 instead of assuming memory breakpoints.
9796 (find_gdb_breakpoint_at): Delete.
9797 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
9798 (find_gdb_breakpoint): New function.
9799 (set_gdb_breakpoint_at): Delete.
9800 (z_type_supported): New function.
9801 (set_gdb_breakpoint_1): New function, loosely based off
9802 set_gdb_breakpoint_at.
9803 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
9804 (delete_gdb_breakpoint_at): Delete.
9805 (delete_gdb_breakpoint_1): New function, loosely based off
9806 delete_gdb_breakpoint_at.
9807 (delete_gdb_breakpoint): New function.
9808 (clear_gdb_breakpoint_conditions): Rename to ...
9809 (clear_breakpoint_conditions): ... this. Don't handle a NULL
9810 breakpoint.
9811 (add_condition_to_breakpoint): Make static.
9812 (add_breakpoint_condition): Take a struct breakpoint pointer
9813 instead of an address. Adjust.
9814 (gdb_condition_true_at_breakpoint): Rename to ...
9815 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
9816 z_type parameter.
9817 (gdb_condition_true_at_breakpoint): Reimplement.
9818 (add_breakpoint_commands): Take a struct breakpoint pointer
9819 instead of an address. Adjust.
9820 (gdb_no_commands_at_breakpoint): Rename to ...
9821 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
9822 parameter. Return true if no breakpoint was found. Change debug
9823 output.
9824 (gdb_no_commands_at_breakpoint): Reimplement.
9825 (run_breakpoint_commands): Rename to ...
9826 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
9827 and change return type to boolean.
9828 (run_breakpoint_commands): New function.
9829 (gdb_breakpoint_here): Also check for Z1 breakpoints.
9830 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
9831 breakpoint. Go through the_target->remove_point instead of
9832 assuming memory breakpoint.
9833 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
9834 software and hardware breakpoints.
9835 (reinsert_raw_breakpoint): Go through the_target->insert_point
9836 instead of assuming memory breakpoint.
9837 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
9838 software and hardware breakpoints.
9839 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
9840 Check both software and hardware breakpoints.
9841 (validate_inserted_breakpoint): Assert the breakpoint is a
9842 software breakpoint. Set the inserted flag to -1 instead of
9843 setting shlib_disabled.
9844 (delete_disabled_breakpoints): Adjust.
9845 (validate_breakpoints): Only validate software breakpoints.
9846 Adjust to inserted flag change.
9847 (check_mem_read, check_mem_write): Skip breakpoint types other
9848 than software breakpoints. Adjust to inserted flag change.
9849 * mem-break.h (enum raw_bkpt_type): New enum.
9850 (raw_breakpoint, struct process_info): Forward declare.
9851 (Z_packet_to_target_hw_bp_type): Delete declaration.
9852 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
9853 (set_gdb_breakpoint, delete_gdb_breakpoint)
9854 (clear_breakpoint_conditions): New declarations.
9855 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
9856 (breakpoint_inserted_here): Update comment.
9857 (add_breakpoint_condition, add_breakpoint_commands): Replace
9858 address parameter with a breakpoint pointer parameter.
9859 (gdb_breakpoint_here): Update comment.
9860 (delete_gdb_breakpoint_at): Delete.
9861 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
9862 * server.c (process_point_options): Take a struct breakpoint
9863 pointer instead of an address. Adjust.
9864 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
9865 delete_gdb_breakpoint.
9866 * spu-low.c (spu_target_ops): Install NULL as
9867 supports_z_point_type method.
9868 * target.h: Include mem-break.h.
9869 (struct target_ops) <prepare_to_access_memory>: Update comment.
9870 <supports_z_point_type>: New field.
9871 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9872 instead of a char. Also take a raw breakpoint pointer.
9873 * win32-arm-low.c (the_low_target): Install NULL as
9874 supports_z_point_type.
9875 * win32-i386-low.c (i386_supports_z_point_type): New function.
9876 (i386_insert_point, i386_remove_point): Adjust to new interface.
9877 (the_low_target): Install i386_supports_z_point_type.
9878 * win32-low.c (win32_supports_z_point_type): New function.
9879 (win32_insert_point, win32_remove_point): Adjust to new interface.
9880 (win32_target_ops): Install win32_supports_z_point_type.
9881 * win32-low.h (struct win32_target_ops):
9882 <supports_z_point_type>: New method.
9883 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
9884 instead of a char. Also take a raw breakpoint pointer.
9885
9886 2014-05-20 Pedro Alves <palves@redhat.com>
9887
9888 * mem-break.h: Include break-common.h.
9889 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9890 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
9891 (Z_packet_to_target_hw_bp_type): New declaration.
9892 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
9893 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
9894 (Z_PACKET_ACCESS_WP): Delete macros.
9895 (Z_packet_to_hw_type): Delete function.
9896 * i386-low.h: Don't include break-common.h here.
9897 (Z_packet_to_hw_type): Delete declaration.
9898 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
9899 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9900 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
9901 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
9902 * linux-aarch64-low.c: Don't include break-common.h here.
9903 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
9904 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
9905 (Z_packet_to_target_hw_bp_type): Delete function.
9906 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
9907 function.
9908 (mips_insert_point, mips_remove_point): Use
9909 Z_packet_to_target_hw_bp_type.
9910
9911 2014-05-20 Pedro Alves <palves@redhat.com>
9912
9913 * linux-aarch64-low.c: Include break-common.h.
9914 (enum target_point_type): Delete.
9915 (Z_packet_to_point_type): Rename to ...
9916 (Z_packet_to_target_hw_bp_type): ... this, and return a
9917 target_hw_bp_type instead.
9918 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
9919 instead of an enum target_point_type.
9920 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
9921 breakpoint type.
9922 (aarch64_dr_state_insert_one_point)
9923 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
9924 (aarch64_handle_aligned_watchpoint)
9925 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
9926 Take an enum target_hw_bp_type instead of an enum
9927 target_point_type.
9928 (aarch64_supports_z_point_type): New function.
9929 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
9930 use Z_packet_to_target_hw_bp_type.
9931
9932 2014-05-20 Joel Brobecker <brobecker@adacore.com>
9933
9934 * configure.ac: Only use -Werror by default when DEVELOPMENT
9935 is true.
9936 * configure: Regenerate.
9937
9938 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
9939
9940 Fix gdbserver qGetTLSAddr for x86_64 -m32.
9941 * linux-x86-low.c (X86_64_USER_REGS): New.
9942 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
9943
9944 2014-04-28 Yao Qi <yao@codesourcery.com>
9945
9946 * Makefile.in (i386-avx512.c): Fix the typo of generated file
9947 name.
9948
9949 2014-04-25 Pedro Alves <palves@redhat.com>
9950
9951 PR server/16255
9952 * linux-low.c (linux_attach_fail_reason_string): New function.
9953 (linux_attach_lwp): Delete.
9954 (linux_attach_lwp_1): Rename to ...
9955 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
9956 argument. Remove "initial" parameter. Return int instead of
9957 void. Don't error or warn here.
9958 (linux_attach): Adjust to call linux_attach_lwp. Call error on
9959 failure to attach to the tgid. Call warning when failing to
9960 attach to an lwp.
9961 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
9962 argument. Remove "initial" parameter. Return int instead of
9963 void. Don't error or warn here.
9964 (linux_attach_fail_reason_string): New declaration.
9965 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
9966 interface change. Use linux_attach_fail_reason_string.
9967
9968 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
9969 Walfred Tedeschi <walfred.tedeschi@intel.com>
9970
9971 * Makefile.in: Added rules to handle new files
9972 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
9973 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
9974 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
9975 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
9976 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
9977 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
9978 x32-avx512-linux.o.
9979 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
9980 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
9981 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
9982 i386/x32-avx512.xml.
9983 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
9984 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
9985 i386/x32-avx512-linux.xml.
9986 * i387-fp.c (num_avx512_k_registers): New constant for number
9987 of K registers.
9988 (num_avx512_zmmh_low_registers): New constant for number of
9989 lower ZMM registers (0-15).
9990 (num_avx512_zmmh_high_registers): New constant for number of
9991 higher ZMM registers (16-31).
9992 (num_avx512_ymmh_registers): New contant for number of higher
9993 YMM registers (ymm16-31 added by avx521 on x86_64).
9994 (num_avx512_xmm_registers): New constant for number of higher
9995 XMM registers (xmm16-31 added by AVX512 on x86_64).
9996 (struct i387_xsave): Add space for AVX512 registers.
9997 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
9998 Add code to handle AVX512 registers.
9999 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10000 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10001 prototypei from generated file.
10002 (tdesc_amd64_avx512_linux): Likewise.
10003 (init_registers_x32_avx512_linux): Likewise.
10004 (tdesc_x32_avx512_linux): Likewise.
10005 (init_registers_i386_avx512_linux): Likewise.
10006 (tdesc_i386_avx512_linux): Likewise.
10007 (x86_64_regmap): Add AVX512 registers.
10008 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10009 mask.
10010 (initialize_low_arch): Add code to initialize AVX512 registers.
10011
10012 2014-04-23 Pedro Alves <palves@redhat.com>
10013
10014 * mem-break.c (find_gdb_breakpoint_at): Make static.
10015 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10016
10017 2014-04-23 Pedro Alves <palves@redhat.com>
10018
10019 * i386-low.c: Don't include break-common.h here.
10020 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10021 prototype to take target_hw_bp_type as argument instead of a Z
10022 packet char.
10023 * i386-low.h: Include break-common.h here.
10024 (Z_packet_to_hw_type): Declare.
10025 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10026 prototypes.
10027 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10028 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10029 (x86_remove_point): Convert the packet number to a
10030 target_hw_bp_type before calling i386_low_remove_watchpoint.
10031 * win32-i386-low.c (i386_insert_point): Convert the packet number
10032 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10033 (i386_remove_point): Convert the packet number to a
10034 target_hw_bp_type before calling i386_low_remove_watchpoint.
10035
10036 2014-04-23 Pedro Alves <palves@redhat.com>
10037
10038 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10039
10040 2014-04-10 Pedro Alves <palves@redhat.com>
10041
10042 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10043 Check if the condition or command is NULL before checking if the
10044 breakpoint is known. On success, return true.
10045 * mem-break.h (add_breakpoint_condition): Document return.
10046 (add_breakpoint_commands): Add describing comment.
10047 * server.c (skip_to_semicolon): New function.
10048 (process_point_options): Use it.
10049
10050 2014-04-09 Pedro Alves <palves@redhat.com>
10051
10052 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10053 to lwpid_of.
10054
10055 2014-02-27 Pedro Alves <palves@redhat.com>
10056
10057 PR 12702
10058 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10059 macros.
10060 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10061 output.
10062 (last_thread_of_process_p): Take a PID argument instead of a
10063 thread pointer.
10064 (linux_wait_for_lwp): Delete.
10065 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10066 functions.
10067 (linux_low_filter_event): New function, party factored out from
10068 linux_wait_for_event.
10069 (linux_wait_for_event): Rename to ...
10070 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10071 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10072 sigsuspend. Check for zombie leaders.
10073 (linux_wait_for_event): Reimplement as wrapper around
10074 linux_wait_for_event_filtered.
10075 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10076 a normal or signal exit is seen, it's the whole process exiting.
10077 (wait_for_sigstop): No longer a for_each_inferior callback.
10078 Rewrite on top of linux_wait_for_event_filtered.
10079 (stop_all_lwps): Call wait_for_sigstop directly.
10080 * server.c (resume, handle_target_event): Handle
10081 TARGET_WAITKIND_NO_RESUMED.
10082
10083 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10084
10085 * win32-low.c (psapi_get_dll_name,
10086 * win32_CreateToolhelp32Snapshot): Delete.
10087 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10088 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10089 Delete.
10090 (handle_load_dll): Add function description.
10091 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10092
10093 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10094
10095 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10096 Add comment.
10097 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10098 base address when calling win32_add_one_solib.
10099 (handle_load_dll): Delete local variable load_addr.
10100 Remove 0x1000 offset applied to DLL base address when calling
10101 win32_add_one_solib.
10102 (handle_unload_dll): Add comment.
10103
10104 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10105
10106 * win32-low.c (win32_add_all_dlls): Renames
10107 win32_ensure_ntdll_loaded. Rewrite function documentation.
10108 Adjust implementation to always load all DLLs.
10109 Add 0x1000 offset to DLL base address when calling
10110 win32_add_one_solib.
10111 (child_initialization_done): New static global.
10112 (do_initial_child_stuff): Set child_initialization_done to
10113 zero during child initialization, and 1 after. Replace call
10114 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10115 Add comment.
10116 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10117 (handle_unload_dll): Add function documentation.
10118 (get_child_debug_event): Ignore load and unload DLL events
10119 during child initialization.
10120
10121 2014-02-20 Doug Evans <dje@google.com>
10122
10123 Remove global all_lwps.
10124 * inferiors.h (ptid_of): Move here from linux-low.h.
10125 (pid_of, lwpid_of): Ditto.
10126 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10127 parameter is a struct thread_info * now.
10128 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10129 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10130 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10131 directly.
10132 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10133 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10134 * linux-arm-low.c (update_registers_callback): Update, "entry"
10135 parameter is a struct thread_info * now.
10136 Fetch lwpid from current_inferior directly.
10137 (arm_insert_point): Pass &all_threads to find_inferior instead of
10138 &all_lwps.
10139 (arm_remove_point): Ditto.
10140 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10141 (arm_prepare_to_resume): Fetch pid from thread.
10142 (arm_read_description): Fetch lwpid from current_inferior directly.
10143 * linux-low.c (all_lwps): Delete.
10144 (delete_lwp): Delete call to remove_inferior.
10145 (handle_extended_wait): Fetch lwpid from thread.
10146 (add_lwp): Don't set lwp->entry.id. Remove call to
10147 add_inferior_to_list.
10148 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10149 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10150 (kill_one_lwp_callback): Ditto.
10151 (linux_kill): Don't dereference NULL pointer.
10152 Fetch ptid,lwpid from thread.
10153 (get_detach_signal): Fetch ptid from thread.
10154 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10155 Simplify call to regcache_invalidate_thread.
10156 (delete_lwp_callback): Update, "entry" parameter is a
10157 struct thread_info * now. Fetch pid from thread.
10158 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10159 (status_pending_p_callback): Update, "entry" parameter is a
10160 struct thread_info * now. Fetch ptid from thread.
10161 (find_lwp_pid): Update, "entry" parameter is a
10162 struct thread_info * now.
10163 (linux_wait_for_lwp): Fetch pid from thread.
10164 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10165 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10166 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10167 (dequeue_one_deferred_signal): Ditto.
10168 (cancel_breakpoint): Fetch ptid from current_inferior.
10169 (linux_wait_for_event): Pass &all_threads to find_inferior,
10170 not &all_lwps. Fetch ptid, lwpid from thread.
10171 (count_events_callback): Update, "entry" parameter is a
10172 struct thread_info * now.
10173 (select_singlestep_lwp_callback): Ditto.
10174 (select_event_lwp_callback): Ditto.
10175 (cancel_breakpoints_callback): Ditto.
10176 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10177 not &all_lwps.
10178 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10179 (unsuspend_one_lwp): Update, "entry" parameter is a
10180 struct thread_info * now.
10181 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10182 not &all_lwps.
10183 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10184 Fetch lwpid from thread, not lwp.
10185 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10186 Pass &all_threads to find_inferior, not &all_lwps.
10187 (send_sigstop): Fetch lwpid from thread, not lwp.
10188 (send_sigstop_callback): Update, "entry" parameter is a
10189 struct thread_info * now.
10190 (suspend_and_send_sigstop_callback): Ditto.
10191 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10192 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10193 struct thread_info * now.
10194 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10195 from thread, lwp.
10196 (lwp_running): Update, "entry" parameter is a
10197 struct thread_info * now.
10198 (stop_all_lwps): Fetch ptid from thread.
10199 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10200 (linux_resume_one_lwp): Fetch lwpid from thread.
10201 (linux_set_resume_request): Update, "entry" parameter is a
10202 struct thread_info * now. Fetch pid, lwpid from thread.
10203 (resume_status_pending_p): Update, "entry" parameter is a
10204 struct thread_info * now.
10205 (need_step_over_p): Ditto. Fetch lwpid from thread.
10206 (start_step_over): Fetch lwpid from thread.
10207 (linux_resume_one_thread): Update, "entry" parameter is a
10208 struct thread_info * now. Fetch lwpid from thread.
10209 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10210 (proceed_one_lwp): Update, "entry" parameter is a
10211 struct thread_info * now. Fetch lwpid from thread.
10212 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10213 struct thread_info * now.
10214 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10215 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10216 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10217 directly.
10218 (regsets_store_inferior_registers): Ditto.
10219 (fetch_register, store_register): Ditto.
10220 (linux_read_memory, linux_write_memory): Ditto.
10221 (linux_request_interrupt): Ditto.
10222 (linux_read_auxv): Ditto.
10223 (linux_xfer_siginfo): Ditto.
10224 (linux_qxfer_spu): Ditto.
10225 (linux_qxfer_libraries_svr4): Ditto.
10226 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10227 moved to inferiors.h.
10228 (get_lwp): Delete.
10229 (get_thread_lwp): Update.
10230 (struct lwp_info): Delete member "entry". Simplify comment for
10231 member "thread".
10232 (all_lwps): Delete.
10233 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10234 current_inferior directly.
10235 (update_watch_registers_callback): Update, "entry" parameter is a
10236 struct thread_info * now. Fetch pid from thread.
10237 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10238 (mips_insert_point): Fetch lwpid from current_inferior.
10239 Pass &all_threads to find_inferior, not &all_lwps.
10240 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10241 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10242 directly.
10243 (mips_stopped_data_address): Ditto.
10244 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10245 directly.
10246 * linux-tile-low.c (tile_arch_setup): Ditto.
10247 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10248 (update_debug_registers_callback): Update, "entry" parameter is a
10249 struct thread_info * now. Fetch pid from thread.
10250 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10251 Pass &all_threads to find_inferior, not &all_lwps.
10252 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10253 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10254 Pass &all_threads to find_inferior, not &all_lwps.
10255 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10256 (i386_dr_low_get_status): Ditto.
10257 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10258 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10259 (x86_linux_read_description): Ditto.
10260 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10261
10262 2014-02-20 Doug Evans <dje@google.com>
10263
10264 * inferiors.c (get_first_inferior): Fix buglet.
10265
10266 2014-02-19 Doug Evans <dje@google.com>
10267
10268 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10269 * inferiors.c (add_thread): Change result type to struct thread_info *.
10270 All callers updated.
10271 (add_lwp): Call add_thread here instead of in callers.
10272 All callers updated.
10273 * linux-low.h (get_lwp_thread): Rewrite.
10274 (struct lwp_info): New member "thread".
10275
10276 2014-02-19 Doug Evans <dje@google.com>
10277
10278 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10279 All callers updated.
10280
10281 2014-02-19 Doug Evans <dje@google.com>
10282
10283 * inferiors.c (add_thread): Fix whitespace.
10284
10285 2014-02-19 Doug Evans <dje@google.com>
10286
10287 * dll.c (clear_dlls): Replace accessing list implemention details
10288 with API function.
10289 * gdbthread.h (get_first_thread): Declare.
10290 * inferiors.c (for_each_inferior_with_data): New function.
10291 (get_first_thread): New function.
10292 (find_thread_ptid): Simplify.
10293 (get_first_inferior): New function.
10294 (clear_list): Delete.
10295 (one_inferior_p): New function.
10296 (clear_inferior_list): New function.
10297 (clear_inferiors): Update.
10298 * inferiors.h (for_each_inferior_with_data): Declare.
10299 (clear_inferior_list): Declare.
10300 (one_inferior_p): Declare.
10301 (get_first_inferior): Declare.
10302 * linux-low.c (linux_wait_for_event): Replace accessing list
10303 implemention details with API function.
10304 * server.c (target_running): Ditto.
10305 (accumulate_file_name_length): New function.
10306 (emit_dll_description): New function.
10307 (handle_qxfer_libraries): Replace accessing list implemention
10308 details with API function.
10309 (handle_qxfer_threads_worker): New function.
10310 (handle_qxfer_threads_proper): Replace accessing list implemention
10311 details with API function.
10312 (handle_query): Ditto.
10313 (visit_actioned_threads_callback_ftype): New typedef.
10314 (visit_actioned_threads_data): New struct.
10315 (visit_actioned_threads): Rewrite to be find_inferior callback.
10316 (resume): Call find_inferior.
10317 (handle_status): Replace accessing list implemention
10318 details with API function.
10319 (process_serial_event): Replace accessing list implemention details
10320 with API function.
10321 * target.c (set_desired_inferior): Replace accessing list implemention
10322 details with API function.
10323 * tracepoint.c (same_process_p): New function.
10324 (gdb_agent_about_to_close): Replace accessing list implemention
10325 details with API function.
10326 * win32-low.c (child_delete_thread): Replace accessing list
10327 implemention details with API function.
10328 (match_dll_by_basename): New function.
10329 (dll_is_loaded_by_basename): New function.
10330 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10331 details call to dll_is_loaded_by_basename.
10332
10333 2014-02-19 Doug Evans <dje@google.com>
10334
10335 * dll.h (struct dll_info): Add comment.
10336 * gdbthread.h (struct thread_info): Add comment.
10337 (current_ptid): Simplify.
10338 * inferiors.c (add_process): Update.
10339 (remove_process): Update.
10340 * inferiors.h (struct process_info): Rename member "head" to "entry".
10341 * linux-low.c (delete_lwp): Update.
10342 (add_lwp): Update.
10343 (last_thread_of_process_p): Update.
10344 (kill_one_lwp_callback, linux_kill): Update.
10345 (status_pending_p_callback): Update.
10346 (wait_for_sigstop): Update. Simplify read of ptid.
10347 (start_step_over): Update.
10348 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10349 (get_lwp_thread): Update.
10350 (struct lwp_info): Rename member "head" to "entry".
10351 * regcache.h (inferior_list_entry): Delete.
10352 * server.c (kill_inferior_callback): Update.
10353 (detach_or_kill_inferior_callback): Update.
10354 (print_started_pid): Update.
10355 (print_attached_pid): Update.
10356 (process_serial_event): Simplify read of ptid.
10357 * thread-db.c (thread_db_create_event): Update.
10358 (thread_db_get_tls_address): Update.
10359 * win32-low.c (current_inferior_ptid): Simplify.
10360
10361 2014-02-19 Tom Tromey <tromey@redhat.com>
10362
10363 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10364 argument.
10365 (target_supports_btrace): Update.
10366
10367 2014-02-14 Yao Qi <yao@codesourcery.com>
10368
10369 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10370 (rsp-low-ipa.o): New target.
10371
10372 2014-02-12 Tom Tromey <tromey@redhat.com>
10373
10374 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10375 convert_ascii_to_int.
10376 * regcache.c (registers_to_string): Likewise.
10377 * remote-utils.c (decode_M_packet): Likewise.
10378 * server.c (process_serial_event): Likewise.
10379
10380 2014-02-12 Tom Tromey <tromey@redhat.com>
10381
10382 * server.c (handle_query, handle_v_run): Use hex2bin, not
10383 unhexify.
10384 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10385
10386 2014-02-12 Tom Tromey <tromey@redhat.com>
10387
10388 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10389 convert_int_to_ascii.
10390 * regcache.c (registers_to_string, collect_register_as_string):
10391 Likewise.
10392 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10393 Likewise.
10394 * server.c (process_serial_event): Likewise.
10395 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10396 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10397
10398 2014-02-12 Tom Tromey <tromey@redhat.com>
10399
10400 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10401 bin2hex, not hexify.
10402 * tracepoint.c (cmd_qtstatus): Likewise.
10403
10404 2014-02-12 Tom Tromey <tromey@redhat.com>
10405
10406 * remote-utils.c (monitor_output): Pass explicit length to
10407 hexify.
10408
10409 2014-02-12 Tom Tromey <tromey@redhat.com>
10410
10411 * tracepoint.c: Include rsp-low.h.
10412 * server.c: Include rsp-low.h.
10413 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10414 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10415 declare.
10416 * remote-utils.c: Include rsp-low.h.
10417 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10418 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10419 (convert_int_to_ascii, convert_ascii_to_int): Move to
10420 common/rsp-low.c.
10421 * regcache.c: Include rsp-low.h.
10422 * ax.c: Include rsp-low.h.
10423 * Makefile.in (SFILES): Add common/rsp-low.c.
10424 (OBS): Add rsp-low.o.
10425 (rsp-low.o): New target.
10426
10427 2014-02-12 Tom Tromey <tromey@redhat.com>
10428
10429 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10430 Include print-utils.h.
10431 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10432 (plongest, thirty_two, phex_nz): Remove.
10433 * Makefile.in (SFILES): Add common/print-utils.c.
10434 (OBS): Add print-utils.o.
10435 (print-utils-ipa.o): New target.
10436 (print-utils.o): New target.
10437 (IPA_OBJS): Add print-utils-ipa.o.
10438
10439 2014-02-06 Tom Tromey <tromey@redhat.com>
10440
10441 * Makefile.in (SFILES): Fix indentation.
10442
10443 2014-02-05 Doug Evans <dje@google.com>
10444
10445 * linux-low.c (linux_wait_for_event): Improve comment.
10446 (linux_wait_1): Keep current_inferior in sync with event_child.
10447
10448 2014-01-22 Doug Evans <dje@google.com>
10449
10450 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10451
10452 2014-01-22 Doug Evans <dje@google.com>
10453
10454 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10455 * configure: Regenerate.
10456 * config.in: Regenerate.
10457 * Makefile.in (SFILES): Add debug.c.
10458 (OBS): Add debug.o.
10459 * debug.c: New file.
10460 * debug.h: New file.
10461 * linux-aarch64-low.c (*): Update all debugging printfs to use
10462 debug_printf instead of fprintf.
10463 * linux-arm-low.c (*): Ditto.
10464 * linux-cris-low.c (*): Ditto.
10465 * linux-crisv32-low.c (*): Ditto.
10466 * linux-m32r-low.c (*): Ditto.
10467 * linux-sparc-low.c (*): Ditto.
10468 * linux-x86.c (*): Ditto.
10469 * linux-low.c (*): Ditto.
10470 (linux_wait_1): Add calls to debug_enter, debug_exit.
10471 (linux_wait): Remove redundant debugging printf.
10472 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10473 (linux_resume, unstop_all_lwps): Ditto.
10474 * mem-break.c (*): Update all debugging printfs to use
10475 debug_printf instead of fprintf.
10476 * remote-utils.c (*): Ditto.
10477 * thread-db.c (*): Ditto.
10478 * server.c #include <ctype.h>, "gdb_vecs.h".
10479 (debug_threads): Moved to debug.c.
10480 (*): Update all debugging printfs to use debug_printf instead of
10481 fprintf.
10482 (start_inferior): Replace call to fflush with call to debug_flush.
10483 (monitor_show_help): Mention set debug-format.
10484 (parse_debug_format_options): New function.
10485 (handle_monitor_command): Handle "monitor set debug-format".
10486 (gdbserver_usage): Mention --debug-format.
10487 (main): Parse --debug-format.
10488 * server.h (debug_threads): Declaration moved to debug.h.
10489 #include "debug.h".
10490 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10491 trace_debug_1 that uses debug_printf.
10492 (tracepoint_look_up_symbols): Update all debugging printfs to use
10493 debug_printf instead of fprintf.
10494
10495 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10496
10497 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10498 sys/ptrace.h.
10499
10500 2014-01-17 Pedro Alves <palves@redhat.com>
10501
10502 PR build/16445
10503 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10504 defined after including gdb_proc_service.h.
10505
10506 2014-01-16 Doug Evans <dje@google.com>
10507
10508 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10509 (match_dll): Use it.
10510
10511 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10512
10513 * target.h (target_ops) <read_btrace>: Change parameters and
10514 return type to allow error reporting.
10515 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10516 trace reading errors on.
10517 * linux-low.c (linux_low_read_btrace): Pass trace reading
10518 errors on.
10519 (linux_low_disable_btrace): New.
10520
10521 2014-01-15 Doug Evans <dje@google.com>
10522
10523 * inferiors.c (thread_id_to_gdb_id): Delete.
10524 * inferiors.h (thread_id_to_gdb_id): Delete.
10525
10526 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10527
10528 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10529 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10530 versions.
10531
10532 2014-01-08 Pedro Alves <palves@redhat.com>
10533
10534 * server.c (handle_status): Don't discard previous queued stop
10535 replies or thread's pending status here.
10536 (main) <disconnection>: Do it here instead.
10537
10538 2014-01-08 Pedro Alves <palves@redhat.com>
10539
10540 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
10541 * server.c (visit_actioned_threads, handle_pending_status): New
10542 function.
10543 (handle_v_cont): Factor out parts to ...
10544 (resume): ... this new function. If in all-stop, and a thread
10545 being resumed has a pending status, report it without actually
10546 resuming.
10547 (myresume): Adjust to use the new 'resume' function.
10548 (clear_pending_status_callback, set_pending_status_callback)
10549 (find_status_pending_thread_callback): New functions.
10550 (handle_status): Handle the case of multiple threads having
10551 interesting statuses to report. Report threads' real last signal
10552 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
10553 with an interesting thread to report the status for, instead of
10554 always reporting the status of the first thread.
10555
10556 2014-01-01 Joel Brobecker <brobecker@adacore.com>
10557
10558 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
10559 * gdbreplay.c (gdbreplay_version): Likewise.
10560
10561 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
10562
10563 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
10564 iov.iov_len with the real length in use.
10565
10566 2013-12-13 Joel Brobecker <brobecker@adacore.com>
10567
10568 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
10569 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
10570 for all targets that use win32-low.c.
10571 * win32-low.c (win32_ensure_ntdll_loaded): New function.
10572 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
10573
10574 2013-12-13 Pedro Alves <palves@redhat.com>
10575
10576 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
10577 if equal to TARGET_WAITKIND_LOADED.
10578 * win32-low.c (cached_status): New static global.
10579 (win32_wait): Add declaration.
10580 (do_initial_child_stuff): Flush all initial pending debug events
10581 up to the initial breakpoint.
10582 (win32_wait): If CACHED_STATUS was set, return that instead
10583 of doing a real wait. Remove the code resuming the execution
10584 of the inferior after receiving a TARGET_WAITKIND_LOADED event
10585 during the initial phase. Also remove the code changing
10586 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
10587 TARGET_WAITKIND_STOPPED.
10588
10589 2013-12-11 Yao Qi <yao@codesourcery.com>
10590
10591 * notif.c (handle_notif_ack): Return 0 if no notification
10592 matches.
10593
10594 2013-11-20 Doug Evans <dje@google.com>
10595
10596 * linux-low.c (linux_set_resume_request): Fix comment.
10597
10598 2013-11-20 Doug Evans <dje@google.com>
10599
10600 * linux-low.c (resume_status_pending_p): Tweak comment.
10601
10602 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
10603
10604 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
10605 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
10606 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
10607 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
10608 (srv_amd64_regobj): Add amd64-mpx.o.
10609 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
10610 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
10611 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
10612 * i387-fp.c (num_pl_bnd_register) Added constant.
10613 (num_pl_bnd_cfg_registers) Added constant.
10614 (struct i387_xsave) Added reserved area and MPX fields.
10615 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
10616 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
10617 function.
10618 (tdesc_i386_mpx_linux): Add MPX amd64 target.
10619 (init_registers_amd64_mpx_linux): Declare new function.
10620 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
10621 (x86_64_regmap): Add MPX registers.
10622 (x86_linux_read_description): Add MPX case.
10623 (initialize_low_arch): Initialize MPX targets.
10624
10625 2013-11-18 Tom Tromey <tromey@redhat.com>
10626
10627 * configure: Rebuild.
10628 * configure.ac: Don't check for stdlib.h.
10629 * gdbreplay.c: Unconditionally include stdlib.h.
10630
10631 2013-11-18 Tom Tromey <tromey@redhat.com>
10632
10633 * config.in: Rebuild.
10634 * configure: Rebuild.
10635 * configure.ac: Don't use AC_HEADER_DIRENT.
10636
10637 2013-11-18 Tom Tromey <tromey@redhat.com>
10638
10639 * server.h: Don't check HAVE_STRING_H.
10640 * gdbreplay.c: Don't check HAVE_STRING_H.
10641 * configure: Rebuild.
10642
10643 2013-11-18 Tom Tromey <tromey@redhat.com>
10644
10645 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
10646 LIBGNU.
10647
10648 2013-11-08 Tom Tromey <tromey@redhat.com>
10649
10650 * configure, config.in: Rebuild.
10651 * configure.ac: Remove unused configury.
10652
10653 2013-11-08 Tom Tromey <tromey@redhat.com>
10654
10655 * acinclude.m4: Include common.m4, codeset.m4.
10656 * configure, config.in: Rebuild.
10657 * configure.ac: Use GDB_AC_COMMON.
10658
10659 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
10660
10661 * linux-s390-low.c (HWCAP_S390_TE): New define.
10662 (s390_arch_setup): Consider the TE field in the HWCAP for
10663 determining 'have_regset_tdb'.
10664
10665 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
10666
10667 PR gdb/16014
10668 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
10669 call to sizeof.
10670
10671 2013-10-02 Pedro Alves <palves@redhat.com>
10672
10673 * server.c (process_serial_event): Don't output "GDBserver
10674 exiting" if GDB is connected through stdio.
10675 * target.c (mywait): Likewise, be silent if GDB is connected
10676 through stdio.
10677
10678 2013-10-01 Joel Brobecker <brobecker@adacore.com>
10679
10680 * lynx-low.c (lynx_add_threads_after_attach): New function.
10681 (lynx_attach): Remove call to add_thread. Add call to
10682 lynx_add_threads_after_attach instead.
10683
10684 2013-09-28 Mike Frysinger <vapier@gentoo.org>
10685
10686 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
10687 * config.in, configure: Regenerated.
10688
10689 2013-09-18 Yao Qi <yao@codesourcery.com>
10690
10691 PR server/15959
10692 * server.c (start_inferior): Clear 'resume_info'.
10693
10694 2013-09-16 Jiong Wang <jiwang@tilera.com>
10695
10696 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
10697 for each register.
10698
10699 2013-09-16 Jiong Wang <jiwang@tilera.com>
10700
10701 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
10702 linux-tile-low.o to srv_tgtobj.
10703
10704 2013-09-16 Will Newton <will.newton@linaro.org>
10705
10706 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
10707 out regs.
10708
10709 2013-09-06 Pedro Alves <palves@redhat.com>
10710
10711 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
10712 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
10713 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
10714 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
10715 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
10716 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
10717
10718 2013-09-06 Pedro Alves <palves@redhat.com>
10719
10720 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
10721 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
10722
10723 2013-09-06 Pedro Alves <palves@redhat.com>
10724
10725 * linux-amd64-ipa.c: Include tracepoint.h.
10726 * linux-i386-ipa.c: Include tracepoint.h.
10727
10728 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10729
10730 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
10731 (ps_get_thread_area): New function.
10732
10733 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
10734
10735 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
10736 (initialize_low_arch): Call init_registers_crisv32 rather than
10737 init_register_crisv32.
10738
10739 2013-09-05 Pedro Alves <palves@redhat.com>
10740
10741 * server.h (handle_vFile, hostio_last_error_from_errno): Move
10742 to ...
10743 * hostio.h: ... this new file.
10744 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
10745 win32-low.c: Include hostio.h.
10746
10747 2013-09-05 Pedro Alves <palves@redhat.com>
10748
10749 * server.h (gdb_client_data, handler_func, callback_handler_func)
10750 (delete_file_handler, add_file_handler, append_callback_event)
10751 (delete_callback_event, start_event_loop, initialize_event_loop):
10752 Move to event-loop.h and include it.
10753 * event-loop.h: New file.
10754
10755 2013-09-05 Pedro Alves <palves@redhat.com>
10756
10757 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
10758 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
10759 (loaded_dll, unloaded_dll): Move to ...
10760 * dll.h: ... this new file.
10761 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
10762
10763 2013-09-05 Pedro Alves <palves@redhat.com>
10764
10765 * server.h (current_process, get_thread_process, all_processes)
10766 (add_inferior_to_list, for_each_inferior, current_inferior)
10767 (remove_inferior, add_process, remove_process, find_process_pid)
10768 (have_started_inferiors_p, have_attached_inferiors_p)
10769 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
10770 (clear_inferiors, find_inferior, find_inferior_id)
10771 (inferior_target_data, set_inferior_target_data)
10772 (inferior_regcache_data, set_inferior_regcache_data): Move to
10773 inferiors.h, and include it.
10774 * inferiors.h: New file.
10775
10776 2013-09-05 Pedro Alves <palves@redhat.com>
10777
10778 * server.h (struct emit_ops, current_insn_ptr, emit_error):
10779 Move ...
10780 * ax.h: ... here.
10781
10782 2013-09-05 Pedro Alves <palves@redhat.com>
10783
10784 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
10785 tracepoint.h.
10786 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
10787 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
10788 (handle_tracepoint_general_set, handle_tracepoint_query)
10789 (tracepoint_finished_step, tracepoint_was_hit)
10790 (release_while_stepping_state_list, current_traceframe)
10791 (in_readonly_region, traceframe_read_mem)
10792 (fetch_traceframe_registers, traceframe_read_sdata)
10793 (traceframe_read_info, struct fast_tpoint_collect_status)
10794 (fast_tracepoint_collecting, force_unlock_trace_buffer)
10795 (handle_tracepoit_bkpts, initialize_low_tracepoint)
10796 (supply_fast_tracepoint_registers)
10797 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
10798 (ipa_tdesc, claim_trampoline_space)
10799 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
10800 (agent_mem_read, agent_get_trace_state_variable_value)
10801 (agent_set_trace_state_variable_value, agent_tsv_read)
10802 (agent_mem_read_string, get_raw_reg_func_addr)
10803 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
10804 * tracepoint.h: ... this new file.
10805
10806 2013-09-05 Pedro Alves <palves@redhat.com>
10807
10808 * server.h (perror_with_name, error, fatal, warning, paddress)
10809 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
10810 include it.
10811 * utils.h: New file.
10812
10813 2013-09-05 Pedro Alves <palves@redhat.com>
10814
10815 * server.h (remote_debug, noack_mode, transport_is_reliable)
10816 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
10817 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
10818 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
10819 (write_enn, initialize_async_io, enable_async_io)
10820 (disable_async_io, check_remote_input_interrupt_request)
10821 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
10822 (dead_thread_notify, prepare_resume_reply)
10823 (decode_address_to_semicolon, decode_address, decode_m_packet)
10824 (decode_M_packet, decode_X_packet, decode_xfer_write)
10825 (decode_search_memory_packet, unhexify, hexify)
10826 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
10827 (look_up_one_symbol, relocate_instruction)
10828 (monitor_output): Move to remote-utils.h, and include it.
10829 * remote-utils.h: New file.
10830
10831 2013-09-05 Pedro Alves <palves@redhat.com>
10832
10833 * server.h (_): Delete.
10834
10835 2013-09-02 Pedro Alves <palves@redhat.com>
10836
10837 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
10838 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
10839 allocated.
10840 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
10841
10842 2013-09-02 Pierre Muller <muller@sourceware.org>
10843
10844 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
10845 or WriteProcessMemory complete successfully and handle
10846 ERROR_PARTIAL_COPY error.
10847
10848 2013-09-02 Pedro Alves <palves@redhat.com>
10849
10850 * server.c (gdb_read_memory): Return -1 on traceframe memory read
10851 error instead of EIO.
10852
10853 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10854
10855 PR server/15604
10856 * linux-low.c: Include filestuff.h.
10857 (linux_create_inferior) <pid == 0>: Call close_most_fds.
10858 * lynx-low.c: Include filestuff.h.
10859 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
10860 * server.c: Include filestuff.h.
10861 (main): Call notice_open_fds.
10862 * spu-low.c: Include filestuff.h.
10863 (spu_create_inferior) <pid == 0>: Call close_most_fds.
10864
10865 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
10866
10867 * Makefile.in: Explain why ../target and ../nat are not
10868 listed as include file search paths.
10869 (linux-waitpid.o): New object file rule.
10870 * configure.srv (srv_native_linux_obj): New variable.
10871 Replace all occurrences of linux native object files with
10872 $srv_native_linux_obj.
10873 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
10874 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
10875 (linux_enable_event_reporting): Remove declaration.
10876 (my_waitpid): Moved to common/linux-waitpid.c.
10877 (linux_wait_for_event): Pass ptid when calling
10878 linux_enable_event_reporting.
10879 (linux_supports_tracefork_flag): Remove.
10880 (linux_enable_event_reporting): Likewise.
10881 (linux_tracefork_grandchild): Remove.
10882 (STACK_SIZE): Moved to common/linux-ptrace.c.
10883 (linux_tracefork_child): Remove.
10884 (linux_test_for_tracefork): Remove.
10885 (linux_look_up_symbols): Call linux_supports_traceclone.
10886 (initialize_low): Remove call to linux_test_for_tracefork.
10887 * linux-low.h (PTRACE_TYPE_ARG3): Move to
10888 common/linux-ptrace.h.
10889 (PTRACE_TYPE_ARG4): Likewise.
10890 Include linux-ptrace.h.
10891
10892 2013-08-21 Pedro Alves <palves@redhat.com>
10893
10894 * config.in: Renegerate.
10895
10896 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
10897
10898 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
10899 (SFILES): Remove $(srcdir)/common/target-common.c and
10900 add $(srcdir)/target/waitstatus.c.
10901 (OBS): Remove target-common.o and add waitstatus.o.
10902 (server_h): Remove $(srcdir)/../common/target-common.h and
10903 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
10904 and $(srcdir)/../target/waitstatus.h.
10905 (target-common.o): Remove.
10906 (waitstatus.o): New target object file.
10907 * target.h: Do not include target-common.h and
10908 include target/resume.h, target/wait.h and
10909 target/waitstatus.h.
10910
10911 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
10912
10913 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10914 to PTRACE_TYPE_ARG3.
10915 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
10916 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
10917 PTRACE_TYPE_ARG4.
10918 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
10919 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
10920
10921 2013-07-27 Jie Zhang <jie@codesourcery.com>
10922 Daniel Jacobowitz <dan@codesourcery.com>
10923 Yao Qi <yao@codesourcery.com>
10924
10925 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
10926 (mips-linux-watch.o): New rule.
10927 (mips_linux_watch_h): New variable.
10928 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
10929 srv_tgtobj.
10930 * linux-mips-low.c: Include mips-linux-watch.h.
10931 (struct arch_process_info, struct arch_lwp_info): New.
10932 (update_watch_registers_callback): New function.
10933 (mips_linux_new_process, mips_linux_new_thread) New functions.
10934 (mips_linux_prepare_to_resume, mips_insert_point): New
10935 functions.
10936 (mips_remove_point, mips_stopped_by_watchpoint): New
10937 functions.
10938 (rsp_bp_type_to_target_hw_bp_type): New function.
10939 (mips_stopped_data_address): New function.
10940 (the_low_target): Add watchpoint support functions.
10941
10942 2013-07-27 Yao Qi <yao@codesourcery.com>
10943
10944 * i386-low.c: Include break-common.h.
10945 (enum target_hw_bp_type): Remove.
10946
10947 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
10948
10949 * Makefile.in (SFILES): /common/target-common.c.
10950 (OBS): Add target-common.o.
10951 (server_h): Add $(srcdir)/../common/target-common.h.
10952 (target-common.o): New target.
10953 * server.c (queue_stop_reply_callback): Free
10954 status string after use.
10955 * target.c (target_waitstatus_to_string): Remove.
10956 * target.h: Include target-common.h.
10957 (resume_kind): Likewise.
10958 (target_waitkind): Likewise.
10959 (target_waitstatus): Likewise.
10960 (TARGET_WNOHANG): Likewise.
10961
10962 2013-07-04 Yao Qi <yao@codesourcery.com>
10963
10964 * Makefile.in (host_alias): Use @host_noncanonical@.
10965 (target_alias): Use @target_noncanonical@.
10966 * configure.ac: Use ACX_NONCANONICAL_TARGET and
10967 ACX_NONCANONICAL_HOST.
10968 * configure: Regenerated.
10969
10970 Revert:
10971 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
10972
10973 * configure.ac (version_host, version_target): Set and AC_SUBST them.
10974 * configure: Rebuild.
10975 * Makefile.in (version_host, version_target): Get from configure.
10976 (version.c): Use $(version_host) and $(version_target).
10977
10978 2013-07-03 Pedro Alves <palves@redhat.com>
10979
10980 * Makefile.in (config.status): Depend on development.sh.
10981 * acinclude.m4: Include libmcheck.m4.
10982 * configure: Regenerate.
10983
10984 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10985
10986 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
10987 attribute inside the parentheses.
10988 (winapi_DebugSetProcessKillOnExit): Ditto.
10989 (winapi_DebugBreakProcess): Ditto.
10990 (winapi_GenerateConsoleCtrlEvent): Ditto.
10991
10992 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
10993
10994 * notif.h (notif_event): Add a dummy member to avoid compiler
10995 errors.
10996
10997 2013-07-01 Pedro Alves <palves@redhat.com>
10998
10999 * hostio.c (HOSTIO_PATH_MAX): Define.
11000 (require_filename, handle_open, handle_unlink, handle_readlink):
11001 Use it.
11002
11003 2013-07-01 Pedro Alves <palves@redhat.com>
11004
11005 * server.h: Include "pathmax.h".
11006 * linux-low.c: Don't include sys/param.h.
11007 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11008 MAXPATHLEN.
11009 * win32-low.c: Don't include sys/param.h.
11010 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11011
11012 2013-07-01 Pedro Alves <palves@redhat.com>
11013
11014 * event-loop.c: Don't check HAVE_UNISTD_H before including
11015 <unistd.h>.
11016 * gdbreplay.c: Likewise.
11017 * remote-utils.c: Likewise.
11018 * server.c: Likewise.
11019 * configure.ac: Don't check for unistd.h.
11020 * configure: Regenerate.
11021
11022 2013-06-28 Tom Tromey <tromey@redhat.com>
11023
11024 * Makefile.in (version.c): Use version.in, not
11025 common/version.in.
11026
11027 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11028
11029 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11030 * configure: Rebuild.
11031 * Makefile.in (version_host, version_target): Get from configure.
11032 (version.c): Use $(version_host) and $(version_target).
11033
11034 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11035
11036 Fix trace-status to output user name without trailing colon.
11037 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11038
11039 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11040
11041 Fix trace-status to output proper start-time and stop-time.
11042 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11043 output start time and stop time in hex as gdb expects.
11044
11045 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11046
11047 * tracepoint.c (build_traceframe_info_xml): Output trace state
11048 variables present in the trace buffer.
11049
11050 2013-06-24 Tom Tromey <tromey@redhat.com>
11051
11052 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11053 create-version.sh.
11054 (version.o): Remove.
11055 * gdbreplay.c: Include version.h.
11056 (version, host_name): Don't declare.
11057 * server.h: Include version.h.
11058 (version, host_name): Don't declare.
11059
11060 2013-06-12 Pedro Alves <palves@redhat.com>
11061
11062 * linux-x86-low.c (linux_is_elf64): Delete global.
11063 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11064 with local linux_pid_exe_is_elf_64_file use.
11065
11066 2013-06-11 Pedro Alves <palves@redhat.com>
11067
11068 * linux-low.c (regset_disabled, disable_regset): New functions.
11069 (regsets_fetch_inferior_registers)
11070 (regsets_store_inferior_registers): Use them.
11071 (initialize_regsets_info); Don't allocate the disabled_regsets
11072 array here.
11073 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11074 comment.
11075
11076 2013-06-11 Pedro Alves <palves@redhat.com>
11077
11078 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11079 xmalloc.
11080
11081 2013-06-11 Pedro Alves <palves@redhat.com>
11082
11083 * linux-x86-low.c (initialize_low_arch): Call
11084 init_registers_x32_avx_linux.
11085
11086 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11087
11088 Fix compatibility with Android Bionic.
11089 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11090 it is not empty.
11091
11092 2013-06-07 Pedro Alves <palves@redhat.com>
11093
11094 PR server/14823
11095 * Makefile.in (OBS): Add tdesc.o.
11096 (IPA_OBJS): Add tdesc-ipa.o.
11097 (tdesc-ipa.o): New rule.
11098 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11099 interface.
11100 * linux-low.c (new_inferior): Delete.
11101 (disabled_regsets, num_regsets): Delete.
11102 (linux_add_process): Adjust to set the new per-process
11103 new_inferior flag.
11104 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11105 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11106 was a stop. When calling arch_setup, switch the current inferior
11107 to the thread that got an event.
11108 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11109 (regsets_fetch_inferior_registers)
11110 (regsets_store_inferior_registers): New regsets_info parameter.
11111 Adjust to use it.
11112 (linux_register_in_regsets): New regs_info parameter. Adjust to
11113 use it.
11114 (register_addr, fetch_register, store_register): New usrregs_info
11115 parameter. Adjust to use it.
11116 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11117 parameter regs_info. Adjust to use it.
11118 (linux_fetch_registers): Get the current inferior's regs_info, and
11119 adjust to use it.
11120 (linux_store_registers): Ditto.
11121 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11122 (initialize_low): Don't initialize the target_regsets here. Call
11123 initialize_low_arch.
11124 * linux-low.h (target_regsets): Delete declaration.
11125 (struct regsets_info): New.
11126 (struct usrregs_info): New.
11127 (struct regs_info): New.
11128 (struct process_info_private) <new_inferior>: New field.
11129 (struct linux_target_ops): Delete the num_regs, regmap, and
11130 regset_bitmap fields. New field regs_info.
11131 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11132 * i387-fp.c (num_xmm_registers): Delete.
11133 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11134 calls to new interface.
11135 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11136 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11137 Infer the number of xmm registers from the regcache's target
11138 description.
11139 * i387-fp.h (num_xmm_registers): Delete.
11140 * inferiors.c (add_thread): Don't install the thread's regcache
11141 here.
11142 * proc-service.c (gregset_info): Fetch the current inferior's
11143 regs_info. Adjust to use it.
11144 * regcache.c: Include tdesc.h.
11145 (register_bytes, reg_defs, num_registers)
11146 (gdbserver_expedite_regs): Delete.
11147 (get_thread_regcache): If the thread doesn't have a regcache yet,
11148 create one, instead of aborting gdbserver.
11149 (regcache_invalidate_one): Rename to ...
11150 (regcache_invalidate_thread): ... this.
11151 (regcache_invalidate_one): New.
11152 (regcache_invalidate): Only invalidate registers of the current
11153 process.
11154 (init_register_cache): Add target_desc parameter, and use it.
11155 (new_register_cache): Ditto. Assert the target description has a
11156 non zero registers_size.
11157 (regcache_cpy): Add assertions. Adjust.
11158 (realloc_register_cache, set_register_cache): Delete.
11159 (registers_to_string, registers_from_string): Adjust.
11160 (find_register_by_name, find_regno, find_register_by_number)
11161 (register_cache_size): Add target_desc parameter, and use it.
11162 (free_register_cache_thread, free_register_cache_thread_one)
11163 (regcache_release, register_cache_size): New.
11164 (register_size): Add target_desc parameter, and use it.
11165 (register_data, supply_register, supply_register_zeroed)
11166 (supply_regblock, supply_register_by_name, collect_register)
11167 (collect_register_as_string, collect_register_by_name): Adjust.
11168 * regcache.h (struct target_desc): Forward declare.
11169 (struct regcache) <tdesc>: New field.
11170 (init_register_cache, new_register_cache): Add target_desc
11171 parameter.
11172 (regcache_invalidate_thread): Declare.
11173 (regcache_invalidate_one): Delete declaration.
11174 (regcache_release): Declare.
11175 (find_register_by_number, register_cache_size, register_size)
11176 (find_regno): Add target_desc parameter.
11177 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11178 declarations.
11179 * remote-utils.c: Include tdesc.h.
11180 (outreg, prepare_resume_reply): Adjust.
11181 * server.c: Include tdesc.h.
11182 (gdbserver_xmltarget): Delete declaration.
11183 (get_features_xml, process_serial_event): Adjust.
11184 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11185 declare.
11186 (struct process_info) <tdesc>: New field.
11187 (ipa_tdesc): Declare.
11188 * tdesc.c: New file.
11189 * tdesc.h: New file.
11190 * tracepoint.c: Include tdesc.h.
11191 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11192 (get_context_regcache): Adjust to pass ipa_tdesc down.
11193 (do_action_at_tracepoint): Adjust to get the register cache size
11194 from the context regcache's description.
11195 (traceframe_walk_blocks): Adjust to get the register cache size
11196 from the current trace frame's description.
11197 (traceframe_get_pc): Adjust to get current trace frame's
11198 description and pass it down.
11199 (gdb_collect): Adjust to get the register cache size from the
11200 IPA's description.
11201 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11202 (gdbserver_xmltarget): Delete.
11203 (initialize_low_tracepoint): Set the ipa's target description.
11204 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11205 (initialize_low_tracepoint): Set the ipa's target description.
11206 * linux-x86-low.c: Include tdesc.h.
11207 [__x86_64__] (is_64bit_tdesc): New.
11208 (ps_get_thread_area, x86_get_thread_area): Use it.
11209 (i386_cannot_store_register): Rename to ...
11210 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11211 (i386_cannot_fetch_register): Rename to ...
11212 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11213 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11214 to new interface.
11215 (target_regsets): Rename to ...
11216 (x86_regsets): ... this.
11217 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11218 interface.
11219 (x86_siginfo_fixup): Use is_64bit_tdesc.
11220 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11221 (tdesc_x32_avx_linux, tdesc_x32_linux)
11222 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11223 Declare.
11224 (x86_linux_update_xmltarget): Delete.
11225 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11226 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11227 (AMD64_LINUX_USER64_CS): New.
11228 (x86_linux_read_description): New, based on
11229 x86_linux_update_xmltarget.
11230 (same_process_callback): New.
11231 (x86_arch_setup_process_callback): New.
11232 (x86_linux_update_xmltarget): New.
11233 (x86_regsets_info): New.
11234 (amd64_linux_regs_info): New.
11235 (i386_linux_usrregs_info): New.
11236 (i386_linux_regs_info): New.
11237 (x86_linux_regs_info): New.
11238 (x86_arch_setup): Reimplement.
11239 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11240 (x86_emit_ops): Ditto.
11241 (the_low_target): Adjust. Install x86_linux_regs_info,
11242 x86_cannot_fetch_register, and x86_cannot_store_register.
11243 (initialize_low_arch): New.
11244 * linux-ia64-low.c (tdesc_ia64): Declare.
11245 (ia64_fetch_register): Adjust.
11246 (ia64_usrregs_info, regs_info): New globals.
11247 (ia64_regs_info): New function.
11248 (the_low_target): Adjust.
11249 (initialize_low_arch): New function.
11250 * linux-sparc-low.c (tdesc_sparc64): Declare.
11251 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11252 Adjust.
11253 (sparc_arch_setup): New function.
11254 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11255 (the_low_target): Adjust.
11256 (initialize_low_arch): New function.
11257 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11258 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11259 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11260 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11261 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11262 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11263 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11264 (tdesc_powerpc_isa205_vsx64l): Declare.
11265 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11266 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11267 (ppc_set_pc, ppc_get_hwcap): Adjust.
11268 (ppc_usrregs_info): Forward declare.
11269 (!__powerpc64__) ppc_regmap_adjusted: New global.
11270 (ppc_arch_setup): Adjust to the current process'es target
11271 description.
11272 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11273 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11274 (ppc_store_evrregset): Adjust.
11275 (target_regsets): Rename to ...
11276 (ppc_regsets): ... this, and make static.
11277 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11278 (ppc_regs_info): New function.
11279 (the_low_target): Adjust.
11280 (initialize_low_arch): New function.
11281 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11282 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11283 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11284 (tdesc_s390x_linux64v2): Declare.
11285 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11286 (s390_fill_gregset, s390_store_last_break): Adjust.
11287 (target_regsets): Rename to ...
11288 (s390_regsets): ... this, and make static.
11289 (s390_get_pc, s390_set_pc): Adjust.
11290 (s390_get_hwcap): New target_desc parameter, and use it.
11291 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11292 (s390_arch_setup): Adjust to set the current process'es target
11293 description. Don't adjust the regmap.
11294 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11295 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11296 (regs_info_3264): New globals.
11297 (s390_regs_info): New function.
11298 (the_low_target): Adjust.
11299 (initialize_low_arch): New function.
11300 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11301 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11302 [__mips64] (init_registers_mips_linux)
11303 (init_registers_mips_dsp_linux): Delete defines.
11304 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11305 (have_dsp): New global.
11306 (mips_read_description): New, based on mips_arch_setup.
11307 (mips_arch_setup): Reimplement.
11308 (get_usrregs_info): New function.
11309 (mips_cannot_fetch_register, mips_cannot_store_register)
11310 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11311 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11312 (target_regsets): Rename to ...
11313 (mips_regsets): ... this, and make static.
11314 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11315 (dsp_regs_info, regs_info): New globals.
11316 (mips_regs_info): New function.
11317 (the_low_target): Adjust.
11318 (initialize_low_arch): New function.
11319 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11320 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11321 Declare.
11322 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11323 (arm_read_description): New, with bits factored from
11324 arm_arch_setup.
11325 (arm_arch_setup): Reimplement.
11326 (target_regsets): Rename to ...
11327 (arm_regsets): ... this, and make static.
11328 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11329 (arm_regs_info): New function.
11330 (the_low_target): Adjust.
11331 (initialize_low_arch): New function.
11332 * linux-m68k-low.c (tdesc_m68k): Declare.
11333 (target_regsets): Rename to ...
11334 (m68k_regsets): ... this, and make static.
11335 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11336 (m68k_regs_info): New function.
11337 (m68k_arch_setup): New function.
11338 (the_low_target): Adjust.
11339 (initialize_low_arch): New function.
11340 * linux-sh-low.c (tdesc_sharch): Declare.
11341 (target_regsets): Rename to ...
11342 (sh_regsets): ... this, and make static.
11343 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11344 (sh_regs_info, sh_arch_setup): New functions.
11345 (the_low_target): Adjust.
11346 (initialize_low_arch): New function.
11347 * linux-bfin-low.c (tdesc_bfin): Declare.
11348 (bfin_arch_setup): New function.
11349 (bfin_usrregs_info, regs_info): New globals.
11350 (bfin_regs_info): New function.
11351 (the_low_target): Adjust.
11352 (initialize_low_arch): New function.
11353 * linux-cris-low.c (tdesc_cris): Declare.
11354 (cris_arch_setup): New function.
11355 (cris_usrregs_info, regs_info): New globals.
11356 (cris_regs_info): New function.
11357 (the_low_target): Adjust.
11358 (initialize_low_arch): New function.
11359 * linux-cris-low.c (tdesc_crisv32): Declare.
11360 (cris_arch_setup): New function.
11361 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11362 (cris_regs_info): New function.
11363 (the_low_target): Adjust.
11364 (initialize_low_arch): New function.
11365 * linux-m32r-low.c (tdesc_m32r): Declare.
11366 (m32r_arch_setup): New function.
11367 (m32r_usrregs_info, regs_info): New globals.
11368 (m32r_regs_info): Adjust.
11369 (initialize_low_arch): New function.
11370 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11371 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11372 (tic6x_usrregs_info): Forward declare.
11373 (tic6x_read_description): New function, based on ...
11374 (tic6x_arch_setup): ... this. Reimplement.
11375 (target_regsets): Rename to ...
11376 (tic6x_regsets): ... this, and make static.
11377 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11378 (tic6x_regs_info): New function.
11379 (the_low_target): Adjust.
11380 (initialize_low_arch): New function.
11381 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11382 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11383 (target_regsets): Rename to ...
11384 (xtensa_regsets): ... this, and make static.
11385 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11386 globals.
11387 (xtensa_arch_setup, xtensa_regs_info): New functions.
11388 (the_low_target): Adjust.
11389 (initialize_low_arch): New function.
11390 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11391 (nios2_arch_setup): Set the current process'es tdesc.
11392 (target_regsets): Rename to ...
11393 (nios2_regsets): ... this.
11394 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11395 (nios2_regs_info): New function.
11396 (the_low_target): Adjust.
11397 (initialize_low_arch): New function.
11398 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11399 (aarch64_arch_setup): Set the current process'es tdesc.
11400 (target_regsets): Rename to ...
11401 (aarch64_regsets): ... this.
11402 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11403 (aarch64_regs_info): New function.
11404 (the_low_target): Adjust.
11405 (initialize_low_arch): New function.
11406 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11407 globals.
11408 (target_regsets): Rename to ...
11409 (tile_regsets): ... this.
11410 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11411 (tile_regs_info): New function.
11412 (tile_arch_setup): Set the current process'es tdesc.
11413 (the_low_target): Adjust.
11414 (initialize_low_arch): New function.
11415 * spu-low.c (tdesc_spu): Declare.
11416 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11417 * win32-arm-low.c (tdesc_arm): Declare.
11418 (arm_arch_setup): New function.
11419 (the_low_target): Install arm_arch_setup instead of
11420 init_registers_arm.
11421 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11422 (init_windows_x86): Rename to ...
11423 (i386_arch_setup): ... this. Set `win32_tdesc'.
11424 (the_low_target): Adjust.
11425 * win32-low.c (win32_tdesc): New global.
11426 (child_add_thread): Don't create the thread cache here.
11427 (do_initial_child_stuff): Set the new process'es tdesc.
11428 * win32-low.h (struct target_desc): Forward declare.
11429 (win32_tdesc): Declare.
11430 * lynx-i386-low.c (tdesc_i386): Declare global.
11431 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11432 * lynx-low.c (lynx_tdesc): New global.
11433 (lynx_add_process): Set the new process'es tdesc.
11434 * lynx-low.h (struct target_desc): Forward declare.
11435 (lynx_tdesc): Declare global.
11436 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11437 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11438 * nto-low.c (nto_tdesc): New global.
11439 (do_attach): Set the new process'es tdesc.
11440 * nto-low.h (struct target_desc): Forward declare.
11441 (nto_tdesc): Declare.
11442 * nto-x86-low.c (tdesc_i386): Declare.
11443 (nto_x86_arch_setup): Set `nto_tdesc'.
11444
11445 2013-06-04 Gary Benson <gbenson@redhat.com>
11446
11447 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11448 to qSupported response when appropriate.
11449 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11450 with nonzero-length annex.
11451 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11452 arguments supplied in annex.
11453
11454 2013-05-31 Doug Evans <dje@google.com>
11455
11456 PR server/15594
11457 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11458 64 bits in 64-cross-32 environment.
11459
11460 2013-05-28 Pedro Alves <palves@redhat.com>
11461
11462 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11463 (aarch64-without-fpu.c): Delete rule.
11464 * configure.srv (aarch64*-*-linux*): Remove references to
11465 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11466 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11467 declaration.
11468
11469 2013-05-24 Pedro Alves <palves@redhat.com>
11470
11471 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11472 instead of strchr/decode_address. Error if the range isn't split
11473 with a ','. Don't assume there's be a ':' in the action.
11474
11475 2013-05-23 Yao Qi <yao@codesourcery.com>
11476 Pedro Alves <palves@redhat.com>
11477
11478 * linux-low.c (lwp_in_step_range): New function.
11479 (linux_wait_1): If the thread was range stepping and stopped
11480 outside the stepping range, report the stop to GDB. Otherwise,
11481 continue stepping. Add range stepping debug output.
11482 (linux_set_resume_request): Copy the step range from the resume
11483 request to the lwp.
11484 (linux_supports_range_stepping): New.
11485 (linux_target_ops) <supports_range_stepping>: Set to
11486 linux_supports_range_stepping.
11487 * linux-low.h (struct linux_target_ops)
11488 <supports_range_stepping>: New field.
11489 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11490 * linux-x86-low.c (x86_supports_range_stepping): New.
11491 (the_low_target) <supports_range_stepping>: Set to
11492 x86_supports_range_stepping.
11493 * server.c (handle_v_cont): Handle 'r' action.
11494 (handle_v_requests): Append ";r" if the target supports range
11495 stepping.
11496 * target.h (struct thread_resume) <step_range_start,
11497 step_range_end>: New fields.
11498 (struct target_ops) <supports_range_stepping>:
11499 New field.
11500 (target_supports_range_stepping): New macro.
11501
11502 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11503
11504 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11505 confusion in comment.
11506
11507 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11508
11509 * lynx-low.c (struct process_info_private): New type.
11510 (lynx_add_process): New function.
11511 (lynx_create_inferior, lynx_attach): Replace calls to
11512 add_process by calls to lynx_add_process.
11513 (lynx_resume): If PTID is null, then try using
11514 current_process()->private->last_wait_event_ptid.
11515 Add comments.
11516 (lynx_clear_inferiors): Delete. The contents of that function
11517 has been inlined in lynx_mourn;
11518 (lynx_wait_1): Save the ptid in the process's private data.
11519 (lynx_mourn): Free the process' private data. Replace call
11520 to lynx_clear_inferiors by call to clear_inferiors.
11521
11522 2013-05-17 Yao Qi <yao@codesourcery.com>
11523
11524 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11525 the right place.
11526
11527 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11528
11529 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11530 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11531 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11532 PT_TEXT_END_ADDR guards. Update comments.
11533 (linux_target_op) <read_offsets>: Conditionally define to
11534 linux_read_offsets if the target is UCLIBC and if it defines
11535 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11536
11537 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
11538 Andrew Jenner <andrew@codesourcery.com>
11539
11540 * Makefile.in (SFILES): Add linux-nios2-low.c.
11541 (clean): Add action to delete nios2-linux.c.
11542 (nios2-linux.c): New rule.
11543 * configure.srv: Add nios2*-*-linux*.
11544 * linux-nios2-low.c: New.
11545
11546 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
11547
11548 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
11549
11550 2013-04-25 Hui Zhu <hui@codesourcery.com>
11551
11552 PR gdb/15186
11553 * ax.c (ax_printf): Add fflush.
11554
11555 2013-04-22 Tom Tromey <tromey@redhat.com>
11556
11557 * Makefile.in (SFILES): Add filestuff.c.
11558 (OBS): Add filestuff.o.
11559 (filestuff.o): New target.
11560 * config.in, configure: Rebuild.
11561 * configure.ac: Check for fdwalk, pipe2.
11562
11563 2013-04-17 Pedro Alves <palves@redhat.com>
11564
11565 * configure.ac (USE_THREAD_DB): Delete variable.
11566 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
11567 Don't AC_SUBST USE_THREAD_DB.
11568 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
11569 * config.in, configure: Regenerate.
11570
11571 2013-04-16 Pedro Alves <palves@redhat.com>
11572
11573 * linux-low.h (struct lwp_info) <thread_known>: Move under
11574 the USE_THREAD_DB #ifdef.
11575
11576 2013-04-16 Pedro Alves <palves@redhat.com>
11577
11578 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
11579 (linux-low.o): Delete rule.
11580 * linux-low.h: Always include "gdb_thread_db.h" instead of
11581 conditionally including thread_db.h.
11582 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
11583 HAVE_THREAD_DB_H.
11584
11585 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11586
11587 * Makefile.in (install-only): Fix make install regression.
11588
11589 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
11590
11591 Convert man pages to texinfo, new gdbinit.5 texinfo page.
11592 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
11593 installation.
11594 * gdbserver.1: Remove.
11595
11596 2013-03-22 Pedro Alves <palves@redhat.com>
11597
11598 * linux-low.c (handle_extended_wait): Don't call
11599 linux_enable_event_reporting.
11600
11601 2013-03-15 Tony Theodore <tonyt@logyst.com>
11602
11603 PR build/9098:
11604 * Makefile.in (SHELL): Use @SHELL@.
11605
11606 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
11607
11608 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
11609 compiler warning.
11610
11611 2013-03-13 Joel Brobecker <brobecker@adacore.com>
11612
11613 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
11614 Remove extraneous NULL element.
11615
11616 2013-03-13 Yao Qi <yao@codesourcery.com>
11617
11618 * tracepoint.c (traceframe_read_tsv): Look for the last matched
11619 'V' block in trace frame.
11620
11621 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11622
11623 * target.h (struct target_ops): Add btrace ops.
11624 (target_supports_btrace): New macro.
11625 (target_enable_btrace): New macro.
11626 (target_disable_btrace): New macro.
11627 (target_read_btrace): New macro.
11628 * gdbthread.h (struct thread_info): Add btrace field.
11629 * server.c: Include btrace-common.h.
11630 (handle_btrace_general_set): New function.
11631 (handle_btrace_enable): New function.
11632 (handle_btrace_disable): New function.
11633 (handle_general_set): Call handle_btrace_general_set.
11634 (handle_qxfer_btrace): New function.
11635 (struct qxfer qxfer_packets[]): Add btrace entry.
11636 * inferiors.c (remove_thread): Disable btrace.
11637 * linux-low: Include linux-btrace.h.
11638 (linux_low_enable_btrace): New function.
11639 (linux_low_read_btrace): New function.
11640 (linux_target_ops): Add btrace ops.
11641 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
11642 Add srv_linux_btrace=yes.
11643 (x86_64-*-linux*): Add linux-btrace.o.
11644 Add srv_linux_btrace=yes.
11645 * configure.ac: Define HAVE_LINUX_BTRACE.
11646 * config.in: Regenerated.
11647 * configure: Regenerated.
11648
11649 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11650
11651 * server.c (handle_qxfer): Preserve error message if -3 is
11652 returned.
11653 (qxfer): Document the -3 return value.
11654
11655 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
11656
11657 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
11658 (linux_btrace_h): New variable.
11659 (linux-btrace.o): New rule.
11660
11661 2013-03-08 Stan Shebs <stan@codesourcery.com>
11662 Hafiz Abid Qadeer <abidh@codesourcery.com>
11663
11664 * tracepoint.c (trace_buffer_size): New global.
11665 (DEFAULT_TRACE_BUFFER_SIZE): New define.
11666 (init_trace_buffer): Change to one-argument function. Allocate
11667 trace buffer memory.
11668 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
11669 handle QTBuffer:size packet.
11670 (cmd_bigqtbuffer_size): New function.
11671 (initialize_tracepoint): Call init_trace_buffer with
11672 DEFAULT_TRACE_BUFFER_SIZE.
11673 * server.c (handle_query): Add QTBuffer:size in the
11674 supported packets.
11675
11676 2013-03-07 Yao Qi <yao@codesourcery.com>
11677
11678 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
11679 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
11680 of -1.
11681 (cmd_qtsp): Adjust condition. Do post increment.
11682 Set cur_action and cur_step_action back to 0.
11683
11684 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
11685
11686 PR server/15236
11687 * linux-low.c (linux_write_memory): Return early success if LEN is
11688 zero.
11689
11690 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
11691
11692 * configure.srv: Add x86_64-*-cygwin* as target.
11693
11694 2013-02-28 Tom Tromey <tromey@redhat.com>
11695
11696 * configure.ac: Invoke AC_SYS_LARGEFILE.
11697 * configure, config.in: Rebuild.
11698
11699 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
11700
11701 * win32-low.c: Throughout, fix format strings and casts of
11702 printf-like functions to avoid type related warnings on all
11703 platforms.
11704 (get_child_debug_event): Print dwDebugEventCode as hex since
11705 that's how it's usually documented.
11706
11707 2013-02-28 Yao Qi <yao@codesourcery.com>
11708
11709 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
11710 pulongest.
11711
11712 2013-02-27 Jiong Wang <jiwang@tilera.com>
11713
11714 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
11715 (reg-tilegx32.c): New rule.
11716 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
11717 * linux-tile-low.c (tile_arch_setup): New function. Invoke
11718 different register info initializer according to elf class.
11719 (init_registers_tilgx32): New function. The tilegx32 register info
11720 initializer.
11721 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
11722 (tile_store_gregset): Likewise.
11723
11724 2013-02-27 Yao Qi <yao@codesourcery.com>
11725
11726 * server.c (process_point_options): Print debug message when
11727 debug_threads is true.
11728
11729 2013-02-26 Yao Qi <yao@codesourcery.com>
11730
11731 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
11732
11733 2013-02-19 Pedro Alves <palves@redhat.com>
11734 Kai Tietz <ktietz@redhat.com>
11735
11736 PR gdb/15161
11737
11738 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
11739 instead of strtoul to extract address from packet.
11740 (process_serial_event) <'z'>: Likewise.
11741
11742 2013-02-18 Yao Qi <yao@codesourcery.com>
11743
11744 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
11745
11746 2013-02-14 Pedro Alves <palves@redhat.com>
11747
11748 Plug memory leak.
11749
11750 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
11751 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
11752
11753 2013-02-14 Pedro Alves <palves@redhat.com>
11754
11755 * tracepoint.c (cmd_qtdpsrc): Use savestring.
11756
11757 2013-02-14 Pedro Alves <palves@redhat.com>
11758
11759 * tracepoint.c (save_string): Delete.
11760 (add_tracepoint_action): Use savestring instead of save_string.
11761
11762 2013-02-12 Pedro Alves <palves@redhat.com>
11763
11764 * linux-xtensa-low.c: Ditto.
11765 * xtensa-xtregs.c: Ditto.
11766
11767 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
11768
11769 * thread-db.c (thread_db_get_tls_address): NULL pointer check
11770 thread_db.
11771
11772 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11773
11774 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
11775 aarch64_num_wp_regs and aarch64_num_bp_regs to
11776 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
11777
11778 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
11779
11780 * linux-aarch64-low.c (ps_get_thread_area): Replace
11781 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
11782
11783 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
11784 Marcus Shawcroft <marcus.shawcroft@arm.com>
11785 Nigel Stephens <nigel.stephens@arm.com>
11786 Yufeng Zhang <yufeng.zhang@arm.com>
11787
11788 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
11789 (aarch64.c, aarch64-without-fpu.c): New targets.
11790 * configure.srv (aarch64*-*-linux*): New.
11791 * linux-aarch64-low.c: New file.
11792
11793 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
11794
11795 * linux-low.c (handle_extended_wait, linux_create_inferior)
11796 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
11797 (dequeue_one_deferred_signal, linux_resume_one_thread)
11798 (fetch_register, linux_write_memory, linux_enable_event_reporting)
11799 (linux_tracefork_grandchild, linux_test_for_tracefork)
11800 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
11801 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
11802 where the argument is 0.
11803
11804 2013-01-25 Yao Qi <yao@codesourcery.com>
11805
11806 * event-loop.c: Include "queue.h".
11807 (gdb_event_p): New typedef.
11808 (struct gdb_event) <next_event>: Remove.
11809 (event_queue): Change to QUEUE(gdb_event_p).
11810 (async_queue_event): Remove.
11811 (gdb_event_xfree): New.
11812 (initialize_event_loop): New.
11813 (process_event): Use API from QUEUE.
11814 (wait_for_event): Likewise.
11815 * server.c (main): Call initialize_event_loop.
11816 * server.h (initialize_event_loop): Declare.
11817
11818 2013-01-18 Yao Qi <yao@codesourcery.com>
11819
11820 * ax.h (struct eval_agent_expr_context): New.
11821 (gdb_eval_agent_expr): Update declaration.
11822 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
11823 TFRAME. Add new argument CTX.
11824 * server.h (struct eval_agent_expr_context): Declare.
11825 (agent_mem_read, agent_tsv_read): Update declaration.
11826 (agent_mem_read_string): Likewise.
11827 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
11828 (add_traceframe_block): Add new argument TPOINT.
11829 Increase TPOINT->traceframe_usage.
11830 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
11831 eval_tracepoint_agent_expr.
11832 (condition_true_at_tracepoint): Likewise.
11833 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
11834 (agent_mem_read_string, agent_tsv_read): Likewise.
11835
11836 2013-01-16 Yao Qi <yao@codesourcery.com>
11837
11838 * linux-low.c (linux_resume_one_lwp): Don't check
11839 'lwp->bp_reinsert != 0'.
11840
11841 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11842 Pedro Alves <palves@redhat.com>
11843
11844 * lynx-low.c (ptrace_request_to_str): Define a temporary
11845 macro and use it to simplify this function's implementation.
11846
11847 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11848
11849 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
11850 sets errno.
11851
11852 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11853
11854 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
11855
11856 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11857
11858 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
11859
11860 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11861
11862 * lynx-low.c (lynx_resume): Use the resume_info parameter
11863 to determine the ptid for the lynx_ptrace call, unless
11864 it is equal to minus_one_ptid, in which case we use the
11865 ptid of the current_inferior.
11866 (lynx_wait_1): After having received a thread create/exit
11867 event, resume the inferior's execution using the signaling
11868 thread's ptid, rather than the old ptid.
11869
11870 2013-01-07 Joel Brobecker <brobecker@adacore.com>
11871
11872 * lynx-low.c (lynx_resume): Delete variable ret.
11873
11874 2013-01-01 Joel Brobecker <brobecker@adacore.com>
11875
11876 * gdbreplay.c (gdbreplay_version): Update copyright year.
11877 * server.c (gdbserver_version): Likewise.
11878
11879 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11880
11881 * lynx-low.c (lynx_wait_1): Add debug trace before adding
11882 new thread.
11883
11884 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11885
11886 * lynx-low.c (ptrace_request_to_str): Add handling for
11887 PTRACE_GETTRACESIG.
11888
11889 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11890
11891 * lynx-low.c (lynx_attach): Delete variable new_process.
11892
11893 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11894
11895 * lynx-low.c (lynx_create_inferior): Delete variable
11896 new_process.
11897
11898 2012-12-17 Joel Brobecker <brobecker@adacore.com>
11899
11900 * lynx-low.c (ptrace_request_to_str): Do not handle
11901 PTRACE_GETTHREADLIST if this macro does not exist.
11902
11903 2012-12-15 Yao Qi <yao@codesourcery.com>
11904
11905 * Makefile.in (OBS): Add notif.o.
11906 * notif.c, notif.h: New.
11907 * server.c: Include "notif.h".
11908 (struct vstop_notif) <next>: Remove.
11909 <base>: New field.
11910 (queue_stop_reply): Update.
11911 (push_event, send_next_stop_reply): Remove.
11912 (discard_queued_stop_replies): Update.
11913 (notif_stop): New variable.
11914 (handle_v_stopped): Remove.
11915 (handle_v_requests): Don't call handle_v_stopped. Call
11916 handle_ack_notif instead.
11917 (queue_stop_reply_callback): Call notif_event_enque instead
11918 of queue_stop_reply.
11919 (handle_status): Don't call send_next_stop_reply, call
11920 notif_write_event instead.
11921 (kill_inferior_callback): Likewise.
11922 (detach_or_kill_inferior_callback): Likewise.
11923 (main): Call initialize_notif.
11924 (process_serial_event): Call QUEUE_is_empty.
11925 (handle_target_event): Call notif_push instead of push event.
11926 * server.h (push_event): Remove declaration.
11927
11928 2012-12-10 Tom Tromey <tromey@redhat.com>
11929
11930 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
11931 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
11932 macros.
11933 (.c.o): Rewrite.
11934 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
11935 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
11936 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
11937 (amd64-linux-ipa.o, ax.o): Rewrite.
11938 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
11939 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
11940 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
11941 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
11942 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
11943 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
11944 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
11945 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
11946 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
11947 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
11948 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
11949 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
11950 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
11951 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
11952 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
11953 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
11954 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
11955 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
11956 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
11957 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
11958 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
11959 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
11960 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
11961 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
11962 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
11963 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
11964 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
11965 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
11966 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
11967 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
11968 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
11969 (reg-tilegx.o): Remove.
11970 (all_object_files): New macro.
11971 Include .deps files.
11972 * aclocal.m4, configure: Rebuild.
11973 * acinclude.m4: Include depstand.m4, lead-dot.m4.
11974 * configure.ac: Invoke ZW_CREATE_DEPDIR,
11975 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
11976
11977 2012-12-05 Tom Tromey <tromey@redhat.com>
11978
11979 PR gdb/14917:
11980 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
11981
11982 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
11983
11984 * configure.ac: Check for linux/perf_event.h.
11985 * config.in: Regenerated.
11986 * configure: Regenerated.
11987
11988 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
11989
11990 * hostio.c (handle_readlink): Decrease buffer size
11991 parameter passed to readlink by one byte.
11992
11993 2012-11-26 Yao Qi <yao@codesourcery.com>
11994
11995 * configure.ac (build_warnings): Append '-Wempty-body'.
11996 * configure: Regenerated.
11997 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
11998 body.
11999
12000 2012-11-15 Pierre Muller <muller@sourceware.org>
12001
12002 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12003 * config.in: Regenerate.
12004 * configure: Regenerate.
12005 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12006 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12007 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12008 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12009 header.
12010 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12011 instead of <sys/wait.h> header.
12012 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12013
12014 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12015
12016 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12017 (various make rules): Remove -DGDBSERVER
12018
12019 2012-11-09 Yao Qi <yao@codesourcery.com>
12020
12021 * spu-low.c (current_ptid): Move it to ..
12022 * gdbthread.h: ... here. New.
12023 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12024 * server.c (myresume, process_serial_event): Likewise.
12025 * thread-db.c (thread_db_find_new_threads): Likewise.
12026 * tracepoint.c (run_inferior_command): Likewise.
12027
12028 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12029
12030 * server.c (handle_search_memory_1): Include access length in
12031 warning message.
12032
12033 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12034
12035 * linux-crisv32-low.c: Fix compile errors.
12036
12037 2012-09-04 Yao Qi <yao@codesourcery.com>
12038
12039 * tracepoint.c (cmd_qtsv): Adjust debug message.
12040 Don't check CUR_TPOINT.
12041
12042 2012-08-28 Yao Qi <yao@codesourcery.com>
12043
12044 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12045 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12046 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12047 Remove declarations of xmalloc, xreallloc, xstrdup and
12048 freeargv.
12049 * Makefile.in (libiberty_h): New.
12050 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12051 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12052
12053 2012-08-23 Yao Qi <yao@codesourcery.com>
12054
12055 * server.h: Remove declaration of 'xsnprintf'.
12056
12057 2012-08-22 Keith Seitz <keiths@redhat.com>
12058
12059 * server.h: Include build-gnulib-gbserver/config.h.
12060 * gdbreplay.c: Likewise.
12061
12062 2012-08-08 Doug Evans <dje@google.com>
12063
12064 * Makefile.in (SFILES): Add gdb_vecs.c.
12065 (OBS): Add gdb_vecs.o.
12066 (gdb_vecs_h, host_defs_h): New variables.
12067 (thread-db.o): Add $(gdb_vecs_h) dependency.
12068 (gdb_vecs.o): New rule.
12069 * thread-db.c: #include "gdb_vecs.h".
12070 (thread_db_load_search): Use a vector to iterate over path elements.
12071 Handle text appearing after "$pdir".
12072
12073 * configure.ac: Add check for strstr.
12074 * config.in: Regenerate.
12075 * configure: Regenerate.
12076
12077 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12078
12079 * hostio.c (handle_pread): If pread fails, fall back to attempting
12080 lseek/read.
12081 (handle_pwrite): Likewise for pwrite.
12082
12083 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12084
12085 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12086 between unsupported TYPE and unimplementable ADDR/LEN combination.
12087 (arm_insert_point): Act on new return value.
12088
12089 2012-07-31 Pedro Alves <palves@redhat.com>
12090
12091 * server.c (process_point_options): Only skip tokens if we find
12092 one that is unrecognized. Don't treat 'X' specially while
12093 skipping unrecognized tokens.
12094
12095 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12096
12097 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12098 to 4-byte-align HW breakpoint addresses for Thumb.
12099
12100 2012-07-27 Yao Qi <yao@codesourcery.com>
12101
12102 PR remote/14161.
12103
12104 * server.h: Declare gdb_agent_about_to_close.
12105 * target.c (kill_inferior): Include "agent.h".
12106 New. Send command 'kill'.
12107 * target.h (kill_inferior): Removed macro.
12108 * tracepoint.c (gdb_agent_about_to_close): New.
12109 (gdb_agent_helper_thread): Handle command 'close'.
12110 Wait endlessly until the inferior stops.
12111 Install gdb_agent_remove_socket to atexit hook.
12112 (agent_socket_name): New static variable.
12113 (gdb_agent_socket_init): Replace local variable 'name' with
12114 'agent_socket_name'.
12115 (gdb_agent_remove_socket): New.
12116
12117 2012-07-27 Yao Qi <yao@codesourcery.com>
12118
12119 * server.c (process_point_options): Stop at 'X' when parsing.
12120
12121 2012-07-19 Michael Eager <eager@eagercon.com>
12122
12123 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12124 to hw_execute.
12125 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12126 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12127 hardware breakpoint.
12128
12129 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12130
12131 * gdbserver/linux-low.c (initialize_low): Call
12132 linux_ptrace_init_warnings.
12133
12134 2012-07-02 Doug Evans <dje@google.com>
12135
12136 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12137 pointer to int.
12138
12139 2012-07-02 Stan Shebs <stan@codesourcery.com>
12140
12141 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12142 (ax.o): Add it to build rule.
12143 (ax-ipa.o): Ditto.
12144 (OBS): Add format.o.
12145 (IPA_OBS): Add format.o.
12146 * server.c (handle_query): Claim support for breakpoint commands.
12147 (process_point_options): Add command case.
12148 (process_serial_event): Leave running if there are printfs in
12149 effect.
12150 * mem-break.h (any_persistent_commands): Declare.
12151 (add_breakpoint_commands): Declare.
12152 (gdb_no_commands_at_breakpoint): Declare.
12153 (run_breakpoint_commands): Declare.
12154 * mem-break.c (struct point_command_list): New struct.
12155 (struct breakpoint): New field command_list.
12156 (any_persistent_commands): New function.
12157 (add_commands_to_breakpoint): New function.
12158 (add_breakpoint_commands): New function.
12159 (gdb_no_commands_at_breakpoint): New function.
12160 (run_breakpoint_commands): New function.
12161 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12162 locally.
12163 * ax.c: Include format.h.
12164 (ax_printf): New function.
12165 (gdb_eval_agent_expr): Add printf opcode.
12166
12167 2012-06-13 Yao Qi <yao@codesourcery.com>
12168
12169 * server.c (start_inferior): Remove duplicated writes to fields
12170 'last_resume_kind' and 'last_status' of 'current_inferior'.
12171
12172 2012-06-12 Yao Qi <yao@codesourcery.com>
12173 Pedro Alves <palves@redhat.com>
12174
12175 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12176 comment.
12177 * server.c (handle_v_cont): Extend comment.
12178
12179 2012-06-11 Yao Qi <yao@codesourcery.com>
12180
12181 * linux-low.c (linux_attach): Add 'static'.
12182
12183 2012-06-06 Yao Qi <yao@codesourcery.com>
12184
12185 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12186
12187 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12188
12189 Fix gcc -flto compilation warning.
12190 * server.c (main): Make variable multi_mode and attach volatile.
12191
12192 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12193
12194 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12195 if the platform doesn't know about it.
12196
12197 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12198
12199 * Makefile.in (SFILES): Add linux-tile-low.c.
12200 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12201 * configure.srv: Handle tilegx-*-linux*.
12202 * linux-tile-low.c: New file.
12203
12204 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12205
12206 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12207
12208 2012-05-24 Pedro Alves <palves@redhat.com>
12209
12210 PR gdb/7205
12211
12212 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12213
12214 2012-05-24 Pedro Alves <palves@redhat.com>
12215
12216 PR gdb/7205
12217
12218 Replace target_signal with gdb_signal throughout.
12219
12220 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12221
12222 * linux-low.c (linux_store_registers): Avoid the copying sequence
12223 when no data has been retrieved by ptrace.
12224
12225 2012-05-22 Will Deacon <will.deacon@arm.com>
12226
12227 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12228 Include asm/ptrace.h.
12229 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12230 already defined.
12231
12232 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12233
12234 * linux-low.c (linux_store_registers): Don't re-retrieve data
12235 with ptrace that has already been obtained from /proc. Always
12236 copy any data retrieved with ptrace to the buffer supplied.
12237
12238 2012-05-11 Yao Qi <yao@codesourcery.com>
12239 Pedro Alves <palves@redhat.com>
12240
12241 * linux-low.c (enum stopping_threads_kind): New.
12242 (stopping_threads): Change type to `enum stopping_threads_kind'.
12243 (handle_extended_wait): If stopping and suspending threads, leave
12244 the new_lwp suspended too.
12245 (linux_wait_for_event): Adjust.
12246 (stop_all_lwps): Set `stopping_threads' to
12247 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12248 whether we're suspending threads or just stopping them. Assert no
12249 recursion happens.
12250
12251 2012-04-29 Yao Qi <yao@codesourcery.com>
12252
12253 * server.h: Move some code to ...
12254 * gdbthread.h: ... here. New.
12255 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12256 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12257 (nto-low.o, win32-low.o): Likewise.
12258 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12259 * regcache.c, remote-utils.c, server.c: Likewise.
12260 * target.c, tracepoint.c, win32-low.c: Likewise.
12261
12262 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12263
12264 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12265 (PTRACE_ARG4_TYPE): Likewise.
12266 (PTRACE_XFER_TYPE): Likewise.
12267 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12268 ptrace to PTRACE_ARG3_TYPE.
12269 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12270 (PTRACE_ARG4_TYPE): Likewise.
12271 (PTRACE_XFER_TYPE): Likewise.
12272 (linux_detach_one_lwp): Cast fourth argument of
12273 ptrace to long then PTRACE_ARG4_TYPE.
12274 (regsets_fetch_inferior_registers): Cast third argument of
12275 ptrace to long then PTRACE_ARG3_TYPE.
12276 (regsets_store_inferior_registers): Likewise.
12277
12278 2012-04-20 Pedro Alves <palves@redhat.com>
12279
12280 * configure: Regenerate.
12281
12282 2012-04-19 Pedro Alves <palves@redhat.com>
12283
12284 * Makefile.in (GNULIB_BUILDDIR): New.
12285 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12286 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12287 (all, install-only, uninstall, clean-info, all-lib, clean): No
12288 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12289 (maintainer-clean realclean distclean): Use subdir_do.
12290 (subdir_do): New.
12291 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12292 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12293 * acinclude.m4: Include acx_configure_dir.m4.
12294 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12295 calls. Call AC_PROG_RANLIB. Configure gnulib using
12296 ACX_CONFIGURE_DIR.
12297 (GNULIB): New.
12298 (GNULIB_STDINT_H): Adjust.
12299 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12300 * gdbreplay.c: Include build-gnulib/config.h.
12301 * server.h: Likewise.
12302 * aclocal.m4: Regenerate.
12303 * config.in: Regenerate.
12304 * configure: Regenerate.
12305
12306 2012-04-19 Pedro Alves <palves@redhat.com>
12307
12308 * Makefile.in (LIBGNU, INCGNU): Adjust.
12309 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12310 (all, install-only, uninstall, clean-info, all-lib, clean)
12311 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12312 * configure.ac: Adjust AC_OUTPUT output.
12313 * aclocal.m4: Regenerate.
12314 * configure: Regenerate.
12315
12316 2012-04-19 Pedro Alves <palves@redhat.com>
12317
12318 * Makefile.in (generated_files): New.
12319 (server_h): Remove the explicit dependency on config.h, and depend
12320 on $generated_files.
12321
12322 2012-04-19 Pedro Alves <palves@redhat.com>
12323
12324 * Makefile.in (INCGNU): Add -Ignulib.
12325
12326 2012-04-19 Pedro Alves <palves@redhat.com>
12327
12328 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12329 (INCGNU): ... this, and spell out -I here.
12330 (GNULIB_LIB): Rename to ...
12331 (LIBGNU): ... this.
12332 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12333
12334 2012-04-19 Pedro Alves <palves@redhat.com>
12335
12336 * config.in: Regenerate.
12337
12338 2012-04-19 Pedro Alves <palves@redhat.com>
12339
12340 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12341 * server.h (memmem): Remove declaration.
12342 * config.in: Regenerate.
12343 * configure: Regenerate.
12344
12345 2012-04-19 Yao Qi <yao@codesourcery.com>
12346
12347 * Makefile.in (SFILES): Add common/vec.c.
12348 (OBS): Add vec.o.
12349 (vec.o): New rule.
12350
12351 2012-04-19 Yao Qi <yao@codesourcery.com>
12352
12353 * remote-utils.c (prepare_resume_reply): Replace with macro
12354 target_core_of_thread.
12355 * server.c (handle_qxfer_threads_proper): Likewise.
12356 * target.h (traget_core_of_thread): New macro.
12357
12358 2012-04-18 Pedro Alves <palves@redhat.com>
12359
12360 * aclocal.m4: Regenerate.
12361 * configure: Regenerate.
12362
12363 2012-04-16 Yao Qi <yao@codesourcery.com>
12364
12365 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12366 duplicated on address.
12367
12368 2012-04-16 Yao Qi <yao@codesourcery.com>
12369
12370 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12371 (struct tracepoint_action_ops) <send>: New field.
12372 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12373 (agent_expr_send, x_tracepoint_action_send): New.
12374 (l_tracepoint_action_send): New.
12375 (cmd_qtdp): Download and install tracepoint
12376 according to `use_agent'.
12377 (run_inferior_command): Add one more parameter `len'.
12378 Update callers.
12379 (tracepoint_send_agent): New.
12380 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12381
12382 2012-04-16 Yao Qi <yao@codesourcery.com>
12383
12384 * tracepoint.c (download_tracepoints): Moved to ...
12385 (cmd_qtstart): ... here.
12386
12387 2012-04-14 Yao Qi <yao@codesourcery.com>
12388
12389 * tracepoint.c: Include inttypes.h.
12390 (struct collect_memory_action): Use sized types.
12391 (struct tracepoint): Likewise.
12392 (cmd_qtdp, stop_tracing): Update print specifiers.
12393 (cmd_qtp, response_tracepoint): Likewise.
12394 (collect_data_at_tracepoint): Likewise.
12395 (collect_data_at_step): Likewise.
12396
12397 2012-04-14 Yao Qi <yao@codesourcery.com>
12398
12399 Import gnulib module inttypes.
12400 * aclocal.m4, config.in, configure: Regenerated.
12401
12402 2012-04-14 Yao Qi <yao@codesourcery.com>
12403
12404 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12405 Makefile and config.status at last.
12406
12407 2012-04-13 Yao Qi <yao@codesourcery.com>
12408
12409 * tracepoint.c: Include stdint.h unconditionally.
12410
12411 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12412
12413 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12414 on BFD_HAVE_SYS_PROCFS_TYPE.
12415 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12416 * configure: Regenerate.
12417 * config.in: Likewise.
12418
12419 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12420
12421 * Makefile.in (clean): Also remove x32.c x32-linux.c
12422 x32-avx.c x32-avx-linux.c.
12423 (x32.o): New target.
12424 (x32.c): Likewise.
12425 (x32-linux.o): Likewise.
12426 (x32-linux.c): Likewise.
12427 (x32-avx.o): Likewise.
12428 (x32-avx.c): Likewise.
12429 (x32-avx-linux.o): Likewise.
12430 (x32-avx-linux.c): Likewise.
12431
12432 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12433 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12434 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12435 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12436 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12437 i386/x32-avx-linux.xml.
12438
12439 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12440 (init_registers_x32_avx_linux): Likwise.
12441 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12442 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12443
12444 2012-04-13 Pedro Alves <palves@redhat.com>
12445
12446 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12447 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12448 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12449 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12450 the sub-make.
12451
12452 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12453
12454 * linux-x86-low.c (compat_x32_clock_t): New.
12455 (compat_x32_siginfo_t): Likewise.
12456 (compat_x32_siginfo_from_siginfo): Likewise.
12457 (siginfo_from_compat_x32_siginfo): Likewise.
12458 (linux_is_elf64): Likewise.
12459 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12460 and siginfo_from_compat_x32_siginfo for x32.
12461 (x86_arch_setup): Set linux_is_elf64.
12462
12463 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12464
12465 PR gdb/13969
12466 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12467 e_machine field.
12468 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12469 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12470 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12471 compatible with process.
12472
12473 2012-04-12 Yao Qi <yao@codesourcery.com>
12474
12475 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12476 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12477 (install-only, install-info, clean): Handle sub dir gnulib.
12478 (all-lib, am--refresh): New targets.
12479 (memmem.o): Remove target.
12480 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12481 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12482 (AC_REPLACE_FUNCS): Remove memmem.
12483 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12484 (AC_OUTPUT): Generate Makefile in gnulib/.
12485 * aclocal.m4, config.in, configure: Regenerated.
12486
12487 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12488
12489 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12490
12491 2012-04-05 Pedro Alves <palves@redhat.com>
12492
12493 -Werror=strict-aliasing
12494
12495 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12496 pointer.
12497
12498 2012-04-04 Pedro Alves <palves@redhat.com>
12499
12500 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12501 (sparc_store_gregset_from_stack, sparc_store_gregset)
12502 (sparc_breakpoint_at): Fix formatting.
12503
12504 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12505
12506 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12507 are available.
12508 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12509 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12510 * config.in: Regenerate.
12511 * configure: Likewise.
12512
12513 2012-03-29 Pedro Alves <palves@redhat.com>
12514
12515 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12516 Correct ptrace arguments.
12517
12518 2012-03-28 Pedro Alves <palves@redhat.com>
12519
12520 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12521 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12522 (IA64_FR1_REGNUM): New defines.
12523 (ia64_fetch_register): New.
12524 (the_low_target): Install it.
12525 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12526 field.
12527 * linux-low.c (linux_fetch_registers): Try the
12528 the_low_target.fetch_register hook first.
12529
12530 * linux-arm-low.c (the_low_target): Adjust.
12531 * linux-bfin-low.c (the_low_target): Adjust.
12532 * linux-cris-low.c (the_low_target): Adjust.
12533 * linux-crisv32-low.c (the_low_target): Adjust.
12534 * linux-m32r-low.c (the_low_target): Adjust.
12535 * linux-m68k-low.c (the_low_target): Adjust.
12536 * linux-mips-low.c (the_low_target): Adjust.
12537 * linux-ppc-low.c (the_low_target): Adjust.
12538 * linux-s390-low.c (the_low_target): Adjust.
12539 * linux-sh-low.c (the_low_target): Adjust.
12540 * linux-sparc-low.c (the_low_target): Adjust.
12541 * linux-tic6x-low.c (the_low_target): Adjust.
12542 * linux-x86-low.c (the_low_target): Adjust.
12543 * linux-xtensa-low.c (the_low_target): Adjust.
12544
12545 2012-03-26 Pedro Alves <palves@redhat.com>
12546
12547 * server.c (handle_qxfer_libraries): Don't bail early if
12548 the_target->qxfer_libraries_svr4 is not NULL.
12549
12550 2012-03-26 Pedro Alves <palves@redhat.com>
12551
12552 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
12553
12554 2012-03-23 Pedro Alves <palves@redhat.com>
12555
12556 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
12557 "library-list-svr4" element's start tag when the the DSO list is
12558 empty.
12559
12560 2012-03-23 Pedro Alves <palves@redhat.com>
12561
12562 * linux-low.c (read_one_ptr): Read the inferior's pointer through
12563 a variable whose type size is the same as the inferior's pointer
12564 size.
12565
12566 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
12567
12568 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
12569 struct siginfo.
12570 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
12571 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
12572 * linux-low.h: Include <signal.h>.
12573 (struct siginfo): Remove forward declaration.
12574 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
12575 struct siginfo.
12576
12577 2012-03-21 Mike Frysinger <vapier@gentoo.org>
12578
12579 * .gitignore: Ignore more files.
12580
12581 2012-03-19 Pedro Alves <palves@redhat.com>
12582 Jan Kratochvil <jan.kratochvil@redhat.com>
12583
12584 * server.c (cont_thread, general_thread): Add describing comments.
12585 (start_inferior): Clear `cont_thread'.
12586 (handle_v_cont): Don't set `cont_thread' if resuming all threads
12587 of a process.
12588
12589 2012-03-15 Yao Qi <yao@codesourcery.com>
12590
12591 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
12592 handling to ...
12593 (cmd_qtdp): ... here.
12594
12595 2012-03-15 Yao Qi <yao@codesourcery.com>
12596
12597 * tracepoint.c (struct tracepoint_action_ops): New.
12598 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
12599 (m_tracepoint_action_download): New.
12600 (r_tracepoint_action_download): New.
12601 (x_tracepoint_action_download): New.
12602 (l_tracepoint_action_download): New.
12603 (add_tracepoint_action): Install `action->ops' according type.
12604 (download_tracepoint_1): Move code `download' function pointer
12605 of various tracepoint_action_ops.
12606
12607 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12608
12609 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
12610 linux_ptrace_attach_warnings.
12611
12612 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
12613
12614 * Makefile.in (linux-ptrace.o): New.
12615 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
12616 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
12617 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
12618 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
12619 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
12620 of these targets.
12621 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
12622
12623 2012-03-08 Yao Qi <yao@codesourcery.com>
12624 Pedro Alves <palves@redhat.com>
12625
12626 Fix PR server/13392.
12627 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
12628 offset of JMP insn.
12629 * tracepoint.c (remove_tracepoint): New.
12630 (cmd_qtdp): Call remove_tracepoint when failed to install.
12631
12632 2012-03-07 Pedro Alves <palves@redhat.com>
12633
12634 * linux-low.c (get_detach_signal): New.
12635 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
12636 Pass on pending signals to PTRACE_DETACH. Check the result of the
12637 ptrace call.
12638 * server.c (program_signals, program_signals_p): New.
12639 (handle_general_set): Handle QProgramSignals.
12640 * server.h (program_signals, program_signals_p): Declare.
12641
12642 2012-03-05 Pedro Alves <palves@redhat.com>
12643 Jan Kratochvil <jan.kratochvil@redhat.com>
12644
12645 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
12646 New comment why.
12647
12648 2012-03-03 Yao Qi <yao@codesourcery.com>
12649
12650 * tracepoint.c (tracepoint_look_up_symbols): Update call to
12651 agent_look_up_symbols.
12652
12653 2012-03-03 Yao Qi <yao@codesourcery.com>
12654
12655 * Makefile.in (linux-low.o): Keep dependence on agent.h.
12656 (linux-x86-low.o): Likewise.
12657 * server.h: Remove in_process_agent_loaded.
12658 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
12659 common/agent.c.
12660 Update callers.
12661
12662 2012-03-03 Yao Qi <yao@codesourcery.com>
12663
12664 * tracepoint.c (gdb_agent_capability): New global.
12665 (in_process_agent_loaded_ust): Renamed to
12666 `in_process_agent_supports_ust'.
12667 Update callers.
12668 (in_process_agent_supports_ust): Call agent_capability_check.
12669 (clear_installed_tracepoints): Assert that agent supports
12670 agent.
12671
12672 2012-03-03 Yao Qi <yao@codesourcery.com>
12673
12674 * linux-low.c (linux_supports_agent): New.
12675 (linux_target_ops): Initialize field `supports_agent' with
12676 linux_supports_agent.
12677 * target.h (struct target_ops) <supports_agent>: New.
12678 (target_supports_agent): New macro.
12679 * server.c (handle_general_set): Handle packet 'QAgent'.
12680 (handle_query): Send `QAgent+'.
12681 * Makefile.in (server.o): Depends on agent.h.
12682
12683 2012-03-03 Yao Qi <yao@codesourcery.com>
12684
12685 * Makefile.in (OBS): Add agent.o.
12686 Add new rule for agent.o.
12687 Track dependence of tracepoint.c on agent.h.
12688 * tracepoint.c (run_inferior_command_1):
12689 (run_inferior_command): Call agent_run_command.
12690 (gdb_ust_connect_sync_socket): Deleted. Move it to
12691 common/agent.c.
12692 (resume_thread, stop_thread): Likewise.
12693 (gdb_ust_socket_init): Renamed to ...
12694 (gdb_agent_socket_init): ... New.
12695 (gdb_ust_thread): Renamed to ...
12696 (gdb_agent_helper_thread): ... New.
12697 (gdb_ust_init): Move some code to ...
12698 (gdb_agent_init): ... here. New.
12699 [HAVE_UST]: Call gdb_ust_init.
12700 (initialize_tracepoint_ftlib): Call gdb_agent_init.
12701 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
12702 * config.in, configure: Regenerated.
12703
12704 2012-03-02 Pedro Alves <palves@redhat.com>
12705
12706 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
12707 * linux-low.c (struct simple_pid_list): New.
12708 (stopped_pids): New a struct simple_pid_list pointer.
12709 (add_to_pid_list, pull_pid_from_list): New.
12710 (handle_extended_wait): Don't assume the first signal new children
12711 report is SIGSTOP. Adjust call to pull_pid_from_list.
12712 (linux_wait_for_lwp): Adjust.
12713
12714 2012-03-02 Yao Qi <yao@codesourcery.com>
12715
12716 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
12717 debug log.
12718
12719 2012-03-02 Yao Qi <yao@codesourcery.com>
12720
12721 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
12722 `stop_pc' and `tpoint'. Update caller.
12723
12724 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
12725
12726 * linux-low.h (linux_target_ops): Add regset_bitmap member.
12727 * linux-low.c (use_linux_regsets): New macro.
12728 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
12729 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
12730 (linux_register_in_regsets): New function.
12731 (usr_fetch_inferior_registers): Skip registers covered by
12732 regsets.
12733 (usr_store_inferior_registers): Likewise.
12734 (usr_fetch_inferior_registers): New macro.
12735 (usr_store_inferior_registers): Likewise.
12736 (linux_fetch_registers): Handle mixed regset/non-regset targets.
12737 (linux_store_registers): Likewise.
12738 * linux-mips-low.c (init_registers_mips_dsp_linux): New
12739 prototype.
12740 (init_registers_mips64_dsp_linux): Likewise.
12741 (init_registers_mips_linux): New macro.
12742 (init_registers_mips_dsp_linux): Likewise.
12743 (mips_dsp_num_regs): Likewise.
12744 (DSP_BASE, DSP_CONTROL): New fallback macros.
12745 (mips_base_regs): New macro.
12746 (mips_regmap): Use it. Fix the size.
12747 (mips_dsp_regmap): New variable.
12748 (mips_dsp_regset_bitmap): Likewise.
12749 (mips_arch_setup): New function.
12750 (mips_cannot_fetch_register): Use the_low_target.regmap rather
12751 than mips_regmap.
12752 (mips_cannot_store_register): Likewise.
12753 (the_low_target): Update .arch_setup, .num_regs and .regmap
12754 initializers. Add .regset_bitmap initializer.
12755 * linux-arm-low.c (the_low_target): Add .regset_bitmap
12756 initializer.
12757 * linux-bfin-low.c (the_low_target): Likewise.
12758 * linux-cris-low.c (the_low_target): Likewise.
12759 * linux-crisv32-low.c (the_low_target): Likewise.
12760 * linux-ia64-low.c (the_low_target): Likewise.
12761 * linux-m32r-low.c (the_low_target): Likewise.
12762 * linux-m68k-low.c (the_low_target): Likewise.
12763 * linux-ppc-low.c (the_low_target): Likewise.
12764 * linux-s390-low.c (the_low_target): Likewise.
12765 * linux-sh-low.c (the_low_target): Likewise.
12766 * linux-sparc-low.c (the_low_target): Likewise.
12767 * linux-tic6x-low.c (the_low_target): Likewise.
12768 * linux-x86-low.c (the_low_target): Likewise.
12769 * linux-xtensa-low.c (the_low_target): Likewise.
12770 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
12771 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
12772 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
12773 srv_xmlfiles.
12774 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
12775 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
12776
12777 2012-02-29 Yao Qi <yao@codesourcery.com>
12778 Pedro Alves <palves@redhat.com>
12779
12780 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
12781 `step_over_finished' is true.
12782
12783 2012-02-27 Pedro Alves <palves@redhat.com>
12784
12785 * linux-low.c (pid_is_stopped): Delete, moved to common/.
12786 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
12787
12788 2012-02-27 Pedro Alves <palves@redhat.com>
12789
12790 PR server/9684
12791 * linux-low.c (pid_is_stopped): New.
12792 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
12793
12794 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
12795
12796 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
12797 of conditions.
12798
12799 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
12800
12801 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
12802
12803 2012-02-24 Luis Machado <lgustavo@codesourcery>
12804
12805 * server.c (handle_query): Advertise support for target-side
12806 breakpoint condition evaluation.
12807 (process_point_options): New function.
12808 (process_serial_event): When inserting a breakpoint, check for
12809 a target-side condition that should be evaluated.
12810
12811 * mem-break.c: Include regcache.h and ax.h.
12812 (point_cond_list_t): New data structure.
12813 (breakpoint) <cond_list>: New field.
12814 (find_gdb_breakpoint_at): Make non-static.
12815 (delete_gdb_breakpoint_at): Clear any target-side
12816 conditions.
12817 (clear_gdb_breakpoint_conditions): New function.
12818 (add_condition_to_breakpoint): Likewise.
12819 (add_breakpoint_condition): Likewise.
12820 (gdb_condition_true_at_breakpoint): Likewise.
12821 (gdb_breakpoint_here): Return result directly instead
12822 of going through a local variable.
12823
12824 * mem-break.h (find_gdb_breakpoint_at): New prototype.
12825 (clear_gdb_breakpoint_conditions): Likewise.
12826 (add_breakpoint_condition): Likewise.
12827 (gdb_condition_true_at_breakpoint): Likewise.
12828
12829 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
12830 (need_step_over_p): Take target-side breakpoint condition into
12831 consideration.
12832
12833 2012-02-24 Luis Machado <lgustavo@codesourcery>
12834
12835 * server.h: Include tracepoint.h.
12836 (agent_mem_read, agent_get_trace_state_variable_value,
12837 agent_set_trace_state_variable_value,
12838 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
12839 get_set_tsv_func_addr): New prototypes.
12840
12841 * ax.h: New include file.
12842 * ax.c: New source file.
12843
12844 * tracepoint.c: Include ax.h.
12845 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
12846 agent_expr, eval_result_type): Move to ax.h.
12847 (parse_agent_expr): Rename to ...
12848 (gdb_parse_agent_expr): ... this, make it non-static and move
12849 to ax.h.
12850 (unparse_agent_expr) Rename to ...
12851 (gdb_unparse_agent_expr): ... this, make it non-static and move
12852 to ax.h.
12853 (eval_agent_expr): Rename to ...
12854 (eval_tracepoint_agent_expr): ... this.
12855 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
12856 forward declarations.
12857 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
12858 (agent_get_trace_state_variable_value): New function.
12859 (agent_set_trace_state_variable_value): New function.
12860 (cmd_qtdp): Call gdb_parse_agent_expr (...).
12861 (response_tracepoint): Call gdb_unparse_agent_expr (...).
12862 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
12863 (condition_true_at_tracepoint): Likewise.
12864 (parse_agent_expr): Rename to ...
12865 (gdb_parse_agent_expr): ... this and move to ax.c.
12866 (unparse_agent_expr): Rename to ...
12867 (gdb_unparse_agent_expr): ... this and move to ax.c.
12868 (gdb_agent_op_name): Move to ax.c.
12869 (eval_agent_expr): Rename to ...
12870 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
12871 and move to ax.c.
12872 (eval_tracepoint_agent_expr): New function.
12873 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
12874 non-static.
12875 (current_insn_ptr, emit_error, struct bytecode_address): Move to
12876 ax.c.
12877 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
12878 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
12879 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
12880 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
12881 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
12882 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
12883 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
12884 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
12885 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
12886 (compile_bytecodes): Remove forward declaration.
12887 (is_goto_target): Move to ax.c.
12888 (compile_bytecodes): Move to ax.c and call
12889 agent_get_trace_state_variable_value (...) and
12890 agent_set_trace_state_variable_value (...).
12891
12892 * Makefile.in: Update ax.c and IPA dependencies.
12893
12894 2012-02-24 Pedro Alves <palves@redhat.com>
12895
12896 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
12897 (cmd_bigqtbuffer_circular): ... this. Only handle
12898 'QTBuffer:circular:'.
12899 (handle_tracepoint_general_set): Adjust.
12900
12901 2012-02-16 Yao Qi <yao@codesourcery.com>
12902
12903 * inferiors.c: Move code to ...
12904 * dll.c: .... here. New.
12905 * server.h: Declare clear_dlls.
12906 * Makefile.in (SFILES): Add dll.c.
12907 (OBS): Add dll.o
12908 (dll.o): New rule.
12909
12910 2012-02-11 Yao Qi <yao@codesourcery.com>
12911
12912 * server.c: (handle_monitor_command): Add a new parameter
12913 `own_buf'.
12914 (handle_query): Update caller.
12915
12916 2012-02-09 Joel Brobecker <brobecker@adacore.com>
12917
12918 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
12919 * configure, config.in: Regenerate.
12920 * hostio.c: Provide an alternate implementation if HAVE_READLINK
12921 is not defined.
12922
12923 2012-02-02 Pedro Alves <palves@redhat.com>
12924
12925 Try SIGKILL first, then PTRACE_KILL.
12926 * linux-low.c (linux_kill_one_lwp): New.
12927 (linux_kill_one_lwp): Rename to ...
12928 (kill_one_lwp_callback): ... this. Use the new
12929 linux_kill_one_lwp.
12930
12931 2012-02-02 Pedro Alves <palves@redhat.com>
12932
12933 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
12934 inferior.
12935
12936 2012-01-27 Pedro Alves <palves@redhat.com>
12937
12938 * linux-low.c (linux_child_pid_to_exec_file): Delete.
12939 (elf_64_file_p): Make static.
12940 (linux_pid_exe_is_elf_64_file): New.
12941 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
12942 Delete declarations.
12943 (linux_pid_exe_is_elf_64_file): Declare.
12944 * linux-x86-low.c (x86_arch_setup): Use
12945 linux_pid_exe_is_elf_64_file.
12946
12947 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12948
12949 * linux-low.c (linux_wait_for_event_1): Rename to ...
12950 (linux_wait_for_event): ... here and merge it with former
12951 linux_wait_for_event - new variable wait_ptid, use it.
12952 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
12953
12954 2012-01-23 Pedro Alves <palves@redhat.com>
12955
12956 * server.c (main): Avoid yet another case of infinite loop while
12957 detaching/killing after a longjmp.
12958
12959 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12960
12961 Code cleanup.
12962 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
12963
12964 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
12965
12966 * hostio.c (handle_readlink): New function.
12967 (handle_vFile): Call it to handle "vFile:readlink" packets.
12968
12969 2012-01-20 Pedro Alves <palves@redhat.com>
12970 Ulrich Weigand <ulrich.weigand@linaro.org>
12971
12972 * server.c (handle_v_requests): Only support vAttach and vRun to
12973 start multiple processes when in extended protocol mode.
12974
12975 2012-01-17 Pedro Alves <palves@redhat.com>
12976
12977 * tracepoint.c (initialize_tracepoint): Use mmap instead of
12978 memalign plus mprotect to allocate the scratch buffer.
12979
12980 2012-01-13 Pedro Alves <palves@redhat.com>
12981
12982 * server.c (attach_inferior): Clear `cont_thread'.
12983
12984 2012-01-13 Pedro Alves <palves@redhat.com>
12985
12986 * server.c (main): Avoid infinite loop while detaching/killing
12987 after a longjmp.
12988
12989 2012-01-09 Doug Evans <dje@google.com>
12990
12991 * server.c (start_inferior): Set last_ptid in --wrapper case.
12992
12993 2012-01-06 Yao Qi <yao@codesourcery.com>
12994
12995 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
12996 defined.
12997 [IN_PROCESS_AGENT] (debug_agent): New global variable.
12998
12999 2012-01-04 Yao Qi <yao@codesourcery.com>
13000
13001 * tracepoint.c (cmd_qtdp): Print debug message
13002 for static tracepoint.
13003
13004 2012-01-04 Yao Qi <yao@codesourcery.com>
13005
13006 * tracepoint.c (trace_vdebug): Differentiate debug message
13007 between gdbserver and IPA.
13008
13009 2012-01-03 Yao Qi <yao@codesourcery.com>
13010
13011 * tracepoint.c (tracepoint_was_hit): Don't collect for
13012 static tracepoint.
13013
13014 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13015
13016 * terminal.h: Reformat copyright header.
13017
13018 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13019
13020 * server.c (gdbserver_version): Update copyright year.
13021 * gdbreplay.c (gdbreplay_version): Likewise.
13022
13023 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13024
13025 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13026
13027 Revert:
13028 2011-12-18 Hui Zhu <teawater@gmail.com>
13029 * linux-low.c (linux_create_inferior): Save return value to ret.
13030
13031 2011-12-18 Hui Zhu <teawater@gmail.com>
13032
13033 * linux-low.c (linux_create_inferior): Save return value to ret.
13034
13035 2011-12-16 Doug Evans <dje@google.com>
13036
13037 * linux-low.c (linux_create_inferior): If stdio connection,
13038 redirect stdin from /dev/null, stdout to stderr.
13039 * remote-utils.c (remote_is_stdio): New static global.
13040 (remote_connection_is_stdio): New function.
13041 (remote_prepare): Handle stdio connection.
13042 (remote_open): Ditto.
13043 (remote_close): Don't close stdin for stdio connections.
13044 (read_prim,write_prim): New functions. Replace all calls to
13045 read/write to these.
13046 * server.c (main): Watch for "-" argument. Move call to
13047 remote_prepare before start_inferior.
13048 * server.h (STDIO_CONNECTION_NAME): New macro.
13049 (remote_connection_is_stdio): Declare.
13050
13051 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13052 in debugging output.
13053
13054 2011-12-15 Yao Qi <yao@codesourcery.com>
13055
13056 * tracepoint.c: Include sys/syscall.h.
13057 (gdb_ust_thread): Remove preprocessor conditional.
13058
13059 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13060
13061 * linux-low.c (linux_detach_one_lwp): Call
13062 the_low_target.prepare_to_resume before detaching.
13063
13064 2011-12-14 Yao Qi <yao@codesourcery.com>
13065
13066 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13067 of write.
13068
13069 2011-12-14 Yao Qi <yao@codesourcery.com>
13070
13071 * i386-low.c (i386_low_stopped_data_address): Initialize local
13072 variable `control'.
13073
13074 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13075
13076 PR remote/13492
13077
13078 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13079 DR_CONTROL unless necessary. Extend comments.
13080 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13081 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13082
13083 2011-12-13 Yao Qi <yao@codesourcery.com>
13084
13085 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13086 macros.
13087 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13088
13089 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13090
13091 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13092 Print new debug message for such case.
13093
13094 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13095
13096 Fix overlapping memcpy.
13097 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13098 the read_inferior_memory transfer.
13099 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13100 write_inferior_memory transfer.
13101 (set_fast_tracepoint_jump): New variable buf. Use it for the
13102 read_inferior_memory and write_inferior_memory transfers.
13103 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13104 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13105 Use it for the write_inferior_memory transfer.
13106 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13107 buffers.
13108
13109 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13110
13111 * linux-low.c (fetch_register, store_register): Make code
13112 consistent, fix formatting.
13113
13114 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13115
13116 * linux-low.c (usr_store_inferior_registers): Factor out code
13117 to handle individual registers into...
13118 (store_register): ... this new function.
13119
13120 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13121
13122 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13123 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13124 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13125 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13126 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13127 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13128 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13129 (srv_xmlfiles): Add new XML files.
13130
13131 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13132 and <sys/uio.h>.
13133 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13134 (init_registers_s390_linux32v1): Add prototype.
13135 (init_registers_s390_linux32v2): Likewise.
13136 (init_registers_s390_linux64v1): Likewise.
13137 (init_registers_s390_linux64v2): Likewise.
13138 (init_registers_s390x_linux64v1): Likewise.
13139 (init_registers_s390x_linux64v2): Likewise.
13140 (s390_num_regs): Increment to 52.
13141 (s390_regmap): Add orig_r2 register.
13142 (s390_num_regs_3264): Increment to 68.
13143 (s390_regmap_3264): Add orig_r2 register.
13144 (s390_collect_ptrace_register): Handle orig_r2 register.
13145 (s390_supply_ptrace_register): Likewise.
13146 (s390_fill_last_break): New function.
13147 (s390_store_last_break): Likewise.
13148 (s390_fill_system_call): New function.
13149 (s390_store_system_call): Likewise.
13150 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13151 register sets.
13152 (s390_check_regset): New function.
13153 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13154 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13155 Update target_regsets for available register sets.
13156
13157 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13158 Jan Kratochvil <jan.kratochvil@redhat.com>
13159
13160 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13161 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13162 New.
13163 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13164 * linux-low.h (struct process_info_private): New member r_debug.
13165 * server.c (handle_qxfer_libraries): Call
13166 the_target->qxfer_libraries_svr4.
13167 (handle_qxfer_libraries_svr4): New function.
13168 (qxfer_packets): New entry "libraries-svr4".
13169 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13170 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13171 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13172 PACKET_qXfer_libraries_svr4.
13173
13174 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13175
13176 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13177 PSW address/mask between 8-byte and 16-byte formats.
13178 (s390_supply_ptrace_register): Likewise.
13179 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13180 basic addressing mode bit.
13181
13182 2011-11-24 Stan Shebs <stan@codesourcery.com>
13183
13184 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13185
13186 2011-11-17 Stan Shebs <stan@codesourcery.com>
13187
13188 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13189 (tracing_start_time): New global.
13190 (tracing_stop_time): New global.
13191 (tracing_user_name): New global.
13192 (tracing_notes): New global.
13193 (tracing_stop_note): New global.
13194 (cmd_qtstart): Set traceframe_usage, start_time.
13195 (stop_tracing): Set stop_time.
13196 (cmd_qtstatus): Report additional status.
13197 (cmd_qtp): New function.
13198 (handle_tracepoint_query): Call it.
13199 (cmd_qtnotes): New function.
13200 (handle_tracepoint_general_set): Call it.
13201 (get_timestamp): Rename from tsv_get_timestamp.
13202
13203 2011-11-14 Stan Shebs <stan@codesourcery.com>
13204 Kwok Cheung Yeung <kcy@codesourcery.com>
13205
13206 * linux-x86-low.c (small_jump_insn): New.
13207 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13208 trampoline and error message, build a trampoline and issue a small
13209 jump instruction to it.
13210 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13211 trampoline and error message.
13212 (x86_get_min_fast_tracepoint_insn_len): New.
13213 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13214 * linux-low.h (struct linux_target_ops): Add arguments to
13215 install_fast_tracepoint_jump_pad operation, add new operation.
13216 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13217 arguments.
13218 (linux_get_min_fast_tracepoint_insn_len): New function.
13219 (linux_target_op): Add new operation.
13220 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13221 (gdb_trampoline_buffer_end): Ditto.
13222 (gdb_trampoline_buffer_error): Ditto.
13223 (struct ipa_sym_addresses): Add fields for new IPA variables.
13224 (symbol_list): Add entries for new IPA variables.
13225 (struct tracepoint): Add fields to hold the address range of the
13226 trampoline used by the tracepoint.
13227 (trampoline_buffer_head): New static variable.
13228 (trampoline_buffer_tail): Ditto.
13229 (claim_trampoline_space): New function.
13230 (have_fast_tracepoint_trampoline_buffer): New function.
13231 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13232 structure.
13233 (install_fast_tracepoint): Ditto, also add error buffer argument.
13234 (cmd_qtminftpilen): New function.
13235 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13236 (fast_tracepoint_from_trampoline_address): New function.
13237 (fast_tracepoint_collecting): Handle trampoline as part of jump
13238 pad space.
13239 (set_trampoline_buffer_space): New function.
13240 (initialize_tracepoint): Initialize new IPA variables.
13241 * target.h (struct target_ops): Add arguments to
13242 install_fast_tracepoint_jump_pad operation, add new
13243 get_min_fast_tracepoint_insn_len operation.
13244 (target_get_min_fast_tracepoint_insn_len): New.
13245 (install_fast_tracepoint_jump_pad): Add arguments.
13246 * server.h (IPA_BUFSIZ): Define.
13247 * linux-i386-ipa.c: Include extra header files.
13248 (initialize_fast_tracepoint_trampoline_buffer): New function.
13249 (initialize_low_tracepoint): Call it.
13250 * server.h (set_trampoline_buffer_space): Declare.
13251 (claim_trampoline_space): Ditto.
13252 (have_fast_tracepoint_trampoline_buffer): Ditto.
13253
13254 2011-11-14 Yao Qi <yao@codesourcery.com>
13255
13256 * server.c (handle_query): Handle InstallInTrace for qSupported.
13257 * tracepoint.c (add_tracepoint): Sort list.
13258 (install_tracepoint, download_tracepoint): New.
13259 (cmd_qtdp): Call them to install and download tracepoints.
13260 (sort_tracepoints): Removed.
13261 (cmd_qtstart): Update.
13262
13263 2011-11-14 Yao Qi <yao@codesourcery.com>
13264
13265 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13266 * mem-break.h: Declare.
13267 * tracepoint.c (cmd_qtstart): Move some code to ...
13268 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13269 New.
13270 (download_tracepoints): Move some code to ...
13271 (download_tracepoint_1): ... here. New.
13272
13273 2011-11-08 Yao Qi <yao@codesourcery.com>
13274
13275 * remote-utils.c (relocate_instruction): A comment fix.
13276
13277 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13278
13279 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13280 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13281 dr_status_mirror and dr_control_mirror from debug_reg_state.
13282 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13283 (i386_initial_stuff): Remove use of deleted globals.
13284 (i386_get_thread_context, i386_set_thread_context,
13285 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13286 from debug_reg_state.
13287
13288 2011-11-05 Yao Qi <yao@codesourcery.com>
13289
13290 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13291 address as TPOINT's.
13292
13293 2011-11-02 Stan Shebs <stan@codesourcery.com>
13294
13295 * tracepoint.c (agent_mem_read_string): New function.
13296 (eval_agent_expr): Call it for tracenz.
13297 * server.c (handle_query): Report support for tracenz.
13298
13299 2011-11-02 Yao Qi <yao@codesourcery.com>
13300
13301 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13302
13303 2011-11-02 Yao Qi <yao@codesourcery.com>
13304
13305 * target.h: Fix a typo in comment.
13306
13307 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13308
13309 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13310 clobber the breakpoints' shadows with fast tracepoint jumps.
13311 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13312 * target.c (write_inferior_memory): Also pass MYADDR down to
13313 check_mem_write.
13314
13315 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13316
13317 * configure.ac: Check support for personality routine.
13318 * configure: Regenerate.
13319 * config.in: Likewise.
13320 * linux-low.c: Include <sys/personality.h>.
13321 Define ADDR_NO_RANDOMIZE if necessary.
13322 (linux_create_inferior): Disable address space randomization when
13323 forking inferior, if requested.
13324 (linux_supports_disable_randomization): New function.
13325 (linux_target_ops): Install it.
13326 * server.h (disable_randomization): Declare.
13327 * server.c (disable_randomization): New global variable.
13328 (handle_general_set): Handle QDisableRandomization.
13329 (handle_query): Likewise for qSupported.
13330 (main): Support --disable-randomization and --no-disable-randomization
13331 command line arguments.
13332 * target.h (struct target_ops): Add supports_disable_randomization.
13333 (target_supports_disable_randomization): New macro.
13334
13335 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13336
13337 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13338 ifdef check.
13339 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13340 [!PT_GETDSBT] (target_loadmap): New definition.
13341 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13342 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13343 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13344 and PT_GETDSBT to LINUX_LOADMAP.
13345 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13346 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13347
13348 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13349
13350 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13351 (arm_linux_hwbp_cap): New static variable.
13352 (arm_linux_get_hwbp_cap): Replace by ...
13353 (arm_linux_init_hwbp_cap): ... this new function.
13354 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13355 (arm_linux_get_hw_watchpoint_count): Likewise.
13356 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13357 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13358 (arm_prepare_to_resume): Use perror_with_name instead of error.
13359
13360 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13361
13362 * linux-arm-low.c: Include <signal.h>.
13363 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13364 (struct arm_linux_hwbp_cap): New data type.
13365 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13366 (struct arm_linux_hw_breakpoint): New data type.
13367 (MAX_BPTS, MAX_WPTS): Define.
13368 (struct arch_process_info, struct arch_lwp_info): New data types.
13369 (arm_linux_get_hwbp_cap): New function.
13370 (arm_linux_get_hw_breakpoint_count): Likewise.
13371 (arm_linux_get_hw_watchpoint_count): Likewise.
13372 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13373 (arm_hwbp_control_initialize): Likewise.
13374 (arm_hwbp_control_is_enabled): Likewise.
13375 (arm_hwbp_control_is_initialized): Likewise.
13376 (arm_hwbp_control_disable): Likewise.
13377 (arm_linux_hw_breakpoint_equal): Likewise.
13378 (arm_linux_hw_point_initialize): Likewise.
13379 (struct update_registers_data): New data structure.
13380 (update_registers_callback: New function.
13381 (arm_insert_point): Likewise.
13382 (arm_remove_point): Likewise.
13383 (arm_stopped_by_watchpoint): Likewise.
13384 (arm_stopped_data_address): Likewise.
13385 (arm_new_process): Likewise.
13386 (arm_new_thread): Likewise.
13387 (arm_prepare_to_resume): Likewise.
13388 (the_low_target): Register arm_insert_point, arm_remove_point,
13389 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13390 arm_new_thread, and arm_prepare_to_resume.
13391
13392 2011-09-15 Stan Shebs <stan@codesourcery.com>
13393
13394 * server.h (struct emit_ops): Add compare-goto fields.
13395 * tracepoint.c (gdb_agent_op_sizes): New table.
13396 (emit_eq_goto): New function.
13397 (emit_ne_goto): New function.
13398 (emit_lt_goto): New function.
13399 (emit_le_goto): New function.
13400 (emit_gt_goto): New function.
13401 (emit_ge_goto): New function.
13402 (is_goto_target): New function.
13403 (compile_bytecodes): Recognize special cases of compare-goto
13404 combinations and call specialized emitters for them.
13405 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13406 (amd64_emit_ne_goto): New function.
13407 (amd64_emit_lt_goto): New function.
13408 (amd64_emit_le_goto): New function.
13409 (amd64_emit_gt_goto): New function.
13410 (amd64_emit_ge_goto): New function.
13411 (amd64_emit_ops): Add the new functions.
13412 (i386_emit_eq_goto): New function.
13413 (i386_emit_ne_goto): New function.
13414 (i386_emit_lt_goto): New function.
13415 (i386_emit_le_goto): New function.
13416 (i386_emit_gt_goto): New function.
13417 (i386_emit_ge_goto): New function.
13418 (i386_emit_ops): Add the new functions.
13419
13420 2011-09-08 Stan Shebs <stan@codesourcery.com>
13421
13422 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13423 (i386_emit_epilogue): Restore %ebx.
13424
13425 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13426
13427 * server.c (step_thread): Remove definition.
13428 (process_serial_event): Don't handle Hs.
13429 * server.h (step_thread): Remove declaration.
13430 * target.c (set_desired_inferior): Remove use of step_thread.
13431
13432 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13433
13434 * linux-low.c: Include linux-procfs.h.
13435 (linux_attach_lwp_1): Update comments.
13436 (linux_attach): Scan for existing threads when attaching to a
13437 process that is the tgid.
13438 * Makefile.in: Update dependencies.
13439
13440 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13441
13442 * configure.srv: Add linux-procfs.o dependencies.
13443
13444 2011-08-14 Yao Qi <yao@codesourcery.com>
13445
13446 * target.h (struct target_ops): Fix indent.
13447 * win32-low.c (win32_target_ops): Fix comment.
13448
13449 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13450 Yao Qi <yao@codesourcery.com>
13451
13452 * Makefile.in (clean): Remove tic6x-*.c files.
13453 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13454 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13455 (tic6x-c64xp-linux.c): Likewise.
13456 * configure.srv: Add support for tic6x-*-uclinux.
13457 * linux-tic6x-low.c: New.
13458 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13459
13460 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13461 Yao Qi <yao@codesourcery.com>
13462
13463 * target.h (struct target_ops): Add read_loadmap.
13464 * linux-low.c (struct target_loadseg): New type.
13465 (struct target_loadmap): New type.
13466 (linux_read_loadmap): New function.
13467 (linux_target_ops): Add linux_read_loadmap.
13468 * server.c (handle_query): Support qXfer:fdpic:read packet.
13469 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13470 to NULL.
13471
13472 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13473
13474 * win32-low.c: Include <stdint.h>.
13475
13476 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13477
13478 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13479 to the inferior here.
13480 (i386_remove_aligned_watchpoint): Ditto.
13481 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13482 fit part of the watchpoint in the debug registers.
13483 (i386_update_inferior_debug_regs): New.
13484 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13485 registers, and only update the inferior on success.
13486 (i386_low_remove_watchpoint): Ditto.
13487
13488 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13489
13490 * linux-low.c (compare_ints, unique, list_threads, show_process,
13491 linux_core_of_thread): Delete.
13492 (linux_target_ops): Change linux_core_of_thread to
13493 linux_common_core_of_thread.
13494 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13495 * utils.c (malloc_failure): Change type of argument.
13496 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13497 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13498 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13499 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13500 (IPA_OBJS): Add common-utils-ipa.o.
13501 (ptid_h, linux_osdata_h): New macros.
13502 (server_h): Add common/common-utils.h, common/xml-utils.h,
13503 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13504 common/ptid.h.
13505 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13506 ptid.o, buffer.o): New rules.
13507 (linux-low.o): Add common/linux-osdata.h as a dependency.
13508 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13509 * configure.ac: Add AC_HEADER_DIRENT check.
13510 * config.in: Regenerate.
13511 * configure: Regenerate.
13512 * remote-utils.c (xml_escape_text): Delete.
13513 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13514 buffer_xml_printf): Move to common/buffer.c.
13515 * server.c (main): Remove call to initialize_inferiors.
13516 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13517 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13518 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13519 internal_error, gdb_assert, gdb_assert_fail): Delete.
13520 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13521 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13522 common/buffer.h.
13523 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13524 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13525 initialize_inferiors): Delete.
13526
13527 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13528
13529 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13530 symbol error.
13531
13532 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13533
13534 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13535 assertion.
13536 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
13537
13538 2011-05-26 Yao Qi <yao@codesourcery.com>
13539
13540 * Makefile.in (thread-db.o): Track dependence to
13541 common/gdb_thread_db.h.
13542 * thread-db.c: include gdb_thread_db.h from right place.
13543
13544 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
13545
13546 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
13547 __FILE__ and __LINE__ to internal_error.
13548
13549 2011-05-13 Doug Evans <dje@google.com>
13550
13551 * thread-db.c (try_thread_db_load_from_sdir): New function.
13552 (try_thread_db_load_from_dir): New function.
13553 (thread_db_load_search): Handle $sdir, ignore $pdir.
13554 Remove trying of system directories if search of
13555 libthread-db-search-path fails, that is now done via $sdir.
13556
13557 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
13558
13559 * server.c (handle_query): Add EnableDisableTracepoints to the list
13560 of supported features.
13561 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
13562 tracepoints.
13563 (cmd_qtenable_disable): New.
13564 (cmd_qtstart): Install tracepoints even if disabled.
13565 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
13566 receiving a QTEnable or QTDisable packet.
13567 (gdb_collect): Skip data collection if fast tracepoint is disabled.
13568 (ust_marker_to_static_tracepoint): Do not ignore disabled static
13569 tracepoints.
13570 (gdb_probe): Skip data collection if static tracepoint is disabled.
13571
13572 2011-05-10 Doug Evans <dje@google.com>
13573
13574 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
13575
13576 2011-05-04 Doug Evans <dje@google.com>
13577
13578 * linux-low.c (linux_join): Skip process lookup.
13579 * spu-low.c (spu_join): Ditto.
13580 * server.c (join_inferiors_callback): Delete.
13581 (process_serial_event): For 'D' packet (detach) call join_inferior
13582 directly.
13583
13584 2011-05-04 Joseph Myers <joseph@codesourcery.com>
13585
13586 * README: Don't mention xscale*-*-linux*.
13587 * configure.srv (xscale*-*-linux*): Don't handle target.
13588
13589 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
13590
13591 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
13592 casting pointers.
13593 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
13594 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
13595 (i386_emit_void_call_2): Likewise.
13596
13597 2011-04-26 Yao Qi <yao@codesourcery.com>
13598
13599 * linux-low.c: Move common macros to linux-ptrace.h.
13600 Include linux-ptrace.h.
13601 * Makefile.in (linux_ptrace_h): New.
13602 (linux-low.o): Depends on linux-ptrace.h.
13603
13604 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
13605
13606 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
13607 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
13608 (remote_prepare): New function with most of the TCP code from ...
13609 (remote_open): ... here. Detect PORT here unconditionally. Move also
13610 setting transport_is_reliable.
13611 * server.c (run_once): New variable.
13612 (gdbserver_usage): Document it.
13613 (main): Set run_once for `--once'. Call remote_prepare. Exit after
13614 the first run if RUN_ONCE.
13615 * server.h (run_once, remote_prepare): New declarations.
13616
13617 2011-04-19 Tom Tromey <tromey@redhat.com>
13618
13619 * win32-low.c (handle_load_dll): Remove duplicate "the".
13620
13621 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
13622
13623 Remove support for old Cygwin 1.5 versions.
13624 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
13625 function to avoid warning.
13626 (win32_add_one_solib): Use cygwin_conv_path function to avoid
13627 warning.
13628
13629 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
13630
13631 * gdbserver/server.h (Macro _): Define it if not available.
13632
13633 2011-03-14 Michael Snyder <msnyder@vmware.com>
13634
13635 * hostio.c (handle_close): Remove unnecessary null test.
13636
13637 2011-03-10 Joel Brobecker <brobecker@adacore.com>
13638
13639 * Makefile.in (maintainer-clean realclean distclean): Remove
13640 "make ... subdir_do" command.
13641
13642 2011-03-10 Michael Snyder <msnyder@vmware.com>
13643
13644 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
13645
13646 * server.c (handle_v_run): Free alloced buffer on early return.
13647
13648 2011-03-09 Yao Qi <yao@codesourcery.com>
13649
13650 Revert:
13651 2011-03-04 Yao Qi <yao@codesourcery.com>
13652
13653 * Makefile.in: Remove GNU make feature --directory.
13654
13655 2011-03-05 Yao Qi <yao@codesourcery.com>
13656
13657 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13658 (subdir_do): New make target. Copied from gdb/Makefile.
13659 (maintainer-clean, realclean, distclean, clean): Call corresponding
13660 make targets in common/Makefile.
13661
13662 2011-02-11 Yao Qi <yao@codesourcery.com>
13663
13664 * configure.ac: Call AC_PROG_RANLIB.
13665 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13666 * configure: Regenerate.
13667
13668 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
13669
13670 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
13671
13672 2011-03-06 Yao Qi <yao@codesourcery.com>
13673
13674 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
13675
13676 2011-03-05 Yao Qi <yao@codesourcery.com>
13677
13678 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
13679 (subdir_do): New make target. Copied from gdb/Makefile.
13680 (maintainer-clean, realclean, distclean, clean): Call corresponding
13681 make targets in common/Makefile.
13682
13683 2011-03-04 Yao Qi <yao@codesourcery.com>
13684
13685 * Makefile.in: Remove GNU make feature --directory.
13686
13687 2011-03-04 Michael Snyder <msnyder@vmware.com>
13688
13689 * server.c (queue_stop_reply): Call xmalloc not malloc.
13690
13691 2011-03-02 Michael Snyder <msnyder@vmware.com>
13692
13693 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
13694
13695 2011-02-28 Michael Snyder <msnyder@vmware.com>
13696
13697 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
13698 (cmd_qtframe): Ditto.
13699 (cmd_qtbuffer): Ditto.
13700 (cmd_bigqtbuffer): Ditto.
13701
13702 * utils.c (decimal2str): Initialize 'width' to nine, then
13703 don't mess with it.
13704
13705 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13706
13707 * hostio.c (require_data): Free *data, not data.
13708
13709 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13710
13711 * hostio.c (require_data): Use free, not xfree.
13712
13713 2011-02-27 Michael Snyder <msnyder@vmware.com>
13714
13715 * server.c (handle_query): Discard unused value.
13716
13717 * hostio.c (require_data): Free malloc memory before returning
13718 error.
13719
13720 2011-02-26 Michael Snyder <msnyder@vmware.com>
13721
13722 * linux-low.c (list_threads): Call closedir for dirent.
13723
13724 2011-02-27 Michael Snyder <msnyder@vmware.com>
13725
13726 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
13727 a case statement falls through.
13728
13729 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
13730
13731 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
13732 in comparison.
13733
13734 2011-02-26 Michael Snyder <msnyder@vmware.com>
13735
13736 * utils.c (decimal2str): Eliminate dead code and dead param.
13737 (pulongest): Drop dead param from call to decimal2str.
13738 (plongest): Ditto.
13739
13740 2011-02-24 Joel Brobecker <brobecker@adacore.com>
13741
13742 Revert the following patch (not approved yet):
13743 2011-02-21 Hui Zhu <teawater@gmail.com>
13744 * tracepoint.c (tp_printf): New function.
13745 (eval_agent_expr): Handle gdb_agent_op_printf.
13746
13747 2011-02-21 Hui Zhu <teawater@gmail.com>
13748
13749 * tracepoint.c (tp_printf): New function.
13750 (eval_agent_expr): Handle gdb_agent_op_printf.
13751
13752 2011-02-18 Tom Tromey <tromey@redhat.com>
13753
13754 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
13755 (tracepoint.o): Likewise.
13756 * tracepoint.c (enum gdb_agent_op): Use ax.def.
13757 (gdb_agent_op_names): Likewise.
13758
13759 2011-02-18 Tom Tromey <tromey@redhat.com>
13760
13761 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
13762 gdb_agent_op_rot>: New constants.
13763 (gdb_agent_op_names): Add pick and roll.
13764 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
13765 cases.
13766
13767 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
13768
13769 * aclocal.m4: Regenerated with aclocal-1.11.1.
13770
13771 2011-02-14 Pedro Alves <pedro@codesourcery.com>
13772
13773 * server.c (handle_qxfer_traceframe_info): New.
13774 (qxfer_packets): Register "traceframe-info".
13775 (handle_query): Report support for qXfer:traceframe-info:read+.
13776 * tracepoint.c (match_blocktype): New.
13777 (traceframe_find_block_type): Rename to ...
13778 (traceframe_walk_blocks): ... this. Add callback filter argument,
13779 and use it.
13780 (traceframe_find_block_type): New, reimplemented on top of
13781 traceframe_walk_blocks.
13782 (build_traceframe_info_xml): New.
13783 (traceframe_read_info): New.
13784 * server.h (traceframe_read_info): Declare.
13785
13786 2011-02-11 Yao Qi <yao@codesourcery.com>
13787
13788 * configure.ac: Call AC_PROG_RANLIB.
13789 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
13790 * configure: Regenerate.
13791
13792 2011-02-07 Pedro Alves <pedro@codesourcery.com>
13793
13794 * server.c (gdb_read_memory): Change return semantics to allow
13795 partial transfers.
13796 (handle_search_memory_1): Adjust.
13797 (process_serial_event) <'m' packet>: Handle partial transfers.
13798 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
13799
13800 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13801
13802 * regcache.c (init_register_cache): Initialize
13803 regcache->register_status.
13804 (free_register_cache): Release regcache->register_status.
13805 (regcache_cpy): Copy register_status.
13806 (registers_to_string): Print 'x's for unavailable registers.
13807 (supply_register): Mark the register's status valid or
13808 unavailable, depending on whether a buffer was passed in or not.
13809 (supply_register_zeroed): New.
13810 (supply_regblock): Mark the registers' status valid or
13811 unavailable, depending on whether a buffer was passed in or not.
13812 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
13813 (struct regcache): New `register_status' field.
13814 (supply_register_zeroed): Declare.
13815 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
13816 supply_register_zeroed, rather than passing a NULL buffer to
13817 supply_register.
13818 * tracepoint.c (fetch_traceframe_registers): Update comment.
13819
13820 2011-01-28 Pedro Alves <pedro@codesourcery.com>
13821
13822 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
13823 buffer explicit.
13824
13825 2011-01-25 Pedro Alves <pedro@codesourcery.com>
13826
13827 * server.h (decode_xfer_write): Change prototype.
13828 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
13829 and don't extract the annex here.
13830 * server.c (decode_xfer_read): Remove `annex' parameter,
13831 and don't extract the annex here.
13832 (decode_xfer): New.
13833 (struct qxfer): New.
13834 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
13835 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
13836 (handle_qxfer_statictrace): New functions, abstracted out from
13837 handle_query, and made to use the struct qxfer interface.
13838 (handle_threads_qxfer_proper): Rename to ...
13839 (handle_qxfer_threads_proper): ... this.
13840 (handle_threads_qxfer): Rename to ...
13841 (handle_qxfer_threads): ... this. Adjust.
13842 (qxfer_packets): New array.
13843 (handle_qxfer): New function.
13844 (handle_query): Use handle_qxfer.
13845
13846 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
13847
13848 * gdbreplay.c: Shorten lines of >= 80 columns.
13849 * linux-low.c: Ditto.
13850 * linux-ppc-low.c: Ditto.
13851 * linux-s390-low.c: Ditto.
13852 * linux-sparc-low.c: Ditto.
13853 * linux-x86-low.c: Ditto.
13854 * linux-xtensa-low.c: Ditto.
13855 * mem-break.c: Ditto.
13856 * nto-low.c: Ditto.
13857 * regcache.h: Ditto.
13858 * remote-utils.c: Ditto.
13859 * server.c: Ditto.
13860 * server.h: Ditto.
13861 * thread-db.c: Ditto.
13862 * tracepoint.c: Ditto.
13863 * utils.c: Ditto.
13864 * win32-low.h: Ditto.
13865
13866 2011-01-05 Joel Brobecker <brobecker@adacore.com>
13867
13868 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
13869 update.
13870
13871 2011-01-01 Joel Brobecker <brobecker@adacore.com>
13872
13873 * server.c (gdbserver_version): Update copyright year in version
13874 output.
13875 * gdbreplay.c (gdbreplay_version): Ditto.
13876
13877 2010-12-29 Jie Zhang <jie.zhang@analog.com>
13878
13879 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
13880 * linux-bfin-low.c: New file.
13881 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
13882 PT_DATA_ADDR for BFIN targets.
13883 * Makefile.in (SFILES): Add linux-bfin-low.c.
13884 (clean): Remove reg-bfin.c.
13885 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
13886 * README: Mention supported Blackfin targets.
13887
13888 2010-12-23 Mike Frysinger <vapier@gentoo.org>
13889
13890 * .gitignore: New file.
13891
13892 2010-11-16 Mike Frysinger <vapier@gentoo.org>
13893
13894 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
13895
13896 2010-10-22 Jie Zhang <jie@codesourcery.com>
13897
13898 * Makefile.in: Add FLAGS_TO_PASS variable.
13899 (install): Remove dependency of install-only and recursively
13900 invoke make for install-only.
13901
13902 2010-10-04 Doug Evans <dje@google.com>
13903
13904 * Makefile.in (uninstall): Use $(DESTDIR).
13905
13906 2010-09-24 Pedro Alves <pedro@codesourcery.com>
13907
13908 PR gdb/11842
13909
13910 * linux-x86-low.c (compat_siginfo_from_siginfo)
13911 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
13912 si_code is < 0. Check for si_code == SI_TIMER before checking for
13913 si_code < 0.
13914
13915 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13916
13917 * lynx-i386-low.c: New file.
13918 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
13919
13920 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13921
13922 * lynx-low.c (ptrace_request_to_str): Remove handling for
13923 request values that have been removed in LynxOS 5.x.
13924
13925 2010-09-13 Joel Brobecker <brobecker@adacore.com>
13926
13927 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
13928 <ptrace.h>
13929
13930 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13931
13932 * configure.ac: Add --enable-inprocess-agent option.
13933 * configure: Rebuilt.
13934
13935 2010-09-06 Yao Qi <yao@codesourcery.com>
13936
13937 * linux-low.c (linux_kill): Remove unused variable.
13938 (linux_stabilize_threads): Likewise.
13939 * server.c (start_inferior): Likewise.
13940 (queue_stop_reply_callback): Likewise.
13941 * tracepoint.c (do_action_at_tracepoint): Likewise.
13942
13943 2010-09-06 Yao Qi <yao@codesourcery.com>
13944
13945 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
13946 on return.
13947
13948 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13949
13950 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
13951
13952 2010-09-06 Pedro Alves <pedro@codesourcery.com>
13953
13954 * Makefile.in (install-only): Replace $IPA_DEPFILES with
13955 "$(IPA_DEPFILES)".
13956
13957 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13958
13959 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
13960 gdbserver/lynx-ppc-low.c: New files.
13961 * Makefile.in (lynx_low_h): New variable.
13962 (lynx-low.o, lynx-ppc-low.o): New rules.
13963 * configure.ac: On LynxOS, link with -lnetinet.
13964 * configure.srv: Add handling of powerpc-*-lynxos* targets.
13965 * configure: regenerate.
13966
13967 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13968
13969 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
13970 * configure.ac: Add check for vasprintf and vsnprintf.
13971 * configure, config.in: Regenerate.
13972 * server.h (vasprintf, vsnprintf): Add conditional declarations.
13973
13974 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13975
13976 * gdbreplay.c: Move include of alloca.h up, next to include of
13977 malloc.h.
13978 * server.h: Add include of malloc.h.
13979 * mem-break.c: Remove include of malloc.h.
13980 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
13981
13982 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13983
13984 * Makefile.in (memmem.o): Build with -Wno-error.
13985
13986 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13987
13988 * utils.c (xsnprintf): Make non-static.
13989 * server.h: Add xsnprintf declaration.
13990 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
13991 replace calls to snprintf by calls to xsnprintf throughout.
13992
13993 2010-09-01 Joel Brobecker <brobecker@adacore.com>
13994
13995 * configure.ac: Add configure check for alloca.
13996 * configure, config.in: Regenerate.
13997 * server.h: Include alloca.h if it exists.
13998 * gdbreplay.c: Include alloca.h if it exists.
13999
14000 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14001
14002 * linux-low.c (__SIGRTMIN): Define if not already defined.
14003 (linux_create_inferior): Check for __ANDROID__ rather than
14004 __SIGRTMIN.
14005 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14006 are already deferred.
14007 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14008 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14009 stopped and already has a pending signal to report.
14010 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14011 a pending signal to report or is moving out of a jump pad.
14012 (linux_init_signals): Check for __ANDROID__ rather than
14013 __SIGRTMIN.
14014
14015 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14016
14017 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14018 debug_threads check. Avoid a linear search when not doing debug
14019 output.
14020
14021 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14022
14023 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14024 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14025 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14026 (process_event): Change local fd's type to gdb_fildes_t.
14027 (create_file_handler): Adjust prototype.
14028 (delete_file_handler): Adjust prototype.
14029 (handle_file_event): Adjust prototype. Use pfildes.
14030 (create_file_event): Adjsut prototype.
14031 * remote-utils.c (remote_desc, listen_desc): Change type to
14032 gdb_fildes_t.
14033 * server.h: New gdb_fildes_t typedef.
14034 [USE_WIN32API]: Include winsock2.h.
14035 (delete_file_handler, add_file_handler): Adjust prototypes.
14036 (pfildes): Declare.
14037 * utils.c (pfildes): New.
14038
14039 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14040
14041 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14042 * configure: Regenerate.
14043
14044 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14045
14046 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14047 (linux_done_accessing_memory): ... this.
14048 (linux_target_ops): Adjust.
14049 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14050 * nto-low.c (nto_target_ops): Adjust comment.
14051 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14052 * spu-low.c (spu_target_ops): Adjust comment.
14053 * target.h (target_ops): Rename unprepare_to_access_memory field
14054 to done_accessing_memory.
14055 (unprepare_to_access_memory): Rename to ...
14056 (done_accessing_memory): ... this.
14057
14058 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14059
14060 * linux-low.c (linux_prepare_to_access_memory): New.
14061 (linux_unprepare_to_access_memory): New.
14062 (linux_target_ops): Install them.
14063 * server.c (read_memory): Rename to ...
14064 (gdb_read_memory): ... this. Use
14065 prepare_to_access_memory/prepare_to_access_memory.
14066 (write_memory): Rename to ...
14067 (gdb_write_memory): ... this. Use
14068 prepare_to_access_memory/prepare_to_access_memory.
14069 (handle_search_memory_1): Adjust.
14070 (process_serial_event): Adjust.
14071 * target.h (struct target_ops): New fields
14072 prepare_to_access_memory and unprepare_to_access_memory.
14073 (prepare_to_access_memory, unprepare_to_access_memory): New.
14074 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14075 prepare_to_access_memory/prepare_to_access_memory.
14076 * nto-low.c (nto_target_ops): Adjust.
14077 * spu-low.c (spu_target_ops): Adjust.
14078 * win32-low.c (win32_target_ops): Adjust.
14079
14080 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14081
14082 * Makefile.in (WARN_CFLAGS): Get it from configure.
14083 (WERROR_CFLAGS): New.
14084 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14085 * configure.ac: Introduce --enable-werror, which adds -Werror to
14086 the compiler command line. Enabled by default. Disable with
14087 --disable-werror. Add -Wdeclaration-after-statement
14088 Wpointer-arith and -Wformat-nonliteral to warning flags.
14089 * configure: Regenerate.
14090
14091 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14092
14093 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14094
14095 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14096
14097 * gdbreplay.c (remote_error): New.
14098 (gdbchar): New.
14099 (expect): Use gdbchar. Check for error reading from GDB.
14100 Clarify sync error output.
14101 (play): Check for errors writing to GDB.
14102 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14103 * remote-utils.c (getpkt): Check for errors writing to the remote
14104 descriptor.
14105
14106 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14107
14108 * linux-low.c (linux_wait_1): Move non-debugging code out of
14109 `debug_threads' control.
14110
14111 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14112
14113 * linux-low.c (linux_wait_1): Don't set last_status here.
14114 * server.c (push_event, queue_stop_reply_callback): Assert we're
14115 not pushing a TARGET_WAITKIND_IGNORE event.
14116 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14117 (myresume, handle_target_event): Set the thread's last_resume_kind
14118 and last_status from the target returned status.
14119
14120 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14121
14122 PR threads/10729
14123
14124 * linux-x86-low.c (update_debug_registers_callback): New.
14125 (i386_dr_low_set_addr): Use it.
14126 (i386_dr_low_get_addr): New.
14127 (i386_dr_low_set_control): Use update_debug_registers_callback.
14128 (i386_dr_low_get_control): New.
14129 (i386_dr_low_get_status): Adjust.
14130 * linux-low.c (linux_stop_lwp): New.
14131 * linux-low.h (linux_stop_lwp): Declare.
14132
14133 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14134 argument instead of a i386_debug_reg_state.
14135 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14136 a i386_debug_reg_state.
14137 (i386_insert_aligned_watchpoint): Adjust.
14138 (i386_remove_aligned_watchpoint): Adjust.
14139 (i386_low_stopped_data_address): Read the debug registers from the
14140 inferior instead of from the mirrors.
14141 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14142 (i386_dr_low_get_addr): Declare.
14143 (i386_dr_low_get_control): Declare.
14144 (i386_dr_low_get_status): Change prototype.
14145
14146 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14147 (i386_dr_low_get_addr): New.
14148 (i386_dr_low_get_control): New.
14149 (i386_dr_low_get_status): Adjust prototype. Return
14150 dr_status_mirror.
14151 (i386_initial_stuff): Clear dr_status_mirror and
14152 dr_control_mirror.
14153 (i386_get_thread_context): Adjust.
14154 (i386_set_thread_context): Adjust.
14155 (i386_thread_added): Adjust.
14156
14157 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14158
14159 * linux-low.h (linux_thread_area): Delete declaration.
14160
14161 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14162
14163 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14164 after its termination.
14165
14166 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14167
14168 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14169 (gdb_wants_all_stopped): Delete.
14170 (linux_wait_1): Don't call them.
14171 * server.c (handle_v_cont): Tag all threads as want-stopped.
14172 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14173 stopped as "client-wants-stopped".
14174
14175 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14176
14177 * Makefile.in (signals_h): New.
14178 (server_h): Depend on it.
14179 (server.o): Don't depend on $(signals_def).
14180 (signals.o): Depend on $(signals_def).
14181
14182 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14183
14184 * Makefile.in (signals_def): New.
14185 (server_h): Append include/gdb/signals.h and signals_def.
14186 (server.o): Append signals_def.
14187
14188 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14189
14190 * server.c (handle_target_event): Use target_signal_to_host for
14191 resume_info.sig initialization.
14192 * target.h (struct thread_resume) <sig>: New comment.
14193
14194 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14195
14196 * server.c (handle_query): strcpy() the returned string from paddress()
14197 instead of sprintf().
14198 * utils.c (paddress): Return phex_nz().
14199
14200 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14201
14202 * server.c (handle_v_cont): Call mourn_inferior if process
14203 just exited.
14204 (myresume): Likewise.
14205
14206 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14207
14208 Static tracepoints, and integration with UST.
14209
14210 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14211 * mem-break.c (uninsert_all_breakpoints)
14212 (reinsert_all_breakpoints): New.
14213 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14214 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14215 (gdb_agent_ust_loaded, helper_thread_id)
14216 (gdb_agent_helper_thread_id): New macros.
14217 (struct ipa_sym_addresses): Add addr_ust_loaded,
14218 addr_helper_thread_id, addr_cmd_buf.
14219 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14220 (in_process_agent_loaded_ust): New.
14221 (write_e_ust_not_loaded): New.
14222 (maybe_write_ipa_ust_not_loaded): New.
14223 (struct collect_static_trace_data_action): New.
14224 (enum tracepoint_type) <static_tracepoint>: New.
14225 (struct tracepoint) <handle>: Mention static tracepoints.
14226 (struct static_tracepoint_ctx): New.
14227 (CMD_BUF_SIZE): New.
14228 (add_tracepoint_action): Handle static tracepoint actions.
14229 (unprobe_marker_at): New.
14230 (clear_installed_tracepoints): Handle static tracepoints.
14231 (cmd_qtdp): Handle static tracepoints.
14232 (probe_marker_at): New.
14233 (cmd_qtstart): Handle static tracepoints.
14234 (response_tracepoint): Handle static tracepoints.
14235 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14236 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14237 (get_context_regcache): Handle static tracepoints.
14238 (do_action_at_tracepoint): Handle static tracepoint actions.
14239 (traceframe_find_block_type): Handle static trace data blocks.
14240 (traceframe_read_sdata): New.
14241 (download_tracepoints): Download static tracepoint actions.
14242 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14243 (GDB_PROBE_NAME): New.
14244 (ust_ops): New.
14245 (GET_UST_SYM): New.
14246 (USTF): New.
14247 (dlsym_ust): New.
14248 (ust_marker_to_static_tracepoint): New.
14249 (gdb_probe): New.
14250 (collect_ust_data_at_tracepoint): New.
14251 (gdb_ust_probe): New.
14252 (UNIX_PATH_MAX, SOCK_DIR): New.
14253 (gdb_ust_connect_sync_socket): New.
14254 (resume_thread, stop_thread): New.
14255 (run_inferior_command): New.
14256 (init_named_socket): New.
14257 (gdb_ust_socket_init): New.
14258 (cstr_to_hexstr): New.
14259 (next_st): New.
14260 (first_marker, next_marker): New.
14261 (response_ust_marker): New.
14262 (cmd_qtfstm, cmd_qtsstm): New.
14263 (unprobe_marker_at, probe_marker_at): New.
14264 (cmd_qtstmat, gdb_ust_thread): New.
14265 (gdb_ust_init): New.
14266 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14267 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14268 (ST_REGENTRY): New.
14269 (x86_64_st_collect_regmap): New.
14270 (X86_64_NUM_ST_COLLECT_GREGS): New.
14271 (AMD64_RIP_REGNUM): New.
14272 (supply_static_tracepoint_registers): New.
14273 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14274 (ST_REGENTRY): New.
14275 (i386_st_collect_regmap): New.
14276 (i386_NUM_ST_COLLECT_GREGS): New.
14277 (supply_static_tracepoint_registers): New.
14278 * server.c (handle_query): Handle qXfer:statictrace:read.
14279 <qSupported>: Report support for StaticTracepoints, and
14280 qXfer:statictrace:read features.
14281 * server.h (traceframe_read_sdata)
14282 (supply_static_tracepoint_registers): Declare.
14283 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14284 (unpack_varlen_hex): Include in IPA build.
14285 * Makefile.in (ustlibs, ustinc): New.
14286 (IPA_OBJS): Add remote-utils-ipa.o.
14287 ($(IPA_LIB)): Link -ldl and -lpthread.
14288 (UST_CFLAGS): New.
14289 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14290 * config.in, configure: Regenerate.
14291
14292 2010-06-20 Ian Lance Taylor <iant@google.com>
14293 Pedro Alves <pedro@codesourcery.com>
14294
14295 * linux-x86-low.c (always_true): Delete.
14296 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14297 trying to fool the compiler with always_true.
14298
14299 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14300
14301 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14302 conditions in gdbserver.
14303
14304 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14305
14306 * spu-low.c (spu_read_memory): Wrap around local store limit.
14307 (spu_write_memory): Likewise.
14308
14309 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14310
14311 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14312 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14313 LONGEST uses.
14314 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14315 uses.
14316 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14317 uses with LONGEST uses.
14318
14319 2010-06-14 Stan Shebs <stan@codesourcery.com>
14320 Pedro Alves <pedro@codesourcery.com>
14321
14322 Bytecode compiler.
14323
14324 * linux-x86-low.c: Include limits.h.
14325 (add_insns): New.
14326 (always_true): New.
14327 (EMIT_ASM): New.
14328 (EMIT_ASM32): New.
14329 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14330 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14331 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14332 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14333 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14334 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14335 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14336 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14337 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14338 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14339 (amd64_emit_void_call_2): New.
14340 (amd64_emit_ops): New.
14341 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14342 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14343 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14344 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14345 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14346 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14347 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14348 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14349 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14350 (i386_emit_stack_adjust, i386_emit_int_call_1)
14351 (i386_emit_void_call_2): New.
14352 (i386_emit_ops): New.
14353 (x86_emit_ops): New.
14354 (the_low_target): Install x86_emit_ops.
14355 * server.h (struct emit_ops): New.
14356 (get_raw_reg_func_addr): Declare.
14357 (current_insn_ptr, emit_error): Declare.
14358 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14359 (set_trace_state_variable_value): New defines.
14360 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14361 addr_get_trace_state_variable_value and
14362 addr_set_trace_state_variable_value.
14363 (symbol_list): New fields for get_raw_reg,
14364 get_trace_state_variable_value and set_trace_state_variable_value.
14365 (condfn): New typedef.
14366 (struct tracepoint): New field `compiled_cond'.
14367 (do_action_at_tracepoint): Clear compiled_cond.
14368 (get_trace_state_variable_value, set_trace_state_variable_value):
14369 Export in the IPA.
14370 (condition_true_at_tracepoint): If there's a compiled condition,
14371 run that.
14372 (current_insn_ptr, emit_error): New globals.
14373 (struct bytecode_address): New.
14374 (get_raw_reg_func_addr): New.
14375 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14376 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14377 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14378 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14379 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14380 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14381 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14382 (compile_tracepoint_condition, compile_bytecodes): New.
14383 * target.h (emit_ops): Forward declare.
14384 (struct target_ops): New field emit_ops.
14385 (target_emit_ops): New.
14386 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14387 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14388 * linux-low.c (linux_emit_ops): New.
14389 (linux_target_ops): Install it.
14390 * linux-low.h (struct linux_target_ops): New field emit_ops.
14391
14392 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14393
14394 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14395 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14396
14397 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14398 Stan Shebs <stan@codesourcery.com>
14399
14400 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14401 (all): Depend on $(extra_libraries).
14402 (install-only): Install the IPA.
14403 (IPA_OBJS, IPA_LIB): New.
14404 (clean): Remove the IPA lib.
14405 (IPAGENT_CFLAGS): New.
14406 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14407 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14408 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14409 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14410 * configure.ac: Check for atomic builtins support in the compiler.
14411 (IPA_DEPFILES, extra_libraries): Define.
14412 * configure.srv (ipa_obj): Add description.
14413 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14414 (i[34567]86-*-linux*): Set ipa_obj.
14415 (x86_64-*-linux*): Set ipa_obj.
14416 * linux-low.c (stabilizing_threads): New.
14417 (supports_fast_tracepoints): New.
14418 (linux_detach): Stabilize threads before detaching.
14419 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14420 the lwp is either not stabilizing, or is moving out of a jump pad.
14421 (linux_fast_tracepoint_collecting): New.
14422 (maybe_move_out_of_jump_pad): New.
14423 (enqueue_one_deferred_signal): New.
14424 (dequeue_one_deferred_signal): New.
14425 (linux_wait_for_event_1): If moving out of a jump pad, defer
14426 pending signals to later.
14427 (linux_stabilize_threads): New.
14428 (linux_wait_1): Check if threads need moving out of jump pads, and
14429 do it if so.
14430 (stuck_in_jump_pad_callback): New.
14431 (move_out_of_jump_pad_callback): New.
14432 (lwp_running): New.
14433 (linux_resume_one_lwp): Handle moving out of jump pads.
14434 (linux_set_resume_request): Dequeue deferred signals.
14435 (need_step_over_p): Also step over fast tracepoint jumps.
14436 (start_step_over): Also uninsert fast tracepoint jumps.
14437 (finish_step_over): Also reinsert fast tracepoint jumps.
14438 (linux_install_fast_tracepoint_jump): New.
14439 (linux_target_ops): Install linux_stabilize_threads and
14440 linux_install_fast_tracepoint_jump_pad.
14441 * linux-low.h (linux_target_ops) <get_thread_area,
14442 install_fast_tracepoint_jump_pad>: New fields.
14443 (struct lwp_info) <collecting_fast_tracepoint,
14444 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14445 (linux_get_thread_area): Declare.
14446 * linux-x86-low.c (jump_insn): New.
14447 (x86_get_thread_area): New.
14448 (append_insns): New.
14449 (push_opcode): New.
14450 (amd64_install_fast_tracepoint_jump_pad): New.
14451 (i386_install_fast_tracepoint_jump_pad): New.
14452 (x86_install_fast_tracepoint_jump_pad): New.
14453 (the_low_target): Install x86_get_thread_area and
14454 x86_install_fast_tracepoint_jump_pad.
14455 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14456 (struct fast_tracepoint_jump): New.
14457 (fast_tracepoint_jump_insn): New.
14458 (fast_tracepoint_jump_shadow): New.
14459 (find_fast_tracepoint_jump_at): New.
14460 (fast_tracepoint_jump_here): New.
14461 (delete_fast_tracepoint_jump): New.
14462 (set_fast_tracepoint_jump): New.
14463 (uninsert_fast_tracepoint_jumps_at): New.
14464 (reinsert_fast_tracepoint_jumps_at): New.
14465 (set_breakpoint_at): Use write_inferior_memory.
14466 (uninsert_raw_breakpoint): Use write_inferior_memory.
14467 (check_mem_read): Mask out fast tracepoint jumps.
14468 (check_mem_write): Mask out fast tracepoint jumps.
14469 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14470 (set_fast_tracepoint_jump): Declare.
14471 (delete_fast_tracepoint_jump)
14472 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14473 (reinsert_fast_tracepoint_jumps_at): Declare.
14474 * regcache.c: Don't compile many functions when building the
14475 in-process agent library.
14476 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14477 the register buffer in the heap.
14478 (free_register_cache): If the register buffer isn't owned by the
14479 regcache, don't free it.
14480 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14481 pre-existing register caches.
14482 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14483 type.
14484 (convert_ascii_to_int): : Constify `from' parameter type.
14485 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14486 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14487 the needed buffer in-place.
14488 (relocate_instruction): New.
14489 * server.c (handle_query) <qSymbols>: If the target supports
14490 tracepoints, give it a chance of looking up symbols. Report
14491 support for fast tracepoints.
14492 (handle_status): Stabilize threads.
14493 (process_serial_event): Adjust.
14494 * server.h (struct fast_tracepoint_jump): Forward declare.
14495 (struct process_info) <fast_tracepoint_jumps>: New field.
14496 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14497 (decode_X_packet, decode_M_packet): Adjust.
14498 (relocate_instruction): Declare.
14499 (in_process_agent_loaded): Declare.
14500 (tracepoint_look_up_symbols): Declare.
14501 (struct fast_tpoint_collect_status): Declare.
14502 (fast_tracepoint_collecting): Declare.
14503 (force_unlock_trace_buffer): Declare.
14504 (handle_tracepoint_bkpts): Declare.
14505 (initialize_low_tracepoint)
14506 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14507 * target.h (struct target_ops) <stabilize_threads,
14508 install_fast_tracepoint_jump_pad>: New fields.
14509 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14510 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14511 [HAVE_STDINT_H]: Include stdint.h.
14512 (trace_debug_1): Rename to ...
14513 (trace_vdebug): ... this.
14514 (trace_debug): Rename to ...
14515 (trace_debug_1): ... this. Add `level' parameter.
14516 (trace_debug): New.
14517 (ATTR_USED, ATTR_NOINLINE): New.
14518 (IP_AGENT_EXPORT): New.
14519 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14520 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14521 (about_to_request_buffer_space, trace_buffer_is_full)
14522 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14523 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14524 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14525 (traceframe_write_count, traceframes_created)
14526 (trace_state_variables)
14527 New renaming defines.
14528 (struct ipa_sym_addresses): New.
14529 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14530 (symbol_list): New.
14531 (ipa_sym_addrs): New.
14532 (all_tracepoint_symbols_looked_up): New.
14533 (in_process_agent_loaded): New.
14534 (write_e_ipa_not_loaded): New.
14535 (maybe_write_ipa_not_loaded): New.
14536 (tracepoint_look_up_symbols): New.
14537 (debug_threads) [IN_PROCESS_AGENT]: New.
14538 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
14539 (UNKNOWN_SIDE_EFFECTS): New.
14540 (stop_tracing): New.
14541 (flush_trace_buffer): New.
14542 (stop_tracing_bkpt): New.
14543 (flush_trace_buffer_bkpt): New.
14544 (read_inferior_integer): New.
14545 (read_inferior_uinteger): New.
14546 (read_inferior_data_pointer): New.
14547 (write_inferior_data_pointer): New.
14548 (write_inferior_integer): New.
14549 (write_inferior_uinteger): New.
14550 (struct collect_static_trace_data_action): Delete.
14551 (enum tracepoint_type): New.
14552 (struct tracepoint) <type>: New field `type'.
14553 <actions_str, step_actions, step_actions_str>: Only include in
14554 GDBserver.
14555 <orig_size, obj_addr_on_target, adjusted_insn_addr>
14556 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
14557 (tracepoints): Use IP_AGENT_EXPORT.
14558 (last_tracepoint): Don't include in the IPA.
14559 (stopping_tracepoint): Use IP_AGENT_EXPORT.
14560 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
14561 (alloced_trace_state_variables): New.
14562 (trace_state_variables): Use IP_AGENT_EXPORT.
14563 (traceframe_t): Delete unused variable.
14564 (circular_trace_buffer): Don't include in the IPA.
14565 (trace_buffer_start): Delete.
14566 (struct trace_buffer_control): New.
14567 (trace_buffer_free): Delete.
14568 (struct ipa_trace_buffer_control): New.
14569 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
14570 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
14571 New.
14572 (trace_buffer_ctrl): New.
14573 (TRACE_BUFFER_CTRL_CURR): New.
14574 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
14575 Reimplement as macros.
14576 (trace_buffer_wrap): Delete.
14577 (traceframe_write_count, traceframe_read_count)
14578 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
14579 (struct tracepoint_hit_ctx) <type>: New field.
14580 (struct fast_tracepoint_ctx): New.
14581 (memory_barrier): New.
14582 (cmpxchg): New.
14583 (record_tracepoint_error): Update atomically in the IPA.
14584 (clear_inferior_trace_buffer): New.
14585 (about_to_request_buffer_space): New.
14586 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
14587 updating the same buffer.
14588 (add_tracepoint): Default the tracepoint's type to trap
14589 tracepoint, and orig_size to -1.
14590 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
14591 internal variables.
14592 (create_trace_state_variable): New parameter `gdb'. Handle it.
14593 (clear_installed_tracepoints): Clear fast tracepoint jumps.
14594 (cmd_qtdp): Handle fast tracepoints.
14595 (cmd_qtdv): Adjust.
14596 (max_jump_pad_size): New.
14597 (gdb_jump_pad_head): New.
14598 (get_jump_space_head): New.
14599 (claim_jump_space): New.
14600 (sort_tracepoints): New.
14601 (MAX_JUMP_SIZE): New.
14602 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
14603 IPA.
14604 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
14605 support. Upload fast traceframes, and delete internal IPA
14606 breakpoints.
14607 (stop_tracing_handler): New.
14608 (flush_trace_buffer_handler): New.
14609 (cmd_qtstop): Upload fast tracepoints.
14610 (response_tracepoint): Handle fast tracepoints.
14611 (tracepoint_finished_step): Upload fast traceframes. Set the
14612 tracepoint hit context's tracepoint type.
14613 (handle_tracepoint_bkpts): New.
14614 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
14615 type. Add comment about fast tracepoints.
14616 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
14617 non-existing action_str field.
14618 (get_context_regcache): Handle fast tracepoints.
14619 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
14620 to the regcache.
14621 (fast_tracepoint_from_jump_pad_address): New.
14622 (fast_tracepoint_from_ipa_tpoint_address): New.
14623 (collecting_t): New.
14624 (force_unlock_trace_buffer): New.
14625 (fast_tracepoint_collecting): New.
14626 (collecting): New.
14627 (gdb_collect): New.
14628 (write_inferior_data_ptr): New.
14629 (target_tp_heap): New.
14630 (target_malloc): New.
14631 (download_agent_expr): New.
14632 (UALIGN): New.
14633 (download_tracepoints): New.
14634 (download_trace_state_variables): New.
14635 (upload_fast_traceframes): New.
14636 (IPA_FIRST_TRACEFRAME): New.
14637 (IPA_NEXT_TRACEFRAME_1): New.
14638 (IPA_NEXT_TRACEFRAME): New.
14639 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
14640 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
14641 (gdb_jump_pad_buffer_end): New.
14642 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
14643 (initialize_tracepoint): Adjust.
14644 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
14645 buffer. Initialize the low module.
14646 * utils.c (PREFIX, TOOLNAME): New.
14647 (malloc_failure): Use PREFIX.
14648 (error): In the IPA, an error causes an exit.
14649 (fatal, warning): Use PREFIX.
14650 (internal_error): Use TOOLNAME.
14651 (NUMCELLS): Increase to 10.
14652 * configure, config.in: Regenerate.
14653
14654 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14655
14656 * server.c (handle_query) <qSupported>: Do two passes over the
14657 qSupported string to avoid nesting strtok.
14658
14659 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14660
14661 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
14662 (CDEPS): New.
14663 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
14664 -Wl,--dynamic-list.
14665 * configure: Regenerate.
14666 * proc-service.list: New.
14667
14668 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14669
14670 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
14671 New comment.
14672
14673 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
14674
14675 * gdbreplay.c (remote_open): Check error return from socket() call by
14676 its equality to -1 not by it being negative.
14677 * remote-utils.c (remote_open): Likewise.
14678
14679 2010-05-23 Pedro Alves <pedro@codesourcery.com>
14680
14681 * config.h: Regenerate.
14682
14683 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14684
14685 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
14686 doesn't provide PTRACE_GET_THREAD_AREA.
14687
14688 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
14689
14690 * linux-m68k-low.c: Include <asm/ptrace.h>
14691 (ps_get_thread_area): Implement.
14692
14693 2010-05-03 Doug Evans <dje@google.com>
14694
14695 * event-loop.c (struct callback_event): New struct.
14696 (callback_list): New global.
14697 (append_callback_event, delete_callback_event): New functions.
14698 (process_callback): New function.
14699 (start_event_loop): Call it.
14700 * remote-utils.c (NOT_SCHEDULED): Define.
14701 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
14702 moved out of readchar.
14703 (readchar): Rewrite. Call reschedule before returning.
14704 (reset_readchar): New function.
14705 (remote_close): Call it.
14706 (process_remaining, reschedule): New functions.
14707 * server.h (callback_handler_func): New typedef.
14708 (append_callback_event, delete_callback_event): Declare.
14709
14710 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14711
14712 * proc-service.c (ps_pglobal_lookup): Use
14713 thread_db_look_up_one_symbol.
14714 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
14715 parameter. Use it instead of all_symbols_looked_up.
14716 * server.h (struct process_info) <all_symbols_looked_up>: Delete
14717 field.
14718 (all_symbols_looked_up): Don't declare.
14719 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
14720 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
14721 field.
14722 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
14723 Set all_symbols_looked_up here.
14724 (thread_db_look_up_one_symbol): New.
14725 (thread_db_get_tls_address): Adjust.
14726 (thread_db_load_search, try_thread_db_load_1): Always allocate the
14727 thread_db object on the heap, and tentatively set it in the
14728 process structure.
14729 (thread_db_init): Don't set all_symbols_looked_up here.
14730 * linux-low.h (thread_db_look_up_one_symbol): Declare.
14731
14732 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14733
14734 * linux-low.c (linux_kill, linux_detach): Adjust.
14735 (status_pending_p_callback): Remove redundant statement. Check
14736 for !TARGET_WAITIKIND_IGNORE, instead of
14737 TARGET_WAITKIND_STOPPED.
14738 (handle_tracepoints): Make sure LWP is locked. Adjust.
14739 (linux_wait_for_event_1): Adjust.
14740 (linux_cancel_breakpoints): New.
14741 (unsuspend_one_lwp): New.
14742 (unsuspend_all_lwps): New.
14743 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
14744 (send_sigstop_callback): Change return type to int, add new
14745 `except' parameter and handle it.
14746 (suspend_and_send_sigstop_callback): New.
14747 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
14748 pass them down. If SUSPEND, also increment the lwp's suspend
14749 count.
14750 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
14751 (need_step_over_p): Don't consider suspended LWPs.
14752 (start_step_over): Adjust.
14753 (proceed_one_lwp): Change return type to int, add new `except'
14754 parameter and handle it.
14755 (unsuspend_and_proceed_one_lwp): New.
14756 (proceed_all_lwps): Use find_inferior instead of
14757 for_each_inferior.
14758 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
14759 also decrement the suspend count of LWPs. Pass `except' down,
14760 instead of hacking its suspend count.
14761 (linux_pause_all): Add `freeze' parameter. Adjust.
14762 (linux_unpause_all): New.
14763 (linux_target_ops): Install linux_unpause_all.
14764 * server.c (handle_status): Adjust.
14765 * target.h (struct target_ops): New fields `unpause_all' and
14766 `cancel_breakpoints'. Add new parameter to `pause_all'.
14767 (pause_all): Add new `freeze' parameter.
14768 (unpause_all): New.
14769 (cancel_breakpoints): New.
14770 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
14771 cancel breakpoints.
14772 (cmd_qtstart): Pause threads.
14773 (stop_tracing): Pause threads, and cancel breakpoints.
14774 * win32-low.c (win32_target_ops): Adjust.
14775
14776 2010-05-03 Pedro Alves <pedro@codesourcery.com>
14777
14778 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
14779 the inferior right away from here...
14780 (linux_wait_1): ... to here, and adjust to check the thread's
14781 last_resume_kind instead of the lwp's step or stop_expected flags.
14782
14783 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14784
14785 * README: Use consistent `GDB' and `GDBserver' spellings.
14786
14787 2010-05-02 Pedro Alves <pedro@codesourcery.com>
14788
14789 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
14790 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
14791 (linux_detach_one_lwp): Assume the lwp is stopped.
14792 (any_thread_of): Delete.
14793 (linux_detach): Stop all lwps here. Don't blindly delete all
14794 breakpoints.
14795 (delete_lwp_callback): New.
14796 (linux_mourn): Delete all lwps of the process that is gone.
14797 (linux_wait_1): Don't delete the last lwp of the process here.
14798 * mem-break.h (mark_breakpoints_out): Declare.
14799 * mem-break.c (mark_breakpoints_out): New.
14800 (free_all_breakpoints): Use it.
14801 * server.c (handle_target_event): If the process is gone, mark
14802 breakpoints out.
14803 * thread-db.c (struct thread_db) <create_bp>: New field.
14804 (thread_db_enable_reporting): Fix prototype. Store a thread event
14805 breakpoint reference in the thread_db struct.
14806 (thread_db_load_search): Clear the thread_db object.
14807 (try_thread_db_load_1): Ditto.
14808 (switch_to_process): New.
14809 (disable_thread_event_reporting): Use it.
14810 (remove_thread_event_breakpoints): New.
14811 (thread_db_detach, thread_db_mourn): Use it.
14812
14813 2010-05-01 Pedro Alves <pedro@codesourcery.com>
14814
14815 * linux-low.c (linux_enable_event_reporting): New.
14816 (linux_wait_for_event_1, handle_extended_wait): Use it.
14817
14818 2010-04-30 Pedro Alves <pedro@codesourcery.com>
14819
14820 * linux-low.c (linux_kill_one_lwp, linux_kill)
14821 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
14822 (send_sigstop): Take an lwp_info as parameter instead. Queue a
14823 SIGSTOP even if the LWP is stopped.
14824 (send_sigstop_callback): New.
14825 (stop_all_lwps): Use send_sigstop_callback instead.
14826 (linux_resume_one_thread): Adjust.
14827 (proceed_one_lwp): Still proceed an LWP that the client has
14828 requested to stop, if we haven't reported it as stopped yet. Make
14829 sure that LWPs the client want stopped, have a pending SIGSTOP.
14830
14831 2010-04-26 Doug Evans <dje@google.com>
14832
14833 * server.c (handle_general_set): Make static.
14834
14835 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
14836 Print received char after testing for error/eof instead of before.
14837 (input_interrupt): Tweak comment.
14838
14839 2010-04-23 Doug Evans <dje@google.com>
14840
14841 * server.c (start_inferior): Print inferior argv if --debug.
14842
14843 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
14844
14845 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
14846 * nto-x86-low.c: Include server.h
14847
14848 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
14849
14850 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
14851 be consistent with other sources of this directory.
14852 (init_registers_amd64): Correct name of source file of this function
14853 in the comment.
14854
14855 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14856
14857 * configure.srv (x86_64-*-mingw*): New configuration for Windows
14858 64-bit executables.
14859
14860 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14861
14862 * win32-i386-low.c: Add 64-bit support.
14863 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
14864 (init_registers_amd64): Declare.
14865 (mappings): Add 64-bit version of array.
14866 (init_windows_x86): New function.
14867 (the_low_target): Change init_arch field to init_windows_x86.
14868
14869 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14870
14871 * win32-low.c: Adapt to support also 64-bit architecture.
14872 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
14873 (get_image_name): Use SIZE_T type for local variable `done'.
14874 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
14875 (toolhelp_get_dll_name): Idem.
14876 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
14877 Use uintptr_t typecast to avoid warning.
14878 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
14879 (handle_exception): Use phex_nz to avoid warning.
14880 (win32_wait): Remove unused local variable `process'.
14881
14882 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
14883
14884 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
14885 `amd64-avx.o'.
14886
14887 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
14888
14889 * configure.ac: Use `ws2_32' library for srv_mingw.
14890 * configure: Regenerate.
14891 * gdbreplay.c: Include winsock2.h instead of winsock.h.
14892 * remote-utils.c: Likewise.
14893
14894 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
14895
14896 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
14897 if __x86_64__ is defined.
14898
14899 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14900
14901 * configure: Regenerate.
14902
14903 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
14904
14905 * server.c (handle_query): Handle 'qGetTIBAddr' query.
14906 * target.h (target_ops): New get_tib_address field.
14907 * win32-low.h (win32_thread_info): Add thread_local_base field.
14908 * win32-low.c (child_add_thread): Add tlb argument.
14909 Set thread_local_base field to TLB.
14910 (get_child_debug_event): Adapt to child_add_thread change.
14911 (win32_get_tib_address): New function.
14912 (win32_target_ops): Set get_tib_address field to
14913 win32_get_tib_address.
14914 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
14915
14916 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14917
14918 * linux-low.c (linux_mourn): Also remove the process.
14919 * server.c (handle_target_event): Don't remove the process here.
14920 * nto-low.c (nto_mourn): New.
14921 (nto_target_ops): Install it.
14922 * spu-low.c (spu_mourn): New.
14923 (spu_target_ops): Install it.
14924 * win32-low.c (win32_mourn): New.
14925 (win32_target_ops): Install it.
14926
14927 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14928
14929 * server.h (buffer_xml_printf): Remove redundant `;'.
14930
14931 2010-04-12 Pedro Alves <pedro@codesourcery.com>
14932
14933 * regcache.c (set_register_cache): Invalidate regcaches before
14934 changing the register cache layout.
14935 (regcache_invalidate_one): Allow a NULL regcache.
14936 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
14937 regcaches before changing the register cache layout or the target
14938 regsets.
14939
14940 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
14941
14942 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
14943 variable warning on Linux/x86-64.
14944
14945 2010-04-11 Pedro Alves <pedro@codesourcery.com>
14946
14947 GDBserver disconnected tracing support.
14948
14949 * linux-low.c (linux_remove_process): Delete.
14950 (add_lwp): Don't set last_resume_kind here.
14951 (linux_kill): Use `mourn'.
14952 (linux_detach): Use `thread_db_detach', and `mourn'.
14953 (linux_mourn): New.
14954 (linux_attach_lwp_1): Adjust comment.
14955 (linux_attach): last_resume_kind moved the thread_info; adjust.
14956 (status_pending_p_callback): Adjust.
14957 (linux_wait_for_event_1): Adjust.
14958 (count_events_callback, select_singlestep_lwp_callback)
14959 (select_event_lwp_callback, cancel_breakpoints_callback)
14960 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
14961 (proceed_one_lwp): Adjust.
14962 (linux_async): Add debug output.
14963 (linux_thread_stopped): New.
14964 (linux_pause_all): New.
14965 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
14966 linux_pause_all.
14967 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
14968 (thread_db_free): Delete declaration.
14969 (thread_db_detach, thread_db_mourn): Declare.
14970 * thread-db.c (thread_db_init): Use thread_db_mourn.
14971 (thread_db_free): Delete, split in two.
14972 (disable_thread_event_reporting): New.
14973 (thread_db_detach): New.
14974 (thread_db_mourn): New.
14975
14976 * server.h (struct thread_info) <last_resume_kind>: New field.
14977 <attached>: Add comment.
14978 <gdb_detached>: New field.
14979 (handler_func): Change return type to int.
14980 (handle_serial_event, handle_target_event): Ditto.
14981 (gdb_connected): Declare.
14982 (tracing): Delete.
14983 (disconnected_tracing): Declare.
14984 (stop_tracing): Declare.
14985
14986 * server.c (handle_query) <qSupported>: Report support for
14987 disconnected tracing.
14988 (queue_stop_reply_callback): Account for running threads.
14989 (gdb_wants_thread_stopped): New.
14990 (gdb_wants_all_threads_stopped): New.
14991 (gdb_reattached_process): New.
14992 (handle_status): Clear the `gdb_detached' flag of all processes.
14993 In all-stop, stop all threads.
14994 (main): Be sure to leave tfind mode. Handle disconnected tracing.
14995 (process_serial_event): If the remote connection breaks, or if an
14996 exit was forced with "monitor exit", force an event loop exit.
14997 Handle disconnected tracing on detach.
14998 (handle_serial_event): Adjust.
14999 (handle_target_event): If GDB isn't connected, forward events back
15000 to the inferior, unless the last process exited, in which case,
15001 exit gdbserver. Adjust interface.
15002
15003 * remote-utils.c (remote_open): Don't block in accept. Instead
15004 register an event loop source on the listen socket file
15005 descriptor. Refactor bits into ...
15006 (listen_desc): ... this new global.
15007 (gdb_connected): ... this new function.
15008 (enable_async_notification): ... this new function.
15009 (handle_accept_event): ... this new function.
15010 (remote_close): Clear remote_desc.
15011
15012 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15013
15014 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15015 New fields.
15016 (mourn_inferior): Define.
15017 (target_process_qsupported): Avoid the dangling else problem.
15018 (thread_stopped): Define.
15019 (pause_all): Define.
15020 (target_waitstatus_to_string): Declare.
15021 * target.c (target_waitstatus_to_string): New.
15022
15023 * tracepoint.c (tracing): Make extern.
15024 (disconnected_tracing): New.
15025 (stop_tracing): Make extern. Handle tracing stops due to GDB
15026 disconnecting.
15027 (cmd_qtdisconnected): New.
15028 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15029 (handle_tracepoint_general_set): Handle QTDisconnected.
15030
15031 * event-loop.c (event_handler_func): Change return type to int.
15032 (process_event): Bail out if the event handler wants the event
15033 loop to stop.
15034 (handle_file_event): Ditto.
15035 (start_event_loop): Bail out if the event handler wants the event
15036 loop to stop.
15037
15038 * nto-low.c (nto_target_ops): Adjust.
15039 * spu-low.c (spu_wait): Don't remove the process here.
15040 (spu_target_ops): Adjust.
15041 * win32-low.c (win32_wait): Don't remove the process here.
15042 (win32_target_ops): Adjust.
15043
15044 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15045
15046 * regcache.c (realloc_register_cache): Invalidate inferior's
15047 regcache before recreating it.
15048
15049 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15050
15051 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15052
15053 2010-04-09 Stan Shebs <stan@codesourcery.com>
15054 Pedro Alves <pedro@codesourcery.com>
15055
15056 * server.h (LONGEST): New.
15057 (struct thread_info) <while_stepping>: New field.
15058 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15059 Declare.
15060 (initialize_tracepoint, handle_tracepoint_general_set)
15061 (handle_tracepoint_query, tracepoint_finished_step)
15062 (tracepoint_was_hit, release_while_stepping_state_list):
15063 (current_traceframe): Declare.
15064 * server.c (handle_general_set): Handle tracepoint packets.
15065 (read_memory): New.
15066 (write_memory): New.
15067 (handle_search_memory_1): Use read_memory.
15068 (handle_query): Report support for conditional tracepoints, trace
15069 state variables, and tracepoint sources. Handle tracepoint
15070 queries.
15071 (main): Initialize the tracepoints module.
15072 (process_serial_event): Handle traceframe reads/writes.
15073
15074 * linux-low.c (handle_tracepoints): New.
15075 (linux_wait_1): Call it.
15076 (linux_resume_one_lwp): Handle while-stepping.
15077 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15078 (linux_target_ops): Install them.
15079 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15080 New field.
15081 * linux-x86-low.c (x86_supports_tracepoints): New.
15082 (the_low_target). Install it.
15083
15084 * mem-break.h (delete_breakpoint): Declare.
15085 * mem-break.c (delete_breakpoint): Make external.
15086
15087 * target.h (struct target_ops): Add `supports_tracepoints',
15088 `read_pc', and `write_pc' fields.
15089 (target_supports_tracepoints): Define.
15090 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15091 (phex_nz): New.
15092
15093 * regcache.h (struct regcache) <registers_owned>: New field.
15094 (init_register_cache, regcache_cpy): Declare.
15095 (regcache_read_pc, regcache_write_pc): Declare.
15096 (register_cache_size): Declare.
15097 (supply_regblock): Declare.
15098 * regcache.c (init_register_cache): New.
15099 (new_register_cache): Use it.
15100 (regcache_cpy): New.
15101 (register_cache_size): New.
15102 (supply_regblock): New.
15103 (regcache_read_pc, regcache_write_pc): New.
15104
15105 * tracepoint.c: New.
15106
15107 * Makefile.in (OBS): Add tracepoint.o.
15108 (tracepoint.o): New rule.
15109
15110 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15111
15112 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15113 (i386-mmx.o): New.
15114 (i386-mmx.c): Likewise.
15115 (i386-mmx-linux.o): Likewise.
15116 (i386-mmx-linux.c): Likewise.
15117
15118 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15119 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15120 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15121 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15122
15123 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15124 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15125 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15126
15127 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15128
15129 * Makefile.in (clean): Updated.
15130 (i386-avx.o): New.
15131 (i386-avx.c): Likewise.
15132 (i386-avx-linux.o): Likewise.
15133 (i386-avx-linux.c): Likewise.
15134 (amd64-avx.o): Likewise.
15135 (amd64-avx.c): Likewise.
15136 (amd64-avx-linux.o): Likewise.
15137 (amd64-avx-linux.c): Likewise.
15138
15139 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15140 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15141 (srv_amd64_regobj): Add amd64-avx.o.
15142 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15143 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15144 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15145 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15146 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15147 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15148 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15149
15150 * i387-fp.c: Include "i386-xstate.h".
15151 (i387_xsave): New.
15152 (i387_cache_to_xsave): Likewise.
15153 (i387_xsave_to_cache): Likewise.
15154 (x86_xcr0): Likewise.
15155
15156 * i387-fp.h (i387_cache_to_xsave): Likewise.
15157 (i387_xsave_to_cache): Likewise.
15158 (x86_xcr0): Likewise.
15159
15160 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15161 * linux-crisv32-low.c (target_regsets): Likewise.
15162 * linux-m68k-low.c (target_regsets): Likewise.
15163 * linux-mips-low.c (target_regsets): Likewise.
15164 * linux-ppc-low.c (target_regsets): Likewise.
15165 * linux-s390-low.c (target_regsets): Likewise.
15166 * linux-sh-low.c (target_regsets): Likewise.
15167 * linux-sparc-low.c (target_regsets): Likewise.
15168 * linux-xtensa-low.c (target_regsets): Likewise.
15169
15170 * linux-low.c: Include <sys/uio.h>.
15171 (regsets_fetch_inferior_registers): Support nt_type.
15172 (regsets_store_inferior_registers): Likewise.
15173 (linux_process_qsupported): New.
15174 (linux_target_ops): Add linux_process_qsupported.
15175
15176 * linux-low.h (regset_info): Add nt_type.
15177 (linux_target_ops): Add process_qsupported.
15178
15179 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15180 and <sys/uio.h>.
15181 (init_registers_i386_avx_linux): New.
15182 (init_registers_amd64_avx_linux): Likewise.
15183 (xmltarget_i386_linux_no_xml): Likewise.
15184 (xmltarget_amd64_linux_no_xml): Likewise.
15185 (PTRACE_GETREGSET): Likewise.
15186 (PTRACE_SETREGSET): Likewise.
15187 (x86_fill_xstateregset): Likewise.
15188 (x86_store_xstateregset): Likewise.
15189 (use_xml): Likewise.
15190 (x86_linux_update_xmltarget): Likewise.
15191 (x86_linux_process_qsupported): Likewise.
15192 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15193 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15194 init_registers_i386_linux here. Call
15195 x86_linux_update_xmltarget.
15196 (the_low_target): Add x86_linux_process_qsupported.
15197
15198 * server.c (handle_query): Call target_process_qsupported.
15199
15200 * target.h (target_ops): Add process_qsupported.
15201 (target_process_qsupported): New.
15202
15203 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15204
15205 * inferiors.c (add_thread): Set last_status kind to
15206 TARGET_WAITKIND_IGNORE.
15207 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15208 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15209 (linux_wait_1): Move `thread' local definition to block that uses
15210 it. Don't NULL initialize `event_child'.
15211 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15212 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15213 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15214
15215 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15216
15217 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15218 an extended waitstatus, or by a watchpoint.
15219 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15220 thread was stepping or has been stopped by a watchpoint.
15221
15222 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15223
15224 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15225 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15226 of another, then delete the previous, and validate all
15227 breakpoints.
15228 (validate_inserted_breakpoint): New.
15229 (delete_disabled_breakpoints): New.
15230 (validate_breakpoints): New.
15231 (check_mem_read): Validate breakpoints before trusting their
15232 shadow. Delete disabled breakpoints.
15233 (check_mem_write): Validate breakpoints before trusting they
15234 should be inserted. Delete disabled breakpoints.
15235 * mem-break.h (validate_breakpoints):
15236 * server.c (handle_query): Validate breakpoints when we see a
15237 qSymbol query.
15238
15239 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15240
15241 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15242 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15243 if we could tell there's a GDB breakpoint at stop_pc.
15244 (need_step_over_p): Don't do a step over if we find a GDB
15245 breakpoint at the resume PC.
15246
15247 * mem-break.c (struct raw_breakpoint): New.
15248 (enum bkpt_type): New type `gdb_breakpoint'.
15249 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15250 fields. New field `raw'.
15251 (find_raw_breakpoint_at): New.
15252 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15253 breakpoint instead.
15254 (set_breakpoint_at): Adjust.
15255 (delete_raw_breakpoint): New.
15256 (release_breakpoint): New.
15257 (delete_breakpoint): Rename to...
15258 (delete_breakpoint_1): ... this. Add proc parameter. Use
15259 release_breakpoint. Return ENOENT.
15260 (delete_breakpoint): Reimplement.
15261 (find_breakpoint_at): Delete.
15262 (find_gdb_breakpoint_at): New.
15263 (delete_breakpoint_at): Delete.
15264 (set_gdb_breakpoint_at): New.
15265 (delete_gdb_breakpoint_at): New.
15266 (gdb_breakpoint_here): New.
15267 (set_reinsert_breakpoint): Use release_breakpoint.
15268 (uninsert_breakpoint): Rename to ...
15269 (uninsert_raw_breakpoint): ... this.
15270 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15271 (reinsert_raw_breakpoint): Change parameter type to
15272 raw_breakpoint.
15273 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15274 instead.
15275 (check_breakpoints): Adjust. Use release_breakpoint.
15276 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15277 (breakpoint_inserted_here): Ditto.
15278 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15279 Don't trust the breakpoint's shadow if it is not inserted.
15280 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15281 (delete_all_breakpoints): Adjust.
15282 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15283 use delete_breakpoint_1.
15284
15285 * mem-break.h (breakpoints_supported): Delete declaration.
15286 (set_gdb_breakpoint_at): Declare.
15287 (gdb_breakpoint_here): Declare.
15288 (delete_breakpoint_at): Delete.
15289 (delete_gdb_breakpoint_at): Declare.
15290
15291 * server.h (struct raw_breakpoint): Forward declare.
15292 (struct process_info): New field `raw_breakpoints'.
15293
15294 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15295 breakpoints.
15296
15297 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15298
15299 * linux-low.c (status_pending_p_callback): Fix comment.
15300 (linux_wait_for_event_1): Move most of the internal breakpoint
15301 handling from here...
15302 (linux_wait_1): ... to here.
15303 (count_events_callback): New.
15304 (select_singlestep_lwp_callback): New.
15305 (select_event_lwp_callback): New.
15306 (cancel_breakpoints_callback): New.
15307 (select_event_lwp): New.
15308 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15309 priority to all LWPs that have had events that should be reported
15310 to the client. Cancel breakpoints when about to reporting the
15311 event to the client, not while stopping lwps. No longer cancel
15312 finished single-steps here.
15313 (cancel_finished_single_step): Delete.
15314 (cancel_finished_single_steps): Delete.
15315
15316 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15317
15318 * mem-break.c (enum bkpt_type): New.
15319 (struct breakpoint): New field `type'.
15320 (set_breakpoint_at): Change return type to struct breakpoint
15321 pointer. Set type to `other_breakpoint' by default.
15322 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15323 in the breakpoint list.
15324 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15325 (reinsert_breakpoint): Rename to ...
15326 (reinsert_raw_breakpoint): ... this.
15327 (reinsert_breakpoints_at): Adjust.
15328 * mem-break.h (struct breakpoint): Declare.
15329 (set_breakpoint_at): Change return type to struct breakpoint
15330 pointer.
15331
15332 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15333
15334 * server.c (handle_query): Assign, not compare.
15335
15336 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15337
15338 Teach linux gdbserver to step-over-breakpoints.
15339
15340 * linux-low.c (can_hardware_single_step): New.
15341 (supports_breakpoints): New.
15342 (handle_extended_wait): If stopping threads, read the stop pc of
15343 the new cloned LWP.
15344 (get_pc): New.
15345 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15346 low target doesn't support retrieving the PC.
15347 (add_lwp): Set last_resume_kind to resume_continue.
15348 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15349 (linux_attach): Don't clear stop_expected. Set the lwp's
15350 last_resume_kind to resume_stop.
15351 (linux_detach_one_lwp): Don't check for removed breakpoints.
15352 (check_removed_breakpoint): Delete.
15353 (status_pending_p): Rename to ...
15354 (status_pending_p_callback): ... this. Don't check for removed
15355 breakpoints. Don't consider threads that are stopped from GDB's
15356 perspective.
15357 (linux_wait_for_lwp): Always read the stop_pc here.
15358 (cancel_breakpoint): New.
15359 (step_over_bkpt): New global.
15360 (linux_wait_for_event_1): Implement stepping over breakpoints.
15361 (gdb_wants_lwp_stopped): New.
15362 (gdb_wants_all_stopped): New.
15363 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15364 single-step traps here. Store the thread's last reported target
15365 wait status.
15366 (send_sigstop): Don't clear stop_expected. Always set it,
15367 instead.
15368 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15369 (cancel_finished_single_step): New.
15370 (cancel_finished_single_steps): New.
15371 (wait_for_sigstop): Don't cancel finished single-step traps here.
15372 (linux_resume_one_lwp): Don't check for removed breakpoints.
15373 Don't set `step' on non-hardware step archs.
15374 (linux_set_resume_request): Ignore resume_stop requests if already
15375 stopping or stopped. Set the lwp's last_resume_kind.
15376 (resume_status_pending_p): Don't check for removed breakpoints.
15377 (need_step_over_p): New.
15378 (start_step_over): New.
15379 (finish_step_over): New.
15380 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15381 requests. Clear the thread's last reported target waitstatus.
15382 Don't use the `suspended' flag. Don't consider pending breakpoints.
15383 (linux_resume): Start a step-over if necessary.
15384 (proceed_one_lwp): New.
15385 (proceed_all_lwps): New.
15386 (unstop_all_lwps): New.
15387 * linux-low.h (struct lwp_info): Rewrite comment for the
15388 `suspended' flag. Add the `stop_pc' field. Delete the
15389 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15390 Add `'last_resume_kind' and `need_step_over' fields.
15391 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15392 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15393 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15394 (set_raw_breakpoint_at): New.
15395 (set_breakpoint_at): Rewrite to use it.
15396 (reinsert_breakpoint_handler): Delete.
15397 (set_reinsert_breakpoint): New.
15398 (reinsert_breakpoint_by_bp): Delete.
15399 (delete_reinsert_breakpoints): New.
15400 (uninsert_breakpoint): Rewrite.
15401 (uninsert_breakpoints_at): New.
15402 (reinsert_breakpoint): Rewrite.
15403 (reinsert_breakpoints_at): New.
15404 (check_breakpoints): Rewrite.
15405 (breakpoint_here): New.
15406 (breakpoint_inserted_here): New.
15407 (check_mem_read): Adjust.
15408 * mem-break.h (breakpoints_supported, breakpoint_here)
15409 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15410 (reinsert_breakpoint_by_bp): Delete declaration.
15411 (delete_reinsert_breakpoints): Declare.
15412 (reinsert_breakpoint): Delete declaration.
15413 (reinsert_breakpoints_at): Declare.
15414 (uninsert_breakpoint): Delete declaration.
15415 (uninsert_breakpoints_at): Declare.
15416 (check_breakpoints): Adjust prototype.
15417 * server.h: Adjust include order.
15418 (struct thread_info): Declare here. Add a `last_status' field.
15419
15420 2010-03-23 Michael Snyder <msnyder@vmware.com>
15421
15422 * server.c (crc32): New function.
15423 (handle_query): Add handling for 'qCRC:' request.
15424
15425 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15426
15427 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15428 lwp had been stopped by a watchpoint.
15429
15430 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15431
15432 * server.h (internal_error): Declare.
15433 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15434 * utils.c (internal_error): New function.
15435
15436 2010-03-15 Andreas Schwab <schwab@redhat.com>
15437
15438 * configure.srv: Fix typo setting srv_regobj.
15439
15440 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15441
15442 * linux-low.c (fetch_register): Avoid passing a non string literal
15443 format to `error'.
15444 (usr_store_inferior_registers): Ditto.
15445
15446 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15447
15448 * linux-low.c (linux_write_memory): Bail out early if peeking
15449 memory failed.
15450
15451 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15452
15453 * linux-low.h (struct lwp_info): New fields
15454 `stopped_by_watchpoint' and `stopped_data_address'.
15455 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15456 here, and cache them in the lwp object.
15457 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15458 directly.
15459 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15460 field.
15461 (linux_stopped_by_watchpoint): Rewrite.
15462 (linux_stopped_data_address): Rewrite.
15463
15464 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15465
15466 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15467 switching the current inferior, not before.
15468
15469 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15470
15471 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15472 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15473 i386-linux.c and amd64-linux.c.
15474 (reg-i386.o): Removed.
15475 (reg-i386.c): Likewise.
15476 (reg-i386-linux.o): Likewise.
15477 (reg-i386-linux.c): Likewise.
15478 (reg-x86-64.o): Likewise.
15479 (reg-x86-64.c): Likewise.
15480 (reg-x86-64-linux.o): Likewise.
15481 (reg-x86-64-linux.c): Likewise.
15482 (i386.o): New.
15483 (i386.c): Likewise.
15484 (i386-linux.o): Likewise.
15485 (i386-linux.c): Likewise.
15486 (amd64.o): Likewise.
15487 (amd64.c): Likewise.
15488 (amd64-linux.o): Likewise.
15489 (amd64-linux.c): Likewise.
15490
15491 * configure.srv (srv_i386_regobj): New.
15492 (srv_i386_linux_regobj): Likewise.
15493 (srv_amd64_regobj): Likewise.
15494 (srv_amd64_linux_regobj): Likewise.
15495 (srv_i386_32bit_xmlfiles): Likewise.
15496 (srv_i386_64bit_xmlfiles): Likewise.
15497 (srv_i386_xmlfiles): Likewise.
15498 (srv_amd64_xmlfiles): Likewise.
15499 (srv_i386_linux_xmlfiles): Likewise.
15500 (srv_amd64_linux_xmlfiles): Likewise.
15501 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15502 srv_xmlfiles to $srv_i386_xmlfiles.
15503 (i[34567]86-*-mingw32ce*): Likewise.
15504 (i[34567]86-*-mingw*): Likewise.
15505 (i[34567]86-*-nto*): Likewise.
15506 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15507 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15508 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15509 (x86_64-*-linux*): Likewise.
15510
15511 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15512 (init_registers_amd64_linux): New.
15513 (x86_arch_setup): Replace init_registers_x86_64_linux with
15514 init_registers_amd64_linux.
15515
15516 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15517
15518 * configure.ac: Check for libdl. If it is not available link against
15519 static libthread_db.
15520 * configure: Regenerate.
15521
15522 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15523
15524 PR9605
15525
15526 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15527 handing a read watchpoint.
15528 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15529
15530 2010-02-12 Doug Evans <dje@google.com>
15531
15532 * linux-low.c (linux_supports_tracefork_flag): Document.
15533 (linux_look_up_symbols): Add comment.
15534
15535 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15536
15537 * regcache.c (supply_register): Clear regcache if buf is NULL.
15538
15539 2010-02-02 Nicolas Roche <roche@sourceware.org>
15540 Joel Brobecker <brobecker@adacore.com>
15541
15542 * inferiors.c (find_inferior): Add function documentation.
15543 (unloaded_dll): Handle the case where the unloaded dll has not
15544 been previously registered in the dll list.
15545
15546 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15547
15548 * linux-arm-low.c (thumb_breakpoint_len): Delete.
15549 (thumb2_breakpoint): New.
15550 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
15551
15552 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15553
15554 * linux-low.c (get_stop_pc): Check for SIGTRAP.
15555 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
15556 breakpoints.
15557
15558 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15559
15560 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
15561
15562 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15563
15564 * linux-s390-low.c (s390_collect_ptrace_register)
15565 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
15566
15567 2010-01-21 Doug Evans <dje@google.com>
15568
15569 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
15570 (PTRACE_ARG4_TYPE): New macro.
15571 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
15572 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
15573 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
15574 (usr_store_inferior_registers): Ditto.
15575 (linux_read_memory, linux_write_memory): Ditto.
15576 (linux_test_for_tracefork): Ditto.
15577
15578 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
15579 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
15580
15581 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15582
15583 * proc-service.c (ps_lgetregs): Don't refetch registers from the
15584 target.
15585
15586 2010-01-21 Pedro Alves <pedro@codesourcery.com>
15587
15588 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
15589 prototype to take a regcache. Adjust.
15590
15591 2010-01-20 Pedro Alves <pedro@codesourcery.com>
15592
15593 * regcache.h (struct thread_info): Forward declare.
15594 (struct regcache): New.
15595 (new_register_cache): Adjust prototype.
15596 (get_thread_regcache): Declare.
15597 (free_register_cache): Adjust prototype.
15598 (registers_to_string, registers_from_string): Ditto.
15599 (supply_register, supply_register_by_name, collect_register)
15600 (collect_register_as_string, collect_register_by_name): Ditto.
15601 * regcache.c (struct inferior_regcache_data): Delete.
15602 (get_regcache): Rename to ...
15603 (get_thread_regcache): ... this. Adjust. Switch inferior before
15604 fetching registers.
15605 (regcache_invalidate_one): Adjust.
15606 (regcache_invalidate): Fix prototype.
15607 (new_register_cache): Return the new register cache.
15608 (free_register_cache): Change prototype.
15609 (realloc_register_cache): Adjust.
15610 (registers_to_string): Change prototype to take a regcache. Adjust.
15611 (registers_from_string): Ditto.
15612 (register_data): Ditto.
15613 (supply_register): Ditto.
15614 (supply_register_by_name): Ditto.
15615 (collect_register): Ditto.
15616 (collect_register_as_string): Ditto.
15617 (collect_register_by_name): Ditto.
15618 * server.c (process_serial_event): Adjust.
15619 * linux-low.h (regset_fill_func, regset_store_func): Change
15620 prototype.
15621 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
15622 Change prototype.
15623 * linux-low.c (get_stop_pc): Adjust.
15624 (check_removed_breakpoint): Adjust.
15625 (linux_wait_for_event): Adjust.
15626 (linux_resume_one_lwp): Adjust.
15627 (fetch_register): Add regcache parameter. Adjust.
15628 (usr_store_inferior_registers): Ditto.
15629 (regsets_fetch_inferior_registers): Ditto.
15630 (regsets_store_inferior_registers): Ditto.
15631 (linux_fetch_registers, linux_store_registers): Ditto.
15632 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
15633 regcache. Adjust.
15634 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
15635 Ditto.
15636 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
15637 prototype to take a regcache.
15638 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
15639 * remote-utils.c (convert_ascii_to_int, outreg)
15640 (prepare_resume_reply): Change prototype to take a regcache.
15641 Adjust.
15642 * target.h (struct target_ops) <fetch_registers, store_registers>:
15643 Change prototype to take a regcache.
15644 (fetch_inferior_registers, store_inferior_registers): Change
15645 prototype to take a regcache. Adjust.
15646 * proc-service.c (ps_lgetregs): Adjust.
15647 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
15648 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
15649 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
15650 take a regcache. Adjust.
15651 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
15652 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
15653 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
15654 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
15655 * linux-cris-low.c (cris_get_pc, cris_set_pc)
15656 (cris_cannot_fetch_register):
15657 (cris_breakpoint_at): Change prototype to take a regcache.
15658 Adjust.
15659 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
15660 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
15661 to take a regcache. Adjust.
15662 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
15663 Adjust.
15664 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
15665 take a regcache. Adjust.
15666 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
15667 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
15668 (m68k_set_pc): Change prototype to take a regcache. Adjust.
15669 * linux-mips-low.c (mips_get_pc):
15670 (mips_set_pc): Change prototype to take a regcache. Adjust.
15671 (mips_reinsert_addr): Adjust.
15672 (mips_collect_register): Change prototype to take a regcache.
15673 Adjust.
15674 (mips_supply_register):
15675 (mips_collect_register_32bit, mips_supply_register_32bit)
15676 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15677 (mips_store_fpregset): Ditto.
15678 * linux-ppc-low.c (ppc_supply_ptrace_register)
15679 (ppc_supply_ptrace_register): Ditto.
15680 (parse_spufs_run): Adjust.
15681 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
15682 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
15683 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
15684 take a regcache. Adjust.
15685 * linux-s390-low.c (s390_collect_ptrace_register)
15686 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
15687 (s390_set_pc): Change prototype to take a regcache. Adjust.
15688 (s390_arch_setup): Adjust.
15689 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
15690 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
15691 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15692 (sparc_fill_gregset, sparc_store_gregset_from_stack)
15693 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
15694 regcache. Adjust.
15695 (sparc_breakpoint_at): Adjust.
15696 * linux-xtensa-low.c (xtensa_fill_gregset):
15697 (xtensa_store_gregset):
15698 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
15699 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
15700 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
15701 prototype to take a regcache. Adjust.
15702 * win32-arm-low.c (arm_fetch_inferior_register)
15703 (arm_store_inferior_register): Change prototype to take a
15704 regcache. Adjust.
15705 * win32-i386-low.c (i386_fetch_inferior_register)
15706 (i386_store_inferior_register): Change prototype to take a
15707 regcache. Adjust.
15708 * win32-low.c (child_fetch_inferior_registers)
15709 (child_store_inferior_registers): Change prototype to take a
15710 regcache. Adjust.
15711 (win32_wait): Adjust.
15712 (win32_fetch_inferior_registers): Change prototype to take a
15713 regcache. Adjust.
15714 (win32_store_inferior_registers): Adjust.
15715 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
15716 store_inferior_register>: Change prototype to take a regcache.
15717
15718 2010-01-20 Doug Evans <dje@google.com>
15719
15720 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
15721 #ifdef.
15722 (linux_wait_for_event1, linux_init_signals): Ditto.
15723 (W_STOPCODE): Provide definition if missing.
15724
15725 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
15726
15727 * linux-low.c (linux_core_of_thread): New.
15728 (compare_ints, show_process, list_threads): New.
15729 (linux_qxfer_osdata): Report threads and cores.
15730 (linux_target_op): Register linux_core_of_thread.
15731 * remote-utils.c (prepare_resume_reply): Report the core.
15732 (buffer_xml_printf): Support %d specifier.
15733 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
15734 New.
15735 (handle_query): Handle qXfer:threads. Announce availability
15736 thereof.
15737 * target.h (struct target_ops): New field core_of_thread.
15738
15739 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
15740
15741 * Makefile.in (clean): Remove new generated files.
15742 (reg-s390.o, reg-s390.c): Remove rules.
15743 (reg-s390x.o, reg-s390x.c): Likewise.
15744 (s390-linux32.o, s390-linux32.c): Add rules.
15745 (s390-linux64.o, s390-linux64.c): Likewise.
15746 (s390x-linux64.o, s390x-linux64.c): Likewise.
15747 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
15748 * linux-s390-low.c: Include <elf.h>.
15749 (HWCAP_S390_HIGH_GPRS): Define if undefined.
15750 (init_registers_s390): Remove prototype.
15751 (init_registers_s390x): Likewise.
15752 (init_registers_s390_linux32): Add prototype.
15753 (init_registers_s390_linux64): Likewise.
15754 (init_registers_s390x_linux64): Likewise.
15755 (s390_num_regs_3264): New define.
15756 (s390_regmap_3264): New global variable.
15757 (s390_cannot_fetch_register): Remove obsolete check.
15758 (s390_cannot_store_register): Likewise.
15759 (s390_collect_ptrace_register): Handle upper/lower register halves.
15760 (s390_supply_ptrace_register): Likewise.
15761 (s390_fill_gregset): Update to register number changes.
15762 (s390_get_hwcap): New routine.
15763 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
15764 Install appropriate regmap and register set.
15765
15766 2010-01-01 Joel Brobecker <brobecker@adacore.com>
15767
15768 * server.c (gdbserver_version): Update copyright year to 2010.
15769 * gdbreplay.c (gdbreplay_version): Likewise.
15770
15771 2009-12-28 Doug Evans <dje@google.com>
15772
15773 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
15774 elf/external.h. Include <elf.h> instead but only if necessary.
15775
15776 2009-12-28 Pedro Alves <pedro@codesourcery.com>
15777
15778 * linux-low.c (linux_remove_process): Remove `detaching'
15779 parameter. Don't release/detach from thread_db here.
15780 (linux_kill): Release/detach from thread_db here, ...
15781 (linux_detach): ... and here, before actually detaching.
15782 (linux_wait_1): ... and here, when a process exits.
15783 * thread-db.c (any_thread_of): New.
15784 (thread_db_free): Switch the current inferior to a thread of the
15785 passed in process.
15786
15787 2009-12-21 Doug Evans <dje@google.com>
15788
15789 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
15790
15791 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
15792 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
15793 warning ifndef __NR_tkill. Move setting of errno there too.
15794 Delete unnecessary resetting of errno after syscall.
15795 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
15796
15797 * configure.ac: Check for dladdr.
15798 * config.in: Regenerate.
15799 * configure: Regenerate.
15800 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
15801 (try_thread_db_load): Update.
15802
15803 * linux-low.c (my_waitpid): Delete unnecessary prototype.
15804
15805 2009-12-18 Doug Evans <dje@google.com>
15806
15807 * event-loop.c: Include unistd.h if it exists.
15808
15809 * linux-low.c (my_waitpid): Move definition away from being in
15810 between linux_tracefork_child/linux_test_for_tracefork.
15811
15812 * gdb_proc_service.h (psaddr_t): Fix type.
15813 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
15814 signature to match glibc.
15815
15816 2009-12-16 Doug Evans <dje@google.com>
15817
15818 * linux-low.c (linux_read_memory): Fix argument to read.
15819
15820 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15821
15822 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
15823 events, don't leave current_inferior pointing at null.
15824
15825 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15826
15827 * win32-low.c (LOG): Delete.
15828 (OUTMSG): Output to stderr.
15829 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
15830 on compile time LOG macro.
15831 (win32_wait): Fix debug output.
15832
15833 2009-11-26 Pedro Alves <pedro@codesourcery.com>
15834
15835 * win32-low.c (win32_add_one_solib): If the dll name is
15836 "ntdll.dll", prepend the system directory to the dll path.
15837
15838 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
15839
15840 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
15841
15842 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
15843 Vladimir Prus <vladimir@codesourcery.com>
15844
15845 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
15846 * configure.ac: Check for __mcoldfire__ and set
15847 gdb_cv_m68k_is_coldfire.
15848 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
15849 reg-cf.o and reg-m68k.o.
15850 * configure: Regenerated.
15851
15852 2009-11-16 Pedro Alves <pedro@codesourcery.com>
15853
15854 * linux-low.c (linux_remove_process): Add `detaching' parameter.
15855 Pass it to thread_db_free.
15856 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
15857 proper `detaching' argument to linux_remove_process.
15858 * linux-low.h (thread_db_free): Add `detaching' parameter.
15859 * thread-db.c (thread_db_init): Pass false as `detaching' argument
15860 to thread_db_free.
15861 (thread_db_free): Add `detaching' parameter. Only
15862 call td_ta_clear_event if detaching from process.
15863
15864 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
15865
15866 * thread-db.c (thread_db_free): Fix typo.
15867
15868 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
15869
15870 PR gdb/10838
15871 * thread-db.c (thread_db_free): Call td_ta_clear_event.
15872
15873 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
15874
15875 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
15876 with an i686 compiler.
15877 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
15878 needed.
15879 * configure: Rebuilt.
15880
15881 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
15882
15883 PR gdb/10783
15884
15885 * server.c (handle_search_memory_1): Correct read_addr initialization
15886 in loop for searching subsequent chunks.
15887
15888 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
15889
15890 * configure.ac: New --with-libthread-db option.
15891 * thread-db.c: Allow direct dependence on libthread_db.
15892 (thread_db_free): Adjust.
15893 * config.in: Regenerate.
15894 * configure: Likewise.
15895
15896 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
15897
15898 PR gdb/10757
15899 * thread-db.c (attach_thread): New function.
15900 (maybe_attach_thread): Return success/failure.
15901 (find_new_threads_callback): Adjust.
15902 (thread_db_find_new_threads): Loop until no new threads.
15903
15904 2009-10-13 Pedro Alves <pedro@codesourcery.com>
15905
15906 * proc-service.c (ps_lgetregs): Formatting.
15907
15908 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
15909
15910 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
15911 * configure.ac: Adjust.
15912 * linux-low.h (struct process_info_private): Move members to struct
15913 thread_db.
15914 (thread_db_free, thread_db_handle_monitor_command): New prototype.
15915 * linux-low.c (linux_remove_process): Adjust.
15916 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
15917 * server.c (handle_query): Move code ...
15918 (handle_monitor_command): ... here. New function.
15919 * target.h (struct target_ops): New member.
15920 * thread-db.c (struct thread_db): New.
15921 (libthread_db_search_path): New variable.
15922 (thread_db_create_event, thread_db_enable_reporting)
15923 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
15924 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
15925 (try_thread_db_load_1, dladdr_to_soname): New functions.
15926 (try_thread_db_load, thread_db_load_search): New functions.
15927 (thread_db_init): Search for libthread_db.
15928 (thread_db_free): New function.
15929 (thread_db_handle_monitor_command): Likewise.
15930 * config.in: Regenerate.
15931 * configure: Regenerate.
15932
15933 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
15934
15935 * spu-low.c (spu_kill): Wait for inferior to terminate.
15936 Call clear_inferiors.
15937 (spu_detach): Call clear_inferiors.
15938
15939 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15940
15941 * aclocal.m4: Regenerate.
15942 * config.in: Likewise.
15943 * configure: Likewise.
15944
15945 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15946
15947 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
15948 (parse_spufs_run): New function.
15949 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
15950 (ppc_breakpoint_at): Handle SPU breakpoints.
15951
15952 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15953
15954 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
15955 (SPUFS_MAGIC): Define.
15956 (spu_enumerate_spu_ids): New function.
15957 (linux_qxfer_spu): New function.
15958 (linux_target_ops): Install linux_qxfer_spu.
15959
15960 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
15961
15962 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
15963 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
15964 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
15965 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
15966 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
15967 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
15968 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
15969 (init_registers_powerpc_cell32l): Add prototype.
15970 (init_registers_powerpc_cell64l): Likewise.
15971 (ppc_arch_setup): Detect Cell/B.E. architecture.
15972
15973 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15974
15975 * Makefile.in (datarootdir): New variable.
15976
15977 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15978
15979 * linux-low.c (linux_write_memory): Update debugging output.
15980 * Makefile.in (clean): Add new descriptions.
15981 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
15982 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
15983 * configure.srv: Add new files for arm*-*-linux*.
15984 * linux-arm-low.c: Add new declarations.
15985 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
15986 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
15987 (HWCAP_VFPv3D16): New.
15988 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
15989 instead of __IWMMXT__.
15990 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
15991 (arm_arch_setup): New.
15992 (target_regsets): Remove #ifdef. Add VFP regset.
15993 (the_low_target): Use arm_arch_setup.
15994
15995 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
15996
15997 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
15998 the main thread again.
15999
16000 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16001
16002 Adding Neutrino gdbserver.
16003 * configure: Regenerated.
16004 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16005 * configure.srv (i[34567]86-*-nto*): New target.
16006 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16007 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16008 (nto_comctrl) [__QNX__]: New function.
16009 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16010
16011 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16012
16013 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16014 srv_tgtobj.
16015
16016 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16017 Pedro Alves <pedro@codesourcery.com>
16018
16019 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16020 don't support CONTEXT_EXTENDED_REGISTERS.
16021 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16022 (the_low_target): Install them.
16023 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16024 failing with ERROR_PIPE_NOT_CONNECTED.
16025
16026 2009-06-30 Doug Evans <dje@google.com>
16027 Pierre Muller <muller@ics.u-strasbg.fr>
16028
16029 Add h/w watchpoint support to x86-linux, win32-i386.
16030 * Makefile.in (SFILES): Add i386-low.c
16031 (i386_low_h): Define.
16032 (i386-low.o): Add dependencies.
16033 (linux-x86-low.o): Add i386-low.h dependency.
16034 (win32-i386-low.o): Ditto.
16035 * i386-low.c: New file.
16036 * i386-low.h: New file.
16037 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16038 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16039 * linux-low.c (linux_add_process): Initialize arch_private.
16040 (linux_remove_process): Free arch_private.
16041 (add_lwp): Initialize arch_private.
16042 (delete_lwp): Free arch_private.
16043 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16044 provided.
16045 * linux-low.h (process_info_private): New member arch_private.
16046 (lwp_info): New member arch_private.
16047 (linux_target_ops): New members new_process, new_thread,
16048 prepare_to_resume.
16049 (ptid_of): New macro.
16050 * linux-x86-low.c: Include stddef.h, i386-low.h.
16051 (arch_process_info): New struct.
16052 (arch_lwp_info): New struct.
16053 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16054 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16055 (i386_dr_low_get_status): New function.
16056 (x86_insert_point, x86_remove_point): New functions.
16057 (x86_stopped_by_watchpoint): New function.
16058 (x86_stopped_data_address): New function.
16059 (x86_linux_new_process, x86_linux_new_thread): New functions.
16060 (x86_linux_prepare_to_resume): New function.
16061 (the_low_target): Add entries for insert_point, remove_point,
16062 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16063 prepare_to_resume.
16064 * server.c (debug_hw_points): New global.
16065 (monitor_show_help): Document set debug-hw-points.
16066 (handle_query): Process "set debug-hw-points".
16067 * server.h (debug_hw_points): Declare.
16068 (paddress): Declare.
16069 * utils.c (NUMCELLS, CELLSIZE): New macros.
16070 (get_sell, xsnprintf, paddress): New functions.
16071 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16072 remove_point, stopped_by_watchpoint, stopped_data_address.
16073 * win32-i386-low.c: Include i386-low.h.
16074 (debug_reg_state): Replaces dr.
16075 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16076 (i386_dr_low_get_status): New function.
16077 (i386_insert_point, i386_remove_point): New functions.
16078 (i386_stopped_by_watchpoint): New function.
16079 (i386_stopped_data_address): New function.
16080 (i386_initial_stuff): Update.
16081 (get_thread_context,set_thread_context,i386_thread_added): Update.
16082 (the_low_target): Add entries for insert_point,
16083 remove_point, stopped_by_watchpoint, stopped_data_address.
16084 * win32-low.c (win32_insert_watchpoint): New function.
16085 (win32_remove_watchpoint): New function.
16086 (win32_stopped_by_watchpoint): New function.
16087 (win32_stopped_data_address): New function.
16088 (win32_target_ops): Add entries for insert_watchpoint,
16089 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16090 * win32-low.h (win32_target_ops): New members insert_point,
16091 remove_point, stopped_by_watchpoint, stopped_data_address.
16092
16093 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16094
16095 * server.c (process_serial_event): Re-return unsupported, not
16096 error, if the type isn't recognized. Re-allow supporting only
16097 insert or remove packets. Also call require_running for
16098 breakpoints. Add missing break statement to default case. Tidy.
16099 * target.h (struct target_ops): Rename insert_watchpoint to
16100 insert_point, and remove_watchpoint to remove_point.
16101
16102 * linux-low.h (struct linux_target_ops): Likewise.
16103 * linux-low.c (linux_insert_watchpoint): Rename to ...
16104 (linux_insert_point): ... this. Adjust.
16105 (linux_remove_watchpoint): Rename to ...
16106 (linux_remove_point): ... this. Adjust.
16107 (linux_target_ops): Adjust.
16108 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16109 (cris_insert_point): ... this.
16110 (cris_remove_watchpoint): Rename to ...
16111 (cris_remove_point): ... this.
16112 (the_low_target): Adjust.
16113
16114 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16115
16116 * server.c (handle_v_kill): Pass signal_pid to
16117 kill_inferior if multi_process is zero.
16118
16119 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16120
16121 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16122 * target.h (target_ops): Comment for *_watchpoint to make it clear
16123 the functions can get types '0' and '1'.
16124
16125 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16126
16127 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16128 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16129 * regcache.c (get_regcache): Likewise.
16130 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16131 * win32-low.c (child_fetch_inferior_registers): Remove check for
16132 regno 0.
16133
16134 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16135 Pedro Alves <pedro@codesourcery.com>
16136
16137 * target.h (struct target_ops) <supports_multi_process>: New
16138 callback.
16139 (target_supports_multi_process): New.
16140 * server.c (handle_query): Even if GDB reports support, only
16141 enable multi-process if the target also supports it. Report
16142 multi-process support only if the target backend supports it.
16143 * linux-low.c (linux_supports_multi_process): New function.
16144 (linux_target_ops): Install it as target_supports_multi_process
16145 callback.
16146
16147 2009-05-24 Doug Evans <dje@google.com>
16148
16149 Global renaming of find_thread_pid to find_thread_ptid.
16150 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16151 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16152 All callers updated.
16153
16154 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16155 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16156 directly.
16157
16158 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16159 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16160 (linux_resume_one_lwp): Ditto.
16161
16162 2009-05-23 Doug Evans <dje@google.com>
16163
16164 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16165 from struct inferior_list_entry * to struct lwp_info *.
16166 All callers updated.
16167
16168 2009-05-13 Doug Evans <dje@google.com>
16169
16170 * linux-x86-low.c: Don't include assert.h.
16171 (x86_siginfo_fixup): Use fatal, not assert.
16172 (x86_arch_setup): Fix comment.
16173
16174 2009-05-12 Doug Evans <dje@google.com>
16175
16176 Biarch support for i386/amd64 gdbserver.
16177 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16178 Add linux-x86-low.c.
16179 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16180 (linux-x86-low.o): Add.
16181 * linux-x86-64-low.c: Delete.
16182 * linux-i386-low.c: Delete.
16183 * linux-x86-low.c: New file.
16184 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16185 linux-x86-low.o.
16186 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16187 linux-x86-low.o.
16188 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16189 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16190 (linux_child_pid_to_exec_file): New function.
16191 (elf_64_header_p, elf_64_file_p): New functions.
16192 (siginfo_fixup): New function.
16193 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16194 give target a chance to convert layout.
16195 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16196 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16197
16198 2009-05-07 Doug Evans <dje@google.com>
16199
16200 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16201 (regsets_store_inferior_registers): Ditto.
16202
16203 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16204
16205 PR server/10048
16206
16207 * linux-low.c (must_set_ptrace_flags): Delete.
16208 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16209 of the global.
16210 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16211 `lwp->must_set_ptrace_flags' instead.
16212 (linux_wait_for_event_1): Set ptrace options here.
16213 (linux_wait_1): ... not here.
16214
16215 2009-04-30 Doug Evans <dje@google.com>
16216
16217 * inferiors.c (started_inferior_callback): New function.
16218 (attached_inferior_callback): New function.
16219 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16220 * server.c (print_started_pid, print_attached_pid): New functions.
16221 (detach_or_kill_for_exit): New function.
16222 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16223 * server.h (have_started_inferiors_p): Declare.
16224 (have_attached_inferiors_p): Declare.
16225
16226 * inferiors.c (remove_process): Fix memory leak, free process.
16227 * linux-low.c (linux_remove_process): New function.
16228 (linux_kill): Call it instead of remove_process.
16229 (linux_detach, linux_wait_1): Ditto.
16230
16231 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16232
16233 * configure.srv: Add x86 Windows CE target.
16234
16235 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16236
16237 * inferiors.c (get_thread_process): Make global.
16238 * server.h (get_thread_process): Add prototype.
16239 * thread-db.c (find_one_thread): Use get_thread_process
16240 instead of current_process.
16241 (thread_db_get_tls_address): Do not crash if called when
16242 thread layer is not yet initialized.
16243
16244 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16245
16246 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16247 * spu-low.c (current_tid): Rename to ...
16248 (current_ptid): ... this.
16249 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16250 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16251 ptid_get_lwp (current_ptid) instead of current_tid.
16252 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16253 instead of current_tid. Use find_process_pid to verify pid
16254 argument is valid. Pass proper argument to remove_process.
16255 (spu_thread_alive): Compare current_ptid instead of current_tid.
16256 (spu_resume): Likewise.
16257
16258 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16259
16260 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16261 variable.
16262
16263 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16264
16265 Implement the multiprocess extensions, and add linux multiprocess
16266 support.
16267
16268 * server.h (ULONGEST): Declare.
16269 (struct ptid, ptid_t): New.
16270 (minus_one_ptid, null_ptid): Declare.
16271 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16272 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16273 (struct inferior_list_entry): Change `id' type from unsigned from
16274 to ptid_t.
16275 (struct sym_cache, struct breakpoint, struct
16276 process_info_private): Forward declare.
16277 (struct process_info): Declare.
16278 (current_process): Declare.
16279 (all_processes): Declare.
16280 (initialize_inferiors): Declare.
16281 (add_thread): Adjust to use ptid_t.
16282 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16283 (add_process, remove_process, find_thread_pid): Declare.
16284 (find_inferior_id): Adjust to use ptid_t.
16285 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16286 (multi_process): Declare.
16287 (push_event): Adjust to use ptid_t.
16288 (read_ptid, write_ptid): Declare.
16289 (prepare_resume_reply): Adjust to use ptid_t.
16290 (clear_symbol_cache): Declare.
16291 * inferiors.c (all_processes): New.
16292 (null_ptid, minus_one_ptid): New.
16293 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16294 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16295 (add_thread): Change unsigned long to ptid. Remove gdb_id
16296 parameter. Adjust.
16297 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16298 (gdb_id_to_thread): Rename to ...
16299 (find_thread_pid): ... this. Change unsigned long to ptid.
16300 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16301 (loaded_dll, pull_pid_from_list): Adjust.
16302 (add_process, remove_process, find_process_pid)
16303 (get_thread_process, current_process, initialize_inferiors): New.
16304 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16305 (struct target_waitstatus) <related_pid>: Ditto.
16306 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16307 return type to int.
16308 (struct target_ops) <join>: Add `pid' argument.
16309 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16310 (struct target_ops) <wait>: Add `ptid' field. Change return type
16311 to ptid.
16312 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16313 (mywait): Add `ptid' argument. Change return type to ptid_t.
16314 (target_pid_to_str): Declare.
16315 * target.c (set_desired_inferior): Adjust to use ptids.
16316 (mywait): Add new `ptid' argument. Adjust.
16317 (target_pid_to_str): New.
16318 * mem-break.h (free_all_breakpoints): Declare.
16319 * mem-break.c (breakpoints): Delelete.
16320 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16321 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16322 to use per-process breakpoint list.
16323 (free_all_breakpoints): New.
16324 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16325 (symbol_cache, all_symbols_looked_up): Delete.
16326 (hexchars): New.
16327 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16328 read_ptid): New.
16329 (prepare_resume_reply): Change ptid argument's type from unsigned
16330 long to ptid_t. Adjust. Implement W;process and X;process.
16331 (free_sym_cache, clear_symbol_cache): New.
16332 (look_up_one_symbol): Adjust to per-process symbol cache. *
16333 * server.c (cont_thread, general_thread, step_thread): Change type
16334 to ptid_t.
16335 (attached): Delete.
16336 (multi_process): New.
16337 (last_ptid): Change type to ptid_t.
16338 (struct vstop_notif) <ptid>: Change type to ptid_t.
16339 (queue_stop_reply, push_event): Change `ptid' argument's type to
16340 ptid_t.
16341 (discard_queued_stop_replies): Add `pid' argument.
16342 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16343 changes. Don't reference the `attached' global.
16344 (attach_inferior): Adjust to mywait interface changes.
16345 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16346 features. Handle and report "multiprocess+". Handle
16347 "qAttached:PID".
16348 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16349 changes.
16350 (handle_v_kill): New.
16351 (handle_v_stopped): Adjust to use target_pid_to_str.
16352 (handle_v_requests): Allow multiple attaches and runs when
16353 multiprocess extensions are in effect. Handle "vKill".
16354 (myresume): Adjust to use ptids.
16355 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16356 (handle_status): Adjust to discard_queued_stop_replies interface
16357 change.
16358 (first_thread_of, kill_inferior_callback)
16359 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16360 (main): Call initialize_inferiors. Adjust to use ptids, killing
16361 and detaching from all inferiors. Handle multiprocess packet
16362 variants.
16363 * linux-low.h: Include gdb_proc_service.h.
16364 (struct process_info_private): New.
16365 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16366 <lwpid_of>: Use ptid_get_lwp.
16367 (get_lwp_thread): Adjust.
16368 (struct lwp_info): Add `dead' member.
16369 (find_lwp_pid): Declare.
16370 * linux-low.c (thread_db_active): Delete.
16371 (new_inferior): Adjust comment.
16372 (inferior_pid): Delete.
16373 (linux_add_process): New.
16374 (handle_extended_wait): Adjust.
16375 (add_lwp): Change unsigned long to ptid.
16376 (linux_create_inferior): Add process to processes table. Adjust
16377 to use ptids. Don't set new_inferior here.
16378 (linux_attach_lwp): Rename to ...
16379 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16380 it. Adjust to use ptids.
16381 (linux_attach_lwp): New.
16382 (linux_attach): Add process to processes table. Don't set
16383 new_inferior here.
16384 (struct counter): New.
16385 (second_thread_of_pid_p, last_thread_of_process_p): New.
16386 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16387 multiple processes.
16388 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16389 processes. Remove process from process table.
16390 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16391 to multiple processes.
16392 (any_thread_of): New.
16393 (linux_detach): Add `pid' argument, and handle it. Remove process
16394 from processes table.
16395 (linux_join): Add `pid' argument. Handle it.
16396 (linux_thread_alive): Change unsighed long argument to ptid_t.
16397 Consider dead lwps as not being alive.
16398 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16399 threads we're not interested in.
16400 (same_lwp, find_lwp_pid): New.
16401 (linux_wait_for_lwp): Change `pid' argument's type from int to
16402 ptid_t. Adjust.
16403 (linux_wait_for_event): Rename to ...
16404 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16405 from int to ptid_t. Adjust.
16406 (linux_wait_for_event): New.
16407 (linux_wait_1): Add `ptid' argument. Change return type to
16408 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16409 that exit from the process table.
16410 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16411 Adjust.
16412 (mark_lwp_dead): New.
16413 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16414 stopping all threads, mark its main lwp as dead.
16415 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16416 ptids.
16417 (fetch_register, usr_store_inferior_registers)
16418 (regsets_fetch_inferior_registers)
16419 (regsets_store_inferior_registers, linux_read_memory)
16420 (linux_write_memory): Inline `inferior_pid'.
16421 (linux_look_up_symbols): Adjust to use per-process
16422 `thread_db_active'.
16423 (linux_request_interrupt): Adjust to use ptids.
16424 (linux_read_auxv): Inline `inferior_pid'.
16425 (initialize_low): Don't reference thread_db_active.
16426 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16427 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16428 (ps_getpid): Return the pid of the current inferior.
16429 * thread-db.c (proc_handle, thread_agent): Delete.
16430 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16431 per-process data.
16432 (find_one_thread): Change argument type to ptid_t. Adjust to
16433 per-process data.
16434 (maybe_attach_thread): Adjust to per-process data and ptids.
16435 (thread_db_find_new_threads): Ditto.
16436 (thread_db_init): Ditto.
16437 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16438 processes table. Adjust to use ptids.
16439 (spu_kill, spu_detach): Adjust interface. Remove process from
16440 processes table.
16441 (spu_join, spu_thread_alive): Adjust interface.
16442 (spu_wait): Adjust interface. Remove process from processes
16443 table. Adjust to use ptids.
16444 * win32-low.c (current_inferior_tid): Delete.
16445 (current_inferior_ptid): New.
16446 (debug_event_ptid): New.
16447 (thread_rec): Take a ptid. Adjust.
16448 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16449 (child_delete_thread): Ditto.
16450 (do_initial_child_stuff): Add `attached' argument. Add process to
16451 processes table.
16452 (child_fetch_inferior_registers, child_store_inferior_registers):
16453 Adjust.
16454 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16455 (win32_attach): Pass 1 to do_initial_child_stuff.
16456 (win32_kill): Adjust interface. Remove process from processes
16457 table.
16458 (win32_detach): Ditto.
16459 (win32_join): Adjust interface.
16460 (win32_thread_alive): Take a ptid.
16461 (win32_resume): Adjust to use ptids.
16462 (get_child_debug_event): Ditto.
16463 (win32_wait): Adjust interface. Remove exiting process from
16464 processes table.
16465
16466 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16467
16468 Non-stop mode support.
16469
16470 * server.h (non_stop): Declare.
16471 (gdb_client_data, handler_func): Declare.
16472 (delete_file_handler, add_file_handler, start_event_loop):
16473 Declare.
16474 (handle_serial_event, handle_target_event, push_event)
16475 (putpkt_notif): Declare.
16476 * target.h (enum resume_kind): New.
16477 (struct thread_resume): Replace `step' field by `kind' field.
16478 (TARGET_WNOHANG): Define.
16479 (struct target_ops) <wait>: Add `options' argument.
16480 <supports_non_stop, async, start_non_stop>: New fields.
16481 (target_supports_non_stop, target_async): New.
16482 (start_non_stop): Declare.
16483 (mywait): Add `options' argument.
16484 * target.c (mywait): Add `options' argument. Print child exit
16485 notifications here.
16486 (start_non_stop): New.
16487 * server.c (non_stop, own_buf, mem_buf): New globals.
16488 (struct vstop_notif): New.
16489 (notif_queue): New global.
16490 (queue_stop_reply, push_event, discard_queued_stop_replies)
16491 (send_next_stop_reply): New.
16492 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16493 interface changes.
16494 (attach_inferior): In non-stop mode, don't wait for the target
16495 here.
16496 (handle_general_set): Handle QNonStop.
16497 (handle_query): When handling qC, return the current general
16498 thread, instead of the first thread of the list.
16499 (handle_query): If the backend supports non-stop mode, include
16500 QNonStop+ in the qSupported query response.
16501 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16502 and non-stop mode.
16503 (handle_v_attach, handle_v_run): Handle non-stop mode.
16504 (handle_v_stopped): New.
16505 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16506 (myresume): Adjust to use resume_kind. Handle non-stop.
16507 (queue_stop_reply_callback): New.
16508 (handle_status): Handle non-stop mode.
16509 (main): Clear non_stop flag on reconnection. Use the event-loop.
16510 Refactor serial protocol handling from here ...
16511 (process_serial_event): ... to this new function. When GDB
16512 selects any thread, select one here. In non-stop mode, wait until
16513 GDB acks all pending events before exiting.
16514 (handle_serial_event, handle_target_event): New.
16515 * remote-utils.c (remote_open): Install remote_desc in the event
16516 loop.
16517 (remote_close): Remove remote_desc from the event loop.
16518 (putpkt_binary): Rename to...
16519 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16520 (putpkt_binary): New as wrapper around putpkt_binary_1.
16521 (putpkt_notif): New.
16522 (prepare_resume_reply): In non-stop mode, don't change the
16523 general_thread.
16524 * event-loop.c: New.
16525 * Makefile.in (OBJ): Add event-loop.o.
16526 (event-loop.o): New rule.
16527
16528 * linux-low.h (pid_of): Moved here.
16529 (lwpid_of): New.
16530 (get_lwp_thread): Use lwpid_of.
16531 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16532 * linux-low.c (pid_of): Delete.
16533 (inferior_pid): Use lwpid_of.
16534 (linux_event_pipe): New.
16535 (target_is_async_p): New.
16536 (delete_lwp): New.
16537 (handle_extended_wait): Use lwpid_of.
16538 (add_lwp): Don't set lwpid field.
16539 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
16540 (linux_kill_one_lwp): If killing a running lwp, stop it first.
16541 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
16542 (linux_detach_one_lwp): If detaching from a running lwp, stop it
16543 first. Adjust to linux_wait_for_event interface changes. Use
16544 lwpid_of.
16545 (linux_detach): Don't delete the main lwp here.
16546 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
16547 (status_pending_p): Don't consider explicitly suspended lwps.
16548 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
16549 pointer. Add OPTIONS argument. Change return type to int. Use
16550 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
16551 (linux_wait_for_event): Take an integer pid instead of a lwp_info
16552 pointer. Add status pointer argument. Return a pid instead of a
16553 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
16554 changes. In non-stop mode, don't switch to a random thread.
16555 (linux_wait): Rename to...
16556 (linux_wait_1): ... this. Add target_options argument, and handle
16557 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
16558 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
16559 clean exit and signal exit code. Don't stop all threads in
16560 non-stop mode. In all-stop mode, only stop all threads when
16561 reporting a stop to GDB. Handle explicit thread stop requests.
16562 (async_file_flush, async_file_mark): New.
16563 (linux_wait): New.
16564 (send_sigstop): Use lwpid_of.
16565 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
16566 interface changes. In non-stop mode, don't switch to a random
16567 thread.
16568 (linux_resume_one_lwp): Use lwpid_of.
16569 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
16570 (linux_resume_one_thread): ... this. Handle resume_stop. In
16571 non-stop mode, don't look for pending flag in all threads.
16572 (resume_status_pending_p): Don't consider explicitly suspended
16573 threads.
16574 (my_waitpid): Reimplement. Emulate __WALL.
16575 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16576 Use lwpid_of.
16577 (sigchld_handler, linux_supports_non_stop, linux_async)
16578 (linux_start_non_stop): New.
16579 (linux_target_ops): Register linux_supports_non_stop, linux_async
16580 and linux_start_non_stop.
16581 (initialize_low): Install SIGCHLD handler.
16582 * thread-db.c (thread_db_create_event, find_one_thread)
16583 (thread_db_get_tls_address): Use lwpid_of.
16584 * win32-low.c (win32_detach): Adjust to use resume_kind.
16585 (win32_wait): Add `options' argument.
16586 * spu-low.c (spu_resume): Adjust to use resume_kind.
16587 (spu_wait): Add `options' argument.
16588
16589 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16590
16591 Decouple target code from remote protocol.
16592
16593 * target.h (enum target_waitkind): New.
16594 (struct target_waitstatus): New.
16595 (struct target_ops) <wait>: Return an unsigned long. Take a
16596 target_waitstatus pointer instead of a char pointer.
16597 (mywait): Likewise.
16598 * target.c (mywait): Change prototype to return an unsigned long.
16599 Take a target_waitstatus pointer instead of a char pointer. Adjust.
16600 * server.h (thread_from_wait, old_thread_from_wait): Delete
16601 declarations.
16602 (prepare_resume_reply): Change prototype to take a
16603 target_waitstatus.
16604 * server.c (thread_from_wait, old_thread_from_wait): Delete.
16605 (last_status, last_ptid): New.
16606 (start_inferior): Remove "statusptr" argument. Adjust. Return a
16607 pid instead of a signal.
16608 (attach_inferior): Remove "status" and "signal" parameters.
16609 Adjust.
16610 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
16611 not as an address.
16612 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
16613 (handle_v_requests, myresume): Remove "status" and "signal"
16614 parameters. Adjust.
16615 (handle_status): New.
16616 (main): Delete local `status'. Adjust.
16617 * remote-utils.c: Include target.h.
16618 (prepare_resume_reply): Change prototype to take a
16619 target_waitstatus. Adjust.
16620
16621 * linux-low.c (linux_wait): Adjust to new target_ops->wait
16622 interface.
16623 * spu-low.c (spu_wait): Adjust.
16624 * win32-low.c (enum target_waitkind, struct target_waitstatus):
16625 Delete.
16626 (win32_wait): Adjust.
16627
16628 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16629
16630 * target.h (struct thread_resume): Delete leave_stopped member.
16631 (struct target_ops): Add a `n' argument to the `resume' callback.
16632 * server.c (start_inferior): Adjust.
16633 (handle_v_cont, myresume): Adjust.
16634 * linux-low.c (check_removed_breakpoint): Adjust to resume
16635 interface change, and to removed leave_stopped field.
16636 (resume_ptr): Delete.
16637 (struct thread_resume_array): New.
16638 (linux_set_resume_request): Add new `arg' parameter. Adjust to
16639 resume interface change.
16640 (linux_continue_one_thread, linux_queue_one_thread)
16641 (resume_status_pending_p): Check if the resume field is NULL
16642 instead of checking the leave_stopped member.
16643 (linux_resume): Adjust to the target resume interface change.
16644 * spu-low.c (spu_resume): Adjust to the target resume interface
16645 change.
16646 * win32-low.c (win32_detach, win32_resume): Ditto.
16647
16648 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16649
16650 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
16651 flag.
16652 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
16653 pending.
16654 (linux_continue_one_thread): Only preserve the stepping flag if
16655 there's a pending breakpoint.
16656
16657 2009-03-31 Pedro Alves <pedro@codesourcery.com>
16658
16659 * server.c (main): After the inferior having exited, call
16660 remote_close before exiting gdbserver.
16661
16662 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
16663
16664 Fix size of FPSCR in Power 7 processors.
16665 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
16666 (PPC_FEATURE_HAS_DFP): New #define.
16667 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
16668 size of the FPSCR.
16669
16670 2009-03-23 Pedro Alves <pedro@codesourcery.com>
16671
16672 * server.c (handle_query) Whitespace and formatting.
16673
16674 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16675
16676 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
16677 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
16678 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
16679 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
16680 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
16681 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
16682 Makefile.in, configure.ac: Fix whitespace throughout.
16683 * configure: Regenerate.
16684
16685 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16686
16687 * inferiors.c (find_inferior): Make it safe for the callback
16688 function to delete the currently iterated inferior.
16689
16690 2009-03-22 Pedro Alves <pedro@codesourcery.com>
16691
16692 * Makefile.in (linuw_low_h): Move higher.
16693 (thread-db.o): Depend on $(linux_low_h).
16694
16695 2009-03-17 Pedro Alves <pedro@codesourcery.com>
16696
16697 Rename "process" to "lwp" throughout.
16698
16699 * linux-low.c (all_processes): Rename to...
16700 (all_lwps): ... this.
16701 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
16702 (add_process): Rename to ...
16703 (add_lwp): ... this. Adjust.
16704 (linux_create_inferior): Adjust.
16705 (linux_attach_lwp): Adjust.
16706 (linux_attach): Adjust.
16707 (linux_kill_one_process): Rename to ...
16708 (linux_kill_one_lwp): ... this. Adjust.
16709 (linux_kill): Adjust.
16710 (linux_detach_one_process): Rename to ...
16711 (linux_detach_one_lwp): ... this. Adjust.
16712 (linux_detach): Adjust.
16713 (check_removed_breakpoint): Adjust.
16714 (status_pending_p): Adjust.
16715 (linux_wait_for_process): Rename to ...
16716 (linux_wait_for_lwp): ... this. Adjust.
16717 (linux_wait_for_event): Adjust.
16718 (send_sigstop): Adjust.
16719 (wait_for_sigstop): Adjust.
16720 (stop_all_processes): Rename to ...
16721 (stop_all_lwps): ... this.
16722 (linux_resume_one_process): Rename to ...
16723 (linux_resume_one_lwp): ... this. Adjust.
16724 (linux_set_resume_request, linux_continue_one_thread)
16725 (linux_queue_one_thread, resume_status_pending_p)
16726 (usr_store_inferior_registers, regsets_store_inferior_registers)
16727 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
16728 Adjust.
16729 * linux-low.h (get_process): Rename to ...
16730 (get_lwp): ... this. Adjust.
16731 (get_thread_process): Rename to ...
16732 (get_thread_lwp): ... this. Adjust.
16733 (get_process_thread): Rename to ...
16734 (get_lwp_thread): ... this. Adjust.
16735 (struct process_info): Rename to ...
16736 (struct lwp_info): ... this.
16737 (all_processes): Rename to ...
16738 (all_lwps): ... this.
16739 * proc-service.c (ps_lgetregs): Adjust.
16740 * thread-db.c (thread_db_create_event, find_one_thread)
16741 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
16742
16743 2009-03-14 Pedro Alves <pedro@codesourcery.com>
16744
16745 * server.c (handle_query): Handle "qAttached".
16746
16747 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
16748
16749 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
16750 GPLv3, update license URL.
16751
16752 2009-03-01 Doug Evans <dje@google.com>
16753
16754 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
16755 (server_h): Add gdb_signals.h.
16756 (signals.o): Update.
16757 * server.h (target_signal_from_host,target_signal_to_host_p)
16758 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
16759
16760 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
16761
16762 * remote-utils.c (getpkt): Also generate remote-debug
16763 information if noack_mode is set.
16764
16765 2009-02-06 Pedro Alves <pedro@codesourcery.com>
16766
16767 * server.c (handle_query): Report qXfer:siginfo:read and
16768 qXfer:siginfo:write as supported and handle them.
16769 * target.h (struct target_ops) <qxfer_siginfo>: New field.
16770 * linux-low.c (linux_xfer_siginfo): New.
16771 (linux_target_ops): Set it.
16772
16773 2009-01-26 Pedro Alves <pedro@codesourcery.com>
16774
16775 * server.c (gdbserver_usage): Mention --remote-debug.
16776 (main): Accept '--remote-debug' switch.
16777
16778 2009-01-18 Doug Evans <dje@google.com>
16779
16780 * regcache.c (new_register_cache): No need to check result of xcalloc.
16781 * server.c (handle_search_memory): Back out calls to xmalloc,
16782 result is checked and error is returned to user upon failure.
16783 (handle_query): Ditto. Add more checks for result of malloc.
16784 (handle_v_cont): Check result of malloc, report error back to
16785 user upon failure.
16786 (handle_v_run): Ditto. Call freeargv.
16787 * server.h (freeargv): Declare.
16788 * utils.c (freeargv): New fn.
16789
16790 2009-01-15 Doug Evans <dje@google.com>
16791
16792 * gdbreplay.c (perror_with_name): Make arg const char *.
16793 * server.h (target_signal_to_name): Make return type const char *.
16794 * thread-db.c (thread_db_err_str): Make return type const char *.
16795 * utils.c (perror_with_name): Make arg const char *.
16796
16797 2009-01-14 Pedro Alves <pedro@codesourcery.com>
16798
16799 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
16800 when handling a EXIT_PROCESS_DEBUG_EVENT.
16801
16802 2009-01-06 Joel Brobecker <brobecker@adacore.com>
16803
16804 * gdbreplay.c (gdbreplay_version): Update copyright year.
16805 * server.c (gdbserver_version): Likewise.
16806
16807 2009-01-05 Doug Evans <dje@google.com>
16808
16809 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
16810 (handle_extended_wait): Improve comment.
16811
16812 2008-12-13 Doug Evans <dje@google.com>
16813
16814 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
16815 * server.h (ATTR_MALLOC): New macro.
16816 (xmalloc,xcalloc,xstrdup): Declare.
16817 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
16818 * inferiors.c: Ditto.
16819 * linux-low.c: Ditto.
16820 * mem-break.c: Ditto.
16821 * regcache.c: Ditto.
16822 * remote-utils.c: Ditto.
16823 * server.c: Ditto.
16824 * target.c: Ditto.
16825 * win32-low.c: Ditto.
16826
16827 2008-12-12 Doug Evans <dje@google.com>
16828
16829 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
16830 in debugging printf.
16831
16832 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
16833
16834 2008-12-09 Doug Evans <dje@google.com>
16835
16836 * linux-low.h (struct process_info): Delete member tid, unused.
16837 * thread-db.c (find_one_thread): Update.
16838 (maybe_attach_thread): Update.
16839
16840 2008-12-02 Pedro Alves <pedro@codesourcery.com>
16841
16842 * target.h (struct target_ops): Add qxfer_osdata member.
16843 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
16844 and dirent.h.
16845 (linux_qxfer_osdata): New functions.
16846 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
16847 callback.
16848 * server.c (handle_query): Handle "qXfer:osdata:read:".
16849 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
16850 (buffer_xml_printf): New functions.
16851 * server.h (struct buffer): New.
16852 (buffer_grow_str, buffer_grow_str0): New macros.
16853 (buffer_grow, buffer_free, buffer_init, buffer_finish)
16854 (buffer_xml_printf): Declare.
16855
16856 2008-11-24 Doug Evans <dje@google.com>
16857
16858 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
16859
16860 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
16861
16862 * server.c (handle_v_run): Always use the supplied argument list.
16863
16864 2008-11-19 Bob Wilson <bob.wilson@acm.org>
16865
16866 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
16867 (xtensa_regmap_table): Add entry for scompare1.
16868
16869 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
16870
16871 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
16872 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
16873 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
16874 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
16875 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
16876 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
16877 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
16878 XML target descriptions.
16879 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
16880 when inferior is running on an ISA 2.05 or later processor. Add
16881 special case to return offset for full 64-bit slot of FPSCR when
16882 in 32-bits.
16883
16884 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
16885
16886 * Makefile.in (SFILES, clean): Added sparc64 files.
16887 (reg-sparc64.o, reg-sparc64.c): New.
16888 * configure.srv (sparc*-*-linux*): New configuration.
16889 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
16890 syscall arguments for SPARC.
16891 (regsets_store_inferior_registers): Likewise.
16892 * linux-sparc-low.c: New file.
16893
16894 2008-10-21 Doug Evans <dje@google.com>
16895
16896 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
16897 (READLINE_DIR,READLINE_DEP): Delete.
16898 (INTERNAL_CFLAGS): Update.
16899 (LINTFLAGS): Update.
16900
16901 2008-10-10 Pedro Alves <pedro@codesourcery.com>
16902
16903 * server.c (handle_v_run): If GDB didn't specify an argv, use the
16904 whole argv from the last run, not just argv[0].
16905
16906 2008-09-08 Pedro Alves <pedro@codesourcery.com>
16907
16908 * regcache.c (new_register_cache): Return NULL if the register
16909 cache size isn't known yet.
16910 (free_register_cache): Avoid dereferencing a NULL regcache.
16911
16912 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16913
16914 * configure.srv: Merge MIPS and MIPS64.
16915
16916 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
16917
16918 * Makefile.in (uninstall): Apply $(EXEEXT) too.
16919
16920 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
16921
16922 * Makefile.in: Add required vsx dependencies.
16923
16924 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
16925 Declare init_registers_powerpc_vsx32l.
16926 Declare init_registers_powerpc_vsx64l.
16927 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
16928 (ppc_arch_setup): Check for VSX in hwcap.
16929 (ppc_fill_vsxregset): New function.
16930 (ppc_store_vsxregset): New function.
16931 Add new VSX entry in regset_info target_regsets.
16932
16933 * configure.srv: Add new VSX dependencies.
16934
16935 2008-08-12 Pedro Alves <pedro@codesourcery.com>
16936
16937 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
16938 (remote_open): Set or clear transport_is_reliable.
16939 (putpkt_binary): Don't expect acks in noack mode.
16940 (getpkt): Don't send ack/nac in noack mode.
16941 * server.c (handle_general_set): Handle QStartNoAckMode.
16942 (handle_query): If connected by tcp pass QStartNoAckMode+ in
16943 qSupported.
16944 (main): Reset noack_mode on every connection.
16945 * server.h (noack_mode): Declare.
16946
16947 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16948
16949 * Makefile.in (GDBREPLAY_OBS): New variable.
16950 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
16951
16952 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
16953 Daniel Jacobowitz <dan@codesourcery.com>
16954
16955 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
16956 (usr_store_inferior_registers): Likewise.
16957 (regsets_store_inferior_registers): Likewise.
16958
16959 2008-07-31 Rolf Jansen <rj@surtec.com>
16960 Pedro Alves <pedro@codesourcery.com>
16961
16962 * configure.ac: Check for memmem declaration.
16963 * server.c [HAVE_MALLOC_H]: Include malloc.h.
16964 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
16965 (disable_packet_qfThreadInfo): Unconditionally compile.
16966 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
16967 * configure, config.in: Regenerate.
16968
16969 2008-07-28 Doug Kwan <dougkwan@google.com>
16970
16971 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
16972 (linux_write_memory): Remove declaration of errno.
16973
16974 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
16975
16976 * linux-low.c (handle_extended_wait): Do not use "status"
16977 variable uninitialized.
16978
16979 2008-07-07 Pedro Alves <pedro@codesourcery.com>
16980
16981 * server.c (handle_v_attach): Inhibit reporting dll changes.
16982
16983 2008-06-27 Pedro Alves <pedro@codesourcery.com>
16984
16985 * remote-utils.c (prepare_resume_reply): If requested, don't
16986 output "thread:TID" in the T stop reply.
16987
16988 * server.c (disable_packet_vCont, disable_packet_Tthread)
16989 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
16990 (handle_query): If requested, disable support for qC, qfThreadInfo
16991 and qsThreadInfo.
16992 (handle_v_requests): If requested, disable support for vCont.
16993 (gdbserver_show_disableable): New.
16994 (main): Handle --disable-packet and --disable-packet=LIST.
16995
16996 * server.h (disable_packet_vCont, disable_packet_Tthread)
16997 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
16998
16999 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17000
17001 * server.c (gdbserver_usage): Mention --version.
17002
17003 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17004
17005 * Makefile.in (gdbreplay.o): New rule.
17006
17007 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17008
17009 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17010 message, not gdbserver.
17011
17012 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17013 Nathan Sidwell <nathan@codesourcery.com>
17014 Joseph Myers <joseph@codesourcery.com>
17015
17016 * acinclude.m4: Include ../../config/acx.m4.
17017 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17018 * configure, config.in: Regenerate.
17019 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17020 * server.c (gdbserver_version): Print PKGVERSION.
17021 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17022 (main): Adjust gdbserver_usage calls.
17023 * gdbreplay.c (version, host_name): Add declarations.
17024 (gdbreplay_version, gdbreplay_usage): New.
17025 (main): Accept --version and --help options.
17026
17027 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17028
17029 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17030 (arm_breakpoint_at): Handle Thumb.
17031 (the_low_target): Add comment.
17032
17033 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17034
17035 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17036
17037 2008-05-09 Doug Evans <dje@google.com>
17038
17039 * server.h (decode_search_memory_packet): Declare.
17040 * remote-utils.c (decode_search_memory_packet): New fn.
17041 * server.c (handle_search_memory_1): New fn.
17042 (handle_search_memory): New fn.
17043 (handle_query): Process qSearch:memory packets.
17044
17045 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17046
17047 * regcache.c (registers_length): Remove.
17048 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17049 full register packet.
17050 * regcache.h (registers_length): Remove prototype.
17051 * server.h (PBUFSIZ): Define to 16384.
17052
17053 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17054
17055 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17056 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17057 powerpc-64l.o, and powerpc-altivec64l.o.
17058 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17059 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17060 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17061 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17062 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17063 to srv_xmlfiles.
17064
17065 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17066 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17067 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17068 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17069 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17070 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17071 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17072 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17073 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17074 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17075 (clean): Update.
17076
17077 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17078 (init_registers_powerpc_32l): ... this new prototype.
17079 (init_registers_powerpc_32): Remove, replace by ...
17080 (init_registers_powerpc_altivec32l): ... this new prototype.
17081 (init_registers_powerpc_e500): Remove, replace by ...
17082 (init_registers_powerpc_e500l): ... this new prototype.
17083 (init_registers_ppc64): Remove, replace by ...
17084 (init_registers_powerpc_64l): ... this new prototype.
17085 (init_registers_powerpc_64): Remove, replace by ...
17086 (init_registers_powerpc_altivec64l): ... this new prototype.
17087 (ppc_num_regs): Set to 73.
17088 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17089 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17090 (ppc_cannot_store_register): Handle orig_r3 and trap.
17091 (ppc_arch_setup): Update init_registers_... calls.
17092 (ppc_fill_gregset): Handle orig_r3 and trap.
17093
17094 * inferiors.c (clear_inferiors): Reset current_inferior.
17095
17096 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17097
17098 * acinclude.m4: Add override.m4.
17099 * configure: Regenerate.
17100
17101 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17102
17103 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17104 initial call to init_register_ppc64.
17105
17106 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17107
17108 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17109 single powerpc*-*-linux* case.
17110 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17111
17112 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17113
17114 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17115 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17116 from reg_xmlfiles.
17117 * linux-ppc-low.c: Include <elf.h>.
17118 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17119 (ppc_hwcap): New global variable.
17120 (ppc_regmap): Remove __SPE__ #ifdef sections.
17121 (ppc_regmap_e500): New global variable.
17122 (ppc_cannot_store_register): Update __SPE__ special case.
17123 (ppc_get_hwcap): New function.
17124 (ppc_arch_setup): Use it to determine whether inferior supports
17125 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17126 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17127 Do not access registers if target does not support AltiVec.
17128 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17129 Do not access registers if target does not support SPE.
17130 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17131
17132 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17133
17134 * linux-low.c (disabled_regsets, num_regsets): New.
17135 (use_regsets_p): Delete.
17136 (linux_wait_for_process): Clear disabled_regsets.
17137 (regsets_fetch_inferior_registers): Check and set it.
17138 (regsets_store_inferior_registers): Likewise.
17139 (linux_fetch_registers, linux_store_registers): Do not use
17140 use_regsets_p.
17141 (initialize_low): Allocate disabled_regsets.
17142
17143 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17144
17145 * Makefile.in (LIBOBJS): New.
17146 (OBS): Use LIBOBJS.
17147 (memmem.o): New rule.
17148 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17149 * configure: Regenerated.
17150
17151 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17152
17153 * server.c (handle_query): Never return "unsupported" for
17154 qXfer:features:read queries.
17155
17156 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17157
17158 * server.c (get_features_xml): Fix inverted condition.
17159 (handle_query): Always support qXfer:feature:read.
17160
17161 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17162
17163 * server.c (wrapper_argv): New.
17164 (start_inferior): Handle wrapper_argv. If set, expect an extra
17165 trap.
17166 (gdbserver_usage): Document --wrapper.
17167 (main): Parse --wrapper.
17168
17169 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17170
17171 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17172 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17173 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17174 (ppc_set_pc): Likewise.
17175 (ppc_arch_setup): New function.
17176 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17177 of collect_register.
17178 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17179
17180 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17181
17182 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17183 instead of linux-ppc64-low.o.
17184 * linux-ppc64-low.c: Remove file.
17185 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17186 (linux-ppc64-low.o): Remove rule.
17187
17188 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17189 (init_registers_powerpc_64): Likewise.
17190 (ppc_regmap): Conditionally define depending on __powerpc64__.
17191 (ppc_cannot_store_register): Do not special-case "fpscr" when
17192 compiled on __powerpc64__.
17193 (ppc_collect_ptrace_register): New function.
17194 (ppc_supply_ptrace_register): New function.
17195 (ppc_breakpoint): Change type to "unsigned int".
17196 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17197 (the_low_target): Conditionally provide initializers for the
17198 arch_setup member depending on __powerpc64__. Install
17199 collect_ptrace_register and supply_ptrace_register members.
17200
17201 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17202
17203 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17204 * server.c (gdbserver_xmltarget): Define.
17205 (get_features_xml): Use it to replace "target.xml" and arch_string.
17206
17207 * configure.srv: Remove srv_xmltarget. Add XML files that were
17208 mentioned there to srv_xmlfiles instead. Remove conditional tests
17209 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17210 srv_xmlfiles and srv_regobj to include all possible choices.
17211 * configure.ac (srv_xmltarget): Remove.
17212 (srv_xmlfiles): Do not add "target.xml".
17213 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17214 checks for supplementary target information.
17215 * configure: Regenerate.
17216 * Makefile.in (XML_TARGET): Remove.
17217 (target.xml): Remove rule.
17218 (clean): Do not clean up target.xml.
17219 (.PRECIOUS): Do not mention target.xml.
17220
17221 * target.h (struct target_ops): Remove arch_string member.
17222 * linux-low.c (linux_arch_string): Remove.
17223 (linux_target_ops): Remove arch_string initializer.
17224 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17225 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17226 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17227 * spu-low.c (spu_arch_string): Remove.
17228 (spu_target_ops): Remove arch_string initializer.
17229 * win32-low.c (win32_arch_string): Remove.
17230 (win32_target_ops): Remove arch_string initializer.
17231 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17232 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17233 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17234
17235 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17236
17237 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17238 by collect_ptrace_register and supply_ptrace_register hooks.
17239 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17240 instead of checking for the_low_target.left_pad_xfer.
17241 (usr_store_inferior_registers): Use collect_ptrace_register callback
17242 instead of checking for the_low_target.left_pad_xfer.
17243
17244 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17245 (s390_supply_ptrace_register): Likewise.
17246 (s390_fill_gregset): Call s390_collect_ptrace_register.
17247 (the_low_target): Update.
17248
17249 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17250 (ppc_supply_ptrace_register): Likewise.
17251 (the_low_target): Update.
17252
17253 * linux-i386-low.c (the_low_target): Update.
17254 * linux-x86-64-low.c (the_low_target): Update.
17255
17256 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17257
17258 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17259 reg-s390.o and reg-s390x.o.
17260
17261 * linux-low.c (new_inferior): New global variable.
17262 (linux_create_inferior, linux_attach): Set it.
17263 (linux_wait_for_process): Call the_low_target.arch_setup after the
17264 target has stopped for the first time.
17265 (initialize_low): Do not call the_low_target.arch_setup.
17266
17267 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17268 (s390_set_pc): Likewise.
17269 (s390_arch_setup): New function.
17270 (the_low_target): Use s390_arch_setup as arch_setup routine.
17271
17272 * regcache.c (realloc_register_cache): New function.
17273 (set_register_cache): Call it for each existing regcache.
17274
17275 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17276
17277 * server.h (init_registers): Remove prototype.
17278
17279 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17280 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17281 instead of init_registers ().
17282 * linux-arm-low.c (init_registers_arm): Add prototype.
17283 (init_registers_arm_with_iwmmxt): Likewise.
17284 (the_low_target): Add initializer for arch_setup field.
17285 * linux-cris-low.c (init_registers_cris): Add prototype.
17286 (the_low_target): Add initializer for arch_setup field.
17287 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17288 (the_low_target): Add initializer for arch_setup field.
17289 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17290 (the_low_target): Add initializer for arch_setup field.
17291 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17292 (the_low_target): Add initializer for arch_setup field.
17293 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17294 (the_low_target): Add initializer for arch_setup field.
17295 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17296 (the_low_target): Add initializer for arch_setup field.
17297 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17298 (init_registers_mips64_linux): Likewise.
17299 (the_low_target): Add initializer for arch_setup field.
17300 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17301 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17302 (the_low_target): Add initializer for arch_setup field.
17303 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17304 (init_registers_powerpc_64): Likewise.
17305 (the_low_target): Add initializer for arch_setup field.
17306 * linux-s390-low.c (init_registers_s390): Add prototype.
17307 (init_registers_s390x): Likewise.
17308 (the_low_target): Add initializer for arch_setup field.
17309 * linux-sh-low.c (init_registers_sh): Add prototype.
17310 (the_low_target): Add initializer for arch_setup field.
17311 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17312 (the_low_target): Add initializer for arch_setup field.
17313 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17314 (the_low_target): Add initializer for arch_setup field.
17315
17316 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17317 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17318 instead of init_registers ().
17319 * win32-arm-low.c (init_registers_arm): Add prototype.
17320 (the_low_target): Add initializer for arch_setup field.
17321 * win32-i386-low.c (init_registers_i386): Add prototype.
17322 (the_low_target): Add initializer for arch_setup field.
17323
17324 * spu-low.c (init_registers_spu): Add prototype.
17325 (initialize_low): Call initialie_registers_spu () instead of
17326 initialize_registers ().
17327
17328 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17329
17330 * server.c (handle_v_requests): When handling the vRun and vAttach
17331 packets, if already debugging a process, don't kill it. Return an
17332 error instead.
17333
17334 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17335
17336 * server.c (handle_query): Correct length check.
17337
17338 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17339
17340 * win32-low.c (do_initial_child_stuff): Add process handle
17341 parameter. Set current_process_handle and current_process_id from the
17342 parameters. Clear globals.
17343 (win32_create_inferior): Don't set current_process_handle and
17344 current_process_id here. Instead pass them on the call to
17345 do_initial_child_stuff.
17346 (win32_attach): Likewise.
17347 (win32_clear_inferiors): New.
17348 (win32_kill): Don't close the current process handle or the
17349 current thread handle here. Instead call win32_clear_inferiors.
17350 (win32_detach): Don't open a new handle to the process. Call
17351 win32_clear_inferiors.
17352 (win32_join): Don't rely on current_process_handle; open a new
17353 handle using the process id.
17354 (win32_wait): Call win32_clear_inferiors when the inferior process
17355 has exited.
17356
17357 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17358
17359 * server.c (monitor_show_help): Add "exit".
17360
17361 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17362
17363 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17364 (clean): Add reg-xtensa.c.
17365 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17366 * configure.srv (xtensa*-*-linux*) New target.
17367 * linux-xtensa-low.c: New.
17368 * xtensa-xtregs.c: New.
17369
17370 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17371
17372 * hostio.c: Don't include errno.h.
17373 (errno_to_fileio_errno): Move to hostio-errno.
17374 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17375 error number outputting to the target->hostio_last_error callback.
17376 (hostio_packet_error): Use FILEIO_EINVAL directly.
17377 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17378 calls to hostio_error.
17379 * hostio-errno.c: New.
17380 * server.h (hostio_last_error_from_errno): Declare.
17381 * target.h (target_ops): Add hostio_last_error member.
17382 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17383 as hostio_last_error handler.
17384 * spu-low.c (spu_target_ops): Likewise.
17385 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17386 (wince_hostio_last_error): New functions.
17387 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17388 as hostio_last_error handler.
17389 (win32_target_ops) [!_WIN32_WCE]: Register
17390 hostio_last_error_from_errno as hostio_last_error handler.
17391 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17392 (hostio-errno.o): New rule.
17393 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17394 * configure.srv (srv_hostio_err_objs): New variable. Default to
17395 hostio-errno.o.
17396 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17397 * configure: Regenerate.
17398
17399 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17400
17401 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17402 (linux_kill, linux_detach): Clean up the process list.
17403 * remote-utils.c (remote_open): Improve port number parsing.
17404 (putpkt_binary, input_interrupt): Only send interrupts if the target
17405 is running.
17406 * server.c (extended_protocol): Make static.
17407 (attached): Define earlier.
17408 (exit_requested, response_needed, program_argv): New variables.
17409 (target_running): New.
17410 (start_inferior): Clear attached here.
17411 (attach_inferior): Set attached here.
17412 (require_running): Define.
17413 (handle_query): Use require_running and target_running. Implement
17414 "monitor exit".
17415 (handle_v_attach, handle_v_run): New.
17416 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17417 (gdbserver_usage): Update.
17418 (main): Redo argument parsing. Handle --debug and --multi. Handle
17419 --attach along with other options or after the port. Save
17420 program_argv. Support no initial program. Resynchronize
17421 communication with GDB after an error. Handle "monitor exit".
17422 Use require_running and target_running. Always allow the extended
17423 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17424 restart in extended mode.
17425 * README: Refer to the GDB manual. Update --attach usage.
17426
17427 2007-12-20 Andreas Schwab <schwab@suse.de>
17428
17429 * linux-low.c (STACK_SIZE): Define.
17430 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17431 (linux_test_for_tracefork): Likewise.
17432
17433 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17434
17435 * linux-low.c (linux_wait_for_event): Update messages. Do not
17436 reinsert auto-delete breakpoints.
17437 * mem-break.c (struct breakpoint): Change return type of handler to
17438 int.
17439 (set_breakpoint_at): Update handler type.
17440 (reinsert_breakpoint_handler): Return 1 instead of calling
17441 delete_breakpoint.
17442 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17443 setting a new one.
17444 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17445 * mem-break.h (set_breakpoint_at): Update handler type.
17446 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17447 * win32-low.c (auto_delete_breakpoint): New.
17448 (get_child_debug_event): Use it.
17449
17450 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17451
17452 * configure.ac: Check for pread and pwrite.
17453 * hostio.c (handle_pread): Fall back to lseek and read.
17454 (handle_pwrite): Fall back to lseek and write.
17455 * config.in, configure: Regenerated.
17456
17457 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17458
17459 * server.c (myresume): Add own_buf argument.
17460 (main): Update calls.
17461
17462 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17463
17464 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17465 * remote-utils.c (remote_open): Do not call disable_async_io.
17466 (block_async_io): Delete.
17467 (unblock_async_io): Make static.
17468 (initialize_async_io): New.
17469 * server.c (handle_v_cont): Handle async I/O here.
17470 (myresume): Likewise. Move other common resume tasks here...
17471 (main): ... from here. Call initialize_async_io. Disable async
17472 I/O before the main loop.
17473 * server.h (initialize_async_io): Declare.
17474 (block_async_io, unblock_async_io): Delete prototypes.
17475 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17476
17477 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17478
17479 * remote-utils.c (readchar): Allow binary data in received messages.
17480
17481 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17482
17483 * win32-low.c (attaching): New global.
17484 (win32_create_inferior): Clear the `attaching' global.
17485 (win32_attach): Set the `attaching' global.
17486 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17487 attaching. Only set a breakpoint at the entry point if not
17488 attaching.
17489
17490 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17491
17492 * server.c (main): Don't report dll events on the initial
17493 connection on attaches.
17494
17495 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17496
17497 * server.c (main): Relax numerical bases supported for the pid of
17498 the --attach command line argument.
17499
17500 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17501
17502 * win32-low.c (win32_attach): Call OpenProcess before
17503 DebugActiveProcess, not after. Add last error output to error
17504 call.
17505
17506 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17507
17508 * win32-low.c (win32_get_thread_context)
17509 (win32_set_thread_context): New functions.
17510 (thread_rec): Use win32_get_thread_context.
17511 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17512 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17513 field.
17514
17515 2007-12-03 Leo Zayas
17516 Pedro Alves <pedro_alves@portugalmail.pt>
17517
17518 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17519 global variables.
17520 (child_add_thread): Minor cleanup.
17521 (child_continue): Resume artificially suspended threads before
17522 calling ContinueDebugEvent.
17523 (suspend_one_thread): New.
17524 (fake_breakpoint_event): New.
17525 (get_child_debug_event): Change return type to int. Check here if
17526 gdb sent an interrupt request. If a soft interrupt was requested,
17527 fake a breakpoint event. Return 0 if there is no event to handle,
17528 and 1 otherwise.
17529 (win32_wait): Don't check here if gdb sent an interrupt request.
17530 Ensure there is a valid event to handle.
17531 (win32_request_interrupt): Add soft interruption method as last
17532 resort.
17533
17534 2007-12-03 Leo Zayas
17535 Pedro Alves <pedro_alves@portugalmail.pt>
17536
17537 * win32-low.h (win32_thread_info): Add descriptions to the
17538 structure members. Replace `suspend_count' counter by a
17539 `suspended' flag.
17540 * win32-low.c (thread_rec): Update condition of when to get the
17541 context from the inferior. Rely on ContextFlags being set if it
17542 has already been retrieved. Only suspend the inferior thread if
17543 we haven't already. Warn if that fails.
17544 (continue_one_thread): s/suspend_count/suspended/. Only call
17545 ResumeThread once. Warn if that fails.
17546
17547 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17548
17549 * win32-low.c (win32_wait): Don't read from the inferior when it
17550 has already exited.
17551
17552 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
17553
17554 * Makefile.in (win32_low_h): New variable.
17555 (win32-low.o): Add dependency on $(win32_low_h).
17556 (win32-arm-low.o, win32-i386-low.o): New rules.
17557
17558 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17559
17560 * hostio.c: Correct copyright year.
17561
17562 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
17563
17564 * Makefile.in (OBS): Add hostio.o.
17565 (hostio.o): New rule.
17566 * server.h (handle_vFile): Declare.
17567 * hostio.c: New file.
17568 * server.c (handle_v_requests): Take packet_len and new_packet_len
17569 for binary packets. Call handle_vFile.
17570 (main): Update call to handle_v_requests.
17571
17572 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
17573
17574 * linux-low.c: Include <sched.h>.
17575
17576 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
17577
17578 * linux-low.c (linux_tracefork_grandchild): New.
17579 (linux_tracefork_child): Use clone.
17580 (linux_test_for_tracefork): Use clone; allocate and free a stack.
17581
17582 2007-10-31 Joel Brobecker <brobecker@adacore.com>
17583
17584 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
17585
17586 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
17587
17588 * linux-low.c (handle_extended_wait): Handle unexpected signals.
17589
17590 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
17591
17592 * inferiors.c (change_inferior_id): Delete.
17593 (add_pid_to_list, pull_pid_from_list): New.
17594 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
17595 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
17596 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
17597 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
17598 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
17599 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
17600 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
17601 (using_threads): Always set to 1.
17602 (handle_extended_wait): New.
17603 (add_process): Do not set TID.
17604 (linux_create_inferior): Set must_set_ptrace_flags.
17605 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
17606 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
17607 (linux_thread_alive): Rename TID argument to LWPID.
17608 (linux_wait_for_process): Handle unknown processes. Do not use TID.
17609 (linux_wait_for_event): Do not use TID or check using_threads. Update
17610 call to dead_thread_notify. Call handle_extended_wait.
17611 (linux_create_inferior): Use PTRACE_SETOPTIONS.
17612 (send_sigstop): Delete sigstop_sent.
17613 (wait_for_sigstop): Avoid TID.
17614 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
17615 (linux_test_for_tracefork): New.
17616 (linux_lookup_signals): Use thread_db_active and
17617 linux_supports_tracefork_flag.
17618 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
17619 * linux-low.h (get_process_thread): Avoid TID.
17620 (struct process_ifo): Move thread_known and tid to the end. Remove
17621 sigstop_sent.
17622 (linux_attach_lwp, thread_db_init): Update prototypes.
17623 * server.h (change_inferior_id): Delete prototype.
17624 (add_pid_to_list, pull_pid_from_list): New prototypes.
17625 * thread-db.c (thread_db_use_events): New.
17626 (find_first_thread): Rename to...
17627 (find_one_thread): ...this. Update callers and messages. Do not
17628 call fatal. Check thread_db_use_events. Do not call
17629 change_inferior_id or new_thread_notify.
17630 (maybe_attach_thread): Update. Do not call new_thread_notify.
17631 (thread_db_init): Set thread_db_use_events. Check use_events.
17632 * utils.c (fatal, warning): Correct message prefix.
17633
17634 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
17635
17636 * Makefile.in (clean): Remove new files.
17637 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
17638 (powerpc-64.o, powerpc-64.c): New rules.
17639 * configure.srv: Use alternate register sets for powerpc64-*-linux*
17640 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
17641 with SPE.
17642 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
17643 SPE targets.
17644 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
17645 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
17646 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
17647 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
17648 (target_regsets): Add AltiVec and SPE register sets.
17649 * configure.ac: Check for AltiVec and SPE.
17650 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
17651 (ppc_fill_vrregset, ppc_store_vrregset): New.
17652 (target_regsets): Add AltiVec register set.
17653 * configure: Regenerated.
17654
17655 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
17656
17657 * linux-low.c (O_LARGEFILE): Define.
17658 (linux_read_memory): Use /proc/PID/mem.
17659 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
17660 * configure, config.in: Regenerated.
17661
17662 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17663
17664 * linux-low.c (linux_wait_for_event): Do not pass signals while
17665 single-stepping.
17666
17667 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17668
17669 * win32-low.c (create_process): New.
17670 (win32_create_inferior): Use create_process instead of
17671 CreateProcess. If create_process failed retry appending an ".exe"
17672 suffix. Store the GetLastError result immediatelly after
17673 create_process calls and use it on the call to error.
17674
17675 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
17676
17677 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
17678
17679 2007-08-23 Joel Brobecker <brobecker@adacore.com>
17680
17681 * configure.ac: Switch license to GPLv3.
17682
17683 2007-08-01 Michael Snyder <msnyder@access-company.com>
17684
17685 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
17686
17687 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
17688
17689 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
17690 typedef.
17691 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
17692 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
17693 CloseToolhelp32Snapshot.
17694 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
17695 CloseToolhelp32Snapshot.
17696
17697 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
17698
17699 * server.c (main): Check for inferior exit before main loop.
17700
17701 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
17702
17703 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
17704 instead of on tmp_desc.
17705
17706 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
17707 Daniel Jacobowitz <dan@codesourcery.com>
17708
17709 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
17710 (add_thread): Minor cleanups.
17711 (clear_inferiors): Move lower in the file. Clear the DLL
17712 list.
17713 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
17714 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
17715 (xml_escape_text): New.
17716 * server.c (handle_query): Handle qXfer:libraries:read. Report it
17717 for qSupported.
17718 (handle_v_cont): Report errors.
17719 (gdbserver_version): Update.
17720 (main): Correct size of own_buf. Do not report initial DLL events.
17721 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
17722 (unloaded_dll, xml_escape_text): New.
17723 * win32-low.c (enum target_waitkind): Update comments.
17724 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
17725 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
17726 (win32_EnumProcessModules, win32_GetModuleInformation)
17727 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
17728 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
17729 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
17730 (win32_Module32First, win32_Module32Next, load_toolhelp)
17731 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
17732 (get_child_debug_event): Handle DLL events.
17733 (win32_wait): Likewise.
17734
17735 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
17736
17737 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
17738 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
17739
17740 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17741
17742 * win32-low.c (handle_output_debug_string): Ignore event if not
17743 waiting.
17744
17745 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
17746
17747 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
17748
17749 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
17750
17751 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
17752
17753 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
17754
17755 * inferiors.c (change_inferior_id): Add comment.
17756 * linux-low.c (check_removed_breakpoint): Add an early
17757 prototype. Improve debug output.
17758 (linux_attach): Doc update.
17759 (linux_detach_one_process, linux_detach): Clean up before releasing
17760 each process.
17761 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
17762 * linux-low.h (struct process_info): Doc improvement.
17763 * mem-break.c (delete_all_breakpoints): New.
17764 * mem-break.h (delete_all_breakpoints): New prototype.
17765 * thread-db.c (find_first_thread): New.
17766 (thread_db_create_event): Call it instead of
17767 thread_db_find_new_threads. Clean up unused variables.
17768 (maybe_attach_thread): Remove first thread handling.
17769 (thread_db_find_new_threads): Use find_first_thread.
17770 (thread_db_get_tls_address): Likewise.
17771
17772 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
17773
17774 * thread-db.c (thread_db_find_new_threads): Add prototype.
17775 (thread_db_create_event): Check for the main thread before adding
17776 a new thread.
17777 (maybe_attach_thread): Only enable event reporting if TID == 0.
17778 (thread_db_get_tls_address): Check for new threads.
17779
17780 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
17781
17782 * linux-low.c (linux_create_inferior): Try execv before execvp.
17783 * spu-low.c (spu_create_inferior): Likewise.
17784
17785 2007-06-13 Mike Frysinger <vapier@gentoo.org>
17786
17787 * linux-low.c (linux_create_inferior): Change execv to execvp.
17788 * spu-low.c (spu_create_inferior): Likewies.
17789
17790 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
17791
17792 * Makefile.in (clean): Clean new files instead of deleted ones.
17793 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
17794 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
17795 rules.
17796 * configure.srv: Specify XML files and new regformats for MIPS and
17797 MIPS64 GNU/Linux.
17798 * linux-mips-low.c (mips_num_regs): Set to only used registers.
17799 (mips_regmap): Do not fetch $0. Remove unused registers. Add
17800 an entry for the restart register.
17801 (mips_cannot_fetch_register, mips_cannot_store_register)
17802 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
17803 register names to match the XML descriptions.
17804 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
17805 restart register instead of $0.
17806
17807 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17808 Markus Deuling <deuling@de.ibm.com>
17809
17810 * remote-utils.c (decode_xfer_write): New function.
17811 * server.h (decode_xfer_write): Add prototype.
17812 * server.c (handle_query): Add PACKET_LEN argument. Support
17813 qXfer:spu:read and qXfer:spu:write packets.
17814 (main): Pass packet_len to handle_query.
17815 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
17816 * target.h (target_ops): Add qxfer_spu.
17817
17818 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
17819
17820 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
17821 accessing non-seekable spufs files.
17822
17823 2007-05-16 Markus Deuling <deuling@de.ibm.com>
17824
17825 * server.c (handle_query): Add reply for qC packet.
17826
17827 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17828 Leo Zayas <lerele@champenstudios@com>
17829
17830 * server.h (check_remote_input_interrupt_request): New function.
17831 * remote_utils.c (INVALID_DESCRIPTOR): New define.
17832 (remote_desc): Initialize with INVALID_DESCRIPTOR.
17833 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
17834 (check_remote_input_interrupt_request): New function.
17835 * server.h (check_remote_input_interrupt_request): Declare.
17836 * win32-low.c (winapi_DebugBreakProcess,
17837 winapi_GenerateConsoleCtrlEvent): New typedefs.
17838 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
17839 to 250 ms.
17840 (win32_wait): Check for remote interrupt request
17841 with check_remote_input_interrupt_request.
17842 (win32_request_interrupt): New function.
17843 (win32_target_op): Set request_interrupt to win32_request_interrupt.
17844
17845 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17846
17847 * win32-low.c (debug_registers_changed,
17848 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
17849 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
17850 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
17851 (thread_rec): Get context using the low target.
17852 (child_add_thread): Call thread_added on the low target,
17853 which does the same thing.
17854 (regptr): Delete.
17855 (do_initial_child_stuff): Remove debug registers references.
17856 Set context using the low target. Resume threads after
17857 setting the contexts.
17858 (child_continue): Remove dead variable. Remove debug
17859 registers references.
17860 (child_fetch_inferior_registers): Go through the low target.
17861 (do_child_store_inferior_registers): Remove.
17862 (child_store_inferior_registers): Go through the low target.
17863 (win32_resume): Remove debug registers references.
17864 Set context using the low target.
17865 (handle_exception): Change return type to void. Don't record
17866 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
17867 first chance exception.
17868 (get_child_debug_event): Change return type to void. Remove
17869 goto loop. Always return after waiting for debug event.
17870 (win32_wait): Convert to switch statement. Handle spurious
17871 events.
17872
17873 * win32-i386-low.c (debug_registers_changed,
17874 debug_registers_used): New.
17875 (initial_stuff): Rename to ...
17876 (i386_initial_stuff): ... this. Clear debug registers
17877 state variables.
17878 (store_debug_registers): Delete.
17879 (i386_get_thread_context): New.
17880 (load_debug_registers): Delete.
17881 (i386_set_thread_context): New.
17882 (i386_thread_added): New.
17883 (single_step): Rename to ...
17884 (i386_single_step): ... this.
17885 (do_fetch_inferior_registers): Rename to ...
17886 (i386_fetch_inferior_register): ... this.
17887 (i386_store_inferior_register): New.
17888 (the_low_target): Adapt to new interface.
17889
17890 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
17891 (arm_get_thread_context): New.
17892 (arm_set_thread_context): New.
17893 (regptr): New.
17894 (do_fetch_inferior_registers): Rename to ...
17895 (arm_fetch_inferior_register): ... this.
17896 (arm_store_inferior_register): New.
17897 (arm_wince_breakpoint): Reimplement as unsigned long.
17898 (arm_wince_breakpoint_len): Define.
17899 (the_low_target): Adapt to new interface.
17900
17901 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
17902 load_debug_registers. Add get_thread_context, set_thread_context,
17903 thread_added and store_inferior_register. Rename
17904 fetch_inferior_registers to fetch_inferior_register.
17905 (regptr): Remove declaration.
17906
17907 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17908
17909 * linux-low.c (linux_detach): Change return type to int. Return 0.
17910 * spu-low.c (spu_detach): Likewise.
17911
17912 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17913
17914 * target.h (target_ops): Change return type of detach to int.
17915 Add join.
17916 (join_inferior): New.
17917 * server.c (main): Don't skip detach support on mingw32.
17918 If the inferior doesn't support detaching return error.
17919 Call join_inferior instead of using waitpid.
17920 * linux-low.c (linux_join): New.
17921 (linux_target_op): Add linux_join.
17922 * spu-low.c (spu_join): New.
17923 (spu_target_ops): Add spu_join.
17924 * win32-low.c (win32_detach): Adapt to new interface.
17925 Reopen current_process_handle before detaching. Issue a child
17926 resume before detaching.
17927 (win32_join): New.
17928 (win32_target_op): Add win32_join.
17929
17930 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17931
17932 * win32-low.c (win32-attach): Fix return value.
17933 * target.h (target_ops): Describe ATTACH return values.
17934
17935 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17936
17937 * win32-low.c (GETPROCADDRESS): Define.
17938 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
17939 (winapi_DebugSetProcessKillOnExit): Likewise.
17940 (win32_create_inferior): Force usage of ansi CreateProcessA.
17941 (win32_attach): Use GETPROCADDRESS.
17942 (win32_detach): Likewise.
17943
17944 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
17945
17946 * win32-low.c (win32_wait): Don't use WSTOPSIG.
17947
17948 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
17949
17950 * win32-low.c: Commit leftover changes from 2007-03-29.
17951
17952 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17953
17954 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
17955 fields short instead of int. Add explicit padding.
17956 (i387_cache_to_fsave): Remove unnecessary casts.
17957 (i387_fsave_to_cache): Doc fix.
17958 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
17959
17960 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
17961
17962 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
17963 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
17964
17965 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17966
17967 * configure.srv (arm*-*-mingw32ce*): Move near the other
17968 arm targets.
17969
17970 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
17971
17972 * configure.ac: Add errno checking.
17973 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
17974 sys/file.h and malloc.h.
17975 (AC_CHECK_DECLS): Add perror.
17976 (srv_mingwce): Handle.
17977 * configure.srv (i[34567]86-*-cygwin*): Add
17978 win32-i386-low.o to srv_tgtobj.
17979 (i[34567]86-*-mingw*): Likewise.
17980 (arm*-*-mingw32ce*): Add case.
17981 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17982 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
17983 [__MINGW32CE__] (strerror): New function.
17984 [__MINGW32CE__] (errno): Define to GetLastError.
17985 [__MINGW32CE__] (COUNTOF): New macro.
17986 (remote_open): Remove extra close call.
17987 * mem-break.c (delete_breakpoint_at): New function.
17988 * mem-break.h (delete_breakpoint_at): Declare.
17989 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
17990 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
17991 [USE_WIN32API] (read, write): Add char* casts.
17992 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
17993 * server.h: Include wincecompat.h on Windows CE.
17994 [HAVE_ERRNO_H]: Check.
17995 (perror): Declare if not declared.
17996 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
17997 (perror_with_name): Remove errno declaration.
17998 * wincecompat.h: New.
17999 * wincecompat.c: New.
18000 * win32-low.h: New.
18001 * win32-arm-low.c: New.
18002 * win32-i386-low.c: New.
18003 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18004 (OUTMSG2): Make it safe.
18005 (_T): New macro.
18006 (COUNTOF): New macro.
18007 (NUM_REGS): Get it from the low target.
18008 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18009 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18010 (thread_rec): Let low target handle debug registers.
18011 (child_add_thread): Likewise.
18012 (child_init_thread_list): Likewise.
18013 (continue_one_thread): Likewise.
18014 (regptr): New.
18015 (do_child_fetch_inferior_registers): Move to ...
18016 * win32-i386-low.c: ... here, and rename to ...
18017 (do_fetch_inferior_registers): ... this.
18018 * win32-low.c (child_fetch_inferior_registers):
18019 Go through the low target.
18020 (do_child_store_inferior_registers): Use regptr.
18021 (strwinerror): New function.
18022 (win32_create_inferior): Handle Windows CE.
18023 Use strwinerror instead of strerror on Windows error
18024 codes. Add program to the error output.
18025 Don't close the main thread handle on Windows CE.
18026 (win32_attach): Use coredll.dll on Windows CE.
18027 (win32_kill): Close current process and current
18028 thread handles.
18029 (win32_detach): Use coredll.dll on Windows CE.
18030 (win32_resume): Let low target handle debug registers, and
18031 step request.
18032 (handle_exception): Add/Remove initial breakpoint. Avoid
18033 non-existant WSTOPSIG on Windows CE.
18034 (win32_read_inferior_memory): Cast to remove warning.
18035 (win32_arch_string): Go through the low target.
18036 (initialize_low): Call set_breakpoint_data with the low
18037 target's breakpoint.
18038 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18039 FOP_REGNUM, mappings): Move to ...
18040 * win32-i386-low.c: ... here.
18041 * win32-low.c (win32_thread_info): Move to ...
18042 * win32-low.h: ... here.
18043 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18044 win32-arm-low.c and wincecompat.c.
18045 (all:): Add $EXEEXT.
18046 (install-only:): Likewise.
18047 (gdbserver:): Likewise.
18048 (gdbreplay:): Likewise.
18049 * config.in: Regenerate.
18050 * configure: Regenerate.
18051
18052 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18053
18054 * win32-low.c: Rename typedef thread_info to
18055 win32_thread_info throughout.
18056
18057 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18058
18059 * win32-i386-low.c: Rename to ...
18060 * win32-low.c: ... this.
18061 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18062 * Makefile.in: Likewise.
18063
18064 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18065
18066 * remote-utils.c (monitor_output): Constify msg parameter.
18067 * server.h (monitor_output): Likewise.
18068 * win32-i386-low.c (handle_output_debug_string): New.
18069 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18070 handle_output_debug_string.
18071 (get_child_debug_event): Likewise.
18072
18073 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18074
18075 * server.c (main): Correct strtoul check.
18076
18077 2007-03-27 Jon Ringle <jon@ringle.org>
18078
18079 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18080
18081 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18082
18083 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18084
18085 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18086
18087 * terminal.h: Check HAVE_SGTTY_H.
18088
18089 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18090
18091 * remote-utils.c (remote_open): Print out the assigned port number.
18092
18093 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18094
18095 * remote-utils.c (monitor_output): New function.
18096 * server.c (debug_threads): Define here.
18097 (monitor_show_help): New function.
18098 (handle_query): Handle qRcmd.
18099 (main): Do not handle 'd' packet.
18100 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18101 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18102 of debug_threads.
18103
18104 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18105
18106 * Makefile.in (EXEEXT): New.
18107 (clean): Use $(EXEEXT).
18108
18109 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18110
18111 * target.h (target_ops): Rename send_signal to request_interrupt,
18112 and remove enum target_signal parameter.
18113 * linux-low.c (linux_request_interrupt): Rename from
18114 linux_send_signal, and always send SIGINT.
18115 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18116 and always send SIGINT.
18117 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18118 of send_signal.
18119 (input_interrupt): Likewise.
18120
18121 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18122
18123 * server.c (get_features_xml): Check if target implemented
18124 arch_string.
18125 * win32-i386-low.c (win32_arch_string): New.
18126 (win32_target_ops): Add win32_arch_string as arch_string member.
18127
18128 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18129
18130 * spu-low.c (spu_arch_string): New.
18131 (spu_target_ops): Add spu_arch_string.
18132
18133 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18134
18135 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18136 * configure.ac: Do not check for terminal.h.
18137 * configure, config.in: Regenerated.
18138
18139 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18140
18141 * Makefile.in (OBS): Add $(XML_BUILTIN).
18142 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18143 (clean): Update.
18144 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18145 (arm-with-iwmmxt.c): New.
18146 * config.in, configure: Regenerate.
18147 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18148 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18149 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18150 (arm*-*-linux*): Add iWMMXt and regset support.
18151 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18152 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18153 (arm_store_wmmxregset, target_regsets): New.
18154 * server.c (get_features_xml): Take annex argument. Check builtin
18155 XML documents.
18156 (handle_query): Handle multiple annexes.
18157
18158 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18159
18160 * remote-utils.c [USE_WIN32API] (read, write): Define.
18161 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18162 write.
18163
18164 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18165
18166 * linux-i386-low.c (the_low_target): Set arch_string.
18167 * linux-x86-64-low.c (the_low_target): Likewise.
18168 * linux-low.c (linux_arch_string): New.
18169 (linux_target_ops): Add it.
18170 * linux-low.h (struct linux_target_ops): Add arch_string.
18171 * server.c (write_qxfer_response): Use const void * for DATA.
18172 (get_features_xml): New.
18173 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18174 * target.h (struct target_ops): Add arch_string method.
18175
18176 2007-01-03 Denis Pilat <denis.pilat@st.com>
18177 Daniel Jacobowitz <dan@codesourcery.com>
18178
18179 * linux-low.c (linux_kill): Handle being called with no threads.
18180 * win32-i386-low.c (win32_kill): Likewise.
18181 (get_child_debug_event): Clear current_process_handle.
18182
18183 2006-12-30 Denis PILAT <denis.pilat@st.com>
18184 Daniel Jacobowitz <dan@codesourcery.com>
18185
18186 * remote-utils.c (remote_open): Check the type of specified
18187 serial port devices before opening them.
18188 * server.c (main): Kill the inferior if an error occurs during
18189 the first remote_open.
18190
18191 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18192
18193 * README: Update supported targets.
18194
18195 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18196
18197 * Makefile.in (clean): Remove reg-mips64.c.
18198 (reg-mips64.c, reg-mips64.o): New rules.
18199 * configure.srv: Handle mips64. Include regset support for mips.
18200 * linux-mips-low.c (union mips_register): New.
18201 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18202 (mips_breakpoint, mips_breakpoint_at): Use int.
18203 (mips_collect_register, mips_supply_register)
18204 (mips_collect_register_32bit, mips_supply_register_32bit)
18205 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18206 (mips_store_fpregset, target_regsets): New.
18207 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18208
18209 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18210
18211 * configure.srv: Add target "spu*-*-*".
18212 * Makefile.in (clean): Remove reg-spu.c.
18213 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18214 * spu-low.c: New file.
18215
18216 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18217
18218 * configure.ac: Correct td_thr_tls_get_addr test.
18219 * configure: Regenerated.
18220
18221 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18222
18223 * linux-low.c (linux_wait_for_event): Reformat. Use the
18224 pass_signals array.
18225 * remote-utils.c (decode_address_to_semicolon): New.
18226 * server.c (pass_signals, handle_general_set): New.
18227 (handle_query): Mention QPassSignals for qSupported.
18228 (main): Call handle_general_set.
18229 * server.h (pass_signals, decode_address_to_semicolon): New.
18230
18231 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18232
18233 * server.c (handle_query): Correct error handling for read_auxv.
18234
18235 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18236
18237 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18238 and srv_linux_thread_db to yes.
18239 * linux-s390-low.c (s390_fill_gregset): New function.
18240 (target_regsets): Define data structure.
18241
18242 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18243
18244 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18245 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18246 * config.in, configure: Regenerated.
18247 * inferiors.c (gdb_id_to_thread): New function.
18248 (gdb_id_to_thread_id): Use it.
18249 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18250 * linux-low.h (struct process_info): Add th member.
18251 (thread_db_get_tls_address): New prototype.
18252 * remote-utils.c (decode_address): Make non-static.
18253 * server.c (handle_query): Handle qGetTLSAddr.
18254 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18255 * target.h (struct target_ops): Add get_tls_address.
18256 * thread-db.c (maybe_attach_thread): Save the thread handle.
18257 (thread_db_get_tls_address): New.
18258
18259 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18260
18261 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18262 (linux_resume_one_process): Take a siginfo_t *. Update all
18263 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18264 (struct pending_signals): Add a siginfo_t.
18265 (linux_wait_for_process): Always set last_status.
18266 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18267 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18268 * linux-low.h (struct process_info): Add last_status.
18269
18270 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18271
18272 * remote-utils.c (try_rle): New function.
18273 (putpkt_binary): Use it.
18274
18275 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18276
18277 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18278 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18279 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18280 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18281 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18282 point registers.
18283
18284 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18285
18286 * server.c (terminal_fd): New variable.
18287 (old_foreground_pgrp): Likewise.
18288 (restore_old_foreground_pgrp): New function.
18289 (start_inferior): Record the terminal file descriptor in terminal_fd
18290 and its original foreground group in old_foreground_pgrp. Register
18291 restore_old_foreground_pgrp with atexit().
18292
18293 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18294
18295 * server.c (handle_query): Correct qPart to qXfer.
18296
18297 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18298
18299 * configure.ac: Check for more headers which are missing on
18300 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18301 * configure.srv: Add Cygwin and mingw32.
18302 * remote-utils.c: Don't include headers unconditionally which
18303 are missing on mingw32. Include <winsock.h> for mingw32.
18304 (remote_open): Adjust for mingw32 support. Flush
18305 standard error after writing to it.
18306 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18307 (unblock_async_io, enable_async_io, disable_async_io)
18308 (readchar, getpkt): Update for Winsock support.
18309 (prepare_resume_reply): Expect a protocol signal number.
18310 * server.c: Disable <sys/wait.h> on mingw32.
18311 (start_inferior): Adjust for mingw32 support. Flush
18312 standard error after writing to it.
18313 (attach_inferior): Likewise. Use protocol signal
18314 numbers.
18315 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18316 and names.
18317 * win32-i386-low.c: New file.
18318 * Makefile.in (XM_CLIBS): Set.
18319 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18320 (win32-i386-low.o): New dependency rule.
18321 * linux-low.c (linux_wait): Use target signal numbers.
18322 * target.h (struct target_ops): Doc fix.
18323 * server.h (target_signal_to_name): New prototype.
18324 * gdbreplay.c: Don't include headers unconditionally which
18325 are missing on mingw32. Include <winsock.h> for mingw32.
18326 (remote_close, remote_open): Adjust for Winsock support.
18327 * configure, config.in: Regenerated.
18328
18329 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18330
18331 * server.c (decode_xfer_read, write_qxfer_response): New.
18332 (handle_query): Take a packet length argument. Handle
18333 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18334 the qSupported response.
18335 (main): Update call to handle_query.
18336
18337 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18338
18339 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18340 (putpkt_binary): Renamed from putpkt and adjusted for binary
18341 data.
18342 (putpkt): New wrapper for putpkt_binary.
18343 (readchar): Don't mask off the high bit.
18344 (decode_X_packet): New function.
18345 * server.c (main): Call putpkt_binary if a handler sets the packet
18346 length. Save the length of the incoming packet. Handle 'X'.
18347 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18348
18349 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18350
18351 * server.c (handle_query): Handle qSupported.
18352
18353 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18354
18355 * remote-utils.c (all_symbols_looked_up): New variable.
18356 (look_up_one_symbol): Check it.
18357 * server.h (look_up_one_symbol): New declaration.
18358 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18359
18360 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18361
18362 * Makefile.in (linux-arm-low.o): Update dependencies.
18363 * linux-arm-low.c: Include "gdb_proc_service.h".
18364 (PTRACE_GET_THREAD_AREA): Define.
18365 (ps_get_thread_area): New function.
18366
18367 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18368
18369 * configure.srv (m68k*-*-uclinux*): New target.
18370 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18371 (linux_resume_one_process): Remove extraneous cast.
18372 (linux_read_offsets): New.
18373 (linux_target_op): Add linux_read_offsets on mmuless systems.
18374 * server.c (handle_query): Add qOffsets logic.
18375 * target.h (struct target_ops): Add read_offsets.
18376
18377 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18378
18379 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18380 (PTRACE_GET_THREAD_AREA): Define.
18381 (ps_get_thread_area): New function.
18382 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18383 (linux-x86-64-low.o): Update.
18384
18385 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18386
18387 * configure.ac: Remove checks for prfpregset_t.
18388 * gdb_proc_service.h: New file.
18389 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18390 new "gdb_proc_service.h".
18391 * proc-service.c: Likewise.
18392 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18393 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18394 * Makefile.in (gdb_proc_service_h): Updated.
18395 * configure, config.in: Regenerated.
18396
18397 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18398
18399 * remote-utils.c (prepare_resume_reply): Move declaration
18400 of gdb_id_from_wait to the top of the block.
18401
18402 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18403
18404 * linux-low.c (regsets_store_inferior_registers): Read the regset
18405 from the target before filling it.
18406
18407 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18408
18409 * server.c (attach_inferior): Return SIGTRAP for a successful
18410 attach.
18411
18412 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18413
18414 * Makefile.in (OBS): Add version.o.
18415 (STAGESTUFF): Delete.
18416 (version.o): Add dependencies.
18417 (version.c): Replace rule.
18418 (clean): Remove version.c.
18419 * server.c (gdbserver_version): New.
18420 (gdbserver_usage): Use printf.
18421 (main): Handle --version and --help.
18422 * server.h (version, host_name): Add declarations.
18423
18424 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18425
18426 * linux-arm-low.c:
18427 * linux-arm-low.c:
18428 * inferiors.c:
18429 * i387-fp.h:
18430 * i387-fp.c:
18431 * gdbreplay.c:
18432 * regcache.c:
18433 * proc-service.c:
18434 * mem-break.h:
18435 * mem-break.c:
18436 * linux-x86-64-low.c:
18437 * linux-sh-low.c:
18438 * linux-s390-low.c:
18439 * linux-ppc64-low.c:
18440 * linux-ppc-low.c:
18441 * linux-mips-low.c:
18442 * linux-m68k-low.c:
18443 * linux-m32r-low.c:
18444 * linux-low.h:
18445 * linux-low.c:
18446 * linux-ia64-low.c:
18447 * linux-i386-low.c:
18448 * linux-crisv32-low.c:
18449 * thread-db.c:
18450 * terminal.h:
18451 * target.h:
18452 * target.c:
18453 * server.h:
18454 * server.c:
18455 * remote-utils.c:
18456 * regcache.h:
18457 * utils.c:
18458 * Makefile.in:
18459 * configure.ac:
18460 * gdbserver.1: Add (C) after Copyright. Update the FSF
18461 address.
18462
18463 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18464
18465 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18466 (arm_breakpoint_at): Recognize both breakpoints.
18467 (the_low_target): Use the correct breakpoint instruction.
18468
18469 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18470
18471 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18472 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18473 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18474 (the_low_target): Update.
18475
18476 2005-10-25 Andreas Schwab <schwab@suse.de>
18477
18478 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18479
18480 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18481 (ia64_num_regs): Reduce to 462.
18482
18483 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18484
18485 * acinclude.m4: Correct quoting.
18486 * aclocal.m4: Regenerated.
18487
18488 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18489 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18490 (thread_db_init): Call thread_db_err_str.
18491 * configure.ac: Check for TD_VERSION.
18492 * config.in, configure: Regenerated.
18493
18494 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18495
18496 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18497
18498 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18499
18500 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18501 is not available. Define HAVE_PTRACE_GETREGS if it is.
18502 * config.in, configure: Regenerated.
18503 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18504 * linux-i386-low.c, linux-m68k-low.c: Update to use
18505 HAVE_PTRACE_GETREGS.
18506 * linux-low.c (regsets_fetch_inferior_registers)
18507 (regsets_store_inferior_registers): Only return 0 if we processed
18508 GENERAL_REGS.
18509 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18510 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18511
18512 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18513
18514 * inferiors.c (struct thread_info): Add gdb_id.
18515 (add_thread): Add gdb_id argument.
18516 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18517 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18518 calls to add_thread.
18519 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18520 * server.c (handle_query): Use thread_to_gdb_id.
18521 (handle_v_cont, main): Use gdb_id_to_thread_id.
18522 * server.h (add_thread): Update prototype.
18523 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18524 prototypes.
18525
18526 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18527
18528 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18529 left-padded registers.
18530 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18531 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18532
18533 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18534
18535 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18536 * configure: Regenerate.
18537 * config.in: Regenerate.
18538 * server.h (NEED_DECLARATION_STRERROR):
18539 Replace with !HAVE_DECL_STRERROR.
18540
18541 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
18542
18543 * linux-low.c (linux_wait, linux_send_signal): Don't test
18544 an unsigned long variable for > 0 if it could be MAX_ULONG.
18545 * server.c (myresume): Likewise.
18546 * target.c (set_desired_inferior): Likewise.
18547
18548 2005-06-13 Mark Kettenis <kettenis@gnu.org>
18549
18550 * configure.ac: Simplify and improve check for socklen_t.
18551 * configure, config.in: Regenerate.
18552
18553 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
18554
18555 * acconfig.h: Remove.
18556 * configure.ac: Add a test for socklen_t. Use three-argument
18557 AC_DEFINE throughout.
18558 * config.in: Regenerated using autoheader 2.59.
18559 * configure: Regenerated.
18560
18561 * gdbreplay.c (socklen_t): Provide a default.
18562 (remote_open): Use socklen_t.
18563 * remote-utils.c (socklen_t): Provide a default.
18564 (remote_open): Use socklen_t.
18565 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
18566 unsigned char.
18567
18568 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
18569 char for buffers.
18570 * linux-low.c (linux_read_memory, linux_write_memory)
18571 (linux_read_auxv): Likewise.
18572 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
18573 (check_mem_write): Likewise.
18574 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
18575 Likewise.
18576 * regcache.c (struct inferior_rgcache_data, registers_to_string)
18577 (registers_from_string, register_data): Likewise.
18578 * server.c (handle_query, main): Likewise.
18579 * server.h (convert_ascii_to_int, convert_int_to_ascii)
18580 (decode_M_packet): Likewise.
18581 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
18582 * target.h (struct target_ops): Update read_memory, write_memory,
18583 and read_auxv.
18584 (read_inferior_memory, write_inferior_memory): Update.
18585 * linux-low.h (struct linux_target_ops): Change type of breakpoint
18586 to unsigned char *.
18587 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
18588 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
18589 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
18590 linux-s390-low.c, linux-sh-low.c: Update for changes in
18591 read_inferior_memory and the_low_target->breakpoint.
18592
18593 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
18594
18595 * Makefile.in (SFILES): Add linux-ppc64-low.c.
18596 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
18597 * configure.srv: Add powerpc64-*-linux*.
18598 * linux-ppc64-low.c: New file.
18599
18600 2005-05-23 Orjan Friberg <orjanf@axis.com>
18601
18602 * linux-cris-low.c: New file with support for CRIS.
18603 * linux-crisv32-low.c: Ditto for CRISv32.
18604 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
18605 (clean): Add reg-cris.c and reg-crisv32.c.
18606 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
18607 reg-crisv32.o, and reg-crisv32.c to make rules.
18608 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
18609 recognized targets.
18610
18611 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
18612
18613 * linux-low.c (fetch_register): Ensure buffer size is a multiple
18614 of sizeof (PTRACE_XFER_TYPE).
18615 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
18616
18617 2005-05-12 Orjan Friberg <orjanf@axis.com>
18618
18619 * target.h (struct target_ops): Add insert_watchpoint,
18620 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
18621 pointers for hardware watchpoint support.
18622 * linux-low.h (struct linux_target_ops): Ditto.
18623 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
18624 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
18625 to linux_target_ops.
18626 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
18627 reply packet.
18628 * server.c (main): Recognize 'Z' and 'z' packets.
18629
18630 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
18631
18632 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
18633 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
18634 (the_low_target): Add new members.
18635
18636 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18637
18638 * proc-service.c (ps_lgetregs): Search all_processes instead of
18639 all_threads.
18640
18641 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
18642
18643 * server.c (start_inferior): Change return type to int.
18644 (attach_inferior): Change sigptr to int *.
18645 (handle_v_cont, handle_v_requests): Change signal to int *.
18646 (main): Change signal to int.
18647
18648 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
18649
18650 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
18651 * configure.srv: Add m32r*-*-linux*.
18652 * linux-m32r-low.c: New file.
18653
18654 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
18655
18656 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
18657
18658 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18659
18660 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
18661 Take unsigned long arguments for PIDs.
18662 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
18663 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
18664 (wait_for_sigstop, linux_resume_one_process)
18665 (regsets_fetch_inferior_registers, linux_send_signal)
18666 (linux_read_auxv): Likewise. Update the types of variables holding
18667 PIDs. Update format string specifiers.
18668 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
18669 * remote-utils.c (prepare_resume_reply): Likewise.
18670 * server.c (cont_thread, general_thread, step_thread)
18671 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
18672 unsigned long.
18673 (handle_query): Update format specifiers.
18674 (handle_v_cont, main): Use strtoul for thread IDs.
18675 * server.h (struct inferior_list_entry): Use unsigned long for ID.
18676 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
18677 (general_thread, step_thread, thread_from_wait)
18678 (old_thread_from_wait): Update.
18679 * target.h (struct thread_resume): Use unsigned long for THREAD.
18680 (struct target_ops): Use unsigned long for arguments to attach and
18681 thread_alive.
18682
18683 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
18684
18685 * acinclude.m4: Include bfd/bfd.m4 directly.
18686 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
18687 <agriffis@toolchain.org>.
18688 * aclocal.m4, configure: Regenerated.
18689
18690 2005-01-07 Andrew Cagney <cagney@gnu.org>
18691
18692 * configure.ac: Rename configure.in, require autoconf 2.59.
18693 * configure: Re-generate.
18694
18695 2004-12-08 Daniel Jacobowitz <dan@debian.org>
18696
18697 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
18698 LIBS when finished.
18699 * aclocal.m4: Regenerated.
18700 * configure: Regenerated.
18701
18702 2004-11-21 Andreas Schwab <schwab@suse.de>
18703
18704 * linux-m68k-low.c (m68k_num_gregs): Define.
18705 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
18706 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
18707 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
18708 (m68k_breakpoint_at): New. Add to the_low_target.
18709
18710 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
18711 srv_linux_thread_db to yes.
18712
18713 2004-10-20 Joel Brobecker <brobecker@gnat.com>
18714
18715 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
18716 (ARCH_SET_FS): Likewise.
18717 (ARCH_GET_FS): Likewise.
18718 (ARCH_GET_GS): Likewise.
18719
18720 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18721
18722 * linux-i386-low.c (ps_get_thread_area): New.
18723 * linux-x86-64-low.c (ps_get_thread_area): New.
18724 * linux-low.c: Include <sys/syscall.h>.
18725 (linux_kill_one_process): Don't kill the first thread here.
18726 (linux_kill): Kill the first thread here.
18727 (kill_lwp): New function.
18728 (send_sigstop, linux_send_signal): Use it.
18729 * proc-service.c: Clean up #ifdefs.
18730 (fpregset_info): Delete.
18731 (ps_lgetregs): Update and enable implementation.
18732 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
18733 implementations.
18734 * remote-utils.c (struct sym_cache, symbol_cache): New.
18735 (input_interrupt): Print a clearer message.
18736 (async_io_enabled): New variable.
18737 (enable_async_io, disable_async_io): Use it. Update comments.
18738 (look_up_one_symbol): Use the symbol cache.
18739 * thread-db.c (thread_db_look_up_symbols): New function.
18740 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
18741
18742 2004-10-16 Daniel Jacobowitz <dan@debian.org>
18743
18744 * configure.in: Test for -rdynamic.
18745 * configure: Regenerated.
18746 * Makefile (INTERNAL_LDFLAGS): New.
18747 (gdbserver, gdbreplay): Use it.
18748
18749 2004-09-02 Andrew Cagney <cagney@gnu.org>
18750
18751 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
18752
18753 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
18754
18755 * linux-low.c (linux_wait): Clear all_processes list also.
18756
18757 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18758
18759 * linux-low.c: Include <errno.h>. Remove extern declaration of
18760 errno.
18761
18762 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
18763
18764 * gdbreplay.c, server.h, utils.c: Update copyright years.
18765
18766 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18767
18768 * server.c (main): Print child status or termination signal from
18769 variable 'signal', not 'sig'.
18770
18771 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
18772
18773 * linux-low.c (linux_read_memory): Change return type to
18774 int. Check for and return error from ptrace().
18775 * target.c (read_inferior_memory): Change return type to int. Pass
18776 back return status from the_target->read_memory().
18777 * target.h (struct target_ops): Adapt *read_memory() prototype.
18778 Update comment.
18779 (read_inferior_memory): Adapt prototype.
18780 * server.c (main): Return an error packet if
18781 read_inferior_memory() returns an error.
18782
18783 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
18784
18785 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
18786 Unify with other clean targets.
18787
18788 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18789
18790 * server.c (handle_v_cont): Call set_desired_inferior.
18791
18792 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18793
18794 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
18795
18796 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18797
18798 * linux-low.c (linux_wait): Unblock async I/O.
18799 (linux_resume): Block and enable async I/O.
18800 * remote-utils.c (block_async_io, unblock_async_io): New functions.
18801 * server.h (block_async_io, unblock_async_io): Add prototypes.
18802
18803 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18804
18805 * remote-utils.c (remote_open): Print a status notice after
18806 opening a TCP port.
18807 * server.c (attach_inferior): Print a status notice after
18808 attaching.
18809
18810 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
18811
18812 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
18813
18814 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
18815
18816 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
18817 error packet.
18818 * server.c, target.h: Update copyright years.
18819
18820 2004-02-25 Roland McGrath <roland@redhat.com>
18821
18822 * target.h (struct target_ops): New member `read_auxv'.
18823 * server.c (handle_query): Handle qPart:auxv:read: query using that.
18824 * linux-low.c (linux_read_auxv): New function.
18825 (linux_target_ops): Initialize `read_auxv' member to that.
18826
18827 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
18828
18829 Committed by Jim Blandy <jimb@redhat.com>.
18830
18831 * linux-s390-low.c (s390_num_regs): Update.
18832 (s390_regmap): Remove control registers. Use __s390x__ predefine
18833 instead of GPR_SIZE to distiguish s390 and s390x targets.
18834
18835 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
18836
18837 * linux-low.c: Update copyright year.
18838 (check_removed_breakpoint): Clear pending_is_breakpoint.
18839 (linux_set_resume_request, linux_queue_one_thread)
18840 (resume_status_pending_p): New functions.
18841 (linux_continue_one_thread): Use process->resume.
18842 (linux_resume): Only resume threads if there are no pending events.
18843 * linux-low.h (struct process_info): Add resume request
18844 pointer.
18845
18846 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
18847
18848 * regcache.c (new_register_cache): Clear the allocated register
18849 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
18850
18851 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
18852
18853 * linux-low.c (linux_resume): Take a struct thread_resume *
18854 argument.
18855 (linux_wait): Update call.
18856 (resume_ptr): New static variable.
18857 (linux_continue_one_thread): Renamed from
18858 linux_continue_one_process. Use resume_ptr.
18859 (linux_resume): Use linux_continue_one_thread.
18860 * server.c (handle_v_cont, handle_v_requests): New functions.
18861 (myresume): New function.
18862 (main): Handle 'v' case.
18863 * target.h (struct thread_resume): New type.
18864 (struct target_ops): Change argument of "resume" to struct
18865 thread_resume *.
18866 (myresume): Delete macro.
18867
18868 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
18869
18870 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
18871 (uninstall): Support DESTDIR.
18872
18873 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
18874
18875 * configure.srv: Add xscale*linux copy of arm*linux entry.
18876
18877 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
18878
18879 * linux-arm-low.c (arm_reinsert_addr): New function.
18880 (the_low_target): Add arm_reinsert_addr.
18881
18882 2003-07-08 Mark Kettenis <kettenis@gnu.org>
18883
18884 * mem-break.c: Remove whitespace at end of file.
18885
18886 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18887
18888 * configure.in: Check whether we need to prototype strerror.
18889 * server.h: Optionally prototype strerror.
18890 * gdbreplay.c (perror_with_name): Use strerror.
18891 * linux-low.c (linux_attach_lwp): Use strerror.
18892 * utils.c (perror_with_name): Use strerror.
18893 * config.in, configure: Regenerated.
18894
18895 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
18896
18897 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
18898 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
18899
18900 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
18901
18902 * Makefile.in (SFILES): Update.
18903 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
18904 low-sun3.c: Remove files.
18905
18906 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
18907
18908 * linux-low.c: Move comment to linux_thread_alive where it belonged.
18909 (linux_detach_one_process, linux_detach): New functions.
18910 (linux_target_ops): Add linux_detach.
18911 * server.c (main): Handle 'D' packet.
18912 * target.h (struct target_ops): Add "detach" member.
18913 (detach_inferior): Define.
18914
18915 2003-06-13 Mark Kettenis <kettenis@gnu.org>
18916
18917 From Kelley Cook <kelleycook@wideopenwest.com>:
18918 * configure.srv: Accept i[34567]86 variants.
18919
18920 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
18921
18922 * linux-low.c (linux_wait_for_event): Correct comment typos.
18923 (linux_resume_one_process): Call check_removed_breakpoint.
18924 (linux_send_signal): New function.
18925 (linux_target_ops): Add linux_send_signal.
18926 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
18927 of kill.
18928 * target.h (struct target_ops): Add send_signal.
18929
18930 2003-05-29 Jim Blandy <jimb@redhat.com>
18931
18932 * linux-low.c (usr_store_inferior_registers): Transfer buf in
18933 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
18934 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
18935 away part of the register's value.
18936
18937 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
18938
18939 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
18940 (linux_wait_for_event, linux_init_signals): Likewise.
18941
18942 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
18943
18944 * configure.in: Check for stdlib.h.
18945 * configure: Regenerated.
18946 * config.in: Regenerated.
18947
18948 2003-01-04 Andreas Schwab <schwab@suse.de>
18949
18950 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
18951
18952 2003-01-02 Andrew Cagney <ac131313@redhat.com>
18953
18954 * Makefile.in: Remove obsolete code.
18955
18956 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
18957
18958 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
18959 defined(PT_FPR0_HI).
18960
18961 2002-11-17 Stuart Hughes <seh@zee2.com>
18962
18963 * linux-arm-low.c (arm_num_regs): Increase.
18964 (arm_regmap): Include status register.
18965
18966 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
18967
18968 * linux-low.c (register_addr): Remove incorrect -1 check.
18969
18970 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
18971
18972 * linux-low.c (linux_create_inferior): Call setpgid. Return
18973 the new PID.
18974 (unstopped_p, linux_signal_pid): Remove.
18975 (linux_target_ops): Remove linux_signal_pid.
18976 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
18977 global instead of target method.
18978 * target.h (struct target_ops): Remove signal_pid. Update comment
18979 for create_inferior.
18980 * server.c (signal_pid): New variable.
18981 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
18982 gdbserver. Set the child to be the foreground process group.
18983 (attach_inferior): Set signal_pid.
18984
18985 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
18986
18987 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
18988
18989 2002-08-20 Jim Blandy <jimb@redhat.com>
18990
18991 * Makefile.in (LDFLAGS): Allow the configure script to establish a
18992 default for this.
18993
18994 2002-08-01 Andrew Cagney <cagney@redhat.com>
18995
18996 * Makefile.in: Make chill references obsolete.
18997
18998 2002-07-24 Kevin Buettner <kevinb@redhat.com>
18999
19000 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19001 * configure: Regenerate.
19002 * config.in: Regenerate.
19003
19004 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19005
19006 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19007 (perror_with_name, remote_close, remote_open, expect, play): Static.
19008
19009 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19010
19011 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19012 byte offsets instead of an array of indexes.
19013 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19014
19015 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19016
19017 * regcache.c: Add comment.
19018
19019 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19020
19021 * thread-db.c: New file.
19022 * proc-service.c: New file.
19023 * acinclude.m4: New file.
19024 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19025 proc-service.o, and thread-db.o.
19026 (linux-low.o): Add USE_THREAD_DB.
19027 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19028 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19029 * aclocal.m4: Regenerated.
19030 * config.in: Regenerated.
19031 * configure: Regenerated.
19032 * configure.in: Check for proc_service.h, sys/procfs.h,
19033 thread_db.h, and linux/elf.h headrs.
19034 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19035 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19036 Check for -lthread_db and thread support.
19037 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19038 PowerPC, and SuperH.
19039 * i387-fp.c: Constify arguments.
19040 * i387-fp.h: Likewise.
19041 * inferiors.c: (struct thread_info): Renamed from
19042 `struct inferior_info'. Remove PID member. Use generic inferior
19043 list header. All uses updated.
19044 (inferiors, signal_pid): Removed.
19045 (all_threads): New variable.
19046 (get_thread): Define.
19047 (add_inferior_to_list): New function.
19048 (for_each_inferior): New function.
19049 (change_inferior_id): New function.
19050 (add_inferior): Removed.
19051 (remove_inferior): New function.
19052 (add_thread): New function.
19053 (free_one_thread): New function.
19054 (remove_thread): New function.
19055 (clear_inferiors): Use for_each_inferior and free_one_thread.
19056 (find_inferior): New function.
19057 (find_inferior_id): New function.
19058 (inferior_target_data): Update argument type.
19059 (set_inferior_target_data): Likewise.
19060 (inferior_regcache_data): Likewise.
19061 (set_inferior_regcache_data): Likewise.
19062 * linux-low.c (linux_bp_reinsert): Remove.
19063 (all_processes, stopping_threads, using_thrads)
19064 (struct pending_signals, debug_threads, pid_of): New.
19065 (inferior_pid): Replace with macro.
19066 (struct inferior_linux_data): Remove.
19067 (get_stop_pc, add_process): New functions.
19068 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19069 Use add_process and add_thread.
19070 (linux_attach_lwp): New function, based on old linux_attach. Use
19071 add_process and add_thread. Set stop_expected for new threads.
19072 (linux_attach): New function.
19073 (linux_kill_one_process): New function.
19074 (linux_kill): Kill all LWPs.
19075 (linux_thread_alive): Use find_inferior_id.
19076 (check_removed_breakpoints, status_pending_p): New functions.
19077 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19078 Update. Use WNOHANG. Wait for cloned processes also. Update process
19079 struct for the found process.
19080 (linux_wait_for_event): New function.
19081 (linux_wait): Use it. Support LWPs.
19082 (send_sigstop, wait_for_sigstop, stop_all_processes)
19083 (linux_resume_one_process, linux_continue_one_process): New functions.
19084 (linux_resume): Support LWPs.
19085 (REGISTER_RAW_SIZE): Remove.
19086 (fetch_register): Use register_size instead. Call supply_register.
19087 (usr_store_inferior_registers): Likewise. Call collect_register.
19088 Fix recursive case.
19089 (regsets_fetch_inferior_registers): Improve error message.
19090 (regsets_store_inferior_registers): Add debugging.
19091 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19092 (unstopped_p, linux_signal_pid): New functions.
19093 (linux_target_ops): Add linux_signal_pid.
19094 (linux_init_signals): New function.
19095 (initialize_low): Call it. Initialize using_threads.
19096 * regcache.c (inferior_regcache_data): Add valid
19097 flag.
19098 (get_regcache): Fetch registers lazily. Add fetch argument
19099 and update all callers.
19100 (regcache_invalidate_one, regcache_invalidate): New
19101 functions.
19102 (new_register_cache): Renamed from create_register_cache.
19103 Return the new regcache.
19104 (free_register_cache): Change argument to a void *.
19105 (registers_to_string, registers_from_string): Call get_regcache
19106 with fetch flag set.
19107 (register_data): Make static. Pass fetch flag to get_regcache.
19108 (supply_register): Call get_regcache with fetch flag clear.
19109 (collect_register): Call get_regcache with fetch flag set.
19110 (collect_register_as_string): New function.
19111 * regcache.h: Update.
19112 * remote-utils.c (putpkt): Flush after debug output and use
19113 stderr.
19114 Handle input interrupts while waiting for an ACK.
19115 (input_interrupt): Use signal_pid method.
19116 (getpkt): Flush after debug output and use stderr.
19117 (outreg): Use collect_register_as_string.
19118 (new_thread_notify, dead_thread_notify): New functions.
19119 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19120 and general_thread.
19121 (look_up_one_symbol): Flush after debug output.
19122 * server.c (step_thread, server_waiting): New variables.
19123 (start_inferior): Don't use signal_pid. Update call to mywait.
19124 (attach_inferior): Update call to mywait.
19125 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19126 (main): Don't fetch/store registers explicitly. Use
19127 set_desired_inferior. Support proposed ``Hs'' packet. Update
19128 calls to mywait.
19129 * server.h: Update.
19130 (struct inferior_list, struct_inferior_list_entry): New.
19131 * target.c (set_desired_inferior): New.
19132 (write_inferior_memory): Constify.
19133 (mywait): New function.
19134 * target.h: Update.
19135 (struct target_ops): New signal_pid method.
19136 (mywait): Removed macro, added prototype.
19137
19138 * linux-low.h (regset_func): Removed.
19139 (regset_fill_func, regset_store_func): New.
19140 (enum regset_type): New.
19141 (struct regset_info): Add type field. Use new operation types.
19142 (struct linux_target_ops): stop_pc renamed to get_pc.
19143 Add decr_pc_after_break and breakpoint_at.
19144 (get_process, get_thread_proess, get_process_thread)
19145 (strut process_info, all_processes, linux_attach_lwp)
19146 (thread_db_init): New.
19147
19148 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19149 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19150 (the_low_target): Add new members.
19151 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19152 (i386_store_fpxregset): Constify.
19153 (target_regsets): Add new kind identifier.
19154 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19155 (i386_set_pc): Add debugging.
19156 (i386_breakpoint_at): New function.
19157 (the_low_target): Add new members.
19158 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19159 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19160 (mips_breakpoint_at): New.
19161 (the_low_target): Add new members.
19162 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19163 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19164 (the_low_target): Add new members.
19165 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19166 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19167 (the_low_target): Add new members.
19168 * linux-x86-64-low.c (target_regsets): Add new kind
19169 identifier.
19170
19171 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19172
19173 From Martin Pool <mbp@samba.org>:
19174 * server.c (gdbserver_usage): New function.
19175 (main): Call it.
19176
19177 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19178
19179 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19180 stop_at -> stop_pc.
19181
19182 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19183
19184 * Makefile.in: Remove obsolete code.
19185
19186 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19187
19188 * linux-low.c (regsets_fetch_inferior_registers),
19189 (regsets_store_inferior_registers): Removed cast to int from
19190 ptrace() calls.
19191 * regcache.h: Added declaration of struct inferior_info.
19192
19193 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19194
19195 * inferiors.c (struct inferior_info): Add regcache_data.
19196 (add_inferior): Call create_register_cache.
19197 (clear_inferiors): Call free_register_cache.
19198 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19199 * regcache.c (struct inferior_regcache_data): New.
19200 (registers): Remove.
19201 (get_regcache): New function.
19202 (create_register_cache, free_register_cache): New functions.
19203 (set_register_cache): Don't initialize the register cache here.
19204 (registers_to_string, registers_from_string, register_data): Call
19205 get_regcache.
19206 * regcache.h: Add prototypes.
19207 * server.h: Likewise.
19208
19209 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19210
19211 * mem-break.c: New file.
19212 * mem-break.h: New file.
19213 * Makefile.in: Add mem-break.o rule; update server.h
19214 dependencies.
19215 * inferiors.c (struct inferior_info): Add target_data
19216 member.
19217 (clear_inferiors): Free target_data member if set.
19218 (inferior_target_data, set_inferior_target_data): New functions.
19219 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19220 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19221 * linux-low.c (linux_bp_reinsert): New variable.
19222 (struct inferior_linux_data): New.
19223 (linux_create_inferior): Use set_inferior_target_data.
19224 (linux_attach): Likewise. Call add_inferior.
19225 (linux_wait_for_one_inferior): New function.
19226 (linux_wait): Call it.
19227 (linux_write_memory): Add const.
19228 (initialize_low): Call set_breakpoint_data.
19229 * linux-low.h (struct linux_target_ops): Add breakpoint
19230 handling members.
19231 * server.c (attach_inferior): Remove extra add_inferior
19232 call.
19233 * server.h: Include mem-break.h. Update inferior.c
19234 prototypes.
19235 * target.c (read_inferior_memory)
19236 (write_inferior_memory): New functions.
19237 * target.h (read_inferior_memory)
19238 (write_inferior_memory): Change macros to prototypes.
19239 (struct target_ops): Update comments. Add const to write_memory
19240 definition.
19241
19242 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19243
19244 * linux-low.c (usr_store_inferior_registers): Support
19245 registers which are allowed to fail to store.
19246 * linux-low.h (linux_target_ops): Likewise.
19247 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19248 (ppc_cannot_store_register): FPSCR may not be storable.
19249
19250 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19251
19252 * server.h: Include <string.h> if HAVE_STRING_H.
19253 * ChangeLog: Correct paths in last ChangeLog entry.
19254
19255 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19256
19257 * linux-low.h: Remove obsolete prototypes.
19258 (struct linux_target_ops): New.
19259 (extern the_low_target): New.
19260 * linux-low.c (num_regs, regmap): Remove declarations.
19261 (register_addr): Use the_low_target explicitly.
19262 (fetch_register): Likewise.
19263 (usr_fetch_inferior_registers): Likewise.
19264 (usr_store_inferior_registers): Likewise.
19265 * linux-arm-low.c (num_regs): Remove.
19266 (arm_num_regs): Define.
19267 (arm_regmap): Renamed from regmap, made static.
19268 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19269 made static.
19270 (arm_cannot_store_register): Renamed from cannot_store_register,
19271 made static.
19272 (the_low_target): New.
19273 * linux-i386-low.c (num_regs): Remove.
19274 (i386_num_regs): Define.
19275 (i386_regmap): Renamed from regmap, made static.
19276 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19277 made static.
19278 (i386_cannot_store_register): Renamed from cannot_store_register,
19279 made static.
19280 (the_low_target): New.
19281 * linux-ia64-low.c (num_regs): Remove.
19282 (ia64_num_regs): Define.
19283 (ia64_regmap): Renamed from regmap, made static.
19284 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19285 made static.
19286 (ia64_cannot_store_register): Renamed from cannot_store_register,
19287 made static.
19288 (the_low_target): New.
19289 * linux-m68k-low.c (num_regs): Remove.
19290 (m68k_num_regs): Define.
19291 (m68k_regmap): Renamed from regmap, made static.
19292 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19293 made static.
19294 (m68k_cannot_store_register): Renamed from cannot_store_register,
19295 made static.
19296 (the_low_target): New.
19297 * linux-mips-low.c (num_regs): Remove.
19298 (mips_num_regs): Define.
19299 (mips_regmap): Renamed from regmap, made static.
19300 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19301 made static.
19302 (mips_cannot_store_register): Renamed from cannot_store_register,
19303 made static.
19304 (the_low_target): New.
19305 * linux-ppc-low.c (num_regs): Remove.
19306 (ppc_num_regs): Define.
19307 (ppc_regmap): Renamed from regmap, made static.
19308 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19309 made static.
19310 (ppc_cannot_store_register): Renamed from cannot_store_register,
19311 made static.
19312 (the_low_target): New.
19313 * linux-s390-low.c (num_regs): Remove.
19314 (s390_num_regs): Define.
19315 (s390_regmap): Renamed from regmap, made static.
19316 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19317 made static.
19318 (s390_cannot_store_register): Renamed from cannot_store_register,
19319 made static.
19320 (the_low_target): New.
19321 * linux-sh-low.c (num_regs): Remove.
19322 (sh_num_regs): Define.
19323 (sh_regmap): Renamed from regmap, made static.
19324 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19325 made static.
19326 (sh_cannot_store_register): Renamed from cannot_store_register,
19327 made static.
19328 (the_low_target): New.
19329 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19330 (the_low_target): New.
19331
19332 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19333
19334 * Makefile.in: Add stamp-h target.
19335 * configure.in: Create stamp-h.
19336 * configure: Regenerated.
19337
19338 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19339
19340 * inferiors.c: New file.
19341 * target.c: New file.
19342 * target.h: New file.
19343 * Makefile.in: Add target.o and inferiors.o. Update
19344 dependencies.
19345 * linux-low.c (inferior_pid): New static variable,
19346 moved from server.c.
19347 (linux_create_inferior): Renamed from create_inferior.
19348 Call add_inferior. Return 0 on success instead of a PID.
19349 (linux_attach): Renamed from myattach.
19350 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19351 (linux_thread_alive): Renamed from mythread_alive.
19352 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19353 child dies.
19354 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19355 (regsets_store_inferior_registers): Correct error message.
19356 Add missing ``return 0''.
19357 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19358 (linux_store_registers): Renamed from store_inferior_registers.
19359 (linux_read_memory): Renamed from read_inferior_memory.
19360 (linux_write_memory): Renamed from write_inferior_memory.
19361 (linux_target_ops): New structure.
19362 (initialize_low): Call set_target_ops ().
19363 * remote-utils.c (unhexify): New function.
19364 (hexify): New function.
19365 (input_interrupt): Send signals to ``signal_pid''.
19366 * server.c (inferior_pid): Remove.
19367 (start_inferior): Update create_inferior call.
19368 (attach_inferior): Call add_inferior.
19369 (handle_query): New function.
19370 (main): Call handle_query for `q' packets.
19371 * server.h: Include "target.h". Remove obsolete prototypes.
19372 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19373
19374 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19375
19376 * Makefile.in: Add WARN_CFLAGS. Update configury
19377 dependencies.
19378 * configure.in: Check for <string.h>
19379 * configure: Regenerate.
19380 * config.in: Regenerate.
19381 * gdbreplay.c: Include needed system headers.
19382 (remote_open): Remove strchr prototype.
19383 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19384 * regcache.c (supply_register): Change buf argument to const void *.
19385 (supply_register_by_name): Likewise.
19386 (collect_register): Change buf argument to void *.
19387 (collect_register_by_name): Likewise.
19388 * regcache.h: Add missing prototypes.
19389 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19390 * server.c (handle_query): New function.
19391 (attached): New static variable, moved out of main.
19392 (main): Quiet longjmp clobber warnings.
19393 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19394 * utils.c (error): Remove NORETURN.
19395 (fatal): Likewise.
This page took 0.421046 seconds and 3 git commands to generate.